syntaur 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/bin/syntaur.js +2 -0
  3. package/dashboard/dist/assets/_basePickBy-C-VS6QEr.js +1 -0
  4. package/dashboard/dist/assets/_baseUniq-Dfp0h_kE.js +1 -0
  5. package/dashboard/dist/assets/arc-DMAuseMg.js +1 -0
  6. package/dashboard/dist/assets/architectureDiagram-2XIMDMQ5-DERw9YH7.js +36 -0
  7. package/dashboard/dist/assets/blockDiagram-WCTKOSBZ-CVhoUGyp.js +132 -0
  8. package/dashboard/dist/assets/c4Diagram-IC4MRINW-B97ce7q3.js +10 -0
  9. package/dashboard/dist/assets/channel-BFnz84Fk.js +1 -0
  10. package/dashboard/dist/assets/chunk-4BX2VUAB-C-Tm8s7l.js +1 -0
  11. package/dashboard/dist/assets/chunk-55IACEB6-DTLywdgN.js +1 -0
  12. package/dashboard/dist/assets/chunk-FMBD7UC4-CZe3jJBW.js +15 -0
  13. package/dashboard/dist/assets/chunk-JSJVCQXG-DCDIzNBU.js +1 -0
  14. package/dashboard/dist/assets/chunk-KX2RTZJC-Dny_iTMP.js +1 -0
  15. package/dashboard/dist/assets/chunk-NQ4KR5QH-BVkniaFi.js +220 -0
  16. package/dashboard/dist/assets/chunk-QZHKN3VN-Yiy-DBy_.js +1 -0
  17. package/dashboard/dist/assets/chunk-WL4C6EOR-BZ6Aii8B.js +189 -0
  18. package/dashboard/dist/assets/classDiagram-VBA2DB6C-9i4eMNgh.js +1 -0
  19. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-9i4eMNgh.js +1 -0
  20. package/dashboard/dist/assets/clone-BQWw0UR0.js +1 -0
  21. package/dashboard/dist/assets/cose-bilkent-S5V4N54A-p-FSX7Hd.js +1 -0
  22. package/dashboard/dist/assets/cytoscape.esm-BQaXIfA_.js +331 -0
  23. package/dashboard/dist/assets/dagre-KLK3FWXG-JGHXC_Z-.js +4 -0
  24. package/dashboard/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  25. package/dashboard/dist/assets/diagram-E7M64L7V-BMj79nA2.js +24 -0
  26. package/dashboard/dist/assets/diagram-IFDJBPK2-DvE6Hc7-.js +43 -0
  27. package/dashboard/dist/assets/diagram-P4PSJMXO-xVL3uMJs.js +24 -0
  28. package/dashboard/dist/assets/erDiagram-INFDFZHY-HAM6d8j_.js +70 -0
  29. package/dashboard/dist/assets/flowDiagram-PKNHOUZH-DPorMsV0.js +162 -0
  30. package/dashboard/dist/assets/ganttDiagram-A5KZAMGK-BxesGLxK.js +292 -0
  31. package/dashboard/dist/assets/gitGraphDiagram-K3NZZRJ6-tjaHpiMU.js +65 -0
  32. package/dashboard/dist/assets/graph-DAyh4Dby.js +1 -0
  33. package/dashboard/dist/assets/index-BnqH-RIk.css +1 -0
  34. package/dashboard/dist/assets/index-C1augJ5N.js +440 -0
  35. package/dashboard/dist/assets/infoDiagram-LFFYTUFH-MekJE5ZF.js +2 -0
  36. package/dashboard/dist/assets/init-Gi6I4Gst.js +1 -0
  37. package/dashboard/dist/assets/ishikawaDiagram-PHBUUO56-DovIBmaF.js +70 -0
  38. package/dashboard/dist/assets/journeyDiagram-4ABVD52K-CZw0QfY4.js +139 -0
  39. package/dashboard/dist/assets/kanban-definition-K7BYSVSG-Bl-d4Lb6.js +89 -0
  40. package/dashboard/dist/assets/katex-B1X10hvy.js +261 -0
  41. package/dashboard/dist/assets/layout-Ds5A52wn.js +1 -0
  42. package/dashboard/dist/assets/linear-FqOeAEKI.js +1 -0
  43. package/dashboard/dist/assets/mermaid.core-C7JSt2gc.js +255 -0
  44. package/dashboard/dist/assets/mindmap-definition-YRQLILUH-D6x3mID9.js +68 -0
  45. package/dashboard/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  46. package/dashboard/dist/assets/pieDiagram-SKSYHLDU-CnElBd0K.js +30 -0
  47. package/dashboard/dist/assets/quadrantDiagram-337W2JSQ-Q08fuvGB.js +7 -0
  48. package/dashboard/dist/assets/requirementDiagram-Z7DCOOCP-BImzzV5r.js +73 -0
  49. package/dashboard/dist/assets/sankeyDiagram-WA2Y5GQK-BIfD481p.js +10 -0
  50. package/dashboard/dist/assets/sequenceDiagram-2WXFIKYE-BS_1aSDE.js +145 -0
  51. package/dashboard/dist/assets/stateDiagram-RAJIS63D-Br1E8nkw.js +1 -0
  52. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-rZTWN-vQ.js +1 -0
  53. package/dashboard/dist/assets/timeline-definition-YZTLITO2-DQJ_O-WU.js +61 -0
  54. package/dashboard/dist/assets/treemap-KZPCXAKY-BmmUp0Cf.js +162 -0
  55. package/dashboard/dist/assets/vennDiagram-LZ73GAT5-DzQooghy.js +34 -0
  56. package/dashboard/dist/assets/xychartDiagram-JWTSCODW-W9j8X9K6.js +7 -0
  57. package/dashboard/dist/index.html +17 -0
  58. package/dist/dashboard/server.d.ts +15 -0
  59. package/dist/dashboard/server.js +5873 -0
  60. package/dist/dashboard/server.js.map +1 -0
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +8892 -0
  63. package/dist/index.js.map +1 -0
  64. package/examples/playbooks/commit-discipline.md +20 -0
  65. package/examples/playbooks/keep-records-updated.md +30 -0
  66. package/examples/playbooks/plan-versioning.md +36 -0
  67. package/examples/playbooks/read-before-plan.md +27 -0
  68. package/examples/playbooks/test-before-done.md +24 -0
  69. package/examples/playbooks/workspace-before-code.md +30 -0
  70. package/examples/sample-mission/_index-assignments.md +20 -0
  71. package/examples/sample-mission/_index-decisions.md +11 -0
  72. package/examples/sample-mission/_index-plans.md +12 -0
  73. package/examples/sample-mission/_status.md +47 -0
  74. package/examples/sample-mission/agent.md +33 -0
  75. package/examples/sample-mission/assignments/design-auth-schema/assignment.md +61 -0
  76. package/examples/sample-mission/assignments/design-auth-schema/decision-record.md +15 -0
  77. package/examples/sample-mission/assignments/design-auth-schema/handoff.md +31 -0
  78. package/examples/sample-mission/assignments/design-auth-schema/plan.md +31 -0
  79. package/examples/sample-mission/assignments/design-auth-schema/scratchpad.md +40 -0
  80. package/examples/sample-mission/assignments/implement-jwt-middleware/assignment.md +65 -0
  81. package/examples/sample-mission/assignments/implement-jwt-middleware/decision-record.md +15 -0
  82. package/examples/sample-mission/assignments/implement-jwt-middleware/handoff.md +9 -0
  83. package/examples/sample-mission/assignments/implement-jwt-middleware/plan.md +33 -0
  84. package/examples/sample-mission/assignments/implement-jwt-middleware/scratchpad.md +48 -0
  85. package/examples/sample-mission/assignments/write-auth-tests/assignment.md +54 -0
  86. package/examples/sample-mission/assignments/write-auth-tests/decision-record.md +9 -0
  87. package/examples/sample-mission/assignments/write-auth-tests/handoff.md +9 -0
  88. package/examples/sample-mission/assignments/write-auth-tests/plan.md +34 -0
  89. package/examples/sample-mission/assignments/write-auth-tests/scratchpad.md +8 -0
  90. package/examples/sample-mission/claude.md +13 -0
  91. package/examples/sample-mission/manifest.md +22 -0
  92. package/examples/sample-mission/memories/_index.md +11 -0
  93. package/examples/sample-mission/memories/postgres-connection-pooling.md +35 -0
  94. package/examples/sample-mission/mission.md +34 -0
  95. package/examples/sample-mission/resources/_index.md +11 -0
  96. package/examples/sample-mission/resources/auth-requirements.md +44 -0
  97. package/package.json +57 -0
  98. package/plugin/.claude-plugin/plugin.json +9 -0
  99. package/plugin/agents/syntaur-expert.md +393 -0
  100. package/plugin/commands/track-server/track-server.md +56 -0
  101. package/plugin/commands/track-session/track-session.md +65 -0
  102. package/plugin/hooks/enforce-boundaries.sh +135 -0
  103. package/plugin/hooks/hooks.json +27 -0
  104. package/plugin/hooks/session-cleanup.sh +74 -0
  105. package/plugin/references/file-ownership.md +51 -0
  106. package/plugin/references/protocol-summary.md +70 -0
  107. package/plugin/skills/complete-assignment/SKILL.md +137 -0
  108. package/plugin/skills/create-assignment/SKILL.md +64 -0
  109. package/plugin/skills/create-mission/SKILL.md +51 -0
  110. package/plugin/skills/grab-assignment/SKILL.md +180 -0
  111. package/plugin/skills/plan-assignment/SKILL.md +101 -0
  112. package/plugin/skills/syntaur-protocol/SKILL.md +72 -0
  113. package/plugins/syntaur/.codex-plugin/plugin.json +28 -0
  114. package/plugins/syntaur/agents/openai.yaml +7 -0
  115. package/plugins/syntaur/agents/syntaur-operator.md +127 -0
  116. package/plugins/syntaur/commands/track-session.md +27 -0
  117. package/plugins/syntaur/hooks.json +27 -0
  118. package/plugins/syntaur/references/file-ownership.md +51 -0
  119. package/plugins/syntaur/references/protocol-summary.md +66 -0
  120. package/plugins/syntaur/scripts/enforce-boundaries.sh +103 -0
  121. package/plugins/syntaur/scripts/session-cleanup.sh +39 -0
  122. package/plugins/syntaur/skills/complete-assignment/SKILL.md +63 -0
  123. package/plugins/syntaur/skills/create-assignment/SKILL.md +43 -0
  124. package/plugins/syntaur/skills/create-mission/SKILL.md +35 -0
  125. package/plugins/syntaur/skills/grab-assignment/SKILL.md +61 -0
  126. package/plugins/syntaur/skills/plan-assignment/SKILL.md +49 -0
  127. package/plugins/syntaur/skills/syntaur-protocol/SKILL.md +84 -0
  128. package/plugins/syntaur/skills/track-session/SKILL.md +49 -0
@@ -0,0 +1,440 @@
1
+ function _k(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(o,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _L(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 ad={exports:{}},ki={},ud={exports:{}},Oe={};/**
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 pg;function zk(){if(pg)return Oe;pg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.iterator;function w(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function C(z,Q,I){this.props=z,this.context=Q,this.refs=S,this.updater=I||b}C.prototype.isReactComponent={},C.prototype.setState=function(z,Q){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,Q,"setState")},C.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function k(){}k.prototype=C.prototype;function A(z,Q,I){this.props=z,this.context=Q,this.refs=S,this.updater=I||b}var P=A.prototype=new k;P.constructor=A,N(P,C.prototype),P.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,T={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B(z,Q,I){var Z,fe={},re=null,Ee=null;if(Q!=null)for(Z in Q.ref!==void 0&&(Ee=Q.ref),Q.key!==void 0&&(re=""+Q.key),Q)_.call(Q,Z)&&!D.hasOwnProperty(Z)&&(fe[Z]=Q[Z]);var Se=arguments.length-2;if(Se===1)fe.children=I;else if(1<Se){for(var Re=Array(Se),be=0;be<Se;be++)Re[be]=arguments[be+2];fe.children=Re}if(z&&z.defaultProps)for(Z in Se=z.defaultProps,Se)fe[Z]===void 0&&(fe[Z]=Se[Z]);return{$$typeof:e,type:z,key:re,ref:Ee,props:fe,_owner:T.current}}function q(z,Q){return{$$typeof:e,type:z.type,key:Q,ref:z.ref,props:z.props,_owner:z._owner}}function R(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function L(z){var Q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(I){return Q[I]})}var $=/\/+/g;function W(z,Q){return typeof z=="object"&&z!==null&&z.key!=null?L(""+z.key):Q.toString(36)}function J(z,Q,I,Z,fe){var re=typeof z;(re==="undefined"||re==="boolean")&&(z=null);var Ee=!1;if(z===null)Ee=!0;else switch(re){case"string":case"number":Ee=!0;break;case"object":switch(z.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=z,fe=fe(Ee),z=Z===""?"."+W(Ee,0):Z,M(fe)?(I="",z!=null&&(I=z.replace($,"$&/")+"/"),J(fe,Q,I,"",function(be){return be})):fe!=null&&(R(fe)&&(fe=q(fe,I+(!fe.key||Ee&&Ee.key===fe.key?"":(""+fe.key).replace($,"$&/")+"/")+z)),Q.push(fe)),1;if(Ee=0,Z=Z===""?".":Z+":",M(z))for(var Se=0;Se<z.length;Se++){re=z[Se];var Re=Z+W(re,Se);Ee+=J(re,Q,I,Re,fe)}else if(Re=w(z),typeof Re=="function")for(z=Re.call(z),Se=0;!(re=z.next()).done;)re=re.value,Re=Z+W(re,Se++),Ee+=J(re,Q,I,Re,fe);else if(re==="object")throw Q=String(z),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ee}function K(z,Q,I){if(z==null)return z;var Z=[],fe=0;return J(z,Z,"","",function(re){return Q.call(I,re,fe++)}),Z}function te(z){if(z._status===-1){var Q=z._result;Q=Q(),Q.then(function(I){(z._status===0||z._status===-1)&&(z._status=1,z._result=I)},function(I){(z._status===0||z._status===-1)&&(z._status=2,z._result=I)}),z._status===-1&&(z._status=0,z._result=Q)}if(z._status===1)return z._result.default;throw z._result}var ae={current:null},X={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:X,ReactCurrentOwner:T};function E(){throw Error("act(...) is not supported in production builds of React.")}return Oe.Children={map:K,forEach:function(z,Q,I){K(z,function(){Q.apply(this,arguments)},I)},count:function(z){var Q=0;return K(z,function(){Q++}),Q},toArray:function(z){return K(z,function(Q){return Q})||[]},only:function(z){if(!R(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Oe.Component=C,Oe.Fragment=n,Oe.Profiler=i,Oe.PureComponent=A,Oe.StrictMode=o,Oe.Suspense=p,Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Oe.act=E,Oe.cloneElement=function(z,Q,I){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var Z=N({},z.props),fe=z.key,re=z.ref,Ee=z._owner;if(Q!=null){if(Q.ref!==void 0&&(re=Q.ref,Ee=T.current),Q.key!==void 0&&(fe=""+Q.key),z.type&&z.type.defaultProps)var Se=z.type.defaultProps;for(Re in Q)_.call(Q,Re)&&!D.hasOwnProperty(Re)&&(Z[Re]=Q[Re]===void 0&&Se!==void 0?Se[Re]:Q[Re])}var Re=arguments.length-2;if(Re===1)Z.children=I;else if(1<Re){Se=Array(Re);for(var be=0;be<Re;be++)Se[be]=arguments[be+2];Z.children=Se}return{$$typeof:e,type:z.type,key:fe,ref:re,props:Z,_owner:Ee}},Oe.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},Oe.createElement=B,Oe.createFactory=function(z){var Q=B.bind(null,z);return Q.type=z,Q},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(z){return{$$typeof:d,render:z}},Oe.isValidElement=R,Oe.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:te}},Oe.memo=function(z,Q){return{$$typeof:h,type:z,compare:Q===void 0?null:Q}},Oe.startTransition=function(z){var Q=X.transition;X.transition={};try{z()}finally{X.transition=Q}},Oe.unstable_act=E,Oe.useCallback=function(z,Q){return ae.current.useCallback(z,Q)},Oe.useContext=function(z){return ae.current.useContext(z)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(z){return ae.current.useDeferredValue(z)},Oe.useEffect=function(z,Q){return ae.current.useEffect(z,Q)},Oe.useId=function(){return ae.current.useId()},Oe.useImperativeHandle=function(z,Q,I){return ae.current.useImperativeHandle(z,Q,I)},Oe.useInsertionEffect=function(z,Q){return ae.current.useInsertionEffect(z,Q)},Oe.useLayoutEffect=function(z,Q){return ae.current.useLayoutEffect(z,Q)},Oe.useMemo=function(z,Q){return ae.current.useMemo(z,Q)},Oe.useReducer=function(z,Q,I){return ae.current.useReducer(z,Q,I)},Oe.useRef=function(z){return ae.current.useRef(z)},Oe.useState=function(z){return ae.current.useState(z)},Oe.useSyncExternalStore=function(z,Q,I){return ae.current.useSyncExternalStore(z,Q,I)},Oe.useTransition=function(){return ae.current.useTransition()},Oe.version="18.3.1",Oe}var hg;function Nf(){return hg||(hg=1,ud.exports=zk()),ud.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 mg;function Fk(){if(mg)return ki;mg=1;var e=Nf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,h){var m,x={},w=null,b=null;h!==void 0&&(w=""+h),p.key!==void 0&&(w=""+p.key),p.ref!==void 0&&(b=p.ref);for(m in p)o.call(p,m)&&!a.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:w,ref:b,props:x,_owner:i.current}}return ki.Fragment=n,ki.jsx=c,ki.jsxs=c,ki}var gg;function $k(){return gg||(gg=1,ad.exports=Fk()),ad.exports}var l=$k(),y=Nf();const dt=Za(y),Ty=_k({__proto__:null,default:dt},[y]);var pa={},cd={exports:{}},fn={},dd={exports:{}},fd={};/**
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 xg;function Bk(){return xg||(xg=1,(function(e){function t(X,se){var E=X.length;X.push(se);e:for(;0<E;){var z=E-1>>>1,Q=X[z];if(0<i(Q,se))X[z]=se,X[E]=Q,E=z;else break e}}function n(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var se=X[0],E=X.pop();if(E!==se){X[0]=E;e:for(var z=0,Q=X.length,I=Q>>>1;z<I;){var Z=2*(z+1)-1,fe=X[Z],re=Z+1,Ee=X[re];if(0>i(fe,E))re<Q&&0>i(Ee,fe)?(X[z]=Ee,X[re]=E,z=re):(X[z]=fe,X[Z]=E,z=Z);else if(re<Q&&0>i(Ee,E))X[z]=Ee,X[re]=E,z=re;else break e}}return se}function i(X,se){var E=X.sortIndex-se.sortIndex;return E!==0?E:X.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],h=[],m=1,x=null,w=3,b=!1,N=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(X){for(var se=n(h);se!==null;){if(se.callback===null)o(h);else if(se.startTime<=X)o(h),se.sortIndex=se.expirationTime,t(p,se);else break;se=n(h)}}function M(X){if(S=!1,P(X),!N)if(n(p)!==null)N=!0,te(_);else{var se=n(h);se!==null&&ae(M,se.startTime-X)}}function _(X,se){N=!1,S&&(S=!1,k(B),B=-1),b=!0;var E=w;try{for(P(se),x=n(p);x!==null&&(!(x.expirationTime>se)||X&&!L());){var z=x.callback;if(typeof z=="function"){x.callback=null,w=x.priorityLevel;var Q=z(x.expirationTime<=se);se=e.unstable_now(),typeof Q=="function"?x.callback=Q:x===n(p)&&o(p),P(se)}else o(p);x=n(p)}if(x!==null)var I=!0;else{var Z=n(h);Z!==null&&ae(M,Z.startTime-se),I=!1}return I}finally{x=null,w=E,b=!1}}var T=!1,D=null,B=-1,q=5,R=-1;function L(){return!(e.unstable_now()-R<q)}function $(){if(D!==null){var X=e.unstable_now();R=X;var se=!0;try{se=D(!0,X)}finally{se?W():(T=!1,D=null)}}else T=!1}var W;if(typeof A=="function")W=function(){A($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,K=J.port2;J.port1.onmessage=$,W=function(){K.postMessage(null)}}else W=function(){C($,0)};function te(X){D=X,T||(T=!0,W())}function ae(X,se){B=C(function(){X(e.unstable_now())},se)}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(X){X.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,te(_))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(X){switch(w){case 1:case 2:case 3:var se=3;break;default:se=w}var E=w;w=se;try{return X()}finally{w=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,se){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var E=w;w=X;try{return se()}finally{w=E}},e.unstable_scheduleCallback=function(X,se,E){var z=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?z+E:z):E=z,X){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=E+Q,X={id:m++,callback:se,priorityLevel:X,startTime:E,expirationTime:Q,sortIndex:-1},E>z?(X.sortIndex=E,t(h,X),n(p)===null&&X===n(h)&&(S?(k(B),B=-1):S=!0,ae(M,E-z))):(X.sortIndex=Q,t(p,X),N||b||(N=!0,te(_))),X},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(X){var se=w;return function(){var E=w;w=se;try{return X.apply(this,arguments)}finally{w=E}}}})(fd)),fd}var yg;function Uk(){return yg||(yg=1,dd.exports=Bk()),dd.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 vg;function Hk(){if(vg)return fn;vg=1;var e=Nf(),t=Uk();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function a(r,s){c(r,s),c(r+"Capture",s)}function c(r,s){for(i[r]=s,r=0;r<s.length;r++)o.add(s[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,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 w(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 S(r,s,u,f,g,v,j){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=v,this.removeEmptyString=j}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){C[r]=new S(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];C[s]=new S(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){C[r]=new S(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){C[r]=new S(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){C[r]=new S(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){C[r]=new S(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){C[r]=new S(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){C[r]=new S(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){C[r]=new S(r,5,!1,r.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function A(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(k,A);C[s]=new S(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(k,A);C[s]=new S(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(k,A);C[s]=new S(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!0,!0)});function P(r,s,u,f){var g=C.hasOwnProperty(s)?C[s]:null;(g!==null?g.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,u,g,f)&&(u=null),f||g===null?w(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(s=g.attributeName,f=g.attributeNamespace,u===null?r.removeAttribute(s):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?r.setAttributeNS(f,s,u):r.setAttribute(s,u))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),T=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),L=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),X=Symbol.iterator;function se(r){return r===null||typeof r!="object"?null:(r=X&&r[X]||r["@@iterator"],typeof r=="function"?r:null)}var E=Object.assign,z;function Q(r){if(z===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);z=s&&s[1]||""}return`
34
+ `+z+r}var I=!1;function Z(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(Y){var f=Y}Reflect.construct(r,[],s)}else{try{s.call()}catch(Y){f=Y}r.call(s.prototype)}else{try{throw Error()}catch(Y){f=Y}r()}}catch(Y){if(Y&&f&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
35
+ `),v=f.stack.split(`
36
+ `),j=g.length-1,O=v.length-1;1<=j&&0<=O&&g[j]!==v[O];)O--;for(;1<=j&&0<=O;j--,O--)if(g[j]!==v[O]){if(j!==1||O!==1)do if(j--,O--,0>O||g[j]!==v[O]){var F=`
37
+ `+g[j].replace(" at new "," at ");return r.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",r.displayName)),F}while(1<=j&&0<=O);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function fe(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=Z(r.type,!1),r;case 11:return r=Z(r.type.render,!1),r;case 1:return r=Z(r.type,!0),r;default:return""}}function re(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 D:return"Fragment";case T:return"Portal";case q:return"Profiler";case B:return"StrictMode";case W:return"Suspense";case J:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case L:return(r.displayName||"Context")+".Consumer";case R:return(r._context.displayName||"Context")+".Provider";case $:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case K:return s=r.displayName||null,s!==null?s:re(r.type)||"Memo";case te:s=r._payload,r=r._init;try{return re(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 re(s);case 8:return s===B?"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 Se(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Re(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function be(r){var s=Re(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(j){f=""+j,v.call(this,j)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(j){f=""+j},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Ue(r){r._valueTracker||(r._valueTracker=be(r))}function at(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=Re(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function ft(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 yt(r,s){var u=s.checked;return E({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function $t(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=Se(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 Bt(r,s){s=s.checked,s!=null&&P(r,"checked",s,!1)}function _t(r,s){Bt(r,s);var u=Se(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")?At(r,s.type,u):s.hasOwnProperty("defaultValue")&&At(r,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function vn(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 At(r,s,u){(s!=="number"||ft(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var pt=Array.isArray;function Jt(r,s,u,f){if(r=r.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=s.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&f&&(r[u].defaultSelected=!0)}else{for(u=""+Se(u),s=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,f&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function An(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return E({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function vt(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(pt(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Se(u)}}function Nr(r,s){var u=Se(s.value),f=Se(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 lr(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function ee(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 ue(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?ee(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var ve,Ne=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,f,g){MSApp.execUnsafeLocalFunction(function(){return r(s,u,f,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(ve=ve||document.createElement("div"),ve.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=ve.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function U(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var ie={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},we=["Webkit","ms","Moz","O"];Object.keys(ie).forEach(function(r){we.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),ie[s]=ie[r]})});function ze(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||ie.hasOwnProperty(r)&&ie[r]?(""+s).trim():s+"px"}function on(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var f=u.indexOf("--")===0,g=ze(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var ut=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 He(r,s){if(s){if(ut[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 Ve(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 ht=null;function qr(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Co=null,Gr=null,nt=null;function Ut(r){if(r=li(r)){if(typeof Co!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Rl(s),Co(r.stateNode,r.type,s))}}function Ht(r){Gr?nt?nt.push(r):nt=[r]:Gr=r}function Hn(){if(Gr){var r=Gr,s=nt;if(nt=Gr=null,Ut(r),s)for(r=0;r<s.length;r++)Ut(s[r])}}function Zt(r,s){return r(s)}function Wt(){}var sn=!1;function Er(r,s,u){if(sn)return r(s,u);sn=!0;try{return Zt(r,s,u)}finally{sn=!1,(Gr!==null||nt!==null)&&(Wt(),Hn())}}function rt(r,s){var u=r.stateNode;if(u===null)return null;var f=Rl(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 Dn=!1;if(d)try{var Vt={};Object.defineProperty(Vt,"passive",{get:function(){Dn=!0}}),window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch{Dn=!1}function Wn(r,s,u,f,g,v,j,O,F){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(u,Y)}catch(oe){this.onError(oe)}}var Vn=!1,ar=null,bn=!1,Rr=null,Us={onError:function(r){Vn=!0,ar=r}};function Vw(r,s,u,f,g,v,j,O,F){Vn=!1,ar=null,Wn.apply(Us,arguments)}function qw(r,s,u,f,g,v,j,O,F){if(Vw.apply(this,arguments),Vn){if(Vn){var Y=ar;Vn=!1,ar=null}else throw Error(n(198));bn||(bn=!0,Rr=Y)}}function No(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 Mp(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 _p(r){if(No(r)!==r)throw Error(n(188))}function Gw(r){var s=r.alternate;if(!s){if(s=No(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,f=s;;){var g=u.return;if(g===null)break;var v=g.alternate;if(v===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===u)return _p(g),r;if(v===f)return _p(g),s;v=v.sibling}throw Error(n(188))}if(u.return!==f.return)u=g,f=v;else{for(var j=!1,O=g.child;O;){if(O===u){j=!0,u=g,f=v;break}if(O===f){j=!0,f=g,u=v;break}O=O.sibling}if(!j){for(O=v.child;O;){if(O===u){j=!0,u=v,f=g;break}if(O===f){j=!0,f=v,u=g;break}O=O.sibling}if(!j)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 zp(r){return r=Gw(r),r!==null?Fp(r):null}function Fp(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=Fp(r);if(s!==null)return s;r=r.sibling}return null}var $p=t.unstable_scheduleCallback,Bp=t.unstable_cancelCallback,Kw=t.unstable_shouldYield,Yw=t.unstable_requestPaint,mt=t.unstable_now,Xw=t.unstable_getCurrentPriorityLevel,Ru=t.unstable_ImmediatePriority,Up=t.unstable_UserBlockingPriority,al=t.unstable_NormalPriority,Qw=t.unstable_LowPriority,Hp=t.unstable_IdlePriority,ul=null,ur=null;function Jw(r){if(ur&&typeof ur.onCommitFiberRoot=="function")try{ur.onCommitFiberRoot(ul,r,void 0,(r.current.flags&128)===128)}catch{}}var qn=Math.clz32?Math.clz32:t1,Zw=Math.log,e1=Math.LN2;function t1(r){return r>>>=0,r===0?32:31-(Zw(r)/e1|0)|0}var cl=64,dl=4194304;function Hs(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 fl(r,s){var u=r.pendingLanes;if(u===0)return 0;var f=0,g=r.suspendedLanes,v=r.pingedLanes,j=u&268435455;if(j!==0){var O=j&~g;O!==0?f=Hs(O):(v&=j,v!==0&&(f=Hs(v)))}else j=u&~g,j!==0?f=Hs(j):v!==0&&(f=Hs(v));if(f===0)return 0;if(s!==0&&s!==f&&(s&g)===0&&(g=f&-f,v=s&-s,g>=v||g===16&&(v&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-qn(s),g=1<<u,f|=r[u],s&=~g;return f}function n1(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 r1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes;0<v;){var j=31-qn(v),O=1<<j,F=g[j];F===-1?((O&u)===0||(O&f)!==0)&&(g[j]=n1(O,s)):F<=s&&(r.expiredLanes|=O),v&=~O}}function Tu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Wp(){var r=cl;return cl<<=1,(cl&4194240)===0&&(cl=64),r}function Pu(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function Ws(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-qn(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 g=31-qn(u),v=1<<g;s[g]=0,f[g]=-1,r[g]=-1,u&=~v}}function Au(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-qn(u),g=1<<f;g&s|r[f]&s&&(r[f]|=s),u&=~g}}var We=0;function Vp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var qp,Du,Gp,Kp,Yp,Iu=!1,pl=[],Kr=null,Yr=null,Xr=null,Vs=new Map,qs=new Map,Qr=[],s1="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 Xp(r,s){switch(r){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":Vs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(s.pointerId)}}function Gs(r,s,u,f,g,v){return r===null||r.nativeEvent!==v?(r={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:v,targetContainers:[g]},s!==null&&(s=li(s),s!==null&&Du(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function i1(r,s,u,f,g){switch(s){case"focusin":return Kr=Gs(Kr,r,s,u,f,g),!0;case"dragenter":return Yr=Gs(Yr,r,s,u,f,g),!0;case"mouseover":return Xr=Gs(Xr,r,s,u,f,g),!0;case"pointerover":var v=g.pointerId;return Vs.set(v,Gs(Vs.get(v)||null,r,s,u,f,g)),!0;case"gotpointercapture":return v=g.pointerId,qs.set(v,Gs(qs.get(v)||null,r,s,u,f,g)),!0}return!1}function Qp(r){var s=Eo(r.target);if(s!==null){var u=No(s);if(u!==null){if(s=u.tag,s===13){if(s=Mp(u),s!==null){r.blockedOn=s,Yp(r.priority,function(){Gp(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 hl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=Ou(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);ht=f,u.target.dispatchEvent(f),ht=null}else return s=li(u),s!==null&&Du(s),r.blockedOn=u,!1;s.shift()}return!0}function Jp(r,s,u){hl(r)&&u.delete(s)}function l1(){Iu=!1,Kr!==null&&hl(Kr)&&(Kr=null),Yr!==null&&hl(Yr)&&(Yr=null),Xr!==null&&hl(Xr)&&(Xr=null),Vs.forEach(Jp),qs.forEach(Jp)}function Ks(r,s){r.blockedOn===s&&(r.blockedOn=null,Iu||(Iu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,l1)))}function Ys(r){function s(g){return Ks(g,r)}if(0<pl.length){Ks(pl[0],r);for(var u=1;u<pl.length;u++){var f=pl[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Kr!==null&&Ks(Kr,r),Yr!==null&&Ks(Yr,r),Xr!==null&&Ks(Xr,r),Vs.forEach(s),qs.forEach(s),u=0;u<Qr.length;u++)f=Qr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<Qr.length&&(u=Qr[0],u.blockedOn===null);)Qp(u),u.blockedOn===null&&Qr.shift()}var Ko=M.ReactCurrentBatchConfig,ml=!0;function a1(r,s,u,f){var g=We,v=Ko.transition;Ko.transition=null;try{We=1,Lu(r,s,u,f)}finally{We=g,Ko.transition=v}}function u1(r,s,u,f){var g=We,v=Ko.transition;Ko.transition=null;try{We=4,Lu(r,s,u,f)}finally{We=g,Ko.transition=v}}function Lu(r,s,u,f){if(ml){var g=Ou(r,s,u,f);if(g===null)Ju(r,s,f,gl,u),Xp(r,f);else if(i1(g,r,s,u,f))f.stopPropagation();else if(Xp(r,f),s&4&&-1<s1.indexOf(r)){for(;g!==null;){var v=li(g);if(v!==null&&qp(v),v=Ou(r,s,u,f),v===null&&Ju(r,s,f,gl,u),v===g)break;g=v}g!==null&&f.stopPropagation()}else Ju(r,s,f,null,u)}}var gl=null;function Ou(r,s,u,f){if(gl=null,r=qr(f),r=Eo(r),r!==null)if(s=No(r),s===null)r=null;else if(u=s.tag,u===13){if(r=Mp(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 gl=r,null}function Zp(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(Xw()){case Ru:return 1;case Up:return 4;case al:case Qw:return 16;case Hp:return 536870912;default:return 16}default:return 16}}var Jr=null,Mu=null,xl=null;function eh(){if(xl)return xl;var r,s=Mu,u=s.length,f,g="value"in Jr?Jr.value:Jr.textContent,v=g.length;for(r=0;r<u&&s[r]===g[r];r++);var j=u-r;for(f=1;f<=j&&s[u-f]===g[v-f];f++);return xl=g.slice(r,1<f?1-f:void 0)}function yl(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 vl(){return!0}function th(){return!1}function wn(r){function s(u,f,g,v,j){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=v,this.target=j,this.currentTarget=null;for(var O in r)r.hasOwnProperty(O)&&(u=r[O],this[O]=u?u(v):v[O]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?vl:th,this.isPropagationStopped=th,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=vl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=vl)},persist:function(){},isPersistent:vl}),s}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_u=wn(Yo),Xs=E({},Yo,{view:0,detail:0}),c1=wn(Xs),zu,Fu,Qs,bl=E({},Xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,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!==Qs&&(Qs&&r.type==="mousemove"?(zu=r.screenX-Qs.screenX,Fu=r.screenY-Qs.screenY):Fu=zu=0,Qs=r),zu)},movementY:function(r){return"movementY"in r?r.movementY:Fu}}),nh=wn(bl),d1=E({},bl,{dataTransfer:0}),f1=wn(d1),p1=E({},Xs,{relatedTarget:0}),$u=wn(p1),h1=E({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),m1=wn(h1),g1=E({},Yo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),x1=wn(g1),y1=E({},Yo,{data:0}),rh=wn(y1),v1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b1={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"},w1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=w1[r])?!!s[r]:!1}function Bu(){return k1}var S1=E({},Xs,{key:function(r){if(r.key){var s=v1[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=yl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?b1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(r){return r.type==="keypress"?yl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?yl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),j1=wn(S1),C1=E({},bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oh=wn(C1),N1=E({},Xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),E1=wn(N1),R1=E({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),T1=wn(R1),P1=E({},bl,{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}),A1=wn(P1),D1=[9,13,27,32],Uu=d&&"CompositionEvent"in window,Js=null;d&&"documentMode"in document&&(Js=document.documentMode);var I1=d&&"TextEvent"in window&&!Js,sh=d&&(!Uu||Js&&8<Js&&11>=Js),ih=" ",lh=!1;function ah(r,s){switch(r){case"keyup":return D1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xo=!1;function L1(r,s){switch(r){case"compositionend":return uh(s);case"keypress":return s.which!==32?null:(lh=!0,ih);case"textInput":return r=s.data,r===ih&&lh?null:r;default:return null}}function O1(r,s){if(Xo)return r==="compositionend"||!Uu&&ah(r,s)?(r=eh(),xl=Mu=Jr=null,Xo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return sh&&s.locale!=="ko"?null:s.data;default:return null}}var M1={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 ch(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!M1[r.type]:s==="textarea"}function dh(r,s,u,f){Ht(f),s=Cl(s,"onChange"),0<s.length&&(u=new _u("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var Zs=null,ei=null;function _1(r){Th(r,0)}function wl(r){var s=ts(r);if(at(s))return r}function z1(r,s){if(r==="change")return s}var fh=!1;if(d){var Hu;if(d){var Wu="oninput"in document;if(!Wu){var ph=document.createElement("div");ph.setAttribute("oninput","return;"),Wu=typeof ph.oninput=="function"}Hu=Wu}else Hu=!1;fh=Hu&&(!document.documentMode||9<document.documentMode)}function hh(){Zs&&(Zs.detachEvent("onpropertychange",mh),ei=Zs=null)}function mh(r){if(r.propertyName==="value"&&wl(ei)){var s=[];dh(s,ei,r,qr(r)),Er(_1,s)}}function F1(r,s,u){r==="focusin"?(hh(),Zs=s,ei=u,Zs.attachEvent("onpropertychange",mh)):r==="focusout"&&hh()}function $1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return wl(ei)}function B1(r,s){if(r==="click")return wl(s)}function U1(r,s){if(r==="input"||r==="change")return wl(s)}function H1(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Gn=typeof Object.is=="function"?Object.is:H1;function ti(r,s){if(Gn(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 g=u[f];if(!p.call(s,g)||!Gn(r[g],s[g]))return!1}return!0}function gh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function xh(r,s){var u=gh(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=gh(u)}}function yh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?yh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function vh(){for(var r=window,s=ft();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=ft(r.document)}return s}function Vu(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 W1(r){var s=vh(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&yh(u.ownerDocument.documentElement,u)){if(f!==null&&Vu(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 g=u.textContent.length,v=Math.min(f.start,g);f=f.end===void 0?v:Math.min(f.end,g),!r.extend&&v>f&&(g=f,f=v,v=g),g=xh(u,v);var j=xh(u,f);g&&j&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==j.node||r.focusOffset!==j.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),v>f?(r.addRange(s),r.extend(j.node,j.offset)):(s.setEnd(j.node,j.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 V1=d&&"documentMode"in document&&11>=document.documentMode,Qo=null,qu=null,ni=null,Gu=!1;function bh(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Gu||Qo==null||Qo!==ft(f)||(f=Qo,"selectionStart"in f&&Vu(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}),ni&&ti(ni,f)||(ni=f,f=Cl(qu,"onSelect"),0<f.length&&(s=new _u("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=Qo)))}function kl(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Jo={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionend:kl("Transition","TransitionEnd")},Ku={},wh={};d&&(wh=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function Sl(r){if(Ku[r])return Ku[r];if(!Jo[r])return r;var s=Jo[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in wh)return Ku[r]=s[u];return r}var kh=Sl("animationend"),Sh=Sl("animationiteration"),jh=Sl("animationstart"),Ch=Sl("transitionend"),Nh=new Map,Eh="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 Zr(r,s){Nh.set(r,s),a(s,[r])}for(var Yu=0;Yu<Eh.length;Yu++){var Xu=Eh[Yu],q1=Xu.toLowerCase(),G1=Xu[0].toUpperCase()+Xu.slice(1);Zr(q1,"on"+G1)}Zr(kh,"onAnimationEnd"),Zr(Sh,"onAnimationIteration"),Zr(jh,"onAnimationStart"),Zr("dblclick","onDoubleClick"),Zr("focusin","onFocus"),Zr("focusout","onBlur"),Zr(Ch,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ri="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(" "),K1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ri));function Rh(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,qw(f,s,void 0,r),r.currentTarget=null}function Th(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],g=f.event;f=f.listeners;e:{var v=void 0;if(s)for(var j=f.length-1;0<=j;j--){var O=f[j],F=O.instance,Y=O.currentTarget;if(O=O.listener,F!==v&&g.isPropagationStopped())break e;Rh(g,O,Y),v=F}else for(j=0;j<f.length;j++){if(O=f[j],F=O.instance,Y=O.currentTarget,O=O.listener,F!==v&&g.isPropagationStopped())break e;Rh(g,O,Y),v=F}}}if(bn)throw r=Rr,bn=!1,Rr=null,r}function Ye(r,s){var u=s[oc];u===void 0&&(u=s[oc]=new Set);var f=r+"__bubble";u.has(f)||(Ph(s,r,2,!1),u.add(f))}function Qu(r,s,u){var f=0;s&&(f|=4),Ph(u,r,f,s)}var jl="_reactListening"+Math.random().toString(36).slice(2);function oi(r){if(!r[jl]){r[jl]=!0,o.forEach(function(u){u!=="selectionchange"&&(K1.has(u)||Qu(u,!1,r),Qu(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[jl]||(s[jl]=!0,Qu("selectionchange",!1,s))}}function Ph(r,s,u,f){switch(Zp(s)){case 1:var g=a1;break;case 4:g=u1;break;default:g=Lu}u=g.bind(null,s,u,r),g=void 0,!Dn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?r.addEventListener(s,u,{capture:!0,passive:g}):r.addEventListener(s,u,!0):g!==void 0?r.addEventListener(s,u,{passive:g}):r.addEventListener(s,u,!1)}function Ju(r,s,u,f,g){var v=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var j=f.tag;if(j===3||j===4){var O=f.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(j===4)for(j=f.return;j!==null;){var F=j.tag;if((F===3||F===4)&&(F=j.stateNode.containerInfo,F===g||F.nodeType===8&&F.parentNode===g))return;j=j.return}for(;O!==null;){if(j=Eo(O),j===null)return;if(F=j.tag,F===5||F===6){f=v=j;continue e}O=O.parentNode}}f=f.return}Er(function(){var Y=v,oe=qr(u),le=[];e:{var ne=Nh.get(r);if(ne!==void 0){var pe=_u,me=r;switch(r){case"keypress":if(yl(u)===0)break e;case"keydown":case"keyup":pe=j1;break;case"focusin":me="focus",pe=$u;break;case"focusout":me="blur",pe=$u;break;case"beforeblur":case"afterblur":pe=$u;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":pe=nh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=f1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=E1;break;case kh:case Sh:case jh:pe=m1;break;case Ch:pe=T1;break;case"scroll":pe=c1;break;case"wheel":pe=A1;break;case"copy":case"cut":case"paste":pe=x1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=oh}var ge=(s&4)!==0,gt=!ge&&r==="scroll",V=ge?ne!==null?ne+"Capture":null:ne;ge=[];for(var H=Y,G;H!==null;){G=H;var de=G.stateNode;if(G.tag===5&&de!==null&&(G=de,V!==null&&(de=rt(H,V),de!=null&&ge.push(si(H,de,G)))),gt)break;H=H.return}0<ge.length&&(ne=new pe(ne,me,null,u,oe),le.push({event:ne,listeners:ge}))}}if((s&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",ne&&u!==ht&&(me=u.relatedTarget||u.fromElement)&&(Eo(me)||me[Tr]))break e;if((pe||ne)&&(ne=oe.window===oe?oe:(ne=oe.ownerDocument)?ne.defaultView||ne.parentWindow:window,pe?(me=u.relatedTarget||u.toElement,pe=Y,me=me?Eo(me):null,me!==null&&(gt=No(me),me!==gt||me.tag!==5&&me.tag!==6)&&(me=null)):(pe=null,me=Y),pe!==me)){if(ge=nh,de="onMouseLeave",V="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(ge=oh,de="onPointerLeave",V="onPointerEnter",H="pointer"),gt=pe==null?ne:ts(pe),G=me==null?ne:ts(me),ne=new ge(de,H+"leave",pe,u,oe),ne.target=gt,ne.relatedTarget=G,de=null,Eo(oe)===Y&&(ge=new ge(V,H+"enter",me,u,oe),ge.target=G,ge.relatedTarget=gt,de=ge),gt=de,pe&&me)t:{for(ge=pe,V=me,H=0,G=ge;G;G=Zo(G))H++;for(G=0,de=V;de;de=Zo(de))G++;for(;0<H-G;)ge=Zo(ge),H--;for(;0<G-H;)V=Zo(V),G--;for(;H--;){if(ge===V||V!==null&&ge===V.alternate)break t;ge=Zo(ge),V=Zo(V)}ge=null}else ge=null;pe!==null&&Ah(le,ne,pe,ge,!1),me!==null&&gt!==null&&Ah(le,gt,me,ge,!0)}}e:{if(ne=Y?ts(Y):window,pe=ne.nodeName&&ne.nodeName.toLowerCase(),pe==="select"||pe==="input"&&ne.type==="file")var xe=z1;else if(ch(ne))if(fh)xe=U1;else{xe=$1;var je=F1}else(pe=ne.nodeName)&&pe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(xe=B1);if(xe&&(xe=xe(r,Y))){dh(le,xe,u,oe);break e}je&&je(r,ne,Y),r==="focusout"&&(je=ne._wrapperState)&&je.controlled&&ne.type==="number"&&At(ne,"number",ne.value)}switch(je=Y?ts(Y):window,r){case"focusin":(ch(je)||je.contentEditable==="true")&&(Qo=je,qu=Y,ni=null);break;case"focusout":ni=qu=Qo=null;break;case"mousedown":Gu=!0;break;case"contextmenu":case"mouseup":case"dragend":Gu=!1,bh(le,u,oe);break;case"selectionchange":if(V1)break;case"keydown":case"keyup":bh(le,u,oe)}var Ce;if(Uu)e:{switch(r){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Xo?ah(r,u)&&(Te="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Te="onCompositionStart");Te&&(sh&&u.locale!=="ko"&&(Xo||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Xo&&(Ce=eh()):(Jr=oe,Mu="value"in Jr?Jr.value:Jr.textContent,Xo=!0)),je=Cl(Y,Te),0<je.length&&(Te=new rh(Te,r,null,u,oe),le.push({event:Te,listeners:je}),Ce?Te.data=Ce:(Ce=uh(u),Ce!==null&&(Te.data=Ce)))),(Ce=I1?L1(r,u):O1(r,u))&&(Y=Cl(Y,"onBeforeInput"),0<Y.length&&(oe=new rh("onBeforeInput","beforeinput",null,u,oe),le.push({event:oe,listeners:Y}),oe.data=Ce))}Th(le,s)})}function si(r,s,u){return{instance:r,listener:s,currentTarget:u}}function Cl(r,s){for(var u=s+"Capture",f=[];r!==null;){var g=r,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=rt(r,u),v!=null&&f.unshift(si(r,v,g)),v=rt(r,s),v!=null&&f.push(si(r,v,g))),r=r.return}return f}function Zo(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Ah(r,s,u,f,g){for(var v=s._reactName,j=[];u!==null&&u!==f;){var O=u,F=O.alternate,Y=O.stateNode;if(F!==null&&F===f)break;O.tag===5&&Y!==null&&(O=Y,g?(F=rt(u,v),F!=null&&j.unshift(si(u,F,O))):g||(F=rt(u,v),F!=null&&j.push(si(u,F,O)))),u=u.return}j.length!==0&&r.push({event:s,listeners:j})}var Y1=/\r\n?/g,X1=/\u0000|\uFFFD/g;function Dh(r){return(typeof r=="string"?r:""+r).replace(Y1,`
38
+ `).replace(X1,"")}function Nl(r,s,u){if(s=Dh(s),Dh(r)!==s&&u)throw Error(n(425))}function El(){}var Zu=null,ec=null;function tc(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 nc=typeof setTimeout=="function"?setTimeout:void 0,Q1=typeof clearTimeout=="function"?clearTimeout:void 0,Ih=typeof Promise=="function"?Promise:void 0,J1=typeof queueMicrotask=="function"?queueMicrotask:typeof Ih<"u"?function(r){return Ih.resolve(null).then(r).catch(Z1)}:nc;function Z1(r){setTimeout(function(){throw r})}function rc(r,s){var u=s,f=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(f===0){r.removeChild(g),Ys(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);Ys(s)}function eo(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 Lh(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var es=Math.random().toString(36).slice(2),cr="__reactFiber$"+es,ii="__reactProps$"+es,Tr="__reactContainer$"+es,oc="__reactEvents$"+es,ek="__reactListeners$"+es,tk="__reactHandles$"+es;function Eo(r){var s=r[cr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Tr]||u[cr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=Lh(r);r!==null;){if(u=r[cr])return u;r=Lh(r)}return s}r=u,u=r.parentNode}return null}function li(r){return r=r[cr]||r[Tr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ts(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Rl(r){return r[ii]||null}var sc=[],ns=-1;function to(r){return{current:r}}function Xe(r){0>ns||(r.current=sc[ns],sc[ns]=null,ns--)}function qe(r,s){ns++,sc[ns]=r.current,r.current=s}var no={},qt=to(no),ln=to(!1),Ro=no;function rs(r,s){var u=r.type.contextTypes;if(!u)return no;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in u)g[v]=s[v];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function an(r){return r=r.childContextTypes,r!=null}function Tl(){Xe(ln),Xe(qt)}function Oh(r,s,u){if(qt.current!==no)throw Error(n(168));qe(qt,s),qe(ln,u)}function Mh(r,s,u){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var g in f)if(!(g in s))throw Error(n(108,Ee(r)||"Unknown",g));return E({},u,f)}function Pl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||no,Ro=qt.current,qe(qt,r),qe(ln,ln.current),!0}function _h(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=Mh(r,s,Ro),f.__reactInternalMemoizedMergedChildContext=r,Xe(ln),Xe(qt),qe(qt,r)):Xe(ln),qe(ln,u)}var Pr=null,Al=!1,ic=!1;function zh(r){Pr===null?Pr=[r]:Pr.push(r)}function nk(r){Al=!0,zh(r)}function ro(){if(!ic&&Pr!==null){ic=!0;var r=0,s=We;try{var u=Pr;for(We=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Pr=null,Al=!1}catch(g){throw Pr!==null&&(Pr=Pr.slice(r+1)),$p(Ru,ro),g}finally{We=s,ic=!1}}return null}var os=[],ss=0,Dl=null,Il=0,In=[],Ln=0,To=null,Ar=1,Dr="";function Po(r,s){os[ss++]=Il,os[ss++]=Dl,Dl=r,Il=s}function Fh(r,s,u){In[Ln++]=Ar,In[Ln++]=Dr,In[Ln++]=To,To=r;var f=Ar;r=Dr;var g=32-qn(f)-1;f&=~(1<<g),u+=1;var v=32-qn(s)+g;if(30<v){var j=g-g%5;v=(f&(1<<j)-1).toString(32),f>>=j,g-=j,Ar=1<<32-qn(s)+g|u<<g|f,Dr=v+r}else Ar=1<<v|u<<g|f,Dr=r}function lc(r){r.return!==null&&(Po(r,1),Fh(r,1,0))}function ac(r){for(;r===Dl;)Dl=os[--ss],os[ss]=null,Il=os[--ss],os[ss]=null;for(;r===To;)To=In[--Ln],In[Ln]=null,Dr=In[--Ln],In[Ln]=null,Ar=In[--Ln],In[Ln]=null}var kn=null,Sn=null,et=!1,Kn=null;function $h(r,s){var u=zn(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 Bh(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,kn=r,Sn=eo(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,kn=r,Sn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=To!==null?{id:Ar,overflow:Dr}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=zn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,kn=r,Sn=null,!0):!1;default:return!1}}function uc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function cc(r){if(et){var s=Sn;if(s){var u=s;if(!Bh(r,s)){if(uc(r))throw Error(n(418));s=eo(u.nextSibling);var f=kn;s&&Bh(r,s)?$h(f,u):(r.flags=r.flags&-4097|2,et=!1,kn=r)}}else{if(uc(r))throw Error(n(418));r.flags=r.flags&-4097|2,et=!1,kn=r}}}function Uh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;kn=r}function Ll(r){if(r!==kn)return!1;if(!et)return Uh(r),et=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!tc(r.type,r.memoizedProps)),s&&(s=Sn)){if(uc(r))throw Hh(),Error(n(418));for(;s;)$h(r,s),s=eo(s.nextSibling)}if(Uh(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){Sn=eo(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Sn=null}}else Sn=kn?eo(r.stateNode.nextSibling):null;return!0}function Hh(){for(var r=Sn;r;)r=eo(r.nextSibling)}function is(){Sn=kn=null,et=!1}function dc(r){Kn===null?Kn=[r]:Kn.push(r)}var rk=M.ReactCurrentBatchConfig;function ai(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 g=f,v=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(j){var O=g.refs;j===null?delete O[v]:O[v]=j},s._stringRef=v,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Ol(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Wh(r){var s=r._init;return s(r._payload)}function Vh(r){function s(V,H){if(r){var G=V.deletions;G===null?(V.deletions=[H],V.flags|=16):G.push(H)}}function u(V,H){if(!r)return null;for(;H!==null;)s(V,H),H=H.sibling;return null}function f(V,H){for(V=new Map;H!==null;)H.key!==null?V.set(H.key,H):V.set(H.index,H),H=H.sibling;return V}function g(V,H){return V=fo(V,H),V.index=0,V.sibling=null,V}function v(V,H,G){return V.index=G,r?(G=V.alternate,G!==null?(G=G.index,G<H?(V.flags|=2,H):G):(V.flags|=2,H)):(V.flags|=1048576,H)}function j(V){return r&&V.alternate===null&&(V.flags|=2),V}function O(V,H,G,de){return H===null||H.tag!==6?(H=nd(G,V.mode,de),H.return=V,H):(H=g(H,G),H.return=V,H)}function F(V,H,G,de){var xe=G.type;return xe===D?oe(V,H,G.props.children,de,G.key):H!==null&&(H.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===te&&Wh(xe)===H.type)?(de=g(H,G.props),de.ref=ai(V,H,G),de.return=V,de):(de=sa(G.type,G.key,G.props,null,V.mode,de),de.ref=ai(V,H,G),de.return=V,de)}function Y(V,H,G,de){return H===null||H.tag!==4||H.stateNode.containerInfo!==G.containerInfo||H.stateNode.implementation!==G.implementation?(H=rd(G,V.mode,de),H.return=V,H):(H=g(H,G.children||[]),H.return=V,H)}function oe(V,H,G,de,xe){return H===null||H.tag!==7?(H=zo(G,V.mode,de,xe),H.return=V,H):(H=g(H,G),H.return=V,H)}function le(V,H,G){if(typeof H=="string"&&H!==""||typeof H=="number")return H=nd(""+H,V.mode,G),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return G=sa(H.type,H.key,H.props,null,V.mode,G),G.ref=ai(V,null,H),G.return=V,G;case T:return H=rd(H,V.mode,G),H.return=V,H;case te:var de=H._init;return le(V,de(H._payload),G)}if(pt(H)||se(H))return H=zo(H,V.mode,G,null),H.return=V,H;Ol(V,H)}return null}function ne(V,H,G,de){var xe=H!==null?H.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return xe!==null?null:O(V,H,""+G,de);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case _:return G.key===xe?F(V,H,G,de):null;case T:return G.key===xe?Y(V,H,G,de):null;case te:return xe=G._init,ne(V,H,xe(G._payload),de)}if(pt(G)||se(G))return xe!==null?null:oe(V,H,G,de,null);Ol(V,G)}return null}function pe(V,H,G,de,xe){if(typeof de=="string"&&de!==""||typeof de=="number")return V=V.get(G)||null,O(H,V,""+de,xe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case _:return V=V.get(de.key===null?G:de.key)||null,F(H,V,de,xe);case T:return V=V.get(de.key===null?G:de.key)||null,Y(H,V,de,xe);case te:var je=de._init;return pe(V,H,G,je(de._payload),xe)}if(pt(de)||se(de))return V=V.get(G)||null,oe(H,V,de,xe,null);Ol(H,de)}return null}function me(V,H,G,de){for(var xe=null,je=null,Ce=H,Te=H=0,Lt=null;Ce!==null&&Te<G.length;Te++){Ce.index>Te?(Lt=Ce,Ce=null):Lt=Ce.sibling;var Fe=ne(V,Ce,G[Te],de);if(Fe===null){Ce===null&&(Ce=Lt);break}r&&Ce&&Fe.alternate===null&&s(V,Ce),H=v(Fe,H,Te),je===null?xe=Fe:je.sibling=Fe,je=Fe,Ce=Lt}if(Te===G.length)return u(V,Ce),et&&Po(V,Te),xe;if(Ce===null){for(;Te<G.length;Te++)Ce=le(V,G[Te],de),Ce!==null&&(H=v(Ce,H,Te),je===null?xe=Ce:je.sibling=Ce,je=Ce);return et&&Po(V,Te),xe}for(Ce=f(V,Ce);Te<G.length;Te++)Lt=pe(Ce,V,Te,G[Te],de),Lt!==null&&(r&&Lt.alternate!==null&&Ce.delete(Lt.key===null?Te:Lt.key),H=v(Lt,H,Te),je===null?xe=Lt:je.sibling=Lt,je=Lt);return r&&Ce.forEach(function(po){return s(V,po)}),et&&Po(V,Te),xe}function ge(V,H,G,de){var xe=se(G);if(typeof xe!="function")throw Error(n(150));if(G=xe.call(G),G==null)throw Error(n(151));for(var je=xe=null,Ce=H,Te=H=0,Lt=null,Fe=G.next();Ce!==null&&!Fe.done;Te++,Fe=G.next()){Ce.index>Te?(Lt=Ce,Ce=null):Lt=Ce.sibling;var po=ne(V,Ce,Fe.value,de);if(po===null){Ce===null&&(Ce=Lt);break}r&&Ce&&po.alternate===null&&s(V,Ce),H=v(po,H,Te),je===null?xe=po:je.sibling=po,je=po,Ce=Lt}if(Fe.done)return u(V,Ce),et&&Po(V,Te),xe;if(Ce===null){for(;!Fe.done;Te++,Fe=G.next())Fe=le(V,Fe.value,de),Fe!==null&&(H=v(Fe,H,Te),je===null?xe=Fe:je.sibling=Fe,je=Fe);return et&&Po(V,Te),xe}for(Ce=f(V,Ce);!Fe.done;Te++,Fe=G.next())Fe=pe(Ce,V,Te,Fe.value,de),Fe!==null&&(r&&Fe.alternate!==null&&Ce.delete(Fe.key===null?Te:Fe.key),H=v(Fe,H,Te),je===null?xe=Fe:je.sibling=Fe,je=Fe);return r&&Ce.forEach(function(Mk){return s(V,Mk)}),et&&Po(V,Te),xe}function gt(V,H,G,de){if(typeof G=="object"&&G!==null&&G.type===D&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case _:e:{for(var xe=G.key,je=H;je!==null;){if(je.key===xe){if(xe=G.type,xe===D){if(je.tag===7){u(V,je.sibling),H=g(je,G.props.children),H.return=V,V=H;break e}}else if(je.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===te&&Wh(xe)===je.type){u(V,je.sibling),H=g(je,G.props),H.ref=ai(V,je,G),H.return=V,V=H;break e}u(V,je);break}else s(V,je);je=je.sibling}G.type===D?(H=zo(G.props.children,V.mode,de,G.key),H.return=V,V=H):(de=sa(G.type,G.key,G.props,null,V.mode,de),de.ref=ai(V,H,G),de.return=V,V=de)}return j(V);case T:e:{for(je=G.key;H!==null;){if(H.key===je)if(H.tag===4&&H.stateNode.containerInfo===G.containerInfo&&H.stateNode.implementation===G.implementation){u(V,H.sibling),H=g(H,G.children||[]),H.return=V,V=H;break e}else{u(V,H);break}else s(V,H);H=H.sibling}H=rd(G,V.mode,de),H.return=V,V=H}return j(V);case te:return je=G._init,gt(V,H,je(G._payload),de)}if(pt(G))return me(V,H,G,de);if(se(G))return ge(V,H,G,de);Ol(V,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,H!==null&&H.tag===6?(u(V,H.sibling),H=g(H,G),H.return=V,V=H):(u(V,H),H=nd(G,V.mode,de),H.return=V,V=H),j(V)):u(V,H)}return gt}var ls=Vh(!0),qh=Vh(!1),Ml=to(null),_l=null,as=null,fc=null;function pc(){fc=as=_l=null}function hc(r){var s=Ml.current;Xe(Ml),r._currentValue=s}function mc(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 us(r,s){_l=r,fc=as=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(un=!0),r.firstContext=null)}function On(r){var s=r._currentValue;if(fc!==r)if(r={context:r,memoizedValue:s,next:null},as===null){if(_l===null)throw Error(n(308));as=r,_l.dependencies={lanes:0,firstContext:r}}else as=as.next=r;return s}var Ao=null;function gc(r){Ao===null?Ao=[r]:Ao.push(r)}function Gh(r,s,u,f){var g=s.interleaved;return g===null?(u.next=u,gc(s)):(u.next=g.next,g.next=u),s.interleaved=u,Ir(r,f)}function Ir(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 oo=!1;function xc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kh(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 Lr(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function so(r,s,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(_e&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,Ir(r,u)}return g=f.interleaved,g===null?(s.next=s,gc(f)):(s.next=g.next,g.next=s),f.interleaved=s,Ir(r,u)}function zl(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,Au(r,u)}}function Yh(r,s){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var j={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};v===null?g=v=j:v=v.next=j,u=u.next}while(u!==null);v===null?g=v=s:v=v.next=s}else g=v=s;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:v,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 Fl(r,s,u,f){var g=r.updateQueue;oo=!1;var v=g.firstBaseUpdate,j=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var F=O,Y=F.next;F.next=null,j===null?v=Y:j.next=Y,j=F;var oe=r.alternate;oe!==null&&(oe=oe.updateQueue,O=oe.lastBaseUpdate,O!==j&&(O===null?oe.firstBaseUpdate=Y:O.next=Y,oe.lastBaseUpdate=F))}if(v!==null){var le=g.baseState;j=0,oe=Y=F=null,O=v;do{var ne=O.lane,pe=O.eventTime;if((f&ne)===ne){oe!==null&&(oe=oe.next={eventTime:pe,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var me=r,ge=O;switch(ne=s,pe=u,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){le=me.call(pe,le,ne);break e}le=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ge.payload,ne=typeof me=="function"?me.call(pe,le,ne):me,ne==null)break e;le=E({},le,ne);break e;case 2:oo=!0}}O.callback!==null&&O.lane!==0&&(r.flags|=64,ne=g.effects,ne===null?g.effects=[O]:ne.push(O))}else pe={eventTime:pe,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},oe===null?(Y=oe=pe,F=le):oe=oe.next=pe,j|=ne;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ne=O,O=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(oe===null&&(F=le),g.baseState=F,g.firstBaseUpdate=Y,g.lastBaseUpdate=oe,s=g.shared.interleaved,s!==null){g=s;do j|=g.lane,g=g.next;while(g!==s)}else v===null&&(g.shared.lanes=0);Lo|=j,r.lanes=j,r.memoizedState=le}}function Xh(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],g=f.callback;if(g!==null){if(f.callback=null,f=u,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var ui={},dr=to(ui),ci=to(ui),di=to(ui);function Do(r){if(r===ui)throw Error(n(174));return r}function yc(r,s){switch(qe(di,s),qe(ci,r),qe(dr,ui),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ue(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ue(s,r)}Xe(dr),qe(dr,s)}function cs(){Xe(dr),Xe(ci),Xe(di)}function Qh(r){Do(di.current);var s=Do(dr.current),u=ue(s,r.type);s!==u&&(qe(ci,r),qe(dr,u))}function vc(r){ci.current===r&&(Xe(dr),Xe(ci))}var ot=to(0);function $l(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 bc=[];function wc(){for(var r=0;r<bc.length;r++)bc[r]._workInProgressVersionPrimary=null;bc.length=0}var Bl=M.ReactCurrentDispatcher,kc=M.ReactCurrentBatchConfig,Io=0,st=null,Ct=null,Dt=null,Ul=!1,fi=!1,pi=0,ok=0;function Gt(){throw Error(n(321))}function Sc(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!Gn(r[u],s[u]))return!1;return!0}function jc(r,s,u,f,g,v){if(Io=v,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Bl.current=r===null||r.memoizedState===null?ak:uk,r=u(f,g),fi){v=0;do{if(fi=!1,pi=0,25<=v)throw Error(n(301));v+=1,Dt=Ct=null,s.updateQueue=null,Bl.current=ck,r=u(f,g)}while(fi)}if(Bl.current=Vl,s=Ct!==null&&Ct.next!==null,Io=0,Dt=Ct=st=null,Ul=!1,s)throw Error(n(300));return r}function Cc(){var r=pi!==0;return pi=0,r}function fr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?st.memoizedState=Dt=r:Dt=Dt.next=r,Dt}function Mn(){if(Ct===null){var r=st.alternate;r=r!==null?r.memoizedState:null}else r=Ct.next;var s=Dt===null?st.memoizedState:Dt.next;if(s!==null)Dt=s,Ct=r;else{if(r===null)throw Error(n(310));Ct=r,r={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Dt===null?st.memoizedState=Dt=r:Dt=Dt.next=r}return Dt}function hi(r,s){return typeof s=="function"?s(r):s}function Nc(r){var s=Mn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Ct,g=f.baseQueue,v=u.pending;if(v!==null){if(g!==null){var j=g.next;g.next=v.next,v.next=j}f.baseQueue=g=v,u.pending=null}if(g!==null){v=g.next,f=f.baseState;var O=j=null,F=null,Y=v;do{var oe=Y.lane;if((Io&oe)===oe)F!==null&&(F=F.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),f=Y.hasEagerState?Y.eagerState:r(f,Y.action);else{var le={lane:oe,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};F===null?(O=F=le,j=f):F=F.next=le,st.lanes|=oe,Lo|=oe}Y=Y.next}while(Y!==null&&Y!==v);F===null?j=f:F.next=O,Gn(f,s.memoizedState)||(un=!0),s.memoizedState=f,s.baseState=j,s.baseQueue=F,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do v=g.lane,st.lanes|=v,Lo|=v,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Ec(r){var s=Mn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,g=u.pending,v=s.memoizedState;if(g!==null){u.pending=null;var j=g=g.next;do v=r(v,j.action),j=j.next;while(j!==g);Gn(v,s.memoizedState)||(un=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),u.lastRenderedState=v}return[v,f]}function Jh(){}function Zh(r,s){var u=st,f=Mn(),g=s(),v=!Gn(f.memoizedState,g);if(v&&(f.memoizedState=g,un=!0),f=f.queue,Rc(nm.bind(null,u,f,r),[r]),f.getSnapshot!==s||v||Dt!==null&&Dt.memoizedState.tag&1){if(u.flags|=2048,mi(9,tm.bind(null,u,f,g,s),void 0,null),It===null)throw Error(n(349));(Io&30)!==0||em(u,s,g)}return g}function em(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function tm(r,s,u,f){s.value=u,s.getSnapshot=f,rm(s)&&om(r)}function nm(r,s,u){return u(function(){rm(s)&&om(r)})}function rm(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!Gn(r,u)}catch{return!0}}function om(r){var s=Ir(r,1);s!==null&&Jn(s,r,1,-1)}function sm(r){var s=fr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:r},s.queue=r,r=r.dispatch=lk.bind(null,st,r),[s.memoizedState,r]}function mi(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.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 im(){return Mn().memoizedState}function Hl(r,s,u,f){var g=fr();st.flags|=r,g.memoizedState=mi(1|s,u,void 0,f===void 0?null:f)}function Wl(r,s,u,f){var g=Mn();f=f===void 0?null:f;var v=void 0;if(Ct!==null){var j=Ct.memoizedState;if(v=j.destroy,f!==null&&Sc(f,j.deps)){g.memoizedState=mi(s,u,v,f);return}}st.flags|=r,g.memoizedState=mi(1|s,u,v,f)}function lm(r,s){return Hl(8390656,8,r,s)}function Rc(r,s){return Wl(2048,8,r,s)}function am(r,s){return Wl(4,2,r,s)}function um(r,s){return Wl(4,4,r,s)}function cm(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 dm(r,s,u){return u=u!=null?u.concat([r]):null,Wl(4,4,cm.bind(null,s,r),u)}function Tc(){}function fm(r,s){var u=Mn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Sc(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function pm(r,s){var u=Mn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Sc(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function hm(r,s,u){return(Io&21)===0?(r.baseState&&(r.baseState=!1,un=!0),r.memoizedState=u):(Gn(u,s)||(u=Wp(),st.lanes|=u,Lo|=u,r.baseState=!0),s)}function sk(r,s){var u=We;We=u!==0&&4>u?u:4,r(!0);var f=kc.transition;kc.transition={};try{r(!1),s()}finally{We=u,kc.transition=f}}function mm(){return Mn().memoizedState}function ik(r,s,u){var f=uo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},gm(r))xm(s,u);else if(u=Gh(r,s,u,f),u!==null){var g=tn();Jn(u,r,f,g),ym(u,s,f)}}function lk(r,s,u){var f=uo(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(gm(r))xm(s,g);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var j=s.lastRenderedState,O=v(j,u);if(g.hasEagerState=!0,g.eagerState=O,Gn(O,j)){var F=s.interleaved;F===null?(g.next=g,gc(s)):(g.next=F.next,F.next=g),s.interleaved=g;return}}catch{}finally{}u=Gh(r,s,g,f),u!==null&&(g=tn(),Jn(u,r,f,g),ym(u,s,f))}}function gm(r){var s=r.alternate;return r===st||s!==null&&s===st}function xm(r,s){fi=Ul=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function ym(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Au(r,u)}}var Vl={readContext:On,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},ak={readContext:On,useCallback:function(r,s){return fr().memoizedState=[r,s===void 0?null:s],r},useContext:On,useEffect:lm,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,Hl(4194308,4,cm.bind(null,s,r),u)},useLayoutEffect:function(r,s){return Hl(4194308,4,r,s)},useInsertionEffect:function(r,s){return Hl(4,2,r,s)},useMemo:function(r,s){var u=fr();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=fr();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=ik.bind(null,st,r),[f.memoizedState,r]},useRef:function(r){var s=fr();return r={current:r},s.memoizedState=r},useState:sm,useDebugValue:Tc,useDeferredValue:function(r){return fr().memoizedState=r},useTransition:function(){var r=sm(!1),s=r[0];return r=sk.bind(null,r[1]),fr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=st,g=fr();if(et){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),It===null)throw Error(n(349));(Io&30)!==0||em(f,s,u)}g.memoizedState=u;var v={value:u,getSnapshot:s};return g.queue=v,lm(nm.bind(null,f,v,r),[r]),f.flags|=2048,mi(9,tm.bind(null,f,v,u,s),void 0,null),u},useId:function(){var r=fr(),s=It.identifierPrefix;if(et){var u=Dr,f=Ar;u=(f&~(1<<32-qn(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=pi++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=ok++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},uk={readContext:On,useCallback:fm,useContext:On,useEffect:Rc,useImperativeHandle:dm,useInsertionEffect:am,useLayoutEffect:um,useMemo:pm,useReducer:Nc,useRef:im,useState:function(){return Nc(hi)},useDebugValue:Tc,useDeferredValue:function(r){var s=Mn();return hm(s,Ct.memoizedState,r)},useTransition:function(){var r=Nc(hi)[0],s=Mn().memoizedState;return[r,s]},useMutableSource:Jh,useSyncExternalStore:Zh,useId:mm,unstable_isNewReconciler:!1},ck={readContext:On,useCallback:fm,useContext:On,useEffect:Rc,useImperativeHandle:dm,useInsertionEffect:am,useLayoutEffect:um,useMemo:pm,useReducer:Ec,useRef:im,useState:function(){return Ec(hi)},useDebugValue:Tc,useDeferredValue:function(r){var s=Mn();return Ct===null?s.memoizedState=r:hm(s,Ct.memoizedState,r)},useTransition:function(){var r=Ec(hi)[0],s=Mn().memoizedState;return[r,s]},useMutableSource:Jh,useSyncExternalStore:Zh,useId:mm,unstable_isNewReconciler:!1};function Yn(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 Pc(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 ql={isMounted:function(r){return(r=r._reactInternals)?No(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=tn(),g=uo(r),v=Lr(f,g);v.payload=s,u!=null&&(v.callback=u),s=so(r,v,g),s!==null&&(Jn(s,r,g,f),zl(s,r,g))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=tn(),g=uo(r),v=Lr(f,g);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=so(r,v,g),s!==null&&(Jn(s,r,g,f),zl(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=tn(),f=uo(r),g=Lr(u,f);g.tag=2,s!=null&&(g.callback=s),s=so(r,g,f),s!==null&&(Jn(s,r,f,u),zl(s,r,f))}};function vm(r,s,u,f,g,v,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,v,j):s.prototype&&s.prototype.isPureReactComponent?!ti(u,f)||!ti(g,v):!0}function bm(r,s,u){var f=!1,g=no,v=s.contextType;return typeof v=="object"&&v!==null?v=On(v):(g=an(s)?Ro:qt.current,f=s.contextTypes,v=(f=f!=null)?rs(r,g):no),s=new s(u,v),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ql,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=v),s}function wm(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&&ql.enqueueReplaceState(s,s.state,null)}function Ac(r,s,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},xc(r);var v=s.contextType;typeof v=="object"&&v!==null?g.context=On(v):(v=an(s)?Ro:qt.current,g.context=rs(r,v)),g.state=r.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Pc(r,s,v,u),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&ql.enqueueReplaceState(g,g.state,null),Fl(r,u,g,f),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function ds(r,s){try{var u="",f=s;do u+=fe(f),f=f.return;while(f);var g=u}catch(v){g=`
39
+ Error generating stack: `+v.message+`
40
+ `+v.stack}return{value:r,source:s,stack:g,digest:null}}function Dc(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Ic(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var dk=typeof WeakMap=="function"?WeakMap:Map;function km(r,s,u){u=Lr(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){Zl||(Zl=!0,Kc=f),Ic(r,s)},u}function Sm(r,s,u){u=Lr(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;u.payload=function(){return f(g)},u.callback=function(){Ic(r,s)}}var v=r.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(u.callback=function(){Ic(r,s),typeof f!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})}),u}function jm(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new dk;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(u)||(g.add(u),r=Ck.bind(null,r,s,u),s.then(r,r))}function Cm(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 Nm(r,s,u,f,g){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=Lr(-1,1),s.tag=2,so(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var fk=M.ReactCurrentOwner,un=!1;function en(r,s,u,f){s.child=r===null?qh(s,null,u,f):ls(s,r.child,u,f)}function Em(r,s,u,f,g){u=u.render;var v=s.ref;return us(s,g),f=jc(r,s,u,f,v,g),u=Cc(),r!==null&&!un?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Or(r,s,g)):(et&&u&&lc(s),s.flags|=1,en(r,s,f,g),s.child)}function Rm(r,s,u,f,g){if(r===null){var v=u.type;return typeof v=="function"&&!td(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=v,Tm(r,s,v,f,g)):(r=sa(u.type,null,f,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(v=r.child,(r.lanes&g)===0){var j=v.memoizedProps;if(u=u.compare,u=u!==null?u:ti,u(j,f)&&r.ref===s.ref)return Or(r,s,g)}return s.flags|=1,r=fo(v,f),r.ref=s.ref,r.return=s,s.child=r}function Tm(r,s,u,f,g){if(r!==null){var v=r.memoizedProps;if(ti(v,f)&&r.ref===s.ref)if(un=!1,s.pendingProps=f=v,(r.lanes&g)!==0)(r.flags&131072)!==0&&(un=!0);else return s.lanes=r.lanes,Or(r,s,g)}return Lc(r,s,u,f,g)}function Pm(r,s,u){var f=s.pendingProps,g=f.children,v=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(ps,jn),jn|=u;else{if((u&1073741824)===0)return r=v!==null?v.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,qe(ps,jn),jn|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:u,qe(ps,jn),jn|=f}else v!==null?(f=v.baseLanes|u,s.memoizedState=null):f=u,qe(ps,jn),jn|=f;return en(r,s,g,u),s.child}function Am(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function Lc(r,s,u,f,g){var v=an(u)?Ro:qt.current;return v=rs(s,v),us(s,g),u=jc(r,s,u,f,v,g),f=Cc(),r!==null&&!un?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Or(r,s,g)):(et&&f&&lc(s),s.flags|=1,en(r,s,u,g),s.child)}function Dm(r,s,u,f,g){if(an(u)){var v=!0;Pl(s)}else v=!1;if(us(s,g),s.stateNode===null)Kl(r,s),bm(s,u,f),Ac(s,u,f,g),f=!0;else if(r===null){var j=s.stateNode,O=s.memoizedProps;j.props=O;var F=j.context,Y=u.contextType;typeof Y=="object"&&Y!==null?Y=On(Y):(Y=an(u)?Ro:qt.current,Y=rs(s,Y));var oe=u.getDerivedStateFromProps,le=typeof oe=="function"||typeof j.getSnapshotBeforeUpdate=="function";le||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==f||F!==Y)&&wm(s,j,f,Y),oo=!1;var ne=s.memoizedState;j.state=ne,Fl(s,f,j,g),F=s.memoizedState,O!==f||ne!==F||ln.current||oo?(typeof oe=="function"&&(Pc(s,u,oe,f),F=s.memoizedState),(O=oo||vm(s,u,O,f,ne,F,Y))?(le||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=F),j.props=f,j.state=F,j.context=Y,f=O):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{j=s.stateNode,Kh(r,s),O=s.memoizedProps,Y=s.type===s.elementType?O:Yn(s.type,O),j.props=Y,le=s.pendingProps,ne=j.context,F=u.contextType,typeof F=="object"&&F!==null?F=On(F):(F=an(u)?Ro:qt.current,F=rs(s,F));var pe=u.getDerivedStateFromProps;(oe=typeof pe=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==le||ne!==F)&&wm(s,j,f,F),oo=!1,ne=s.memoizedState,j.state=ne,Fl(s,f,j,g);var me=s.memoizedState;O!==le||ne!==me||ln.current||oo?(typeof pe=="function"&&(Pc(s,u,pe,f),me=s.memoizedState),(Y=oo||vm(s,u,Y,f,ne,me,F)||!1)?(oe||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(f,me,F),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(f,me,F)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=me),j.props=f,j.state=me,j.context=F,f=Y):(typeof j.componentDidUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(s.flags|=1024),f=!1)}return Oc(r,s,u,f,v,g)}function Oc(r,s,u,f,g,v){Am(r,s);var j=(s.flags&128)!==0;if(!f&&!j)return g&&_h(s,u,!1),Or(r,s,v);f=s.stateNode,fk.current=s;var O=j&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&j?(s.child=ls(s,r.child,null,v),s.child=ls(s,null,O,v)):en(r,s,O,v),s.memoizedState=f.state,g&&_h(s,u,!0),s.child}function Im(r){var s=r.stateNode;s.pendingContext?Oh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Oh(r,s.context,!1),yc(r,s.containerInfo)}function Lm(r,s,u,f,g){return is(),dc(g),s.flags|=256,en(r,s,u,f),s.child}var Mc={dehydrated:null,treeContext:null,retryLane:0};function _c(r){return{baseLanes:r,cachePool:null,transitions:null}}function Om(r,s,u){var f=s.pendingProps,g=ot.current,v=!1,j=(s.flags&128)!==0,O;if((O=j)||(O=r!==null&&r.memoizedState===null?!1:(g&2)!==0),O?(v=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),qe(ot,g&1),r===null)return cc(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):(j=f.children,r=f.fallback,v?(f=s.mode,v=s.child,j={mode:"hidden",children:j},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=j):v=ia(j,f,0,null),r=zo(r,f,u,null),v.return=s,r.return=s,v.sibling=r,s.child=v,s.child.memoizedState=_c(u),s.memoizedState=Mc,r):zc(s,j));if(g=r.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return pk(r,s,j,f,O,g,u);if(v){v=f.fallback,j=s.mode,g=r.child,O=g.sibling;var F={mode:"hidden",children:f.children};return(j&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=F,s.deletions=null):(f=fo(g,F),f.subtreeFlags=g.subtreeFlags&14680064),O!==null?v=fo(O,v):(v=zo(v,j,u,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,j=r.child.memoizedState,j=j===null?_c(u):{baseLanes:j.baseLanes|u,cachePool:null,transitions:j.transitions},v.memoizedState=j,v.childLanes=r.childLanes&~u,s.memoizedState=Mc,f}return v=r.child,r=v.sibling,f=fo(v,{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 zc(r,s){return s=ia({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function Gl(r,s,u,f){return f!==null&&dc(f),ls(s,r.child,null,u),r=zc(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function pk(r,s,u,f,g,v,j){if(u)return s.flags&256?(s.flags&=-257,f=Dc(Error(n(422))),Gl(r,s,j,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=ia({mode:"visible",children:f.children},g,0,null),v=zo(v,g,j,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&ls(s,r.child,null,j),s.child.memoizedState=_c(j),s.memoizedState=Mc,v);if((s.mode&1)===0)return Gl(r,s,j,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var O=f.dgst;return f=O,v=Error(n(419)),f=Dc(v,f,void 0),Gl(r,s,j,f)}if(O=(j&r.childLanes)!==0,un||O){if(f=It,f!==null){switch(j&-j){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|j))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ir(r,g),Jn(f,r,g,-1))}return ed(),f=Dc(Error(n(421))),Gl(r,s,j,f)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=Nk.bind(null,r),g._reactRetry=s,null):(r=v.treeContext,Sn=eo(g.nextSibling),kn=s,et=!0,Kn=null,r!==null&&(In[Ln++]=Ar,In[Ln++]=Dr,In[Ln++]=To,Ar=r.id,Dr=r.overflow,To=s),s=zc(s,f.children),s.flags|=4096,s)}function Mm(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),mc(r.return,s,u)}function Fc(r,s,u,f,g){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=u,v.tailMode=g)}function _m(r,s,u){var f=s.pendingProps,g=f.revealOrder,v=f.tail;if(en(r,s,f.children,u),f=ot.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&&Mm(r,u,s);else if(r.tag===19)Mm(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(qe(ot,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(u=s.child,g=null;u!==null;)r=u.alternate,r!==null&&$l(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),Fc(s,!1,g,u,v);break;case"backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&$l(r)===null){s.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}Fc(s,!0,u,null,v);break;case"together":Fc(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Kl(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Or(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),Lo|=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=fo(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=fo(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function hk(r,s,u){switch(s.tag){case 3:Im(s),is();break;case 5:Qh(s);break;case 1:an(s.type)&&Pl(s);break;case 4:yc(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;qe(Ml,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(qe(ot,ot.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?Om(r,s,u):(qe(ot,ot.current&1),r=Or(r,s,u),r!==null?r.sibling:null);qe(ot,ot.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return _m(r,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),qe(ot,ot.current),f)break;return null;case 22:case 23:return s.lanes=0,Pm(r,s,u)}return Or(r,s,u)}var zm,$c,Fm,$m;zm=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}},$c=function(){},Fm=function(r,s,u,f){var g=r.memoizedProps;if(g!==f){r=s.stateNode,Do(dr.current);var v=null;switch(u){case"input":g=yt(r,g),f=yt(r,f),v=[];break;case"select":g=E({},g,{value:void 0}),f=E({},f,{value:void 0}),v=[];break;case"textarea":g=An(r,g),f=An(r,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=El)}He(u,f);var j;u=null;for(Y in g)if(!f.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(j in O)O.hasOwnProperty(j)&&(u||(u={}),u[j]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(i.hasOwnProperty(Y)?v||(v=[]):(v=v||[]).push(Y,null));for(Y in f){var F=f[Y];if(O=g!=null?g[Y]:void 0,f.hasOwnProperty(Y)&&F!==O&&(F!=null||O!=null))if(Y==="style")if(O){for(j in O)!O.hasOwnProperty(j)||F&&F.hasOwnProperty(j)||(u||(u={}),u[j]="");for(j in F)F.hasOwnProperty(j)&&O[j]!==F[j]&&(u||(u={}),u[j]=F[j])}else u||(v||(v=[]),v.push(Y,u)),u=F;else Y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,O=O?O.__html:void 0,F!=null&&O!==F&&(v=v||[]).push(Y,F)):Y==="children"?typeof F!="string"&&typeof F!="number"||(v=v||[]).push(Y,""+F):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(i.hasOwnProperty(Y)?(F!=null&&Y==="onScroll"&&Ye("scroll",r),v||O===F||(v=[])):(v=v||[]).push(Y,F))}u&&(v=v||[]).push("style",u);var Y=v;(s.updateQueue=Y)&&(s.flags|=4)}},$m=function(r,s,u,f){u!==f&&(s.flags|=4)};function gi(r,s){if(!et)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 Kt(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(s)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=f,r.childLanes=u,s}function mk(r,s,u){var f=s.pendingProps;switch(ac(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(s),null;case 1:return an(s.type)&&Tl(),Kt(s),null;case 3:return f=s.stateNode,cs(),Xe(ln),Xe(qt),wc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(Ll(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Kn!==null&&(Qc(Kn),Kn=null))),$c(r,s),Kt(s),null;case 5:vc(s);var g=Do(di.current);if(u=s.type,r!==null&&s.stateNode!=null)Fm(r,s,u,f,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return Kt(s),null}if(r=Do(dr.current),Ll(s)){f=s.stateNode,u=s.type;var v=s.memoizedProps;switch(f[cr]=s,f[ii]=v,r=(s.mode&1)!==0,u){case"dialog":Ye("cancel",f),Ye("close",f);break;case"iframe":case"object":case"embed":Ye("load",f);break;case"video":case"audio":for(g=0;g<ri.length;g++)Ye(ri[g],f);break;case"source":Ye("error",f);break;case"img":case"image":case"link":Ye("error",f),Ye("load",f);break;case"details":Ye("toggle",f);break;case"input":$t(f,v),Ye("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},Ye("invalid",f);break;case"textarea":vt(f,v),Ye("invalid",f)}He(u,v),g=null;for(var j in v)if(v.hasOwnProperty(j)){var O=v[j];j==="children"?typeof O=="string"?f.textContent!==O&&(v.suppressHydrationWarning!==!0&&Nl(f.textContent,O,r),g=["children",O]):typeof O=="number"&&f.textContent!==""+O&&(v.suppressHydrationWarning!==!0&&Nl(f.textContent,O,r),g=["children",""+O]):i.hasOwnProperty(j)&&O!=null&&j==="onScroll"&&Ye("scroll",f)}switch(u){case"input":Ue(f),vn(f,v,!0);break;case"textarea":Ue(f),lr(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=El)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{j=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ee(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=j.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=j.createElement(u,{is:f.is}):(r=j.createElement(u),u==="select"&&(j=r,f.multiple?j.multiple=!0:f.size&&(j.size=f.size))):r=j.createElementNS(r,u),r[cr]=s,r[ii]=f,zm(r,s,!1,!1),s.stateNode=r;e:{switch(j=Ve(u,f),u){case"dialog":Ye("cancel",r),Ye("close",r),g=f;break;case"iframe":case"object":case"embed":Ye("load",r),g=f;break;case"video":case"audio":for(g=0;g<ri.length;g++)Ye(ri[g],r);g=f;break;case"source":Ye("error",r),g=f;break;case"img":case"image":case"link":Ye("error",r),Ye("load",r),g=f;break;case"details":Ye("toggle",r),g=f;break;case"input":$t(r,f),g=yt(r,f),Ye("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=E({},f,{value:void 0}),Ye("invalid",r);break;case"textarea":vt(r,f),g=An(r,f),Ye("invalid",r);break;default:g=f}He(u,g),O=g;for(v in O)if(O.hasOwnProperty(v)){var F=O[v];v==="style"?on(r,F):v==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Ne(r,F)):v==="children"?typeof F=="string"?(u!=="textarea"||F!=="")&&U(r,F):typeof F=="number"&&U(r,""+F):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?F!=null&&v==="onScroll"&&Ye("scroll",r):F!=null&&P(r,v,F,j))}switch(u){case"input":Ue(r),vn(r,f,!1);break;case"textarea":Ue(r),lr(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Se(f.value));break;case"select":r.multiple=!!f.multiple,v=f.value,v!=null?Jt(r,!!f.multiple,v,!1):f.defaultValue!=null&&Jt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=El)}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 Kt(s),null;case 6:if(r&&s.stateNode!=null)$m(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=Do(di.current),Do(dr.current),Ll(s)){if(f=s.stateNode,u=s.memoizedProps,f[cr]=s,(v=f.nodeValue!==u)&&(r=kn,r!==null))switch(r.tag){case 3:Nl(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Nl(f.nodeValue,u,(r.mode&1)!==0)}v&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[cr]=s,s.stateNode=f}return Kt(s),null;case 13:if(Xe(ot),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(et&&Sn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Hh(),is(),s.flags|=98560,v=!1;else if(v=Ll(s),f!==null&&f.dehydrated!==null){if(r===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[cr]=s}else is(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),v=!1}else Kn!==null&&(Qc(Kn),Kn=null),v=!0;if(!v)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||(ot.current&1)!==0?Nt===0&&(Nt=3):ed())),s.updateQueue!==null&&(s.flags|=4),Kt(s),null);case 4:return cs(),$c(r,s),r===null&&oi(s.stateNode.containerInfo),Kt(s),null;case 10:return hc(s.type._context),Kt(s),null;case 17:return an(s.type)&&Tl(),Kt(s),null;case 19:if(Xe(ot),v=s.memoizedState,v===null)return Kt(s),null;if(f=(s.flags&128)!==0,j=v.rendering,j===null)if(f)gi(v,!1);else{if(Nt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(j=$l(r),j!==null){for(s.flags|=128,gi(v,!1),f=j.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=u,u=s.child;u!==null;)v=u,r=f,v.flags&=14680066,j=v.alternate,j===null?(v.childLanes=0,v.lanes=r,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=j.childLanes,v.lanes=j.lanes,v.child=j.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=j.memoizedProps,v.memoizedState=j.memoizedState,v.updateQueue=j.updateQueue,v.type=j.type,r=j.dependencies,v.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return qe(ot,ot.current&1|2),s.child}r=r.sibling}v.tail!==null&&mt()>hs&&(s.flags|=128,f=!0,gi(v,!1),s.lanes=4194304)}else{if(!f)if(r=$l(j),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),gi(v,!0),v.tail===null&&v.tailMode==="hidden"&&!j.alternate&&!et)return Kt(s),null}else 2*mt()-v.renderingStartTime>hs&&u!==1073741824&&(s.flags|=128,f=!0,gi(v,!1),s.lanes=4194304);v.isBackwards?(j.sibling=s.child,s.child=j):(u=v.last,u!==null?u.sibling=j:s.child=j,v.last=j)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=mt(),s.sibling=null,u=ot.current,qe(ot,f?u&1|2:u&1),s):(Kt(s),null);case 22:case 23:return Zc(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(jn&1073741824)!==0&&(Kt(s),s.subtreeFlags&6&&(s.flags|=8192)):Kt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function gk(r,s){switch(ac(s),s.tag){case 1:return an(s.type)&&Tl(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return cs(),Xe(ln),Xe(qt),wc(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return vc(s),null;case 13:if(Xe(ot),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));is()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Xe(ot),null;case 4:return cs(),null;case 10:return hc(s.type._context),null;case 22:case 23:return Zc(),null;case 24:return null;default:return null}}var Yl=!1,Yt=!1,xk=typeof WeakSet=="function"?WeakSet:Set,he=null;function fs(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){ct(r,s,f)}else u.current=null}function Bc(r,s,u){try{u()}catch(f){ct(r,s,f)}}var Bm=!1;function yk(r,s){if(Zu=ml,r=vh(),Vu(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 g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var j=0,O=-1,F=-1,Y=0,oe=0,le=r,ne=null;t:for(;;){for(var pe;le!==u||g!==0&&le.nodeType!==3||(O=j+g),le!==v||f!==0&&le.nodeType!==3||(F=j+f),le.nodeType===3&&(j+=le.nodeValue.length),(pe=le.firstChild)!==null;)ne=le,le=pe;for(;;){if(le===r)break t;if(ne===u&&++Y===g&&(O=j),ne===v&&++oe===f&&(F=j),(pe=le.nextSibling)!==null)break;le=ne,ne=le.parentNode}le=pe}u=O===-1||F===-1?null:{start:O,end:F}}else u=null}u=u||{start:0,end:0}}else u=null;for(ec={focusedElem:r,selectionRange:u},ml=!1,he=s;he!==null;)if(s=he,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,he=r;else for(;he!==null;){s=he;try{var me=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ge=me.memoizedProps,gt=me.memoizedState,V=s.stateNode,H=V.getSnapshotBeforeUpdate(s.elementType===s.type?ge:Yn(s.type,ge),gt);V.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var G=s.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){ct(s,s.return,de)}if(r=s.sibling,r!==null){r.return=s.return,he=r;break}he=s.return}return me=Bm,Bm=!1,me}function xi(r,s,u){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&r)===r){var v=g.destroy;g.destroy=void 0,v!==void 0&&Bc(s,u,v)}g=g.next}while(g!==f)}}function Xl(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 Uc(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 Um(r){var s=r.alternate;s!==null&&(r.alternate=null,Um(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[cr],delete s[ii],delete s[oc],delete s[ek],delete s[tk])),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 Hm(r){return r.tag===5||r.tag===3||r.tag===4}function Wm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Hm(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 Hc(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=El));else if(f!==4&&(r=r.child,r!==null))for(Hc(r,s,u),r=r.sibling;r!==null;)Hc(r,s,u),r=r.sibling}function Wc(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(Wc(r,s,u),r=r.sibling;r!==null;)Wc(r,s,u),r=r.sibling}var zt=null,Xn=!1;function io(r,s,u){for(u=u.child;u!==null;)Vm(r,s,u),u=u.sibling}function Vm(r,s,u){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(ul,u)}catch{}switch(u.tag){case 5:Yt||fs(u,s);case 6:var f=zt,g=Xn;zt=null,io(r,s,u),zt=f,Xn=g,zt!==null&&(Xn?(r=zt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):zt.removeChild(u.stateNode));break;case 18:zt!==null&&(Xn?(r=zt,u=u.stateNode,r.nodeType===8?rc(r.parentNode,u):r.nodeType===1&&rc(r,u),Ys(r)):rc(zt,u.stateNode));break;case 4:f=zt,g=Xn,zt=u.stateNode.containerInfo,Xn=!0,io(r,s,u),zt=f,Xn=g;break;case 0:case 11:case 14:case 15:if(!Yt&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,j=v.destroy;v=v.tag,j!==void 0&&((v&2)!==0||(v&4)!==0)&&Bc(u,s,j),g=g.next}while(g!==f)}io(r,s,u);break;case 1:if(!Yt&&(fs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(O){ct(u,s,O)}io(r,s,u);break;case 21:io(r,s,u);break;case 22:u.mode&1?(Yt=(f=Yt)||u.memoizedState!==null,io(r,s,u),Yt=f):io(r,s,u);break;default:io(r,s,u)}}function qm(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new xk),s.forEach(function(f){var g=Ek.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Qn(r,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f];try{var v=r,j=s,O=j;e:for(;O!==null;){switch(O.tag){case 5:zt=O.stateNode,Xn=!1;break e;case 3:zt=O.stateNode.containerInfo,Xn=!0;break e;case 4:zt=O.stateNode.containerInfo,Xn=!0;break e}O=O.return}if(zt===null)throw Error(n(160));Vm(v,j,g),zt=null,Xn=!1;var F=g.alternate;F!==null&&(F.return=null),g.return=null}catch(Y){ct(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Gm(s,r),s=s.sibling}function Gm(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Qn(s,r),pr(r),f&4){try{xi(3,r,r.return),Xl(3,r)}catch(ge){ct(r,r.return,ge)}try{xi(5,r,r.return)}catch(ge){ct(r,r.return,ge)}}break;case 1:Qn(s,r),pr(r),f&512&&u!==null&&fs(u,u.return);break;case 5:if(Qn(s,r),pr(r),f&512&&u!==null&&fs(u,u.return),r.flags&32){var g=r.stateNode;try{U(g,"")}catch(ge){ct(r,r.return,ge)}}if(f&4&&(g=r.stateNode,g!=null)){var v=r.memoizedProps,j=u!==null?u.memoizedProps:v,O=r.type,F=r.updateQueue;if(r.updateQueue=null,F!==null)try{O==="input"&&v.type==="radio"&&v.name!=null&&Bt(g,v),Ve(O,j);var Y=Ve(O,v);for(j=0;j<F.length;j+=2){var oe=F[j],le=F[j+1];oe==="style"?on(g,le):oe==="dangerouslySetInnerHTML"?Ne(g,le):oe==="children"?U(g,le):P(g,oe,le,Y)}switch(O){case"input":_t(g,v);break;case"textarea":Nr(g,v);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var pe=v.value;pe!=null?Jt(g,!!v.multiple,pe,!1):ne!==!!v.multiple&&(v.defaultValue!=null?Jt(g,!!v.multiple,v.defaultValue,!0):Jt(g,!!v.multiple,v.multiple?[]:"",!1))}g[ii]=v}catch(ge){ct(r,r.return,ge)}}break;case 6:if(Qn(s,r),pr(r),f&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,v=r.memoizedProps;try{g.nodeValue=v}catch(ge){ct(r,r.return,ge)}}break;case 3:if(Qn(s,r),pr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Ys(s.containerInfo)}catch(ge){ct(r,r.return,ge)}break;case 4:Qn(s,r),pr(r);break;case 13:Qn(s,r),pr(r),g=r.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(Gc=mt())),f&4&&qm(r);break;case 22:if(oe=u!==null&&u.memoizedState!==null,r.mode&1?(Yt=(Y=Yt)||oe,Qn(s,r),Yt=Y):Qn(s,r),pr(r),f&8192){if(Y=r.memoizedState!==null,(r.stateNode.isHidden=Y)&&!oe&&(r.mode&1)!==0)for(he=r,oe=r.child;oe!==null;){for(le=he=oe;he!==null;){switch(ne=he,pe=ne.child,ne.tag){case 0:case 11:case 14:case 15:xi(4,ne,ne.return);break;case 1:fs(ne,ne.return);var me=ne.stateNode;if(typeof me.componentWillUnmount=="function"){f=ne,u=ne.return;try{s=f,me.props=s.memoizedProps,me.state=s.memoizedState,me.componentWillUnmount()}catch(ge){ct(f,u,ge)}}break;case 5:fs(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Xm(le);continue}}pe!==null?(pe.return=ne,he=pe):Xm(le)}oe=oe.sibling}e:for(oe=null,le=r;;){if(le.tag===5){if(oe===null){oe=le;try{g=le.stateNode,Y?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(O=le.stateNode,F=le.memoizedProps.style,j=F!=null&&F.hasOwnProperty("display")?F.display:null,O.style.display=ze("display",j))}catch(ge){ct(r,r.return,ge)}}}else if(le.tag===6){if(oe===null)try{le.stateNode.nodeValue=Y?"":le.memoizedProps}catch(ge){ct(r,r.return,ge)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===r)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===r)break e;for(;le.sibling===null;){if(le.return===null||le.return===r)break e;oe===le&&(oe=null),le=le.return}oe===le&&(oe=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:Qn(s,r),pr(r),f&4&&qm(r);break;case 21:break;default:Qn(s,r),pr(r)}}function pr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(Hm(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(U(g,""),f.flags&=-33);var v=Wm(r);Wc(r,v,g);break;case 3:case 4:var j=f.stateNode.containerInfo,O=Wm(r);Hc(r,O,j);break;default:throw Error(n(161))}}catch(F){ct(r,r.return,F)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function vk(r,s,u){he=r,Km(r)}function Km(r,s,u){for(var f=(r.mode&1)!==0;he!==null;){var g=he,v=g.child;if(g.tag===22&&f){var j=g.memoizedState!==null||Yl;if(!j){var O=g.alternate,F=O!==null&&O.memoizedState!==null||Yt;O=Yl;var Y=Yt;if(Yl=j,(Yt=F)&&!Y)for(he=g;he!==null;)j=he,F=j.child,j.tag===22&&j.memoizedState!==null?Qm(g):F!==null?(F.return=j,he=F):Qm(g);for(;v!==null;)he=v,Km(v),v=v.sibling;he=g,Yl=O,Yt=Y}Ym(r)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,he=v):Ym(r)}}function Ym(r){for(;he!==null;){var s=he;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Yt||Xl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!Yt)if(u===null)f.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:Yn(s.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&Xh(s,v,f);break;case 3:var j=s.updateQueue;if(j!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}Xh(s,j,u)}break;case 5:var O=s.stateNode;if(u===null&&s.flags&4){u=O;var F=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&u.focus();break;case"img":F.src&&(u.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var oe=Y.memoizedState;if(oe!==null){var le=oe.dehydrated;le!==null&&Ys(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Yt||s.flags&512&&Uc(s)}catch(ne){ct(s,s.return,ne)}}if(s===r){he=null;break}if(u=s.sibling,u!==null){u.return=s.return,he=u;break}he=s.return}}function Xm(r){for(;he!==null;){var s=he;if(s===r){he=null;break}var u=s.sibling;if(u!==null){u.return=s.return,he=u;break}he=s.return}}function Qm(r){for(;he!==null;){var s=he;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Xl(4,s)}catch(F){ct(s,u,F)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(F){ct(s,g,F)}}var v=s.return;try{Uc(s)}catch(F){ct(s,v,F)}break;case 5:var j=s.return;try{Uc(s)}catch(F){ct(s,j,F)}}}catch(F){ct(s,s.return,F)}if(s===r){he=null;break}var O=s.sibling;if(O!==null){O.return=s.return,he=O;break}he=s.return}}var bk=Math.ceil,Ql=M.ReactCurrentDispatcher,Vc=M.ReactCurrentOwner,_n=M.ReactCurrentBatchConfig,_e=0,It=null,bt=null,Ft=0,jn=0,ps=to(0),Nt=0,yi=null,Lo=0,Jl=0,qc=0,vi=null,cn=null,Gc=0,hs=1/0,Mr=null,Zl=!1,Kc=null,lo=null,ea=!1,ao=null,ta=0,bi=0,Yc=null,na=-1,ra=0;function tn(){return(_e&6)!==0?mt():na!==-1?na:na=mt()}function uo(r){return(r.mode&1)===0?1:(_e&2)!==0&&Ft!==0?Ft&-Ft:rk.transition!==null?(ra===0&&(ra=Wp()),ra):(r=We,r!==0||(r=window.event,r=r===void 0?16:Zp(r.type)),r)}function Jn(r,s,u,f){if(50<bi)throw bi=0,Yc=null,Error(n(185));Ws(r,u,f),((_e&2)===0||r!==It)&&(r===It&&((_e&2)===0&&(Jl|=u),Nt===4&&co(r,Ft)),dn(r,f),u===1&&_e===0&&(s.mode&1)===0&&(hs=mt()+500,Al&&ro()))}function dn(r,s){var u=r.callbackNode;r1(r,s);var f=fl(r,r===It?Ft:0);if(f===0)u!==null&&Bp(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&Bp(u),s===1)r.tag===0?nk(Zm.bind(null,r)):zh(Zm.bind(null,r)),J1(function(){(_e&6)===0&&ro()}),u=null;else{switch(Vp(f)){case 1:u=Ru;break;case 4:u=Up;break;case 16:u=al;break;case 536870912:u=Hp;break;default:u=al}u=lg(u,Jm.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Jm(r,s){if(na=-1,ra=0,(_e&6)!==0)throw Error(n(327));var u=r.callbackNode;if(ms()&&r.callbackNode!==u)return null;var f=fl(r,r===It?Ft:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=oa(r,f);else{s=f;var g=_e;_e|=2;var v=tg();(It!==r||Ft!==s)&&(Mr=null,hs=mt()+500,Mo(r,s));do try{Sk();break}catch(O){eg(r,O)}while(!0);pc(),Ql.current=v,_e=g,bt!==null?s=0:(It=null,Ft=0,s=Nt)}if(s!==0){if(s===2&&(g=Tu(r),g!==0&&(f=g,s=Xc(r,g))),s===1)throw u=yi,Mo(r,0),co(r,f),dn(r,mt()),u;if(s===6)co(r,f);else{if(g=r.current.alternate,(f&30)===0&&!wk(g)&&(s=oa(r,f),s===2&&(v=Tu(r),v!==0&&(f=v,s=Xc(r,v))),s===1))throw u=yi,Mo(r,0),co(r,f),dn(r,mt()),u;switch(r.finishedWork=g,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:_o(r,cn,Mr);break;case 3:if(co(r,f),(f&130023424)===f&&(s=Gc+500-mt(),10<s)){if(fl(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){tn(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=nc(_o.bind(null,r,cn,Mr),s);break}_o(r,cn,Mr);break;case 4:if(co(r,f),(f&4194240)===f)break;for(s=r.eventTimes,g=-1;0<f;){var j=31-qn(f);v=1<<j,j=s[j],j>g&&(g=j),f&=~v}if(f=g,f=mt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*bk(f/1960))-f,10<f){r.timeoutHandle=nc(_o.bind(null,r,cn,Mr),f);break}_o(r,cn,Mr);break;case 5:_o(r,cn,Mr);break;default:throw Error(n(329))}}}return dn(r,mt()),r.callbackNode===u?Jm.bind(null,r):null}function Xc(r,s){var u=vi;return r.current.memoizedState.isDehydrated&&(Mo(r,s).flags|=256),r=oa(r,s),r!==2&&(s=cn,cn=u,s!==null&&Qc(s)),r}function Qc(r){cn===null?cn=r:cn.push.apply(cn,r)}function wk(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 g=u[f],v=g.getSnapshot;g=g.value;try{if(!Gn(v(),g))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 co(r,s){for(s&=~qc,s&=~Jl,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-qn(s),f=1<<u;r[u]=-1,s&=~f}}function Zm(r){if((_e&6)!==0)throw Error(n(327));ms();var s=fl(r,0);if((s&1)===0)return dn(r,mt()),null;var u=oa(r,s);if(r.tag!==0&&u===2){var f=Tu(r);f!==0&&(s=f,u=Xc(r,f))}if(u===1)throw u=yi,Mo(r,0),co(r,s),dn(r,mt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,_o(r,cn,Mr),dn(r,mt()),null}function Jc(r,s){var u=_e;_e|=1;try{return r(s)}finally{_e=u,_e===0&&(hs=mt()+500,Al&&ro())}}function Oo(r){ao!==null&&ao.tag===0&&(_e&6)===0&&ms();var s=_e;_e|=1;var u=_n.transition,f=We;try{if(_n.transition=null,We=1,r)return r()}finally{We=f,_n.transition=u,_e=s,(_e&6)===0&&ro()}}function Zc(){jn=ps.current,Xe(ps)}function Mo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Q1(u)),bt!==null)for(u=bt.return;u!==null;){var f=u;switch(ac(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Tl();break;case 3:cs(),Xe(ln),Xe(qt),wc();break;case 5:vc(f);break;case 4:cs();break;case 13:Xe(ot);break;case 19:Xe(ot);break;case 10:hc(f.type._context);break;case 22:case 23:Zc()}u=u.return}if(It=r,bt=r=fo(r.current,null),Ft=jn=s,Nt=0,yi=null,qc=Jl=Lo=0,cn=vi=null,Ao!==null){for(s=0;s<Ao.length;s++)if(u=Ao[s],f=u.interleaved,f!==null){u.interleaved=null;var g=f.next,v=u.pending;if(v!==null){var j=v.next;v.next=g,f.next=j}u.pending=f}Ao=null}return r}function eg(r,s){do{var u=bt;try{if(pc(),Bl.current=Vl,Ul){for(var f=st.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}Ul=!1}if(Io=0,Dt=Ct=st=null,fi=!1,pi=0,Vc.current=null,u===null||u.return===null){Nt=1,yi=s,bt=null;break}e:{var v=r,j=u.return,O=u,F=s;if(s=Ft,O.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var Y=F,oe=O,le=oe.tag;if((oe.mode&1)===0&&(le===0||le===11||le===15)){var ne=oe.alternate;ne?(oe.updateQueue=ne.updateQueue,oe.memoizedState=ne.memoizedState,oe.lanes=ne.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var pe=Cm(j);if(pe!==null){pe.flags&=-257,Nm(pe,j,O,v,s),pe.mode&1&&jm(v,Y,s),s=pe,F=Y;var me=s.updateQueue;if(me===null){var ge=new Set;ge.add(F),s.updateQueue=ge}else me.add(F);break e}else{if((s&1)===0){jm(v,Y,s),ed();break e}F=Error(n(426))}}else if(et&&O.mode&1){var gt=Cm(j);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),Nm(gt,j,O,v,s),dc(ds(F,O));break e}}v=F=ds(F,O),Nt!==4&&(Nt=2),vi===null?vi=[v]:vi.push(v),v=j;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var V=km(v,F,s);Yh(v,V);break e;case 1:O=F;var H=v.type,G=v.stateNode;if((v.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(lo===null||!lo.has(G)))){v.flags|=65536,s&=-s,v.lanes|=s;var de=Sm(v,O,s);Yh(v,de);break e}}v=v.return}while(v!==null)}rg(u)}catch(xe){s=xe,bt===u&&u!==null&&(bt=u=u.return);continue}break}while(!0)}function tg(){var r=Ql.current;return Ql.current=Vl,r===null?Vl:r}function ed(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),It===null||(Lo&268435455)===0&&(Jl&268435455)===0||co(It,Ft)}function oa(r,s){var u=_e;_e|=2;var f=tg();(It!==r||Ft!==s)&&(Mr=null,Mo(r,s));do try{kk();break}catch(g){eg(r,g)}while(!0);if(pc(),_e=u,Ql.current=f,bt!==null)throw Error(n(261));return It=null,Ft=0,Nt}function kk(){for(;bt!==null;)ng(bt)}function Sk(){for(;bt!==null&&!Kw();)ng(bt)}function ng(r){var s=ig(r.alternate,r,jn);r.memoizedProps=r.pendingProps,s===null?rg(r):bt=s,Vc.current=null}function rg(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=mk(u,s,jn),u!==null){bt=u;return}}else{if(u=gk(u,s),u!==null){u.flags&=32767,bt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Nt=6,bt=null;return}}if(s=s.sibling,s!==null){bt=s;return}bt=s=r}while(s!==null);Nt===0&&(Nt=5)}function _o(r,s,u){var f=We,g=_n.transition;try{_n.transition=null,We=1,jk(r,s,u,f)}finally{_n.transition=g,We=f}return null}function jk(r,s,u,f){do ms();while(ao!==null);if((_e&6)!==0)throw Error(n(327));u=r.finishedWork;var g=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 v=u.lanes|u.childLanes;if(o1(r,v),r===It&&(bt=It=null,Ft=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ea||(ea=!0,lg(al,function(){return ms(),null})),v=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||v){v=_n.transition,_n.transition=null;var j=We;We=1;var O=_e;_e|=4,Vc.current=null,yk(r,u),Gm(u,r),W1(ec),ml=!!Zu,ec=Zu=null,r.current=u,vk(u),Yw(),_e=O,We=j,_n.transition=v}else r.current=u;if(ea&&(ea=!1,ao=r,ta=g),v=r.pendingLanes,v===0&&(lo=null),Jw(u.stateNode),dn(r,mt()),s!==null)for(f=r.onRecoverableError,u=0;u<s.length;u++)g=s[u],f(g.value,{componentStack:g.stack,digest:g.digest});if(Zl)throw Zl=!1,r=Kc,Kc=null,r;return(ta&1)!==0&&r.tag!==0&&ms(),v=r.pendingLanes,(v&1)!==0?r===Yc?bi++:(bi=0,Yc=r):bi=0,ro(),null}function ms(){if(ao!==null){var r=Vp(ta),s=_n.transition,u=We;try{if(_n.transition=null,We=16>r?16:r,ao===null)var f=!1;else{if(r=ao,ao=null,ta=0,(_e&6)!==0)throw Error(n(331));var g=_e;for(_e|=4,he=r.current;he!==null;){var v=he,j=v.child;if((he.flags&16)!==0){var O=v.deletions;if(O!==null){for(var F=0;F<O.length;F++){var Y=O[F];for(he=Y;he!==null;){var oe=he;switch(oe.tag){case 0:case 11:case 15:xi(8,oe,v)}var le=oe.child;if(le!==null)le.return=oe,he=le;else for(;he!==null;){oe=he;var ne=oe.sibling,pe=oe.return;if(Um(oe),oe===Y){he=null;break}if(ne!==null){ne.return=pe,he=ne;break}he=pe}}}var me=v.alternate;if(me!==null){var ge=me.child;if(ge!==null){me.child=null;do{var gt=ge.sibling;ge.sibling=null,ge=gt}while(ge!==null)}}he=v}}if((v.subtreeFlags&2064)!==0&&j!==null)j.return=v,he=j;else e:for(;he!==null;){if(v=he,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:xi(9,v,v.return)}var V=v.sibling;if(V!==null){V.return=v.return,he=V;break e}he=v.return}}var H=r.current;for(he=H;he!==null;){j=he;var G=j.child;if((j.subtreeFlags&2064)!==0&&G!==null)G.return=j,he=G;else e:for(j=H;he!==null;){if(O=he,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Xl(9,O)}}catch(xe){ct(O,O.return,xe)}if(O===j){he=null;break e}var de=O.sibling;if(de!==null){de.return=O.return,he=de;break e}he=O.return}}if(_e=g,ro(),ur&&typeof ur.onPostCommitFiberRoot=="function")try{ur.onPostCommitFiberRoot(ul,r)}catch{}f=!0}return f}finally{We=u,_n.transition=s}}return!1}function og(r,s,u){s=ds(u,s),s=km(r,s,1),r=so(r,s,1),s=tn(),r!==null&&(Ws(r,1,s),dn(r,s))}function ct(r,s,u){if(r.tag===3)og(r,r,u);else for(;s!==null;){if(s.tag===3){og(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=ds(u,r),r=Sm(s,r,1),s=so(s,r,1),r=tn(),s!==null&&(Ws(s,1,r),dn(s,r));break}}s=s.return}}function Ck(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=tn(),r.pingedLanes|=r.suspendedLanes&u,It===r&&(Ft&u)===u&&(Nt===4||Nt===3&&(Ft&130023424)===Ft&&500>mt()-Gc?Mo(r,0):qc|=u),dn(r,s)}function sg(r,s){s===0&&((r.mode&1)===0?s=1:(s=dl,dl<<=1,(dl&130023424)===0&&(dl=4194304)));var u=tn();r=Ir(r,s),r!==null&&(Ws(r,s,u),dn(r,u))}function Nk(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),sg(r,u)}function Ek(r,s){var u=0;switch(r.tag){case 13:var f=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),sg(r,u)}var ig;ig=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||ln.current)un=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return un=!1,hk(r,s,u);un=(r.flags&131072)!==0}else un=!1,et&&(s.flags&1048576)!==0&&Fh(s,Il,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Kl(r,s),r=s.pendingProps;var g=rs(s,qt.current);us(s,u),g=jc(null,s,f,r,g,u);var v=Cc();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,an(f)?(v=!0,Pl(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,xc(s),g.updater=ql,s.stateNode=g,g._reactInternals=s,Ac(s,f,r,u),s=Oc(null,s,f,!0,v,u)):(s.tag=0,et&&v&&lc(s),en(null,s,g,u),s=s.child),s;case 16:f=s.elementType;e:{switch(Kl(r,s),r=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=Tk(f),r=Yn(f,r),g){case 0:s=Lc(null,s,f,r,u);break e;case 1:s=Dm(null,s,f,r,u);break e;case 11:s=Em(null,s,f,r,u);break e;case 14:s=Rm(null,s,f,Yn(f.type,r),u);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Yn(f,g),Lc(r,s,f,g,u);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Yn(f,g),Dm(r,s,f,g,u);case 3:e:{if(Im(s),r===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,g=v.element,Kh(r,s),Fl(s,f,null,u);var j=s.memoizedState;if(f=j.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=ds(Error(n(423)),s),s=Lm(r,s,f,u,g);break e}else if(f!==g){g=ds(Error(n(424)),s),s=Lm(r,s,f,u,g);break e}else for(Sn=eo(s.stateNode.containerInfo.firstChild),kn=s,et=!0,Kn=null,u=qh(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(is(),f===g){s=Or(r,s,u);break e}en(r,s,f,u)}s=s.child}return s;case 5:return Qh(s),r===null&&cc(s),f=s.type,g=s.pendingProps,v=r!==null?r.memoizedProps:null,j=g.children,tc(f,g)?j=null:v!==null&&tc(f,v)&&(s.flags|=32),Am(r,s),en(r,s,j,u),s.child;case 6:return r===null&&cc(s),null;case 13:return Om(r,s,u);case 4:return yc(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ls(s,null,f,u):en(r,s,f,u),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Yn(f,g),Em(r,s,f,g,u);case 7:return en(r,s,s.pendingProps,u),s.child;case 8:return en(r,s,s.pendingProps.children,u),s.child;case 12:return en(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,v=s.memoizedProps,j=g.value,qe(Ml,f._currentValue),f._currentValue=j,v!==null)if(Gn(v.value,j)){if(v.children===g.children&&!ln.current){s=Or(r,s,u);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var O=v.dependencies;if(O!==null){j=v.child;for(var F=O.firstContext;F!==null;){if(F.context===f){if(v.tag===1){F=Lr(-1,u&-u),F.tag=2;var Y=v.updateQueue;if(Y!==null){Y=Y.shared;var oe=Y.pending;oe===null?F.next=F:(F.next=oe.next,oe.next=F),Y.pending=F}}v.lanes|=u,F=v.alternate,F!==null&&(F.lanes|=u),mc(v.return,u,s),O.lanes|=u;break}F=F.next}}else if(v.tag===10)j=v.type===s.type?null:v.child;else if(v.tag===18){if(j=v.return,j===null)throw Error(n(341));j.lanes|=u,O=j.alternate,O!==null&&(O.lanes|=u),mc(j,u,s),j=v.sibling}else j=v.child;if(j!==null)j.return=v;else for(j=v;j!==null;){if(j===s){j=null;break}if(v=j.sibling,v!==null){v.return=j.return,j=v;break}j=j.return}v=j}en(r,s,g.children,u),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,us(s,u),g=On(g),f=f(g),s.flags|=1,en(r,s,f,u),s.child;case 14:return f=s.type,g=Yn(f,s.pendingProps),g=Yn(f.type,g),Rm(r,s,f,g,u);case 15:return Tm(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Yn(f,g),Kl(r,s),s.tag=1,an(f)?(r=!0,Pl(s)):r=!1,us(s,u),bm(s,f,g),Ac(s,f,g,u),Oc(null,s,f,!0,r,u);case 19:return _m(r,s,u);case 22:return Pm(r,s,u)}throw Error(n(156,s.tag))};function lg(r,s){return $p(r,s)}function Rk(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 zn(r,s,u,f){return new Rk(r,s,u,f)}function td(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Tk(r){if(typeof r=="function")return td(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===K)return 14}return 2}function fo(r,s){var u=r.alternate;return u===null?(u=zn(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 sa(r,s,u,f,g,v){var j=2;if(f=r,typeof r=="function")td(r)&&(j=1);else if(typeof r=="string")j=5;else e:switch(r){case D:return zo(u.children,g,v,s);case B:j=8,g|=8;break;case q:return r=zn(12,u,s,g|2),r.elementType=q,r.lanes=v,r;case W:return r=zn(13,u,s,g),r.elementType=W,r.lanes=v,r;case J:return r=zn(19,u,s,g),r.elementType=J,r.lanes=v,r;case ae:return ia(u,g,v,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case R:j=10;break e;case L:j=9;break e;case $:j=11;break e;case K:j=14;break e;case te:j=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=zn(j,u,s,g),s.elementType=r,s.type=f,s.lanes=v,s}function zo(r,s,u,f){return r=zn(7,r,f,s),r.lanes=u,r}function ia(r,s,u,f){return r=zn(22,r,f,s),r.elementType=ae,r.lanes=u,r.stateNode={isHidden:!1},r}function nd(r,s,u){return r=zn(6,r,null,s),r.lanes=u,r}function rd(r,s,u){return s=zn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Pk(r,s,u,f,g){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=Pu(0),this.expirationTimes=Pu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pu(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function od(r,s,u,f,g,v,j,O,F){return r=new Pk(r,s,u,O,F),s===1?(s=1,v===!0&&(s|=8)):s=0,v=zn(3,null,null,s),r.current=v,v.stateNode=r,v.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},xc(v),r}function Ak(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function ag(r){if(!r)return no;r=r._reactInternals;e:{if(No(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(an(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(an(u))return Mh(r,u,s)}return s}function ug(r,s,u,f,g,v,j,O,F){return r=od(u,f,!0,r,g,v,j,O,F),r.context=ag(null),u=r.current,f=tn(),g=uo(u),v=Lr(f,g),v.callback=s??null,so(u,v,g),r.current.lanes=g,Ws(r,g,f),dn(r,f),r}function la(r,s,u,f){var g=s.current,v=tn(),j=uo(g);return u=ag(u),s.context===null?s.context=u:s.pendingContext=u,s=Lr(v,j),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=so(g,s,j),r!==null&&(Jn(r,g,j,v),zl(r,g,j)),j}function aa(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 cg(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function sd(r,s){cg(r,s),(r=r.alternate)&&cg(r,s)}function Dk(){return null}var dg=typeof reportError=="function"?reportError:function(r){console.error(r)};function id(r){this._internalRoot=r}ua.prototype.render=id.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));la(r,s,null,null)},ua.prototype.unmount=id.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Oo(function(){la(null,r,null,null)}),s[Tr]=null}};function ua(r){this._internalRoot=r}ua.prototype.unstable_scheduleHydration=function(r){if(r){var s=Kp();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Qr.length&&s!==0&&s<Qr[u].priority;u++);Qr.splice(u,0,r),u===0&&Qp(r)}};function ld(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function ca(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function fg(){}function Ik(r,s,u,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var Y=aa(j);v.call(Y)}}var j=ug(s,f,r,0,null,!1,!1,"",fg);return r._reactRootContainer=j,r[Tr]=j.current,oi(r.nodeType===8?r.parentNode:r),Oo(),j}for(;g=r.lastChild;)r.removeChild(g);if(typeof f=="function"){var O=f;f=function(){var Y=aa(F);O.call(Y)}}var F=od(r,0,!1,null,null,!1,!1,"",fg);return r._reactRootContainer=F,r[Tr]=F.current,oi(r.nodeType===8?r.parentNode:r),Oo(function(){la(s,F,u,f)}),F}function da(r,s,u,f,g){var v=u._reactRootContainer;if(v){var j=v;if(typeof g=="function"){var O=g;g=function(){var F=aa(j);O.call(F)}}la(s,j,r,g)}else j=Ik(u,s,r,g,f);return aa(j)}qp=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Hs(s.pendingLanes);u!==0&&(Au(s,u|1),dn(s,mt()),(_e&6)===0&&(hs=mt()+500,ro()))}break;case 13:Oo(function(){var f=Ir(r,1);if(f!==null){var g=tn();Jn(f,r,1,g)}}),sd(r,1)}},Du=function(r){if(r.tag===13){var s=Ir(r,134217728);if(s!==null){var u=tn();Jn(s,r,134217728,u)}sd(r,134217728)}},Gp=function(r){if(r.tag===13){var s=uo(r),u=Ir(r,s);if(u!==null){var f=tn();Jn(u,r,s,f)}sd(r,s)}},Kp=function(){return We},Yp=function(r,s){var u=We;try{return We=r,s()}finally{We=u}},Co=function(r,s,u){switch(s){case"input":if(_t(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 g=Rl(f);if(!g)throw Error(n(90));at(f),_t(f,g)}}}break;case"textarea":Nr(r,u);break;case"select":s=u.value,s!=null&&Jt(r,!!u.multiple,s,!1)}},Zt=Jc,Wt=Oo;var Lk={usingClientEntryPoint:!1,Events:[li,ts,Rl,Ht,Hn,Jc]},wi={findFiberByHostInstance:Eo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ok={bundleType:wi.bundleType,version:wi.version,rendererPackageName:wi.rendererPackageName,rendererConfig:wi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=zp(r),r===null?null:r.stateNode},findFiberByHostInstance:wi.findFiberByHostInstance||Dk,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 fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fa.isDisabled&&fa.supportsFiber)try{ul=fa.inject(Ok),ur=fa}catch{}}return fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lk,fn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ld(s))throw Error(n(200));return Ak(r,s,null,u)},fn.createRoot=function(r,s){if(!ld(r))throw Error(n(299));var u=!1,f="",g=dg;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=od(r,1,!1,null,null,u,!1,f,g),r[Tr]=s.current,oi(r.nodeType===8?r.parentNode:r),new id(s)},fn.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=zp(s),r=r===null?null:r.stateNode,r},fn.flushSync=function(r){return Oo(r)},fn.hydrate=function(r,s,u){if(!ca(s))throw Error(n(200));return da(null,r,s,!0,u)},fn.hydrateRoot=function(r,s,u){if(!ld(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,v="",j=dg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(j=u.onRecoverableError)),s=ug(s,null,r,1,u??null,g,!1,v,j),r[Tr]=s.current,oi(r),f)for(r=0;r<f.length;r++)u=f[r],g=u._getVersion,g=g(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,g]:s.mutableSourceEagerHydrationData.push(u,g);return new ua(s)},fn.render=function(r,s,u){if(!ca(s))throw Error(n(200));return da(null,r,s,!1,u)},fn.unmountComponentAtNode=function(r){if(!ca(r))throw Error(n(40));return r._reactRootContainer?(Oo(function(){da(null,null,r,!1,function(){r._reactRootContainer=null,r[Tr]=null})}),!0):!1},fn.unstable_batchedUpdates=Jc,fn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!ca(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return da(r,s,u,!1,f)},fn.version="18.3.1-next-f1338f8080-20240426",fn}var bg;function Py(){if(bg)return cd.exports;bg=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(),cd.exports=Hk(),cd.exports}var wg;function Wk(){if(wg)return pa;wg=1;var e=Py();return pa.createRoot=e.createRoot,pa.hydrateRoot=e.hydrateRoot,pa}var Vk=Wk();/**
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 kg="popstate";function Sg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function qk(e={}){function t(o,i){var h;let a=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:p}=a||o.location;return Kd("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:Fi(i)}return Kk(t,n,null,e)}function lt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Zn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Gk(){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 Kd(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ds(t):t,state:n,key:t&&t.key||o||Gk(),unstable_mask:i}}function Fi({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 Ds(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 Kk(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:a=!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 C=m(),k=C==null?null:C-h;h=C,p&&p({action:d,location:S.location,delta:k})}function w(C,k){d="PUSH";let A=Sg(C)?C:Kd(S.location,C,k);h=m()+1;let P=jg(A,h),M=S.createHref(A.unstable_mask||A);try{c.pushState(P,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(M)}a&&p&&p({action:d,location:S.location,delta:1})}function b(C,k){d="REPLACE";let A=Sg(C)?C:Kd(S.location,C,k);h=m();let P=jg(A,h),M=S.createHref(A.unstable_mask||A);c.replaceState(P,"",M),a&&p&&p({action:d,location:S.location,delta:0})}function N(C){return Yk(C)}let S={get action(){return d},get location(){return e(i,c)},listen(C){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(kg,x),p=C,()=>{i.removeEventListener(kg,x),p=null}},createHref(C){return t(i,C)},createURL:N,encodeLocation(C){let k=N(C);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:w,replace:b,go(C){return c.go(C)}};return S}function Yk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),lt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Fi(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Ay(e,t,n="/"){return Xk(e,t,n,!1)}function Xk(e,t,n,o){let i=typeof t=="string"?Ds(t):t,a=$r(i.pathname||"/",n);if(a==null)return null;let c=Dy(e);Qk(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=aS(a);d=iS(c[p],h,o)}return d}function Dy(e,t=[],n=[],o="",i=!1){let a=(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;lt(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=vr([o,m.relativePath]),w=n.concat(m);c.children&&c.children.length>0&&(lt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Dy(c.children,t,w,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:oS(x,c.index),routesMeta:w})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))a(c,d);else for(let h of Iy(c.path))a(c,d,!0,h)}),t}function Iy(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(o.length===0)return i?[a,""]:[a];let c=Iy(o.join("/")),d=[];return d.push(...c.map(p=>p===""?a:[a,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function Qk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sS(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var Jk=/^:[\w-]+$/,Zk=3,eS=2,tS=1,nS=10,rS=-2,Cg=e=>e==="*";function oS(e,t){let n=e.split("/"),o=n.length;return n.some(Cg)&&(o+=rS),t&&(o+=eS),n.filter(i=>!Cg(i)).reduce((i,a)=>i+(Jk.test(a)?Zk:a===""?tS:nS),o)}function sS(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 iS(e,t,n=!1){let{routesMeta:o}=e,i={},a="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],h=d===o.length-1,m=a==="/"?t:t.slice(a.length)||"/",x=Ma({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),w=p.route;if(!x&&h&&n&&!o[o.length-1].route.index&&(x=Ma({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},m)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:vr([a,x.pathname]),pathnameBase:fS(vr([a,x.pathnameBase])),route:w}),x.pathnameBase!=="/"&&(a=vr([a,x.pathnameBase]))}return c}function Ma(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=lS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],c=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((h,{paramName:m,isOptional:x},w)=>{if(m==="*"){let N=d[w]||"";c=a.slice(0,a.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[w];return x&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:c,pattern:e}}function lS(e,t=!1,n=!0){Zn(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 aS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Zn(!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 $r(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 uS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function cS(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Ds(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Ng(n.substring(1),"/"):a=Ng(n,t)):a=t,{pathname:a,search:pS(o),hash:hS(i)}}function Ng(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 pd(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 dS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ly(e){let t=dS(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function Ef(e,t,n,o=!1){let i;typeof e=="string"?i=Ds(e):(i={...e},lt(!i.pathname||!i.pathname.includes("?"),pd("?","pathname","search",i)),lt(!i.pathname||!i.pathname.includes("#"),pd("#","pathname","hash",i)),lt(!i.search||!i.search.includes("#"),pd("#","search","hash",i)));let a=e===""||i.pathname==="",c=a?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!o&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),x-=1;i.pathname=w.join("/")}d=x>=0?t[x]:"/"}let p=cS(i,d),h=c&&c!=="/"&&c.endsWith("/"),m=(a||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}var vr=e=>e.join("/").replace(/\/\/+/g,"/"),fS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mS=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 gS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function xS(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function My(e,t){let n=e;if(typeof n!="string"||!uS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(Oy)try{let a=new URL(window.location.href),c=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=$r(c.pathname,t);c.origin===a.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{Zn(!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 _y=["POST","PUT","PATCH","DELETE"];new Set(_y);var yS=["GET",..._y];new Set(yS);var Is=y.createContext(null);Is.displayName="DataRouter";var eu=y.createContext(null);eu.displayName="DataRouterState";var vS=y.createContext(!1),zy=y.createContext({isTransitioning:!1});zy.displayName="ViewTransition";var bS=y.createContext(new Map);bS.displayName="Fetchers";var wS=y.createContext(null);wS.displayName="Await";var Bn=y.createContext(null);Bn.displayName="Navigation";var Gi=y.createContext(null);Gi.displayName="Location";var or=y.createContext({outlet:null,matches:[],isDataRoute:!1});or.displayName="Route";var Rf=y.createContext(null);Rf.displayName="RouteError";var Fy="REACT_ROUTER_ERROR",kS="REDIRECT",SS="ROUTE_ERROR_RESPONSE";function jS(e){if(e.startsWith(`${Fy}:${kS}:{`))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 CS(e){if(e.startsWith(`${Fy}:${SS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new mS(t.status,t.statusText,t.data)}catch{}}function NS(e,{relative:t}={}){lt(Ki(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=y.useContext(Bn),{hash:i,pathname:a,search:c}=Yi(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:vr([n,a])),o.createHref({pathname:d,search:c,hash:i})}function Ki(){return y.useContext(Gi)!=null}function Un(){return lt(Ki(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Gi).location}var $y="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function By(e){y.useContext(Bn).static||y.useLayoutEffect(e)}function sr(){let{isDataRoute:e}=y.useContext(or);return e?BS():ES()}function ES(){lt(Ki(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Is),{basename:t,navigator:n}=y.useContext(Bn),{matches:o}=y.useContext(or),{pathname:i}=Un(),a=JSON.stringify(Ly(o)),c=y.useRef(!1);return By(()=>{c.current=!0}),y.useCallback((p,h={})=>{if(Zn(c.current,$y),!c.current)return;if(typeof p=="number"){n.go(p);return}let m=Ef(p,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:vr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,a,i,e])}var RS=y.createContext(null);function TS(e){let t=y.useContext(or).outlet;return y.useMemo(()=>t&&y.createElement(RS.Provider,{value:e},t),[t,e])}function Pt(){let{matches:e}=y.useContext(or),t=e[e.length-1];return t?t.params:{}}function Yi(e,{relative:t}={}){let{matches:n}=y.useContext(or),{pathname:o}=Un(),i=JSON.stringify(Ly(n));return y.useMemo(()=>Ef(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function PS(e,t){return Uy(e,t)}function Uy(e,t,n){var C;lt(Ki(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=y.useContext(Bn),{matches:i}=y.useContext(or),a=i[i.length-1],c=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",h=a&&a.route;{let k=h&&h.path||"";Wy(d,!h||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${k}">) 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="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let m=Un(),x;if(t){let k=typeof t=="string"?Ds(t):t;lt(p==="/"||((C=k.pathname)==null?void 0:C.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 "${k.pathname}" was given in the \`location\` prop.`),x=k}else x=m;let w=x.pathname||"/",b=w;if(p!=="/"){let k=p.replace(/^\//,"").split("/");b="/"+w.replace(/^\//,"").split("/").slice(k.length).join("/")}let N=Ay(e,{pathname:b});Zn(h||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Zn(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 S=OS(N&&N.map(k=>Object.assign({},k,{params:Object.assign({},c,k.params),pathname:vr([p,o.encodeLocation?o.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?p:vr([p,o.encodeLocation?o.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),i,n);return t&&S?y.createElement(Gi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},S):S}function AS(){let e=$S(),t=gS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,c)}var DS=y.createElement(AS,null),Hy=class extends y.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=CS(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(or.Provider,{value:this.props.routeContext},y.createElement(Rf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(IS,{error:e},t):t}};Hy.contextType=vS;var hd=new WeakMap;function IS({children:e,error:t}){let{basename:n}=y.useContext(Bn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=jS(t.digest);if(o){let i=hd.get(t);if(i)throw i;let a=My(o.location,n);if(Oy&&!hd.get(t))if(a.isExternal||o.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:o.replace}));throw hd.set(t,c),c}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function LS({routeContext:e,match:t,children:n}){let o=y.useContext(Is);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(or.Provider,{value:e},n)}function OS(e,t=[],n){let o=n==null?void 0:n.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,a=o==null?void 0:o.errors;if(a!=null){let m=i.findIndex(x=>x.route.id&&(a==null?void 0:a[x.route.id])!==void 0);lt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).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:w,errors:b}=o,N=x.route.loader&&!w.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 w,b;p(m,{location:o.location,params:((b=(w=o.matches)==null?void 0:w[0])==null?void 0:b.params)??{},unstable_pattern:xS(o.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,w)=>{let b,N=!1,S=null,C=null;o&&(b=a&&x.route.id?a[x.route.id]:void 0,S=x.route.errorElement||DS,c&&(d<0&&w===0?(Wy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):d===w&&(N=!0,C=x.route.hydrateFallbackElement||null)));let k=t.concat(i.slice(0,w+1)),A=()=>{let P;return b?P=S:N?P=C:x.route.Component?P=y.createElement(x.route.Component,null):x.route.element?P=x.route.element:P=m,y.createElement(LS,{match:x,routeContext:{outlet:m,matches:k,isDataRoute:o!=null},children:P})};return o&&(x.route.ErrorBoundary||x.route.errorElement||w===0)?y.createElement(Hy,{location:o.location,revalidation:o.revalidation,component:S,error:b,children:A(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):A()},null)}function Tf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MS(e){let t=y.useContext(Is);return lt(t,Tf(e)),t}function _S(e){let t=y.useContext(eu);return lt(t,Tf(e)),t}function zS(e){let t=y.useContext(or);return lt(t,Tf(e)),t}function Pf(e){let t=zS(e),n=t.matches[t.matches.length-1];return lt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function FS(){return Pf("useRouteId")}function $S(){var o;let e=y.useContext(Rf),t=_S("useRouteError"),n=Pf("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function BS(){let{router:e}=MS("useNavigate"),t=Pf("useNavigate"),n=y.useRef(!1);return By(()=>{n.current=!0}),y.useCallback(async(i,a={})=>{Zn(n.current,$y),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Eg={};function Wy(e,t,n){!t&&!Eg[e]&&(Eg[e]=!0,Zn(!1,n))}y.memo(US);function US({routes:e,future:t,state:n,isStatic:o,onError:i}){return Uy(e,void 0,{state:n,isStatic:o,onError:i})}function HS(e){return TS(e.context)}function Le(e){lt(!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:a=!1,unstable_useTransitions:c}){lt(!Ki(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=y.useMemo(()=>({basename:d,navigator:i,static:a,unstable_useTransitions:c,future:{}}),[d,i,a,c]);typeof n=="string"&&(n=Ds(n));let{pathname:h="/",search:m="",hash:x="",state:w=null,key:b="default",unstable_mask:N}=n,S=y.useMemo(()=>{let C=$r(h,d);return C==null?null:{location:{pathname:C,search:m,hash:x,state:w,key:b,unstable_mask:N},navigationType:o}},[d,h,m,x,w,b,o,N]);return Zn(S!=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.`),S==null?null:y.createElement(Bn.Provider,{value:p},y.createElement(Gi.Provider,{children:t,value:S}))}function VS({children:e,location:t}){return PS(Yd(e),t)}function Yd(e,t=[]){let n=[];return y.Children.forEach(e,(o,i)=>{if(!y.isValidElement(o))return;let a=[...t,i];if(o.type===y.Fragment){n.push.apply(n,Yd(o.props.children,a));return}lt(o.type===Le,`[${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>`),lt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||a.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=Yd(o.props.children,a)),n.push(c)}),n}var Ea="get",Ra="application/x-www-form-urlencoded";function tu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function qS(e){return tu(e)&&e.tagName.toLowerCase()==="button"}function GS(e){return tu(e)&&e.tagName.toLowerCase()==="form"}function KS(e){return tu(e)&&e.tagName.toLowerCase()==="input"}function YS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function XS(e,t){return e.button===0&&(!t||t==="_self")&&!YS(e)}function Xd(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 QS(e,t){let n=Xd(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var ha=null;function JS(){if(ha===null)try{new FormData(document.createElement("form"),0),ha=!1}catch{ha=!0}return ha}var ZS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function md(e){return e!=null&&!ZS.has(e)?(Zn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ra}"`),null):e}function ej(e,t){let n,o,i,a,c;if(GS(e)){let d=e.getAttribute("action");o=d?$r(d,t):null,n=e.getAttribute("method")||Ea,i=md(e.getAttribute("enctype"))||Ra,a=new FormData(e)}else if(qS(e)||KS(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?$r(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Ea,i=md(e.getAttribute("formenctype"))||md(d.getAttribute("enctype"))||Ra,a=new FormData(d,e),!JS()){let{name:h,type:m,value:x}=e;if(m==="image"){let w=h?`${h}.`:"";a.append(`${w}x`,"0"),a.append(`${w}y`,"0")}else h&&a.append(h,x)}}else{if(tu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ea,o=null,i=Ra,c=e}return a&&i==="text/plain"&&(c=a,a=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:a,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Af(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function tj(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&&$r(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function nj(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 rj(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 oj(e,t,n){let o=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let c=await nj(a,n);return c.links?c.links():[]}return[]}));return aj(o.flat(1).filter(rj).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Rg(e,t,n,o,i,a){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 a==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):a==="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 w=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 w=="boolean")return w}return!0}):[]}function sj(e,t,{includeHydrateFallback:n}={}){return ij(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function ij(e){return[...new Set(e)]}function lj(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function aj(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let a=JSON.stringify(lj(i));return n.has(a)||(n.add(a),o.push({key:a,link:i})),o},[])}function Vy(){let e=y.useContext(Is);return Af(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function uj(){let e=y.useContext(eu);return Af(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Df=y.createContext(void 0);Df.displayName="FrameworkContext";function qy(){let e=y.useContext(Df);return Af(e,"You must render this element inside a <HydratedRouter> element"),e}function cj(e,t){let n=y.useContext(Df),[o,i]=y.useState(!1),[a,c]=y.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:x}=t,w=y.useRef(null);y.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=k=>{k.forEach(A=>{c(A.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return w.current&&C.observe(w.current),()=>{C.disconnect()}}},[e]),y.useEffect(()=>{if(o){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[a,w,{}]:[a,w,{onFocus:Si(d,b),onBlur:Si(p,N),onMouseEnter:Si(h,b),onMouseLeave:Si(m,N),onTouchStart:Si(x,b)}]:[!1,w,{}]}function Si(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function dj({page:e,...t}){let{router:n}=Vy(),o=y.useMemo(()=>Ay(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?y.createElement(pj,{page:e,matches:o,...t}):null}function fj(e){let{manifest:t,routeModules:n}=qy(),[o,i]=y.useState([]);return y.useEffect(()=>{let a=!1;return oj(e,t,n).then(c=>{a||i(c)}),()=>{a=!0}},[e,t,n]),o}function pj({page:e,matches:t,...n}){let o=Un(),{future:i,manifest:a,routeModules:c}=qy(),{basename:d}=Vy(),{loaderData:p,matches:h}=uj(),m=y.useMemo(()=>Rg(e,t,h,a,o,"data"),[e,t,h,a,o]),x=y.useMemo(()=>Rg(e,t,h,a,o,"assets"),[e,t,h,a,o]),w=y.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let S=new Set,C=!1;if(t.forEach(A=>{var M;let P=a.routes[A.route.id];!P||!P.hasLoader||(!m.some(_=>_.route.id===A.route.id)&&A.route.id in p&&((M=c[A.route.id])!=null&&M.shouldRevalidate)||P.hasClientLoader?C=!0:S.add(A.route.id))}),S.size===0)return[];let k=tj(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return C&&S.size>0&&k.searchParams.set("_routes",t.filter(A=>S.has(A.route.id)).map(A=>A.route.id).join(",")),[k.pathname+k.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,a,m,t,e,c]),b=y.useMemo(()=>sj(x,a),[x,a]),N=fj(x);return y.createElement(y.Fragment,null,w.map(S=>y.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),b.map(S=>y.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),N.map(({key:S,link:C})=>y.createElement("link",{key:S,nonce:n.nonce,...C,crossOrigin:C.crossOrigin??n.crossOrigin})))}function hj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var mj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mj&&(window.__reactRouterVersion="7.13.1")}catch{}function gj({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=y.useRef();i.current==null&&(i.current=qk({window:o,v5Compat:!0}));let a=i.current,[c,d]=y.useState({action:a.action,location:a.location}),p=y.useCallback(h=>{n===!1?d(h):y.startTransition(()=>d(h))},[n]);return y.useLayoutEffect(()=>a.listen(p),[a,p]),y.createElement(WS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:a,unstable_useTransitions:n})}var Gy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ke=y.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:a,replace:c,unstable_mask:d,state:p,target:h,to:m,preventScrollReset:x,viewTransition:w,unstable_defaultShouldRevalidate:b,...N},S){let{basename:C,navigator:k,unstable_useTransitions:A}=y.useContext(Bn),P=typeof m=="string"&&Gy.test(m),M=My(m,C);m=M.to;let _=NS(m,{relative:i}),T=Un(),D=null;if(d){let K=Ef(d,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);C!=="/"&&(K.pathname=K.pathname==="/"?C:vr([C,K.pathname])),D=k.createHref(K)}let[B,q,R]=cj(o,N),L=bj(m,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:w,unstable_defaultShouldRevalidate:b,unstable_useTransitions:A});function $(K){t&&t(K),K.defaultPrevented||L(K)}let W=!(M.isExternal||a),J=y.createElement("a",{...N,...R,href:(W?D:void 0)||M.absoluteURL||_,onClick:W?$:t,ref:hj(S,q),target:h,"data-discover":!P&&n==="render"?"true":void 0});return B&&!P?y.createElement(y.Fragment,null,J,y.createElement(dj,{page:_})):J});ke.displayName="Link";var xj=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:a,to:c,viewTransition:d,children:p,...h},m){let x=Yi(c,{relative:h.relative}),w=Un(),b=y.useContext(eu),{navigator:N,basename:S}=y.useContext(Bn),C=b!=null&&Cj(x)&&d===!0,k=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,A=w.pathname,P=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(A=A.toLowerCase(),P=P?P.toLowerCase():null,k=k.toLowerCase()),P&&S&&(P=$r(P,S)||P);const M=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let _=A===k||!i&&A.startsWith(k)&&A.charAt(M)==="/",T=P!=null&&(P===k||!i&&P.startsWith(k)&&P.charAt(k.length)==="/"),D={isActive:_,isPending:T,isTransitioning:C},B=_?t:void 0,q;typeof o=="function"?q=o(D):q=[o,_?"active":null,T?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let R=typeof a=="function"?a(D):a;return y.createElement(ke,{...h,"aria-current":B,className:q,ref:m,style:R,to:c,viewTransition:d},typeof p=="function"?p(D):p)});xj.displayName="NavLink";var yj=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:a,method:c=Ea,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w,...b},N)=>{let{unstable_useTransitions:S}=y.useContext(Bn),C=Sj(),k=jj(d,{relative:h}),A=c.toLowerCase()==="get"?"get":"post",P=typeof d=="string"&&Gy.test(d),M=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let T=_.nativeEvent.submitter,D=(T==null?void 0:T.getAttribute("formmethod"))||c,B=()=>C(T||_.currentTarget,{fetcherKey:t,method:D,navigate:n,replace:i,state:a,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w});S&&n!==!1?y.startTransition(()=>B()):B()};return y.createElement("form",{ref:N,method:A,action:k,onSubmit:o?p:M,...b,"data-discover":!P&&e==="render"?"true":void 0})});yj.displayName="Form";function vj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ky(e){let t=y.useContext(Is);return lt(t,vj(e)),t}function bj(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=sr(),x=Un(),w=Yi(e,{relative:c});return y.useCallback(b=>{if(XS(b,t)){b.preventDefault();let N=n!==void 0?n:Fi(x)===Fi(w),S=()=>m(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?y.startTransition(()=>S()):S()}},[x,m,w,n,o,i,t,e,a,c,d,p,h])}function If(e){Zn(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=y.useRef(Xd(e)),n=y.useRef(!1),o=Un(),i=y.useMemo(()=>QS(o.search,n.current?null:t.current),[o.search]),a=sr(),c=y.useCallback((d,p)=>{const h=Xd(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+h,p)},[a,i]);return[i,c]}var wj=0,kj=()=>`__${String(++wj)}__`;function Sj(){let{router:e}=Ky("useSubmit"),{basename:t}=y.useContext(Bn),n=FS(),o=e.fetch,i=e.navigate;return y.useCallback(async(a,c={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=ej(a,t);if(c.navigate===!1){let w=c.fetcherKey||kj();await o(w,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 jj(e,{relative:t}={}){let{basename:n}=y.useContext(Bn),o=y.useContext(or);lt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...Yi(e||".",{relative:t})},c=Un();if(e==null){a.search=c.search;let d=new URLSearchParams(a.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();a.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:vr([n,a.pathname])),Fi(a)}function Cj(e,{relative:t}={}){let n=y.useContext(zy);lt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Ky("useViewTransitionState"),i=Yi(e,{relative:t});if(!n.isTransitioning)return!1;let a=$r(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=$r(n.nextLocation.pathname,o)||n.nextLocation.pathname;return Ma(i.pathname,c)!=null||Ma(i.pathname,a)!=null}var vo=Py();const Nj=Za(vo);/**
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 Ej=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yy=(...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 Rj={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 Tj=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:c,...d},p)=>y.createElement("svg",{ref:p,...Rj,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Yy("lucide",i),...d},[...c.map(([h,m])=>y.createElement(h,m)),...Array.isArray(a)?a:[a]]));/**
67
+ * @license lucide-react v0.460.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const ye=(e,t)=>{const n=y.forwardRef(({className:o,...i},a)=>y.createElement(Tj,{ref:a,iconNode:t,className:Yy(`lucide-${Ej(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 nu=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 Pj=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 Xy=ye("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
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 Qy=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"}]]);/**
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 Jy=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"}]]);/**
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 Lf=ye("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 $i=ye("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 Zy=ye("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 Qd=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"}]]);/**
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 ev=ye("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
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 Jd=ye("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
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 Aj=ye("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
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 Dj=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"}]]);/**
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 Ij=ye("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
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 Lj=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"}]]);/**
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 Of=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"}]]);/**
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 tv=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"}]]);/**
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 Tg=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"}]]);/**
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 Oj=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"}]]);/**
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 Pg=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"}]]);/**
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 Mj=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"}]]);/**
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 _j=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"}]]);/**
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 Mf=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"}]]);/**
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 zj=ye("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
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 nv=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"}]]);/**
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 Fj=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"}]]);/**
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 $j=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"}]]);/**
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 Bj=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"}]]);/**
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 rv=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"}]]);/**
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 Uj=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"}]]);/**
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 Hj=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"}]]);/**
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 Wj=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"}]]);/**
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 ov=ye("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 Vj=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"}]]);/**
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 _f=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"}]]);/**
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 qj=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"}]]);/**
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 gd=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"}]]);/**
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 Gj=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"}]]);/**
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 Kj=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"}]]);/**
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 er=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 sv=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"}]]);/**
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 Yj=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"}]]);/**
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 iv=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"}]]);/**
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 Xj=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"}]]);/**
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 ru=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 Qj=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"}]]);/**
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 Jj=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"}]]);/**
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 Zj=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"}]]);/**
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 eC=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"}]]);/**
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 br=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"}]]);/**
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 Ag=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"}]]);/**
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 lv=ye("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
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 tC=ye("SunMedium",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]]);/**
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 av=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"}]]);/**
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 nC=ye("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
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 Xi=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"}]]);/**
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 Qi=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"}]]);/**
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 uv=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function cv(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=cv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function rC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cv(e))&&(o&&(o+=" "),o+=t);return o}const zf="-",oC=e=>{const t=iC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(zf);return d[0]===""&&d.length!==1&&d.shift(),dv(d,t)||sC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},dv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?dv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(zf);return(c=t.validators.find(({validator:d})=>d(a)))==null?void 0:c.classGroupId},Dg=/^\[(.+)\]$/,sC=e=>{if(Dg.test(e)){const t=Dg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return aC(Object.entries(e.classGroups),n).forEach(([a,c])=>{Zd(c,o,a,t)}),o},Zd=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:Ig(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(lC(i)){Zd(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,c])=>{Zd(c,Ig(t,a),n,o)})})},Ig=(e,t)=>{let n=e;return t.split(zf).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},lC=e=>e.isThemeGetter,aC=(e,t)=>t?e.map(([n,o])=>{const i=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,d])=>[t+c,d])):a);return[n,i]}):e,uC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(a,c)=>{n.set(a,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let c=n.get(a);if(c!==void 0)return c;if((c=o.get(a))!==void 0)return i(a,c),c},set(a,c){n.has(a)?n.set(a,c):i(a,c)}}},fv="!",cC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],a=t.length,c=d=>{const p=[];let h=0,m=0,x;for(let C=0;C<d.length;C++){let k=d[C];if(h===0){if(k===i&&(o||d.slice(C,C+a)===t)){p.push(d.slice(m,C)),m=C+a;continue}if(k==="/"){x=C;continue}}k==="["?h++:k==="]"&&h--}const w=p.length===0?d:d.substring(m),b=w.startsWith(fv),N=b?w.substring(1):w,S=x&&x>m?x-m:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:S}};return n?d=>n({className:d,parseClassName:c}):c},dC=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},fC=e=>({cache:uC(e.cacheSize),parseClassName:cC(e),...oC(e)}),pC=/\s+/,hC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],c=e.trim().split(pC);let d="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{modifiers:m,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:b}=n(h);let N=!!b,S=o(N?w.substring(0,b):w);if(!S){if(!N){d=h+(d.length>0?" "+d:d);continue}if(S=o(w),!S){d=h+(d.length>0?" "+d:d);continue}N=!1}const C=dC(m).join(":"),k=x?C+fv:C,A=k+S;if(a.includes(A))continue;a.push(A);const P=i(S,N);for(let M=0;M<P.length;++M){const _=P[M];a.push(k+_)}d=h+(d.length>0?" "+d:d)}return d};function mC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pv(t))&&(o&&(o+=" "),o+=n);return o}const pv=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=pv(e[o]))&&(n&&(n+=" "),n+=t);return n};function gC(e,...t){let n,o,i,a=c;function c(p){const h=t.reduce((m,x)=>x(m),e());return n=fC(h),o=n.cache.get,i=n.cache.set,a=d,d(p)}function d(p){const h=o(p);if(h)return h;const m=hC(p,n);return i(p,m),m}return function(){return a(mC.apply(null,arguments))}}const Qe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},hv=/^\[(?:([a-z-]+):)?(.+)\]$/i,xC=/^\d+\/\d+$/,yC=new Set(["px","full","screen"]),vC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bC=/\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$/,wC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_r=e=>ws(e)||yC.has(e)||xC.test(e),ho=e=>Ls(e,"length",AC),ws=e=>!!e&&!Number.isNaN(Number(e)),xd=e=>Ls(e,"number",ws),ji=e=>!!e&&Number.isInteger(Number(e)),jC=e=>e.endsWith("%")&&ws(e.slice(0,-1)),De=e=>hv.test(e),mo=e=>vC.test(e),CC=new Set(["length","size","percentage"]),NC=e=>Ls(e,CC,mv),EC=e=>Ls(e,"position",mv),RC=new Set(["image","url"]),TC=e=>Ls(e,RC,IC),PC=e=>Ls(e,"",DC),Ci=()=>!0,Ls=(e,t,n)=>{const o=hv.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},AC=e=>bC.test(e)&&!wC.test(e),mv=()=>!1,DC=e=>kC.test(e),IC=e=>SC.test(e),LC=()=>{const e=Qe("colors"),t=Qe("spacing"),n=Qe("blur"),o=Qe("brightness"),i=Qe("borderColor"),a=Qe("borderRadius"),c=Qe("borderSpacing"),d=Qe("borderWidth"),p=Qe("contrast"),h=Qe("grayscale"),m=Qe("hueRotate"),x=Qe("invert"),w=Qe("gap"),b=Qe("gradientColorStops"),N=Qe("gradientColorStopPositions"),S=Qe("inset"),C=Qe("margin"),k=Qe("opacity"),A=Qe("padding"),P=Qe("saturate"),M=Qe("scale"),_=Qe("sepia"),T=Qe("skew"),D=Qe("space"),B=Qe("translate"),q=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",De,t],$=()=>[De,t],W=()=>["",_r,ho],J=()=>["auto",ws,De],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",De],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[ws,De];return{cacheSize:500,separator:":",theme:{colors:[Ci],spacing:[_r,ho],blur:["none","",mo,De],brightness:z(),borderColor:[e],borderRadius:["none","","full",mo,De],borderSpacing:$(),borderWidth:W(),contrast:z(),grayscale:se(),hueRotate:z(),invert:se(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[jC,ho],inset:L(),margin:L(),opacity:z(),padding:$(),saturate:z(),scale:z(),sepia:se(),skew:z(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",De]}],container:["container"],columns:[{columns:[mo]}],"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:[...K(),De]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ji,De]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",De]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",ji,De]}],"grid-cols":[{"grid-cols":[Ci]}],"col-start-end":[{col:["auto",{span:["full",ji,De]},De]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Ci]}],"row-start-end":[{row:["auto",{span:[ji,De]},De]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",De]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",De]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",De,t]}],"min-w":[{"min-w":[De,t,"min","max","fit"]}],"max-w":[{"max-w":[De,t,"none","full","min","max","fit","prose",{screen:[mo]},mo]}],h:[{h:[De,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[De,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[De,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[De,t,"auto","min","max","fit"]}],"font-size":[{text:["base",mo,ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xd]}],"font-family":[{font:[Ci]}],"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",De]}],"line-clamp":[{"line-clamp":["none",ws,xd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_r,De]}],"list-image":[{"list-image":["none",De]}],"list-style-type":[{list:["none","disc","decimal",De]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_r,ho]}],"underline-offset":[{"underline-offset":["auto",_r,De]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De]}],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",De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),EC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...te(),"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":[k]}],"divide-style":[{divide:te()}],"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:["",...te()]}],"outline-offset":[{"outline-offset":[_r,De]}],"outline-w":[{outline:[_r,ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[_r,ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mo,PC]}],"shadow-color":[{shadow:[Ci]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",mo,De]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[P]}],sepia:[{sepia:[_]}],"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":[k]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",De]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",De]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",De]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ji,De]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",De]}],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",De]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",De]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_r,ho,xd]}],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"]}}},OC=gC(LC);function Me(...e){return OC(rC(e))}function Br(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 Rn(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 nn(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function gv(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function MC(e){let t=gv(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/missions")?/^\/missions\/[^/]+\/assignments\//.test(t)?"/assignments":"/missions":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 xv(e,t){return MC(e)===t}function _C(e){let n=gv(e).split("/").filter(Boolean);const o=[];let i="Overview",a=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,o.push({label:nn(n[1]),path:`${c}/missions`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,missionSlug:a}:(n[0]==="missions"?(o.push({label:"Missions",path:`${c}/missions`}),i="Missions",n[1]&&(a=n[1],o.push({label:nn(n[1]),path:`${c}/missions/${n[1]}`}),i=nn(n[1])),n[2]==="edit"?i="Edit Mission":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(o.push({label:nn(n[3]),path:`${c}/missions/${n[1]}/assignments/${n[3]}`}),i=nn(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:nn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:nn(n[1]),path:`/playbooks/${n[1]}`}),i=nn(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]==="mission"&&(i="Create Mission",o.push({label:"Create Mission",path:`${c}/create/mission`})),{title:i,breadcrumbs:o,missionSlug:a})}function Lg({items:e,onNavigate:t}){const n=Un();return l.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,a=xv(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return l.jsxs(ke,{to:o.to,onClick:t,className:Me("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",a?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[l.jsx(i,{className:"h-4 w-4"}),l.jsx("span",{children:o.label})]},o.to)})})}const ef="syntaur-theme",yv=y.createContext(null);function tf(){try{const e=window.localStorage.getItem(ef);return e==="light"||e==="dark"?e:null}catch{return null}}function vv(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function bv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function zC(){if(typeof document>"u")return;const e=tf();bv(e??vv())}function FC({children:e}){const[t,n]=y.useState(()=>tf()),[o,i]=y.useState(()=>tf()??vv());y.useEffect(()=>{bv(o)},[o]),y.useEffect(()=>{if(!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{t||i(c.matches?"dark":"light")};return d(),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[t]);const a={resolvedTheme:o,explicitTheme:t,setTheme:c=>{window.localStorage.setItem(ef,c),n(c),i(c)},toggleTheme:()=>{const c=o==="dark"?"light":"dark";window.localStorage.setItem(ef,c),n(c),i(c)}};return l.jsx(yv.Provider,{value:a,children:e})}function $C(){const e=y.useContext(yv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Ta=new Set;let hn=null,ks=null;function BC(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function wv(){hn&&(hn.readyState===WebSocket.OPEN||hn.readyState===WebSocket.CONNECTING)||(hn=new WebSocket(BC()),hn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of Ta)n(t)}catch{}},hn.onclose=()=>{hn=null,ks&&clearTimeout(ks),ks=setTimeout(wv,2e3)},hn.onerror=()=>{hn==null||hn.close()})}function Ff(e){const t=y.useRef(e);t.current=e,y.useEffect(()=>{const n=o=>t.current(o);return Ta.add(n),wv(),()=>{Ta.delete(n),Ta.size===0&&hn&&(ks&&clearTimeout(ks),ks=null,hn.close(),hn=null)}},[])}function gn(e,t){const[n,o]=y.useState(null),[i,a]=y.useState(!0),[c,d]=y.useState(null),[p,h]=y.useState(0),m=y.useCallback(()=>{h(x=>x+1)},[]);return y.useEffect(()=>{if(!e){a(!1),o(null);return}let x=!1;return a(!0),d(null),fetch(e).then(async w=>{if(!w.ok){const b=await w.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${w.status}`)}return w.json()}).then(w=>{x||(o(w),a(!1))}).catch(w=>{x||(d(w.message),a(!1))}),()=>{x=!0}},[e,p]),Ff(x=>{t&&((x.type==="mission-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 $f(){return gn("/api/missions","missions")}function Bf(){return gn("/api/workspaces","missions")}function Mt(){const{workspace:e}=Pt();return e?`/w/${e}`:""}function UC(){return gn("/api/overview","overview")}function HC(){return gn("/api/assignments","assignments")}function WC(){return gn("/api/attention","attention")}function kv(){return gn("/api/help")}function Sv(e){const t=e?`/api/missions/${e}`:null;return gn(t,"mission")}function VC(e,t){const n=e&&t?`/api/missions/${e}/assignments/${t}`:null;return gn(n,"assignment")}function jv(e){return gn(e)}function Cv(){return gn("/api/servers","servers")}function qC(){return gn("/api/agent-sessions","agent-sessions")}function GC(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return gn(n,"agent-sessions")}function KC(){return gn("/api/playbooks","playbooks")}function YC(e){const t=e?`/api/playbooks/${e}`:null;return gn(t,"playbooks")}function XC({title:e,breadcrumbs:t,missionSlug:n,onOpenMobileNav:o}){const i=Mt(),{resolvedTheme:a,toggleTheme:c}=$C();return l.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[l.jsx("button",{type:"button",onClick:o,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/70 bg-card/80 text-foreground lg:hidden","aria-label":"Open navigation",children:l.jsx(Vj,{className:"h-4 w-4"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?l.jsxs("nav",{className:"flex items-center gap-1.5 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:[t.slice(0,-1).map((d,p)=>l.jsxs("span",{className:"flex items-center gap-1.5",children:[p>0?l.jsx("span",{children:"/"}):null,l.jsx(ke,{to:d.path,className:"hover:text-foreground",children:d.label})]},d.path)),l.jsx("span",{children:"/"})]}):null,l.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ke,{className:"shell-action",to:`${i}/help`,children:"Help"}),l.jsxs(ke,{className:"shell-action",to:`${i}/create/mission`,children:[l.jsx(er,{className:"h-4 w-4"}),l.jsx("span",{children:"New Mission"})]}),n?l.jsxs(ke,{className:"shell-action",to:`${i}/missions/${n}/create/assignment`,children:[l.jsx(er,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}):null,l.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[a==="dark"?l.jsx(tC,{className:"h-4 w-4"}):l.jsx(qj,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const QC=[{to:"/",label:"Overview",icon:Lj},{to:"/attention",label:"Attention",icon:Qi},{to:"/playbooks",label:"Playbooks",icon:Jy},{to:"/todos",label:"Todos",icon:br}],JC=[{suffix:"/missions",label:"Missions",icon:Mf},{suffix:"/assignments",label:"Assignments",icon:Wj},{suffix:"/servers",label:"Servers",icon:_f},{suffix:"/agent-sessions",label:"Agent Sessions",icon:nu},{suffix:"/todos",label:"Todos",icon:br}],ZC=[{to:"/help",label:"Help",icon:Uj},{to:"/settings",label:"Settings",icon:Zj}],Og="syntaur.dashboard.sourceFirstNoticeDismissed";function eN({title:e,breadcrumbs:t,missionSlug:n,workspace:o,children:i}){const[a,c]=y.useState(!1),[d,p]=y.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(Og)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(Og,"1")}catch{}}return l.jsx("div",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[l.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar/90 px-4 py-4 backdrop-blur lg:flex lg:flex-col",children:l.jsx(Mg,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o})}),a?l.jsx("div",{className:"fixed inset-0 z-40 bg-slate-950/40 lg:hidden",children:l.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx(ke,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:l.jsx(uv,{className:"h-4 w-4"})})]}),l.jsx(Mg,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(XC,{title:e,breadcrumbs:t,missionSlug:n,onOpenMobileNav:()=>c(!0)}),l.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function Mg({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=Bf(),a=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=Un(),[p,h]=y.useState(new Set),[m,x]=y.useState(!1),[w,b]=y.useState(""),N=sr();function S(k){h(A=>{const P=new Set(A);return P.has(k)?P.delete(k):P.add(k),P})}const C=[...a,...c?["_ungrouped"]:[]];return l.jsxs("div",{className:"flex h-full flex-col gap-3",children:[l.jsx("div",{className:"space-y-3",children:l.jsxs(ke,{to:"/",className:"inline-flex items-center gap-3",onClick:o,children:[l.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-foreground text-sm font-semibold text-background shadow-sm",children:"S"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),l.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first mission control"})]})]})}),l.jsx(Lg,{items:QC,onNavigate:o}),l.jsx("div",{className:"border-t border-border/40"}),l.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[C.length===0&&!m&&l.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),C.map(k=>{const A=k==="_ungrouped",P=A?"Ungrouped":nn(k),M=A?"/w/_ungrouped":`/w/${k}`,_=p.has(k),T=n===k||n===null&&A&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>S(k),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${T?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx($i,{className:`h-3 w-3 transition-transform ${_?"-rotate-90":""}`}),P]}),!_&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:JC.map(D=>{const B=`${M}${D.suffix}`,q=xv(d.pathname,D.suffix)&&d.pathname.startsWith(M),R=D.icon;return l.jsxs(ke,{to:B,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:[l.jsx(R,{className:"h-4 w-4"}),l.jsx("span",{children:D.label})]},B)})})]},k)}),m?l.jsx("form",{className:"px-3 py-1.5",onSubmit:k=>{k.preventDefault();const A=w.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");A&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:A})}).then(()=>{o==null||o(),N(`/w/${A}/missions`)}))},children:l.jsx("input",{autoFocus:!0,type:"text",value:w,onChange:k=>b(k.target.value),onKeyDown:k=>{k.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{w.trim()||(x(!1),b(""))},placeholder:"workspace-name",className:"w-full rounded-md border border-border/60 bg-background/80 px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-foreground/40 focus:outline-none"})}):l.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground/60 transition hover:text-muted-foreground",children:[l.jsx(er,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(Lg,{items:ZC,onNavigate:o}),e?null:l.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Mission and assignment markdown files stay authoritative. Derived files are read-only projections."})]}),l.jsx("button",{type:"button",onClick:t,className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/70 bg-background/80 text-muted-foreground transition hover:text-foreground","aria-label":"Dismiss source-first dashboard notice",children:l.jsx(uv,{className:"h-4 w-4"})})]})})]})}function tN(){const e=Un(),{workspace:t}=Pt(),{title:n,breadcrumbs:o,missionSlug:i}=_C(e.pathname);return l.jsx(eN,{title:n,breadcrumbs:o,missionSlug:i,workspace:t??null,children:l.jsx(HS,{})})}function nN(e){const[t,n]=y.useState(null),[o,i]=y.useState(!0),[a,c]=y.useState(null),d=y.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 y.useEffect(()=>{d()},[d]),Ff(p=>{p.type==="todos-updated"&&d()}),{data:t,loading:o,error:a,refetch:d}}function Nv(){const[e,t]=y.useState(null),[n,o]=y.useState(!0),[i,a]=y.useState(null),c=y.useCallback(async()=>{try{const d=await fetch("/api/todos");if(!d.ok)throw new Error(`HTTP ${d.status}`);t(await d.json()),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to fetch todos")}finally{o(!1)}},[]);return y.useEffect(()=>{c()},[c]),Ff(d=>{d.type==="todos-updated"&&c()}),{data:e,loading:n,error:i,refetch:c}}async function Ev(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 Rv(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 Tv(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 Pv(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 Av(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function rN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function oN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const _a={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:Ij},in_progress:{label:"In Progress",description:"Actively being worked on.",className:"border-teal-300 bg-teal-100 text-teal-700 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",icon:ov},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:"border-amber-300 bg-amber-100 text-amber-800 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300",icon:Qd},review:{label:"Review",description:"Ready for inspection or approval.",className:"border-violet-300 bg-violet-100 text-violet-800 dark:border-violet-800 dark:bg-violet-950 dark:text-violet-300",icon:Xj},completed:{label:"Completed",description:"Finished successfully.",className:"border-emerald-300 bg-emerald-100 text-emerald-800 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-300",icon:ev},failed:{label:"Failed",description:"Could not be completed as planned.",className:"border-rose-300 bg-rose-100 text-rose-800 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300",icon:Qd},active:{label:"Active",description:"The mission has active or review work in flight.",className:"border-teal-300 bg-teal-100 text-teal-700 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",icon:Jd},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:Aj},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:Jd}};function rn({status:e,className:t,showIcon:n=!0}){const o=_a[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,a=>a.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:Jd},i=o.icon;return l.jsxs("span",{title:o.description,className:Me("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",o.className,t),children:[n?l.jsx(i,{className:"h-3.5 w-3.5"}):null,l.jsx("span",{children:o.label})]})}function Dv(e){var t;return((t=_a[e])==null?void 0:t.description)??`Status: ${e}`}const sN={default:"border-border/70 bg-card/90",info:"border-teal-200 bg-teal-50 dark:border-teal-900 dark:bg-teal-950/40",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 Ze({label:e,value:t,description:n,icon:o,tone:i="default",to:a}){const c=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?l.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:l.jsx(o,{className:"h-5 w-5"})}):null]}),n?l.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=Me("rounded-lg border p-3 shadow-sm",sN[i],a?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return a?l.jsx(ke,{to:a,className:d,children:c}):l.jsx("article",{className:d,children:c})}function Ae({title:e,description:t,children:n,className:o,actions:i}){return l.jsxs("section",{className:Me("surface-panel space-y-3",o),children:[e||i?l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[e?l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?l.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function kt({label:e="Loading dashboard data…"}){return l.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:l.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function St({title:e="Something went wrong",error:t,action:n}){return l.jsx("div",{className:"rounded-lg border border-rose-200 bg-rose-50 px-4 py-5 dark:border-rose-900 dark:bg-rose-950/30",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-lg font-semibold text-rose-800 dark:text-rose-200",children:e}),l.jsx("p",{className:"text-sm leading-6 text-rose-700 dark:text-rose-300",children:t}),n?l.jsx("div",{className:"pt-2",children:n}):null]})})}function xt({title:e,description:t,actions:n}){return l.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:l.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?l.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function Pa({command:e,description:t,example:n}){return l.jsxs("div",{className:"rounded-lg border border-border/70 bg-slate-950 px-3 py-3 text-slate-100 shadow-sm",children:[l.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?l.jsx("p",{className:"mt-2 text-sm text-slate-300",children:t}):null,n?l.jsx("p",{className:"mt-2 font-mono text-xs text-slate-400",children:n}):null]})}function iN({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstMissionChecklist.slice(0,3))??[]:(e==null?void 0:e.firstMissionChecklist)??[];return l.jsx(Ae,{title:t?"Getting Started Refresher":"Getting Started",description:t?"A fast reminder of the real flow for creating and running work in Syntaur.":"A first-run checklist that maps to the current CLI and dashboard flow.",actions:l.jsx(ke,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:l.jsx("div",{className:"space-y-3",children:n.map((o,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?l.jsx(Pa,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function lN(){var c;const{data:e,loading:t,error:n}=UC(),{data:o}=kv(),{data:i}=Nv(),a=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?l.jsx(kt,{label:"Loading overview…"}):n||!e?l.jsx(St,{error:n||"Overview data is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[l.jsx(Ze,{label:"Active Missions",value:e.stats.activeMissions,icon:Mf,to:"/missions"}),l.jsx(Ze,{label:"In Progress",value:e.stats.inProgressAssignments,icon:zj,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(Ze,{label:"Blocked",value:e.stats.blockedAssignments,icon:Qi,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(Ze,{label:"Review",value:e.stats.reviewAssignments,icon:Dj,tone:"info",to:"/assignments?status=review"}),l.jsx(Ze,{label:"Failed",value:e.stats.failedAssignments,icon:Gj,tone:"danger",to:"/assignments?status=failed"}),l.jsx(Ze,{label:"Stale",value:e.stats.staleAssignments,icon:nu,to:"/assignments?stale=1"}),l.jsx(Ze,{label:"Open Todos",value:a,icon:br,to:"/todos"}),l.jsx(Ze,{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:_f,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx(Ae,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?l.jsx(xt,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):l.jsx("div",{className:"space-y-3",children:e.attention.map(d=>l.jsxs(ke,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40 hover:bg-background",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.missionTitle})]}),l.jsx(rn,{status:d.status})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),l.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Rn(d.updated)]})]},d.id))})}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(Ae,{title:"Recently Updated Missions",children:e.recentMissions.length===0?l.jsx(xt,{title:"No missions yet",description:"Create your first mission to populate the mission directory, recent activity, and attention queue.",actions:l.jsx(ke,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/mission",children:"Create Mission"})}):l.jsx("div",{className:"space-y-3",children:e.recentMissions.map(d=>l.jsx(ke,{to:`/missions/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Rn(d.updated)})]}),l.jsx(rn,{status:d.status})]})},d.slug))})}),l.jsx(Ae,{title:"Recent Activity",children:e.recentActivity.length===0?l.jsx(xt,{title:"No activity yet",description:"Once missions and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):l.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>l.jsxs(ke,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:nn(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Rn(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx(iN,{help:o})]})]})}function aN(){const{data:e,loading:t,error:n}=WC();return t?l.jsx(kt,{label:"Loading attention queue…"}):n||!e?l.jsx(St,{error:n||"Attention queue is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[l.jsx(Ze,{label:"Critical",value:e.summary.critical,icon:_j,tone:"danger"}),l.jsx(Ze,{label:"High",value:e.summary.high,icon:Qi,tone:"warn"}),l.jsx(Ze,{label:"Medium",value:e.summary.medium,icon:eC,tone:"info"}),l.jsx(Ze,{label:"Low",value:e.summary.low,icon:Bj})]}),l.jsx(Ae,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?l.jsx(xt,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):l.jsx("div",{className:"space-y-3",children:e.items.map(o=>l.jsxs(ke,{to:o.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:o.missionTitle})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:o.severity}),l.jsx(rn,{status:o.status})]})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Rn(o.updated)]})]},o.id))})})]})}function uN({term:e,description:t}){return l.jsx("span",{title:t,className:"cursor-help rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground underline decoration-dotted underline-offset-4",children:e})}function cN(){const{data:e,loading:t,error:n}=kv();return t?l.jsx(kt,{label:"Loading help…"}):n||!e?l.jsx(St,{error:n||"Help content is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(Ae,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:l.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(o=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:o},o))})}),l.jsx(Ae,{title:"Getting Started",children:l.jsx("div",{className:"space-y-3",children:e.workflow.map((o,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?l.jsx(Pa,{command:o.command.command,description:o.command.description,example:o.command.example}):null,o.href?l.jsx(ke,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:o.href,children:"Open the related surface"}):null]})]})},o.title))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsxs(Ae,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(o=>l.jsx(uN,{term:o.term,description:o.description},o.term))}),l.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(o=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.term}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.description})]},o.term))})]}),l.jsx(Ae,{title:"Status Guide",children:l.jsx("div",{className:"space-y-3",children:e.statusGuide.map(o=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(rn,{status:o.status}),l.jsx("p",{className:"font-semibold text-foreground",children:o.meaning})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.useWhen})]},o.status))})})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Ae,{title:"Ownership And File Rules",children:l.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(o=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.label}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.description}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:o.files.map(i=>l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:i},i))})]},o.label))})}),l.jsx(Ae,{title:"How To Navigate The Dashboard",children:l.jsx("div",{className:"space-y-3",children:e.navigation.map(o=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.label}),l.jsx(ke,{className:"text-sm font-semibold text-primary hover:underline",to:o.href,children:"Open"})]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.description})]},o.label))})})]}),l.jsx(Ae,{title:"CLI Quick Reference",children:l.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(o=>l.jsx(Pa,{command:o.command,description:o.description,example:o.example},o.command))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Ae,{title:"FAQ",children:l.jsx("div",{className:"space-y-3",children:e.faq.map(o=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.question}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.answer})]},o.question))})}),l.jsx(Ae,{title:"First Mission Checklist",children:l.jsx("div",{className:"space-y-3",children:e.firstMissionChecklist.map((o,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?l.jsx(Pa,{command:o.command.command,example:o.command.example}):null,o.href?l.jsx(ke,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:o.href,children:"Open the related surface"}):null]})]})},o.title))})})]})]})}function Uf({children:e}){return l.jsx("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card/80 p-2.5 shadow-sm md:flex-row md:flex-wrap md:items-center",children:e})}function Hf({value:e,onChange:t,placeholder:n="Search"}){return l.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[l.jsx(ru,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:e,onChange:o=>t(o.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"})]})}function Wf({value:e,options:t,onChange:n}){return l.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>l.jsx("button",{type:"button",onClick:()=>n(o.value),className:Me("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 Iv({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:a,onMove:c,emptyMessage:d="No cards in this column."}){const[p,h]=y.useState(null),[m,x]=y.useState(null),w=y.useRef(null),b=y.useMemo(()=>new Map(t.map(_=>[n(_),_])),[n,t]),N=y.useMemo(()=>e.map(_=>({column:_,items:t.filter(T=>o(T)===_.id)})),[e,o,t]),S=p?b.get(p)??null:null;function C(_){if(!S)return{allowed:!1};const T=o(S);return(a==null?void 0:a({item:S,fromColumnId:T,toColumnId:_}))??{allowed:!0}}function k(){h(null),x(null)}function A(_,T){c&&(_.dataTransfer.effectAllowed="move",_.dataTransfer.setData("text/plain",T),h(T))}function P(_,T,D){!c||!S||!C(T).allowed||(_.preventDefault(),_.dataTransfer.dropEffect="move",x(q=>(q==null?void 0:q.columnId)===T&&q.index===D?q:{columnId:T,index:D}))}async function M(_,T,D){var $;if(_.preventDefault(),!c||!S){k();return}const B=o(S),R=((($=N.find(W=>W.column.id===B))==null?void 0:$.items)??[]).findIndex(W=>n(W)===n(S));if(!C(T).allowed||R<0){k();return}if(B===T&&(D===R||D===R+1)){k();return}try{await c({item:S,fromColumnId:B,toColumnId:T,fromIndex:R,toIndex:D})}finally{k()}}return l.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"hsl(var(--border)) transparent",scrollbarWidth:"thin"},children:l.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:_,items:T})=>{const D=C(_.id),B=(m==null?void 0:m.columnId)===_.id;return l.jsxs("section",{className:Me("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",S&&!D.allowed?"border-dashed opacity-65":"",S&&D.allowed?"border-primary/30 bg-accent/30":"",B?"ring-2 ring-ring/30":""),title:S&&!D.allowed?D.reason:void 0,children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:_.title}),_.description?l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:_.description}):null]}),l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:T.length})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:q=>P(q,_.id,T.length),onDrop:q=>M(q,_.id,T.length),children:[T.length===0?l.jsx(dN,{active:(m==null?void 0:m.columnId)===_.id&&m.index===0,disabled:!!S&&!D.allowed,children:typeof d=="function"?d(_):d}):null,T.map((q,R)=>{const L=n(q),$=p===L;return l.jsxs(y.Fragment,{children:[l.jsx("div",{className:Me("h-2 rounded-full transition",(m==null?void 0:m.columnId)===_.id&&m.index===R?"bg-primary/70":"bg-transparent"),onDragOver:W=>P(W,_.id,R),onDrop:W=>M(W,_.id,R)}),l.jsx("div",{draggable:!!c,onMouseDown:W=>{w.current=W.target},onDragStart:W=>{const J=w.current;if(J!=null&&J.closest("a, button")){W.preventDefault();return}A(W,L)},onDragEnd:k,className:Me("transition",c?"cursor-grab active:cursor-grabbing":"",$?"scale-[0.98] opacity-50":""),children:i(q,{dragging:$})})]},L)}),T.length>0?l.jsx("div",{className:Me("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)===_.id&&m.index===T.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",S&&!D.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},_.id)})})})}function dN({active:e,disabled:t,children:n}){return l.jsx("div",{className:Me("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 Lv={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 Di=null,Bo=null;function fN(){return Di?Promise.resolve(Di):Bo||(Bo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Di=e,Bo=null,e)).catch(()=>(Bo=null,Lv)),Bo)}function ou(){const[e,t]=y.useState(()=>Di??Lv);return y.useEffect(()=>{fN().then(t)},[]),e}function _g(){Di=null,Bo=null}function pN(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 hN={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"},zg=["bg-cyan-500","bg-indigo-500","bg-orange-500","bg-pink-500","bg-lime-500","bg-fuchsia-500"];function za({progress:e,className:t,showLegend:n=!1}){const o=ou(),i=y.useMemo(()=>{let c=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:hN[p]??zg[c++%zg.length]}))},[o.order,e]),a=i.filter(c=>(e[c.key]??0)>0);return l.jsxs("div",{className:Me("space-y-2",t),children:[l.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?l.jsx("div",{className:"h-full w-full bg-muted"}):a.map(c=>l.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${nn(c.key)}: ${e[c.key]??0}`},c.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>l.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[l.jsx("span",{className:Me("h-2 w-2 rounded-full",c.className)}),l.jsx("span",{children:nn(c.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const mN=["pending","active","blocked","failed","completed","archived"],Vf=mN,gN=["pending","in_progress","blocked","review","completed","failed"];function xN(e){return e&&e.length>0?e:[...gN]}function yN(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),a=t<n?n-1:n;return o.splice(Math.max(0,Math.min(a,o.length)),0,i),o}function Fg(){const{workspace:e}=Pt(),t=Mt(),{data:n,loading:o,error:i}=$f(),[a,c]=y.useState(""),[d,p]=y.useState("all"),[h,m]=y.useState("active"),[x,w]=y.useState("all"),[b,N]=y.useState("updated"),[S,C]=If(),k=S.get("view"),A=k==="table"||k==="kanban"?k:"cards",P=R=>{C(L=>{const $=new URLSearchParams(L);return R==="cards"?$.delete("view"):$.set("view",R),$})},[M,_]=y.useState({}),T=y.useMemo(()=>n?n.filter(R=>{if(e){if(e==="_ungrouped"){if(R.workspace!==null)return!1}else if(R.workspace!==e)return!1}return h==="active"&&R.archived||h==="archived"&&!R.archived||d!=="all"&&R.status!==d||x!=="all"&&!R.tags.includes(x)?!1:a.trim()?`${R.title} ${R.tags.join(" ")} ${R.slug}`.toLowerCase().includes(a.toLowerCase()):!0}).sort((R,L)=>wN(R,L,b)):[],[n,a,d,h,x,b,e]),D=T.map(R=>`${R.slug}:${R.status}`).join("|");y.useEffect(()=>{_(kN(T))},[D,b]);const B=y.useMemo(()=>{const R=new Map(T.map(L=>[L.slug,L]));return Vf.flatMap(L=>(M[L]??T.filter(W=>W.status===L).map(W=>W.slug)).map(W=>R.get(W)).filter(W=>!!W))},[T,M]);if(o)return l.jsx(kt,{label:"Loading missions…"});if(i||!n)return l.jsx(St,{error:i||"Mission list is unavailable."});const q=Array.from(new Set(n.flatMap(R=>R.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Uf,{children:[l.jsx(Hf,{value:a,onChange:c,placeholder:"Search by mission title or tag"}),l.jsxs("select",{value:d,onChange:R=>p(R.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"active",children:"Active"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"failed",children:"Failed"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"archived",children:"Archived"})]}),l.jsxs("select",{value:h,onChange:R=>m(R.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"active",children:"Hide archived"}),l.jsx("option",{value:"all",children:"All missions"}),l.jsx("option",{value:"archived",children:"Archived only"})]}),l.jsxs("select",{value:x,onChange:R=>w(R.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All tags"}),q.map(R=>l.jsx("option",{value:R,children:R},R))]}),l.jsxs("select",{value:b,onChange:R=>N(R.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"updated",children:"Sort: Updated"}),l.jsx("option",{value:"created",children:"Sort: Created"}),l.jsx("option",{value:"title",children:"Sort: Title"}),l.jsx("option",{value:"attention",children:"Sort: Attention"})]}),l.jsx(Wf,{value:A,onChange:R=>P(R),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),T.length===0?l.jsx(xt,{title:n.length===0?"No missions yet":"No missions match these filters",description:n.length===0?"A mission 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 mission.",actions:l.jsx(ke,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/mission`,children:"Create Mission"})}):A==="cards"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:T.map(R=>l.jsxs(ke,{to:`${t}/missions/${R.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:R.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(R.updated)]})]}),l.jsx(rn,{status:R.status})]}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsx(za,{progress:R.progress,showLegend:!0}),l.jsx("div",{className:"flex flex-wrap gap-2",children:R.tags.map(L=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:L},L))}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:R.needsAttention.blockedCount+R.needsAttention.failedCount})]}),l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:R.progress.total})]})]})]})]},R.slug))}):A==="table"?l.jsx(Ae,{title:`${T.length} mission${T.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Mission"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),l.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:T.map(R=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(ke,{to:`${t}/missions/${R.slug}`,className:"font-semibold text-foreground hover:text-primary",children:R.title}),l.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:R.tags.map(L=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:L},L))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(rn,{status:R.status})}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("div",{className:"min-w-[220px]",children:l.jsx(za,{progress:R.progress})})}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:R.needsAttention.blockedCount+R.needsAttention.failedCount}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(R.updated)})]},R.slug))})]})})}):l.jsx(Iv,{columns:bN,items:B,getItemId:R=>R.slug,getColumnId:R=>R.status,canDrop:({fromColumnId:R,toColumnId:L})=>({allowed:!0,reason:R===L?void 0:"This will set a manual status override on the mission."}),onMove:({item:R,fromColumnId:L,toColumnId:$,fromIndex:W,toIndex:J})=>{if(L===$){const K=M[L]??T.filter(te=>te.status===L).map(te=>te.slug);_(te=>({...te,[L]:yN(K,W,J)}));return}fetch(`/api/missions/${R.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:$})}).then(()=>{window.location.reload()})},emptyMessage:R=>`No ${R.title.toLowerCase()} missions.`,renderCard:(R,{dragging:L})=>l.jsx(SN,{mission:R,dragging:L})}),l.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(rv,{className:"mt-0.5 h-4 w-4"}),l.jsxs("p",{children:["Mission status is derived from assignment state by default.",A==="kanban"?" Drag missions between columns or use":" Use"," the status override on the mission detail page to set a manual status."]})]})})]})}const vN={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},bN=Vf.map(e=>({id:e,title:vN[e],description:Dv(e)}));function wN(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return $g(t)-$g(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function $g(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.unansweredQuestions}function kN(e){return Object.fromEntries(Vf.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function SN({mission:e,dragging:t}){const n=Mt();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(ke,{to:`${n}/missions/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(e.updated)]})]}),l.jsx(rn,{status:e.status})]}),l.jsx("div",{className:"mt-4",children:l.jsx(za,{progress:e.progress})}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.needsAttention.blockedCount+e.needsAttention.failedCount," needs attention"]})]}),l.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived mission lane"})]})}function bo({value:e}){const[t,n]=y.useState(!1);function o(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?l.jsx(Lf,{className:"h-3 w-3 text-green-500"}):l.jsx(Of,{className:"h-3 w-3"})})}function tt(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 jN(e,t){const n=y.createContext(t),o=a=>{const{children:c,...d}=a,p=y.useMemo(()=>d,Object.values(d));return l.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(a){const c=y.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,i]}function Vo(e,t=[]){let n=[];function o(a,c){const d=y.createContext(c),p=n.length;n=[...n,c];const h=x=>{var k;const{scope:w,children:b,...N}=x,S=((k=w==null?void 0:w[e])==null?void 0:k[p])||d,C=y.useMemo(()=>N,Object.values(N));return l.jsx(S.Provider,{value:C,children:b})};h.displayName=a+"Provider";function m(x,w){var S;const b=((S=w==null?void 0:w[e])==null?void 0:S[p])||d,N=y.useContext(b);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(c=>y.createContext(c));return function(d){const p=(d==null?void 0:d[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,CN(i,...t)]}function CN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const c=o.reduce((d,{useScope:p,scopeName:h})=>{const x=p(a)[`__scope${h}`];return{...d,...x}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Bg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function su(...e){return t=>{let n=!1;const o=e.map(i=>{const a=Bg(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():Bg(e[i],null)}}}}function Xt(...e){return y.useCallback(su(...e),e)}function Ug(e){const t=NN(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(RN);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function NN(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=PN(i),d=TN(a,i.props);return i.type!==y.Fragment&&(d.ref=o?su(o,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EN=Symbol("radix.slottable");function RN(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EN}function TN(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function PN(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 AN(e){const t=e+"CollectionProvider",[n,o]=Vo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:C,children:k}=S,A=dt.useRef(null),P=dt.useRef(new Map).current;return l.jsx(i,{scope:C,itemMap:P,collectionRef:A,children:k})};c.displayName=t;const d=e+"CollectionSlot",p=Ug(d),h=dt.forwardRef((S,C)=>{const{scope:k,children:A}=S,P=a(d,k),M=Xt(C,P.collectionRef);return l.jsx(p,{ref:M,children:A})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",w=Ug(m),b=dt.forwardRef((S,C)=>{const{scope:k,children:A,...P}=S,M=dt.useRef(null),_=Xt(C,M),T=a(m,k);return dt.useEffect(()=>(T.itemMap.set(M,{ref:M,...P}),()=>void T.itemMap.delete(M))),l.jsx(w,{[x]:"",ref:_,children:A})});b.displayName=m;function N(S){const C=a(e+"CollectionConsumer",S);return dt.useCallback(()=>{const A=C.collectionRef.current;if(!A)return[];const P=Array.from(A.querySelectorAll(`[${x}]`));return Array.from(C.itemMap.values()).sort((T,D)=>P.indexOf(T.ref.current)-P.indexOf(D.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},N,o]}var wo=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},DN=Ty[" useId ".trim().toString()]||(()=>{}),IN=0;function Ss(e){const[t,n]=y.useState(DN());return wo(()=>{n(o=>o??String(IN++))},[e]),t?`radix-${t}`:""}function LN(e){const t=ON(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(_N);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function ON(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=FN(i),d=zN(a,i.props);return i.type!==y.Fragment&&(d.ref=o?su(o,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MN=Symbol("radix.slottable");function _N(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MN}function zN(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function FN(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 $N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jt=$N.reduce((e,t)=>{const n=LN(`Primitive.${t}`),o=y.forwardRef((i,a)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...d,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function BN(e,t){e&&vo.flushSync(()=>e.dispatchEvent(t))}function Uo(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var UN=Ty[" useInsertionEffect ".trim().toString()]||wo;function iu({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,c]=HN({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const m=y.useRef(e!==void 0);y.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=y.useCallback(m=>{var x;if(d){const w=WN(m)?m(e):m;w!==e&&((x=c.current)==null||x.call(c,w))}else a(m)},[d,e,a,c]);return[p,h]}function HN({defaultProp:e,onChange:t}){const[n,o]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return UN(()=>{a.current=t},[t]),y.useEffect(()=>{var c;i.current!==n&&((c=a.current)==null||c.call(a,n),i.current=n)},[n,i]),[n,o,a]}function WN(e){return typeof e=="function"}var VN=y.createContext(void 0);function Ov(e){const t=y.useContext(VN);return e||t||"ltr"}var yd="rovingFocusGroup.onEntryFocus",qN={bubbles:!1,cancelable:!0},Ji="RovingFocusGroup",[nf,Mv,GN]=AN(Ji),[KN,_v]=Vo(Ji,[GN]),[YN,XN]=KN(Ji),zv=y.forwardRef((e,t)=>l.jsx(nf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(nf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(QN,{...e,ref:t})})}));zv.displayName=Ji;var QN=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...x}=e,w=y.useRef(null),b=Xt(t,w),N=Ov(a),[S,C]=iu({prop:c,defaultProp:d??null,onChange:p,caller:Ji}),[k,A]=y.useState(!1),P=Uo(h),M=Mv(n),_=y.useRef(!1),[T,D]=y.useState(0);return y.useEffect(()=>{const B=w.current;if(B)return B.addEventListener(yd,P),()=>B.removeEventListener(yd,P)},[P]),l.jsx(YN,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:S,onItemFocus:y.useCallback(B=>C(B),[C]),onItemShiftTab:y.useCallback(()=>A(!0),[]),onFocusableItemAdd:y.useCallback(()=>D(B=>B+1),[]),onFocusableItemRemove:y.useCallback(()=>D(B=>B-1),[]),children:l.jsx(jt.div,{tabIndex:k||T===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:tt(e.onMouseDown,()=>{_.current=!0}),onFocus:tt(e.onFocus,B=>{const q=!_.current;if(B.target===B.currentTarget&&q&&!k){const R=new CustomEvent(yd,qN);if(B.currentTarget.dispatchEvent(R),!R.defaultPrevented){const L=M().filter(te=>te.focusable),$=L.find(te=>te.active),W=L.find(te=>te.id===S),K=[$,W,...L].filter(Boolean).map(te=>te.ref.current);Bv(K,m)}}_.current=!1}),onBlur:tt(e.onBlur,()=>A(!1))})})}),Fv="RovingFocusGroupItem",$v=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:c,...d}=e,p=Ss(),h=a||p,m=XN(Fv,n),x=m.currentTabStopId===h,w=Mv(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:S}=m;return y.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),l.jsx(nf.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:l.jsx(jt.span,{tabIndex:x?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:tt(e.onMouseDown,C=>{o?m.onItemFocus(h):C.preventDefault()}),onFocus:tt(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:tt(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const k=e2(C,m.orientation,m.dir);if(k!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let P=w().filter(M=>M.focusable).map(M=>M.ref.current);if(k==="last")P.reverse();else if(k==="prev"||k==="next"){k==="prev"&&P.reverse();const M=P.indexOf(C.currentTarget);P=m.loop?t2(P,M+1):P.slice(M+1)}setTimeout(()=>Bv(P))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:S!=null}):c})})});$v.displayName=Fv;var JN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function e2(e,t,n){const o=ZN(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return JN[o]}function Bv(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function t2(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var n2=zv,r2=$v;function o2(e,t){return y.useReducer((n,o)=>t[n][o]??n,e)}var qo=e=>{const{present:t,children:n}=e,o=s2(t),i=typeof n=="function"?n({present:o.isPresent}):y.Children.only(n),a=Xt(o.ref,i2(i));return typeof n=="function"||o.isPresent?y.cloneElement(i,{ref:a}):null};qo.displayName="Presence";function s2(e){const[t,n]=y.useState(),o=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),c=e?"mounted":"unmounted",[d,p]=o2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=ma(o.current);a.current=d==="mounted"?h:"none"},[d]),wo(()=>{const h=o.current,m=i.current;if(m!==e){const w=a.current,b=ma(h);e?p("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(m&&w!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),wo(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,x=b=>{const S=ma(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&S&&(p("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},w=b=>{b.target===t&&(a.current=ma(o.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function ma(e){return(e==null?void 0:e.animationName)||"none"}function i2(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 lu="Tabs",[l2]=Vo(lu,[_v]),Uv=_v(),[a2,qf]=l2(lu),Hv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=Ov(d),[x,w]=iu({prop:o,onChange:i,defaultProp:a??"",caller:lu});return l.jsx(a2,{scope:n,baseId:Ss(),value:x,onValueChange:w,orientation:c,dir:m,activationMode:p,children:l.jsx(jt.div,{dir:m,"data-orientation":c,...h,ref:t})})});Hv.displayName=lu;var Wv="TabsList",Vv=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,a=qf(Wv,n),c=Uv(n);return l.jsx(n2,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:o,children:l.jsx(jt.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Vv.displayName=Wv;var qv="TabsTrigger",Gv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=e,c=qf(qv,n),d=Uv(n),p=Xv(c.baseId,o),h=Qv(c.baseId,o),m=o===c.value;return l.jsx(r2,{asChild:!0,...d,focusable:!i,active:m,children:l.jsx(jt.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,...a,ref:t,onMouseDown:tt(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:tt(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:tt(e.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!i&&x&&c.onValueChange(o)})})})});Gv.displayName=qv;var Kv="TabsContent",Yv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:a,...c}=e,d=qf(Kv,n),p=Xv(d.baseId,o),h=Qv(d.baseId,o),m=o===d.value,x=y.useRef(m);return y.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),l.jsx(qo,{present:i||m,children:({present:w})=>l.jsx(jt.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!w,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:w&&a})})});Yv.displayName=Kv;function Xv(e,t){return`${e}-trigger-${t}`}function Qv(e,t){return`${e}-content-${t}`}var u2=Hv,c2=Vv,d2=Gv,f2=Yv;function Jv({value:e,onValueChange:t,items:n,className:o}){return l.jsxs(u2,{value:e,onValueChange:t,className:o,children:[l.jsx(c2,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>l.jsxs(d2,{value:i.value,className:Me("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[l.jsx("span",{children:i.label}),typeof i.count=="number"?l.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>l.jsx(f2,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const p2="modulepreload",h2=function(e){return"/"+e},Hg={},m2=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=h2(h),h in Hg)return;Hg[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":p2,m||(w.as="script"),w.crossOrigin="",w.href=h,p&&w.setAttribute("nonce",p),document.head.appendChild(w),m)return new Promise((b,N)=>{w.addEventListener("load",b),w.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};function g2({definition:e,className:t,nodeRoutes:n={}}){const o=y.useRef(null),[i,a]=y.useState(null),[c,d]=y.useState(!0),p=sr(),h=document.documentElement.classList.contains("dark")?"dark":"default";return y.useEffect(()=>{let m=!1;async function x(){if(o.current)try{const w=(await m2(async()=>{const{default:S}=await import("./mermaid.core-C7JSt2gc.js").then(C=>C.bF);return{default:S}},[])).default;if(w.initialize({startOnLoad:!1,theme:h}),m)return;const b=`mermaid-${Date.now()}`,{svg:N}=await w.render(b,e);if(m||!o.current)return;o.current.innerHTML=N,x2(o.current,n,p),d(!1)}catch(w){m||(a(w instanceof Error?w.message:"Failed to render graph"),d(!1))}}return d(!0),a(null),x(),()=>{m=!0}},[e,p,n,h]),i?l.jsxs("div",{className:Me("rounded-lg border border-border bg-card p-4",t),children:[l.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),l.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):l.jsxs("div",{className:Me("rounded-lg border border-border bg-card p-4",t),children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:o,className:"overflow-auto"})]})}function x2(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const a=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",c=t[a];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${a}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function y2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const v2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w2={};function Wg(e,t){return(w2.jsx?b2:v2).test(e)}const k2=/[ \t\n\f\r]/g;function S2(e){return typeof e=="object"?e.type==="text"?Vg(e.value):!1:Vg(e)}function Vg(e){return e.replace(k2,"")===""}class Zi{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}Zi.prototype.normal={};Zi.prototype.property={};Zi.prototype.space=void 0;function Zv(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new Zi(n,o,t)}function rf(e){return e.toLowerCase()}class xn{constructor(t,n){this.attribute=n,this.property=t}}xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let j2=0;const Ie=Go(),wt=Go(),of=Go(),ce=Go(),Ge=Go(),js=Go(),Nn=Go();function Go(){return 2**++j2}const sf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:wt,commaOrSpaceSeparated:Nn,commaSeparated:js,number:ce,overloadedBoolean:of,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),vd=Object.keys(sf);class Gf extends xn{constructor(t,n,o,i){let a=-1;if(super(t,n),qg(this,"space",i),typeof o=="number")for(;++a<vd.length;){const c=vd[a];qg(this,vd[a],(o&sf[c])===sf[c])}}}Gf.prototype.defined=!0;function qg(e,t,n){n&&(e[t]=n)}function Os(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const a=new Gf(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,n[rf(o)]=o,n[rf(a.attribute)]=o}return new Zi(t,n,e.space)}const e0=Os({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:Ge,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:ce,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:Ge,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:wt,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 t0(e,t){return t in e?e[t]:t}function n0(e,t){return t0(e,t.toLowerCase())}const C2=Os({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:Ge,autoFocus:Ie,autoPlay:Ie,blocking:Ge,capture:null,charSet:null,checked:Ie,cite:null,className:Ge,cols:ce,colSpan:null,content:null,contentEditable:wt,controls:Ie,controlsList:Ge,coords:ce|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:of,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:Ge,height:ce,hidden:of,high:ce,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Ie,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:ce,pattern:null,ping:Ge,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:Ge,required:Ie,reversed:Ie,rows:ce,rowSpan:ce,sandbox:Ge,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:wt,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:Ie,useMap:null,value:wt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,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:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:wt,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:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:n0}),N2=Os({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:Nn,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:Ge,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:Ie,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:js,g2:js,glyphName:js,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:Nn,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:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nn,rev:Nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nn,requiredFeatures:Nn,requiredFonts:Nn,requiredFormats:Nn,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:Nn,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:Nn,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:Nn,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:t0}),r0=Os({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()}}),o0=Os({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:n0}),s0=Os({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),E2={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"},R2=/[A-Z]/g,Gg=/-[a-z]/g,T2=/^data[-\w.:]+$/i;function P2(e,t){const n=rf(t);let o=t,i=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&T2.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Gg,D2);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Gg.test(a)){let c=a.replace(R2,A2);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Gf}return new i(o,t)}function A2(e){return"-"+e.toLowerCase()}function D2(e){return e.charAt(1).toUpperCase()}const I2=Zv([e0,C2,r0,o0,s0],"html"),Kf=Zv([e0,N2,r0,o0,s0],"svg");function L2(e){return e.join(" ").trim()}var gs={},bd,Kg;function O2(){if(Kg)return bd;Kg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
362
+ `,h="/",m="*",x="",w="comment",b="declaration";function N(C,k){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];k=k||{};var A=1,P=1;function M(J){var K=J.match(t);K&&(A+=K.length);var te=J.lastIndexOf(p);P=~te?J.length-te:P+J.length}function _(){var J={line:A,column:P};return function(K){return K.position=new T(J),q(),K}}function T(J){this.start=J,this.end={line:A,column:P},this.source=k.source}T.prototype.content=C;function D(J){var K=new Error(k.source+":"+A+":"+P+": "+J);if(K.reason=J,K.filename=k.source,K.line=A,K.column=P,K.source=C,!k.silent)throw K}function B(J){var K=J.exec(C);if(K){var te=K[0];return M(te),C=C.slice(te.length),K}}function q(){B(n)}function R(J){var K;for(J=J||[];K=L();)K!==!1&&J.push(K);return J}function L(){var J=_();if(!(h!=C.charAt(0)||m!=C.charAt(1))){for(var K=2;x!=C.charAt(K)&&(m!=C.charAt(K)||h!=C.charAt(K+1));)++K;if(K+=2,x===C.charAt(K-1))return D("End of comment missing");var te=C.slice(2,K-2);return P+=2,M(te),C=C.slice(K),P+=2,J({type:w,comment:te})}}function $(){var J=_(),K=B(o);if(K){if(L(),!B(i))return D("property missing ':'");var te=B(a),ae=J({type:b,property:S(K[0].replace(e,x)),value:te?S(te[0].replace(e,x)):x});return B(c),ae}}function W(){var J=[];R(J);for(var K;K=$();)K!==!1&&(J.push(K),R(J));return J}return q(),W()}function S(C){return C?C.replace(d,x):x}return bd=N,bd}var Yg;function M2(){if(Yg)return gs;Yg=1;var e=gs&&gs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=n;const t=e(O2());function n(o,i){let a=null;if(!o||typeof o!="string")return a;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:m}=p;d?i(h,m,p):m&&(a=a||{},a[h]=m)}),a}return gs}var Ni={},Xg;function _2(){if(Xg)return Ni;Xg=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=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={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,d):h=h.replace(o,d),h.replace(t,c))};return Ni.camelCase=p,Ni}var Ei,Qg;function z2(){if(Qg)return Ei;Qg=1;var e=Ei&&Ei.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(M2()),n=_2();function o(i,a){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,a)]=p)}),c}return o.default=o,Ei=o,Ei}var F2=z2();const $2=Za(F2),i0=l0("end"),Yf=l0("start");function l0(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 B2(e){const t=Yf(e),n=i0(e);if(t&&n)return{start:t,end:n}}function Ii(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jg(e.position):"start"in e||"end"in e?Jg(e):"line"in e||"column"in e?lf(e):""}function lf(e){return Zg(e&&e.line)+":"+Zg(e&&e.column)}function Jg(e){return lf(e&&e.start)+"-"+lf(e&&e.end)}function Zg(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",a={},c=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(c=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?a.ruleId=o:(a.source=o.slice(0,p),a.ruleId=o.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const d=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=Ii(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qt.prototype.file="";Qt.prototype.name="";Qt.prototype.reason="";Qt.prototype.message="";Qt.prototype.stack="";Qt.prototype.column=void 0;Qt.prototype.line=void 0;Qt.prototype.ancestors=void 0;Qt.prototype.cause=void 0;Qt.prototype.fatal=void 0;Qt.prototype.place=void 0;Qt.prototype.ruleId=void 0;Qt.prototype.source=void 0;const Xf={}.hasOwnProperty,U2=new Map,H2=/[A-Z]/g,W2=new Set(["table","tbody","thead","tfoot","tr"]),V2=new Set(["td","th"]),a0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function q2(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=eE(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=Z2(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"?Kf:I2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=u0(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function u0(e,t,n){if(t.type==="element")return G2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return K2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return X2(e,t,n);if(t.type==="mdxjsEsm")return Y2(e,t);if(t.type==="root")return Q2(e,t,n);if(t.type==="text")return J2(e,t)}function G2(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=Kf,e.schema=i),e.ancestors.push(t);const a=d0(e,t.tagName,!1),c=tE(e,t);let d=Jf(e,t);return W2.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!S2(p):!0})),c0(e,c,a,t),Qf(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function K2(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)}Bi(e,t.position)}function Y2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bi(e,t.position)}function X2(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=Kf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:d0(e,t.name,!0),c=nE(e,t),d=Jf(e,t);return c0(e,c,a,t),Qf(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function Q2(e,t,n){const o={};return Qf(o,Jf(e,t)),e.create(t,e.Fragment,o,n)}function J2(e,t){return t.value}function c0(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Qf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Z2(e,t,n){return o;function o(i,a,c,d){const h=Array.isArray(c.children)?n:t;return d?h(a,c,d):h(a,c)}}function eE(e,t){return n;function n(o,i,a,c){const d=Array.isArray(a.children),p=Yf(o);return t(i,a,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function tE(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Xf.call(t.properties,i)){const a=rE(e,i,t.properties[i]);if(a){const[c,d]=a;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&V2.has(t.tagName)?o=d:n[c]=d}}if(o){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function nE(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const a=o.data.estree.body[0];a.type;const c=a.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Bi(e,t.position);else{const i=o.name;let a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const d=o.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else Bi(e,t.position);else a=o.value===null?!0:o.value;n[i]=a}return n}function Jf(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:U2;for(;++o<t.children.length;){const a=t.children[o];let c;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const h=i.get(p)||0;c=p+"-"+h,i.set(p,h+1)}}const d=u0(e,a,c);d!==void 0&&n.push(d)}return n}function rE(e,t,n){const o=P2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?y2(n):L2(n)),o.property==="style"){let i=typeof n=="object"?n:oE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=sE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?E2[o.property]||o.property:o.attribute,n]}}function oE(e,t){try{return $2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new Qt("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=a0+"#cannot-parse-style-attribute",i}}function d0(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,c;for(;++a<i.length;){const d=Wg(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}o=c}else o=Wg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Xf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Bi(e)}function Bi(e,t){const n=new Qt("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=a0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sE(e){const t={};let n;for(n in e)Xf.call(e,n)&&(t[iE(n)]=e[n]);return t}function iE(e){let t=e.replace(H2,lE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lE(e){return"-"+e.toLowerCase()}const wd={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"]},aE={};function uE(e,t){const n=aE,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return f0(e,o,i)}function f0(e,t,n){if(cE(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 ex(e.children,t,n)}return Array.isArray(e)?ex(e,t,n):""}function ex(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=f0(e[i],t,n);return o.join("")}function cE(e){return!!(e&&typeof e=="object")}const tx=document.createElement("i");function Zf(e){const t="&"+e+";";tx.innerHTML=t;const n=tx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kr(e,t,n,o){const i=e.length;let a=0,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)c=Array.from(o),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);a<o.length;)c=o.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function $n(e,t){return e.length>0?(kr(e,e.length,0,t),e):t}const nx={}.hasOwnProperty;function dE(e){const t={};let n=-1;for(;++n<e.length;)fE(t,e[n]);return t}function fE(e,t){let n;for(n in t){const i=(nx.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){nx.call(i,c)||(i[c]=[]);const d=a[c];pE(i[c],Array.isArray(d)?d:d?[d]:[])}}}function pE(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);kr(e,0,0,o)}function p0(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 Cs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gr=jo(/[A-Za-z]/),Tn=jo(/[\dA-Za-z]/),hE=jo(/[#-'*+\--9=?A-Z^-~]/);function af(e){return e!==null&&(e<32||e===127)}const uf=jo(/\d/),mE=jo(/[\dA-Fa-f]/),gE=jo(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}const xE=jo(new RegExp("\\p{P}|\\p{S}","u")),yE=jo(/\s/);function jo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ms(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let c="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(n+1);a<56320&&d>56319&&d<57344?(c=String.fromCharCode(a,d),i=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(o,n),encodeURIComponent(c)),o=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function Ke(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return Be(p)?(e.enter(n),d(p)):t(p)}function d(p){return Be(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const vE={tokenize:bE};function bE(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"),Ke(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),a(d)}function a(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Pe(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),c)}}const wE={tokenize:kE},rx={tokenize:SE};function kE(e){const t=this,n=[];let o=0,i,a,c;return d;function d(P){if(o<n.length){const M=n[o];return t.containerState=M[1],e.attempt(M[0].continuation,p,h)(P)}return h(P)}function p(P){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const M=t.events.length;let _=M,T;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){T=t.events[_][1].end;break}k(o);let D=M;for(;D<t.events.length;)t.events[D][1].end={...T},D++;return kr(t.events,_+1,0,t.events.slice(M)),t.events.length=D,h(P)}return d(P)}function h(P){if(o===n.length){if(!i)return w(P);if(i.currentConstruct&&i.currentConstruct.concrete)return N(P);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rx,m,x)(P)}function m(P){return i&&A(),k(o),w(P)}function x(P){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(P)}function w(P){return t.containerState={},e.attempt(rx,b,N)(P)}function b(P){return o++,n.push([t.currentConstruct,t.containerState]),w(P)}function N(P){if(P===null){i&&A(),k(0),e.consume(P);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),S(P)}function S(P){if(P===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(P);return}return Pe(P)?(e.consume(P),C(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(P),S)}function C(P,M){const _=t.sliceStream(P);if(M&&_.push(null),P.previous=a,a&&(a.next=P),a=P,i.defineSkip(P.start),i.write(_),t.parser.lazy[P.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<c&&(!i.events[T][1].end||i.events[T][1].end.offset>c))return;const D=t.events.length;let B=D,q,R;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(q){R=t.events[B][1].end;break}q=!0}for(k(o),T=D;T<t.events.length;)t.events[T][1].end={...R},T++;kr(t.events,B+1,0,t.events.slice(D)),t.events.length=T}}function k(P){let M=n.length;for(;M-- >P;){const _=n[M];t.containerState=_[1],_[0].exit.call(t,e)}n.length=P}function A(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function SE(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ox(e){if(e===null||mn(e)||yE(e))return 1;if(xE(e))return 2}function ep(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!o.includes(a)&&(t=a(t,n),o.push(a))}return t}const cf={name:"attention",resolveAll:jE,tokenize:CE};function jE(e,t){let n=-1,o,i,a,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},w={...e[n][1].start};sx(x,-p),sx(w,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:w},a={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[o][1].end={...c.start},e[n][1].start={...d.end},h=[],e[o][1].end.offset-e[o][1].start.offset&&(h=$n(h,[["enter",e[o][1],t],["exit",e[o][1],t]])),h=$n(h,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",a,t]]),h=$n(h,ep(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),h=$n(h,[["exit",a,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=$n(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,kr(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 CE(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=ox(o);let a;return c;function c(p){return a=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===a)return e.consume(p),d;const h=e.exit("attentionSequence"),m=ox(p),x=!m||m===2&&i||n.includes(p),w=!i||i===2&&m||n.includes(o);return h._open=!!(a===42?x:x&&(i||!w)),h._close=!!(a===42?w:w&&(m||!x)),t(p)}}function sx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const NE={name:"autolink",tokenize:EE};function EE(e,t,n){let o=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return gr(b)?(e.consume(b),c):b===64?n(b):h(b)}function c(b){return b===43||b===45||b===46||Tn(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||Tn(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||af(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):hE(b)?(e.consume(b),h):n(b)}function m(b){return Tn(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):w(b)}function w(b){if((b===45||Tn(b))&&o++<63){const N=b===45?w:x;return e.consume(b),N}return n(b)}}const au={partial:!0,tokenize:RE};function RE(e,t,n){return o;function o(a){return Be(a)?Ke(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Pe(a)?t(a):n(a)}}const h0={continuation:{tokenize:PE},exit:AE,name:"blockQuote",tokenize:TE};function TE(e,t,n){const o=this;return i;function i(c){if(c===62){const d=o.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return n(c)}function a(c){return Be(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function PE(e,t,n){const o=this;return i;function i(c){return Be(c)?Ke(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(h0,t,n)(c)}}function AE(e){e.exit("blockQuote")}const m0={name:"characterEscape",tokenize:DE};function DE(e,t,n){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return gE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const g0={name:"characterReference",tokenize:IE};function IE(e,t,n){const o=this;let i=0,a,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,c=Tn,m(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=mE,m):(e.enter("characterReferenceValue"),a=7,c=uf,m(x))}function m(x){if(x===59&&i){const w=e.exit("characterReferenceValue");return c===Tn&&!Zf(o.sliceSerialize(w))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<a?(e.consume(x),m):n(x)}}const ix={partial:!0,tokenize:OE},lx={concrete:!0,name:"codeFenced",tokenize:LE};function LE(e,t,n){const o=this,i={partial:!0,tokenize:_};let a=0,c=0,d;return p;function p(T){return h(T)}function h(T){const D=o.events[o.events.length-1];return a=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,d=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(T)}function m(T){return T===d?(c++,e.consume(T),m):c<3?n(T):(e.exit("codeFencedFenceSequence"),Be(T)?Ke(e,x,"whitespace")(T):x(T))}function x(T){return T===null||Pe(T)?(e.exit("codeFencedFence"),o.interrupt?t(T):e.check(ix,S,M)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(T))}function w(T){return T===null||Pe(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(T)):Be(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,b,"whitespace")(T)):T===96&&T===d?n(T):(e.consume(T),w)}function b(T){return T===null||Pe(T)?x(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(T))}function N(T){return T===null||Pe(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(T)):T===96&&T===d?n(T):(e.consume(T),N)}function S(T){return e.attempt(i,M,C)(T)}function C(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),k}function k(T){return a>0&&Be(T)?Ke(e,A,"linePrefix",a+1)(T):A(T)}function A(T){return T===null||Pe(T)?e.check(ix,S,M)(T):(e.enter("codeFlowValue"),P(T))}function P(T){return T===null||Pe(T)?(e.exit("codeFlowValue"),A(T)):(e.consume(T),P)}function M(T){return e.exit("codeFenced"),t(T)}function _(T,D,B){let q=0;return R;function R(K){return T.enter("lineEnding"),T.consume(K),T.exit("lineEnding"),L}function L(K){return T.enter("codeFencedFence"),Be(K)?Ke(T,$,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):$(K)}function $(K){return K===d?(T.enter("codeFencedFenceSequence"),W(K)):B(K)}function W(K){return K===d?(q++,T.consume(K),W):q>=c?(T.exit("codeFencedFenceSequence"),Be(K)?Ke(T,J,"whitespace")(K):J(K)):B(K)}function J(K){return K===null||Pe(K)?(T.exit("codeFencedFence"),D(K)):B(K)}}}function OE(e,t,n){const o=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const kd={name:"codeIndented",tokenize:_E},ME={partial:!0,tokenize:zE};function _E(e,t,n){const o=this;return i;function i(h){return e.enter("codeIndented"),Ke(e,a,"linePrefix",5)(h)}function a(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):Pe(h)?e.attempt(ME,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Pe(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function zE(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):Pe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):Ke(e,a,"linePrefix",5)(c)}function a(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Pe(c)?i(c):n(c)}}const FE={name:"codeText",previous:BE,resolve:$E,tokenize:UE};function $E(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 BE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UE(e,t,n){let o=0,i,a;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),o++,d):(e.exit("codeTextSequence"),p(x))}function p(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),p):x===96?(a=e.enter("codeTextSequence"),i=0,m(x)):Pe(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||Pe(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)):(a.type="codeTextData",h(x))}}class HE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&Ri(this.left,o),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ri(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ri(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);Ri(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ri(this.left,n.reverse())}}}function Ri(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 x0(e){const t={};let n=-1,o,i,a,c,d,p,h;const m=new HE(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,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,WE(m,n)),n=t[n],h=!0);else if(o[1]._container){for(a=n,i=void 0;a--;)if(c=m.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(o[1].end={...m.get(i)[1].start},d=m.slice(i,n),d.unshift(o),m.splice(i,n-i+1,d))}}return kr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function WE(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const a=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],h={};let m,x,w=-1,b=n,N=0,S=0;const C=[S];for(;b;){for(;e.get(++i)[1]!==b;);a.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;++w<d.length;)d[w][0]==="exit"&&d[w-1][0]==="enter"&&d[w][1].type===d[w-1][1].type&&d[w][1].start.line!==d[w][1].end.line&&(S=w+1,C.push(S),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),w=C.length;w--;){const k=d.slice(C[w],C[w+1]),A=a.pop();p.push([A,A+k.length-1]),e.splice(A,2,k)}for(p.reverse(),w=-1;++w<p.length;)h[N+p[w][0]]=N+p[w][1],N+=p[w][1]-p[w][0]-1;return h}const VE={resolve:GE,tokenize:KE},qE={partial:!0,tokenize:YE};function GE(e){return x0(e),e}function KE(e,t){let n;return o;function o(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?a(d):Pe(d)?e.check(qE,c,a)(d):(e.consume(d),i)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function YE(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ke(e,a,"linePrefix")}function a(c){if(c===null||Pe(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 y0(e,t,n,o,i,a,c,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(k){return k===60?(e.enter(o),e.enter(i),e.enter(a),e.consume(k),e.exit(a),w):k===null||k===32||k===41||af(k)?n(k):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),S(k))}function w(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(e.exit("chunkString"),e.exit(d),w(k)):k===null||k===60||Pe(k)?n(k):(e.consume(k),k===92?N:b)}function N(k){return k===60||k===62||k===92?(e.consume(k),b):b(k)}function S(k){return!m&&(k===null||k===41||mn(k))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(k)):m<h&&k===40?(e.consume(k),m++,S):k===41?(e.consume(k),m--,S):k===null||k===32||k===40||af(k)?n(k):(e.consume(k),k===92?C:S)}function C(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function v0(e,t,n,o,i,a){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(a),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(a),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Pe(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||Pe(b)||d++>999?(e.exit("chunkString"),m(b)):(e.consume(b),p||(p=!Be(b)),b===92?w:x)}function w(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function b0(e,t,n,o,i,a){let c;return d;function d(w){return w===34||w===39||w===40?(e.enter(o),e.enter(i),e.consume(w),e.exit(i),c=w===40?41:w,p):n(w)}function p(w){return w===c?(e.enter(i),e.consume(w),e.exit(i),e.exit(o),t):(e.enter(a),h(w))}function h(w){return w===c?(e.exit(a),p(c)):w===null?n(w):Pe(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Ke(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===c||w===null||Pe(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?x:m)}function x(w){return w===c||w===92?(e.consume(w),m):m(w)}}function Li(e,t){let n;return o;function o(i){return Pe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):Be(i)?Ke(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const XE={name:"definition",tokenize:JE},QE={partial:!0,tokenize:ZE};function JE(e,t,n){const o=this;let i;return a;function a(b){return e.enter("definition"),c(b)}function c(b){return v0.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Cs(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 mn(b)?Li(e,h)(b):h(b)}function h(b){return y0(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(QE,x,x)(b)}function x(b){return Be(b)?Ke(e,w,"whitespace")(b):w(b)}function w(b){return b===null||Pe(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function ZE(e,t,n){return o;function o(d){return mn(d)?Li(e,i)(d):n(d)}function i(d){return b0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return Be(d)?Ke(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Pe(d)?t(d):n(d)}}const eR={name:"hardBreakEscape",tokenize:tR};function tR(e,t,n){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Pe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const nR={name:"headingAtx",resolve:rR,tokenize:oR};function rR(e,t){let n=e.length-2,o=3,i,a;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},a={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},kr(e,o,n-o+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function oR(e,t,n){let o=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&o++<6?(e.consume(m),c):m===null||mn(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),p(m)):m===null||Pe(m)?(e.exit("atxHeading"),t(m)):Be(m)?Ke(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||mn(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const sR=["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"],ax=["pre","script","style","textarea"],iR={concrete:!0,name:"htmlFlow",resolveTo:uR,tokenize:cR},lR={partial:!0,tokenize:fR},aR={partial:!0,tokenize:dR};function uR(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 cR(e,t,n){const o=this;let i,a,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),w):I===47?(e.consume(I),a=!0,S):I===63?(e.consume(I),i=3,o.interrupt?t:E):gr(I)?(e.consume(I),c=String.fromCharCode(I),C):n(I)}function w(I){return I===45?(e.consume(I),i=2,b):I===91?(e.consume(I),i=5,d=0,N):gr(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 Z="CDATA[";return I===Z.charCodeAt(d++)?(e.consume(I),d===Z.length?o.interrupt?t:$:N):n(I)}function S(I){return gr(I)?(e.consume(I),c=String.fromCharCode(I),C):n(I)}function C(I){if(I===null||I===47||I===62||mn(I)){const Z=I===47,fe=c.toLowerCase();return!Z&&!a&&ax.includes(fe)?(i=1,o.interrupt?t(I):$(I)):sR.includes(c.toLowerCase())?(i=6,Z?(e.consume(I),k):o.interrupt?t(I):$(I)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(I):a?A(I):P(I))}return I===45||Tn(I)?(e.consume(I),c+=String.fromCharCode(I),C):n(I)}function k(I){return I===62?(e.consume(I),o.interrupt?t:$):n(I)}function A(I){return Be(I)?(e.consume(I),A):R(I)}function P(I){return I===47?(e.consume(I),R):I===58||I===95||gr(I)?(e.consume(I),M):Be(I)?(e.consume(I),P):R(I)}function M(I){return I===45||I===46||I===58||I===95||Tn(I)?(e.consume(I),M):_(I)}function _(I){return I===61?(e.consume(I),T):Be(I)?(e.consume(I),_):P(I)}function T(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),p=I,D):Be(I)?(e.consume(I),T):B(I)}function D(I){return I===p?(e.consume(I),p=null,q):I===null||Pe(I)?n(I):(e.consume(I),D)}function B(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mn(I)?_(I):(e.consume(I),B)}function q(I){return I===47||I===62||Be(I)?P(I):n(I)}function R(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||Pe(I)?$(I):Be(I)?(e.consume(I),L):n(I)}function $(I){return I===45&&i===2?(e.consume(I),te):I===60&&i===1?(e.consume(I),ae):I===62&&i===4?(e.consume(I),z):I===63&&i===3?(e.consume(I),E):I===93&&i===5?(e.consume(I),se):Pe(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(lR,Q,W)(I)):I===null||Pe(I)?(e.exit("htmlFlowData"),W(I)):(e.consume(I),$)}function W(I){return e.check(aR,J,Q)(I)}function J(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),K}function K(I){return I===null||Pe(I)?W(I):(e.enter("htmlFlowData"),$(I))}function te(I){return I===45?(e.consume(I),E):$(I)}function ae(I){return I===47?(e.consume(I),c="",X):$(I)}function X(I){if(I===62){const Z=c.toLowerCase();return ax.includes(Z)?(e.consume(I),z):$(I)}return gr(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),X):$(I)}function se(I){return I===93?(e.consume(I),E):$(I)}function E(I){return I===62?(e.consume(I),z):I===45&&i===2?(e.consume(I),E):$(I)}function z(I){return I===null||Pe(I)?(e.exit("htmlFlowData"),Q(I)):(e.consume(I),z)}function Q(I){return e.exit("htmlFlow"),t(I)}}function dR(e,t,n){const o=this;return i;function i(c){return Pe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):n(c)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function fR(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(au,t,n)}}const pR={name:"htmlText",tokenize:hR};function hR(e,t,n){const o=this;let i,a,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),_):E===63?(e.consume(E),P):gr(E)?(e.consume(E),B):n(E)}function h(E){return E===45?(e.consume(E),m):E===91?(e.consume(E),a=0,N):gr(E)?(e.consume(E),A):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),w):Pe(E)?(c=x,ae(E)):(e.consume(E),x)}function w(E){return E===45?(e.consume(E),b):x(E)}function b(E){return E===62?te(E):E===45?w(E):x(E)}function N(E){const z="CDATA[";return E===z.charCodeAt(a++)?(e.consume(E),a===z.length?S:N):n(E)}function S(E){return E===null?n(E):E===93?(e.consume(E),C):Pe(E)?(c=S,ae(E)):(e.consume(E),S)}function C(E){return E===93?(e.consume(E),k):S(E)}function k(E){return E===62?te(E):E===93?(e.consume(E),k):S(E)}function A(E){return E===null||E===62?te(E):Pe(E)?(c=A,ae(E)):(e.consume(E),A)}function P(E){return E===null?n(E):E===63?(e.consume(E),M):Pe(E)?(c=P,ae(E)):(e.consume(E),P)}function M(E){return E===62?te(E):P(E)}function _(E){return gr(E)?(e.consume(E),T):n(E)}function T(E){return E===45||Tn(E)?(e.consume(E),T):D(E)}function D(E){return Pe(E)?(c=D,ae(E)):Be(E)?(e.consume(E),D):te(E)}function B(E){return E===45||Tn(E)?(e.consume(E),B):E===47||E===62||mn(E)?q(E):n(E)}function q(E){return E===47?(e.consume(E),te):E===58||E===95||gr(E)?(e.consume(E),R):Pe(E)?(c=q,ae(E)):Be(E)?(e.consume(E),q):te(E)}function R(E){return E===45||E===46||E===58||E===95||Tn(E)?(e.consume(E),R):L(E)}function L(E){return E===61?(e.consume(E),$):Pe(E)?(c=L,ae(E)):Be(E)?(e.consume(E),L):q(E)}function $(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,W):Pe(E)?(c=$,ae(E)):Be(E)?(e.consume(E),$):(e.consume(E),J)}function W(E){return E===i?(e.consume(E),i=void 0,K):E===null?n(E):Pe(E)?(c=W,ae(E)):(e.consume(E),W)}function J(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||mn(E)?q(E):(e.consume(E),J)}function K(E){return E===47||E===62||mn(E)?q(E):n(E)}function te(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function ae(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),X}function X(E){return Be(E)?Ke(e,se,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):se(E)}function se(E){return e.enter("htmlTextData"),c(E)}}const tp={name:"labelEnd",resolveAll:yR,resolveTo:vR,tokenize:bR},mR={tokenize:wR},gR={tokenize:kR},xR={tokenize:SR};function yR(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&&kr(e,0,e.length,n),e}function vR(e,t){let n=e.length,o=0,i,a,c,d;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[a+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",h,t]],d=$n(d,e.slice(a+1,a+o+3)),d=$n(d,[["enter",m,t]]),d=$n(d,ep(t.parser.constructs.insideSpan.null,e.slice(a+o+4,c-3),t)),d=$n(d,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),d=$n(d,e.slice(c+1)),d=$n(d,[["exit",p,t]]),kr(e,a,e.length,d),e}function bR(e,t,n){const o=this;let i=o.events.length,a,c;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){a=o.events[i][1];break}return d;function d(w){return a?a._inactive?x(w):(c=o.parser.defined.includes(Cs(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),p):n(w)}function p(w){return w===40?e.attempt(mR,m,c?m:x)(w):w===91?e.attempt(gR,m,c?h:x)(w):c?m(w):x(w)}function h(w){return e.attempt(xR,m,x)(w)}function m(w){return t(w)}function x(w){return a._balanced=!0,n(w)}}function wR(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 mn(x)?Li(e,a)(x):a(x)}function a(x){return x===41?m(x):y0(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return mn(x)?Li(e,p)(x):m(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?b0(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):m(x)}function h(x){return mn(x)?Li(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 kR(e,t,n){const o=this;return i;function i(d){return v0.call(o,e,a,c,"reference","referenceMarker","referenceString")(d)}function a(d){return o.parser.defined.includes(Cs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function SR(e,t,n){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const jR={name:"labelStartImage",resolveAll:tp.resolveAll,tokenize:CR};function CR(e,t,n){const o=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),a}function a(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):t(d)}}const NR={name:"labelStartLink",resolveAll:tp.resolveAll,tokenize:ER};function ER(e,t,n){const o=this;return i;function i(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const Sd={name:"lineEnding",tokenize:RR};function RR(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Aa={name:"thematicBreak",tokenize:TR};function TR(e,t,n){let o=0,i;return a;function a(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||Pe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),o++,p):(e.exit("thematicBreakSequence"),Be(h)?Ke(e,d,"whitespace")(h):d(h))}}const pn={continuation:{tokenize:IR},exit:OR,name:"list",tokenize:DR},PR={partial:!0,tokenize:MR},AR={partial:!0,tokenize:LR};function DR(e,t,n){const o=this,i=o.events[o.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,c=0;return d;function d(b){const N=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:uf(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(Aa,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 uf(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(au,o.interrupt?n:m,e.attempt(PR,w,x))}function m(b){return o.containerState.initialBlankLine=!0,a++,w(b)}function x(b){return Be(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),w):n(b)}function w(b){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function IR(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(au,i,a);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ke(e,t,"listItemIndent",o.containerState.size+1)(d)}function a(d){return o.containerState.furtherBlankLines||!Be(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(AR,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ke(e,e.attempt(pn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function LR(e,t,n){const o=this;return Ke(e,i,"listItemIndent",o.containerState.size+1);function i(a){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?t(a):n(a)}}function OR(e){e.exit(this.containerState.type)}function MR(e,t,n){const o=this;return Ke(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const c=o.events[o.events.length-1];return!Be(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ux={name:"setextUnderline",resolveTo:_R,tokenize:zR};function _R(e,t){let n=e.length,o,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const c={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",c,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end={...e[a][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function zR(e,t,n){const o=this;let i;return a;function a(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"),Be(h)?Ke(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Pe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const FR={tokenize:$R};function $R(e){const t=this,n=e.attempt(au,o,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(VE,i)),"linePrefix")));return n;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const BR={resolveAll:k0()},UR=w0("string"),HR=w0("text");function w0(e){return{resolveAll:k0(e==="text"?WR:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],a=n.attempt(i,c,d);return c;function c(m){return h(m)?a(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"),a(m)):(n.consume(m),p)}function h(m){if(m===null)return!0;const x=i[m];let w=-1;if(x)for(;++w<x.length;){const b=x[w];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function k0(e){return t;function t(n,o){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,o):n}}function WR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const o=e[n-1][1],i=t.sliceStream(o);let a=i.length,c=-1,d=0,p;for(;a--;){const h=i[a];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){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:o.start._bufferIndex+c,_index:o.start._index+a,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...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 VR={42:pn,43:pn,45:pn,48:pn,49:pn,50:pn,51:pn,52:pn,53:pn,54:pn,55:pn,56:pn,57:pn,62:h0},qR={91:XE},GR={[-2]:kd,[-1]:kd,32:kd},KR={35:nR,42:Aa,45:[ux,Aa],60:iR,61:ux,95:Aa,96:lx,126:lx},YR={38:g0,92:m0},XR={[-5]:Sd,[-4]:Sd,[-3]:Sd,33:jR,38:g0,42:cf,60:[NE,pR],91:NR,92:[eR,m0],93:tp,95:cf,96:FE},QR={null:[cf,BR]},JR={null:[42,95]},ZR={null:[]},eT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JR,contentInitial:qR,disable:ZR,document:VR,flow:KR,flowInitial:GR,insideSpan:QR,string:YR,text:XR},Symbol.toStringTag,{value:"Module"}));function tT(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let c=[],d=[];const p={attempt:D(_),check:D(T),consume:A,enter:P,exit:M,interrupt:D(T,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:N,parser:e,previous:null,sliceSerialize:w,sliceStream:b,write:x};let m=t.tokenize.call(h,p);return t.resolveAll&&a.push(t),h;function x(L){return c=$n(c,L),C(),c[c.length-1]!==null?[]:(B(t,0),h.events=ep(a,h.events,h),h.events)}function w(L,$){return rT(b(L),$)}function b(L){return nT(c,L)}function N(){const{_bufferIndex:L,_index:$,line:W,column:J,offset:K}=o;return{_bufferIndex:L,_index:$,line:W,column:J,offset:K}}function S(L){i[L.line]=L.column,R()}function C(){let L;for(;o._index<c.length;){const $=c[o._index];if(typeof $=="string")for(L=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===L&&o._bufferIndex<$.length;)k($.charCodeAt(o._bufferIndex));else k($)}}function k(L){m=m(L)}function A(L){Pe(L)?(o.line++,o.column=1,o.offset+=L===-3?2:1,R()):L!==-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=L}function P(L,$){const W=$||{};return W.type=L,W.start=N(),h.events.push(["enter",W,h]),d.push(W),W}function M(L){const $=d.pop();return $.end=N(),h.events.push(["exit",$,h]),$}function _(L,$){B(L,$.from)}function T(L,$){$.restore()}function D(L,$){return W;function W(J,K,te){let ae,X,se,E;return Array.isArray(J)?Q(J):"tokenize"in J?Q([J]):z(J);function z(re){return Ee;function Ee(Se){const Re=Se!==null&&re[Se],be=Se!==null&&re.null,Ue=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(Ue)(Se)}}function Q(re){return ae=re,X=0,re.length===0?te:I(re[X])}function I(re){return Ee;function Ee(Se){return E=q(),se=re,re.partial||(h.currentConstruct=re),re.name&&h.parser.constructs.disable.null.includes(re.name)?fe():re.tokenize.call($?Object.assign(Object.create(h),$):h,p,Z,fe)(Se)}}function Z(re){return L(se,E),K}function fe(re){return E.restore(),++X<ae.length?I(ae[X]):te}}}function B(L,$){L.resolveAll&&!a.includes(L)&&a.push(L),L.resolve&&kr(h.events,$,h.events.length-$,L.resolve(h.events.slice($),h)),L.resolveTo&&(h.events=L.resolveTo(h.events,h))}function q(){const L=N(),$=h.previous,W=h.currentConstruct,J=h.events.length,K=Array.from(d);return{from:J,restore:te};function te(){o=L,h.previous=$,h.currentConstruct=W,h.events.length=J,d=K,R()}}function R(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function nT(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,a)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}a>0&&c.push(e[i].slice(0,a))}return c}function rT(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const a=e[n];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
363
+ `;break}case-3:{c=`\r
364
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(a)}i=a===-2,o.push(c)}return o.join("")}function oT(e){const o={constructs:dE([eT,...(e||{}).extensions||[]]),content:i(vE),defined:[],document:i(wE),flow:i(FR),lazy:{},string:i(UR),text:i(HR)};return o;function i(a){return c;function c(d){return tT(o,a,d)}}}function sT(e){for(;!x0(e););return e}const cx=/[\0\t\n\r]/g;function iT(){let e=1,t="",n=!0,o;return i;function i(a,c,d){const p=[];let h,m,x,w,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),x=0,t="",n&&(a.charCodeAt(0)===65279&&x++,n=void 0);x<a.length;){if(cx.lastIndex=x,h=cx.exec(a),w=h&&h.index!==void 0?h.index:a.length,b=a.charCodeAt(w),!h){t=a.slice(x);break}if(b===10&&x===w&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),x<w&&(p.push(a.slice(x,w)),e+=w-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=w+1}return d&&(o&&p.push(-5),t&&p.push(t),p.push(null)),p}}const lT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aT(e){return e.replace(lT,uT)}function uT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return p0(n.slice(a?2:1),a?16:10)}return Zf(n)||e}const S0={}.hasOwnProperty;function cT(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dT(n)(sT(oT(n).document().write(iT()(e,t,!0))))}function dT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(At),autolinkProtocol:q,autolinkEmail:q,atxHeading:a($t),blockQuote:a(be),characterEscape:q,characterReference:q,codeFenced:a(Ue),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Ue,c),codeText:a(at,c),codeTextData:q,data:q,codeFlowValue:q,definition:a(ft),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(yt),hardBreakEscape:a(Bt),hardBreakTrailing:a(Bt),htmlFlow:a(_t,c),htmlFlowData:q,htmlText:a(_t,c),htmlTextData:q,image:a(vn),label:c,link:a(At),listItem:a(Jt),listItemValue:w,listOrdered:a(pt,x),listUnordered:a(pt),paragraph:a(An),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a($t),strong:a(vt),thematicBreak:a(lr)},exit:{atxHeading:p(),atxHeadingSequence:_,autolink:p(),autolinkEmail:Re,autolinkProtocol:Se,blockQuote:p(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:re,characterReference:Ee,codeFenced:p(C),codeFencedFence:S,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:R,codeIndented:p(k),codeText:p(K),codeTextData:R,data:R,definition:p(),definitionDestinationString:M,definitionLabelString:A,definitionTitleString:P,emphasis:p(),hardBreakEscape:p($),hardBreakTrailing:p($),htmlFlow:p(W),htmlFlowData:R,htmlText:p(J),htmlTextData:R,image:p(ae),label:se,labelText:X,lineEnding:L,link:p(te),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Z,resourceDestinationString:E,resourceTitleString:z,resource:Q,setextHeading:p(B),setextHeadingLineSequence:D,setextHeadingText:T,strong:p(),thematicBreak:p()}};j0(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(ee){let ue={type:"root",children:[]};const ve={stack:[ue],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:m,data:n},Ne=[];let U=-1;for(;++U<ee.length;)if(ee[U][1].type==="listOrdered"||ee[U][1].type==="listUnordered")if(ee[U][0]==="enter")Ne.push(U);else{const ie=Ne.pop();U=i(ee,ie,U)}for(U=-1;++U<ee.length;){const ie=t[ee[U][0]];S0.call(ie,ee[U][1].type)&&ie[ee[U][1].type].call(Object.assign({sliceSerialize:ee[U][2].sliceSerialize},ve),ee[U][1])}if(ve.tokenStack.length>0){const ie=ve.tokenStack[ve.tokenStack.length-1];(ie[1]||dx).call(ve,void 0,ie[0])}for(ue.position={start:go(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:go(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)ue=t.transforms[U](ue)||ue;return ue}function i(ee,ue,ve){let Ne=ue-1,U=-1,ie=!1,we,ze,on,ut;for(;++Ne<=ve;){const He=ee[Ne];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?U++:U--,ut=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(we&&!ut&&!U&&!on&&(on=Ne),ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ut=void 0}if(!U&&He[0]==="enter"&&He[1].type==="listItemPrefix"||U===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(we){let Ve=Ne;for(ze=void 0;Ve--;){const ht=ee[Ve];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;ze&&(ee[ze][1].type="lineEndingBlank",ie=!0),ht[1].type="lineEnding",ze=Ve}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}on&&(!ze||on<ze)&&(we._spread=!0),we.end=Object.assign({},ze?ee[ze][1].start:He[1].end),ee.splice(ze||Ne,0,["exit",we,He[2]]),Ne++,ve++}if(He[1].type==="listItemPrefix"){const Ve={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};we=Ve,ee.splice(Ne,0,["enter",Ve,He[2]]),Ne++,ve++,on=void 0,ut=!0}}}return ee[ue][1]._spread=ie,ve}function a(ee,ue){return ve;function ve(Ne){d.call(this,ee(Ne),Ne),ue&&ue.call(this,Ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ee,ue,ve){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([ue,ve||void 0]),ee.position={start:go(ue.start),end:void 0}}function p(ee){return ue;function ue(ve){ee&&ee.call(this,ve),h.call(this,ve)}}function h(ee,ue){const ve=this.stack.pop(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==ee.type&&(ue?ue.call(this,ee,Ne[0]):(Ne[1]||dx).call(this,ee,Ne[0]));else throw new Error("Cannot close `"+ee.type+"` ("+Ii({start:ee.start,end:ee.end})+"): it’s not open");ve.position.end=go(ee.end)}function m(){return uE(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function w(ee){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=ee}function N(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=ee}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee.replace(/(\r?\n|\r)$/g,"")}function A(ee){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ue,ve.identifier=Cs(this.sliceSerialize(ee)).toLowerCase()}function P(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.title=ee}function M(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.url=ee}function _(ee){const ue=this.stack[this.stack.length-1];if(!ue.depth){const ve=this.sliceSerialize(ee).length;ue.depth=ve}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function D(ee){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function q(ee){const ve=this.stack[this.stack.length-1].children;let Ne=ve[ve.length-1];(!Ne||Ne.type!=="text")&&(Ne=Nr(),Ne.position={start:go(ee.start),end:void 0},ve.push(Ne)),this.stack.push(Ne)}function R(ee){const ue=this.stack.pop();ue.value+=this.sliceSerialize(ee),ue.position.end=go(ee.end)}function L(ee){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ue.children[ue.children.length-1];ve.position.end=go(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(q.call(this,ee),R.call(this,ee))}function $(){this.data.atHardBreak=!0}function W(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function J(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function K(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.value=ee}function te(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ue,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function ae(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ue,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function X(ee){const ue=this.sliceSerialize(ee),ve=this.stack[this.stack.length-2];ve.label=aT(ue),ve.identifier=Cs(ue).toLowerCase()}function se(){const ee=this.stack[this.stack.length-1],ue=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ne=ee.children;ve.children=Ne}else ve.alt=ue}function E(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.url=ee}function z(){const ee=this.resume(),ue=this.stack[this.stack.length-1];ue.title=ee}function Q(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Z(ee){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ue,ve.identifier=Cs(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function fe(ee){this.data.characterReferenceType=ee.type}function re(ee){const ue=this.sliceSerialize(ee),ve=this.data.characterReferenceType;let Ne;ve?(Ne=p0(ue,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=Zf(ue);const U=this.stack[this.stack.length-1];U.value+=Ne}function Ee(ee){const ue=this.stack.pop();ue.position.end=go(ee.end)}function Se(ee){R.call(this,ee);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(ee)}function Re(ee){R.call(this,ee);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(ee)}function be(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function at(){return{type:"inlineCode",value:""}}function ft(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function $t(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function _t(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function pt(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Jt(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function An(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function Nr(){return{type:"text",value:""}}function lr(){return{type:"thematicBreak"}}}function go(e){return{line:e.line,column:e.column,offset:e.offset}}function j0(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?j0(e,o):fT(e,o)}}function fT(e,t){let n;for(n in t)if(S0.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 dx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ii({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ii({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ii({start:t.start,end:t.end})+") is still open")}function pT(e){const t=this;t.parser=n;function n(o){return cT(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function hT(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 mT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
365
+ `}]}function gT(e,t){const n=t.value?t.value+`
366
+ `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function xT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Ms(o.toLowerCase()),a=e.footnoteOrder.indexOf(o);let c,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),c=e.footnoteOrder.length):c=a+1,d+=1,e.footnoteCounts.set(o,d);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}function bT(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 wT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function C0(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const c=i[i.length-1];return c&&c.type==="text"?c.value+=o:i.push({type:"text",value:o}),i}function kT(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return C0(e,t);const i={src:Ms(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function ST(e,t){const n={src:Ms(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 jT(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 CT(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return C0(e,t);const i={href:Ms(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function NT(e,t){const n={href:Ms(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 ET(e,t,n){const o=e.all(t),i=n?RT(n):N0(t),a={},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:[]}),a.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:`
367
+ `}),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:`
368
+ `});const h={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,h),e.applyData(t,h)}function RT(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=N0(n[o])}return t}function N0(e){const t=e.spread;return t??e.children.length>1}function TT(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const c=o[i];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function PT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function DT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IT(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=Yf(t.children[1]),p=i0(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function LT(e,t,n){const o=n?n.children:void 0,a=(o?o.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const h=[];for(;++p<d;){const x=t.children[p],w={},b=c?c[p]:void 0;b&&(w.align=b);let N={type:"element",tagName:a,properties:w,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 OT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fx=9,px=32;function MT(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const a=[];for(;o;)a.push(hx(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return a.push(hx(t.slice(i),i>0,!1)),a.join("")}function hx(e,t,n){let o=0,i=e.length;if(t){let a=e.codePointAt(o);for(;a===fx||a===px;)o++,a=e.codePointAt(o)}if(n){let a=e.codePointAt(i-1);for(;a===fx||a===px;)i--,a=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function _T(e,t){const n={type:"text",value:MT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FT={blockquote:hT,break:mT,code:gT,delete:xT,emphasis:yT,footnoteReference:vT,heading:bT,html:wT,imageReference:kT,image:ST,inlineCode:jT,linkReference:CT,link:NT,listItem:ET,list:TT,paragraph:PT,root:AT,strong:DT,table:IT,tableCell:OT,tableRow:LT,text:_T,thematicBreak:zT,toml:ga,yaml:ga,definition:ga,footnoteDefinition:ga};function ga(){}const E0=-1,uu=0,Oi=1,Fa=2,np=3,rp=4,op=5,sp=6,R0=7,T0=8,mx=typeof self=="object"?self:globalThis,$T=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),o=i=>{if(e.has(i))return e.get(i);const[a,c]=t[i];switch(a){case uu:case E0:return n(c,i);case Oi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case Fa:{const d=n({},i);for(const[p,h]of c)d[o(p)]=o(h);return d}case np:return n(new Date(c),i);case rp:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case op:{const d=n(new Map,i);for(const[p,h]of c)d.set(o(p),o(h));return d}case sp:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case R0:{const{name:d,message:p}=c;return n(new mx[d](p),i)}case T0: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 mx[a](c),i)};return o},gx=e=>$T(new Map,e)(0),xs="",{toString:BT}={},{keys:UT}=Object,Ti=e=>{const t=typeof e;if(t!=="object"||!e)return[uu,t];const n=BT.call(e).slice(8,-1);switch(n){case"Array":return[Oi,xs];case"Object":return[Fa,xs];case"Date":return[np,xs];case"RegExp":return[rp,xs];case"Map":return[op,xs];case"Set":return[sp,xs];case"DataView":return[Oi,n]}return n.includes("Array")?[Oi,n]:n.includes("Error")?[R0,n]:[Fa,n]},xa=([e,t])=>e===uu&&(t==="function"||t==="symbol"),HT=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},a=c=>{if(n.has(c))return n.get(c);let[d,p]=Ti(c);switch(d){case uu:{let m=c;switch(p){case"bigint":d=T0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([E0],c)}return i([d,m],c)}case Oi:{if(p){let w=c;return p==="DataView"?w=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(w=new Uint8Array(c)),i([p,[...w]],c)}const m=[],x=i([d,m],c);for(const w of c)m.push(a(w));return x}case Fa:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const m=[],x=i([d,m],c);for(const w of UT(c))(e||!xa(Ti(c[w])))&&m.push([a(w),a(c[w])]);return x}case np:return i([d,c.toISOString()],c);case rp:{const{source:m,flags:x}=c;return i([d,{source:m,flags:x}],c)}case op:{const m=[],x=i([d,m],c);for(const[w,b]of c)(e||!(xa(Ti(w))||xa(Ti(b))))&&m.push([a(w),a(b)]);return x}case sp:{const m=[],x=i([d,m],c);for(const w of c)(e||!xa(Ti(w)))&&m.push(a(w));return x}}const{message:h}=c;return i([d,{name:p,message:h}],c)};return a},xx=(e,{json:t,lossy:n}={})=>{const o=[];return HT(!(t||n),!!t,new Map,o)(e),o},$a=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gx(xx(e,t)):structuredClone(e):(e,t)=>gx(xx(e,t));function WT(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 VT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WT,o=e.options.footnoteBackLabel||VT,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const m=e.all(h),x=String(h.identifier).toUpperCase(),w=Ms(x.toLowerCase());let b=0;const N=[],S=e.footnoteCounts.get(x);for(;S!==void 0&&++b<=S;){N.length>0&&N.push({type:"text",value:" "});let A=typeof n=="string"?n:n(p,b);typeof A=="string"&&(A={type:"text",value:A}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+w+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const A=C.children[C.children.length-1];A&&A.type==="text"?A.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...N)}else m.push(...N);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+w},children:e.wrap(m,!0)};e.patch(h,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...$a(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
369
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
370
+ `}]}}const P0=(function(e){if(e==null)return XT;if(typeof e=="function")return cu(e);if(typeof e=="object")return Array.isArray(e)?GT(e):KT(e);if(typeof e=="string")return YT(e);throw new Error("Expected function, string, or object as test")});function GT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=P0(e[n]);return cu(o);function o(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function KT(e){const t=e;return cu(n);function n(o){const i=o;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function YT(e){return cu(t);function t(n){return n&&n.type===e}}function cu(e){return t;function t(n,o,i){return!!(QT(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function XT(){return!0}function QT(e){return e!==null&&typeof e=="object"&&"type"in e}const A0=[],JT=!0,yx=!1,ZT="skip";function eP(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const a=P0(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(w,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return w;function w(){let b=A0,N,S,C;if((!t||a(p,h,m[m.length-1]||void 0))&&(b=tP(n(p,m)),b[0]===yx))return b;if("children"in p&&p.children){const k=p;if(k.children&&b[0]!==ZT)for(S=(o?k.children.length:-1)+c,C=m.concat(k);S>-1&&S<k.children.length;){const A=k.children[S];if(N=d(A,S,C)(),N[0]===yx)return N;S=typeof N[1]=="number"?N[1]:S+c}}return b}}}function tP(e){return Array.isArray(e)?e:typeof e=="number"?[JT,e]:e==null?A0:[e]}function D0(e,t,n,o){let i,a,c;typeof t=="function"&&typeof n!="function"?(a=void 0,c=t,i=n):(a=t,c=n,i=o),eP(e,a,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 df={}.hasOwnProperty,nP={};function rP(e,t){const n=t||nP,o=new Map,i=new Map,a=new Map,c={...FT,...n.handlers},d={all:h,applyData:sP,definitionById:o,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:n,patch:oP,wrap:lP};return D0(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const x=m.type==="definition"?o:i,w=String(m.identifier).toUpperCase();x.has(w)||x.set(w,m)}}),d;function p(m,x){const w=m.type,b=d.handlers[w];if(df.call(d.handlers,w)&&b)return b(d,m,x);if(d.options.passThrough&&d.options.passThrough.includes(w)){if("children"in m){const{children:S,...C}=m,k=$a(C);return k.children=d.all(m),k}return $a(m)}return(d.options.unknownHandler||iP)(d,m,x)}function h(m){const x=[];if("children"in m){const w=m.children;let b=-1;for(;++b<w.length;){const N=d.one(w[b],m);if(N){if(b&&w[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=vx(N.value)),!Array.isArray(N)&&N.type==="element")){const S=N.children[0];S&&S.type==="text"&&(S.value=vx(S.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function oP(e,t){e.position&&(t.position=B2(e))}function sP(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const c="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:c}}n.type==="element"&&a&&Object.assign(n.properties,$a(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function iP(e,t){const n=t.data||{},o="value"in t&&!(df.call(n,"hProperties")||df.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function lP(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
371
+ `});++o<e.length;)o&&n.push({type:"text",value:`
372
+ `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
373
+ `}),n}function vx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bx(e,t){const n=rP(e,t),o=n.one(e,void 0),i=qT(n),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
374
+ `},i),a}function aP(e,t){return e&&"run"in e?async function(n,o){const i=bx(n,{file:o,...t});await e.run(i,o)}:function(n,o){return bx(n,{file:o,...e||t})}}function wx(e){if(e)throw e}var jd,kx;function uP(){if(kx)return jd;kx=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]"},a=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 w;for(w in h);return typeof w>"u"||e.call(h,w)},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 jd=function p(){var h,m,x,w,b,N,S=arguments[0],C=1,k=arguments.length,A=!1;for(typeof S=="boolean"&&(A=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<k;++C)if(h=arguments[C],h!=null)for(m in h)x=d(S,m),w=d(h,m),S!==w&&(A&&w&&(a(w)||(b=i(w)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&a(x)?x:{},c(S,{name:m,newValue:p(A,N,w)})):typeof w<"u"&&c(S,{name:m,newValue:w}));return S},jd}var cP=uP();const Cd=Za(cP);function ff(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 dP(){const e=[],t={run:n,use:o};return t;function n(...i){let a=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...h){const m=e[++a];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?fP(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 fP(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(a,i):p instanceof Error?i(p):a(p))}function i(c,...d){n||(n=!0,t(c,...d))}function a(c){i(null,c)}}const mr={basename:pP,dirname:hP,extname:mP,join:gP,sep:"/"};function pP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');el(e);let n=0,o=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else c<0&&(a=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=c));return n===o?o=c:o<0&&(o=e.length),e.slice(n,o)}function hP(e){if(el(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 mP(e){el(e);let t=e.length,n=-1,o=0,i=-1,a=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function gP(...e){let t=-1,n;for(;++t<e.length;)el(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":xP(n)}function xP(e){el(e);const t=e.codePointAt(0)===47;let n=yP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yP(e,t){let n="",o=0,i=-1,a=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||a===1))if(i!==c-1&&a===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",o=0):(n=n.slice(0,p),o=n.length-1-n.lastIndexOf("/")),i=c,a=0;continue}}else if(n.length>0){n="",o=0,i=c,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),o=c-i-1;i=c,a=0}else d===46&&a>-1?a++:a=-1}return n}function el(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vP={cwd:bP};function bP(){return"/"}function pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wP(e){if(typeof e=="string")e=new URL(e);else if(!pf(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 kP(e)}function kP(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 Nd=["history","path","basename","stem","extname","dirname"];class I0{constructor(t){let n;t?pf(t)?n={path:t}:typeof t=="string"||SP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Nd.length;){const a=Nd[o];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Nd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(t){Rd(t,"basename"),Ed(t,"basename"),this.path=mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?mr.dirname(this.path):void 0}set dirname(t){Sx(this.basename,"dirname"),this.path=mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?mr.extname(this.path):void 0}set extname(t){if(Ed(t,"extname"),Sx(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=mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pf(t)&&(t=wP(t)),Rd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?mr.basename(this.path,this.extname):void 0}set stem(t){Rd(t,"stem"),Ed(t,"stem"),this.path=mr.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 Qt(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 Ed(e,t){if(e&&e.includes(mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function Rd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Sx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jP=(function(e){const o=this.constructor.prototype,i=o[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,o),a}),CP={}.hasOwnProperty;class ip extends jP{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=dP()}copy(){const t=new ip;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(Cd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ad("data",this.frozen),this.namespace[t]=n,this):CP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ad("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=ya(t),o=this.parser||this.Parser;return Td("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),Td("process",this.parser||this.Parser),Pd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,c){const d=ya(t),p=o.parse(d);o.run(p,d,function(m,x,w){if(m||!x||!w)return h(m);const b=x,N=o.stringify(b,w);RP(N)?w.value=N:w.result=N,h(m,w)});function h(m,x){m||!x?c(m):a?a(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),Td("processSync",this.parser||this.Parser),Pd("processSync",this.compiler||this.Compiler),this.process(t,i),Cx("processSync","process",n),o;function i(a,c){n=!0,wx(a),o=c}}run(t,n,o){jx(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?a(void 0,o):new Promise(a);function a(c,d){const p=ya(n);i.run(t,p,h);function h(m,x,w){const b=x||t;m?d(m):c?c(b):o(void 0,b,w)}}}runSync(t,n){let o=!1,i;return this.run(t,n,a),Cx("runSync","run",o),i;function a(c,d){wx(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=ya(n),i=this.compiler||this.Compiler;return Pd("stringify",i),jx(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(Ad("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(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=Cd(!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];a(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,m){let x=-1,w=-1;for(;++x<o.length;)if(o[x][0]===h){w=x;break}if(w===-1)o.push([h,...m]);else if(m.length>0){let[b,...N]=m;const S=o[w][1];ff(S)&&ff(b)&&(b=Cd(!0,S,b)),o[w]=[h,b,...N]}}}}const NP=new ip().freeze();function Td(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Pd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ad(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 jx(e){if(!ff(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Cx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ya(e){return EP(e)?e:new I0(e)}function EP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RP(e){return typeof e=="string"||TP(e)}function TP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nx=[],Ex={allowDangerousHtml:!0},AP=/^(https?|ircs?|mailto|xmpp)$/i,DP=[{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 IP(e){const t=LP(e),n=OP(e);return MP(t.runSync(t.parse(n),n),e)}function LP(e){const t=e.rehypePlugins||Nx,n=e.remarkPlugins||Nx,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ex}:Ex;return NP().use(pT).use(n).use(aP,o).use(t)}function OP(e){const t=e.children||"",n=new I0;return typeof t=="string"&&(n.value=t),n}function MP(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,a=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||_P;for(const m of DP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+PP+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),D0(e,h),q2(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function h(m,x,w){if(m.type==="raw"&&w&&typeof x=="number")return c?w.children.splice(x,1):w.children[x]={type:"text",value:m.value},x;if(m.type==="element"){let b;for(b in wd)if(Object.hasOwn(wd,b)&&Object.hasOwn(m.properties,b)){const N=m.properties[b],S=wd[b];(S===null||S.includes(m.tagName))&&(m.properties[b]=p(String(N||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(m,x,w)),b&&w&&typeof x=="number")return d&&m.children?w.children.splice(x,1,...m.children):w.children.splice(x,1),x}}}function _P(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||AP.test(e.slice(0,t))?e:""}function Fr({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?l.jsx("div",{className:Me("prose-syntaur max-w-none",t),children:l.jsx(IP,{children:o})}):l.jsx("div",{className:"rounded-md border border-dashed border-border/80 bg-muted/30 px-3 py-4 text-sm text-muted-foreground",children:n})}function Rx(){const{slug:e}=Pt(),t=Mt(),{data:n,loading:o,error:i,refetch:a}=Sv(e),c=ou(),{data:d}=Bf(),[p,h]=y.useState("overview"),[m,x]=y.useState("board"),[w,b]=y.useState("all"),[N,S]=y.useState("all"),[C,k]=y.useState("all"),A=y.useMemo(()=>n?Object.fromEntries(n.assignments.flatMap(D=>{const B=`${t}/missions/${n.slug}/assignments/${D.slug}`;return[[D.slug,B],[D.title,B]]})):{},[n]);async function P(D){await fetch(`/api/missions/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:D})}),a()}async function M(D){await fetch(`/api/missions/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:D})}),a()}if(o)return l.jsx(kt,{label:"Loading mission workspace…"});if(i||!n)return l.jsx(St,{error:i||"Mission not found."});const _=Array.from(new Set(n.assignments.map(D=>D.assignee).filter(Boolean))).sort(),T=n.assignments.filter(D=>!(w!=="all"&&D.status!==w||N!=="all"&&D.assignee!==N||C!=="all"&&D.priority!==C));return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(rn,{status:n.status}),n.statusOverride&&l.jsx("button",{type:"button",className:"shell-action border-amber-300 text-amber-700 dark:border-amber-700 dark:text-amber-300",onClick:()=>P(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:D=>{D.target.value&&P(D.target.value)},title:"Override mission status",children:[l.jsx("option",{value:"",children:"Set Status…"}),c.statuses.map(D=>l.jsx("option",{value:D.id,children:D.label},D.id)),l.jsx("option",{value:"active",children:"Active"})]}),d&&d.workspaces.length>0&&l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:D=>{D.target.value==="_ungrouped"?M(null):D.target.value&&M(D.target.value)},title:"Move mission to a different workspace",children:[l.jsx("option",{value:"",children:"Move to Workspace…"}),d.workspaces.filter(D=>D!==n.workspace).map(D=>l.jsx("option",{value:D,children:D},D)),n.workspace&&l.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),l.jsxs(ke,{className:"shell-action",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Ag,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Mission"})]}),l.jsxs(ke,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(er,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",Br(n.created),". Last source update ",Rn(n.updated),"."]})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[l.jsx(Ze,{label:"Assignments",value:n.progress.total}),l.jsx(Ze,{label:"In Progress",value:n.progress.in_progress??0,tone:"info"}),l.jsx(Ze,{label:"Review",value:n.progress.review??0,tone:"info"}),l.jsx(Ze,{label:"Blocked",value:n.progress.blocked??0,tone:"warn"}),l.jsx(Ze,{label:"Completed",value:n.progress.completed??0,tone:"success"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(Jv,{value:p,onValueChange:h,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Ae,{title:"Mission Overview",children:l.jsx(Fr,{content:n.body,emptyState:"This mission does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:n.assignments.length,content:l.jsx("div",{className:"space-y-5",children:l.jsx(Ae,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("select",{value:w,onChange:D=>b(D.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),c.statuses.map(D=>l.jsx("option",{value:D.id,children:D.label},D.id))]}),l.jsxs("select",{value:N,onChange:D=>S(D.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),_.map(D=>l.jsx("option",{value:D??"",children:D},D))]}),l.jsxs("select",{value:C,onChange:D=>k(D.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]}),l.jsx(Wf,{value:m,onChange:D=>x(D),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:T.length===0?l.jsx(xt,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this mission.",actions:l.jsx(ke,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions/${n.slug}/create/assignment`,children:"Create Assignment"})}):m==="board"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:T.map(D=>l.jsx(zP,{missionSlug:n.slug,assignment:D},D.slug))}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),l.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:T.map(D=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-4",children:l.jsx(ke,{to:`${t}/missions/${n.slug}/assignments/${D.slug}`,className:"font-semibold text-foreground hover:text-primary",children:D.title})}),l.jsx("td",{className:"py-4",children:l.jsx(rn,{status:D.status})}),l.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:D.priority}),l.jsx("td",{className:"py-4 text-muted-foreground",children:D.assignee??"—"}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(D.updated)})]},D.slug))})]})})})})},{value:"dependencies",label:"Dependencies",content:n.dependencyGraph?l.jsx(Ae,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(g2,{definition:n.dependencyGraph,nodeRoutes:A})}):l.jsx(xt,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:l.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[l.jsx(Ae,{title:"Resources",description:"Shared mission references.",children:n.resources.length===0?l.jsx(xt,{title:"No resources yet",description:"Resources live at the mission level and stay available to every assignment."}):l.jsx("div",{className:"space-y-3",children:n.resources.map(D=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:D.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[D.category," · ",D.source]})]},D.slug))})}),l.jsx(Ae,{title:"Memories",description:"Learnings and patterns captured during the mission.",children:n.memories.length===0?l.jsx(xt,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):l.jsx("div",{className:"space-y-3",children:n.memories.map(D=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:D.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[D.scope," · ",D.source]})]},D.slug))})})]})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Ae,{title:"Progress Summary",children:l.jsx(za,{progress:n.progress,showLegend:!0})}),l.jsx(Ae,{title:"Attention",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.blockedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.failedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.unansweredQuestions})]})]})}),l.jsx(Ae,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Ag,{className:"h-4 w-4"}),"Edit mission source"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(er,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(Qy,{className:"h-4 w-4"}),"Review mission rules"]}),l.jsxs("button",{type:"button",onClick:()=>h("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[l.jsx(nv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),n.archived?l.jsxs(Ae,{title:"Archive Metadata",children:[l.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",n.archivedAt?Rn(n.archivedAt):"with no timestamp recorded","."]}),n.archivedReason?l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n.archivedReason}):null]}):null]})]})]})}function zP({missionSlug:e,assignment:t}){const n=Mt();return l.jsxs(ke,{to:`${n}/missions/${e}/assignments/${t.slug}`,className:"block rounded-lg border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:t.id,children:[t.id.slice(0,8),l.jsx("span",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:l.jsx(bo,{value:t.id})})]}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(t.updated)]})]}),l.jsx(rn,{status:t.status})]}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[t.dependsOn.length," dependencies"]})]})]})}function FP(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e);y.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 $P="DismissableLayer",hf="dismissableLayer.update",BP="dismissableLayer.pointerDownOutside",UP="dismissableLayer.focusOutside",Tx,L0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lp=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:d,...p}=e,h=y.useContext(L0),[m,x]=y.useState(null),w=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),N=Xt(t,D=>x(D)),S=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=S.indexOf(C),A=m?S.indexOf(m):-1,P=h.layersWithOutsidePointerEventsDisabled.size>0,M=A>=k,_=VP(D=>{const B=D.target,q=[...h.branches].some(R=>R.contains(B));!M||q||(i==null||i(D),c==null||c(D),D.defaultPrevented||d==null||d())},w),T=qP(D=>{const B=D.target;[...h.branches].some(R=>R.contains(B))||(a==null||a(D),c==null||c(D),D.defaultPrevented||d==null||d())},w);return FP(D=>{A===h.layers.size-1&&(o==null||o(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},w),y.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Tx=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),Px(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Tx)}},[m,w,n,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),Px())},[m,h]),y.useEffect(()=>{const D=()=>b({});return document.addEventListener(hf,D),()=>document.removeEventListener(hf,D)},[]),l.jsx(jt.div,{...p,ref:N,style:{pointerEvents:P?M?"auto":"none":void 0,...e.style},onFocusCapture:tt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:tt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:tt(e.onPointerDownCapture,_.onPointerDownCapture)})});lp.displayName=$P;var HP="DismissableLayerBranch",WP=y.forwardRef((e,t)=>{const n=y.useContext(L0),o=y.useRef(null),i=Xt(t,o);return y.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(jt.div,{...e,ref:i})});WP.displayName=HP;function VP(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const a=d=>{if(d.target&&!o.current){let p=function(){O0(BP,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",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function qP(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=y.useRef(!1);return y.useEffect(()=>{const i=a=>{a.target&&!o.current&&O0(UP,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Px(){const e=new CustomEvent(hf);document.dispatchEvent(e)}function O0(e,t,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?BN(i,a):i.dispatchEvent(a)}var Dd="focusScope.autoFocusOnMount",Id="focusScope.autoFocusOnUnmount",Ax={bubbles:!1,cancelable:!0},GP="FocusScope",M0=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...c}=e,[d,p]=y.useState(null),h=Uo(i),m=Uo(a),x=y.useRef(null),w=Xt(t,S=>p(S)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let S=function(P){if(b.paused||!d)return;const M=P.target;d.contains(M)?x.current=M:xo(x.current,{select:!0})},C=function(P){if(b.paused||!d)return;const M=P.relatedTarget;M!==null&&(d.contains(M)||xo(x.current,{select:!0}))},k=function(P){if(document.activeElement===document.body)for(const _ of P)_.removedNodes.length>0&&xo(d)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const A=new MutationObserver(k);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),A.disconnect()}}},[o,d,b.paused]),y.useEffect(()=>{if(d){Ix.add(b);const S=document.activeElement;if(!d.contains(S)){const k=new CustomEvent(Dd,Ax);d.addEventListener(Dd,h),d.dispatchEvent(k),k.defaultPrevented||(KP(ZP(_0(d)),{select:!0}),document.activeElement===S&&xo(d))}return()=>{d.removeEventListener(Dd,h),setTimeout(()=>{const k=new CustomEvent(Id,Ax);d.addEventListener(Id,m),d.dispatchEvent(k),k.defaultPrevented||xo(S??document.body,{select:!0}),d.removeEventListener(Id,m),Ix.remove(b)},0)}}},[d,h,m,b]);const N=y.useCallback(S=>{if(!n&&!o||b.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,k=document.activeElement;if(C&&k){const A=S.currentTarget,[P,M]=YP(A);P&&M?!S.shiftKey&&k===M?(S.preventDefault(),n&&xo(P,{select:!0})):S.shiftKey&&k===P&&(S.preventDefault(),n&&xo(M,{select:!0})):k===A&&S.preventDefault()}},[n,o,b.paused]);return l.jsx(jt.div,{tabIndex:-1,...c,ref:w,onKeyDown:N})});M0.displayName=GP;function KP(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(xo(o,{select:t}),document.activeElement!==n)return}function YP(e){const t=_0(e),n=Dx(t,e),o=Dx(t.reverse(),e);return[n,o]}function _0(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 Dx(e,t){for(const n of e)if(!XP(n,{upTo:t}))return n}function XP(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 QP(e){return e instanceof HTMLInputElement&&"select"in e}function xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&QP(e)&&t&&e.select()}}var Ix=JP();function JP(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Lx(e,t),e.unshift(t)},remove(t){var n;e=Lx(e,t),(n=e[0])==null||n.resume()}}}function Lx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ZP(e){return e.filter(t=>t.tagName!=="A")}var eA="Portal",ap=y.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,a]=y.useState(!1);wo(()=>a(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?Nj.createPortal(l.jsx(jt.div,{...o,ref:t}),c):null});ap.displayName=eA;var Ld=0;function tA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ox()),document.body.insertAdjacentElement("beforeend",e[1]??Ox()),Ld++,()=>{Ld===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ld--}},[])}function Ox(){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 xr=function(){return xr=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},xr.apply(this,arguments)};function z0(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 nA(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,a;o<i;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Da="right-scroll-bar-position",Ia="width-before-scroll-bar",rA="with-scroll-bars-hidden",oA="--removed-body-scroll-bar-size";function Od(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sA(e,t){var n=y.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 iA=typeof window<"u"?y.useLayoutEffect:y.useEffect,Mx=new WeakMap;function lA(e,t){var n=sA(null,function(o){return e.forEach(function(i){return Od(i,o)})});return iA(function(){var o=Mx.get(n);if(o){var i=new Set(o),a=new Set(e),c=n.current;i.forEach(function(d){a.has(d)||Od(d,null)}),a.forEach(function(d){i.has(d)||Od(d,c)})}Mx.set(n,e)},[e]),n}function aA(e){return e}function uA(e,t){t===void 0&&(t=aA);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(a){for(o=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(d){return a(d)},filter:function(){return n}}},assignMedium:function(a){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(a),c=n}var p=function(){var m=c;c=[],m.forEach(a)},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 cA(e){e===void 0&&(e={});var t=uA(null);return t.options=xr({async:!0,ssr:!1},e),t}var F0=function(e){var t=e.sideCar,n=z0(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 y.createElement(o,xr({},n))};F0.isSideCarExport=!0;function dA(e,t){return e.useMedium(t),F0}var $0=cA(),Md=function(){},du=y.forwardRef(function(e,t){var n=y.useRef(null),o=y.useState({onScrollCapture:Md,onWheelCapture:Md,onTouchMoveCapture:Md}),i=o[0],a=o[1],c=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,x=e.shards,w=e.sideCar,b=e.noRelative,N=e.noIsolation,S=e.inert,C=e.allowPinchZoom,k=e.as,A=k===void 0?"div":k,P=e.gapMode,M=z0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=w,T=lA([n,t]),D=xr(xr({},M),i);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:$0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:N,inert:S,setCallbacks:a,allowPinchZoom:!!C,lockRef:n,gapMode:P}),c?y.cloneElement(y.Children.only(d),xr(xr({},D),{ref:T})):y.createElement(A,xr({},D,{className:p,ref:T}),d))});du.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};du.classNames={fullWidth:Ia,zeroRight:Da};var fA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fA();return t&&e.setAttribute("nonce",t),e}function hA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pA())&&(hA(t,n),mA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xA=function(){var e=gA();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},B0=function(){var e=xA(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},yA={left:0,top:0,right:0,gap:0},_d=function(e){return parseInt(e||"",10)||0},vA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_d(n),_d(o),_d(i)]},bA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yA;var t=vA(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])}},wA=B0(),Ns="data-scroll-locked",kA=function(e,t,n,o){var i=e.left,a=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
375
+ .`.concat(rA,` {
376
+ overflow: hidden `).concat(o,`;
377
+ padding-right: `).concat(d,"px ").concat(o,`;
378
+ }
379
+ body[`).concat(Ns,`] {
380
+ overflow: hidden `).concat(o,`;
381
+ overscroll-behavior: contain;
382
+ `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
383
+ padding-left: `.concat(i,`px;
384
+ padding-top: `).concat(a,`px;
385
+ padding-right: `).concat(c,`px;
386
+ margin-left:0;
387
+ margin-top:0;
388
+ margin-right: `).concat(d,"px ").concat(o,`;
389
+ `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
390
+ }
391
+
392
+ .`).concat(Da,` {
393
+ right: `).concat(d,"px ").concat(o,`;
394
+ }
395
+
396
+ .`).concat(Ia,` {
397
+ margin-right: `).concat(d,"px ").concat(o,`;
398
+ }
399
+
400
+ .`).concat(Da," .").concat(Da,` {
401
+ right: 0 `).concat(o,`;
402
+ }
403
+
404
+ .`).concat(Ia," .").concat(Ia,` {
405
+ margin-right: 0 `).concat(o,`;
406
+ }
407
+
408
+ body[`).concat(Ns,`] {
409
+ `).concat(oA,": ").concat(d,`px;
410
+ }
411
+ `)},_x=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},SA=function(){y.useEffect(function(){return document.body.setAttribute(Ns,(_x()+1).toString()),function(){var e=_x()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},jA=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;SA();var a=y.useMemo(function(){return bA(i)},[i]);return y.createElement(wA,{styles:kA(a,!t,i,n?"":"!important")})},mf=!1;if(typeof window<"u")try{var va=Object.defineProperty({},"passive",{get:function(){return mf=!0,!0}});window.addEventListener("test",va,va),window.removeEventListener("test",va,va)}catch{mf=!1}var ys=mf?{passive:!1}:!1,CA=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&&!CA(e)&&n[t]==="visible")},NA=function(e){return U0(e,"overflowY")},EA=function(e){return U0(e,"overflowX")},zx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=H0(e,o);if(i){var a=W0(e,o),c=a[1],d=a[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},RA=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},TA=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},H0=function(e,t){return e==="v"?NA(t):EA(t)},W0=function(e,t){return e==="v"?RA(t):TA(t)},PA=function(e,t){return e==="h"&&t==="rtl"?-1:1},AA=function(e,t,n,o,i){var a=PA(e,window.getComputedStyle(t).direction),c=a*o,d=n.target,p=t.contains(d),h=!1,m=c>0,x=0,w=0;do{if(!d)break;var b=W0(e,d),N=b[0],S=b[1],C=b[2],k=S-C-a*N;(N||k)&&H0(e,d)&&(x+=k,w+=N);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(m&&Math.abs(x)<1||!m&&Math.abs(w)<1)&&(h=!0),h},ba=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fx=function(e){return[e.deltaX,e.deltaY]},$x=function(e){return e&&"current"in e?e.current:e},DA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IA=function(e){return`
412
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
413
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
414
+ `)},LA=0,vs=[];function OA(e){var t=y.useRef([]),n=y.useRef([0,0]),o=y.useRef(),i=y.useState(LA++)[0],a=y.useState(B0)[0],c=y.useRef(e);y.useEffect(function(){c.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=nA([e.lockRef.current],(e.shards||[]).map($x),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=y.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var k=ba(S),A=n.current,P="deltaX"in S?S.deltaX:A[0]-k[0],M="deltaY"in S?S.deltaY:A[1]-k[1],_,T=S.target,D=Math.abs(P)>Math.abs(M)?"h":"v";if("touches"in S&&D==="h"&&T.type==="range")return!1;var B=window.getSelection(),q=B&&B.anchorNode,R=q?q===T||q.contains(T):!1;if(R)return!1;var L=zx(D,T);if(!L)return!0;if(L?_=D:(_=D==="v"?"h":"v",L=zx(D,T)),!L)return!1;if(!o.current&&"changedTouches"in S&&(P||M)&&(o.current=_),!_)return!0;var $=o.current||_;return AA($,C,S,$==="h"?P:M)},[]),p=y.useCallback(function(S){var C=S;if(!(!vs.length||vs[vs.length-1]!==a)){var k="deltaY"in C?Fx(C):ba(C),A=t.current.filter(function(_){return _.name===C.type&&(_.target===C.target||C.target===_.shadowParent)&&DA(_.delta,k)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var P=(c.current.shards||[]).map($x).filter(Boolean).filter(function(_){return _.contains(C.target)}),M=P.length>0?d(C,P[0]):!c.current.noIsolation;M&&C.cancelable&&C.preventDefault()}}},[]),h=y.useCallback(function(S,C,k,A){var P={name:S,delta:C,target:k,should:A,shadowParent:MA(k)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(M){return M!==P})},1)},[]),m=y.useCallback(function(S){n.current=ba(S),o.current=void 0},[]),x=y.useCallback(function(S){h(S.type,Fx(S),S.target,d(S,e.lockRef.current))},[]),w=y.useCallback(function(S){h(S.type,ba(S),S.target,d(S,e.lockRef.current))},[]);y.useEffect(function(){return vs.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:w}),document.addEventListener("wheel",p,ys),document.addEventListener("touchmove",p,ys),document.addEventListener("touchstart",m,ys),function(){vs=vs.filter(function(S){return S!==a}),document.removeEventListener("wheel",p,ys),document.removeEventListener("touchmove",p,ys),document.removeEventListener("touchstart",m,ys)}},[]);var b=e.removeScrollBar,N=e.inert;return y.createElement(y.Fragment,null,N?y.createElement(a,{styles:IA(i)}):null,b?y.createElement(jA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _A=dA($0,OA);var V0=y.forwardRef(function(e,t){return y.createElement(du,xr({},e,{ref:t,sideCar:_A}))});V0.classNames=du.classNames;var zA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,wa=new WeakMap,ka={},zd=0,q0=function(e){return e&&(e.host||q0(e.parentNode))},FA=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=q0(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})},$A=function(e,t,n,o){var i=FA(t,Array.isArray(e)?e:[e]);ka[n]||(ka[n]=new WeakMap);var a=ka[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(w){if(d.has(w))m(w);else try{var b=w.getAttribute(o),N=b!==null&&b!=="false",S=(bs.get(w)||0)+1,C=(a.get(w)||0)+1;bs.set(w,S),a.set(w,C),c.push(w),S===1&&N&&wa.set(w,!0),C===1&&w.setAttribute(n,"true"),N||w.setAttribute(o,"true")}catch(k){console.error("aria-hidden: cannot operate on ",w,k)}})};return m(t),d.clear(),zd++,function(){c.forEach(function(x){var w=bs.get(x)-1,b=a.get(x)-1;bs.set(x,w),a.set(x,b),w||(wa.has(x)||x.removeAttribute(o),wa.delete(x)),b||x.removeAttribute(n)}),zd--,zd||(bs=new WeakMap,bs=new WeakMap,wa=new WeakMap,ka={})}},BA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=zA(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),$A(o,i,n,"aria-hidden")):function(){return null}};function UA(e){const t=HA(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(VA);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function HA(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=GA(i),d=qA(a,i.props);return i.type!==y.Fragment&&(d.ref=o?su(o,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WA=Symbol("radix.slottable");function VA(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WA}function qA(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function GA(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 fu="Dialog",[G0,K0]=Vo(fu),[KA,ir]=G0(fu),Y0=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=y.useRef(null),p=y.useRef(null),[h,m]=iu({prop:o,defaultProp:i??!1,onChange:a,caller:fu});return l.jsx(KA,{scope:t,triggerRef:d,contentRef:p,contentId:Ss(),titleId:Ss(),descriptionId:Ss(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(x=>!x),[m]),modal:c,children:n})};Y0.displayName=fu;var X0="DialogTrigger",Q0=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(X0,n),a=Xt(t,i.triggerRef);return l.jsx(jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dp(i.open),...o,ref:a,onClick:tt(e.onClick,i.onOpenToggle)})});Q0.displayName=X0;var up="DialogPortal",[YA,J0]=G0(up,{forceMount:void 0}),Z0=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=ir(up,t);return l.jsx(YA,{scope:t,forceMount:n,children:y.Children.map(o,c=>l.jsx(qo,{present:n||a.open,children:l.jsx(ap,{asChild:!0,container:i,children:c})}))})};Z0.displayName=up;var Ba="DialogOverlay",eb=y.forwardRef((e,t)=>{const n=J0(Ba,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=ir(Ba,e.__scopeDialog);return a.modal?l.jsx(qo,{present:o||a.open,children:l.jsx(QA,{...i,ref:t})}):null});eb.displayName=Ba;var XA=UA("DialogOverlay.RemoveScroll"),QA=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(Ba,n);return l.jsx(V0,{as:XA,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(jt.div,{"data-state":dp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ho="DialogContent",tb=y.forwardRef((e,t)=>{const n=J0(Ho,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=ir(Ho,e.__scopeDialog);return l.jsx(qo,{present:o||a.open,children:a.modal?l.jsx(JA,{...i,ref:t}):l.jsx(ZA,{...i,ref:t})})});tb.displayName=Ho;var JA=y.forwardRef((e,t)=>{const n=ir(Ho,e.__scopeDialog),o=y.useRef(null),i=Xt(t,n.contentRef,o);return y.useEffect(()=>{const a=o.current;if(a)return BA(a)},[]),l.jsx(nb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tt(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:tt(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:tt(e.onFocusOutside,a=>a.preventDefault())})}),ZA=y.forwardRef((e,t)=>{const n=ir(Ho,e.__scopeDialog),o=y.useRef(!1),i=y.useRef(!1);return l.jsx(nb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),nb=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...c}=e,d=ir(Ho,n),p=y.useRef(null),h=Xt(t,p);return tA(),l.jsxs(l.Fragment,{children:[l.jsx(M0,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(lp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":dp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(t3,{titleId:d.titleId}),l.jsx(r3,{contentRef:p,descriptionId:d.descriptionId})]})]})}),cp="DialogTitle",rb=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(cp,n);return l.jsx(jt.h2,{id:i.titleId,...o,ref:t})});rb.displayName=cp;var ob="DialogDescription",sb=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(ob,n);return l.jsx(jt.p,{id:i.descriptionId,...o,ref:t})});sb.displayName=ob;var ib="DialogClose",lb=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(ib,n);return l.jsx(jt.button,{type:"button",...o,ref:t,onClick:tt(e.onClick,()=>i.onOpenChange(!1))})});lb.displayName=ib;function dp(e){return e?"open":"closed"}var ab="DialogTitleWarning",[e3,ub]=jN(ab,{contentName:Ho,titleName:cp,docsSlug:"dialog"}),t3=({titleId:e})=>{const t=ub(ab),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
415
+
416
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
417
+
418
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},n3="DialogDescriptionWarning",r3=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ub(n3).contentName}}.`;return y.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},cb=Y0,o3=Q0,db=Z0,fp=eb,pp=tb,hp=rb,mp=sb,fb=lb;const s3=cb,i3=db,pb=y.forwardRef(({className:e,...t},n)=>l.jsx(fp,{ref:n,className:Me("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));pb.displayName=fp.displayName;const hb=y.forwardRef(({className:e,children:t,...n},o)=>l.jsxs(i3,{children:[l.jsx(pb,{}),l.jsx(pp,{ref:o,className:Me("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})]}));hb.displayName=pp.displayName;function l3({className:e,...t}){return l.jsx("div",{className:Me("flex flex-col space-y-2 text-left",e),...t})}function a3({className:e,...t}){return l.jsx("div",{className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const mb=y.forwardRef(({className:e,...t},n)=>l.jsx(hp,{ref:n,className:Me("text-lg font-semibold tracking-tight text-foreground",e),...t}));mb.displayName=hp.displayName;const gb=y.forwardRef(({className:e,...t},n)=>l.jsx(mp,{ref:n,className:Me("text-sm leading-6 text-muted-foreground",e),...t}));gb.displayName=mp.displayName;function xb({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:a}){const[c,d]=y.useState("");y.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=y.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 l.jsx(s3,{open:e,onOpenChange:w=>o?void 0:a(w),children:l.jsx(hb,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:w=>{w.preventDefault(),i(x)},children:[l.jsxs(l3,{children:[l.jsx(mb,{children:h}),l.jsx(gb,{children:t.description})]}),t.warning?l.jsx("div",{className:"rounded-lg border border-amber-300/80 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:t.warning}):null,l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),l.jsx("textarea",{value:c,onChange:w=>d(w.target.value),autoFocus:!0,rows:4,disabled:o,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),l.jsxs(a3,{children:[l.jsx("button",{type:"button",onClick:()=>a(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:o,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:m})]})]})})})}async function yb(e,t,n,o){const i=await fetch(`/api/missions/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{reason:o}:{})}),a=await i.json().catch(()=>null);if(!i.ok)throw new Error((a==null?void 0:a.error)||`HTTP ${i.status}`);return a.assignment}async function vb(e,t,n){const o=await fetch(`/api/missions/${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}function bb(e){return e.requiresReason||e.command==="block"}function u3(e){const t=e.split(`
419
+ `),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),a=[...t.slice(0,n),...t.slice(o)].join(`
420
+ `).replace(/\n{3,}/g,`
421
+
422
+ `).trim();return{acceptanceCriteria:i,summaryBody:a}}function c3({missionSlug:e,dependencies:t,blockedReason:n}){const[o,i]=y.useState(!1);if(t.length===0)return null;const a=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=a.length===0;return c&&!o?l.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center gap-2 rounded-lg border border-emerald-200 bg-emerald-50/50 px-4 py-2.5 text-left transition hover:bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/20 dark:hover:bg-emerald-950/30",children:[l.jsx(ev,{className:"h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400"}),l.jsxs("span",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-300",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),l.jsx($i,{className:"ml-auto h-4 w-4 text-emerald-600 dark:text-emerald-400"})]}):l.jsxs("div",{className:"space-y-3",children:[a.length>0&&l.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 dark:border-amber-900 dark:bg-amber-950/30",children:[l.jsx(Qd,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400"}),l.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-300",children:[l.jsxs("strong",{children:[a.length," ",a.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&l.jsxs("p",{className:"mt-1 text-amber-700 dark:text-amber-400",children:["Blocked reason: ",n]})]})]}),l.jsx(Ae,{title:"Dependencies",description:`${t.length-a.length} of ${t.length} resolved`,actions:c?l.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:l.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>l.jsxs(ke,{to:`/missions/${e}/assignments/${d.slug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(rn,{status:d.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&l.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),l.jsx(Xy,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function Bx(){var X,se,E,z,Q,I;const{slug:e,aslug:t}=Pt(),n=Mt(),[o,i]=If(),[a,c]=y.useState(null),[d,p]=y.useState(null),[h,m]=y.useState(null),[x,w]=y.useState(null),[b,N]=y.useState(null),S=o.get("tab")??"summary",C=ou(),{data:k,loading:A,error:P,refetch:M}=VC(e,t),{data:_}=Sv(e),{data:T}=Cv(),{data:D}=GC(e,t),B=y.useMemo(()=>{if(!k||!_)return[];const Z=new Map(_.assignments.map(fe=>[fe.slug,fe]));return k.dependsOn.map(fe=>{const re=Z.get(fe);return{slug:fe,title:(re==null?void 0:re.title)??fe,status:(re==null?void 0:re.status)??"pending",priority:(re==null?void 0:re.priority)??"medium",assignee:(re==null?void 0:re.assignee)??null}})},[k,_]),q=B.filter(Z=>Z.status!=="completed"&&Z.status!=="review");if(A)return l.jsx(kt,{label:"Loading assignment workspace…"});if(P||!k||!e||!t)return l.jsx(St,{error:P||"Assignment not found."});const R=e,L=t,$=u3(k.body),W=[];if(T!=null&&T.sessions)for(const Z of T.sessions)for(const fe of Z.windows)for(const re of fe.panes)((X=re.assignment)==null?void 0:X.mission)===e&&((se=re.assignment)==null?void 0:se.slug)===t&&W.push({sessionName:Z.name,command:re.command,urls:re.urls});async function J(Z){c(null);try{await vb(R,L,Z),M()}catch(fe){c(fe.message)}}async function K(Z,fe){c(null),p(Z.command);try{return await yb(R,L,Z,fe),M(),!0}catch(re){return c(re.message),!1}finally{p(null)}}function te(Z){if(bb(Z)){m(Z);return}K(Z)}async function ae(Z,fe){w(null),N(Z);try{const re=await fetch(`/api/missions/${R}/assignments/${L}/acceptance-criteria/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:fe})}),Ee=await re.json();if(!re.ok)throw new Error(Ee.error||`HTTP ${re.status}`);M()}catch(re){w(re.message)}finally{N(null)}}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(rn,{status:k.status}),l.jsx(ke,{className:"shell-action",to:`${n}/missions/${e}`,children:"Mission"}),l.jsxs(ke,{className:"shell-action",to:`${n}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Pg,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Mission ",e," · Updated ",Rn(k.updated)]})]}),l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[(k.availableTransitions??[]).map(Z=>l.jsx("button",{type:"button",title:Z.warning||Z.disabledReason||Z.description,disabled:Z.disabled||d===Z.command,onClick:()=>te(Z),className:`shell-action disabled:cursor-not-allowed disabled:opacity-50 ${Z.warning?"border-amber-300 dark:border-amber-700":""}`,children:l.jsx("span",{children:d===Z.command?"Working…":Z.label})},Z.command)),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm text-muted-foreground",value:"",onChange:Z=>{Z.target.value&&J(Z.target.value)},title:"Override assignment status directly",children:[l.jsx("option",{value:"",children:"Override Status…"}),C.statuses.map(Z=>l.jsx("option",{value:Z.id,children:Z.label},Z.id))]})]}),a?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:a}):null,k.blockedReason?l.jsxs("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:[l.jsx("strong",{children:"Blocked reason:"})," ",k.blockedReason]}):null,l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[l.jsx(Fo,{label:`Priority ${k.priority}`}),l.jsx(Fo,{label:k.assignee?`Assignee ${k.assignee}`:"Unassigned"}),l.jsx(Fo,{label:`${k.dependsOn.length} dependencies`,variant:q.length>0?"warning":B.length>0?"success":"default"}),l.jsx(Fo,{label:k.plan?`Plan ${k.plan.status}`:"No plan"}),l.jsx(Fo,{label:`${((E=k.handoff)==null?void 0:E.handoffCount)??0} handoffs`}),l.jsx(Fo,{label:`${((z=k.decisionRecord)==null?void 0:z.decisionCount)??0} decisions`}),l.jsx(Fo,{label:d3(k.updated)?"Stale":"Fresh"})]})]}),B.length>0&&l.jsx(c3,{missionSlug:e,dependencies:B,blockedReason:k.blockedReason}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(Jv,{value:S,onValueChange:Z=>i({tab:Z}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[$.acceptanceCriteria.length>0?l.jsx(Ae,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:l.jsxs("div",{className:"space-y-3",children:[x?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:x}):null,$.acceptanceCriteria.map((Z,fe)=>{const re=b!==null;return l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[l.jsx("input",{type:"checkbox",checked:Z.checked,disabled:re,onChange:Ee=>ae(fe,Ee.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),l.jsx("span",{className:`text-sm leading-6 ${Z.checked?"text-muted-foreground line-through":"text-foreground"}`,children:Z.text})]},`${fe}-${Z.text}`)})]})}):null,l.jsx(Ae,{title:"Assignment Summary",children:l.jsx(Fr,{content:$.summaryBody,emptyState:$.acceptanceCriteria.length>0?"No additional summary markdown beyond the acceptance criteria.":"This assignment does not have summary markdown yet."})}),l.jsx(Ae,{title:"Latest Log Context",children:l.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:"Latest handoff"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:k.handoff?Ux(k.handoff.body):"No handoff entries yet."})]}),l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:"Latest decision"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:k.decisionRecord?Ux(k.decisionRecord.body):"No decision entries yet."})]})]})})]})},{value:"plan",label:"Plan",count:k.plan?1:0,content:k.plan?l.jsx("div",{className:"space-y-5",children:l.jsxs(Ae,{title:"Plan",actions:l.jsxs(ke,{className:"shell-action",to:`${n}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(gd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Plan"})]}),children:[l.jsx("div",{className:"mb-4",children:l.jsx(rn,{status:k.plan.status})}),l.jsx(Fr,{content:k.plan.body,emptyState:"No plan content yet."})]})}):l.jsx(xt,{title:"No plan yet",description:"This assignment does not have a plan document yet."})},{value:"scratchpad",label:"Scratchpad",count:k.scratchpad?1:0,content:k.scratchpad?l.jsx(Ae,{title:"Scratchpad",actions:l.jsxs(ke,{className:"shell-action",to:`${n}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(gd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Scratchpad"})]}),children:l.jsx(Fr,{content:k.scratchpad.body,emptyState:"Scratchpad is empty."})}):l.jsx(xt,{title:"No scratchpad yet",description:"Scratchpad notes appear here when the assignment has working notes."})},{value:"handoff",label:"Handoff",count:((Q=k.handoff)==null?void 0:Q.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:k.handoff?l.jsx(Ae,{children:l.jsx(Fr,{content:k.handoff.body,emptyState:"No handoff history yet."})}):l.jsx(xt,{title:"No handoff log yet",description:"Add a handoff entry when work changes hands or needs a restart point."})})},{value:"decisions",label:"Decisions",count:((I=k.decisionRecord)==null?void 0:I.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:k.decisionRecord?l.jsx(Ae,{children:l.jsx(Fr,{content:k.decisionRecord.body,emptyState:"No decision history yet."})}):l.jsx(xt,{title:"No decision record yet",description:"Add a decision entry when the assignment makes a notable implementation choice."})})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Ae,{title:"Metadata",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"ID",value:k.id,copyable:!0}),l.jsx(hr,{label:"Priority",value:k.priority}),l.jsx(hr,{label:"Assignee",value:k.assignee??"Unassigned"}),l.jsx(hr,{label:"Created",value:Rn(k.created)}),l.jsx(hr,{label:"Updated",value:Rn(k.updated)}),l.jsx(hr,{label:"Status",value:k.status})]})}),l.jsx(Ae,{title:"Workspace Info",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"Repository",value:k.workspace.repository??"—",copyable:!0}),l.jsx(hr,{label:"Worktree",value:k.workspace.worktreePath??"—",copyable:!0}),l.jsx(hr,{label:"Branch",value:k.workspace.branch??"—",copyable:!0}),l.jsx(hr,{label:"Parent branch",value:k.workspace.parentBranch??"—",copyable:!0})]})}),W.length>0&&l.jsx(Ae,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:W.map((Z,fe)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:Z.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Z.sessionName}),Z.urls.map(re=>l.jsxs("a",{href:re,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-teal-600 hover:underline dark:text-teal-400",children:[re.replace("http://localhost:",":"),l.jsx(tv,{className:"h-2.5 w-2.5"})]},re))]},fe))})}),D&&D.sessions.length>0&&l.jsx(Ae,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:D.sessions.map(Z=>l.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(nu,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:Z.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:Z.sessionId,children:[Z.sessionId.slice(0,8),l.jsx(bo,{value:Z.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(rn,{status:Z.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Rn(Z.started)})]})]},Z.sessionId))})}),l.jsx(Ae,{title:"Edit Actions",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${n}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Pg,{className:"h-4 w-4"}),"Edit assignment source"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${n}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(Qj,{className:"h-4 w-4"}),"Edit plan"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${n}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(gd,{className:"h-4 w-4"}),"Edit scratchpad"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${n}/missions/${e}/assignments/${t}/handoff/edit`,children:[l.jsx(Xy,{className:"h-4 w-4"}),"Append handoff"]}),l.jsxs(ke,{className:"flex items-center gap-2 text-primary hover:underline",to:`${n}/missions/${e}/assignments/${t}/decision-record/edit`,children:[l.jsx($j,{className:"h-4 w-4"}),"Append decision"]})]})}),l.jsx(Ae,{title:"Status Guidance",children:l.jsxs("div",{className:"space-y-3 text-sm leading-6 text-muted-foreground",children:[l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Pending"})," means the work has not started or is structurally waiting on dependencies."]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Blocked"})," means there is an active obstacle that needs intervention, which is why blocking requires a reason."]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Review"})," means implementation is ready to inspect before completion."]}),l.jsxs(ke,{className:"inline-flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(Qy,{className:"h-4 w-4"}),"Open the full status guide"]})]})})]})]}),l.jsx(xb,{open:h!==null,action:h,assignmentTitle:k.title,loading:d===(h==null?void 0:h.command),onOpenChange:Z=>{Z||m(null)},onConfirm:async Z=>{if(!h)return;await K(h,Z)&&m(null)}})]})}function Fo({label:e,variant:t="default"}){const n={default:"border-border/60 bg-background/80 text-muted-foreground",warning:"border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-300",success:"border-emerald-300 bg-emerald-50 text-emerald-800 dark:border-emerald-800 dark:bg-emerald-950/30 dark:text-emerald-300"}[t];return l.jsx("span",{className:`rounded-full border px-3 py-1 text-xs font-medium ${n}`,children:e})}function hr({label:e,value:t,copyable:n}){return l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[l.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&l.jsx(bo,{value:t})]})]})}function Ux(e){return e.replace(/^#+\s+/gm,"").trim().split(`
423
+ `).find(n=>n.trim())??"No detail recorded yet."}function d3(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}const f3=["table","list","kanban"],Hx={critical:0,high:1,medium:2,low:3};function Wx(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function p3(e,t){return e.toString()===t.toString()}function Vx(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function h3(e,t,n){return[...e].sort((i,a)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(a.title);break;case"status":c=i.status.localeCompare(a.status);break;case"priority":c=(Hx[i.priority]??99)-(Hx[a.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(a.assignee??"");break;case"dependencies":c=i.dependsOn.length-a.dependsOn.length;break;case"updated":c=i.updated.localeCompare(a.updated);break}return n==="asc"?c:-c})}function qx(){const{workspace:e}=Pt(),t=Mt(),{data:n,loading:o,error:i,refetch:a}=HC(),c=ou(),[d,p]=If(),h=y.useMemo(()=>xN(c.order),[c]),m=y.useMemo(()=>{const U={};for(const ie of h)U[ie]=pN(c,ie);return U},[h,c]),x=y.useMemo(()=>h.map(U=>({id:U,title:m[U]??U,description:Dv(U)})),[h,m]),w=y.useMemo(()=>new Set(["all",...h]),[h]),b=d.get("view"),N=d.get("status"),S=d.get("stale"),C=b&&f3.includes(b)?b:"kanban";function k(U){return!U||!w.has(U)?"all":U}const A=y.useCallback(U=>{p(ie=>{const we=new URLSearchParams(ie);return U==="kanban"?we.delete("view"):we.set("view",U),we})},[p]),[P,M]=y.useState(""),[_,T]=y.useState(()=>k(N)),[D,B]=y.useState("all"),[q,R]=y.useState("all"),[L,$]=y.useState("all"),[W,J]=y.useState(()=>Wx(S)),[K,te]=y.useState("updated"),[ae,X]=y.useState("desc"),[se,E]=y.useState(()=>new Set(h)),[z,Q]=y.useState([]),[I,Z]=y.useState(null),[fe,re]=y.useState(null),[Ee,Se]=y.useState(null),[Re,be]=y.useState(null),[Ue,at]=y.useState(null);y.useEffect(()=>{Q((n==null?void 0:n.assignments)??[])},[n]),y.useEffect(()=>{const U=k(N);U!==_&&T(U);const ie=Wx(S);ie!==W&&J(ie)},[W,S,_,N]),y.useEffect(()=>{p(U=>{const ie=new URLSearchParams(U);return _==="all"?ie.delete("status"):ie.set("status",_),W==="all"?ie.delete("stale"):W==="stale"?ie.set("stale","1"):ie.set("stale","0"),p3(U,ie)?U:ie})},[W,p,_]);const ft=y.useMemo(()=>Array.from(new Set(z.map(U=>U.status))).sort(),[z]),yt=y.useMemo(()=>Array.from(new Set(z.map(U=>U.priority))).sort(),[z]),$t=y.useMemo(()=>Array.from(new Set(z.map(U=>U.assignee??"__unassigned__"))).sort(),[z]),Bt=y.useMemo(()=>Array.from(new Map(z.map(U=>[U.missionSlug,U.missionTitle]))).sort(([,U],[,ie])=>U.localeCompare(ie)),[z]),_t=y.useMemo(()=>z.filter(U=>{if(e){if(e==="_ungrouped"){if(U.missionWorkspace!==null)return!1}else if(U.missionWorkspace!==e)return!1}if(_!=="all"&&U.status!==_||D!=="all"&&U.priority!==D||W==="stale"&&!Vx(U.updated)||W==="fresh"&&Vx(U.updated)||q!=="all"&&(U.assignee??"__unassigned__")!==q||L!=="all"&&U.missionSlug!==L)return!1;const ie=P.trim().toLowerCase();return!(ie&&!`${U.title} ${U.slug} ${U.missionTitle} ${U.missionSlug}`.toLowerCase().includes(ie))}),[W,z,P,_,D,q,L,e]),vn=y.useMemo(()=>h3(_t,K,ae),[_t,K,ae]);if(o)return l.jsx(kt,{label:"Loading assignments board…"});if(i||!n)return l.jsx(St,{error:i||"Assignments board is unavailable."});async function At({item:U,toColumnId:ie,action:we,reason:ze}){Z(null),re(Cn(U));const on=z;Q(ut=>ut.map(He=>Cn(He)===Cn(U)?{...He,status:ie,blockedReason:ie==="blocked"?ze??He.blockedReason:null}:He));try{const ut=we?await yb(U.missionSlug,U.slug,we,ze):await vb(U.missionSlug,U.slug,ie);return Q(He=>He.map(Ve=>Cn(Ve)===Cn(U)?{...Ve,status:ut.status,blockedReason:ut.blockedReason,availableTransitions:ut.availableTransitions,updated:ut.updated}:Ve)),a(),!0}catch(ut){return Q(on),Z(ut.message),!1}finally{re(null)}}async function pt({item:U,toColumnId:ie}){if(U.status===ie)return;const we=Pi(U,ie);if(we!=null&&we.disabled){Z(we.disabledReason||`Cannot move this assignment to ${ie}.`);return}if(we&&bb(we)){at({item:U,toColumnId:ie,action:we});return}await At({item:U,toColumnId:ie,action:we})}function Jt(U){E(ie=>{const we=new Set(ie);return we.has(U)?we.delete(U):we.add(U),we})}function An(U){K===U?X(ie=>ie==="asc"?"desc":"asc"):(te(U),X("asc"))}const vt=Ee?z.find(U=>Cn(U)===Ee)??null:null;function Nr(U,ie){U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",ie),Se(ie)}function lr(){Se(null),be(null)}function ee(U,ie){if(!vt)return;const we=Pi(vt,ie);vt.status===ie||we!=null&&we.disabled||(U.preventDefault(),U.dataTransfer.dropEffect="move",be(ie))}function ue(U,ie){Re===ie&&!U.currentTarget.contains(U.relatedTarget)&&be(null)}function ve(U,ie){if(U.preventDefault(),!vt||vt.status===ie){lr();return}lr(),pt({item:vt,toColumnId:ie})}function Ne({field:U,children:ie}){const we=K===U;return l.jsx("th",{className:"pb-3 font-medium",children:l.jsxs("button",{type:"button",onClick:()=>An(U),className:"inline-flex items-center gap-1 hover:text-foreground",children:[ie,we?ae==="asc"?l.jsx(Zy,{className:"h-3 w-3"}):l.jsx($i,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Uf,{children:[l.jsx(Hf,{value:P,onChange:M,placeholder:"Search assignments or missions"}),l.jsxs("select",{value:_,onChange:U=>T(k(U.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),ft.map(U=>l.jsx("option",{value:U,children:m[U]??U},U))]}),l.jsxs("select",{value:D,onChange:U=>B(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),yt.map(U=>l.jsx("option",{value:U,className:"capitalize",children:U},U))]}),l.jsxs("select",{value:q,onChange:U=>R(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),$t.map(U=>l.jsx("option",{value:U,children:U==="__unassigned__"?"Unassigned":U},U))]}),l.jsxs("select",{value:L,onChange:U=>$(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All missions"}),Bt.map(([U,ie])=>l.jsx("option",{value:U,children:ie},U))]}),l.jsxs("select",{value:W,onChange:U=>J(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All activity"}),l.jsx("option",{value:"stale",children:"Stale only"}),l.jsx("option",{value:"fresh",children:"Fresh only"})]}),l.jsx(Wf,{value:C,onChange:U=>A(U),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),I?l.jsx("div",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:I}):null,n.assignments.length===0?l.jsx(xt,{title:"No assignments yet",description:"Assignments appear here once missions contain concrete work items.",actions:l.jsxs(ke,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions`,children:[l.jsx(Mf,{className:"h-4 w-4"}),l.jsx("span",{children:"Browse Missions"})]})}):_t.length===0?l.jsx(xt,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all missions again."}):C==="table"?l.jsx(Ae,{title:`${vn.length} assignment${vn.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx(Ne,{field:"title",children:"Assignment"}),l.jsx(Ne,{field:"status",children:"Status"}),l.jsx(Ne,{field:"priority",children:"Priority"}),l.jsx(Ne,{field:"assignee",children:"Assignee"}),l.jsx(Ne,{field:"dependencies",children:"Dependencies"}),l.jsx(Ne,{field:"updated",children:"Updated"})]})}),l.jsx("tbody",{children:vn.map(U=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(ke,{to:`${t}/missions/${U.missionSlug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:U.missionTitle}),l.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:U.id,children:[U.id.slice(0,8),l.jsx(bo,{value:U.id})]})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("select",{value:U.status,disabled:fe===Cn(U),onChange:ie=>pt({item:U,toColumnId:ie.target.value}),className:Me("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")]`,(_a[U.status]??_a.pending).className,fe===Cn(U)&&"animate-pulse opacity-60"),children:h.map(ie=>{const we=U.status===ie?void 0:Pi(U,ie),ze=(we==null?void 0:we.disabled)??!1;return l.jsx("option",{value:ie,disabled:ze,title:ze?(we==null?void 0:we.disabledReason)??void 0:void 0,children:m[ie]},ie)})})}),l.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:U.priority}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.assignee??"Unassigned"}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.dependsOn.length}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(U.updated)})]},Cn(U)))})]})})}):C==="list"?l.jsx("div",{className:"space-y-3",children:h.map(U=>{var He;const ie=_t.filter(Ve=>Ve.status===U);if(ie.length===0&&!vt)return null;const we=se.has(U),ze=vt?vt.status!==U&&!((He=Pi(vt,U))!=null&&He.disabled):!1,on=vt?vt.status!==U&&!ze:!1,ut=Re===U;return l.jsxs("div",{className:Me("rounded-lg border border-border/60 bg-card/90 transition",ut&&ze&&"ring-2 ring-ring/30",on&&"border-dashed opacity-65"),onDragOver:Ve=>ee(Ve,U),onDragLeave:Ve=>ue(Ve,U),onDrop:Ve=>ve(Ve,U),children:[l.jsxs("button",{type:"button",onClick:()=>Jt(U),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx($i,{className:`h-4 w-4 text-muted-foreground transition-transform ${we?"":"-rotate-90"}`}),l.jsx("span",{className:"font-semibold text-foreground",children:m[U]}),l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:ie.length})]}),we&&ie.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:ie.map(Ve=>{const ht=Cn(Ve),qr=Ee===ht;return l.jsx("div",{draggable:!0,onDragStart:Co=>Nr(Co,ht),onDragEnd:lr,className:Me("cursor-grab transition active:cursor-grabbing",qr&&"scale-[0.98] opacity-50"),children:l.jsx(Gx,{assignment:Ve,dragging:qr,transitioning:fe===ht})},ht)})})]},U)})}):l.jsx(Iv,{columns:x,items:_t,getItemId:Cn,getColumnId:U=>U.status,canDrop:({item:U,fromColumnId:ie,toColumnId:we})=>{if(ie===we)return{allowed:!0};const ze=Pi(U,we);return ze!=null&&ze.disabled?{allowed:!1,reason:ze.disabledReason||ze.description}:{allowed:!0,reason:ze?ze.warning||ze.description:`Move to ${we} (direct status change).`}},onMove:({item:U,toColumnId:ie})=>pt({item:U,toColumnId:ie}),emptyMessage:U=>`No ${U.title.toLowerCase()} assignments.`,renderCard:(U,{dragging:ie})=>l.jsx(Gx,{assignment:U,dragging:ie,transitioning:fe===Cn(U)})}),l.jsx(xb,{open:Ue!==null,action:(Ue==null?void 0:Ue.action)??null,assignmentTitle:(Ue==null?void 0:Ue.item.title)??"Assignment",loading:fe===(Ue?Cn(Ue.item):null),onOpenChange:U=>{U||at(null)},onConfirm:async U=>{if(!Ue)return;const ie=Ue;await At({item:ie.item,toColumnId:ie.toColumnId,action:ie.action,reason:U})&&at(null)}})]})}function Gx({assignment:e,dragging:t,transitioning:n}){var i;const o=Mt();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(ke,{to:`${o}/missions/${e.missionSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.missionTitle}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(i=e.id)==null?void 0:i.slice(0,8),e.id&&l.jsx(bo,{value:e.id})]})]}),l.jsx(rn,{status:e.status})]}),e.blockedReason?l.jsx("p",{className:"mt-3 rounded-md border border-amber-200/70 bg-amber-50/80 px-3 py-2 text-sm text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/20 dark:text-amber-300",children:e.blockedReason}):null,l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),l.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[l.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),l.jsx("span",{children:Br(e.updated)})]})]})}function Pi(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function Cn(e){return e.id||e.slug||"unknown"}function jr(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(`
424
+ `),a=[],c=new Map;let d=null,p=[];const h=()=>{d&&(a.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:a,blocks:c,body:o}}function tl(e){return`---
425
+ ${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
426
+ `)}
427
+ ---
428
+
429
+ ${e.body.replace(/^\n+/,"")}`}function Rt(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 m3(e,t){return Rt(e,t)==="true"}function Ua(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 g3(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 Tt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${g3(n)}`])}function Ha(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 Wa(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function pu(e){const t=jr(e);return{title:Rt(t,"title"),slug:Rt(t,"slug"),workspace:Rt(t,"workspace"),archived:m3(t,"archived"),archivedAt:Rt(t,"archivedAt"),archivedReason:Rt(t,"archivedReason"),tags:Ua(t,"tags").join(", "),body:t.body}}function x3(e,t){const n=jr(e),o={...pu(e),...t};return Tt(n,"title",o.title),Tt(n,"slug",o.slug),Tt(n,"workspace",o.workspace||null),Tt(n,"archived",o.archived),Tt(n,"archivedAt",o.archivedAt||null),Tt(n,"archivedReason",o.archivedReason||null),Ha(n,"tags",Wa(o.tags)),n.body=o.body,tl(n)}function hu(e){const t=jr(e);return{title:Rt(t,"title"),slug:Rt(t,"slug"),status:Rt(t,"status"),priority:Rt(t,"priority")||"medium",assignee:Rt(t,"assignee"),dependsOn:Ua(t,"dependsOn").join(", "),blockedReason:Rt(t,"blockedReason"),tags:Ua(t,"tags").join(", "),body:t.body}}function y3(e,t){const n=jr(e),o={...hu(e),...t};return Tt(n,"title",o.title),Tt(n,"slug",o.slug),Tt(n,"status",o.status),Tt(n,"priority",o.priority),Tt(n,"assignee",o.assignee||null),Ha(n,"dependsOn",Wa(o.dependsOn)),Tt(n,"blockedReason",o.blockedReason||null),Ha(n,"tags",Wa(o.tags)),n.body=o.body,tl(n)}function mu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),status:Rt(t,"status"),body:t.body}}function v3(e,t){const n=jr(e),o={...mu(e),...t};return Tt(n,"assignment",o.assignment),Tt(n,"status",o.status),n.body=o.body,tl(n)}function gu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),body:t.body}}function b3(e,t){const n=jr(e),o={...gu(e),...t};return Tt(n,"assignment",o.assignment),n.body=o.body,tl(n)}function xu(e){const t=jr(e);return{name:Rt(t,"name"),slug:Rt(t,"slug"),description:Rt(t,"description"),whenToUse:Rt(t,"when_to_use"),tags:Ua(t,"tags").join(", "),body:t.body}}function w3(e,t){const n=jr(e),o={...xu(e),...t};return Tt(n,"name",o.name),Tt(n,"slug",o.slug),Tt(n,"description",o.description||null),Tt(n,"when_to_use",o.whenToUse||null),Ha(n,"tags",Wa(o.tags)),n.body=o.body,tl(n)}function it(e,t,n){switch(e){case"mission":return x3(t,n);case"assignment":return y3(t,n);case"plan":return v3(t,n);case"scratchpad":return b3(t,n);case"playbook":return w3(t,n);default:return t}}function zr(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Fd(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function nl({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:a,title:c,description:d,onCancel:p,helpTitle:h,helpBody:m,allowSlugEdit:x=!1}){const[w,b]=y.useState(e),[N,S]=y.useState(!1),[C,k]=y.useState("edit");y.useEffect(()=>{b(e)},[e]);const A=C3(t,w),P=w!==e,M=j3(t,w),_=P?"Unsaved changes":n==="create"?"Draft":"Saved";return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),l.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:_})]}),d?l.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[l.jsx(Pj,{className:"h-4 w-4"}),l.jsx("span",{children:"Back"})]}),l.jsxs("button",{type:"button",onClick:()=>S(T=>!T),className:"shell-action",children:[l.jsx(Oj,{className:"h-4 w-4"}),l.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),l.jsxs("button",{type:"button",onClick:()=>o(w),disabled:i||A.length>0,className:"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-semibold text-background transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[l.jsx(iv,{className:"h-4 w-4"}),l.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),a?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:a}):null,A.length>0?l.jsx("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:l.jsx("ul",{className:"space-y-1",children:A.map(T=>l.jsx("li",{children:T},T))})}):null]}),l.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>k("edit"),className:`shell-action ${C==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>k("preview"),className:`shell-action ${C==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(Tg,{className:"h-4 w-4"}),"Preview"]})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[l.jsx("div",{className:C==="preview"?"hidden md:block":"",children:l.jsx("div",{className:"surface-panel space-y-3",children:N?l.jsx("textarea",{value:w,onChange:T=>b(T.target.value),className:"min-h-[720px] w-full rounded-md border border-border/70 bg-background/90 p-4 font-mono text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30",spellCheck:!1}):l.jsx(k3,{documentType:t,content:w,onChange:b,allowSlugEdit:x})})}),l.jsx("div",{className:C==="edit"?"hidden md:block":"",children:l.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Tg,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(Fr,{content:M,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function k3({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="mission"){const a=pu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Ai,{children:[l.jsx(Je,{label:"Mission title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===zr(a.title)||!a.slug.trim())&&(p.slug=zr(d)),n(it(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(it(e,t,{slug:zr(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is the folder name and URL-safe identifier. It is locked after creation so links and file paths stay stable."})]})}),l.jsx(Je,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:c=>n(it(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(S3,{value:a.workspace,onChange:c=>n(it(e,t,{workspace:c}))})]}),l.jsx(Je,{label:"Mission body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(it(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=hu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Ai,{children:[l.jsx(Je,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===zr(a.title)||!a.slug.trim())&&(p.slug=zr(d)),n(it(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(it(e,t,{slug:zr(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the assignment folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is locked after creation because assignment paths and dependency references use it as a stable identifier."})]})}),l.jsx(Je,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:c=>n(it(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"review",children:"Review"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"failed",children:"Failed"})]})}),l.jsx(Je,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:c=>n(it(e,t,{priority:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]})}),l.jsx(Je,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:c=>n(it(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Je,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:c=>n(it(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Je,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:c=>n(it(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:c=>n(it(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Je,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(it(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=mu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Ai,{children:[l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Je,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:c=>n(it(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"draft",children:"Draft"}),l.jsx("option",{value:"approved",children:"Approved"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"})]})})]}),l.jsx(Je,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(it(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=gu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(Ai,{children:l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Je,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(it(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=xu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Ai,{children:[l.jsx(Je,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const c=a.target.value,d={name:c};o&&(i.slug===zr(i.name)||!i.slug.trim())&&(d.slug=zr(c)),n(it(e,t,d))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!o,onChange:a=>n(it(e,t,{slug:zr(a.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the filename. It is auto-generated from the name until you change it.":"The slug is locked after creation because it is the filename."})]})}),l.jsx(Je,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(it(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(it(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Je,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(it(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Je,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(it(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Ai({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Je({label:e,children:t,className:n}){return l.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function S3({value:e,onChange:t}){const{data:n}=Bf(),o=(n==null?void 0:n.workspaces)??[];return l.jsx(Je,{label:"Workspace",children:l.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[l.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>l.jsx("option",{value:i,children:i},i))]})})}function j3(e,t){switch(e){case"mission":return pu(t).body;case"assignment":return hu(t).body;case"plan":return mu(t).body;case"scratchpad":return gu(t).body;case"playbook":return xu(t).body}}function C3(e,t){switch(e){case"mission":{const n=pu(t);return[n.title.trim()?null:"Mission title is required.",n.slug.trim()?null:"Mission slug is required.",n.slug.trim()&&!Fd(n.slug)?"Mission slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=hu(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!Fd(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return mu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return gu(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=xu(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!Fd(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function Kx(){const e=sr(),{workspace:t}=Pt(),n=Mt(),[o,i]=y.useState(null),[a,c]=y.useState(!0),[d,p]=y.useState(!1),[h,m]=y.useState(null);y.useEffect(()=>{fetch("/api/templates/mission").then(w=>w.json()).then(w=>{let b=w.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
430
+ workspace: ${t}`)),i(b),c(!1)}).catch(w=>{m(w.message),c(!1)})},[t]);async function x(w){p(!0),m(null);try{const b=await fetch("/api/missions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:w})}),N=await b.json();if(!b.ok){m(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/missions/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(kt,{label:"Loading mission template…"}):h&&!o?l.jsx(St,{error:h}):l.jsx(nl,{initialContent:o||"",documentType:"mission",mode:"create",onSave:x,saving:d,error:h,title:"Create Mission",description:"Missions hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading mission.md.",onCancel:()=>e(`${n}/missions`),helpTitle:"Mission editing rules",helpBody:"Use this form for mission intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function Yx(){const{slug:e}=Pt(),t=Mt(),n=sr(),[o,i]=y.useState(null),[a,c]=y.useState(!0),[d,p]=y.useState(!1),[h,m]=y.useState(null);y.useEffect(()=>{fetch("/api/templates/assignment").then(w=>w.json()).then(w=>{i(w.content),c(!1)}).catch(w=>{m(w.message),c(!1)})},[]);async function x(w){if(!e){m("Mission slug is required.");return}p(!0),m(null);try{const b=await fetch(`/api/missions/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:w})}),N=await b.json();if(!b.ok){m(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/missions/${e}/assignments/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(kt,{label:"Loading assignment template…"}):h&&!o?l.jsx(St,{error:h}):l.jsx(nl,{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}/missions/${e}`:`${t}/missions`),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 yu({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:a,helpTitle:c,helpBody:d}){const p=sr(),{data:h,loading:m,error:x}=jv(e),[w,b]=y.useState(!1),[N,S]=y.useState(null);async function C(k){b(!0),S(null);try{const A=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:k})}),P=await A.json();if(!A.ok){S(P.error||`HTTP ${A.status}`),b(!1);return}p(n)}catch(A){S(A.message),b(!1);return}b(!1)}return m?l.jsx(kt,{label:`Loading ${o.toLowerCase()}…`}):x||!h?l.jsx(St,{error:x||`${o} is unavailable.`}):l.jsx(nl,{initialContent:h.content,documentType:a,onSave:C,saving:w,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Xx(){const{slug:e}=Pt(),t=Mt(),n=e??"";return l.jsx(yu,{loadUrl:`/api/missions/${n}/edit`,saveUrl:`/api/missions/${n}`,redirectTo:`${t}/missions/${n}`,title:"Edit Mission",description:"Mission edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"mission",helpTitle:"Editable vs derived mission fields",helpBody:"Mission 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 Qx(){const{slug:e,aslug:t}=Pt(),n=Mt(),o=e??"",i=t??"";return l.jsx(yu,{loadUrl:`/api/missions/${o}/assignments/${i}/edit`,saveUrl:`/api/missions/${o}/assignments/${i}`,redirectTo:`${n}/missions/${o}/assignments/${i}`,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 Jx(){const{slug:e,aslug:t}=Pt(),n=Mt(),o=e??"",i=t??"";return l.jsx(yu,{loadUrl:`/api/missions/${o}/assignments/${i}/plan/edit`,saveUrl:`/api/missions/${o}/assignments/${i}/plan`,redirectTo:`${n}/missions/${o}/assignments/${i}?tab=plan`,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 Zx(){const{slug:e,aslug:t}=Pt(),n=Mt(),o=e??"",i=t??"";return l.jsx(yu,{loadUrl:`/api/missions/${o}/assignments/${i}/scratchpad/edit`,saveUrl:`/api/missions/${o}/assignments/${i}/scratchpad`,redirectTo:`${n}/missions/${o}/assignments/${i}?tab=scratchpad`,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 plan.md."})}function wb({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:a,helpBody:c}){const d=sr(),{data:p,loading:h,error:m}=jv(e),[x,w]=y.useState(""),[b,N]=y.useState(""),[S,C]=y.useState(!1),[k,A]=y.useState(null);async function P(){C(!0),A(null);try{const M=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),_=await M.json();if(!M.ok){A(_.error||`HTTP ${M.status}`),C(!1);return}d(n)}catch(M){A(M.message),C(!1);return}C(!1)}return h?l.jsx(kt,{label:`Loading ${o.toLowerCase()}…`}):m||!p?l.jsx(St,{error:m||`${o} is unavailable.`}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(Ae,{title:o,description:i,children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),l.jsx("input",{value:x,onChange:M=>w(M.target.value),placeholder:"Optional title",className:"editor-input"})]}),l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),l.jsx("textarea",{value:b,onChange:M=>N(M.target.value),className:"editor-textarea",spellCheck:!1})]}),k?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:k}):null,l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),l.jsx("button",{type:"button",onClick:P,disabled:S||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:S?"Appending…":"Append Entry"})]})]})}),l.jsx(Ae,{title:"Current Document",children:l.jsx(Fr,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function ey(){const{slug:e,aslug:t}=Pt(),n=Mt(),o=e??"",i=t??"";return l.jsx(wb,{loadUrl:`/api/missions/${o}/assignments/${i}/handoff/edit`,saveUrl:`/api/missions/${o}/assignments/${i}/handoff/entries`,redirectTo:`${n}/missions/${o}/assignments/${i}?tab=handoff`,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 ty(){const{slug:e,aslug:t}=Pt(),n=Mt(),o=e??"",i=t??"";return l.jsx(wb,{loadUrl:`/api/missions/${o}/assignments/${i}/decision-record/edit`,saveUrl:`/api/missions/${o}/assignments/${i}/decision-record/entries`,redirectTo:`${n}/missions/${o}/assignments/${i}?tab=decisions`,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 ny(){const{workspace:e}=Pt(),{data:t}=$f(),{data:n,loading:o,error:i,refetch:a}=Cv(),[c,d]=y.useState(!1),[p,h]=y.useState(""),[m,x]=y.useState(!1),w=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const k=new Set(t.filter(A=>e==="_ungrouped"?A.workspace===null:A.workspace===e).map(A=>A.slug));return n.sessions.filter(A=>A.windows.some(P=>P.panes.some(M=>M.assignment&&k.has(M.assignment.mission))))})();async function b(k){if(k.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim()})}),h(""),d(!1),a()}catch{}}async function N(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),a()}finally{x(!1)}}async function S(k){await fetch(`/api/servers/${encodeURIComponent(k)}`,{method:"DELETE"}),a()}async function C(k){await fetch(`/api/servers/${encodeURIComponent(k)}/refresh`,{method:"POST"}),a()}return o?l.jsx(kt,{label:"Loading servers…"}):i?l.jsx(St,{error:i}):n?n.tmuxAvailable?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?l.jsxs("form",{onSubmit:b,className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:p,onChange:k=>h(k.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),l.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),l.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):l.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[l.jsx(er,{className:"h-3.5 w-3.5"}),"Track Session"]}),l.jsxs("button",{className:"shell-action",onClick:N,disabled:m,children:[l.jsx(sv,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`}),"Refresh All"]})]}),w.length===0?l.jsx(xt,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):l.jsx("div",{className:"mt-4 space-y-4",children:w.map(k=>l.jsx(N3,{session:k,onRefresh:()=>C(k.name),onRemove:()=>S(k.name),onRefetch:a},k.name))})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[l.jsx(nC,{className:"h-10 w-10 text-muted-foreground/40"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),l.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",l.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function N3({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return l.jsxs("div",{className:"surface-panel",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(_f,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.alive?"border border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:e.alive?"alive":"dead"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:l.jsx(sv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:l.jsx(Xi,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&l.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>l.jsxs("div",{children:[l.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),l.jsx("div",{className:"space-y-1.5",children:i.panes.map(a=>l.jsx(E3,{pane:a,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${a.index}`))})]},i.index))}),!e.alive&&l.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(Jj,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function E3({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=Mt(),a=e.cwd.replace(/^\/Users\/[^/]+/,"~");return l.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),l.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx("span",{className:"truncate",title:e.cwd,children:a}),l.jsx(bo,{value:e.cwd})]}),e.branch&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(nv,{className:"h-3 w-3"}),e.branch,e.worktree&&l.jsx("span",{className:"rounded bg-violet-100 px-1 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-950/40 dark:text-violet-400",children:"worktree"})]}),e.ports.length>0&&l.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>l.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-teal-200 bg-teal-50 px-1.5 py-0.5 text-xs font-medium text-teal-700 hover:bg-teal-100 dark:border-teal-900 dark:bg-teal-950/40 dark:text-teal-400 dark:hover:bg-teal-950/60",children:[c.replace("http://localhost:",":"),l.jsx(tv,{className:"h-2.5 w-2.5"})]},c))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(ke,{to:`${i}/missions/${e.assignment.mission}/assignments/${e.assignment.slug}`,className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20",children:[l.jsx(Hj,{className:"h-2.5 w-2.5"}),e.assignment.title]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}var R3=Symbol("radix.slottable");function T3(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=R3,t}var kb="AlertDialog",[P3]=Vo(kb,[K0]),Wr=K0(),Sb=e=>{const{__scopeAlertDialog:t,...n}=e,o=Wr(t);return l.jsx(cb,{...o,...n,modal:!0})};Sb.displayName=kb;var A3="AlertDialogTrigger",D3=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(o3,{...i,...o,ref:t})});D3.displayName=A3;var I3="AlertDialogPortal",jb=e=>{const{__scopeAlertDialog:t,...n}=e,o=Wr(t);return l.jsx(db,{...o,...n})};jb.displayName=I3;var L3="AlertDialogOverlay",Cb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(fp,{...i,...o,ref:t})});Cb.displayName=L3;var Es="AlertDialogContent",[O3,M3]=P3(Es),_3=T3("AlertDialogContent"),Nb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,a=Wr(n),c=y.useRef(null),d=Xt(t,c),p=y.useRef(null);return l.jsx(e3,{contentName:Es,titleName:Eb,docsSlug:"alert-dialog",children:l.jsx(O3,{scope:n,cancelRef:p,children:l.jsxs(pp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:tt(i.onOpenAutoFocus,h=>{var m;h.preventDefault(),(m=p.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[l.jsx(_3,{children:o}),l.jsx(F3,{contentRef:c})]})})})});Nb.displayName=Es;var Eb="AlertDialogTitle",Rb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(hp,{...i,...o,ref:t})});Rb.displayName=Eb;var Tb="AlertDialogDescription",Pb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(mp,{...i,...o,ref:t})});Pb.displayName=Tb;var z3="AlertDialogAction",Ab=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(fb,{...i,...o,ref:t})});Ab.displayName=z3;var Db="AlertDialogCancel",Ib=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=M3(Db,n),a=Wr(n),c=Xt(t,i);return l.jsx(fb,{...a,...o,ref:c})});Ib.displayName=Db;var F3=({contentRef:e})=>{const t=`\`${Es}\` requires a description for the component to be accessible for screen reader users.
431
+
432
+ You can add a description to the \`${Es}\` by passing a \`${Tb}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
433
+
434
+ 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 \`${Es}\`. 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.
435
+
436
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$3=Sb,B3=jb,Lb=Cb,Ob=Nb,Mb=Ab,_b=Ib,zb=Rb,Fb=Pb;const U3=$3,H3=B3,$b=y.forwardRef(({className:e,...t},n)=>l.jsx(Lb,{ref:n,className:Me("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));$b.displayName=Lb.displayName;const Bb=y.forwardRef(({className:e,...t},n)=>l.jsxs(H3,{children:[l.jsx($b,{}),l.jsx(Ob,{ref:n,className:Me("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})]}));Bb.displayName=Ob.displayName;function W3({className:e,...t}){return l.jsx("div",{className:Me("flex flex-col space-y-2 text-left",e),...t})}function V3({className:e,...t}){return l.jsx("div",{className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const Ub=y.forwardRef(({className:e,...t},n)=>l.jsx(zb,{ref:n,className:Me("text-lg font-semibold tracking-tight text-foreground",e),...t}));Ub.displayName=zb.displayName;const Hb=y.forwardRef(({className:e,...t},n)=>l.jsx(Fb,{ref:n,className:Me("text-sm leading-6 text-muted-foreground",e),...t}));Hb.displayName=Fb.displayName;const Wb=y.forwardRef(({className:e,...t},n)=>l.jsx(Mb,{ref:n,className:Me(e),...t}));Wb.displayName=Mb.displayName;const Vb=y.forwardRef(({className:e,...t},n)=>l.jsx(_b,{ref:n,className:Me(e),...t}));Vb.displayName=_b.displayName;function q3({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:a=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return l.jsx(U3,{open:e,onOpenChange:h=>a?void 0:p(h),children:l.jsxs(Bb,{children:[l.jsxs(W3,{children:[l.jsx(Ub,{children:t}),l.jsx(Hb,{children:n})]}),l.jsxs(V3,{children:[l.jsx(Vb,{disabled:a,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),l.jsx(Wb,{disabled:a,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:h=>{h.preventDefault(),d()},children:a?"Working...":o})]})]})})}function ry(){const{workspace:e}=Pt(),{data:t}=$f(),{data:n,loading:o,error:i}=qC(),[a,c]=y.useState(""),[d,p]=y.useState(""),[h,m]=y.useState(""),[x,w]=y.useState("started_desc"),[b,N]=y.useState(0),[S,C]=y.useState(new Set),[k,A]=y.useState(!1),[P,M]=y.useState(null),[_,T]=y.useState(null),D=(n==null?void 0:n.sessions.some(W=>W.status==="active"))??!1;y.useEffect(()=>{if(!D)return;const W=window.setInterval(()=>N(J=>J+1),3e4);return()=>window.clearInterval(W)},[D]),y.useEffect(()=>{C(W=>{if(W.size===0)return W;const J=new Set((n==null?void 0:n.sessions.map(te=>te.sessionId))??[]),K=new Set([...W].filter(te=>J.has(te)));return K.size===W.size?W:K})},[n]);const B=y.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const W=a.trim().toLowerCase();return[...n.sessions.filter(K=>{var X;if(e&&t){const se=((X=t.find(E=>E.slug===K.missionSlug))==null?void 0:X.workspace)??null;if(e==="_ungrouped"){if(se!==null)return!1}else if(se!==e)return!1}const te=K3(K.started);return d&&(!te||te<d)||h&&(!te||te>h)?!1:W?[K.missionSlug??"",K.assignmentSlug??"",K.agent,K.sessionId,K.path,K.description??""].join(" ").toLowerCase().includes(W):!0})].sort((K,te)=>Y3(K,te,x))},[n,a,x,d,h,b,e,t]);function q(W){C(J=>{const K=new Set(J);return K.has(W)?K.delete(W):K.add(W),K})}function R(){S.size===B.length&&B.length>0?C(new Set):C(new Set(B.map(W=>W.sessionId)))}async function L(W){M(null),A(!0);try{const J=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:W})}),K=await J.json().catch(()=>null);if(!J.ok)throw new Error((K==null?void 0:K.error)||`HTTP ${J.status}`);C(te=>new Set([...te].filter(ae=>!W.includes(ae)))),T(null)}catch(J){M(J.message)}finally{A(!1)}}if(o)return l.jsx(kt,{label:"Loading agent sessions..."});if(i)return l.jsx(St,{error:i});if(!n)return null;const $=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(Uf,{children:[l.jsx(Hf,{value:a,onChange:c,placeholder:"Search mission, assignment, agent, session ID, path, or description"}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started From",l.jsx("input",{type:"date",value:d,onChange:W=>p(W.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started To",l.jsx("input",{type:"date",value:h,onChange:W=>m(W.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("select",{value:x,onChange:W=>w(W.target.value),className:"editor-input max-w-[200px]",children:[l.jsx("option",{value:"started_desc",children:"Newest first"}),l.jsx("option",{value:"started_asc",children:"Oldest first"}),l.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),l.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),P?l.jsx("div",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:P}):null,S.size>0&&l.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[l.jsxs("span",{className:"text-muted-foreground",children:[S.size," session",S.size!==1?"s":""," selected"]}),l.jsxs("button",{className:"shell-action text-destructive",onClick:()=>T({sessionIds:[...S],title:`Delete ${S.size} selected session${S.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:S.size===1?"Delete Session":"Delete Sessions"}),disabled:k,children:[l.jsx(Xi,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),l.jsx("button",{className:"shell-action",onClick:()=>C(new Set),children:"Clear Selection"})]}),$?B.length===0?l.jsx(xt,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):l.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"w-8 pb-2 pr-3",children:l.jsx("button",{onClick:R,className:"text-muted-foreground hover:text-foreground",children:S.size===B.length&&B.length>0?l.jsx(br,{className:"h-4 w-4"}):l.jsx(lv,{className:"h-4 w-4"})})}),l.jsx("th",{className:"pb-2 pr-3",children:"Mission"}),l.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),l.jsx("th",{className:"pb-2 pr-3",children:"Description"}),l.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),l.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Started"}),l.jsx("th",{className:"pb-2 pr-3",children:"Path"}),l.jsx("th",{className:"w-8 pb-2"})]})}),l.jsx("tbody",{children:B.map(W=>l.jsx(G3,{session:W,selected:S.has(W.sessionId),onToggle:()=>q(W.sessionId),onDelete:()=>T({sessionIds:[W.sessionId],title:`Delete session ${W.sessionId.slice(0,8)}...?`,description:`Remove this ${W.agent} session record${W.assignmentSlug?` for ${W.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},W.sessionId))})]})}):l.jsx(xt,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),l.jsx(q3,{open:_!==null,title:(_==null?void 0:_.title)??"Delete session?",description:(_==null?void 0:_.description)??"",confirmLabel:(_==null?void 0:_.confirmLabel)??"Delete",destructive:!0,loading:k,onOpenChange:W=>{W||T(null)},onConfirm:async()=>{_&&await L(_.sessionIds)}})]})}function G3({session:e,selected:t,onToggle:n,onDelete:o}){const i=Mt(),a=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—";return l.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?l.jsx(br,{className:"h-4 w-4"}):l.jsx(lv,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.missionSlug?l.jsx(ke,{to:`${i}/missions/${e.missionSlug}`,className:"text-primary hover:underline",children:nn(e.missionSlug)}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:e.missionSlug&&e.assignmentSlug?l.jsx(ke,{to:`${i}/missions/${e.missionSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:nn(e.assignmentSlug)}):e.assignmentSlug?l.jsx("span",{children:nn(e.assignmentSlug)}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx(nu,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:a}),l.jsx(bo,{value:e.sessionId})]})}),l.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Rn(e.started)}),l.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&l.jsx(bo,{value:e.path})]})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:l.jsx(Xi,{className:"h-3.5 w-3.5"})})})]})}function K3(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 Sa(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 Y3(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 Sa(e)-Sa(t);case"duration_desc":return Sa(t)-Sa(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.missionSlug??"").localeCompare(t.missionSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function X3(){const{data:e,loading:t,error:n}=KC(),[o,i]=y.useState(""),a=y.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!o.trim())return e.playbooks;const c=o.toLowerCase();return e.playbooks.filter(d=>d.name.toLowerCase().includes(c)||d.description.toLowerCase().includes(c)||d.slug.toLowerCase().includes(c)||d.tags.some(p=>p.toLowerCase().includes(c)))},[e,o]);return t?l.jsx(kt,{label:"Loading playbooks..."}):n?l.jsx(St,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(ru,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search playbooks...",value:o,onChange:c=>i(c.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs(ke,{to:"/playbooks/create",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(er,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(ke,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx(Mj,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:"auto-generated"})]}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px]",children:"~/.syntaur/playbooks/manifest.md"})," in your CLAUDE.md for agent context."]})]})]}),a.length===0?l.jsx(xt,{title:"No playbooks found",description:(e==null?void 0:e.playbooks.length)===0?"Playbooks define rules and workflows for how agents should operate. Create your first one to get started.":"No playbooks match your search.",actions:(e==null?void 0:e.playbooks.length)===0?l.jsxs(ke,{to:"/playbooks/create",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(er,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):l.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:a.map(c=>l.jsxs(ke,{to:`/playbooks/${c.slug}`,className:"surface-panel group flex flex-col gap-2 p-4 transition hover:border-foreground/20",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(Jy,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:c.name}),c.description?l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:c.description}):null]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[l.jsxs("div",{className:"flex flex-wrap gap-1",children:[c.tags.slice(0,3).map(d=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[l.jsx(av,{className:"h-2.5 w-2.5"}),d]},d)),c.tags.length>3?l.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",c.tags.length-3]}):null]}),l.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:Br(c.updated)})]})]},c.slug))})]})}function Q3(){const{slug:e}=Pt(),t=sr(),{data:n,loading:o,error:i}=YC(e),[a,c]=y.useState(!1),[d,p]=y.useState(!1),h=e==="manifest";async function m(){if(e){p(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{p(!1)}}}return o?l.jsx(kt,{label:"Loading playbook..."}):i?l.jsx(St,{error:i}):n?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:h?"Playbook Manifest":n.name}),h?l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:"auto-generated"}):null]}),!h&&n.description?l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,h?l.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.syntaur/playbooks/manifest.md"})," ","in your CLAUDE.md for agent context."]}):null,!h&&n.whenToUse?l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,l.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Created ",Rn(n.created)]}),l.jsxs("span",{children:["Updated ",Rn(n.updated)]})]}),n.tags.length>0?l.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(x=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:[l.jsx(av,{className:"h-3 w-3"}),x]},x))}):null]}),h?null:l.jsxs("div",{className:"flex shrink-0 gap-2",children:[l.jsxs(ke,{to:`/playbooks/${e}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[l.jsx(Kj,{className:"h-3 w-3"}),"Edit"]}),a?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:m,disabled:d,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:d?"Deleting...":"Confirm"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):l.jsxs("button",{type:"button",onClick:()=>c(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-red-600 transition hover:bg-red-50 dark:hover:bg-red-950/30",children:[l.jsx(Xi,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(Fr,{content:n.body})})]}):null}function J3(){const e=sr(),[t,n]=y.useState(null),[o,i]=y.useState(!0),[a,c]=y.useState(!1),[d,p]=y.useState(null);y.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})}),w=await x.json();if(!x.ok){p(w.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${w.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return o?l.jsx(kt,{label:"Loading playbook template..."}):d&&!t?l.jsx(St,{error:d}):l.jsx(nl,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:h,saving:a,error:d,title:"Create Playbook",description:"Playbooks define rules and workflows for how agents should operate. Keep them short, imperative, and focused on a single concern.",onCancel:()=>e("/playbooks"),allowSlugEdit:!0})}function Z3(){const{slug:e}=Pt(),t=sr(),[n,o]=y.useState(null),[i,a]=y.useState(!0),[c,d]=y.useState(!1),[p,h]=y.useState(null);y.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),a(!1)}).catch(x=>{h(x.message),a(!1)})},[e]);async function m(x){if(e){d(!0),h(null);try{const w=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await w.json();if(!w.ok){h(b.error||`HTTP ${w.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(w){h(w.message),d(!1);return}d(!1)}}return i?l.jsx(kt,{label:"Loading playbook..."}):p&&!n?l.jsx(St,{error:p}):l.jsx(nl,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function e4({value:e,onChange:t}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"color",value:e||"#64748b",onChange:n=>t(n.target.value),className:"h-7 w-7 shrink-0 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5",title:"Pick a color"}),l.jsx("input",{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"#64748b",className:"editor-input w-[5.5rem] font-mono text-xs"})]})}const t4=["top","right","bottom","left"],ko=Math.min,En=Math.max,Va=Math.round,ja=Math.floor,wr=e=>({x:e,y:e}),n4={left:"right",right:"left",bottom:"top",top:"bottom"};function gf(e,t,n){return En(e,ko(t,n))}function Ur(e,t){return typeof e=="function"?e(t):e}function Hr(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function gp(e){return e==="x"?"y":"x"}function xp(e){return e==="y"?"height":"width"}function yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function yp(e){return gp(yr(e))}function r4(e,t,n){n===void 0&&(n=!1);const o=_s(e),i=yp(e),a=xp(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=qa(c)),[c,qa(c)]}function o4(e){const t=qa(e);return[xf(e),t,xf(t)]}function xf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const oy=["left","right"],sy=["right","left"],s4=["top","bottom"],i4=["bottom","top"];function l4(e,t,n){switch(e){case"top":case"bottom":return n?t?sy:oy:t?oy:sy;case"left":case"right":return t?s4:i4;default:return[]}}function a4(e,t,n,o){const i=_s(e);let a=l4(Hr(e),n==="start",o);return i&&(a=a.map(c=>c+"-"+i),t&&(a=a.concat(a.map(xf)))),a}function qa(e){const t=Hr(e);return n4[t]+e.slice(t.length)}function u4(e){return{top:0,right:0,bottom:0,left:0,...e}}function qb(e){return typeof e!="number"?u4(e):{top:e,right:e,bottom:e,left:e}}function Ga(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 iy(e,t,n){let{reference:o,floating:i}=e;const a=yr(t),c=yp(t),d=xp(c),p=Hr(t),h=a==="y",m=o.x+o.width/2-i.width/2,x=o.y+o.height/2-i.height/2,w=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(_s(t)){case"start":b[c]-=w*(n&&h?-1:1);break;case"end":b[c]+=w*(n&&h?-1:1);break}return b}async function c4(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:x="floating",altBoundary:w=!1,padding:b=0}=Ur(t,e),N=qb(b),C=d[w?x==="floating"?"reference":"floating":x],k=Ga(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),A=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),M=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},_=Ga(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:P,strategy:p}):A);return{top:(k.top-_.top+N.top)/M.y,bottom:(_.bottom-k.bottom+N.bottom)/M.y,left:(k.left-_.left+N.left)/M.x,right:(_.right-k.right+N.right)/M.x}}const d4=50,f4=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:c4},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}=iy(h,o,p),w=o,b=0;const N={};for(let S=0;S<a.length;S++){const C=a[S];if(!C)continue;const{name:k,fn:A}=C,{x:P,y:M,data:_,reset:T}=await A({x:m,y:x,initialPlacement:o,placement:w,strategy:i,middlewareData:N,rects:h,platform:d,elements:{reference:e,floating:t}});m=P??m,x=M??x,N[k]={...N[k],..._},T&&b<d4&&(b++,typeof T=="object"&&(T.placement&&(w=T.placement),T.rects&&(h=T.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:m,y:x}=iy(h,w,p)),S=-1)}return{x:m,y:x,placement:w,strategy:i,middlewareData:N}},p4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:c,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=Ur(e,t)||{};if(h==null)return{};const x=qb(m),w={x:n,y:o},b=yp(i),N=xp(b),S=await c.getDimensions(h),C=b==="y",k=C?"top":"left",A=C?"bottom":"right",P=C?"clientHeight":"clientWidth",M=a.reference[N]+a.reference[b]-w[b]-a.floating[N],_=w[b]-a.reference[b],T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let D=T?T[P]:0;(!D||!await(c.isElement==null?void 0:c.isElement(T)))&&(D=d.floating[P]||a.floating[N]);const B=M/2-_/2,q=D/2-S[N]/2-1,R=ko(x[k],q),L=ko(x[A],q),$=R,W=D-S[N]-L,J=D/2-S[N]/2+B,K=gf($,J,W),te=!p.arrow&&_s(i)!=null&&J!==K&&a.reference[N]/2-(J<$?R:L)-S[N]/2<0,ae=te?J<$?J-$:J-W:0;return{[b]:w[b]+ae,data:{[b]:K,centerOffset:J-K-ae,...te&&{alignmentOffset:ae}},reset:te}}}),h4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:c,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...C}=Ur(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=Hr(i),A=yr(d),P=Hr(d)===d,M=await(p.isRTL==null?void 0:p.isRTL(h.floating)),_=w||(P||!S?[qa(d)]:o4(d)),T=N!=="none";!w&&T&&_.push(...a4(d,S,N,M));const D=[d,..._],B=await p.detectOverflow(t,C),q=[];let R=((o=a.flip)==null?void 0:o.overflows)||[];if(m&&q.push(B[k]),x){const J=r4(i,c,M);q.push(B[J[0]],B[J[1]])}if(R=[...R,{placement:i,overflows:q}],!q.every(J=>J<=0)){var L,$;const J=(((L=a.flip)==null?void 0:L.index)||0)+1,K=D[J];if(K&&(!(x==="alignment"?A!==yr(K):!1)||R.every(X=>yr(X.placement)===A?X.overflows[0]>0:!0)))return{data:{index:J,overflows:R},reset:{placement:K}};let te=($=R.filter(ae=>ae.overflows[0]<=0).sort((ae,X)=>ae.overflows[1]-X.overflows[1])[0])==null?void 0:$.placement;if(!te)switch(b){case"bestFit":{var W;const ae=(W=R.filter(X=>{if(T){const se=yr(X.placement);return se===A||se==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(se=>se>0).reduce((se,E)=>se+E,0)]).sort((X,se)=>X[1]-se[1])[0])==null?void 0:W[0];ae&&(te=ae);break}case"initialPlacement":te=d;break}if(i!==te)return{reset:{placement:te}}}return{}}}};function ly(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ay(e){return t4.some(t=>e[t]>=0)}const m4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...a}=Ur(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...a,elementContext:"reference"}),d=ly(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ay(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...a,altBoundary:!0}),d=ly(c,n.floating);return{data:{escapedOffsets:d,escaped:ay(d)}}}default:return{}}}}},Gb=new Set(["left","top"]);async function g4(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Hr(n),d=_s(n),p=yr(n)==="y",h=Gb.has(c)?-1:1,m=a&&p?-1:1,x=Ur(t,e);let{mainAxis:w,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:w*h}:{x:w*h,y:b*m}}const x4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:c,middlewareData:d}=t,p=await g4(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:a+p.y,data:{...p,placement:c}}}}},y4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:a}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:k=>{let{x:A,y:P}=k;return{x:A,y:P}}},...h}=Ur(e,t),m={x:n,y:o},x=await a.detectOverflow(t,h),w=yr(Hr(i)),b=gp(w);let N=m[b],S=m[w];if(c){const k=b==="y"?"top":"left",A=b==="y"?"bottom":"right",P=N+x[k],M=N-x[A];N=gf(P,N,M)}if(d){const k=w==="y"?"top":"left",A=w==="y"?"bottom":"right",P=S+x[k],M=S-x[A];S=gf(P,S,M)}const C=p.fn({...t,[b]:N,[w]:S});return{...C,data:{x:C.x-n,y:C.y-o,enabled:{[b]:c,[w]:d}}}}}},v4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Ur(e,t),m={x:n,y:o},x=yr(i),w=gp(x);let b=m[w],N=m[x];const S=Ur(d,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(p){const P=w==="y"?"height":"width",M=a.reference[w]-a.floating[P]+C.mainAxis,_=a.reference[w]+a.reference[P]-C.mainAxis;b<M?b=M:b>_&&(b=_)}if(h){var k,A;const P=w==="y"?"width":"height",M=Gb.has(Hr(i)),_=a.reference[x]-a.floating[P]+(M&&((k=c.offset)==null?void 0:k[x])||0)+(M?0:C.crossAxis),T=a.reference[x]+a.reference[P]+(M?0:((A=c.offset)==null?void 0:A[x])||0)-(M?C.crossAxis:0);N<_?N=_:N>T&&(N=T)}return{[w]:b,[x]:N}}}},b4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:c,elements:d}=t,{apply:p=()=>{},...h}=Ur(e,t),m=await c.detectOverflow(t,h),x=Hr(i),w=_s(i),b=yr(i)==="y",{width:N,height:S}=a.floating;let C,k;x==="top"||x==="bottom"?(C=x,k=w===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(k=x,C=w==="end"?"top":"bottom");const A=S-m.top-m.bottom,P=N-m.left-m.right,M=ko(S-m[C],A),_=ko(N-m[k],P),T=!t.middlewareData.shift;let D=M,B=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=P),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(D=A),T&&!w){const R=En(m.left,0),L=En(m.right,0),$=En(m.top,0),W=En(m.bottom,0);b?B=N-2*(R!==0||L!==0?R+L:En(m.left,m.right)):D=S-2*($!==0||W!==0?$+W:En(m.top,m.bottom))}await p({...t,availableWidth:B,availableHeight:D});const q=await c.getDimensions(d.floating);return N!==q.width||S!==q.height?{reset:{rects:!0}}:{}}}};function vu(){return typeof window<"u"}function zs(e){return Kb(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cr(e){var t;return(t=(Kb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kb(e){return vu()?e instanceof Node||e instanceof Pn(e).Node:!1}function tr(e){return vu()?e instanceof Element||e instanceof Pn(e).Element:!1}function Vr(e){return vu()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function uy(e){return!vu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}function rl(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function w4(e){return/^(table|td|th)$/.test(zs(e))}function bu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const k4=/transform|translate|scale|rotate|perspective|filter/,S4=/paint|layout|strict|content/,$o=e=>!!e&&e!=="none";let $d;function vp(e){const t=tr(e)?nr(e):e;return $o(t.transform)||$o(t.translate)||$o(t.scale)||$o(t.rotate)||$o(t.perspective)||!bp()&&($o(t.backdropFilter)||$o(t.filter))||k4.test(t.willChange||"")||S4.test(t.contain||"")}function j4(e){let t=So(e);for(;Vr(t)&&!Ps(t);){if(vp(t))return t;if(bu(t))return null;t=So(t)}return null}function bp(){return $d==null&&($d=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$d}function Ps(e){return/^(html|body|#document)$/.test(zs(e))}function nr(e){return Pn(e).getComputedStyle(e)}function wu(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function So(e){if(zs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uy(e)&&e.host||Cr(e);return uy(t)?t.host:t}function Yb(e){const t=So(e);return Ps(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&rl(t)?t:Yb(t)}function Ui(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Yb(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),c=Pn(i);if(a){const d=yf(c);return t.concat(c,c.visualViewport||[],rl(i)?i:[],d&&n?Ui(d):[])}else return t.concat(i,Ui(i,[],n))}function yf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xb(e){const t=nr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Vr(e),a=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=Va(n)!==a||Va(o)!==c;return d&&(n=a,o=c),{width:n,height:o,$:d}}function wp(e){return tr(e)?e:e.contextElement}function Rs(e){const t=wp(e);if(!Vr(t))return wr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=Xb(t);let c=(a?Va(n.width):n.width)/o,d=(a?Va(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const C4=wr(0);function Qb(e){const t=Pn(e);return!bp()||!t.visualViewport?C4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pn(e)?!1:t}function Wo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=wp(e);let c=wr(1);t&&(o?tr(o)&&(c=Rs(o)):c=Rs(e));const d=N4(a,n,o)?Qb(a):wr(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(a){const w=Pn(a),b=o&&tr(o)?Pn(o):o;let N=w,S=yf(N);for(;S&&o&&b!==N;){const C=Rs(S),k=S.getBoundingClientRect(),A=nr(S),P=k.left+(S.clientLeft+parseFloat(A.paddingLeft))*C.x,M=k.top+(S.clientTop+parseFloat(A.paddingTop))*C.y;p*=C.x,h*=C.y,m*=C.x,x*=C.y,p+=P,h+=M,N=Pn(S),S=yf(N)}}return Ga({width:m,height:x,x:p,y:h})}function ku(e,t){const n=wu(e).scrollLeft;return t?t.left+n:Wo(Cr(e)).left+n}function Jb(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ku(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function E4(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",c=Cr(o),d=t?bu(t.floating):!1;if(o===c||d&&a)return n;let p={scrollLeft:0,scrollTop:0},h=wr(1);const m=wr(0),x=Vr(o);if((x||!x&&!a)&&((zs(o)!=="body"||rl(c))&&(p=wu(o)),x)){const b=Wo(o);h=Rs(o),m.x=b.x+o.clientLeft,m.y=b.y+o.clientTop}const w=c&&!x&&!a?Jb(c,p):wr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-p.scrollLeft*h.x+m.x+w.x,y:n.y*h.y-p.scrollTop*h.y+m.y+w.y}}function R4(e){return Array.from(e.getClientRects())}function T4(e){const t=Cr(e),n=wu(e),o=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=En(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+ku(e);const d=-n.scrollTop;return nr(o).direction==="rtl"&&(c+=En(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:c,y:d}}const cy=25;function P4(e,t){const n=Pn(e),o=Cr(e),i=n.visualViewport;let a=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){a=i.width,c=i.height;const m=bp();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=ku(o);if(h<=0){const m=o.ownerDocument,x=m.body,w=getComputedStyle(x),b=m.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=cy&&(a-=N)}else h<=cy&&(a+=h);return{width:a,height:c,x:d,y:p}}function A4(e,t){const n=Wo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Vr(e)?Rs(e):wr(1),c=e.clientWidth*a.x,d=e.clientHeight*a.y,p=i*a.x,h=o*a.y;return{width:c,height:d,x:p,y:h}}function dy(e,t,n){let o;if(t==="viewport")o=P4(e,n);else if(t==="document")o=T4(Cr(e));else if(tr(t))o=A4(t,n);else{const i=Qb(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ga(o)}function Zb(e,t){const n=So(e);return n===t||!tr(n)||Ps(n)?!1:nr(n).position==="fixed"||Zb(n,t)}function D4(e,t){const n=t.get(e);if(n)return n;let o=Ui(e,[],!1).filter(d=>tr(d)&&zs(d)!=="body"),i=null;const a=nr(e).position==="fixed";let c=a?So(e):e;for(;tr(c)&&!Ps(c);){const d=nr(c),p=vp(c);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||rl(c)&&!p&&Zb(e,c))?o=o.filter(m=>m!==c):i=d,c=So(c)}return t.set(e,o),o}function I4(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?bu(t)?[]:D4(t,this._c):[].concat(n),o],d=dy(t,c[0],i);let p=d.top,h=d.right,m=d.bottom,x=d.left;for(let w=1;w<c.length;w++){const b=dy(t,c[w],i);p=En(b.top,p),h=ko(b.right,h),m=ko(b.bottom,m),x=En(b.left,x)}return{width:h-x,height:m-p,x,y:p}}function L4(e){const{width:t,height:n}=Xb(e);return{width:t,height:n}}function O4(e,t,n){const o=Vr(t),i=Cr(t),a=n==="fixed",c=Wo(e,!0,a,t);let d={scrollLeft:0,scrollTop:0};const p=wr(0);function h(){p.x=ku(i)}if(o||!o&&!a)if((zs(t)!=="body"||rl(i))&&(d=wu(t)),o){const b=Wo(t,!0,a,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&h();a&&!o&&i&&h();const m=i&&!o&&!a?Jb(i,d):wr(0),x=c.left+d.scrollLeft-p.x-m.x,w=c.top+d.scrollTop-p.y-m.y;return{x,y:w,width:c.width,height:c.height}}function Bd(e){return nr(e).position==="static"}function fy(e,t){if(!Vr(e)||nr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cr(e)===n&&(n=n.ownerDocument.body),n}function ew(e,t){const n=Pn(e);if(bu(e))return n;if(!Vr(e)){let i=So(e);for(;i&&!Ps(i);){if(tr(i)&&!Bd(i))return i;i=So(i)}return n}let o=fy(e,t);for(;o&&w4(o)&&Bd(o);)o=fy(o,t);return o&&Ps(o)&&Bd(o)&&!vp(o)?n:o||j4(e)||n}const M4=async function(e){const t=this.getOffsetParent||ew,n=this.getDimensions,o=await n(e.floating);return{reference:O4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function _4(e){return nr(e).direction==="rtl"}const z4={convertOffsetParentRelativeRectToViewportRelativeRect:E4,getDocumentElement:Cr,getClippingRect:I4,getOffsetParent:ew,getElementRects:M4,getClientRects:R4,getDimensions:L4,getScale:Rs,isElement:tr,isRTL:_4};function tw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function F4(e,t){let n=null,o;const i=Cr(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),a();const h=e.getBoundingClientRect(),{left:m,top:x,width:w,height:b}=h;if(d||t(),!w||!b)return;const N=ja(x),S=ja(i.clientWidth-(m+w)),C=ja(i.clientHeight-(x+b)),k=ja(m),P={rootMargin:-N+"px "+-S+"px "+-C+"px "+-k+"px",threshold:En(0,ko(1,p))||1};let M=!0;function _(T){const D=T[0].intersectionRatio;if(D!==p){if(!M)return c();D?c(!1,D):o=setTimeout(()=>{c(!1,1e-7)},1e3)}D===1&&!tw(h,e.getBoundingClientRect())&&c(),M=!1}try{n=new IntersectionObserver(_,{...P,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,P)}n.observe(e)}return c(!0),a}function $4(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=wp(e),m=i||a?[...h?Ui(h):[],...t?Ui(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const x=h&&d?F4(h,n):null;let w=-1,b=null;c&&(b=new ResizeObserver(k=>{let[A]=k;A&&A.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var P;(P=b)==null||P.observe(t)})),n()}),h&&!p&&b.observe(h),t&&b.observe(t));let N,S=p?Wo(e):null;p&&C();function C(){const k=Wo(e);S&&!tw(S,k)&&n(),S=k,N=requestAnimationFrame(C)}return n(),()=>{var k;m.forEach(A=>{i&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),x==null||x(),(k=b)==null||k.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const B4=x4,U4=y4,H4=h4,W4=b4,V4=m4,py=p4,q4=v4,G4=(e,t,n)=>{const o=new Map,i={platform:z4,...n},a={...i.platform,_c:o};return f4(e,t,{...i,platform:a})};var K4=typeof document<"u",Y4=function(){},La=K4?y.useLayoutEffect:Y4;function Ka(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(!Ka(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const a=i[o];if(!(a==="_owner"&&e.$$typeof)&&!Ka(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function nw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hy(e,t){const n=nw(e);return Math.round(t*n)/n}function Ud(e){const t=y.useRef(e);return La(()=>{t.current=e}),t}function X4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:c}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,x]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,b]=y.useState(o);Ka(w,o)||b(o);const[N,S]=y.useState(null),[C,k]=y.useState(null),A=y.useCallback(X=>{X!==T.current&&(T.current=X,S(X))},[]),P=y.useCallback(X=>{X!==D.current&&(D.current=X,k(X))},[]),M=a||N,_=c||C,T=y.useRef(null),D=y.useRef(null),B=y.useRef(m),q=p!=null,R=Ud(p),L=Ud(i),$=Ud(h),W=y.useCallback(()=>{if(!T.current||!D.current)return;const X={placement:t,strategy:n,middleware:w};L.current&&(X.platform=L.current),G4(T.current,D.current,X).then(se=>{const E={...se,isPositioned:$.current!==!1};J.current&&!Ka(B.current,E)&&(B.current=E,vo.flushSync(()=>{x(E)}))})},[w,t,n,L,$]);La(()=>{h===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,x(X=>({...X,isPositioned:!1})))},[h]);const J=y.useRef(!1);La(()=>(J.current=!0,()=>{J.current=!1}),[]),La(()=>{if(M&&(T.current=M),_&&(D.current=_),M&&_){if(R.current)return R.current(M,_,W);W()}},[M,_,W,R,q]);const K=y.useMemo(()=>({reference:T,floating:D,setReference:A,setFloating:P}),[A,P]),te=y.useMemo(()=>({reference:M,floating:_}),[M,_]),ae=y.useMemo(()=>{const X={position:n,left:0,top:0};if(!te.floating)return X;const se=hy(te.floating,m.x),E=hy(te.floating,m.y);return d?{...X,transform:"translate("+se+"px, "+E+"px)",...nw(te.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:E}},[n,d,te.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:W,refs:K,elements:te,floatingStyles:ae}),[m,W,K,te,ae])}const Q4=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?py({element:o.current,padding:i}).fn(n):{}:o?py({element:o,padding:i}).fn(n):{}}}},J4=(e,t)=>{const n=B4(e);return{name:n.name,fn:n.fn,options:[e,t]}},Z4=(e,t)=>{const n=U4(e);return{name:n.name,fn:n.fn,options:[e,t]}},eD=(e,t)=>({fn:q4(e).fn,options:[e,t]}),tD=(e,t)=>{const n=H4(e);return{name:n.name,fn:n.fn,options:[e,t]}},nD=(e,t)=>{const n=W4(e);return{name:n.name,fn:n.fn,options:[e,t]}},rD=(e,t)=>{const n=V4(e);return{name:n.name,fn:n.fn,options:[e,t]}},oD=(e,t)=>{const n=Q4(e);return{name:n.name,fn:n.fn,options:[e,t]}};var sD="Arrow",rw=y.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return l.jsx(jt.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});rw.displayName=sD;var iD=rw;function lD(e){const[t,n]=y.useState(void 0);return wo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let c,d;if("borderBoxSize"in a){const p=a.borderBoxSize,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 kp="Popper",[ow,sw]=Vo(kp),[aD,iw]=ow(kp),lw=e=>{const{__scopePopper:t,children:n}=e,[o,i]=y.useState(null);return l.jsx(aD,{scope:t,anchor:o,onAnchorChange:i,children:n})};lw.displayName=kp;var aw="PopperAnchor",uw=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=iw(aw,n),c=y.useRef(null),d=Xt(t,c),p=y.useRef(null);return y.useEffect(()=>{const h=p.current;p.current=(o==null?void 0:o.current)||c.current,h!==p.current&&a.onAnchorChange(p.current)}),o?null:l.jsx(jt.div,{...i,ref:d})});uw.displayName=aw;var Sp="PopperContent",[uD,cD]=ow(Sp),cw=y.forwardRef((e,t)=>{var Ee,Se,Re,be,Ue,at;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:x="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:N,...S}=e,C=iw(Sp,n),[k,A]=y.useState(null),P=Xt(t,ft=>A(ft)),[M,_]=y.useState(null),T=lD(M),D=(T==null?void 0:T.width)??0,B=(T==null?void 0:T.height)??0,q=o+(a!=="center"?"-"+a:""),R=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(h)?h:[h],$=L.length>0,W={padding:R,boundary:L.filter(fD),altBoundary:$},{refs:J,floatingStyles:K,placement:te,isPositioned:ae,middlewareData:X}=X4({strategy:"fixed",placement:q,whileElementsMounted:(...ft)=>$4(...ft,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[J4({mainAxis:i+B,alignmentAxis:c}),p&&Z4({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?eD():void 0,...W}),p&&tD({...W}),nD({...W,apply:({elements:ft,rects:yt,availableWidth:$t,availableHeight:Bt})=>{const{width:_t,height:vn}=yt.reference,At=ft.floating.style;At.setProperty("--radix-popper-available-width",`${$t}px`),At.setProperty("--radix-popper-available-height",`${Bt}px`),At.setProperty("--radix-popper-anchor-width",`${_t}px`),At.setProperty("--radix-popper-anchor-height",`${vn}px`)}}),M&&oD({element:M,padding:d}),pD({arrowWidth:D,arrowHeight:B}),w&&rD({strategy:"referenceHidden",...W})]}),[se,E]=pw(te),z=Uo(N);wo(()=>{ae&&(z==null||z())},[ae,z]);const Q=(Ee=X.arrow)==null?void 0:Ee.x,I=(Se=X.arrow)==null?void 0:Se.y,Z=((Re=X.arrow)==null?void 0:Re.centerOffset)!==0,[fe,re]=y.useState();return wo(()=>{k&&re(window.getComputedStyle(k).zIndex)},[k]),l.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:ae?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(be=X.transformOrigin)==null?void 0:be.x,(Ue=X.transformOrigin)==null?void 0:Ue.y].join(" "),...((at=X.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(uD,{scope:n,placedSide:se,onArrowChange:_,arrowX:Q,arrowY:I,shouldHideArrow:Z,children:l.jsx(jt.div,{"data-side":se,"data-align":E,...S,ref:P,style:{...S.style,animation:ae?void 0:"none"}})})})});cw.displayName=Sp;var dw="PopperArrow",dD={top:"bottom",right:"left",bottom:"top",left:"right"},fw=y.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=cD(dw,o),c=dD[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(iD,{...i,ref:n,style:{...i.style,display:"block"}})})});fw.displayName=dw;function fD(e){return e!==null}var pD=e=>({name:"transformOrigin",options:e,fn(t){var C,k,A;const{placement:n,rects:o,middlewareData:i}=t,c=((C=i.arrow)==null?void 0:C.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[h,m]=pw(n),x={start:"0%",center:"50%",end:"100%"}[m],w=(((k=i.arrow)==null?void 0:k.x)??0)+d/2,b=(((A=i.arrow)==null?void 0:A.y)??0)+p/2;let N="",S="";return h==="bottom"?(N=c?x:`${w}px`,S=`${-p}px`):h==="top"?(N=c?x:`${w}px`,S=`${o.floating.height+p}px`):h==="right"?(N=`${-p}px`,S=c?x:`${b}px`):h==="left"&&(N=`${o.floating.width+p}px`,S=c?x:`${b}px`),{data:{x:N,y:S}}}});function pw(e){const[t,n="center"]=e.split("-");return[t,n]}var hD=lw,mD=uw,gD=cw,xD=fw,yD=Symbol("radix.slottable");function vD(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=yD,t}var bD=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"}),wD="VisuallyHidden",hw=y.forwardRef((e,t)=>l.jsx(jt.span,{...e,ref:t,style:{...bD,...e.style}}));hw.displayName=wD;var kD=hw,[Su]=Vo("Tooltip",[sw]),ju=sw(),mw="TooltipProvider",SD=700,vf="tooltip.open",[jD,jp]=Su(mw),gw=e=>{const{__scopeTooltip:t,delayDuration:n=SD,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,c=y.useRef(!0),d=y.useRef(!1),p=y.useRef(0);return y.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),l.jsx(jD,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:y.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:a})};gw.displayName=mw;var Hi="Tooltip",[CD,ol]=Su(Hi),xw=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:d}=e,p=jp(Hi,e.__scopeTooltip),h=ju(t),[m,x]=y.useState(null),w=Ss(),b=y.useRef(0),N=c??p.disableHoverableContent,S=d??p.delayDuration,C=y.useRef(!1),[k,A]=iu({prop:o,defaultProp:i??!1,onChange:D=>{D?(p.onOpen(),document.dispatchEvent(new CustomEvent(vf))):p.onClose(),a==null||a(D)},caller:Hi}),P=y.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),M=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,C.current=!1,A(!0)},[A]),_=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,A(!1)},[A]),T=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{C.current=!0,A(!0),b.current=0},S)},[S,A]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(hD,{...h,children:l.jsx(CD,{scope:t,contentId:w,open:k,stateAttribute:P,trigger:m,onTriggerChange:x,onTriggerEnter:y.useCallback(()=>{p.isOpenDelayedRef.current?T():M()},[p.isOpenDelayedRef,T,M]),onTriggerLeave:y.useCallback(()=>{N?_():(window.clearTimeout(b.current),b.current=0)},[_,N]),onOpen:M,onClose:_,disableHoverableContent:N,children:n})})};xw.displayName=Hi;var bf="TooltipTrigger",yw=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ol(bf,n),a=jp(bf,n),c=ju(n),d=y.useRef(null),p=Xt(t,d,i.onTriggerChange),h=y.useRef(!1),m=y.useRef(!1),x=y.useCallback(()=>h.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),l.jsx(mD,{asChild:!0,...c,children:l.jsx(jt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:tt(e.onPointerMove,w=>{w.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:tt(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:tt(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:tt(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:tt(e.onBlur,i.onClose),onClick:tt(e.onClick,i.onClose)})})});yw.displayName=bf;var Cp="TooltipPortal",[ND,ED]=Su(Cp,{forceMount:void 0}),vw=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,a=ol(Cp,t);return l.jsx(ND,{scope:t,forceMount:n,children:l.jsx(qo,{present:n||a.open,children:l.jsx(ap,{asChild:!0,container:i,children:o})})})};vw.displayName=Cp;var As="TooltipContent",bw=y.forwardRef((e,t)=>{const n=ED(As,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,c=ol(As,e.__scopeTooltip);return l.jsx(qo,{present:o||c.open,children:c.disableHoverableContent?l.jsx(ww,{side:i,...a,ref:t}):l.jsx(RD,{side:i,...a,ref:t})})}),RD=y.forwardRef((e,t)=>{const n=ol(As,e.__scopeTooltip),o=jp(As,e.__scopeTooltip),i=y.useRef(null),a=Xt(t,i),[c,d]=y.useState(null),{trigger:p,onClose:h}=n,m=i.current,{onPointerInTransitChange:x}=o,w=y.useCallback(()=>{d(null),x(!1)},[x]),b=y.useCallback((N,S)=>{const C=N.currentTarget,k={x:N.clientX,y:N.clientY},A=ID(k,C.getBoundingClientRect()),P=LD(k,A),M=OD(S.getBoundingClientRect()),_=_D([...P,...M]);d(_),x(!0)},[x]);return y.useEffect(()=>()=>w(),[w]),y.useEffect(()=>{if(p&&m){const N=C=>b(C,m),S=C=>b(C,p);return p.addEventListener("pointerleave",N),m.addEventListener("pointerleave",S),()=>{p.removeEventListener("pointerleave",N),m.removeEventListener("pointerleave",S)}}},[p,m,b,w]),y.useEffect(()=>{if(c){const N=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},A=(p==null?void 0:p.contains(C))||(m==null?void 0:m.contains(C)),P=!MD(k,c);A?w():P&&(w(),h())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,m,c,h,w]),l.jsx(ww,{...e,ref:a})}),[TD,PD]=Su(Hi,{isInside:!1}),AD=vD("TooltipContent"),ww=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=e,p=ol(As,n),h=ju(n),{onClose:m}=p;return y.useEffect(()=>(document.addEventListener(vf,m),()=>document.removeEventListener(vf,m)),[m]),y.useEffect(()=>{if(p.trigger){const x=w=>{const b=w.target;b!=null&&b.contains(p.trigger)&&m()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,m]),l.jsx(lp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:l.jsxs(gD,{"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:[l.jsx(AD,{children:o}),l.jsx(TD,{scope:n,isInside:!0,children:l.jsx(kD,{id:p.contentId,role:"tooltip",children:i||o})})]})})});bw.displayName=As;var kw="TooltipArrow",DD=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ju(n);return PD(kw,n).isInside?null:l.jsx(xD,{...i,...o,ref:t})});DD.displayName=kw;function ID(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,i,a)){case a:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function LD(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 OD(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 MD(e,t){const{x:n,y:o}=e;let i=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const d=t[a],p=t[c],h=d.x,m=d.y,x=p.x,w=p.y;m>o!=w>o&&n<(x-h)*(o-m)/(w-m)+h&&(i=!i)}return i}function _D(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),zD(t)}function zD(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var FD=gw,$D=xw,BD=yw,UD=vw,Sw=bw;const HD=FD,WD=$D,VD=BD,jw=y.forwardRef(({className:e,sideOffset:t=4,...n},o)=>l.jsx(UD,{children:l.jsx(Sw,{ref:o,sideOffset:t,className:Me("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})}));jw.displayName=Sw.displayName;function Hd(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 qD(){const[e,t]=y.useState(!0),[n,o]=y.useState(null),[i,a]=y.useState(!1),[c,d]=y.useState([]),[p,h]=y.useState([]),[m,x]=y.useState(!1),[w,b]=y.useState(null),[N,S]=y.useState(!1),C=y.useCallback(async()=>{try{const B=await fetch("/api/config/statuses");if(!B.ok)throw new Error(`HTTP ${B.status}`);const q=await B.json(),R=Hd(q);d(R.statuses),h(R.order),a(q.custom),S(!1),o(null)}catch(B){o(B instanceof Error?B.message:"Failed to load config")}finally{t(!1)}},[]);y.useEffect(()=>{C()},[C]);function k(){setTimeout(()=>b(null),3e3)}async function A(){x(!0),b(null);try{const B={statuses:c.map($=>({id:$.id,label:$.label,...$.description?{description:$.description}:{},...$.color?{color:$.color}:{},...$.terminal?{terminal:!0}:{}})),order:p,transitions:[]},q=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!q.ok){const $=await q.json().catch(()=>({error:"Unknown error"}));throw new Error($.error??"Save failed")}const R=await q.json(),L=Hd(R);d(L.statuses),h(L.order),a(R.custom),S(!1),_g(),b({type:"success",message:"Status config saved"}),k()}catch(B){b({type:"error",message:B instanceof Error?B.message:"Save failed"})}finally{x(!1)}}async function P(){x(!0),b(null);try{const B=await fetch("/api/config/statuses",{method:"DELETE"});if(!B.ok)throw new Error("Reset failed");const q=await B.json(),R=Hd(q);d(R.statuses),h(R.order),a(q.custom),S(!1),_g(),b({type:"success",message:"Reset to defaults"}),k()}catch(B){b({type:"error",message:B instanceof Error?B.message:"Reset failed"})}finally{x(!1)}}function M(B,q,R){d(L=>{const $=[...L];if($[B]={...$[B],[q]:R},q==="id"&&typeof R=="string"){const W=L[B].id;h(J=>J.map(K=>K===W?R:K))}return $}),S(!0)}function _(){const B=`status_${c.length+1}`;d(q=>[...q,{id:B,label:"New Status",description:"",color:"",terminal:!1}]),h(q=>[...q,B]),S(!0)}function T(B){const q=c[B].id;d(R=>R.filter((L,$)=>$!==B)),h(R=>R.filter(L=>L!==q)),S(!0)}function D(B,q){const R=B+q;R<0||R>=p.length||(h(L=>{const $=[...L];return[$[B],$[R]]=[$[R],$[B]],$}),S(!0))}return e?l.jsx(kt,{label:"Loading settings..."}):n?l.jsx(St,{error:n}):l.jsx(HD,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${i?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rv,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),l.jsxs("button",{className:"shell-action text-xs",onClick:P,disabled:m||!i&&!N,children:[l.jsx(Yj,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),w&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${w.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:w.message}),l.jsx(Ae,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:_,children:[l.jsx(er,{className:"h-3 w-3"}),"Add Status"]}),children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"pb-2 pr-3",children:"ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Label"}),l.jsx("th",{className:"pb-2 pr-3",children:"Color"}),l.jsx("th",{className:"pb-2 pr-3",children:l.jsxs(WD,{children:[l.jsx(VD,{asChild:!0,children:l.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),l.jsx(jw,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),l.jsx("th",{className:"pb-2 w-10"})]})}),l.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((B,q)=>l.jsxs("tr",{children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:B.id,onChange:R=>M(q,"id",R.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:B.label,onChange:R=>M(q,"label",R.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(e4,{value:B.color,onChange:R=>M(q,"color",R)})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{type:"button",role:"switch","aria-checked":B.terminal,onClick:()=>M(q,"terminal",!B.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 ${B.terminal?"bg-primary":"bg-muted"}`,children:l.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${B.terminal?"translate-x-4":"translate-x-0"}`})})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>T(q),title:"Remove status",children:l.jsx(Xi,{className:"h-3.5 w-3.5"})})})]},q))})]})})}),l.jsx(Ae,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:l.jsx("div",{className:"space-y-1",children:p.map((B,q)=>{var L;const R=((L=c.find($=>$.id===B))==null?void 0:L.label)??B;return l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:q+1}),l.jsx("span",{className:"flex-1 font-medium",children:R}),l.jsx("span",{className:"text-xs text-muted-foreground",children:B}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>D(q,-1),disabled:q===0,title:"Move up",children:l.jsx(Zy,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>D(q,1),disabled:q===p.length-1,title:"Move down",children:l.jsx($i,{className:"h-3.5 w-3.5"})})]},q)})})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:A,disabled:m||!N,children:[l.jsx(iv,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Configuration"]}),N&&l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),C()},disabled:m,children:"Discard Changes"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]})]})})}const my=[{value:"open",icon:"○",label:"Open",color:"text-muted-foreground"},{value:"in_progress",icon:"◉",label:"In Progress",color:"text-blue-400"},{value:"completed",icon:"✓",label:"Completed",color:"text-emerald-400"},{value:"blocked",icon:"✕",label:"Blocked",color:"text-amber-400"}];function Cw({status:e,onChange:t}){const[n,o]=y.useState(!1),i=y.useRef(null);y.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const a=my.find(c=>c.value===e);return l.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[l.jsx("button",{onClick:()=>o(!n),className:`text-lg leading-none ${a.color} hover:opacity-70 transition`,title:a.label,children:a.icon}),n&&l.jsx("div",{className:"absolute left-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border/70 bg-background shadow-lg py-1",children:my.filter(c=>c.value!==e).map(c=>l.jsxs("button",{onClick:()=>{t(c.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[l.jsx("span",{className:"text-base leading-none",children:c.icon}),l.jsx("span",{children:c.label})]},c.value))})]})}function GD(){const{data:e,loading:t,error:n,refetch:o}=Nv(),[i,a]=y.useState(""),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState("_global"),[N,S]=y.useState(null);function C(R,L){R.stopPropagation(),navigator.clipboard.writeText(L),S(L),setTimeout(()=>S($=>$===L?null:$),1500)}const k=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const R=[];for(const L of e.workspaces)for(const $ of L.items)R.push({...$,workspace:L.workspace});return R},[e]),A=y.useMemo(()=>{const R=new Set;for(const L of k)for(const $ of L.tags)R.add($);return Array.from(R).sort()},[k]),P=y.useMemo(()=>{let R=k;if(i.trim()){const L=i.toLowerCase();R=R.filter($=>$.description.toLowerCase().includes(L)||$.tags.some(W=>W.toLowerCase().includes(L))||$.id.includes(L))}return c&&(R=R.filter(L=>L.status===c)),p&&(R=R.filter(L=>L.tags.includes(p))),R},[k,i,c,p]),M=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const R={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const L of e.workspaces)R.open+=L.counts.open,R.in_progress+=L.counts.in_progress,R.completed+=L.counts.completed,R.blocked+=L.counts.blocked,R.total+=L.counts.total;return R},[e]);async function _(){m.trim()&&(await Ev(w,m.trim()),x(""),o())}const T={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function D(R,L,$){B(R,L,T[$]||"open")}async function B(R,L,$){switch($){case"open":await Av(R,L);break;case"in_progress":await Pv(R,L);break;case"completed":await Rv(R,L);break;case"blocked":await Tv(R,L);break}o()}async function q(R,L){await oN(R,L),o()}return t?l.jsx(kt,{label:"Loading todos..."}):n?l.jsx(St,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(Ze,{label:"Open",value:M.open,icon:br}),l.jsx(Ze,{label:"In Progress",value:M.in_progress,icon:ov,tone:"info"}),l.jsx(Ze,{label:"Blocked",value:M.blocked,icon:Qi,tone:"warn"}),l.jsx(Ze,{label:"Completed",value:M.completed,icon:br,tone:"default"})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("select",{value:w,onChange:R=>b(R.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(R=>R.workspace!=="_global").map(R=>l.jsx("option",{value:R.workspace,children:R.workspace},R.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:m,onChange:R=>x(R.target.value),onKeyDown:R=>R.key==="Enter"&&_(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:_,disabled:!m.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(er,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(ru,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search todos...",value:i,onChange:R=>a(R.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs("select",{value:c,onChange:R=>d(R.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),A.length>0&&l.jsxs("select",{value:p,onChange:R=>h(R.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),A.map(R=>l.jsxs("option",{value:R,children:["#",R]},R))]})]}),P.length===0?l.jsx(xt,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):l.jsx("div",{className:"space-y-1",children:P.map(R=>l.jsxs("div",{className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>D(R.workspace,R.id,R.status),children:[l.jsx(Cw,{status:R.status,onChange:L=>B(R.workspace,R.id,L)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${R.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:R.description}),R.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:R.tags.map(L=>`#${L}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:R.workspace!=="_global"&&l.jsx(ke,{to:`/w/${R.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:L=>L.stopPropagation(),children:R.workspace})}),N===R.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Lf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:L=>C(L,R.id),children:["t:",R.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:L=>C(L,R.id),children:l.jsx(Of,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>q(R.workspace,R.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${R.workspace}-${R.id}`))})]})}function KD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const Cu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Np(e){return"nodeType"in e}function yn(e){var t,n;return e?Fs(e)?e:Np(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ep(e){const{Document:t}=yn(e);return e instanceof t}function sl(e){return Fs(e)?!1:e instanceof yn(e).HTMLElement}function Nw(e){return e instanceof yn(e).SVGElement}function $s(e){return e?Fs(e)?e.document:Np(e)?Ep(e)?e:sl(e)||Nw(e)?e.ownerDocument:document:document:document}const Sr=Cu?y.useLayoutEffect:y.useEffect;function Rp(e){const t=y.useRef(e);return Sr(()=>{t.current=e}),y.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 YD(){const e=y.useRef(null),t=y.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=y.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Wi(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return Sr(()=>{n.current!==e&&(n.current=e)},t),n}function il(e,t){const n=y.useRef();return y.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function Ya(e){const t=Rp(e),n=y.useRef(null),o=y.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function wf(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let Wd={};function ll(e,t){return y.useMemo(()=>{if(t)return t;const n=Wd[e]==null?0:Wd[e]+1;return Wd[e]=n,e+"-"+n},[e,t])}function Ew(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((a,c)=>{const d=Object.entries(c);for(const[p,h]of d){const m=a[p];m!=null&&(a[p]=m+e*h)}return a},{...t})}}const Ts=Ew(1),Xa=Ew(-1);function XD(e){return"clientX"in e&&"clientY"in e}function Tp(e){if(!e)return!1;const{KeyboardEvent:t}=yn(e.target);return t&&e instanceof t}function QD(e){if(!e)return!1;const{TouchEvent:t}=yn(e.target);return t&&e instanceof t}function kf(e){if(QD(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 XD(e)?{x:e.clientX,y:e.clientY}:null}const Vi=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[Vi.Translate.toString(e),Vi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),gy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function JD(e){return e.matches(gy)?e:e.querySelector(gy)}const ZD={display:"none"};function eI(e){let{id:t,value:n}=e;return dt.createElement("div",{id:t,style:ZD},n)}function tI(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 dt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function nI(){const[e,t]=y.useState("");return{announce:y.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Rw=y.createContext(null);function rI(e){const t=y.useContext(Rw);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function oI(){const[e]=y.useState(()=>new Set),t=y.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[y.useCallback(o=>{let{type:i,event:a}=o;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,a)})},[e]),t]}const sI={draggable:`
437
+ To pick up a draggable item, press the space bar.
438
+ While dragging, use the arrow keys to move the item.
439
+ Press space again to drop the item in its new position, or press escape to cancel.
440
+ `},iI={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 lI(e){let{announcements:t=iI,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=sI}=e;const{announce:a,announcement:c}=nI(),d=ll("DndLiveRegion"),[p,h]=y.useState(!1);if(y.useEffect(()=>{h(!0)},[]),rI(y.useMemo(()=>({onDragStart(x){let{active:w}=x;a(t.onDragStart({active:w}))},onDragMove(x){let{active:w,over:b}=x;t.onDragMove&&a(t.onDragMove({active:w,over:b}))},onDragOver(x){let{active:w,over:b}=x;a(t.onDragOver({active:w,over:b}))},onDragEnd(x){let{active:w,over:b}=x;a(t.onDragEnd({active:w,over:b}))},onDragCancel(x){let{active:w,over:b}=x;a(t.onDragCancel({active:w,over:b}))}}),[a,t])),!p)return null;const m=dt.createElement(dt.Fragment,null,dt.createElement(eI,{id:o,value:i.draggable}),dt.createElement(tI,{id:d,announcement:c}));return n?vo.createPortal(m,n):m}var Et;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Et||(Et={}));function Qa(){}function xy(e,t){return y.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function aI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const rr=Object.freeze({x:0,y:0});function uI(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function cI(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function dI(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function fI(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function yy(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 pI=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=yy(t,t.left,t.top),a=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const h=uI(yy(p),i);a.push({id:d,data:{droppableContainer:c,value:h}})}}return a.sort(cI)};function hI(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),c=i-o,d=a-n;if(o<i&&n<a){const p=t.width*t.height,h=e.width*e.height,m=c*d,x=m/(p+h-m);return Number(x.toFixed(4))}return 0}const mI=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:c}=a,d=n.get(c);if(d){const p=hI(d,t);p>0&&i.push({id:c,data:{droppableContainer:a,value:p}})}}return i.sort(dI)};function gI(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Tw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:rr}function xI(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const yI=xI(1);function vI(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 bI(e,t,n){const o=vI(t);if(!o)return e;const{scaleX:i,scaleY:a,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),h=e.top-d-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?e.width/i:e.width,x=a?e.height/a:e.height;return{width:m,height:x,top:h,right:p+m,bottom:h+x,left:p}}const wI={ignoreTransform:!1};function Bs(e,t){t===void 0&&(t=wI);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=yn(e).getComputedStyle(e);h&&(n=bI(n,h,m))}const{top:o,left:i,width:a,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:a,height:c,bottom:d,right:p}}function vy(e){return Bs(e,{ignoreTransform:!0})}function kI(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function SI(e,t){return t===void 0&&(t=yn(e).getComputedStyle(e)),t.position==="fixed"}function jI(e,t){t===void 0&&(t=yn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Pp(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Ep(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!sl(i)||Nw(i)||n.includes(i))return n;const a=yn(e).getComputedStyle(i);return i!==e&&jI(i,a)&&n.push(i),SI(i,a)?n:o(i.parentNode)}return e?o(e):n}function Pw(e){const[t]=Pp(e,1);return t??null}function Vd(e){return!Cu||!e?null:Fs(e)?e:Np(e)?Ep(e)||e===$s(e).scrollingElement?window:sl(e)?e:null:null}function Aw(e){return Fs(e)?e.scrollX:e.scrollLeft}function Dw(e){return Fs(e)?e.scrollY:e.scrollTop}function Sf(e){return{x:Aw(e),y:Dw(e)}}var Ot;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ot||(Ot={}));function Iw(e){return!Cu||!e?!1:e===document.scrollingElement}function Lw(e){const t={x:0,y:0},n=Iw(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const CI={x:.2,y:.2};function NI(e,t,n,o,i){let{top:a,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=CI);const{isTop:h,isBottom:m,isLeft:x,isRight:w}=Lw(e),b={x:0,y:0},N={x:0,y:0},S={height:t.height*i.y,width:t.width*i.x};return!h&&a<=t.top+S.height?(b.y=Ot.Backward,N.y=o*Math.abs((t.top+S.height-a)/S.height)):!m&&p>=t.bottom-S.height&&(b.y=Ot.Forward,N.y=o*Math.abs((t.bottom-S.height-p)/S.height)),!w&&d>=t.right-S.width?(b.x=Ot.Forward,N.x=o*Math.abs((t.right-S.width-d)/S.width)):!x&&c<=t.left+S.width&&(b.x=Ot.Backward,N.x=o*Math.abs((t.left+S.width-c)/S.width)),{direction:b,speed:N}}function EI(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Ow(e){return e.reduce((t,n)=>Ts(t,Sf(n)),rr)}function RI(e){return e.reduce((t,n)=>t+Aw(n),0)}function TI(e){return e.reduce((t,n)=>t+Dw(n),0)}function PI(e,t){if(t===void 0&&(t=Bs),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Pw(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const AI=[["x",["left","right"],RI],["y",["top","bottom"],TI]];class Ap{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=Pp(n),i=Ow(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,d]of AI)for(const p of c)Object.defineProperty(this,p,{get:()=>{const h=d(o),m=i[a]-h;return this.rect[p]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Mi{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 DI(e){const{EventTarget:t}=yn(e);return e instanceof t?e:$s(e)}function qd(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 Fn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Fn||(Fn={}));function by(e){e.preventDefault()}function II(e){e.stopPropagation()}var $e;(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"})($e||($e={}));const Mw={start:[$e.Space,$e.Enter],cancel:[$e.Esc],end:[$e.Space,$e.Enter,$e.Tab]},LI=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $e.Right:return{...n,x:n.x+25};case $e.Left:return{...n,x:n.x-25};case $e.Down:return{...n,y:n.y+25};case $e.Up:return{...n,y:n.y-25}}};class Dp{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 Mi($s(n)),this.windowListeners=new Mi(yn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Fn.Resize,this.handleCancel),this.windowListeners.add(Fn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Fn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&PI(o),n(rr)}handleKeyDown(t){if(Tp(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=Mw,coordinateGetter:c=LI,scrollBehavior:d="smooth"}=i,{code:p}=t;if(a.end.includes(p)){this.handleEnd(t);return}if(a.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:h}=o.current,m=h?{x:h.left,y:h.top}:rr;this.referenceCoordinates||(this.referenceCoordinates=m);const x=c(t,{active:n,context:o.current,currentCoordinates:m});if(x){const w=Xa(x,m),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const S of N){const C=t.code,{isTop:k,isRight:A,isLeft:P,isBottom:M,maxScroll:_,minScroll:T}=Lw(S),D=EI(S),B={x:Math.min(C===$e.Right?D.right-D.width/2:D.right,Math.max(C===$e.Right?D.left:D.left+D.width/2,x.x)),y:Math.min(C===$e.Down?D.bottom-D.height/2:D.bottom,Math.max(C===$e.Down?D.top:D.top+D.height/2,x.y))},q=C===$e.Right&&!A||C===$e.Left&&!P,R=C===$e.Down&&!M||C===$e.Up&&!k;if(q&&B.x!==x.x){const L=S.scrollLeft+w.x,$=C===$e.Right&&L<=_.x||C===$e.Left&&L>=T.x;if($&&!w.y){S.scrollTo({left:L,behavior:d});return}$?b.x=S.scrollLeft-L:b.x=C===$e.Right?S.scrollLeft-_.x:S.scrollLeft-T.x,b.x&&S.scrollBy({left:-b.x,behavior:d});break}else if(R&&B.y!==x.y){const L=S.scrollTop+w.y,$=C===$e.Down&&L<=_.y||C===$e.Up&&L>=T.y;if($&&!w.x){S.scrollTo({top:L,behavior:d});return}$?b.y=S.scrollTop-L:b.y=C===$e.Down?S.scrollTop-_.y:S.scrollTop-T.y,b.y&&S.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,Ts(Xa(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()}}Dp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Mw,onActivation:i}=t,{active:a}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=a.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function wy(e){return!!(e&&"distance"in e)}function ky(e){return!!(e&&"delay"in e)}class Ip{constructor(t,n,o){var i;o===void 0&&(o=DI(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:c}=a;this.props=t,this.events=n,this.document=$s(c),this.documentListeners=new Mi(this.document),this.listeners=new Mi(o),this.windowListeners=new Mi(yn(c)),this.initialCoordinates=(i=kf(a))!=null?i:rr,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(Fn.Resize,this.handleCancel),this.windowListeners.add(Fn.DragStart,by),this.windowListeners.add(Fn.VisibilityChange,this.handleCancel),this.windowListeners.add(Fn.ContextMenu,by),this.documentListeners.add(Fn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ky(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(wy(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(Fn.Click,II,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Fn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:c,options:{activationConstraint:d}}=a;if(!i)return;const p=(n=kf(t))!=null?n:rr,h=Xa(i,p);if(!o&&d){if(wy(d)){if(d.tolerance!=null&&qd(h,d.tolerance))return this.handleCancel();if(qd(h,d.distance))return this.handleStart()}if(ky(d)&&qd(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===$e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const OI={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Lp extends Ip{constructor(t){const{event:n}=t,o=$s(n.target);super(t,OI,o)}}Lp.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 MI={move:{name:"mousemove"},end:{name:"mouseup"}};var jf;(function(e){e[e.RightClick=2]="RightClick"})(jf||(jf={}));class _I extends Ip{constructor(t){super(t,MI,$s(t.event.target))}}_I.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===jf.RightClick?!1:(o==null||o({event:n}),!0)}}];const Gd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class zI extends Ip{constructor(t){super(t,Gd)}static setup(){return window.addEventListener(Gd.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Gd.move.name,t)};function t(){}}}zI.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 _i;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(_i||(_i={}));var Ja;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ja||(Ja={}));function FI(e){let{acceleration:t,activator:n=_i.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:c=5,order:d=Ja.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:w}=e;const b=BI({delta:x,disabled:!a}),[N,S]=YD(),C=y.useRef({x:0,y:0}),k=y.useRef({x:0,y:0}),A=y.useMemo(()=>{switch(n){case _i.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case _i.DraggableRect:return i}},[n,i,p]),P=y.useRef(null),M=y.useCallback(()=>{const T=P.current;if(!T)return;const D=C.current.x*k.current.x,B=C.current.y*k.current.y;T.scrollBy(D,B)},[]),_=y.useMemo(()=>d===Ja.TreeOrder?[...h].reverse():h,[d,h]);y.useEffect(()=>{if(!a||!h.length||!A){S();return}for(const T of _){if((o==null?void 0:o(T))===!1)continue;const D=h.indexOf(T),B=m[D];if(!B)continue;const{direction:q,speed:R}=NI(T,B,A,t,w);for(const L of["x","y"])b[L][q[L]]||(R[L]=0,q[L]=0);if(R.x>0||R.y>0){S(),P.current=T,N(M,c),C.current=R,k.current=q;return}}C.current={x:0,y:0},k.current={x:0,y:0},S()},[t,M,o,S,a,c,JSON.stringify(A),JSON.stringify(b),N,h,_,m,JSON.stringify(w)])}const $I={x:{[Ot.Backward]:!1,[Ot.Forward]:!1},y:{[Ot.Backward]:!1,[Ot.Forward]:!1}};function BI(e){let{delta:t,disabled:n}=e;const o=wf(t);return il(i=>{if(n||!o||!i)return $I;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ot.Backward]:i.x[Ot.Backward]||a.x===-1,[Ot.Forward]:i.x[Ot.Forward]||a.x===1},y:{[Ot.Backward]:i.y[Ot.Backward]||a.y===-1,[Ot.Forward]:i.y[Ot.Forward]||a.y===1}}},[n,t,o])}function UI(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return il(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function HI(e,t){return y.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...a]},[]),[e,t])}var qi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qi||(qi={}));var Cf;(function(e){e.Optimized="optimized"})(Cf||(Cf={}));const Sy=new Map;function WI(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,c]=y.useState(null),{frequency:d,measure:p,strategy:h}=i,m=y.useRef(e),x=C(),w=Wi(x),b=y.useCallback(function(k){k===void 0&&(k=[]),!w.current&&c(A=>A===null?k:A.concat(k.filter(P=>!A.includes(P))))},[w]),N=y.useRef(null),S=il(k=>{if(x&&!n)return Sy;if(!k||k===Sy||m.current!==e||a!=null){const A=new Map;for(let P of e){if(!P)continue;if(a&&a.length>0&&!a.includes(P.id)&&P.rect.current){A.set(P.id,P.rect.current);continue}const M=P.node.current,_=M?new Ap(p(M),M):null;P.rect.current=_,_&&A.set(P.id,_)}return A}return k},[e,a,n,x,p]);return y.useEffect(()=>{m.current=e},[e]),y.useEffect(()=>{x||b()},[n,x]),y.useEffect(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),y.useEffect(()=>{x||typeof d!="number"||N.current!==null||(N.current=setTimeout(()=>{b(),N.current=null},d))},[d,x,b,...o]),{droppableRects:S,measureDroppableContainers:b,measuringScheduled:a!=null};function C(){switch(h){case qi.Always:return!1;case qi.BeforeDragging:return n;default:return!n}}}function _w(e,t){return il(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function VI(e,t){return _w(e,t)}function qI(e){let{callback:t,disabled:n}=e;const o=Rp(t),i=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Nu(e){let{callback:t,disabled:n}=e;const o=Rp(t),i=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function GI(e){return new Ap(Bs(e),e)}function jy(e,t,n){t===void 0&&(t=GI);const[o,i]=y.useState(null);function a(){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=qI({callback(p){if(e)for(const h of p){const{type:m,target:x}=h;if(m==="childList"&&x instanceof HTMLElement&&x.contains(e)){a();break}}}}),d=Nu({callback:a});return Sr(()=>{a(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),o}function KI(e){const t=_w(e);return Tw(e,t)}const Cy=[];function YI(e){const t=y.useRef(e),n=il(o=>e?o&&o!==Cy&&e&&t.current&&e.parentNode===t.current.parentNode?o:Pp(e):Cy,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function XI(e){const[t,n]=y.useState(null),o=y.useRef(e),i=y.useCallback(a=>{const c=Vd(a.target);c&&n(d=>d?(d.set(c,Sf(c)),new Map(d)):null)},[]);return y.useEffect(()=>{const a=o.current;if(e!==a){c(a);const d=e.map(p=>{const h=Vd(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,Sf(h)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(a)};function c(d){d.forEach(p=>{const h=Vd(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>Ts(a,c),rr):Ow(e):rr,[e,t])}function Ny(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const o=e!==rr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?Xa(e,n.current):rr}function QI(e){y.useEffect(()=>{if(!Cu)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 JI(e,t){return y.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=c=>{a(c,t)},n},{}),[e,t])}function zw(e){return y.useMemo(()=>e?kI(e):null,[e])}const Ey=[];function ZI(e,t){t===void 0&&(t=Bs);const[n]=e,o=zw(n?yn(n):null),[i,a]=y.useState(Ey);function c(){a(()=>e.length?e.map(p=>Iw(p)?o:new Ap(t(p),p)):Ey)}const d=Nu({callback:c});return Sr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function eL(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return sl(t)?t:e}function tL(e){let{measure:t}=e;const[n,o]=y.useState(null),i=y.useCallback(h=>{for(const{target:m}of h)if(sl(m)){o(x=>{const w=t(m);return x?{...x,width:w.width,height:w.height}:w});break}},[t]),a=Nu({callback:i}),c=y.useCallback(h=>{const m=eL(h);a==null||a.disconnect(),m&&(a==null||a.observe(m)),o(m?t(m):null)},[t,a]),[d,p]=Ya(c);return y.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const nL=[{sensor:Lp,options:{}},{sensor:Dp,options:{}}],rL={current:{}},Oa={draggable:{measure:vy},droppable:{measure:vy,strategy:qi.WhileDragging,frequency:Cf.Optimized},dragOverlay:{measure:Bs}};class zi 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 oL={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new zi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Qa},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Oa,measureDroppableContainers:Qa,windowRect:null,measuringScheduled:!1},sL={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Qa,draggableNodes:new Map,over:null,measureDroppableContainers:Qa},Eu=y.createContext(sL),Fw=y.createContext(oL);function iL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new zi}}}function lL(e,t){switch(t.type){case Et.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Et.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 Et.DragEnd:case Et.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Et.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new zi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Et.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const c=new zi(e.droppable.containers);return c.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case Et.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new zi(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function aL(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=y.useContext(Eu),a=wf(o),c=wf(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!o&&a&&c!=null){if(!Tp(a)||document.activeElement===a.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=JD(m);if(x){x.focus();break}}})}},[o,t,i,c,a]),null}function uL(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function cL(e){return y.useMemo(()=>({draggable:{...Oa.draggable,...e==null?void 0:e.draggable},droppable:{...Oa.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Oa.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 dL(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=y.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Sr(()=>{if(!c&&!d||!t){a.current=!1;return}if(a.current||!o)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const m=n(h),x=Tw(m,o);if(c||(x.x=0),d||(x.y=0),a.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const w=Pw(h);w&&w.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const $w=y.createContext({...rr,scaleX:1,scaleY:1});var yo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(yo||(yo={}));const fL=y.memo(function(t){var n,o,i,a;let{id:c,accessibility:d,autoScroll:p=!0,children:h,sensors:m=nL,collisionDetection:x=mI,measuring:w,modifiers:b,...N}=t;const S=y.useReducer(lL,void 0,iL),[C,k]=S,[A,P]=oI(),[M,_]=y.useState(yo.Uninitialized),T=M===yo.Initialized,{draggable:{active:D,nodes:B,translate:q},droppable:{containers:R}}=C,L=D!=null?B.get(D):null,$=y.useRef({initial:null,translated:null}),W=y.useMemo(()=>{var nt;return D!=null?{id:D,data:(nt=L==null?void 0:L.data)!=null?nt:rL,rect:$}:null},[D,L]),J=y.useRef(null),[K,te]=y.useState(null),[ae,X]=y.useState(null),se=Wi(N,Object.values(N)),E=ll("DndDescribedBy",c),z=y.useMemo(()=>R.getEnabled(),[R]),Q=cL(w),{droppableRects:I,measureDroppableContainers:Z,measuringScheduled:fe}=WI(z,{dragging:T,dependencies:[q.x,q.y],config:Q.droppable}),re=UI(B,D),Ee=y.useMemo(()=>ae?kf(ae):null,[ae]),Se=Gr(),Re=VI(re,Q.draggable.measure);dL({activeNode:D!=null?B.get(D):null,config:Se.layoutShiftCompensation,initialRect:Re,measure:Q.draggable.measure});const be=jy(re,Q.draggable.measure,Re),Ue=jy(re?re.parentElement:null),at=y.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ft=R.getNodeFor((n=at.current.over)==null?void 0:n.id),yt=tL({measure:Q.dragOverlay.measure}),$t=(o=yt.nodeRef.current)!=null?o:re,Bt=T?(i=yt.rect)!=null?i:be:null,_t=!!(yt.nodeRef.current&&yt.rect),vn=KI(_t?null:be),At=zw($t?yn($t):null),pt=YI(T?ft??re:null),Jt=ZI(pt),An=uL(b,{transform:{x:q.x-vn.x,y:q.y-vn.y,scaleX:1,scaleY:1},activatorEvent:ae,active:W,activeNodeRect:be,containerNodeRect:Ue,draggingNodeRect:Bt,over:at.current.over,overlayNodeRect:yt.rect,scrollableAncestors:pt,scrollableAncestorRects:Jt,windowRect:At}),vt=Ee?Ts(Ee,q):null,Nr=XI(pt),lr=Ny(Nr),ee=Ny(Nr,[be]),ue=Ts(An,lr),ve=Bt?yI(Bt,An):null,Ne=W&&ve?x({active:W,collisionRect:ve,droppableRects:I,droppableContainers:z,pointerCoordinates:vt}):null,U=fI(Ne,"id"),[ie,we]=y.useState(null),ze=_t?An:Ts(An,ee),on=gI(ze,(a=ie==null?void 0:ie.rect)!=null?a:null,be),ut=y.useRef(null),He=y.useCallback((nt,Ut)=>{let{sensor:Ht,options:Hn}=Ut;if(J.current==null)return;const Zt=B.get(J.current);if(!Zt)return;const Wt=nt.nativeEvent,sn=new Ht({active:J.current,activeNode:Zt,event:Wt,options:Hn,context:at,onAbort(rt){if(!B.get(rt))return;const{onDragAbort:Vt}=se.current,Wn={id:rt};Vt==null||Vt(Wn),A({type:"onDragAbort",event:Wn})},onPending(rt,Dn,Vt,Wn){if(!B.get(rt))return;const{onDragPending:ar}=se.current,bn={id:rt,constraint:Dn,initialCoordinates:Vt,offset:Wn};ar==null||ar(bn),A({type:"onDragPending",event:bn})},onStart(rt){const Dn=J.current;if(Dn==null)return;const Vt=B.get(Dn);if(!Vt)return;const{onDragStart:Wn}=se.current,Vn={activatorEvent:Wt,active:{id:Dn,data:Vt.data,rect:$}};vo.unstable_batchedUpdates(()=>{Wn==null||Wn(Vn),_(yo.Initializing),k({type:Et.DragStart,initialCoordinates:rt,active:Dn}),A({type:"onDragStart",event:Vn}),te(ut.current),X(Wt)})},onMove(rt){k({type:Et.DragMove,coordinates:rt})},onEnd:Er(Et.DragEnd),onCancel:Er(Et.DragCancel)});ut.current=sn;function Er(rt){return async function(){const{active:Vt,collisions:Wn,over:Vn,scrollAdjustedTranslate:ar}=at.current;let bn=null;if(Vt&&ar){const{cancelDrop:Rr}=se.current;bn={activatorEvent:Wt,active:Vt,collisions:Wn,delta:ar,over:Vn},rt===Et.DragEnd&&typeof Rr=="function"&&await Promise.resolve(Rr(bn))&&(rt=Et.DragCancel)}J.current=null,vo.unstable_batchedUpdates(()=>{k({type:rt}),_(yo.Uninitialized),we(null),te(null),X(null),ut.current=null;const Rr=rt===Et.DragEnd?"onDragEnd":"onDragCancel";if(bn){const Us=se.current[Rr];Us==null||Us(bn),A({type:Rr,event:bn})}})}}},[B]),Ve=y.useCallback((nt,Ut)=>(Ht,Hn)=>{const Zt=Ht.nativeEvent,Wt=B.get(Hn);if(J.current!==null||!Wt||Zt.dndKit||Zt.defaultPrevented)return;const sn={active:Wt};nt(Ht,Ut.options,sn)===!0&&(Zt.dndKit={capturedBy:Ut.sensor},J.current=Hn,He(Ht,Ut))},[B,He]),ht=HI(m,Ve);QI(m),Sr(()=>{be&&M===yo.Initializing&&_(yo.Initialized)},[be,M]),y.useEffect(()=>{const{onDragMove:nt}=se.current,{active:Ut,activatorEvent:Ht,collisions:Hn,over:Zt}=at.current;if(!Ut||!Ht)return;const Wt={active:Ut,activatorEvent:Ht,collisions:Hn,delta:{x:ue.x,y:ue.y},over:Zt};vo.unstable_batchedUpdates(()=>{nt==null||nt(Wt),A({type:"onDragMove",event:Wt})})},[ue.x,ue.y]),y.useEffect(()=>{const{active:nt,activatorEvent:Ut,collisions:Ht,droppableContainers:Hn,scrollAdjustedTranslate:Zt}=at.current;if(!nt||J.current==null||!Ut||!Zt)return;const{onDragOver:Wt}=se.current,sn=Hn.get(U),Er=sn&&sn.rect.current?{id:sn.id,rect:sn.rect.current,data:sn.data,disabled:sn.disabled}:null,rt={active:nt,activatorEvent:Ut,collisions:Ht,delta:{x:Zt.x,y:Zt.y},over:Er};vo.unstable_batchedUpdates(()=>{we(Er),Wt==null||Wt(rt),A({type:"onDragOver",event:rt})})},[U]),Sr(()=>{at.current={activatorEvent:ae,active:W,activeNode:re,collisionRect:ve,collisions:Ne,droppableRects:I,draggableNodes:B,draggingNode:$t,draggingNodeRect:Bt,droppableContainers:R,over:ie,scrollableAncestors:pt,scrollAdjustedTranslate:ue},$.current={initial:Bt,translated:ve}},[W,re,Ne,ve,B,$t,Bt,I,R,ie,pt,ue]),FI({...Se,delta:q,draggingRect:ve,pointerCoordinates:vt,scrollableAncestors:pt,scrollableAncestorRects:Jt});const qr=y.useMemo(()=>({active:W,activeNode:re,activeNodeRect:be,activatorEvent:ae,collisions:Ne,containerNodeRect:Ue,dragOverlay:yt,draggableNodes:B,droppableContainers:R,droppableRects:I,over:ie,measureDroppableContainers:Z,scrollableAncestors:pt,scrollableAncestorRects:Jt,measuringConfiguration:Q,measuringScheduled:fe,windowRect:At}),[W,re,be,ae,Ne,Ue,yt,B,R,I,ie,Z,pt,Jt,Q,fe,At]),Co=y.useMemo(()=>({activatorEvent:ae,activators:ht,active:W,activeNodeRect:be,ariaDescribedById:{draggable:E},dispatch:k,draggableNodes:B,over:ie,measureDroppableContainers:Z}),[ae,ht,W,be,k,E,B,ie,Z]);return dt.createElement(Rw.Provider,{value:P},dt.createElement(Eu.Provider,{value:Co},dt.createElement(Fw.Provider,{value:qr},dt.createElement($w.Provider,{value:on},h)),dt.createElement(aL,{disabled:(d==null?void 0:d.restoreFocus)===!1})),dt.createElement(lI,{...d,hiddenTextDescribedById:E}));function Gr(){const nt=(K==null?void 0:K.autoScrollEnabled)===!1,Ut=typeof p=="object"?p.enabled===!1:p===!1,Ht=T&&!nt&&!Ut;return typeof p=="object"?{...p,enabled:Ht}:{enabled:Ht}}}),pL=y.createContext(null),Ry="button",hL="Draggable";function mL(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=ll(hL),{activators:c,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:w}=y.useContext(Eu),{role:b=Ry,roleDescription:N="draggable",tabIndex:S=0}=i??{},C=(p==null?void 0:p.id)===t,k=y.useContext(C?$w:pL),[A,P]=Ya(),[M,_]=Ya(),T=JI(c,t),D=Wi(n);Sr(()=>(x.set(t,{id:t,key:a,node:A,activatorNode:M,data:D}),()=>{const q=x.get(t);q&&q.key===a&&x.delete(t)}),[x,t]);const B=y.useMemo(()=>({role:b,tabIndex:S,"aria-disabled":o,"aria-pressed":C&&b===Ry?!0:void 0,"aria-roledescription":N,"aria-describedby":m.draggable}),[o,b,S,C,N,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:B,isDragging:C,listeners:o?void 0:T,node:A,over:w,setNodeRef:P,setActivatorNodeRef:_,transform:k}}function gL(){return y.useContext(Fw)}const xL="Droppable",yL={timeout:25};function vL(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=ll(xL),{active:c,dispatch:d,over:p,measureDroppableContainers:h}=y.useContext(Eu),m=y.useRef({disabled:n}),x=y.useRef(!1),w=y.useRef(null),b=y.useRef(null),{disabled:N,updateMeasurementsFor:S,timeout:C}={...yL,...i},k=Wi(S??o),A=y.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(k.current)?k.current:[k.current]),b.current=null},C)},[C]),P=Nu({callback:A,disabled:N||!c}),M=y.useCallback((B,q)=>{P&&(q&&(P.unobserve(q),x.current=!1),B&&P.observe(B))},[P]),[_,T]=Ya(M),D=Wi(t);return y.useEffect(()=>{!P||!_.current||(P.disconnect(),x.current=!1,P.observe(_.current))},[_,P]),y.useEffect(()=>(d({type:Et.RegisterDroppable,element:{id:o,key:a,disabled:n,node:_,rect:w,data:D}}),()=>d({type:Et.UnregisterDroppable,key:a,id:o})),[o]),y.useEffect(()=>{n!==m.current.disabled&&(d({type:Et.SetDroppableDisabled,id:o,key:a,disabled:n}),m.current.disabled=n)},[o,a,n,d]),{active:c,rect:w,isOver:(p==null?void 0:p.id)===o,node:_,over:p,setNodeRef:T}}function Op(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function bL(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function Ca(e){return e!==null&&e>=0}function wL(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 kL(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Bw=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=Op(t,o,n),c=t[i],d=a[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Na={scaleX:1,scaleY:1},SL=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:c}=e;const d=(t=a[n])!=null?t:o;if(!d)return null;if(i===n){const h=a[c];return h?{x:0,y:n<c?h.top+h.height-(d.top+d.height):h.top-d.top,...Na}:null}const p=jL(a,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Na}:i<n&&i>=c?{x:0,y:d.height+p,...Na}:{x:0,y:0,...Na}};function jL(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const Uw="Sortable",Hw=dt.createContext({activeIndex:-1,containerId:Uw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Bw,disabled:{draggable:!1,droppable:!1}});function CL(e){let{children:t,id:n,items:o,strategy:i=Bw,disabled:a=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=gL(),x=ll(Uw,n),w=d.rect!==null,b=y.useMemo(()=>o.map(T=>typeof T=="object"&&"id"in T?T.id:T),[o]),N=c!=null,S=c?b.indexOf(c.id):-1,C=h?b.indexOf(h.id):-1,k=y.useRef(b),A=!wL(b,k.current),P=C!==-1&&S===-1||A,M=kL(a);Sr(()=>{A&&N&&m(b)},[A,b,N,m]),y.useEffect(()=>{k.current=b},[b]);const _=y.useMemo(()=>({activeIndex:S,containerId:x,disabled:M,disableTransforms:P,items:b,overIndex:C,useDragOverlay:w,sortedRects:bL(b,p),strategy:i}),[S,x,M.draggable,M.droppable,P,b,C,p,w,i]);return dt.createElement(Hw.Provider,{value:_},t)}const NL=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Op(n,o,i).indexOf(t)},EL=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:c,previousItems:d,previousContainerId:p,transition:h}=e;return!h||!o||d!==a&&i===c?!1:n?!0:c!==i&&t===p},RL={duration:200,easing:"ease"},Ww="transform",TL=Vi.Transition.toString({property:Ww,duration:0,easing:"linear"}),PL={roleDescription:"sortable"};function AL(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,c]=y.useState(null),d=y.useRef(n);return Sr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const h=Bs(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]),y.useEffect(()=>{a&&c(null)},[a]),a}function DL(e){let{animateLayoutChanges:t=EL,attributes:n,disabled:o,data:i,getNewIndex:a=NL,id:c,strategy:d,resizeObserverConfig:p,transition:h=RL}=e;const{items:m,containerId:x,activeIndex:w,disabled:b,disableTransforms:N,sortedRects:S,overIndex:C,useDragOverlay:k,strategy:A}=y.useContext(Hw),P=IL(o,b),M=m.indexOf(c),_=y.useMemo(()=>({sortable:{containerId:x,index:M,items:m},...i}),[x,i,M,m]),T=y.useMemo(()=>m.slice(m.indexOf(c)),[m,c]),{rect:D,node:B,isOver:q,setNodeRef:R}=vL({id:c,data:_,disabled:P.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...p}}),{active:L,activatorEvent:$,activeNodeRect:W,attributes:J,setNodeRef:K,listeners:te,isDragging:ae,over:X,setActivatorNodeRef:se,transform:E}=mL({id:c,data:_,attributes:{...PL,...n},disabled:P.draggable}),z=KD(R,K),Q=!!L,I=Q&&!N&&Ca(w)&&Ca(C),Z=!k&&ae,fe=Z&&I?E:null,Ee=I?fe??(d??A)({rects:S,activeNodeRect:W,activeIndex:w,overIndex:C,index:M}):null,Se=Ca(w)&&Ca(C)?a({id:c,items:m,activeIndex:w,overIndex:C}):M,Re=L==null?void 0:L.id,be=y.useRef({activeId:Re,items:m,newIndex:Se,containerId:x}),Ue=m!==be.current.items,at=t({active:L,containerId:x,isDragging:ae,isSorting:Q,id:c,index:M,items:m,newIndex:be.current.newIndex,previousItems:be.current.items,previousContainerId:be.current.containerId,transition:h,wasDragging:be.current.activeId!=null}),ft=AL({disabled:!at,index:M,node:B,rect:D});return y.useEffect(()=>{Q&&be.current.newIndex!==Se&&(be.current.newIndex=Se),x!==be.current.containerId&&(be.current.containerId=x),m!==be.current.items&&(be.current.items=m)},[Q,Se,x,m]),y.useEffect(()=>{if(Re===be.current.activeId)return;if(Re!=null&&be.current.activeId==null){be.current.activeId=Re;return}const $t=setTimeout(()=>{be.current.activeId=Re},50);return()=>clearTimeout($t)},[Re]),{active:L,activeIndex:w,attributes:J,data:_,rect:D,index:M,newIndex:Se,items:m,isOver:q,isSorting:Q,isDragging:ae,listeners:te,node:B,overIndex:C,over:X,setNodeRef:z,setActivatorNodeRef:se,setDroppableNodeRef:R,setDraggableNodeRef:K,transform:ft??Ee,transition:yt()};function yt(){if(ft||Ue&&be.current.newIndex===M)return TL;if(!(Z&&!Tp($)||!h)&&(Q||at))return Vi.Transition.toString({...h,property:Ww})}}function IL(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}}$e.Down,$e.Right,$e.Up,$e.Left;function LL({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,disabled:a}){const{attributes:c,listeners:d,setNodeRef:p,setActivatorNodeRef:h,transform:m,transition:x,isDragging:w}=DL({id:e.id,disabled:a}),b={transform:Vi.Transform.toString(m),transition:x,zIndex:w?50:void 0,position:w?"relative":void 0};return l.jsxs("div",{ref:p,style:b,className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${w?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!a&&l.jsx("button",{ref:h,...c,...d,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:N=>N.stopPropagation(),children:l.jsx(Fj,{className:"h-4 w-4"})}),l.jsx(Cw,{status:e.status,onChange:N=>o(e.id,N)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(N=>`#${N}`).join(" ")}),e.session&&l.jsxs("span",{className:"ml-2 text-xs text-blue-400/60 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Lf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:N=>i(N,e.id),children:["t:",e.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:N=>i(N,e.id),children:l.jsx(Of,{className:"h-3 w-3"})})]})]})}function OL(){const{workspace:e}=Pt(),t=e||"_global",{data:n,loading:o,error:i,refetch:a}=nN(t),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState(""),[N,S]=y.useState(null),C=!!(c.trim()||p||m),k=aI(xy(Lp,{activationConstraint:{distance:8}}),xy(Dp));function A(L,$){L.stopPropagation(),navigator.clipboard.writeText($),S($),setTimeout(()=>S(W=>W===$?null:W),1500)}const P=y.useMemo(()=>{if(!(n!=null&&n.items))return[];const L=new Set;for(const $ of n.items)for(const W of $.tags)L.add(W);return Array.from(L).sort()},[n]),M=y.useMemo(()=>{if(!(n!=null&&n.items))return[];let L=n.items;if(c.trim()){const $=c.toLowerCase();L=L.filter(W=>W.description.toLowerCase().includes($)||W.tags.some(J=>J.toLowerCase().includes($))||W.id.includes($))}return p&&(L=L.filter($=>$.status===p)),m&&(L=L.filter($=>$.tags.includes(m))),L},[n,c,p,m]);async function _(){w.trim()&&(await Ev(t,w.trim()),b(""),a())}const T={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function D(L,$){B(L,T[$]||"open")}async function B(L,$){switch($){case"open":await Av(t,L);break;case"in_progress":await Pv(t,L);break;case"completed":await Rv(t,L);break;case"blocked":await Tv(t,L);break}a()}async function q(L){const{active:$,over:W}=L;if(!W||$.id===W.id||!(n!=null&&n.items))return;const J=n.items.findIndex(ae=>ae.id===$.id),K=n.items.findIndex(ae=>ae.id===W.id);if(J===-1||K===-1)return;const te=Op(n.items,J,K);await rN(t,te.map(ae=>ae.id)),a()}if(o)return l.jsx(kt,{label:"Loading todos..."});if(i)return l.jsx(St,{error:i});const R=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(Ze,{label:"Open",value:R.open,icon:br}),l.jsx(Ze,{label:"In Progress",value:R.in_progress,icon:br,tone:"info"}),l.jsx(Ze,{label:"Blocked",value:R.blocked,icon:Qi,tone:"warn"}),l.jsx(Ze,{label:"Total",value:R.total,icon:br})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"Add a todo...",value:w,onChange:L=>b(L.target.value),onKeyDown:L=>L.key==="Enter"&&_(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:_,disabled:!w.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(er,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(ru,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:L=>d(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"})]}),l.jsxs("select",{value:p,onChange:L=>h(L.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),P.length>0&&l.jsxs("select",{value:m,onChange:L=>x(L.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),P.map(L=>l.jsxs("option",{value:L,children:["#",L]},L))]})]}),M.length===0?l.jsx(xt,{title:"No todos",description:"Add your first todo above."}):l.jsx(fL,{sensors:k,collisionDetection:pI,onDragEnd:q,children:l.jsx(CL,{items:M.map(L=>L.id),strategy:SL,children:l.jsx("div",{className:"space-y-1",children:M.map(L=>l.jsx(LL,{item:L,copiedId:N,onCycleStatus:D,onStatusChange:B,onCopyId:A,disabled:C},L.id))})})})]})}function ML(){return l.jsx(gj,{children:l.jsx(VS,{children:l.jsxs(Le,{element:l.jsx(tN,{}),children:[l.jsx(Le,{path:"/",element:l.jsx(lN,{})}),l.jsx(Le,{path:"/missions",element:l.jsx(Fg,{})}),l.jsx(Le,{path:"/assignments",element:l.jsx(qx,{})}),l.jsx(Le,{path:"/attention",element:l.jsx(aN,{})}),l.jsx(Le,{path:"/servers",element:l.jsx(ny,{})}),l.jsx(Le,{path:"/agent-sessions",element:l.jsx(ry,{})}),l.jsx(Le,{path:"/playbooks",element:l.jsx(X3,{})}),l.jsx(Le,{path:"/playbooks/create",element:l.jsx(J3,{})}),l.jsx(Le,{path:"/playbooks/:slug",element:l.jsx(Q3,{})}),l.jsx(Le,{path:"/playbooks/:slug/edit",element:l.jsx(Z3,{})}),l.jsx(Le,{path:"/todos",element:l.jsx(GD,{})}),l.jsx(Le,{path:"/help",element:l.jsx(cN,{})}),l.jsx(Le,{path:"/settings",element:l.jsx(qD,{})}),l.jsx(Le,{path:"/create/mission",element:l.jsx(Kx,{})}),l.jsx(Le,{path:"/missions/:slug",element:l.jsx(Rx,{})}),l.jsx(Le,{path:"/missions/:slug/edit",element:l.jsx(Xx,{})}),l.jsx(Le,{path:"/missions/:slug/create/assignment",element:l.jsx(Yx,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug",element:l.jsx(Bx,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug/edit",element:l.jsx(Qx,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(Jx,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(Zx,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ey,{})}),l.jsx(Le,{path:"/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(ty,{})}),l.jsx(Le,{path:"/w/:workspace/missions",element:l.jsx(Fg,{})}),l.jsx(Le,{path:"/w/:workspace/assignments",element:l.jsx(qx,{})}),l.jsx(Le,{path:"/w/:workspace/servers",element:l.jsx(ny,{})}),l.jsx(Le,{path:"/w/:workspace/agent-sessions",element:l.jsx(ry,{})}),l.jsx(Le,{path:"/w/:workspace/todos",element:l.jsx(OL,{})}),l.jsx(Le,{path:"/w/:workspace/create/mission",element:l.jsx(Kx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug",element:l.jsx(Rx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/edit",element:l.jsx(Xx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/create/assignment",element:l.jsx(Yx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug",element:l.jsx(Bx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug/edit",element:l.jsx(Qx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(Jx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(Zx,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ey,{})}),l.jsx(Le,{path:"/w/:workspace/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(ty,{})})]})})})}zC();Vk.createRoot(document.getElementById("root")).render(l.jsx(y.StrictMode,{children:l.jsx(FC,{children:l.jsx(ML,{})})}));export{m2 as _,_L as a,Za as g};