syntaur 0.1.13 → 0.2.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/README.md +5 -0
  2. package/dashboard/dist/assets/{_basePickBy-DXzhD14q.js → _basePickBy-CHKX1r7P.js} +1 -1
  3. package/dashboard/dist/assets/{_baseUniq-gxypqvP5.js → _baseUniq-CTxTc4MS.js} +1 -1
  4. package/dashboard/dist/assets/{arc-Ce7nYKSm.js → arc-BUo5zftd.js} +1 -1
  5. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-zX4f4_Mf.js → architectureDiagram-2XIMDMQ5-CrJLm-P0.js} +1 -1
  6. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-auOdy7nH.js → blockDiagram-WCTKOSBZ-BK60lBBJ.js} +1 -1
  7. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-C2kkjPbW.js → c4Diagram-IC4MRINW-C7oJEvA0.js} +1 -1
  8. package/dashboard/dist/assets/channel-DdltvFFH.js +1 -0
  9. package/dashboard/dist/assets/{chunk-4BX2VUAB-B7dfpnbG.js → chunk-4BX2VUAB-CjUPlzHz.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-55IACEB6-r1_jHZYp.js → chunk-55IACEB6-6HmWguiO.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-FMBD7UC4-5mMONjMK.js → chunk-FMBD7UC4-CLuJnd1b.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-JSJVCQXG-CwKj-Es4.js → chunk-JSJVCQXG-B4d62qWV.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-KX2RTZJC-ByoW-HgN.js → chunk-KX2RTZJC-AsEKRPq2.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-NQ4KR5QH-D1olOovd.js → chunk-NQ4KR5QH-DQhHHvwY.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-QZHKN3VN-CB8_FC8w.js → chunk-QZHKN3VN-Ds1TtI3E.js} +1 -1
  16. package/dashboard/dist/assets/{chunk-WL4C6EOR-CFEqRrE1.js → chunk-WL4C6EOR-C7jE3-cR.js} +1 -1
  17. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BHqdFE-8.js +1 -0
  18. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BHqdFE-8.js +1 -0
  19. package/dashboard/dist/assets/clone-CBJOOeOm.js +1 -0
  20. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-D6dGVXEI.js → cose-bilkent-S5V4N54A-C9ka5v1m.js} +1 -1
  21. package/dashboard/dist/assets/{dagre-KLK3FWXG-Cvg9CgP-.js → dagre-KLK3FWXG-BbgPQBKy.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-E7M64L7V-iCBudhZD.js → diagram-E7M64L7V-DpdeZFD4.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-IFDJBPK2-BGniy7VQ.js → diagram-IFDJBPK2-FlHLQzOV.js} +1 -1
  24. package/dashboard/dist/assets/{diagram-P4PSJMXO-B6Ie044E.js → diagram-P4PSJMXO-B22NkEF_.js} +1 -1
  25. package/dashboard/dist/assets/{erDiagram-INFDFZHY-BHvFRNhJ.js → erDiagram-INFDFZHY-zSqmtDid.js} +1 -1
  26. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-CN86Zu3Q.js → flowDiagram-PKNHOUZH-BP_0XmVV.js} +1 -1
  27. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-D-1fKFjW.js → ganttDiagram-A5KZAMGK-8uRyYgZV.js} +1 -1
  28. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-Dtf1A6KL.js → gitGraphDiagram-K3NZZRJ6-JFqg8sv4.js} +1 -1
  29. package/dashboard/dist/assets/{graph-B6H_kXSs.js → graph-a-PAH599.js} +1 -1
  30. package/dashboard/dist/assets/index-CoVCLSh2.css +1 -0
  31. package/dashboard/dist/assets/index-yyAIuzrP.js +471 -0
  32. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-R9wJj4JF.js → infoDiagram-LFFYTUFH-C3kq7Nbv.js} +1 -1
  33. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-CJmeR-bX.js → ishikawaDiagram-PHBUUO56-Kqi4EZ-n.js} +1 -1
  34. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-FcUhyu8I.js → journeyDiagram-4ABVD52K-CTfv0Wcr.js} +1 -1
  35. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-C8UcTIwW.js → kanban-definition-K7BYSVSG-Dmx0lgvR.js} +1 -1
  36. package/dashboard/dist/assets/{layout-DzBy6alw.js → layout-KKRbT2Od.js} +1 -1
  37. package/dashboard/dist/assets/{linear-CZJCNOB9.js → linear-5egaBiw7.js} +1 -1
  38. package/dashboard/dist/assets/{mermaid.core-fMQRe9Gq.js → mermaid.core-C9pF_oFQ.js} +4 -4
  39. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-BFwp-LS-.js → mindmap-definition-YRQLILUH-C7HXYEXt.js} +1 -1
  40. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CQLmPkkd.js → pieDiagram-SKSYHLDU-DkdZm-YP.js} +1 -1
  41. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DAmi-dmD.js → quadrantDiagram-337W2JSQ-DkcRJs5F.js} +1 -1
  42. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-Dcdts4kX.js → requirementDiagram-Z7DCOOCP-BaTDVYTl.js} +1 -1
  43. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-By8LRvM0.js → sankeyDiagram-WA2Y5GQK-DvPLbGV5.js} +1 -1
  44. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-BsvqgtTz.js → sequenceDiagram-2WXFIKYE-DQoZ2xMK.js} +1 -1
  45. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-DFNOD7cx.js → stateDiagram-RAJIS63D-CS4l0OjM.js} +1 -1
  46. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DkBtE1WJ.js +1 -0
  47. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-CMcgJGjn.js → timeline-definition-YZTLITO2-aC0iCFCW.js} +1 -1
  48. package/dashboard/dist/assets/{treemap-KZPCXAKY-BWsRNHwq.js → treemap-KZPCXAKY-Ie-PFjgx.js} +1 -1
  49. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-io7-2Tod.js → vennDiagram-LZ73GAT5-CJN3ExTQ.js} +1 -1
  50. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-AVnh4fDS.js → xychartDiagram-JWTSCODW-DSiDu1CN.js} +1 -1
  51. package/dashboard/dist/index.html +2 -2
  52. package/dist/dashboard/server.d.ts +1 -1
  53. package/dist/dashboard/server.js +1163 -734
  54. package/dist/dashboard/server.js.map +1 -1
  55. package/dist/index.js +3979 -1372
  56. package/dist/index.js.map +1 -1
  57. package/examples/playbooks/keep-records-updated.md +1 -1
  58. package/examples/playbooks/read-before-plan.md +5 -5
  59. package/examples/{sample-mission → sample-project}/_index-assignments.md +1 -1
  60. package/examples/{sample-mission → sample-project}/_index-decisions.md +1 -1
  61. package/examples/{sample-mission → sample-project}/_index-plans.md +1 -1
  62. package/examples/{sample-mission → sample-project}/_status.md +3 -3
  63. package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/assignment.md +4 -1
  64. package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/assignment.md +4 -1
  65. package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/assignment.md +4 -1
  66. package/examples/{sample-mission → sample-project}/manifest.md +3 -3
  67. package/examples/{sample-mission → sample-project}/memories/_index.md +2 -2
  68. package/examples/{sample-mission → sample-project}/memories/postgres-connection-pooling.md +1 -1
  69. package/examples/{sample-mission → sample-project}/resources/_index.md +1 -1
  70. package/package.json +5 -3
  71. package/platforms/README.md +7 -7
  72. package/platforms/claude-code/README.md +1 -1
  73. package/platforms/claude-code/agents/syntaur-expert.md +57 -57
  74. package/platforms/claude-code/commands/doctor-syntaur/doctor-syntaur.md +112 -0
  75. package/platforms/claude-code/commands/track-session/track-session.md +8 -8
  76. package/platforms/claude-code/hooks/enforce-boundaries.sh +4 -4
  77. package/platforms/claude-code/hooks/hooks.json +1 -1
  78. package/platforms/claude-code/hooks/session-cleanup.sh +5 -5
  79. package/platforms/claude-code/references/file-ownership.md +8 -8
  80. package/platforms/claude-code/references/protocol-summary.md +7 -6
  81. package/platforms/claude-code/skills/complete-assignment/SKILL.md +21 -17
  82. package/platforms/claude-code/skills/create-assignment/SKILL.md +15 -14
  83. package/platforms/claude-code/skills/grab-assignment/SKILL.md +56 -49
  84. package/platforms/claude-code/skills/plan-assignment/SKILL.md +57 -10
  85. package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +21 -17
  86. package/platforms/codex/.codex-plugin/plugin.json +3 -3
  87. package/platforms/codex/README.md +1 -1
  88. package/platforms/codex/adapters/AGENTS.md.template +3 -3
  89. package/platforms/codex/agents/openai.yaml +2 -2
  90. package/platforms/codex/agents/syntaur-operator.md +33 -30
  91. package/platforms/codex/references/file-ownership.md +8 -8
  92. package/platforms/codex/references/protocol-summary.md +11 -6
  93. package/platforms/codex/scripts/enforce-boundaries.sh +2 -2
  94. package/platforms/codex/scripts/session-cleanup.sh +2 -2
  95. package/platforms/codex/skills/complete-assignment/SKILL.md +6 -6
  96. package/platforms/codex/skills/create-assignment/SKILL.md +8 -7
  97. package/platforms/codex/skills/grab-assignment/SKILL.md +30 -20
  98. package/platforms/codex/skills/plan-assignment/SKILL.md +19 -11
  99. package/platforms/codex/skills/syntaur-protocol/SKILL.md +26 -21
  100. package/platforms/cursor/README.md +1 -1
  101. package/platforms/cursor/adapters/syntaur-protocol.mdc +1 -1
  102. package/platforms/opencode/README.md +1 -1
  103. package/platforms/opencode/adapters/opencode.json.template +1 -1
  104. package/dashboard/dist/assets/channel-PMR2DuGi.js +0 -1
  105. package/dashboard/dist/assets/classDiagram-VBA2DB6C-DmESf_RL.js +0 -1
  106. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-DmESf_RL.js +0 -1
  107. package/dashboard/dist/assets/clone-WlIeyha4.js +0 -1
  108. package/dashboard/dist/assets/index-BhuXD-Q5.js +0 -445
  109. package/dashboard/dist/assets/index-BnqH-RIk.css +0 -1
  110. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DVO-Epiz.js +0 -1
  111. package/examples/sample-mission/agent.md +0 -33
  112. package/examples/sample-mission/claude.md +0 -13
  113. package/platforms/claude-code/skills/create-mission/SKILL.md +0 -51
  114. package/platforms/codex/skills/create-mission/SKILL.md +0 -35
  115. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/decision-record.md +0 -0
  116. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/handoff.md +0 -0
  117. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/plan.md +0 -0
  118. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/scratchpad.md +0 -0
  119. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/decision-record.md +0 -0
  120. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/handoff.md +0 -0
  121. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/plan.md +0 -0
  122. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/scratchpad.md +0 -0
  123. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/decision-record.md +0 -0
  124. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/handoff.md +0 -0
  125. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/plan.md +0 -0
  126. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/scratchpad.md +0 -0
  127. /package/examples/{sample-mission/mission.md → sample-project/project.md} +0 -0
  128. /package/examples/{sample-mission → sample-project}/resources/auth-requirements.md +0 -0
@@ -1,445 +0,0 @@
1
- function zk(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 eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function FI(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 ud={exports:{}},Si={},cd={exports:{}},_e={};/**
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 hg;function Fk(){if(hg)return _e;hg=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($){return $===null||typeof $!="object"?null:($=x&&$[x]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function C($,Q,L){this.props=$,this.context=Q,this.refs=k,this.updater=L||b}C.prototype.isReactComponent={},C.prototype.setState=function($,Q){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,Q,"setState")},C.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function S(){}S.prototype=C.prototype;function A($,Q,L){this.props=$,this.context=Q,this.refs=k,this.updater=L||b}var P=A.prototype=new S;P.constructor=A,N(P,C.prototype),P.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B($,Q,L){var pe,ve={},de=null,Pe=null;if(Q!=null)for(pe in Q.ref!==void 0&&(Pe=Q.ref),Q.key!==void 0&&(de=""+Q.key),Q)_.call(Q,pe)&&!D.hasOwnProperty(pe)&&(ve[pe]=Q[pe]);var ke=arguments.length-2;if(ke===1)ve.children=L;else if(1<ke){for(var Te=Array(ke),ee=0;ee<ke;ee++)Te[ee]=arguments[ee+2];ve.children=Te}if($&&$.defaultProps)for(pe in ke=$.defaultProps,ke)ve[pe]===void 0&&(ve[pe]=ke[pe]);return{$$typeof:e,type:$,key:de,ref:Pe,props:ve,_owner:E.current}}function q($,Q){return{$$typeof:e,type:$.type,key:Q,ref:$.ref,props:$.props,_owner:$._owner}}function T($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function I($){var Q={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(L){return Q[L]})}var F=/\/+/g;function W($,Q){return typeof $=="object"&&$!==null&&$.key!=null?I(""+$.key):Q.toString(36)}function J($,Q,L,pe,ve){var de=typeof $;(de==="undefined"||de==="boolean")&&($=null);var Pe=!1;if($===null)Pe=!0;else switch(de){case"string":case"number":Pe=!0;break;case"object":switch($.$$typeof){case e:case t:Pe=!0}}if(Pe)return Pe=$,ve=ve(Pe),$=pe===""?"."+W(Pe,0):pe,M(ve)?(L="",$!=null&&(L=$.replace(F,"$&/")+"/"),J(ve,Q,L,"",function(ee){return ee})):ve!=null&&(T(ve)&&(ve=q(ve,L+(!ve.key||Pe&&Pe.key===ve.key?"":(""+ve.key).replace(F,"$&/")+"/")+$)),Q.push(ve)),1;if(Pe=0,pe=pe===""?".":pe+":",M($))for(var ke=0;ke<$.length;ke++){de=$[ke];var Te=pe+W(de,ke);Pe+=J(de,Q,L,Te,ve)}else if(Te=w($),typeof Te=="function")for($=Te.call($),ke=0;!(de=$.next()).done;)de=de.value,Te=pe+W(de,ke++),Pe+=J(de,Q,L,Te,ve);else if(de==="object")throw Q=String($),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Pe}function G($,Q,L){if($==null)return $;var pe=[],ve=0;return J($,pe,"","",function(de){return Q.call(L,de,ve++)}),pe}function te($){if($._status===-1){var Q=$._result;Q=Q(),Q.then(function(L){($._status===0||$._status===-1)&&($._status=1,$._result=L)},function(L){($._status===0||$._status===-1)&&($._status=2,$._result=L)}),$._status===-1&&($._status=0,$._result=Q)}if($._status===1)return $._result.default;throw $._result}var ie={current:null},X={transition:null},se={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:X,ReactCurrentOwner:E};function R(){throw Error("act(...) is not supported in production builds of React.")}return _e.Children={map:G,forEach:function($,Q,L){G($,function(){Q.apply(this,arguments)},L)},count:function($){var Q=0;return G($,function(){Q++}),Q},toArray:function($){return G($,function(Q){return Q})||[]},only:function($){if(!T($))throw Error("React.Children.only expected to receive a single React element child.");return $}},_e.Component=C,_e.Fragment=n,_e.Profiler=i,_e.PureComponent=A,_e.StrictMode=o,_e.Suspense=p,_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,_e.act=R,_e.cloneElement=function($,Q,L){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var pe=N({},$.props),ve=$.key,de=$.ref,Pe=$._owner;if(Q!=null){if(Q.ref!==void 0&&(de=Q.ref,Pe=E.current),Q.key!==void 0&&(ve=""+Q.key),$.type&&$.type.defaultProps)var ke=$.type.defaultProps;for(Te in Q)_.call(Q,Te)&&!D.hasOwnProperty(Te)&&(pe[Te]=Q[Te]===void 0&&ke!==void 0?ke[Te]:Q[Te])}var Te=arguments.length-2;if(Te===1)pe.children=L;else if(1<Te){ke=Array(Te);for(var ee=0;ee<Te;ee++)ke[ee]=arguments[ee+2];pe.children=ke}return{$$typeof:e,type:$.type,key:ve,ref:de,props:pe,_owner:Pe}},_e.createContext=function($){return $={$$typeof:c,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:a,_context:$},$.Consumer=$},_e.createElement=B,_e.createFactory=function($){var Q=B.bind(null,$);return Q.type=$,Q},_e.createRef=function(){return{current:null}},_e.forwardRef=function($){return{$$typeof:d,render:$}},_e.isValidElement=T,_e.lazy=function($){return{$$typeof:m,_payload:{_status:-1,_result:$},_init:te}},_e.memo=function($,Q){return{$$typeof:h,type:$,compare:Q===void 0?null:Q}},_e.startTransition=function($){var Q=X.transition;X.transition={};try{$()}finally{X.transition=Q}},_e.unstable_act=R,_e.useCallback=function($,Q){return ie.current.useCallback($,Q)},_e.useContext=function($){return ie.current.useContext($)},_e.useDebugValue=function(){},_e.useDeferredValue=function($){return ie.current.useDeferredValue($)},_e.useEffect=function($,Q){return ie.current.useEffect($,Q)},_e.useId=function(){return ie.current.useId()},_e.useImperativeHandle=function($,Q,L){return ie.current.useImperativeHandle($,Q,L)},_e.useInsertionEffect=function($,Q){return ie.current.useInsertionEffect($,Q)},_e.useLayoutEffect=function($,Q){return ie.current.useLayoutEffect($,Q)},_e.useMemo=function($,Q){return ie.current.useMemo($,Q)},_e.useReducer=function($,Q,L){return ie.current.useReducer($,Q,L)},_e.useRef=function($){return ie.current.useRef($)},_e.useState=function($){return ie.current.useState($)},_e.useSyncExternalStore=function($,Q,L){return ie.current.useSyncExternalStore($,Q,L)},_e.useTransition=function(){return ie.current.useTransition()},_e.version="18.3.1",_e}var mg;function Ef(){return mg||(mg=1,cd.exports=Fk()),cd.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 gg;function Bk(){if(gg)return Si;gg=1;var e=Ef(),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 Si.Fragment=n,Si.jsx=c,Si.jsxs=c,Si}var xg;function Uk(){return xg||(xg=1,ud.exports=Bk()),ud.exports}var l=Uk(),y=Ef();const ft=eu(y),Py=zk({__proto__:null,default:ft},[y]);var ga={},dd={exports:{}},fn={},fd={exports:{}},pd={};/**
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 yg;function Hk(){return yg||(yg=1,(function(e){function t(X,se){var R=X.length;X.push(se);e:for(;0<R;){var $=R-1>>>1,Q=X[$];if(0<i(Q,se))X[$]=se,X[R]=Q,R=$;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],R=X.pop();if(R!==se){X[0]=R;e:for(var $=0,Q=X.length,L=Q>>>1;$<L;){var pe=2*($+1)-1,ve=X[pe],de=pe+1,Pe=X[de];if(0>i(ve,R))de<Q&&0>i(Pe,ve)?(X[$]=Pe,X[de]=R,$=de):(X[$]=ve,X[pe]=R,$=pe);else if(de<Q&&0>i(Pe,R))X[$]=Pe,X[de]=R,$=de;else break e}}return se}function i(X,se){var R=X.sortIndex-se.sortIndex;return R!==0?R: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,k=!1,C=typeof setTimeout=="function"?setTimeout:null,S=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(k=!1,P(X),!N)if(n(p)!==null)N=!0,te(_);else{var se=n(h);se!==null&&ie(M,se.startTime-X)}}function _(X,se){N=!1,k&&(k=!1,S(B),B=-1),b=!0;var R=w;try{for(P(se),x=n(p);x!==null&&(!(x.expirationTime>se)||X&&!I());){var $=x.callback;if(typeof $=="function"){x.callback=null,w=x.priorityLevel;var Q=$(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 L=!0;else{var pe=n(h);pe!==null&&ie(M,pe.startTime-se),L=!1}return L}finally{x=null,w=R,b=!1}}var E=!1,D=null,B=-1,q=5,T=-1;function I(){return!(e.unstable_now()-T<q)}function F(){if(D!==null){var X=e.unstable_now();T=X;var se=!0;try{se=D(!0,X)}finally{se?W():(E=!1,D=null)}}else E=!1}var W;if(typeof A=="function")W=function(){A(F)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,G=J.port2;J.port1.onmessage=F,W=function(){G.postMessage(null)}}else W=function(){C(F,0)};function te(X){D=X,E||(E=!0,W())}function ie(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 R=w;w=se;try{return X()}finally{w=R}},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 R=w;w=X;try{return se()}finally{w=R}},e.unstable_scheduleCallback=function(X,se,R){var $=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?$+R:$):R=$,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=R+Q,X={id:m++,callback:se,priorityLevel:X,startTime:R,expirationTime:Q,sortIndex:-1},R>$?(X.sortIndex=R,t(h,X),n(p)===null&&X===n(h)&&(k?(S(B),B=-1):k=!0,ie(M,R-$))):(X.sortIndex=Q,t(p,X),N||b||(N=!0,te(_))),X},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(X){var se=w;return function(){var R=w;w=se;try{return X.apply(this,arguments)}finally{w=R}}}})(pd)),pd}var vg;function Wk(){return vg||(vg=1,fd.exports=Hk()),fd.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 bg;function Vk(){if(bg)return fn;bg=1;var e=Ef(),t=Wk();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 k(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 k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];C[s]=new k(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){C[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){C[r]=new k(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){C[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){C[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){C[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){C[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){C[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([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(S,A);C[s]=new k(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,A);C[s]=new k(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,A);C[s]=new k(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){C[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),C.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){C[r]=new k(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"),E=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),I=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ie=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 R=Object.assign,$;function Q(r){if($===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);$=s&&s[1]||""}return`
34
- `+$+r}var L=!1;function pe(r,s){if(!r||L)return"";L=!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 z=`
37
- `+g[j].replace(" at new "," at ");return r.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",r.displayName)),z}while(1<=j&&0<=O);break}}}finally{L=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function ve(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=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function de(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 E: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 I:return(r.displayName||"Context")+".Consumer";case T:return(r._context.displayName||"Context")+".Provider";case F:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return s=r.displayName||null,s!==null?s:de(r.type)||"Memo";case te:s=r._payload,r=r._init;try{return de(r(s))}catch{}}return null}function Pe(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 de(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 ke(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Te(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ee(r){var s=Te(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 Ee(r){r._valueTracker||(r._valueTracker=ee(r))}function je(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=Te(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function Qe(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 R({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Bt(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=ke(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 Ut(r,s){s=s.checked,s!=null&&P(r,"checked",s,!1)}function _t(r,s){Ut(r,s);var u=ke(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")?Dt(r,s.type,u):s.hasOwnProperty("defaultValue")&&Dt(r,s.type,ke(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 Dt(r,s,u){(s!=="number"||Qe(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var pt=Array.isArray;function Zt(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=""+ke(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 R({},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:ke(u)}}function Nr(r,s){var u=ke(s.value),f=ke(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 Z(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?Z(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var be,Re=(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(be=be||document.createElement("div"),be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=be.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 oe={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},Se=["Webkit","ms","Moz","O"];Object.keys(oe).forEach(function(r){Se.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),oe[s]=oe[r]})});function Fe(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||oe.hasOwnProperty(r)&&oe[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=Fe(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var ct=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function We(r,s){if(s){if(ct[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 qe(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,st=null;function Ht(r){if(r=ai(r)){if(typeof Co!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Al(s),Co(r.stateNode,r.type,s))}}function Wt(r){Gr?st?st.push(r):st=[r]:Gr=r}function Wn(){if(Gr){var r=Gr,s=st;if(st=Gr=null,Ht(r),s)for(r=0;r<s.length;r++)Ht(s[r])}}function en(r,s){return r(s)}function Vt(){}var sn=!1;function Er(r,s,u){if(sn)return r(s,u);sn=!0;try{return en(r,s,u)}finally{sn=!1,(Gr!==null||st!==null)&&(Vt(),Wn())}}function it(r,s){var u=r.stateNode;if(u===null)return null;var f=Al(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 qt={};Object.defineProperty(qt,"passive",{get:function(){Dn=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{Dn=!1}function Vn(r,s,u,f,g,v,j,O,z){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(u,Y)}catch(re){this.onError(re)}}var qn=!1,ar=null,bn=!1,Rr=null,Hs={onError:function(r){qn=!0,ar=r}};function Gw(r,s,u,f,g,v,j,O,z){qn=!1,ar=null,Vn.apply(Hs,arguments)}function Kw(r,s,u,f,g,v,j,O,z){if(Gw.apply(this,arguments),qn){if(qn){var Y=ar;qn=!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 _p(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 Yw(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=Yw(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 Bp=t.unstable_scheduleCallback,Up=t.unstable_cancelCallback,Xw=t.unstable_shouldYield,Qw=t.unstable_requestPaint,mt=t.unstable_now,Jw=t.unstable_getCurrentPriorityLevel,Tu=t.unstable_ImmediatePriority,Hp=t.unstable_UserBlockingPriority,dl=t.unstable_NormalPriority,Zw=t.unstable_LowPriority,Wp=t.unstable_IdlePriority,fl=null,ur=null;function e1(r){if(ur&&typeof ur.onCommitFiberRoot=="function")try{ur.onCommitFiberRoot(fl,r,void 0,(r.current.flags&128)===128)}catch{}}var Gn=Math.clz32?Math.clz32:r1,t1=Math.log,n1=Math.LN2;function r1(r){return r>>>=0,r===0?32:31-(t1(r)/n1|0)|0}var pl=64,hl=4194304;function Ws(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 ml(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=Ws(O):(v&=j,v!==0&&(f=Ws(v)))}else j=u&~g,j!==0?f=Ws(j):v!==0&&(f=Ws(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-Gn(s),g=1<<u,f|=r[u],s&=~g;return f}function o1(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 s1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes;0<v;){var j=31-Gn(v),O=1<<j,z=g[j];z===-1?((O&u)===0||(O&f)!==0)&&(g[j]=o1(O,s)):z<=s&&(r.expiredLanes|=O),v&=~O}}function Pu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Vp(){var r=pl;return pl<<=1,(pl&4194240)===0&&(pl=64),r}function Au(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function Vs(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Gn(s),r[s]=u}function i1(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-Gn(u),v=1<<g;s[g]=0,f[g]=-1,r[g]=-1,u&=~v}}function Du(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-Gn(u),g=1<<f;g&s|r[f]&s&&(r[f]|=s),u&=~g}}var Ve=0;function qp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Gp,Lu,Kp,Yp,Xp,Iu=!1,gl=[],Kr=null,Yr=null,Xr=null,qs=new Map,Gs=new Map,Qr=[],l1="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 Qp(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":qs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gs.delete(s.pointerId)}}function Ks(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=ai(s),s!==null&&Lu(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function a1(r,s,u,f,g){switch(s){case"focusin":return Kr=Ks(Kr,r,s,u,f,g),!0;case"dragenter":return Yr=Ks(Yr,r,s,u,f,g),!0;case"mouseover":return Xr=Ks(Xr,r,s,u,f,g),!0;case"pointerover":var v=g.pointerId;return qs.set(v,Ks(qs.get(v)||null,r,s,u,f,g)),!0;case"gotpointercapture":return v=g.pointerId,Gs.set(v,Ks(Gs.get(v)||null,r,s,u,f,g)),!0}return!1}function Jp(r){var s=Eo(r.target);if(s!==null){var u=No(s);if(u!==null){if(s=u.tag,s===13){if(s=_p(u),s!==null){r.blockedOn=s,Xp(r.priority,function(){Kp(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 xl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=Mu(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=ai(u),s!==null&&Lu(s),r.blockedOn=u,!1;s.shift()}return!0}function Zp(r,s,u){xl(r)&&u.delete(s)}function u1(){Iu=!1,Kr!==null&&xl(Kr)&&(Kr=null),Yr!==null&&xl(Yr)&&(Yr=null),Xr!==null&&xl(Xr)&&(Xr=null),qs.forEach(Zp),Gs.forEach(Zp)}function Ys(r,s){r.blockedOn===s&&(r.blockedOn=null,Iu||(Iu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,u1)))}function Xs(r){function s(g){return Ys(g,r)}if(0<gl.length){Ys(gl[0],r);for(var u=1;u<gl.length;u++){var f=gl[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Kr!==null&&Ys(Kr,r),Yr!==null&&Ys(Yr,r),Xr!==null&&Ys(Xr,r),qs.forEach(s),Gs.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);)Jp(u),u.blockedOn===null&&Qr.shift()}var Ko=M.ReactCurrentBatchConfig,yl=!0;function c1(r,s,u,f){var g=Ve,v=Ko.transition;Ko.transition=null;try{Ve=1,Ou(r,s,u,f)}finally{Ve=g,Ko.transition=v}}function d1(r,s,u,f){var g=Ve,v=Ko.transition;Ko.transition=null;try{Ve=4,Ou(r,s,u,f)}finally{Ve=g,Ko.transition=v}}function Ou(r,s,u,f){if(yl){var g=Mu(r,s,u,f);if(g===null)Zu(r,s,f,vl,u),Qp(r,f);else if(a1(g,r,s,u,f))f.stopPropagation();else if(Qp(r,f),s&4&&-1<l1.indexOf(r)){for(;g!==null;){var v=ai(g);if(v!==null&&Gp(v),v=Mu(r,s,u,f),v===null&&Zu(r,s,f,vl,u),v===g)break;g=v}g!==null&&f.stopPropagation()}else Zu(r,s,f,null,u)}}var vl=null;function Mu(r,s,u,f){if(vl=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=_p(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 vl=r,null}function eh(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Jw()){case Tu:return 1;case Hp:return 4;case dl:case Zw:return 16;case Wp:return 536870912;default:return 16}default:return 16}}var Jr=null,_u=null,bl=null;function th(){if(bl)return bl;var r,s=_u,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 bl=g.slice(r,1<f?1-f:void 0)}function wl(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 kl(){return!0}function nh(){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)?kl:nh,this.isPropagationStopped=nh,this}return R(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=kl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),s}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$u=wn(Yo),Qs=R({},Yo,{view:0,detail:0}),f1=wn(Qs),zu,Fu,Js,Sl=R({},Qs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uu,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!==Js&&(Js&&r.type==="mousemove"?(zu=r.screenX-Js.screenX,Fu=r.screenY-Js.screenY):Fu=zu=0,Js=r),zu)},movementY:function(r){return"movementY"in r?r.movementY:Fu}}),rh=wn(Sl),p1=R({},Sl,{dataTransfer:0}),h1=wn(p1),m1=R({},Qs,{relatedTarget:0}),Bu=wn(m1),g1=R({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),x1=wn(g1),y1=R({},Yo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),v1=wn(y1),b1=R({},Yo,{data:0}),oh=wn(b1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k1={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"},S1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=S1[r])?!!s[r]:!1}function Uu(){return j1}var C1=R({},Qs,{key:function(r){if(r.key){var s=w1[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=wl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?k1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uu,charCode:function(r){return r.type==="keypress"?wl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?wl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),N1=wn(C1),E1=R({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sh=wn(E1),R1=R({},Qs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uu}),T1=wn(R1),P1=R({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),A1=wn(P1),D1=R({},Sl,{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}),L1=wn(D1),I1=[9,13,27,32],Hu=d&&"CompositionEvent"in window,Zs=null;d&&"documentMode"in document&&(Zs=document.documentMode);var O1=d&&"TextEvent"in window&&!Zs,ih=d&&(!Hu||Zs&&8<Zs&&11>=Zs),lh=" ",ah=!1;function uh(r,s){switch(r){case"keyup":return I1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xo=!1;function M1(r,s){switch(r){case"compositionend":return ch(s);case"keypress":return s.which!==32?null:(ah=!0,lh);case"textInput":return r=s.data,r===lh&&ah?null:r;default:return null}}function _1(r,s){if(Xo)return r==="compositionend"||!Hu&&uh(r,s)?(r=th(),bl=_u=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 ih&&s.locale!=="ko"?null:s.data;default:return null}}var $1={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 dh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!$1[r.type]:s==="textarea"}function fh(r,s,u,f){Wt(f),s=Rl(s,"onChange"),0<s.length&&(u=new $u("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var ei=null,ti=null;function z1(r){Ph(r,0)}function jl(r){var s=ts(r);if(je(s))return r}function F1(r,s){if(r==="change")return s}var ph=!1;if(d){var Wu;if(d){var Vu="oninput"in document;if(!Vu){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),Vu=typeof hh.oninput=="function"}Wu=Vu}else Wu=!1;ph=Wu&&(!document.documentMode||9<document.documentMode)}function mh(){ei&&(ei.detachEvent("onpropertychange",gh),ti=ei=null)}function gh(r){if(r.propertyName==="value"&&jl(ti)){var s=[];fh(s,ti,r,qr(r)),Er(z1,s)}}function B1(r,s,u){r==="focusin"?(mh(),ei=s,ti=u,ei.attachEvent("onpropertychange",gh)):r==="focusout"&&mh()}function U1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return jl(ti)}function H1(r,s){if(r==="click")return jl(s)}function W1(r,s){if(r==="input"||r==="change")return jl(s)}function V1(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Kn=typeof Object.is=="function"?Object.is:V1;function ni(r,s){if(Kn(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)||!Kn(r[g],s[g]))return!1}return!0}function xh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function yh(r,s){var u=xh(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=xh(u)}}function vh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?vh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function bh(){for(var r=window,s=Qe();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Qe(r.document)}return s}function qu(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 q1(r){var s=bh(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&vh(u.ownerDocument.documentElement,u)){if(f!==null&&qu(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=yh(u,v);var j=yh(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 G1=d&&"documentMode"in document&&11>=document.documentMode,Qo=null,Gu=null,ri=null,Ku=!1;function wh(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ku||Qo==null||Qo!==Qe(f)||(f=Qo,"selectionStart"in f&&qu(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}),ri&&ni(ri,f)||(ri=f,f=Rl(Gu,"onSelect"),0<f.length&&(s=new $u("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=Qo)))}function Cl(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Jo={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionend:Cl("Transition","TransitionEnd")},Yu={},kh={};d&&(kh=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 Nl(r){if(Yu[r])return Yu[r];if(!Jo[r])return r;var s=Jo[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in kh)return Yu[r]=s[u];return r}var Sh=Nl("animationend"),jh=Nl("animationiteration"),Ch=Nl("animationstart"),Nh=Nl("transitionend"),Eh=new Map,Rh="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){Eh.set(r,s),a(s,[r])}for(var Xu=0;Xu<Rh.length;Xu++){var Qu=Rh[Xu],K1=Qu.toLowerCase(),Y1=Qu[0].toUpperCase()+Qu.slice(1);Zr(K1,"on"+Y1)}Zr(Sh,"onAnimationEnd"),Zr(jh,"onAnimationIteration"),Zr(Ch,"onAnimationStart"),Zr("dblclick","onDoubleClick"),Zr("focusin","onFocus"),Zr("focusout","onBlur"),Zr(Nh,"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 oi="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(" "),X1=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Th(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,Kw(f,s,void 0,r),r.currentTarget=null}function Ph(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],z=O.instance,Y=O.currentTarget;if(O=O.listener,z!==v&&g.isPropagationStopped())break e;Th(g,O,Y),v=z}else for(j=0;j<f.length;j++){if(O=f[j],z=O.instance,Y=O.currentTarget,O=O.listener,z!==v&&g.isPropagationStopped())break e;Th(g,O,Y),v=z}}}if(bn)throw r=Rr,bn=!1,Rr=null,r}function Je(r,s){var u=s[sc];u===void 0&&(u=s[sc]=new Set);var f=r+"__bubble";u.has(f)||(Ah(s,r,2,!1),u.add(f))}function Ju(r,s,u){var f=0;s&&(f|=4),Ah(u,r,f,s)}var El="_reactListening"+Math.random().toString(36).slice(2);function si(r){if(!r[El]){r[El]=!0,o.forEach(function(u){u!=="selectionchange"&&(X1.has(u)||Ju(u,!1,r),Ju(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[El]||(s[El]=!0,Ju("selectionchange",!1,s))}}function Ah(r,s,u,f){switch(eh(s)){case 1:var g=c1;break;case 4:g=d1;break;default:g=Ou}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 Zu(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 z=j.tag;if((z===3||z===4)&&(z=j.stateNode.containerInfo,z===g||z.nodeType===8&&z.parentNode===g))return;j=j.return}for(;O!==null;){if(j=Eo(O),j===null)return;if(z=j.tag,z===5||z===6){f=v=j;continue e}O=O.parentNode}}f=f.return}Er(function(){var Y=v,re=qr(u),le=[];e:{var ne=Eh.get(r);if(ne!==void 0){var fe=$u,me=r;switch(r){case"keypress":if(wl(u)===0)break e;case"keydown":case"keyup":fe=N1;break;case"focusin":me="focus",fe=Bu;break;case"focusout":me="blur",fe=Bu;break;case"beforeblur":case"afterblur":fe=Bu;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":fe=rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=h1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=T1;break;case Sh:case jh:case Ch:fe=x1;break;case Nh:fe=A1;break;case"scroll":fe=f1;break;case"wheel":fe=L1;break;case"copy":case"cut":case"paste":fe=v1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=sh}var ge=(s&4)!==0,gt=!ge&&r==="scroll",V=ge?ne!==null?ne+"Capture":null:ne;ge=[];for(var H=Y,K;H!==null;){K=H;var ce=K.stateNode;if(K.tag===5&&ce!==null&&(K=ce,V!==null&&(ce=it(H,V),ce!=null&&ge.push(ii(H,ce,K)))),gt)break;H=H.return}0<ge.length&&(ne=new fe(ne,me,null,u,re),le.push({event:ne,listeners:ge}))}}if((s&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",ne&&u!==ht&&(me=u.relatedTarget||u.fromElement)&&(Eo(me)||me[Tr]))break e;if((fe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,fe?(me=u.relatedTarget||u.toElement,fe=Y,me=me?Eo(me):null,me!==null&&(gt=No(me),me!==gt||me.tag!==5&&me.tag!==6)&&(me=null)):(fe=null,me=Y),fe!==me)){if(ge=rh,ce="onMouseLeave",V="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(ge=sh,ce="onPointerLeave",V="onPointerEnter",H="pointer"),gt=fe==null?ne:ts(fe),K=me==null?ne:ts(me),ne=new ge(ce,H+"leave",fe,u,re),ne.target=gt,ne.relatedTarget=K,ce=null,Eo(re)===Y&&(ge=new ge(V,H+"enter",me,u,re),ge.target=K,ge.relatedTarget=gt,ce=ge),gt=ce,fe&&me)t:{for(ge=fe,V=me,H=0,K=ge;K;K=Zo(K))H++;for(K=0,ce=V;ce;ce=Zo(ce))K++;for(;0<H-K;)ge=Zo(ge),H--;for(;0<K-H;)V=Zo(V),K--;for(;H--;){if(ge===V||V!==null&&ge===V.alternate)break t;ge=Zo(ge),V=Zo(V)}ge=null}else ge=null;fe!==null&&Dh(le,ne,fe,ge,!1),me!==null&&gt!==null&&Dh(le,gt,me,ge,!0)}}e:{if(ne=Y?ts(Y):window,fe=ne.nodeName&&ne.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ne.type==="file")var xe=F1;else if(dh(ne))if(ph)xe=W1;else{xe=U1;var Ce=B1}else(fe=ne.nodeName)&&fe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(xe=H1);if(xe&&(xe=xe(r,Y))){fh(le,xe,u,re);break e}Ce&&Ce(r,ne,Y),r==="focusout"&&(Ce=ne._wrapperState)&&Ce.controlled&&ne.type==="number"&&Dt(ne,"number",ne.value)}switch(Ce=Y?ts(Y):window,r){case"focusin":(dh(Ce)||Ce.contentEditable==="true")&&(Qo=Ce,Gu=Y,ri=null);break;case"focusout":ri=Gu=Qo=null;break;case"mousedown":Ku=!0;break;case"contextmenu":case"mouseup":case"dragend":Ku=!1,wh(le,u,re);break;case"selectionchange":if(G1)break;case"keydown":case"keyup":wh(le,u,re)}var Ne;if(Hu)e:{switch(r){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Xo?uh(r,u)&&(Ae="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ae="onCompositionStart");Ae&&(ih&&u.locale!=="ko"&&(Xo||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Xo&&(Ne=th()):(Jr=re,_u="value"in Jr?Jr.value:Jr.textContent,Xo=!0)),Ce=Rl(Y,Ae),0<Ce.length&&(Ae=new oh(Ae,r,null,u,re),le.push({event:Ae,listeners:Ce}),Ne?Ae.data=Ne:(Ne=ch(u),Ne!==null&&(Ae.data=Ne)))),(Ne=O1?M1(r,u):_1(r,u))&&(Y=Rl(Y,"onBeforeInput"),0<Y.length&&(re=new oh("onBeforeInput","beforeinput",null,u,re),le.push({event:re,listeners:Y}),re.data=Ne))}Ph(le,s)})}function ii(r,s,u){return{instance:r,listener:s,currentTarget:u}}function Rl(r,s){for(var u=s+"Capture",f=[];r!==null;){var g=r,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=it(r,u),v!=null&&f.unshift(ii(r,v,g)),v=it(r,s),v!=null&&f.push(ii(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 Dh(r,s,u,f,g){for(var v=s._reactName,j=[];u!==null&&u!==f;){var O=u,z=O.alternate,Y=O.stateNode;if(z!==null&&z===f)break;O.tag===5&&Y!==null&&(O=Y,g?(z=it(u,v),z!=null&&j.unshift(ii(u,z,O))):g||(z=it(u,v),z!=null&&j.push(ii(u,z,O)))),u=u.return}j.length!==0&&r.push({event:s,listeners:j})}var Q1=/\r\n?/g,J1=/\u0000|\uFFFD/g;function Lh(r){return(typeof r=="string"?r:""+r).replace(Q1,`
38
- `).replace(J1,"")}function Tl(r,s,u){if(s=Lh(s),Lh(r)!==s&&u)throw Error(n(425))}function Pl(){}var ec=null,tc=null;function nc(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 rc=typeof setTimeout=="function"?setTimeout:void 0,Z1=typeof clearTimeout=="function"?clearTimeout:void 0,Ih=typeof Promise=="function"?Promise:void 0,ek=typeof queueMicrotask=="function"?queueMicrotask:typeof Ih<"u"?function(r){return Ih.resolve(null).then(r).catch(tk)}:rc;function tk(r){setTimeout(function(){throw r})}function oc(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),Xs(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);Xs(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 Oh(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,li="__reactProps$"+es,Tr="__reactContainer$"+es,sc="__reactEvents$"+es,nk="__reactListeners$"+es,rk="__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=Oh(r);r!==null;){if(u=r[cr])return u;r=Oh(r)}return s}r=u,u=r.parentNode}return null}function ai(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 Al(r){return r[li]||null}var ic=[],ns=-1;function to(r){return{current:r}}function Ze(r){0>ns||(r.current=ic[ns],ic[ns]=null,ns--)}function Ge(r,s){ns++,ic[ns]=r.current,r.current=s}var no={},Gt=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 Dl(){Ze(ln),Ze(Gt)}function Mh(r,s,u){if(Gt.current!==no)throw Error(n(168));Ge(Gt,s),Ge(ln,u)}function _h(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,Pe(r)||"Unknown",g));return R({},u,f)}function Ll(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||no,Ro=Gt.current,Ge(Gt,r),Ge(ln,ln.current),!0}function $h(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=_h(r,s,Ro),f.__reactInternalMemoizedMergedChildContext=r,Ze(ln),Ze(Gt),Ge(Gt,r)):Ze(ln),Ge(ln,u)}var Pr=null,Il=!1,lc=!1;function zh(r){Pr===null?Pr=[r]:Pr.push(r)}function ok(r){Il=!0,zh(r)}function ro(){if(!lc&&Pr!==null){lc=!0;var r=0,s=Ve;try{var u=Pr;for(Ve=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Pr=null,Il=!1}catch(g){throw Pr!==null&&(Pr=Pr.slice(r+1)),Bp(Tu,ro),g}finally{Ve=s,lc=!1}}return null}var os=[],ss=0,Ol=null,Ml=0,Ln=[],In=0,To=null,Ar=1,Dr="";function Po(r,s){os[ss++]=Ml,os[ss++]=Ol,Ol=r,Ml=s}function Fh(r,s,u){Ln[In++]=Ar,Ln[In++]=Dr,Ln[In++]=To,To=r;var f=Ar;r=Dr;var g=32-Gn(f)-1;f&=~(1<<g),u+=1;var v=32-Gn(s)+g;if(30<v){var j=g-g%5;v=(f&(1<<j)-1).toString(32),f>>=j,g-=j,Ar=1<<32-Gn(s)+g|u<<g|f,Dr=v+r}else Ar=1<<v|u<<g|f,Dr=r}function ac(r){r.return!==null&&(Po(r,1),Fh(r,1,0))}function uc(r){for(;r===Ol;)Ol=os[--ss],os[ss]=null,Ml=os[--ss],os[ss]=null;for(;r===To;)To=Ln[--In],Ln[In]=null,Dr=Ln[--In],Ln[In]=null,Ar=Ln[--In],Ln[In]=null}var kn=null,Sn=null,nt=!1,Yn=null;function Bh(r,s){var u=$n(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 Uh(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=$n(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,kn=r,Sn=null,!0):!1;default:return!1}}function cc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function dc(r){if(nt){var s=Sn;if(s){var u=s;if(!Uh(r,s)){if(cc(r))throw Error(n(418));s=eo(u.nextSibling);var f=kn;s&&Uh(r,s)?Bh(f,u):(r.flags=r.flags&-4097|2,nt=!1,kn=r)}}else{if(cc(r))throw Error(n(418));r.flags=r.flags&-4097|2,nt=!1,kn=r}}}function Hh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;kn=r}function _l(r){if(r!==kn)return!1;if(!nt)return Hh(r),nt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!nc(r.type,r.memoizedProps)),s&&(s=Sn)){if(cc(r))throw Wh(),Error(n(418));for(;s;)Bh(r,s),s=eo(s.nextSibling)}if(Hh(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 Wh(){for(var r=Sn;r;)r=eo(r.nextSibling)}function is(){Sn=kn=null,nt=!1}function fc(r){Yn===null?Yn=[r]:Yn.push(r)}var sk=M.ReactCurrentBatchConfig;function ui(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 $l(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Vh(r){var s=r._init;return s(r._payload)}function qh(r){function s(V,H){if(r){var K=V.deletions;K===null?(V.deletions=[H],V.flags|=16):K.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,K){return V.index=K,r?(K=V.alternate,K!==null?(K=K.index,K<H?(V.flags|=2,H):K):(V.flags|=2,H)):(V.flags|=1048576,H)}function j(V){return r&&V.alternate===null&&(V.flags|=2),V}function O(V,H,K,ce){return H===null||H.tag!==6?(H=rd(K,V.mode,ce),H.return=V,H):(H=g(H,K),H.return=V,H)}function z(V,H,K,ce){var xe=K.type;return xe===D?re(V,H,K.props.children,ce,K.key):H!==null&&(H.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===te&&Vh(xe)===H.type)?(ce=g(H,K.props),ce.ref=ui(V,H,K),ce.return=V,ce):(ce=aa(K.type,K.key,K.props,null,V.mode,ce),ce.ref=ui(V,H,K),ce.return=V,ce)}function Y(V,H,K,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==K.containerInfo||H.stateNode.implementation!==K.implementation?(H=od(K,V.mode,ce),H.return=V,H):(H=g(H,K.children||[]),H.return=V,H)}function re(V,H,K,ce,xe){return H===null||H.tag!==7?(H=$o(K,V.mode,ce,xe),H.return=V,H):(H=g(H,K),H.return=V,H)}function le(V,H,K){if(typeof H=="string"&&H!==""||typeof H=="number")return H=rd(""+H,V.mode,K),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return K=aa(H.type,H.key,H.props,null,V.mode,K),K.ref=ui(V,null,H),K.return=V,K;case E:return H=od(H,V.mode,K),H.return=V,H;case te:var ce=H._init;return le(V,ce(H._payload),K)}if(pt(H)||se(H))return H=$o(H,V.mode,K,null),H.return=V,H;$l(V,H)}return null}function ne(V,H,K,ce){var xe=H!==null?H.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return xe!==null?null:O(V,H,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case _:return K.key===xe?z(V,H,K,ce):null;case E:return K.key===xe?Y(V,H,K,ce):null;case te:return xe=K._init,ne(V,H,xe(K._payload),ce)}if(pt(K)||se(K))return xe!==null?null:re(V,H,K,ce,null);$l(V,K)}return null}function fe(V,H,K,ce,xe){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return V=V.get(K)||null,O(H,V,""+ce,xe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return V=V.get(ce.key===null?K:ce.key)||null,z(H,V,ce,xe);case E:return V=V.get(ce.key===null?K:ce.key)||null,Y(H,V,ce,xe);case te:var Ce=ce._init;return fe(V,H,K,Ce(ce._payload),xe)}if(pt(ce)||se(ce))return V=V.get(K)||null,re(H,V,ce,xe,null);$l(H,ce)}return null}function me(V,H,K,ce){for(var xe=null,Ce=null,Ne=H,Ae=H=0,Ot=null;Ne!==null&&Ae<K.length;Ae++){Ne.index>Ae?(Ot=Ne,Ne=null):Ot=Ne.sibling;var Be=ne(V,Ne,K[Ae],ce);if(Be===null){Ne===null&&(Ne=Ot);break}r&&Ne&&Be.alternate===null&&s(V,Ne),H=v(Be,H,Ae),Ce===null?xe=Be:Ce.sibling=Be,Ce=Be,Ne=Ot}if(Ae===K.length)return u(V,Ne),nt&&Po(V,Ae),xe;if(Ne===null){for(;Ae<K.length;Ae++)Ne=le(V,K[Ae],ce),Ne!==null&&(H=v(Ne,H,Ae),Ce===null?xe=Ne:Ce.sibling=Ne,Ce=Ne);return nt&&Po(V,Ae),xe}for(Ne=f(V,Ne);Ae<K.length;Ae++)Ot=fe(Ne,V,Ae,K[Ae],ce),Ot!==null&&(r&&Ot.alternate!==null&&Ne.delete(Ot.key===null?Ae:Ot.key),H=v(Ot,H,Ae),Ce===null?xe=Ot:Ce.sibling=Ot,Ce=Ot);return r&&Ne.forEach(function(po){return s(V,po)}),nt&&Po(V,Ae),xe}function ge(V,H,K,ce){var xe=se(K);if(typeof xe!="function")throw Error(n(150));if(K=xe.call(K),K==null)throw Error(n(151));for(var Ce=xe=null,Ne=H,Ae=H=0,Ot=null,Be=K.next();Ne!==null&&!Be.done;Ae++,Be=K.next()){Ne.index>Ae?(Ot=Ne,Ne=null):Ot=Ne.sibling;var po=ne(V,Ne,Be.value,ce);if(po===null){Ne===null&&(Ne=Ot);break}r&&Ne&&po.alternate===null&&s(V,Ne),H=v(po,H,Ae),Ce===null?xe=po:Ce.sibling=po,Ce=po,Ne=Ot}if(Be.done)return u(V,Ne),nt&&Po(V,Ae),xe;if(Ne===null){for(;!Be.done;Ae++,Be=K.next())Be=le(V,Be.value,ce),Be!==null&&(H=v(Be,H,Ae),Ce===null?xe=Be:Ce.sibling=Be,Ce=Be);return nt&&Po(V,Ae),xe}for(Ne=f(V,Ne);!Be.done;Ae++,Be=K.next())Be=fe(Ne,V,Ae,Be.value,ce),Be!==null&&(r&&Be.alternate!==null&&Ne.delete(Be.key===null?Ae:Be.key),H=v(Be,H,Ae),Ce===null?xe=Be:Ce.sibling=Be,Ce=Be);return r&&Ne.forEach(function($k){return s(V,$k)}),nt&&Po(V,Ae),xe}function gt(V,H,K,ce){if(typeof K=="object"&&K!==null&&K.type===D&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case _:e:{for(var xe=K.key,Ce=H;Ce!==null;){if(Ce.key===xe){if(xe=K.type,xe===D){if(Ce.tag===7){u(V,Ce.sibling),H=g(Ce,K.props.children),H.return=V,V=H;break e}}else if(Ce.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===te&&Vh(xe)===Ce.type){u(V,Ce.sibling),H=g(Ce,K.props),H.ref=ui(V,Ce,K),H.return=V,V=H;break e}u(V,Ce);break}else s(V,Ce);Ce=Ce.sibling}K.type===D?(H=$o(K.props.children,V.mode,ce,K.key),H.return=V,V=H):(ce=aa(K.type,K.key,K.props,null,V.mode,ce),ce.ref=ui(V,H,K),ce.return=V,V=ce)}return j(V);case E:e:{for(Ce=K.key;H!==null;){if(H.key===Ce)if(H.tag===4&&H.stateNode.containerInfo===K.containerInfo&&H.stateNode.implementation===K.implementation){u(V,H.sibling),H=g(H,K.children||[]),H.return=V,V=H;break e}else{u(V,H);break}else s(V,H);H=H.sibling}H=od(K,V.mode,ce),H.return=V,V=H}return j(V);case te:return Ce=K._init,gt(V,H,Ce(K._payload),ce)}if(pt(K))return me(V,H,K,ce);if(se(K))return ge(V,H,K,ce);$l(V,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,H!==null&&H.tag===6?(u(V,H.sibling),H=g(H,K),H.return=V,V=H):(u(V,H),H=rd(K,V.mode,ce),H.return=V,V=H),j(V)):u(V,H)}return gt}var ls=qh(!0),Gh=qh(!1),zl=to(null),Fl=null,as=null,pc=null;function hc(){pc=as=Fl=null}function mc(r){var s=zl.current;Ze(zl),r._currentValue=s}function gc(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){Fl=r,pc=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(pc!==r)if(r={context:r,memoizedValue:s,next:null},as===null){if(Fl===null)throw Error(n(308));as=r,Fl.dependencies={lanes:0,firstContext:r}}else as=as.next=r;return s}var Ao=null;function xc(r){Ao===null?Ao=[r]:Ao.push(r)}function Kh(r,s,u,f){var g=s.interleaved;return g===null?(u.next=u,xc(s)):(u.next=g.next,g.next=u),s.interleaved=u,Lr(r,f)}function Lr(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 yc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yh(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 Ir(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,(ze&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,Lr(r,u)}return g=f.interleaved,g===null?(s.next=s,xc(f)):(s.next=g.next,g.next=s),f.interleaved=s,Lr(r,u)}function Bl(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,Du(r,u)}}function Xh(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 Ul(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 z=O,Y=z.next;z.next=null,j===null?v=Y:j.next=Y,j=z;var re=r.alternate;re!==null&&(re=re.updateQueue,O=re.lastBaseUpdate,O!==j&&(O===null?re.firstBaseUpdate=Y:O.next=Y,re.lastBaseUpdate=z))}if(v!==null){var le=g.baseState;j=0,re=Y=z=null,O=v;do{var ne=O.lane,fe=O.eventTime;if((f&ne)===ne){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var me=r,ge=O;switch(ne=s,fe=u,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){le=me.call(fe,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(fe,le,ne):me,ne==null)break e;le=R({},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 fe={eventTime:fe,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},re===null?(Y=re=fe,z=le):re=re.next=fe,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(re===null&&(z=le),g.baseState=z,g.firstBaseUpdate=Y,g.lastBaseUpdate=re,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);Io|=j,r.lanes=j,r.memoizedState=le}}function Qh(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 ci={},dr=to(ci),di=to(ci),fi=to(ci);function Do(r){if(r===ci)throw Error(n(174));return r}function vc(r,s){switch(Ge(fi,s),Ge(di,r),Ge(dr,ci),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ae(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ae(s,r)}Ze(dr),Ge(dr,s)}function cs(){Ze(dr),Ze(di),Ze(fi)}function Jh(r){Do(fi.current);var s=Do(dr.current),u=ae(s,r.type);s!==u&&(Ge(di,r),Ge(dr,u))}function bc(r){di.current===r&&(Ze(dr),Ze(di))}var lt=to(0);function Hl(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 wc=[];function kc(){for(var r=0;r<wc.length;r++)wc[r]._workInProgressVersionPrimary=null;wc.length=0}var Wl=M.ReactCurrentDispatcher,Sc=M.ReactCurrentBatchConfig,Lo=0,at=null,Ct=null,Lt=null,Vl=!1,pi=!1,hi=0,ik=0;function Kt(){throw Error(n(321))}function jc(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!Kn(r[u],s[u]))return!1;return!0}function Cc(r,s,u,f,g,v){if(Lo=v,at=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Wl.current=r===null||r.memoizedState===null?ck:dk,r=u(f,g),pi){v=0;do{if(pi=!1,hi=0,25<=v)throw Error(n(301));v+=1,Lt=Ct=null,s.updateQueue=null,Wl.current=fk,r=u(f,g)}while(pi)}if(Wl.current=Kl,s=Ct!==null&&Ct.next!==null,Lo=0,Lt=Ct=at=null,Vl=!1,s)throw Error(n(300));return r}function Nc(){var r=hi!==0;return hi=0,r}function fr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?at.memoizedState=Lt=r:Lt=Lt.next=r,Lt}function Mn(){if(Ct===null){var r=at.alternate;r=r!==null?r.memoizedState:null}else r=Ct.next;var s=Lt===null?at.memoizedState:Lt.next;if(s!==null)Lt=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},Lt===null?at.memoizedState=Lt=r:Lt=Lt.next=r}return Lt}function mi(r,s){return typeof s=="function"?s(r):s}function Ec(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,z=null,Y=v;do{var re=Y.lane;if((Lo&re)===re)z!==null&&(z=z.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:re,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};z===null?(O=z=le,j=f):z=z.next=le,at.lanes|=re,Io|=re}Y=Y.next}while(Y!==null&&Y!==v);z===null?j=f:z.next=O,Kn(f,s.memoizedState)||(un=!0),s.memoizedState=f,s.baseState=j,s.baseQueue=z,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do v=g.lane,at.lanes|=v,Io|=v,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Rc(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);Kn(v,s.memoizedState)||(un=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),u.lastRenderedState=v}return[v,f]}function Zh(){}function em(r,s){var u=at,f=Mn(),g=s(),v=!Kn(f.memoizedState,g);if(v&&(f.memoizedState=g,un=!0),f=f.queue,Tc(rm.bind(null,u,f,r),[r]),f.getSnapshot!==s||v||Lt!==null&&Lt.memoizedState.tag&1){if(u.flags|=2048,gi(9,nm.bind(null,u,f,g,s),void 0,null),It===null)throw Error(n(349));(Lo&30)!==0||tm(u,s,g)}return g}function tm(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=at.updateQueue,s===null?(s={lastEffect:null,stores:null},at.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function nm(r,s,u,f){s.value=u,s.getSnapshot=f,om(s)&&sm(r)}function rm(r,s,u){return u(function(){om(s)&&sm(r)})}function om(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!Kn(r,u)}catch{return!0}}function sm(r){var s=Lr(r,1);s!==null&&Zn(s,r,1,-1)}function im(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:mi,lastRenderedState:r},s.queue=r,r=r.dispatch=uk.bind(null,at,r),[s.memoizedState,r]}function gi(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=at.updateQueue,s===null?(s={lastEffect:null,stores:null},at.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,s.lastEffect=r)),r}function lm(){return Mn().memoizedState}function ql(r,s,u,f){var g=fr();at.flags|=r,g.memoizedState=gi(1|s,u,void 0,f===void 0?null:f)}function Gl(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&&jc(f,j.deps)){g.memoizedState=gi(s,u,v,f);return}}at.flags|=r,g.memoizedState=gi(1|s,u,v,f)}function am(r,s){return ql(8390656,8,r,s)}function Tc(r,s){return Gl(2048,8,r,s)}function um(r,s){return Gl(4,2,r,s)}function cm(r,s){return Gl(4,4,r,s)}function dm(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function fm(r,s,u){return u=u!=null?u.concat([r]):null,Gl(4,4,dm.bind(null,s,r),u)}function Pc(){}function pm(r,s){var u=Mn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&jc(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function hm(r,s){var u=Mn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&jc(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function mm(r,s,u){return(Lo&21)===0?(r.baseState&&(r.baseState=!1,un=!0),r.memoizedState=u):(Kn(u,s)||(u=Vp(),at.lanes|=u,Io|=u,r.baseState=!0),s)}function lk(r,s){var u=Ve;Ve=u!==0&&4>u?u:4,r(!0);var f=Sc.transition;Sc.transition={};try{r(!1),s()}finally{Ve=u,Sc.transition=f}}function gm(){return Mn().memoizedState}function ak(r,s,u){var f=uo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},xm(r))ym(s,u);else if(u=Kh(r,s,u,f),u!==null){var g=nn();Zn(u,r,f,g),vm(u,s,f)}}function uk(r,s,u){var f=uo(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(xm(r))ym(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,Kn(O,j)){var z=s.interleaved;z===null?(g.next=g,xc(s)):(g.next=z.next,z.next=g),s.interleaved=g;return}}catch{}finally{}u=Kh(r,s,g,f),u!==null&&(g=nn(),Zn(u,r,f,g),vm(u,s,f))}}function xm(r){var s=r.alternate;return r===at||s!==null&&s===at}function ym(r,s){pi=Vl=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function vm(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Du(r,u)}}var Kl={readContext:On,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},ck={readContext:On,useCallback:function(r,s){return fr().memoizedState=[r,s===void 0?null:s],r},useContext:On,useEffect:am,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,ql(4194308,4,dm.bind(null,s,r),u)},useLayoutEffect:function(r,s){return ql(4194308,4,r,s)},useInsertionEffect:function(r,s){return ql(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=ak.bind(null,at,r),[f.memoizedState,r]},useRef:function(r){var s=fr();return r={current:r},s.memoizedState=r},useState:im,useDebugValue:Pc,useDeferredValue:function(r){return fr().memoizedState=r},useTransition:function(){var r=im(!1),s=r[0];return r=lk.bind(null,r[1]),fr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=at,g=fr();if(nt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),It===null)throw Error(n(349));(Lo&30)!==0||tm(f,s,u)}g.memoizedState=u;var v={value:u,getSnapshot:s};return g.queue=v,am(rm.bind(null,f,v,r),[r]),f.flags|=2048,gi(9,nm.bind(null,f,v,u,s),void 0,null),u},useId:function(){var r=fr(),s=It.identifierPrefix;if(nt){var u=Dr,f=Ar;u=(f&~(1<<32-Gn(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=hi++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=ik++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},dk={readContext:On,useCallback:pm,useContext:On,useEffect:Tc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:hm,useReducer:Ec,useRef:lm,useState:function(){return Ec(mi)},useDebugValue:Pc,useDeferredValue:function(r){var s=Mn();return mm(s,Ct.memoizedState,r)},useTransition:function(){var r=Ec(mi)[0],s=Mn().memoizedState;return[r,s]},useMutableSource:Zh,useSyncExternalStore:em,useId:gm,unstable_isNewReconciler:!1},fk={readContext:On,useCallback:pm,useContext:On,useEffect:Tc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:hm,useReducer:Rc,useRef:lm,useState:function(){return Rc(mi)},useDebugValue:Pc,useDeferredValue:function(r){var s=Mn();return Ct===null?s.memoizedState=r:mm(s,Ct.memoizedState,r)},useTransition:function(){var r=Rc(mi)[0],s=Mn().memoizedState;return[r,s]},useMutableSource:Zh,useSyncExternalStore:em,useId:gm,unstable_isNewReconciler:!1};function Xn(r,s){if(r&&r.defaultProps){s=R({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Ac(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:R({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Yl={isMounted:function(r){return(r=r._reactInternals)?No(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=nn(),g=uo(r),v=Ir(f,g);v.payload=s,u!=null&&(v.callback=u),s=so(r,v,g),s!==null&&(Zn(s,r,g,f),Bl(s,r,g))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=nn(),g=uo(r),v=Ir(f,g);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=so(r,v,g),s!==null&&(Zn(s,r,g,f),Bl(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=nn(),f=uo(r),g=Ir(u,f);g.tag=2,s!=null&&(g.callback=s),s=so(r,g,f),s!==null&&(Zn(s,r,f,u),Bl(s,r,f))}};function bm(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?!ni(u,f)||!ni(g,v):!0}function wm(r,s,u){var f=!1,g=no,v=s.contextType;return typeof v=="object"&&v!==null?v=On(v):(g=an(s)?Ro:Gt.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=Yl,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=v),s}function km(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&&Yl.enqueueReplaceState(s,s.state,null)}function Dc(r,s,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},yc(r);var v=s.contextType;typeof v=="object"&&v!==null?g.context=On(v):(v=an(s)?Ro:Gt.current,g.context=rs(r,v)),g.state=r.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Ac(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&&Yl.enqueueReplaceState(g,g.state,null),Ul(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+=ve(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 Lc(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 pk=typeof WeakMap=="function"?WeakMap:Map;function Sm(r,s,u){u=Ir(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){na||(na=!0,Yc=f),Ic(r,s)},u}function jm(r,s,u){u=Ir(-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 Cm(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new pk;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=Ek.bind(null,r,s,u),s.then(r,r))}function Nm(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 Em(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=Ir(-1,1),s.tag=2,so(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var hk=M.ReactCurrentOwner,un=!1;function tn(r,s,u,f){s.child=r===null?Gh(s,null,u,f):ls(s,r.child,u,f)}function Rm(r,s,u,f,g){u=u.render;var v=s.ref;return us(s,g),f=Cc(r,s,u,f,v,g),u=Nc(),r!==null&&!un?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Or(r,s,g)):(nt&&u&&ac(s),s.flags|=1,tn(r,s,f,g),s.child)}function Tm(r,s,u,f,g){if(r===null){var v=u.type;return typeof v=="function"&&!nd(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=v,Pm(r,s,v,f,g)):(r=aa(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:ni,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 Pm(r,s,u,f,g){if(r!==null){var v=r.memoizedProps;if(ni(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 Oc(r,s,u,f,g)}function Am(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},Ge(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,Ge(ps,jn),jn|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:u,Ge(ps,jn),jn|=f}else v!==null?(f=v.baseLanes|u,s.memoizedState=null):f=u,Ge(ps,jn),jn|=f;return tn(r,s,g,u),s.child}function Dm(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function Oc(r,s,u,f,g){var v=an(u)?Ro:Gt.current;return v=rs(s,v),us(s,g),u=Cc(r,s,u,f,v,g),f=Nc(),r!==null&&!un?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Or(r,s,g)):(nt&&f&&ac(s),s.flags|=1,tn(r,s,u,g),s.child)}function Lm(r,s,u,f,g){if(an(u)){var v=!0;Ll(s)}else v=!1;if(us(s,g),s.stateNode===null)Ql(r,s),wm(s,u,f),Dc(s,u,f,g),f=!0;else if(r===null){var j=s.stateNode,O=s.memoizedProps;j.props=O;var z=j.context,Y=u.contextType;typeof Y=="object"&&Y!==null?Y=On(Y):(Y=an(u)?Ro:Gt.current,Y=rs(s,Y));var re=u.getDerivedStateFromProps,le=typeof re=="function"||typeof j.getSnapshotBeforeUpdate=="function";le||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==f||z!==Y)&&km(s,j,f,Y),oo=!1;var ne=s.memoizedState;j.state=ne,Ul(s,f,j,g),z=s.memoizedState,O!==f||ne!==z||ln.current||oo?(typeof re=="function"&&(Ac(s,u,re,f),z=s.memoizedState),(O=oo||bm(s,u,O,f,ne,z,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=z),j.props=f,j.state=z,j.context=Y,f=O):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{j=s.stateNode,Yh(r,s),O=s.memoizedProps,Y=s.type===s.elementType?O:Xn(s.type,O),j.props=Y,le=s.pendingProps,ne=j.context,z=u.contextType,typeof z=="object"&&z!==null?z=On(z):(z=an(u)?Ro:Gt.current,z=rs(s,z));var fe=u.getDerivedStateFromProps;(re=typeof fe=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==le||ne!==z)&&km(s,j,f,z),oo=!1,ne=s.memoizedState,j.state=ne,Ul(s,f,j,g);var me=s.memoizedState;O!==le||ne!==me||ln.current||oo?(typeof fe=="function"&&(Ac(s,u,fe,f),me=s.memoizedState),(Y=oo||bm(s,u,Y,f,ne,me,z)||!1)?(re||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(f,me,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(f,me,z)),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=z,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 Mc(r,s,u,f,v,g)}function Mc(r,s,u,f,g,v){Dm(r,s);var j=(s.flags&128)!==0;if(!f&&!j)return g&&$h(s,u,!1),Or(r,s,v);f=s.stateNode,hk.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)):tn(r,s,O,v),s.memoizedState=f.state,g&&$h(s,u,!0),s.child}function Im(r){var s=r.stateNode;s.pendingContext?Mh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Mh(r,s.context,!1),vc(r,s.containerInfo)}function Om(r,s,u,f,g){return is(),fc(g),s.flags|=256,tn(r,s,u,f),s.child}var _c={dehydrated:null,treeContext:null,retryLane:0};function $c(r){return{baseLanes:r,cachePool:null,transitions:null}}function Mm(r,s,u){var f=s.pendingProps,g=lt.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),Ge(lt,g&1),r===null)return dc(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=ua(j,f,0,null),r=$o(r,f,u,null),v.return=s,r.return=s,v.sibling=r,s.child=v,s.child.memoizedState=$c(u),s.memoizedState=_c,r):zc(s,j));if(g=r.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return mk(r,s,j,f,O,g,u);if(v){v=f.fallback,j=s.mode,g=r.child,O=g.sibling;var z={mode:"hidden",children:f.children};return(j&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=fo(g,z),f.subtreeFlags=g.subtreeFlags&14680064),O!==null?v=fo(O,v):(v=$o(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=_c,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=ua({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function Xl(r,s,u,f){return f!==null&&fc(f),ls(s,r.child,null,u),r=zc(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function mk(r,s,u,f,g,v,j){if(u)return s.flags&256?(s.flags&=-257,f=Lc(Error(n(422))),Xl(r,s,j,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=ua({mode:"visible",children:f.children},g,0,null),v=$o(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=_c,v);if((s.mode&1)===0)return Xl(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=Lc(v,f,void 0),Xl(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,Lr(r,g),Zn(f,r,g,-1))}return td(),f=Lc(Error(n(421))),Xl(r,s,j,f)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=Rk.bind(null,r),g._reactRetry=s,null):(r=v.treeContext,Sn=eo(g.nextSibling),kn=s,nt=!0,Yn=null,r!==null&&(Ln[In++]=Ar,Ln[In++]=Dr,Ln[In++]=To,Ar=r.id,Dr=r.overflow,To=s),s=zc(s,f.children),s.flags|=4096,s)}function _m(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),gc(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(tn(r,s,f.children,u),f=lt.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&&_m(r,u,s);else if(r.tag===19)_m(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(Ge(lt,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&&Hl(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&&Hl(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 Ql(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),Io|=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 gk(r,s,u){switch(s.tag){case 3:Im(s),is();break;case 5:Jh(s);break;case 1:an(s.type)&&Ll(s);break;case 4:vc(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;Ge(zl,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(Ge(lt,lt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?Mm(r,s,u):(Ge(lt,lt.current&1),r=Or(r,s,u),r!==null?r.sibling:null);Ge(lt,lt.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),Ge(lt,lt.current),f)break;return null;case 22:case 23:return s.lanes=0,Am(r,s,u)}return Or(r,s,u)}var zm,Bc,Fm,Bm;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}},Bc=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=R({},g,{value:void 0}),f=R({},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=Pl)}We(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 z=f[Y];if(O=g!=null?g[Y]:void 0,f.hasOwnProperty(Y)&&z!==O&&(z!=null||O!=null))if(Y==="style")if(O){for(j in O)!O.hasOwnProperty(j)||z&&z.hasOwnProperty(j)||(u||(u={}),u[j]="");for(j in z)z.hasOwnProperty(j)&&O[j]!==z[j]&&(u||(u={}),u[j]=z[j])}else u||(v||(v=[]),v.push(Y,u)),u=z;else Y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,O=O?O.__html:void 0,z!=null&&O!==z&&(v=v||[]).push(Y,z)):Y==="children"?typeof z!="string"&&typeof z!="number"||(v=v||[]).push(Y,""+z):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(i.hasOwnProperty(Y)?(z!=null&&Y==="onScroll"&&Je("scroll",r),v||O===z||(v=[])):(v=v||[]).push(Y,z))}u&&(v=v||[]).push("style",u);var Y=v;(s.updateQueue=Y)&&(s.flags|=4)}},Bm=function(r,s,u,f){u!==f&&(s.flags|=4)};function xi(r,s){if(!nt)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 Yt(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 xk(r,s,u){var f=s.pendingProps;switch(uc(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(s),null;case 1:return an(s.type)&&Dl(),Yt(s),null;case 3:return f=s.stateNode,cs(),Ze(ln),Ze(Gt),kc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(_l(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Yn!==null&&(Jc(Yn),Yn=null))),Bc(r,s),Yt(s),null;case 5:bc(s);var g=Do(fi.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 Yt(s),null}if(r=Do(dr.current),_l(s)){f=s.stateNode,u=s.type;var v=s.memoizedProps;switch(f[cr]=s,f[li]=v,r=(s.mode&1)!==0,u){case"dialog":Je("cancel",f),Je("close",f);break;case"iframe":case"object":case"embed":Je("load",f);break;case"video":case"audio":for(g=0;g<oi.length;g++)Je(oi[g],f);break;case"source":Je("error",f);break;case"img":case"image":case"link":Je("error",f),Je("load",f);break;case"details":Je("toggle",f);break;case"input":Bt(f,v),Je("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},Je("invalid",f);break;case"textarea":vt(f,v),Je("invalid",f)}We(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&&Tl(f.textContent,O,r),g=["children",O]):typeof O=="number"&&f.textContent!==""+O&&(v.suppressHydrationWarning!==!0&&Tl(f.textContent,O,r),g=["children",""+O]):i.hasOwnProperty(j)&&O!=null&&j==="onScroll"&&Je("scroll",f)}switch(u){case"input":Ee(f),vn(f,v,!0);break;case"textarea":Ee(f),lr(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Pl)}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=Z(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[li]=f,zm(r,s,!1,!1),s.stateNode=r;e:{switch(j=qe(u,f),u){case"dialog":Je("cancel",r),Je("close",r),g=f;break;case"iframe":case"object":case"embed":Je("load",r),g=f;break;case"video":case"audio":for(g=0;g<oi.length;g++)Je(oi[g],r);g=f;break;case"source":Je("error",r),g=f;break;case"img":case"image":case"link":Je("error",r),Je("load",r),g=f;break;case"details":Je("toggle",r),g=f;break;case"input":Bt(r,f),g=yt(r,f),Je("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=R({},f,{value:void 0}),Je("invalid",r);break;case"textarea":vt(r,f),g=An(r,f),Je("invalid",r);break;default:g=f}We(u,g),O=g;for(v in O)if(O.hasOwnProperty(v)){var z=O[v];v==="style"?on(r,z):v==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Re(r,z)):v==="children"?typeof z=="string"?(u!=="textarea"||z!=="")&&U(r,z):typeof z=="number"&&U(r,""+z):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?z!=null&&v==="onScroll"&&Je("scroll",r):z!=null&&P(r,v,z,j))}switch(u){case"input":Ee(r),vn(r,f,!1);break;case"textarea":Ee(r),lr(r);break;case"option":f.value!=null&&r.setAttribute("value",""+ke(f.value));break;case"select":r.multiple=!!f.multiple,v=f.value,v!=null?Zt(r,!!f.multiple,v,!1):f.defaultValue!=null&&Zt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Pl)}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 Yt(s),null;case 6:if(r&&s.stateNode!=null)Bm(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=Do(fi.current),Do(dr.current),_l(s)){if(f=s.stateNode,u=s.memoizedProps,f[cr]=s,(v=f.nodeValue!==u)&&(r=kn,r!==null))switch(r.tag){case 3:Tl(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Tl(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 Yt(s),null;case 13:if(Ze(lt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(nt&&Sn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Wh(),is(),s.flags|=98560,v=!1;else if(v=_l(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;Yt(s),v=!1}else Yn!==null&&(Jc(Yn),Yn=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||(lt.current&1)!==0?Nt===0&&(Nt=3):td())),s.updateQueue!==null&&(s.flags|=4),Yt(s),null);case 4:return cs(),Bc(r,s),r===null&&si(s.stateNode.containerInfo),Yt(s),null;case 10:return mc(s.type._context),Yt(s),null;case 17:return an(s.type)&&Dl(),Yt(s),null;case 19:if(Ze(lt),v=s.memoizedState,v===null)return Yt(s),null;if(f=(s.flags&128)!==0,j=v.rendering,j===null)if(f)xi(v,!1);else{if(Nt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(j=Hl(r),j!==null){for(s.flags|=128,xi(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 Ge(lt,lt.current&1|2),s.child}r=r.sibling}v.tail!==null&&mt()>hs&&(s.flags|=128,f=!0,xi(v,!1),s.lanes=4194304)}else{if(!f)if(r=Hl(j),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),xi(v,!0),v.tail===null&&v.tailMode==="hidden"&&!j.alternate&&!nt)return Yt(s),null}else 2*mt()-v.renderingStartTime>hs&&u!==1073741824&&(s.flags|=128,f=!0,xi(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=lt.current,Ge(lt,f?u&1|2:u&1),s):(Yt(s),null);case 22:case 23:return ed(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(jn&1073741824)!==0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function yk(r,s){switch(uc(s),s.tag){case 1:return an(s.type)&&Dl(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return cs(),Ze(ln),Ze(Gt),kc(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return bc(s),null;case 13:if(Ze(lt),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 Ze(lt),null;case 4:return cs(),null;case 10:return mc(s.type._context),null;case 22:case 23:return ed(),null;case 24:return null;default:return null}}var Jl=!1,Xt=!1,vk=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){dt(r,s,f)}else u.current=null}function Uc(r,s,u){try{u()}catch(f){dt(r,s,f)}}var Um=!1;function bk(r,s){if(ec=yl,r=bh(),qu(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,z=-1,Y=0,re=0,le=r,ne=null;t:for(;;){for(var fe;le!==u||g!==0&&le.nodeType!==3||(O=j+g),le!==v||f!==0&&le.nodeType!==3||(z=j+f),le.nodeType===3&&(j+=le.nodeValue.length),(fe=le.firstChild)!==null;)ne=le,le=fe;for(;;){if(le===r)break t;if(ne===u&&++Y===g&&(O=j),ne===v&&++re===f&&(z=j),(fe=le.nextSibling)!==null)break;le=ne,ne=le.parentNode}le=fe}u=O===-1||z===-1?null:{start:O,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for(tc={focusedElem:r,selectionRange:u},yl=!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:Xn(s.type,ge),gt);V.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var K=s.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){dt(s,s.return,ce)}if(r=s.sibling,r!==null){r.return=s.return,he=r;break}he=s.return}return me=Um,Um=!1,me}function yi(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&&Uc(s,u,v)}g=g.next}while(g!==f)}}function Zl(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 Hc(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 Hm(r){var s=r.alternate;s!==null&&(r.alternate=null,Hm(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[cr],delete s[li],delete s[sc],delete s[nk],delete s[rk])),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 Wm(r){return r.tag===5||r.tag===3||r.tag===4}function Vm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Wm(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 Wc(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=Pl));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}function Vc(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(Vc(r,s,u),r=r.sibling;r!==null;)Vc(r,s,u),r=r.sibling}var $t=null,Qn=!1;function io(r,s,u){for(u=u.child;u!==null;)qm(r,s,u),u=u.sibling}function qm(r,s,u){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(fl,u)}catch{}switch(u.tag){case 5:Xt||fs(u,s);case 6:var f=$t,g=Qn;$t=null,io(r,s,u),$t=f,Qn=g,$t!==null&&(Qn?(r=$t,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):$t.removeChild(u.stateNode));break;case 18:$t!==null&&(Qn?(r=$t,u=u.stateNode,r.nodeType===8?oc(r.parentNode,u):r.nodeType===1&&oc(r,u),Xs(r)):oc($t,u.stateNode));break;case 4:f=$t,g=Qn,$t=u.stateNode.containerInfo,Qn=!0,io(r,s,u),$t=f,Qn=g;break;case 0:case 11:case 14:case 15:if(!Xt&&(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)&&Uc(u,s,j),g=g.next}while(g!==f)}io(r,s,u);break;case 1:if(!Xt&&(fs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(O){dt(u,s,O)}io(r,s,u);break;case 21:io(r,s,u);break;case 22:u.mode&1?(Xt=(f=Xt)||u.memoizedState!==null,io(r,s,u),Xt=f):io(r,s,u);break;default:io(r,s,u)}}function Gm(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new vk),s.forEach(function(f){var g=Tk.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Jn(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:$t=O.stateNode,Qn=!1;break e;case 3:$t=O.stateNode.containerInfo,Qn=!0;break e;case 4:$t=O.stateNode.containerInfo,Qn=!0;break e}O=O.return}if($t===null)throw Error(n(160));qm(v,j,g),$t=null,Qn=!1;var z=g.alternate;z!==null&&(z.return=null),g.return=null}catch(Y){dt(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Km(s,r),s=s.sibling}function Km(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Jn(s,r),pr(r),f&4){try{yi(3,r,r.return),Zl(3,r)}catch(ge){dt(r,r.return,ge)}try{yi(5,r,r.return)}catch(ge){dt(r,r.return,ge)}}break;case 1:Jn(s,r),pr(r),f&512&&u!==null&&fs(u,u.return);break;case 5:if(Jn(s,r),pr(r),f&512&&u!==null&&fs(u,u.return),r.flags&32){var g=r.stateNode;try{U(g,"")}catch(ge){dt(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,z=r.updateQueue;if(r.updateQueue=null,z!==null)try{O==="input"&&v.type==="radio"&&v.name!=null&&Ut(g,v),qe(O,j);var Y=qe(O,v);for(j=0;j<z.length;j+=2){var re=z[j],le=z[j+1];re==="style"?on(g,le):re==="dangerouslySetInnerHTML"?Re(g,le):re==="children"?U(g,le):P(g,re,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 fe=v.value;fe!=null?Zt(g,!!v.multiple,fe,!1):ne!==!!v.multiple&&(v.defaultValue!=null?Zt(g,!!v.multiple,v.defaultValue,!0):Zt(g,!!v.multiple,v.multiple?[]:"",!1))}g[li]=v}catch(ge){dt(r,r.return,ge)}}break;case 6:if(Jn(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){dt(r,r.return,ge)}}break;case 3:if(Jn(s,r),pr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Xs(s.containerInfo)}catch(ge){dt(r,r.return,ge)}break;case 4:Jn(s,r),pr(r);break;case 13:Jn(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||(Kc=mt())),f&4&&Gm(r);break;case 22:if(re=u!==null&&u.memoizedState!==null,r.mode&1?(Xt=(Y=Xt)||re,Jn(s,r),Xt=Y):Jn(s,r),pr(r),f&8192){if(Y=r.memoizedState!==null,(r.stateNode.isHidden=Y)&&!re&&(r.mode&1)!==0)for(he=r,re=r.child;re!==null;){for(le=he=re;he!==null;){switch(ne=he,fe=ne.child,ne.tag){case 0:case 11:case 14:case 15:yi(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){dt(f,u,ge)}}break;case 5:fs(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Qm(le);continue}}fe!==null?(fe.return=ne,he=fe):Qm(le)}re=re.sibling}e:for(re=null,le=r;;){if(le.tag===5){if(re===null){re=le;try{g=le.stateNode,Y?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(O=le.stateNode,z=le.memoizedProps.style,j=z!=null&&z.hasOwnProperty("display")?z.display:null,O.style.display=Fe("display",j))}catch(ge){dt(r,r.return,ge)}}}else if(le.tag===6){if(re===null)try{le.stateNode.nodeValue=Y?"":le.memoizedProps}catch(ge){dt(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;re===le&&(re=null),le=le.return}re===le&&(re=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:Jn(s,r),pr(r),f&4&&Gm(r);break;case 21:break;default:Jn(s,r),pr(r)}}function pr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(Wm(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=Vm(r);Vc(r,v,g);break;case 3:case 4:var j=f.stateNode.containerInfo,O=Vm(r);Wc(r,O,j);break;default:throw Error(n(161))}}catch(z){dt(r,r.return,z)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function wk(r,s,u){he=r,Ym(r)}function Ym(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||Jl;if(!j){var O=g.alternate,z=O!==null&&O.memoizedState!==null||Xt;O=Jl;var Y=Xt;if(Jl=j,(Xt=z)&&!Y)for(he=g;he!==null;)j=he,z=j.child,j.tag===22&&j.memoizedState!==null?Jm(g):z!==null?(z.return=j,he=z):Jm(g);for(;v!==null;)he=v,Ym(v),v=v.sibling;he=g,Jl=O,Xt=Y}Xm(r)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,he=v):Xm(r)}}function Xm(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:Xt||Zl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!Xt)if(u===null)f.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:Xn(s.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&Qh(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}Qh(s,j,u)}break;case 5:var O=s.stateNode;if(u===null&&s.flags&4){u=O;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&u.focus();break;case"img":z.src&&(u.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var re=Y.memoizedState;if(re!==null){var le=re.dehydrated;le!==null&&Xs(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Xt||s.flags&512&&Hc(s)}catch(ne){dt(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 Qm(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 Jm(r){for(;he!==null;){var s=he;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Zl(4,s)}catch(z){dt(s,u,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(z){dt(s,g,z)}}var v=s.return;try{Hc(s)}catch(z){dt(s,v,z)}break;case 5:var j=s.return;try{Hc(s)}catch(z){dt(s,j,z)}}}catch(z){dt(s,s.return,z)}if(s===r){he=null;break}var O=s.sibling;if(O!==null){O.return=s.return,he=O;break}he=s.return}}var kk=Math.ceil,ea=M.ReactCurrentDispatcher,qc=M.ReactCurrentOwner,_n=M.ReactCurrentBatchConfig,ze=0,It=null,bt=null,zt=0,jn=0,ps=to(0),Nt=0,vi=null,Io=0,ta=0,Gc=0,bi=null,cn=null,Kc=0,hs=1/0,Mr=null,na=!1,Yc=null,lo=null,ra=!1,ao=null,oa=0,wi=0,Xc=null,sa=-1,ia=0;function nn(){return(ze&6)!==0?mt():sa!==-1?sa:sa=mt()}function uo(r){return(r.mode&1)===0?1:(ze&2)!==0&&zt!==0?zt&-zt:sk.transition!==null?(ia===0&&(ia=Vp()),ia):(r=Ve,r!==0||(r=window.event,r=r===void 0?16:eh(r.type)),r)}function Zn(r,s,u,f){if(50<wi)throw wi=0,Xc=null,Error(n(185));Vs(r,u,f),((ze&2)===0||r!==It)&&(r===It&&((ze&2)===0&&(ta|=u),Nt===4&&co(r,zt)),dn(r,f),u===1&&ze===0&&(s.mode&1)===0&&(hs=mt()+500,Il&&ro()))}function dn(r,s){var u=r.callbackNode;s1(r,s);var f=ml(r,r===It?zt:0);if(f===0)u!==null&&Up(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&Up(u),s===1)r.tag===0?ok(eg.bind(null,r)):zh(eg.bind(null,r)),ek(function(){(ze&6)===0&&ro()}),u=null;else{switch(qp(f)){case 1:u=Tu;break;case 4:u=Hp;break;case 16:u=dl;break;case 536870912:u=Wp;break;default:u=dl}u=ag(u,Zm.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Zm(r,s){if(sa=-1,ia=0,(ze&6)!==0)throw Error(n(327));var u=r.callbackNode;if(ms()&&r.callbackNode!==u)return null;var f=ml(r,r===It?zt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=la(r,f);else{s=f;var g=ze;ze|=2;var v=ng();(It!==r||zt!==s)&&(Mr=null,hs=mt()+500,Mo(r,s));do try{Ck();break}catch(O){tg(r,O)}while(!0);hc(),ea.current=v,ze=g,bt!==null?s=0:(It=null,zt=0,s=Nt)}if(s!==0){if(s===2&&(g=Pu(r),g!==0&&(f=g,s=Qc(r,g))),s===1)throw u=vi,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&&!Sk(g)&&(s=la(r,f),s===2&&(v=Pu(r),v!==0&&(f=v,s=Qc(r,v))),s===1))throw u=vi,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=Kc+500-mt(),10<s)){if(ml(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){nn(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=rc(_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-Gn(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*kk(f/1960))-f,10<f){r.timeoutHandle=rc(_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?Zm.bind(null,r):null}function Qc(r,s){var u=bi;return r.current.memoizedState.isDehydrated&&(Mo(r,s).flags|=256),r=la(r,s),r!==2&&(s=cn,cn=u,s!==null&&Jc(s)),r}function Jc(r){cn===null?cn=r:cn.push.apply(cn,r)}function Sk(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(!Kn(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&=~Gc,s&=~ta,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-Gn(s),f=1<<u;r[u]=-1,s&=~f}}function eg(r){if((ze&6)!==0)throw Error(n(327));ms();var s=ml(r,0);if((s&1)===0)return dn(r,mt()),null;var u=la(r,s);if(r.tag!==0&&u===2){var f=Pu(r);f!==0&&(s=f,u=Qc(r,f))}if(u===1)throw u=vi,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 Zc(r,s){var u=ze;ze|=1;try{return r(s)}finally{ze=u,ze===0&&(hs=mt()+500,Il&&ro())}}function Oo(r){ao!==null&&ao.tag===0&&(ze&6)===0&&ms();var s=ze;ze|=1;var u=_n.transition,f=Ve;try{if(_n.transition=null,Ve=1,r)return r()}finally{Ve=f,_n.transition=u,ze=s,(ze&6)===0&&ro()}}function ed(){jn=ps.current,Ze(ps)}function Mo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Z1(u)),bt!==null)for(u=bt.return;u!==null;){var f=u;switch(uc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Dl();break;case 3:cs(),Ze(ln),Ze(Gt),kc();break;case 5:bc(f);break;case 4:cs();break;case 13:Ze(lt);break;case 19:Ze(lt);break;case 10:mc(f.type._context);break;case 22:case 23:ed()}u=u.return}if(It=r,bt=r=fo(r.current,null),zt=jn=s,Nt=0,vi=null,Gc=ta=Io=0,cn=bi=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 tg(r,s){do{var u=bt;try{if(hc(),Wl.current=Kl,Vl){for(var f=at.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}Vl=!1}if(Lo=0,Lt=Ct=at=null,pi=!1,hi=0,qc.current=null,u===null||u.return===null){Nt=1,vi=s,bt=null;break}e:{var v=r,j=u.return,O=u,z=s;if(s=zt,O.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Y=z,re=O,le=re.tag;if((re.mode&1)===0&&(le===0||le===11||le===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Nm(j);if(fe!==null){fe.flags&=-257,Em(fe,j,O,v,s),fe.mode&1&&Cm(v,Y,s),s=fe,z=Y;var me=s.updateQueue;if(me===null){var ge=new Set;ge.add(z),s.updateQueue=ge}else me.add(z);break e}else{if((s&1)===0){Cm(v,Y,s),td();break e}z=Error(n(426))}}else if(nt&&O.mode&1){var gt=Nm(j);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),Em(gt,j,O,v,s),fc(ds(z,O));break e}}v=z=ds(z,O),Nt!==4&&(Nt=2),bi===null?bi=[v]:bi.push(v),v=j;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var V=Sm(v,z,s);Xh(v,V);break e;case 1:O=z;var H=v.type,K=v.stateNode;if((v.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(lo===null||!lo.has(K)))){v.flags|=65536,s&=-s,v.lanes|=s;var ce=jm(v,O,s);Xh(v,ce);break e}}v=v.return}while(v!==null)}og(u)}catch(xe){s=xe,bt===u&&u!==null&&(bt=u=u.return);continue}break}while(!0)}function ng(){var r=ea.current;return ea.current=Kl,r===null?Kl:r}function td(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),It===null||(Io&268435455)===0&&(ta&268435455)===0||co(It,zt)}function la(r,s){var u=ze;ze|=2;var f=ng();(It!==r||zt!==s)&&(Mr=null,Mo(r,s));do try{jk();break}catch(g){tg(r,g)}while(!0);if(hc(),ze=u,ea.current=f,bt!==null)throw Error(n(261));return It=null,zt=0,Nt}function jk(){for(;bt!==null;)rg(bt)}function Ck(){for(;bt!==null&&!Xw();)rg(bt)}function rg(r){var s=lg(r.alternate,r,jn);r.memoizedProps=r.pendingProps,s===null?og(r):bt=s,qc.current=null}function og(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=xk(u,s,jn),u!==null){bt=u;return}}else{if(u=yk(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=Ve,g=_n.transition;try{_n.transition=null,Ve=1,Nk(r,s,u,f)}finally{_n.transition=g,Ve=f}return null}function Nk(r,s,u,f){do ms();while(ao!==null);if((ze&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(i1(r,v),r===It&&(bt=It=null,zt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ra||(ra=!0,ag(dl,function(){return ms(),null})),v=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||v){v=_n.transition,_n.transition=null;var j=Ve;Ve=1;var O=ze;ze|=4,qc.current=null,bk(r,u),Km(u,r),q1(tc),yl=!!ec,tc=ec=null,r.current=u,wk(u),Qw(),ze=O,Ve=j,_n.transition=v}else r.current=u;if(ra&&(ra=!1,ao=r,oa=g),v=r.pendingLanes,v===0&&(lo=null),e1(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(na)throw na=!1,r=Yc,Yc=null,r;return(oa&1)!==0&&r.tag!==0&&ms(),v=r.pendingLanes,(v&1)!==0?r===Xc?wi++:(wi=0,Xc=r):wi=0,ro(),null}function ms(){if(ao!==null){var r=qp(oa),s=_n.transition,u=Ve;try{if(_n.transition=null,Ve=16>r?16:r,ao===null)var f=!1;else{if(r=ao,ao=null,oa=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=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 z=0;z<O.length;z++){var Y=O[z];for(he=Y;he!==null;){var re=he;switch(re.tag){case 0:case 11:case 15:yi(8,re,v)}var le=re.child;if(le!==null)le.return=re,he=le;else for(;he!==null;){re=he;var ne=re.sibling,fe=re.return;if(Hm(re),re===Y){he=null;break}if(ne!==null){ne.return=fe,he=ne;break}he=fe}}}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:yi(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 K=j.child;if((j.subtreeFlags&2064)!==0&&K!==null)K.return=j,he=K;else e:for(j=H;he!==null;){if(O=he,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Zl(9,O)}}catch(xe){dt(O,O.return,xe)}if(O===j){he=null;break e}var ce=O.sibling;if(ce!==null){ce.return=O.return,he=ce;break e}he=O.return}}if(ze=g,ro(),ur&&typeof ur.onPostCommitFiberRoot=="function")try{ur.onPostCommitFiberRoot(fl,r)}catch{}f=!0}return f}finally{Ve=u,_n.transition=s}}return!1}function sg(r,s,u){s=ds(u,s),s=Sm(r,s,1),r=so(r,s,1),s=nn(),r!==null&&(Vs(r,1,s),dn(r,s))}function dt(r,s,u){if(r.tag===3)sg(r,r,u);else for(;s!==null;){if(s.tag===3){sg(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=jm(s,r,1),s=so(s,r,1),r=nn(),s!==null&&(Vs(s,1,r),dn(s,r));break}}s=s.return}}function Ek(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=nn(),r.pingedLanes|=r.suspendedLanes&u,It===r&&(zt&u)===u&&(Nt===4||Nt===3&&(zt&130023424)===zt&&500>mt()-Kc?Mo(r,0):Gc|=u),dn(r,s)}function ig(r,s){s===0&&((r.mode&1)===0?s=1:(s=hl,hl<<=1,(hl&130023424)===0&&(hl=4194304)));var u=nn();r=Lr(r,s),r!==null&&(Vs(r,s,u),dn(r,u))}function Rk(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),ig(r,u)}function Tk(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),ig(r,u)}var lg;lg=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,gk(r,s,u);un=(r.flags&131072)!==0}else un=!1,nt&&(s.flags&1048576)!==0&&Fh(s,Ml,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Ql(r,s),r=s.pendingProps;var g=rs(s,Gt.current);us(s,u),g=Cc(null,s,f,r,g,u);var v=Nc();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,Ll(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,yc(s),g.updater=Yl,s.stateNode=g,g._reactInternals=s,Dc(s,f,r,u),s=Mc(null,s,f,!0,v,u)):(s.tag=0,nt&&v&&ac(s),tn(null,s,g,u),s=s.child),s;case 16:f=s.elementType;e:{switch(Ql(r,s),r=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=Ak(f),r=Xn(f,r),g){case 0:s=Oc(null,s,f,r,u);break e;case 1:s=Lm(null,s,f,r,u);break e;case 11:s=Rm(null,s,f,r,u);break e;case 14:s=Tm(null,s,f,Xn(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:Xn(f,g),Oc(r,s,f,g,u);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Xn(f,g),Lm(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,Yh(r,s),Ul(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=Om(r,s,f,u,g);break e}else if(f!==g){g=ds(Error(n(424)),s),s=Om(r,s,f,u,g);break e}else for(Sn=eo(s.stateNode.containerInfo.firstChild),kn=s,nt=!0,Yn=null,u=Gh(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}tn(r,s,f,u)}s=s.child}return s;case 5:return Jh(s),r===null&&dc(s),f=s.type,g=s.pendingProps,v=r!==null?r.memoizedProps:null,j=g.children,nc(f,g)?j=null:v!==null&&nc(f,v)&&(s.flags|=32),Dm(r,s),tn(r,s,j,u),s.child;case 6:return r===null&&dc(s),null;case 13:return Mm(r,s,u);case 4:return vc(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ls(s,null,f,u):tn(r,s,f,u),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Xn(f,g),Rm(r,s,f,g,u);case 7:return tn(r,s,s.pendingProps,u),s.child;case 8:return tn(r,s,s.pendingProps.children,u),s.child;case 12:return tn(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,Ge(zl,f._currentValue),f._currentValue=j,v!==null)if(Kn(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 z=O.firstContext;z!==null;){if(z.context===f){if(v.tag===1){z=Ir(-1,u&-u),z.tag=2;var Y=v.updateQueue;if(Y!==null){Y=Y.shared;var re=Y.pending;re===null?z.next=z:(z.next=re.next,re.next=z),Y.pending=z}}v.lanes|=u,z=v.alternate,z!==null&&(z.lanes|=u),gc(v.return,u,s),O.lanes|=u;break}z=z.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),gc(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}tn(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,tn(r,s,f,u),s.child;case 14:return f=s.type,g=Xn(f,s.pendingProps),g=Xn(f.type,g),Tm(r,s,f,g,u);case 15:return Pm(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:Xn(f,g),Ql(r,s),s.tag=1,an(f)?(r=!0,Ll(s)):r=!1,us(s,u),wm(s,f,g),Dc(s,f,g,u),Mc(null,s,f,!0,r,u);case 19:return $m(r,s,u);case 22:return Am(r,s,u)}throw Error(n(156,s.tag))};function ag(r,s){return Bp(r,s)}function Pk(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 $n(r,s,u,f){return new Pk(r,s,u,f)}function nd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ak(r){if(typeof r=="function")return nd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===F)return 11;if(r===G)return 14}return 2}function fo(r,s){var u=r.alternate;return u===null?(u=$n(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 aa(r,s,u,f,g,v){var j=2;if(f=r,typeof r=="function")nd(r)&&(j=1);else if(typeof r=="string")j=5;else e:switch(r){case D:return $o(u.children,g,v,s);case B:j=8,g|=8;break;case q:return r=$n(12,u,s,g|2),r.elementType=q,r.lanes=v,r;case W:return r=$n(13,u,s,g),r.elementType=W,r.lanes=v,r;case J:return r=$n(19,u,s,g),r.elementType=J,r.lanes=v,r;case ie:return ua(u,g,v,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case T:j=10;break e;case I:j=9;break e;case F:j=11;break e;case G:j=14;break e;case te:j=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=$n(j,u,s,g),s.elementType=r,s.type=f,s.lanes=v,s}function $o(r,s,u,f){return r=$n(7,r,f,s),r.lanes=u,r}function ua(r,s,u,f){return r=$n(22,r,f,s),r.elementType=ie,r.lanes=u,r.stateNode={isHidden:!1},r}function rd(r,s,u){return r=$n(6,r,null,s),r.lanes=u,r}function od(r,s,u){return s=$n(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Dk(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=Au(0),this.expirationTimes=Au(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Au(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function sd(r,s,u,f,g,v,j,O,z){return r=new Dk(r,s,u,O,z),s===1?(s=1,v===!0&&(s|=8)):s=0,v=$n(3,null,null,s),r.current=v,v.stateNode=r,v.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},yc(v),r}function Lk(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function ug(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 _h(r,u,s)}return s}function cg(r,s,u,f,g,v,j,O,z){return r=sd(u,f,!0,r,g,v,j,O,z),r.context=ug(null),u=r.current,f=nn(),g=uo(u),v=Ir(f,g),v.callback=s??null,so(u,v,g),r.current.lanes=g,Vs(r,g,f),dn(r,f),r}function ca(r,s,u,f){var g=s.current,v=nn(),j=uo(g);return u=ug(u),s.context===null?s.context=u:s.pendingContext=u,s=Ir(v,j),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=so(g,s,j),r!==null&&(Zn(r,g,j,v),Bl(r,g,j)),j}function da(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 dg(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function id(r,s){dg(r,s),(r=r.alternate)&&dg(r,s)}function Ik(){return null}var fg=typeof reportError=="function"?reportError:function(r){console.error(r)};function ld(r){this._internalRoot=r}fa.prototype.render=ld.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));ca(r,s,null,null)},fa.prototype.unmount=ld.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Oo(function(){ca(null,r,null,null)}),s[Tr]=null}};function fa(r){this._internalRoot=r}fa.prototype.unstable_scheduleHydration=function(r){if(r){var s=Yp();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&&Jp(r)}};function ad(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function pa(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function pg(){}function Ok(r,s,u,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var Y=da(j);v.call(Y)}}var j=cg(s,f,r,0,null,!1,!1,"",pg);return r._reactRootContainer=j,r[Tr]=j.current,si(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=da(z);O.call(Y)}}var z=sd(r,0,!1,null,null,!1,!1,"",pg);return r._reactRootContainer=z,r[Tr]=z.current,si(r.nodeType===8?r.parentNode:r),Oo(function(){ca(s,z,u,f)}),z}function ha(r,s,u,f,g){var v=u._reactRootContainer;if(v){var j=v;if(typeof g=="function"){var O=g;g=function(){var z=da(j);O.call(z)}}ca(s,j,r,g)}else j=Ok(u,s,r,g,f);return da(j)}Gp=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Ws(s.pendingLanes);u!==0&&(Du(s,u|1),dn(s,mt()),(ze&6)===0&&(hs=mt()+500,ro()))}break;case 13:Oo(function(){var f=Lr(r,1);if(f!==null){var g=nn();Zn(f,r,1,g)}}),id(r,1)}},Lu=function(r){if(r.tag===13){var s=Lr(r,134217728);if(s!==null){var u=nn();Zn(s,r,134217728,u)}id(r,134217728)}},Kp=function(r){if(r.tag===13){var s=uo(r),u=Lr(r,s);if(u!==null){var f=nn();Zn(u,r,s,f)}id(r,s)}},Yp=function(){return Ve},Xp=function(r,s){var u=Ve;try{return Ve=r,s()}finally{Ve=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=Al(f);if(!g)throw Error(n(90));je(f),_t(f,g)}}}break;case"textarea":Nr(r,u);break;case"select":s=u.value,s!=null&&Zt(r,!!u.multiple,s,!1)}},en=Zc,Vt=Oo;var Mk={usingClientEntryPoint:!1,Events:[ai,ts,Al,Wt,Wn,Zc]},ki={findFiberByHostInstance:Eo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_k={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.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:ki.findFiberByHostInstance||Ik,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 ma=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ma.isDisabled&&ma.supportsFiber)try{fl=ma.inject(_k),ur=ma}catch{}}return fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mk,fn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ad(s))throw Error(n(200));return Lk(r,s,null,u)},fn.createRoot=function(r,s){if(!ad(r))throw Error(n(299));var u=!1,f="",g=fg;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=sd(r,1,!1,null,null,u,!1,f,g),r[Tr]=s.current,si(r.nodeType===8?r.parentNode:r),new ld(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(!pa(s))throw Error(n(200));return ha(null,r,s,!0,u)},fn.hydrateRoot=function(r,s,u){if(!ad(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,v="",j=fg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(j=u.onRecoverableError)),s=cg(s,null,r,1,u??null,g,!1,v,j),r[Tr]=s.current,si(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 fa(s)},fn.render=function(r,s,u){if(!pa(s))throw Error(n(200));return ha(null,r,s,!1,u)},fn.unmountComponentAtNode=function(r){if(!pa(r))throw Error(n(40));return r._reactRootContainer?(Oo(function(){ha(null,null,r,!1,function(){r._reactRootContainer=null,r[Tr]=null})}),!0):!1},fn.unstable_batchedUpdates=Zc,fn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!pa(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return ha(r,s,u,!1,f)},fn.version="18.3.1-next-f1338f8080-20240426",fn}var wg;function Ay(){if(wg)return dd.exports;wg=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(),dd.exports=Vk(),dd.exports}var kg;function qk(){if(kg)return ga;kg=1;var e=Ay();return ga.createRoot=e.createRoot,ga.hydrateRoot=e.hydrateRoot,ga}var Gk=qk();/**
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 Sg="popstate";function jg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Kk(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 Yd("",{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:Hi(i)}return Xk(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function er(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yk(){return Math.random().toString(36).substring(2,10)}function Cg(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 Yd(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||Yk(),unstable_mask:i}}function Hi({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 Xk(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(),S=C==null?null:C-h;h=C,p&&p({action:d,location:k.location,delta:S})}function w(C,S){d="PUSH";let A=jg(C)?C:Yd(k.location,C,S);h=m()+1;let P=Cg(A,h),M=k.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:k.location,delta:1})}function b(C,S){d="REPLACE";let A=jg(C)?C:Yd(k.location,C,S);h=m();let P=Cg(A,h),M=k.createHref(A.unstable_mask||A);c.replaceState(P,"",M),a&&p&&p({action:d,location:k.location,delta:0})}function N(C){return Qk(C)}let k={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(Sg,x),p=C,()=>{i.removeEventListener(Sg,x),p=null}},createHref(C){return t(i,C)},createURL:N,encodeLocation(C){let S=N(C);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:b,go(C){return c.go(C)}};return k}function Qk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ut(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Hi(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Dy(e,t,n="/"){return Jk(e,t,n,!1)}function Jk(e,t,n,o){let i=typeof t=="string"?Ds(t):t,a=Fr(i.pathname||"/",n);if(a==null)return null;let c=Ly(e);Zk(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=cS(a);d=aS(c[p],h,o)}return d}function Ly(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;ut(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&&(ut(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Ly(c.children,t,w,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:iS(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 Zk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lS(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var eS=/^:[\w-]+$/,tS=3,nS=2,rS=1,oS=10,sS=-2,Ng=e=>e==="*";function iS(e,t){let n=e.split("/"),o=n.length;return n.some(Ng)&&(o+=sS),t&&(o+=nS),n.filter(i=>!Ng(i)).reduce((i,a)=>i+(eS.test(a)?tS:a===""?rS:oS),o)}function lS(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 aS(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=za({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),w=p.route;if(!x&&h&&n&&!o[o.length-1].route.index&&(x=za({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:hS(vr([a,x.pathnameBase])),route:w}),x.pathnameBase!=="/"&&(a=vr([a,x.pathnameBase]))}return c}function za(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=uS(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 uS(e,t=!1,n=!0){er(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 cS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return er(!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 Fr(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 dS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fS(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=Eg(n.substring(1),"/"):a=Eg(n,t)):a=t,{pathname:a,search:mS(o),hash:gS(i)}}function Eg(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 hd(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 pS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Oy(e){let t=pS(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function Rf(e,t,n,o=!1){let i;typeof e=="string"?i=Ds(e):(i={...e},ut(!i.pathname||!i.pathname.includes("?"),hd("?","pathname","search",i)),ut(!i.pathname||!i.pathname.includes("#"),hd("#","pathname","hash",i)),ut(!i.search||!i.search.includes("#"),hd("#","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=fS(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,"/"),hS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,xS=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 yS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vS(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _y(e,t){let n=e;if(typeof n!="string"||!dS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(My)try{let a=new URL(window.location.href),c=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=Fr(c.pathname,t);c.origin===a.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{er(!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 bS=["GET",...$y];new Set(bS);var Ls=y.createContext(null);Ls.displayName="DataRouter";var tu=y.createContext(null);tu.displayName="DataRouterState";var wS=y.createContext(!1),zy=y.createContext({isTransitioning:!1});zy.displayName="ViewTransition";var kS=y.createContext(new Map);kS.displayName="Fetchers";var SS=y.createContext(null);SS.displayName="Await";var Bn=y.createContext(null);Bn.displayName="Navigation";var Qi=y.createContext(null);Qi.displayName="Location";var sr=y.createContext({outlet:null,matches:[],isDataRoute:!1});sr.displayName="Route";var Tf=y.createContext(null);Tf.displayName="RouteError";var Fy="REACT_ROUTER_ERROR",jS="REDIRECT",CS="ROUTE_ERROR_RESPONSE";function NS(e){if(e.startsWith(`${Fy}:${jS}:{`))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 ES(e){if(e.startsWith(`${Fy}:${CS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new xS(t.status,t.statusText,t.data)}catch{}}function RS(e,{relative:t}={}){ut(Ji(),"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}=Zi(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:vr([n,a])),o.createHref({pathname:d,search:c,hash:i})}function Ji(){return y.useContext(Qi)!=null}function Un(){return ut(Ji(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Qi).location}var By="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Uy(e){y.useContext(Bn).static||y.useLayoutEffect(e)}function Hn(){let{isDataRoute:e}=y.useContext(sr);return e?HS():TS()}function TS(){ut(Ji(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Ls),{basename:t,navigator:n}=y.useContext(Bn),{matches:o}=y.useContext(sr),{pathname:i}=Un(),a=JSON.stringify(Oy(o)),c=y.useRef(!1);return Uy(()=>{c.current=!0}),y.useCallback((p,h={})=>{if(er(c.current,By),!c.current)return;if(typeof p=="number"){n.go(p);return}let m=Rf(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 PS=y.createContext(null);function AS(e){let t=y.useContext(sr).outlet;return y.useMemo(()=>t&&y.createElement(PS.Provider,{value:e},t),[t,e])}function Pt(){let{matches:e}=y.useContext(sr),t=e[e.length-1];return t?t.params:{}}function Zi(e,{relative:t}={}){let{matches:n}=y.useContext(sr),{pathname:o}=Un(),i=JSON.stringify(Oy(n));return y.useMemo(()=>Rf(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function DS(e,t){return Hy(e,t)}function Hy(e,t,n){var C;ut(Ji(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=y.useContext(Bn),{matches:i}=y.useContext(sr),a=i[i.length-1],c=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",h=a&&a.route;{let S=h&&h.path||"";Vy(d,!h||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
-
51
- Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=Un(),x;if(t){let S=typeof t=="string"?Ds(t):t;ut(p==="/"||((C=S.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 "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=m;let w=x.pathname||"/",b=w;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+w.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=Dy(e,{pathname:b});er(h||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),er(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=_S(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:vr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:vr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?y.createElement(Qi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function LS(){let e=US(),t=yS(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 IS=y.createElement(LS,null),Wy=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=ES(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(sr.Provider,{value:this.props.routeContext},y.createElement(Tf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(OS,{error:e},t):t}};Wy.contextType=wS;var md=new WeakMap;function OS({children:e,error:t}){let{basename:n}=y.useContext(Bn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=NS(t.digest);if(o){let i=md.get(t);if(i)throw i;let a=_y(o.location,n);if(My&&!md.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 md.set(t,c),c}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function MS({routeContext:e,match:t,children:n}){let o=y.useContext(Ls);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(sr.Provider,{value:e},n)}function _S(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);ut(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:vS(o.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,w)=>{let b,N=!1,k=null,C=null;o&&(b=a&&x.route.id?a[x.route.id]:void 0,k=x.route.errorElement||IS,c&&(d<0&&w===0?(Vy("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 S=t.concat(i.slice(0,w+1)),A=()=>{let P;return b?P=k:N?P=C:x.route.Component?P=y.createElement(x.route.Component,null):x.route.element?P=x.route.element:P=m,y.createElement(MS,{match:x,routeContext:{outlet:m,matches:S,isDataRoute:o!=null},children:P})};return o&&(x.route.ErrorBoundary||x.route.errorElement||w===0)?y.createElement(Wy,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):A()},null)}function Pf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $S(e){let t=y.useContext(Ls);return ut(t,Pf(e)),t}function zS(e){let t=y.useContext(tu);return ut(t,Pf(e)),t}function FS(e){let t=y.useContext(sr);return ut(t,Pf(e)),t}function Af(e){let t=FS(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function BS(){return Af("useRouteId")}function US(){var o;let e=y.useContext(Tf),t=zS("useRouteError"),n=Af("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function HS(){let{router:e}=$S("useNavigate"),t=Af("useNavigate"),n=y.useRef(!1);return Uy(()=>{n.current=!0}),y.useCallback(async(i,a={})=>{er(n.current,By),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Rg={};function Vy(e,t,n){!t&&!Rg[e]&&(Rg[e]=!0,er(!1,n))}y.memo(WS);function WS({routes:e,future:t,state:n,isStatic:o,onError:i}){return Hy(e,void 0,{state:n,isStatic:o,onError:i})}function VS(e){return AS(e.context)}function Me(e){ut(!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 qS({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:a=!1,unstable_useTransitions:c}){ut(!Ji(),"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,k=y.useMemo(()=>{let C=Fr(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 er(k!=null,`<Router basename="${d}"> is not able to match the URL "${h}${m}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:y.createElement(Bn.Provider,{value:p},y.createElement(Qi.Provider,{children:t,value:k}))}function GS({children:e,location:t}){return DS(Xd(e),t)}function Xd(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,Xd(o.props.children,a));return}ut(o.type===Me,`[${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>`),ut(!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=Xd(o.props.children,a)),n.push(c)}),n}var Pa="get",Aa="application/x-www-form-urlencoded";function nu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function KS(e){return nu(e)&&e.tagName.toLowerCase()==="button"}function YS(e){return nu(e)&&e.tagName.toLowerCase()==="form"}function XS(e){return nu(e)&&e.tagName.toLowerCase()==="input"}function QS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function JS(e,t){return e.button===0&&(!t||t==="_self")&&!QS(e)}function Qd(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 ZS(e,t){let n=Qd(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var xa=null;function ej(){if(xa===null)try{new FormData(document.createElement("form"),0),xa=!1}catch{xa=!0}return xa}var tj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gd(e){return e!=null&&!tj.has(e)?(er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null):e}function nj(e,t){let n,o,i,a,c;if(YS(e)){let d=e.getAttribute("action");o=d?Fr(d,t):null,n=e.getAttribute("method")||Pa,i=gd(e.getAttribute("enctype"))||Aa,a=new FormData(e)}else if(KS(e)||XS(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?Fr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Pa,i=gd(e.getAttribute("formenctype"))||gd(d.getAttribute("enctype"))||Aa,a=new FormData(d,e),!ej()){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(nu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pa,o=null,i=Aa,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 Df(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rj(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&&Fr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function oj(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 sj(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 ij(e,t,n){let o=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let c=await oj(a,n);return c.links?c.links():[]}return[]}));return cj(o.flat(1).filter(sj).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Tg(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 lj(e,t,{includeHydrateFallback:n}={}){return aj(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 aj(e){return[...new Set(e)]}function uj(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function cj(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let a=JSON.stringify(uj(i));return n.has(a)||(n.add(a),o.push({key:a,link:i})),o},[])}function qy(){let e=y.useContext(Ls);return Df(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dj(){let e=y.useContext(tu);return Df(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Lf=y.createContext(void 0);Lf.displayName="FrameworkContext";function Gy(){let e=y.useContext(Lf);return Df(e,"You must render this element inside a <HydratedRouter> element"),e}function fj(e,t){let n=y.useContext(Lf),[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 k=S=>{S.forEach(A=>{c(A.isIntersecting)})},C=new IntersectionObserver(k,{threshold:.5});return w.current&&C.observe(w.current),()=>{C.disconnect()}}},[e]),y.useEffect(()=>{if(o){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[a,w,{}]:[a,w,{onFocus:ji(d,b),onBlur:ji(p,N),onMouseEnter:ji(h,b),onMouseLeave:ji(m,N),onTouchStart:ji(x,b)}]:[!1,w,{}]}function ji(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pj({page:e,...t}){let{router:n}=qy(),o=y.useMemo(()=>Dy(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?y.createElement(mj,{page:e,matches:o,...t}):null}function hj(e){let{manifest:t,routeModules:n}=Gy(),[o,i]=y.useState([]);return y.useEffect(()=>{let a=!1;return ij(e,t,n).then(c=>{a||i(c)}),()=>{a=!0}},[e,t,n]),o}function mj({page:e,matches:t,...n}){let o=Un(),{future:i,manifest:a,routeModules:c}=Gy(),{basename:d}=qy(),{loaderData:p,matches:h}=dj(),m=y.useMemo(()=>Tg(e,t,h,a,o,"data"),[e,t,h,a,o]),x=y.useMemo(()=>Tg(e,t,h,a,o,"assets"),[e,t,h,a,o]),w=y.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=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:k.add(A.route.id))}),k.size===0)return[];let S=rj(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return C&&k.size>0&&S.searchParams.set("_routes",t.filter(A=>k.has(A.route.id)).map(A=>A.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,a,m,t,e,c]),b=y.useMemo(()=>lj(x,a),[x,a]),N=hj(x);return y.createElement(y.Fragment,null,w.map(k=>y.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>y.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),N.map(({key:k,link:C})=>y.createElement("link",{key:k,nonce:n.nonce,...C,crossOrigin:C.crossOrigin??n.crossOrigin})))}function gj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var xj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{xj&&(window.__reactRouterVersion="7.13.1")}catch{}function yj({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=y.useRef();i.current==null&&(i.current=Kk({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(qS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:a,unstable_useTransitions:n})}var Ky=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,we=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},k){let{basename:C,navigator:S,unstable_useTransitions:A}=y.useContext(Bn),P=typeof m=="string"&&Ky.test(m),M=_y(m,C);m=M.to;let _=RS(m,{relative:i}),E=Un(),D=null;if(d){let G=Rf(d,[],E.unstable_mask?E.unstable_mask.pathname:"/",!0);C!=="/"&&(G.pathname=G.pathname==="/"?C:vr([C,G.pathname])),D=S.createHref(G)}let[B,q,T]=fj(o,N),I=kj(m,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:w,unstable_defaultShouldRevalidate:b,unstable_useTransitions:A});function F(G){t&&t(G),G.defaultPrevented||I(G)}let W=!(M.isExternal||a),J=y.createElement("a",{...N,...T,href:(W?D:void 0)||M.absoluteURL||_,onClick:W?F:t,ref:gj(k,q),target:h,"data-discover":!P&&n==="render"?"true":void 0});return B&&!P?y.createElement(y.Fragment,null,J,y.createElement(pj,{page:_})):J});we.displayName="Link";var vj=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=Zi(c,{relative:h.relative}),w=Un(),b=y.useContext(tu),{navigator:N,basename:k}=y.useContext(Bn),C=b!=null&&Ej(x)&&d===!0,S=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,S=S.toLowerCase()),P&&k&&(P=Fr(P,k)||P);const M=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let _=A===S||!i&&A.startsWith(S)&&A.charAt(M)==="/",E=P!=null&&(P===S||!i&&P.startsWith(S)&&P.charAt(S.length)==="/"),D={isActive:_,isPending:E,isTransitioning:C},B=_?t:void 0,q;typeof o=="function"?q=o(D):q=[o,_?"active":null,E?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let T=typeof a=="function"?a(D):a;return y.createElement(we,{...h,"aria-current":B,className:q,ref:m,style:T,to:c,viewTransition:d},typeof p=="function"?p(D):p)});vj.displayName="NavLink";var bj=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:a,method:c=Pa,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w,...b},N)=>{let{unstable_useTransitions:k}=y.useContext(Bn),C=Cj(),S=Nj(d,{relative:h}),A=c.toLowerCase()==="get"?"get":"post",P=typeof d=="string"&&Ky.test(d),M=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let E=_.nativeEvent.submitter,D=(E==null?void 0:E.getAttribute("formmethod"))||c,B=()=>C(E||_.currentTarget,{fetcherKey:t,method:D,navigate:n,replace:i,state:a,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w});k&&n!==!1?y.startTransition(()=>B()):B()};return y.createElement("form",{ref:N,method:A,action:S,onSubmit:o?p:M,...b,"data-discover":!P&&e==="render"?"true":void 0})});bj.displayName="Form";function wj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yy(e){let t=y.useContext(Ls);return ut(t,wj(e)),t}function kj(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=Hn(),x=Un(),w=Zi(e,{relative:c});return y.useCallback(b=>{if(JS(b,t)){b.preventDefault();let N=n!==void 0?n:Hi(x)===Hi(w),k=()=>m(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?y.startTransition(()=>k()):k()}},[x,m,w,n,o,i,t,e,a,c,d,p,h])}function If(e){er(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(Qd(e)),n=y.useRef(!1),o=Un(),i=y.useMemo(()=>ZS(o.search,n.current?null:t.current),[o.search]),a=Hn(),c=y.useCallback((d,p)=>{const h=Qd(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+h,p)},[a,i]);return[i,c]}var Sj=0,jj=()=>`__${String(++Sj)}__`;function Cj(){let{router:e}=Yy("useSubmit"),{basename:t}=y.useContext(Bn),n=BS(),o=e.fetch,i=e.navigate;return y.useCallback(async(a,c={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=nj(a,t);if(c.navigate===!1){let w=c.fetcherKey||jj();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 Nj(e,{relative:t}={}){let{basename:n}=y.useContext(Bn),o=y.useContext(sr);ut(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...Zi(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])),Hi(a)}function Ej(e,{relative:t}={}){let n=y.useContext(zy);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Yy("useViewTransitionState"),i=Zi(e,{relative:t});if(!n.isTransitioning)return!1;let a=Fr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=Fr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return za(i.pathname,c)!=null||za(i.pathname,a)!=null}var vo=Ay();const Rj=eu(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 Tj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xy=(...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 Pj={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 Aj=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,...Pj,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Xy("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(Aj,{ref:a,iconNode:t,className:Xy(`lucide-${Tj(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 ru=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 Qy=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 Dj=ye("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
87
- * @license lucide-react v0.460.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const Fa=ye("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
92
- * @license lucide-react v0.460.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const Jy=ye("BookOpenText",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
97
- * @license lucide-react v0.460.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const Zy=ye("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
102
- * @license lucide-react v0.460.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const Of=ye("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
107
- * @license lucide-react v0.460.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const Wi=ye("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
112
- * @license lucide-react v0.460.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const ev=ye("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
117
- * @license lucide-react v0.460.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const Jd=ye("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
122
- * @license lucide-react v0.460.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const tv=ye("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
127
- * @license lucide-react v0.460.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const Zd=ye("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
132
- * @license lucide-react v0.460.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const Lj=ye("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
137
- * @license lucide-react v0.460.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const Ij=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"}]]);/**
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 Oj=ye("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
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 Mj=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"}]]);/**
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 Mf=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"}]]);/**
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 nv=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"}]]);/**
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 Pg=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"}]]);/**
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 _j=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"}]]);/**
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 Ag=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"}]]);/**
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("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"}]]);/**
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 zj=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"}]]);/**
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 _f=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"}]]);/**
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 Fj=ye("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
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 rv=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"}]]);/**
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 Bj=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"}]]);/**
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 Uj=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"}]]);/**
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 Hj=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"}]]);/**
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 ov=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"}]]);/**
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 Wj=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"}]]);/**
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 Vj=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"}]]);/**
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 qj=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"}]]);/**
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 sv=ye("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 Gj=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"}]]);/**
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 $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"}]]);/**
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 Kj=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"}]]);/**
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 xd=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"}]]);/**
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 Yj=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"}]]);/**
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 Xj=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"}]]);/**
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 tr=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 iv=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"}]]);/**
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 Qj=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"}]]);/**
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 lv=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"}]]);/**
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 Jj=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"}]]);/**
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 ou=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 Zj=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"}]]);/**
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 eC=ye("ServerOff",[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
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 tC=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"}]]);/**
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 nC=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"}]]);/**
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 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"}]]);/**
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 Dg=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"}]]);/**
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 av=ye("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
337
- * @license lucide-react v0.460.0 - ISC
338
- *
339
- * This source code is licensed under the ISC license.
340
- * See the LICENSE file in the root directory of this source tree.
341
- */const rC=ye("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"}]]);/**
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 uv=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"}]]);/**
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 oC=ye("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
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 Is=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"}]]);/**
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 el=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"}]]);/**
362
- * @license lucide-react v0.460.0 - ISC
363
- *
364
- * This source code is licensed under the ISC license.
365
- * See the LICENSE file in the root directory of this source tree.
366
- */const cv=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function dv(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=dv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function sC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=dv(e))&&(o&&(o+=" "),o+=t);return o}const zf="-",iC=e=>{const t=aC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(zf);return d[0]===""&&d.length!==1&&d.shift(),fv(d,t)||lC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},fv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?fv(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},Lg=/^\[(.+)\]$/,lC=e=>{if(Lg.test(e)){const t=Lg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return cC(Object.entries(e.classGroups),n).forEach(([a,c])=>{ef(c,o,a,t)}),o},ef=(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(uC(i)){ef(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,c])=>{ef(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},uC=e=>e.isThemeGetter,cC=(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,dC=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)}}},pv="!",fC=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 S=d[C];if(h===0){if(S===i&&(o||d.slice(C,C+a)===t)){p.push(d.slice(m,C)),m=C+a;continue}if(S==="/"){x=C;continue}}S==="["?h++:S==="]"&&h--}const w=p.length===0?d:d.substring(m),b=w.startsWith(pv),N=b?w.substring(1):w,k=x&&x>m?x-m:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},pC=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},hC=e=>({cache:dC(e.cacheSize),parseClassName:fC(e),...iC(e)}),mC=/\s+/,gC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],c=e.trim().split(mC);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,k=o(N?w.substring(0,b):w);if(!k){if(!N){d=h+(d.length>0?" "+d:d);continue}if(k=o(w),!k){d=h+(d.length>0?" "+d:d);continue}N=!1}const C=pC(m).join(":"),S=x?C+pv:C,A=S+k;if(a.includes(A))continue;a.push(A);const P=i(k,N);for(let M=0;M<P.length;++M){const _=P[M];a.push(S+_)}d=h+(d.length>0?" "+d:d)}return d};function xC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hv(t))&&(o&&(o+=" "),o+=n);return o}const hv=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=hv(e[o]))&&(n&&(n+=" "),n+=t);return n};function yC(e,...t){let n,o,i,a=c;function c(p){const h=t.reduce((m,x)=>x(m),e());return n=hC(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=gC(p,n);return i(p,m),m}return function(){return a(xC.apply(null,arguments))}}const et=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},mv=/^\[(?:([a-z-]+):)?(.+)\]$/i,vC=/^\d+\/\d+$/,bC=new Set(["px","full","screen"]),wC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kC=/\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$/,SC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_r=e=>ws(e)||bC.has(e)||vC.test(e),ho=e=>Os(e,"length",LC),ws=e=>!!e&&!Number.isNaN(Number(e)),yd=e=>Os(e,"number",ws),Ci=e=>!!e&&Number.isInteger(Number(e)),NC=e=>e.endsWith("%")&&ws(e.slice(0,-1)),Ie=e=>mv.test(e),mo=e=>wC.test(e),EC=new Set(["length","size","percentage"]),RC=e=>Os(e,EC,gv),TC=e=>Os(e,"position",gv),PC=new Set(["image","url"]),AC=e=>Os(e,PC,OC),DC=e=>Os(e,"",IC),Ni=()=>!0,Os=(e,t,n)=>{const o=mv.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},LC=e=>kC.test(e)&&!SC.test(e),gv=()=>!1,IC=e=>jC.test(e),OC=e=>CC.test(e),MC=()=>{const e=et("colors"),t=et("spacing"),n=et("blur"),o=et("brightness"),i=et("borderColor"),a=et("borderRadius"),c=et("borderSpacing"),d=et("borderWidth"),p=et("contrast"),h=et("grayscale"),m=et("hueRotate"),x=et("invert"),w=et("gap"),b=et("gradientColorStops"),N=et("gradientColorStopPositions"),k=et("inset"),C=et("margin"),S=et("opacity"),A=et("padding"),P=et("saturate"),M=et("scale"),_=et("sepia"),E=et("skew"),D=et("space"),B=et("translate"),q=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Ie,t],F=()=>[Ie,t],W=()=>["",_r,ho],J=()=>["auto",ws,Ie],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],ie=()=>["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",Ie],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ws,Ie];return{cacheSize:500,separator:":",theme:{colors:[Ni],spacing:[_r,ho],blur:["none","",mo,Ie],brightness:$(),borderColor:[e],borderRadius:["none","","full",mo,Ie],borderSpacing:F(),borderWidth:W(),contrast:$(),grayscale:se(),hueRotate:$(),invert:se(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[NC,ho],inset:I(),margin:I(),opacity:$(),padding:F(),saturate:$(),scale:$(),sepia:se(),skew:$(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[mo]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Ie]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ci,Ie]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Ci,Ie]}],"grid-cols":[{"grid-cols":[Ni]}],"col-start-end":[{col:["auto",{span:["full",Ci,Ie]},Ie]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Ni]}],"row-start-end":[{row:["auto",{span:[Ci,Ie]},Ie]}],"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",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],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",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[mo]},mo]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,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",yd]}],"font-family":[{font:[Ni]}],"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",Ie]}],"line-clamp":[{"line-clamp":["none",ws,yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_r,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_r,ho]}],"underline-offset":[{"underline-offset":["auto",_r,Ie]}],"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:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],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",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),TC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",RC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...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":[S]}],"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,Ie]}],"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":[S]}],"ring-offset-w":[{"ring-offset":[_r,ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mo,DC]}],"shadow-color":[{shadow:[Ni]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",mo,Ie]}],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":[S]}],"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",Ie]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Ci,Ie]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],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",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_r,ho,yd]}],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"]}}},_C=yC(MC);function $e(...e){return _C(sC(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 rn(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function xv(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function $C(e){let t=xv(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 yv(e,t){return $C(e)===t}function zC(e){let n=xv(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:rn(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:rn(n[1]),path:`${c}/missions/${n[1]}`}),i=rn(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:rn(n[3]),path:`${c}/missions/${n[1]}/assignments/${n[3]}`}),i=rn(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:rn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:rn(n[1]),path:`/playbooks/${n[1]}`}),i=rn(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 Og({items:e,onNavigate:t}){const n=Un();return l.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,a=yv(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return l.jsxs(we,{to:o.to,onClick:t,className:$e("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",a?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[l.jsx(i,{className:"h-4 w-4"}),l.jsx("span",{children:o.label})]},o.to)})})}const tf="syntaur-theme",vv=y.createContext(null);function nf(){try{const e=window.localStorage.getItem(tf);return e==="light"||e==="dark"?e:null}catch{return null}}function bv(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function wv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function FC(){if(typeof document>"u")return;const e=nf();wv(e??bv())}function BC({children:e}){const[t,n]=y.useState(()=>nf()),[o,i]=y.useState(()=>nf()??bv());y.useEffect(()=>{wv(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(tf,c),n(c),i(c)},toggleTheme:()=>{const c=o==="dark"?"light":"dark";window.localStorage.setItem(tf,c),n(c),i(c)}};return l.jsx(vv.Provider,{value:a,children:e})}function UC(){const e=y.useContext(vv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Da=new Set;let hn=null,ks=null;function HC(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function kv(){hn&&(hn.readyState===WebSocket.OPEN||hn.readyState===WebSocket.CONNECTING)||(hn=new WebSocket(HC()),hn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of Da)n(t)}catch{}},hn.onclose=()=>{hn=null,ks&&clearTimeout(ks),ks=setTimeout(kv,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 Da.add(n),kv(),()=>{Da.delete(n),Da.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 Bf(){return gn("/api/missions","missions")}function Uf(){return gn("/api/workspaces","missions")}function At(){const{workspace:e}=Pt();return e?`/w/${e}`:""}function WC(){return gn("/api/overview","overview")}function VC(){return gn("/api/assignments","assignments")}function qC(){return gn("/api/attention","attention")}function Sv(){return gn("/api/help")}function jv(e){const t=e?`/api/missions/${e}`:null;return gn(t,"mission")}function GC(e,t){const n=e&&t?`/api/missions/${e}/assignments/${t}`:null;return gn(n,"assignment")}function Cv(e){return gn(e)}function Nv(){return gn("/api/servers","servers")}function KC(){return gn("/api/agent-sessions","agent-sessions")}function YC(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return gn(n,"agent-sessions")}function XC(){return gn("/api/playbooks","playbooks")}function QC(e){const t=e?`/api/playbooks/${e}`:null;return gn(t,"playbooks")}function JC({title:e,breadcrumbs:t,missionSlug:n,onOpenMobileNav:o}){const i=At(),{resolvedTheme:a,toggleTheme:c}=UC();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(Gj,{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(we,{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(we,{className:"shell-action",to:`${i}/help`,children:"Help"}),l.jsxs(we,{className:"shell-action",to:`${i}/create/mission`,children:[l.jsx(tr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Mission"})]}),n?l.jsxs(we,{className:"shell-action",to:`${i}/missions/${n}/create/assignment`,children:[l.jsx(tr,{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(rC,{className:"h-4 w-4"}):l.jsx(Kj,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const ZC=[{to:"/",label:"Overview",icon:Mj},{to:"/attention",label:"Attention",icon:el},{to:"/playbooks",label:"Playbooks",icon:Zy},{to:"/todos",label:"Todos",icon:br}],eN=[{suffix:"/missions",label:"Missions",icon:_f},{suffix:"/assignments",label:"Assignments",icon:qj},{suffix:"/servers",label:"Servers",icon:$f},{suffix:"/agent-sessions",label:"Agent Sessions",icon:ru},{suffix:"/todos",label:"Todos",icon:br}],tN=[{to:"/help",label:"Help",icon:Wj},{to:"/settings",label:"Settings",icon:tC}],Mg="syntaur.dashboard.sourceFirstNoticeDismissed";function nN({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(Mg)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(Mg,"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(_g,{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(we,{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(cv,{className:"h-4 w-4"})})]}),l.jsx(_g,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(JC,{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 _g({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=Uf(),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=Hn();function k(S){h(A=>{const P=new Set(A);return P.has(S)?P.delete(S):P.add(S),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(we,{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(Og,{items:ZC,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(S=>{const A=S==="_ungrouped",P=A?"Ungrouped":rn(S),M=A?"/w/_ungrouped":`/w/${S}`,_=p.has(S),E=n===S||n===null&&A&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${E?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx(Wi,{className:`h-3 w-3 transition-transform ${_?"-rotate-90":""}`}),P]}),!_&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:eN.map(D=>{const B=`${M}${D.suffix}`,q=yv(d.pathname,D.suffix)&&d.pathname.startsWith(M),T=D.icon;return l.jsxs(we,{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(T,{className:"h-4 w-4"}),l.jsx("span",{children:D.label})]},B)})})]},S)}),m?l.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.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:S=>b(S.target.value),onKeyDown:S=>{S.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(tr,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(Og,{items:tN,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(cv,{className:"h-4 w-4"})})]})})]})}function rN(){const e=Un(),{workspace:t}=Pt(),{title:n,breadcrumbs:o,missionSlug:i}=zC(e.pathname);return l.jsx(nN,{title:n,breadcrumbs:o,missionSlug:i,workspace:t??null,children:l.jsx(VS,{})})}function oN(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 Ev(){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 Rv(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 Tv(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 Pv(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 Av(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 Dv(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function sN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function iN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const Ba={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:Oj},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:sv},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:Jd},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:Jj},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:tv},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:Jd},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:Zd},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:Lj},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:Zd}};function Ft({status:e,className:t,showIcon:n=!0}){const o=Ba[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:Zd},i=o.icon;return l.jsxs("span",{title:o.description,className:$e("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",o.className,t),children:[n?l.jsx(i,{className:"h-3.5 w-3.5"}):null,l.jsx("span",{children:o.label})]})}function Lv(e){var t;return((t=Ba[e])==null?void 0:t.description)??`Status: ${e}`}const lN={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 tt({label:e,value:t,description:n,icon:o,tone:i="default",to:a}){const c=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?l.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:l.jsx(o,{className:"h-5 w-5"})}):null]}),n?l.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=$e("rounded-lg border p-3 shadow-sm",lN[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(we,{to:a,className:d,children:c}):l.jsx("article",{className:d,children:c})}function Le({title:e,description:t,children:n,className:o,actions:i}){return l.jsxs("section",{className:$e("surface-panel space-y-3",o),children:[e||i?l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[e?l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?l.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function 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 La({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 aN({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(Le,{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(we,{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(La,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function uN(){var c;const{data:e,loading:t,error:n}=WC(),{data:o}=Sv(),{data:i}=Ev(),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(tt,{label:"Active Missions",value:e.stats.activeMissions,icon:_f,to:"/missions"}),l.jsx(tt,{label:"In Progress",value:e.stats.inProgressAssignments,icon:Fj,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(tt,{label:"Blocked",value:e.stats.blockedAssignments,icon:el,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(tt,{label:"Review",value:e.stats.reviewAssignments,icon:Ij,tone:"info",to:"/assignments?status=review"}),l.jsx(tt,{label:"Failed",value:e.stats.failedAssignments,icon:Yj,tone:"danger",to:"/assignments?status=failed"}),l.jsx(tt,{label:"Stale",value:e.stats.staleAssignments,icon:ru,to:"/assignments?stale=1"}),l.jsx(tt,{label:"Open Todos",value:a,icon:br,to:"/todos"}),l.jsx(tt,{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(Le,{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(we,{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(Ft,{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(Le,{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(we,{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(we,{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(Ft,{status:d.status})]})},d.slug))})}),l.jsx(Le,{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(we,{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:rn(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Rn(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx(aN,{help:o})]})]})}function cN(){const{data:e,loading:t,error:n}=qC();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(tt,{label:"Critical",value:e.summary.critical,icon:zj,tone:"danger"}),l.jsx(tt,{label:"High",value:e.summary.high,icon:el,tone:"warn"}),l.jsx(tt,{label:"Medium",value:e.summary.medium,icon:nC,tone:"info"}),l.jsx(tt,{label:"Low",value:e.summary.low,icon:Hj})]}),l.jsx(Le,{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(we,{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(Ft,{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 dN({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 fN(){const{data:e,loading:t,error:n}=Sv();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(Le,{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(Le,{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(La,{command:o.command.command,description:o.command.description,example:o.command.example}):null,o.href?l.jsx(we,{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(Le,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(o=>l.jsx(dN,{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(Le,{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(Ft,{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(Le,{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(Le,{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(we,{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(Le,{title:"CLI Quick Reference",children:l.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(o=>l.jsx(La,{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(Le,{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(Le,{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(La,{command:o.command.command,example:o.command.example}):null,o.href?l.jsx(we,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:o.href,children:"Open the related surface"}):null]})]})},o.title))})})]})]})}function Hf({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 Wf({value:e,onChange:t,placeholder:n="Search"}){return l.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[l.jsx(ou,{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 Vf({value:e,options:t,onChange:n}){return l.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>l.jsx("button",{type:"button",onClick:()=>n(o.value),className:$e("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===o.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:o.label},o.value))})}function 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(E=>o(E)===_.id)})),[e,o,t]),k=p?b.get(p)??null:null;function C(_){if(!k)return{allowed:!1};const E=o(k);return(a==null?void 0:a({item:k,fromColumnId:E,toColumnId:_}))??{allowed:!0}}function S(){h(null),x(null)}function A(_,E){c&&(_.dataTransfer.effectAllowed="move",_.dataTransfer.setData("text/plain",E),h(E))}function P(_,E,D){!c||!k||!C(E).allowed||(_.preventDefault(),_.dataTransfer.dropEffect="move",x(q=>(q==null?void 0:q.columnId)===E&&q.index===D?q:{columnId:E,index:D}))}async function M(_,E,D){var F;if(_.preventDefault(),!c||!k){S();return}const B=o(k),T=(((F=N.find(W=>W.column.id===B))==null?void 0:F.items)??[]).findIndex(W=>n(W)===n(k));if(!C(E).allowed||T<0){S();return}if(B===E&&(D===T||D===T+1)){S();return}try{await c({item:k,fromColumnId:B,toColumnId:E,fromIndex:T,toIndex:D})}finally{S()}}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:E})=>{const D=C(_.id),B=(m==null?void 0:m.columnId)===_.id;return l.jsxs("section",{className:$e("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!D.allowed?"border-dashed opacity-65":"",k&&D.allowed?"border-primary/30 bg-accent/30":"",B?"ring-2 ring-ring/30":""),title:k&&!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:E.length})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:q=>P(q,_.id,E.length),onDrop:q=>M(q,_.id,E.length),children:[E.length===0?l.jsx(pN,{active:(m==null?void 0:m.columnId)===_.id&&m.index===0,disabled:!!k&&!D.allowed,children:typeof d=="function"?d(_):d}):null,E.map((q,T)=>{const I=n(q),F=p===I;return l.jsxs(y.Fragment,{children:[l.jsx("div",{className:$e("h-2 rounded-full transition",(m==null?void 0:m.columnId)===_.id&&m.index===T?"bg-primary/70":"bg-transparent"),onDragOver:W=>P(W,_.id,T),onDrop:W=>M(W,_.id,T)}),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,I)},onDragEnd:S,className:$e("transition",c?"cursor-grab active:cursor-grabbing":"",F?"scale-[0.98] opacity-50":""),children:i(q,{dragging:F})})]},I)}),E.length>0?l.jsx("div",{className:$e("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(m==null?void 0:m.columnId)===_.id&&m.index===E.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!D.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},_.id)})})})}function pN({active:e,disabled:t,children:n}){return l.jsx("div",{className:$e("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const Ov={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 Li=null,Bo=null;function hN(){return Li?Promise.resolve(Li):Bo||(Bo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Li=e,Bo=null,e)).catch(()=>(Bo=null,Ov)),Bo)}function su(){const[e,t]=y.useState(()=>Li??Ov);return y.useEffect(()=>{hN().then(t)},[]),e}function $g(){Li=null,Bo=null}function mN(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 gN={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 Ua({progress:e,className:t,showLegend:n=!1}){const o=su(),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:gN[p]??zg[c++%zg.length]}))},[o.order,e]),a=i.filter(c=>(e[c.key]??0)>0);return l.jsxs("div",{className:$e("space-y-2",t),children:[l.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?l.jsx("div",{className:"h-full w-full bg-muted"}):a.map(c=>l.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${rn(c.key)}: ${e[c.key]??0}`},c.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>l.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[l.jsx("span",{className:$e("h-2 w-2 rounded-full",c.className)}),l.jsx("span",{children:rn(c.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const xN=["pending","active","blocked","failed","completed","archived"],qf=xN,yN=["pending","in_progress","blocked","review","completed","failed"];function vN(e){return e&&e.length>0?e:[...yN]}function bN(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=At(),{data:n,loading:o,error:i}=Bf(),[a,c]=y.useState(""),[d,p]=y.useState("all"),[h,m]=y.useState("active"),[x,w]=y.useState("all"),[b,N]=y.useState("updated"),[k,C]=If(),S=k.get("view"),A=S==="table"||S==="kanban"?S:"cards",P=T=>{C(I=>{const F=new URLSearchParams(I);return T==="cards"?F.delete("view"):F.set("view",T),F})},[M,_]=y.useState({}),E=y.useMemo(()=>n?n.filter(T=>{if(e){if(e==="_ungrouped"){if(T.workspace!==null)return!1}else if(T.workspace!==e)return!1}return h==="active"&&T.archived||h==="archived"&&!T.archived||d!=="all"&&T.status!==d||x!=="all"&&!T.tags.includes(x)?!1:a.trim()?`${T.title} ${T.tags.join(" ")} ${T.slug}`.toLowerCase().includes(a.toLowerCase()):!0}).sort((T,I)=>SN(T,I,b)):[],[n,a,d,h,x,b,e]),D=E.map(T=>`${T.slug}:${T.status}`).join("|");y.useEffect(()=>{_(jN(E))},[D,b]);const B=y.useMemo(()=>{const T=new Map(E.map(I=>[I.slug,I]));return qf.flatMap(I=>(M[I]??E.filter(W=>W.status===I).map(W=>W.slug)).map(W=>T.get(W)).filter(W=>!!W))},[E,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(T=>T.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Hf,{children:[l.jsx(Wf,{value:a,onChange:c,placeholder:"Search by mission title or tag"}),l.jsxs("select",{value:d,onChange:T=>p(T.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:T=>m(T.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:T=>w(T.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All tags"}),q.map(T=>l.jsx("option",{value:T,children:T},T))]}),l.jsxs("select",{value:b,onChange:T=>N(T.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(Vf,{value:A,onChange:T=>P(T),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),E.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(we,{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:E.map(T=>l.jsxs(we,{to:`${t}/missions/${T.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:T.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(T.updated)]})]}),l.jsx(Ft,{status:T.status})]}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsx(Ua,{progress:T.progress,showLegend:!0}),l.jsx("div",{className:"flex flex-wrap gap-2",children:T.tags.map(I=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:I},I))}),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:T.needsAttention.blockedCount+T.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:T.progress.total})]})]})]})]},T.slug))}):A==="table"?l.jsx(Le,{title:`${E.length} mission${E.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:E.map(T=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(we,{to:`${t}/missions/${T.slug}`,className:"font-semibold text-foreground hover:text-primary",children:T.title}),l.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:T.tags.map(I=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:I},I))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(Ft,{status:T.status})}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("div",{className:"min-w-[220px]",children:l.jsx(Ua,{progress:T.progress})})}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:T.needsAttention.blockedCount+T.needsAttention.failedCount}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(T.updated)})]},T.slug))})]})})}):l.jsx(Iv,{columns:kN,items:B,getItemId:T=>T.slug,getColumnId:T=>T.status,canDrop:({fromColumnId:T,toColumnId:I})=>({allowed:!0,reason:T===I?void 0:"This will set a manual status override on the mission."}),onMove:({item:T,fromColumnId:I,toColumnId:F,fromIndex:W,toIndex:J})=>{if(I===F){const G=M[I]??E.filter(te=>te.status===I).map(te=>te.slug);_(te=>({...te,[I]:bN(G,W,J)}));return}fetch(`/api/missions/${T.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:F})}).then(()=>{window.location.reload()})},emptyMessage:T=>`No ${T.title.toLowerCase()} missions.`,renderCard:(T,{dragging:I})=>l.jsx(CN,{mission:T,dragging:I})}),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(ov,{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 wN={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},kN=qf.map(e=>({id:e,title:wN[e],description:Lv(e)}));function SN(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return Bg(t)-Bg(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function Bg(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.unansweredQuestions}function jN(e){return Object.fromEntries(qf.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function CN({mission:e,dragging:t}){const n=At();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(we,{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(Ft,{status:e.status})]}),l.jsx("div",{className:"mt-4",children:l.jsx(Ua,{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(Of,{className:"h-3 w-3 text-green-500"}):l.jsx(Mf,{className:"h-3 w-3"})})}function ot(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 NN(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 S;const{scope:w,children:b,...N}=x,k=((S=w==null?void 0:w[e])==null?void 0:S[p])||d,C=y.useMemo(()=>N,Object.values(N));return l.jsx(k.Provider,{value:C,children:b})};h.displayName=a+"Provider";function m(x,w){var k;const b=((k=w==null?void 0:w[e])==null?void 0:k[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,EN(i,...t)]}function EN(...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 Ug(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iu(...e){return t=>{let n=!1;const o=e.map(i=>{const a=Ug(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():Ug(e[i],null)}}}}function Qt(...e){return y.useCallback(iu(...e),e)}function Hg(e){const t=RN(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(PN);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 RN(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=DN(i),d=AN(a,i.props);return i.type!==y.Fragment&&(d.ref=o?iu(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 TN=Symbol("radix.slottable");function PN(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TN}function AN(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 DN(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 LN(e){const t=e+"CollectionProvider",[n,o]=Vo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:C,children:S}=k,A=ft.useRef(null),P=ft.useRef(new Map).current;return l.jsx(i,{scope:C,itemMap:P,collectionRef:A,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Hg(d),h=ft.forwardRef((k,C)=>{const{scope:S,children:A}=k,P=a(d,S),M=Qt(C,P.collectionRef);return l.jsx(p,{ref:M,children:A})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",w=Hg(m),b=ft.forwardRef((k,C)=>{const{scope:S,children:A,...P}=k,M=ft.useRef(null),_=Qt(C,M),E=a(m,S);return ft.useEffect(()=>(E.itemMap.set(M,{ref:M,...P}),()=>void E.itemMap.delete(M))),l.jsx(w,{[x]:"",ref:_,children:A})});b.displayName=m;function N(k){const C=a(e+"CollectionConsumer",k);return ft.useCallback(()=>{const A=C.collectionRef.current;if(!A)return[];const P=Array.from(A.querySelectorAll(`[${x}]`));return Array.from(C.itemMap.values()).sort((E,D)=>P.indexOf(E.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:()=>{},IN=Py[" useId ".trim().toString()]||(()=>{}),ON=0;function Ss(e){const[t,n]=y.useState(IN());return wo(()=>{n(o=>o??String(ON++))},[e]),t?`radix-${t}`:""}function MN(e){const t=_N(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(zN);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 _N(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=BN(i),d=FN(a,i.props);return i.type!==y.Fragment&&(d.ref=o?iu(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 $N=Symbol("radix.slottable");function zN(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$N}function FN(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 BN(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 UN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jt=UN.reduce((e,t)=>{const n=MN(`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 HN(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 WN=Py[" useInsertionEffect ".trim().toString()]||wo;function lu({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,c]=VN({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=qN(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 VN({defaultProp:e,onChange:t}){const[n,o]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return WN(()=>{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 qN(e){return typeof e=="function"}var GN=y.createContext(void 0);function Mv(e){const t=y.useContext(GN);return e||t||"ltr"}var vd="rovingFocusGroup.onEntryFocus",KN={bubbles:!1,cancelable:!0},tl="RovingFocusGroup",[rf,_v,YN]=LN(tl),[XN,$v]=Vo(tl,[YN]),[QN,JN]=XN(tl),zv=y.forwardRef((e,t)=>l.jsx(rf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(rf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(ZN,{...e,ref:t})})}));zv.displayName=tl;var ZN=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=Qt(t,w),N=Mv(a),[k,C]=lu({prop:c,defaultProp:d??null,onChange:p,caller:tl}),[S,A]=y.useState(!1),P=Uo(h),M=_v(n),_=y.useRef(!1),[E,D]=y.useState(0);return y.useEffect(()=>{const B=w.current;if(B)return B.addEventListener(vd,P),()=>B.removeEventListener(vd,P)},[P]),l.jsx(QN,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,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:S||E===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:ot(e.onMouseDown,()=>{_.current=!0}),onFocus:ot(e.onFocus,B=>{const q=!_.current;if(B.target===B.currentTarget&&q&&!S){const T=new CustomEvent(vd,KN);if(B.currentTarget.dispatchEvent(T),!T.defaultPrevented){const I=M().filter(te=>te.focusable),F=I.find(te=>te.active),W=I.find(te=>te.id===k),G=[F,W,...I].filter(Boolean).map(te=>te.ref.current);Uv(G,m)}}_.current=!1}),onBlur:ot(e.onBlur,()=>A(!1))})})}),Fv="RovingFocusGroupItem",Bv=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=JN(Fv,n),x=m.currentTabStopId===h,w=_v(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=m;return y.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),l.jsx(rf.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:ot(e.onMouseDown,C=>{o?m.onItemFocus(h):C.preventDefault()}),onFocus:ot(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:ot(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const S=n2(C,m.orientation,m.dir);if(S!==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(S==="last")P.reverse();else if(S==="prev"||S==="next"){S==="prev"&&P.reverse();const M=P.indexOf(C.currentTarget);P=m.loop?r2(P,M+1):P.slice(M+1)}setTimeout(()=>Uv(P))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});Bv.displayName=Fv;var e2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function t2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function n2(e,t,n){const o=t2(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return e2[o]}function Uv(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function r2(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var o2=zv,s2=Bv;function i2(e,t){return y.useReducer((n,o)=>t[n][o]??n,e)}var qo=e=>{const{present:t,children:n}=e,o=l2(t),i=typeof n=="function"?n({present:o.isPresent}):y.Children.only(n),a=Qt(o.ref,a2(i));return typeof n=="function"||o.isPresent?y.cloneElement(i,{ref:a}):null};qo.displayName="Presence";function l2(e){const[t,n]=y.useState(),o=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),c=e?"mounted":"unmounted",[d,p]=i2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=ya(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=ya(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 k=ya(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(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=ya(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 ya(e){return(e==null?void 0:e.animationName)||"none"}function a2(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 au="Tabs",[u2]=Vo(au,[$v]),Hv=$v(),[c2,Gf]=u2(au),Wv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=Mv(d),[x,w]=lu({prop:o,onChange:i,defaultProp:a??"",caller:au});return l.jsx(c2,{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})})});Wv.displayName=au;var Vv="TabsList",qv=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,a=Gf(Vv,n),c=Hv(n);return l.jsx(o2,{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})})});qv.displayName=Vv;var Gv="TabsTrigger",Kv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=e,c=Gf(Gv,n),d=Hv(n),p=Qv(c.baseId,o),h=Jv(c.baseId,o),m=o===c.value;return l.jsx(s2,{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:ot(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:ot(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:ot(e.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!i&&x&&c.onValueChange(o)})})})});Kv.displayName=Gv;var Yv="TabsContent",Xv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:a,...c}=e,d=Gf(Yv,n),p=Qv(d.baseId,o),h=Jv(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})})});Xv.displayName=Yv;function Qv(e,t){return`${e}-trigger-${t}`}function Jv(e,t){return`${e}-content-${t}`}var d2=Wv,f2=qv,p2=Kv,h2=Xv;function Zv({value:e,onValueChange:t,items:n,className:o}){return l.jsxs(d2,{value:e,onValueChange:t,className:o,children:[l.jsx(f2,{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(p2,{value:i.value,className:$e("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[l.jsx("span",{children:i.label}),typeof i.count=="number"?l.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>l.jsx(h2,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const m2="modulepreload",g2=function(e){return"/"+e},Wg={},x2=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=g2(h),h in Wg)return;Wg[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":m2,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 y2({definition:e,className:t,nodeRoutes:n={}}){const o=y.useRef(null),[i,a]=y.useState(null),[c,d]=y.useState(!0),p=Hn(),h=document.documentElement.classList.contains("dark")?"dark":"default";return y.useEffect(()=>{let m=!1;async function x(){if(o.current)try{const w=(await x2(async()=>{const{default:k}=await import("./mermaid.core-fMQRe9Gq.js").then(C=>C.bF);return{default:k}},[])).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,v2(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:$e("rounded-lg border border-border bg-card p-4",t),children:[l.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),l.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:o,className:"overflow-auto"})]})}function v2(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 b2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const w2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,k2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S2={};function Vg(e,t){return(S2.jsx?k2:w2).test(e)}const j2=/[ \t\n\f\r]/g;function C2(e){return typeof e=="object"?e.type==="text"?qg(e.value):!1:qg(e)}function qg(e){return e.replace(j2,"")===""}class nl{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}nl.prototype.normal={};nl.prototype.property={};nl.prototype.space=void 0;function e0(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new nl(n,o,t)}function of(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 N2=0;const Oe=Go(),wt=Go(),sf=Go(),ue=Go(),Ye=Go(),js=Go(),Nn=Go();function Go(){return 2**++N2}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:wt,commaOrSpaceSeparated:Nn,commaSeparated:js,number:ue,overloadedBoolean:sf,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),bd=Object.keys(lf);class Kf extends xn{constructor(t,n,o,i){let a=-1;if(super(t,n),Gg(this,"space",i),typeof o=="number")for(;++a<bd.length;){const c=bd[a];Gg(this,bd[a],(o&lf[c])===lf[c])}}}Kf.prototype.defined=!0;function Gg(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const a=new Kf(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,n[of(o)]=o,n[of(a.attribute)]=o}return new nl(t,n,e.space)}const t0=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Ye,ariaCurrent:null,ariaDescribedBy:Ye,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:Ye,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:Ye,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ye,ariaLevel:ue,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:Ye,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:wt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function n0(e,t){return t in e?e[t]:t}function r0(e,t){return n0(e,t.toLowerCase())}const E2=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:Ye,accessKey:Ye,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:Ye,autoFocus:Oe,autoPlay:Oe,blocking:Ye,capture:null,charSet:null,checked:Oe,cite:null,className:Ye,cols:ue,colSpan:null,content:null,contentEditable:wt,controls:Oe,controlsList:Ye,coords:ue|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:sf,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:Ye,height:ue,hidden:sf,high:ue,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:Oe,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:ue,pattern:null,ping:Ye,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:Ye,required:Oe,reversed:Oe,rows:ue,rowSpan:ue,sandbox:Ye,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:wt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:r0}),R2=Ms({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:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Ye,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,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:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:n0}),o0=Ms({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()}}),s0=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:r0}),i0=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),T2={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"},P2=/[A-Z]/g,Kg=/-[a-z]/g,A2=/^data[-\w.:]+$/i;function D2(e,t){const n=of(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"&&A2.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Kg,I2);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Kg.test(a)){let c=a.replace(P2,L2);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Kf}return new i(o,t)}function L2(e){return"-"+e.toLowerCase()}function I2(e){return e.charAt(1).toUpperCase()}const O2=e0([t0,E2,o0,s0,i0],"html"),Yf=e0([t0,R2,o0,s0,i0],"svg");function M2(e){return e.join(" ").trim()}var gs={},wd,Yg;function _2(){if(Yg)return wd;Yg=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=`
367
- `,h="/",m="*",x="",w="comment",b="declaration";function N(C,S){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];S=S||{};var A=1,P=1;function M(J){var G=J.match(t);G&&(A+=G.length);var te=J.lastIndexOf(p);P=~te?J.length-te:P+J.length}function _(){var J={line:A,column:P};return function(G){return G.position=new E(J),q(),G}}function E(J){this.start=J,this.end={line:A,column:P},this.source=S.source}E.prototype.content=C;function D(J){var G=new Error(S.source+":"+A+":"+P+": "+J);if(G.reason=J,G.filename=S.source,G.line=A,G.column=P,G.source=C,!S.silent)throw G}function B(J){var G=J.exec(C);if(G){var te=G[0];return M(te),C=C.slice(te.length),G}}function q(){B(n)}function T(J){var G;for(J=J||[];G=I();)G!==!1&&J.push(G);return J}function I(){var J=_();if(!(h!=C.charAt(0)||m!=C.charAt(1))){for(var G=2;x!=C.charAt(G)&&(m!=C.charAt(G)||h!=C.charAt(G+1));)++G;if(G+=2,x===C.charAt(G-1))return D("End of comment missing");var te=C.slice(2,G-2);return P+=2,M(te),C=C.slice(G),P+=2,J({type:w,comment:te})}}function F(){var J=_(),G=B(o);if(G){if(I(),!B(i))return D("property missing ':'");var te=B(a),ie=J({type:b,property:k(G[0].replace(e,x)),value:te?k(te[0].replace(e,x)):x});return B(c),ie}}function W(){var J=[];T(J);for(var G;G=F();)G!==!1&&(J.push(G),T(J));return J}return q(),W()}function k(C){return C?C.replace(d,x):x}return wd=N,wd}var Xg;function $2(){if(Xg)return gs;Xg=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(_2());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 Ei={},Qg;function z2(){if(Qg)return Ei;Qg=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.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 Ei.camelCase=p,Ei}var Ri,Jg;function F2(){if(Jg)return Ri;Jg=1;var e=Ri&&Ri.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e($2()),n=z2();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,Ri=o,Ri}var B2=F2();const U2=eu(B2),l0=a0("end"),Xf=a0("start");function a0(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 H2(e){const t=Xf(e),n=l0(e);if(t&&n)return{start:t,end:n}}function Ii(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zg(e.position):"start"in e||"end"in e?Zg(e):"line"in e||"column"in e?af(e):""}function af(e){return ex(e&&e.line)+":"+ex(e&&e.column)}function Zg(e){return af(e&&e.start)+"-"+af(e&&e.end)}function ex(e){return e&&typeof e=="number"?e:1}class Jt 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}}Jt.prototype.file="";Jt.prototype.name="";Jt.prototype.reason="";Jt.prototype.message="";Jt.prototype.stack="";Jt.prototype.column=void 0;Jt.prototype.line=void 0;Jt.prototype.ancestors=void 0;Jt.prototype.cause=void 0;Jt.prototype.fatal=void 0;Jt.prototype.place=void 0;Jt.prototype.ruleId=void 0;Jt.prototype.source=void 0;const Qf={}.hasOwnProperty,W2=new Map,V2=/[A-Z]/g,q2=new Set(["table","tbody","thead","tfoot","tr"]),G2=new Set(["td","th"]),u0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function K2(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=nE(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=tE(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"?Yf:O2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=c0(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function c0(e,t,n){if(t.type==="element")return Y2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return X2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return J2(e,t,n);if(t.type==="mdxjsEsm")return Q2(e,t);if(t.type==="root")return Z2(e,t,n);if(t.type==="text")return eE(e,t)}function Y2(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=Yf,e.schema=i),e.ancestors.push(t);const a=f0(e,t.tagName,!1),c=rE(e,t);let d=Zf(e,t);return q2.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!C2(p):!0})),d0(e,c,a,t),Jf(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function X2(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)}Vi(e,t.position)}function Q2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vi(e,t.position)}function J2(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=Yf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:f0(e,t.name,!0),c=oE(e,t),d=Zf(e,t);return d0(e,c,a,t),Jf(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function Z2(e,t,n){const o={};return Jf(o,Zf(e,t)),e.create(t,e.Fragment,o,n)}function eE(e,t){return t.value}function d0(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Jf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function tE(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 nE(e,t){return n;function n(o,i,a,c){const d=Array.isArray(a.children),p=Xf(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 rE(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Qf.call(t.properties,i)){const a=sE(e,i,t.properties[i]);if(a){const[c,d]=a;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&G2.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 oE(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 Vi(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 Vi(e,t.position);else a=o.value===null?!0:o.value;n[i]=a}return n}function Zf(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:W2;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=c0(e,a,c);d!==void 0&&n.push(d)}return n}function sE(e,t,n){const o=D2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?b2(n):M2(n)),o.property==="style"){let i=typeof n=="object"?n:iE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=lE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?T2[o.property]||o.property:o.attribute,n]}}function iE(e,t){try{return U2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new Jt("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=u0+"#cannot-parse-style-attribute",i}}function f0(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=Vg(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=Vg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Qf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Vi(e)}function Vi(e,t){const n=new Jt("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=u0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lE(e){const t={};let n;for(n in e)Qf.call(e,n)&&(t[aE(n)]=e[n]);return t}function aE(e){let t=e.replace(V2,uE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uE(e){return"-"+e.toLowerCase()}const kd={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"]},cE={};function dE(e,t){const n=cE,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return p0(e,o,i)}function p0(e,t,n){if(fE(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 tx(e.children,t,n)}return Array.isArray(e)?tx(e,t,n):""}function tx(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=p0(e[i],t,n);return o.join("")}function fE(e){return!!(e&&typeof e=="object")}const nx=document.createElement("i");function ep(e){const t="&"+e+";";nx.innerHTML=t;const n=nx.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 Fn(e,t){return e.length>0?(kr(e,e.length,0,t),e):t}const rx={}.hasOwnProperty;function pE(e){const t={};let n=-1;for(;++n<e.length;)hE(t,e[n]);return t}function hE(e,t){let n;for(n in t){const i=(rx.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){rx.call(i,c)||(i[c]=[]);const d=a[c];mE(i[c],Array.isArray(d)?d:d?[d]:[])}}}function mE(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 h0(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]/),gE=jo(/[#-'*+\--9=?A-Z^-~]/);function uf(e){return e!==null&&(e<32||e===127)}const cf=jo(/\d/),xE=jo(/[\dA-Fa-f]/),yE=jo(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const vE=jo(new RegExp("\\p{P}|\\p{S}","u")),bE=jo(/\s/);function jo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _s(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 Xe(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return He(p)?(e.enter(n),d(p)):t(p)}function d(p){return He(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const wE={tokenize:kE};function kE(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"),Xe(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 De(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),c)}}const SE={tokenize:jE},ox={tokenize:CE};function jE(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,E;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){E=t.events[_][1].end;break}S(o);let D=M;for(;D<t.events.length;)t.events[D][1].end={...E},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(ox,m,x)(P)}function m(P){return i&&A(),S(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(ox,b,N)(P)}function b(P){return o++,n.push([t.currentConstruct,t.containerState]),w(P)}function N(P){if(P===null){i&&A(),S(0),e.consume(P);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(P)}function k(P){if(P===null){C(e.exit("chunkFlow"),!0),S(0),e.consume(P);return}return De(P)?(e.consume(P),C(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(P),k)}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 E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<c&&(!i.events[E][1].end||i.events[E][1].end.offset>c))return;const D=t.events.length;let B=D,q,T;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(q){T=t.events[B][1].end;break}q=!0}for(S(o),E=D;E<t.events.length;)t.events[E][1].end={...T},E++;kr(t.events,B+1,0,t.events.slice(D)),t.events.length=E}}function S(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 CE(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sx(e){if(e===null||mn(e)||bE(e))return 1;if(vE(e))return 2}function tp(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 df={name:"attention",resolveAll:NE,tokenize:EE};function NE(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};ix(x,-p),ix(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=Fn(h,[["enter",e[o][1],t],["exit",e[o][1],t]])),h=Fn(h,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",a,t]]),h=Fn(h,tp(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),h=Fn(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=Fn(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 EE(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=sx(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=sx(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 ix(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const RE={name:"autolink",tokenize:TE};function TE(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||uf(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):gE(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 uu={partial:!0,tokenize:PE};function PE(e,t,n){return o;function o(a){return He(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const m0={continuation:{tokenize:DE},exit:LE,name:"blockQuote",tokenize:AE};function AE(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 He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function DE(e,t,n){const o=this;return i;function i(c){return He(c)?Xe(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(m0,t,n)(c)}}function LE(e){e.exit("blockQuote")}const g0={name:"characterEscape",tokenize:IE};function IE(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 yE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const x0={name:"characterReference",tokenize:OE};function OE(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=xE,m):(e.enter("characterReferenceValue"),a=7,c=cf,m(x))}function m(x){if(x===59&&i){const w=e.exit("characterReferenceValue");return c===Tn&&!ep(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 lx={partial:!0,tokenize:_E},ax={concrete:!0,name:"codeFenced",tokenize:ME};function ME(e,t,n){const o=this,i={partial:!0,tokenize:_};let a=0,c=0,d;return p;function p(E){return h(E)}function h(E){const D=o.events[o.events.length-1];return a=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,d=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(E)}function m(E){return E===d?(c++,e.consume(E),m):c<3?n(E):(e.exit("codeFencedFenceSequence"),He(E)?Xe(e,x,"whitespace")(E):x(E))}function x(E){return E===null||De(E)?(e.exit("codeFencedFence"),o.interrupt?t(E):e.check(lx,k,M)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===null||De(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(E)):He(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,b,"whitespace")(E)):E===96&&E===d?n(E):(e.consume(E),w)}function b(E){return E===null||De(E)?x(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(E))}function N(E){return E===null||De(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(E)):E===96&&E===d?n(E):(e.consume(E),N)}function k(E){return e.attempt(i,M,C)(E)}function C(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),S}function S(E){return a>0&&He(E)?Xe(e,A,"linePrefix",a+1)(E):A(E)}function A(E){return E===null||De(E)?e.check(lx,k,M)(E):(e.enter("codeFlowValue"),P(E))}function P(E){return E===null||De(E)?(e.exit("codeFlowValue"),A(E)):(e.consume(E),P)}function M(E){return e.exit("codeFenced"),t(E)}function _(E,D,B){let q=0;return T;function T(G){return E.enter("lineEnding"),E.consume(G),E.exit("lineEnding"),I}function I(G){return E.enter("codeFencedFence"),He(G)?Xe(E,F,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):F(G)}function F(G){return G===d?(E.enter("codeFencedFenceSequence"),W(G)):B(G)}function W(G){return G===d?(q++,E.consume(G),W):q>=c?(E.exit("codeFencedFenceSequence"),He(G)?Xe(E,J,"whitespace")(G):J(G)):B(G)}function J(G){return G===null||De(G)?(E.exit("codeFencedFence"),D(G)):B(G)}}}function _E(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 Sd={name:"codeIndented",tokenize:zE},$E={partial:!0,tokenize:FE};function zE(e,t,n){const o=this;return i;function i(h){return e.enter("codeIndented"),Xe(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):De(h)?e.attempt($E,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||De(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function FE(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):Xe(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):De(c)?i(c):n(c)}}const BE={name:"codeText",previous:HE,resolve:UE,tokenize:WE};function UE(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 HE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function WE(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)):De(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||De(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 VE{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&&Ti(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),Ti(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ti(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);Ti(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ti(this.left,n.reverse())}}}function Ti(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 y0(e){const t={};let n=-1,o,i,a,c,d,p,h;const m=new VE(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,qE(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 qE(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,k=0;const C=[k];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&&(k=w+1,C.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),w=C.length;w--;){const S=d.slice(C[w],C[w+1]),A=a.pop();p.push([A,A+S.length-1]),e.splice(A,2,S)}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 GE={resolve:YE,tokenize:XE},KE={partial:!0,tokenize:QE};function YE(e){return y0(e),e}function XE(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):De(d)?e.check(KE,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 QE(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(c){if(c===null||De(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 v0(e,t,n,o,i,a,c,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(a),e.consume(S),e.exit(a),w):S===null||S===32||S===41||uf(S)?n(S):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function w(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),w(S)):S===null||S===60||De(S)?n(S):(e.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!m&&(S===null||S===41||mn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):m<h&&S===40?(e.consume(S),m++,k):S===41?(e.consume(S),m--,k):S===null||S===32||S===40||uf(S)?n(S):(e.consume(S),S===92?C:k)}function C(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function b0(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):De(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||De(b)||d++>999?(e.exit("chunkString"),m(b)):(e.consume(b),p||(p=!He(b)),b===92?w:x)}function w(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function w0(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):De(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===c||w===null||De(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 Oi(e,t){let n;return o;function o(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):He(i)?Xe(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const JE={name:"definition",tokenize:eR},ZE={partial:!0,tokenize:tR};function eR(e,t,n){const o=this;let i;return a;function a(b){return e.enter("definition"),c(b)}function c(b){return b0.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)?Oi(e,h)(b):h(b)}function h(b){return v0(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(ZE,x,x)(b)}function x(b){return He(b)?Xe(e,w,"whitespace")(b):w(b)}function w(b){return b===null||De(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function tR(e,t,n){return o;function o(d){return mn(d)?Oi(e,i)(d):n(d)}function i(d){return w0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return He(d)?Xe(e,c,"whitespace")(d):c(d)}function c(d){return d===null||De(d)?t(d):n(d)}}const nR={name:"hardBreakEscape",tokenize:rR};function rR(e,t,n){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const oR={name:"headingAtx",resolve:sR,tokenize:iR};function sR(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 iR(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||De(m)?(e.exit("atxHeading"),t(m)):He(m)?Xe(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 lR=["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"],ux=["pre","script","style","textarea"],aR={concrete:!0,name:"htmlFlow",resolveTo:dR,tokenize:fR},uR={partial:!0,tokenize:hR},cR={partial:!0,tokenize:pR};function dR(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 fR(e,t,n){const o=this;let i,a,c,d,p;return h;function h(L){return m(L)}function m(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),x}function x(L){return L===33?(e.consume(L),w):L===47?(e.consume(L),a=!0,k):L===63?(e.consume(L),i=3,o.interrupt?t:R):gr(L)?(e.consume(L),c=String.fromCharCode(L),C):n(L)}function w(L){return L===45?(e.consume(L),i=2,b):L===91?(e.consume(L),i=5,d=0,N):gr(L)?(e.consume(L),i=4,o.interrupt?t:R):n(L)}function b(L){return L===45?(e.consume(L),o.interrupt?t:R):n(L)}function N(L){const pe="CDATA[";return L===pe.charCodeAt(d++)?(e.consume(L),d===pe.length?o.interrupt?t:F:N):n(L)}function k(L){return gr(L)?(e.consume(L),c=String.fromCharCode(L),C):n(L)}function C(L){if(L===null||L===47||L===62||mn(L)){const pe=L===47,ve=c.toLowerCase();return!pe&&!a&&ux.includes(ve)?(i=1,o.interrupt?t(L):F(L)):lR.includes(c.toLowerCase())?(i=6,pe?(e.consume(L),S):o.interrupt?t(L):F(L)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(L):a?A(L):P(L))}return L===45||Tn(L)?(e.consume(L),c+=String.fromCharCode(L),C):n(L)}function S(L){return L===62?(e.consume(L),o.interrupt?t:F):n(L)}function A(L){return He(L)?(e.consume(L),A):T(L)}function P(L){return L===47?(e.consume(L),T):L===58||L===95||gr(L)?(e.consume(L),M):He(L)?(e.consume(L),P):T(L)}function M(L){return L===45||L===46||L===58||L===95||Tn(L)?(e.consume(L),M):_(L)}function _(L){return L===61?(e.consume(L),E):He(L)?(e.consume(L),_):P(L)}function E(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),p=L,D):He(L)?(e.consume(L),E):B(L)}function D(L){return L===p?(e.consume(L),p=null,q):L===null||De(L)?n(L):(e.consume(L),D)}function B(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||mn(L)?_(L):(e.consume(L),B)}function q(L){return L===47||L===62||He(L)?P(L):n(L)}function T(L){return L===62?(e.consume(L),I):n(L)}function I(L){return L===null||De(L)?F(L):He(L)?(e.consume(L),I):n(L)}function F(L){return L===45&&i===2?(e.consume(L),te):L===60&&i===1?(e.consume(L),ie):L===62&&i===4?(e.consume(L),$):L===63&&i===3?(e.consume(L),R):L===93&&i===5?(e.consume(L),se):De(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(uR,Q,W)(L)):L===null||De(L)?(e.exit("htmlFlowData"),W(L)):(e.consume(L),F)}function W(L){return e.check(cR,J,Q)(L)}function J(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),G}function G(L){return L===null||De(L)?W(L):(e.enter("htmlFlowData"),F(L))}function te(L){return L===45?(e.consume(L),R):F(L)}function ie(L){return L===47?(e.consume(L),c="",X):F(L)}function X(L){if(L===62){const pe=c.toLowerCase();return ux.includes(pe)?(e.consume(L),$):F(L)}return gr(L)&&c.length<8?(e.consume(L),c+=String.fromCharCode(L),X):F(L)}function se(L){return L===93?(e.consume(L),R):F(L)}function R(L){return L===62?(e.consume(L),$):L===45&&i===2?(e.consume(L),R):F(L)}function $(L){return L===null||De(L)?(e.exit("htmlFlowData"),Q(L)):(e.consume(L),$)}function Q(L){return e.exit("htmlFlow"),t(L)}}function pR(e,t,n){const o=this;return i;function i(c){return De(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 hR(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(uu,t,n)}}const mR={name:"htmlText",tokenize:gR};function gR(e,t,n){const o=this;let i,a,c;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),_):R===63?(e.consume(R),P):gr(R)?(e.consume(R),B):n(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),a=0,N):gr(R)?(e.consume(R),A):n(R)}function m(R){return R===45?(e.consume(R),b):n(R)}function x(R){return R===null?n(R):R===45?(e.consume(R),w):De(R)?(c=x,ie(R)):(e.consume(R),x)}function w(R){return R===45?(e.consume(R),b):x(R)}function b(R){return R===62?te(R):R===45?w(R):x(R)}function N(R){const $="CDATA[";return R===$.charCodeAt(a++)?(e.consume(R),a===$.length?k:N):n(R)}function k(R){return R===null?n(R):R===93?(e.consume(R),C):De(R)?(c=k,ie(R)):(e.consume(R),k)}function C(R){return R===93?(e.consume(R),S):k(R)}function S(R){return R===62?te(R):R===93?(e.consume(R),S):k(R)}function A(R){return R===null||R===62?te(R):De(R)?(c=A,ie(R)):(e.consume(R),A)}function P(R){return R===null?n(R):R===63?(e.consume(R),M):De(R)?(c=P,ie(R)):(e.consume(R),P)}function M(R){return R===62?te(R):P(R)}function _(R){return gr(R)?(e.consume(R),E):n(R)}function E(R){return R===45||Tn(R)?(e.consume(R),E):D(R)}function D(R){return De(R)?(c=D,ie(R)):He(R)?(e.consume(R),D):te(R)}function B(R){return R===45||Tn(R)?(e.consume(R),B):R===47||R===62||mn(R)?q(R):n(R)}function q(R){return R===47?(e.consume(R),te):R===58||R===95||gr(R)?(e.consume(R),T):De(R)?(c=q,ie(R)):He(R)?(e.consume(R),q):te(R)}function T(R){return R===45||R===46||R===58||R===95||Tn(R)?(e.consume(R),T):I(R)}function I(R){return R===61?(e.consume(R),F):De(R)?(c=I,ie(R)):He(R)?(e.consume(R),I):q(R)}function F(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,W):De(R)?(c=F,ie(R)):He(R)?(e.consume(R),F):(e.consume(R),J)}function W(R){return R===i?(e.consume(R),i=void 0,G):R===null?n(R):De(R)?(c=W,ie(R)):(e.consume(R),W)}function J(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||mn(R)?q(R):(e.consume(R),J)}function G(R){return R===47||R===62||mn(R)?q(R):n(R)}function te(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ie(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),X}function X(R){return He(R)?Xe(e,se,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):se(R)}function se(R){return e.enter("htmlTextData"),c(R)}}const np={name:"labelEnd",resolveAll:bR,resolveTo:wR,tokenize:kR},xR={tokenize:SR},yR={tokenize:jR},vR={tokenize:CR};function bR(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 wR(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=Fn(d,e.slice(a+1,a+o+3)),d=Fn(d,[["enter",m,t]]),d=Fn(d,tp(t.parser.constructs.insideSpan.null,e.slice(a+o+4,c-3),t)),d=Fn(d,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),d=Fn(d,e.slice(c+1)),d=Fn(d,[["exit",p,t]]),kr(e,a,e.length,d),e}function kR(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(xR,m,c?m:x)(w):w===91?e.attempt(yR,m,c?h:x)(w):c?m(w):x(w)}function h(w){return e.attempt(vR,m,x)(w)}function m(w){return t(w)}function x(w){return a._balanced=!0,n(w)}}function SR(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)?Oi(e,a)(x):a(x)}function a(x){return x===41?m(x):v0(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return mn(x)?Oi(e,p)(x):m(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?w0(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):m(x)}function h(x){return mn(x)?Oi(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 jR(e,t,n){const o=this;return i;function i(d){return b0.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 CR(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 NR={name:"labelStartImage",resolveAll:np.resolveAll,tokenize:ER};function ER(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 RR={name:"labelStartLink",resolveAll:np.resolveAll,tokenize:TR};function TR(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 jd={name:"lineEnding",tokenize:PR};function PR(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ia={name:"thematicBreak",tokenize:AR};function AR(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||De(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),o++,p):(e.exit("thematicBreakSequence"),He(h)?Xe(e,d,"whitespace")(h):d(h))}}const pn={continuation:{tokenize:OR},exit:_R,name:"list",tokenize:IR},DR={partial:!0,tokenize:$R},LR={partial:!0,tokenize:MR};function IR(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:cf(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(Ia,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 cf(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(uu,o.interrupt?n:m,e.attempt(DR,w,x))}function m(b){return o.containerState.initialBlankLine=!0,a++,w(b)}function x(b){return He(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 OR(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(uu,i,a);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Xe(e,t,"listItemIndent",o.containerState.size+1)(d)}function a(d){return o.containerState.furtherBlankLines||!He(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(LR,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,Xe(e,e.attempt(pn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function MR(e,t,n){const o=this;return Xe(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 _R(e){e.exit(this.containerState.type)}function $R(e,t,n){const o=this;return Xe(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!He(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const cx={name:"setextUnderline",resolveTo:zR,tokenize:FR};function zR(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 FR(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"),He(h)?Xe(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||De(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const BR={tokenize:UR};function UR(e){const t=this,n=e.attempt(uu,o,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(GE,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 HR={resolveAll:S0()},WR=k0("string"),VR=k0("text");function k0(e){return{resolveAll:S0(e==="text"?qR: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 S0(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 qR(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 GR={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:m0},KR={91:JE},YR={[-2]:Sd,[-1]:Sd,32:Sd},XR={35:oR,42:Ia,45:[cx,Ia],60:aR,61:cx,95:Ia,96:ax,126:ax},QR={38:x0,92:g0},JR={[-5]:jd,[-4]:jd,[-3]:jd,33:NR,38:x0,42:df,60:[RE,mR],91:RR,92:[nR,g0],93:np,95:df,96:BE},ZR={null:[df,HR]},eT={null:[42,95]},tT={null:[]},nT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eT,contentInitial:KR,disable:tT,document:GR,flow:XR,flowInitial:YR,insideSpan:ZR,string:QR,text:JR},Symbol.toStringTag,{value:"Module"}));function rT(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(E),consume:A,enter:P,exit:M,interrupt:D(E,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,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(I){return c=Fn(c,I),C(),c[c.length-1]!==null?[]:(B(t,0),h.events=tp(a,h.events,h),h.events)}function w(I,F){return sT(b(I),F)}function b(I){return oT(c,I)}function N(){const{_bufferIndex:I,_index:F,line:W,column:J,offset:G}=o;return{_bufferIndex:I,_index:F,line:W,column:J,offset:G}}function k(I){i[I.line]=I.column,T()}function C(){let I;for(;o._index<c.length;){const F=c[o._index];if(typeof F=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<F.length;)S(F.charCodeAt(o._bufferIndex));else S(F)}}function S(I){m=m(I)}function A(I){De(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,T()):I!==-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=I}function P(I,F){const W=F||{};return W.type=I,W.start=N(),h.events.push(["enter",W,h]),d.push(W),W}function M(I){const F=d.pop();return F.end=N(),h.events.push(["exit",F,h]),F}function _(I,F){B(I,F.from)}function E(I,F){F.restore()}function D(I,F){return W;function W(J,G,te){let ie,X,se,R;return Array.isArray(J)?Q(J):"tokenize"in J?Q([J]):$(J);function $(de){return Pe;function Pe(ke){const Te=ke!==null&&de[ke],ee=ke!==null&&de.null,Ee=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return Q(Ee)(ke)}}function Q(de){return ie=de,X=0,de.length===0?te:L(de[X])}function L(de){return Pe;function Pe(ke){return R=q(),se=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?ve():de.tokenize.call(F?Object.assign(Object.create(h),F):h,p,pe,ve)(ke)}}function pe(de){return I(se,R),G}function ve(de){return R.restore(),++X<ie.length?L(ie[X]):te}}}function B(I,F){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&kr(h.events,F,h.events.length-F,I.resolve(h.events.slice(F),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function q(){const I=N(),F=h.previous,W=h.currentConstruct,J=h.events.length,G=Array.from(d);return{from:J,restore:te};function te(){o=I,h.previous=F,h.currentConstruct=W,h.events.length=J,d=G,T()}}function T(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function oT(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 sT(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=`
368
- `;break}case-3:{c=`\r
369
- `;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 iT(e){const o={constructs:pE([nT,...(e||{}).extensions||[]]),content:i(wE),defined:[],document:i(SE),flow:i(BR),lazy:{},string:i(WR),text:i(VR)};return o;function i(a){return c;function c(d){return rT(o,a,d)}}}function lT(e){for(;!y0(e););return e}const dx=/[\0\t\n\r]/g;function aT(){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(dx.lastIndex=x,h=dx.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 uT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cT(e){return e.replace(uT,dT)}function dT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return h0(n.slice(a?2:1),a?16:10)}return ep(n)||e}const j0={}.hasOwnProperty;function fT(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),pT(n)(lT(iT(n).document().write(aT()(e,t,!0))))}function pT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Dt),autolinkProtocol:q,autolinkEmail:q,atxHeading:a(Bt),blockQuote:a(ee),characterEscape:q,characterReference:q,codeFenced:a(Ee),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Ee,c),codeText:a(je,c),codeTextData:q,data:q,codeFlowValue:q,definition:a(Qe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(yt),hardBreakEscape:a(Ut),hardBreakTrailing:a(Ut),htmlFlow:a(_t,c),htmlFlowData:q,htmlText:a(_t,c),htmlTextData:q,image:a(vn),label:c,link:a(Dt),listItem:a(Zt),listItemValue:w,listOrdered:a(pt,x),listUnordered:a(pt),paragraph:a(An),reference:L,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Bt),strong:a(vt),thematicBreak:a(lr)},exit:{atxHeading:p(),atxHeadingSequence:_,autolink:p(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:p(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:de,characterReference:Pe,codeFenced:p(C),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:T,codeIndented:p(S),codeText:p(G),codeTextData:T,data:T,definition:p(),definitionDestinationString:M,definitionLabelString:A,definitionTitleString:P,emphasis:p(),hardBreakEscape:p(F),hardBreakTrailing:p(F),htmlFlow:p(W),htmlFlowData:T,htmlText:p(J),htmlTextData:T,image:p(ie),label:se,labelText:X,lineEnding:I,link:p(te),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:pe,resourceDestinationString:R,resourceTitleString:$,resource:Q,setextHeading:p(B),setextHeadingLineSequence:D,setextHeadingText:E,strong:p(),thematicBreak:p()}};C0(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(Z){let ae={type:"root",children:[]};const be={stack:[ae],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:m,data:n},Re=[];let U=-1;for(;++U<Z.length;)if(Z[U][1].type==="listOrdered"||Z[U][1].type==="listUnordered")if(Z[U][0]==="enter")Re.push(U);else{const oe=Re.pop();U=i(Z,oe,U)}for(U=-1;++U<Z.length;){const oe=t[Z[U][0]];j0.call(oe,Z[U][1].type)&&oe[Z[U][1].type].call(Object.assign({sliceSerialize:Z[U][2].sliceSerialize},be),Z[U][1])}if(be.tokenStack.length>0){const oe=be.tokenStack[be.tokenStack.length-1];(oe[1]||fx).call(be,void 0,oe[0])}for(ae.position={start:go(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:go(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)ae=t.transforms[U](ae)||ae;return ae}function i(Z,ae,be){let Re=ae-1,U=-1,oe=!1,Se,Fe,on,ct;for(;++Re<=be;){const We=Z[Re];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?U++:U--,ct=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Se&&!ct&&!U&&!on&&(on=Re),ct=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ct=void 0}if(!U&&We[0]==="enter"&&We[1].type==="listItemPrefix"||U===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Se){let qe=Re;for(Fe=void 0;qe--;){const ht=Z[qe];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;Fe&&(Z[Fe][1].type="lineEndingBlank",oe=!0),ht[1].type="lineEnding",Fe=qe}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}on&&(!Fe||on<Fe)&&(Se._spread=!0),Se.end=Object.assign({},Fe?Z[Fe][1].start:We[1].end),Z.splice(Fe||Re,0,["exit",Se,We[2]]),Re++,be++}if(We[1].type==="listItemPrefix"){const qe={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Se=qe,Z.splice(Re,0,["enter",qe,We[2]]),Re++,be++,on=void 0,ct=!0}}}return Z[ae][1]._spread=oe,be}function a(Z,ae){return be;function be(Re){d.call(this,Z(Re),Re),ae&&ae.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(Z,ae,be){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ae,be||void 0]),Z.position={start:go(ae.start),end:void 0}}function p(Z){return ae;function ae(be){Z&&Z.call(this,be),h.call(this,be)}}function h(Z,ae){const be=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==Z.type&&(ae?ae.call(this,Z,Re[0]):(Re[1]||fx).call(this,Z,Re[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Ii({start:Z.start,end:Z.end})+"): it’s not open");be.position.end=go(Z.end)}function m(){return dE(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function w(Z){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=Z}function N(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=Z}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z.replace(/(\r?\n|\r)$/g,"")}function A(Z){const ae=this.resume(),be=this.stack[this.stack.length-1];be.label=ae,be.identifier=Cs(this.sliceSerialize(Z)).toLowerCase()}function P(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Z}function M(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Z}function _(Z){const ae=this.stack[this.stack.length-1];if(!ae.depth){const be=this.sliceSerialize(Z).length;ae.depth=be}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(Z){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function q(Z){const be=this.stack[this.stack.length-1].children;let Re=be[be.length-1];(!Re||Re.type!=="text")&&(Re=Nr(),Re.position={start:go(Z.start),end:void 0},be.push(Re)),this.stack.push(Re)}function T(Z){const ae=this.stack.pop();ae.value+=this.sliceSerialize(Z),ae.position.end=go(Z.end)}function I(Z){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ae.children[ae.children.length-1];be.position.end=go(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(q.call(this,Z),T.call(this,Z))}function F(){this.data.atHardBreak=!0}function W(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function J(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function G(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function te(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ae,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ie(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ae,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function X(Z){const ae=this.sliceSerialize(Z),be=this.stack[this.stack.length-2];be.label=cT(ae),be.identifier=Cs(ae).toLowerCase()}function se(){const Z=this.stack[this.stack.length-1],ae=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Re=Z.children;be.children=Re}else be.alt=ae}function R(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Z}function $(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Z}function Q(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function pe(Z){const ae=this.resume(),be=this.stack[this.stack.length-1];be.label=ae,be.identifier=Cs(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function ve(Z){this.data.characterReferenceType=Z.type}function de(Z){const ae=this.sliceSerialize(Z),be=this.data.characterReferenceType;let Re;be?(Re=h0(ae,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=ep(ae);const U=this.stack[this.stack.length-1];U.value+=Re}function Pe(Z){const ae=this.stack.pop();ae.position.end=go(Z.end)}function ke(Z){T.call(this,Z);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(Z)}function Te(Z){T.call(this,Z);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(Z)}function ee(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function Qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function Bt(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function _t(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function pt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Zt(Z){return{type:"listItem",spread:Z._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 C0(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?C0(e,o):hT(e,o)}}function hT(e,t){let n;for(n in t)if(j0.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 fx(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 mT(e){const t=this;t.parser=n;function n(o){return fT(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gT(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 xT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
370
- `}]}function yT(e,t){const n=t.value?t.value+`
371
- `:"",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 vT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=_s(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 kT(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 ST(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function N0(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 jT(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return N0(e,t);const i={src:_s(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 CT(e,t){const n={src:_s(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 NT(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 ET(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return N0(e,t);const i={href:_s(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 RT(e,t){const n={href:_s(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 TT(e,t,n){const o=e.all(t),i=n?PT(n):E0(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:`
372
- `}),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:`
373
- `});const h={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,h),e.applyData(t,h)}function PT(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=E0(n[o])}return t}function E0(e){const t=e.spread;return t??e.children.length>1}function AT(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 DT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function IT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OT(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=Xf(t.children[1]),p=l0(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 MT(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 _T(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const px=9,hx=32;function $T(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const a=[];for(;o;)a.push(mx(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return a.push(mx(t.slice(i),i>0,!1)),a.join("")}function mx(e,t,n){let o=0,i=e.length;if(t){let a=e.codePointAt(o);for(;a===px||a===hx;)o++,a=e.codePointAt(o)}if(n){let a=e.codePointAt(i-1);for(;a===px||a===hx;)i--,a=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function zT(e,t){const n={type:"text",value:$T(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BT={blockquote:gT,break:xT,code:yT,delete:vT,emphasis:bT,footnoteReference:wT,heading:kT,html:ST,imageReference:jT,image:CT,inlineCode:NT,linkReference:ET,link:RT,listItem:TT,list:AT,paragraph:DT,root:LT,strong:IT,table:OT,tableCell:_T,tableRow:MT,text:zT,thematicBreak:FT,toml:va,yaml:va,definition:va,footnoteDefinition:va};function va(){}const R0=-1,cu=0,Mi=1,Ha=2,rp=3,op=4,sp=5,ip=6,T0=7,P0=8,gx=typeof self=="object"?self:globalThis,UT=(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 cu:case R0:return n(c,i);case Mi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case Ha:{const d=n({},i);for(const[p,h]of c)d[o(p)]=o(h);return d}case rp:return n(new Date(c),i);case op:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case sp:{const d=n(new Map,i);for(const[p,h]of c)d.set(o(p),o(h));return d}case ip:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case T0:{const{name:d,message:p}=c;return n(new gx[d](p),i)}case P0: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 gx[a](c),i)};return o},xx=e=>UT(new Map,e)(0),xs="",{toString:HT}={},{keys:WT}=Object,Pi=e=>{const t=typeof e;if(t!=="object"||!e)return[cu,t];const n=HT.call(e).slice(8,-1);switch(n){case"Array":return[Mi,xs];case"Object":return[Ha,xs];case"Date":return[rp,xs];case"RegExp":return[op,xs];case"Map":return[sp,xs];case"Set":return[ip,xs];case"DataView":return[Mi,n]}return n.includes("Array")?[Mi,n]:n.includes("Error")?[T0,n]:[Ha,n]},ba=([e,t])=>e===cu&&(t==="function"||t==="symbol"),VT=(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]=Pi(c);switch(d){case cu:{let m=c;switch(p){case"bigint":d=P0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([R0],c)}return i([d,m],c)}case Mi:{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 Ha:{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 WT(c))(e||!ba(Pi(c[w])))&&m.push([a(w),a(c[w])]);return x}case rp:return i([d,c.toISOString()],c);case op:{const{source:m,flags:x}=c;return i([d,{source:m,flags:x}],c)}case sp:{const m=[],x=i([d,m],c);for(const[w,b]of c)(e||!(ba(Pi(w))||ba(Pi(b))))&&m.push([a(w),a(b)]);return x}case ip:{const m=[],x=i([d,m],c);for(const w of c)(e||!ba(Pi(w)))&&m.push(a(w));return x}}const{message:h}=c;return i([d,{name:p,message:h}],c)};return a},yx=(e,{json:t,lossy:n}={})=>{const o=[];return VT(!(t||n),!!t,new Map,o)(e),o},Wa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xx(yx(e,t)):structuredClone(e):(e,t)=>xx(yx(e,t));function qT(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 GT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function KT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qT,o=e.options.footnoteBackLabel||GT,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=_s(x.toLowerCase());let b=0;const N=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){N.length>0&&N.push({type:"text",value:" "});let 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 S={type:"element",tagName:"li",properties:{id:t+"fn-"+w},children:e.wrap(m,!0)};e.patch(h,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Wa(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
374
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
375
- `}]}}const A0=(function(e){if(e==null)return JT;if(typeof e=="function")return du(e);if(typeof e=="object")return Array.isArray(e)?YT(e):XT(e);if(typeof e=="string")return QT(e);throw new Error("Expected function, string, or object as test")});function YT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=A0(e[n]);return du(o);function o(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function XT(e){const t=e;return du(n);function n(o){const i=o;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function QT(e){return du(t);function t(n){return n&&n.type===e}}function du(e){return t;function t(n,o,i){return!!(ZT(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function JT(){return!0}function ZT(e){return e!==null&&typeof e=="object"&&"type"in e}const D0=[],eP=!0,vx=!1,tP="skip";function nP(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const a=A0(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=D0,N,k,C;if((!t||a(p,h,m[m.length-1]||void 0))&&(b=rP(n(p,m)),b[0]===vx))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==tP)for(k=(o?S.children.length:-1)+c,C=m.concat(S);k>-1&&k<S.children.length;){const A=S.children[k];if(N=d(A,k,C)(),N[0]===vx)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function rP(e){return Array.isArray(e)?e:typeof e=="number"?[eP,e]:e==null?D0:[e]}function L0(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),nP(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 ff={}.hasOwnProperty,oP={};function sP(e,t){const n=t||oP,o=new Map,i=new Map,a=new Map,c={...BT,...n.handlers},d={all:h,applyData:lP,definitionById:o,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:n,patch:iP,wrap:uP};return L0(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(ff.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:k,...C}=m,S=Wa(C);return S.children=d.all(m),S}return Wa(m)}return(d.options.unknownHandler||aP)(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=bx(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=bx(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function iP(e,t){e.position&&(t.position=H2(e))}function lP(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,Wa(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function aP(e,t){const n=t.data||{},o="value"in t&&!(ff.call(n,"hProperties")||ff.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 uP(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
376
- `});++o<e.length;)o&&n.push({type:"text",value:`
377
- `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
378
- `}),n}function bx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function wx(e,t){const n=sP(e,t),o=n.one(e,void 0),i=KT(n),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
379
- `},i),a}function cP(e,t){return e&&"run"in e?async function(n,o){const i=wx(n,{file:o,...t});await e.run(i,o)}:function(n,o){return wx(n,{file:o,...e||t})}}function kx(e){if(e)throw e}var Cd,Sx;function dP(){if(Sx)return Cd;Sx=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 Cd=function p(){var h,m,x,w,b,N,k=arguments[0],C=1,S=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<S;++C)if(h=arguments[C],h!=null)for(m in h)x=d(k,m),w=d(h,m),k!==w&&(A&&w&&(a(w)||(b=i(w)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&a(x)?x:{},c(k,{name:m,newValue:p(A,N,w)})):typeof w<"u"&&c(k,{name:m,newValue:w}));return k},Cd}var fP=dP();const Nd=eu(fP);function pf(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 pP(){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?hP(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 hP(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:mP,dirname:gP,extname:xP,join:yP,sep:"/"};function mP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rl(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 gP(e){if(rl(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 xP(e){rl(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 yP(...e){let t=-1,n;for(;++t<e.length;)rl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vP(n)}function vP(e){rl(e);const t=e.codePointAt(0)===47;let n=bP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bP(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 rl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wP={cwd:kP};function kP(){return"/"}function hf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SP(e){if(typeof e=="string")e=new URL(e);else if(!hf(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 jP(e)}function jP(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 Ed=["history","path","basename","stem","extname","dirname"];class I0{constructor(t){let n;t?hf(t)?n={path:t}:typeof t=="string"||CP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Ed.length;){const a=Ed[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)Ed.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(t){Td(t,"basename"),Rd(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){jx(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(Rd(t,"extname"),jx(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){hf(t)&&(t=SP(t)),Td(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){Td(t,"stem"),Rd(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 Jt(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 Rd(e,t){if(e&&e.includes(mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function Td(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function CP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NP=(function(e){const o=this.constructor.prototype,i=o[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,o),a}),EP={}.hasOwnProperty;class lp extends NP{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=pP()}copy(){const t=new lp;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(Nd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dd("data",this.frozen),this.namespace[t]=n,this):EP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dd("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=wa(t),o=this.parser||this.Parser;return Pd("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),Pd("process",this.parser||this.Parser),Ad("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,c){const d=wa(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);PP(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(),Pd("processSync",this.parser||this.Parser),Ad("processSync",this.compiler||this.Compiler),this.process(t,i),Nx("processSync","process",n),o;function i(a,c){n=!0,kx(a),o=c}}run(t,n,o){Cx(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=wa(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),Nx("runSync","run",o),i;function a(c,d){kx(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=wa(n),i=this.compiler||this.Compiler;return Ad("stringify",i),Cx(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(Dd("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=Nd(!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 k=o[w][1];pf(k)&&pf(b)&&(b=Nd(!0,k,b)),o[w]=[h,b,...N]}}}}const RP=new lp().freeze();function Pd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dd(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 Cx(e){if(!pf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wa(e){return TP(e)?e:new I0(e)}function TP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PP(e){return typeof e=="string"||AP(e)}function AP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ex=[],Rx={allowDangerousHtml:!0},LP=/^(https?|ircs?|mailto|xmpp)$/i,IP=[{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 OP(e){const t=MP(e),n=_P(e);return $P(t.runSync(t.parse(n),n),e)}function MP(e){const t=e.rehypePlugins||Ex,n=e.remarkPlugins||Ex,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rx}:Rx;return RP().use(mT).use(n).use(cP,o).use(t)}function _P(e){const t=e.children||"",n=new I0;return typeof t=="string"&&(n.value=t),n}function $P(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,a=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||zP;for(const m of IP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+DP+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),L0(e,h),K2(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 kd)if(Object.hasOwn(kd,b)&&Object.hasOwn(m.properties,b)){const N=m.properties[b],k=kd[b];(k===null||k.includes(m.tagName))&&(m.properties[b]=p(String(N||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):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 zP(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||LP.test(e.slice(0,t))?e:""}function zr({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?l.jsx("div",{className:$e("prose-syntaur max-w-none",t),children:l.jsx(OP,{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 Tx(){const{slug:e}=Pt(),t=At(),{data:n,loading:o,error:i,refetch:a}=jv(e),c=su(),{data:d}=Uf(),[p,h]=y.useState("overview"),[m,x]=y.useState("board"),[w,b]=y.useState("all"),[N,k]=y.useState("all"),[C,S]=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(),E=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(Ft,{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(we,{className:"shell-action",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Dg,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Mission"})]}),l.jsxs(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(tr,{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(tt,{label:"Assignments",value:n.progress.total}),l.jsx(tt,{label:"In Progress",value:n.progress.in_progress??0,tone:"info"}),l.jsx(tt,{label:"Review",value:n.progress.review??0,tone:"info"}),l.jsx(tt,{label:"Blocked",value:n.progress.blocked??0,tone:"warn"}),l.jsx(tt,{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(Zv,{value:p,onValueChange:h,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Le,{title:"Mission Overview",children:l.jsx(zr,{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(Le,{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=>k(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=>S(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(Vf,{value:m,onChange:D=>x(D),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:E.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(we,{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:E.map(D=>l.jsx(FP,{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:E.map(D=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-4",children:l.jsx(we,{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(Ft,{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(Le,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(y2,{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(Le,{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(Le,{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(Le,{title:"Progress Summary",children:l.jsx(Ua,{progress:n.progress,showLegend:!0})}),l.jsx(Le,{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(Le,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Dg,{className:"h-4 w-4"}),"Edit mission source"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(tr,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(Jy,{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(rv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),n.archived?l.jsxs(Le,{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 FP({missionSlug:e,assignment:t}){const n=At();return l.jsxs(we,{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(Ft,{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 BP(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 UP="DismissableLayer",mf="dismissableLayer.update",HP="dismissableLayer.pointerDownOutside",WP="dismissableLayer.focusOutside",Px,O0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ap=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:d,...p}=e,h=y.useContext(O0),[m,x]=y.useState(null),w=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),N=Qt(t,D=>x(D)),k=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(C),A=m?k.indexOf(m):-1,P=h.layersWithOutsidePointerEventsDisabled.size>0,M=A>=S,_=GP(D=>{const B=D.target,q=[...h.branches].some(T=>T.contains(B));!M||q||(i==null||i(D),c==null||c(D),D.defaultPrevented||d==null||d())},w),E=KP(D=>{const B=D.target;[...h.branches].some(T=>T.contains(B))||(a==null||a(D),c==null||c(D),D.defaultPrevented||d==null||d())},w);return BP(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&&(Px=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),Ax(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Px)}},[m,w,n,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),Ax())},[m,h]),y.useEffect(()=>{const D=()=>b({});return document.addEventListener(mf,D),()=>document.removeEventListener(mf,D)},[]),l.jsx(jt.div,{...p,ref:N,style:{pointerEvents:P?M?"auto":"none":void 0,...e.style},onFocusCapture:ot(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ot(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ot(e.onPointerDownCapture,_.onPointerDownCapture)})});ap.displayName=UP;var VP="DismissableLayerBranch",qP=y.forwardRef((e,t)=>{const n=y.useContext(O0),o=y.useRef(null),i=Qt(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})});qP.displayName=VP;function GP(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(){M0(HP,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 KP(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&&M0(WP,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 Ax(){const e=new CustomEvent(mf);document.dispatchEvent(e)}function M0(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?HN(i,a):i.dispatchEvent(a)}var Ld="focusScope.autoFocusOnMount",Id="focusScope.autoFocusOnUnmount",Dx={bubbles:!1,cancelable:!0},YP="FocusScope",_0=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=Qt(t,k=>p(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let k=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}))},S=function(P){if(document.activeElement===document.body)for(const _ of P)_.removedNodes.length>0&&xo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",C);const A=new MutationObserver(S);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",C),A.disconnect()}}},[o,d,b.paused]),y.useEffect(()=>{if(d){Ix.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Ld,Dx);d.addEventListener(Ld,h),d.dispatchEvent(S),S.defaultPrevented||(XP(tA($0(d)),{select:!0}),document.activeElement===k&&xo(d))}return()=>{d.removeEventListener(Ld,h),setTimeout(()=>{const S=new CustomEvent(Id,Dx);d.addEventListener(Id,m),d.dispatchEvent(S),S.defaultPrevented||xo(k??document.body,{select:!0}),d.removeEventListener(Id,m),Ix.remove(b)},0)}}},[d,h,m,b]);const N=y.useCallback(k=>{if(!n&&!o||b.paused)return;const C=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(C&&S){const A=k.currentTarget,[P,M]=QP(A);P&&M?!k.shiftKey&&S===M?(k.preventDefault(),n&&xo(P,{select:!0})):k.shiftKey&&S===P&&(k.preventDefault(),n&&xo(M,{select:!0})):S===A&&k.preventDefault()}},[n,o,b.paused]);return l.jsx(jt.div,{tabIndex:-1,...c,ref:w,onKeyDown:N})});_0.displayName=YP;function XP(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(xo(o,{select:t}),document.activeElement!==n)return}function QP(e){const t=$0(e),n=Lx(t,e),o=Lx(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 Lx(e,t){for(const n of e)if(!JP(n,{upTo:t}))return n}function JP(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 ZP(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&&ZP(e)&&t&&e.select()}}var Ix=eA();function eA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ox(e,t),e.unshift(t)},remove(t){var n;e=Ox(e,t),(n=e[0])==null||n.resume()}}}function Ox(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function tA(e){return e.filter(t=>t.tagName!=="A")}var nA="Portal",up=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?Rj.createPortal(l.jsx(jt.div,{...o,ref:t}),c):null});up.displayName=nA;var Od=0;function rA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mx()),document.body.insertAdjacentElement("beforeend",e[1]??Mx()),Od++,()=>{Od===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Od--}},[])}function Mx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var 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 oA(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 Oa="right-scroll-bar-position",Ma="width-before-scroll-bar",sA="with-scroll-bars-hidden",iA="--removed-body-scroll-bar-size";function Md(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lA(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 aA=typeof window<"u"?y.useLayoutEffect:y.useEffect,_x=new WeakMap;function uA(e,t){var n=lA(null,function(o){return e.forEach(function(i){return Md(i,o)})});return aA(function(){var o=_x.get(n);if(o){var i=new Set(o),a=new Set(e),c=n.current;i.forEach(function(d){a.has(d)||Md(d,null)}),a.forEach(function(d){i.has(d)||Md(d,c)})}_x.set(n,e)},[e]),n}function cA(e){return e}function dA(e,t){t===void 0&&(t=cA);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 fA(e){e===void 0&&(e={});var t=dA(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 pA(e,t){return e.useMedium(t),F0}var B0=fA(),_d=function(){},fu=y.forwardRef(function(e,t){var n=y.useRef(null),o=y.useState({onScrollCapture:_d,onWheelCapture:_d,onTouchMoveCapture:_d}),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,k=e.inert,C=e.allowPinchZoom,S=e.as,A=S===void 0?"div":S,P=e.gapMode,M=z0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=w,E=uA([n,t]),D=xr(xr({},M),i);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:B0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:a,allowPinchZoom:!!C,lockRef:n,gapMode:P}),c?y.cloneElement(y.Children.only(d),xr(xr({},D),{ref:E})):y.createElement(A,xr({},D,{className:p,ref:E}),d))});fu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fu.classNames={fullWidth:Ma,zeroRight:Oa};var hA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hA();return t&&e.setAttribute("nonce",t),e}function gA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mA())&&(gA(t,n),xA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vA=function(){var e=yA();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},U0=function(){var e=vA(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},bA={left:0,top:0,right:0,gap:0},$d=function(e){return parseInt(e||"",10)||0},wA=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)]},kA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bA;var t=wA(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])}},SA=U0(),Ns="data-scroll-locked",jA=function(e,t,n,o){var i=e.left,a=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
380
- .`.concat(sA,` {
381
- overflow: hidden `).concat(o,`;
382
- padding-right: `).concat(d,"px ").concat(o,`;
383
- }
384
- body[`).concat(Ns,`] {
385
- overflow: hidden `).concat(o,`;
386
- overscroll-behavior: contain;
387
- `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
388
- padding-left: `.concat(i,`px;
389
- padding-top: `).concat(a,`px;
390
- padding-right: `).concat(c,`px;
391
- margin-left:0;
392
- margin-top:0;
393
- margin-right: `).concat(d,"px ").concat(o,`;
394
- `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
395
- }
396
-
397
- .`).concat(Oa,` {
398
- right: `).concat(d,"px ").concat(o,`;
399
- }
400
-
401
- .`).concat(Ma,` {
402
- margin-right: `).concat(d,"px ").concat(o,`;
403
- }
404
-
405
- .`).concat(Oa," .").concat(Oa,` {
406
- right: 0 `).concat(o,`;
407
- }
408
-
409
- .`).concat(Ma," .").concat(Ma,` {
410
- margin-right: 0 `).concat(o,`;
411
- }
412
-
413
- body[`).concat(Ns,`] {
414
- `).concat(iA,": ").concat(d,`px;
415
- }
416
- `)},$x=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},CA=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())}},[])},NA=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;CA();var a=y.useMemo(function(){return kA(i)},[i]);return y.createElement(SA,{styles:jA(a,!t,i,n?"":"!important")})},gf=!1;if(typeof window<"u")try{var ka=Object.defineProperty({},"passive",{get:function(){return gf=!0,!0}});window.addEventListener("test",ka,ka),window.removeEventListener("test",ka,ka)}catch{gf=!1}var ys=gf?{passive:!1}:!1,EA=function(e){return e.tagName==="TEXTAREA"},H0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!EA(e)&&n[t]==="visible")},RA=function(e){return H0(e,"overflowY")},TA=function(e){return H0(e,"overflowX")},zx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=W0(e,o);if(i){var a=V0(e,o),c=a[1],d=a[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},PA=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},AA=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},W0=function(e,t){return e==="v"?RA(t):TA(t)},V0=function(e,t){return e==="v"?PA(t):AA(t)},DA=function(e,t){return e==="h"&&t==="rtl"?-1:1},LA=function(e,t,n,o,i){var a=DA(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=V0(e,d),N=b[0],k=b[1],C=b[2],S=k-C-a*N;(N||S)&&W0(e,d)&&(x+=S,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},Sa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fx=function(e){return[e.deltaX,e.deltaY]},Bx=function(e){return e&&"current"in e?e.current:e},IA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OA=function(e){return`
417
- .block-interactivity-`.concat(e,` {pointer-events: none;}
418
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
419
- `)},MA=0,vs=[];function _A(e){var t=y.useRef([]),n=y.useRef([0,0]),o=y.useRef(),i=y.useState(MA++)[0],a=y.useState(U0)[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 k=oA([e.lockRef.current],(e.shards||[]).map(Bx),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=y.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Sa(k),A=n.current,P="deltaX"in k?k.deltaX:A[0]-S[0],M="deltaY"in k?k.deltaY:A[1]-S[1],_,E=k.target,D=Math.abs(P)>Math.abs(M)?"h":"v";if("touches"in k&&D==="h"&&E.type==="range")return!1;var B=window.getSelection(),q=B&&B.anchorNode,T=q?q===E||q.contains(E):!1;if(T)return!1;var I=zx(D,E);if(!I)return!0;if(I?_=D:(_=D==="v"?"h":"v",I=zx(D,E)),!I)return!1;if(!o.current&&"changedTouches"in k&&(P||M)&&(o.current=_),!_)return!0;var F=o.current||_;return LA(F,C,k,F==="h"?P:M)},[]),p=y.useCallback(function(k){var C=k;if(!(!vs.length||vs[vs.length-1]!==a)){var S="deltaY"in C?Fx(C):Sa(C),A=t.current.filter(function(_){return _.name===C.type&&(_.target===C.target||C.target===_.shadowParent)&&IA(_.delta,S)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var P=(c.current.shards||[]).map(Bx).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(k,C,S,A){var P={name:k,delta:C,target:S,should:A,shadowParent:$A(S)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(M){return M!==P})},1)},[]),m=y.useCallback(function(k){n.current=Sa(k),o.current=void 0},[]),x=y.useCallback(function(k){h(k.type,Fx(k),k.target,d(k,e.lockRef.current))},[]),w=y.useCallback(function(k){h(k.type,Sa(k),k.target,d(k,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(k){return k!==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:OA(i)}):null,b?y.createElement(NA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $A(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zA=pA(B0,_A);var q0=y.forwardRef(function(e,t){return y.createElement(fu,xr({},e,{ref:t,sideCar:zA}))});q0.classNames=fu.classNames;var FA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,ja=new WeakMap,Ca={},zd=0,G0=function(e){return e&&(e.host||G0(e.parentNode))},BA=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=G0(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})},UA=function(e,t,n,o){var i=BA(t,Array.isArray(e)?e:[e]);Ca[n]||(Ca[n]=new WeakMap);var a=Ca[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",k=(bs.get(w)||0)+1,C=(a.get(w)||0)+1;bs.set(w,k),a.set(w,C),c.push(w),k===1&&N&&ja.set(w,!0),C===1&&w.setAttribute(n,"true"),N||w.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",w,S)}})};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||(ja.has(x)||x.removeAttribute(o),ja.delete(x)),b||x.removeAttribute(n)}),zd--,zd||(bs=new WeakMap,bs=new WeakMap,ja=new WeakMap,Ca={})}},HA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=FA(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),UA(o,i,n,"aria-hidden")):function(){return null}};function WA(e){const t=VA(e),n=y.forwardRef((o,i)=>{const{children:a,...c}=o,d=y.Children.toArray(a),p=d.find(GA);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 VA(e){const t=y.forwardRef((n,o)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=YA(i),d=KA(a,i.props);return i.type!==y.Fragment&&(d.ref=o?iu(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 qA=Symbol("radix.slottable");function GA(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qA}function KA(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 YA(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 pu="Dialog",[K0,Y0]=Vo(pu),[XA,ir]=K0(pu),X0=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]=lu({prop:o,defaultProp:i??!1,onChange:a,caller:pu});return l.jsx(XA,{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})};X0.displayName=pu;var Q0="DialogTrigger",J0=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(Q0,n),a=Qt(t,i.triggerRef);return l.jsx(jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fp(i.open),...o,ref:a,onClick:ot(e.onClick,i.onOpenToggle)})});J0.displayName=Q0;var cp="DialogPortal",[QA,Z0]=K0(cp,{forceMount:void 0}),eb=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=ir(cp,t);return l.jsx(QA,{scope:t,forceMount:n,children:y.Children.map(o,c=>l.jsx(qo,{present:n||a.open,children:l.jsx(up,{asChild:!0,container:i,children:c})}))})};eb.displayName=cp;var Va="DialogOverlay",tb=y.forwardRef((e,t)=>{const n=Z0(Va,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=ir(Va,e.__scopeDialog);return a.modal?l.jsx(qo,{present:o||a.open,children:l.jsx(ZA,{...i,ref:t})}):null});tb.displayName=Va;var JA=WA("DialogOverlay.RemoveScroll"),ZA=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(Va,n);return l.jsx(q0,{as:JA,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(jt.div,{"data-state":fp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ho="DialogContent",nb=y.forwardRef((e,t)=>{const n=Z0(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(e3,{...i,ref:t}):l.jsx(t3,{...i,ref:t})})});nb.displayName=Ho;var e3=y.forwardRef((e,t)=>{const n=ir(Ho,e.__scopeDialog),o=y.useRef(null),i=Qt(t,n.contentRef,o);return y.useEffect(()=>{const a=o.current;if(a)return HA(a)},[]),l.jsx(rb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ot(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:ot(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:ot(e.onFocusOutside,a=>a.preventDefault())})}),t3=y.forwardRef((e,t)=>{const n=ir(Ho,e.__scopeDialog),o=y.useRef(!1),i=y.useRef(!1);return l.jsx(rb,{...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()}})}),rb=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...c}=e,d=ir(Ho,n),p=y.useRef(null),h=Qt(t,p);return rA(),l.jsxs(l.Fragment,{children:[l.jsx(_0,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(ap,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":fp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(r3,{titleId:d.titleId}),l.jsx(s3,{contentRef:p,descriptionId:d.descriptionId})]})]})}),dp="DialogTitle",ob=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(dp,n);return l.jsx(jt.h2,{id:i.titleId,...o,ref:t})});ob.displayName=dp;var sb="DialogDescription",ib=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(sb,n);return l.jsx(jt.p,{id:i.descriptionId,...o,ref:t})});ib.displayName=sb;var lb="DialogClose",ab=y.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=ir(lb,n);return l.jsx(jt.button,{type:"button",...o,ref:t,onClick:ot(e.onClick,()=>i.onOpenChange(!1))})});ab.displayName=lb;function fp(e){return e?"open":"closed"}var ub="DialogTitleWarning",[n3,cb]=NN(ub,{contentName:Ho,titleName:dp,docsSlug:"dialog"}),r3=({titleId:e})=>{const t=cb(ub),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
420
-
421
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
422
-
423
- 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},o3="DialogDescriptionWarning",s3=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cb(o3).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},db=X0,i3=J0,fb=eb,pp=tb,hp=nb,mp=ob,gp=ib,pb=ab;const l3=db,a3=fb,hb=y.forwardRef(({className:e,...t},n)=>l.jsx(pp,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));hb.displayName=pp.displayName;const mb=y.forwardRef(({className:e,children:t,...n},o)=>l.jsxs(a3,{children:[l.jsx(hb,{}),l.jsx(hp,{ref:o,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));mb.displayName=hp.displayName;function u3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function c3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const gb=y.forwardRef(({className:e,...t},n)=>l.jsx(mp,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));gb.displayName=mp.displayName;const xb=y.forwardRef(({className:e,...t},n)=>l.jsx(gp,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));xb.displayName=gp.displayName;function yb({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(l3,{open:e,onOpenChange:w=>o?void 0:a(w),children:l.jsx(mb,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:w=>{w.preventDefault(),i(x)},children:[l.jsxs(u3,{children:[l.jsx(gb,{children:h}),l.jsx(xb,{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(c3,{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})]})]})})})}var d3=Symbol("radix.slottable");function f3(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=d3,t}var vb="AlertDialog",[p3]=Vo(vb,[Y0]),Wr=Y0(),bb=e=>{const{__scopeAlertDialog:t,...n}=e,o=Wr(t);return l.jsx(db,{...o,...n,modal:!0})};bb.displayName=vb;var h3="AlertDialogTrigger",m3=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(i3,{...i,...o,ref:t})});m3.displayName=h3;var g3="AlertDialogPortal",wb=e=>{const{__scopeAlertDialog:t,...n}=e,o=Wr(t);return l.jsx(fb,{...o,...n})};wb.displayName=g3;var x3="AlertDialogOverlay",kb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(pp,{...i,...o,ref:t})});kb.displayName=x3;var Es="AlertDialogContent",[y3,v3]=p3(Es),b3=f3("AlertDialogContent"),Sb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,a=Wr(n),c=y.useRef(null),d=Qt(t,c),p=y.useRef(null);return l.jsx(n3,{contentName:Es,titleName:jb,docsSlug:"alert-dialog",children:l.jsx(y3,{scope:n,cancelRef:p,children:l.jsxs(hp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:ot(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(b3,{children:o}),l.jsx(k3,{contentRef:c})]})})})});Sb.displayName=Es;var jb="AlertDialogTitle",Cb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(mp,{...i,...o,ref:t})});Cb.displayName=jb;var Nb="AlertDialogDescription",Eb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(gp,{...i,...o,ref:t})});Eb.displayName=Nb;var w3="AlertDialogAction",Rb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Wr(n);return l.jsx(pb,{...i,...o,ref:t})});Rb.displayName=w3;var Tb="AlertDialogCancel",Pb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=v3(Tb,n),a=Wr(n),c=Qt(t,i);return l.jsx(pb,{...a,...o,ref:c})});Pb.displayName=Tb;var k3=({contentRef:e})=>{const t=`\`${Es}\` requires a description for the component to be accessible for screen reader users.
424
-
425
- You can add a description to the \`${Es}\` by passing a \`${Nb}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
426
-
427
- 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.
428
-
429
- 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},S3=bb,j3=wb,Ab=kb,Db=Sb,Lb=Rb,Ib=Pb,Ob=Cb,Mb=Eb;const C3=S3,N3=j3,_b=y.forwardRef(({className:e,...t},n)=>l.jsx(Ab,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));_b.displayName=Ab.displayName;const $b=y.forwardRef(({className:e,...t},n)=>l.jsxs(N3,{children:[l.jsx(_b,{}),l.jsx(Db,{ref:n,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));$b.displayName=Db.displayName;function E3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function R3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const zb=y.forwardRef(({className:e,...t},n)=>l.jsx(Ob,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));zb.displayName=Ob.displayName;const Fb=y.forwardRef(({className:e,...t},n)=>l.jsx(Mb,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));Fb.displayName=Mb.displayName;const Bb=y.forwardRef(({className:e,...t},n)=>l.jsx(Lb,{ref:n,className:$e(e),...t}));Bb.displayName=Lb.displayName;const Ub=y.forwardRef(({className:e,...t},n)=>l.jsx(Ib,{ref:n,className:$e(e),...t}));Ub.displayName=Ib.displayName;function Hb({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:a=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return l.jsx(C3,{open:e,onOpenChange:h=>a?void 0:p(h),children:l.jsxs($b,{children:[l.jsxs(E3,{children:[l.jsx(zb,{children:t}),l.jsx(Fb,{children:n})]}),l.jsxs(R3,{children:[l.jsx(Ub,{disabled:a,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),l.jsx(Bb,{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})]})]})})}async function Wb(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}async function T3(e,t){const n=await fetch(`/api/missions/${e}/assignments/${t}`,{method:"DELETE"}),o=await n.json().catch(()=>null);if(!n.ok)throw new Error((o==null?void 0:o.error)||`HTTP ${n.status}`)}function qb(e){return e.requiresReason||e.command==="block"}function P3(e){const t=e.split(`
430
- `),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(`
431
- `).replace(/\n{3,}/g,`
432
-
433
- `).trim();return{acceptanceCriteria:i,summaryBody:a}}function A3({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(tv,{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(Wi,{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(Jd,{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(Le,{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(we,{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(Ft,{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(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function D3({links:e}){const t=At();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return l.jsx(Le,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:l.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>l.jsxs(we,{to:`${t}/missions/${i.missionSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(Dj,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ft,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>l.jsxs(we,{to:`${t}/missions/${i.missionSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(Qy,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ft,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function Ux(){var pe,ve,de,Pe,ke,Te;const{slug:e,aslug:t}=Pt(),n=Hn(),o=At(),[i,a]=If(),[c,d]=y.useState(null),[p,h]=y.useState(null),[m,x]=y.useState(null),[w,b]=y.useState(null),[N,k]=y.useState(null),[C,S]=y.useState(!1),[A,P]=y.useState(!1),M=i.get("tab")??"summary",_=su(),{data:E,loading:D,error:B,refetch:q}=GC(e,t),{data:T}=jv(e),{data:I}=Nv(),{data:F}=YC(e,t),W=y.useMemo(()=>{if(!E||!T)return[];const ee=new Map(T.assignments.map(Ee=>[Ee.slug,Ee]));return E.dependsOn.map(Ee=>{const je=ee.get(Ee);return{slug:Ee,title:(je==null?void 0:je.title)??Ee,status:(je==null?void 0:je.status)??"pending",priority:(je==null?void 0:je.priority)??"medium",assignee:(je==null?void 0:je.assignee)??null}})},[E,T]),J=W.filter(ee=>ee.status!=="completed"&&ee.status!=="review");if(D)return l.jsx(kt,{label:"Loading assignment workspace…"});if(B||!E||!e||!t)return l.jsx(St,{error:B||"Assignment not found."});const G=e,te=t,ie=P3(E.body),X=[];if(I!=null&&I.sessions)for(const ee of I.sessions)for(const Ee of ee.windows)for(const je of Ee.panes)((pe=je.assignment)==null?void 0:pe.mission)===e&&((ve=je.assignment)==null?void 0:ve.slug)===t&&X.push({sessionName:ee.name,command:je.command,urls:je.urls});async function se(ee){d(null);try{await Vb(G,te,ee),q()}catch(Ee){d(Ee.message)}}async function R(){P(!0);try{await T3(G,te),n(`${o}/missions/${G}`)}catch(ee){d(ee.message),P(!1),S(!1)}}async function $(ee,Ee){d(null),h(ee.command);try{return await Wb(G,te,ee,Ee),q(),!0}catch(je){return d(je.message),!1}finally{h(null)}}function Q(ee){if(qb(ee)){x(ee);return}$(ee)}async function L(ee,Ee){b(null),k(ee);try{const je=await fetch(`/api/missions/${G}/assignments/${te}/acceptance-criteria/${ee}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:Ee})}),Qe=await je.json();if(!je.ok)throw new Error(Qe.error||`HTTP ${je.status}`);q()}catch(je){b(je.message)}finally{k(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(Ft,{status:E.status}),l.jsx(we,{className:"shell-action",to:`${o}/missions/${e}`,children:"Mission"}),l.jsxs(we,{className:"shell-action",to:`${o}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Ag,{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(E.updated)]})]}),l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[(E.availableTransitions??[]).map(ee=>l.jsx("button",{type:"button",title:ee.warning||ee.disabledReason||ee.description,disabled:ee.disabled||p===ee.command,onClick:()=>Q(ee),className:`shell-action disabled:cursor-not-allowed disabled:opacity-50 ${ee.warning?"border-amber-300 dark:border-amber-700":""}`,children:l.jsx("span",{children:p===ee.command?"Working…":ee.label})},ee.command)),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm text-muted-foreground",value:"",onChange:ee=>{ee.target.value&&se(ee.target.value)},title:"Override assignment status directly",children:[l.jsx("option",{value:"",children:"Override Status…"}),_.statuses.map(ee=>l.jsx("option",{value:ee.id,children:ee.label},ee.id))]})]}),c?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:c}):null,E.blockedReason?l.jsxs("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:[l.jsx("strong",{children:"Blocked reason:"})," ",E.blockedReason]}):null,l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[l.jsx(zo,{label:`Priority ${E.priority}`}),l.jsx(zo,{label:E.assignee?`Assignee ${E.assignee}`:"Unassigned"}),l.jsx(zo,{label:`${E.dependsOn.length} dependencies`,variant:J.length>0?"warning":W.length>0?"success":"default"}),l.jsx(zo,{label:E.plan?`Plan ${E.plan.status}`:"No plan"}),l.jsx(zo,{label:`${((de=E.handoff)==null?void 0:de.handoffCount)??0} handoffs`}),l.jsx(zo,{label:`${((Pe=E.decisionRecord)==null?void 0:Pe.decisionCount)??0} decisions`}),l.jsx(zo,{label:L3(E.updated)?"Stale":"Fresh"})]})]}),W.length>0&&l.jsx(A3,{missionSlug:e,dependencies:W,blockedReason:E.blockedReason}),E.enrichedLinks&&E.enrichedLinks.length>0&&l.jsx(D3,{links:E.enrichedLinks}),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(Zv,{value:M,onValueChange:ee=>a({tab:ee}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[ie.acceptanceCriteria.length>0?l.jsx(Le,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:l.jsxs("div",{className:"space-y-3",children:[w?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:w}):null,ie.acceptanceCriteria.map((ee,Ee)=>{const je=N!==null;return l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[l.jsx("input",{type:"checkbox",checked:ee.checked,disabled:je,onChange:Qe=>L(Ee,Qe.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),l.jsx("span",{className:`text-sm leading-6 ${ee.checked?"text-muted-foreground line-through":"text-foreground"}`,children:ee.text})]},`${Ee}-${ee.text}`)})]})}):null,l.jsx(Le,{title:"Assignment Summary",children:l.jsx(zr,{content:ie.summaryBody,emptyState:ie.acceptanceCriteria.length>0?"No additional summary markdown beyond the acceptance criteria.":"This assignment does not have summary markdown yet."})}),l.jsx(Le,{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:E.handoff?Hx(E.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:E.decisionRecord?Hx(E.decisionRecord.body):"No decision entries yet."})]})]})})]})},{value:"plan",label:"Plan",count:E.plan?1:0,content:E.plan?l.jsx("div",{className:"space-y-5",children:l.jsxs(Le,{title:"Plan",actions:l.jsxs(we,{className:"shell-action",to:`${o}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Plan"})]}),children:[l.jsx("div",{className:"mb-4",children:l.jsx(Ft,{status:E.plan.status})}),l.jsx(zr,{content:E.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:E.scratchpad?1:0,content:E.scratchpad?l.jsx(Le,{title:"Scratchpad",actions:l.jsxs(we,{className:"shell-action",to:`${o}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Scratchpad"})]}),children:l.jsx(zr,{content:E.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:((ke=E.handoff)==null?void 0:ke.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.handoff?l.jsx(Le,{children:l.jsx(zr,{content:E.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:((Te=E.decisionRecord)==null?void 0:Te.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.decisionRecord?l.jsx(Le,{children:l.jsx(zr,{content:E.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(Le,{title:"Metadata",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"ID",value:E.id,copyable:!0}),l.jsx(hr,{label:"Priority",value:E.priority}),l.jsx(hr,{label:"Assignee",value:E.assignee??"Unassigned"}),l.jsx(hr,{label:"Created",value:Rn(E.created)}),l.jsx(hr,{label:"Updated",value:Rn(E.updated)}),l.jsx(hr,{label:"Status",value:E.status})]})}),l.jsx(Le,{title:"Workspace Info",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"Repository",value:E.workspace.repository??"—",copyable:!0}),l.jsx(hr,{label:"Worktree",value:E.workspace.worktreePath??"—",copyable:!0}),l.jsx(hr,{label:"Branch",value:E.workspace.branch??"—",copyable:!0}),l.jsx(hr,{label:"Parent branch",value:E.workspace.parentBranch??"—",copyable:!0})]})}),X.length>0&&l.jsx(Le,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:X.map((ee,Ee)=>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:ee.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:ee.sessionName}),ee.urls.map(je=>l.jsxs("a",{href:je,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-teal-600 hover:underline dark:text-teal-400",children:[je.replace("http://localhost:",":"),l.jsx(nv,{className:"h-2.5 w-2.5"})]},je))]},Ee))})}),F&&F.sessions.length>0&&l.jsx(Le,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:F.sessions.map(ee=>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(ru,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:ee.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:ee.sessionId,children:[ee.sessionId.slice(0,8),l.jsx(bo,{value:ee.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Ft,{status:ee.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Rn(ee.started)})]})]},ee.sessionId))})}),l.jsx(Le,{title:"Edit Actions",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${o}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Ag,{className:"h-4 w-4"}),"Edit assignment source"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${o}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(Zj,{className:"h-4 w-4"}),"Edit plan"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${o}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),"Edit scratchpad"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${o}/missions/${e}/assignments/${t}/handoff/edit`,children:[l.jsx(Fa,{className:"h-4 w-4"}),"Append handoff"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${o}/missions/${e}/assignments/${t}/decision-record/edit`,children:[l.jsx(Uj,{className:"h-4 w-4"}),"Append decision"]}),l.jsx("hr",{className:"border-border/40"}),l.jsxs("button",{type:"button",onClick:()=>S(!0),className:"flex items-center gap-2 text-destructive hover:underline",children:[l.jsx(Is,{className:"h-4 w-4"}),"Delete assignment"]})]})}),l.jsx(Le,{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(we,{className:"inline-flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(Jy,{className:"h-4 w-4"}),"Open the full status guide"]})]})})]})]}),l.jsx(yb,{open:m!==null,action:m,assignmentTitle:E.title,loading:p===(m==null?void 0:m.command),onOpenChange:ee=>{ee||x(null)},onConfirm:async ee=>{if(!m)return;await $(m,ee)&&x(null)}}),l.jsx(Hb,{open:C,title:"Delete assignment?",description:`This will permanently delete "${E.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:A,onOpenChange:ee=>{ee||S(!1)},onConfirm:R})]})}function zo({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 Hx(e){return e.replace(/^#+\s+/gm,"").trim().split(`
434
- `).find(n=>n.trim())??"No detail recorded yet."}function L3(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}const I3=["table","list","kanban"],Wx={critical:0,high:1,medium:2,low:3};function Vx(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function O3(e,t){return e.toString()===t.toString()}function qx(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function M3(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=(Wx[i.priority]??99)-(Wx[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 Gx(){const{workspace:e}=Pt(),t=At(),{data:n,loading:o,error:i,refetch:a}=VC(),c=su(),[d,p]=If(),h=y.useMemo(()=>vN(c.order),[c]),m=y.useMemo(()=>{const U={};for(const oe of h)U[oe]=mN(c,oe);return U},[h,c]),x=y.useMemo(()=>h.map(U=>({id:U,title:m[U]??U,description:Lv(U)})),[h,m]),w=y.useMemo(()=>new Set(["all",...h]),[h]),b=d.get("view"),N=d.get("status"),k=d.get("stale"),C=b&&I3.includes(b)?b:"kanban";function S(U){return!U||!w.has(U)?"all":U}const A=y.useCallback(U=>{p(oe=>{const Se=new URLSearchParams(oe);return U==="kanban"?Se.delete("view"):Se.set("view",U),Se})},[p]),[P,M]=y.useState(""),[_,E]=y.useState(()=>S(N)),[D,B]=y.useState("all"),[q,T]=y.useState("all"),[I,F]=y.useState("all"),[W,J]=y.useState(()=>Vx(k)),[G,te]=y.useState("updated"),[ie,X]=y.useState("desc"),[se,R]=y.useState(()=>new Set(h)),[$,Q]=y.useState([]),[L,pe]=y.useState(null),[ve,de]=y.useState(null),[Pe,ke]=y.useState(null),[Te,ee]=y.useState(null),[Ee,je]=y.useState(null);y.useEffect(()=>{Q((n==null?void 0:n.assignments)??[])},[n]),y.useEffect(()=>{const U=S(N);U!==_&&E(U);const oe=Vx(k);oe!==W&&J(oe)},[W,k,_,N]),y.useEffect(()=>{p(U=>{const oe=new URLSearchParams(U);return _==="all"?oe.delete("status"):oe.set("status",_),W==="all"?oe.delete("stale"):W==="stale"?oe.set("stale","1"):oe.set("stale","0"),O3(U,oe)?U:oe})},[W,p,_]);const Qe=y.useMemo(()=>Array.from(new Set($.map(U=>U.status))).sort(),[$]),yt=y.useMemo(()=>Array.from(new Set($.map(U=>U.priority))).sort(),[$]),Bt=y.useMemo(()=>Array.from(new Set($.map(U=>U.assignee??"__unassigned__"))).sort(),[$]),Ut=y.useMemo(()=>Array.from(new Map($.map(U=>[U.missionSlug,U.missionTitle]))).sort(([,U],[,oe])=>U.localeCompare(oe)),[$]),_t=y.useMemo(()=>$.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"&&!qx(U.updated)||W==="fresh"&&qx(U.updated)||q!=="all"&&(U.assignee??"__unassigned__")!==q||I!=="all"&&U.missionSlug!==I)return!1;const oe=P.trim().toLowerCase();return!(oe&&!`${U.title} ${U.slug} ${U.missionTitle} ${U.missionSlug}`.toLowerCase().includes(oe))}),[W,$,P,_,D,q,I,e]),vn=y.useMemo(()=>M3(_t,G,ie),[_t,G,ie]);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 Dt({item:U,toColumnId:oe,action:Se,reason:Fe}){pe(null),de(Cn(U));const on=$;Q(ct=>ct.map(We=>Cn(We)===Cn(U)?{...We,status:oe,blockedReason:oe==="blocked"?Fe??We.blockedReason:null}:We));try{const ct=Se?await Wb(U.missionSlug,U.slug,Se,Fe):await Vb(U.missionSlug,U.slug,oe);return Q(We=>We.map(qe=>Cn(qe)===Cn(U)?{...qe,status:ct.status,blockedReason:ct.blockedReason,availableTransitions:ct.availableTransitions,updated:ct.updated}:qe)),a(),!0}catch(ct){return Q(on),pe(ct.message),!1}finally{de(null)}}async function pt({item:U,toColumnId:oe}){if(U.status===oe)return;const Se=Ai(U,oe);if(Se!=null&&Se.disabled){pe(Se.disabledReason||`Cannot move this assignment to ${oe}.`);return}if(Se&&qb(Se)){je({item:U,toColumnId:oe,action:Se});return}await Dt({item:U,toColumnId:oe,action:Se})}function Zt(U){R(oe=>{const Se=new Set(oe);return Se.has(U)?Se.delete(U):Se.add(U),Se})}function An(U){G===U?X(oe=>oe==="asc"?"desc":"asc"):(te(U),X("asc"))}const vt=Pe?$.find(U=>Cn(U)===Pe)??null:null;function Nr(U,oe){U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",oe),ke(oe)}function lr(){ke(null),ee(null)}function Z(U,oe){if(!vt)return;const Se=Ai(vt,oe);vt.status===oe||Se!=null&&Se.disabled||(U.preventDefault(),U.dataTransfer.dropEffect="move",ee(oe))}function ae(U,oe){Te===oe&&!U.currentTarget.contains(U.relatedTarget)&&ee(null)}function be(U,oe){if(U.preventDefault(),!vt||vt.status===oe){lr();return}lr(),pt({item:vt,toColumnId:oe})}function Re({field:U,children:oe}){const Se=G===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:[oe,Se?ie==="asc"?l.jsx(ev,{className:"h-3 w-3"}):l.jsx(Wi,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Hf,{children:[l.jsx(Wf,{value:P,onChange:M,placeholder:"Search assignments or missions"}),l.jsxs("select",{value:_,onChange:U=>E(S(U.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),Qe.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=>T(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),Bt.map(U=>l.jsx("option",{value:U,children:U==="__unassigned__"?"Unassigned":U},U))]}),l.jsxs("select",{value:I,onChange:U=>F(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All missions"}),Ut.map(([U,oe])=>l.jsx("option",{value:U,children:oe},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(Vf,{value:C,onChange:U=>A(U),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),L?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:L}):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(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions`,children:[l.jsx(_f,{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(Le,{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(Re,{field:"title",children:"Assignment"}),l.jsx(Re,{field:"status",children:"Status"}),l.jsx(Re,{field:"priority",children:"Priority"}),l.jsx(Re,{field:"assignee",children:"Assignee"}),l.jsx(Re,{field:"dependencies",children:"Dependencies"}),l.jsx(Re,{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(we,{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:ve===Cn(U),onChange:oe=>pt({item:U,toColumnId:oe.target.value}),className:$e("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(Ba[U.status]??Ba.pending).className,ve===Cn(U)&&"animate-pulse opacity-60"),children:h.map(oe=>{const Se=U.status===oe?void 0:Ai(U,oe),Fe=(Se==null?void 0:Se.disabled)??!1;return l.jsx("option",{value:oe,disabled:Fe,title:Fe?(Se==null?void 0:Se.disabledReason)??void 0:void 0,children:m[oe]},oe)})})}),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 We;const oe=_t.filter(qe=>qe.status===U);if(oe.length===0&&!vt)return null;const Se=se.has(U),Fe=vt?vt.status!==U&&!((We=Ai(vt,U))!=null&&We.disabled):!1,on=vt?vt.status!==U&&!Fe:!1,ct=Te===U;return l.jsxs("div",{className:$e("rounded-lg border border-border/60 bg-card/90 transition",ct&&Fe&&"ring-2 ring-ring/30",on&&"border-dashed opacity-65"),onDragOver:qe=>Z(qe,U),onDragLeave:qe=>ae(qe,U),onDrop:qe=>be(qe,U),children:[l.jsxs("button",{type:"button",onClick:()=>Zt(U),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx(Wi,{className:`h-4 w-4 text-muted-foreground transition-transform ${Se?"":"-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:oe.length})]}),Se&&oe.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:oe.map(qe=>{const ht=Cn(qe),qr=Pe===ht;return l.jsx("div",{draggable:!0,onDragStart:Co=>Nr(Co,ht),onDragEnd:lr,className:$e("cursor-grab transition active:cursor-grabbing",qr&&"scale-[0.98] opacity-50"),children:l.jsx(Kx,{assignment:qe,dragging:qr,transitioning:ve===ht})},ht)})})]},U)})}):l.jsx(Iv,{columns:x,items:_t,getItemId:Cn,getColumnId:U=>U.status,canDrop:({item:U,fromColumnId:oe,toColumnId:Se})=>{if(oe===Se)return{allowed:!0};const Fe=Ai(U,Se);return Fe!=null&&Fe.disabled?{allowed:!1,reason:Fe.disabledReason||Fe.description}:{allowed:!0,reason:Fe?Fe.warning||Fe.description:`Move to ${Se} (direct status change).`}},onMove:({item:U,toColumnId:oe})=>pt({item:U,toColumnId:oe}),emptyMessage:U=>`No ${U.title.toLowerCase()} assignments.`,renderCard:(U,{dragging:oe})=>l.jsx(Kx,{assignment:U,dragging:oe,transitioning:ve===Cn(U)})}),l.jsx(yb,{open:Ee!==null,action:(Ee==null?void 0:Ee.action)??null,assignmentTitle:(Ee==null?void 0:Ee.item.title)??"Assignment",loading:ve===(Ee?Cn(Ee.item):null),onOpenChange:U=>{U||je(null)},onConfirm:async U=>{if(!Ee)return;const oe=Ee;await Dt({item:oe.item,toColumnId:oe.toColumnId,action:oe.action,reason:U})&&je(null)}})]})}function Kx({assignment:e,dragging:t,transitioning:n}){var i;const o=At();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(we,{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(Ft,{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 Ai(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(`
435
- `),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 ol(e){return`---
436
- ${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
437
- `)}
438
- ---
439
-
440
- ${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 _3(e,t){return Rt(e,t)==="true"}function _i(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 $3(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}: ${$3(n)}`])}function $i(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 zi(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function hu(e){const t=jr(e);return{title:Rt(t,"title"),slug:Rt(t,"slug"),workspace:Rt(t,"workspace"),archived:_3(t,"archived"),archivedAt:Rt(t,"archivedAt"),archivedReason:Rt(t,"archivedReason"),tags:_i(t,"tags").join(", "),body:t.body}}function z3(e,t){const n=jr(e),o={...hu(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),$i(n,"tags",zi(o.tags)),n.body=o.body,ol(n)}function mu(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:_i(t,"dependsOn").join(", "),links:_i(t,"links").join(", "),blockedReason:Rt(t,"blockedReason"),tags:_i(t,"tags").join(", "),body:t.body}}function F3(e,t){const n=jr(e),o={...mu(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),$i(n,"dependsOn",zi(o.dependsOn)),$i(n,"links",zi(o.links)),Tt(n,"blockedReason",o.blockedReason||null),$i(n,"tags",zi(o.tags)),n.body=o.body,ol(n)}function gu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),status:Rt(t,"status"),body:t.body}}function B3(e,t){const n=jr(e),o={...gu(e),...t};return Tt(n,"assignment",o.assignment),Tt(n,"status",o.status),n.body=o.body,ol(n)}function xu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),body:t.body}}function U3(e,t){const n=jr(e),o={...xu(e),...t};return Tt(n,"assignment",o.assignment),n.body=o.body,ol(n)}function yu(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:_i(t,"tags").join(", "),body:t.body}}function H3(e,t){const n=jr(e),o={...yu(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),$i(n,"tags",zi(o.tags)),n.body=o.body,ol(n)}function rt(e,t,n){switch(e){case"mission":return z3(t,n);case"assignment":return F3(t,n);case"plan":return B3(t,n);case"scratchpad":return U3(t,n);case"playbook":return H3(t,n);default:return t}}function $r(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 sl({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,k]=y.useState(!1),[C,S]=y.useState("edit");y.useEffect(()=>{b(e)},[e]);const A=G3(t,w),P=w!==e,M=q3(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(Qy,{className:"h-4 w-4"}),l.jsx("span",{children:"Back"})]}),l.jsxs("button",{type:"button",onClick:()=>k(E=>!E),className:"shell-action",children:[l.jsx(_j,{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(lv,{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(E=>l.jsx("li",{children:E},E))})}):null]}),l.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${C==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${C==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(Pg,{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:E=>b(E.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(W3,{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(Pg,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(zr,{content:M,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function W3({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="mission"){const a=hu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Mission title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===$r(a.title)||!a.slug.trim())&&(p.slug=$r(d)),n(rt(e,t,p))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(rt(e,t,{slug:$r(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(Ke,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:c=>n(rt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(V3,{value:a.workspace,onChange:c=>n(rt(e,t,{workspace:c}))})]}),l.jsx(Ke,{label:"Mission body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=mu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===$r(a.title)||!a.slug.trim())&&(p.slug=$r(d)),n(rt(e,t,p))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(rt(e,t,{slug:$r(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(Ke,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:c=>n(rt(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(Ke,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:c=>n(rt(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(Ke,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:c=>n(rt(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Ke,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:c=>n(rt(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Ke,{label:"Links",className:"md:col-span-2",children:l.jsx("input",{value:a.links,onChange:c=>n(rt(e,t,{links:c.target.value})),placeholder:"Comma-separated: missionSlug/assignmentSlug",className:"editor-input"})}),l.jsx(Ke,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:c=>n(rt(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Ke,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:c=>n(rt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Ke,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=gu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Ke,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:c=>n(rt(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(Ke,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=xu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(Di,{children:l.jsx(Ke,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Ke,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=yu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const c=a.target.value,d={name:c};o&&(i.slug===$r(i.name)||!i.slug.trim())&&(d.slug=$r(c)),n(rt(e,t,d))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!o,onChange:a=>n(rt(e,t,{slug:$r(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(Ke,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(rt(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Ke,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(rt(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Ke,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(rt(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Ke,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(rt(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Di({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Ke({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 V3({value:e,onChange:t}){const{data:n}=Uf(),o=(n==null?void 0:n.workspaces)??[];return l.jsx(Ke,{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 q3(e,t){switch(e){case"mission":return hu(t).body;case"assignment":return mu(t).body;case"plan":return gu(t).body;case"scratchpad":return xu(t).body;case"playbook":return yu(t).body}}function G3(e,t){switch(e){case"mission":{const n=hu(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=mu(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 gu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return xu(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=yu(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 Yx(){const e=Hn(),{workspace:t}=Pt(),n=At(),[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
441
- 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(sl,{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 Xx(){const{slug:e}=Pt(),t=At(),n=Hn(),[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(sl,{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 vu({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:a,helpTitle:c,helpBody:d}){const p=Hn(),{data:h,loading:m,error:x}=Cv(e),[w,b]=y.useState(!1),[N,k]=y.useState(null);async function C(S){b(!0),k(null);try{const A=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),P=await A.json();if(!A.ok){k(P.error||`HTTP ${A.status}`),b(!1);return}p(n)}catch(A){k(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(sl,{initialContent:h.content,documentType:a,onSave:C,saving:w,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Qx(){const{slug:e}=Pt(),t=At(),n=e??"";return l.jsx(vu,{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 Jx(){const{slug:e,aslug:t}=Pt(),n=At(),o=e??"",i=t??"";return l.jsx(vu,{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 Zx(){const{slug:e,aslug:t}=Pt(),n=At(),o=e??"",i=t??"";return l.jsx(vu,{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 ey(){const{slug:e,aslug:t}=Pt(),n=At(),o=e??"",i=t??"";return l.jsx(vu,{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 Gb({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:a,helpBody:c}){const d=Hn(),{data:p,loading:h,error:m}=Cv(e),[x,w]=y.useState(""),[b,N]=y.useState(""),[k,C]=y.useState(!1),[S,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(Le,{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})]}),S?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:S}):null,l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),l.jsx("button",{type:"button",onClick:P,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),l.jsx(Le,{title:"Current Document",children:l.jsx(zr,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function ty(){const{slug:e,aslug:t}=Pt(),n=At(),o=e??"",i=t??"";return l.jsx(Gb,{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 ny(){const{slug:e,aslug:t}=Pt(),n=At(),o=e??"",i=t??"";return l.jsx(Gb,{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 ry(){const{workspace:e}=Pt(),{data:t}=Bf(),{data:n,loading:o,error:i,refetch:a}=Nv(),[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 S=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&&S.has(M.assignment.mission))))})();async function b(S){if(S.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 k(S){await fetch(`/api/servers/${encodeURIComponent(S)}`,{method:"DELETE"}),a()}async function C(S){await fetch(`/api/servers/${encodeURIComponent(S)}/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:S=>h(S.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(tr,{className:"h-3.5 w-3.5"}),"Track Session"]}),l.jsxs("button",{className:"shell-action",onClick:N,disabled:m,children:[l.jsx(iv,{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(S=>l.jsx(K3,{session:S,onRefresh:()=>C(S.name),onRemove:()=>k(S.name),onRefetch:a},S.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(oC,{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 K3({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(iv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:l.jsx(Is,{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(Y3,{pane:a,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${a.index}`))})]},i.index))}),!e.alive&&l.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(eC,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function Y3({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=At(),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(rv,{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(nv,{className:"h-2.5 w-2.5"})]},c))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(we,{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(Vj,{className:"h-2.5 w-2.5"}),e.assignment.title]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function oy(){const{workspace:e}=Pt(),{data:t}=Bf(),{data:n,loading:o,error:i}=KC(),[a,c]=y.useState(""),[d,p]=y.useState(""),[h,m]=y.useState(""),[x,w]=y.useState("started_desc"),[b,N]=y.useState(0),[k,C]=y.useState(new Set),[S,A]=y.useState(!1),[P,M]=y.useState(null),[_,E]=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))??[]),G=new Set([...W].filter(te=>J.has(te)));return G.size===W.size?W:G})},[n]);const B=y.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const W=a.trim().toLowerCase();return[...n.sessions.filter(G=>{var X;if(e&&t){const se=((X=t.find(R=>R.slug===G.missionSlug))==null?void 0:X.workspace)??null;if(e==="_ungrouped"){if(se!==null)return!1}else if(se!==e)return!1}const te=Q3(G.started);return d&&(!te||te<d)||h&&(!te||te>h)?!1:W?[G.missionSlug??"",G.assignmentSlug??"",G.agent,G.sessionId,G.path,G.description??""].join(" ").toLowerCase().includes(W):!0})].sort((G,te)=>J3(G,te,x))},[n,a,x,d,h,b,e,t]);function q(W){C(J=>{const G=new Set(J);return G.has(W)?G.delete(W):G.add(W),G})}function T(){k.size===B.length&&B.length>0?C(new Set):C(new Set(B.map(W=>W.sessionId)))}async function I(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})}),G=await J.json().catch(()=>null);if(!J.ok)throw new Error((G==null?void 0:G.error)||`HTTP ${J.status}`);C(te=>new Set([...te].filter(ie=>!W.includes(ie)))),E(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 F=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(Hf,{children:[l.jsx(Wf,{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,k.size>0&&l.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[l.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),l.jsxs("button",{className:"shell-action text-destructive",onClick:()=>E({sessionIds:[...k],title:`Delete ${k.size} selected session${k.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:k.size===1?"Delete Session":"Delete Sessions"}),disabled:S,children:[l.jsx(Is,{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"})]}),F?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:T,className:"text-muted-foreground hover:text-foreground",children:k.size===B.length&&B.length>0?l.jsx(br,{className:"h-4 w-4"}):l.jsx(av,{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(X3,{session:W,selected:k.has(W.sessionId),onToggle:()=>q(W.sessionId),onDelete:()=>E({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(Hb,{open:_!==null,title:(_==null?void 0:_.title)??"Delete session?",description:(_==null?void 0:_.description)??"",confirmLabel:(_==null?void 0:_.confirmLabel)??"Delete",destructive:!0,loading:S,onOpenChange:W=>{W||E(null)},onConfirm:async()=>{_&&await I(_.sessionIds)}})]})}function X3({session:e,selected:t,onToggle:n,onDelete:o}){const i=At(),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(av,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.missionSlug?l.jsx(we,{to:`${i}/missions/${e.missionSlug}`,className:"text-primary hover:underline",children:rn(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(we,{to:`${i}/missions/${e.missionSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:rn(e.assignmentSlug)}):e.assignmentSlug?l.jsx("span",{children:rn(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(ru,{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(Is,{className:"h-3.5 w-3.5"})})})]})}function Q3(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 Na(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 J3(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 Na(e)-Na(t);case"duration_desc":return Na(t)-Na(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 Z3(){const{data:e,loading:t,error:n}=XC(),[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(ou,{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(we,{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(tr,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(we,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx($j,{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(we,{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(tr,{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(we,{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(Zy,{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(uv,{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 e4(){const{slug:e}=Pt(),t=Hn(),{data:n,loading:o,error:i}=QC(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(uv,{className:"h-3 w-3"}),x]},x))}):null]}),h?null:l.jsxs("div",{className:"flex shrink-0 gap-2",children:[l.jsxs(we,{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(Xj,{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(Is,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(zr,{content:n.body})})]}):null}function t4(){const e=Hn(),[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(sl,{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 n4(){const{slug:e}=Pt(),t=Hn(),[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(sl,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function r4({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 o4=["top","right","bottom","left"],ko=Math.min,En=Math.max,qa=Math.round,Ea=Math.floor,wr=e=>({x:e,y:e}),s4={left:"right",right:"left",bottom:"top",top:"bottom"};function xf(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 xp(e){return e==="x"?"y":"x"}function yp(e){return e==="y"?"height":"width"}function yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vp(e){return xp(yr(e))}function i4(e,t,n){n===void 0&&(n=!1);const o=$s(e),i=vp(e),a=yp(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=Ga(c)),[c,Ga(c)]}function l4(e){const t=Ga(e);return[yf(e),t,yf(t)]}function yf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const sy=["left","right"],iy=["right","left"],a4=["top","bottom"],u4=["bottom","top"];function c4(e,t,n){switch(e){case"top":case"bottom":return n?t?iy:sy:t?sy:iy;case"left":case"right":return t?a4:u4;default:return[]}}function d4(e,t,n,o){const i=$s(e);let a=c4(Hr(e),n==="start",o);return i&&(a=a.map(c=>c+"-"+i),t&&(a=a.concat(a.map(yf)))),a}function Ga(e){const t=Hr(e);return s4[t]+e.slice(t.length)}function f4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kb(e){return typeof e!="number"?f4(e):{top:e,right:e,bottom:e,left:e}}function Ka(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 ly(e,t,n){let{reference:o,floating:i}=e;const a=yr(t),c=vp(t),d=yp(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 p4(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=Kb(b),C=d[w?x==="floating"?"reference":"floating":x],S=Ka(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},_=Ka(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:P,strategy:p}):A);return{top:(S.top-_.top+N.top)/M.y,bottom:(_.bottom-S.bottom+N.bottom)/M.y,left:(S.left-_.left+N.left)/M.x,right:(_.right-S.right+N.right)/M.x}}const h4=50,m4=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:p4},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}=ly(h,o,p),w=o,b=0;const N={};for(let k=0;k<a.length;k++){const C=a[k];if(!C)continue;const{name:S,fn:A}=C,{x:P,y:M,data:_,reset:E}=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[S]={...N[S],..._},E&&b<h4&&(b++,typeof E=="object"&&(E.placement&&(w=E.placement),E.rects&&(h=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:m,y:x}=ly(h,w,p)),k=-1)}return{x:m,y:x,placement:w,strategy:i,middlewareData:N}},g4=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=Kb(m),w={x:n,y:o},b=vp(i),N=yp(b),k=await c.getDimensions(h),C=b==="y",S=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],E=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let D=E?E[P]:0;(!D||!await(c.isElement==null?void 0:c.isElement(E)))&&(D=d.floating[P]||a.floating[N]);const B=M/2-_/2,q=D/2-k[N]/2-1,T=ko(x[S],q),I=ko(x[A],q),F=T,W=D-k[N]-I,J=D/2-k[N]/2+B,G=xf(F,J,W),te=!p.arrow&&$s(i)!=null&&J!==G&&a.reference[N]/2-(J<F?T:I)-k[N]/2<0,ie=te?J<F?J-F:J-W:0;return{[b]:w[b]+ie,data:{[b]:G,centerOffset:J-G-ie,...te&&{alignmentOffset:ie}},reset:te}}}),x4=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:k=!0,...C}=Ur(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Hr(i),A=yr(d),P=Hr(d)===d,M=await(p.isRTL==null?void 0:p.isRTL(h.floating)),_=w||(P||!k?[Ga(d)]:l4(d)),E=N!=="none";!w&&E&&_.push(...d4(d,k,N,M));const D=[d,..._],B=await p.detectOverflow(t,C),q=[];let T=((o=a.flip)==null?void 0:o.overflows)||[];if(m&&q.push(B[S]),x){const J=i4(i,c,M);q.push(B[J[0]],B[J[1]])}if(T=[...T,{placement:i,overflows:q}],!q.every(J=>J<=0)){var I,F;const J=(((I=a.flip)==null?void 0:I.index)||0)+1,G=D[J];if(G&&(!(x==="alignment"?A!==yr(G):!1)||T.every(X=>yr(X.placement)===A?X.overflows[0]>0:!0)))return{data:{index:J,overflows:T},reset:{placement:G}};let te=(F=T.filter(ie=>ie.overflows[0]<=0).sort((ie,X)=>ie.overflows[1]-X.overflows[1])[0])==null?void 0:F.placement;if(!te)switch(b){case"bestFit":{var W;const ie=(W=T.filter(X=>{if(E){const se=yr(X.placement);return se===A||se==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(se=>se>0).reduce((se,R)=>se+R,0)]).sort((X,se)=>X[1]-se[1])[0])==null?void 0:W[0];ie&&(te=ie);break}case"initialPlacement":te=d;break}if(i!==te)return{reset:{placement:te}}}return{}}}};function ay(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uy(e){return o4.some(t=>e[t]>=0)}const y4=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=ay(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:uy(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...a,altBoundary:!0}),d=ay(c,n.floating);return{data:{escapedOffsets:d,escaped:uy(d)}}}default:return{}}}}},Yb=new Set(["left","top"]);async function v4(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=Yb.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 b4=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 v4(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}}}}},w4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:a}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:A,y:P}=S;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=xp(w);let N=m[b],k=m[w];if(c){const S=b==="y"?"top":"left",A=b==="y"?"bottom":"right",P=N+x[S],M=N-x[A];N=xf(P,N,M)}if(d){const S=w==="y"?"top":"left",A=w==="y"?"bottom":"right",P=k+x[S],M=k-x[A];k=xf(P,k,M)}const C=p.fn({...t,[b]:N,[w]:k});return{...C,data:{x:C.x-n,y:C.y-o,enabled:{[b]:c,[w]:d}}}}}},k4=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=xp(x);let b=m[w],N=m[x];const k=Ur(d,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};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 S,A;const P=w==="y"?"width":"height",M=Yb.has(Hr(i)),_=a.reference[x]-a.floating[P]+(M&&((S=c.offset)==null?void 0:S[x])||0)+(M?0:C.crossAxis),E=a.reference[x]+a.reference[P]+(M?0:((A=c.offset)==null?void 0:A[x])||0)-(M?C.crossAxis:0);N<_?N=_:N>E&&(N=E)}return{[w]:b,[x]:N}}}},S4=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:k}=a.floating;let C,S;x==="top"||x==="bottom"?(C=x,S=w===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,C=w==="end"?"top":"bottom");const A=k-m.top-m.bottom,P=N-m.left-m.right,M=ko(k-m[C],A),_=ko(N-m[S],P),E=!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),E&&!w){const T=En(m.left,0),I=En(m.right,0),F=En(m.top,0),W=En(m.bottom,0);b?B=N-2*(T!==0||I!==0?T+I:En(m.left,m.right)):D=k-2*(F!==0||W!==0?F+W:En(m.top,m.bottom))}await p({...t,availableWidth:B,availableHeight:D});const q=await c.getDimensions(d.floating);return N!==q.width||k!==q.height?{reset:{rects:!0}}:{}}}};function bu(){return typeof window<"u"}function zs(e){return Xb(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=(Xb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xb(e){return bu()?e instanceof Node||e instanceof Pn(e).Node:!1}function nr(e){return bu()?e instanceof Element||e instanceof Pn(e).Element:!1}function Vr(e){return bu()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function cy(e){return!bu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}function il(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function j4(e){return/^(table|td|th)$/.test(zs(e))}function wu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const C4=/transform|translate|scale|rotate|perspective|filter/,N4=/paint|layout|strict|content/,Fo=e=>!!e&&e!=="none";let Bd;function bp(e){const t=nr(e)?rr(e):e;return Fo(t.transform)||Fo(t.translate)||Fo(t.scale)||Fo(t.rotate)||Fo(t.perspective)||!wp()&&(Fo(t.backdropFilter)||Fo(t.filter))||C4.test(t.willChange||"")||N4.test(t.contain||"")}function E4(e){let t=So(e);for(;Vr(t)&&!Ps(t);){if(bp(t))return t;if(wu(t))return null;t=So(t)}return null}function wp(){return Bd==null&&(Bd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Bd}function Ps(e){return/^(html|body|#document)$/.test(zs(e))}function rr(e){return Pn(e).getComputedStyle(e)}function ku(e){return nr(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||cy(e)&&e.host||Cr(e);return cy(t)?t.host:t}function Qb(e){const t=So(e);return Ps(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&il(t)?t:Qb(t)}function qi(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qb(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),c=Pn(i);if(a){const d=vf(c);return t.concat(c,c.visualViewport||[],il(i)?i:[],d&&n?qi(d):[])}else return t.concat(i,qi(i,[],n))}function vf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jb(e){const t=rr(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=qa(n)!==a||qa(o)!==c;return d&&(n=a,o=c),{width:n,height:o,$:d}}function kp(e){return nr(e)?e:e.contextElement}function Rs(e){const t=kp(e);if(!Vr(t))return wr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=Jb(t);let c=(a?qa(n.width):n.width)/o,d=(a?qa(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const R4=wr(0);function Zb(e){const t=Pn(e);return!wp()||!t.visualViewport?R4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T4(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=kp(e);let c=wr(1);t&&(o?nr(o)&&(c=Rs(o)):c=Rs(e));const d=T4(a,n,o)?Zb(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&&nr(o)?Pn(o):o;let N=w,k=vf(N);for(;k&&o&&b!==N;){const C=Rs(k),S=k.getBoundingClientRect(),A=rr(k),P=S.left+(k.clientLeft+parseFloat(A.paddingLeft))*C.x,M=S.top+(k.clientTop+parseFloat(A.paddingTop))*C.y;p*=C.x,h*=C.y,m*=C.x,x*=C.y,p+=P,h+=M,N=Pn(k),k=vf(N)}}return Ka({width:m,height:x,x:p,y:h})}function Su(e,t){const n=ku(e).scrollLeft;return t?t.left+n:Wo(Cr(e)).left+n}function ew(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Su(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function P4(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",c=Cr(o),d=t?wu(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"||il(c))&&(p=ku(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?ew(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 A4(e){return Array.from(e.getClientRects())}function D4(e){const t=Cr(e),n=ku(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+Su(e);const d=-n.scrollTop;return rr(o).direction==="rtl"&&(c+=En(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:c,y:d}}const dy=25;function L4(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=wp();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=Su(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<=dy&&(a-=N)}else h<=dy&&(a+=h);return{width:a,height:c,x:d,y:p}}function I4(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 fy(e,t,n){let o;if(t==="viewport")o=L4(e,n);else if(t==="document")o=D4(Cr(e));else if(nr(t))o=I4(t,n);else{const i=Zb(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ka(o)}function tw(e,t){const n=So(e);return n===t||!nr(n)||Ps(n)?!1:rr(n).position==="fixed"||tw(n,t)}function O4(e,t){const n=t.get(e);if(n)return n;let o=qi(e,[],!1).filter(d=>nr(d)&&zs(d)!=="body"),i=null;const a=rr(e).position==="fixed";let c=a?So(e):e;for(;nr(c)&&!Ps(c);){const d=rr(c),p=bp(c);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||il(c)&&!p&&tw(e,c))?o=o.filter(m=>m!==c):i=d,c=So(c)}return t.set(e,o),o}function M4(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?wu(t)?[]:O4(t,this._c):[].concat(n),o],d=fy(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=fy(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 _4(e){const{width:t,height:n}=Jb(e);return{width:t,height:n}}function $4(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=Su(i)}if(o||!o&&!a)if((zs(t)!=="body"||il(i))&&(d=ku(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?ew(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 Ud(e){return rr(e).position==="static"}function py(e,t){if(!Vr(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cr(e)===n&&(n=n.ownerDocument.body),n}function nw(e,t){const n=Pn(e);if(wu(e))return n;if(!Vr(e)){let i=So(e);for(;i&&!Ps(i);){if(nr(i)&&!Ud(i))return i;i=So(i)}return n}let o=py(e,t);for(;o&&j4(o)&&Ud(o);)o=py(o,t);return o&&Ps(o)&&Ud(o)&&!bp(o)?n:o||E4(e)||n}const z4=async function(e){const t=this.getOffsetParent||nw,n=this.getDimensions,o=await n(e.floating);return{reference:$4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function F4(e){return rr(e).direction==="rtl"}const B4={convertOffsetParentRelativeRectToViewportRelativeRect:P4,getDocumentElement:Cr,getClippingRect:M4,getOffsetParent:nw,getElementRects:z4,getClientRects:A4,getDimensions:_4,getScale:Rs,isElement:nr,isRTL:F4};function rw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function U4(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=Ea(x),k=Ea(i.clientWidth-(m+w)),C=Ea(i.clientHeight-(x+b)),S=Ea(m),P={rootMargin:-N+"px "+-k+"px "+-C+"px "+-S+"px",threshold:En(0,ko(1,p))||1};let M=!0;function _(E){const D=E[0].intersectionRatio;if(D!==p){if(!M)return c();D?c(!1,D):o=setTimeout(()=>{c(!1,1e-7)},1e3)}D===1&&!rw(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 H4(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=kp(e),m=i||a?[...h?qi(h):[],...t?qi(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const x=h&&d?U4(h,n):null;let w=-1,b=null;c&&(b=new ResizeObserver(S=>{let[A]=S;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,k=p?Wo(e):null;p&&C();function C(){const S=Wo(e);k&&!rw(k,S)&&n(),k=S,N=requestAnimationFrame(C)}return n(),()=>{var S;m.forEach(A=>{i&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const W4=b4,V4=w4,q4=x4,G4=S4,K4=y4,hy=g4,Y4=k4,X4=(e,t,n)=>{const o=new Map,i={platform:B4,...n},a={...i.platform,_c:o};return m4(e,t,{...i,platform:a})};var Q4=typeof document<"u",J4=function(){},_a=Q4?y.useLayoutEffect:J4;function Ya(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(!Ya(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)&&!Ya(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ow(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function my(e,t){const n=ow(e);return Math.round(t*n)/n}function Hd(e){const t=y.useRef(e);return _a(()=>{t.current=e}),t}function Z4(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);Ya(w,o)||b(o);const[N,k]=y.useState(null),[C,S]=y.useState(null),A=y.useCallback(X=>{X!==E.current&&(E.current=X,k(X))},[]),P=y.useCallback(X=>{X!==D.current&&(D.current=X,S(X))},[]),M=a||N,_=c||C,E=y.useRef(null),D=y.useRef(null),B=y.useRef(m),q=p!=null,T=Hd(p),I=Hd(i),F=Hd(h),W=y.useCallback(()=>{if(!E.current||!D.current)return;const X={placement:t,strategy:n,middleware:w};I.current&&(X.platform=I.current),X4(E.current,D.current,X).then(se=>{const R={...se,isPositioned:F.current!==!1};J.current&&!Ya(B.current,R)&&(B.current=R,vo.flushSync(()=>{x(R)}))})},[w,t,n,I,F]);_a(()=>{h===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,x(X=>({...X,isPositioned:!1})))},[h]);const J=y.useRef(!1);_a(()=>(J.current=!0,()=>{J.current=!1}),[]),_a(()=>{if(M&&(E.current=M),_&&(D.current=_),M&&_){if(T.current)return T.current(M,_,W);W()}},[M,_,W,T,q]);const G=y.useMemo(()=>({reference:E,floating:D,setReference:A,setFloating:P}),[A,P]),te=y.useMemo(()=>({reference:M,floating:_}),[M,_]),ie=y.useMemo(()=>{const X={position:n,left:0,top:0};if(!te.floating)return X;const se=my(te.floating,m.x),R=my(te.floating,m.y);return d?{...X,transform:"translate("+se+"px, "+R+"px)",...ow(te.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:R}},[n,d,te.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:W,refs:G,elements:te,floatingStyles:ie}),[m,W,G,te,ie])}const eD=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?hy({element:o.current,padding:i}).fn(n):{}:o?hy({element:o,padding:i}).fn(n):{}}}},tD=(e,t)=>{const n=W4(e);return{name:n.name,fn:n.fn,options:[e,t]}},nD=(e,t)=>{const n=V4(e);return{name:n.name,fn:n.fn,options:[e,t]}},rD=(e,t)=>({fn:Y4(e).fn,options:[e,t]}),oD=(e,t)=>{const n=q4(e);return{name:n.name,fn:n.fn,options:[e,t]}},sD=(e,t)=>{const n=G4(e);return{name:n.name,fn:n.fn,options:[e,t]}},iD=(e,t)=>{const n=K4(e);return{name:n.name,fn:n.fn,options:[e,t]}},lD=(e,t)=>{const n=eD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var aD="Arrow",sw=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"})})});sw.displayName=aD;var uD=sw;function cD(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 Sp="Popper",[iw,lw]=Vo(Sp),[dD,aw]=iw(Sp),uw=e=>{const{__scopePopper:t,children:n}=e,[o,i]=y.useState(null);return l.jsx(dD,{scope:t,anchor:o,onAnchorChange:i,children:n})};uw.displayName=Sp;var cw="PopperAnchor",dw=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=aw(cw,n),c=y.useRef(null),d=Qt(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})});dw.displayName=cw;var jp="PopperContent",[fD,pD]=iw(jp),fw=y.forwardRef((e,t)=>{var Pe,ke,Te,ee,Ee,je;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,...k}=e,C=aw(jp,n),[S,A]=y.useState(null),P=Qt(t,Qe=>A(Qe)),[M,_]=y.useState(null),E=cD(M),D=(E==null?void 0:E.width)??0,B=(E==null?void 0:E.height)??0,q=o+(a!=="center"?"-"+a:""),T=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},I=Array.isArray(h)?h:[h],F=I.length>0,W={padding:T,boundary:I.filter(mD),altBoundary:F},{refs:J,floatingStyles:G,placement:te,isPositioned:ie,middlewareData:X}=Z4({strategy:"fixed",placement:q,whileElementsMounted:(...Qe)=>H4(...Qe,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[tD({mainAxis:i+B,alignmentAxis:c}),p&&nD({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?rD():void 0,...W}),p&&oD({...W}),sD({...W,apply:({elements:Qe,rects:yt,availableWidth:Bt,availableHeight:Ut})=>{const{width:_t,height:vn}=yt.reference,Dt=Qe.floating.style;Dt.setProperty("--radix-popper-available-width",`${Bt}px`),Dt.setProperty("--radix-popper-available-height",`${Ut}px`),Dt.setProperty("--radix-popper-anchor-width",`${_t}px`),Dt.setProperty("--radix-popper-anchor-height",`${vn}px`)}}),M&&lD({element:M,padding:d}),gD({arrowWidth:D,arrowHeight:B}),w&&iD({strategy:"referenceHidden",...W})]}),[se,R]=mw(te),$=Uo(N);wo(()=>{ie&&($==null||$())},[ie,$]);const Q=(Pe=X.arrow)==null?void 0:Pe.x,L=(ke=X.arrow)==null?void 0:ke.y,pe=((Te=X.arrow)==null?void 0:Te.centerOffset)!==0,[ve,de]=y.useState();return wo(()=>{S&&de(window.getComputedStyle(S).zIndex)},[S]),l.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:ie?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(ee=X.transformOrigin)==null?void 0:ee.x,(Ee=X.transformOrigin)==null?void 0:Ee.y].join(" "),...((je=X.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(fD,{scope:n,placedSide:se,onArrowChange:_,arrowX:Q,arrowY:L,shouldHideArrow:pe,children:l.jsx(jt.div,{"data-side":se,"data-align":R,...k,ref:P,style:{...k.style,animation:ie?void 0:"none"}})})})});fw.displayName=jp;var pw="PopperArrow",hD={top:"bottom",right:"left",bottom:"top",left:"right"},hw=y.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=pD(pw,o),c=hD[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(uD,{...i,ref:n,style:{...i.style,display:"block"}})})});hw.displayName=pw;function mD(e){return e!==null}var gD=e=>({name:"transformOrigin",options:e,fn(t){var C,S,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]=mw(n),x={start:"0%",center:"50%",end:"100%"}[m],w=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((A=i.arrow)==null?void 0:A.y)??0)+p/2;let N="",k="";return h==="bottom"?(N=c?x:`${w}px`,k=`${-p}px`):h==="top"?(N=c?x:`${w}px`,k=`${o.floating.height+p}px`):h==="right"?(N=`${-p}px`,k=c?x:`${b}px`):h==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function mw(e){const[t,n="center"]=e.split("-");return[t,n]}var xD=uw,yD=dw,vD=fw,bD=hw,wD=Symbol("radix.slottable");function kD(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=wD,t}var SD=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"}),jD="VisuallyHidden",gw=y.forwardRef((e,t)=>l.jsx(jt.span,{...e,ref:t,style:{...SD,...e.style}}));gw.displayName=jD;var CD=gw,[ju]=Vo("Tooltip",[lw]),Cu=lw(),xw="TooltipProvider",ND=700,bf="tooltip.open",[ED,Cp]=ju(xw),yw=e=>{const{__scopeTooltip:t,delayDuration:n=ND,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(ED,{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})};yw.displayName=xw;var Gi="Tooltip",[RD,ll]=ju(Gi),vw=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:d}=e,p=Cp(Gi,e.__scopeTooltip),h=Cu(t),[m,x]=y.useState(null),w=Ss(),b=y.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,C=y.useRef(!1),[S,A]=lu({prop:o,defaultProp:i??!1,onChange:D=>{D?(p.onOpen(),document.dispatchEvent(new CustomEvent(bf))):p.onClose(),a==null||a(D)},caller:Gi}),P=y.useMemo(()=>S?C.current?"delayed-open":"instant-open":"closed",[S]),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]),E=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{C.current=!0,A(!0),b.current=0},k)},[k,A]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(xD,{...h,children:l.jsx(RD,{scope:t,contentId:w,open:S,stateAttribute:P,trigger:m,onTriggerChange:x,onTriggerEnter:y.useCallback(()=>{p.isOpenDelayedRef.current?E():M()},[p.isOpenDelayedRef,E,M]),onTriggerLeave:y.useCallback(()=>{N?_():(window.clearTimeout(b.current),b.current=0)},[_,N]),onOpen:M,onClose:_,disableHoverableContent:N,children:n})})};vw.displayName=Gi;var wf="TooltipTrigger",bw=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ll(wf,n),a=Cp(wf,n),c=Cu(n),d=y.useRef(null),p=Qt(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(yD,{asChild:!0,...c,children:l.jsx(jt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:ot(e.onPointerMove,w=>{w.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:ot(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:ot(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:ot(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:ot(e.onBlur,i.onClose),onClick:ot(e.onClick,i.onClose)})})});bw.displayName=wf;var Np="TooltipPortal",[TD,PD]=ju(Np,{forceMount:void 0}),ww=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,a=ll(Np,t);return l.jsx(TD,{scope:t,forceMount:n,children:l.jsx(qo,{present:n||a.open,children:l.jsx(up,{asChild:!0,container:i,children:o})})})};ww.displayName=Np;var As="TooltipContent",kw=y.forwardRef((e,t)=>{const n=PD(As,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,c=ll(As,e.__scopeTooltip);return l.jsx(qo,{present:o||c.open,children:c.disableHoverableContent?l.jsx(Sw,{side:i,...a,ref:t}):l.jsx(AD,{side:i,...a,ref:t})})}),AD=y.forwardRef((e,t)=>{const n=ll(As,e.__scopeTooltip),o=Cp(As,e.__scopeTooltip),i=y.useRef(null),a=Qt(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,k)=>{const C=N.currentTarget,S={x:N.clientX,y:N.clientY},A=MD(S,C.getBoundingClientRect()),P=_D(S,A),M=$D(k.getBoundingClientRect()),_=FD([...P,...M]);d(_),x(!0)},[x]);return y.useEffect(()=>()=>w(),[w]),y.useEffect(()=>{if(p&&m){const N=C=>b(C,m),k=C=>b(C,p);return p.addEventListener("pointerleave",N),m.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),m.removeEventListener("pointerleave",k)}}},[p,m,b,w]),y.useEffect(()=>{if(c){const N=k=>{const C=k.target,S={x:k.clientX,y:k.clientY},A=(p==null?void 0:p.contains(C))||(m==null?void 0:m.contains(C)),P=!zD(S,c);A?w():P&&(w(),h())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,m,c,h,w]),l.jsx(Sw,{...e,ref:a})}),[DD,LD]=ju(Gi,{isInside:!1}),ID=kD("TooltipContent"),Sw=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=e,p=ll(As,n),h=Cu(n),{onClose:m}=p;return y.useEffect(()=>(document.addEventListener(bf,m),()=>document.removeEventListener(bf,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(ap,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:l.jsxs(vD,{"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(ID,{children:o}),l.jsx(DD,{scope:n,isInside:!0,children:l.jsx(CD,{id:p.contentId,role:"tooltip",children:i||o})})]})})});kw.displayName=As;var jw="TooltipArrow",OD=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Cu(n);return LD(jw,n).isInside?null:l.jsx(bD,{...i,...o,ref:t})});OD.displayName=jw;function MD(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 _D(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 $D(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function zD(e,t){const{x:n,y:o}=e;let i=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const d=t[a],p=t[c],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 FD(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),BD(t)}function BD(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 UD=yw,HD=vw,WD=bw,VD=ww,Cw=kw;const qD=UD,GD=HD,KD=WD,Nw=y.forwardRef(({className:e,sideOffset:t=4,...n},o)=>l.jsx(VD,{children:l.jsx(Cw,{ref:o,sideOffset:t,className:$e("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Nw.displayName=Cw.displayName;function Wd(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 YD(){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,k]=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(),T=Wd(q);d(T.statuses),h(T.order),a(q.custom),k(!1),o(null)}catch(B){o(B instanceof Error?B.message:"Failed to load config")}finally{t(!1)}},[]);y.useEffect(()=>{C()},[C]);function S(){setTimeout(()=>b(null),3e3)}async function A(){x(!0),b(null);try{const B={statuses:c.map(F=>({id:F.id,label:F.label,...F.description?{description:F.description}:{},...F.color?{color:F.color}:{},...F.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 F=await q.json().catch(()=>({error:"Unknown error"}));throw new Error(F.error??"Save failed")}const T=await q.json(),I=Wd(T);d(I.statuses),h(I.order),a(T.custom),k(!1),$g(),b({type:"success",message:"Status config saved"}),S()}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(),T=Wd(q);d(T.statuses),h(T.order),a(q.custom),k(!1),$g(),b({type:"success",message:"Reset to defaults"}),S()}catch(B){b({type:"error",message:B instanceof Error?B.message:"Reset failed"})}finally{x(!1)}}function M(B,q,T){d(I=>{const F=[...I];if(F[B]={...F[B],[q]:T},q==="id"&&typeof T=="string"){const W=I[B].id;h(J=>J.map(G=>G===W?T:G))}return F}),k(!0)}function _(){const B=`status_${c.length+1}`;d(q=>[...q,{id:B,label:"New Status",description:"",color:"",terminal:!1}]),h(q=>[...q,B]),k(!0)}function E(B){const q=c[B].id;d(T=>T.filter((I,F)=>F!==B)),h(T=>T.filter(I=>I!==q)),k(!0)}function D(B,q){const T=B+q;T<0||T>=p.length||(h(I=>{const F=[...I];return[F[B],F[T]]=[F[T],F[B]],F}),k(!0))}return e?l.jsx(kt,{label:"Loading settings..."}):n?l.jsx(St,{error:n}):l.jsx(qD,{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(ov,{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(Qj,{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(Le,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:_,children:[l.jsx(tr,{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(GD,{children:[l.jsx(KD,{asChild:!0,children:l.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),l.jsx(Nw,{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:T=>M(q,"id",T.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:T=>M(q,"label",T.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(r4,{value:B.color,onChange:T=>M(q,"color",T)})}),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:()=>E(q),title:"Remove status",children:l.jsx(Is,{className:"h-3.5 w-3.5"})})})]},q))})]})})}),l.jsx(Le,{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 I;const T=((I=c.find(F=>F.id===B))==null?void 0:I.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:T}),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(ev,{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(Wi,{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(lv,{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 gy=[{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 Ew({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=gy.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:gy.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 XD(){const{data:e,loading:t,error:n,refetch:o}=Ev(),[i,a]=y.useState(""),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState("_global"),[N,k]=y.useState(null);function C(T,I){T.stopPropagation(),navigator.clipboard.writeText(I),k(I),setTimeout(()=>k(F=>F===I?null:F),1500)}const S=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const T=[];for(const I of e.workspaces)for(const F of I.items)T.push({...F,workspace:I.workspace});return T},[e]),A=y.useMemo(()=>{const T=new Set;for(const I of S)for(const F of I.tags)T.add(F);return Array.from(T).sort()},[S]),P=y.useMemo(()=>{let T=S;if(i.trim()){const I=i.toLowerCase();T=T.filter(F=>F.description.toLowerCase().includes(I)||F.tags.some(W=>W.toLowerCase().includes(I))||F.id.includes(I))}return c&&(T=T.filter(I=>I.status===c)),p&&(T=T.filter(I=>I.tags.includes(p))),T},[S,i,c,p]),M=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const T={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const I of e.workspaces)T.open+=I.counts.open,T.in_progress+=I.counts.in_progress,T.completed+=I.counts.completed,T.blocked+=I.counts.blocked,T.total+=I.counts.total;return T},[e]);async function _(){m.trim()&&(await Rv(w,m.trim()),x(""),o())}const E={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function D(T,I,F){B(T,I,E[F]||"open")}async function B(T,I,F){switch(F){case"open":await Dv(T,I);break;case"in_progress":await Av(T,I);break;case"completed":await Tv(T,I);break;case"blocked":await Pv(T,I);break}o()}async function q(T,I){await iN(T,I),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(tt,{label:"Open",value:M.open,icon:br}),l.jsx(tt,{label:"In Progress",value:M.in_progress,icon:sv,tone:"info"}),l.jsx(tt,{label:"Blocked",value:M.blocked,icon:el,tone:"warn"}),l.jsx(tt,{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:T=>b(T.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(T=>T.workspace!=="_global").map(T=>l.jsx("option",{value:T.workspace,children:T.workspace},T.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:m,onChange:T=>x(T.target.value),onKeyDown:T=>T.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(tr,{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(ou,{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:T=>a(T.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:T=>d(T.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:T=>h(T.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(T=>l.jsxs("option",{value:T,children:["#",T]},T))]})]}),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(T=>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(T.workspace,T.id,T.status),children:[l.jsx(Ew,{status:T.status,onChange:I=>B(T.workspace,T.id,I)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${T.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:T.description}),T.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:T.tags.map(I=>`#${I}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:T.workspace!=="_global"&&l.jsx(we,{to:`/w/${T.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:I=>I.stopPropagation(),children:T.workspace})}),N===T.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Of,{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:I=>C(I,T.id),children:["t:",T.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:I=>C(I,T.id),children:l.jsx(Mf,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>q(T.workspace,T.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${T.workspace}-${T.id}`))})]})}function QD(){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 Nu=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 Ep(e){return"nodeType"in e}function yn(e){var t,n;return e?Fs(e)?e:Ep(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Rp(e){const{Document:t}=yn(e);return e instanceof t}function al(e){return Fs(e)?!1:e instanceof yn(e).HTMLElement}function Rw(e){return e instanceof yn(e).SVGElement}function Bs(e){return e?Fs(e)?e.document:Ep(e)?Rp(e)?e:al(e)||Rw(e)?e.ownerDocument:document:document:document}const Sr=Nu?y.useLayoutEffect:y.useEffect;function Tp(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 JD(){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 Ki(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return Sr(()=>{n.current!==e&&(n.current=e)},t),n}function ul(e,t){const n=y.useRef();return y.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function Xa(e){const t=Tp(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 kf(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let Vd={};function cl(e,t){return y.useMemo(()=>{if(t)return t;const n=Vd[e]==null?0:Vd[e]+1;return Vd[e]=n,e+"-"+n},[e,t])}function Tw(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=Tw(1),Qa=Tw(-1);function ZD(e){return"clientX"in e&&"clientY"in e}function Pp(e){if(!e)return!1;const{KeyboardEvent:t}=yn(e.target);return t&&e instanceof t}function eL(e){if(!e)return!1;const{TouchEvent:t}=yn(e.target);return t&&e instanceof t}function Sf(e){if(eL(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 ZD(e)?{x:e.clientX,y:e.clientY}:null}const Yi=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[Yi.Translate.toString(e),Yi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),xy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function tL(e){return e.matches(xy)?e:e.querySelector(xy)}const nL={display:"none"};function rL(e){let{id:t,value:n}=e;return ft.createElement("div",{id:t,style:nL},n)}function oL(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 ft.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function sL(){const[e,t]=y.useState("");return{announce:y.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Pw=y.createContext(null);function iL(e){const t=y.useContext(Pw);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function lL(){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 aL={draggable:`
442
- To pick up a draggable item, press the space bar.
443
- While dragging, use the arrow keys to move the item.
444
- Press space again to drop the item in its new position, or press escape to cancel.
445
- `},uL={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 cL(e){let{announcements:t=uL,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=aL}=e;const{announce:a,announcement:c}=sL(),d=cl("DndLiveRegion"),[p,h]=y.useState(!1);if(y.useEffect(()=>{h(!0)},[]),iL(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=ft.createElement(ft.Fragment,null,ft.createElement(rL,{id:o,value:i.draggable}),ft.createElement(oL,{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 Ja(){}function yy(e,t){return y.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function dL(){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 or=Object.freeze({x:0,y:0});function fL(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function hL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function mL(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function vy(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 gL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=vy(t,t.left,t.top),a=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const h=fL(vy(p),i);a.push({id:d,data:{droppableContainer:c,value:h}})}}return a.sort(pL)};function xL(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 yL=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=xL(d,t);p>0&&i.push({id:c,data:{droppableContainer:a,value:p}})}}return i.sort(hL)};function vL(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Aw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:or}function bL(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 wL=bL(1);function kL(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 SL(e,t,n){const o=kL(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 jL={ignoreTransform:!1};function Us(e,t){t===void 0&&(t=jL);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=yn(e).getComputedStyle(e);h&&(n=SL(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 by(e){return Us(e,{ignoreTransform:!0})}function CL(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function NL(e,t){return t===void 0&&(t=yn(e).getComputedStyle(e)),t.position==="fixed"}function EL(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 Ap(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Rp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!al(i)||Rw(i)||n.includes(i))return n;const a=yn(e).getComputedStyle(i);return i!==e&&EL(i,a)&&n.push(i),NL(i,a)?n:o(i.parentNode)}return e?o(e):n}function Dw(e){const[t]=Ap(e,1);return t??null}function qd(e){return!Nu||!e?null:Fs(e)?e:Ep(e)?Rp(e)||e===Bs(e).scrollingElement?window:al(e)?e:null:null}function Lw(e){return Fs(e)?e.scrollX:e.scrollLeft}function Iw(e){return Fs(e)?e.scrollY:e.scrollTop}function jf(e){return{x:Lw(e),y:Iw(e)}}var Mt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Mt||(Mt={}));function Ow(e){return!Nu||!e?!1:e===document.scrollingElement}function Mw(e){const t={x:0,y:0},n=Ow(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 RL={x:.2,y:.2};function TL(e,t,n,o,i){let{top:a,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=RL);const{isTop:h,isBottom:m,isLeft:x,isRight:w}=Mw(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!h&&a<=t.top+k.height?(b.y=Mt.Backward,N.y=o*Math.abs((t.top+k.height-a)/k.height)):!m&&p>=t.bottom-k.height&&(b.y=Mt.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!w&&d>=t.right-k.width?(b.x=Mt.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Mt.Backward,N.x=o*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:N}}function PL(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 _w(e){return e.reduce((t,n)=>Ts(t,jf(n)),or)}function AL(e){return e.reduce((t,n)=>t+Lw(n),0)}function DL(e){return e.reduce((t,n)=>t+Iw(n),0)}function LL(e,t){if(t===void 0&&(t=Us),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Dw(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const IL=[["x",["left","right"],AL],["y",["top","bottom"],DL]];class Dp{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=Ap(n),i=_w(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,d]of IL)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 Fi{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 OL(e){const{EventTarget:t}=yn(e);return e instanceof t?e:Bs(e)}function Gd(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 zn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(zn||(zn={}));function wy(e){e.preventDefault()}function ML(e){e.stopPropagation()}var Ue;(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"})(Ue||(Ue={}));const $w={start:[Ue.Space,Ue.Enter],cancel:[Ue.Esc],end:[Ue.Space,Ue.Enter,Ue.Tab]},_L=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ue.Right:return{...n,x:n.x+25};case Ue.Left:return{...n,x:n.x-25};case Ue.Down:return{...n,y:n.y+25};case Ue.Up:return{...n,y:n.y-25}}};class Lp{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 Fi(Bs(n)),this.windowListeners=new Fi(yn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(zn.Resize,this.handleCancel),this.windowListeners.add(zn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(zn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&LL(o),n(or)}handleKeyDown(t){if(Pp(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=$w,coordinateGetter:c=_L,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}:or;this.referenceCoordinates||(this.referenceCoordinates=m);const x=c(t,{active:n,context:o.current,currentCoordinates:m});if(x){const w=Qa(x,m),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const C=t.code,{isTop:S,isRight:A,isLeft:P,isBottom:M,maxScroll:_,minScroll:E}=Mw(k),D=PL(k),B={x:Math.min(C===Ue.Right?D.right-D.width/2:D.right,Math.max(C===Ue.Right?D.left:D.left+D.width/2,x.x)),y:Math.min(C===Ue.Down?D.bottom-D.height/2:D.bottom,Math.max(C===Ue.Down?D.top:D.top+D.height/2,x.y))},q=C===Ue.Right&&!A||C===Ue.Left&&!P,T=C===Ue.Down&&!M||C===Ue.Up&&!S;if(q&&B.x!==x.x){const I=k.scrollLeft+w.x,F=C===Ue.Right&&I<=_.x||C===Ue.Left&&I>=E.x;if(F&&!w.y){k.scrollTo({left:I,behavior:d});return}F?b.x=k.scrollLeft-I:b.x=C===Ue.Right?k.scrollLeft-_.x:k.scrollLeft-E.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(T&&B.y!==x.y){const I=k.scrollTop+w.y,F=C===Ue.Down&&I<=_.y||C===Ue.Up&&I>=E.y;if(F&&!w.x){k.scrollTo({top:I,behavior:d});return}F?b.y=k.scrollTop-I:b.y=C===Ue.Down?k.scrollTop-_.y:k.scrollTop-E.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,Ts(Qa(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()}}Lp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=$w,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 ky(e){return!!(e&&"distance"in e)}function Sy(e){return!!(e&&"delay"in e)}class Ip{constructor(t,n,o){var i;o===void 0&&(o=OL(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=Bs(c),this.documentListeners=new Fi(this.document),this.listeners=new Fi(o),this.windowListeners=new Fi(yn(c)),this.initialCoordinates=(i=Sf(a))!=null?i:or,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(zn.Resize,this.handleCancel),this.windowListeners.add(zn.DragStart,wy),this.windowListeners.add(zn.VisibilityChange,this.handleCancel),this.windowListeners.add(zn.ContextMenu,wy),this.documentListeners.add(zn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Sy(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ky(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(zn.Click,ML,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(zn.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=Sf(t))!=null?n:or,h=Qa(i,p);if(!o&&d){if(ky(d)){if(d.tolerance!=null&&Gd(h,d.tolerance))return this.handleCancel();if(Gd(h,d.distance))return this.handleStart()}if(Sy(d)&&Gd(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===Ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const $L={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Op extends Ip{constructor(t){const{event:n}=t,o=Bs(n.target);super(t,$L,o)}}Op.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 zL={move:{name:"mousemove"},end:{name:"mouseup"}};var Cf;(function(e){e[e.RightClick=2]="RightClick"})(Cf||(Cf={}));class FL extends Ip{constructor(t){super(t,zL,Bs(t.event.target))}}FL.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===Cf.RightClick?!1:(o==null||o({event:n}),!0)}}];const Kd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class BL extends Ip{constructor(t){super(t,Kd)}static setup(){return window.addEventListener(Kd.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Kd.move.name,t)};function t(){}}}BL.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 Bi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Bi||(Bi={}));var Za;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Za||(Za={}));function UL(e){let{acceleration:t,activator:n=Bi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:c=5,order:d=Za.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:w}=e;const b=WL({delta:x,disabled:!a}),[N,k]=JD(),C=y.useRef({x:0,y:0}),S=y.useRef({x:0,y:0}),A=y.useMemo(()=>{switch(n){case Bi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Bi.DraggableRect:return i}},[n,i,p]),P=y.useRef(null),M=y.useCallback(()=>{const E=P.current;if(!E)return;const D=C.current.x*S.current.x,B=C.current.y*S.current.y;E.scrollBy(D,B)},[]),_=y.useMemo(()=>d===Za.TreeOrder?[...h].reverse():h,[d,h]);y.useEffect(()=>{if(!a||!h.length||!A){k();return}for(const E of _){if((o==null?void 0:o(E))===!1)continue;const D=h.indexOf(E),B=m[D];if(!B)continue;const{direction:q,speed:T}=TL(E,B,A,t,w);for(const I of["x","y"])b[I][q[I]]||(T[I]=0,q[I]=0);if(T.x>0||T.y>0){k(),P.current=E,N(M,c),C.current=T,S.current=q;return}}C.current={x:0,y:0},S.current={x:0,y:0},k()},[t,M,o,k,a,c,JSON.stringify(A),JSON.stringify(b),N,h,_,m,JSON.stringify(w)])}const HL={x:{[Mt.Backward]:!1,[Mt.Forward]:!1},y:{[Mt.Backward]:!1,[Mt.Forward]:!1}};function WL(e){let{delta:t,disabled:n}=e;const o=kf(t);return ul(i=>{if(n||!o||!i)return HL;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Mt.Backward]:i.x[Mt.Backward]||a.x===-1,[Mt.Forward]:i.x[Mt.Forward]||a.x===1},y:{[Mt.Backward]:i.y[Mt.Backward]||a.y===-1,[Mt.Forward]:i.y[Mt.Forward]||a.y===1}}},[n,t,o])}function VL(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return ul(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function qL(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 Xi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Xi||(Xi={}));var Nf;(function(e){e.Optimized="optimized"})(Nf||(Nf={}));const jy=new Map;function GL(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=Ki(x),b=y.useCallback(function(S){S===void 0&&(S=[]),!w.current&&c(A=>A===null?S:A.concat(S.filter(P=>!A.includes(P))))},[w]),N=y.useRef(null),k=ul(S=>{if(x&&!n)return jy;if(!S||S===jy||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 Dp(p(M),M):null;P.rect.current=_,_&&A.set(P.id,_)}return A}return S},[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:k,measureDroppableContainers:b,measuringScheduled:a!=null};function C(){switch(h){case Xi.Always:return!1;case Xi.BeforeDragging:return n;default:return!n}}}function zw(e,t){return ul(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function KL(e,t){return zw(e,t)}function YL(e){let{callback:t,disabled:n}=e;const o=Tp(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 Eu(e){let{callback:t,disabled:n}=e;const o=Tp(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 XL(e){return new Dp(Us(e),e)}function Cy(e,t,n){t===void 0&&(t=XL);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=YL({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=Eu({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 QL(e){const t=zw(e);return Aw(e,t)}const Ny=[];function JL(e){const t=y.useRef(e),n=ul(o=>e?o&&o!==Ny&&e&&t.current&&e.parentNode===t.current.parentNode?o:Ap(e):Ny,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function ZL(e){const[t,n]=y.useState(null),o=y.useRef(e),i=y.useCallback(a=>{const c=qd(a.target);c&&n(d=>d?(d.set(c,jf(c)),new Map(d)):null)},[]);return y.useEffect(()=>{const a=o.current;if(e!==a){c(a);const d=e.map(p=>{const h=qd(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,jf(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=qd(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>Ts(a,c),or):_w(e):or,[e,t])}function Ey(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const o=e!==or;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?Qa(e,n.current):or}function eI(e){y.useEffect(()=>{if(!Nu)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 tI(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 Fw(e){return y.useMemo(()=>e?CL(e):null,[e])}const Ry=[];function nI(e,t){t===void 0&&(t=Us);const[n]=e,o=Fw(n?yn(n):null),[i,a]=y.useState(Ry);function c(){a(()=>e.length?e.map(p=>Ow(p)?o:new Dp(t(p),p)):Ry)}const d=Eu({callback:c});return Sr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function rI(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return al(t)?t:e}function oI(e){let{measure:t}=e;const[n,o]=y.useState(null),i=y.useCallback(h=>{for(const{target:m}of h)if(al(m)){o(x=>{const w=t(m);return x?{...x,width:w.width,height:w.height}:w});break}},[t]),a=Eu({callback:i}),c=y.useCallback(h=>{const m=rI(h);a==null||a.disconnect(),m&&(a==null||a.observe(m)),o(m?t(m):null)},[t,a]),[d,p]=Xa(c);return y.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const sI=[{sensor:Op,options:{}},{sensor:Lp,options:{}}],iI={current:{}},$a={draggable:{measure:by},droppable:{measure:by,strategy:Xi.WhileDragging,frequency:Nf.Optimized},dragOverlay:{measure:Us}};class Ui 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 lI={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ui,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ja},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:$a,measureDroppableContainers:Ja,windowRect:null,measuringScheduled:!1},aI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ja,draggableNodes:new Map,over:null,measureDroppableContainers:Ja},Ru=y.createContext(aI),Bw=y.createContext(lI);function uI(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ui}}}function cI(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 Ui(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 Ui(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 Ui(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function dI(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=y.useContext(Ru),a=kf(o),c=kf(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!o&&a&&c!=null){if(!Pp(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=tL(m);if(x){x.focus();break}}})}},[o,t,i,c,a]),null}function fI(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function pI(e){return y.useMemo(()=>({draggable:{...$a.draggable,...e==null?void 0:e.draggable},droppable:{...$a.droppable,...e==null?void 0:e.droppable},dragOverlay:{...$a.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 hI(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=Aw(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=Dw(h);w&&w.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const Uw=y.createContext({...or,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 mI=y.memo(function(t){var n,o,i,a;let{id:c,accessibility:d,autoScroll:p=!0,children:h,sensors:m=sI,collisionDetection:x=yL,measuring:w,modifiers:b,...N}=t;const k=y.useReducer(cI,void 0,uI),[C,S]=k,[A,P]=lL(),[M,_]=y.useState(yo.Uninitialized),E=M===yo.Initialized,{draggable:{active:D,nodes:B,translate:q},droppable:{containers:T}}=C,I=D!=null?B.get(D):null,F=y.useRef({initial:null,translated:null}),W=y.useMemo(()=>{var st;return D!=null?{id:D,data:(st=I==null?void 0:I.data)!=null?st:iI,rect:F}:null},[D,I]),J=y.useRef(null),[G,te]=y.useState(null),[ie,X]=y.useState(null),se=Ki(N,Object.values(N)),R=cl("DndDescribedBy",c),$=y.useMemo(()=>T.getEnabled(),[T]),Q=pI(w),{droppableRects:L,measureDroppableContainers:pe,measuringScheduled:ve}=GL($,{dragging:E,dependencies:[q.x,q.y],config:Q.droppable}),de=VL(B,D),Pe=y.useMemo(()=>ie?Sf(ie):null,[ie]),ke=Gr(),Te=KL(de,Q.draggable.measure);hI({activeNode:D!=null?B.get(D):null,config:ke.layoutShiftCompensation,initialRect:Te,measure:Q.draggable.measure});const ee=Cy(de,Q.draggable.measure,Te),Ee=Cy(de?de.parentElement:null),je=y.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qe=T.getNodeFor((n=je.current.over)==null?void 0:n.id),yt=oI({measure:Q.dragOverlay.measure}),Bt=(o=yt.nodeRef.current)!=null?o:de,Ut=E?(i=yt.rect)!=null?i:ee:null,_t=!!(yt.nodeRef.current&&yt.rect),vn=QL(_t?null:ee),Dt=Fw(Bt?yn(Bt):null),pt=JL(E?Qe??de:null),Zt=nI(pt),An=fI(b,{transform:{x:q.x-vn.x,y:q.y-vn.y,scaleX:1,scaleY:1},activatorEvent:ie,active:W,activeNodeRect:ee,containerNodeRect:Ee,draggingNodeRect:Ut,over:je.current.over,overlayNodeRect:yt.rect,scrollableAncestors:pt,scrollableAncestorRects:Zt,windowRect:Dt}),vt=Pe?Ts(Pe,q):null,Nr=ZL(pt),lr=Ey(Nr),Z=Ey(Nr,[ee]),ae=Ts(An,lr),be=Ut?wL(Ut,An):null,Re=W&&be?x({active:W,collisionRect:be,droppableRects:L,droppableContainers:$,pointerCoordinates:vt}):null,U=mL(Re,"id"),[oe,Se]=y.useState(null),Fe=_t?An:Ts(An,Z),on=vL(Fe,(a=oe==null?void 0:oe.rect)!=null?a:null,ee),ct=y.useRef(null),We=y.useCallback((st,Ht)=>{let{sensor:Wt,options:Wn}=Ht;if(J.current==null)return;const en=B.get(J.current);if(!en)return;const Vt=st.nativeEvent,sn=new Wt({active:J.current,activeNode:en,event:Vt,options:Wn,context:je,onAbort(it){if(!B.get(it))return;const{onDragAbort:qt}=se.current,Vn={id:it};qt==null||qt(Vn),A({type:"onDragAbort",event:Vn})},onPending(it,Dn,qt,Vn){if(!B.get(it))return;const{onDragPending:ar}=se.current,bn={id:it,constraint:Dn,initialCoordinates:qt,offset:Vn};ar==null||ar(bn),A({type:"onDragPending",event:bn})},onStart(it){const Dn=J.current;if(Dn==null)return;const qt=B.get(Dn);if(!qt)return;const{onDragStart:Vn}=se.current,qn={activatorEvent:Vt,active:{id:Dn,data:qt.data,rect:F}};vo.unstable_batchedUpdates(()=>{Vn==null||Vn(qn),_(yo.Initializing),S({type:Et.DragStart,initialCoordinates:it,active:Dn}),A({type:"onDragStart",event:qn}),te(ct.current),X(Vt)})},onMove(it){S({type:Et.DragMove,coordinates:it})},onEnd:Er(Et.DragEnd),onCancel:Er(Et.DragCancel)});ct.current=sn;function Er(it){return async function(){const{active:qt,collisions:Vn,over:qn,scrollAdjustedTranslate:ar}=je.current;let bn=null;if(qt&&ar){const{cancelDrop:Rr}=se.current;bn={activatorEvent:Vt,active:qt,collisions:Vn,delta:ar,over:qn},it===Et.DragEnd&&typeof Rr=="function"&&await Promise.resolve(Rr(bn))&&(it=Et.DragCancel)}J.current=null,vo.unstable_batchedUpdates(()=>{S({type:it}),_(yo.Uninitialized),Se(null),te(null),X(null),ct.current=null;const Rr=it===Et.DragEnd?"onDragEnd":"onDragCancel";if(bn){const Hs=se.current[Rr];Hs==null||Hs(bn),A({type:Rr,event:bn})}})}}},[B]),qe=y.useCallback((st,Ht)=>(Wt,Wn)=>{const en=Wt.nativeEvent,Vt=B.get(Wn);if(J.current!==null||!Vt||en.dndKit||en.defaultPrevented)return;const sn={active:Vt};st(Wt,Ht.options,sn)===!0&&(en.dndKit={capturedBy:Ht.sensor},J.current=Wn,We(Wt,Ht))},[B,We]),ht=qL(m,qe);eI(m),Sr(()=>{ee&&M===yo.Initializing&&_(yo.Initialized)},[ee,M]),y.useEffect(()=>{const{onDragMove:st}=se.current,{active:Ht,activatorEvent:Wt,collisions:Wn,over:en}=je.current;if(!Ht||!Wt)return;const Vt={active:Ht,activatorEvent:Wt,collisions:Wn,delta:{x:ae.x,y:ae.y},over:en};vo.unstable_batchedUpdates(()=>{st==null||st(Vt),A({type:"onDragMove",event:Vt})})},[ae.x,ae.y]),y.useEffect(()=>{const{active:st,activatorEvent:Ht,collisions:Wt,droppableContainers:Wn,scrollAdjustedTranslate:en}=je.current;if(!st||J.current==null||!Ht||!en)return;const{onDragOver:Vt}=se.current,sn=Wn.get(U),Er=sn&&sn.rect.current?{id:sn.id,rect:sn.rect.current,data:sn.data,disabled:sn.disabled}:null,it={active:st,activatorEvent:Ht,collisions:Wt,delta:{x:en.x,y:en.y},over:Er};vo.unstable_batchedUpdates(()=>{Se(Er),Vt==null||Vt(it),A({type:"onDragOver",event:it})})},[U]),Sr(()=>{je.current={activatorEvent:ie,active:W,activeNode:de,collisionRect:be,collisions:Re,droppableRects:L,draggableNodes:B,draggingNode:Bt,draggingNodeRect:Ut,droppableContainers:T,over:oe,scrollableAncestors:pt,scrollAdjustedTranslate:ae},F.current={initial:Ut,translated:be}},[W,de,Re,be,B,Bt,Ut,L,T,oe,pt,ae]),UL({...ke,delta:q,draggingRect:be,pointerCoordinates:vt,scrollableAncestors:pt,scrollableAncestorRects:Zt});const qr=y.useMemo(()=>({active:W,activeNode:de,activeNodeRect:ee,activatorEvent:ie,collisions:Re,containerNodeRect:Ee,dragOverlay:yt,draggableNodes:B,droppableContainers:T,droppableRects:L,over:oe,measureDroppableContainers:pe,scrollableAncestors:pt,scrollableAncestorRects:Zt,measuringConfiguration:Q,measuringScheduled:ve,windowRect:Dt}),[W,de,ee,ie,Re,Ee,yt,B,T,L,oe,pe,pt,Zt,Q,ve,Dt]),Co=y.useMemo(()=>({activatorEvent:ie,activators:ht,active:W,activeNodeRect:ee,ariaDescribedById:{draggable:R},dispatch:S,draggableNodes:B,over:oe,measureDroppableContainers:pe}),[ie,ht,W,ee,S,R,B,oe,pe]);return ft.createElement(Pw.Provider,{value:P},ft.createElement(Ru.Provider,{value:Co},ft.createElement(Bw.Provider,{value:qr},ft.createElement(Uw.Provider,{value:on},h)),ft.createElement(dI,{disabled:(d==null?void 0:d.restoreFocus)===!1})),ft.createElement(cL,{...d,hiddenTextDescribedById:R}));function Gr(){const st=(G==null?void 0:G.autoScrollEnabled)===!1,Ht=typeof p=="object"?p.enabled===!1:p===!1,Wt=E&&!st&&!Ht;return typeof p=="object"?{...p,enabled:Wt}:{enabled:Wt}}}),gI=y.createContext(null),Ty="button",xI="Draggable";function yI(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=cl(xI),{activators:c,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:w}=y.useContext(Ru),{role:b=Ty,roleDescription:N="draggable",tabIndex:k=0}=i??{},C=(p==null?void 0:p.id)===t,S=y.useContext(C?Uw:gI),[A,P]=Xa(),[M,_]=Xa(),E=tI(c,t),D=Ki(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:k,"aria-disabled":o,"aria-pressed":C&&b===Ty?!0:void 0,"aria-roledescription":N,"aria-describedby":m.draggable}),[o,b,k,C,N,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:B,isDragging:C,listeners:o?void 0:E,node:A,over:w,setNodeRef:P,setActivatorNodeRef:_,transform:S}}function vI(){return y.useContext(Bw)}const bI="Droppable",wI={timeout:25};function kI(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=cl(bI),{active:c,dispatch:d,over:p,measureDroppableContainers:h}=y.useContext(Ru),m=y.useRef({disabled:n}),x=y.useRef(!1),w=y.useRef(null),b=y.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:C}={...wI,...i},S=Ki(k??o),A=y.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(S.current)?S.current:[S.current]),b.current=null},C)},[C]),P=Eu({callback:A,disabled:N||!c}),M=y.useCallback((B,q)=>{P&&(q&&(P.unobserve(q),x.current=!1),B&&P.observe(B))},[P]),[_,E]=Xa(M),D=Ki(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:E}}function Mp(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function SI(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function Ra(e){return e!==null&&e>=0}function jI(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 CI(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Hw=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=Mp(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}},Ta={scaleX:1,scaleY:1},NI=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,...Ta}:null}const p=EI(a,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Ta}:i<n&&i>=c?{x:0,y:d.height+p,...Ta}:{x:0,y:0,...Ta}};function EI(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 Ww="Sortable",Vw=ft.createContext({activeIndex:-1,containerId:Ww,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Hw,disabled:{draggable:!1,droppable:!1}});function RI(e){let{children:t,id:n,items:o,strategy:i=Hw,disabled:a=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=vI(),x=cl(Ww,n),w=d.rect!==null,b=y.useMemo(()=>o.map(E=>typeof E=="object"&&"id"in E?E.id:E),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,C=h?b.indexOf(h.id):-1,S=y.useRef(b),A=!jI(b,S.current),P=C!==-1&&k===-1||A,M=CI(a);Sr(()=>{A&&N&&m(b)},[A,b,N,m]),y.useEffect(()=>{S.current=b},[b]);const _=y.useMemo(()=>({activeIndex:k,containerId:x,disabled:M,disableTransforms:P,items:b,overIndex:C,useDragOverlay:w,sortedRects:SI(b,p),strategy:i}),[k,x,M.draggable,M.droppable,P,b,C,p,w,i]);return ft.createElement(Vw.Provider,{value:_},t)}const TI=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Mp(n,o,i).indexOf(t)},PI=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},AI={duration:200,easing:"ease"},qw="transform",DI=Yi.Transition.toString({property:qw,duration:0,easing:"linear"}),LI={roleDescription:"sortable"};function II(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=Us(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 OI(e){let{animateLayoutChanges:t=PI,attributes:n,disabled:o,data:i,getNewIndex:a=TI,id:c,strategy:d,resizeObserverConfig:p,transition:h=AI}=e;const{items:m,containerId:x,activeIndex:w,disabled:b,disableTransforms:N,sortedRects:k,overIndex:C,useDragOverlay:S,strategy:A}=y.useContext(Vw),P=MI(o,b),M=m.indexOf(c),_=y.useMemo(()=>({sortable:{containerId:x,index:M,items:m},...i}),[x,i,M,m]),E=y.useMemo(()=>m.slice(m.indexOf(c)),[m,c]),{rect:D,node:B,isOver:q,setNodeRef:T}=kI({id:c,data:_,disabled:P.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...p}}),{active:I,activatorEvent:F,activeNodeRect:W,attributes:J,setNodeRef:G,listeners:te,isDragging:ie,over:X,setActivatorNodeRef:se,transform:R}=yI({id:c,data:_,attributes:{...LI,...n},disabled:P.draggable}),$=QD(T,G),Q=!!I,L=Q&&!N&&Ra(w)&&Ra(C),pe=!S&&ie,ve=pe&&L?R:null,Pe=L?ve??(d??A)({rects:k,activeNodeRect:W,activeIndex:w,overIndex:C,index:M}):null,ke=Ra(w)&&Ra(C)?a({id:c,items:m,activeIndex:w,overIndex:C}):M,Te=I==null?void 0:I.id,ee=y.useRef({activeId:Te,items:m,newIndex:ke,containerId:x}),Ee=m!==ee.current.items,je=t({active:I,containerId:x,isDragging:ie,isSorting:Q,id:c,index:M,items:m,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:h,wasDragging:ee.current.activeId!=null}),Qe=II({disabled:!je,index:M,node:B,rect:D});return y.useEffect(()=>{Q&&ee.current.newIndex!==ke&&(ee.current.newIndex=ke),x!==ee.current.containerId&&(ee.current.containerId=x),m!==ee.current.items&&(ee.current.items=m)},[Q,ke,x,m]),y.useEffect(()=>{if(Te===ee.current.activeId)return;if(Te!=null&&ee.current.activeId==null){ee.current.activeId=Te;return}const Bt=setTimeout(()=>{ee.current.activeId=Te},50);return()=>clearTimeout(Bt)},[Te]),{active:I,activeIndex:w,attributes:J,data:_,rect:D,index:M,newIndex:ke,items:m,isOver:q,isSorting:Q,isDragging:ie,listeners:te,node:B,overIndex:C,over:X,setNodeRef:$,setActivatorNodeRef:se,setDroppableNodeRef:T,setDraggableNodeRef:G,transform:Qe??Pe,transition:yt()};function yt(){if(Qe||Ee&&ee.current.newIndex===M)return DI;if(!(pe&&!Pp(F)||!h)&&(Q||je))return Yi.Transition.toString({...h,property:qw})}}function MI(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}}Ue.Down,Ue.Right,Ue.Up,Ue.Left;function _I({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}=OI({id:e.id,disabled:a}),b={transform:Yi.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(Bj,{className:"h-4 w-4"})}),l.jsx(Ew,{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(Of,{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(Mf,{className:"h-3 w-3"})})]})]})}function $I(){const{workspace:e}=Pt(),t=e||"_global",{data:n,loading:o,error:i,refetch:a}=oN(t),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState(""),[N,k]=y.useState(null),C=!!(c.trim()||p||m),S=dL(yy(Op,{activationConstraint:{distance:8}}),yy(Lp));function A(I,F){I.stopPropagation(),navigator.clipboard.writeText(F),k(F),setTimeout(()=>k(W=>W===F?null:W),1500)}const P=y.useMemo(()=>{if(!(n!=null&&n.items))return[];const I=new Set;for(const F of n.items)for(const W of F.tags)I.add(W);return Array.from(I).sort()},[n]),M=y.useMemo(()=>{if(!(n!=null&&n.items))return[];let I=n.items;if(c.trim()){const F=c.toLowerCase();I=I.filter(W=>W.description.toLowerCase().includes(F)||W.tags.some(J=>J.toLowerCase().includes(F))||W.id.includes(F))}return p&&(I=I.filter(F=>F.status===p)),m&&(I=I.filter(F=>F.tags.includes(m))),I},[n,c,p,m]);async function _(){w.trim()&&(await Rv(t,w.trim()),b(""),a())}const E={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function D(I,F){B(I,E[F]||"open")}async function B(I,F){switch(F){case"open":await Dv(t,I);break;case"in_progress":await Av(t,I);break;case"completed":await Tv(t,I);break;case"blocked":await Pv(t,I);break}a()}async function q(I){const{active:F,over:W}=I;if(!W||F.id===W.id||!(n!=null&&n.items))return;const J=n.items.findIndex(ie=>ie.id===F.id),G=n.items.findIndex(ie=>ie.id===W.id);if(J===-1||G===-1)return;const te=Mp(n.items,J,G);await sN(t,te.map(ie=>ie.id)),a()}if(o)return l.jsx(kt,{label:"Loading todos..."});if(i)return l.jsx(St,{error:i});const T=(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(tt,{label:"Open",value:T.open,icon:br}),l.jsx(tt,{label:"In Progress",value:T.in_progress,icon:br,tone:"info"}),l.jsx(tt,{label:"Blocked",value:T.blocked,icon:el,tone:"warn"}),l.jsx(tt,{label:"Total",value:T.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:I=>b(I.target.value),onKeyDown:I=>I.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(tr,{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(ou,{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:I=>d(I.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:I=>h(I.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:I=>x(I.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(I=>l.jsxs("option",{value:I,children:["#",I]},I))]})]}),M.length===0?l.jsx(xt,{title:"No todos",description:"Add your first todo above."}):l.jsx(mI,{sensors:S,collisionDetection:gL,onDragEnd:q,children:l.jsx(RI,{items:M.map(I=>I.id),strategy:NI,children:l.jsx("div",{className:"space-y-1",children:M.map(I=>l.jsx(_I,{item:I,copiedId:N,onCycleStatus:D,onStatusChange:B,onCopyId:A,disabled:C},I.id))})})})]})}function zI(){return l.jsx(yj,{children:l.jsx(GS,{children:l.jsxs(Me,{element:l.jsx(rN,{}),children:[l.jsx(Me,{path:"/",element:l.jsx(uN,{})}),l.jsx(Me,{path:"/missions",element:l.jsx(Fg,{})}),l.jsx(Me,{path:"/assignments",element:l.jsx(Gx,{})}),l.jsx(Me,{path:"/attention",element:l.jsx(cN,{})}),l.jsx(Me,{path:"/servers",element:l.jsx(ry,{})}),l.jsx(Me,{path:"/agent-sessions",element:l.jsx(oy,{})}),l.jsx(Me,{path:"/playbooks",element:l.jsx(Z3,{})}),l.jsx(Me,{path:"/playbooks/create",element:l.jsx(t4,{})}),l.jsx(Me,{path:"/playbooks/:slug",element:l.jsx(e4,{})}),l.jsx(Me,{path:"/playbooks/:slug/edit",element:l.jsx(n4,{})}),l.jsx(Me,{path:"/todos",element:l.jsx(XD,{})}),l.jsx(Me,{path:"/help",element:l.jsx(fN,{})}),l.jsx(Me,{path:"/settings",element:l.jsx(YD,{})}),l.jsx(Me,{path:"/create/mission",element:l.jsx(Yx,{})}),l.jsx(Me,{path:"/missions/:slug",element:l.jsx(Tx,{})}),l.jsx(Me,{path:"/missions/:slug/edit",element:l.jsx(Qx,{})}),l.jsx(Me,{path:"/missions/:slug/create/assignment",element:l.jsx(Xx,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug",element:l.jsx(Ux,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/edit",element:l.jsx(Jx,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(Zx,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(ey,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ty,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(ny,{})}),l.jsx(Me,{path:"/w/:workspace/missions",element:l.jsx(Fg,{})}),l.jsx(Me,{path:"/w/:workspace/assignments",element:l.jsx(Gx,{})}),l.jsx(Me,{path:"/w/:workspace/servers",element:l.jsx(ry,{})}),l.jsx(Me,{path:"/w/:workspace/agent-sessions",element:l.jsx(oy,{})}),l.jsx(Me,{path:"/w/:workspace/todos",element:l.jsx($I,{})}),l.jsx(Me,{path:"/w/:workspace/create/mission",element:l.jsx(Yx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug",element:l.jsx(Tx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/edit",element:l.jsx(Qx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/create/assignment",element:l.jsx(Xx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug",element:l.jsx(Ux,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/edit",element:l.jsx(Jx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(Zx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(ey,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ty,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(ny,{})})]})})})}FC();Gk.createRoot(document.getElementById("root")).render(l.jsx(y.StrictMode,{children:l.jsx(BC,{children:l.jsx(zI,{})})}));export{x2 as _,FI as a,eu as g};