syntaur 0.4.4 → 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-CWivToyi.js → _basePickBy-Bcut0btZ.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-C-qj6E4l.js → _baseUniq-AQSP2JEk.js} +1 -1
- package/dashboard/dist/assets/{arc-Dn5BIqMa.js → arc-BLTpY9lc.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-D5D0K7rY.js → architectureDiagram-2XIMDMQ5-CJtwMY_X.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-DVmYPMbu.js → blockDiagram-WCTKOSBZ-Don-O7X7.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-BEasxbnl.js → c4Diagram-IC4MRINW-C_M3yTTB.js} +1 -1
- package/dashboard/dist/assets/channel-BfXmPwE5.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-LDIrtI5E.js → chunk-4BX2VUAB-CGss0jXe.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-CaEBUJYu.js → chunk-55IACEB6-BatoPJga.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-B-GjCpdr.js → chunk-FMBD7UC4-DxH4wO82.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-BLVVcezm.js → chunk-JSJVCQXG-BL3izAFQ.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-DqCNEw4h.js → chunk-KX2RTZJC-GnqXwnge.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-BCPbFf5I.js → chunk-NQ4KR5QH-gvCn4QMb.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-Ci0C85q_.js → chunk-QZHKN3VN-CYGWogyi.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-VVhAMMYU.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-CO9uwgYO.js → cose-bilkent-S5V4N54A-CUWQCKt4.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-bwLLXcL4.js → dagre-KLK3FWXG-CH3ijEvV.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-RuS5R6V1.js → diagram-E7M64L7V-sq83lpV1.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2-BQDJAHQd.js → diagram-IFDJBPK2-BzQG_rtq.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-yLEsgzE5.js → diagram-P4PSJMXO-Dg0eZn0q.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-na6dUhY0.js → erDiagram-INFDFZHY-4b9eQ0uj.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-BIcrzwJR.js → flowDiagram-PKNHOUZH-C9fzKcsZ.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-DHWRJn-D.js → ganttDiagram-A5KZAMGK-Bzt6i9SH.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-LGxDjL71.js → gitGraphDiagram-K3NZZRJ6-D0wFOagh.js} +1 -1
- package/dashboard/dist/assets/{graph-BUqNu277.js → graph-EEIGvqDh.js} +1 -1
- package/dashboard/dist/assets/index-Bu6ma6my.css +1 -0
- package/dashboard/dist/assets/index-C7f0ySJE.js +481 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-DidoA2hb.js → infoDiagram-LFFYTUFH-DLYMsj1D.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-CdlZkbhV.js → ishikawaDiagram-PHBUUO56-DVebKkzl.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-luhcz_gn.js → journeyDiagram-4ABVD52K-BsmgOWVw.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Coidw9XE.js → kanban-definition-K7BYSVSG-BTnHf0ey.js} +1 -1
- package/dashboard/dist/assets/{layout-_aBAAleE.js → layout-BbM7HRvv.js} +1 -1
- package/dashboard/dist/assets/{linear-D8mFnDSx.js → linear-C37bJKPO.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-BpP2keU-.js → mermaid.core-MZ_JgnRL.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-LjvrTe2z.js → mindmap-definition-YRQLILUH-CgHS4hFo.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CkA2iU6e.js → pieDiagram-SKSYHLDU-CmAgopJe.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-BRmhKHQG.js → quadrantDiagram-337W2JSQ-BvzYUPR6.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-BYCQ4uFX.js → requirementDiagram-Z7DCOOCP-Bs52VP7k.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-C8SVk50M.js → sankeyDiagram-WA2Y5GQK-aXvGPR1o.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-CbA_2lnP.js → sequenceDiagram-2WXFIKYE-CzgcfU6K.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-D6ZtjAHE.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-B2Uf-emK.js → timeline-definition-YZTLITO2-BsXp26Ai.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-CYnFKsuJ.js → treemap-KZPCXAKY-C3WbDii1.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-Cnj0qiDO.js → vennDiagram-LZ73GAT5-B28LMHWd.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-BJy2mbL9.js → xychartDiagram-JWTSCODW-C3Xwz8mS.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/dashboard/server.js +1329 -402
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +1591 -533
- package/dist/index.js.map +1 -1
- package/examples/playbooks/assignment-creation.md +19 -0
- package/examples/playbooks/assignment-planning.md +28 -0
- package/package.json +1 -1
- package/platforms/claude-code/.orphaned_at +1 -0
- package/platforms/claude-code/agents/syntaur-expert.md +2 -2
- package/platforms/claude-code/commands/create-assignment/create-assignment.md +1 -1
- package/platforms/codex/agents/syntaur-operator.md +2 -2
- package/vendor/syntaur-skills/README.md +12 -0
- package/vendor/syntaur-skills/skills/create-assignment/SKILL.md +5 -4
- package/dashboard/dist/assets/channel-DqU_8tiy.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-D29Eeoe8.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-D29Eeoe8.js +0 -1
- package/dashboard/dist/assets/clone-Bok8Q3Jj.js +0 -1
- package/dashboard/dist/assets/index-D-fepllQ.js +0 -481
- package/dashboard/dist/assets/index-DnHyQJJH.css +0 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DeYN4wV6.js +0 -1
- package/examples/playbooks/plan-versioning.md +0 -36
- package/examples/playbooks/read-before-plan.md +0 -30
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
function hj(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 l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{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 l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function VO(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 Pd={exports:{}},Ii={},Rd={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 Bg;function mj(){if(Bg)return ze;Bg=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"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.iterator;function v(B){return B===null||typeof B!="object"?null:(B=x&&B[x]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function j(B,Z,I){this.props=B,this.context=Z,this.refs=k,this.updater=I||b}j.prototype.isReactComponent={},j.prototype.setState=function(B,Z){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Z,"setState")},j.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function S(){}S.prototype=j.prototype;function P(B,Z,I){this.props=B,this.context=Z,this.refs=k,this.updater=I||b}var T=P.prototype=new S;T.constructor=P,N(T,j.prototype),T.isPureReactComponent=!0;var L=Array.isArray,O=Object.prototype.hasOwnProperty,R={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function A(B,Z,I){var de,ve={},fe=null,Ee=null;if(Z!=null)for(de in Z.ref!==void 0&&(Ee=Z.ref),Z.key!==void 0&&(fe=""+Z.key),Z)O.call(Z,de)&&!$.hasOwnProperty(de)&&(ve[de]=Z[de]);var Ne=arguments.length-2;if(Ne===1)ve.children=I;else if(1<Ne){for(var Pe=Array(Ne),je=0;je<Ne;je++)Pe[je]=arguments[je+2];ve.children=Pe}if(B&&B.defaultProps)for(de in Ne=B.defaultProps,Ne)ve[de]===void 0&&(ve[de]=Ne[de]);return{$$typeof:e,type:B,key:fe,ref:Ee,props:ve,_owner:R.current}}function q(B,Z){return{$$typeof:e,type:B.type,key:Z,ref:B.ref,props:B.props,_owner:B._owner}}function J(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function z(B){var Z={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(I){return Z[I]})}var G=/\/+/g;function Y(B,Z){return typeof B=="object"&&B!==null&&B.key!=null?z(""+B.key):Z.toString(36)}function Q(B,Z,I,de,ve){var fe=typeof B;(fe==="undefined"||fe==="boolean")&&(B=null);var Ee=!1;if(B===null)Ee=!0;else switch(fe){case"string":case"number":Ee=!0;break;case"object":switch(B.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=B,ve=ve(Ee),B=de===""?"."+Y(Ee,0):de,L(ve)?(I="",B!=null&&(I=B.replace(G,"$&/")+"/"),Q(ve,Z,I,"",function(je){return je})):ve!=null&&(J(ve)&&(ve=q(ve,I+(!ve.key||Ee&&Ee.key===ve.key?"":(""+ve.key).replace(G,"$&/")+"/")+B)),Z.push(ve)),1;if(Ee=0,de=de===""?".":de+":",L(B))for(var Ne=0;Ne<B.length;Ne++){fe=B[Ne];var Pe=de+Y(fe,Ne);Ee+=Q(fe,Z,I,Pe,ve)}else if(Pe=v(B),typeof Pe=="function")for(B=Pe.call(B),Ne=0;!(fe=B.next()).done;)fe=fe.value,Pe=de+Y(fe,Ne++),Ee+=Q(fe,Z,I,Pe,ve);else if(fe==="object")throw Z=String(B),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Ee}function _(B,Z,I){if(B==null)return B;var de=[],ve=0;return Q(B,de,"","",function(fe){return Z.call(I,fe,ve++)}),de}function D(B){if(B._status===-1){var Z=B._result;Z=Z(),Z.then(function(I){(B._status===0||B._status===-1)&&(B._status=1,B._result=I)},function(I){(B._status===0||B._status===-1)&&(B._status=2,B._result=I)}),B._status===-1&&(B._status=0,B._result=Z)}if(B._status===1)return B._result.default;throw B._result}var F={current:null},U={transition:null},K={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:U,ReactCurrentOwner:R};function E(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:_,forEach:function(B,Z,I){_(B,function(){Z.apply(this,arguments)},I)},count:function(B){var Z=0;return _(B,function(){Z++}),Z},toArray:function(B){return _(B,function(Z){return Z})||[]},only:function(B){if(!J(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},ze.Component=j,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=P,ze.StrictMode=o,ze.Suspense=p,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,ze.act=E,ze.cloneElement=function(B,Z,I){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var de=N({},B.props),ve=B.key,fe=B.ref,Ee=B._owner;if(Z!=null){if(Z.ref!==void 0&&(fe=Z.ref,Ee=R.current),Z.key!==void 0&&(ve=""+Z.key),B.type&&B.type.defaultProps)var Ne=B.type.defaultProps;for(Pe in Z)O.call(Z,Pe)&&!$.hasOwnProperty(Pe)&&(de[Pe]=Z[Pe]===void 0&&Ne!==void 0?Ne[Pe]:Z[Pe])}var Pe=arguments.length-2;if(Pe===1)de.children=I;else if(1<Pe){Ne=Array(Pe);for(var je=0;je<Pe;je++)Ne[je]=arguments[je+2];de.children=Ne}return{$$typeof:e,type:B.type,key:ve,ref:fe,props:de,_owner:Ee}},ze.createContext=function(B){return B={$$typeof:c,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:l,_context:B},B.Consumer=B},ze.createElement=A,ze.createFactory=function(B){var Z=A.bind(null,B);return Z.type=B,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(B){return{$$typeof:d,render:B}},ze.isValidElement=J,ze.lazy=function(B){return{$$typeof:m,_payload:{_status:-1,_result:B},_init:D}},ze.memo=function(B,Z){return{$$typeof:h,type:B,compare:Z===void 0?null:Z}},ze.startTransition=function(B){var Z=U.transition;U.transition={};try{B()}finally{U.transition=Z}},ze.unstable_act=E,ze.useCallback=function(B,Z){return F.current.useCallback(B,Z)},ze.useContext=function(B){return F.current.useContext(B)},ze.useDebugValue=function(){},ze.useDeferredValue=function(B){return F.current.useDeferredValue(B)},ze.useEffect=function(B,Z){return F.current.useEffect(B,Z)},ze.useId=function(){return F.current.useId()},ze.useImperativeHandle=function(B,Z,I){return F.current.useImperativeHandle(B,Z,I)},ze.useInsertionEffect=function(B,Z){return F.current.useInsertionEffect(B,Z)},ze.useLayoutEffect=function(B,Z){return F.current.useLayoutEffect(B,Z)},ze.useMemo=function(B,Z){return F.current.useMemo(B,Z)},ze.useReducer=function(B,Z,I){return F.current.useReducer(B,Z,I)},ze.useRef=function(B){return F.current.useRef(B)},ze.useState=function(B){return F.current.useState(B)},ze.useSyncExternalStore=function(B,Z,I){return F.current.useSyncExternalStore(B,Z,I)},ze.useTransition=function(){return F.current.useTransition()},ze.version="18.3.1",ze}var Ug;function ep(){return Ug||(Ug=1,Rd.exports=mj()),Rd.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 Hg;function gj(){if(Hg)return Ii;Hg=1;var e=ep(),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,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,h){var m,x={},v=null,b=null;h!==void 0&&(v=""+h),p.key!==void 0&&(v=""+p.key),p.ref!==void 0&&(b=p.ref);for(m in p)o.call(p,m)&&!l.hasOwnProperty(m)&&(x[m]=p[m]);if(d&&d.defaultProps)for(m in p=d.defaultProps,p)x[m]===void 0&&(x[m]=p[m]);return{$$typeof:t,type:d,key:v,ref:b,props:x,_owner:i.current}}return Ii.Fragment=n,Ii.jsx=c,Ii.jsxs=c,Ii}var Wg;function xj(){return Wg||(Wg=1,Pd.exports=gj()),Pd.exports}var a=xj(),g=ep();const bt=uc(g),Zy=hj({__proto__:null,default:bt},[g]);var Sl={},Td={exports:{}},kn={},Ad={exports:{}},Dd={};/**
|
|
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 Vg;function yj(){return Vg||(Vg=1,(function(e){function t(U,K){var E=U.length;U.push(K);e:for(;0<E;){var B=E-1>>>1,Z=U[B];if(0<i(Z,K))U[B]=K,U[E]=Z,E=B;else break e}}function n(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var K=U[0],E=U.pop();if(E!==K){U[0]=E;e:for(var B=0,Z=U.length,I=Z>>>1;B<I;){var de=2*(B+1)-1,ve=U[de],fe=de+1,Ee=U[fe];if(0>i(ve,E))fe<Z&&0>i(Ee,ve)?(U[B]=Ee,U[fe]=E,B=fe):(U[B]=ve,U[de]=E,B=de);else if(fe<Z&&0>i(Ee,E))U[B]=Ee,U[fe]=E,B=fe;else break e}}return K}function i(U,K){var E=U.sortIndex-K.sortIndex;return E!==0?E:U.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],h=[],m=1,x=null,v=3,b=!1,N=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(U){for(var K=n(h);K!==null;){if(K.callback===null)o(h);else if(K.startTime<=U)o(h),K.sortIndex=K.expirationTime,t(p,K);else break;K=n(h)}}function L(U){if(k=!1,T(U),!N)if(n(p)!==null)N=!0,D(O);else{var K=n(h);K!==null&&F(L,K.startTime-U)}}function O(U,K){N=!1,k&&(k=!1,S(A),A=-1),b=!0;var E=v;try{for(T(K),x=n(p);x!==null&&(!(x.expirationTime>K)||U&&!z());){var B=x.callback;if(typeof B=="function"){x.callback=null,v=x.priorityLevel;var Z=B(x.expirationTime<=K);K=e.unstable_now(),typeof Z=="function"?x.callback=Z:x===n(p)&&o(p),T(K)}else o(p);x=n(p)}if(x!==null)var I=!0;else{var de=n(h);de!==null&&F(L,de.startTime-K),I=!1}return I}finally{x=null,v=E,b=!1}}var R=!1,$=null,A=-1,q=5,J=-1;function z(){return!(e.unstable_now()-J<q)}function G(){if($!==null){var U=e.unstable_now();J=U;var K=!0;try{K=$(!0,U)}finally{K?Y():(R=!1,$=null)}}else R=!1}var Y;if(typeof P=="function")Y=function(){P(G)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,_=Q.port2;Q.port1.onmessage=G,Y=function(){_.postMessage(null)}}else Y=function(){j(G,0)};function D(U){$=U,R||(R=!0,Y())}function F(U,K){A=j(function(){U(e.unstable_now())},K)}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(U){U.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,D(O))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(U){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var E=v;v=K;try{return U()}finally{v=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,K){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var E=v;v=U;try{return K()}finally{v=E}},e.unstable_scheduleCallback=function(U,K,E){var B=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?B+E:B):E=B,U){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=E+Z,U={id:m++,callback:K,priorityLevel:U,startTime:E,expirationTime:Z,sortIndex:-1},E>B?(U.sortIndex=E,t(h,U),n(p)===null&&U===n(h)&&(k?(S(A),A=-1):k=!0,F(L,E-B))):(U.sortIndex=Z,t(p,U),N||b||(N=!0,D(O))),U},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(U){var K=v;return function(){var E=v;v=K;try{return U.apply(this,arguments)}finally{v=E}}}})(Dd)),Dd}var qg;function vj(){return qg||(qg=1,Ad.exports=yj()),Ad.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 Gg;function bj(){if(Gg)return kn;Gg=1;var e=ep(),t=vj();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 l(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,h=/^[: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]*$/,m={},x={};function v(r){return p.call(x,r)?!0:p.call(m,r)?!1:h.test(r)?x[r]=!0:(m[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 P(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,P);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,P);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,P);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 T(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"),R=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),z=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),U=Symbol.iterator;function K(r){return r===null||typeof r!="object"?null:(r=U&&r[U]||r["@@iterator"],typeof r=="function"?r:null)}var E=Object.assign,B;function Z(r){if(B===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);B=s&&s[1]||""}return`
|
|
34
|
+
`+B+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 H=`
|
|
37
|
+
`+y[C].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=C&&0<=M);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Z(r):""}function ve(r){switch(r.tag){case 5:return Z(r.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("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 R:return"Portal";case q:return"Profiler";case A:return"StrictMode";case Y:return"Suspense";case Q:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case z:return(r.displayName||"Context")+".Consumer";case J:return(r._context.displayName||"Context")+".Provider";case G: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===A?"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 Pe(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function je(r){var s=Pe(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 ft(r){r._valueTracker||(r._valueTracker=je(r))}function nt(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=Pe(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 E({},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&&T(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")?Qe(r,s.type,u):s.hasOwnProperty("defaultValue")&&Qe(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 Qe(r,s,u){(s!=="number"||Ue(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var rt=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 E({},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(rt(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 Rn(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 ae(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 V=E({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 le(r,s){if(s){if(V[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 Un(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Zt=null,pt=null,Fe=null;function Xe(r){if(r=yi(r)){if(typeof Zt!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Fa(s),Zt(r.stateNode,r.type,s))}}function wt(r){pt?Fe?Fe.push(r):Fe=[r]:pt=r}function Mt(){if(pt){var r=pt,s=Fe;if(Fe=pt=null,Xe(r),s)for(r=0;r<s.length;r++)Xe(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,(pt!==null||Fe!==null)&&(en(),Mt())}}function ht(r,s){var u=r.stateNode;if(u===null)return null;var f=Fa(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 Hn=!1;if(d)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){Hn=!0}}),window.addEventListener("test",tn,tn),window.removeEventListener("test",tn,tn)}catch{Hn=!1}function Zn(r,s,u,f,y,w,C,M,H){var te=Array.prototype.slice.call(arguments,3);try{s.apply(u,te)}catch(se){this.onError(se)}}var er=!1,hr=null,An=!1,Dr=null,Zs={onError:function(r){er=!0,hr=r}};function k1(r,s,u,f,y,w,C,M,H){er=!1,hr=null,Zn.apply(Zs,arguments)}function j1(r,s,u,f,y,w,C,M,H){if(k1.apply(this,arguments),er){if(er){var te=hr;er=!1,hr=null}else throw Error(n(198));An||(An=!0,Dr=te)}}function To(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 uh(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 dh(r){if(To(r)!==r)throw Error(n(188))}function S1(r){var s=r.alternate;if(!s){if(s=To(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 dh(y),r;if(w===f)return dh(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 fh(r){return r=S1(r),r!==null?ph(r):null}function ph(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=ph(r);if(s!==null)return s;r=r.sibling}return null}var hh=t.unstable_scheduleCallback,mh=t.unstable_cancelCallback,C1=t.unstable_shouldYield,N1=t.unstable_requestPaint,kt=t.unstable_now,E1=t.unstable_getCurrentPriorityLevel,Kc=t.unstable_ImmediatePriority,gh=t.unstable_UserBlockingPriority,va=t.unstable_NormalPriority,P1=t.unstable_LowPriority,xh=t.unstable_IdlePriority,ba=null,mr=null;function R1(r){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(ba,r,void 0,(r.current.flags&128)===128)}catch{}}var tr=Math.clz32?Math.clz32:D1,T1=Math.log,A1=Math.LN2;function D1(r){return r>>>=0,r===0?32:31-(T1(r)/A1|0)|0}var wa=64,ka=4194304;function ei(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 ja(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=ei(M):(w&=C,w!==0&&(f=ei(w)))}else C=u&~y,C!==0?f=ei(C):w!==0&&(f=ei(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-tr(s),y=1<<u,f|=r[u],s&=~y;return f}function I1(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 L1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var C=31-tr(w),M=1<<C,H=y[C];H===-1?((M&u)===0||(M&f)!==0)&&(y[C]=I1(M,s)):H<=s&&(r.expiredLanes|=M),w&=~M}}function Yc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function yh(){var r=wa;return wa<<=1,(wa&4194240)===0&&(wa=64),r}function Xc(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function ti(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-tr(s),r[s]=u}function O1(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-tr(u),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,u&=~w}}function Qc(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-tr(u),y=1<<f;y&s|r[f]&s&&(r[f]|=s),u&=~y}}var Ge=0;function vh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var bh,Jc,wh,kh,jh,Zc=!1,Sa=[],Yr=null,Xr=null,Qr=null,ni=new Map,ri=new Map,Jr=[],_1="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 Sh(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":ni.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ri.delete(s.pointerId)}}function oi(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=yi(s),s!==null&&Jc(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function M1(r,s,u,f,y){switch(s){case"focusin":return Yr=oi(Yr,r,s,u,f,y),!0;case"dragenter":return Xr=oi(Xr,r,s,u,f,y),!0;case"mouseover":return Qr=oi(Qr,r,s,u,f,y),!0;case"pointerover":var w=y.pointerId;return ni.set(w,oi(ni.get(w)||null,r,s,u,f,y)),!0;case"gotpointercapture":return w=y.pointerId,ri.set(w,oi(ri.get(w)||null,r,s,u,f,y)),!0}return!1}function Ch(r){var s=Ao(r.target);if(s!==null){var u=To(s);if(u!==null){if(s=u.tag,s===13){if(s=uh(u),s!==null){r.blockedOn=s,jh(r.priority,function(){wh(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 Ca(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=tu(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=yi(u),s!==null&&Jc(s),r.blockedOn=u,!1;s.shift()}return!0}function Nh(r,s,u){Ca(r)&&u.delete(s)}function $1(){Zc=!1,Yr!==null&&Ca(Yr)&&(Yr=null),Xr!==null&&Ca(Xr)&&(Xr=null),Qr!==null&&Ca(Qr)&&(Qr=null),ni.forEach(Nh),ri.forEach(Nh)}function si(r,s){r.blockedOn===s&&(r.blockedOn=null,Zc||(Zc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,$1)))}function ii(r){function s(y){return si(y,r)}if(0<Sa.length){si(Sa[0],r);for(var u=1;u<Sa.length;u++){var f=Sa[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Yr!==null&&si(Yr,r),Xr!==null&&si(Xr,r),Qr!==null&&si(Qr,r),ni.forEach(s),ri.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);)Ch(u),u.blockedOn===null&&Jr.shift()}var Jo=L.ReactCurrentBatchConfig,Na=!0;function F1(r,s,u,f){var y=Ge,w=Jo.transition;Jo.transition=null;try{Ge=1,eu(r,s,u,f)}finally{Ge=y,Jo.transition=w}}function z1(r,s,u,f){var y=Ge,w=Jo.transition;Jo.transition=null;try{Ge=4,eu(r,s,u,f)}finally{Ge=y,Jo.transition=w}}function eu(r,s,u,f){if(Na){var y=tu(r,s,u,f);if(y===null)yu(r,s,f,Ea,u),Sh(r,f);else if(M1(y,r,s,u,f))f.stopPropagation();else if(Sh(r,f),s&4&&-1<_1.indexOf(r)){for(;y!==null;){var w=yi(y);if(w!==null&&bh(w),w=tu(r,s,u,f),w===null&&yu(r,s,f,Ea,u),w===y)break;y=w}y!==null&&f.stopPropagation()}else yu(r,s,f,null,u)}}var Ea=null;function tu(r,s,u,f){if(Ea=null,r=Un(f),r=Ao(r),r!==null)if(s=To(r),s===null)r=null;else if(u=s.tag,u===13){if(r=uh(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 Ea=r,null}function Eh(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(E1()){case Kc:return 1;case gh:return 4;case va:case P1:return 16;case xh:return 536870912;default:return 16}default:return 16}}var Zr=null,nu=null,Pa=null;function Ph(){if(Pa)return Pa;var r,s=nu,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 Pa=y.slice(r,1<f?1-f:void 0)}function Ra(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 Ta(){return!0}function Rh(){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)?Ta:Rh,this.isPropagationStopped=Rh,this}return E(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=Ta)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ta)},persist:function(){},isPersistent:Ta}),s}var Zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=Dn(Zo),ai=E({},Zo,{view:0,detail:0}),B1=Dn(ai),ou,su,li,Aa=E({},ai,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,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!==li&&(li&&r.type==="mousemove"?(ou=r.screenX-li.screenX,su=r.screenY-li.screenY):su=ou=0,li=r),ou)},movementY:function(r){return"movementY"in r?r.movementY:su}}),Th=Dn(Aa),U1=E({},Aa,{dataTransfer:0}),H1=Dn(U1),W1=E({},ai,{relatedTarget:0}),iu=Dn(W1),V1=E({},Zo,{animationName:0,elapsedTime:0,pseudoElement:0}),q1=Dn(V1),G1=E({},Zo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),K1=Dn(G1),Y1=E({},Zo,{data:0}),Ah=Dn(Y1),X1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q1={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"},J1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=J1[r])?!!s[r]:!1}function au(){return Z1}var ek=E({},ai,{key:function(r){if(r.key){var s=X1[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ra(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Q1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(r){return r.type==="keypress"?Ra(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ra(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),tk=Dn(ek),nk=E({},Aa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dh=Dn(nk),rk=E({},ai,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),ok=Dn(rk),sk=E({},Zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),ik=Dn(sk),ak=E({},Aa,{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}),lk=Dn(ak),ck=[9,13,27,32],lu=d&&"CompositionEvent"in window,ci=null;d&&"documentMode"in document&&(ci=document.documentMode);var uk=d&&"TextEvent"in window&&!ci,Ih=d&&(!lu||ci&&8<ci&&11>=ci),Lh=" ",Oh=!1;function _h(r,s){switch(r){case"keyup":return ck.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var es=!1;function dk(r,s){switch(r){case"compositionend":return Mh(s);case"keypress":return s.which!==32?null:(Oh=!0,Lh);case"textInput":return r=s.data,r===Lh&&Oh?null:r;default:return null}}function fk(r,s){if(es)return r==="compositionend"||!lu&&_h(r,s)?(r=Ph(),Pa=nu=Zr=null,es=!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 Ih&&s.locale!=="ko"?null:s.data;default:return null}}var pk={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 $h(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!pk[r.type]:s==="textarea"}function Fh(r,s,u,f){wt(f),s=_a(s,"onChange"),0<s.length&&(u=new ru("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var ui=null,di=null;function hk(r){rm(r,0)}function Da(r){var s=ss(r);if(nt(s))return r}function mk(r,s){if(r==="change")return s}var zh=!1;if(d){var cu;if(d){var uu="oninput"in document;if(!uu){var Bh=document.createElement("div");Bh.setAttribute("oninput","return;"),uu=typeof Bh.oninput=="function"}cu=uu}else cu=!1;zh=cu&&(!document.documentMode||9<document.documentMode)}function Uh(){ui&&(ui.detachEvent("onpropertychange",Hh),di=ui=null)}function Hh(r){if(r.propertyName==="value"&&Da(di)){var s=[];Fh(s,di,r,Un(r)),Ar(hk,s)}}function gk(r,s,u){r==="focusin"?(Uh(),ui=s,di=u,ui.attachEvent("onpropertychange",Hh)):r==="focusout"&&Uh()}function xk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Da(di)}function yk(r,s){if(r==="click")return Da(s)}function vk(r,s){if(r==="input"||r==="change")return Da(s)}function bk(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var nr=typeof Object.is=="function"?Object.is:bk;function fi(r,s){if(nr(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)||!nr(r[y],s[y]))return!1}return!0}function Wh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Vh(r,s){var u=Wh(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=Wh(u)}}function qh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?qh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Gh(){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 du(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 wk(r){var s=Gh(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&qh(u.ownerDocument.documentElement,u)){if(f!==null&&du(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=Vh(u,w);var C=Vh(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 kk=d&&"documentMode"in document&&11>=document.documentMode,ts=null,fu=null,pi=null,pu=!1;function Kh(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;pu||ts==null||ts!==Ue(f)||(f=ts,"selectionStart"in f&&du(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}),pi&&fi(pi,f)||(pi=f,f=_a(fu,"onSelect"),0<f.length&&(s=new ru("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=ts)))}function Ia(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var ns={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionend:Ia("Transition","TransitionEnd")},hu={},Yh={};d&&(Yh=document.createElement("div").style,"AnimationEvent"in window||(delete ns.animationend.animation,delete ns.animationiteration.animation,delete ns.animationstart.animation),"TransitionEvent"in window||delete ns.transitionend.transition);function La(r){if(hu[r])return hu[r];if(!ns[r])return r;var s=ns[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in Yh)return hu[r]=s[u];return r}var Xh=La("animationend"),Qh=La("animationiteration"),Jh=La("animationstart"),Zh=La("transitionend"),em=new Map,tm="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){em.set(r,s),l(s,[r])}for(var mu=0;mu<tm.length;mu++){var gu=tm[mu],jk=gu.toLowerCase(),Sk=gu[0].toUpperCase()+gu.slice(1);eo(jk,"on"+Sk)}eo(Xh,"onAnimationEnd"),eo(Qh,"onAnimationIteration"),eo(Jh,"onAnimationStart"),eo("dblclick","onDoubleClick"),eo("focusin","onFocus"),eo("focusout","onBlur"),eo(Zh,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),Ck=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function nm(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,j1(f,s,void 0,r),r.currentTarget=null}function rm(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],H=M.instance,te=M.currentTarget;if(M=M.listener,H!==w&&y.isPropagationStopped())break e;nm(y,M,te),w=H}else for(C=0;C<f.length;C++){if(M=f[C],H=M.instance,te=M.currentTarget,M=M.listener,H!==w&&y.isPropagationStopped())break e;nm(y,M,te),w=H}}}if(An)throw r=Dr,An=!1,Dr=null,r}function ot(r,s){var u=s[Su];u===void 0&&(u=s[Su]=new Set);var f=r+"__bubble";u.has(f)||(om(s,r,2,!1),u.add(f))}function xu(r,s,u){var f=0;s&&(f|=4),om(u,r,f,s)}var Oa="_reactListening"+Math.random().toString(36).slice(2);function mi(r){if(!r[Oa]){r[Oa]=!0,o.forEach(function(u){u!=="selectionchange"&&(Ck.has(u)||xu(u,!1,r),xu(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Oa]||(s[Oa]=!0,xu("selectionchange",!1,s))}}function om(r,s,u,f){switch(Eh(s)){case 1:var y=F1;break;case 4:y=z1;break;default:y=eu}u=y.bind(null,s,u,r),y=void 0,!Hn||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 yu(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 H=C.tag;if((H===3||H===4)&&(H=C.stateNode.containerInfo,H===y||H.nodeType===8&&H.parentNode===y))return;C=C.return}for(;M!==null;){if(C=Ao(M),C===null)return;if(H=C.tag,H===5||H===6){f=w=C;continue e}M=M.parentNode}}f=f.return}Ar(function(){var te=w,se=Un(u),ie=[];e:{var oe=em.get(r);if(oe!==void 0){var he=ru,be=r;switch(r){case"keypress":if(Ra(u)===0)break e;case"keydown":case"keyup":he=tk;break;case"focusin":be="focus",he=iu;break;case"focusout":be="blur",he=iu;break;case"beforeblur":case"afterblur":he=iu;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=Th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=H1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=ok;break;case Xh:case Qh:case Jh:he=q1;break;case Zh:he=ik;break;case"scroll":he=B1;break;case"wheel":he=lk;break;case"copy":case"cut":case"paste":he=K1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=Dh}var we=(s&4)!==0,jt=!we&&r==="scroll",X=we?oe!==null?oe+"Capture":null:oe;we=[];for(var W=te,ee;W!==null;){ee=W;var ue=ee.stateNode;if(ee.tag===5&&ue!==null&&(ee=ue,X!==null&&(ue=ht(W,X),ue!=null&&we.push(gi(W,ue,ee)))),jt)break;W=W.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)&&(Ao(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?Ao(be):null,be!==null&&(jt=To(be),be!==jt||be.tag!==5&&be.tag!==6)&&(be=null)):(he=null,be=te),he!==be)){if(we=Th,ue="onMouseLeave",X="onMouseEnter",W="mouse",(r==="pointerout"||r==="pointerover")&&(we=Dh,ue="onPointerLeave",X="onPointerEnter",W="pointer"),jt=he==null?oe:ss(he),ee=be==null?oe:ss(be),oe=new we(ue,W+"leave",he,u,se),oe.target=jt,oe.relatedTarget=ee,ue=null,Ao(se)===te&&(we=new we(X,W+"enter",be,u,se),we.target=ee,we.relatedTarget=jt,ue=we),jt=ue,he&&be)t:{for(we=he,X=be,W=0,ee=we;ee;ee=rs(ee))W++;for(ee=0,ue=X;ue;ue=rs(ue))ee++;for(;0<W-ee;)we=rs(we),W--;for(;0<ee-W;)X=rs(X),ee--;for(;W--;){if(we===X||X!==null&&we===X.alternate)break t;we=rs(we),X=rs(X)}we=null}else we=null;he!==null&&sm(ie,oe,he,we,!1),be!==null&&jt!==null&&sm(ie,jt,be,we,!0)}}e:{if(oe=te?ss(te):window,he=oe.nodeName&&oe.nodeName.toLowerCase(),he==="select"||he==="input"&&oe.type==="file")var Se=mk;else if($h(oe))if(zh)Se=vk;else{Se=xk;var Te=gk}else(he=oe.nodeName)&&he.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Se=yk);if(Se&&(Se=Se(r,te))){Fh(ie,Se,u,se);break e}Te&&Te(r,oe,te),r==="focusout"&&(Te=oe._wrapperState)&&Te.controlled&&oe.type==="number"&&Qe(oe,"number",oe.value)}switch(Te=te?ss(te):window,r){case"focusin":($h(Te)||Te.contentEditable==="true")&&(ts=Te,fu=te,pi=null);break;case"focusout":pi=fu=ts=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Kh(ie,u,se);break;case"selectionchange":if(kk)break;case"keydown":case"keyup":Kh(ie,u,se)}var Ae;if(lu)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 es?_h(r,u)&&(Ie="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(Ih&&u.locale!=="ko"&&(es||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&es&&(Ae=Ph()):(Zr=se,nu="value"in Zr?Zr.value:Zr.textContent,es=!0)),Te=_a(te,Ie),0<Te.length&&(Ie=new Ah(Ie,r,null,u,se),ie.push({event:Ie,listeners:Te}),Ae?Ie.data=Ae:(Ae=Mh(u),Ae!==null&&(Ie.data=Ae)))),(Ae=uk?dk(r,u):fk(r,u))&&(te=_a(te,"onBeforeInput"),0<te.length&&(se=new Ah("onBeforeInput","beforeinput",null,u,se),ie.push({event:se,listeners:te}),se.data=Ae))}rm(ie,s)})}function gi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function _a(r,s){for(var u=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=ht(r,u),w!=null&&f.unshift(gi(r,w,y)),w=ht(r,s),w!=null&&f.push(gi(r,w,y))),r=r.return}return f}function rs(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function sm(r,s,u,f,y){for(var w=s._reactName,C=[];u!==null&&u!==f;){var M=u,H=M.alternate,te=M.stateNode;if(H!==null&&H===f)break;M.tag===5&&te!==null&&(M=te,y?(H=ht(u,w),H!=null&&C.unshift(gi(u,H,M))):y||(H=ht(u,w),H!=null&&C.push(gi(u,H,M)))),u=u.return}C.length!==0&&r.push({event:s,listeners:C})}var Nk=/\r\n?/g,Ek=/\u0000|\uFFFD/g;function im(r){return(typeof r=="string"?r:""+r).replace(Nk,`
|
|
38
|
+
`).replace(Ek,"")}function Ma(r,s,u){if(s=im(s),im(r)!==s&&u)throw Error(n(425))}function $a(){}var vu=null,bu=null;function wu(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 ku=typeof setTimeout=="function"?setTimeout:void 0,Pk=typeof clearTimeout=="function"?clearTimeout:void 0,am=typeof Promise=="function"?Promise:void 0,Rk=typeof queueMicrotask=="function"?queueMicrotask:typeof am<"u"?function(r){return am.resolve(null).then(r).catch(Tk)}:ku;function Tk(r){setTimeout(function(){throw r})}function ju(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),ii(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);ii(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 lm(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 os=Math.random().toString(36).slice(2),gr="__reactFiber$"+os,xi="__reactProps$"+os,Ir="__reactContainer$"+os,Su="__reactEvents$"+os,Ak="__reactListeners$"+os,Dk="__reactHandles$"+os;function Ao(r){var s=r[gr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Ir]||u[gr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=lm(r);r!==null;){if(u=r[gr])return u;r=lm(r)}return s}r=u,u=r.parentNode}return null}function yi(r){return r=r[gr]||r[Ir],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ss(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Fa(r){return r[xi]||null}var Cu=[],is=-1;function no(r){return{current:r}}function st(r){0>is||(r.current=Cu[is],Cu[is]=null,is--)}function Je(r,s){is++,Cu[is]=r.current,r.current=s}var ro={},nn=no(ro),xn=no(!1),Do=ro;function as(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 za(){st(xn),st(nn)}function cm(r,s,u){if(nn.current!==ro)throw Error(n(168));Je(nn,s),Je(xn,u)}function um(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 E({},u,f)}function Ba(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ro,Do=nn.current,Je(nn,r),Je(xn,xn.current),!0}function dm(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=um(r,s,Do),f.__reactInternalMemoizedMergedChildContext=r,st(xn),st(nn),Je(nn,r)):st(xn),Je(xn,u)}var Lr=null,Ua=!1,Nu=!1;function fm(r){Lr===null?Lr=[r]:Lr.push(r)}function Ik(r){Ua=!0,fm(r)}function oo(){if(!Nu&&Lr!==null){Nu=!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,Ua=!1}catch(y){throw Lr!==null&&(Lr=Lr.slice(r+1)),hh(Kc,oo),y}finally{Ge=s,Nu=!1}}return null}var ls=[],cs=0,Ha=null,Wa=0,Wn=[],Vn=0,Io=null,Or=1,_r="";function Lo(r,s){ls[cs++]=Wa,ls[cs++]=Ha,Ha=r,Wa=s}function pm(r,s,u){Wn[Vn++]=Or,Wn[Vn++]=_r,Wn[Vn++]=Io,Io=r;var f=Or;r=_r;var y=32-tr(f)-1;f&=~(1<<y),u+=1;var w=32-tr(s)+y;if(30<w){var C=y-y%5;w=(f&(1<<C)-1).toString(32),f>>=C,y-=C,Or=1<<32-tr(s)+y|u<<y|f,_r=w+r}else Or=1<<w|u<<y|f,_r=r}function Eu(r){r.return!==null&&(Lo(r,1),pm(r,1,0))}function Pu(r){for(;r===Ha;)Ha=ls[--cs],ls[cs]=null,Wa=ls[--cs],ls[cs]=null;for(;r===Io;)Io=Wn[--Vn],Wn[Vn]=null,_r=Wn[--Vn],Wn[Vn]=null,Or=Wn[--Vn],Wn[Vn]=null}var In=null,Ln=null,at=!1,rr=null;function hm(r,s){var u=Yn(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 mm(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=Io!==null?{id:Or,overflow:_r}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=Yn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,In=r,Ln=null,!0):!1;default:return!1}}function Ru(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Tu(r){if(at){var s=Ln;if(s){var u=s;if(!mm(r,s)){if(Ru(r))throw Error(n(418));s=to(u.nextSibling);var f=In;s&&mm(r,s)?hm(f,u):(r.flags=r.flags&-4097|2,at=!1,In=r)}}else{if(Ru(r))throw Error(n(418));r.flags=r.flags&-4097|2,at=!1,In=r}}}function gm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;In=r}function Va(r){if(r!==In)return!1;if(!at)return gm(r),at=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!wu(r.type,r.memoizedProps)),s&&(s=Ln)){if(Ru(r))throw xm(),Error(n(418));for(;s;)hm(r,s),s=to(s.nextSibling)}if(gm(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 xm(){for(var r=Ln;r;)r=to(r.nextSibling)}function us(){Ln=In=null,at=!1}function Au(r){rr===null?rr=[r]:rr.push(r)}var Lk=L.ReactCurrentBatchConfig;function vi(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 qa(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function ym(r){var s=r._init;return s(r._payload)}function vm(r){function s(X,W){if(r){var ee=X.deletions;ee===null?(X.deletions=[W],X.flags|=16):ee.push(W)}}function u(X,W){if(!r)return null;for(;W!==null;)s(X,W),W=W.sibling;return null}function f(X,W){for(X=new Map;W!==null;)W.key!==null?X.set(W.key,W):X.set(W.index,W),W=W.sibling;return X}function y(X,W){return X=po(X,W),X.index=0,X.sibling=null,X}function w(X,W,ee){return X.index=ee,r?(ee=X.alternate,ee!==null?(ee=ee.index,ee<W?(X.flags|=2,W):ee):(X.flags|=2,W)):(X.flags|=1048576,W)}function C(X){return r&&X.alternate===null&&(X.flags|=2),X}function M(X,W,ee,ue){return W===null||W.tag!==6?(W=kd(ee,X.mode,ue),W.return=X,W):(W=y(W,ee),W.return=X,W)}function H(X,W,ee,ue){var Se=ee.type;return Se===$?se(X,W,ee.props.children,ue,ee.key):W!==null&&(W.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&ym(Se)===W.type)?(ue=y(W,ee.props),ue.ref=vi(X,W,ee),ue.return=X,ue):(ue=gl(ee.type,ee.key,ee.props,null,X.mode,ue),ue.ref=vi(X,W,ee),ue.return=X,ue)}function te(X,W,ee,ue){return W===null||W.tag!==4||W.stateNode.containerInfo!==ee.containerInfo||W.stateNode.implementation!==ee.implementation?(W=jd(ee,X.mode,ue),W.return=X,W):(W=y(W,ee.children||[]),W.return=X,W)}function se(X,W,ee,ue,Se){return W===null||W.tag!==7?(W=Uo(ee,X.mode,ue,Se),W.return=X,W):(W=y(W,ee),W.return=X,W)}function ie(X,W,ee){if(typeof W=="string"&&W!==""||typeof W=="number")return W=kd(""+W,X.mode,ee),W.return=X,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case O:return ee=gl(W.type,W.key,W.props,null,X.mode,ee),ee.ref=vi(X,null,W),ee.return=X,ee;case R:return W=jd(W,X.mode,ee),W.return=X,W;case D:var ue=W._init;return ie(X,ue(W._payload),ee)}if(rt(W)||K(W))return W=Uo(W,X.mode,ee,null),W.return=X,W;qa(X,W)}return null}function oe(X,W,ee,ue){var Se=W!==null?W.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return Se!==null?null:M(X,W,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case O:return ee.key===Se?H(X,W,ee,ue):null;case R:return ee.key===Se?te(X,W,ee,ue):null;case D:return Se=ee._init,oe(X,W,Se(ee._payload),ue)}if(rt(ee)||K(ee))return Se!==null?null:se(X,W,ee,ue,null);qa(X,ee)}return null}function he(X,W,ee,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return X=X.get(ee)||null,M(W,X,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return X=X.get(ue.key===null?ee:ue.key)||null,H(W,X,ue,Se);case R:return X=X.get(ue.key===null?ee:ue.key)||null,te(W,X,ue,Se);case D:var Te=ue._init;return he(X,W,ee,Te(ue._payload),Se)}if(rt(ue)||K(ue))return X=X.get(ee)||null,se(W,X,ue,Se,null);qa(W,ue)}return null}function be(X,W,ee,ue){for(var Se=null,Te=null,Ae=W,Ie=W=0,zt=null;Ae!==null&&Ie<ee.length;Ie++){Ae.index>Ie?(zt=Ae,Ae=null):zt=Ae.sibling;var We=oe(X,Ae,ee[Ie],ue);if(We===null){Ae===null&&(Ae=zt);break}r&&Ae&&We.alternate===null&&s(X,Ae),W=w(We,W,Ie),Te===null?Se=We:Te.sibling=We,Te=We,Ae=zt}if(Ie===ee.length)return u(X,Ae),at&&Lo(X,Ie),Se;if(Ae===null){for(;Ie<ee.length;Ie++)Ae=ie(X,ee[Ie],ue),Ae!==null&&(W=w(Ae,W,Ie),Te===null?Se=Ae:Te.sibling=Ae,Te=Ae);return at&&Lo(X,Ie),Se}for(Ae=f(X,Ae);Ie<ee.length;Ie++)zt=he(Ae,X,Ie,ee[Ie],ue),zt!==null&&(r&&zt.alternate!==null&&Ae.delete(zt.key===null?Ie:zt.key),W=w(zt,W,Ie),Te===null?Se=zt:Te.sibling=zt,Te=zt);return r&&Ae.forEach(function(ho){return s(X,ho)}),at&&Lo(X,Ie),Se}function we(X,W,ee,ue){var Se=K(ee);if(typeof Se!="function")throw Error(n(150));if(ee=Se.call(ee),ee==null)throw Error(n(151));for(var Te=Se=null,Ae=W,Ie=W=0,zt=null,We=ee.next();Ae!==null&&!We.done;Ie++,We=ee.next()){Ae.index>Ie?(zt=Ae,Ae=null):zt=Ae.sibling;var ho=oe(X,Ae,We.value,ue);if(ho===null){Ae===null&&(Ae=zt);break}r&&Ae&&ho.alternate===null&&s(X,Ae),W=w(ho,W,Ie),Te===null?Se=ho:Te.sibling=ho,Te=ho,Ae=zt}if(We.done)return u(X,Ae),at&&Lo(X,Ie),Se;if(Ae===null){for(;!We.done;Ie++,We=ee.next())We=ie(X,We.value,ue),We!==null&&(W=w(We,W,Ie),Te===null?Se=We:Te.sibling=We,Te=We);return at&&Lo(X,Ie),Se}for(Ae=f(X,Ae);!We.done;Ie++,We=ee.next())We=he(Ae,X,Ie,We.value,ue),We!==null&&(r&&We.alternate!==null&&Ae.delete(We.key===null?Ie:We.key),W=w(We,W,Ie),Te===null?Se=We:Te.sibling=We,Te=We);return r&&Ae.forEach(function(pj){return s(X,pj)}),at&&Lo(X,Ie),Se}function jt(X,W,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===$&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case O:e:{for(var Se=ee.key,Te=W;Te!==null;){if(Te.key===Se){if(Se=ee.type,Se===$){if(Te.tag===7){u(X,Te.sibling),W=y(Te,ee.props.children),W.return=X,X=W;break e}}else if(Te.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&ym(Se)===Te.type){u(X,Te.sibling),W=y(Te,ee.props),W.ref=vi(X,Te,ee),W.return=X,X=W;break e}u(X,Te);break}else s(X,Te);Te=Te.sibling}ee.type===$?(W=Uo(ee.props.children,X.mode,ue,ee.key),W.return=X,X=W):(ue=gl(ee.type,ee.key,ee.props,null,X.mode,ue),ue.ref=vi(X,W,ee),ue.return=X,X=ue)}return C(X);case R:e:{for(Te=ee.key;W!==null;){if(W.key===Te)if(W.tag===4&&W.stateNode.containerInfo===ee.containerInfo&&W.stateNode.implementation===ee.implementation){u(X,W.sibling),W=y(W,ee.children||[]),W.return=X,X=W;break e}else{u(X,W);break}else s(X,W);W=W.sibling}W=jd(ee,X.mode,ue),W.return=X,X=W}return C(X);case D:return Te=ee._init,jt(X,W,Te(ee._payload),ue)}if(rt(ee))return be(X,W,ee,ue);if(K(ee))return we(X,W,ee,ue);qa(X,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,W!==null&&W.tag===6?(u(X,W.sibling),W=y(W,ee),W.return=X,X=W):(u(X,W),W=kd(ee,X.mode,ue),W.return=X,X=W),C(X)):u(X,W)}return jt}var ds=vm(!0),bm=vm(!1),Ga=no(null),Ka=null,fs=null,Du=null;function Iu(){Du=fs=Ka=null}function Lu(r){var s=Ga.current;st(Ga),r._currentValue=s}function Ou(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 ps(r,s){Ka=r,Du=fs=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(vn=!0),r.firstContext=null)}function qn(r){var s=r._currentValue;if(Du!==r)if(r={context:r,memoizedValue:s,next:null},fs===null){if(Ka===null)throw Error(n(308));fs=r,Ka.dependencies={lanes:0,firstContext:r}}else fs=fs.next=r;return s}var Oo=null;function _u(r){Oo===null?Oo=[r]:Oo.push(r)}function wm(r,s,u,f){var y=s.interleaved;return y===null?(u.next=u,_u(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 Mu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function km(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,_u(f)):(s.next=y.next,y.next=s),f.interleaved=s,Mr(r,u)}function Ya(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,Qc(r,u)}}function jm(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 Xa(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 H=M,te=H.next;H.next=null,C===null?w=te:C.next=te,C=H;var se=r.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==C&&(M===null?se.firstBaseUpdate=te:M.next=te,se.lastBaseUpdate=H))}if(w!==null){var ie=y.baseState;C=0,se=te=H=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=E({},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,H=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&&(H=ie),y.baseState=H,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);$o|=C,r.lanes=C,r.memoizedState=ie}}function Sm(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 bi={},xr=no(bi),wi=no(bi),ki=no(bi);function _o(r){if(r===bi)throw Error(n(174));return r}function $u(r,s){switch(Je(ki,s),Je(wi,r),Je(xr,bi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ae(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ae(s,r)}st(xr),Je(xr,s)}function hs(){st(xr),st(wi),st(ki)}function Cm(r){_o(ki.current);var s=_o(xr.current),u=ae(s,r.type);s!==u&&(Je(wi,r),Je(xr,u))}function Fu(r){wi.current===r&&(st(xr),st(wi))}var mt=no(0);function Qa(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 zu=[];function Bu(){for(var r=0;r<zu.length;r++)zu[r]._workInProgressVersionPrimary=null;zu.length=0}var Ja=L.ReactCurrentDispatcher,Uu=L.ReactCurrentBatchConfig,Mo=0,gt=null,Tt=null,$t=null,Za=!1,ji=!1,Si=0,Ok=0;function rn(){throw Error(n(321))}function Hu(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!nr(r[u],s[u]))return!1;return!0}function Wu(r,s,u,f,y,w){if(Mo=w,gt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Ja.current=r===null||r.memoizedState===null?Fk:zk,r=u(f,y),ji){w=0;do{if(ji=!1,Si=0,25<=w)throw Error(n(301));w+=1,$t=Tt=null,s.updateQueue=null,Ja.current=Bk,r=u(f,y)}while(ji)}if(Ja.current=nl,s=Tt!==null&&Tt.next!==null,Mo=0,$t=Tt=gt=null,Za=!1,s)throw Error(n(300));return r}function Vu(){var r=Si!==0;return Si=0,r}function yr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?gt.memoizedState=$t=r:$t=$t.next=r,$t}function Gn(){if(Tt===null){var r=gt.alternate;r=r!==null?r.memoizedState:null}else r=Tt.next;var s=$t===null?gt.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?gt.memoizedState=$t=r:$t=$t.next=r}return $t}function Ci(r,s){return typeof s=="function"?s(r):s}function qu(r){var s=Gn(),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,H=null,te=w;do{var se=te.lane;if((Mo&se)===se)H!==null&&(H=H.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};H===null?(M=H=ie,C=f):H=H.next=ie,gt.lanes|=se,$o|=se}te=te.next}while(te!==null&&te!==w);H===null?C=f:H.next=M,nr(f,s.memoizedState)||(vn=!0),s.memoizedState=f,s.baseState=C,s.baseQueue=H,u.lastRenderedState=f}if(r=u.interleaved,r!==null){y=r;do w=y.lane,gt.lanes|=w,$o|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Gu(r){var s=Gn(),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);nr(w,s.memoizedState)||(vn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,f]}function Nm(){}function Em(r,s){var u=gt,f=Gn(),y=s(),w=!nr(f.memoizedState,y);if(w&&(f.memoizedState=y,vn=!0),f=f.queue,Ku(Tm.bind(null,u,f,r),[r]),f.getSnapshot!==s||w||$t!==null&&$t.memoizedState.tag&1){if(u.flags|=2048,Ni(9,Rm.bind(null,u,f,y,s),void 0,null),Ft===null)throw Error(n(349));(Mo&30)!==0||Pm(u,s,y)}return y}function Pm(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=gt.updateQueue,s===null?(s={lastEffect:null,stores:null},gt.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Rm(r,s,u,f){s.value=u,s.getSnapshot=f,Am(s)&&Dm(r)}function Tm(r,s,u){return u(function(){Am(s)&&Dm(r)})}function Am(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!nr(r,u)}catch{return!0}}function Dm(r){var s=Mr(r,1);s!==null&&ar(s,r,1,-1)}function Im(r){var s=yr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:r},s.queue=r,r=r.dispatch=$k.bind(null,gt,r),[s.memoizedState,r]}function Ni(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=gt.updateQueue,s===null?(s={lastEffect:null,stores:null},gt.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 Lm(){return Gn().memoizedState}function el(r,s,u,f){var y=yr();gt.flags|=r,y.memoizedState=Ni(1|s,u,void 0,f===void 0?null:f)}function tl(r,s,u,f){var y=Gn();f=f===void 0?null:f;var w=void 0;if(Tt!==null){var C=Tt.memoizedState;if(w=C.destroy,f!==null&&Hu(f,C.deps)){y.memoizedState=Ni(s,u,w,f);return}}gt.flags|=r,y.memoizedState=Ni(1|s,u,w,f)}function Om(r,s){return el(8390656,8,r,s)}function Ku(r,s){return tl(2048,8,r,s)}function _m(r,s){return tl(4,2,r,s)}function Mm(r,s){return tl(4,4,r,s)}function $m(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 Fm(r,s,u){return u=u!=null?u.concat([r]):null,tl(4,4,$m.bind(null,s,r),u)}function Yu(){}function zm(r,s){var u=Gn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Hu(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function Bm(r,s){var u=Gn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Hu(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function Um(r,s,u){return(Mo&21)===0?(r.baseState&&(r.baseState=!1,vn=!0),r.memoizedState=u):(nr(u,s)||(u=yh(),gt.lanes|=u,$o|=u,r.baseState=!0),s)}function _k(r,s){var u=Ge;Ge=u!==0&&4>u?u:4,r(!0);var f=Uu.transition;Uu.transition={};try{r(!1),s()}finally{Ge=u,Uu.transition=f}}function Hm(){return Gn().memoizedState}function Mk(r,s,u){var f=uo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Wm(r))Vm(s,u);else if(u=wm(r,s,u,f),u!==null){var y=dn();ar(u,r,f,y),qm(u,s,f)}}function $k(r,s,u){var f=uo(r),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Wm(r))Vm(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,nr(M,C)){var H=s.interleaved;H===null?(y.next=y,_u(s)):(y.next=H.next,H.next=y),s.interleaved=y;return}}catch{}finally{}u=wm(r,s,y,f),u!==null&&(y=dn(),ar(u,r,f,y),qm(u,s,f))}}function Wm(r){var s=r.alternate;return r===gt||s!==null&&s===gt}function Vm(r,s){ji=Za=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function qm(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Qc(r,u)}}var nl={readContext:qn,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},Fk={readContext:qn,useCallback:function(r,s){return yr().memoizedState=[r,s===void 0?null:s],r},useContext:qn,useEffect:Om,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,el(4194308,4,$m.bind(null,s,r),u)},useLayoutEffect:function(r,s){return el(4194308,4,r,s)},useInsertionEffect:function(r,s){return el(4,2,r,s)},useMemo:function(r,s){var u=yr();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=yr();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=Mk.bind(null,gt,r),[f.memoizedState,r]},useRef:function(r){var s=yr();return r={current:r},s.memoizedState=r},useState:Im,useDebugValue:Yu,useDeferredValue:function(r){return yr().memoizedState=r},useTransition:function(){var r=Im(!1),s=r[0];return r=_k.bind(null,r[1]),yr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=gt,y=yr();if(at){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),Ft===null)throw Error(n(349));(Mo&30)!==0||Pm(f,s,u)}y.memoizedState=u;var w={value:u,getSnapshot:s};return y.queue=w,Om(Tm.bind(null,f,w,r),[r]),f.flags|=2048,Ni(9,Rm.bind(null,f,w,u,s),void 0,null),u},useId:function(){var r=yr(),s=Ft.identifierPrefix;if(at){var u=_r,f=Or;u=(f&~(1<<32-tr(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=Si++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Ok++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},zk={readContext:qn,useCallback:zm,useContext:qn,useEffect:Ku,useImperativeHandle:Fm,useInsertionEffect:_m,useLayoutEffect:Mm,useMemo:Bm,useReducer:qu,useRef:Lm,useState:function(){return qu(Ci)},useDebugValue:Yu,useDeferredValue:function(r){var s=Gn();return Um(s,Tt.memoizedState,r)},useTransition:function(){var r=qu(Ci)[0],s=Gn().memoizedState;return[r,s]},useMutableSource:Nm,useSyncExternalStore:Em,useId:Hm,unstable_isNewReconciler:!1},Bk={readContext:qn,useCallback:zm,useContext:qn,useEffect:Ku,useImperativeHandle:Fm,useInsertionEffect:_m,useLayoutEffect:Mm,useMemo:Bm,useReducer:Gu,useRef:Lm,useState:function(){return Gu(Ci)},useDebugValue:Yu,useDeferredValue:function(r){var s=Gn();return Tt===null?s.memoizedState=r:Um(s,Tt.memoizedState,r)},useTransition:function(){var r=Gu(Ci)[0],s=Gn().memoizedState;return[r,s]},useMutableSource:Nm,useSyncExternalStore:Em,useId:Hm,unstable_isNewReconciler:!1};function or(r,s){if(r&&r.defaultProps){s=E({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Xu(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:E({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var rl={isMounted:function(r){return(r=r._reactInternals)?To(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&&(ar(s,r,y,f),Ya(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&&(ar(s,r,y,f),Ya(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&&(ar(s,r,f,u),Ya(s,r,f))}};function Gm(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?!fi(u,f)||!fi(y,w):!0}function Km(r,s,u){var f=!1,y=ro,w=s.contextType;return typeof w=="object"&&w!==null?w=qn(w):(y=yn(s)?Do:nn.current,f=s.contextTypes,w=(f=f!=null)?as(r,y):ro),s=new s(u,w),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=rl,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),s}function Ym(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&&rl.enqueueReplaceState(s,s.state,null)}function Qu(r,s,u,f){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Mu(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=qn(w):(w=yn(s)?Do:nn.current,y.context=as(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Xu(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&&rl.enqueueReplaceState(y,y.state,null),Xa(r,u,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function ms(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 Ju(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Zu(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Uk=typeof WeakMap=="function"?WeakMap:Map;function Xm(r,s,u){u=$r(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){ul||(ul=!0,hd=f),Zu(r,s)},u}function Qm(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(){Zu(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){Zu(r,s),typeof f!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),u}function Jm(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new Uk;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=nj.bind(null,r,s,u),s.then(r,r))}function Zm(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 eg(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 Hk=L.ReactCurrentOwner,vn=!1;function un(r,s,u,f){s.child=r===null?bm(s,null,u,f):ds(s,r.child,u,f)}function tg(r,s,u,f,y){u=u.render;var w=s.ref;return ps(s,y),f=Wu(r,s,u,f,w,y),u=Vu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(at&&u&&Eu(s),s.flags|=1,un(r,s,f,y),s.child)}function ng(r,s,u,f,y){if(r===null){var w=u.type;return typeof w=="function"&&!wd(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=w,rg(r,s,w,f,y)):(r=gl(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:fi,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 rg(r,s,u,f,y){if(r!==null){var w=r.memoizedProps;if(fi(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 ed(r,s,u,f,y)}function og(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},Je(xs,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,Je(xs,On),On|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:u,Je(xs,On),On|=f}else w!==null?(f=w.baseLanes|u,s.memoizedState=null):f=u,Je(xs,On),On|=f;return un(r,s,y,u),s.child}function sg(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function ed(r,s,u,f,y){var w=yn(u)?Do:nn.current;return w=as(s,w),ps(s,y),u=Wu(r,s,u,f,w,y),f=Vu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(at&&f&&Eu(s),s.flags|=1,un(r,s,u,y),s.child)}function ig(r,s,u,f,y){if(yn(u)){var w=!0;Ba(s)}else w=!1;if(ps(s,y),s.stateNode===null)sl(r,s),Km(s,u,f),Qu(s,u,f,y),f=!0;else if(r===null){var C=s.stateNode,M=s.memoizedProps;C.props=M;var H=C.context,te=u.contextType;typeof te=="object"&&te!==null?te=qn(te):(te=yn(u)?Do:nn.current,te=as(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||H!==te)&&Ym(s,C,f,te),so=!1;var oe=s.memoizedState;C.state=oe,Xa(s,f,C,y),H=s.memoizedState,M!==f||oe!==H||xn.current||so?(typeof se=="function"&&(Xu(s,u,se,f),H=s.memoizedState),(M=so||Gm(s,u,M,f,oe,H,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=H),C.props=f,C.state=H,C.context=te,f=M):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{C=s.stateNode,km(r,s),M=s.memoizedProps,te=s.type===s.elementType?M:or(s.type,M),C.props=te,ie=s.pendingProps,oe=C.context,H=u.contextType,typeof H=="object"&&H!==null?H=qn(H):(H=yn(u)?Do:nn.current,H=as(s,H));var he=u.getDerivedStateFromProps;(se=typeof he=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==ie||oe!==H)&&Ym(s,C,f,H),so=!1,oe=s.memoizedState,C.state=oe,Xa(s,f,C,y);var be=s.memoizedState;M!==ie||oe!==be||xn.current||so?(typeof he=="function"&&(Xu(s,u,he,f),be=s.memoizedState),(te=so||Gm(s,u,te,f,oe,be,H)||!1)?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,be,H),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,be,H)),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=H,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 td(r,s,u,f,w,y)}function td(r,s,u,f,y,w){sg(r,s);var C=(s.flags&128)!==0;if(!f&&!C)return y&&dm(s,u,!1),Fr(r,s,w);f=s.stateNode,Hk.current=s;var M=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&C?(s.child=ds(s,r.child,null,w),s.child=ds(s,null,M,w)):un(r,s,M,w),s.memoizedState=f.state,y&&dm(s,u,!0),s.child}function ag(r){var s=r.stateNode;s.pendingContext?cm(r,s.pendingContext,s.pendingContext!==s.context):s.context&&cm(r,s.context,!1),$u(r,s.containerInfo)}function lg(r,s,u,f,y){return us(),Au(y),s.flags|=256,un(r,s,u,f),s.child}var nd={dehydrated:null,treeContext:null,retryLane:0};function rd(r){return{baseLanes:r,cachePool:null,transitions:null}}function cg(r,s,u){var f=s.pendingProps,y=mt.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),Je(mt,y&1),r===null)return Tu(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=xl(C,f,0,null),r=Uo(r,f,u,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=rd(u),s.memoizedState=nd,r):od(s,C));if(y=r.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return Wk(r,s,C,f,M,y,u);if(w){w=f.fallback,C=s.mode,y=r.child,M=y.sibling;var H={mode:"hidden",children:f.children};return(C&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=po(y,H),f.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=po(M,w):(w=Uo(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?rd(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=r.childLanes&~u,s.memoizedState=nd,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 od(r,s){return s=xl({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function ol(r,s,u,f){return f!==null&&Au(f),ds(s,r.child,null,u),r=od(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Wk(r,s,u,f,y,w,C){if(u)return s.flags&256?(s.flags&=-257,f=Ju(Error(n(422))),ol(r,s,C,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(w=f.fallback,y=s.mode,f=xl({mode:"visible",children:f.children},y,0,null),w=Uo(w,y,C,null),w.flags|=2,f.return=s,w.return=s,f.sibling=w,s.child=f,(s.mode&1)!==0&&ds(s,r.child,null,C),s.child.memoizedState=rd(C),s.memoizedState=nd,w);if((s.mode&1)===0)return ol(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=Ju(w,f,void 0),ol(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),ar(f,r,y,-1))}return bd(),f=Ju(Error(n(421))),ol(r,s,C,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=rj.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=to(y.nextSibling),In=s,at=!0,rr=null,r!==null&&(Wn[Vn++]=Or,Wn[Vn++]=_r,Wn[Vn++]=Io,Or=r.id,_r=r.overflow,Io=s),s=od(s,f.children),s.flags|=4096,s)}function ug(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Ou(r.return,s,u)}function sd(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 dg(r,s,u){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(un(r,s,f.children,u),f=mt.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&&ug(r,u,s);else if(r.tag===19)ug(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(Je(mt,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&&Qa(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=s.child,s.child=null):(y=u.sibling,u.sibling=null),sd(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&&Qa(r)===null){s.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}sd(s,!0,u,null,w);break;case"together":sd(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function sl(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),$o|=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 Vk(r,s,u){switch(s.tag){case 3:ag(s),us();break;case 5:Cm(s);break;case 1:yn(s.type)&&Ba(s);break;case 4:$u(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;Je(Ga,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(Je(mt,mt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?cg(r,s,u):(Je(mt,mt.current&1),r=Fr(r,s,u),r!==null?r.sibling:null);Je(mt,mt.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return dg(r,s,u);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Je(mt,mt.current),f)break;return null;case 22:case 23:return s.lanes=0,og(r,s,u)}return Fr(r,s,u)}var fg,id,pg,hg;fg=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}},id=function(){},pg=function(r,s,u,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,_o(xr.current);var w=null;switch(u){case"input":y=Be(r,y),f=Be(r,f),w=[];break;case"select":y=E({},y,{value:void 0}),f=E({},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=$a)}le(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 H=f[te];if(M=y!=null?y[te]:void 0,f.hasOwnProperty(te)&&H!==M&&(H!=null||M!=null))if(te==="style")if(M){for(C in M)!M.hasOwnProperty(C)||H&&H.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in H)H.hasOwnProperty(C)&&M[C]!==H[C]&&(u||(u={}),u[C]=H[C])}else u||(w||(w=[]),w.push(te,u)),u=H;else te==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,M=M?M.__html:void 0,H!=null&&M!==H&&(w=w||[]).push(te,H)):te==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(te,""+H):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(H!=null&&te==="onScroll"&&ot("scroll",r),w||M===H||(w=[])):(w=w||[]).push(te,H))}u&&(w=w||[]).push("style",u);var te=w;(s.updateQueue=te)&&(s.flags|=4)}},hg=function(r,s,u,f){u!==f&&(s.flags|=4)};function Ei(r,s){if(!at)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 qk(r,s,u){var f=s.pendingProps;switch(Pu(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)&&za(),on(s),null;case 3:return f=s.stateNode,hs(),st(xn),st(nn),Bu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(Va(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,rr!==null&&(xd(rr),rr=null))),id(r,s),on(s),null;case 5:Fu(s);var y=_o(ki.current);if(u=s.type,r!==null&&s.stateNode!=null)pg(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=_o(xr.current),Va(s)){f=s.stateNode,u=s.type;var w=s.memoizedProps;switch(f[gr]=s,f[xi]=w,r=(s.mode&1)!==0,u){case"dialog":ot("cancel",f),ot("close",f);break;case"iframe":case"object":case"embed":ot("load",f);break;case"video":case"audio":for(y=0;y<hi.length;y++)ot(hi[y],f);break;case"source":ot("error",f);break;case"img":case"image":case"link":ot("error",f),ot("load",f);break;case"details":ot("toggle",f);break;case"input":Ct(f,w),ot("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},ot("invalid",f);break;case"textarea":mn(f,w),ot("invalid",f)}le(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&&Ma(f.textContent,M,r),y=["children",M]):typeof M=="number"&&f.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Ma(f.textContent,M,r),y=["children",""+M]):i.hasOwnProperty(C)&&M!=null&&C==="onScroll"&&ot("scroll",f)}switch(u){case"input":ft(f),hn(f,w,!0);break;case"textarea":ft(f),Tn(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=$a)}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[gr]=s,r[xi]=f,fg(r,s,!1,!1),s.stateNode=r;e:{switch(C=ge(u,f),u){case"dialog":ot("cancel",r),ot("close",r),y=f;break;case"iframe":case"object":case"embed":ot("load",r),y=f;break;case"video":case"audio":for(y=0;y<hi.length;y++)ot(hi[y],r);y=f;break;case"source":ot("error",r),y=f;break;case"img":case"image":case"link":ot("error",r),ot("load",r),y=f;break;case"details":ot("toggle",r),y=f;break;case"input":Ct(r,f),y=Be(r,f),ot("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=E({},f,{value:void 0}),ot("invalid",r);break;case"textarea":mn(r,f),y=Qt(r,f),ot("invalid",r);break;default:y=f}le(u,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var H=M[w];w==="style"?qt(r,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&ne(r,H)):w==="children"?typeof H=="string"?(u!=="textarea"||H!=="")&&me(r,H):typeof H=="number"&&me(r,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?H!=null&&w==="onScroll"&&ot("scroll",r):H!=null&&T(r,w,H,C))}switch(u){case"input":ft(r),hn(r,f,!1);break;case"textarea":ft(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=$a)}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)hg(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=_o(ki.current),_o(xr.current),Va(s)){if(f=s.stateNode,u=s.memoizedProps,f[gr]=s,(w=f.nodeValue!==u)&&(r=In,r!==null))switch(r.tag){case 3:Ma(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ma(f.nodeValue,u,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[gr]=s,s.stateNode=f}return on(s),null;case 13:if(st(mt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(at&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)xm(),us(),s.flags|=98560,w=!1;else if(w=Va(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[gr]=s}else us(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;on(s),w=!1}else rr!==null&&(xd(rr),rr=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||(mt.current&1)!==0?At===0&&(At=3):bd())),s.updateQueue!==null&&(s.flags|=4),on(s),null);case 4:return hs(),id(r,s),r===null&&mi(s.stateNode.containerInfo),on(s),null;case 10:return Lu(s.type._context),on(s),null;case 17:return yn(s.type)&&za(),on(s),null;case 19:if(st(mt),w=s.memoizedState,w===null)return on(s),null;if(f=(s.flags&128)!==0,C=w.rendering,C===null)if(f)Ei(w,!1);else{if(At!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=Qa(r),C!==null){for(s.flags|=128,Ei(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 Je(mt,mt.current&1|2),s.child}r=r.sibling}w.tail!==null&&kt()>ys&&(s.flags|=128,f=!0,Ei(w,!1),s.lanes=4194304)}else{if(!f)if(r=Qa(C),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),Ei(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!at)return on(s),null}else 2*kt()-w.renderingStartTime>ys&&u!==1073741824&&(s.flags|=128,f=!0,Ei(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=mt.current,Je(mt,f?u&1|2:u&1),s):(on(s),null);case 22:case 23:return vd(),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 Gk(r,s){switch(Pu(s),s.tag){case 1:return yn(s.type)&&za(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return hs(),st(xn),st(nn),Bu(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Fu(s),null;case 13:if(st(mt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));us()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return st(mt),null;case 4:return hs(),null;case 10:return Lu(s.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var il=!1,sn=!1,Kk=typeof WeakSet=="function"?WeakSet:Set,xe=null;function gs(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){vt(r,s,f)}else u.current=null}function ad(r,s,u){try{u()}catch(f){vt(r,s,f)}}var mg=!1;function Yk(r,s){if(vu=Na,r=Gh(),du(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,H=-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||(H=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&&(H=C),(he=ie.nextSibling)!==null)break;ie=oe,oe=ie.parentNode}ie=he}u=M===-1||H===-1?null:{start:M,end:H}}else u=null}u=u||{start:0,end:0}}else u=null;for(bu={focusedElem:r,selectionRange:u},Na=!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,X=s.stateNode,W=X.getSnapshotBeforeUpdate(s.elementType===s.type?we:or(s.type,we),jt);X.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var ee=s.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){vt(s,s.return,ue)}if(r=s.sibling,r!==null){r.return=s.return,xe=r;break}xe=s.return}return be=mg,mg=!1,be}function Pi(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&&ad(s,u,w)}y=y.next}while(y!==f)}}function al(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 ld(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 gg(r){var s=r.alternate;s!==null&&(r.alternate=null,gg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[gr],delete s[xi],delete s[Su],delete s[Ak],delete s[Dk])),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 xg(r){return r.tag===5||r.tag===3||r.tag===4}function yg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||xg(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 cd(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=$a));else if(f!==4&&(r=r.child,r!==null))for(cd(r,s,u),r=r.sibling;r!==null;)cd(r,s,u),r=r.sibling}function ud(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(ud(r,s,u),r=r.sibling;r!==null;)ud(r,s,u),r=r.sibling}var Kt=null,sr=!1;function ao(r,s,u){for(u=u.child;u!==null;)vg(r,s,u),u=u.sibling}function vg(r,s,u){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(ba,u)}catch{}switch(u.tag){case 5:sn||gs(u,s);case 6:var f=Kt,y=sr;Kt=null,ao(r,s,u),Kt=f,sr=y,Kt!==null&&(sr?(r=Kt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Kt.removeChild(u.stateNode));break;case 18:Kt!==null&&(sr?(r=Kt,u=u.stateNode,r.nodeType===8?ju(r.parentNode,u):r.nodeType===1&&ju(r,u),ii(r)):ju(Kt,u.stateNode));break;case 4:f=Kt,y=sr,Kt=u.stateNode.containerInfo,sr=!0,ao(r,s,u),Kt=f,sr=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)&&ad(u,s,C),y=y.next}while(y!==f)}ao(r,s,u);break;case 1:if(!sn&&(gs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(M){vt(u,s,M)}ao(r,s,u);break;case 21:ao(r,s,u);break;case 22:u.mode&1?(sn=(f=sn)||u.memoizedState!==null,ao(r,s,u),sn=f):ao(r,s,u);break;default:ao(r,s,u)}}function bg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Kk),s.forEach(function(f){var y=oj.bind(null,r,f);u.has(f)||(u.add(f),f.then(y,y))})}}function ir(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,sr=!1;break e;case 3:Kt=M.stateNode.containerInfo,sr=!0;break e;case 4:Kt=M.stateNode.containerInfo,sr=!0;break e}M=M.return}if(Kt===null)throw Error(n(160));vg(w,C,y),Kt=null,sr=!1;var H=y.alternate;H!==null&&(H.return=null),y.return=null}catch(te){vt(y,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)wg(s,r),s=s.sibling}function wg(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(ir(s,r),vr(r),f&4){try{Pi(3,r,r.return),al(3,r)}catch(we){vt(r,r.return,we)}try{Pi(5,r,r.return)}catch(we){vt(r,r.return,we)}}break;case 1:ir(s,r),vr(r),f&512&&u!==null&&gs(u,u.return);break;case 5:if(ir(s,r),vr(r),f&512&&u!==null&&gs(u,u.return),r.flags&32){var y=r.stateNode;try{me(y,"")}catch(we){vt(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,H=r.updateQueue;if(r.updateQueue=null,H!==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<H.length;C+=2){var se=H[C],ie=H[C+1];se==="style"?qt(y,ie):se==="dangerouslySetInnerHTML"?ne(y,ie):se==="children"?me(y,ie):T(y,se,ie,te)}switch(M){case"input":cn(y,w);break;case"textarea":Rn(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[xi]=w}catch(we){vt(r,r.return,we)}}break;case 6:if(ir(s,r),vr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(we){vt(r,r.return,we)}}break;case 3:if(ir(s,r),vr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{ii(s.containerInfo)}catch(we){vt(r,r.return,we)}break;case 4:ir(s,r),vr(r);break;case 13:ir(s,r),vr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(pd=kt())),f&4&&bg(r);break;case 22:if(se=u!==null&&u.memoizedState!==null,r.mode&1?(sn=(te=sn)||se,ir(s,r),sn=te):ir(s,r),vr(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:Pi(4,oe,oe.return);break;case 1:gs(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){vt(f,u,we)}}break;case 5:gs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){Sg(ie);continue}}he!==null?(he.return=oe,xe=he):Sg(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,H=ie.memoizedProps.style,C=H!=null&&H.hasOwnProperty("display")?H.display:null,M.style.display=Jt("display",C))}catch(we){vt(r,r.return,we)}}}else if(ie.tag===6){if(se===null)try{ie.stateNode.nodeValue=te?"":ie.memoizedProps}catch(we){vt(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:ir(s,r),vr(r),f&4&&bg(r);break;case 21:break;default:ir(s,r),vr(r)}}function vr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(xg(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=yg(r);ud(r,w,y);break;case 3:case 4:var C=f.stateNode.containerInfo,M=yg(r);cd(r,M,C);break;default:throw Error(n(161))}}catch(H){vt(r,r.return,H)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Xk(r,s,u){xe=r,kg(r)}function kg(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||il;if(!C){var M=y.alternate,H=M!==null&&M.memoizedState!==null||sn;M=il;var te=sn;if(il=C,(sn=H)&&!te)for(xe=y;xe!==null;)C=xe,H=C.child,C.tag===22&&C.memoizedState!==null?Cg(y):H!==null?(H.return=C,xe=H):Cg(y);for(;w!==null;)xe=w,kg(w),w=w.sibling;xe=y,il=M,sn=te}jg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,xe=w):jg(r)}}function jg(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||al(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:or(s.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Sm(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}Sm(s,C,u)}break;case 5:var M=s.stateNode;if(u===null&&s.flags&4){u=M;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&u.focus();break;case"img":H.src&&(u.src=H.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&&ii(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}sn||s.flags&512&&ld(s)}catch(oe){vt(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 Sg(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 Cg(r){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{al(4,s)}catch(H){vt(s,u,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(H){vt(s,y,H)}}var w=s.return;try{ld(s)}catch(H){vt(s,w,H)}break;case 5:var C=s.return;try{ld(s)}catch(H){vt(s,C,H)}}}catch(H){vt(s,s.return,H)}if(s===r){xe=null;break}var M=s.sibling;if(M!==null){M.return=s.return,xe=M;break}xe=s.return}}var Qk=Math.ceil,ll=L.ReactCurrentDispatcher,dd=L.ReactCurrentOwner,Kn=L.ReactCurrentBatchConfig,He=0,Ft=null,Nt=null,Yt=0,On=0,xs=no(0),At=0,Ri=null,$o=0,cl=0,fd=0,Ti=null,bn=null,pd=0,ys=1/0,zr=null,ul=!1,hd=null,lo=null,dl=!1,co=null,fl=0,Ai=0,md=null,pl=-1,hl=0;function dn(){return(He&6)!==0?kt():pl!==-1?pl:pl=kt()}function uo(r){return(r.mode&1)===0?1:(He&2)!==0&&Yt!==0?Yt&-Yt:Lk.transition!==null?(hl===0&&(hl=yh()),hl):(r=Ge,r!==0||(r=window.event,r=r===void 0?16:Eh(r.type)),r)}function ar(r,s,u,f){if(50<Ai)throw Ai=0,md=null,Error(n(185));ti(r,u,f),((He&2)===0||r!==Ft)&&(r===Ft&&((He&2)===0&&(cl|=u),At===4&&fo(r,Yt)),wn(r,f),u===1&&He===0&&(s.mode&1)===0&&(ys=kt()+500,Ua&&oo()))}function wn(r,s){var u=r.callbackNode;L1(r,s);var f=ja(r,r===Ft?Yt:0);if(f===0)u!==null&&mh(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&mh(u),s===1)r.tag===0?Ik(Eg.bind(null,r)):fm(Eg.bind(null,r)),Rk(function(){(He&6)===0&&oo()}),u=null;else{switch(vh(f)){case 1:u=Kc;break;case 4:u=gh;break;case 16:u=va;break;case 536870912:u=xh;break;default:u=va}u=Og(u,Ng.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Ng(r,s){if(pl=-1,hl=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(vs()&&r.callbackNode!==u)return null;var f=ja(r,r===Ft?Yt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=ml(r,f);else{s=f;var y=He;He|=2;var w=Rg();(Ft!==r||Yt!==s)&&(zr=null,ys=kt()+500,zo(r,s));do try{ej();break}catch(M){Pg(r,M)}while(!0);Iu(),ll.current=w,He=y,Nt!==null?s=0:(Ft=null,Yt=0,s=At)}if(s!==0){if(s===2&&(y=Yc(r),y!==0&&(f=y,s=gd(r,y))),s===1)throw u=Ri,zo(r,0),fo(r,f),wn(r,kt()),u;if(s===6)fo(r,f);else{if(y=r.current.alternate,(f&30)===0&&!Jk(y)&&(s=ml(r,f),s===2&&(w=Yc(r),w!==0&&(f=w,s=gd(r,w))),s===1))throw u=Ri,zo(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:Bo(r,bn,zr);break;case 3:if(fo(r,f),(f&130023424)===f&&(s=pd+500-kt(),10<s)){if(ja(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){dn(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=ku(Bo.bind(null,r,bn,zr),s);break}Bo(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-tr(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*Qk(f/1960))-f,10<f){r.timeoutHandle=ku(Bo.bind(null,r,bn,zr),f);break}Bo(r,bn,zr);break;case 5:Bo(r,bn,zr);break;default:throw Error(n(329))}}}return wn(r,kt()),r.callbackNode===u?Ng.bind(null,r):null}function gd(r,s){var u=Ti;return r.current.memoizedState.isDehydrated&&(zo(r,s).flags|=256),r=ml(r,s),r!==2&&(s=bn,bn=u,s!==null&&xd(s)),r}function xd(r){bn===null?bn=r:bn.push.apply(bn,r)}function Jk(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(!nr(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&=~fd,s&=~cl,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-tr(s),f=1<<u;r[u]=-1,s&=~f}}function Eg(r){if((He&6)!==0)throw Error(n(327));vs();var s=ja(r,0);if((s&1)===0)return wn(r,kt()),null;var u=ml(r,s);if(r.tag!==0&&u===2){var f=Yc(r);f!==0&&(s=f,u=gd(r,f))}if(u===1)throw u=Ri,zo(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,Bo(r,bn,zr),wn(r,kt()),null}function yd(r,s){var u=He;He|=1;try{return r(s)}finally{He=u,He===0&&(ys=kt()+500,Ua&&oo())}}function Fo(r){co!==null&&co.tag===0&&(He&6)===0&&vs();var s=He;He|=1;var u=Kn.transition,f=Ge;try{if(Kn.transition=null,Ge=1,r)return r()}finally{Ge=f,Kn.transition=u,He=s,(He&6)===0&&oo()}}function vd(){On=xs.current,st(xs)}function zo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Pk(u)),Nt!==null)for(u=Nt.return;u!==null;){var f=u;switch(Pu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&za();break;case 3:hs(),st(xn),st(nn),Bu();break;case 5:Fu(f);break;case 4:hs();break;case 13:st(mt);break;case 19:st(mt);break;case 10:Lu(f.type._context);break;case 22:case 23:vd()}u=u.return}if(Ft=r,Nt=r=po(r.current,null),Yt=On=s,At=0,Ri=null,fd=cl=$o=0,bn=Ti=null,Oo!==null){for(s=0;s<Oo.length;s++)if(u=Oo[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}Oo=null}return r}function Pg(r,s){do{var u=Nt;try{if(Iu(),Ja.current=nl,Za){for(var f=gt.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}Za=!1}if(Mo=0,$t=Tt=gt=null,ji=!1,Si=0,dd.current=null,u===null||u.return===null){At=1,Ri=s,Nt=null;break}e:{var w=r,C=u.return,M=u,H=s;if(s=Yt,M.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=H,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=Zm(C);if(he!==null){he.flags&=-257,eg(he,C,M,w,s),he.mode&1&&Jm(w,te,s),s=he,H=te;var be=s.updateQueue;if(be===null){var we=new Set;we.add(H),s.updateQueue=we}else be.add(H);break e}else{if((s&1)===0){Jm(w,te,s),bd();break e}H=Error(n(426))}}else if(at&&M.mode&1){var jt=Zm(C);if(jt!==null){(jt.flags&65536)===0&&(jt.flags|=256),eg(jt,C,M,w,s),Au(ms(H,M));break e}}w=H=ms(H,M),At!==4&&(At=2),Ti===null?Ti=[w]:Ti.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=Xm(w,H,s);jm(w,X);break e;case 1:M=H;var W=w.type,ee=w.stateNode;if((w.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(lo===null||!lo.has(ee)))){w.flags|=65536,s&=-s,w.lanes|=s;var ue=Qm(w,M,s);jm(w,ue);break e}}w=w.return}while(w!==null)}Ag(u)}catch(Se){s=Se,Nt===u&&u!==null&&(Nt=u=u.return);continue}break}while(!0)}function Rg(){var r=ll.current;return ll.current=nl,r===null?nl:r}function bd(){(At===0||At===3||At===2)&&(At=4),Ft===null||($o&268435455)===0&&(cl&268435455)===0||fo(Ft,Yt)}function ml(r,s){var u=He;He|=2;var f=Rg();(Ft!==r||Yt!==s)&&(zr=null,zo(r,s));do try{Zk();break}catch(y){Pg(r,y)}while(!0);if(Iu(),He=u,ll.current=f,Nt!==null)throw Error(n(261));return Ft=null,Yt=0,At}function Zk(){for(;Nt!==null;)Tg(Nt)}function ej(){for(;Nt!==null&&!C1();)Tg(Nt)}function Tg(r){var s=Lg(r.alternate,r,On);r.memoizedProps=r.pendingProps,s===null?Ag(r):Nt=s,dd.current=null}function Ag(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=qk(u,s,On),u!==null){Nt=u;return}}else{if(u=Gk(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 Bo(r,s,u){var f=Ge,y=Kn.transition;try{Kn.transition=null,Ge=1,tj(r,s,u,f)}finally{Kn.transition=y,Ge=f}return null}function tj(r,s,u,f){do vs();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(O1(r,w),r===Ft&&(Nt=Ft=null,Yt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||dl||(dl=!0,Og(va,function(){return vs(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Kn.transition,Kn.transition=null;var C=Ge;Ge=1;var M=He;He|=4,dd.current=null,Yk(r,u),wg(u,r),wk(bu),Na=!!vu,bu=vu=null,r.current=u,Xk(u),N1(),He=M,Ge=C,Kn.transition=w}else r.current=u;if(dl&&(dl=!1,co=r,fl=y),w=r.pendingLanes,w===0&&(lo=null),R1(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(ul)throw ul=!1,r=hd,hd=null,r;return(fl&1)!==0&&r.tag!==0&&vs(),w=r.pendingLanes,(w&1)!==0?r===md?Ai++:(Ai=0,md=r):Ai=0,oo(),null}function vs(){if(co!==null){var r=vh(fl),s=Kn.transition,u=Ge;try{if(Kn.transition=null,Ge=16>r?16:r,co===null)var f=!1;else{if(r=co,co=null,fl=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 H=0;H<M.length;H++){var te=M[H];for(xe=te;xe!==null;){var se=xe;switch(se.tag){case 0:case 11:case 15:Pi(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(gg(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:Pi(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,xe=X;break e}xe=w.return}}var W=r.current;for(xe=W;xe!==null;){C=xe;var ee=C.child;if((C.subtreeFlags&2064)!==0&&ee!==null)ee.return=C,xe=ee;else e:for(C=W;xe!==null;){if(M=xe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:al(9,M)}}catch(Se){vt(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(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(ba,r)}catch{}f=!0}return f}finally{Ge=u,Kn.transition=s}}return!1}function Dg(r,s,u){s=ms(u,s),s=Xm(r,s,1),r=io(r,s,1),s=dn(),r!==null&&(ti(r,1,s),wn(r,s))}function vt(r,s,u){if(r.tag===3)Dg(r,r,u);else for(;s!==null;){if(s.tag===3){Dg(s,r,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(lo===null||!lo.has(f))){r=ms(u,r),r=Qm(s,r,1),s=io(s,r,1),r=dn(),s!==null&&(ti(s,1,r),wn(s,r));break}}s=s.return}}function nj(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()-pd?zo(r,0):fd|=u),wn(r,s)}function Ig(r,s){s===0&&((r.mode&1)===0?s=1:(s=ka,ka<<=1,(ka&130023424)===0&&(ka=4194304)));var u=dn();r=Mr(r,s),r!==null&&(ti(r,s,u),wn(r,u))}function rj(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),Ig(r,u)}function oj(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),Ig(r,u)}var Lg;Lg=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,Vk(r,s,u);vn=(r.flags&131072)!==0}else vn=!1,at&&(s.flags&1048576)!==0&&pm(s,Wa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;sl(r,s),r=s.pendingProps;var y=as(s,nn.current);ps(s,u),y=Wu(null,s,f,r,y,u);var w=Vu();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,Ba(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Mu(s),y.updater=rl,s.stateNode=y,y._reactInternals=s,Qu(s,f,r,u),s=td(null,s,f,!0,w,u)):(s.tag=0,at&&w&&Eu(s),un(null,s,y,u),s=s.child),s;case 16:f=s.elementType;e:{switch(sl(r,s),r=s.pendingProps,y=f._init,f=y(f._payload),s.type=f,y=s.tag=ij(f),r=or(f,r),y){case 0:s=ed(null,s,f,r,u);break e;case 1:s=ig(null,s,f,r,u);break e;case 11:s=tg(null,s,f,r,u);break e;case 14:s=ng(null,s,f,or(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:or(f,y),ed(r,s,f,y,u);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),ig(r,s,f,y,u);case 3:e:{if(ag(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,km(r,s),Xa(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=ms(Error(n(423)),s),s=lg(r,s,f,u,y);break e}else if(f!==y){y=ms(Error(n(424)),s),s=lg(r,s,f,u,y);break e}else for(Ln=to(s.stateNode.containerInfo.firstChild),In=s,at=!0,rr=null,u=bm(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(us(),f===y){s=Fr(r,s,u);break e}un(r,s,f,u)}s=s.child}return s;case 5:return Cm(s),r===null&&Tu(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,C=y.children,wu(f,y)?C=null:w!==null&&wu(f,w)&&(s.flags|=32),sg(r,s),un(r,s,C,u),s.child;case 6:return r===null&&Tu(s),null;case 13:return cg(r,s,u);case 4:return $u(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ds(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:or(f,y),tg(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,Je(Ga,f._currentValue),f._currentValue=C,w!==null)if(nr(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 H=M.firstContext;H!==null;){if(H.context===f){if(w.tag===1){H=$r(-1,u&-u),H.tag=2;var te=w.updateQueue;if(te!==null){te=te.shared;var se=te.pending;se===null?H.next=H:(H.next=se.next,se.next=H),te.pending=H}}w.lanes|=u,H=w.alternate,H!==null&&(H.lanes|=u),Ou(w.return,u,s),M.lanes|=u;break}H=H.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),Ou(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,ps(s,u),y=qn(y),f=f(y),s.flags|=1,un(r,s,f,u),s.child;case 14:return f=s.type,y=or(f,s.pendingProps),y=or(f.type,y),ng(r,s,f,y,u);case 15:return rg(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),sl(r,s),s.tag=1,yn(f)?(r=!0,Ba(s)):r=!1,ps(s,u),Km(s,f,y),Qu(s,f,y,u),td(null,s,f,!0,r,u);case 19:return dg(r,s,u);case 22:return og(r,s,u)}throw Error(n(156,s.tag))};function Og(r,s){return hh(r,s)}function sj(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 Yn(r,s,u,f){return new sj(r,s,u,f)}function wd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ij(r){if(typeof r=="function")return wd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===G)return 11;if(r===_)return 14}return 2}function po(r,s){var u=r.alternate;return u===null?(u=Yn(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 gl(r,s,u,f,y,w){var C=2;if(f=r,typeof r=="function")wd(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case $:return Uo(u.children,y,w,s);case A:C=8,y|=8;break;case q:return r=Yn(12,u,s,y|2),r.elementType=q,r.lanes=w,r;case Y:return r=Yn(13,u,s,y),r.elementType=Y,r.lanes=w,r;case Q:return r=Yn(19,u,s,y),r.elementType=Q,r.lanes=w,r;case F:return xl(u,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case J:C=10;break e;case z:C=9;break e;case G: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=Yn(C,u,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Uo(r,s,u,f){return r=Yn(7,r,f,s),r.lanes=u,r}function xl(r,s,u,f){return r=Yn(22,r,f,s),r.elementType=F,r.lanes=u,r.stateNode={isHidden:!1},r}function kd(r,s,u){return r=Yn(6,r,null,s),r.lanes=u,r}function jd(r,s,u){return s=Yn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function aj(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=Xc(0),this.expirationTimes=Xc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Sd(r,s,u,f,y,w,C,M,H){return r=new aj(r,s,u,M,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Yn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mu(w),r}function lj(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function _g(r){if(!r)return ro;r=r._reactInternals;e:{if(To(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 um(r,u,s)}return s}function Mg(r,s,u,f,y,w,C,M,H){return r=Sd(u,f,!0,r,y,w,C,M,H),r.context=_g(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,ti(r,y,f),wn(r,f),r}function yl(r,s,u,f){var y=s.current,w=dn(),C=uo(y);return u=_g(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&&(ar(r,y,C,w),Ya(r,y,C)),C}function vl(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 $g(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function Cd(r,s){$g(r,s),(r=r.alternate)&&$g(r,s)}function cj(){return null}var Fg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Nd(r){this._internalRoot=r}bl.prototype.render=Nd.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));yl(r,s,null,null)},bl.prototype.unmount=Nd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Fo(function(){yl(null,r,null,null)}),s[Ir]=null}};function bl(r){this._internalRoot=r}bl.prototype.unstable_scheduleHydration=function(r){if(r){var s=kh();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&&Ch(r)}};function Ed(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function wl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function zg(){}function uj(r,s,u,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var te=vl(C);w.call(te)}}var C=Mg(s,f,r,0,null,!1,!1,"",zg);return r._reactRootContainer=C,r[Ir]=C.current,mi(r.nodeType===8?r.parentNode:r),Fo(),C}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var M=f;f=function(){var te=vl(H);M.call(te)}}var H=Sd(r,0,!1,null,null,!1,!1,"",zg);return r._reactRootContainer=H,r[Ir]=H.current,mi(r.nodeType===8?r.parentNode:r),Fo(function(){yl(s,H,u,f)}),H}function kl(r,s,u,f,y){var w=u._reactRootContainer;if(w){var C=w;if(typeof y=="function"){var M=y;y=function(){var H=vl(C);M.call(H)}}yl(s,C,r,y)}else C=uj(u,s,r,y,f);return vl(C)}bh=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=ei(s.pendingLanes);u!==0&&(Qc(s,u|1),wn(s,kt()),(He&6)===0&&(ys=kt()+500,oo()))}break;case 13:Fo(function(){var f=Mr(r,1);if(f!==null){var y=dn();ar(f,r,1,y)}}),Cd(r,1)}},Jc=function(r){if(r.tag===13){var s=Mr(r,134217728);if(s!==null){var u=dn();ar(s,r,134217728,u)}Cd(r,134217728)}},wh=function(r){if(r.tag===13){var s=uo(r),u=Mr(r,s);if(u!==null){var f=dn();ar(u,r,s,f)}Cd(r,s)}},kh=function(){return Ge},jh=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=Fa(f);if(!y)throw Error(n(90));nt(f),cn(f,y)}}}break;case"textarea":Rn(r,u);break;case"select":s=u.value,s!=null&&Vt(r,!!u.multiple,s,!1)}},Gt=yd,en=Fo;var dj={usingClientEntryPoint:!1,Events:[yi,ss,Fa,wt,Mt,yd]},Di={findFiberByHostInstance:Ao,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fj={bundleType:Di.bundleType,version:Di.version,rendererPackageName:Di.rendererPackageName,rendererConfig:Di.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=fh(r),r===null?null:r.stateNode},findFiberByHostInstance:Di.findFiberByHostInstance||cj,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 jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jl.isDisabled&&jl.supportsFiber)try{ba=jl.inject(fj),mr=jl}catch{}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dj,kn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ed(s))throw Error(n(200));return lj(r,s,null,u)},kn.createRoot=function(r,s){if(!Ed(r))throw Error(n(299));var u=!1,f="",y=Fg;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=Sd(r,1,!1,null,null,u,!1,f,y),r[Ir]=s.current,mi(r.nodeType===8?r.parentNode:r),new Nd(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=fh(s),r=r===null?null:r.stateNode,r},kn.flushSync=function(r){return Fo(r)},kn.hydrate=function(r,s,u){if(!wl(s))throw Error(n(200));return kl(null,r,s,!0,u)},kn.hydrateRoot=function(r,s,u){if(!Ed(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,y=!1,w="",C=Fg;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),s=Mg(s,null,r,1,u??null,y,!1,w,C),r[Ir]=s.current,mi(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 bl(s)},kn.render=function(r,s,u){if(!wl(s))throw Error(n(200));return kl(null,r,s,!1,u)},kn.unmountComponentAtNode=function(r){if(!wl(r))throw Error(n(40));return r._reactRootContainer?(Fo(function(){kl(null,null,r,!1,function(){r._reactRootContainer=null,r[Ir]=null})}),!0):!1},kn.unstable_batchedUpdates=yd,kn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!wl(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return kl(r,s,u,!1,f)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var Kg;function ev(){if(Kg)return Td.exports;Kg=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(),Td.exports=bj(),Td.exports}var Yg;function wj(){if(Yg)return Sl;Yg=1;var e=ev();return Sl.createRoot=e.createRoot,Sl.hydrateRoot=e.hydrateRoot,Sl}var kj=wj();/**
|
|
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 Xg="popstate";function Qg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function jj(e={}){function t(o,i){var h;let l=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:p}=l||o.location;return kf("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:Zi(i)}return Cj(t,n,null,e)}function xt(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 Sj(){return Math.random().toString(36).substring(2,10)}function Jg(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 kf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fs(t):t,state:n,key:t&&t.key||o||Sj(),unstable_mask:i}}function Zi({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 Fs(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 Cj(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:l=!1}=o,c=i.history,d="POP",p=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=m(),S=j==null?null:j-h;h=j,p&&p({action:d,location:k.location,delta:S})}function v(j,S){d="PUSH";let P=Qg(j)?j:kf(k.location,j,S);h=m()+1;let T=Jg(P,h),L=k.createHref(P.unstable_mask||P);try{c.pushState(T,"",L)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(L)}l&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let P=Qg(j)?j:kf(k.location,j,S);h=m();let T=Jg(P,h),L=k.createHref(P.unstable_mask||P);c.replaceState(T,"",L),l&&p&&p({action:d,location:k.location,delta:0})}function N(j){return Nj(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(Xg,x),p=j,()=>{i.removeEventListener(Xg,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 Nj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),xt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Zi(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function tv(e,t,n="/"){return Ej(e,t,n,!1)}function Ej(e,t,n,o){let i=typeof t=="string"?Fs(t):t,l=Wr(i.pathname||"/",n);if(l==null)return null;let c=nv(e);Pj(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=Fj(l);d=Mj(c[p],h,o)}return d}function nv(e,t=[],n=[],o="",i=!1){let l=(c,d,p=i,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(o)&&p)return;xt(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length)}let x=Sr([o,m.relativePath]),v=n.concat(m);c.children&&c.children.length>0&&(xt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),nv(c.children,t,v,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:Oj(x,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))l(c,d);else for(let h of rv(c.path))l(c,d,!0,h)}),t}function rv(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(o.length===0)return i?[l,""]:[l];let c=rv(o.join("/")),d=[];return d.push(...c.map(p=>p===""?l:[l,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function Pj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_j(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var Rj=/^:[\w-]+$/,Tj=3,Aj=2,Dj=1,Ij=10,Lj=-2,Zg=e=>e==="*";function Oj(e,t){let n=e.split("/"),o=n.length;return n.some(Zg)&&(o+=Lj),t&&(o+=Aj),n.filter(i=>!Zg(i)).reduce((i,l)=>i+(Rj.test(l)?Tj:l===""?Dj:Ij),o)}function _j(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 Mj(e,t,n=!1){let{routesMeta:o}=e,i={},l="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],h=d===o.length-1,m=l==="/"?t:t.slice(l.length)||"/",x=Kl({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),v=p.route;if(!x&&h&&n&&!o[o.length-1].route.index&&(x=Kl({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},m)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:Sr([l,x.pathname]),pathnameBase:Hj(Sr([l,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(l=Sr([l,x.pathnameBase]))}return c}function Kl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=$j(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((h,{paramName:m,isOptional:x},v)=>{if(m==="*"){let N=d[v]||"";c=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[v];return x&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:e}}function $j(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,h,m)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=m.charAt(h+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 Fj(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 zj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Bj(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Fs(e):e,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=ex(n.substring(1),"/"):l=ex(n,t)):l=t,{pathname:l,search:Wj(o),hash:Vj(i)}}function ex(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 Id(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 Uj(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ov(e){let t=Uj(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function tp(e,t,n,o=!1){let i;typeof e=="string"?i=Fs(e):(i={...e},xt(!i.pathname||!i.pathname.includes("?"),Id("?","pathname","search",i)),xt(!i.pathname||!i.pathname.includes("#"),Id("#","pathname","hash",i)),xt(!i.search||!i.search.includes("#"),Id("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":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=Bj(i,d),h=c&&c!=="/"&&c.endsWith("/"),m=(l||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}var Sr=e=>e.join("/").replace(/\/\/+/g,"/"),Hj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,qj=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 Gj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Kj(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var sv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iv(e,t){let n=e;if(typeof n!="string"||!zj.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(sv)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Wr(c.pathname,t);c.origin===l.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 av=["POST","PUT","PATCH","DELETE"];new Set(av);var Yj=["GET",...av];new Set(Yj);var zs=g.createContext(null);zs.displayName="DataRouter";var dc=g.createContext(null);dc.displayName="DataRouterState";var Xj=g.createContext(!1),lv=g.createContext({isTransitioning:!1});lv.displayName="ViewTransition";var Qj=g.createContext(new Map);Qj.displayName="Fetchers";var Jj=g.createContext(null);Jj.displayName="Await";var Jn=g.createContext(null);Jn.displayName="Navigation";var ia=g.createContext(null);ia.displayName="Location";var fr=g.createContext({outlet:null,matches:[],isDataRoute:!1});fr.displayName="Route";var np=g.createContext(null);np.displayName="RouteError";var cv="REACT_ROUTER_ERROR",Zj="REDIRECT",eS="ROUTE_ERROR_RESPONSE";function tS(e){if(e.startsWith(`${cv}:${Zj}:{`))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 nS(e){if(e.startsWith(`${cv}:${eS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new qj(t.status,t.statusText,t.data)}catch{}}function rS(e,{relative:t}={}){xt(aa(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Jn),{hash:i,pathname:l,search:c}=la(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Sr([n,l])),o.createHref({pathname:d,search:c,hash:i})}function aa(){return g.useContext(ia)!=null}function fn(){return xt(aa(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(ia).location}var uv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dv(e){g.useContext(Jn).static||g.useLayoutEffect(e)}function Wt(){let{isDataRoute:e}=g.useContext(fr);return e?yS():oS()}function oS(){xt(aa(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(zs),{basename:t,navigator:n}=g.useContext(Jn),{matches:o}=g.useContext(fr),{pathname:i}=fn(),l=JSON.stringify(ov(o)),c=g.useRef(!1);return dv(()=>{c.current=!0}),g.useCallback((p,h={})=>{if(lr(c.current,uv),!c.current)return;if(typeof p=="number"){n.go(p);return}let m=tp(p,JSON.parse(l),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Sr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,l,i,e])}var sS=g.createContext(null);function iS(e){let t=g.useContext(fr).outlet;return g.useMemo(()=>t&&g.createElement(sS.Provider,{value:e},t),[t,e])}function St(){let{matches:e}=g.useContext(fr),t=e[e.length-1];return t?t.params:{}}function la(e,{relative:t}={}){let{matches:n}=g.useContext(fr),{pathname:o}=fn(),i=JSON.stringify(ov(n));return g.useMemo(()=>tp(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function aS(e,t){return fv(e,t)}function fv(e,t,n){var j;xt(aa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Jn),{matches:i}=g.useContext(fr),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",h=l&&l.route;{let S=h&&h.path||"";hv(d,!h||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 m=fn(),x;if(t){let S=typeof t=="string"?Fs(t):t;xt(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=m;let v=x.pathname||"/",b=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=tv(e,{pathname:b});lr(h||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=fS(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Sr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:Sr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?g.createElement(ia.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function lS(){let e=xS(),t=Gj(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},l={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:l},"ErrorBoundary")," or"," ",g.createElement("code",{style:l},"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 cS=g.createElement(lS,null),pv=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=nS(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(fr.Provider,{value:this.props.routeContext},g.createElement(np.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(uS,{error:e},t):t}};pv.contextType=Xj;var Ld=new WeakMap;function uS({children:e,error:t}){let{basename:n}=g.useContext(Jn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=tS(t.digest);if(o){let i=Ld.get(t);if(i)throw i;let l=iv(o.location,n);if(sv&&!Ld.get(t))if(l.isExternal||o.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:o.replace}));throw Ld.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function dS({routeContext:e,match:t,children:n}){let o=g.useContext(zs);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(fr.Provider,{value:e},n)}function fS(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,l=o==null?void 0:o.errors;if(l!=null){let m=i.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);xt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,m+1))}let c=!1,d=-1;if(n&&o){c=o.renderFallback;for(let m=0;m<i.length;m++){let x=i[m];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=m),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,h=o&&p?(m,x)=>{var v,b;p(m,{location:o.location,params:((b=(v=o.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:Kj(o.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,v)=>{let b,N=!1,k=null,j=null;o&&(b=l&&x.route.id?l[x.route.id]:void 0,k=x.route.errorElement||cS,c&&(d<0&&v===0?(hv("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)),P=()=>{let T;return b?T=k:N?T=j:x.route.Component?T=g.createElement(x.route.Component,null):x.route.element?T=x.route.element:T=m,g.createElement(dS,{match:x,routeContext:{outlet:m,matches:S,isDataRoute:o!=null},children:T})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(pv,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:P(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):P()},null)}function rp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pS(e){let t=g.useContext(zs);return xt(t,rp(e)),t}function hS(e){let t=g.useContext(dc);return xt(t,rp(e)),t}function mS(e){let t=g.useContext(fr);return xt(t,rp(e)),t}function op(e){let t=mS(e),n=t.matches[t.matches.length-1];return xt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gS(){return op("useRouteId")}function xS(){var o;let e=g.useContext(np),t=hS("useRouteError"),n=op("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function yS(){let{router:e}=pS("useNavigate"),t=op("useNavigate"),n=g.useRef(!1);return dv(()=>{n.current=!0}),g.useCallback(async(i,l={})=>{lr(n.current,uv),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var tx={};function hv(e,t,n){!t&&!tx[e]&&(tx[e]=!0,lr(!1,n))}g.memo(vS);function vS({routes:e,future:t,state:n,isStatic:o,onError:i}){return fv(e,void 0,{state:n,isStatic:o,onError:i})}function bS(e){return iS(e.context)}function De(e){xt(!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 wS({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:l=!1,unstable_useTransitions:c}){xt(!aa(),"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:l,unstable_useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=Fs(n));let{pathname:h="/",search:m="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let j=Wr(h,d);return j==null?null:{location:{pathname:j,search:m,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,h,m,x,v,b,o,N]);return lr(k!=null,`<Router basename="${d}"> is not able to match the URL "${h}${m}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:g.createElement(Jn.Provider,{value:p},g.createElement(ia.Provider,{children:t,value:k}))}function kS({children:e,location:t}){return aS(jf(e),t)}function jf(e,t=[]){let n=[];return g.Children.forEach(e,(o,i)=>{if(!g.isValidElement(o))return;let l=[...t,i];if(o.type===g.Fragment){n.push.apply(n,jf(o.props.children,l));return}xt(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>`),xt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||l.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=jf(o.props.children,l)),n.push(c)}),n}var $l="get",Fl="application/x-www-form-urlencoded";function fc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function jS(e){return fc(e)&&e.tagName.toLowerCase()==="button"}function SS(e){return fc(e)&&e.tagName.toLowerCase()==="form"}function CS(e){return fc(e)&&e.tagName.toLowerCase()==="input"}function NS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ES(e,t){return e.button===0&&(!t||t==="_self")&&!NS(e)}function Sf(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 PS(e,t){let n=Sf(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Cl=null;function RS(){if(Cl===null)try{new FormData(document.createElement("form"),0),Cl=!1}catch{Cl=!0}return Cl}var TS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Od(e){return e!=null&&!TS.has(e)?(lr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fl}"`),null):e}function AS(e,t){let n,o,i,l,c;if(SS(e)){let d=e.getAttribute("action");o=d?Wr(d,t):null,n=e.getAttribute("method")||$l,i=Od(e.getAttribute("enctype"))||Fl,l=new FormData(e)}else if(jS(e)||CS(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")||$l,i=Od(e.getAttribute("formenctype"))||Od(d.getAttribute("enctype"))||Fl,l=new FormData(d,e),!RS()){let{name:h,type:m,value:x}=e;if(m==="image"){let v=h?`${h}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else h&&l.append(h,x)}}else{if(fc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$l,o=null,i=Fl,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function DS(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 IS(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 LS(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 OS(e,t,n){let o=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await IS(l,n);return c.links?c.links():[]}return[]}));return FS(o.flat(1).filter(LS).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function nx(e,t,n,o,i,l){let c=(p,h)=>n[h]?p.route.id!==n[h].route.id:!0,d=(p,h)=>{var m;return n[h].pathname!==p.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==p.params["*"]};return l==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):l==="data"?t.filter((p,h)=>{var x;let m=o.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(c(p,h)||d(p,h))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 _S(e,t,{includeHydrateFallback:n}={}){return MS(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function MS(e){return[...new Set(e)]}function $S(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function FS(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let l=JSON.stringify($S(i));return n.has(l)||(n.add(l),o.push({key:l,link:i})),o},[])}function mv(){let e=g.useContext(zs);return sp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zS(){let e=g.useContext(dc);return sp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ip=g.createContext(void 0);ip.displayName="FrameworkContext";function gv(){let e=g.useContext(ip);return sp(e,"You must render this element inside a <HydratedRouter> element"),e}function BS(e,t){let n=g.useContext(ip),[o,i]=g.useState(!1),[l,c]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(P=>{c(P.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"?[l,v,{}]:[l,v,{onFocus:Li(d,b),onBlur:Li(p,N),onMouseEnter:Li(h,b),onMouseLeave:Li(m,N),onTouchStart:Li(x,b)}]:[!1,v,{}]}function Li(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function US({page:e,...t}){let{router:n}=mv(),o=g.useMemo(()=>tv(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(WS,{page:e,matches:o,...t}):null}function HS(e){let{manifest:t,routeModules:n}=gv(),[o,i]=g.useState([]);return g.useEffect(()=>{let l=!1;return OS(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),o}function WS({page:e,matches:t,...n}){let o=fn(),{future:i,manifest:l,routeModules:c}=gv(),{basename:d}=mv(),{loaderData:p,matches:h}=zS(),m=g.useMemo(()=>nx(e,t,h,l,o,"data"),[e,t,h,l,o]),x=g.useMemo(()=>nx(e,t,h,l,o,"assets"),[e,t,h,l,o]),v=g.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=new Set,j=!1;if(t.forEach(P=>{var L;let T=l.routes[P.route.id];!T||!T.hasLoader||(!m.some(O=>O.route.id===P.route.id)&&P.route.id in p&&((L=c[P.route.id])!=null&&L.shouldRevalidate)||T.hasClientLoader?j=!0:k.add(P.route.id))}),k.size===0)return[];let S=DS(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(P=>k.has(P.route.id)).map(P=>P.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,l,m,t,e,c]),b=g.useMemo(()=>_S(x,l),[x,l]),N=HS(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 VS(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var qS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{qS&&(window.__reactRouterVersion="7.13.1")}catch{}function GS({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=jj({window:o,v5Compat:!0}));let l=i.current,[c,d]=g.useState({action:l.action,location:l.location}),p=g.useCallback(h=>{n===!1?d(h):g.startTransition(()=>d(h))},[n]);return g.useLayoutEffect(()=>l.listen(p),[l,p]),g.createElement(wS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var xv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:l,replace:c,unstable_mask:d,state:p,target:h,to:m,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:j,navigator:S,unstable_useTransitions:P}=g.useContext(Jn),T=typeof m=="string"&&xv.test(m),L=iv(m,j);m=L.to;let O=rS(m,{relative:i}),R=fn(),$=null;if(d){let _=tp(d,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);j!=="/"&&(_.pathname=_.pathname==="/"?j:Sr([j,_.pathname])),$=S.createHref(_)}let[A,q,J]=BS(o,N),z=QS(m,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:P});function G(_){t&&t(_),_.defaultPrevented||z(_)}let Y=!(L.isExternal||l),Q=g.createElement("a",{...N,...J,href:(Y?$:void 0)||L.absoluteURL||O,onClick:Y?G:t,ref:VS(k,q),target:h,"data-discover":!T&&n==="render"?"true":void 0});return A&&!T?g.createElement(g.Fragment,null,Q,g.createElement(US,{page:O})):Q});Ce.displayName="Link";var KS=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:l,to:c,viewTransition:d,children:p,...h},m){let x=la(c,{relative:h.relative}),v=fn(),b=g.useContext(dc),{navigator:N,basename:k}=g.useContext(Jn),j=b!=null&&nC(x)&&d===!0,S=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,P=v.pathname,T=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(P=P.toLowerCase(),T=T?T.toLowerCase():null,S=S.toLowerCase()),T&&k&&(T=Wr(T,k)||T);const L=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let O=P===S||!i&&P.startsWith(S)&&P.charAt(L)==="/",R=T!=null&&(T===S||!i&&T.startsWith(S)&&T.charAt(S.length)==="/"),$={isActive:O,isPending:R,isTransitioning:j},A=O?t:void 0,q;typeof o=="function"?q=o($):q=[o,O?"active":null,R?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let J=typeof l=="function"?l($):l;return g.createElement(Ce,{...h,"aria-current":A,className:q,ref:m,style:J,to:c,viewTransition:d},typeof p=="function"?p($):p)});KS.displayName="NavLink";var YS=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:l,method:c=$l,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Jn),j=eC(),S=tC(d,{relative:h}),P=c.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&xv.test(d),L=O=>{if(p&&p(O),O.defaultPrevented)return;O.preventDefault();let R=O.nativeEvent.submitter,$=(R==null?void 0:R.getAttribute("formmethod"))||c,A=()=>j(R||O.currentTarget,{fetcherKey:t,method:$,navigate:n,replace:i,state:l,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v});k&&n!==!1?g.startTransition(()=>A()):A()};return g.createElement("form",{ref:N,method:P,action:S,onSubmit:o?p:L,...b,"data-discover":!T&&e==="render"?"true":void 0})});YS.displayName="Form";function XS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yv(e){let t=g.useContext(zs);return xt(t,XS(e)),t}function QS(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=Wt(),x=fn(),v=la(e,{relative:c});return g.useCallback(b=>{if(ES(b,t)){b.preventDefault();let N=n!==void 0?n:Zi(x)===Zi(v),k=()=>m(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?g.startTransition(()=>k()):k()}},[x,m,v,n,o,i,t,e,l,c,d,p,h])}function No(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(Sf(e)),n=g.useRef(!1),o=fn(),i=g.useMemo(()=>PS(o.search,n.current?null:t.current),[o.search]),l=Wt(),c=g.useCallback((d,p)=>{const h=Sf(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+h,p)},[l,i]);return[i,c]}var JS=0,ZS=()=>`__${String(++JS)}__`;function eC(){let{router:e}=yv("useSubmit"),{basename:t}=g.useContext(Jn),n=gS(),o=e.fetch,i=e.navigate;return g.useCallback(async(l,c={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=AS(l,t);if(c.navigate===!1){let v=c.fetcherKey||ZS();await o(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,i,t,n])}function tC(e,{relative:t}={}){let{basename:n}=g.useContext(Jn),o=g.useContext(fr);xt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),l={...la(e||".",{relative:t})},c=fn();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),p=d.getAll("index");if(p.some(m=>m==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let m=d.toString();l.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Sr([n,l.pathname])),Zi(l)}function nC(e,{relative:t}={}){let n=g.useContext(lv);xt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=yv("useViewTransitionState"),i=la(e,{relative:t});if(!n.isTransitioning)return!1;let l=Wr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=Wr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return Kl(i.pathname,c)!=null||Kl(i.pathname,l)!=null}var wo=ev();const rC=uc(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 oC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vv=(...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 sC={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 iC=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},p)=>g.createElement("svg",{ref:p,...sC,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:vv("lucide",i),...d},[...c.map(([h,m])=>g.createElement(h,m)),...Array.isArray(l)?l:[l]]));/**
|
|
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},l)=>g.createElement(iC,{ref:l,iconNode:t,className:vv(`lucide-${oC(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 pc=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 bv=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 aC=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 Yl=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 lC=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 wv=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 hc=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 ea=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 kv=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 Cf=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 ap=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 Nf=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 cC=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 uC=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 dC=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 fC=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 pC=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 hC=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 mc=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 mC=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 gC=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 jv=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 rx=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 xC=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 yC=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 vC=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 bC=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 lp=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 wC=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 Sv=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 Cv=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 kC=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 jC=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 Nv=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 SC=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 CC=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 NC=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 Ev=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 EC=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 cp=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 PC=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 _d=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 RC=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 TC=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 Bn=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 Pv=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 AC=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 DC=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 up=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 IC=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 Bs=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 LC=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 OC=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 _C=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 MC=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 Fn=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 ox=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 Rv=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 $C=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 Tv=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 FC=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 Eo=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 Us=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 zC=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 Av=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Dv(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=Dv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function BC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dv(e))&&(o&&(o+=" "),o+=t);return o}const dp="-",UC=e=>{const t=WC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(dp);return d[0]===""&&d.length!==1&&d.shift(),Iv(d,t)||HC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},Iv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?Iv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(dp);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},sx=/^\[(.+)\]$/,HC=e=>{if(sx.test(e)){const t=sx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},WC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return qC(Object.entries(e.classGroups),n).forEach(([l,c])=>{Ef(c,o,l,t)}),o},Ef=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:ix(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(VC(i)){Ef(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{Ef(c,ix(t,l),n,o)})})},ix=(e,t)=>{let n=e;return t.split(dp).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},VC=e=>e.isThemeGetter,qC=(e,t)=>t?e.map(([n,o])=>{const i=o.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,GC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=o.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},Lv="!",KC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],l=t.length,c=d=>{const p=[];let h=0,m=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(h===0){if(S===i&&(o||d.slice(j,j+l)===t)){p.push(d.slice(m,j)),m=j+l;continue}if(S==="/"){x=j;continue}}S==="["?h++:S==="]"&&h--}const v=p.length===0?d:d.substring(m),b=v.startsWith(Lv),N=b?v.substring(1):v,k=x&&x>m?x-m:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},YC=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},XC=e=>({cache:GC(e.cacheSize),parseClassName:KC(e),...UC(e)}),QC=/\s+/,JC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(QC);let d="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{modifiers:m,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let N=!!b,k=o(N?v.substring(0,b):v);if(!k){if(!N){d=h+(d.length>0?" "+d:d);continue}if(k=o(v),!k){d=h+(d.length>0?" "+d:d);continue}N=!1}const j=YC(m).join(":"),S=x?j+Lv:j,P=S+k;if(l.includes(P))continue;l.push(P);const T=i(k,N);for(let L=0;L<T.length;++L){const O=T[L];l.push(S+O)}d=h+(d.length>0?" "+d:d)}return d};function ZC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ov(t))&&(o&&(o+=" "),o+=n);return o}const Ov=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Ov(e[o]))&&(n&&(n+=" "),n+=t);return n};function eN(e,...t){let n,o,i,l=c;function c(p){const h=t.reduce((m,x)=>x(m),e());return n=XC(h),o=n.cache.get,i=n.cache.set,l=d,d(p)}function d(p){const h=o(p);if(h)return h;const m=JC(p,n);return i(p,m),m}return function(){return l(ZC.apply(null,arguments))}}const it=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_v=/^\[(?:([a-z-]+):)?(.+)\]$/i,tN=/^\d+\/\d+$/,nN=new Set(["px","full","screen"]),rN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oN=/\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$/,sN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>Ns(e)||nN.has(e)||tN.test(e),mo=e=>Hs(e,"length",mN),Ns=e=>!!e&&!Number.isNaN(Number(e)),Md=e=>Hs(e,"number",Ns),Oi=e=>!!e&&Number.isInteger(Number(e)),lN=e=>e.endsWith("%")&&Ns(e.slice(0,-1)),_e=e=>_v.test(e),go=e=>rN.test(e),cN=new Set(["length","size","percentage"]),uN=e=>Hs(e,cN,Mv),dN=e=>Hs(e,"position",Mv),fN=new Set(["image","url"]),pN=e=>Hs(e,fN,xN),hN=e=>Hs(e,"",gN),_i=()=>!0,Hs=(e,t,n)=>{const o=_v.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},mN=e=>oN.test(e)&&!sN.test(e),Mv=()=>!1,gN=e=>iN.test(e),xN=e=>aN.test(e),yN=()=>{const e=it("colors"),t=it("spacing"),n=it("blur"),o=it("brightness"),i=it("borderColor"),l=it("borderRadius"),c=it("borderSpacing"),d=it("borderWidth"),p=it("contrast"),h=it("grayscale"),m=it("hueRotate"),x=it("invert"),v=it("gap"),b=it("gradientColorStops"),N=it("gradientColorStopPositions"),k=it("inset"),j=it("margin"),S=it("opacity"),P=it("padding"),T=it("saturate"),L=it("scale"),O=it("sepia"),R=it("skew"),$=it("space"),A=it("translate"),q=()=>["auto","contain","none"],J=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",_e,t],G=()=>[_e,t],Y=()=>["",Br,mo],Q=()=>["auto",Ns,_e],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",_e],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Ns,_e];return{cacheSize:500,separator:":",theme:{colors:[_i],spacing:[Br,mo],blur:["none","",go,_e],brightness:B(),borderColor:[e],borderRadius:["none","","full",go,_e],borderSpacing:G(),borderWidth:Y(),contrast:B(),grayscale:K(),hueRotate:B(),invert:K(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[lN,mo],inset:z(),margin:z(),opacity:B(),padding:G(),saturate:B(),scale:B(),sepia:K(),skew:B(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[go]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],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",Oi,_e]}],basis:[{basis:z()}],"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:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Oi,_e]}],"grid-cols":[{"grid-cols":[_i]}],"col-start-end":[{col:["auto",{span:["full",Oi,_e]},_e]}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":[_i]}],"row-start-end":[{row:["auto",{span:[Oi,_e]},_e]}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"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",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],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",Md]}],"font-family":[{font:[_i]}],"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",Ns,Md]}],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:G()}],"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:[..._(),dN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pN]}],"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:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"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,hN]}],"shadow-color":[{shadow:[_i]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",go,_e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[T]}],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":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"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:B()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:B()}],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:[Oi,_e]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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,Md]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},vN=eN(yN);function $e(...e){return vN(BC(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 bN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function wN(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 kN(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 $v(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function jN(e){let t=$v(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 Fv(e,t){return jN(e)===t}function SN(e){let n=$v(e).split("/").filter(Boolean);const o=[];let i="Overview",l=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:l}:(n[0]==="projects"?(o.push({label:"Projects",path:`${c}/projects`}),i="Projects",n[1]&&(l=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:l})}function ax({items:e,onNavigate:t}){const n=fn();return a.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,l=Fv(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return a.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",l?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[a.jsx(i,{className:"h-4 w-4"}),a.jsx("span",{children:o.label})]},o.to)})})}const Pf="syntaur-theme",zv=g.createContext(null);function Rf(){try{const e=window.localStorage.getItem(Pf);return e==="light"||e==="dark"?e:null}catch{return null}}function Bv(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Uv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function CN(){if(typeof document>"u")return;const e=Rf();Uv(e??Bv())}function NN({children:e}){const[t,n]=g.useState(()=>Rf()),[o,i]=g.useState(()=>Rf()??Bv());g.useEffect(()=>{Uv(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 l={resolvedTheme:o,explicitTheme:t,setTheme:c=>{window.localStorage.setItem(Pf,c),n(c),i(c)},toggleTheme:()=>{const c=o==="dark"?"light":"dark";window.localStorage.setItem(Pf,c),n(c),i(c)}};return a.jsx(zv.Provider,{value:l,children:e})}function Hv(){const e=g.useContext(zv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const zl=new Set;let Sn=null,Es=null;function EN(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Wv(){Sn&&(Sn.readyState===WebSocket.OPEN||Sn.readyState===WebSocket.CONNECTING)||(Sn=new WebSocket(EN()),Sn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of zl)n(t)}catch{}},Sn.onclose=()=>{Sn=null,Es&&clearTimeout(Es),Es=setTimeout(Wv,2e3)},Sn.onerror=()=>{Sn==null||Sn.close()})}function gc(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return zl.add(n),Wv(),()=>{zl.delete(n),zl.size===0&&Sn&&(Es&&clearTimeout(Es),Es=null,Sn.close(),Sn=null)}},[])}function pn(e,t){const[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(null),[p,h]=g.useState(0),m=g.useCallback(()=>{h(x=>x+1)},[]);return g.useEffect(()=>{if(!e){l(!1),o(null);return}let x=!1;return l(!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),l(!1))}).catch(v=>{x||(d(v.message),l(!1))}),()=>{x=!0}},[e,p]),gc(x=>{t&&((x.type==="project-updated"||x.type==="assignment-updated")&&m(),x.type==="servers-updated"&&t==="servers"&&m(),x.type==="agent-sessions-updated"&&t==="agent-sessions"&&m(),x.type==="playbooks-updated"&&t==="playbooks"&&m())}),{data:n,loading:i,error:c,refetch:m}}function xc(){return pn("/api/projects","projects")}function fp(){return pn("/api/workspaces","projects")}function Pt(){const{workspace:e}=St();return e?`/w/${e}`:""}function PN(){return pn("/api/overview","overview")}function Vv(){return pn("/api/assignments","assignments")}function RN(){return pn("/api/attention","attention")}function qv(){return pn("/api/help")}function Gv(e){const t=e?`/api/projects/${e}`:null;return pn(t,"project")}function TN(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return pn(n,"assignment")}function AN(e){const t=e?`/api/assignments/${e}`:null;return pn(t,"assignment")}function Kv(e){return pn(e)}function pp(){return pn("/api/servers","servers")}function DN(){return pn("/api/agent-sessions","agent-sessions")}function IN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return pn(n,"agent-sessions")}function Yv(){return pn("/api/playbooks","playbooks")}function LN(e){const t=e?`/api/playbooks/${e}`:null;return pn(t,"playbooks")}function Cs(){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 ON(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 $d(e,t){const n=ON(t);if(e.key.toLowerCase()!==n.key)return!1;const i=Cs()?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 Ps(e){return e.split("+").map(n=>{const o=n.toLowerCase();return o==="mod"?Cs()?"⌘":"Ctrl":o==="shift"?Cs()?"⇧":"Shift":o==="alt"?Cs()?"⌥":"Alt":o==="ctrl"?Cs()?"⌃":"Ctrl":o==="enter"?"↵":o==="escape"?"Esc":o==="arrowup"?"↑":o==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(Cs()?"":"+")}function _N(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,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]),gc(p=>{p.type==="todos-updated"&&!p.projectSlug&&d()}),{data:t,loading:o,error:l,refetch:d}}function hp(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,l]=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()),l(null)}catch(d){l(d instanceof Error?d.message:"Failed to fetch todos")}finally{o(!1)}},[]);return g.useEffect(()=>{c()},[c]),gc(d=>{d.type==="todos-updated"&&!d.projectSlug&&c()}),{data:e,loading:n,error:i,refetch:c}}async function Xv(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 Qv(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 Jv(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 Zv(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 e0(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function MN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function t0(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const $N=new Set(["/projects","/assignments","/servers","/todos"]);function Bl(e,t){return $N.has(e)?`${t}${e}`:e}const FN=[{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 zN(e){const t=[];for(const n of FN)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:Bl(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}`}),t.push({type:"todo",id:`project-todos-${n.slug}`,title:`${n.title} todos`,subtitle:`${n.slug} · project`,keywords:[...n.tags??[],"project","todos"],route:`${o}/projects/${n.slug}?tab=todos`})}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:`${Bl("/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=Bl("/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 ut(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 lx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yc(...e){return t=>{let n=!1;const o=e.map(i=>{const l=lx(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():lx(e[i],null)}}}}function an(...e){return g.useCallback(yc(...e),e)}function BN(e,t){const n=g.createContext(t),o=l=>{const{children:c,...d}=l,p=g.useMemo(()=>d,Object.values(d));return a.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(l){const c=g.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,i]}function Ko(e,t=[]){let n=[];function o(l,c){const d=g.createContext(c),p=n.length;n=[...n,c];const h=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 a.jsx(k.Provider,{value:j,children:b})};h.displayName=l+"Provider";function m(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 \`${l}\``)}return[h,m]}const i=()=>{const l=n.map(c=>g.createContext(c));return function(d){const p=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,UN(i,...t)]}function UN(...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(l){const c=o.reduce((d,{useScope:p,scopeName:h})=>{const x=p(l)[`__scope${h}`];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:()=>{},HN=Zy[" useId ".trim().toString()]||(()=>{}),WN=0;function Rs(e){const[t,n]=g.useState(HN());return jo(()=>{n(o=>o??String(WN++))},[e]),t?`radix-${t}`:""}var VN=Zy[" useInsertionEffect ".trim().toString()]||jo;function vc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=qN({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const m=g.useRef(e!==void 0);g.useEffect(()=>{const x=m.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.`),m.current=d},[d,o])}const h=g.useCallback(m=>{var x;if(d){const v=GN(m)?m(e):m;v!==e&&((x=c.current)==null||x.call(c,v))}else l(m)},[d,e,l,c]);return[p,h]}function qN({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),l=g.useRef(t);return VN(()=>{l.current=t},[t]),g.useEffect(()=>{var c;i.current!==n&&((c=l.current)==null||c.call(l,n),i.current=n)},[n,i]),[n,o,l]}function GN(e){return typeof e=="function"}function KN(e){const t=YN(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(QN);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function YN(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=ZN(i),d=JN(l,i.props);return i.type!==g.Fragment&&(d.ref=o?yc(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 XN=Symbol("radix.slottable");function QN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XN}function JN(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function ZN(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 e2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=e2.reduce((e,t)=>{const n=KN(`Primitive.${t}`),o=g.forwardRef((i,l)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(p,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function t2(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function Vo(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 n2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(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 r2="DismissableLayer",Tf="dismissableLayer.update",o2="dismissableLayer.pointerDownOutside",s2="dismissableLayer.focusOutside",cx,n0=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mp=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...p}=e,h=g.useContext(n0),[m,x]=g.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=an(t,$=>x($)),k=Array.from(h.layers),[j]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),P=m?k.indexOf(m):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,L=P>=S,O=l2($=>{const A=$.target,q=[...h.branches].some(J=>J.contains(A));!L||q||(i==null||i($),c==null||c($),$.defaultPrevented||d==null||d())},v),R=c2($=>{const A=$.target;[...h.branches].some(J=>J.contains(A))||(l==null||l($),c==null||c($),$.defaultPrevented||d==null||d())},v);return n2($=>{P===h.layers.size-1&&(o==null||o($),!$.defaultPrevented&&d&&($.preventDefault(),d()))},v),g.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(cx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),ux(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=cx)}},[m,v,n,h]),g.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),ux())},[m,h]),g.useEffect(()=>{const $=()=>b({});return document.addEventListener(Tf,$),()=>document.removeEventListener(Tf,$)},[]),a.jsx(Rt.div,{...p,ref:N,style:{pointerEvents:T?L?"auto":"none":void 0,...e.style},onFocusCapture:ut(e.onFocusCapture,R.onFocusCapture),onBlurCapture:ut(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ut(e.onPointerDownCapture,O.onPointerDownCapture)})});mp.displayName=r2;var i2="DismissableLayerBranch",a2=g.forwardRef((e,t)=>{const n=g.useContext(n0),o=g.useRef(null),i=an(t,o);return g.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),a.jsx(Rt.div,{...e,ref:i})});a2.displayName=i2;function l2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(e),o=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let p=function(){r0(o2,n,h,{discrete:!0})};const h={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",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function c2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(e),o=g.useRef(!1);return g.useEffect(()=>{const i=l=>{l.target&&!o.current&&r0(s2,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ux(){const e=new CustomEvent(Tf);document.dispatchEvent(e)}function r0(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?t2(i,l):i.dispatchEvent(l)}var Fd="focusScope.autoFocusOnMount",zd="focusScope.autoFocusOnUnmount",dx={bubbles:!1,cancelable:!0},u2="FocusScope",o0=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,p]=g.useState(null),h=Vo(i),m=Vo(l),x=g.useRef(null),v=an(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(T){if(b.paused||!d)return;const L=T.target;d.contains(L)?x.current=L:vo(x.current,{select:!0})},j=function(T){if(b.paused||!d)return;const L=T.relatedTarget;L!==null&&(d.contains(L)||vo(x.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&vo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const P=new MutationObserver(S);return d&&P.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),P.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){px.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Fd,dx);d.addEventListener(Fd,h),d.dispatchEvent(S),S.defaultPrevented||(d2(g2(s0(d)),{select:!0}),document.activeElement===k&&vo(d))}return()=>{d.removeEventListener(Fd,h),setTimeout(()=>{const S=new CustomEvent(zd,dx);d.addEventListener(zd,m),d.dispatchEvent(S),S.defaultPrevented||vo(k??document.body,{select:!0}),d.removeEventListener(zd,m),px.remove(b)},0)}}},[d,h,m,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 P=k.currentTarget,[T,L]=f2(P);T&&L?!k.shiftKey&&S===L?(k.preventDefault(),n&&vo(T,{select:!0})):k.shiftKey&&S===T&&(k.preventDefault(),n&&vo(L,{select:!0})):S===P&&k.preventDefault()}},[n,o,b.paused]);return a.jsx(Rt.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});o0.displayName=u2;function d2(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(vo(o,{select:t}),document.activeElement!==n)return}function f2(e){const t=s0(e),n=fx(t,e),o=fx(t.reverse(),e);return[n,o]}function s0(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 fx(e,t){for(const n of e)if(!p2(n,{upTo:t}))return n}function p2(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 h2(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&&h2(e)&&t&&e.select()}}var px=m2();function m2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hx(e,t),e.unshift(t)},remove(t){var n;e=hx(e,t),(n=e[0])==null||n.resume()}}}function hx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function g2(e){return e.filter(t=>t.tagName!=="A")}var x2="Portal",gp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,l]=g.useState(!1);jo(()=>l(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?rC.createPortal(a.jsx(Rt.div,{...o,ref:t}),c):null});gp.displayName=x2;function y2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var Yo=e=>{const{present:t,children:n}=e,o=v2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),l=an(o.ref,b2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:l}):null};Yo.displayName="Presence";function v2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),l=g.useRef("none"),c=e?"mounted":"unmounted",[d,p]=y2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=Nl(o.current);l.current=d==="mounted"?h:"none"},[d]),jo(()=>{const h=o.current,m=i.current;if(m!==e){const v=l.current,b=Nl(h);e?p("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),jo(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,x=b=>{const k=Nl(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",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=b=>{b.target===t&&(l.current=Nl(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{m.clearTimeout(h),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(h=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function Nl(e){return(e==null?void 0:e.animationName)||"none"}function b2(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 Bd=0;function w2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mx()),document.body.insertAdjacentElement("beforeend",e[1]??mx()),Bd++,()=>{Bd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bd--}},[])}function mx(){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 wr=function(){return wr=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},wr.apply(this,arguments)};function i0(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 k2(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var Ul="right-scroll-bar-position",Hl="width-before-scroll-bar",j2="with-scroll-bars-hidden",S2="--removed-body-scroll-bar-size";function Ud(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function C2(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 N2=typeof window<"u"?g.useLayoutEffect:g.useEffect,gx=new WeakMap;function E2(e,t){var n=C2(null,function(o){return e.forEach(function(i){return Ud(i,o)})});return N2(function(){var o=gx.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||Ud(d,null)}),l.forEach(function(d){i.has(d)||Ud(d,c)})}gx.set(n,e)},[e]),n}function P2(e){return e}function R2(e,t){t===void 0&&(t=P2);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(l){var c=t(l,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var p=function(){var m=c;c=[],m.forEach(l)},h=function(){return Promise.resolve().then(p)};h(),n={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),n}}}};return i}function T2(e){e===void 0&&(e={});var t=R2(null);return t.options=wr({async:!0,ssr:!1},e),t}var a0=function(e){var t=e.sideCar,n=i0(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,wr({},n))};a0.isSideCarExport=!0;function A2(e,t){return e.useMedium(t),a0}var l0=T2(),Hd=function(){},bc=g.forwardRef(function(e,t){var n=g.useRef(null),o=g.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),i=o[0],l=o[1],c=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,x=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,P=S===void 0?"div":S,T=e.gapMode,L=i0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,R=E2([n,t]),$=wr(wr({},L),i);return g.createElement(g.Fragment,null,m&&g.createElement(O,{sideCar:l0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:l,allowPinchZoom:!!j,lockRef:n,gapMode:T}),c?g.cloneElement(g.Children.only(d),wr(wr({},$),{ref:R})):g.createElement(P,wr({},$,{className:p,ref:R}),d))});bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bc.classNames={fullWidth:Hl,zeroRight:Ul};var D2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function I2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=D2();return t&&e.setAttribute("nonce",t),e}function L2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function O2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=I2())&&(L2(t,n),O2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},M2=function(){var e=_2();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},c0=function(){var e=M2(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},$2={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||"",10)||0},F2=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[Wd(n),Wd(o),Wd(i)]},z2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $2;var t=F2(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])}},B2=c0(),Ts="data-scroll-locked",U2=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
397
|
+
.`.concat(j2,` {
|
|
398
|
+
overflow: hidden `).concat(o,`;
|
|
399
|
+
padding-right: `).concat(d,"px ").concat(o,`;
|
|
400
|
+
}
|
|
401
|
+
body[`).concat(Ts,`] {
|
|
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(l,`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(Ul,` {
|
|
415
|
+
right: `).concat(d,"px ").concat(o,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.`).concat(Hl,` {
|
|
419
|
+
margin-right: `).concat(d,"px ").concat(o,`;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.`).concat(Ul," .").concat(Ul,` {
|
|
423
|
+
right: 0 `).concat(o,`;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.`).concat(Hl," .").concat(Hl,` {
|
|
427
|
+
margin-right: 0 `).concat(o,`;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
body[`).concat(Ts,`] {
|
|
431
|
+
`).concat(S2,": ").concat(d,`px;
|
|
432
|
+
}
|
|
433
|
+
`)},xx=function(){var e=parseInt(document.body.getAttribute(Ts)||"0",10);return isFinite(e)?e:0},H2=function(){g.useEffect(function(){return document.body.setAttribute(Ts,(xx()+1).toString()),function(){var e=xx()-1;e<=0?document.body.removeAttribute(Ts):document.body.setAttribute(Ts,e.toString())}},[])},W2=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;H2();var l=g.useMemo(function(){return z2(i)},[i]);return g.createElement(B2,{styles:U2(l,!t,i,n?"":"!important")})},Af=!1;if(typeof window<"u")try{var El=Object.defineProperty({},"passive",{get:function(){return Af=!0,!0}});window.addEventListener("test",El,El),window.removeEventListener("test",El,El)}catch{Af=!1}var bs=Af?{passive:!1}:!1,V2=function(e){return e.tagName==="TEXTAREA"},u0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!V2(e)&&n[t]==="visible")},q2=function(e){return u0(e,"overflowY")},G2=function(e){return u0(e,"overflowX")},yx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=d0(e,o);if(i){var l=f0(e,o),c=l[1],d=l[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},K2=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Y2=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},d0=function(e,t){return e==="v"?q2(t):G2(t)},f0=function(e,t){return e==="v"?K2(t):Y2(t)},X2=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q2=function(e,t,n,o,i){var l=X2(e,window.getComputedStyle(t).direction),c=l*o,d=n.target,p=t.contains(d),h=!1,m=c>0,x=0,v=0;do{if(!d)break;var b=f0(e,d),N=b[0],k=b[1],j=b[2],S=k-j-l*N;(N||S)&&d0(e,d)&&(x+=S,v+=N);var P=d.parentNode;d=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(m&&Math.abs(x)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Pl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vx=function(e){return[e.deltaX,e.deltaY]},bx=function(e){return e&&"current"in e?e.current:e},J2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Z2=function(e){return`
|
|
434
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
435
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
436
|
+
`)},eE=0,ws=[];function tE(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(eE++)[0],l=g.useState(c0)[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=k2([e.lockRef.current],(e.shards||[]).map(bx),!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=Pl(k),P=n.current,T="deltaX"in k?k.deltaX:P[0]-S[0],L="deltaY"in k?k.deltaY:P[1]-S[1],O,R=k.target,$=Math.abs(T)>Math.abs(L)?"h":"v";if("touches"in k&&$==="h"&&R.type==="range")return!1;var A=window.getSelection(),q=A&&A.anchorNode,J=q?q===R||q.contains(R):!1;if(J)return!1;var z=yx($,R);if(!z)return!0;if(z?O=$:(O=$==="v"?"h":"v",z=yx($,R)),!z)return!1;if(!o.current&&"changedTouches"in k&&(T||L)&&(o.current=O),!O)return!0;var G=o.current||O;return Q2(G,j,k,G==="h"?T:L)},[]),p=g.useCallback(function(k){var j=k;if(!(!ws.length||ws[ws.length-1]!==l)){var S="deltaY"in j?vx(j):Pl(j),P=t.current.filter(function(O){return O.name===j.type&&(O.target===j.target||j.target===O.shadowParent)&&J2(O.delta,S)})[0];if(P&&P.should){j.cancelable&&j.preventDefault();return}if(!P){var T=(c.current.shards||[]).map(bx).filter(Boolean).filter(function(O){return O.contains(j.target)}),L=T.length>0?d(j,T[0]):!c.current.noIsolation;L&&j.cancelable&&j.preventDefault()}}},[]),h=g.useCallback(function(k,j,S,P){var T={name:k,delta:j,target:S,should:P,shadowParent:nE(S)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(L){return L!==T})},1)},[]),m=g.useCallback(function(k){n.current=Pl(k),o.current=void 0},[]),x=g.useCallback(function(k){h(k.type,vx(k),k.target,d(k,e.lockRef.current))},[]),v=g.useCallback(function(k){h(k.type,Pl(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return ws.push(l),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",p,bs),document.addEventListener("touchmove",p,bs),document.addEventListener("touchstart",m,bs),function(){ws=ws.filter(function(k){return k!==l}),document.removeEventListener("wheel",p,bs),document.removeEventListener("touchmove",p,bs),document.removeEventListener("touchstart",m,bs)}},[]);var b=e.removeScrollBar,N=e.inert;return g.createElement(g.Fragment,null,N?g.createElement(l,{styles:Z2(i)}):null,b?g.createElement(W2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rE=A2(l0,tE);var p0=g.forwardRef(function(e,t){return g.createElement(bc,wr({},e,{ref:t,sideCar:rE}))});p0.classNames=bc.classNames;var oE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ks=new WeakMap,Rl=new WeakMap,Tl={},Vd=0,h0=function(e){return e&&(e.host||h0(e.parentNode))},sE=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=h0(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})},iE=function(e,t,n,o){var i=sE(t,Array.isArray(e)?e:[e]);Tl[n]||(Tl[n]=new WeakMap);var l=Tl[n],c=[],d=new Set,p=new Set(i),h=function(x){!x||d.has(x)||(d.add(x),h(x.parentNode))};i.forEach(h);var m=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(v){if(d.has(v))m(v);else try{var b=v.getAttribute(o),N=b!==null&&b!=="false",k=(ks.get(v)||0)+1,j=(l.get(v)||0)+1;ks.set(v,k),l.set(v,j),c.push(v),k===1&&N&&Rl.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 m(t),d.clear(),Vd++,function(){c.forEach(function(x){var v=ks.get(x)-1,b=l.get(x)-1;ks.set(x,v),l.set(x,b),v||(Rl.has(x)||x.removeAttribute(o),Rl.delete(x)),b||x.removeAttribute(n)}),Vd--,Vd||(ks=new WeakMap,ks=new WeakMap,Rl=new WeakMap,Tl={})}},aE=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=oE(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),iE(o,i,n,"aria-hidden")):function(){return null}};function lE(e){const t=cE(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(dE);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function cE(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=pE(i),d=fE(l,i.props);return i.type!==g.Fragment&&(d.ref=o?yc(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 uE=Symbol("radix.slottable");function dE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uE}function fE(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function pE(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 wc="Dialog",[m0,g0]=Ko(wc),[hE,pr]=m0(wc),x0=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=g.useRef(null),p=g.useRef(null),[h,m]=vc({prop:o,defaultProp:i??!1,onChange:l,caller:wc});return a.jsx(hE,{scope:t,triggerRef:d,contentRef:p,contentId:Rs(),titleId:Rs(),descriptionId:Rs(),open:h,onOpenChange:m,onOpenToggle:g.useCallback(()=>m(x=>!x),[m]),modal:c,children:n})};x0.displayName=wc;var y0="DialogTrigger",v0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(y0,n),l=an(t,i.triggerRef);return a.jsx(Rt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vp(i.open),...o,ref:l,onClick:ut(e.onClick,i.onOpenToggle)})});v0.displayName=y0;var xp="DialogPortal",[mE,b0]=m0(xp,{forceMount:void 0}),w0=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=pr(xp,t);return a.jsx(mE,{scope:t,forceMount:n,children:g.Children.map(o,c=>a.jsx(Yo,{present:n||l.open,children:a.jsx(gp,{asChild:!0,container:i,children:c})}))})};w0.displayName=xp;var Xl="DialogOverlay",k0=g.forwardRef((e,t)=>{const n=b0(Xl,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=pr(Xl,e.__scopeDialog);return l.modal?a.jsx(Yo,{present:o||l.open,children:a.jsx(xE,{...i,ref:t})}):null});k0.displayName=Xl;var gE=lE("DialogOverlay.RemoveScroll"),xE=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(Xl,n);return a.jsx(p0,{as:gE,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(Rt.div,{"data-state":vp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),qo="DialogContent",j0=g.forwardRef((e,t)=>{const n=b0(qo,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=pr(qo,e.__scopeDialog);return a.jsx(Yo,{present:o||l.open,children:l.modal?a.jsx(yE,{...i,ref:t}):a.jsx(vE,{...i,ref:t})})});j0.displayName=qo;var yE=g.forwardRef((e,t)=>{const n=pr(qo,e.__scopeDialog),o=g.useRef(null),i=an(t,n.contentRef,o);return g.useEffect(()=>{const l=o.current;if(l)return aE(l)},[]),a.jsx(S0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ut(e.onCloseAutoFocus,l=>{var c;l.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:ut(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:ut(e.onFocusOutside,l=>l.preventDefault())})}),vE=g.forwardRef((e,t)=>{const n=pr(qo,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return a.jsx(S0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,l),l.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),l.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:l=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),S0=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=pr(qo,n),p=g.useRef(null),h=an(t,p);return w2(),a.jsxs(a.Fragment,{children:[a.jsx(o0,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:l,children:a.jsx(mp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":vp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(wE,{titleId:d.titleId}),a.jsx(jE,{contentRef:p,descriptionId:d.descriptionId})]})]})}),yp="DialogTitle",C0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(yp,n);return a.jsx(Rt.h2,{id:i.titleId,...o,ref:t})});C0.displayName=yp;var N0="DialogDescription",E0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(N0,n);return a.jsx(Rt.p,{id:i.descriptionId,...o,ref:t})});E0.displayName=N0;var P0="DialogClose",R0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(P0,n);return a.jsx(Rt.button,{type:"button",...o,ref:t,onClick:ut(e.onClick,()=>i.onOpenChange(!1))})});R0.displayName=P0;function vp(e){return e?"open":"closed"}var T0="DialogTitleWarning",[bE,A0]=BN(T0,{contentName:qo,titleName:yp,docsSlug:"dialog"}),wE=({titleId:e})=>{const t=A0(T0),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},kE="DialogDescriptionWarning",jE=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${A0(kE).contentName}}.`;return g.useEffect(()=>{var l;const i=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},D0=x0,SE=v0,I0=w0,bp=k0,wp=j0,kp=C0,jp=E0,L0=R0;const Sp=D0,CE=I0,O0=g.forwardRef(({className:e,...t},n)=>a.jsx(bp,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));O0.displayName=bp.displayName;const kc=g.forwardRef(({className:e,children:t,...n},o)=>a.jsxs(CE,{children:[a.jsx(O0,{}),a.jsx(wp,{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})]}));kc.displayName=wp.displayName;function NE({className:e,...t}){return a.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function EE({className:e,...t}){return a.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const jc=g.forwardRef(({className:e,...t},n)=>a.jsx(kp,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));jc.displayName=kp.displayName;const Cp=g.forwardRef(({className:e,...t},n)=>a.jsx(jp,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));Cp.displayName=jp.displayName;const PE=-1,RE=-40;function qd(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,o=0,i=-2,l=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 h=t[o-1];(h===" "||h==="-"||h==="_"||h==="/")&&(n+=15)}l>0&&(n+=Math.max(RE,l*PE)),i=o,l=0,o++,p=!0;break}else l++,o++;if(!p)return-1/0}return n}const wx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function TE(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(c=>({...c,score:0}));const l=t.map(c=>{var x;const d=qd(o,c.title.toLowerCase())*1,p=c.subtitle?qd(o,c.subtitle.toLowerCase())*.5:-1/0,h=(x=c.keywords)!=null&&x.length?qd(o,c.keywords.join(" ").toLowerCase())*.3:-1/0,m=Math.max(d,p,h);return{...c,score:m}}).filter(c=>c.score>-1/0);return l.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:(wx[c.type]??99)-(wx[d.type]??99)),l.slice(0,n)}const AE={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function DE({entries:e}){const{paletteOpen:t,closePalette:n}=Ws(),o=Wt(),[i,l]=g.useState(""),[c,d]=g.useState(0),p=g.useRef(null),h=g.useMemo(()=>TE(i,e,50),[i,e]);g.useEffect(()=>{d(0)},[i,t]),g.useEffect(()=>{t||l("")},[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 m(v){o(v.route),n()}function x(v){if(v.key==="ArrowDown")v.preventDefault(),d(b=>Math.min(h.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=h[c];b&&m(b)}}return a.jsx(Sp,{open:t,onOpenChange:v=>v?null:n(),children:a.jsxs(kc,{className:"max-w-xl p-0 gap-0",children:[a.jsx(jc,{className:"sr-only",children:"Command palette"}),a.jsx("input",{autoFocus:!0,type:"text",value:i,onChange:v=>l(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"}),a.jsx("div",{ref:p,className:"max-h-[60vh] overflow-y-auto p-1",children:h.length===0?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i?"No matches":"Start typing to search"}):h.map((v,b)=>{const N=b===c;return a.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>m(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:[a.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:AE[v.type]??v.type}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.title}),v.subtitle?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:v.subtitle}):null]},v.id)})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),a.jsxs("span",{children:[h.length," result",h.length===1?"":"s"]})]})]})})}const IE={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},LE=["global","list:projects","list:assignments","list:todos","project","assignment"];function OE(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Ps(t)} then ${Ps(n)}`}return Ps(e)}function _E(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n}=Ws(),o=g.useMemo(()=>{if(!e)return new Map;const i=n(),l=new Map;for(const c of i){const d=l.get(c.scope)??[];d.push({keys:c.keys,description:c.description}),l.set(c.scope,d)}return l},[e,n]);return a.jsx(Sp,{open:e,onOpenChange:i=>i?null:t(),children:a.jsxs(kc,{className:"max-w-2xl",children:[a.jsx(jc,{children:"Keyboard shortcuts"}),a.jsxs(Cp,{children:["Press Esc to close. ",Ps("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),a.jsx("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:LE.map(i=>{const l=o.get(i);return!l||l.length===0?null:a.jsxs("section",{children:[a.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:IE[i]}),a.jsx("ul",{className:"space-y-1",children:l.map((c,d)=>a.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:[a.jsx("span",{className:"text-foreground",children:c.description}),a.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:OE(c.keys)})]},`${i}-${c.keys}-${d}`))})]},i)})})]})})}const kx=1500;function ME(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const _0=g.createContext(null);function $E({children:e}){const{toggleTheme:t}=Hv(),n=fn(),o=Wt(),i=ME(n.pathname),l=xc(),c=Vv(),d=Yv(),p=pp(),h=hp(),m=g.useMemo(()=>{var E,B,Z,I;const Q=l.data??[],_=((E=c.data)==null?void 0:E.assignments)??[],D=((B=d.data)==null?void 0:B.playbooks)??[],F=((Z=p.data)==null?void 0:Z.sessions)??[],K=(((I=h.data)==null?void 0:I.workspaces)??[]).flatMap(de=>de.items.map(ve=>({...ve,workspace:de.workspace})));return zN({projects:Q,assignments:_,playbooks:D,servers:F,todos:K,wsPrefix:i})},[l.data,c.data,d.data,p.data,h.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),[P,T]=g.useState(!1),L=g.useCallback(Q=>{const _=k.current++;return x.current.set(_,{...Q,id:_}),_},[]),O=g.useCallback(Q=>{x.current.delete(Q)},[]),R=g.useCallback(Q=>{v.current.push(Q)},[]),$=g.useCallback(Q=>{const _=v.current;for(let D=_.length-1;D>=0;D--)if(_[D]===Q){_.splice(D,1);return}},[]),A=g.useCallback(()=>S(!0),[]),q=g.useCallback(()=>S(!1),[]),J=g.useCallback(()=>T(!0),[]),z=g.useCallback(()=>T(!1),[]),G=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 Q(K){if(!(K instanceof HTMLElement))return!1;const E=K.tagName;return!!(E==="INPUT"||E==="TEXTAREA"||E==="SELECT"||K.isContentEditable||K.closest('[role="combobox"], [role="textbox"]'))}function _(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function D(){const K=v.current;return K[K.length-1]??"global"}function F(K){return K.scope==="global"?!0:K.scope===D()}function U(K){const E=$d(K,"Mod+k"),B=K.key==="Escape";if(_()&&!E&&!B||Q(K.target)&&!E&&!B)return;const Z=b.current;if(Z.phase==="awaiting-second")if(Date.now()-Z.startedAt>kx)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(!F(fe))continue;const Ee=fe.keys.split(" ");if(!(Ee.length!==2||Ee[0]!=="g")&&$d(K,Ee[1])&&!(fe.when&&!fe.when())){K.preventDefault(),b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null),fe.handler(K);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(!F(de))continue;const ve=de.keys.split(" ");if(ve.length===1&&$d(K,ve[0])&&!(de.when&&!de.when())){K.preventDefault(),de.handler(K);return}}K.key==="g"&&!K.metaKey&&!K.ctrlKey&&!K.altKey&&!K.shiftKey&&Array.from(x.current.values()).some(ve=>F(ve)&&ve.keys.startsWith("g "))&&(K.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},kx))}return window.addEventListener("keydown",U),()=>{window.removeEventListener("keydown",U),N.current!==null&&(window.clearTimeout(N.current),N.current=null)}},[]),g.useEffect(()=>{const Q=L({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>O(Q)},[L,O,t]),g.useEffect(()=>{const Q=L({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>J()});return()=>O(Q)},[L,O,J]),g.useEffect(()=>{const Q=L({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(j){q();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||A()}});return()=>O(Q)},[L,O,A,q,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(Bl(D.basePath,i))}));return()=>_.forEach(O)},[L,O,o,i]);const Y=g.useMemo(()=>({register:L,unregister:O,pushScope:R,popScope:$,openPalette:A,closePalette:q,paletteOpen:j,openCheatsheet:J,closeCheatsheet:z,cheatsheetOpen:P,listBindings:G,wsPrefix:i,paletteEntries:m}),[L,O,R,$,A,q,j,J,z,P,G,i,m]);return a.jsxs(_0.Provider,{value:Y,children:[e,a.jsx(DE,{entries:m}),a.jsx(_E,{})]})}function Ws(){const e=g.useContext(_0);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function ct({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:l=!0}){const{register:c,unregister:d}=Ws(),p=g.useRef(t),h=g.useRef(i);g.useEffect(()=>{p.current=t,h.current=i},[t,i]),g.useEffect(()=>{if(!l)return;const m=c({keys:e,handler:x=>p.current(x),scope:n,description:o,when:h.current?()=>h.current():void 0});return()=>d(m)},[c,d,e,n,o,l])}function Xo(e){const{pushScope:t,popScope:n}=Ws();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function ca(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]),ct({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))}),ct({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),ct({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),ct({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 l=g.useCallback(c=>({"data-hotkey-row-index":c,"data-hotkey-selected":c===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:l}}function FE({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=Pt(),{resolvedTheme:l,toggleTheme:c}=Hv(),{openPalette:d}=Ws();return a.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[a.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:a.jsx(EC,{className:"h-4 w-4"})}),a.jsx("div",{className:"min-w-0 flex-1",children:a.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?a.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,h)=>a.jsxs("span",{className:"flex items-center gap-1.5",children:[h>0?a.jsx("span",{children:"/"}):null,a.jsx(Ce,{to:p.path,className:"hover:text-foreground",children:p.label})]},p.path)),a.jsx("span",{children:"/"})]}):null,a.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[a.jsx(Bs,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:Ps("Mod+k")})]}),a.jsx(Ce,{className:"shell-action",to:"/help",children:"Help"}),a.jsxs(Ce,{className:"shell-action",to:`${i}/create/project`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Project"})]}),n?a.jsxs(Ce,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}):null,a.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[l==="dark"?a.jsx($C,{className:"h-4 w-4"}):a.jsx(PC,{className:"h-4 w-4"}),a.jsx("span",{children:l==="dark"?"Light":"Dark"})]})]})]})})}const zE=[{to:"/",label:"Overview",icon:hC},{to:"/attention",label:"Attention",icon:Us},{to:"/playbooks",label:"Playbooks",icon:wv},{to:"/todos",label:"Todos",icon:Fn}],BE=[{suffix:"/projects",label:"Projects",icon:lp},{suffix:"/assignments",label:"Assignments",icon:NC},{suffix:"/servers",label:"Servers",icon:cp},{suffix:"/agent-sessions",label:"Agent Sessions",icon:pc},{suffix:"/todos",label:"Todos",icon:Fn}],UE=[{to:"/help",label:"Help",icon:SC},{to:"/settings",label:"Settings",icon:_C}],jx="syntaur.dashboard.sourceFirstNoticeDismissed";function HE({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[l,c]=g.useState(!1);ct({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:l,handler:()=>c(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(jx)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(jx,"1")}catch{}}return a.jsx("div",{className:"min-h-screen bg-background",children:a.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[a.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:a.jsx(Sx,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o})}),l?a.jsx("div",{className:"fixed inset-0 z-40 bg-slate-950/40 lg:hidden",children:a.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[a.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[a.jsx(Ce,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),a.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:a.jsx(Av,{className:"h-4 w-4"})})]}),a.jsx(Sx,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,a.jsxs("div",{className:"min-w-0",children:[a.jsx(FE,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),a.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function Sx({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=fp(),l=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=fn(),[p,h]=g.useState(new Set),[m,x]=g.useState(!1),[v,b]=g.useState(""),N=Wt();function k(S){h(P=>{const T=new Set(P);return T.has(S)?T.delete(S):T.add(S),T})}const j=[...l,...c?["_ungrouped"]:[]];return a.jsxs("div",{className:"flex h-full flex-col gap-3",children:[a.jsx("div",{className:"space-y-3",children:a.jsxs(Ce,{to:"/",className:"inline-flex items-center gap-3",onClick:o,children:[a.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"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),a.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first project control"})]})]})}),a.jsx(ax,{items:zE,onNavigate:o}),a.jsx("div",{className:"border-t border-border/40"}),a.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!m&&a.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const P=S==="_ungrouped",T=P?"Ungrouped":Cn(S),L=P?"/w/_ungrouped":`/w/${S}`,O=p.has(S),R=n===S||n===null&&P&&d.pathname.startsWith("/w/_ungrouped");return a.jsxs("div",{children:[a.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 ${R?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[a.jsx(ea,{className:`h-3 w-3 transition-transform ${O?"-rotate-90":""}`}),T]}),!O&&a.jsx("nav",{className:"ml-2 space-y-0.5",children:BE.map($=>{const A=`${L}${$.suffix}`,q=Fv(d.pathname,$.suffix)&&d.pathname.startsWith(L),J=$.icon;return a.jsxs(Ce,{to:A,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${q?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[a.jsx(J,{className:"h-4 w-4"}),a.jsx("span",{children:$.label})]},A)})})]},S)}),m?a.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const P=v.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");P&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:P})}).then(()=>{o==null||o(),N(`/w/${P}/projects`)}))},children:a.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"})}):a.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:[a.jsx(Bn,{className:"h-3 w-3"}),"New Workspace"]})]}),a.jsx("div",{className:"border-t border-border/40"}),a.jsx(ax,{items:UE,onNavigate:o}),e?null:a.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),a.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."})]}),a.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:a.jsx(Av,{className:"h-4 w-4"})})]})})]})}function WE(){const e=fn(),{workspace:t}=St(),{title:n,breadcrumbs:o,projectSlug:i}=SN(e.pathname);return a.jsx(HE,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:a.jsx(bS,{})})}const Ql={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:fC},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:Ev},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:Cf},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:IC},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:ap},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:Cf},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:Nf},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:cC},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:Nf}};function Ht({status:e,className:t,showIcon:n=!0,progress:o}){const i=Ql[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,m=>m.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:Nf},l=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,h=n?c?a.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[a.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),a.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)})]}),a.jsx(l,{className:"h-2.5 w-2.5"})]}):a.jsx(l,{className:"h-3.5 w-3.5"}):null;return a.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:[h,a.jsx("span",{children:i.label})]})}function M0(e){var t;return((t=Ql[e])==null?void 0:t.description)??`Status: ${e}`}const VE={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 Ke({label:e,value:t,description:n,icon:o,tone:i="default",to:l}){const c=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),a.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?a.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:a.jsx(o,{className:"h-5 w-5"})}):null]}),n?a.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=$e("rounded-lg border p-3 shadow-sm",VE[i],l?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return l?a.jsx(Ce,{to:l,className:d,children:c}):a.jsx("article",{className:d,children:c})}function Re({title:e,description:t,children:n,className:o,actions:i}){return a.jsxs("section",{className:$e("surface-panel space-y-3",o),children:[e||i?a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[e?a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?a.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function yt({label:e="Loading dashboard data…"}){return a.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:a.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function dt({title:e="Something went wrong",error:t,action:n}){return a.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:a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-lg font-semibold text-rose-800 dark:text-rose-200",children:e}),a.jsx("p",{className:"text-sm leading-6 text-rose-700 dark:text-rose-300",children:t}),n?a.jsx("div",{className:"pt-2",children:n}):null]})})}function Ye({title:e,description:t,actions:n}){return a.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:a.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[a.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?a.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function Wl({command:e,description:t,example:n}){return a.jsxs("div",{className:"rounded-lg border border-border/70 bg-slate-950 px-3 py-3 text-slate-100 shadow-sm",children:[a.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?a.jsx("p",{className:"mt-2 text-sm text-slate-300",children:t}):null,n?a.jsx("p",{className:"mt-2 font-mono text-xs text-slate-400",children:n}):null]})}function qE({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return a.jsx(Re,{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:a.jsx(Ce,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:a.jsx("div",{className:"space-y-3",children:n.map((o,i)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.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}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?a.jsx(Wl,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function GE(){var c;const{data:e,loading:t,error:n}=PN(),{data:o}=qv(),{data:i}=hp(),l=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?a.jsx(yt,{label:"Loading overview…"}):n||!e?a.jsx(dt,{error:n||"Overview data is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[a.jsx(Ke,{label:"Active Projects",value:e.stats.activeProjects,icon:lp,to:"/projects"}),a.jsx(Ke,{label:"In Progress",value:e.stats.inProgressAssignments,icon:wC,tone:"info",to:"/assignments?status=in_progress"}),a.jsx(Ke,{label:"Blocked",value:e.stats.blockedAssignments,icon:Us,tone:"warn",to:"/assignments?status=blocked"}),a.jsx(Ke,{label:"Review",value:e.stats.reviewAssignments,icon:dC,tone:"info",to:"/assignments?status=review"}),a.jsx(Ke,{label:"Failed",value:e.stats.failedAssignments,icon:RC,tone:"danger",to:"/assignments?status=failed"}),a.jsx(Ke,{label:"Stale",value:e.stats.staleAssignments,icon:pc,to:"/assignments?stale=1"}),a.jsx(Ke,{label:"Open Todos",value:l,icon:Fn,to:"/todos"}),a.jsx(Ke,{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:cp,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx(Re,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?a.jsx(Ye,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):a.jsx("div",{className:"space-y-3",children:e.attention.map(d=>a.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:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.projectTitle})]}),a.jsx(Ht,{status:d.status})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),a.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Cr(d.updated)]})]},d.id))})}),a.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[a.jsx(Re,{title:"Recently Updated Projects",children:e.recentProjects.length===0?a.jsx(Ye,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:a.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):a.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>a.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:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Cr(d.updated)})]}),a.jsx(Ht,{status:d.status})]})},d.slug))})}),a.jsx(Re,{title:"Recent Activity",children:e.recentActivity.length===0?a.jsx(Ye,{title:"No activity yet",description:"Once projects and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):a.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>a.jsxs(Ce,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),a.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:Cn(d.type)})]}),a.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Cr(d.updated)})]},d.id))})})]})]}),e.firstRun&&a.jsx(qE,{help:o})]})]})}function KE(){const{data:e,loading:t,error:n}=RN();return t?a.jsx(yt,{label:"Loading attention queue…"}):n||!e?a.jsx(dt,{error:n||"Attention queue is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[a.jsx(Ke,{label:"Critical",value:e.summary.critical,icon:bC,tone:"danger"}),a.jsx(Ke,{label:"High",value:e.summary.high,icon:Us,tone:"warn"}),a.jsx(Ke,{label:"Medium",value:e.summary.medium,icon:MC,tone:"info"}),a.jsx(Ke,{label:"Low",value:e.summary.low,icon:jC})]}),a.jsx(Re,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?a.jsx(Ye,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):a.jsx("div",{className:"space-y-3",children:e.items.map(o=>a.jsxs(Ce,{to:o.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:o.projectTitle})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.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}),a.jsx(Ht,{status:o.status})]})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),a.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Cr(o.updated)]})]},o.id))})})]})}function YE({term:e,description:t}){return a.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 XE(){const{data:e,loading:t,error:n}=qv(),{openCheatsheet:o}=Ws();return t?a.jsx(yt,{label:"Loading help…"}):n||!e?a.jsx(dt,{error:n||"Help content is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsx(Re,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.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"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",a.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",Ps("Mod+k")," opens the command palette."]})]})}),a.jsx(Re,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:a.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(i=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:i},i))})}),a.jsx(Re,{title:"Getting Started",children:a.jsx("div",{className:"space-y-3",children:e.workflow.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(Wl,{command:i.command.command,description:i.command.description,example:i.command.example}):null,i.href?a.jsx(Ce,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsxs(Re,{title:"Core Concepts",children:[a.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>a.jsx(YE,{term:i.term,description:i.description},i.term))}),a.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.term}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.term))})]}),a.jsx(Re,{title:"Status Guide",children:a.jsx("div",{className:"space-y-3",children:e.statusGuide.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Ht,{status:i.status}),a.jsx("p",{className:"font-semibold text-foreground",children:i.meaning})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:i.useWhen})]},i.status))})})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Re,{title:"Ownership And File Rules",children:a.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:i.files.map(l=>a.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:l},l))})]},i.label))})}),a.jsx(Re,{title:"How To Navigate The Dashboard",children:a.jsx("div",{className:"space-y-3",children:e.navigation.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx(Ce,{className:"text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open"})]}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.label))})})]}),a.jsx(Re,{title:"CLI Quick Reference",children:a.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(i=>a.jsx(Wl,{command:i.command,description:i.description,example:i.example},i.command))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Re,{title:"FAQ",children:a.jsx("div",{className:"space-y-3",children:e.faq.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.question}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.answer})]},i.question))})}),a.jsx(Re,{title:"First Project Checklist",children:a.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(Wl,{command:i.command.command,example:i.command.example}):null,i.href?a.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 Np({children:e}){return a.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 Sc=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},o)=>a.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[a.jsx(Bs,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),a.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"})]}));Sc.displayName="SearchInput";function Ep({value:e,options:t,onChange:n}){return a.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>a.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 $0({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:l,onMove:c,emptyMessage:d="No cards in this column."}){const[p,h]=g.useState(null),[m,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(R=>o(R)===O.id)})),[e,o,t]),k=p?b.get(p)??null:null;function j(O){if(!k)return{allowed:!1};const R=o(k);return(l==null?void 0:l({item:k,fromColumnId:R,toColumnId:O}))??{allowed:!0}}function S(){h(null),x(null)}function P(O,R){c&&(O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",R),h(R))}function T(O,R,$){!c||!k||!j(R).allowed||(O.preventDefault(),O.dataTransfer.dropEffect="move",x(q=>(q==null?void 0:q.columnId)===R&&q.index===$?q:{columnId:R,index:$}))}async function L(O,R,$){var G;if(O.preventDefault(),!c||!k){S();return}const A=o(k),J=(((G=N.find(Y=>Y.column.id===A))==null?void 0:G.items)??[]).findIndex(Y=>n(Y)===n(k));if(!j(R).allowed||J<0){S();return}if(A===R&&($===J||$===J+1)){S();return}try{await c({item:k,fromColumnId:A,toColumnId:R,fromIndex:J,toIndex:$})}finally{S()}}return a.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"oklch(var(--border)) transparent",scrollbarWidth:"thin"},children:a.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:O,items:R})=>{const $=j(O.id),A=(m==null?void 0:m.columnId)===O.id;return a.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":"",A?"ring-2 ring-ring/30":""),title:k&&!$.allowed?$.reason:void 0,children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:O.title}),O.description?a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:O.description}):null]}),a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:R.length})]}),a.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:q=>T(q,O.id,R.length),onDrop:q=>L(q,O.id,R.length),children:[R.length===0?a.jsx(QE,{active:(m==null?void 0:m.columnId)===O.id&&m.index===0,disabled:!!k&&!$.allowed,children:typeof d=="function"?d(O):d}):null,R.map((q,J)=>{const z=n(q),G=p===z;return a.jsxs(g.Fragment,{children:[a.jsx("div",{className:$e("h-2 rounded-full transition",(m==null?void 0:m.columnId)===O.id&&m.index===J?"bg-primary/70":"bg-transparent"),onDragOver:Y=>T(Y,O.id,J),onDrop:Y=>L(Y,O.id,J)}),a.jsx("div",{draggable:!!c,onMouseDown:Y=>{v.current=Y.target},onDragStart:Y=>{const Q=v.current;if(Q!=null&&Q.closest("a, button")){Y.preventDefault();return}P(Y,z)},onDragEnd:S,className:$e("transition",c?"cursor-grab active:cursor-grabbing":"",G?"scale-[0.98] opacity-50":""),children:i(q,{dragging:G})})]},z)}),R.length>0?a.jsx("div",{className:$e("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(m==null?void 0:m.columnId)===O.id&&m.index===R.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 QE({active:e,disabled:t,children:n}){return a.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 F0={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 Hi=null,Wo=null;function JE(){return Hi?Promise.resolve(Hi):Wo||(Wo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Hi=e,Wo=null,e)).catch(()=>(Wo=null,F0)),Wo)}function Cc(){const[e,t]=g.useState(()=>Hi??F0);return g.useEffect(()=>{JE().then(t)},[]),e}function Cx(){Hi=null,Wo=null}function ZE(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 eP={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"},Nx=["bg-cyan-500","bg-indigo-500","bg-orange-500","bg-pink-500","bg-lime-500","bg-fuchsia-500"];function Jl({progress:e,className:t,showLegend:n=!1}){const o=Cc(),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:eP[p]??Nx[c++%Nx.length]}))},[o.order,e]),l=i.filter(c=>(e[c.key]??0)>0);return a.jsxs("div",{className:$e("space-y-2",t),children:[a.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?a.jsx("div",{className:"h-full w-full bg-muted"}):l.map(c=>a.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?a.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>a.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[a.jsx("span",{className:$e("h-2 w-2 rounded-full",c.className)}),a.jsx("span",{children:Cn(c.key)}),a.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const tP=["pending","active","blocked","failed","completed","archived"],Pp=tP,nP=["pending","in_progress","blocked","review","completed","failed"];function rP(e){return e&&e.length>0?e:[...nP]}function oP(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),l=t<n?n-1:n;return o.splice(Math.max(0,Math.min(l,o.length)),0,i),o}function Ex(){const{workspace:e}=St(),t=Pt(),n=Wt(),{data:o,loading:i,error:l,refetch:c}=xc(),d=g.useRef(null);Xo("list:projects");const[p,h]=g.useState(""),[m,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[j,S]=g.useState("updated"),[P,T]=No(),L=P.get("view"),O=L==="table"||L==="kanban"?L:"cards",R=D=>{T(F=>{const U=new URLSearchParams(F);return D==="cards"?U.delete("view"):U.set("view",D),U})},[$,A]=g.useState({}),q=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||m!=="all"&&D.status!==m||N!=="all"&&!D.tags.includes(N)?!1:p.trim()?`${D.title} ${D.tags.join(" ")} ${D.slug}`.toLowerCase().includes(p.toLowerCase()):!0}).sort((D,F)=>aP(D,F,j)):[],[o,p,m,v,N,j,e]),J=q.map(D=>`${D.slug}:${D.status}`).join("|");g.useEffect(()=>{A(lP(q))},[J,j]);const z=g.useMemo(()=>{const D=new Map(q.map(F=>[F.slug,F]));return Pp.flatMap(F=>($[F]??q.filter(K=>K.status===F).map(K=>K.slug)).map(K=>D.get(K)).filter(K=>!!K))},[q,$]),{visibleItems:G,visibleIndexByKey:Y}=g.useMemo(()=>{const D=O==="kanban"?z:q,F=new Map;return D.forEach((U,K)=>F.set(U.slug,K)),{visibleItems:D,visibleIndexByKey:F}},[O,q,z]),{hotkeyRowProps:Q}=ca(G,{scope:"list:projects",onOpen:D=>n(`${t}/projects/${D.slug}`)});if(ct({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var D;return(D=d.current)==null?void 0:D.focus()}}),ct({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),i)return a.jsx(yt,{label:"Loading projects…"});if(l||!o)return a.jsx(dt,{error:l||"Project list is unavailable."});const _=Array.from(new Set(o.flatMap(D=>D.tags))).sort();return a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Np,{children:[a.jsx(Sc,{ref:d,value:p,onChange:h,placeholder:"Search by project title or tag"}),a.jsxs("select",{value:m,onChange:D=>x(D.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"active",children:"Active"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"failed",children:"Failed"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"archived",children:"Archived"})]}),a.jsxs("select",{value:v,onChange:D=>b(D.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"active",children:"Hide archived"}),a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"archived",children:"Archived only"})]}),a.jsxs("select",{value:N,onChange:D=>k(D.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All tags"}),_.map(D=>a.jsx("option",{value:D,children:D},D))]}),a.jsxs("select",{value:j,onChange:D=>S(D.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"updated",children:"Sort: Updated"}),a.jsx("option",{value:"created",children:"Sort: Created"}),a.jsx("option",{value:"title",children:"Sort: Title"}),a.jsx("option",{value:"attention",children:"Sort: Attention"})]}),a.jsx(Ep,{value:O,onChange:D=>R(D),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),q.length===0?a.jsx(Ye,{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:a.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/project`,children:"Create Project"})}):O==="cards"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:q.map((D,F)=>a.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",...Q(F),children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:D.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(D.updated)]})]}),a.jsx(Ht,{status:D.status})]}),a.jsxs("div",{className:"mt-4 space-y-3",children:[a.jsx(Jl,{progress:D.progress,showLegend:!0}),a.jsx("div",{className:"flex flex-wrap gap-2",children:D.tags.map(U=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:U},U))}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:D.needsAttention.blockedCount+D.needsAttention.failedCount})]}),a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:D.progress.total})]})]})]})]},D.slug))}):O==="table"?a.jsx(Re,{title:`${q.length} project${q.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Project"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),a.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:q.map((D,F)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...Q(F),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Ce,{to:`${t}/projects/${D.slug}`,className:"font-semibold text-foreground hover:text-primary",children:D.title}),a.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:D.tags.map(U=>a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:U},U))})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx(Ht,{status:D.status})}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("div",{className:"min-w-[220px]",children:a.jsx(Jl,{progress:D.progress})})}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:D.needsAttention.blockedCount+D.needsAttention.failedCount}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(D.updated)})]},D.slug))})]})})}):a.jsx($0,{columns:iP,items:z,getItemId:D=>D.slug,getColumnId:D=>D.status,canDrop:({fromColumnId:D,toColumnId:F})=>({allowed:!0,reason:D===F?void 0:"This will set a manual status override on the project."}),onMove:({item:D,fromColumnId:F,toColumnId:U,fromIndex:K,toIndex:E})=>{if(F===U){const B=$[F]??q.filter(Z=>Z.status===F).map(Z=>Z.slug);A(Z=>({...Z,[F]:oP(B,K,E)}));return}fetch(`/api/projects/${D.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:U})}).then(()=>{window.location.reload()})},emptyMessage:D=>`No ${D.title.toLowerCase()} projects.`,renderCard:(D,{dragging:F})=>{const U=Y.get(D.slug)??-1;return a.jsx("div",{...U>=0?Q(U):{},children:a.jsx(cP,{project:D,dragging:F})})}}),a.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Nv,{className:"mt-0.5 h-4 w-4"}),a.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 sP={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},iP=Pp.map(e=>({id:e,title:sP[e],description:M0(e)}));function aP(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return Px(t)-Px(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function Px(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function lP(e){return Object.fromEntries(Pp.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function cP({project:e,dragging:t}){const n=Pt();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(Ce,{to:`${n}/projects/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(e.updated)]})]}),a.jsx(Ht,{status:e.status})]}),a.jsx("div",{className:"mt-4",children:a.jsx(Jl,{progress:e.progress})}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),a.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"]})]}),a.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 a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?a.jsx(hc,{className:"h-3 w-3 text-green-500"}):a.jsx(mc,{className:"h-3 w-3"})})}function Rx(e){const t=uP(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(fP);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function uP(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=hP(i),d=pP(l,i.props);return i.type!==g.Fragment&&(d.ref=o?yc(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 dP=Symbol("radix.slottable");function fP(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dP}function pP(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function hP(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 mP(e){const t=e+"CollectionProvider",[n,o]=Ko(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,P=bt.useRef(null),T=bt.useRef(new Map).current;return a.jsx(i,{scope:j,itemMap:T,collectionRef:P,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Rx(d),h=bt.forwardRef((k,j)=>{const{scope:S,children:P}=k,T=l(d,S),L=an(j,T.collectionRef);return a.jsx(p,{ref:L,children:P})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",v=Rx(m),b=bt.forwardRef((k,j)=>{const{scope:S,children:P,...T}=k,L=bt.useRef(null),O=an(j,L),R=l(m,S);return bt.useEffect(()=>(R.itemMap.set(L,{ref:L,...T}),()=>void R.itemMap.delete(L))),a.jsx(v,{[x]:"",ref:O,children:P})});b.displayName=m;function N(k){const j=l(e+"CollectionConsumer",k);return bt.useCallback(()=>{const P=j.collectionRef.current;if(!P)return[];const T=Array.from(P.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((R,$)=>T.indexOf(R.ref.current)-T.indexOf($.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},N,o]}var gP=g.createContext(void 0);function z0(e){const t=g.useContext(gP);return e||t||"ltr"}var Gd="rovingFocusGroup.onEntryFocus",xP={bubbles:!1,cancelable:!0},ua="RovingFocusGroup",[Df,B0,yP]=mP(ua),[vP,U0]=Ko(ua,[yP]),[bP,wP]=vP(ua),H0=g.forwardRef((e,t)=>a.jsx(Df.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Df.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(kP,{...e,ref:t})})}));H0.displayName=ua;var kP=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...x}=e,v=g.useRef(null),b=an(t,v),N=z0(l),[k,j]=vc({prop:c,defaultProp:d??null,onChange:p,caller:ua}),[S,P]=g.useState(!1),T=Vo(h),L=B0(n),O=g.useRef(!1),[R,$]=g.useState(0);return g.useEffect(()=>{const A=v.current;if(A)return A.addEventListener(Gd,T),()=>A.removeEventListener(Gd,T)},[T]),a.jsx(bP,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(A=>j(A),[j]),onItemShiftTab:g.useCallback(()=>P(!0),[]),onFocusableItemAdd:g.useCallback(()=>$(A=>A+1),[]),onFocusableItemRemove:g.useCallback(()=>$(A=>A-1),[]),children:a.jsx(Rt.div,{tabIndex:S||R===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:ut(e.onMouseDown,()=>{O.current=!0}),onFocus:ut(e.onFocus,A=>{const q=!O.current;if(A.target===A.currentTarget&&q&&!S){const J=new CustomEvent(Gd,xP);if(A.currentTarget.dispatchEvent(J),!J.defaultPrevented){const z=L().filter(D=>D.focusable),G=z.find(D=>D.active),Y=z.find(D=>D.id===k),_=[G,Y,...z].filter(Boolean).map(D=>D.ref.current);q0(_,m)}}O.current=!1}),onBlur:ut(e.onBlur,()=>P(!1))})})}),W0="RovingFocusGroupItem",V0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,p=Rs(),h=l||p,m=wP(W0,n),x=m.currentTabStopId===h,v=B0(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=m;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),a.jsx(Df.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:a.jsx(Rt.span,{tabIndex:x?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:ut(e.onMouseDown,j=>{o?m.onItemFocus(h):j.preventDefault()}),onFocus:ut(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:ut(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){m.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=CP(j,m.orientation,m.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let T=v().filter(L=>L.focusable).map(L=>L.ref.current);if(S==="last")T.reverse();else if(S==="prev"||S==="next"){S==="prev"&&T.reverse();const L=T.indexOf(j.currentTarget);T=m.loop?NP(T,L+1):T.slice(L+1)}setTimeout(()=>q0(T))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});V0.displayName=W0;var jP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function CP(e,t,n){const o=SP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return jP[o]}function q0(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function NP(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var EP=H0,PP=V0,Nc="Tabs",[RP]=Ko(Nc,[U0]),G0=U0(),[TP,Rp]=RP(Nc),K0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:l,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=z0(d),[x,v]=vc({prop:o,onChange:i,defaultProp:l??"",caller:Nc});return a.jsx(TP,{scope:n,baseId:Rs(),value:x,onValueChange:v,orientation:c,dir:m,activationMode:p,children:a.jsx(Rt.div,{dir:m,"data-orientation":c,...h,ref:t})})});K0.displayName=Nc;var Y0="TabsList",X0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,l=Rp(Y0,n),c=G0(n);return a.jsx(EP,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:o,children:a.jsx(Rt.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})});X0.displayName=Y0;var Q0="TabsTrigger",J0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...l}=e,c=Rp(Q0,n),d=G0(n),p=tb(c.baseId,o),h=nb(c.baseId,o),m=o===c.value;return a.jsx(PP,{asChild:!0,...d,focusable:!i,active:m,children:a.jsx(Rt.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...l,ref:t,onMouseDown:ut(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:ut(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:ut(e.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!i&&x&&c.onValueChange(o)})})})});J0.displayName=Q0;var Z0="TabsContent",eb=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:l,...c}=e,d=Rp(Z0,n),p=tb(d.baseId,o),h=nb(d.baseId,o),m=o===d.value,x=g.useRef(m);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(Yo,{present:i||m,children:({present:v})=>a.jsx(Rt.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&l})})});eb.displayName=Z0;function tb(e,t){return`${e}-trigger-${t}`}function nb(e,t){return`${e}-content-${t}`}var AP=K0,DP=X0,IP=J0,LP=eb;function Tp({value:e,onValueChange:t,items:n,className:o}){return a.jsxs(AP,{value:e,onValueChange:t,className:o,children:[a.jsx(DP,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>a.jsxs(IP,{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:[a.jsx("span",{children:i.label}),typeof i.count=="number"?a.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=>a.jsx(LP,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const OP="modulepreload",_P=function(e){return"/"+e},Tx={},MP=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).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(h=>{if(h=_P(h),h in Tx)return;Tx[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":OP,m||(v.as="script"),v.crossOrigin="",v.href=h,p&&v.setAttribute("nonce",p),document.head.appendChild(v),m)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(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"&&l(d.reason);return t().catch(l)})};function $P({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,l]=g.useState(null),[c,d]=g.useState(!0),p=Wt(),h=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let m=!1;async function x(){if(o.current)try{const v=(await MP(async()=>{const{default:k}=await import("./mermaid.core-MZ_JgnRL.js").then(j=>j.bF);return{default:k}},[])).default;if(v.initialize({startOnLoad:!1,theme:h}),m)return;const b=`mermaid-${Date.now()}`,{svg:N}=await v.render(b,e);if(m||!o.current)return;o.current.innerHTML=N,FP(o.current,n,p),d(!1)}catch(v){m||(l(v instanceof Error?v.message:"Failed to render graph"),d(!1))}}return d(!0),l(null),x(),()=>{m=!0}},[e,p,n,h]),i?a.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[a.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),a.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):a.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[c&&a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),a.jsx("div",{ref:o,className:"overflow-auto"})]})}function FP(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const l=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",c=t[l];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${l}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function zP(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HP={};function Ax(e,t){return(HP.jsx?UP:BP).test(e)}const WP=/[ \t\n\f\r]/g;function VP(e){return typeof e=="object"?e.type==="text"?Dx(e.value):!1:Dx(e)}function Dx(e){return e.replace(WP,"")===""}class da{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}da.prototype.normal={};da.prototype.property={};da.prototype.space=void 0;function rb(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new da(n,o,t)}function If(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 qP=0;const Me=Qo(),Et=Qo(),Lf=Qo(),ce=Qo(),et=Qo(),As=Qo(),_n=Qo();function Qo(){return 2**++qP}const Of=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Et,commaOrSpaceSeparated:_n,commaSeparated:As,number:ce,overloadedBoolean:Lf,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Kd=Object.keys(Of);class Ap extends En{constructor(t,n,o,i){let l=-1;if(super(t,n),Ix(this,"space",i),typeof o=="number")for(;++l<Kd.length;){const c=Kd[l];Ix(this,Kd[l],(o&Of[c])===Of[c])}}}Ap.prototype.defined=!0;function Ix(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new Ap(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[If(o)]=o,n[If(l.attribute)]=o}return new da(t,n,e.space)}const ob=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:et,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ce,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:et,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 sb(e,t){return t in e?e[t]:t}function ib(e,t){return sb(e,t.toLowerCase())}const GP=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:As,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:et,autoFocus:Me,autoPlay:Me,blocking:et,capture:null,charSet:null,checked:Me,cite:null,className:et,cols:ce,colSpan:null,content:null,contentEditable:Et,controls:Me,controlsList:et,coords:ce|As,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Lf,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:et,height:ce,hidden:Lf,high:ce,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:et,itemRef:et,itemScope:Me,itemType:et,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:et,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:et,required:Me,reversed:Me,rows:ce,rowSpan:ce,sandbox:et,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:et,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:ib}),KP=Vs({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:et,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:As,g2:As,glyphName:As,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:et,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:sb}),ab=Vs({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()}}),lb=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ib}),cb=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YP={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"},XP=/[A-Z]/g,Lx=/-[a-z]/g,QP=/^data[-\w.:]+$/i;function JP(e,t){const n=If(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"&&QP.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Lx,eR);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Lx.test(l)){let c=l.replace(XP,ZP);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Ap}return new i(o,t)}function ZP(e){return"-"+e.toLowerCase()}function eR(e){return e.charAt(1).toUpperCase()}const tR=rb([ob,GP,ab,lb,cb],"html"),Dp=rb([ob,KP,ab,lb,cb],"svg");function nR(e){return e.join(" ").trim()}var js={},Yd,Ox;function rR(){if(Ox)return Yd;Ox=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
441
|
+
`,h="/",m="*",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 P=1,T=1;function L(Q){var _=Q.match(t);_&&(P+=_.length);var D=Q.lastIndexOf(p);T=~D?Q.length-D:T+Q.length}function O(){var Q={line:P,column:T};return function(_){return _.position=new R(Q),q(),_}}function R(Q){this.start=Q,this.end={line:P,column:T},this.source=S.source}R.prototype.content=j;function $(Q){var _=new Error(S.source+":"+P+":"+T+": "+Q);if(_.reason=Q,_.filename=S.source,_.line=P,_.column=T,_.source=j,!S.silent)throw _}function A(Q){var _=Q.exec(j);if(_){var D=_[0];return L(D),j=j.slice(D.length),_}}function q(){A(n)}function J(Q){var _;for(Q=Q||[];_=z();)_!==!1&&Q.push(_);return Q}function z(){var Q=O();if(!(h!=j.charAt(0)||m!=j.charAt(1))){for(var _=2;x!=j.charAt(_)&&(m!=j.charAt(_)||h!=j.charAt(_+1));)++_;if(_+=2,x===j.charAt(_-1))return $("End of comment missing");var D=j.slice(2,_-2);return T+=2,L(D),j=j.slice(_),T+=2,Q({type:v,comment:D})}}function G(){var Q=O(),_=A(o);if(_){if(z(),!A(i))return $("property missing ':'");var D=A(l),F=Q({type:b,property:k(_[0].replace(e,x)),value:D?k(D[0].replace(e,x)):x});return A(c),F}}function Y(){var Q=[];J(Q);for(var _;_=G();)_!==!1&&(Q.push(_),J(Q));return Q}return q(),Y()}function k(j){return j?j.replace(d,x):x}return Yd=N,Yd}var _x;function oR(){if(_x)return js;_x=1;var e=js&&js.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=n;const t=e(rR());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:m}=p;d?i(h,m,p):m&&(l=l||{},l[h]=m)}),l}return js}var Mi={},Mx;function sR(){if(Mx)return Mi;Mx=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},p=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,d):h=h.replace(o,d),h.replace(t,c))};return Mi.camelCase=p,Mi}var $i,$x;function iR(){if($x)return $i;$x=1;var e=$i&&$i.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(oR()),n=sR();function o(i,l){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,l)]=p)}),c}return o.default=o,$i=o,$i}var aR=iR();const lR=uc(aR),ub=db("end"),Ip=db("start");function db(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 cR(e){const t=Ip(e),n=ub(e);if(t&&n)return{start:t,end:n}}function Wi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fx(e.position):"start"in e||"end"in e?Fx(e):"line"in e||"column"in e?_f(e):""}function _f(e){return zx(e&&e.line)+":"+zx(e&&e.column)}function Fx(e){return _f(e&&e.start)+"-"+_f(e&&e.end)}function zx(e){return e&&typeof e=="number"?e:1}class ln extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(c=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?l.ruleId=o:(l.source=o.slice(0,p),l.ruleId=o.slice(p+1))}if(!l.place&&l.ancestors&&l.ancestors){const p=l.ancestors[l.ancestors.length-1];p&&(l.place=p.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.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=Wi(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ln.prototype.file="";ln.prototype.name="";ln.prototype.reason="";ln.prototype.message="";ln.prototype.stack="";ln.prototype.column=void 0;ln.prototype.line=void 0;ln.prototype.ancestors=void 0;ln.prototype.cause=void 0;ln.prototype.fatal=void 0;ln.prototype.place=void 0;ln.prototype.ruleId=void 0;ln.prototype.source=void 0;const Lp={}.hasOwnProperty,uR=new Map,dR=/[A-Z]/g,fR=new Set(["table","tbody","thead","tfoot","tr"]),pR=new Set(["td","th"]),fb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hR(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=kR(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=wR(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"?Dp:tR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=pb(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function pb(e,t,n){if(t.type==="element")return mR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yR(e,t,n);if(t.type==="mdxjsEsm")return xR(e,t);if(t.type==="root")return vR(e,t,n);if(t.type==="text")return bR(e,t)}function mR(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=Dp,e.schema=i),e.ancestors.push(t);const l=mb(e,t.tagName,!1),c=jR(e,t);let d=_p(e,t);return fR.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!VP(p):!0})),hb(e,c,l,t),Op(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function gR(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)}ta(e,t.position)}function xR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ta(e,t.position)}function yR(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=Dp,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:mb(e,t.name,!0),c=SR(e,t),d=_p(e,t);return hb(e,c,l,t),Op(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function vR(e,t,n){const o={};return Op(o,_p(e,t)),e.create(t,e.Fragment,o,n)}function bR(e,t){return t.value}function hb(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Op(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wR(e,t,n){return o;function o(i,l,c,d){const h=Array.isArray(c.children)?n:t;return d?h(l,c,d):h(l,c)}}function kR(e,t){return n;function n(o,i,l,c){const d=Array.isArray(l.children),p=Ip(o);return t(i,l,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function jR(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Lp.call(t.properties,i)){const l=CR(e,i,t.properties[i]);if(l){const[c,d]=l;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&pR.has(t.tagName)?o=d:n[c]=d}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function SR(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const c=l.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else ta(e,t.position);else{const i=o.name;let l;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,l=e.evaluater.evaluateExpression(d.expression)}else ta(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function _p(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:uR;for(;++o<t.children.length;){const l=t.children[o];let c;if(e.passKeys){const p=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(p){const h=i.get(p)||0;c=p+"-"+h,i.set(p,h+1)}}const d=pb(e,l,c);d!==void 0&&n.push(d)}return n}function CR(e,t,n){const o=JP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?zP(n):nR(n)),o.property==="style"){let i=typeof n=="object"?n:NR(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ER(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?YP[o.property]||o.property:o.attribute,n]}}function NR(e,t){try{return lR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new ln("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=fb+"#cannot-parse-style-attribute",i}}function mb(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,c;for(;++l<i.length;){const d=Ax(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}o=c}else o=Ax(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Lp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);ta(e)}function ta(e,t){const n=new ln("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=fb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ER(e){const t={};let n;for(n in e)Lp.call(e,n)&&(t[PR(n)]=e[n]);return t}function PR(e){let t=e.replace(dR,RR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RR(e){return"-"+e.toLowerCase()}const Xd={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"]},TR={};function AR(e,t){const n=TR,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gb(e,o,i)}function gb(e,t,n){if(DR(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 Bx(e.children,t,n)}return Array.isArray(e)?Bx(e,t,n):""}function Bx(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=gb(e[i],t,n);return o.join("")}function DR(e){return!!(e&&typeof e=="object")}const Ux=document.createElement("i");function Mp(e){const t="&"+e+";";Ux.innerHTML=t;const n=Ux.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 l=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);l<o.length;)c=o.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Qn(e,t){return e.length>0?(Er(e,e.length,0,t),e):t}const Hx={}.hasOwnProperty;function IR(e){const t={};let n=-1;for(;++n<e.length;)LR(t,e[n]);return t}function LR(e,t){let n;for(n in t){const i=(Hx.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){Hx.call(i,c)||(i[c]=[]);const d=l[c];OR(i[c],Array.isArray(d)?d:d?[d]:[])}}}function OR(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 xb(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 Ds(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kr=Po(/[A-Za-z]/),$n=Po(/[\dA-Za-z]/),_R=Po(/[#-'*+\--9=?A-Z^-~]/);function Mf(e){return e!==null&&(e<32||e===127)}const $f=Po(/\d/),MR=Po(/[\dA-Fa-f]/),$R=Po(/[!-/:-@[-`{-~]/);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 FR=Po(new RegExp("\\p{P}|\\p{S}","u")),zR=Po(/\s/);function Po(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qs(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&$n(e.charCodeAt(n+1))&&$n(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(c=String.fromCharCode(l,d),i=1):c="�"}else c=String.fromCharCode(l);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 tt(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(p){return qe(p)?(e.enter(n),d(p)):t(p)}function d(p){return qe(p)&&l++<i?(e.consume(p),d):(e.exit(n),t(p))}}const BR={tokenize:UR};function UR(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"),tt(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),l(d)}function l(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"),l):(e.consume(d),c)}}const HR={tokenize:WR},Wx={tokenize:VR};function WR(e){const t=this,n=[];let o=0,i,l,c;return d;function d(T){if(o<n.length){const L=n[o];return t.containerState=L[1],e.attempt(L[0].continuation,p,h)(T)}return h(T)}function p(T){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&P();const L=t.events.length;let O=L,R;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){R=t.events[O][1].end;break}S(o);let $=L;for(;$<t.events.length;)t.events[$][1].end={...R},$++;return Er(t.events,O+1,0,t.events.slice(L)),t.events.length=$,h(T)}return d(T)}function h(T){if(o===n.length){if(!i)return v(T);if(i.currentConstruct&&i.currentConstruct.concrete)return N(T);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wx,m,x)(T)}function m(T){return i&&P(),S(o),v(T)}function x(T){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(T)}function v(T){return t.containerState={},e.attempt(Wx,b,N)(T)}function b(T){return o++,n.push([t.currentConstruct,t.containerState]),v(T)}function N(T){if(T===null){i&&P(),S(0),e.consume(T);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(T)}function k(T){if(T===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(T);return}return Le(T)?(e.consume(T),j(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(T),k)}function j(T,L){const O=t.sliceStream(T);if(L&&O.push(null),T.previous=l,l&&(l.next=T),l=T,i.defineSkip(T.start),i.write(O),t.parser.lazy[T.start.line]){let R=i.events.length;for(;R--;)if(i.events[R][1].start.offset<c&&(!i.events[R][1].end||i.events[R][1].end.offset>c))return;const $=t.events.length;let A=$,q,J;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(q){J=t.events[A][1].end;break}q=!0}for(S(o),R=$;R<t.events.length;)t.events[R][1].end={...J},R++;Er(t.events,A+1,0,t.events.slice($)),t.events.length=R}}function S(T){let L=n.length;for(;L-- >T;){const O=n[L];t.containerState=O[1],O[0].exit.call(t,e)}n.length=T}function P(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function VR(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vx(e){if(e===null||Nn(e)||zR(e))return 1;if(FR(e))return 2}function $p(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const Ff={name:"attention",resolveAll:qR,tokenize:GR};function qR(e,t){let n=-1,o,i,l,c,d,p,h,m;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};qx(x,-p),qx(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},l={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},h=[],e[o][1].end.offset-e[o][1].start.offset&&(h=Qn(h,[["enter",e[o][1],t],["exit",e[o][1],t]])),h=Qn(h,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",l,t]]),h=Qn(h,$p(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),h=Qn(h,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Qn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Er(e,o-1,n-o+3,h),n=o+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function GR(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Vx(o);let l;return c;function c(p){return l=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===l)return e.consume(p),d;const h=e.exit("attentionSequence"),m=Vx(p),x=!m||m===2&&i||n.includes(p),v=!i||i===2&&m||n.includes(o);return h._open=!!(l===42?x:x&&(i||!v)),h._close=!!(l===42?v:v&&(m||!x)),t(p)}}function qx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const KR={name:"autolink",tokenize:YR};function YR(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"),l}function l(b){return kr(b)?(e.consume(b),c):b===64?n(b):h(b)}function c(b){return b===43||b===45||b===46||$n(b)?(o=1,d(b)):h(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,h(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||Mf(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):_R(b)?(e.consume(b),h):n(b)}function m(b){return $n(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),o=0,m):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 Ec={partial:!0,tokenize:XR};function XR(e,t,n){return o;function o(l){return qe(l)?tt(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||Le(l)?t(l):n(l)}}const yb={continuation:{tokenize:JR},exit:ZR,name:"blockQuote",tokenize:QR};function QR(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"),l}return n(c)}function l(c){return qe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function JR(e,t,n){const o=this;return i;function i(c){return qe(c)?tt(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(yb,t,n)(c)}}function ZR(e){e.exit("blockQuote")}const vb={name:"characterEscape",tokenize:eT};function eT(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return $R(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const bb={name:"characterReference",tokenize:tT};function tT(e,t,n){const o=this;let i=0,l,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"),h):(e.enter("characterReferenceValue"),l=31,c=$n,m(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=MR,m):(e.enter("characterReferenceValue"),l=7,c=$f,m(x))}function m(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return c===$n&&!Mp(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<l?(e.consume(x),m):n(x)}}const Gx={partial:!0,tokenize:rT},Kx={concrete:!0,name:"codeFenced",tokenize:nT};function nT(e,t,n){const o=this,i={partial:!0,tokenize:O};let l=0,c=0,d;return p;function p(R){return h(R)}function h(R){const $=o.events[o.events.length-1];return l=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,d=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(R)}function m(R){return R===d?(c++,e.consume(R),m):c<3?n(R):(e.exit("codeFencedFenceSequence"),qe(R)?tt(e,x,"whitespace")(R):x(R))}function x(R){return R===null||Le(R)?(e.exit("codeFencedFence"),o.interrupt?t(R):e.check(Gx,k,L)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(R))}function v(R){return R===null||Le(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(R)):qe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,b,"whitespace")(R)):R===96&&R===d?n(R):(e.consume(R),v)}function b(R){return R===null||Le(R)?x(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(R))}function N(R){return R===null||Le(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(R)):R===96&&R===d?n(R):(e.consume(R),N)}function k(R){return e.attempt(i,L,j)(R)}function j(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return l>0&&qe(R)?tt(e,P,"linePrefix",l+1)(R):P(R)}function P(R){return R===null||Le(R)?e.check(Gx,k,L)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Le(R)?(e.exit("codeFlowValue"),P(R)):(e.consume(R),T)}function L(R){return e.exit("codeFenced"),t(R)}function O(R,$,A){let q=0;return J;function J(_){return R.enter("lineEnding"),R.consume(_),R.exit("lineEnding"),z}function z(_){return R.enter("codeFencedFence"),qe(_)?tt(R,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):G(_)}function G(_){return _===d?(R.enter("codeFencedFenceSequence"),Y(_)):A(_)}function Y(_){return _===d?(q++,R.consume(_),Y):q>=c?(R.exit("codeFencedFenceSequence"),qe(_)?tt(R,Q,"whitespace")(_):Q(_)):A(_)}function Q(_){return _===null||Le(_)?(R.exit("codeFencedFence"),$(_)):A(_)}}}function rT(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"),l)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const Qd={name:"codeIndented",tokenize:sT},oT={partial:!0,tokenize:iT};function sT(e,t,n){const o=this;return i;function i(h){return e.enter("codeIndented"),tt(e,l,"linePrefix",5)(h)}function l(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?p(h):Le(h)?e.attempt(oT,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Le(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function iT(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):tt(e,l,"linePrefix",5)(c)}function l(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 aT={name:"codeText",previous:cT,resolve:lT,tokenize:uT};function lT(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 cT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uT(e,t,n){let o=0,i,l;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?(l=e.enter("codeTextSequence"),i=0,m(x)):Le(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(x))}function h(x){return x===null||x===32||x===96||Le(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),h)}function m(x){return x===96?(e.consume(x),i++,m):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(l.type="codeTextData",h(x))}}class dT{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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&Fi(this.left,o),l.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),Fi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fi(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);Fi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fi(this.left,n.reverse())}}}function Fi(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 wb(e){const t={};let n=-1,o,i,l,c,d,p,h;const m=new dT(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(o=m.get(n),n&&o[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,l=0,l<p.length&&p[l][1].type==="lineEndingBlank"&&(l+=2),l<p.length&&p[l][1].type==="content"))for(;++l<p.length&&p[l][1].type!=="content";)p[l][1].type==="chunkText"&&(p[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,fT(m,n)),n=t[n],h=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(c=m.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(o[1].end={...m.get(i)[1].start},d=m.slice(i,n),d.unshift(o),m.splice(i,n-i+1,d))}}return Er(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function fT(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],h={};let m,x,v=-1,b=n,N=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);l.push(i),b._tokenizer||(m=o.sliceStream(b),b.next||m.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),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]),P=l.pop();p.push([P,P+S.length-1]),e.splice(P,2,S)}for(p.reverse(),v=-1;++v<p.length;)h[N+p[v][0]]=N+p[v][1],N+=p[v][1]-p[v][0]-1;return h}const pT={resolve:mT,tokenize:gT},hT={partial:!0,tokenize:xT};function mT(e){return wb(e),e}function gT(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?l(d):Le(d)?e.check(hT,c,l)(d):(e.consume(d),i)}function l(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 xT(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),tt(e,l,"linePrefix")}function l(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 kb(e,t,n,o,i,l,c,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(S),e.exit(l),v):S===null||S===32||S===41||Mf(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(l),e.consume(S),e.exit(l),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!m&&(S===null||S===41||Nn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):m<h&&S===40?(e.consume(S),m++,k):S===41?(e.consume(S),m--,k):S===null||S===32||S===40||Mf(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 jb(e,t,n,o,i,l){const c=this;let d=0,p;return h;function h(b){return e.enter(o),e.enter(i),e.consume(b),e.exit(i),e.enter(l),m}function m(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(l),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||b===91||b===93||Le(b)||d++>999?(e.exit("chunkString"),m(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 Sb(e,t,n,o,i,l){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(l),h(v))}function h(v){return v===c?(e.exit(l),p(c)):v===null?n(v):Le(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),tt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===c||v===null||Le(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?x:m)}function x(v){return v===c||v===92?(e.consume(v),m):m(v)}}function Vi(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)?tt(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const yT={name:"definition",tokenize:bT},vT={partial:!0,tokenize:wT};function bT(e,t,n){const o=this;let i;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return jb.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Ds(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)?Vi(e,h)(b):h(b)}function h(b){return kb(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(vT,x,x)(b)}function x(b){return qe(b)?tt(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 wT(e,t,n){return o;function o(d){return Nn(d)?Vi(e,i)(d):n(d)}function i(d){return Sb(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return qe(d)?tt(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Le(d)?t(d):n(d)}}const kT={name:"hardBreakEscape",tokenize:jT};function jT(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return Le(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const ST={name:"headingAtx",resolve:CT,tokenize:NT};function CT(e,t){let n=e.length-2,o=3,i,l;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},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Er(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function NT(e,t,n){let o=0;return i;function i(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&o++<6?(e.consume(m),c):m===null||Nn(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),p(m)):m===null||Le(m)?(e.exit("atxHeading"),t(m)):qe(m)?tt(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function p(m){return m===35?(e.consume(m),p):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||Nn(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const ET=["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"],Yx=["pre","script","style","textarea"],PT={concrete:!0,name:"htmlFlow",resolveTo:AT,tokenize:DT},RT={partial:!0,tokenize:LT},TT={partial:!0,tokenize:IT};function AT(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 DT(e,t,n){const o=this;let i,l,c,d,p;return h;function h(I){return m(I)}function m(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),l=!0,k):I===63?(e.consume(I),i=3,o.interrupt?t:E):kr(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):kr(I)?(e.consume(I),i=4,o.interrupt?t:E):n(I)}function b(I){return I===45?(e.consume(I),o.interrupt?t:E):n(I)}function N(I){const de="CDATA[";return I===de.charCodeAt(d++)?(e.consume(I),d===de.length?o.interrupt?t:G:N):n(I)}function k(I){return kr(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&&!l&&Yx.includes(ve)?(i=1,o.interrupt?t(I):G(I)):ET.includes(c.toLowerCase())?(i=6,de?(e.consume(I),S):o.interrupt?t(I):G(I)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(I):l?P(I):T(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:G):n(I)}function P(I){return qe(I)?(e.consume(I),P):J(I)}function T(I){return I===47?(e.consume(I),J):I===58||I===95||kr(I)?(e.consume(I),L):qe(I)?(e.consume(I),T):J(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),R):qe(I)?(e.consume(I),O):T(I)}function R(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),R):A(I)}function $(I){return I===p?(e.consume(I),p=null,q):I===null||Le(I)?n(I):(e.consume(I),$)}function A(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),A)}function q(I){return I===47||I===62||qe(I)?T(I):n(I)}function J(I){return I===62?(e.consume(I),z):n(I)}function z(I){return I===null||Le(I)?G(I):qe(I)?(e.consume(I),z):n(I)}function G(I){return I===45&&i===2?(e.consume(I),D):I===60&&i===1?(e.consume(I),F):I===62&&i===4?(e.consume(I),B):I===63&&i===3?(e.consume(I),E):I===93&&i===5?(e.consume(I),K):Le(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(RT,Z,Y)(I)):I===null||Le(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),G)}function Y(I){return e.check(TT,Q,Z)(I)}function Q(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return I===null||Le(I)?Y(I):(e.enter("htmlFlowData"),G(I))}function D(I){return I===45?(e.consume(I),E):G(I)}function F(I){return I===47?(e.consume(I),c="",U):G(I)}function U(I){if(I===62){const de=c.toLowerCase();return Yx.includes(de)?(e.consume(I),B):G(I)}return kr(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),U):G(I)}function K(I){return I===93?(e.consume(I),E):G(I)}function E(I){return I===62?(e.consume(I),B):I===45&&i===2?(e.consume(I),E):G(I)}function B(I){return I===null||Le(I)?(e.exit("htmlFlowData"),Z(I)):(e.consume(I),B)}function Z(I){return e.exit("htmlFlow"),t(I)}}function IT(e,t,n){const o=this;return i;function i(c){return Le(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function LT(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ec,t,n)}}const OT={name:"htmlText",tokenize:_T};function _T(e,t,n){const o=this;let i,l,c;return d;function d(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),p}function p(E){return E===33?(e.consume(E),h):E===47?(e.consume(E),O):E===63?(e.consume(E),T):kr(E)?(e.consume(E),A):n(E)}function h(E){return E===45?(e.consume(E),m):E===91?(e.consume(E),l=0,N):kr(E)?(e.consume(E),P):n(E)}function m(E){return E===45?(e.consume(E),b):n(E)}function x(E){return E===null?n(E):E===45?(e.consume(E),v):Le(E)?(c=x,F(E)):(e.consume(E),x)}function v(E){return E===45?(e.consume(E),b):x(E)}function b(E){return E===62?D(E):E===45?v(E):x(E)}function N(E){const B="CDATA[";return E===B.charCodeAt(l++)?(e.consume(E),l===B.length?k:N):n(E)}function k(E){return E===null?n(E):E===93?(e.consume(E),j):Le(E)?(c=k,F(E)):(e.consume(E),k)}function j(E){return E===93?(e.consume(E),S):k(E)}function S(E){return E===62?D(E):E===93?(e.consume(E),S):k(E)}function P(E){return E===null||E===62?D(E):Le(E)?(c=P,F(E)):(e.consume(E),P)}function T(E){return E===null?n(E):E===63?(e.consume(E),L):Le(E)?(c=T,F(E)):(e.consume(E),T)}function L(E){return E===62?D(E):T(E)}function O(E){return kr(E)?(e.consume(E),R):n(E)}function R(E){return E===45||$n(E)?(e.consume(E),R):$(E)}function $(E){return Le(E)?(c=$,F(E)):qe(E)?(e.consume(E),$):D(E)}function A(E){return E===45||$n(E)?(e.consume(E),A):E===47||E===62||Nn(E)?q(E):n(E)}function q(E){return E===47?(e.consume(E),D):E===58||E===95||kr(E)?(e.consume(E),J):Le(E)?(c=q,F(E)):qe(E)?(e.consume(E),q):D(E)}function J(E){return E===45||E===46||E===58||E===95||$n(E)?(e.consume(E),J):z(E)}function z(E){return E===61?(e.consume(E),G):Le(E)?(c=z,F(E)):qe(E)?(e.consume(E),z):q(E)}function G(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,Y):Le(E)?(c=G,F(E)):qe(E)?(e.consume(E),G):(e.consume(E),Q)}function Y(E){return E===i?(e.consume(E),i=void 0,_):E===null?n(E):Le(E)?(c=Y,F(E)):(e.consume(E),Y)}function Q(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Nn(E)?q(E):(e.consume(E),Q)}function _(E){return E===47||E===62||Nn(E)?q(E):n(E)}function D(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function F(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),U}function U(E){return qe(E)?tt(e,K,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):K(E)}function K(E){return e.enter("htmlTextData"),c(E)}}const Fp={name:"labelEnd",resolveAll:zT,resolveTo:BT,tokenize:UT},MT={tokenize:HT},$T={tokenize:WT},FT={tokenize:VT};function zT(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 BT(e,t){let n=e.length,o=0,i,l,c,d;for(;n--;)if(i=e[n][1],l){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&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",h,t]],d=Qn(d,e.slice(l+1,l+o+3)),d=Qn(d,[["enter",m,t]]),d=Qn(d,$p(t.parser.constructs.insideSpan.null,e.slice(l+o+4,c-3),t)),d=Qn(d,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),d=Qn(d,e.slice(c+1)),d=Qn(d,[["exit",p,t]]),Er(e,l,e.length,d),e}function UT(e,t,n){const o=this;let i=o.events.length,l,c;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return d;function d(v){return l?l._inactive?x(v):(c=o.parser.defined.includes(Ds(o.sliceSerialize({start:l.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(MT,m,c?m:x)(v):v===91?e.attempt($T,m,c?h:x)(v):c?m(v):x(v)}function h(v){return e.attempt(FT,m,x)(v)}function m(v){return t(v)}function x(v){return l._balanced=!0,n(v)}}function HT(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)?Vi(e,l)(x):l(x)}function l(x){return x===41?m(x):kb(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Nn(x)?Vi(e,p)(x):m(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?Sb(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):m(x)}function h(x){return Nn(x)?Vi(e,m)(x):m(x)}function m(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function WT(e,t,n){const o=this;return i;function i(d){return jb.call(o,e,l,c,"reference","referenceMarker","referenceString")(d)}function l(d){return o.parser.defined.includes(Ds(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function VT(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const qT={name:"labelStartImage",resolveAll:Fp.resolveAll,tokenize:GT};function GT(e,t,n){const o=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(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 KT={name:"labelStartLink",resolveAll:Fp.resolveAll,tokenize:YT};function YT(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"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const Jd={name:"lineEnding",tokenize:XT};function XT(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const Vl={name:"thematicBreak",tokenize:QT};function QT(e,t,n){let o=0,i;return l;function l(h){return e.enter("thematicBreak"),c(h)}function c(h){return i=h,d(h)}function d(h){return h===i?(e.enter("thematicBreakSequence"),p(h)):o>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),o++,p):(e.exit("thematicBreakSequence"),qe(h)?tt(e,d,"whitespace")(h):d(h))}}const jn={continuation:{tokenize:tA},exit:rA,name:"list",tokenize:eA},JT={partial:!0,tokenize:oA},ZT={partial:!0,tokenize:nA};function eA(e,t,n){const o=this,i=o.events[o.events.length-1];let l=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:$f(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(Vl,n,h)(b):h(b);if(!o.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return $f(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"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,e.check(Ec,o.interrupt?n:m,e.attempt(JT,v,x))}function m(b){return o.containerState.initialBlankLine=!0,l++,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=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function tA(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Ec,i,l);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,tt(e,t,"listItemIndent",o.containerState.size+1)(d)}function l(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(ZT,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,tt(e,e.attempt(jn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function nA(e,t,n){const o=this;return tt(e,i,"listItemIndent",o.containerState.size+1);function i(l){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(l):n(l)}}function rA(e){e.exit(this.containerState.type)}function oA(e,t,n){const o=this;return tt(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const c=o.events[o.events.length-1];return!qe(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Xx={name:"setextUnderline",resolveTo:sA,tokenize:iA};function sA(e,t){let n=e.length,o,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",c,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function iA(e,t,n){const o=this;let i;return l;function l(h){let m=o.events.length,x;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){x=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(e.enter("setextHeadingLine"),i=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===i?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),qe(h)?tt(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const aA={tokenize:lA};function lA(e){const t=this,n=e.attempt(Ec,o,e.attempt(this.parser.constructs.flowInitial,i,tt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pT,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const cA={resolveAll:Nb()},uA=Cb("string"),dA=Cb("text");function Cb(e){return{resolveAll:Nb(e==="text"?fA:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,c,d);return c;function c(m){return h(m)?l(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),p}function p(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),p)}function h(m){if(m===null)return!0;const x=i[m];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 Nb(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function fA(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 l=i.length,c=-1,d=0,p;for(;l--;){const h=i[l];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)p=!0,d++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:o.start._bufferIndex+c,_index:o.start._index+l,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const pA={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:yb},hA={91:yT},mA={[-2]:Qd,[-1]:Qd,32:Qd},gA={35:ST,42:Vl,45:[Xx,Vl],60:PT,61:Xx,95:Vl,96:Kx,126:Kx},xA={38:bb,92:vb},yA={[-5]:Jd,[-4]:Jd,[-3]:Jd,33:qT,38:bb,42:Ff,60:[KR,OT],91:KT,92:[kT,vb],93:Fp,95:Ff,96:aT},vA={null:[Ff,cA]},bA={null:[42,95]},wA={null:[]},kA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bA,contentInitial:hA,disable:wA,document:pA,flow:gA,flowInitial:mA,insideSpan:vA,string:xA,text:yA},Symbol.toStringTag,{value:"Module"}));function jA(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={},l=[];let c=[],d=[];const p={attempt:$(O),check:$(R),consume:P,enter:T,exit:L,interrupt:$(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:x};let m=t.tokenize.call(h,p);return t.resolveAll&&l.push(t),h;function x(z){return c=Qn(c,z),j(),c[c.length-1]!==null?[]:(A(t,0),h.events=$p(l,h.events,h),h.events)}function v(z,G){return CA(b(z),G)}function b(z){return SA(c,z)}function N(){const{_bufferIndex:z,_index:G,line:Y,column:Q,offset:_}=o;return{_bufferIndex:z,_index:G,line:Y,column:Q,offset:_}}function k(z){i[z.line]=z.column,J()}function j(){let z;for(;o._index<c.length;){const G=c[o._index];if(typeof G=="string")for(z=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===z&&o._bufferIndex<G.length;)S(G.charCodeAt(o._bufferIndex));else S(G)}}function S(z){m=m(z)}function P(z){Le(z)?(o.line++,o.column=1,o.offset+=z===-3?2:1,J()):z!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=z}function T(z,G){const Y=G||{};return Y.type=z,Y.start=N(),h.events.push(["enter",Y,h]),d.push(Y),Y}function L(z){const G=d.pop();return G.end=N(),h.events.push(["exit",G,h]),G}function O(z,G){A(z,G.from)}function R(z,G){G.restore()}function $(z,G){return Y;function Y(Q,_,D){let F,U,K,E;return Array.isArray(Q)?Z(Q):"tokenize"in Q?Z([Q]):B(Q);function B(fe){return Ee;function Ee(Ne){const Pe=Ne!==null&&fe[Ne],je=Ne!==null&&fe.null,ft=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(je)?je:je?[je]:[]];return Z(ft)(Ne)}}function Z(fe){return F=fe,U=0,fe.length===0?D:I(fe[U])}function I(fe){return Ee;function Ee(Ne){return E=q(),K=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?ve():fe.tokenize.call(G?Object.assign(Object.create(h),G):h,p,de,ve)(Ne)}}function de(fe){return z(K,E),_}function ve(fe){return E.restore(),++U<F.length?I(F[U]):D}}}function A(z,G){z.resolveAll&&!l.includes(z)&&l.push(z),z.resolve&&Er(h.events,G,h.events.length-G,z.resolve(h.events.slice(G),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function q(){const z=N(),G=h.previous,Y=h.currentConstruct,Q=h.events.length,_=Array.from(d);return{from:Q,restore:D};function D(){o=z,h.previous=G,h.currentConstruct=Y,h.events.length=Q,d=_,J()}}function J(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function SA(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,l)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}l>0&&c.push(e[i].slice(0,l))}return c}function CA(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){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(l)}i=l===-2,o.push(c)}return o.join("")}function NA(e){const o={constructs:IR([kA,...(e||{}).extensions||[]]),content:i(BR),defined:[],document:i(HR),flow:i(aA),lazy:{},string:i(uA),text:i(dA)};return o;function i(l){return c;function c(d){return jA(o,l,d)}}}function EA(e){for(;!wb(e););return e}const Qx=/[\0\t\n\r]/g;function PA(){let e=1,t="",n=!0,o;return i;function i(l,c,d){const p=[];let h,m,x,v,b;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),x=0,t="",n&&(l.charCodeAt(0)===65279&&x++,n=void 0);x<l.length;){if(Qx.lastIndex=x,h=Qx.exec(l),v=h&&h.index!==void 0?h.index:l.length,b=l.charCodeAt(v),!h){t=l.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(l.slice(x,v)),e+=v-x),b){case 0:{p.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,p.push(-2);e++<m;)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 RA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TA(e){return e.replace(RA,AA)}function AA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return xb(n.slice(l?2:1),l?16:10)}return Mp(n)||e}const Eb={}.hasOwnProperty;function DA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),IA(n)(EA(NA(n).document().write(PA()(e,t,!0))))}function IA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Qe),autolinkProtocol:q,autolinkEmail:q,atxHeading:l(Ct),blockQuote:l(je),characterEscape:q,characterReference:q,codeFenced:l(ft),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(ft,c),codeText:l(nt,c),codeTextData:q,data:q,codeFlowValue:q,definition:l(Ue),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Be),hardBreakEscape:l(Ot),hardBreakTrailing:l(Ot),htmlFlow:l(cn,c),htmlFlowData:q,htmlText:l(cn,c),htmlTextData:q,image:l(hn),label:c,link:l(Qe),listItem:l(Vt),listItemValue:v,listOrdered:l(rt,x),listUnordered:l(rt),paragraph:l(Qt),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(Ct),strong:l(mn),thematicBreak:l(Tn)},exit:{atxHeading:p(),atxHeadingSequence:O,autolink:p(),autolinkEmail:Pe,autolinkProtocol:Ne,blockQuote:p(),characterEscapeValue:J,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:fe,characterReference:Ee,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:J,codeIndented:p(S),codeText:p(_),codeTextData:J,data:J,definition:p(),definitionDestinationString:L,definitionLabelString:P,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(Y),htmlFlowData:J,htmlText:p(Q),htmlTextData:J,image:p(F),label:K,labelText:U,lineEnding:z,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:E,resourceTitleString:B,resource:Z,setextHeading:p(A),setextHeadingLineSequence:$,setextHeadingText:R,strong:p(),thematicBreak:p()}};Pb(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(re){let ae={type:"root",children:[]};const pe={stack:[ae],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:m,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]];Eb.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]||Jx).call(pe,void 0,ke[0])}for(ae.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;)ae=t.transforms[me](ae)||ae;return ae}function i(re,ae,pe){let ne=ae-1,me=-1,ke=!1,_t,Jt,qt,V;for(;++ne<=pe;){const le=re[ne];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?me++:me--,V=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(_t&&!V&&!me&&!qt&&(qt=ne),V=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:V=void 0}if(!me&&le[0]==="enter"&&le[1].type==="listItemPrefix"||me===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[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:le[1].end),re.splice(Jt||ne,0,["exit",_t,le[2]]),ne++,pe++}if(le[1].type==="listItemPrefix"){const ge={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};_t=ge,re.splice(ne,0,["enter",ge,le[2]]),ne++,pe++,qt=void 0,V=!0}}}return re[ae][1]._spread=ke,pe}function l(re,ae){return pe;function pe(ne){d.call(this,re(ne),ne),ae&&ae.call(this,ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(re,ae,pe){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([ae,pe||void 0]),re.position={start:xo(ae.start),end:void 0}}function p(re){return ae;function ae(pe){re&&re.call(this,pe),h.call(this,pe)}}function h(re,ae){const pe=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==re.type&&(ae?ae.call(this,re,ne[0]):(ne[1]||Jx).call(this,re,ne[0]));else throw new Error("Cannot close `"+re.type+"` ("+Wi({start:re.start,end:re.end})+"): it’s not open");pe.position.end=xo(re.end)}function m(){return AR(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(re){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=re}function N(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=re}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.value=re.replace(/(\r?\n|\r)$/g,"")}function P(re){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.label=ae,pe.identifier=Ds(this.sliceSerialize(re)).toLowerCase()}function T(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.title=re}function L(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.url=re}function O(re){const ae=this.stack[this.stack.length-1];if(!ae.depth){const pe=this.sliceSerialize(re).length;ae.depth=pe}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(re){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function q(re){const pe=this.stack[this.stack.length-1].children;let ne=pe[pe.length-1];(!ne||ne.type!=="text")&&(ne=Rn(),ne.position={start:xo(re.start),end:void 0},pe.push(ne)),this.stack.push(ne)}function J(re){const ae=this.stack.pop();ae.value+=this.sliceSerialize(re),ae.position.end=xo(re.end)}function z(re){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=ae.children[ae.children.length-1];pe.position.end=xo(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(q.call(this,re),J.call(this,re))}function G(){this.data.atHardBreak=!0}function Y(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.value=re}function Q(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.value=re}function _(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.value=re}function D(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=ae,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function F(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=ae,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function U(re){const ae=this.sliceSerialize(re),pe=this.stack[this.stack.length-2];pe.label=TA(ae),pe.identifier=Ds(ae).toLowerCase()}function K(){const re=this.stack[this.stack.length-1],ae=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=ae}function E(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.url=re}function B(){const re=this.resume(),ae=this.stack[this.stack.length-1];ae.title=re}function Z(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(re){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.label=ae,pe.identifier=Ds(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ve(re){this.data.characterReferenceType=re.type}function fe(re){const ae=this.sliceSerialize(re),pe=this.data.characterReferenceType;let ne;pe?(ne=xb(ae,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Mp(ae);const me=this.stack[this.stack.length-1];me.value+=ne}function Ee(re){const ae=this.stack.pop();ae.position.end=xo(re.end)}function Ne(re){J.call(this,re);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(re)}function Pe(re){J.call(this,re);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(re)}function je(){return{type:"blockquote",children:[]}}function ft(){return{type:"code",lang:null,meta:null,value:""}}function nt(){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 Qe(){return{type:"link",title:null,url:"",children:[]}}function rt(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 Rn(){return{type:"text",value:""}}function Tn(){return{type:"thematicBreak"}}}function xo(e){return{line:e.line,column:e.column,offset:e.offset}}function Pb(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Pb(e,o):LA(e,o)}}function LA(e,t){let n;for(n in t)if(Eb.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 Jx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is still open")}function OA(e){const t=this;t.parser=n;function n(o){return DA(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _A(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 MA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
444
|
+
`}]}function $A(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 l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function FA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=qs(o.toLowerCase()),l=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=l+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 h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}function UA(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 HA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Rb(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),l=i[0];l&&l.type==="text"?l.value="["+l.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 WA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Rb(e,t);const i={src:qs(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function VA(e,t){const n={src:qs(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 qA(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 GA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Rb(e,t);const i={href:qs(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function KA(e,t){const n={href:qs(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 YA(e,t,n){const o=e.all(t),i=n?XA(n):Tb(t),l={},c=[];if(typeof t.checked=="boolean"){const m=o[0];let x;m&&m.type==="element"&&m.tagName==="p"?x=m:(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:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const m=o[d];(i||d!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
446
|
+
`}),m.type==="element"&&m.tagName==="p"&&!i?c.push(...m.children):c.push(m)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
447
|
+
`});const h={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,h),e.applyData(t,h)}function XA(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=Tb(n[o])}return t}function Tb(e){const t=e.spread;return t??e.children.length>1}function QA(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 l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function JA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function e3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t3(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=Ip(t.children[1]),p=ub(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function n3(e,t,n){const o=n?n.children:void 0,l=(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 h=[];for(;++p<d;){const x=t.children[p],v={},b=c?c[p]:void 0;b&&(v.align=b);let N={type:"element",tagName:l,properties:v,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),h.push(N)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function r3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Zx=9,ey=32;function o3(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(ty(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(ty(t.slice(i),i>0,!1)),l.join("")}function ty(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===Zx||l===ey;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===Zx||l===ey;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function s3(e,t){const n={type:"text",value:o3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const a3={blockquote:_A,break:MA,code:$A,delete:FA,emphasis:zA,footnoteReference:BA,heading:UA,html:HA,imageReference:WA,image:VA,inlineCode:qA,linkReference:GA,link:KA,listItem:YA,list:QA,paragraph:JA,root:ZA,strong:e3,table:t3,tableCell:r3,tableRow:n3,text:s3,thematicBreak:i3,toml:Al,yaml:Al,definition:Al,footnoteDefinition:Al};function Al(){}const Ab=-1,Pc=0,qi=1,Zl=2,zp=3,Bp=4,Up=5,Hp=6,Db=7,Ib=8,ny=typeof self=="object"?self:globalThis,l3=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,c]=t[i];switch(l){case Pc:case Ab:return n(c,i);case qi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case Zl:{const d=n({},i);for(const[p,h]of c)d[o(p)]=o(h);return d}case zp:return n(new Date(c),i);case Bp:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case Up:{const d=n(new Map,i);for(const[p,h]of c)d.set(o(p),o(h));return d}case Hp:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case Db:{const{name:d,message:p}=c;return n(new ny[d](p),i)}case Ib: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 ny[l](c),i)};return o},ry=e=>l3(new Map,e)(0),Ss="",{toString:c3}={},{keys:u3}=Object,zi=e=>{const t=typeof e;if(t!=="object"||!e)return[Pc,t];const n=c3.call(e).slice(8,-1);switch(n){case"Array":return[qi,Ss];case"Object":return[Zl,Ss];case"Date":return[zp,Ss];case"RegExp":return[Bp,Ss];case"Map":return[Up,Ss];case"Set":return[Hp,Ss];case"DataView":return[qi,n]}return n.includes("Array")?[qi,n]:n.includes("Error")?[Db,n]:[Zl,n]},Dl=([e,t])=>e===Pc&&(t==="function"||t==="symbol"),d3=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},l=c=>{if(n.has(c))return n.get(c);let[d,p]=zi(c);switch(d){case Pc:{let m=c;switch(p){case"bigint":d=Ib,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([Ab],c)}return i([d,m],c)}case qi:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),i([p,[...v]],c)}const m=[],x=i([d,m],c);for(const v of c)m.push(l(v));return x}case Zl:{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 l(c.toJSON());const m=[],x=i([d,m],c);for(const v of u3(c))(e||!Dl(zi(c[v])))&&m.push([l(v),l(c[v])]);return x}case zp:return i([d,c.toISOString()],c);case Bp:{const{source:m,flags:x}=c;return i([d,{source:m,flags:x}],c)}case Up:{const m=[],x=i([d,m],c);for(const[v,b]of c)(e||!(Dl(zi(v))||Dl(zi(b))))&&m.push([l(v),l(b)]);return x}case Hp:{const m=[],x=i([d,m],c);for(const v of c)(e||!Dl(zi(v)))&&m.push(l(v));return x}}const{message:h}=c;return i([d,{name:p,message:h}],c)};return l},oy=(e,{json:t,lossy:n}={})=>{const o=[];return d3(!(t||n),!!t,new Map,o)(e),o},ec=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ry(oy(e,t)):structuredClone(e):(e,t)=>ry(oy(e,t));function f3(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 p3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function h3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||f3,o=e.options.footnoteBackLabel||p3,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const m=e.all(h),x=String(h.identifier).toUpperCase(),v=qs(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 P=typeof n=="string"?n:n(p,b);typeof P=="string"&&(P={type:"text",value:P}),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(P)?P:[P]})}const j=m[m.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const P=j.children[j.children.length-1];P&&P.type==="text"?P.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...N)}else m.push(...N);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(m,!0)};e.patch(h,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...ec(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 Lb=(function(e){if(e==null)return y3;if(typeof e=="function")return Rc(e);if(typeof e=="object")return Array.isArray(e)?m3(e):g3(e);if(typeof e=="string")return x3(e);throw new Error("Expected function, string, or object as test")});function m3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Lb(e[n]);return Rc(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function g3(e){const t=e;return Rc(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function x3(e){return Rc(t);function t(n){return n&&n.type===e}}function Rc(e){return t;function t(n,o,i){return!!(v3(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function y3(){return!0}function v3(e){return e!==null&&typeof e=="object"&&"type"in e}const Ob=[],b3=!0,sy=!1,w3="skip";function k3(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=Lb(i),c=o?-1:1;d(e,void 0,[])();function d(p,h,m){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=Ob,N,k,j;if((!t||l(p,h,m[m.length-1]||void 0))&&(b=j3(n(p,m)),b[0]===sy))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==w3)for(k=(o?S.children.length:-1)+c,j=m.concat(S);k>-1&&k<S.children.length;){const P=S.children[k];if(N=d(P,k,j)(),N[0]===sy)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function j3(e){return Array.isArray(e)?e:typeof e=="number"?[b3,e]:e==null?Ob:[e]}function _b(e,t,n,o){let i,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,i=n):(l=t,c=n,i=o),k3(e,l,d,i);function d(p,h){const m=h[h.length-1],x=m?m.children.indexOf(p):void 0;return c(p,x,m)}}const zf={}.hasOwnProperty,S3={};function C3(e,t){const n=t||S3,o=new Map,i=new Map,l=new Map,c={...a3,...n.handlers},d={all:h,applyData:E3,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:c,one:p,options:n,patch:N3,wrap:R3};return _b(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const x=m.type==="definition"?o:i,v=String(m.identifier).toUpperCase();x.has(v)||x.set(v,m)}}),d;function p(m,x){const v=m.type,b=d.handlers[v];if(zf.call(d.handlers,v)&&b)return b(d,m,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in m){const{children:k,...j}=m,S=ec(j);return S.children=d.all(m),S}return ec(m)}return(d.options.unknownHandler||P3)(d,m,x)}function h(m){const x=[];if("children"in m){const v=m.children;let b=-1;for(;++b<v.length;){const N=d.one(v[b],m);if(N){if(b&&v[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=iy(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=iy(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function N3(e,t){e.position&&(t.position=cR(e))}function E3(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=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"&&l&&Object.assign(n.properties,ec(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function P3(e,t){const n=t.data||{},o="value"in t&&!(zf.call(n,"hProperties")||zf.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 R3(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 iy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ay(e,t){const n=C3(e,t),o=n.one(e,void 0),i=h3(n),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
453
|
+
`},i),l}function T3(e,t){return e&&"run"in e?async function(n,o){const i=ay(n,{file:o,...t});await e.run(i,o)}:function(n,o){return ay(n,{file:o,...e||t})}}function ly(e){if(e)throw e}var Zd,cy;function A3(){if(cy)return Zd;cy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),x=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!x)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},d=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(o)return o(h,m).value}else return;return h[m]};return Zd=function p(){var h,m,x,v,b,N,k=arguments[0],j=1,S=arguments.length,P=!1;for(typeof k=="boolean"&&(P=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(h=arguments[j],h!=null)for(m in h)x=d(k,m),v=d(h,m),k!==v&&(P&&v&&(l(v)||(b=i(v)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&l(x)?x:{},c(k,{name:m,newValue:p(P,N,v)})):typeof v<"u"&&c(k,{name:m,newValue:v}));return k},Zd}var D3=A3();const ef=uc(D3);function Bf(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 I3(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-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,...h){const m=e[++l];let x=-1;if(p){c(p);return}for(;++x<i.length;)(h[x]===null||h[x]===void 0)&&(h[x]=i[x]);i=h,m?L3(m,d)(...h):c(null,...h)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function L3(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(h){const m=h;if(d&&n)throw m;return i(m)}d||(p&&p.then&&typeof p.then=="function"?p.then(l,i):p instanceof Error?i(p):l(p))}function i(c,...d){n||(n=!0,t(c,...d))}function l(c){i(null,c)}}const br={basename:O3,dirname:_3,extname:M3,join:$3,sep:"/"};function O3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');fa(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!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(l){n=i+1;break}}else c<0&&(l=!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 _3(e){if(fa(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 M3(e){fa(e);let t=e.length,n=-1,o=0,i=-1,l=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:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function $3(...e){let t=-1,n;for(;++t<e.length;)fa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":F3(n)}function F3(e){fa(e);const t=e.codePointAt(0)===47;let n=z3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function z3(e,t){let n="",o=0,i=-1,l=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||l===1))if(i!==c-1&&l===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,l=0;continue}}else if(n.length>0){n="",o=0,i=c,l=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,l=0}else d===46&&l>-1?l++:l=-1}return n}function fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B3={cwd:U3};function U3(){return"/"}function Uf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function H3(e){if(typeof e=="string")e=new URL(e);else if(!Uf(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 W3(e)}function W3(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 tf=["history","path","basename","stem","extname","dirname"];class Mb{constructor(t){let n;t?Uf(t)?n={path:t}:typeof t=="string"||V3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<tf.length;){const l=tf[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)tf.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){rf(t,"basename"),nf(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){uy(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(nf(t,"extname"),uy(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=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uf(t)&&(t=H3(t)),rf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){rf(t,"stem"),nf(t,"stem"),this.path=br.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 ln(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 nf(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function rf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function V3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q3=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),G3={}.hasOwnProperty;class Wp extends q3{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=I3()}copy(){const t=new Wp;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(ef(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(af("data",this.frozen),this.namespace[t]=n,this):G3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(af("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=Il(t),o=this.parser||this.Parser;return of("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),of("process",this.parser||this.Parser),sf("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,c){const d=Il(t),p=o.parse(d);o.run(p,d,function(m,x,v){if(m||!x||!v)return h(m);const b=x,N=o.stringify(b,v);X3(N)?v.value=N:v.result=N,h(m,v)});function h(m,x){m||!x?c(m):l?l(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),of("processSync",this.parser||this.Parser),sf("processSync",this.compiler||this.Compiler),this.process(t,i),fy("processSync","process",n),o;function i(l,c){n=!0,ly(l),o=c}}run(t,n,o){dy(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(c,d){const p=Il(n);i.run(t,p,h);function h(m,x,v){const b=x||t;m?d(m):c?c(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),fy("runSync","run",o),i;function l(c,d){ly(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=Il(n),i=this.compiler||this.Compiler;return sf("stringify",i),dy(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(af("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 l(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...x]=h;p(m,x)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(i.settings=ef(!0,i.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const x=h[m];l(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,m){let x=-1,v=-1;for(;++x<o.length;)if(o[x][0]===h){v=x;break}if(v===-1)o.push([h,...m]);else if(m.length>0){let[b,...N]=m;const k=o[v][1];Bf(k)&&Bf(b)&&(b=ef(!0,k,b)),o[v]=[h,b,...N]}}}}const K3=new Wp().freeze();function of(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function af(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 dy(e){if(!Bf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Il(e){return Y3(e)?e:new Mb(e)}function Y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function X3(e){return typeof e=="string"||Q3(e)}function Q3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const J3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",py=[],hy={allowDangerousHtml:!0},Z3=/^(https?|ircs?|mailto|xmpp)$/i,e4=[{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 t4(e){const t=n4(e),n=r4(e);return o4(t.runSync(t.parse(n),n),e)}function n4(e){const t=e.rehypePlugins||py,n=e.remarkPlugins||py,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hy}:hy;return K3().use(OA).use(n).use(T3,o).use(t)}function r4(e){const t=e.children||"",n=new Mb;return typeof t=="string"&&(n.value=t),n}function o4(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||s4;for(const m of e4)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+J3+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),_b(e,h),hR(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function h(m,x,v){if(m.type==="raw"&&v&&typeof x=="number")return c?v.children.splice(x,1):v.children[x]={type:"text",value:m.value},x;if(m.type==="element"){let b;for(b in Xd)if(Object.hasOwn(Xd,b)&&Object.hasOwn(m.properties,b)){const N=m.properties[b],k=Xd[b];(k===null||k.includes(m.tagName))&&(m.properties[b]=p(String(N||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(m,x,v)),b&&v&&typeof x=="number")return d&&m.children?v.children.splice(x,1,...m.children):v.children.splice(x,1),x}}}function s4(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||Z3.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()?a.jsx("div",{className:$e("prose-syntaur max-w-none",t),children:a.jsx(t4,{children:o})}):a.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 i4(){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 Tc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Vp(e){return"nodeType"in e}function Pn(e){var t,n;return e?Gs(e)?e:Vp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qp(e){const{Document:t}=Pn(e);return e instanceof t}function pa(e){return Gs(e)?!1:e instanceof Pn(e).HTMLElement}function $b(e){return e instanceof Pn(e).SVGElement}function Ks(e){return e?Gs(e)?e.document:Vp(e)?qp(e)?e:pa(e)||$b(e)?e.ownerDocument:document:document:document}const Pr=Tc?g.useLayoutEffect:g.useEffect;function Gp(e){const t=g.useRef(e);return Pr(()=>{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 a4(){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 na(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Pr(()=>{n.current!==e&&(n.current=e)},t),n}function ha(e,t){const n=g.useRef();return g.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function tc(e){const t=Gp(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 Hf(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let lf={};function ma(e,t){return g.useMemo(()=>{if(t)return t;const n=lf[e]==null?0:lf[e]+1;return lf[e]=n,e+"-"+n},[e,t])}function Fb(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((l,c)=>{const d=Object.entries(c);for(const[p,h]of d){const m=l[p];m!=null&&(l[p]=m+e*h)}return l},{...t})}}const Is=Fb(1),nc=Fb(-1);function l4(e){return"clientX"in e&&"clientY"in e}function Kp(e){if(!e)return!1;const{KeyboardEvent:t}=Pn(e.target);return t&&e instanceof t}function c4(e){if(!e)return!1;const{TouchEvent:t}=Pn(e.target);return t&&e instanceof t}function Wf(e){if(c4(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 l4(e)?{x:e.clientX,y:e.clientY}:null}const _s=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[_s.Translate.toString(e),_s.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),my="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function u4(e){return e.matches(my)?e:e.querySelector(my)}const d4={display:"none"};function f4(e){let{id:t,value:n}=e;return bt.createElement("div",{id:t,style:d4},n)}function p4(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 bt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function h4(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const zb=g.createContext(null);function m4(e){const t=g.useContext(zb);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function g4(){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:l}=o;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,l)})},[e]),t]}const x4={draggable:`
|
|
454
|
+
To pick up a draggable item, press the space bar.
|
|
455
|
+
While dragging, use the arrow keys to move the item.
|
|
456
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
457
|
+
`},y4={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 v4(e){let{announcements:t=y4,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=x4}=e;const{announce:l,announcement:c}=h4(),d=ma("DndLiveRegion"),[p,h]=g.useState(!1);if(g.useEffect(()=>{h(!0)},[]),m4(g.useMemo(()=>({onDragStart(x){let{active:v}=x;l(t.onDragStart({active:v}))},onDragMove(x){let{active:v,over:b}=x;t.onDragMove&&l(t.onDragMove({active:v,over:b}))},onDragOver(x){let{active:v,over:b}=x;l(t.onDragOver({active:v,over:b}))},onDragEnd(x){let{active:v,over:b}=x;l(t.onDragEnd({active:v,over:b}))},onDragCancel(x){let{active:v,over:b}=x;l(t.onDragCancel({active:v,over:b}))}}),[l,t])),!p)return null;const m=bt.createElement(bt.Fragment,null,bt.createElement(f4,{id:o,value:i.draggable}),bt.createElement(p4,{id:d,announcement:c}));return n?wo.createPortal(m,n):m}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 rc(){}function oc(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Bb(){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 cr=Object.freeze({x:0,y:0});function b4(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function w4(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function k4(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function j4(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function gy(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 Ub=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=gy(t,t.left,t.top),l=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const h=b4(gy(p),i);l.push({id:d,data:{droppableContainer:c,value:h}})}}return l.sort(w4)};function S4(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),l=Math.min(t.top+t.height,e.top+e.height),c=i-o,d=l-n;if(o<i&&n<l){const p=t.width*t.height,h=e.width*e.height,m=c*d,x=m/(p+h-m);return Number(x.toFixed(4))}return 0}const C4=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const l of o){const{id:c}=l,d=n.get(c);if(d){const p=S4(d,t);p>0&&i.push({id:c,data:{droppableContainer:l,value:p}})}}return i.sort(k4)};function N4(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Hb(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cr}function E4(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),l=1;l<o;l++)i[l-1]=arguments[l];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 P4=E4(1);function R4(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 T4(e,t,n){const o=R4(t);if(!o)return e;const{scaleX:i,scaleY:l,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),h=e.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?e.width/i:e.width,x=l?e.height/l:e.height;return{width:m,height:x,top:h,right:p+m,bottom:h+x,left:p}}const A4={ignoreTransform:!1};function Ys(e,t){t===void 0&&(t=A4);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=Pn(e).getComputedStyle(e);h&&(n=T4(n,h,m))}const{top:o,left:i,width:l,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:l,height:c,bottom:d,right:p}}function xy(e){return Ys(e,{ignoreTransform:!0})}function D4(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function I4(e,t){return t===void 0&&(t=Pn(e).getComputedStyle(e)),t.position==="fixed"}function L4(e,t){t===void 0&&(t=Pn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const l=t[i];return typeof l=="string"?n.test(l):!1})}function Yp(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(qp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!pa(i)||$b(i)||n.includes(i))return n;const l=Pn(e).getComputedStyle(i);return i!==e&&L4(i,l)&&n.push(i),I4(i,l)?n:o(i.parentNode)}return e?o(e):n}function Wb(e){const[t]=Yp(e,1);return t??null}function cf(e){return!Tc||!e?null:Gs(e)?e:Vp(e)?qp(e)||e===Ks(e).scrollingElement?window:pa(e)?e:null:null}function Vb(e){return Gs(e)?e.scrollX:e.scrollLeft}function qb(e){return Gs(e)?e.scrollY:e.scrollTop}function Vf(e){return{x:Vb(e),y:qb(e)}}var Bt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Bt||(Bt={}));function Gb(e){return!Tc||!e?!1:e===document.scrollingElement}function Kb(e){const t={x:0,y:0},n=Gb(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,l=e.scrollLeft<=t.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:l,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const O4={x:.2,y:.2};function _4(e,t,n,o,i){let{top:l,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=O4);const{isTop:h,isBottom:m,isLeft:x,isRight:v}=Kb(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!h&&l<=t.top+k.height?(b.y=Bt.Backward,N.y=o*Math.abs((t.top+k.height-l)/k.height)):!m&&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 M4(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,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 Yb(e){return e.reduce((t,n)=>Is(t,Vf(n)),cr)}function $4(e){return e.reduce((t,n)=>t+Vb(n),0)}function F4(e){return e.reduce((t,n)=>t+qb(n),0)}function z4(e,t){if(t===void 0&&(t=Ys),!e)return;const{top:n,left:o,bottom:i,right:l}=t(e);Wb(e)&&(i<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const B4=[["x",["left","right"],$4],["y",["top","bottom"],F4]];class Xp{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=Yp(n),i=Yb(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,c,d]of B4)for(const p of c)Object.defineProperty(this,p,{get:()=>{const h=d(o),m=i[l]-h;return this.rect[p]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Gi{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 U4(e){const{EventTarget:t}=Pn(e);return e instanceof t?e:Ks(e)}function uf(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 Xn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Xn||(Xn={}));function yy(e){e.preventDefault()}function H4(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 Xb={start:[Ve.Space,Ve.Enter],cancel:[Ve.Esc],end:[Ve.Space,Ve.Enter,Ve.Tab]},W4=(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 Ac{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 Gi(Ks(n)),this.windowListeners=new Gi(Pn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Xn.Resize,this.handleCancel),this.windowListeners.add(Xn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Xn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&z4(o),n(cr)}handleKeyDown(t){if(Kp(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:l=Xb,coordinateGetter:c=W4,scrollBehavior:d="smooth"}=i,{code:p}=t;if(l.end.includes(p)){this.handleEnd(t);return}if(l.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:h}=o.current,m=h?{x:h.left,y:h.top}:cr;this.referenceCoordinates||(this.referenceCoordinates=m);const x=c(t,{active:n,context:o.current,currentCoordinates:m});if(x){const v=nc(x,m),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const j=t.code,{isTop:S,isRight:P,isLeft:T,isBottom:L,maxScroll:O,minScroll:R}=Kb(k),$=M4(k),A={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))},q=j===Ve.Right&&!P||j===Ve.Left&&!T,J=j===Ve.Down&&!L||j===Ve.Up&&!S;if(q&&A.x!==x.x){const z=k.scrollLeft+v.x,G=j===Ve.Right&&z<=O.x||j===Ve.Left&&z>=R.x;if(G&&!v.y){k.scrollTo({left:z,behavior:d});return}G?b.x=k.scrollLeft-z:b.x=j===Ve.Right?k.scrollLeft-O.x:k.scrollLeft-R.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(J&&A.y!==x.y){const z=k.scrollTop+v.y,G=j===Ve.Down&&z<=O.y||j===Ve.Up&&z>=R.y;if(G&&!v.x){k.scrollTo({top:z,behavior:d});return}G?b.y=k.scrollTop-z:b.y=j===Ve.Down?k.scrollTop-O.y:k.scrollTop-R.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,Is(nc(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()}}Ac.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Xb,onActivation:i}=t,{active:l}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function vy(e){return!!(e&&"distance"in e)}function by(e){return!!(e&&"delay"in e)}class Qp{constructor(t,n,o){var i;o===void 0&&(o=U4(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:l}=t,{target:c}=l;this.props=t,this.events=n,this.document=Ks(c),this.documentListeners=new Gi(this.document),this.listeners=new Gi(o),this.windowListeners=new Gi(Pn(c)),this.initialCoordinates=(i=Wf(l))!=null?i:cr,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(Xn.Resize,this.handleCancel),this.windowListeners.add(Xn.DragStart,yy),this.windowListeners.add(Xn.VisibilityChange,this.handleCancel),this.windowListeners.add(Xn.ContextMenu,yy),this.documentListeners.add(Xn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(by(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(vy(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(Xn.Click,H4,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Xn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:l}=this,{onMove:c,options:{activationConstraint:d}}=l;if(!i)return;const p=(n=Wf(t))!=null?n:cr,h=nc(i,p);if(!o&&d){if(vy(d)){if(d.tolerance!=null&&uf(h,d.tolerance))return this.handleCancel();if(uf(h,d.distance))return this.handleStart()}if(by(d)&&uf(h,d.tolerance))return this.handleCancel();this.handlePending(d,h);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 V4={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Dc extends Qp{constructor(t){const{event:n}=t,o=Ks(n.target);super(t,V4,o)}}Dc.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 q4={move:{name:"mousemove"},end:{name:"mouseup"}};var qf;(function(e){e[e.RightClick=2]="RightClick"})(qf||(qf={}));class G4 extends Qp{constructor(t){super(t,q4,Ks(t.event.target))}}G4.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===qf.RightClick?!1:(o==null||o({event:n}),!0)}}];const df={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class K4 extends Qp{constructor(t){super(t,df)}static setup(){return window.addEventListener(df.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(df.move.name,t)};function t(){}}}K4.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 Ki;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ki||(Ki={}));var sc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(sc||(sc={}));function Y4(e){let{acceleration:t,activator:n=Ki.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:c=5,order:d=sc.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:v}=e;const b=Q4({delta:x,disabled:!l}),[N,k]=a4(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),P=g.useMemo(()=>{switch(n){case Ki.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Ki.DraggableRect:return i}},[n,i,p]),T=g.useRef(null),L=g.useCallback(()=>{const R=T.current;if(!R)return;const $=j.current.x*S.current.x,A=j.current.y*S.current.y;R.scrollBy($,A)},[]),O=g.useMemo(()=>d===sc.TreeOrder?[...h].reverse():h,[d,h]);g.useEffect(()=>{if(!l||!h.length||!P){k();return}for(const R of O){if((o==null?void 0:o(R))===!1)continue;const $=h.indexOf(R),A=m[$];if(!A)continue;const{direction:q,speed:J}=_4(R,A,P,t,v);for(const z of["x","y"])b[z][q[z]]||(J[z]=0,q[z]=0);if(J.x>0||J.y>0){k(),T.current=R,N(L,c),j.current=J,S.current=q;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,L,o,k,l,c,JSON.stringify(P),JSON.stringify(b),N,h,O,m,JSON.stringify(v)])}const X4={x:{[Bt.Backward]:!1,[Bt.Forward]:!1},y:{[Bt.Backward]:!1,[Bt.Forward]:!1}};function Q4(e){let{delta:t,disabled:n}=e;const o=Hf(t);return ha(i=>{if(n||!o||!i)return X4;const l={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Bt.Backward]:i.x[Bt.Backward]||l.x===-1,[Bt.Forward]:i.x[Bt.Forward]||l.x===1},y:{[Bt.Backward]:i.y[Bt.Backward]||l.y===-1,[Bt.Forward]:i.y[Bt.Forward]||l.y===1}}},[n,t,o])}function J4(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return ha(i=>{var l;return t==null?null:(l=o??i)!=null?l:null},[o,t])}function Z4(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,l=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...l]},[]),[e,t])}var ra;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ra||(ra={}));var Gf;(function(e){e.Optimized="optimized"})(Gf||(Gf={}));const wy=new Map;function eD(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,c]=g.useState(null),{frequency:d,measure:p,strategy:h}=i,m=g.useRef(e),x=j(),v=na(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!v.current&&c(P=>P===null?S:P.concat(S.filter(T=>!P.includes(T))))},[v]),N=g.useRef(null),k=ha(S=>{if(x&&!n)return wy;if(!S||S===wy||m.current!==e||l!=null){const P=new Map;for(let T of e){if(!T)continue;if(l&&l.length>0&&!l.includes(T.id)&&T.rect.current){P.set(T.id,T.rect.current);continue}const L=T.node.current,O=L?new Xp(p(L),L):null;T.rect.current=O,O&&P.set(T.id,O)}return P}return S},[e,l,n,x,p]);return g.useEffect(()=>{m.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{l&&l.length>0&&c(null)},[JSON.stringify(l)]),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:l!=null};function j(){switch(h){case ra.Always:return!1;case ra.BeforeDragging:return n;default:return!n}}}function Qb(e,t){return ha(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function tD(e,t){return Qb(e,t)}function nD(e){let{callback:t,disabled:n}=e;const o=Gp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(o)},[o,n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ic(e){let{callback:t,disabled:n}=e;const o=Gp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(o)},[n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function rD(e){return new Xp(Ys(e),e)}function ky(e,t,n){t===void 0&&(t=rD);const[o,i]=g.useState(null);function l(){i(p=>{if(!e)return null;if(e.isConnected===!1){var h;return(h=p??n)!=null?h:null}const m=t(e);return JSON.stringify(p)===JSON.stringify(m)?p:m})}const c=nD({callback(p){if(e)for(const h of p){const{type:m,target:x}=h;if(m==="childList"&&x instanceof HTMLElement&&x.contains(e)){l();break}}}}),d=Ic({callback:l});return Pr(()=>{l(),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 oD(e){const t=Qb(e);return Hb(e,t)}const jy=[];function sD(e){const t=g.useRef(e),n=ha(o=>e?o&&o!==jy&&e&&t.current&&e.parentNode===t.current.parentNode?o:Yp(e):jy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function iD(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(l=>{const c=cf(l.target);c&&n(d=>d?(d.set(c,Vf(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=o.current;if(e!==l){c(l);const d=e.map(p=>{const h=cf(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,Vf(h)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(l)};function c(d){d.forEach(p=>{const h=cf(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,c)=>Is(l,c),cr):Yb(e):cr,[e,t])}function Sy(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const o=e!==cr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?nc(e,n.current):cr}function aD(e){g.useEffect(()=>{if(!Tc)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 lD(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:l}=o;return n[i]=c=>{l(c,t)},n},{}),[e,t])}function Jb(e){return g.useMemo(()=>e?D4(e):null,[e])}const Cy=[];function cD(e,t){t===void 0&&(t=Ys);const[n]=e,o=Jb(n?Pn(n):null),[i,l]=g.useState(Cy);function c(){l(()=>e.length?e.map(p=>Gb(p)?o:new Xp(t(p),p)):Cy)}const d=Ic({callback:c});return Pr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function uD(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return pa(t)?t:e}function dD(e){let{measure:t}=e;const[n,o]=g.useState(null),i=g.useCallback(h=>{for(const{target:m}of h)if(pa(m)){o(x=>{const v=t(m);return x?{...x,width:v.width,height:v.height}:v});break}},[t]),l=Ic({callback:i}),c=g.useCallback(h=>{const m=uD(h);l==null||l.disconnect(),m&&(l==null||l.observe(m)),o(m?t(m):null)},[t,l]),[d,p]=tc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const fD=[{sensor:Dc,options:{}},{sensor:Ac,options:{}}],pD={current:{}},ql={draggable:{measure:xy},droppable:{measure:xy,strategy:ra.WhileDragging,frequency:Gf.Optimized},dragOverlay:{measure:Ys}};class Yi 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 hD={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Yi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:rc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ql,measureDroppableContainers:rc,windowRect:null,measuringScheduled:!1},mD={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:rc,draggableNodes:new Map,over:null,measureDroppableContainers:rc},Lc=g.createContext(mD),Zb=g.createContext(hD);function gD(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yi}}}function xD(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 Yi(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,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const c=new Yi(e.droppable.containers);return c.set(n,{...l,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 l=new Yi(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function yD(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=g.useContext(Lc),l=Hf(o),c=Hf(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&l&&c!=null){if(!Kp(l)||document.activeElement===l.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:h}=d;if(!p.current&&!h.current)return;requestAnimationFrame(()=>{for(const m of[p.current,h.current]){if(!m)continue;const x=u4(m);if(x){x.focus();break}}})}},[o,t,i,c,l]),null}function vD(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,l)=>l({transform:i,...o}),n):n}function bD(e){return g.useMemo(()=>({draggable:{...ql.draggable,...e==null?void 0:e.draggable},droppable:{...ql.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ql.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 wD(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=g.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Pr(()=>{if(!c&&!d||!t){l.current=!1;return}if(l.current||!o)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const m=n(h),x=Hb(m,o);if(c||(x.x=0),d||(x.y=0),l.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=Wb(h);v&&v.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const ew=g.createContext({...cr,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 tw=g.memo(function(t){var n,o,i,l;let{id:c,accessibility:d,autoScroll:p=!0,children:h,sensors:m=fD,collisionDetection:x=C4,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(xD,void 0,gD),[j,S]=k,[P,T]=g4(),[L,O]=g.useState(bo.Uninitialized),R=L===bo.Initialized,{draggable:{active:$,nodes:A,translate:q},droppable:{containers:J}}=j,z=$!=null?A.get($):null,G=g.useRef({initial:null,translated:null}),Y=g.useMemo(()=>{var Fe;return $!=null?{id:$,data:(Fe=z==null?void 0:z.data)!=null?Fe:pD,rect:G}:null},[$,z]),Q=g.useRef(null),[_,D]=g.useState(null),[F,U]=g.useState(null),K=na(N,Object.values(N)),E=ma("DndDescribedBy",c),B=g.useMemo(()=>J.getEnabled(),[J]),Z=bD(v),{droppableRects:I,measureDroppableContainers:de,measuringScheduled:ve}=eD(B,{dragging:R,dependencies:[q.x,q.y],config:Z.droppable}),fe=J4(A,$),Ee=g.useMemo(()=>F?Wf(F):null,[F]),Ne=pt(),Pe=tD(fe,Z.draggable.measure);wD({activeNode:$!=null?A.get($):null,config:Ne.layoutShiftCompensation,initialRect:Pe,measure:Z.draggable.measure});const je=ky(fe,Z.draggable.measure,Pe),ft=ky(fe?fe.parentElement:null),nt=g.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:J,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=J.getNodeFor((n=nt.current.over)==null?void 0:n.id),Be=dD({measure:Z.dragOverlay.measure}),Ct=(o=Be.nodeRef.current)!=null?o:fe,Ot=R?(i=Be.rect)!=null?i:je:null,cn=!!(Be.nodeRef.current&&Be.rect),hn=oD(cn?null:je),Qe=Jb(Ct?Pn(Ct):null),rt=sD(R?Ue??fe:null),Vt=cD(rt),Qt=vD(b,{transform:{x:q.x-hn.x,y:q.y-hn.y,scaleX:1,scaleY:1},activatorEvent:F,active:Y,activeNodeRect:je,containerNodeRect:ft,draggingNodeRect:Ot,over:nt.current.over,overlayNodeRect:Be.rect,scrollableAncestors:rt,scrollableAncestorRects:Vt,windowRect:Qe}),mn=Ee?Is(Ee,q):null,Rn=iD(rt),Tn=Sy(Rn),re=Sy(Rn,[je]),ae=Is(Qt,Tn),pe=Ot?P4(Ot,Qt):null,ne=Y&&pe?x({active:Y,collisionRect:pe,droppableRects:I,droppableContainers:B,pointerCoordinates:mn}):null,me=j4(ne,"id"),[ke,_t]=g.useState(null),Jt=cn?Qt:Is(Qt,re),qt=N4(Jt,(l=ke==null?void 0:ke.rect)!=null?l:null,je),V=g.useRef(null),le=g.useCallback((Fe,Xe)=>{let{sensor:wt,options:Mt}=Xe;if(Q.current==null)return;const Gt=A.get(Q.current);if(!Gt)return;const en=Fe.nativeEvent,gn=new wt({active:Q.current,activeNode:Gt,event:en,options:Mt,context:nt,onAbort(ht){if(!A.get(ht))return;const{onDragAbort:tn}=K.current,Zn={id:ht};tn==null||tn(Zn),P({type:"onDragAbort",event:Zn})},onPending(ht,Hn,tn,Zn){if(!A.get(ht))return;const{onDragPending:hr}=K.current,An={id:ht,constraint:Hn,initialCoordinates:tn,offset:Zn};hr==null||hr(An),P({type:"onDragPending",event:An})},onStart(ht){const Hn=Q.current;if(Hn==null)return;const tn=A.get(Hn);if(!tn)return;const{onDragStart:Zn}=K.current,er={activatorEvent:en,active:{id:Hn,data:tn.data,rect:G}};wo.unstable_batchedUpdates(()=>{Zn==null||Zn(er),O(bo.Initializing),S({type:Dt.DragStart,initialCoordinates:ht,active:Hn}),P({type:"onDragStart",event:er}),D(V.current),U(en)})},onMove(ht){S({type:Dt.DragMove,coordinates:ht})},onEnd:Ar(Dt.DragEnd),onCancel:Ar(Dt.DragCancel)});V.current=gn;function Ar(ht){return async function(){const{active:tn,collisions:Zn,over:er,scrollAdjustedTranslate:hr}=nt.current;let An=null;if(tn&&hr){const{cancelDrop:Dr}=K.current;An={activatorEvent:en,active:tn,collisions:Zn,delta:hr,over:er},ht===Dt.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(An))&&(ht=Dt.DragCancel)}Q.current=null,wo.unstable_batchedUpdates(()=>{S({type:ht}),O(bo.Uninitialized),_t(null),D(null),U(null),V.current=null;const Dr=ht===Dt.DragEnd?"onDragEnd":"onDragCancel";if(An){const Zs=K.current[Dr];Zs==null||Zs(An),P({type:Dr,event:An})}})}}},[A]),ge=g.useCallback((Fe,Xe)=>(wt,Mt)=>{const Gt=wt.nativeEvent,en=A.get(Mt);if(Q.current!==null||!en||Gt.dndKit||Gt.defaultPrevented)return;const gn={active:en};Fe(wt,Xe.options,gn)===!0&&(Gt.dndKit={capturedBy:Xe.sensor},Q.current=Mt,le(wt,Xe))},[A,le]),Oe=Z4(m,ge);aD(m),Pr(()=>{je&&L===bo.Initializing&&O(bo.Initialized)},[je,L]),g.useEffect(()=>{const{onDragMove:Fe}=K.current,{active:Xe,activatorEvent:wt,collisions:Mt,over:Gt}=nt.current;if(!Xe||!wt)return;const en={active:Xe,activatorEvent:wt,collisions:Mt,delta:{x:ae.x,y:ae.y},over:Gt};wo.unstable_batchedUpdates(()=>{Fe==null||Fe(en),P({type:"onDragMove",event:en})})},[ae.x,ae.y]),g.useEffect(()=>{const{active:Fe,activatorEvent:Xe,collisions:wt,droppableContainers:Mt,scrollAdjustedTranslate:Gt}=nt.current;if(!Fe||Q.current==null||!Xe||!Gt)return;const{onDragOver:en}=K.current,gn=Mt.get(me),Ar=gn&&gn.rect.current?{id:gn.id,rect:gn.rect.current,data:gn.data,disabled:gn.disabled}:null,ht={active:Fe,activatorEvent:Xe,collisions:wt,delta:{x:Gt.x,y:Gt.y},over:Ar};wo.unstable_batchedUpdates(()=>{_t(Ar),en==null||en(ht),P({type:"onDragOver",event:ht})})},[me]),Pr(()=>{nt.current={activatorEvent:F,active:Y,activeNode:fe,collisionRect:pe,collisions:ne,droppableRects:I,draggableNodes:A,draggingNode:Ct,draggingNodeRect:Ot,droppableContainers:J,over:ke,scrollableAncestors:rt,scrollAdjustedTranslate:ae},G.current={initial:Ot,translated:pe}},[Y,fe,ne,pe,A,Ct,Ot,I,J,ke,rt,ae]),Y4({...Ne,delta:q,draggingRect:pe,pointerCoordinates:mn,scrollableAncestors:rt,scrollableAncestorRects:Vt});const Un=g.useMemo(()=>({active:Y,activeNode:fe,activeNodeRect:je,activatorEvent:F,collisions:ne,containerNodeRect:ft,dragOverlay:Be,draggableNodes:A,droppableContainers:J,droppableRects:I,over:ke,measureDroppableContainers:de,scrollableAncestors:rt,scrollableAncestorRects:Vt,measuringConfiguration:Z,measuringScheduled:ve,windowRect:Qe}),[Y,fe,je,F,ne,ft,Be,A,J,I,ke,de,rt,Vt,Z,ve,Qe]),Zt=g.useMemo(()=>({activatorEvent:F,activators:Oe,active:Y,activeNodeRect:je,ariaDescribedById:{draggable:E},dispatch:S,draggableNodes:A,over:ke,measureDroppableContainers:de}),[F,Oe,Y,je,S,E,A,ke,de]);return bt.createElement(zb.Provider,{value:T},bt.createElement(Lc.Provider,{value:Zt},bt.createElement(Zb.Provider,{value:Un},bt.createElement(ew.Provider,{value:qt},h)),bt.createElement(yD,{disabled:(d==null?void 0:d.restoreFocus)===!1})),bt.createElement(v4,{...d,hiddenTextDescribedById:E}));function pt(){const Fe=(_==null?void 0:_.autoScrollEnabled)===!1,Xe=typeof p=="object"?p.enabled===!1:p===!1,wt=R&&!Fe&&!Xe;return typeof p=="object"?{...p,enabled:wt}:{enabled:wt}}}),kD=g.createContext(null),Ny="button",jD="Draggable";function SD(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=ma(jD),{activators:c,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:v}=g.useContext(Lc),{role:b=Ny,roleDescription:N="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=g.useContext(j?ew:kD),[P,T]=tc(),[L,O]=tc(),R=lD(c,t),$=na(n);Pr(()=>(x.set(t,{id:t,key:l,node:P,activatorNode:L,data:$}),()=>{const q=x.get(t);q&&q.key===l&&x.delete(t)}),[x,t]);const A=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":j&&b===Ny?!0:void 0,"aria-roledescription":N,"aria-describedby":m.draggable}),[o,b,k,j,N,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:A,isDragging:j,listeners:o?void 0:R,node:P,over:v,setNodeRef:T,setActivatorNodeRef:O,transform:S}}function CD(){return g.useContext(Zb)}const ND="Droppable",ED={timeout:25};function PD(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=ma(ND),{active:c,dispatch:d,over:p,measureDroppableContainers:h}=g.useContext(Lc),m=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:j}={...ED,...i},S=na(k??o),P=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),T=Ic({callback:P,disabled:N||!c}),L=g.useCallback((A,q)=>{T&&(q&&(T.unobserve(q),x.current=!1),A&&T.observe(A))},[T]),[O,R]=tc(L),$=na(t);return g.useEffect(()=>{!T||!O.current||(T.disconnect(),x.current=!1,T.observe(O.current))},[O,T]),g.useEffect(()=>(d({type:Dt.RegisterDroppable,element:{id:o,key:l,disabled:n,node:O,rect:v,data:$}}),()=>d({type:Dt.UnregisterDroppable,key:l,id:o})),[o]),g.useEffect(()=>{n!==m.current.disabled&&(d({type:Dt.SetDroppableDisabled,id:o,key:l,disabled:n}),m.current.disabled=n)},[o,l,n,d]),{active:c,rect:v,isOver:(p==null?void 0:p.id)===o,node:O,over:p,setNodeRef:R}}function Oc(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function RD(e,t){return e.reduce((n,o,i)=>{const l=t.get(o);return l&&(n[i]=l),n},Array(e.length))}function Ll(e){return e!==null&&e>=0}function TD(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 AD(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const nw=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const l=Oc(t,o,n),c=t[i],d=l[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}},Ol={scaleX:1,scaleY:1},rw=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:l,overIndex:c}=e;const d=(t=l[n])!=null?t:o;if(!d)return null;if(i===n){const h=l[c];return h?{x:0,y:n<c?h.top+h.height-(d.top+d.height):h.top-d.top,...Ol}:null}const p=DD(l,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Ol}:i<n&&i>=c?{x:0,y:d.height+p,...Ol}:{x:0,y:0,...Ol}};function DD(e,t,n){const o=e[t],i=e[t-1],l=e[t+1];return o?n<t?i?o.top-(i.top+i.height):l?l.top-(o.top+o.height):0:l?l.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const ow="Sortable",sw=bt.createContext({activeIndex:-1,containerId:ow,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nw,disabled:{draggable:!1,droppable:!1}});function iw(e){let{children:t,id:n,items:o,strategy:i=nw,disabled:l=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=CD(),x=ma(ow,n),v=d.rect!==null,b=g.useMemo(()=>o.map(R=>typeof R=="object"&&"id"in R?R.id:R),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,j=h?b.indexOf(h.id):-1,S=g.useRef(b),P=!TD(b,S.current),T=j!==-1&&k===-1||P,L=AD(l);Pr(()=>{P&&N&&m(b)},[P,b,N,m]),g.useEffect(()=>{S.current=b},[b]);const O=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:L,disableTransforms:T,items:b,overIndex:j,useDragOverlay:v,sortedRects:RD(b,p),strategy:i}),[k,x,L.draggable,L.droppable,T,b,j,p,v,i]);return bt.createElement(sw.Provider,{value:O},t)}const ID=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Oc(n,o,i).indexOf(t)},LD=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:l,newIndex:c,previousItems:d,previousContainerId:p,transition:h}=e;return!h||!o||d!==l&&i===c?!1:n?!0:c!==i&&t===p},OD={duration:200,easing:"ease"},aw="transform",_D=_s.Transition.toString({property:aw,duration:0,easing:"linear"}),MD={roleDescription:"sortable"};function $D(e){let{disabled:t,index:n,node:o,rect:i}=e;const[l,c]=g.useState(null),d=g.useRef(n);return Pr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const h=Ys(o.current,{ignoreTransform:!0}),m={x:p.left-h.left,y:p.top-h.top,scaleX:p.width/h.width,scaleY:p.height/h.height};(m.x||m.y)&&c(m)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{l&&c(null)},[l]),l}function lw(e){let{animateLayoutChanges:t=LD,attributes:n,disabled:o,data:i,getNewIndex:l=ID,id:c,strategy:d,resizeObserverConfig:p,transition:h=OD}=e;const{items:m,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:P}=g.useContext(sw),T=FD(o,b),L=m.indexOf(c),O=g.useMemo(()=>({sortable:{containerId:x,index:L,items:m},...i}),[x,i,L,m]),R=g.useMemo(()=>m.slice(m.indexOf(c)),[m,c]),{rect:$,node:A,isOver:q,setNodeRef:J}=PD({id:c,data:O,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...p}}),{active:z,activatorEvent:G,activeNodeRect:Y,attributes:Q,setNodeRef:_,listeners:D,isDragging:F,over:U,setActivatorNodeRef:K,transform:E}=SD({id:c,data:O,attributes:{...MD,...n},disabled:T.draggable}),B=i4(J,_),Z=!!z,I=Z&&!N&&Ll(v)&&Ll(j),de=!S&&F,ve=de&&I?E:null,Ee=I?ve??(d??P)({rects:k,activeNodeRect:Y,activeIndex:v,overIndex:j,index:L}):null,Ne=Ll(v)&&Ll(j)?l({id:c,items:m,activeIndex:v,overIndex:j}):L,Pe=z==null?void 0:z.id,je=g.useRef({activeId:Pe,items:m,newIndex:Ne,containerId:x}),ft=m!==je.current.items,nt=t({active:z,containerId:x,isDragging:F,isSorting:Z,id:c,index:L,items:m,newIndex:je.current.newIndex,previousItems:je.current.items,previousContainerId:je.current.containerId,transition:h,wasDragging:je.current.activeId!=null}),Ue=$D({disabled:!nt,index:L,node:A,rect:$});return g.useEffect(()=>{Z&&je.current.newIndex!==Ne&&(je.current.newIndex=Ne),x!==je.current.containerId&&(je.current.containerId=x),m!==je.current.items&&(je.current.items=m)},[Z,Ne,x,m]),g.useEffect(()=>{if(Pe===je.current.activeId)return;if(Pe!=null&&je.current.activeId==null){je.current.activeId=Pe;return}const Ct=setTimeout(()=>{je.current.activeId=Pe},50);return()=>clearTimeout(Ct)},[Pe]),{active:z,activeIndex:v,attributes:Q,data:O,rect:$,index:L,newIndex:Ne,items:m,isOver:q,isSorting:Z,isDragging:F,listeners:D,node:A,overIndex:j,over:U,setNodeRef:B,setActivatorNodeRef:K,setDroppableNodeRef:J,setDraggableNodeRef:_,transform:Ue??Ee,transition:Be()};function Be(){if(Ue||ft&&je.current.newIndex===L)return _D;if(!(de&&!Kp(G)||!h)&&(Z||nt))return _s.Transition.toString({...h,property:aw})}}function FD(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 Ro(e){return`/api/projects/${encodeURIComponent(e)}/todos`}function zD(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{if(e)try{const p=await fetch(Ro(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]),gc(p=>{p.type==="todos-updated"&&p.projectSlug===e&&d()}),{data:t,loading:o,error:l,refetch:d}}async function BD(e,t,n){await fetch(Ro(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function UD(e,t,n){await fetch(`${Ro(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function HD(e,t,n){await fetch(`${Ro(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function WD(e,t,n){await fetch(`${Ro(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function VD(e,t){await fetch(`${Ro(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function qD(e,t){await fetch(`${Ro(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function GD(e,t){await fetch(`${Ro(e)}/${t}`,{method:"DELETE"})}const Ey=[{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 Jp({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 l=Ey.find(c=>c.value===e);return a.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[a.jsx("button",{onClick:()=>o(!n),className:`text-lg leading-none ${l.color} hover:opacity-70 transition`,title:l.label,children:l.icon}),n&&a.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:Ey.filter(c=>c.value!==e).map(c=>a.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:[a.jsx("span",{className:"text-base leading-none",children:c.icon}),a.jsx("span",{children:c.label})]},c.value))})]})}function KD({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:h,setNodeRef:m,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=lw({id:e.id,disabled:c}),k={transform:_s.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:m,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...h,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Cv,{className:"h-4 w-4"})}),a.jsx(Jp,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-blue-400/60 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[a.jsx(hc,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(mc,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(Eo,{className:"h-3 w-3"})})]})]})}function YD({projectId:e}){const{data:t,loading:n,error:o,refetch:i}=zD(e),[l,c]=g.useState(""),[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState(null),k=g.useRef(null);Xo("list:todos");const j=!!(l.trim()||d||h),S=Bb(oc(Dc,{activationConstraint:{distance:8}}),oc(Ac));function P(D,F){D.stopPropagation(),navigator.clipboard.writeText(F),N(F),setTimeout(()=>N(U=>U===F?null:U),1500)}const T=g.useMemo(()=>{if(!(t!=null&&t.items))return[];const D=new Set;for(const F of t.items)for(const U of F.tags)D.add(U);return Array.from(D).sort()},[t]),L=g.useMemo(()=>{if(!(t!=null&&t.items))return[];let D=t.items;if(l.trim()){const F=l.toLowerCase();D=D.filter(U=>U.description.toLowerCase().includes(F)||U.tags.some(K=>K.toLowerCase().includes(F))||U.id.includes(F))}return d&&(D=D.filter(F=>F.status===d)),h&&(D=D.filter(F=>F.tags.includes(h))),D},[t,l,d,h]);async function O(){x.trim()&&(await BD(e,x.trim()),v(""),i())}const R={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function $(D,F){q(D,R[F]||"open")}async function A(D,F,U){D.stopPropagation(),window.confirm(`Delete "${U}"? This can't be undone.`)&&(await GD(e,F),i())}async function q(D,F){switch(F){case"open":await VD(e,D);break;case"in_progress":await WD(e,D);break;case"completed":await UD(e,D);break;case"blocked":await HD(e,D);break}i()}const{hotkeyRowProps:J}=ca(L,{scope:"list:todos",bindO:!1,onOpen:D=>$(D.id,D.status)});ct({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var D;return(D=k.current)==null?void 0:D.focus()}}),ct({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>i()});const[z,G]=No(),Y=z.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 F=window.setTimeout(()=>{D.classList.remove("ring-2","ring-primary/60"),G(U=>{const K=new URLSearchParams(U);return K.delete("focus"),K},{replace:!0})},1500);return()=>window.clearTimeout(F)},[Y,L.length,G]);async function Q(D){const{active:F,over:U}=D;if(!U||F.id===U.id||!(t!=null&&t.items))return;const K=t.items.findIndex(Z=>Z.id===F.id),E=t.items.findIndex(Z=>Z.id===U.id);if(K===-1||E===-1)return;const B=Oc(t.items,K,E);await qD(e,B.map(Z=>Z.id)),i()}if(n)return a.jsx(yt,{label:"Loading todos..."});if(o)return a.jsx(dt,{error:o});const _=(t==null?void 0:t.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Ke,{label:"Open",value:_.open,icon:Fn}),a.jsx(Ke,{label:"In Progress",value:_.in_progress,icon:Fn,tone:"info"}),a.jsx(Ke,{label:"Blocked",value:_.blocked,icon:Us,tone:"warn"}),a.jsx(Ke,{label:"Total",value:_.total,icon:Fn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:D=>v(D.target.value),onKeyDown:D=>D.key==="Enter"&&O(),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"}),a.jsxs("button",{onClick:O,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:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Bs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:k,type:"text",placeholder:"Search...",value:l,onChange:D=>c(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"})]}),a.jsxs("select",{value:d,onChange:D=>p(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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),T.length>0&&a.jsxs("select",{value:h,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:[a.jsx("option",{value:"",children:"All tags"}),T.map(D=>a.jsxs("option",{value:D,children:["#",D]},D))]})]}),L.length===0?a.jsx(Ye,{title:"No todos",description:"Add your first todo above."}):a.jsx(tw,{sensors:S,collisionDetection:Ub,onDragEnd:Q,children:a.jsx(iw,{items:L.map(D=>D.id),strategy:rw,children:a.jsx("div",{className:"space-y-1",children:L.map((D,F)=>a.jsx(KD,{item:D,copiedId:b,onCycleStatus:$,onStatusChange:q,onCopyId:P,onDelete:A,disabled:j,hotkeyRowProps:J(F)},D.id))})})})]})}const XD=new Set(["overview","assignments","todos","dependencies","knowledge"]);function Py(){const{slug:e}=St(),t=Pt(),n=Wt();Xo("project"),ct({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),ct({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:l,refetch:c}=Gv(e),d=Cc(),{data:p}=fp(),[h,m]=No(),x=h.get("tab"),v=x&&XD.has(x)?x:"overview";function b(z){m(G=>{const Y=new URLSearchParams(G);return z==="overview"?Y.delete("tab"):Y.set("tab",z),Y},{replace:!0})}const[N,k]=g.useState("board"),[j,S]=g.useState("all"),[P,T]=g.useState("all"),[L,O]=g.useState("all"),R=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(z=>{const G=`${t}/projects/${o.slug}/assignments/${z.slug}`;return[[z.slug,G],[z.title,G]]})):{},[o]);async function $(z){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:z})}),c()}async function A(z){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:z})}),c()}if(i)return a.jsx(yt,{label:"Loading project workspace…"});if(l||!o)return a.jsx(dt,{error:l||"Project not found."});const q=Array.from(new Set(o.assignments.map(z=>z.assignee).filter(Boolean))).sort(),J=o.assignments.filter(z=>!(j!=="all"&&z.status!==j||P!=="all"&&z.assignee!==P||L!=="all"&&z.priority!==L));return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Ht,{status:o.status}),o.statusOverride&&a.jsx("button",{type:"button",className:"shell-action border-amber-300 text-amber-700 dark:border-amber-700 dark:text-amber-300",onClick:()=>$(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:z=>{z.target.value&&$(z.target.value)},title:"Override project status",children:[a.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(z=>a.jsx("option",{value:z.id,children:z.label},z.id)),a.jsx("option",{value:"active",children:"Active"})]}),p&&p.workspaces.length>0&&a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:z=>{z.target.value==="_ungrouped"?A(null):z.target.value&&A(z.target.value)},title:"Move project to a different workspace",children:[a.jsx("option",{value:"",children:"Move to Workspace…"}),p.workspaces.filter(z=>z!==o.workspace).map(z=>a.jsx("option",{value:z,children:z},z)),o.workspace&&a.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),a.jsxs(Ce,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(ox,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Project"})]}),a.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",ko(o.created),". Last source update ",Cr(o.updated),"."]})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[a.jsx(Ke,{label:"Assignments",value:o.progress.total}),a.jsx(Ke,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),a.jsx(Ke,{label:"Review",value:o.progress.review??0,tone:"info"}),a.jsx(Ke,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),a.jsx(Ke,{label:"Completed",value:o.progress.completed??0,tone:"success"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx(Tp,{value:v,onValueChange:b,items:[{value:"overview",label:"Overview",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Re,{title:"Project Overview",children:a.jsx(Ut,{content:o.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:o.assignments.length,content:a.jsx("div",{className:"space-y-5",children:a.jsx(Re,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("select",{value:j,onChange:z=>S(z.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(z=>a.jsx("option",{value:z.id,children:z.label},z.id))]}),a.jsxs("select",{value:P,onChange:z=>T(z.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),q.map(z=>a.jsx("option",{value:z??"",children:z},z))]}),a.jsxs("select",{value:L,onChange:z=>O(z.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]}),a.jsx(Ep,{value:N,onChange:z=>k(z),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:J.length===0?a.jsx(Ye,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:a.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:"Create Assignment"})}):N==="board"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:J.map(z=>a.jsx(QD,{projectSlug:o.slug,assignment:z},z.slug))}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),a.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:J.map(z=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[a.jsx("td",{className:"py-4",children:a.jsx(Ce,{to:`${t}/projects/${o.slug}/assignments/${z.slug}`,className:"font-semibold text-foreground hover:text-primary",children:z.title})}),a.jsx("td",{className:"py-4",children:a.jsx(Ht,{status:z.status})}),a.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:z.priority}),a.jsx("td",{className:"py-4 text-muted-foreground",children:z.assignee??"—"}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(z.updated)})]},z.slug))})]})})})})},{value:"todos",label:"Todos",content:a.jsx(YD,{projectId:o.slug})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?a.jsx(Re,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:a.jsx($P,{definition:o.dependencyGraph,nodeRoutes:R})}):a.jsx(Ye,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:a.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[a.jsx(Re,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?a.jsx(Ye,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):a.jsx("div",{className:"space-y-3",children:o.resources.map(z=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:z.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[z.category," · ",z.source]})]},z.slug))})}),a.jsx(Re,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?a.jsx(Ye,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):a.jsx("div",{className:"space-y-3",children:o.memories.map(z=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:z.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[z.scope," · ",z.source]})]},z.slug))})})]})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Re,{title:"Progress Summary",children:a.jsx(Jl,{progress:o.progress,showLegend:!0})}),a.jsx(Re,{title:"Attention",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.blockedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.failedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.openQuestions})]})]})}),a.jsx(Re,{title:"Quick Links",children:a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(ox,{className:"h-4 w-4"}),"Edit project source"]}),a.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),"Create assignment"]}),a.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[a.jsx(lC,{className:"h-4 w-4"}),"Review project rules"]}),a.jsxs("button",{type:"button",onClick:()=>b("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[a.jsx(Sv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?a.jsxs(Re,{title:"Archive Metadata",children:[a.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",o.archivedAt?Cr(o.archivedAt):"with no timestamp recorded","."]}),o.archivedReason?a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.archivedReason}):null]}):null]})]})]})}function QD({projectSlug:e,assignment:t}){const n=Pt();return a.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:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),a.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),a.jsx("span",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:a.jsx(Hr,{value:t.id})})]}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(t.updated)]})]}),a.jsx(Ht,{status:t.status})]}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),a.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 cw({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:l}){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 h=`${t.label} "${n}"`,m=o?"Applying...":t.label,x=c.trim()||void 0;return a.jsx(Sp,{open:e,onOpenChange:v=>o?void 0:l(v),children:a.jsx(kc,{className:"max-w-xl",children:a.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[a.jsxs(NE,{children:[a.jsx(jc,{children:h}),a.jsx(Cp,{children:t.description})]}),t.warning?a.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,a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),a.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"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),a.jsxs(EE,{children:[a.jsx("button",{type:"button",onClick:()=>l(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:o,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:m})]})]})})})}var JD=Symbol("radix.slottable");function ZD(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=JD,t}var uw="AlertDialog",[eI]=Ko(uw,[g0]),Gr=g0(),dw=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return a.jsx(D0,{...o,...n,modal:!0})};dw.displayName=uw;var tI="AlertDialogTrigger",nI=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return a.jsx(SE,{...i,...o,ref:t})});nI.displayName=tI;var rI="AlertDialogPortal",fw=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return a.jsx(I0,{...o,...n})};fw.displayName=rI;var oI="AlertDialogOverlay",pw=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return a.jsx(bp,{...i,...o,ref:t})});pw.displayName=oI;var Ls="AlertDialogContent",[sI,iI]=eI(Ls),aI=ZD("AlertDialogContent"),hw=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,l=Gr(n),c=g.useRef(null),d=an(t,c),p=g.useRef(null);return a.jsx(bE,{contentName:Ls,titleName:mw,docsSlug:"alert-dialog",children:a.jsx(sI,{scope:n,cancelRef:p,children:a.jsxs(wp,{role:"alertdialog",...l,...i,ref:d,onOpenAutoFocus:ut(i.onOpenAutoFocus,h=>{var m;h.preventDefault(),(m=p.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[a.jsx(aI,{children:o}),a.jsx(cI,{contentRef:c})]})})})});hw.displayName=Ls;var mw="AlertDialogTitle",gw=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return a.jsx(kp,{...i,...o,ref:t})});gw.displayName=mw;var xw="AlertDialogDescription",yw=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return a.jsx(jp,{...i,...o,ref:t})});yw.displayName=xw;var lI="AlertDialogAction",vw=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return a.jsx(L0,{...i,...o,ref:t})});vw.displayName=lI;var bw="AlertDialogCancel",ww=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=iI(bw,n),l=Gr(n),c=an(t,i);return a.jsx(L0,{...l,...o,ref:c})});ww.displayName=bw;var cI=({contentRef:e})=>{const t=`\`${Ls}\` requires a description for the component to be accessible for screen reader users.
|
|
458
|
+
|
|
459
|
+
You can add a description to the \`${Ls}\` by passing a \`${xw}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
460
|
+
|
|
461
|
+
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 \`${Ls}\`. 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.
|
|
462
|
+
|
|
463
|
+
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},uI=dw,dI=fw,kw=pw,jw=hw,Sw=vw,Cw=ww,Nw=gw,Ew=yw;const fI=uI,pI=dI,Pw=g.forwardRef(({className:e,...t},n)=>a.jsx(kw,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));Pw.displayName=kw.displayName;const Rw=g.forwardRef(({className:e,...t},n)=>a.jsxs(pI,{children:[a.jsx(Pw,{}),a.jsx(jw,{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})]}));Rw.displayName=jw.displayName;function hI({className:e,...t}){return a.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function mI({className:e,...t}){return a.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)=>a.jsx(Nw,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));Tw.displayName=Nw.displayName;const Aw=g.forwardRef(({className:e,...t},n)=>a.jsx(Ew,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));Aw.displayName=Ew.displayName;const Dw=g.forwardRef(({className:e,...t},n)=>a.jsx(Sw,{ref:n,className:$e(e),...t}));Dw.displayName=Sw.displayName;const Iw=g.forwardRef(({className:e,...t},n)=>a.jsx(Cw,{ref:n,className:$e(e),...t}));Iw.displayName=Cw.displayName;function Lw({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:l=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return a.jsx(fI,{open:e,onOpenChange:h=>l?void 0:p(h),children:a.jsxs(Rw,{children:[a.jsxs(hI,{children:[a.jsx(Tw,{children:t}),a.jsx(Aw,{children:n})]}),a.jsxs(mI,{children:[a.jsx(Iw,{disabled:l,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),a.jsx(Dw,{disabled:l,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:h=>{h.preventDefault(),d()},children:l?"Working...":o})]})]})})}const gI=["top","right","bottom","left"],So=Math.min,Mn=Math.max,ic=Math.round,_l=Math.floor,Nr=e=>({x:e,y:e}),xI={left:"right",right:"left",bottom:"top",top:"bottom"};function Kf(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 Xs(e){return e.split("-")[1]}function Zp(e){return e==="x"?"y":"x"}function eh(e){return e==="y"?"height":"width"}function jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function th(e){return Zp(jr(e))}function yI(e,t,n){n===void 0&&(n=!1);const o=Xs(e),i=th(e),l=eh(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=ac(c)),[c,ac(c)]}function vI(e){const t=ac(e);return[Yf(e),t,Yf(t)]}function Yf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ry=["left","right"],Ty=["right","left"],bI=["top","bottom"],wI=["bottom","top"];function kI(e,t,n){switch(e){case"top":case"bottom":return n?t?Ty:Ry:t?Ry:Ty;case"left":case"right":return t?bI:wI;default:return[]}}function jI(e,t,n,o){const i=Xs(e);let l=kI(qr(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(Yf)))),l}function ac(e){const t=qr(e);return xI[t]+e.slice(t.length)}function SI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ow(e){return typeof e!="number"?SI(e):{top:e,right:e,bottom:e,left:e}}function lc(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 Ay(e,t,n){let{reference:o,floating:i}=e;const l=jr(t),c=th(t),d=eh(c),p=qr(t),h=l==="y",m=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:m,y:o.y-i.height};break;case"bottom":b={x:m,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(Xs(t)){case"start":b[c]-=v*(n&&h?-1:1);break;case"end":b[c]+=v*(n&&h?-1:1);break}return b}async function CI(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=Vr(t,e),N=Ow(b),j=d[v?x==="floating"?"reference":"floating":x],S=lc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(j)))==null||n?j:j.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),P=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),L=await(l.isElement==null?void 0:l.isElement(T))?await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1}:{x:1,y:1},O=lc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:P,offsetParent:T,strategy:p}):P);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 NI=50,EI=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:CI},p=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:x}=Ay(h,o,p),v=o,b=0;const N={};for(let k=0;k<l.length;k++){const j=l[k];if(!j)continue;const{name:S,fn:P}=j,{x:T,y:L,data:O,reset:R}=await P({x:m,y:x,initialPlacement:o,placement:v,strategy:i,middlewareData:N,rects:h,platform:d,elements:{reference:e,floating:t}});m=T??m,x=L??x,N[S]={...N[S],...O},R&&b<NI&&(b++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(h=R.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:m,y:x}=Ay(h,v,p)),k=-1)}return{x:m,y:x,placement:v,strategy:i,middlewareData:N}},PI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=Vr(e,t)||{};if(h==null)return{};const x=Ow(m),v={x:n,y:o},b=th(i),N=eh(b),k=await c.getDimensions(h),j=b==="y",S=j?"top":"left",P=j?"bottom":"right",T=j?"clientHeight":"clientWidth",L=l.reference[N]+l.reference[b]-v[b]-l.floating[N],O=v[b]-l.reference[b],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let $=R?R[T]:0;(!$||!await(c.isElement==null?void 0:c.isElement(R)))&&($=d.floating[T]||l.floating[N]);const A=L/2-O/2,q=$/2-k[N]/2-1,J=So(x[S],q),z=So(x[P],q),G=J,Y=$-k[N]-z,Q=$/2-k[N]/2+A,_=Kf(G,Q,Y),D=!p.arrow&&Xs(i)!=null&&Q!==_&&l.reference[N]/2-(Q<G?J:z)-k[N]/2<0,F=D?Q<G?Q-G:Q-Y:0;return{[b]:v[b]+F,data:{[b]:_,centerOffset:Q-_-F,...D&&{alignmentOffset:F}},reset:D}}}),RI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...j}=Vr(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const S=qr(i),P=jr(d),T=qr(d)===d,L=await(p.isRTL==null?void 0:p.isRTL(h.floating)),O=v||(T||!k?[ac(d)]:vI(d)),R=N!=="none";!v&&R&&O.push(...jI(d,k,N,L));const $=[d,...O],A=await p.detectOverflow(t,j),q=[];let J=((o=l.flip)==null?void 0:o.overflows)||[];if(m&&q.push(A[S]),x){const Q=yI(i,c,L);q.push(A[Q[0]],A[Q[1]])}if(J=[...J,{placement:i,overflows:q}],!q.every(Q=>Q<=0)){var z,G;const Q=(((z=l.flip)==null?void 0:z.index)||0)+1,_=$[Q];if(_&&(!(x==="alignment"?P!==jr(_):!1)||J.every(U=>jr(U.placement)===P?U.overflows[0]>0:!0)))return{data:{index:Q,overflows:J},reset:{placement:_}};let D=(G=J.filter(F=>F.overflows[0]<=0).sort((F,U)=>F.overflows[1]-U.overflows[1])[0])==null?void 0:G.placement;if(!D)switch(b){case"bestFit":{var Y;const F=(Y=J.filter(U=>{if(R){const K=jr(U.placement);return K===P||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,E)=>K+E,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:Y[0];F&&(D=F);break}case"initialPlacement":D=d;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function Dy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Iy(e){return gI.some(t=>e[t]>=0)}const TI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...l}=Vr(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...l,elementContext:"reference"}),d=Dy(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Iy(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...l,altBoundary:!0}),d=Dy(c,n.floating);return{data:{escapedOffsets:d,escaped:Iy(d)}}}default:return{}}}}},_w=new Set(["left","top"]);async function AI(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=qr(n),d=Xs(n),p=jr(n)==="y",h=_w.has(c)?-1:1,m=l&&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*m,y:v*h}:{x:v*h,y:b*m}}const DI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,p=await AI(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:l+p.y,data:{...p,placement:c}}}}},II=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:P,y:T}=S;return{x:P,y:T}}},...h}=Vr(e,t),m={x:n,y:o},x=await l.detectOverflow(t,h),v=jr(qr(i)),b=Zp(v);let N=m[b],k=m[v];if(c){const S=b==="y"?"top":"left",P=b==="y"?"bottom":"right",T=N+x[S],L=N-x[P];N=Kf(T,N,L)}if(d){const S=v==="y"?"top":"left",P=v==="y"?"bottom":"right",T=k+x[S],L=k-x[P];k=Kf(T,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}}}}}},LI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Vr(e,t),m={x:n,y:o},x=jr(i),v=Zp(x);let b=m[v],N=m[x];const k=Vr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const T=v==="y"?"height":"width",L=l.reference[v]-l.floating[T]+j.mainAxis,O=l.reference[v]+l.reference[T]-j.mainAxis;b<L?b=L:b>O&&(b=O)}if(h){var S,P;const T=v==="y"?"width":"height",L=_w.has(qr(i)),O=l.reference[x]-l.floating[T]+(L&&((S=c.offset)==null?void 0:S[x])||0)+(L?0:j.crossAxis),R=l.reference[x]+l.reference[T]+(L?0:((P=c.offset)==null?void 0:P[x])||0)-(L?j.crossAxis:0);N<O?N=O:N>R&&(N=R)}return{[v]:b,[x]:N}}}},OI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:p=()=>{},...h}=Vr(e,t),m=await c.detectOverflow(t,h),x=qr(i),v=Xs(i),b=jr(i)==="y",{width:N,height:k}=l.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 P=k-m.top-m.bottom,T=N-m.left-m.right,L=So(k-m[j],P),O=So(N-m[S],T),R=!t.middlewareData.shift;let $=L,A=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=T),(o=t.middlewareData.shift)!=null&&o.enabled.y&&($=P),R&&!v){const J=Mn(m.left,0),z=Mn(m.right,0),G=Mn(m.top,0),Y=Mn(m.bottom,0);b?A=N-2*(J!==0||z!==0?J+z:Mn(m.left,m.right)):$=k-2*(G!==0||Y!==0?G+Y:Mn(m.top,m.bottom))}await p({...t,availableWidth:A,availableHeight:$});const q=await c.getDimensions(d.floating);return N!==q.width||k!==q.height?{reset:{rects:!0}}:{}}}};function _c(){return typeof window<"u"}function Qs(e){return Mw(e)?(e.nodeName||"").toLowerCase():"#document"}function zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rr(e){var t;return(t=(Mw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mw(e){return _c()?e instanceof Node||e instanceof zn(e).Node:!1}function ur(e){return _c()?e instanceof Element||e instanceof zn(e).Element:!1}function Kr(e){return _c()?e instanceof HTMLElement||e instanceof zn(e).HTMLElement:!1}function Ly(e){return!_c()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zn(e).ShadowRoot}function ga(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function _I(e){return/^(table|td|th)$/.test(Qs(e))}function Mc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const MI=/transform|translate|scale|rotate|perspective|filter/,$I=/paint|layout|strict|content/,Ho=e=>!!e&&e!=="none";let ff;function nh(e){const t=ur(e)?dr(e):e;return Ho(t.transform)||Ho(t.translate)||Ho(t.scale)||Ho(t.rotate)||Ho(t.perspective)||!rh()&&(Ho(t.backdropFilter)||Ho(t.filter))||MI.test(t.willChange||"")||$I.test(t.contain||"")}function FI(e){let t=Co(e);for(;Kr(t)&&!Ms(t);){if(nh(t))return t;if(Mc(t))return null;t=Co(t)}return null}function rh(){return ff==null&&(ff=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ff}function Ms(e){return/^(html|body|#document)$/.test(Qs(e))}function dr(e){return zn(e).getComputedStyle(e)}function $c(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ly(e)&&e.host||Rr(e);return Ly(t)?t.host:t}function $w(e){const t=Co(e);return Ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&ga(t)?t:$w(t)}function oa(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=$w(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=zn(i);if(l){const d=Xf(c);return t.concat(c,c.visualViewport||[],ga(i)?i:[],d&&n?oa(d):[])}else return t.concat(i,oa(i,[],n))}function Xf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fw(e){const t=dr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Kr(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=ic(n)!==l||ic(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function oh(e){return ur(e)?e:e.contextElement}function Os(e){const t=oh(e);if(!Kr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=Fw(t);let c=(l?ic(n.width):n.width)/o,d=(l?ic(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const zI=Nr(0);function zw(e){const t=zn(e);return!rh()||!t.visualViewport?zI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zn(e)?!1:t}function Go(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=oh(e);let c=Nr(1);t&&(o?ur(o)&&(c=Os(o)):c=Os(e));const d=BI(l,n,o)?zw(l):Nr(0);let p=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,m=i.width/c.x,x=i.height/c.y;if(l){const v=zn(l),b=o&&ur(o)?zn(o):o;let N=v,k=Xf(N);for(;k&&o&&b!==N;){const j=Os(k),S=k.getBoundingClientRect(),P=dr(k),T=S.left+(k.clientLeft+parseFloat(P.paddingLeft))*j.x,L=S.top+(k.clientTop+parseFloat(P.paddingTop))*j.y;p*=j.x,h*=j.y,m*=j.x,x*=j.y,p+=T,h+=L,N=zn(k),k=Xf(N)}}return lc({width:m,height:x,x:p,y:h})}function Fc(e,t){const n=$c(e).scrollLeft;return t?t.left+n:Go(Rr(e)).left+n}function Bw(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Fc(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function UI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=Rr(o),d=t?Mc(t.floating):!1;if(o===c||d&&l)return n;let p={scrollLeft:0,scrollTop:0},h=Nr(1);const m=Nr(0),x=Kr(o);if((x||!x&&!l)&&((Qs(o)!=="body"||ga(c))&&(p=$c(o)),x)){const b=Go(o);h=Os(o),m.x=b.x+o.clientLeft,m.y=b.y+o.clientTop}const v=c&&!x&&!l?Bw(c,p):Nr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-p.scrollLeft*h.x+m.x+v.x,y:n.y*h.y-p.scrollTop*h.y+m.y+v.y}}function HI(e){return Array.from(e.getClientRects())}function WI(e){const t=Rr(e),n=$c(e),o=e.ownerDocument.body,i=Mn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=Mn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Fc(e);const d=-n.scrollTop;return dr(o).direction==="rtl"&&(c+=Mn(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const Oy=25;function VI(e,t){const n=zn(e),o=Rr(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){l=i.width,c=i.height;const m=rh();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=Fc(o);if(h<=0){const m=o.ownerDocument,x=m.body,v=getComputedStyle(x),b=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=Oy&&(l-=N)}else h<=Oy&&(l+=h);return{width:l,height:c,x:d,y:p}}function qI(e,t){const n=Go(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=Kr(e)?Os(e):Nr(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,p=i*l.x,h=o*l.y;return{width:c,height:d,x:p,y:h}}function _y(e,t,n){let o;if(t==="viewport")o=VI(e,n);else if(t==="document")o=WI(Rr(e));else if(ur(t))o=qI(t,n);else{const i=zw(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return lc(o)}function Uw(e,t){const n=Co(e);return n===t||!ur(n)||Ms(n)?!1:dr(n).position==="fixed"||Uw(n,t)}function GI(e,t){const n=t.get(e);if(n)return n;let o=oa(e,[],!1).filter(d=>ur(d)&&Qs(d)!=="body"),i=null;const l=dr(e).position==="fixed";let c=l?Co(e):e;for(;ur(c)&&!Ms(c);){const d=dr(c),p=nh(c);!p&&d.position==="fixed"&&(i=null),(l?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ga(c)&&!p&&Uw(e,c))?o=o.filter(m=>m!==c):i=d,c=Co(c)}return t.set(e,o),o}function KI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Mc(t)?[]:GI(t,this._c):[].concat(n),o],d=_y(t,c[0],i);let p=d.top,h=d.right,m=d.bottom,x=d.left;for(let v=1;v<c.length;v++){const b=_y(t,c[v],i);p=Mn(b.top,p),h=So(b.right,h),m=So(b.bottom,m),x=Mn(b.left,x)}return{width:h-x,height:m-p,x,y:p}}function YI(e){const{width:t,height:n}=Fw(e);return{width:t,height:n}}function XI(e,t,n){const o=Kr(t),i=Rr(t),l=n==="fixed",c=Go(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const p=Nr(0);function h(){p.x=Fc(i)}if(o||!o&&!l)if((Qs(t)!=="body"||ga(i))&&(d=$c(t)),o){const b=Go(t,!0,l,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&h();l&&!o&&i&&h();const m=i&&!o&&!l?Bw(i,d):Nr(0),x=c.left+d.scrollLeft-p.x-m.x,v=c.top+d.scrollTop-p.y-m.y;return{x,y:v,width:c.width,height:c.height}}function pf(e){return dr(e).position==="static"}function My(e,t){if(!Kr(e)||dr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rr(e)===n&&(n=n.ownerDocument.body),n}function Hw(e,t){const n=zn(e);if(Mc(e))return n;if(!Kr(e)){let i=Co(e);for(;i&&!Ms(i);){if(ur(i)&&!pf(i))return i;i=Co(i)}return n}let o=My(e,t);for(;o&&_I(o)&&pf(o);)o=My(o,t);return o&&Ms(o)&&pf(o)&&!nh(o)?n:o||FI(e)||n}const QI=async function(e){const t=this.getOffsetParent||Hw,n=this.getDimensions,o=await n(e.floating);return{reference:XI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function JI(e){return dr(e).direction==="rtl"}const ZI={convertOffsetParentRelativeRectToViewportRelativeRect:UI,getDocumentElement:Rr,getClippingRect:KI,getOffsetParent:Hw,getElementRects:QI,getClientRects:HI,getDimensions:YI,getScale:Os,isElement:ur,isRTL:JI};function Ww(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eL(e,t){let n=null,o;const i=Rr(e);function l(){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),l();const h=e.getBoundingClientRect(),{left:m,top:x,width:v,height:b}=h;if(d||t(),!v||!b)return;const N=_l(x),k=_l(i.clientWidth-(m+v)),j=_l(i.clientHeight-(x+b)),S=_l(m),T={rootMargin:-N+"px "+-k+"px "+-j+"px "+-S+"px",threshold:Mn(0,So(1,p))||1};let L=!0;function O(R){const $=R[0].intersectionRatio;if($!==p){if(!L)return c();$?c(!1,$):o=setTimeout(()=>{c(!1,1e-7)},1e3)}$===1&&!Ww(h,e.getBoundingClientRect())&&c(),L=!1}try{n=new IntersectionObserver(O,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return c(!0),l}function tL(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=oh(e),m=i||l?[...h?oa(h):[],...t?oa(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),l&&S.addEventListener("resize",n)});const x=h&&d?eL(h,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(S=>{let[P]=S;P&&P.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),h&&!p&&b.observe(h),t&&b.observe(t));let N,k=p?Go(e):null;p&&j();function j(){const S=Go(e);k&&!Ww(k,S)&&n(),k=S,N=requestAnimationFrame(j)}return n(),()=>{var S;m.forEach(P=>{i&&P.removeEventListener("scroll",n),l&&P.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const nL=DI,rL=II,oL=RI,sL=OI,iL=TI,$y=PI,aL=LI,lL=(e,t,n)=>{const o=new Map,i={platform:ZI,...n},l={...i.platform,_c:o};return EI(e,t,{...i,platform:l})};var cL=typeof document<"u",uL=function(){},Gl=cL?g.useLayoutEffect:uL;function cc(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(!cc(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 l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!cc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Vw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fy(e,t){const n=Vw(e);return Math.round(t*n)/n}function hf(e){const t=g.useRef(e);return Gl(()=>{t.current=e}),t}function dL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=g.useState(o);cc(v,o)||b(o);const[N,k]=g.useState(null),[j,S]=g.useState(null),P=g.useCallback(U=>{U!==R.current&&(R.current=U,k(U))},[]),T=g.useCallback(U=>{U!==$.current&&($.current=U,S(U))},[]),L=l||N,O=c||j,R=g.useRef(null),$=g.useRef(null),A=g.useRef(m),q=p!=null,J=hf(p),z=hf(i),G=hf(h),Y=g.useCallback(()=>{if(!R.current||!$.current)return;const U={placement:t,strategy:n,middleware:v};z.current&&(U.platform=z.current),lL(R.current,$.current,U).then(K=>{const E={...K,isPositioned:G.current!==!1};Q.current&&!cc(A.current,E)&&(A.current=E,wo.flushSync(()=>{x(E)}))})},[v,t,n,z,G]);Gl(()=>{h===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,x(U=>({...U,isPositioned:!1})))},[h]);const Q=g.useRef(!1);Gl(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Gl(()=>{if(L&&(R.current=L),O&&($.current=O),L&&O){if(J.current)return J.current(L,O,Y);Y()}},[L,O,Y,J,q]);const _=g.useMemo(()=>({reference:R,floating:$,setReference:P,setFloating:T}),[P,T]),D=g.useMemo(()=>({reference:L,floating:O}),[L,O]),F=g.useMemo(()=>{const U={position:n,left:0,top:0};if(!D.floating)return U;const K=Fy(D.floating,m.x),E=Fy(D.floating,m.y);return d?{...U,transform:"translate("+K+"px, "+E+"px)",...Vw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:E}},[n,d,D.floating,m.x,m.y]);return g.useMemo(()=>({...m,update:Y,refs:_,elements:D,floatingStyles:F}),[m,Y,_,D,F])}const fL=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?$y({element:o.current,padding:i}).fn(n):{}:o?$y({element:o,padding:i}).fn(n):{}}}},pL=(e,t)=>{const n=nL(e);return{name:n.name,fn:n.fn,options:[e,t]}},hL=(e,t)=>{const n=rL(e);return{name:n.name,fn:n.fn,options:[e,t]}},mL=(e,t)=>({fn:aL(e).fn,options:[e,t]}),gL=(e,t)=>{const n=oL(e);return{name:n.name,fn:n.fn,options:[e,t]}},xL=(e,t)=>{const n=sL(e);return{name:n.name,fn:n.fn,options:[e,t]}},yL=(e,t)=>{const n=iL(e);return{name:n.name,fn:n.fn,options:[e,t]}},vL=(e,t)=>{const n=fL(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bL="Arrow",qw=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return a.jsx(Rt.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});qw.displayName=bL;var wL=qw;function kL(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 l=i[0];let c,d;if("borderBoxSize"in l){const p=l.borderBoxSize,h=Array.isArray(p)?p[0]:p;c=h.inlineSize,d=h.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 sh="Popper",[Gw,Kw]=Ko(sh),[jL,Yw]=Gw(sh),Xw=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return a.jsx(jL,{scope:t,anchor:o,onAnchorChange:i,children:n})};Xw.displayName=sh;var Qw="PopperAnchor",Jw=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=Yw(Qw,n),c=g.useRef(null),d=an(t,c),p=g.useRef(null);return g.useEffect(()=>{const h=p.current;p.current=(o==null?void 0:o.current)||c.current,h!==p.current&&l.onAnchorChange(p.current)}),o?null:a.jsx(Rt.div,{...i,ref:d})});Jw.displayName=Qw;var ih="PopperContent",[SL,CL]=Gw(ih),Zw=g.forwardRef((e,t)=>{var Ee,Ne,Pe,je,ft,nt;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,j=Yw(ih,n),[S,P]=g.useState(null),T=an(t,Ue=>P(Ue)),[L,O]=g.useState(null),R=kL(L),$=(R==null?void 0:R.width)??0,A=(R==null?void 0:R.height)??0,q=o+(l!=="center"?"-"+l:""),J=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},z=Array.isArray(h)?h:[h],G=z.length>0,Y={padding:J,boundary:z.filter(EL),altBoundary:G},{refs:Q,floatingStyles:_,placement:D,isPositioned:F,middlewareData:U}=dL({strategy:"fixed",placement:q,whileElementsMounted:(...Ue)=>tL(...Ue,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[pL({mainAxis:i+A,alignmentAxis:c}),p&&hL({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?mL():void 0,...Y}),p&&gL({...Y}),xL({...Y,apply:({elements:Ue,rects:Be,availableWidth:Ct,availableHeight:Ot})=>{const{width:cn,height:hn}=Be.reference,Qe=Ue.floating.style;Qe.setProperty("--radix-popper-available-width",`${Ct}px`),Qe.setProperty("--radix-popper-available-height",`${Ot}px`),Qe.setProperty("--radix-popper-anchor-width",`${cn}px`),Qe.setProperty("--radix-popper-anchor-height",`${hn}px`)}}),L&&vL({element:L,padding:d}),PL({arrowWidth:$,arrowHeight:A}),v&&yL({strategy:"referenceHidden",...Y})]}),[K,E]=n1(D),B=Vo(N);jo(()=>{F&&(B==null||B())},[F,B]);const Z=(Ee=U.arrow)==null?void 0:Ee.x,I=(Ne=U.arrow)==null?void 0:Ne.y,de=((Pe=U.arrow)==null?void 0:Pe.centerOffset)!==0,[ve,fe]=g.useState();return jo(()=>{S&&fe(window.getComputedStyle(S).zIndex)},[S]),a.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:F?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(je=U.transformOrigin)==null?void 0:je.x,(ft=U.transformOrigin)==null?void 0:ft.y].join(" "),...((nt=U.hide)==null?void 0:nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(SL,{scope:n,placedSide:K,onArrowChange:O,arrowX:Z,arrowY:I,shouldHideArrow:de,children:a.jsx(Rt.div,{"data-side":K,"data-align":E,...k,ref:T,style:{...k.style,animation:F?void 0:"none"}})})})});Zw.displayName=ih;var e1="PopperArrow",NL={top:"bottom",right:"left",bottom:"top",left:"right"},t1=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=CL(e1,o),c=NL[l.placedSide];return a.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:a.jsx(wL,{...i,ref:n,style:{...i.style,display:"block"}})})});t1.displayName=e1;function EL(e){return e!==null}var PL=e=>({name:"transformOrigin",options:e,fn(t){var j,S,P;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,[h,m]=n1(n),x={start:"0%",center:"50%",end:"100%"}[m],v=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((P=i.arrow)==null?void 0:P.y)??0)+p/2;let N="",k="";return h==="bottom"?(N=c?x:`${v}px`,k=`${-p}px`):h==="top"?(N=c?x:`${v}px`,k=`${o.floating.height+p}px`):h==="right"?(N=`${-p}px`,k=c?x:`${b}px`):h==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function n1(e){const[t,n="center"]=e.split("-");return[t,n]}var RL=Xw,TL=Jw,AL=Zw,DL=t1,IL=Symbol("radix.slottable");function LL(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=IL,t}var OL=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"}),_L="VisuallyHidden",r1=g.forwardRef((e,t)=>a.jsx(Rt.span,{...e,ref:t,style:{...OL,...e.style}}));r1.displayName=_L;var ML=r1,[zc]=Ko("Tooltip",[Kw]),Bc=Kw(),o1="TooltipProvider",$L=700,Qf="tooltip.open",[FL,ah]=zc(o1),s1=e=>{const{__scopeTooltip:t,delayDuration:n=$L,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:l}=e,c=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),a.jsx(FL,{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(h=>{d.current=h},[]),disableHoverableContent:i,children:l})};s1.displayName=o1;var sa="Tooltip",[zL,xa]=zc(sa),i1=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:l,disableHoverableContent:c,delayDuration:d}=e,p=ah(sa,e.__scopeTooltip),h=Bc(t),[m,x]=g.useState(null),v=Rs(),b=g.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,j=g.useRef(!1),[S,P]=vc({prop:o,defaultProp:i??!1,onChange:$=>{$?(p.onOpen(),document.dispatchEvent(new CustomEvent(Qf))):p.onClose(),l==null||l($)},caller:sa}),T=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),L=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,P(!0)},[P]),O=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,P(!1)},[P]),R=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,P(!0),b.current=0},k)},[k,P]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),a.jsx(RL,{...h,children:a.jsx(zL,{scope:t,contentId:v,open:S,stateAttribute:T,trigger:m,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?R():L()},[p.isOpenDelayedRef,R,L]),onTriggerLeave:g.useCallback(()=>{N?O():(window.clearTimeout(b.current),b.current=0)},[O,N]),onOpen:L,onClose:O,disableHoverableContent:N,children:n})})};i1.displayName=sa;var Jf="TooltipTrigger",a1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=xa(Jf,n),l=ah(Jf,n),c=Bc(n),d=g.useRef(null),p=an(t,d,i.onTriggerChange),h=g.useRef(!1),m=g.useRef(!1),x=g.useCallback(()=>h.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),a.jsx(TL,{asChild:!0,...c,children:a.jsx(Rt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:ut(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:ut(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:ut(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:ut(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:ut(e.onBlur,i.onClose),onClick:ut(e.onClick,i.onClose)})})});a1.displayName=Jf;var lh="TooltipPortal",[BL,UL]=zc(lh,{forceMount:void 0}),l1=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,l=xa(lh,t);return a.jsx(BL,{scope:t,forceMount:n,children:a.jsx(Yo,{present:n||l.open,children:a.jsx(gp,{asChild:!0,container:i,children:o})})})};l1.displayName=lh;var $s="TooltipContent",c1=g.forwardRef((e,t)=>{const n=UL($s,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...l}=e,c=xa($s,e.__scopeTooltip);return a.jsx(Yo,{present:o||c.open,children:c.disableHoverableContent?a.jsx(u1,{side:i,...l,ref:t}):a.jsx(HL,{side:i,...l,ref:t})})}),HL=g.forwardRef((e,t)=>{const n=xa($s,e.__scopeTooltip),o=ah($s,e.__scopeTooltip),i=g.useRef(null),l=an(t,i),[c,d]=g.useState(null),{trigger:p,onClose:h}=n,m=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},P=KL(S,j.getBoundingClientRect()),T=YL(S,P),L=XL(k.getBoundingClientRect()),O=JL([...T,...L]);d(O),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&m){const N=j=>b(j,m),k=j=>b(j,p);return p.addEventListener("pointerleave",N),m.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),m.removeEventListener("pointerleave",k)}}},[p,m,b,v]),g.useEffect(()=>{if(c){const N=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},P=(p==null?void 0:p.contains(j))||(m==null?void 0:m.contains(j)),T=!QL(S,c);P?v():T&&(v(),h())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,m,c,h,v]),a.jsx(u1,{...e,ref:l})}),[WL,VL]=zc(sa,{isInside:!1}),qL=LL("TooltipContent"),u1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=e,p=xa($s,n),h=Bc(n),{onClose:m}=p;return g.useEffect(()=>(document.addEventListener(Qf,m),()=>document.removeEventListener(Qf,m)),[m]),g.useEffect(()=>{if(p.trigger){const x=v=>{const b=v.target;b!=null&&b.contains(p.trigger)&&m()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,m]),a.jsx(mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:a.jsxs(AL,{"data-state":p.stateAttribute,...h,...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:[a.jsx(qL,{children:o}),a.jsx(WL,{scope:n,isInside:!0,children:a.jsx(ML,{id:p.contentId,role:"tooltip",children:i||o})})]})})});c1.displayName=$s;var d1="TooltipArrow",GL=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Bc(n);return VL(d1,n).isInside?null:a.jsx(DL,{...i,...o,ref:t})});GL.displayName=d1;function KL(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,o,i,l)){case l:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function YL(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 XL(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 QL(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],p=t[c],h=d.x,m=d.y,x=p.x,v=p.y;m>o!=v>o&&n<(x-h)*(o-m)/(v-m)+h&&(i=!i)}return i}function JL(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),ZL(t)}function ZL(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 l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.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 l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.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 eO=s1,tO=i1,nO=a1,rO=l1,f1=c1;const p1=eO,h1=tO,m1=nO,ch=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>a.jsx(rO,{children:a.jsx(f1,{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})}));ch.displayName=f1.displayName;function oO({items:e,align:t="end"}){const[n,o]=g.useState(!1),i=g.useRef(null);return g.useEffect(()=>{if(!n)return;function l(d){i.current&&!i.current.contains(d.target)&&o(!1)}function c(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[n]),e.length===0?null:a.jsxs("div",{className:"relative",ref:i,children:[a.jsx("button",{type:"button",onClick:()=>o(l=>!l),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:a.jsx(gC,{className:"h-4 w-4"})}),n&&a.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:a.jsx(p1,{delayDuration:200,children:e.map(l=>{const c=l.icon,d=$e("flex w-full items-center gap-2 px-3 py-1.5 text-sm text-left transition",l.disabled?"opacity-50 cursor-not-allowed":l.destructive?"text-destructive hover:bg-destructive/10":"hover:bg-foreground/5"),p=a.jsxs(a.Fragment,{children:[c?a.jsx(c,{className:"h-4 w-4 shrink-0"}):null,a.jsx("span",{className:"truncate",children:l.label})]});if(l.disabled){const h=a.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:a.jsx("button",{type:"button",disabled:!0,className:d,children:p})});return l.disabledReason?a.jsxs(h1,{children:[a.jsx(m1,{asChild:!0,children:h}),a.jsx(ch,{side:"left",children:l.disabledReason})]},l.key):a.jsx("div",{children:h},l.key)}return l.href?a.jsx(Ce,{to:l.href,className:d,onClick:()=>o(!1),children:p},l.key):a.jsx("button",{type:"button",className:d,onClick:()=>{var h;(h=l.onSelect)==null||h.call(l),o(!1)},children:p},l.key)})})})]})}async function g1(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}:{})}),l=await i.json().catch(()=>null);if(!i.ok)throw new Error((l==null?void 0:l.error)||`HTTP ${i.status}`);return l.assignment}async function x1(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 sO(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 y1(e){return e.requiresReason||e.command==="block"}function iO(e){const t=e.split(`
|
|
464
|
+
`),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()})),l=[...t.slice(0,n),...t.slice(o)].join(`
|
|
465
|
+
`).replace(/\n{3,}/g,`
|
|
466
|
+
|
|
467
|
+
`).trim();return{acceptanceCriteria:i,summaryBody:l}}function aO(e){const t=e.split(`
|
|
468
|
+
`),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(`
|
|
469
|
+
`).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
|
|
470
|
+
|
|
471
|
+
`).trim(),l=[...t.slice(0,n),...t.slice(o)].join(`
|
|
472
|
+
`).replace(/\n{3,}/g,`
|
|
473
|
+
|
|
474
|
+
`).trim();return{hasSection:!0,todosMarkdown:i,remaining:l}}function lO({projectSlug:e,dependencies:t,blockedReason:n}){const[o,i]=g.useState(!1);if(t.length===0)return null;const l=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=l.length===0;return c&&!o?a.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:[a.jsx(ap,{className:"h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400"}),a.jsxs("span",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-300",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),a.jsx(ea,{className:"ml-auto h-4 w-4 text-emerald-600 dark:text-emerald-400"})]}):a.jsxs("div",{className:"space-y-3",children:[l.length>0&&a.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:[a.jsx(Cf,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400"}),a.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-300",children:[a.jsxs("strong",{children:[l.length," ",l.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&a.jsxs("p",{className:"mt-1 text-amber-700 dark:text-amber-400",children:["Blocked reason: ",n]})]})]}),a.jsx(Re,{title:"Dependencies",description:`${t.length-l.length} of ${t.length} resolved`,actions:c?a.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:a.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>a.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:[a.jsx(Ht,{status:d.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&a.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),a.jsx(Yl,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function cO({links:e}){const t=Pt();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return a.jsx(Re,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:a.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>a.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:[a.jsx(aC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Ht,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(Yl,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>a.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:[a.jsx(bv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Ht,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(Yl,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function uO(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 dO(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function v1({projectSlug:e,assignmentSlug:t,entries:n}){const[o,i]=g.useState(n);g.useEffect(()=>{i(n)},[n]);const l=g.useMemo(()=>uO(o),[o]),[c,d]=g.useState(""),[p,h]=g.useState("note"),[m,x]=g.useState(!1),[v,b]=g.useState(null);async function N(j){var T;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,P={id:S,timestamp:new Date().toISOString(),author:"human",type:p,body:c,resolved:p==="question"?!1:void 0};i(L=>[...L,P]);try{const L=await fetch(dO(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),R=(T=O==null?void 0:O.comment)==null?void 0:T.id;i($=>$.map(A=>A.id===S?{...A,id:R??A.id}:A)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(L){b(L instanceof Error?L.message:String(L)),i(O=>O.filter(R=>R.id!==S))}finally{x(!1)}}async function k(j,S){i(P=>P.map(T=>T.id===j?{...T,resolved:S}:T));try{const P=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,T=await fetch(P,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!T.ok)throw new Error(`HTTP ${T.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(P){b(P instanceof Error?P.message:String(P)),i(T=>T.map(L=>L.id===j?{...L,resolved:!S}:L))}}return a.jsx(Re,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:a.jsxs("div",{className:"space-y-4",children:[l.map(j=>a.jsx(b1,{node:j,onToggleResolved:k,depth:0},j.entry.id)),a.jsxs("form",{onSubmit:N,className:"mt-6 space-y-2 border-t border-neutral-800 pt-4",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Add comment"}),a.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…"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("select",{value:p,onChange:j=>h(j.target.value),className:"rounded border border-neutral-700 bg-neutral-900 px-2 py-1 text-xs",children:[a.jsx("option",{value:"note",children:"note"}),a.jsx("option",{value:"question",children:"question"}),a.jsx("option",{value:"feedback",children:"feedback"})]}),a.jsx("button",{type:"submit",disabled:m||!c.trim(),className:"shell-action",children:m?"Posting…":"Post comment"}),v?a.jsx("span",{className:"text-xs text-red-400",children:v}):null]})]})]})})}function b1({node:e,depth:t,onToggleResolved:n}){const{entry:o,replies:i}=e,l=o.type==="question";return a.jsxs("div",{className:$e("space-y-2",t>0&&"ml-4 border-l border-neutral-800 pl-4"),children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-neutral-400",children:[a.jsx("span",{className:"font-mono",children:o.id}),a.jsx("span",{children:"·"}),a.jsx("span",{children:o.timestamp}),a.jsx("span",{children:"·"}),a.jsx("span",{className:"font-medium text-neutral-200",children:o.author}),a.jsx("span",{children:"·"}),a.jsx("span",{className:$e("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",l&&"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}),l?a.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?a.jsx(ap,{className:"h-3 w-3"}):a.jsx(uC,{className:"h-3 w-3"}),o.resolved?"resolved":"open"]}):null,o.replyTo?a.jsxs("span",{className:"inline-flex items-center gap-1 text-neutral-500",children:[a.jsx(AC,{className:"h-3 w-3"}),o.replyTo]}):null]}),a.jsx(Ut,{content:o.body}),i.length>0?a.jsx("div",{className:"space-y-2",children:i.map(c=>a.jsx(b1,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const fO=["review","complete","unblock","start","block","fail","reopen"];function zy(){var mn,Rn,Tn,re,ae,pe;const{slug:e,aslug:t}=St(),n=Wt(),o=Pt(),[i,l]=No(),[c,d]=g.useState(null),[p,h]=g.useState(null),[m,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[j,S]=g.useState(!1),[P,T]=g.useState(!1),[L,O]=g.useState(0),R=i.get("tab")??"summary",$=Cc(),{data:A,loading:q,error:J,refetch:z}=TN(e,t),{data:G}=Gv(e),{data:Y}=pp(),{data:Q}=IN(e,t),_=g.useMemo(()=>{if(!A||!G)return[];const ne=new Map(G.assignments.map(me=>[me.slug,me]));return A.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}})},[A,G]),D=_.filter(ne=>ne.status!=="completed"&&ne.status!=="review");Xo("assignment");const F=g.useMemo(()=>((G==null?void 0:G.assignments)??[]).map(ne=>ne.slug),[G]),U=t?F.indexOf(t):-1,K=U>0?F[U-1]:null,E=U>=0&&U<F.length-1?F[U+1]:null,B=`${o}/projects/${e}/assignments/${t}`;ct({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${B}/edit`)}),ct({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${B}/plan/edit`)}),ct({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${B}/handoff/edit`)}),ct({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${B}/decision-record/edit`)}),ct({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${B}/scratchpad/edit`)}),ct({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!K,handler:()=>K&&n(`${o}/projects/${e}/assignments/${K}`)}),ct({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!E,handler:()=>E&&n(`${o}/projects/${e}/assignments/${E}`)});const Z=g.useMemo(()=>A?iO(A.body):{acceptanceCriteria:[],summaryBody:""},[A]),I=g.useMemo(()=>aO(Z.summaryBody),[Z.summaryBody]),de=Z.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(A){if(!Ne.current){Ee.current=fe,Ne.current=!0;return}fe&&!Ee.current&&O(ne=>ne+1),Ee.current=fe}},[fe,A]),q)return a.jsx(yt,{label:"Loading assignment workspace…"});if(J||!A||!e||!t)return a.jsx(dt,{error:J||"Assignment not found."});const Pe=e,je=t,ft=de.length>0?{checked:ve,total:de.length}:void 0,nt=A.availableTransitions??[],Ue=nt.filter(ne=>!ne.disabled&&ne.targetStatus!==A.status),Be=fO.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&&((Rn=ke.assignment)==null?void 0:Rn.slug)===t&&Ct.push({sessionName:ne.name,command:ke.command,urls:ke.urls});async function Ot(ne){d(null);try{await x1(Pe,je,ne),z()}catch(me){d(me.message)}}async function cn(){T(!0);try{await sO(Pe,je),n(`${o}/projects/${Pe}`)}catch(ne){d(ne.message),T(!1),S(!1)}}async function hn(ne,me){d(null),h(ne.command);try{return await g1(Pe,je,ne,me),z(),!0}catch(ke){return d(ke.message),!1}finally{h(null)}}function Qe(ne){if(y1(ne)){x(ne);return}hn(ne)}async function rt(ne,me){b(null),k(ne);try{const ke=await fetch(`/api/projects/${Pe}/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}`);z()}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:()=>Qe(ne),disabled:p===ne.command})),...nt.filter(ne=>ne.disabled||ne.targetStatus===A.status).map(ne=>({key:`transition-${ne.command}`,label:ne.label,disabled:!0,disabledReason:ne.targetStatus===A.status?`Already ${A.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===A.status,disabledReason:ne.id===A.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:yC,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:LC,href:`${o}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:_d,href:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:Yl,href:`${o}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:kC,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:Eo,destructive:!0,onSelect:()=>S(!0)}],Qt=(Be==null?void 0:Be.command)==="review";return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Ht,{status:A.status,progress:ft}),a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:A.title}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",kN(A.updated)]}),D.length>0&&a.jsxs("span",{className:"text-xs text-amber-700 dark:text-amber-300",children:["⚠ ",D.length," unmet dep",D.length===1?"":"s"]}),a.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[Be&&a.jsx("button",{type:"button",title:Be.warning||Be.description,disabled:p===Be.command,onClick:()=>Qe(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:a.jsx("span",{children:p===Be.command?"Working…":Be.label})},Qt?`review-${L}`:Be.command),a.jsx(oO,{items:Vt,align:"end"})]})]}),c?a.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,A.blockedReason?a.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:[a.jsx("strong",{children:"Blocked reason:"})," ",A.blockedReason]}):null]}),_.length>0&&a.jsx(lO,{projectSlug:e,dependencies:_,blockedReason:A.blockedReason}),A.enrichedLinks&&A.enrichedLinks.length>0&&a.jsx(cO,{links:A.enrichedLinks}),A.referencedBy&&A.referencedBy.length>0&&a.jsx(Re,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:a.jsx("ul",{className:"space-y-2",children:A.referencedBy.map(ne=>{const me=ne.sourceProjectSlug===null?`/assignments/${ne.sourceId}`:`${o}/projects/${ne.sourceProjectSlug}/assignments/${ne.sourceSlug}`;return a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Ce,{to:me,className:"text-foreground hover:text-primary",children:ne.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",ne.mentions," mention",ne.mentions===1?"":"s",")"]}),ne.sourceProjectSlug===null?a.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)})})}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx(Tp,{value:R,onValueChange:ne=>l({tab:ne}),items:[{value:"summary",label:"Summary",content:a.jsxs("div",{className:"space-y-5",children:[Z.acceptanceCriteria.length>0?a.jsx(Re,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:a.jsxs("div",{className:"space-y-3",children:[v?a.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,Z.acceptanceCriteria.map((ne,me)=>{const ke=N!==null;return a.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[a.jsx("input",{type:"checkbox",checked:ne.checked,disabled:ke,onChange:_t=>rt(me,_t.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),a.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":ne.checked,children:ne.text})]},`${me}-${ne.text}`)})]})}):null,I.hasSection?a.jsx(Re,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:a.jsx(Ut,{content:I.todosMarkdown,emptyState:"No todos yet."})}):null,a.jsx(Re,{title:"Assignment Summary",children:a.jsx(Ut,{content:I.remaining,emptyState:Z.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:A.plan?1:0,content:A.plan?a.jsx("div",{className:"space-y-5",children:a.jsxs(Re,{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:a.jsxs(Ce,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/plan/edit`,children:[a.jsx(_d,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Plan"})]}),children:[a.jsx("div",{className:"mb-4",children:a.jsx(Ht,{status:A.plan.status})}),a.jsx(Ut,{content:A.plan.body,emptyState:"No plan content yet."})]})}):a.jsx(Ye,{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:A.scratchpad?1:0,content:A.scratchpad?a.jsx(Re,{title:"Scratchpad",actions:a.jsxs(Ce,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[a.jsx(_d,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Scratchpad"})]}),children:a.jsx(Ut,{content:A.scratchpad.body,emptyState:"Scratchpad is empty."})}):a.jsx(Ye,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Tn=A.handoff)==null?void 0:Tn.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:A.handoff?a.jsx(Re,{children:a.jsx(Ut,{content:A.handoff.body,emptyState:"No handoff history yet."})}):a.jsx(Ye,{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=A.progress)==null?void 0:re.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:A.progress&&A.progress.entries.length>0?a.jsx(Re,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:a.jsx("ol",{className:"space-y-4",children:A.progress.entries.map((ne,me)=>a.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-neutral-400",children:ne.timestamp}),a.jsx(Ut,{content:ne.body})]},`${ne.timestamp}-${me}`))})}):a.jsx(Ye,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((ae=A.comments)==null?void 0:ae.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:A.comments&&A.comments.entries.length>0?a.jsx(v1,{projectSlug:e,assignmentSlug:t,entries:A.comments.entries}):a.jsx(Ye,{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=A.decisionRecord)==null?void 0:pe.decisionCount)??0,content:a.jsx("div",{className:"space-y-5",children:A.decisionRecord?a.jsx(Re,{children:a.jsx(Ut,{content:A.decisionRecord.body,emptyState:"No decision history yet."})}):a.jsx(Ye,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Re,{title:"Details",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsx(yo,{label:"ID",value:A.id,copyable:!0}),a.jsx(yo,{label:"Priority",value:A.priority}),A.assignee&&a.jsx(yo,{label:"Assignee",value:A.assignee}),a.jsx(yo,{label:"Updated",value:`${wN(A.updated)} · Created ${bN(A.created)}`}),A.workspace.repository&&a.jsx(yo,{label:"Repository",value:A.workspace.repository,copyable:!0}),A.workspace.worktreePath&&a.jsx(yo,{label:"Worktree",value:A.workspace.worktreePath,copyable:!0}),A.workspace.branch&&a.jsx(yo,{label:"Branch",value:A.workspace.branch,copyable:!0}),A.workspace.parentBranch&&a.jsx(yo,{label:"Parent branch",value:A.workspace.parentBranch,copyable:!0})]})}),Ct.length>0&&a.jsx(Re,{title:"Servers",children:a.jsx("div",{className:"space-y-2",children:Ct.map((ne,me)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:ne.command}),a.jsx("span",{className:"text-xs text-muted-foreground",children:ne.sessionName}),ne.urls.map(ke=>a.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:",":"),a.jsx(jv,{className:"h-2.5 w-2.5"})]},ke))]},me))})}),Q&&Q.sessions.length>0&&a.jsx(Re,{title:"Agent Sessions",children:a.jsx("div",{className:"space-y-2",children:Q.sessions.map(ne=>a.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(pc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"font-medium text-foreground",children:ne.agent}),a.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),a.jsx(Hr,{value:ne.sessionId})]})]}),a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Ht,{status:ne.status}),a.jsx("span",{className:"text-xs text-muted-foreground",children:Cr(ne.started)})]})]},ne.sessionId))})})]})]}),a.jsx(cw,{open:m!==null,action:m,assignmentTitle:A.title,loading:p===(m==null?void 0:m.command),onOpenChange:ne=>{ne||x(null)},onConfirm:async ne=>{if(!m)return;await hn(m,ne)&&x(null)}}),a.jsx(Lw,{open:j,title:"Delete assignment?",description:`This will permanently delete "${A.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:P,onOpenChange:ne=>{ne||S(!1)},onConfirm:cn})]})}function yo({label:e,value:t,copyable:n}){return a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsx("dt",{className:"text-muted-foreground",children:e}),a.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[a.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&a.jsx(Hr,{value:t})]})]})}function pO(){var d,p,h,m,x;const{id:e}=St(),[t,n]=No(),o=t.get("tab")??"summary",{data:i,loading:l,error:c}=AN(e);return l?a.jsx(yt,{}):c?a.jsx(dt,{error:c}):i?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("header",{className:"space-y-2",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Ht,{status:i.status}),a.jsx("span",{className:"text-xs font-mono text-neutral-500",children:i.id}),a.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"})]}),a.jsx("h1",{className:"text-2xl font-semibold text-neutral-100",children:i.title}),i.blockedReason?a.jsxs("p",{className:"text-sm text-amber-300",children:["Blocked: ",i.blockedReason]}):null]}),i.referencedBy&&i.referencedBy.length>0?a.jsx(Re,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:a.jsx("ul",{className:"space-y-2",children:i.referencedBy.map(v=>a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Ce,{to:v.sourceProjectSlug===null?`/assignments/${v.sourceId}`:`/projects/${v.sourceProjectSlug}/assignments/${v.sourceSlug}`,className:"text-foreground hover:text-primary",children:v.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.mentions," mention",v.mentions===1?"":"s",")"]})]},v.sourceId))})}):null,a.jsx(Tp,{value:o,onValueChange:v=>n({tab:v}),items:[{value:"summary",label:"Summary",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Re,{title:"Assignment",children:a.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:a.jsx("div",{className:"space-y-5",children:i.progress&&i.progress.entries.length>0?a.jsx(Re,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:a.jsx("ol",{className:"space-y-4",children:i.progress.entries.map((v,b)=>a.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-neutral-400",children:v.timestamp}),a.jsx(Ut,{content:v.body})]},`${v.timestamp}-${b}`))})}):a.jsx(Ye,{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:a.jsx("div",{className:"space-y-5",children:a.jsx(v1,{projectSlug:null,assignmentSlug:i.id,entries:((h=i.comments)==null?void 0:h.entries)??[]})})},{value:"plan",label:"Plan",content:a.jsx("div",{className:"space-y-5",children:i.plan?a.jsxs(Re,{children:[a.jsx(Ut,{content:i.plan.body,emptyState:"Plan file exists but is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.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"})})]}):a.jsx(Ye,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:a.jsx("div",{className:"space-y-5",children:i.scratchpad?a.jsxs(Re,{children:[a.jsx(Ut,{content:i.scratchpad.body,emptyState:"Scratchpad is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.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"})})]}):a.jsx(Ye,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((m=i.handoff)==null?void 0:m.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.handoff?a.jsxs(Re,{children:[a.jsx(Ut,{content:i.handoff.body,emptyState:"No handoff history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.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"})})]}):a.jsx(Ye,{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:a.jsx("div",{className:"space-y-5",children:i.decisionRecord?a.jsxs(Re,{children:[a.jsx(Ut,{content:i.decisionRecord.body,emptyState:"No decision history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.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"})})]}):a.jsx(Ye,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):a.jsx(dt,{error:"Assignment not found"})}const hO=["table","list","kanban"],By={critical:0,high:1,medium:2,low:3};function Uy(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function mO(e,t){return e.toString()===t.toString()}function Hy(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function gO(e,t,n){return[...e].sort((i,l)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(l.title);break;case"status":c=i.status.localeCompare(l.status);break;case"priority":c=(By[i.priority]??99)-(By[l.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(l.assignee??"");break;case"dependencies":c=i.dependsOn.length-l.dependsOn.length;break;case"updated":c=i.updated.localeCompare(l.updated);break}return n==="asc"?c:-c})}function Wy(){const{workspace:e}=St(),t=Pt(),n=Wt(),o=g.useRef(null);Xo("list:assignments");const{data:i,loading:l,error:c,refetch:d}=Vv(),p=Cc(),[h,m]=No(),x=g.useMemo(()=>rP(p.order),[p]),v=g.useMemo(()=>{const V={};for(const le of x)V[le]=ZE(p,le);return V},[x,p]),b=g.useMemo(()=>x.map(V=>({id:V,title:v[V]??V,description:M0(V)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=h.get("view"),j=h.get("status"),S=h.get("stale"),P=k&&hO.includes(k)?k:"kanban";function T(V){return!V||!N.has(V)?"all":V}const L=g.useCallback(V=>{m(le=>{const ge=new URLSearchParams(le);return V==="kanban"?ge.delete("view"):ge.set("view",V),ge})},[m]),[O,R]=g.useState(""),[$,A]=g.useState(()=>T(j)),[q,J]=g.useState("all"),[z,G]=g.useState("all"),[Y,Q]=g.useState("all"),[_,D]=g.useState(()=>Uy(S)),[F,U]=g.useState("updated"),[K,E]=g.useState("desc"),[B,Z]=g.useState(()=>new Set(x)),[I,de]=g.useState([]),[ve,fe]=g.useState(null),[Ee,Ne]=g.useState(null),[Pe,je]=g.useState(null),[ft,nt]=g.useState(null),[Ue,Be]=g.useState(null);g.useEffect(()=>{de((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const V=T(j);V!==$&&A(V);const le=Uy(S);le!==_&&D(le)},[_,S,$,j]),g.useEffect(()=>{m(V=>{const le=new URLSearchParams(V);return $==="all"?le.delete("status"):le.set("status",$),_==="all"?le.delete("stale"):_==="stale"?le.set("stale","1"):le.set("stale","0"),mO(V,le)?V:le})},[_,m,$]);const Ct=g.useMemo(()=>Array.from(new Set(I.map(V=>V.status))).sort(),[I]),Ot=g.useMemo(()=>Array.from(new Set(I.map(V=>V.priority))).sort(),[I]),cn=g.useMemo(()=>Array.from(new Set(I.map(V=>V.assignee??"__unassigned__"))).sort(),[I]),hn=g.useMemo(()=>Array.from(new Map(I.filter(V=>V.projectSlug!==null).map(V=>[V.projectSlug,V.projectTitle]))).sort(([,V],[,le])=>V.localeCompare(le)),[I]),Qe=g.useMemo(()=>I.filter(V=>{if(e){if(e==="_ungrouped"){if(V.projectWorkspace!==null)return!1}else if(V.projectWorkspace!==e)return!1}if($!=="all"&&V.status!==$||q!=="all"&&V.priority!==q||_==="stale"&&!Hy(V.updated)||_==="fresh"&&Hy(V.updated)||z!=="all"&&(V.assignee??"__unassigned__")!==z)return!1;if(Y!=="all"){if(Y==="__standalone__"){if(V.projectSlug!==null)return!1}else if(V.projectSlug!==Y)return!1}const le=O.trim().toLowerCase();return!(le&&!`${V.title} ${V.slug} ${V.projectTitle??"standalone"} ${V.projectSlug??""}`.toLowerCase().includes(le))}),[_,I,O,$,q,z,Y,e]),rt=g.useMemo(()=>gO(Qe,F,K),[Qe,F,K]),{visibleItems:Vt,visibleIndexByKey:Qt}=g.useMemo(()=>{const V=P==="table"?rt:x.flatMap(ge=>Qe.filter(Oe=>Oe.status===ge)),le=new Map;return V.forEach((ge,Oe)=>le.set(Xt(ge),Oe)),{visibleItems:V,visibleIndexByKey:le}},[P,rt,Qe,x]),{hotkeyRowProps:mn}=ca(Vt,{scope:"list:assignments",onOpen:V=>{if(V.projectSlug===null){n(`/assignments/${V.id}`);return}const le=V.projectWorkspace?`/w/${V.projectWorkspace}`:t;n(`${le}/projects/${V.projectSlug}/assignments/${V.slug}`)}});if(ct({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var V;return(V=o.current)==null?void 0:V.focus()}}),ct({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),l)return a.jsx(yt,{label:"Loading assignments board…"});if(c||!i)return a.jsx(dt,{error:c||"Assignments board is unavailable."});async function Rn({item:V,toColumnId:le,action:ge,reason:Oe}){fe(null),Ne(Xt(V));const Un=I;de(Zt=>Zt.map(pt=>Xt(pt)===Xt(V)?{...pt,status:le,blockedReason:le==="blocked"?Oe??pt.blockedReason:null}:pt));try{if(V.projectSlug===null){if(!ge)throw new Error("Standalone assignments require a transition action, not status override.");const pt=await fetch(`/api/assignments/${encodeURIComponent(V.id)}/transitions/${encodeURIComponent(ge.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe?{reason:Oe}:{})});if(!pt.ok)throw new Error((await pt.json()).error??`HTTP ${pt.status}`);const Xe=(await pt.json()).assignment;de(wt=>wt.map(Mt=>Xt(Mt)===Xt(V)?{...Mt,status:Xe.status,blockedReason:Xe.blockedReason,availableTransitions:Xe.availableTransitions,updated:Xe.updated}:Mt));return}const Zt=ge?await g1(V.projectSlug,V.slug,ge,Oe):await x1(V.projectSlug,V.slug,le);return de(pt=>pt.map(Fe=>Xt(Fe)===Xt(V)?{...Fe,status:Zt.status,blockedReason:Zt.blockedReason,availableTransitions:Zt.availableTransitions,updated:Zt.updated}:Fe)),d(),!0}catch(Zt){return de(Un),fe(Zt.message),!1}finally{Ne(null)}}async function Tn({item:V,toColumnId:le}){if(V.status===le)return;const ge=Bi(V,le);if(ge!=null&&ge.disabled){fe(ge.disabledReason||`Cannot move this assignment to ${le}.`);return}if(ge&&y1(ge)){Be({item:V,toColumnId:le,action:ge});return}await Rn({item:V,toColumnId:le,action:ge})}function re(V){Z(le=>{const ge=new Set(le);return ge.has(V)?ge.delete(V):ge.add(V),ge})}function ae(V){F===V?E(le=>le==="asc"?"desc":"asc"):(U(V),E("asc"))}const pe=Pe?I.find(V=>Xt(V)===Pe)??null:null;function ne(V,le){V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/plain",le),je(le)}function me(){je(null),nt(null)}function ke(V,le){if(!pe)return;const ge=Bi(pe,le);pe.status===le||ge!=null&&ge.disabled||(V.preventDefault(),V.dataTransfer.dropEffect="move",nt(le))}function _t(V,le){ft===le&&!V.currentTarget.contains(V.relatedTarget)&&nt(null)}function Jt(V,le){if(V.preventDefault(),!pe||pe.status===le){me();return}me(),Tn({item:pe,toColumnId:le})}function qt({field:V,children:le}){const ge=F===V;return a.jsx("th",{className:"pb-3 font-medium",children:a.jsxs("button",{type:"button",onClick:()=>ae(V),className:"inline-flex items-center gap-1 hover:text-foreground",children:[le,ge?K==="asc"?a.jsx(kv,{className:"h-3 w-3"}):a.jsx(ea,{className:"h-3 w-3"}):null]})})}return a.jsxs("div",{className:"space-y-5",children:[a.jsx("div",{className:"flex items-center justify-end",children:a.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:[a.jsx(Bn,{className:"h-4 w-4"}),"New Assignment"]})}),a.jsxs(Np,{children:[a.jsx(Sc,{ref:o,value:O,onChange:R,placeholder:"Search assignments or projects"}),a.jsxs("select",{value:$,onChange:V=>A(T(V.target.value)),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),Ct.map(V=>a.jsx("option",{value:V,children:v[V]??V},V))]}),a.jsxs("select",{value:q,onChange:V=>J(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),Ot.map(V=>a.jsx("option",{value:V,className:"capitalize",children:V},V))]}),a.jsxs("select",{value:z,onChange:V=>G(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),cn.map(V=>a.jsx("option",{value:V,children:V==="__unassigned__"?"Unassigned":V},V))]}),a.jsxs("select",{value:Y,onChange:V=>Q(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"__standalone__",children:"Standalone"}),hn.map(([V,le])=>a.jsx("option",{value:V,children:le},V))]}),a.jsxs("select",{value:_,onChange:V=>D(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All activity"}),a.jsx("option",{value:"stale",children:"Stale only"}),a.jsx("option",{value:"fresh",children:"Fresh only"})]}),a.jsx(Ep,{value:P,onChange:V=>L(V),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),ve?a.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?a.jsx(Ye,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:a.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[a.jsx(lp,{className:"h-4 w-4"}),a.jsx("span",{children:"Browse Projects"})]})}):Qe.length===0?a.jsx(Ye,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):P==="table"?a.jsx(Re,{title:`${rt.length} assignment${rt.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx(qt,{field:"title",children:"Assignment"}),a.jsx(qt,{field:"status",children:"Status"}),a.jsx(qt,{field:"priority",children:"Priority"}),a.jsx(qt,{field:"assignee",children:"Assignee"}),a.jsx(qt,{field:"dependencies",children:"Dependencies"}),a.jsx(qt,{field:"updated",children:"Updated"})]})}),a.jsx("tbody",{children:rt.map((V,le)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...mn(le),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Ce,{to:V.projectSlug===null?`/assignments/${V.id}`:`${t}/projects/${V.projectSlug}/assignments/${V.slug}`,className:"font-semibold text-foreground hover:text-primary",children:V.title}),a.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:V.projectTitle??a.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),a.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:V.id,children:[V.id.slice(0,8),a.jsx(Hr,{value:V.id})]})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("select",{value:V.status,disabled:Ee===Xt(V),onChange:ge=>Tn({item:V,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")]`,(Ql[V.status]??Ql.pending).className,Ee===Xt(V)&&"animate-pulse opacity-60"),children:x.map(ge=>{const Oe=V.status===ge?void 0:Bi(V,ge),Un=(Oe==null?void 0:Oe.disabled)??!1;return a.jsx("option",{value:ge,disabled:Un,title:Un?(Oe==null?void 0:Oe.disabledReason)??void 0:void 0,children:v[ge]},ge)})})}),a.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:V.priority}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.assignee??"Unassigned"}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.dependsOn.length}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(V.updated)})]},Xt(V)))})]})})}):P==="list"?a.jsx("div",{className:"space-y-3",children:x.map(V=>{var pt;const le=Qe.filter(Fe=>Fe.status===V);if(le.length===0&&!pe)return null;const ge=B.has(V),Oe=pe?pe.status!==V&&!((pt=Bi(pe,V))!=null&&pt.disabled):!1,Un=pe?pe.status!==V&&!Oe:!1,Zt=ft===V;return a.jsxs("div",{className:$e("rounded-lg border border-border/60 bg-card/90 transition",Zt&&Oe&&"ring-2 ring-ring/30",Un&&"border-dashed opacity-65"),onDragOver:Fe=>ke(Fe,V),onDragLeave:Fe=>_t(Fe,V),onDrop:Fe=>Jt(Fe,V),children:[a.jsxs("button",{type:"button",onClick:()=>re(V),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[a.jsx(ea,{className:`h-4 w-4 text-muted-foreground transition-transform ${ge?"":"-rotate-90"}`}),a.jsx("span",{className:"font-semibold text-foreground",children:v[V]}),a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:le.length})]}),ge&&le.length>0&&a.jsx("div",{className:"space-y-3 px-4 pb-4",children:le.map(Fe=>{const Xe=Xt(Fe),wt=Pe===Xe,Mt=Qt.get(Xe)??-1;return a.jsx("div",{draggable:!0,onDragStart:Gt=>ne(Gt,Xe),onDragEnd:me,...Mt>=0?mn(Mt):{},className:$e("cursor-grab transition active:cursor-grabbing",wt&&"scale-[0.98] opacity-50"),children:a.jsx(Vy,{assignment:Fe,dragging:wt,transitioning:Ee===Xe})},Xe)})})]},V)})}):a.jsx($0,{columns:b,items:Qe,getItemId:Xt,getColumnId:V=>V.status,canDrop:({item:V,fromColumnId:le,toColumnId:ge})=>{if(le===ge)return{allowed:!0};const Oe=Bi(V,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:V,toColumnId:le})=>Tn({item:V,toColumnId:le}),emptyMessage:V=>`No ${V.title.toLowerCase()} assignments.`,renderCard:(V,{dragging:le})=>{const ge=Qt.get(Xt(V))??-1;return a.jsx("div",{...ge>=0?mn(ge):{},children:a.jsx(Vy,{assignment:V,dragging:le,transitioning:Ee===Xt(V)})})}}),a.jsx(cw,{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:V=>{V||Be(null)},onConfirm:async V=>{if(!Ue)return;const le=Ue;await Rn({item:le.item,toColumnId:le.toColumnId,action:le.action,reason:V})&&Be(null)}})]})}function Vy({assignment:e,dragging:t,transitioning:n}){var i;const o=Pt();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.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}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.projectTitle??a.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),a.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&&a.jsx(Hr,{value:e.id})]})]}),a.jsx(Ht,{status:e.status})]}),e.blockedReason?a.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,a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),a.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[a.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),a.jsx("span",{children:ko(e.updated)})]})]})}function Bi(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(`
|
|
475
|
+
`),l=[],c=new Map;let d=null,p=[];const h=()=>{d&&(l.push(d),c.set(d,p))};for(const m of i){const x=m.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!m.startsWith(" ")){h(),d=x[1],p=[m];continue}d&&p.push(m)}return h(),{order:l,blocks:c,body:o}}function ya(e){return`---
|
|
476
|
+
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
477
|
+
`)}
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
${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 xO(e,t){return It(e,t)==="true"}function Xi(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 yO(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}: ${yO(n)}`])}function Qi(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 Ji(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Uc(e){const t=Tr(e);return{title:It(t,"title"),slug:It(t,"slug"),workspace:It(t,"workspace"),archived:xO(t,"archived"),archivedAt:It(t,"archivedAt"),archivedReason:It(t,"archivedReason"),tags:Xi(t,"tags").join(", "),body:t.body}}function vO(e,t){const n=Tr(e),o={...Uc(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),Qi(n,"tags",Ji(o.tags)),n.body=o.body,ya(n)}function Hc(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:Xi(t,"dependsOn").join(", "),links:Xi(t,"links").join(", "),blockedReason:It(t,"blockedReason"),tags:Xi(t,"tags").join(", "),body:t.body}}function bO(e,t){const n=Tr(e),o={...Hc(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),Qi(n,"dependsOn",Ji(o.dependsOn)),Qi(n,"links",Ji(o.links)),Lt(n,"blockedReason",o.blockedReason||null),Qi(n,"tags",Ji(o.tags)),n.body=o.body,ya(n)}function Wc(e){const t=Tr(e);return{assignment:It(t,"assignment"),status:It(t,"status"),body:t.body}}function wO(e,t){const n=Tr(e),o={...Wc(e),...t};return Lt(n,"assignment",o.assignment),Lt(n,"status",o.status),n.body=o.body,ya(n)}function Vc(e){const t=Tr(e);return{assignment:It(t,"assignment"),body:t.body}}function kO(e,t){const n=Tr(e),o={...Vc(e),...t};return Lt(n,"assignment",o.assignment),n.body=o.body,ya(n)}function qc(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:Xi(t,"tags").join(", "),body:t.body}}function jO(e,t){const n=Tr(e),o={...qc(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),Qi(n,"tags",Ji(o.tags)),n.body=o.body,ya(n)}function lt(e,t,n){switch(e){case"project":return vO(t,n);case"assignment":return bO(t,n);case"plan":return wO(t,n);case"scratchpad":return kO(t,n);case"playbook":return jO(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 mf(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function Js({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:l,title:c,description:d,onCancel:p,helpTitle:h,helpBody:m,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 P=EO(t,v),T=v!==e,L=NO(t,v),O=T?"Unsaved changes":n==="create"?"Draft":"Saved";return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),a.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?a.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[a.jsx(bv,{className:"h-4 w-4"}),a.jsx("span",{children:"Back"})]}),a.jsxs("button",{type:"button",onClick:()=>k(R=>!R),className:"shell-action",children:[a.jsx(xC,{className:"h-4 w-4"}),a.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),a.jsxs("button",{type:"button",onClick:()=>o(v),disabled:i||P.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:[a.jsx(up,{className:"h-4 w-4"}),a.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),l?a.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:l}):null,P.length>0?a.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:a.jsx("ul",{className:"space-y-1",children:P.map(R=>a.jsx("li",{children:R},R))})}):null]}),a.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[a.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),a.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[a.jsx(rx,{className:"h-4 w-4"}),"Preview"]})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[a.jsx("div",{className:j==="preview"?"hidden md:block":"",children:a.jsx("div",{className:"surface-panel space-y-3",children:N?a.jsx("textarea",{value:v,onChange:R=>b(R.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}):a.jsx(SO,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),a.jsx("div",{className:j==="edit"?"hidden md:block":"",children:a.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rx,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),a.jsx(Ut,{content:L,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function SO({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const l=Uc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ui,{children:[a.jsx(Ze,{label:"Project title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===Ur(l.title)||!l.slug.trim())&&(p.slug=Ur(d)),n(lt(e,t,p))},className:"editor-input"})}),a.jsx(Ze,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(lt(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.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."})]})}),a.jsx(Ze,{label:"Tags",children:a.jsx("input",{value:l.tags,onChange:c=>n(lt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(CO,{value:l.workspace,onChange:c=>n(lt(e,t,{workspace:c}))})]}),a.jsx(Ze,{label:"Project body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(lt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const l=Hc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ui,{children:[a.jsx(Ze,{label:"Assignment title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===Ur(l.title)||!l.slug.trim())&&(p.slug=Ur(d)),n(lt(e,t,p))},className:"editor-input"})}),a.jsx(Ze,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(lt(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.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."})]})}),a.jsx(Ze,{label:"Status",children:a.jsxs("select",{value:l.status,onChange:c=>n(lt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"review",children:"Review"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"failed",children:"Failed"})]})}),a.jsx(Ze,{label:"Priority",children:a.jsxs("select",{value:l.priority,onChange:c=>n(lt(e,t,{priority:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]})}),a.jsx(Ze,{label:"Assignee",children:a.jsx("input",{value:l.assignee,onChange:c=>n(lt(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),a.jsx(Ze,{label:"Depends on",className:"md:col-span-2",children:a.jsx("input",{value:l.dependsOn,onChange:c=>n(lt(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),a.jsx(Ze,{label:"Links",className:"md:col-span-2",children:a.jsx("input",{value:l.links,onChange:c=>n(lt(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),a.jsx(Ze,{label:"Blocked reason",className:"md:col-span-2",children:a.jsx("input",{value:l.blockedReason,onChange:c=>n(lt(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),a.jsx(Ze,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:l.tags,onChange:c=>n(lt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),a.jsx(Ze,{label:"Assignment body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(lt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const l=Wc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ui,{children:[a.jsx(Ze,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),a.jsx(Ze,{label:"Plan status",children:a.jsxs("select",{value:l.status,onChange:c=>n(lt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"draft",children:"Draft"}),a.jsx("option",{value:"approved",children:"Approved"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"})]})})]}),a.jsx(Ze,{label:"Plan body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(lt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const l=Vc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsx(Ui,{children:a.jsx(Ze,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),a.jsx(Ze,{label:"Scratchpad body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(lt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=qc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ui,{children:[a.jsx(Ze,{label:"Playbook name",children:a.jsx("input",{value:i.name,onChange:l=>{const c=l.target.value,d={name:c};o&&(i.slug===Ur(i.name)||!i.slug.trim())&&(d.slug=Ur(c)),n(lt(e,t,d))},className:"editor-input"})}),a.jsx(Ze,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:i.slug,disabled:!o,onChange:l=>n(lt(e,t,{slug:Ur(l.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.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."})]})}),a.jsx(Ze,{label:"Description",className:"md:col-span-2",children:a.jsx("input",{value:i.description,onChange:l=>n(lt(e,t,{description:l.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),a.jsx(Ze,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:i.tags,onChange:l=>n(lt(e,t,{tags:l.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(Ze,{label:"When to use",className:"md:col-span-2",children:a.jsx("input",{value:i.whenToUse,onChange:l=>n(lt(e,t,{whenToUse:l.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),a.jsx(Ze,{label:"Playbook rules",children:a.jsx("textarea",{value:i.body,onChange:l=>n(lt(e,t,{body:l.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Ui({children:e}){return a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Ze({label:e,children:t,className:n}){return a.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function CO({value:e,onChange:t}){const{data:n}=fp(),o=(n==null?void 0:n.workspaces)??[];return a.jsx(Ze,{label:"Workspace",children:a.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[a.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>a.jsx("option",{value:i,children:i},i))]})})}function NO(e,t){switch(e){case"project":return Uc(t).body;case"assignment":return Hc(t).body;case"plan":return Wc(t).body;case"scratchpad":return Vc(t).body;case"playbook":return qc(t).body}}function EO(e,t){switch(e){case"project":{const n=Uc(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!mf(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=Hc(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!mf(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return Wc(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return Vc(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=qc(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!mf(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function qy(){const e=Wt(),{workspace:t}=St(),n=Pt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[h,m]=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
|
|
481
|
+
workspace: ${t}`)),i(b),c(!1)}).catch(v=>{m(v.message),c(!1)})},[t]);async function x(v){p(!0),m(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){m(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/projects/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return l?a.jsx(yt,{label:"Loading project template…"}):h&&!o?a.jsx(dt,{error:h}):a.jsx(Js,{initialContent:o||"",documentType:"project",mode:"create",onSave:x,saving:d,error:h,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 Gy(){const{slug:e}=St(),t=Pt(),n=Wt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[h,m]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(v=>v.json()).then(v=>{i(v.content),c(!1)}).catch(v=>{m(v.message),c(!1)})},[]);async function x(v){if(!e){m("Project slug is required.");return}p(!0),m(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){m(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/projects/${e}/assignments/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return l?a.jsx(yt,{label:"Loading assignment template…"}):h&&!o?a.jsx(dt,{error:h}):a.jsx(Js,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:h,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 Ky(){const{workspace:e}=St(),t=Pt(),n=Wt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[h,m]=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=>{m(b.message),c(!1)})},[e]);async function x(v){var b;p(!0),m(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){m(k.error||`HTTP ${N.status}`),p(!1);return}const j=(b=k==null?void 0:k.assignment)==null?void 0:b.id;if(!j){m("Server did not return the new assignment id."),p(!1);return}n(`/assignments/${j}`)}catch(N){m(N.message),p(!1);return}p(!1)}return l?a.jsx(yt,{label:"Loading assignment template…"}):h&&!o?a.jsx(dt,{error:h}):a.jsx(Js,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:h,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 Gc({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:l,helpTitle:c,helpBody:d}){const p=Wt(),{data:h,loading:m,error:x}=Kv(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function j(S){b(!0),k(null);try{const P=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),T=await P.json();if(!P.ok){k(T.error||`HTTP ${P.status}`),b(!1);return}p(n)}catch(P){k(P.message),b(!1);return}b(!1)}return m?a.jsx(yt,{label:`Loading ${o.toLowerCase()}…`}):x||!h?a.jsx(dt,{error:x||`${o} is unavailable.`}):a.jsx(Js,{initialContent:h.content,documentType:l,onSave:j,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Yy(){const{slug:e}=St(),t=Pt(),n=e??"";return a.jsx(Gc,{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 gf(){const{slug:e,aslug:t,id:n}=St(),o=Pt(),i=!!n,l=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 a.jsx(Gc,{loadUrl:l,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 xf(){const{slug:e,aslug:t,id:n}=St(),o=Pt(),i=!!n,l=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 a.jsx(Gc,{loadUrl:l,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 yf(){const{slug:e,aslug:t,id:n}=St(),o=Pt(),i=!!n,l=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 a.jsx(Gc,{loadUrl:l,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 w1({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:l,helpBody:c}){const d=Wt(),{data:p,loading:h,error:m}=Kv(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,j]=g.useState(!1),[S,P]=g.useState(null);async function T(){j(!0),P(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){P(O.error||`HTTP ${L.status}`),j(!1);return}d(n)}catch(L){P(L.message),j(!1);return}j(!1)}return h?a.jsx(yt,{label:`Loading ${o.toLowerCase()}…`}):m||!p?a.jsx(dt,{error:m||`${o} is unavailable.`}):a.jsxs("div",{className:"space-y-4",children:[a.jsx(Re,{title:o,description:i,children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),a.jsx("input",{value:x,onChange:L=>v(L.target.value),placeholder:"Optional title",className:"editor-input"})]}),a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),a.jsx("textarea",{value:b,onChange:L=>N(L.target.value),className:"editor-textarea",spellCheck:!1})]}),S?a.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,a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),a.jsx("button",{type:"button",onClick:T,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"})]})]})}),a.jsx(Re,{title:"Current Document",children:a.jsx(Ut,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function vf(){const{slug:e,aslug:t,id:n}=St(),o=Pt(),i=!!n,l=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 a.jsx(w1,{loadUrl:l,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 bf(){const{slug:e,aslug:t,id:n}=St(),o=Pt(),i=!!n,l=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 a.jsx(w1,{loadUrl:l,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 Xy(){const{workspace:e}=St(),{data:t}=xc(),{data:n,loading:o,error:i,refetch:l}=pp(),[c,d]=g.useState(!1),[p,h]=g.useState(""),[m,x]=g.useState(!1),v=fn();g.useEffect(()=>{const P=v.hash.match(/^#server-(.+)/);if(!P)return;const T=decodeURIComponent(P[1]),L=document.querySelector(`[data-server-name="${window.CSS.escape(T)}"]`);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 P=new Set(t.filter(T=>e==="_ungrouped"?T.workspace===null:T.workspace===e).map(T=>T.slug));return n.sessions.filter(T=>T.windows.some(L=>L.panes.some(O=>O.assignment&&O.assignment.project!==null&&P.has(O.assignment.project))))})();async function N(P){if(P.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim()})}),h(""),d(!1),l()}catch{}}async function k(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),l()}finally{x(!1)}}async function j(P){await fetch(`/api/servers/${encodeURIComponent(P)}`,{method:"DELETE"}),l()}async function S(P){await fetch(`/api/servers/${encodeURIComponent(P)}/refresh`,{method:"POST"}),l()}return o?a.jsx(yt,{label:"Loading servers…"}):i?a.jsx(dt,{error:i}):n?n.tmuxAvailable?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?a.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[a.jsx("input",{type:"text",value:p,onChange:P=>h(P.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),a.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),a.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):a.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[a.jsx(Bn,{className:"h-3.5 w-3.5"}),"Track Session"]}),a.jsxs("button",{className:"shell-action",onClick:k,disabled:m,children:[a.jsx(Pv,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?a.jsx(Ye,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):a.jsx("div",{className:"mt-4 space-y-4",children:b.map(P=>a.jsx(PO,{session:P,onRefresh:()=>S(P.name),onRemove:()=>j(P.name),onRefetch:l},P.name))})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[a.jsx(FC,{className:"h-10 w-10 text-muted-foreground/40"}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),a.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",a.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function PO({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return a.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(cp,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),a.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"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:a.jsx(Pv,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&a.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>a.jsxs("div",{children:[a.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),a.jsx("div",{className:"space-y-1.5",children:i.panes.map(l=>a.jsx(RO,{pane:l,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${l.index}`))})]},i.index))}),!e.alive&&a.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(OC,{className:"h-4 w-4"}),a.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function RO({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=Pt(),l=e.cwd.replace(/^\/Users\/[^/]+/,"~");return a.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),a.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx("span",{className:"truncate",title:e.cwd,children:l}),a.jsx(Hr,{value:e.cwd})]}),e.branch&&a.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Sv,{className:"h-3 w-3"}),e.branch,e.worktree&&a.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&&a.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>a.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:",":"),a.jsx(jv,{className:"h-2.5 w-2.5"})]},c))}),a.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?a.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:[a.jsx(CC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?a.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]}):a.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function Qy(){const{workspace:e}=St(),{data:t}=xc(),{data:n,loading:o,error:i}=DN(),[l,c]=g.useState(""),[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,j]=g.useState(new Set),[S,P]=g.useState(!1),[T,L]=g.useState(null),[O,R]=g.useState(null),$=(n==null?void 0:n.sessions.some(Y=>Y.status==="active"))??!1;g.useEffect(()=>{if(!$)return;const Y=window.setInterval(()=>N(Q=>Q+1),3e4);return()=>window.clearInterval(Y)},[$]),g.useEffect(()=>{j(Y=>{if(Y.size===0)return Y;const Q=new Set((n==null?void 0:n.sessions.map(D=>D.sessionId))??[]),_=new Set([...Y].filter(D=>Q.has(D)));return _.size===Y.size?Y:_})},[n]);const A=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const Y=l.trim().toLowerCase();return[...n.sessions.filter(_=>{var U;if(e&&t){const K=((U=t.find(E=>E.slug===_.projectSlug))==null?void 0:U.workspace)??null;if(e==="_ungrouped"){if(K!==null)return!1}else if(K!==e)return!1}const D=AO(_.started);return d&&(!D||D<d)||h&&(!D||D>h)?!1:Y?[_.projectSlug??"",_.assignmentSlug??"",_.agent,_.sessionId,_.path,_.description??"",_.transcriptPath??""].join(" ").toLowerCase().includes(Y):!0})].sort((_,D)=>DO(_,D,x))},[n,l,x,d,h,b,e,t]);function q(Y){j(Q=>{const _=new Set(Q);return _.has(Y)?_.delete(Y):_.add(Y),_})}function J(){k.size===A.length&&A.length>0?j(new Set):j(new Set(A.map(Y=>Y.sessionId)))}async function z(Y){L(null),P(!0);try{const Q=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:Y})}),_=await Q.json().catch(()=>null);if(!Q.ok)throw new Error((_==null?void 0:_.error)||`HTTP ${Q.status}`);j(D=>new Set([...D].filter(F=>!Y.includes(F)))),R(null)}catch(Q){L(Q.message)}finally{P(!1)}}if(o)return a.jsx(yt,{label:"Loading agent sessions..."});if(i)return a.jsx(dt,{error:i});if(!n)return null;const G=n.sessions.length>0;return a.jsxs(a.Fragment,{children:[a.jsxs(Np,{children:[a.jsx(Sc,{value:l,onChange:c,placeholder:"Search project, assignment, agent, session ID, path, or description"}),a.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",a.jsx("input",{type:"date",value:d,onChange:Y=>p(Y.target.value),className:"editor-input min-w-[150px]"})]}),a.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",a.jsx("input",{type:"date",value:h,onChange:Y=>m(Y.target.value),className:"editor-input min-w-[150px]"})]}),a.jsxs("select",{value:x,onChange:Y=>v(Y.target.value),className:"editor-input max-w-[200px]",children:[a.jsx("option",{value:"started_desc",children:"Newest first"}),a.jsx("option",{value:"started_asc",children:"Oldest first"}),a.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),a.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),T?a.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:T}):null,k.size>0&&a.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:[a.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),a.jsxs("button",{className:"shell-action text-destructive",onClick:()=>R({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:[a.jsx(Eo,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),a.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),G?A.length===0?a.jsx(Ye,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):a.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"w-8 pb-2 pr-3",children:a.jsx("button",{onClick:J,className:"text-muted-foreground hover:text-foreground",children:k.size===A.length&&A.length>0?a.jsx(Fn,{className:"h-4 w-4"}):a.jsx(Rv,{className:"h-4 w-4"})})}),a.jsx("th",{className:"pb-2 pr-3",children:"Project"}),a.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),a.jsx("th",{className:"pb-2 pr-3",children:"Description"}),a.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),a.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Started"}),a.jsx("th",{className:"pb-2 pr-3",children:"Path"}),a.jsx("th",{className:"pb-2 pr-3",children:"Transcript"}),a.jsx("th",{className:"w-8 pb-2"})]})}),a.jsx("tbody",{children:A.map(Y=>a.jsx(TO,{session:Y,selected:k.has(Y.sessionId),onToggle:()=>q(Y.sessionId),onDelete:()=>R({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))})]})}):a.jsx(Ye,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),a.jsx(Lw,{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||R(null)},onConfirm:async()=>{O&&await z(O.sessionIds)}})]})}function TO({session:e,selected:t,onToggle:n,onDelete:o}){const i=Pt(),l=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 a.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?a.jsx(Fn,{className:"h-4 w-4"}):a.jsx(Rv,{className:"h-4 w-4"})})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?a.jsx(Ce,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:Cn(e.projectSlug)}):e.assignmentSlug?a.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"}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?a.jsx(Ce,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:Cn(e.assignmentSlug)}):e.assignmentSlug?a.jsx(Ce,{to:`/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline font-mono",children:e.assignmentSlug}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(pc,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:l}),a.jsx(Hr,{value:e.sessionId})]})}),a.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Cr(e.started)}),a.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&a.jsx(Hr,{value:e.path})]})}),a.jsx("td",{className:"max-w-[260px] py-2 pr-3",children:e.transcriptPath?a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),a.jsx(Hr,{value:e.transcriptPath})]}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2",children:a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})})]})}function AO(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 Ml(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 DO(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 Ml(e)-Ml(t);case"duration_desc":return Ml(t)-Ml(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 IO(){const{data:e,loading:t,error:n,refetch:o}=Yv(),[i,l]=g.useState(""),[c,d]=g.useState(null),p=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!i.trim())return e.playbooks;const m=i.toLowerCase();return e.playbooks.filter(x=>x.name.toLowerCase().includes(m)||x.description.toLowerCase().includes(m)||x.slug.toLowerCase().includes(m)||x.tags.some(v=>v.toLowerCase().includes(m)))},[e,i]);async function h(m,x,v){if(m.preventDefault(),m.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?a.jsx(yt,{label:"Loading playbooks..."}):n?a.jsx(dt,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between gap-4",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Bs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{type:"text",placeholder:"Search playbooks...",value:i,onChange:m=>l(m.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"})]}),a.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:[a.jsx(Bn,{className:"h-4 w-4"}),"Create Playbook"]})]}),a.jsxs(Ce,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[a.jsx(vC,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),a.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"})]}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",a.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?a.jsx(Ye,{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?a.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:[a.jsx(Bn,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p.map(m=>{const x=c===m.slug;return a.jsxs("div",{className:`surface-panel relative flex flex-col gap-2 p-4 transition hover:border-foreground/20 ${m.enabled?"":"opacity-75"}`,children:[a.jsxs(Ce,{to:`/playbooks/${m.slug}`,className:"group flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(wv,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:m.name}),m.description?a.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:m.description}):null]})]}),a.jsx("div",{className:"flex items-center gap-2 pt-1 pr-20",children:a.jsxs("div",{className:"flex flex-wrap gap-1",children:[m.tags.slice(0,3).map(v=>a.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:[a.jsx(Tv,{className:"h-2.5 w-2.5"}),v]},v)),m.tags.length>3?a.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",m.tags.length-3]}):null]})})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":m.enabled,"aria-label":m.enabled?"Disable playbook":"Enable playbook",onClick:v=>h(v,m.slug,m.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 ${m.enabled?"border-emerald-500/60 bg-emerald-500/80":"border-foreground/40 bg-foreground/15"}`,children:a.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${m.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]},m.slug)})})]})}function LO(){const{slug:e}=St(),t=Wt(),{data:n,loading:o,error:i,refetch:l}=LN(e),[c,d]=g.useState(!1),[p,h]=g.useState(!1),[m,x]=g.useState(!1),v=e==="manifest";async function b(){if(e){h(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{h(!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`)}l()}catch(k){console.error(k),alert(k instanceof Error?k.message:"Failed to update playbook")}finally{x(!1)}}}return o?a.jsx(yt,{label:"Loading playbook..."}):i?a.jsx(dt,{error:i}):n?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:v?"Playbook Manifest":n.name}),v?a.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?a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,v?a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",a.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?a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Created ",Cr(n.created)]}),a.jsxs("span",{children:["Updated ",Cr(n.updated)]})]}),n.tags.length>0?a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(k=>a.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:[a.jsx(Tv,{className:"h-3 w-3"}),k]},k))}):null]}),v?null:a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.enabled?"Enabled":"Disabled"}),a.jsx("button",{type:"button",role:"switch","aria-checked":n.enabled,"aria-label":n.enabled?"Disable playbook":"Enable playbook",onClick:N,disabled:m,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:a.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"}`})})]}),a.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:[a.jsx(TC,{className:"h-3 w-3"}),"Edit"]}),c?a.jsxs("div",{className:"flex items-center gap-2",children:[a.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"}),a.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"})]}):a.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:[a.jsx(Eo,{className:"h-3 w-3"}),"Delete"]})]})]}),a.jsx("div",{className:"surface-panel p-4",children:a.jsx(Ut,{content:n.body})})]}):null}function OO(){const e=Wt(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(!1),[d,p]=g.useState(null);g.useEffect(()=>{fetch("/api/playbooks/template/new").then(m=>m.json()).then(m=>{n(m.content),i(!1)}).catch(m=>{p(m.message),i(!1)})},[]);async function h(m){c(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:m})}),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?a.jsx(yt,{label:"Loading playbook template..."}):d&&!t?a.jsx(dt,{error:d}):a.jsx(Js,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:h,saving:l,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 _O(){const{slug:e}=St(),t=Wt(),[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(!1),[p,h]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),l(!1)}).catch(x=>{h(x.message),l(!1)})},[e]);async function m(x){if(e){d(!0),h(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){h(b.error||`HTTP ${v.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(v){h(v.message),d(!1);return}d(!1)}}return i?a.jsx(yt,{label:"Loading playbook..."}):p&&!n?a.jsx(dt,{error:p}):a.jsx(Js,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function MO({value:e,onChange:t}){return a.jsxs("div",{className:"flex items-center gap-2",children:[a.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"}),a.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 $O(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))Zf.includes(n)&&t.add(n);return t}function Jy(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function FO(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(""),[c,d]=g.useState(new Set(Zf)),[p,h]=g.useState(!1),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),j=g.useCallback(async()=>{try{const R=await fetch("/api/backup");if(!R.ok)throw new Error(`HTTP ${R.status}`);const $=await R.json();o($),l($.repo??""),d($O($.categories)),h(!1)}catch(R){k({type:"error",message:`Failed to load backup config: ${R instanceof Error?R.message:String(R)}`})}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(R){d($=>{const A=new Set($);return A.has(R)?A.delete(R):A.add(R),A}),h(!0)}async function P(){x(!0),k(null);try{const R=Array.from(c),$=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:R})}),A=await $.json();if(!$.ok)throw new Error(A.error||`HTTP ${$.status}`);o(A),h(!1),k({type:"success",message:"Backup configuration saved."})}catch(R){k({type:"error",message:`Save failed: ${R instanceof Error?R.message:String(R)}`})}finally{x(!1)}}async function T(){b("push"),k(null);try{const R=await fetch("/api/backup/push",{method:"POST"}),$=await R.json();if(!R.ok||$.success===!1)throw new Error($.error||$.message||`HTTP ${R.status}`);k({type:"success",message:$.message||"Backup complete."}),await j()}catch(R){k({type:"error",message:`Backup failed: ${R instanceof Error?R.message:String(R)}`})}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"}),A=await $.json();if(!$.ok||A.success===!1)throw new Error(A.error||A.message||`HTTP ${$.status}`);k({type:"success",message:A.message||"Restore complete."}),await j()}catch($){k({type:"error",message:`Restore failed: ${$ instanceof Error?$.message:String($)}`})}finally{b(null)}}}if(e)return a.jsx(Re,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const O=!!i.trim()&&c.size>0&&!v&&!p;return a.jsx(Re,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:a.jsxs("div",{className:"space-y-4",children:[N&&a.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}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),a.jsx("input",{type:"text",value:i,onChange:R=>{l(R.target.value),h(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",a.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:Zf.map(R=>{const $=c.has(R);return a.jsxs("button",{type:"button",onClick:()=>S(R),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:[a.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${$?"bg-primary":"bg-muted-foreground/40"}`}),R]},R)})})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),Jy((n==null?void 0:n.lastBackup)??null)]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),Jy((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&a.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."})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:P,disabled:m||!p,children:[a.jsx(up,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Config"]}),a.jsxs("button",{className:"shell-action",onClick:T,disabled:!O,title:O?"Back up now":p?"Save config first":"Set repo and pick categories",children:[a.jsx(zC,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),a.jsxs("button",{className:"shell-action",onClick:L,disabled:!O,title:O?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[a.jsx(mC,{className:"h-3.5 w-3.5"}),v==="pull"?"Restoring...":"Restore"]}),p&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),a.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:[a.jsx(pC,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),a.jsxs("span",{children:["Restore never overwrites ",a.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 wf(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 zO(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(!1),[c,d]=g.useState([]),[p,h]=g.useState([]),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),j=g.useCallback(async()=>{try{const A=await fetch("/api/config/statuses");if(!A.ok)throw new Error(`HTTP ${A.status}`);const q=await A.json(),J=wf(q);d(J.statuses),h(J.order),l(q.custom),k(!1),o(null)}catch(A){o(A instanceof Error?A.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(){setTimeout(()=>b(null),3e3)}async function P(){x(!0),b(null);try{const A={statuses:c.map(G=>({id:G.id,label:G.label,...G.description?{description:G.description}:{},...G.color?{color:G.color}:{},...G.terminal?{terminal:!0}:{}})),order:p,transitions:[]},q=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!q.ok){const G=await q.json().catch(()=>({error:"Unknown error"}));throw new Error(G.error??"Save failed")}const J=await q.json(),z=wf(J);d(z.statuses),h(z.order),l(J.custom),k(!1),Cx(),b({type:"success",message:"Status config saved"}),S()}catch(A){b({type:"error",message:A instanceof Error?A.message:"Save failed"})}finally{x(!1)}}async function T(){x(!0),b(null);try{const A=await fetch("/api/config/statuses",{method:"DELETE"});if(!A.ok)throw new Error("Reset failed");const q=await A.json(),J=wf(q);d(J.statuses),h(J.order),l(q.custom),k(!1),Cx(),b({type:"success",message:"Reset to defaults"}),S()}catch(A){b({type:"error",message:A instanceof Error?A.message:"Reset failed"})}finally{x(!1)}}function L(A,q,J){d(z=>{const G=[...z];if(G[A]={...G[A],[q]:J},q==="id"&&typeof J=="string"){const Y=z[A].id;h(Q=>Q.map(_=>_===Y?J:_))}return G}),k(!0)}function O(){const A=`status_${c.length+1}`;d(q=>[...q,{id:A,label:"New Status",description:"",color:"",terminal:!1}]),h(q=>[...q,A]),k(!0)}function R(A){const q=c[A].id;d(J=>J.filter((z,G)=>G!==A)),h(J=>J.filter(z=>z!==q)),k(!0)}function $(A,q){const J=A+q;J<0||J>=p.length||(h(z=>{const G=[...z];return[G[A],G[J]]=[G[J],G[A]],G}),k(!0))}return e?a.jsx(yt,{label:"Loading settings..."}):n?a.jsx(dt,{error:n}):a.jsx(p1,{children:a.jsxs("div",{className:"space-y-6",children:[a.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:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Nv,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),a.jsxs("button",{className:"shell-action text-xs",onClick:T,disabled:m||!i&&!N,children:[a.jsx(DC,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),v&&a.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}),a.jsx(Re,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:a.jsxs("button",{className:"shell-action text-xs",onClick:O,children:[a.jsx(Bn,{className:"h-3 w-3"}),"Add Status"]}),children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"pb-2 pr-3",children:"ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Label"}),a.jsx("th",{className:"pb-2 pr-3",children:"Color"}),a.jsx("th",{className:"pb-2 pr-3",children:a.jsxs(h1,{children:[a.jsx(m1,{asChild:!0,children:a.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),a.jsx(ch,{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.'})]})}),a.jsx("th",{className:"pb-2 w-10"})]})}),a.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((A,q)=>a.jsxs("tr",{children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:A.id,onChange:J=>L(q,"id",J.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:A.label,onChange:J=>L(q,"label",J.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx(MO,{value:A.color,onChange:J=>L(q,"color",J)})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{type:"button",role:"switch","aria-checked":A.terminal,onClick:()=>L(q,"terminal",!A.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 ${A.terminal?"bg-primary":"bg-muted"}`,children:a.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${A.terminal?"translate-x-4":"translate-x-0"}`})})}),a.jsx("td",{className:"py-2",children:a.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:()=>R(q),title:"Remove status",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})})]},q))})]})})}),a.jsx(Re,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:a.jsx("div",{className:"space-y-1",children:p.map((A,q)=>{var z;const J=((z=c.find(G=>G.id===A))==null?void 0:z.label)??A;return a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:q+1}),a.jsx("span",{className:"flex-1 font-medium",children:J}),a.jsx("span",{className:"text-xs text-muted-foreground",children:A}),a.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:()=>$(q,-1),disabled:q===0,title:"Move up",children:a.jsx(kv,{className:"h-3.5 w-3.5"})}),a.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:()=>$(q,1),disabled:q===p.length-1,title:"Move down",children:a.jsx(ea,{className:"h-3.5 w-3.5"})})]},q)})})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:P,disabled:m||!N,children:[a.jsx(up,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Configuration"]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),j()},disabled:m,children:"Discard Changes"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),a.jsx(FO,{})]})})}function BO(){const{data:e,loading:t,error:n,refetch:o}=hp(),[i,l]=g.useState(""),c=g.useRef(null);Xo("list:todos");const[d,p]=g.useState(""),[h,m]=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(F=>F===D?null:F),1500)}const P=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const _=[];for(const D of e.workspaces)for(const F of D.items)_.push({...F,workspace:D.workspace});return _},[e]),T=g.useMemo(()=>{const _=new Set;for(const D of P)for(const F of D.tags)_.add(F);return Array.from(_).sort()},[P]),L=g.useMemo(()=>{let _=P;if(i.trim()){const D=i.toLowerCase();_=_.filter(F=>F.description.toLowerCase().includes(D)||F.tags.some(U=>U.toLowerCase().includes(D))||F.id.includes(D))}return d&&(_=_.filter(D=>D.status===d)),h&&(_=_.filter(D=>D.tags.includes(h))),_},[P,i,d,h]),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 R(){x.trim()&&(await Xv(b,x.trim()),v(""),o())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function A(_,D,F){q(_,D,$[F]||"open")}async function q(_,D,F){switch(F){case"open":await e0(_,D);break;case"in_progress":await Zv(_,D);break;case"completed":await Qv(_,D);break;case"blocked":await Jv(_,D);break}o()}async function J(_,D){await t0(_,D),o()}const{hotkeyRowProps:z}=ca(L,{scope:"list:todos",bindO:!1,onOpen:_=>A(_.workspace,_.id,_.status)});ct({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var _;return(_=c.current)==null?void 0:_.focus()}}),ct({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[G,Y]=No(),Q=G.get("focus");return g.useEffect(()=>{if(!Q)return;const _=document.querySelector(`[data-todo-id="${CSS.escape(Q)}"]`);if(!_)return;_.scrollIntoView({block:"nearest"}),_.classList.add("ring-2","ring-primary/60");const D=window.setTimeout(()=>{_.classList.remove("ring-2","ring-primary/60"),Y(F=>{const U=new URLSearchParams(F);return U.delete("focus"),U})},1500);return()=>window.clearTimeout(D)},[Q,L.length,Y]),t?a.jsx(yt,{label:"Loading todos..."}):n?a.jsx(dt,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Ke,{label:"Open",value:O.open,icon:Fn}),a.jsx(Ke,{label:"In Progress",value:O.in_progress,icon:Ev,tone:"info"}),a.jsx(Ke,{label:"Blocked",value:O.blocked,icon:Us,tone:"warn"}),a.jsx(Ke,{label:"Completed",value:O.completed,icon:Fn,tone:"default"})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.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:[a.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(_=>_.workspace!=="_global").map(_=>a.jsx("option",{value:_.workspace,children:_.workspace},_.workspace))]}),a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:_=>v(_.target.value),onKeyDown:_=>_.key==="Enter"&&R(),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"}),a.jsxs("button",{onClick:R,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:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Bs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:c,type:"text",placeholder:"Search todos...",value:i,onChange:_=>l(_.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"})]}),a.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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),T.length>0&&a.jsxs("select",{value:h,onChange:_=>m(_.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:[a.jsx("option",{value:"",children:"All tags"}),T.map(_=>a.jsxs("option",{value:_,children:["#",_]},_))]})]}),L.length===0?a.jsx(Ye,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):a.jsx("div",{className:"space-y-1",children:L.map((_,D)=>a.jsxs("div",{"data-todo-id":_.id,...z(D),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>A(_.workspace,_.id,_.status),children:[a.jsx(Jp,{status:_.status,onChange:F=>q(_.workspace,_.id,F)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${_.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:_.description}),_.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:_.tags.map(F=>`#${F}`).join(" ")})]}),a.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:_.workspace!=="_global"&&a.jsx(Ce,{to:`/w/${_.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:F=>F.stopPropagation(),children:_.workspace})}),k===_.id?a.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[a.jsx(hc,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:F=>S(F,_.id),children:["t:",_.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:F=>S(F,_.id),children:a.jsx(mc,{className:"h-3 w-3"})})]}),a.jsx("button",{onClick:()=>J(_.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 UO({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:h,setNodeRef:m,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=lw({id:e.id,disabled:c}),k={transform:_s.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:m,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...h,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Cv,{className:"h-4 w-4"})}),a.jsx(Jp,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-blue-400/60 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[a.jsx(hc,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(mc,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(Eo,{className:"h-3 w-3"})})]})]})}function HO(){const{workspace:e}=St(),t=e||"_global",{data:n,loading:o,error:i,refetch:l}=_N(t),[c,d]=g.useState(""),[p,h]=g.useState(""),[m,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),j=g.useRef(null);Xo("list:todos");const S=!!(c.trim()||p||m),P=Bb(oc(Dc,{activationConstraint:{distance:8}}),oc(Ac));function T(F,U){F.stopPropagation(),navigator.clipboard.writeText(U),k(U),setTimeout(()=>k(K=>K===U?null:K),1500)}const L=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const F=new Set;for(const U of n.items)for(const K of U.tags)F.add(K);return Array.from(F).sort()},[n]),O=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let F=n.items;if(c.trim()){const U=c.toLowerCase();F=F.filter(K=>K.description.toLowerCase().includes(U)||K.tags.some(E=>E.toLowerCase().includes(U))||K.id.includes(U))}return p&&(F=F.filter(U=>U.status===p)),m&&(F=F.filter(U=>U.tags.includes(m))),F},[n,c,p,m]);async function R(){v.trim()&&(await Xv(t,v.trim()),b(""),l())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function A(F,U){J(F,$[U]||"open")}async function q(F,U,K){F.stopPropagation(),window.confirm(`Delete "${K}"? This can't be undone.`)&&(await t0(t,U),l())}async function J(F,U){switch(U){case"open":await e0(t,F);break;case"in_progress":await Zv(t,F);break;case"completed":await Qv(t,F);break;case"blocked":await Jv(t,F);break}l()}const{hotkeyRowProps:z}=ca(O,{scope:"list:todos",bindO:!1,onOpen:F=>A(F.id,F.status)});ct({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var F;return(F=j.current)==null?void 0:F.focus()}}),ct({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>l()});const[G,Y]=No(),Q=G.get("focus");g.useEffect(()=>{if(!Q)return;const F=document.querySelector(`[data-todo-id="${window.CSS.escape(Q)}"]`);if(!F)return;F.scrollIntoView({block:"nearest"}),F.classList.add("ring-2","ring-primary/60");const U=window.setTimeout(()=>{F.classList.remove("ring-2","ring-primary/60"),Y(K=>{const E=new URLSearchParams(K);return E.delete("focus"),E})},1500);return()=>window.clearTimeout(U)},[Q,O.length,Y]);async function _(F){const{active:U,over:K}=F;if(!K||U.id===K.id||!(n!=null&&n.items))return;const E=n.items.findIndex(I=>I.id===U.id),B=n.items.findIndex(I=>I.id===K.id);if(E===-1||B===-1)return;const Z=Oc(n.items,E,B);await MN(t,Z.map(I=>I.id)),l()}if(o)return a.jsx(yt,{label:"Loading todos..."});if(i)return a.jsx(dt,{error:i});const D=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Ke,{label:"Open",value:D.open,icon:Fn}),a.jsx(Ke,{label:"In Progress",value:D.in_progress,icon:Fn,tone:"info"}),a.jsx(Ke,{label:"Blocked",value:D.blocked,icon:Us,tone:"warn"}),a.jsx(Ke,{label:"Total",value:D.total,icon:Fn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:v,onChange:F=>b(F.target.value),onKeyDown:F=>F.key==="Enter"&&R(),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"}),a.jsxs("button",{onClick:R,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:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Bs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:j,type:"text",placeholder:"Search...",value:c,onChange:F=>d(F.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"})]}),a.jsxs("select",{value:p,onChange:F=>h(F.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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),L.length>0&&a.jsxs("select",{value:m,onChange:F=>x(F.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:[a.jsx("option",{value:"",children:"All tags"}),L.map(F=>a.jsxs("option",{value:F,children:["#",F]},F))]})]}),O.length===0?a.jsx(Ye,{title:"No todos",description:"Add your first todo above."}):a.jsx(tw,{sensors:P,collisionDetection:Ub,onDragEnd:_,children:a.jsx(iw,{items:O.map(F=>F.id),strategy:rw,children:a.jsx("div",{className:"space-y-1",children:O.map((F,U)=>a.jsx(UO,{item:F,copiedId:N,onCycleStatus:A,onStatusChange:J,onCopyId:T,onDelete:q,disabled:S,hotkeyRowProps:z(U)},F.id))})})})]})}function WO(){return a.jsx(GS,{children:a.jsx($E,{children:a.jsx(kS,{children:a.jsxs(De,{element:a.jsx(WE,{}),children:[a.jsx(De,{path:"/",element:a.jsx(GE,{})}),a.jsx(De,{path:"/projects",element:a.jsx(Ex,{})}),a.jsx(De,{path:"/assignments",element:a.jsx(Wy,{})}),a.jsx(De,{path:"/assignments/new",element:a.jsx(Ky,{})}),a.jsx(De,{path:"/assignments/:id",element:a.jsx(pO,{})}),a.jsx(De,{path:"/assignments/:id/edit",element:a.jsx(gf,{})}),a.jsx(De,{path:"/assignments/:id/plan/edit",element:a.jsx(xf,{})}),a.jsx(De,{path:"/assignments/:id/scratchpad/edit",element:a.jsx(yf,{})}),a.jsx(De,{path:"/assignments/:id/handoff/edit",element:a.jsx(vf,{})}),a.jsx(De,{path:"/assignments/:id/decision-record/edit",element:a.jsx(bf,{})}),a.jsx(De,{path:"/attention",element:a.jsx(KE,{})}),a.jsx(De,{path:"/servers",element:a.jsx(Xy,{})}),a.jsx(De,{path:"/agent-sessions",element:a.jsx(Qy,{})}),a.jsx(De,{path:"/playbooks",element:a.jsx(IO,{})}),a.jsx(De,{path:"/playbooks/create",element:a.jsx(OO,{})}),a.jsx(De,{path:"/playbooks/:slug",element:a.jsx(LO,{})}),a.jsx(De,{path:"/playbooks/:slug/edit",element:a.jsx(_O,{})}),a.jsx(De,{path:"/todos",element:a.jsx(BO,{})}),a.jsx(De,{path:"/help",element:a.jsx(XE,{})}),a.jsx(De,{path:"/settings",element:a.jsx(zO,{})}),a.jsx(De,{path:"/create/project",element:a.jsx(qy,{})}),a.jsx(De,{path:"/projects/:slug",element:a.jsx(Py,{})}),a.jsx(De,{path:"/projects/:slug/edit",element:a.jsx(Yy,{})}),a.jsx(De,{path:"/projects/:slug/create/assignment",element:a.jsx(Gy,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug",element:a.jsx(zy,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/edit",element:a.jsx(gf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(xf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(yf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(vf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(bf,{})}),a.jsx(De,{path:"/w/:workspace/projects",element:a.jsx(Ex,{})}),a.jsx(De,{path:"/w/:workspace/assignments",element:a.jsx(Wy,{})}),a.jsx(De,{path:"/w/:workspace/assignments/new",element:a.jsx(Ky,{})}),a.jsx(De,{path:"/w/:workspace/servers",element:a.jsx(Xy,{})}),a.jsx(De,{path:"/w/:workspace/agent-sessions",element:a.jsx(Qy,{})}),a.jsx(De,{path:"/w/:workspace/todos",element:a.jsx(HO,{})}),a.jsx(De,{path:"/w/:workspace/create/project",element:a.jsx(qy,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug",element:a.jsx(Py,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/edit",element:a.jsx(Yy,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/create/assignment",element:a.jsx(Gy,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:a.jsx(zy,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:a.jsx(gf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(xf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(yf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(vf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(bf,{})})]})})})})}CN();kj.createRoot(document.getElementById("root")).render(a.jsx(g.StrictMode,{children:a.jsx(NN,{children:a.jsx(WO,{})})}));export{MP as _,VO as a,uc as g};
|