@yorz/cli 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +7880 -232
- package/dist/gui/assets/{abnfDiagram-VRR7QNED-ChpNHKmG.js → abnfDiagram-VRR7QNED-CrYeUOte.js} +1 -1
- package/dist/{gui-mobile/assets/arc-D5zxWTc6.js → gui/assets/arc-CK1IHklk.js} +1 -1
- package/dist/{gui-mobile/assets/architectureDiagram-ZJ3FMSHR-BUrFMtmN.js → gui/assets/architectureDiagram-ZJ3FMSHR-DS0tHUFk.js} +1 -1
- package/dist/{gui-mobile/assets/blockDiagram-677ZJIJ3-CLXT0p5K.js → gui/assets/blockDiagram-677ZJIJ3-D-8Jqcf1.js} +1 -1
- package/dist/gui/assets/{c4Diagram-LMCZKHZV-BijbkJk0.js → c4Diagram-LMCZKHZV-B9WpGrCh.js} +1 -1
- package/dist/gui/assets/channel-fKfbKk-f.js +1 -0
- package/dist/gui/assets/{chunk-2Q5K7J3B-Ds8H4SMx.js → chunk-2Q5K7J3B-BXPbdEl1.js} +1 -1
- package/dist/gui/assets/{chunk-32BRIVSS-CaodSuYb.js → chunk-32BRIVSS-C1pdycmz.js} +1 -1
- package/dist/gui/assets/{chunk-5VM5RSS4-Dk7weLtE.js → chunk-5VM5RSS4-DtHH-RDR.js} +1 -1
- package/dist/gui/assets/{chunk-EX3LRPZG-Dc4TtD4O.js → chunk-EX3LRPZG-BtTN5zGM.js} +1 -1
- package/dist/gui/assets/{chunk-JWPE2WC7-BXjLPdIx.js → chunk-JWPE2WC7-CraZ7jFm.js} +1 -1
- package/dist/gui/assets/{chunk-MOJQB5TN-Ct0R-MTA.js → chunk-MOJQB5TN-6YLCN06q.js} +1 -1
- package/dist/gui/assets/{chunk-RYQCIY6F-BkMMhSkU.js → chunk-RYQCIY6F-BzE4eMsx.js} +1 -1
- package/dist/gui/assets/{chunk-V7JOEXUC-CA_5lNDX.js → chunk-V7JOEXUC-BA6VvJW7.js} +1 -1
- package/dist/gui/assets/{chunk-VR4S4FIN-BP0qSlug.js → chunk-VR4S4FIN-BAmGiVuz.js} +1 -1
- package/dist/gui/assets/{chunk-XXDRQBXY-ChJ7HYsh.js → chunk-XXDRQBXY-BKC1-XCx.js} +1 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-CITnzF8D.js +1 -0
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-CITnzF8D.js +1 -0
- package/dist/{gui-mobile/assets/cose-bilkent-JH36ORCC-DQd0ag_q.js → gui/assets/cose-bilkent-JH36ORCC-BvD6Uroo.js} +1 -1
- package/dist/gui/assets/{cynefin-VYW2F7L2-BBIjNWwX.js → cynefin-VYW2F7L2-s57zhU6p.js} +1 -1
- package/dist/{gui-mobile/assets/cynefinDiagram-TSTJHNR4-Ca9ChAoZ.js → gui/assets/cynefinDiagram-TSTJHNR4-DzkTUDwa.js} +1 -1
- package/dist/gui/assets/{dagre-VKFMJZFB-CiENng6J.js → dagre-VKFMJZFB-DjWJJE-g.js} +1 -1
- package/dist/gui/assets/{diagram-FQU43EPY-BpAJWtF0.js → diagram-FQU43EPY-DHO7pQv_.js} +1 -1
- package/dist/{gui-mobile/assets/diagram-G47NLZAW-BUUkAM1L.js → gui/assets/diagram-G47NLZAW-csiX9SjI.js} +1 -1
- package/dist/gui/assets/{diagram-NH7WQ7WH-BETlyFIV.js → diagram-NH7WQ7WH-CfuNeWRi.js} +1 -1
- package/dist/{gui-mobile/assets/diagram-OA4YK3LP-Dz2X8j8T.js → gui/assets/diagram-OA4YK3LP-CGJ32JL-.js} +1 -1
- package/dist/gui/assets/{diagram-WEI45ONY-4xazks6b.js → diagram-WEI45ONY-DH3ax0Is.js} +1 -1
- package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-x6c2P9Gq.js → ebnfDiagram-CCIWWBDH-B6SHK8JJ.js} +1 -1
- package/dist/{gui-mobile/assets/erDiagram-Q63AITRT-C-3poaMf.js → gui/assets/erDiagram-Q63AITRT-C6i-kmp3.js} +1 -1
- package/dist/gui/assets/{flowDiagram-23GEKE2U-mlV2EfUY.js → flowDiagram-23GEKE2U-DMswtoKn.js} +1 -1
- package/dist/{gui-mobile/assets/ganttDiagram-NO4QXBWP-Bn7GJbzm.js → gui/assets/ganttDiagram-NO4QXBWP-C6Qg9XcC.js} +1 -1
- package/dist/{gui-mobile/assets/gitGraphDiagram-IHSO6WYX-DfLUxTzH.js → gui/assets/gitGraphDiagram-IHSO6WYX-DjCuEz1H.js} +1 -1
- package/dist/gui/assets/index-CIhgEaUY.js +41 -0
- package/dist/gui/assets/index-CMT0wDYi.css +1 -0
- package/dist/gui/assets/{infoDiagram-FWYZ7A6U-B4Uf4vez.js → infoDiagram-FWYZ7A6U-DGITj_zg.js} +1 -1
- package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-BF78753F.js → ishikawaDiagram-FXEZZL3T-CdRzC4A4.js} +1 -1
- package/dist/{gui-mobile/assets/journeyDiagram-5HDEW3XC-CA-AnD2i.js → gui/assets/journeyDiagram-5HDEW3XC-Q54lhDco.js} +1 -1
- package/dist/gui/assets/{kanban-definition-HUTT4EX6-C6Abp-Z0.js → kanban-definition-HUTT4EX6-DYJpKOTQ.js} +1 -1
- package/dist/gui/assets/{linear-4_sZdUed.js → linear-DGfkwvKs.js} +1 -1
- package/dist/{gui-mobile/assets/mermaid.core-CjlnyTvi.js → gui/assets/mermaid.core-DX3ME3Gu.js} +4 -4
- package/dist/gui/assets/{mindmap-definition-LN4V7U3C-EcN1F0cO.js → mindmap-definition-LN4V7U3C-BfEOpBp-.js} +1 -1
- package/dist/gui/assets/{pegDiagram-2B236MQR-giOW1xob.js → pegDiagram-2B236MQR-CZZa7YXj.js} +1 -1
- package/dist/gui/assets/{pieDiagram-ENE6RG2P-D9cIRAxf.js → pieDiagram-ENE6RG2P-DurYC9SU.js} +1 -1
- package/dist/{gui-mobile/assets/quadrantDiagram-ABIIQ3AL-DPM04b8X.js → gui/assets/quadrantDiagram-ABIIQ3AL-CSOBJ4IB.js} +1 -1
- package/dist/gui/assets/{railroadDiagram-RFXS5EU6-kp1xeMyA.js → railroadDiagram-RFXS5EU6-kbA9LTQm.js} +1 -1
- package/dist/gui/assets/{requirementDiagram-TGXJPOKE-yspWGQMw.js → requirementDiagram-TGXJPOKE-ndsf7XtF.js} +1 -1
- package/dist/{gui-mobile/assets/sankeyDiagram-HTMAVEWB-DIHqskb-.js → gui/assets/sankeyDiagram-HTMAVEWB-DN04tvg8.js} +1 -1
- package/dist/{gui-mobile/assets/sequenceDiagram-DBY2YBRQ-B91bF6fy.js → gui/assets/sequenceDiagram-DBY2YBRQ-FtH1Z6KB.js} +1 -1
- package/dist/gui/assets/{sizeCapture-X5ZJPWSS-F3cALp3d.js → sizeCapture-X5ZJPWSS-BAaAXER1.js} +1 -1
- package/dist/{gui-mobile/assets/stateDiagram-2N3HPSRC-ef4n7bGq.js → gui/assets/stateDiagram-2N3HPSRC-Dqylg-ne.js} +1 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CiOeyeHN.js +1 -0
- package/dist/gui/assets/{swimlanes-5IMT3BWC-UrlubmXy.js → swimlanes-5IMT3BWC-DBwtYS3s.js} +2 -2
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-B3BTHS8K.js +8 -0
- package/dist/{gui-mobile/assets/timeline-definition-FHXFAJF6-fXhjYYU8.js → gui/assets/timeline-definition-FHXFAJF6-u-GAtaA0.js} +1 -1
- package/dist/{gui-mobile/assets/vennDiagram-L72KCM5P-BxTJzmPG.js → gui/assets/vennDiagram-L72KCM5P-CttAUqWD.js} +1 -1
- package/dist/gui/assets/{wardleyDiagram-EHGQE667-DLRGPeZX.js → wardleyDiagram-EHGQE667-BlxTSzFj.js} +1 -1
- package/dist/{gui-mobile/assets/xychartDiagram-FW5EYKEG-OM8YLeYP.js → gui/assets/xychartDiagram-FW5EYKEG-DrVJPQFR.js} +1 -1
- package/dist/gui/index.html +2 -2
- package/dist/gui-mobile/assets/{abnfDiagram-VRR7QNED-Cii3YIsO.js → abnfDiagram-VRR7QNED-JLPocUqG.js} +1 -1
- package/dist/{gui/assets/arc-BSWQE9li.js → gui-mobile/assets/arc-COfmweHD.js} +1 -1
- package/dist/{gui/assets/architectureDiagram-ZJ3FMSHR-BGI0Ue9c.js → gui-mobile/assets/architectureDiagram-ZJ3FMSHR-BkZ1VA_q.js} +1 -1
- package/dist/{gui/assets/blockDiagram-677ZJIJ3-DzJ0su4P.js → gui-mobile/assets/blockDiagram-677ZJIJ3-JpHkO0Wz.js} +1 -1
- package/dist/gui-mobile/assets/{c4Diagram-LMCZKHZV-XZDjR7Pf.js → c4Diagram-LMCZKHZV-BLe_iPrE.js} +1 -1
- package/dist/gui-mobile/assets/channel-b0DL-38-.js +1 -0
- package/dist/gui-mobile/assets/{chunk-2Q5K7J3B-C0SSdrgO.js → chunk-2Q5K7J3B-D_frXelh.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-32BRIVSS-B-l29SGQ.js → chunk-32BRIVSS-B83effYC.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-5VM5RSS4-2Oc13ID8.js → chunk-5VM5RSS4-CX737N6B.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-EX3LRPZG-tRiKUhHg.js → chunk-EX3LRPZG-G2mf5xZI.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-JWPE2WC7-CWxLnmGK.js → chunk-JWPE2WC7-D7zYtK04.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-MOJQB5TN-CRo9axdS.js → chunk-MOJQB5TN-0BUSOQab.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-RYQCIY6F-BWk2tC2V.js → chunk-RYQCIY6F-5I_TeUoy.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-V7JOEXUC-CAf_TQ8c.js → chunk-V7JOEXUC-BREy0nxC.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-VR4S4FIN-Djvb-G48.js → chunk-VR4S4FIN-Dy1zyWZ4.js} +1 -1
- package/dist/gui-mobile/assets/{chunk-XXDRQBXY-DcdCewNm.js → chunk-XXDRQBXY-Bg6-c6Qf.js} +1 -1
- package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-AvXz3djV.js +1 -0
- package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-AvXz3djV.js +1 -0
- package/dist/{gui/assets/cose-bilkent-JH36ORCC-DH_K5WAp.js → gui-mobile/assets/cose-bilkent-JH36ORCC-C7_M9qXn.js} +1 -1
- package/dist/gui-mobile/assets/{cynefin-VYW2F7L2-O3JIjwWq.js → cynefin-VYW2F7L2-BOLzAqHz.js} +1 -1
- package/dist/{gui/assets/cynefinDiagram-TSTJHNR4-BRRBlTKf.js → gui-mobile/assets/cynefinDiagram-TSTJHNR4-CIOU13DS.js} +1 -1
- package/dist/gui-mobile/assets/{dagre-VKFMJZFB-Dz84jzyH.js → dagre-VKFMJZFB-D-ecL80C.js} +1 -1
- package/dist/gui-mobile/assets/{diagram-FQU43EPY-Ddl2aZsD.js → diagram-FQU43EPY-CNTwHBWL.js} +1 -1
- package/dist/{gui/assets/diagram-G47NLZAW-VQzk2Zt3.js → gui-mobile/assets/diagram-G47NLZAW-BM_BelhC.js} +1 -1
- package/dist/gui-mobile/assets/{diagram-NH7WQ7WH-Bhp3-t7h.js → diagram-NH7WQ7WH-BUwDIsS8.js} +1 -1
- package/dist/{gui/assets/diagram-OA4YK3LP-D7kweveS.js → gui-mobile/assets/diagram-OA4YK3LP-JcSk2C_o.js} +1 -1
- package/dist/gui-mobile/assets/{diagram-WEI45ONY-m28jBgF4.js → diagram-WEI45ONY-B-fjr5re.js} +1 -1
- package/dist/gui-mobile/assets/{ebnfDiagram-CCIWWBDH-Dh-_tj-T.js → ebnfDiagram-CCIWWBDH-BGnydm6_.js} +1 -1
- package/dist/{gui/assets/erDiagram-Q63AITRT-Dwu_NmfY.js → gui-mobile/assets/erDiagram-Q63AITRT-Byu_Rwop.js} +1 -1
- package/dist/gui-mobile/assets/{flowDiagram-23GEKE2U-BopsgXAH.js → flowDiagram-23GEKE2U-jgL6WoKv.js} +1 -1
- package/dist/{gui/assets/ganttDiagram-NO4QXBWP-sRHt6-K7.js → gui-mobile/assets/ganttDiagram-NO4QXBWP-CI93wXBa.js} +1 -1
- package/dist/{gui/assets/gitGraphDiagram-IHSO6WYX-DAmAE7m_.js → gui-mobile/assets/gitGraphDiagram-IHSO6WYX-BJ_nuBd0.js} +1 -1
- package/dist/gui-mobile/assets/index-BVmT9d8v.css +1 -0
- package/dist/gui-mobile/assets/index-DyXwB098.js +33 -0
- package/dist/gui-mobile/assets/{infoDiagram-FWYZ7A6U-nrBaoqsE.js → infoDiagram-FWYZ7A6U-CJibpy_Q.js} +1 -1
- package/dist/gui-mobile/assets/{ishikawaDiagram-FXEZZL3T-DEVq4aJ1.js → ishikawaDiagram-FXEZZL3T-D0S3Vt67.js} +1 -1
- package/dist/{gui/assets/journeyDiagram-5HDEW3XC-BO6V3zi-.js → gui-mobile/assets/journeyDiagram-5HDEW3XC-CCQUeaBl.js} +1 -1
- package/dist/gui-mobile/assets/{kanban-definition-HUTT4EX6-BtUD4217.js → kanban-definition-HUTT4EX6-um86jGro.js} +1 -1
- package/dist/gui-mobile/assets/{linear-Cs1nDCen.js → linear-BrsI8EQu.js} +1 -1
- package/dist/{gui/assets/mermaid.core-BoPHxIg3.js → gui-mobile/assets/mermaid.core-Ce5BT8um.js} +4 -4
- package/dist/gui-mobile/assets/{mindmap-definition-LN4V7U3C-DpHq0ntz.js → mindmap-definition-LN4V7U3C-D7k6lr49.js} +1 -1
- package/dist/gui-mobile/assets/{pegDiagram-2B236MQR-UB1lVTuX.js → pegDiagram-2B236MQR-By5xMbhy.js} +1 -1
- package/dist/gui-mobile/assets/{pieDiagram-ENE6RG2P-7qkPFOFY.js → pieDiagram-ENE6RG2P-But7YjGM.js} +1 -1
- package/dist/{gui/assets/quadrantDiagram-ABIIQ3AL-1jwzcF1N.js → gui-mobile/assets/quadrantDiagram-ABIIQ3AL-Xxhp6_og.js} +1 -1
- package/dist/gui-mobile/assets/{railroadDiagram-RFXS5EU6-BY7DXXsK.js → railroadDiagram-RFXS5EU6-BmkHpadn.js} +1 -1
- package/dist/gui-mobile/assets/{requirementDiagram-TGXJPOKE-RJuz8ezU.js → requirementDiagram-TGXJPOKE-COMUfFqo.js} +1 -1
- package/dist/{gui/assets/sankeyDiagram-HTMAVEWB-Ylm3QxdV.js → gui-mobile/assets/sankeyDiagram-HTMAVEWB-D0R0Hop4.js} +1 -1
- package/dist/{gui/assets/sequenceDiagram-DBY2YBRQ-CJJnMk2d.js → gui-mobile/assets/sequenceDiagram-DBY2YBRQ-BGHdIcMx.js} +1 -1
- package/dist/gui-mobile/assets/{sizeCapture-X5ZJPWSS-Bb8LgAbm.js → sizeCapture-X5ZJPWSS-ezvhQ5Pa.js} +1 -1
- package/dist/{gui/assets/stateDiagram-2N3HPSRC-D7aZ2O-l.js → gui-mobile/assets/stateDiagram-2N3HPSRC-CIzjXICR.js} +1 -1
- package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-DTtHdFA8.js +1 -0
- package/dist/gui-mobile/assets/{swimlanes-5IMT3BWC-ZdNv29bw.js → swimlanes-5IMT3BWC-wbW6WqXw.js} +2 -2
- package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-D5GWDdWx.js +8 -0
- package/dist/{gui/assets/timeline-definition-FHXFAJF6-Bl_hCpye.js → gui-mobile/assets/timeline-definition-FHXFAJF6-YrGI_5H1.js} +1 -1
- package/dist/{gui/assets/vennDiagram-L72KCM5P-CvGLve2y.js → gui-mobile/assets/vennDiagram-L72KCM5P-5RkEJIG2.js} +1 -1
- package/dist/gui-mobile/assets/{wardleyDiagram-EHGQE667-CiAx3NHL.js → wardleyDiagram-EHGQE667-BAsFEvF1.js} +1 -1
- package/dist/{gui/assets/xychartDiagram-FW5EYKEG-bB6p1K59.js → gui-mobile/assets/xychartDiagram-FW5EYKEG-FFBIfd0q.js} +1 -1
- package/dist/gui-mobile/index.html +2 -2
- package/dist/gui-mobile/sw.js +2 -1
- package/package.json +10 -2
- package/dist/gui/assets/channel-S36nQ2lf.js +0 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-DfrKIwL2.js +0 -1
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DfrKIwL2.js +0 -1
- package/dist/gui/assets/index-C3kFbt2F.js +0 -34
- package/dist/gui/assets/index-CF8GzEat.css +0 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-D8vtVO10.js +0 -1
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BAhohxIt.js +0 -8
- package/dist/gui-mobile/assets/channel-DAACRh1k.js +0 -1
- package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-k67r25Hl.js +0 -1
- package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-k67r25Hl.js +0 -1
- package/dist/gui-mobile/assets/index--agUQ6GR.js +0 -33
- package/dist/gui-mobile/assets/index-CNDPS9z2.css +0 -1
- package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-D5KNiKni.js +0 -1
- package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-CTHOZVwF.js +0 -8
- package/dist/gui-mobile/workbox-9c191d2f.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Ke={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Fd(this.context.count)},getNextContextId(){return Fd(this.context.count++)}};function Fd(e){const t=String(e),n=t.length-1;return Ke.context.id+(n?String.fromCharCode(96+n):"")+t}function di(e){Ke.context=e}const uv=!1,cv=(e,t)=>e===t,Un=Symbol("solid-proxy"),Hh=typeof Proxy=="function",xi=Symbol("solid-track"),Bs={equals:cv};let Gh=Xh;const Kn=1,_i=2,Vh={owned:null,cleanups:null,context:null,owner:null},eu={};var Ye=null;let xe=null,lv=null,nt=null,Zt=null,Yt=null,da=0;function On(e,t){const n=nt,r=Ye,o=e.length===0,i=t===void 0?r:t,s=o?Vh:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ft(()=>jr(s)));Ye=s,nt=null;try{return _n(a,!0)}finally{nt=n,Ye=r}}function I(e,t){t=t?Object.assign({},Bs,t):Bs;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(xe&&xe.running&&xe.sources.has(n)?o=o(n.tValue):o=o(n.value)),Zh(n,o));return[Yh.bind(n),r]}function qc(e,t,n){const r=ga(e,t,!0,Kn);Jo(r)}function Me(e,t,n){const r=ga(e,t,!1,Kn);Jo(r)}function se(e,t,n){Gh=hv;const r=ga(e,t,!1,Kn),o=fo&&st(fo);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Yt?Yt.push(r):Jo(r)}function ie(e,t,n){n=n?Object.assign({},Bs,n):Bs;const r=ga(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Jo(r),Yh.bind(r)}function dv(e){return e&&typeof e=="object"&&"then"in e}function Jt(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=eu,u=null,c=!1,l=!1,d="initialValue"in i,g=typeof r=="function"&&ie(r);const p=new Set,[h,m]=(i.storage||I)(i.initialValue),[v,y]=I(void 0),[b,w]=I(void 0,{equals:!1}),[_,C]=I(d?"ready":"unresolved");Ke.context&&(u=Ke.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Ke.load&&Ke.has(u)&&(a=Ke.load(u)));function k(R,L,M,D){return s===R&&(s=null,D!==void 0&&(d=!0),(R===a||L===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(D,{value:L})),a=eu,xe&&R&&c?(xe.promises.delete(R),c=!1,_n(()=>{xe.running=!0,T(L,M)},!1)):T(L,M)),L}function T(R,L){_n(()=>{L===void 0&&m(()=>R),C(L!==void 0?"errored":d?"ready":"unresolved"),y(L);for(const M of p.keys())M.decrement();p.clear()},!1)}function S(){const R=fo&&st(fo),L=h(),M=v();if(M!==void 0&&!s)throw M;return nt&&!nt.user&&R&&qc(()=>{b(),s&&(R.resolved&&xe&&c?xe.promises.add(s):p.has(R)||(R.increment(),p.add(R)))}),L}function A(R=!0){if(R!==!1&&l)return;l=!1;const L=g?g():r;if(c=xe&&xe.running,L==null||L===!1){k(s,ft(h));return}xe&&s&&xe.promises.delete(s);let M;const D=a!==eu?a:ft(()=>{try{return o(L,{value:h(),refetching:R})}catch(F){M=F}});if(M!==void 0){k(s,void 0,Ns(M),L);return}else if(!dv(D))return k(s,D,void 0,L),D;return s=D,"v"in D?(D.s===1?k(s,D.v,void 0,L):k(s,void 0,Ns(D.v),L),D):(l=!0,queueMicrotask(()=>l=!1),_n(()=>{C(d?"refreshing":"pending"),w()},!1),D.then(F=>k(D,F,void 0,L),F=>k(D,void 0,Ns(F),L)))}Object.defineProperties(S,{state:{get:()=>_()},error:{get:()=>v()},loading:{get(){const R=_();return R==="pending"||R==="refreshing"}},latest:{get(){if(!d)return S();const R=v();if(R&&!s)throw R;return h()}}});let N=Ye;return g?qc(()=>(N=Ye,A(!1))):A(!1),[S,{refetch:R=>fa(N,()=>A(R)),mutate:m}]}function Sl(e){return _n(e,!1)}function ft(e){if(nt===null)return e();const t=nt;nt=null;try{return e()}finally{nt=t}}function wt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const u=ft(()=>t(a,o,s));return o=a,u}}function Nn(e){se(()=>ft(e))}function ae(e){return Ye===null||(Ye.cleanups===null?Ye.cleanups=[e]:Ye.cleanups.push(e)),e}function Hc(){return nt}function Ei(){return Ye}function fa(e,t){const n=Ye,r=nt;Ye=e,nt=null;try{return _n(t,!0)}catch(o){kl(o)}finally{Ye=n,nt=r}}function Wh(e){if(xe&&xe.running)return e(),xe.done;const t=nt,n=Ye;return Promise.resolve().then(()=>{nt=t,Ye=n;let r;return fo&&(r=xe||(xe={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),_n(e,!1),nt=Ye=null,r?r.done:void 0})}const[XL,Bd]=I(!1);function fv(e){Yt.push.apply(Yt,e),e.length=0}function ut(e,t){const n=Symbol("context");return{id:n,Provider:mv(n),defaultValue:e}}function st(e){let t;return Ye&&Ye.context&&(t=Ye.context[e.id])!==void 0?t:e.defaultValue}function Xo(e){const t=ie(e),n=ie(()=>Gc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let fo;function gv(){return fo||(fo=ut())}function Yh(){const e=xe&&xe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Kn)Jo(this);else{const t=Zt;Zt=null,_n(()=>Us(this),!1),Zt=t}if(nt){const t=this.observers;if(!t||t[t.length-1]!==nt){const n=t?t.length:0;nt.sources?(nt.sources.push(this),nt.sourceSlots.push(n)):(nt.sources=[this],nt.sourceSlots=[n]),t?(t.push(nt),this.observerSlots.push(nt.sources.length-1)):(this.observers=[nt],this.observerSlots=[nt.sources.length-1])}}return e&&xe.sources.has(this)?this.tValue:this.value}function Zh(e,t,n){let r=xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(xe){const o=xe.running;(o||!n&&xe.sources.has(e))&&(xe.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&_n(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=xe&&xe.running;s&&xe.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Zt.push(i):Yt.push(i),i.observers&&Jh(i)),s?i.tState=Kn:i.state=Kn)}if(Zt.length>1e6)throw Zt=[],new Error},!1)}return t}function Jo(e){if(!e.fn)return;jr(e);const t=da;zd(e,xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value,t),xe&&!xe.running&&xe.sources.has(e)&&queueMicrotask(()=>{_n(()=>{xe&&(xe.running=!0),nt=Ye=e,zd(e,e.tValue,t),nt=Ye=null},!1)})}function zd(e,t,n){let r;const o=Ye,i=nt;nt=Ye=e;try{r=e.fn(t)}catch(s){return e.pure&&(xe&&xe.running?(e.tState=Kn,e.tOwned&&e.tOwned.forEach(jr),e.tOwned=void 0):(e.state=Kn,e.owned&&e.owned.forEach(jr),e.owned=null)),e.updatedAt=n+1,kl(s)}finally{nt=i,Ye=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Zh(e,r,!0):xe&&xe.running&&e.pure?(xe.sources.has(e)||(e.value=r),xe.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ga(e,t,n,r=Kn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ye,context:Ye?Ye.context:null,pure:n};return xe&&xe.running&&(i.state=0,i.tState=r),Ye===null||Ye!==Vh&&(xe&&xe.running&&Ye.pure?Ye.tOwned?Ye.tOwned.push(i):Ye.tOwned=[i]:Ye.owned?Ye.owned.push(i):Ye.owned=[i]),i}function zs(e){const t=xe&&xe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===_i)return Us(e);if(e.suspense&&ft(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<da);){if(t&&xe.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(xe.disposed.has(o))return}if((t?e.tState:e.state)===Kn)Jo(e);else if((t?e.tState:e.state)===_i){const o=Zt;Zt=null,_n(()=>Us(e,n[0]),!1),Zt=o}}}function _n(e,t){if(Zt)return e();let n=!1;t||(Zt=[]),Yt?n=!0:Yt=[],da++;try{const r=e();return pv(n),r}catch(r){n||(Yt=null),Zt=null,kl(r)}}function pv(e){if(Zt&&(Xh(Zt),Zt=null),e)return;let t;if(xe){if(!xe.promises.size&&!xe.queue.size){const r=xe.sources,o=xe.disposed;Yt.push.apply(Yt,xe.effects),t=xe.resolve;for(const i of Yt)"tState"in i&&(i.state=i.tState),delete i.tState;xe=null,_n(()=>{for(const i of o)jr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)jr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Bd(!1)},!1)}else if(xe.running){xe.running=!1,xe.effects.push.apply(xe.effects,Yt),Yt=null,Bd(!0);return}}const n=Yt;Yt=null,n.length&&_n(()=>Gh(n),!1),t&&t()}function Xh(e){for(let t=0;t<e.length;t++)zs(e[t])}function hv(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:zs(r)}if(Ke.context){if(Ke.count){Ke.effects||(Ke.effects=[]),Ke.effects.push(...e.slice(0,n));return}di()}for(Ke.effects&&(Ke.done||!Ke.count)&&(e=[...Ke.effects,...e],n+=Ke.effects.length,delete Ke.effects),t=0;t<n;t++)zs(e[t])}function Us(e,t){const n=xe&&xe.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===Kn?o!==t&&(!o.updatedAt||o.updatedAt<da)&&zs(o):i===_i&&Us(o,t)}}}function Jh(e){const t=xe&&xe.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=_i:r.state=_i,r.pure?Zt.push(r):Yt.push(r),r.observers&&Jh(r))}}function jr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)jr(e.tOwned[t]);delete e.tOwned}if(xe&&xe.running&&e.pure)Qh(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)jr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}xe&&xe.running?e.tState=0:e.state=0}function Qh(e,t){if(t||(e.tState=0,xe.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Qh(e.owned[n])}function Ns(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function kl(e,t=Ye){throw Ns(e)}function Gc(e){if(typeof e=="function"&&!e.length)return Gc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Gc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function mv(e,t){return function(r){let o;return Me(()=>o=ft(()=>(Ye.context={...Ye.context,[e]:r.value},Xo(()=>r.children))),void 0),o}}const Vc=Symbol("fallback");function Ks(e){for(let t=0;t<e.length;t++)e[t]()}function bv(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>Ks(i)),()=>{let u=e()||[],c=u.length,l,d;return u[xi],ft(()=>{let p,h,m,v,y,b,w,_,C;if(c===0)s!==0&&(Ks(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Vc],o[0]=On(k=>(i[0]=k,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=On(g);s=c}else{for(m=new Array(c),v=new Array(c),a&&(y=new Array(c)),b=0,w=Math.min(s,c);b<w&&r[b]===u[b];b++);for(w=s-1,_=c-1;w>=b&&_>=b&&r[w]===u[_];w--,_--)m[_]=o[w],v[_]=i[w],a&&(y[_]=a[w]);for(p=new Map,h=new Array(_+1),d=_;d>=b;d--)C=u[d],l=p.get(C),h[d]=l===void 0?-1:l,p.set(C,d);for(l=b;l<=w;l++)C=r[l],d=p.get(C),d!==void 0&&d!==-1?(m[d]=o[l],v[d]=i[l],a&&(y[d]=a[l]),d=h[d],p.set(C,d)):i[l]();for(d=b;d<c;d++)d in m?(o[d]=m[d],i[d]=v[d],a&&(a[d]=y[d],a[d](d))):o[d]=On(g);o=o.slice(0,s=c),r=u.slice(0)}return o});function g(p){if(i[d]=p,a){const[h,m]=I(d);return a[d]=m,t(u[d],h)}return t(u[d])}}}function yv(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,u;return ae(()=>Ks(i)),()=>{const c=e()||[],l=c.length;return c[xi],ft(()=>{if(l===0)return a!==0&&(Ks(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[Vc],o[0]=On(g=>(i[0]=g,n.fallback())),a=1),o;for(r[0]===Vc&&(i[0](),i=[],r=[],o=[],a=0),u=0;u<l;u++)u<r.length&&r[u]!==c[u]?s[u](()=>c[u]):u>=r.length&&(o[u]=On(d));for(;u<r.length;u++)i[u]();return a=s.length=i.length=l,r=c.slice(0),o=o.slice(0,a)});function d(g){i[u]=g;const[p,h]=I(c[u]);return s[u]=h,t(p,u)}}}function f(e,t){return ft(()=>e(t||{}))}function hs(){return!0}const Wc={get(e,t,n){return t===Un?n:e.get(t)},has(e,t){return t===Un?!0:e.has(t)},set:hs,deleteProperty:hs,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:hs,deleteProperty:hs}},ownKeys(e){return e.keys()}};function tu(e){return(e=typeof e=="function"?e():e)?e:{}}function vv(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function H(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&Un in a,e[s]=typeof a=="function"?(t=!0,ie(a)):a}if(Hh&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=tu(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in tu(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(tu(e[a])));return[...new Set(s)]}},Wc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:vv.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const g=n[l];g&&(d.get?g.push(d.get.bind(a)):d.value!==void 0&&g.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function de(e,...t){const n=t.length;if(Hh&&Un in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Wc));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},Wc)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let wv=0;function Rt(){return Ke.context?Ke.getNextContextId():`cl-${wv++}`}const em=e=>`Stale read from <${e}>.`;function rt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ie(bv(()=>e.each,e.children,t||void 0))}function Yc(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ie(yv(()=>e.each,e.children,t||void 0))}function q(e){const t=e.keyed,n=ie(()=>e.when,void 0,void 0),r=t?n:ie(n,void 0,{equals:(o,i)=>!o==!i});return ie(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?ft(()=>i(t?o:()=>{if(!ft(r))throw em("Show");return n()})):i}return e.fallback},void 0,void 0)}function xv(e){const t=Xo(()=>e.children),n=ie(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,u=o[s],c=i,l=ie(()=>c()?void 0:u.when,void 0,void 0),d=u.keyed?l:ie(l,void 0,{equals:(g,p)=>!g==!p});i=()=>c()||(d()?[a,l,u]:void 0)}return i});return ie(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?ft(()=>a(s.keyed?i():()=>{if(ft(n)()?.[0]!==o)throw em("Match");return i()})):a},void 0,void 0)}function Ud(e){return e}const _v=ut();function pa(e){let t=0,n,r,o,i,s;const[a,u]=I(!1),c=gv(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Ei();if(Ke.context&&Ke.load){const h=Ke.getContextId();let m=Ke.load(h);if(m&&(typeof m!="object"||m.s!==1?o=m:Ke.gather(h)),o&&o!=="$$f"){const[v,y]=I(void 0,{equals:!1});i=v,o.then(()=>{if(Ke.done)return y();Ke.gather(h),di(r),y(),di()},b=>{s=b,y()})}}const g=st(_v);g&&(n=g.register(l.inFallback));let p;return ae(()=>p&&p()),f(c.Provider,{value:l,get children(){return ie(()=>{if(s)throw s;if(r=Ke.context,i)return i(),i=void 0;r&&o==="$$f"&&di();const h=ie(()=>e.children);return ie(m=>{const v=l.inFallback(),{showContent:y=!0,showFallback:b=!0}=n?n():{};if((!v||o&&o!=="$$f")&&y)return l.resolved=!0,p&&p(),p=r=o=void 0,fv(l.effects),h();if(b)return p?m:On(w=>(p=w,r&&(di({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Ev=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Cv=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Ev]),Sv=new Set(["innerHTML","textContent","innerText","children"]),kv=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Av=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Tv(e,t){const n=Av[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Dv=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Iv=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Rv={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Z=e=>ie(()=>e());function Ov(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,g=1,p;for(;++d<o&&d<i&&!((p=c.get(t[d]))==null||p!==l+g);)g++;if(g>l-a){const h=t[s];for(;a<l;)e.insertBefore(n[a++],h)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Kd="_$DX_DELEGATE";function Nv(e,t,n,r={}){let o;return On(i=>{o=i,t===document?e():x(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function $(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>ft(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Qt(e,t=window.document){const n=t[Kd]||(t[Kd]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,zv))}}function Be(e,t,n){ho(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Mv(e,t,n,r){ho(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Pv(e,t,n){ho(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function _t(e,t){ho(e)||(t==null?e.removeAttribute("class"):e.className=t)}function js(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Lv(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(jd(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(jd(e,a,!0),n[a]=u)}return n}function Ho(e,t,n){if(!t)return n?Be(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Ci(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function fr(e,t={},n,r){const o={};return r||Me(()=>o.children=Si(e,t.children,o.children)),Me(()=>typeof t.ref=="function"&&jn(t.ref,e)),Me(()=>$v(e,t,n,!0,o,!0)),o}function jn(e,t,n){return ft(()=>e(t,n))}function x(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Si(e,t,r,n);Me(o=>Si(e,t(),o,n),r)}function $v(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=qd(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=qd(e,s,a,o[s],n,i,t)}}function Fv(e){let t,n;return!ho()||!(t=Ke.registry.get(n=Uv()))?e():(Ke.completed&&Ke.completed.add(t),Ke.registry.delete(n),t)}function ho(e){return!!Ke.context&&!Ke.done&&(!e||e.isConnected)}function Bv(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function jd(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function qd(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return Ho(e,n,r);if(t==="classList")return Lv(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);r&&e.removeEventListener(g,r,typeof r!="function"&&r),n&&e.addEventListener(g,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);r&&e.removeEventListener(g,r,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),p=Dv.has(g);if(!p&&r){const h=Array.isArray(r)?r[0]:r;e.removeEventListener(g,h)}(p||n)&&(js(e,g,n,p),p&&Qt([g]))}else if(t.slice(0,5)==="attr:")Be(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Pv(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Sv.has(t))||!o&&((l=Tv(t,e.tagName))||(u=Cv.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(ho(e))return n;t==="class"||t==="className"?_t(e,n):a&&!u&&!c?e[Bv(t)]=n:e[l||t]=n}else{const g=o&&t.indexOf(":")>-1&&Rv[t.split(":")[0]];g?Mv(e,g,t,n):Be(e,kv[t]||t,n)}return n}function zv(e){if(Ke.registry&&Ke.events&&Ke.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ke.registry&&!Ke.done&&(Ke.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Si(e,t,n,r,o){const i=ho(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=ko(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=ko(e,n,r)}else{if(s==="function")return Me(()=>{let u=t();for(;typeof u=="function";)u=u();n=Si(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(Zc(u,t,n,o))return Me(()=>n=Si(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=ko(e,n,r),a)return n}else c?n.length===0?Hd(e,u,r):Ov(e,n,u):(n&&ko(e),Hd(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=ko(e,n,r,t);ko(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Zc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Zc(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Zc(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function Hd(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function ko(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Uv(){return Ke.getNextContextId()}const Kv=!1,jv="http://www.w3.org/2000/svg";function tm(e,t=!1,n=void 0){return t?document.createElementNS(jv,e):document.createElement(e,{is:n})}function Ki(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Ei();let i,s=!!Ke.context;return se(()=>{s&&(Ei().user=s=!1),i||(i=fa(o,()=>ie(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=I(!1),l=()=>c(!0);On(d=>x(a,()=>u()?d():i(),null)),ae(l)}else{const u=tm(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),x(c,i),a.appendChild(u),e.ref&&e.ref(u),ae(()=>a.removeChild(u))}},void 0,{render:!s}),n}function qv(e,t){const n=ie(e);return ie(()=>{const r=n();switch(typeof r){case"function":return ft(()=>r(t));case"string":const o=Iv.has(r),i=Ke.context?Fv():tm(r,o,ft(()=>t.is));return fr(i,t,o),i}})}function nm(e){const[,t]=de(e,["component"]);return qv(()=>e.component,t)}function rm(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let Xc;function Al(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Xc=window.history.state._depth}Al();function Hv(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Gv(e,t){let n=!1;return()=>{const r=Xc;Al();const o=r==null?null:Xc-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Vv=/^(?:[a-z0-9]+:)?\/\//i,Wv=/^\/+|(\/)\/+$/g,om="http://sr";function co(e,t=!1){const n=e.replace(Wv,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ms(e,t,n){if(Vv.test(t))return;const r=co(e),o=n&&co(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+co(t,!i)}function Yv(e,t){if(e==null)throw new Error(t);return e}function Zv(e,t){return co(e).replace(/\/*(\*.*)?$/g,"")+co(t)}function im(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Xv(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=g=>n===void 0?void 0:n[g];for(let g=0;g<s;g++){const p=i[g],h=p[0]===":",m=h?u[g]:u[g].toLowerCase(),v=h?p.slice(1):p.toLowerCase();if(h&&nu(m,d(v)))l.params[v]=m;else if(h||!nu(m,v))return null;l.path+=`/${m}`}if(o){const g=c?u.slice(-c).join("/"):"";if(nu(g,d(o)))l.params[o]=g;else return null}return l}}function nu(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Jv(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function sm(e){const t=new Map,n=Ei();return new Proxy({},{get(r,o){return t.has(o)||fa(n,()=>t.set(o,ie(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function am(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return am(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Qv=100,um=ut(),Tl=ut(),mo=()=>Yv(st(um),"<A> and 'use' router primitives can be only used inside a Route."),ew=()=>st(Tl)||mo().base,tw=e=>{const t=ew();return ie(()=>t.resolvePath(e()))},nw=e=>{const t=mo();return ie(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Yr=()=>mo().navigatorFactory(),Qo=()=>mo().location,rw=()=>mo().isRouting,ji=()=>mo().params,ow=e=>{const t=mo().beforeLeave.subscribe({listener:e,location:Qo(),navigate:Yr()});ae(t)};function iw(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return cm(e.path).reduce((c,l)=>{for(const d of am(l)){const g=Zv(t,d);let p=a?g:g.split("/*",1)[0];p=p.split("/").map(h=>h.startsWith(":")||h.startsWith("*")?h:encodeURIComponent(h)).join("/"),c.push({...u,originalPath:l,pattern:p,matcher:Xv(p,!a,e.matchFilters)})}return c},[])}function sw(e,t=0){return{routes:e,score:Jv(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function cm(e){return Array.isArray(e)?e:[e]}function lm(e,t="",n=[],r=[]){const o=cm(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=iw(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)lm(a.children,c.pattern,n,r);else{const d=sw([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function ru(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function aw(e,t,n){const r=new URL(om),o=ie(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=ie(()=>o().pathname),s=ie(()=>o().search,!0),a=ie(()=>o().hash),u=()=>"",c=wt(s,()=>im(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):sm(c)}}let ao;function uw(){return ao}function cw(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(D=>D),u=s.renderPath||(D=>D),c=s.beforeLeave||rm(),l=Ms("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,g]=I(!1);let p;const h=(D,F)=>{F.value===m()&&F.state===y()||(p===void 0&&g(!0),ao=D,p=F,Wh(()=>{p===F&&(v(p.value),b(p.state),C[1](O=>O.filter(B=>B.pending)))}).finally(()=>{p===F&&Sl(()=>{ao=void 0,D==="navigate"&&L(p),g(!1),p=void 0})}))},[m,v]=I(o().value),[y,b]=I(o().state),w=aw(m,y,s.queryWrapper),_=[],C=I([]),k=ie(()=>typeof r.transformUrl=="function"?ru(t(),r.transformUrl(w.pathname)):ru(t(),w.pathname)),T=()=>{const D=k(),F={};for(let O=0;O<D.length;O++)Object.assign(F,D[O].params);return F},S=s.paramsWrapper?s.paramsWrapper(T,t):sm(T),A={pattern:l,path:()=>l,outlet:()=>null,resolvePath(D){return Ms(l,D)}};return Me(wt(o,D=>h("native",D),{defer:!0})),{base:A,location:w,params:S,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:R,matches:k,beforeLeave:c,preloadRoute:M,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function N(D,F,O){ft(()=>{if(typeof F=="number"){F&&(s.go?s.go(F):console.warn("Router integration does not support relative routing"));return}const B=!F||F[0]==="?",{replace:ne,resolve:G,scroll:K,state:ce}={replace:!1,resolve:!B,scroll:!0,...O},U=G?D.resolvePath(F):Ms(B&&w.pathname||"",F);if(U===void 0)throw new Error(`Path '${F}' is not a routable path`);if(_.length>=Qv)throw new Error("Too many redirects");const z=m();(U!==z||ce!==y())&&(Kv||c.confirm(U,O)&&(_.push({value:z,replace:ne,scroll:K,state:y()}),h("navigate",{value:U,state:ce})))})}function R(D){return D=D||st(Tl)||A,(F,O)=>N(D,F,O)}function L(D){const F=_[0];F&&(i({...D,replace:F.replace,scroll:F.scroll}),_.length=0)}function M(D,F){const O=ru(t(),D.pathname),B=ao;ao="preload";for(let ne in O){const{route:G,params:K}=O[ne];G.component&&G.component.preload&&G.component.preload();const{preload:ce}=G;F&&ce&&fa(n(),()=>ce({params:K,location:{pathname:D.pathname,search:D.search,hash:D.hash,query:im(D),state:null,key:""},intent:"preload"}))}ao=B}}function lw(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ie(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:ao||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?f(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(p){return Ms(o.path(),p,l())}}}const dw=e=>t=>{const{base:n}=t,r=Xo(()=>t.children),o=ie(()=>lm(r(),t.base||""));let i;const s=cw(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),f(um.Provider,{value:s,get children(){return f(fw,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[Z(()=>(i=Ei())&&null),f(gw,{routerState:s,get branches(){return o()}})]}})}})};function fw(e){const t=e.routerState.location,n=e.routerState.params,r=ie(()=>e.preload&&ft(()=>{e.preload({params:n,location:t,intent:uw()||"initial"})}));return f(q,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>f(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function gw(e){const t=[];let n;const r=ie(wt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],g=o[c];s&&d&&g.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),On(p=>{t[c]=p,u[c]=lw(e.routerState,u[c-1]||e.routerState.base,Gd(()=>r()[c+1]),()=>{const h=e.routerState.matches();return h[c]??h[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return Gd(()=>r()&&n)()}const Gd=e=>()=>f(q,{get when(){return e()},keyed:!0,children:t=>f(Tl.Provider,{value:t,get children(){return t.outlet()}})}),xr=e=>{const t=Xo(()=>e.children);return H(e,{get children(){return t()}})};function pw([e,t],n,r){return[e,r?o=>t(r(o)):t]}function hw(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=pw(I(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Ke.registry&&!Ke.done&&(Ke.done=!0),o));return e.init&&ae(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),dw({signal:r,create:e.create,utils:e.utils})}function mw(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function bw(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const yw=new Map;function vw({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function l(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const v=m.composedPath().find(k=>k instanceof Node&&k.nodeName.toUpperCase()==="A");if(!v||t&&!v.hasAttribute("link"))return;const y=c(v),b=y?v.href.baseVal:v.href;if((y?v.target.baseVal:v.target)||!b&&!v.hasAttribute("state"))return;const _=(v.getAttribute("rel")||"").split(/\s+/);if(v.hasAttribute("download")||_&&_.includes("external"))return;const C=y?new URL(b,document.baseURI):new URL(b);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[v,C]}function d(m){const v=l(m);if(!v)return;const[y,b]=v,w=o.parsePath(b.pathname+b.search+b.hash),_=y.getAttribute("state");m.preventDefault(),s(w,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:_?JSON.parse(_):void 0})}function g(m){const v=l(m);if(!v)return;const[y,b]=v;r&&(b.pathname=r(b.pathname)),o.preloadRoute(b,y.getAttribute("preload")!=="false")}function p(m){clearTimeout(a);const v=l(m);if(!v)return u=null;const[y,b]=v;u!==y&&(r&&(b.pathname=r(b.pathname)),a=setTimeout(()=>{o.preloadRoute(b,y.getAttribute("preload")!=="false"),u=y},20))}function h(m){if(m.defaultPrevented)return;let v=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!v)return;if(!v.startsWith("https://action/")){const b=new URL(v,om);if(v=o.parsePath(b.pathname+b.search),!v.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=yw.get(v);if(y){m.preventDefault();const b=new FormData(m.target,m.submitter);y.call({r:o,f:m.target},m.target.enctype==="multipart/form-data"?b:new URLSearchParams(b))}}Qt(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",p,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",h),ae(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",h)})}}function ww(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=rm();return hw({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Hv(s),"",r):window.history.pushState(s,"",r),bw(decodeURIComponent(window.location.hash.slice(1)),i),Al()},init:r=>mw(window,"popstate",Gv(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:vw({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var xw=$("<a>");function zn(e){e=H({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=de(e,["href","state","class","activeClass","inactiveClass","end"]),n=tw(()=>e.href),r=nw(n),o=Qo(),i=ie(()=>{const s=n();if(s===void 0)return[!1,!1];const a=co(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(co(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=xw();return fr(s,H(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function _w(e){const t=Yr(),n=Qo(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const Jc=Symbol("store-raw"),zo=Symbol("store-node"),Sr=Symbol("store-has"),dm=Symbol("store-self");function fm(e){let t=e[Un];if(!t&&(Object.defineProperty(e,Un,{value:t=new Proxy(e,Sw)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function qs(e){let t;return e!=null&&typeof e=="object"&&(e[Un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ki(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Jc])return n;if(!qs(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=ki(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=ki(o,t))!==o&&(e[i]=r))}return e}function Hs(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Ai(e,t,n){if(e[t])return e[t];const[r,o]=I(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Ew(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===Un||t===zo||(delete n.value,delete n.writable,n.get=()=>e[Un][t]),n}function gm(e){Hc()&&Ai(Hs(e,zo),dm)()}function Cw(e){return gm(e),Reflect.ownKeys(e)}const Sw={get(e,t,n){if(t===Jc)return e;if(t===Un)return n;if(t===xi)return gm(e),n;const r=Hs(e,zo),o=r[t];let i=o?o():e[t];if(t===zo||t===Sr||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Hc()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Ai(r,t,i)())}return qs(i)?fm(i):i},has(e,t){return t===Jc||t===Un||t===xi||t===zo||t===Sr||t==="__proto__"?!0:(Hc()&&Ai(Hs(e,Sr),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Cw,getOwnPropertyDescriptor:Ew};function Gs(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Sr]&&e[Sr][t]&&o!==void 0&&e[Sr][t].$()):(e[t]=n,e[Sr]&&e[Sr][t]&&o===void 0&&e[Sr][t].$());let s=Hs(e,zo),a;if((a=Ai(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Ai(s,"length",i))&&a.$(e.length)}(a=s[dm])&&a.$()}function pm(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];hm(o)||Gs(e,o,t[o])}}function hm(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function kw(e,t){if(typeof t=="function"&&(t=t(e)),t=ki(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Gs(e,n,o)}Gs(e,"length",r)}else pm(e,t)}function fi(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&hm(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)fi(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&fi(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let d=u;d<=c;d+=l)fi(e,[d].concat(t),n);return}else if(t.length>1){fi(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=ki(i),r===void 0||qs(o)&&qs(i)&&!Array.isArray(i)?pm(o,i):Gs(e,r,i))}function Aw(...[e,t]){const n=ki(e||{}),r=Array.isArray(n),o=fm(n);function i(...s){Sl(()=>{r&&s.length===1?kw(n,s[0]):fi(n,s)})}return[o,i]}const ze=e=>typeof e=="string",ri=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Vd=e=>e==null?"":String(e),Tw=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Dw=/###/g,Wd=e=>e&&e.includes("###")?e.replace(Dw,"."):e,Yd=e=>!e||ze(e),mi=(e,t,n)=>{const r=ze(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Yd(e))return{};const i=Wd(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Yd(e)?{}:{obj:e,k:Wd(r[o])}},Zd=(e,t,n)=>{const{obj:r,k:o}=mi(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=mi(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=mi(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Iw=(e,t,n,r)=>{const{obj:o,k:i}=mi(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Vs=(e,t)=>{const{obj:n,k:r}=mi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Rw=(e,t,n)=>{const r=Vs(e,n);return r!==void 0?r:Vs(t,n)},mm=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?ze(e[r])||e[r]instanceof String||ze(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):mm(e[r],t[r],n):e[r]=t[r]);return e},_r=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ow={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Nw=e=>ze(e)?e.replace(/[&<>"'\/]/g,t=>Ow[t]):e;class Mw{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Pw=[" ",",","?","!",";"],Lw=new Mw(20),$w=(e,t,n)=>{t=t||"",n=n||"";const r=Pw.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=Lw.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},Qc=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Ti=e=>e?.replace(/_/g,"-"),Fw={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Ws{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Fw,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>ze(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),ze(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ws(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ws(this.logger,t)}}var tr=new Ws;class ha{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class Xd extends ha{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):ze(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Vs(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!ze(r)?u:Qc(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Zd(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(ze(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=Vs(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?mm(u,r,i):u={...u,...r},Zd(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var bm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const ym=Symbol("i18next/PATH_KEY");function Bw(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===ym?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Uo(e,t){const{[ym]:n}=e(Bw()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const ou=e=>!ze(e)&&typeof e!="boolean"&&typeof e!="number";class Ys extends ha{constructor(t,n={}){super(),Tw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=tr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=ou(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!$w(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:ze(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:ze(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Uo(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Uo(M,{...this.options,...o}):String(M));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return g?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const p=this.resolve(t,o);let h=p?.res;const m=p?.usedKey||a,v=p?.exactUsedKey||a,y=["[object Number]","[object Function]","[object RegExp]"],b=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_=o.count!==void 0&&!ze(o.count),C=Ys.hasDefaultValue(o),k=_?this.pluralResolver.getSuffix(d,o.count,o):"",T=o.ordinal&&_?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",S=_&&!o.ordinal&&o.count===0,A=S&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${T}`]||o.defaultValue;let N=h;w&&!h&&C&&(N=A);const R=ou(N),L=Object.prototype.toString.apply(N);if(w&&N&&R&&!y.includes(L)&&!(ze(b)&&Array.isArray(N))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,N,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=M,p.usedParams=this.getUsedParamsDetails(o),p):M}if(s){const M=Array.isArray(N),D=M?[]:{},F=M?v:m;for(const O in N)if(Object.prototype.hasOwnProperty.call(N,O)){const B=`${F}${s}${O}`;C&&!h?D[O]=this.translate(B,{...o,defaultValue:ou(A)?A[O]:void 0,joinArrays:!1,ns:u}):D[O]=this.translate(B,{...o,joinArrays:!1,ns:u}),D[O]===B&&(D[O]=N[O])}h=D}}else if(w&&ze(b)&&Array.isArray(h))h=h.join(b),h&&(h=this.extendTranslation(h,t,o,r));else{let M=!1,D=!1;!this.isValidLookup(h)&&C&&(M=!0,h=A),this.isValidLookup(h)||(D=!0,h=a);const O=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:h,B=C&&A!==h&&this.options.updateMissing;if(D||M||B){if(this.logger.log(B?"updateKey":"missingKey",d,c,_&&!B?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,B?A:h),s){const ce=this.resolve(a,{...o,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ne=[];const G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(let ce=0;ce<G.length;ce++)ne.push(G[ce]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(o.lng||this.language):ne.push(o.lng||this.language);const K=(ce,U,z)=>{const V=C&&z!==h?z:O;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,c,U,V,B,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ce,c,U,V,B,o),this.emit("missingKey",ce,c,U,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?ne.forEach(ce=>{const U=this.pluralResolver.getSuffixes(ce,o);S&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!U.includes(`${this.options.pluralSeparator}zero`)&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(z=>{K([ce],a+z,o[`defaultValue${z}`]||A)})}):K(ne,a,A))}h=this.extendTranslation(h,t,o,p,r),D&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${c}${l}${a}`),(D||M)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,M?h:void 0,o))}return i?(p.res=h,p.usedParams=this.getUsedParamsDetails(o),p):h}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=ze(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let l=r.replace&&!ze(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),g=d&&d.length;c<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=ze(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=bm.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return ze(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Uo(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const g=n.count!==void 0&&!ze(n.count),p=g&&!n.ordinal&&n.count===0,h=n.context!==void 0&&(ze(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(a=v,!this.checkedLoadedFor[`${m[0]}-${v}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${m[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(y=>{if(this.isValidLookup(r))return;s=y;const b=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,l,y,v,n);else{let _;g&&(_=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(n.ordinal&&_.startsWith(k)&&b.push(l+_.replace(k,this.options.pluralSeparator)),b.push(l+_),p&&b.push(l+C)),h){const T=`${l}${this.options.contextSeparator||"_"}${n.context}`;b.push(T),g&&(n.ordinal&&_.startsWith(k)&&b.push(T+_.replace(k,this.options.pluralSeparator)),b.push(T+_),p&&b.push(T+C))}}let w;for(;w=b.pop();)this.isValidLookup(r)||(i=w,r=this.getResource(y,v,w,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ze(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class Jd{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ti(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ti(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ze(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ze(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return ze(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):ze(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const Qd={zero:0,one:1,two:2,few:3,many:4,other:5},ef={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class zw{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=tr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Ti(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ef;if(!t.match(/-|_/))return ef;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>Qd[o]-Qd[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const tf=(e,t,n,r=".",o=!0)=>{let i=Rw(e,t,n);return!i&&o&&ze(n)&&(i=Qc(e,n,r),i===void 0&&(i=Qc(t,n,r))),i},Uw=e=>e.replace(/\$/g,"$$$$");class nf{constructor(t={}){this.logger=tr.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:g,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:Nw,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?_r(i):s||"{{",this.suffix=a?_r(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?_r(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?_r(l):"",this.nestingPrefix=g?_r(g):p||_r("$t("),this.nestingSuffix=h?_r(h):m||_r(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(!p.includes(this.formatSeparator)){const y=tf(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:p}):y}const h=p.split(this.formatSeparator),m=h.shift().trim(),v=h.join(this.formatSeparator).trim();return this.format(tf(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:m})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>p},{regex:this.regexp,safeValue:p=>this.escapeValue?this.escape(p):p}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const h=i[1].trim();if(s=c(h),s===void 0)if(typeof l=="function"){const v=l(t,i,o);s=ze(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,h))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),s="";else!ze(s)&&!this.useRawValueToEscape&&(s=Vd(s));const m=p.safeValue(s);if(t=t.replace(i[0],Uw(m)),d?(p.regex.lastIndex+=m.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${_r(l)}[ ]*{`));let g=`{${d[1]}`;u=d[0],g=this.interpolate(g,s);const p=g.match(/'/g),h=g.match(/"/g);((p?.length??0)%2===0&&!h||(h?.length??0)%2!==0)&&(g=g.replace(/'/g,'"'));try{s=JSON.parse(g),c&&(s={...c,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${l}${g}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!ze(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!ze(i))return i;ze(i)||(i=Vd(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const Kw=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},rf=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Ti(r),o),t[s]=a),a(n)}},jw=e=>(t,n,r)=>e(Ti(n),r)(t);class qw{constructor(t={}){this.logger=tr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?rf:jw;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=rf(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=Kw(c);if(this.formats[l]){let g=u;try{const p=o?.formatParams?.[o.interpolationkey]||{},h=p.locale||p.lng||o.locale||o.lng||r;g=this.formats[l](u,h,{...d,...o,...p})}catch(p){this.logger.warn(p)}return g}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const Hw=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Gw extends ha{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=tr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const g=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?s[g]===void 0&&(s[g]=!0):(this.state[g]=1,l=!1,s[g]===void 0&&(s[g]=!0),i[g]===void 0&&(i[g]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{Iw(u.loaded,[i],s),Hw(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ze(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ze(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const iu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ze(e[1])&&(t.defaultValue=e[1]),ze(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),of=e=>(ze(e.ns)&&(e.ns=[e.ns]),ze(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ze(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ms=()=>{},Vw=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class bi extends ha{constructor(t={},n){if(super(),this.options=of(t),this.services={},this.logger=tr,this.modules={external:[]},Vw(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(ze(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=iu();this.options={...r,...this.options,...of(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?tr.init(o(this.modules.logger),this.options):tr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=qw;const l=new Jd(this.options);this.store=new Xd(this.options.resources,this.options);const d=this.services;d.logger=tr,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new zw(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new nf(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Gw(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Ys(this.services,this.options),this.translator.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ms),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=ri(),u=()=>{const c=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(l,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=ms){let r=n;const o=ze(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=ri();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ms),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&bm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ri();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=ze(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(ze(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const d=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const g={...this.options,...l};Array.isArray(i)&&!d&&(g.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Uo(l.keyPrefix,g));const p=this.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(a)?h=a.map(m=>(typeof m=="function"&&(m=Uo(m,g)),`${l.keyPrefix}${p}${m}`)):(typeof a=="function"&&(a=Uo(a,g)),h=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(h,l)};return ze(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=ri();return this.options.ns?(ze(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ri();ze(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new Jd(iu());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new bi(t,n);return r.createInstance=bi.createInstance,r}cloneInstance(t={},n=ms){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new bi(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,d)=>(l[d]={...u[c][d]},l),u[c]),u),{});i.store=new Xd(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...iu().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new nf(c)}return i.translator=new Ys(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Tt=bi.createInstance();Tt.createInstance;Tt.dir;Tt.init;Tt.loadResources;Tt.reloadResources;Tt.use;Tt.changeLanguage;Tt.getFixedT;Tt.t;Tt.exists;Tt.setDefaultNamespace;Tt.hasLoadedNamespace;Tt.loadNamespaces;Tt.loadLanguages;const{slice:Ww,forEach:Yw}=[];function Zw(e){return Yw.call(Ww.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Xw(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const sf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Jw=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!sf.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!sf.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},af={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Jw(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Qw={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return af.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&af.create(n,e,r,o,i)}},ex={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},tx={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Ao=null;const uf=()=>{if(Ao!==null)return Ao;try{if(Ao=typeof window<"u"&&window.localStorage!==null,!Ao)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ao=!1}return Ao};var nx={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&uf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&uf()&&window.localStorage.setItem(n,e)}};let To=null;const cf=()=>{if(To!==null)return To;try{if(To=typeof window<"u"&&window.sessionStorage!==null,!To)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{To=!1}return To};var rx={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&cf())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&cf()&&window.sessionStorage.setItem(n,e)}},ox={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},ix={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},sx={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},ax={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let vm=!1;try{document.cookie,vm=!0}catch{}const wm=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vm||wm.splice(1,1);const ux=()=>({order:wm,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class xm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Zw(n,this.options||{},ux()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Qw),this.addDetector(ex),this.addDetector(nx),this.addDetector(rx),this.addDetector(ox),this.addDetector(ix),this.addDetector(sx),this.addDetector(ax),this.addDetector(tx)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Xw(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}xm.type="languageDetector";function cx(e,t={}){const{fallbackLng:n="zh-CN",persistKey:r}=t,o=Tt.use(xm).init({resources:e,fallbackLng:n,detection:{order:r?["localStorage","navigator"]:["navigator"],caches:r?["localStorage"]:[],...r?{lookupLocalStorage:r}:{}},interpolation:{escapeValue:!1}}),[i,s]=I(Tt.language||n),[a,u]=I(Tt.isInitialized);o.then(()=>{s(Tt.language||n),u(!0)}),Tt.on("languageChanged",d=>s(d));const c=(d,g)=>(i(),Tt.t(d,g));return{i18next:Tt,initPromise:o,t:c,useTranslation:()=>({t:c,lng:ie(()=>i()),ready:ie(()=>a()),changeLanguage:d=>{Tt.changeLanguage(d)}})}}const lx={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置",userGuide:"使用指南"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。"},addProject:{trigger:"添加项目",title:"添加项目",help:"帮助",helpTooltip:"也可使用命令 `yorz add <path>` 添加项目",parent:"上级目录",home:"主目录",driveRoot:"此电脑",empty:"该目录下没有子目录",truncated:"子目录过多,仅显示前 1000 项",showHidden:"显示隐藏目录",choose:"选择此目录",loading:"加载中…",newFolder:"新建文件夹",newFolderPlaceholder:"文件夹名称",newFolderConfirm:"创建",invalidName:"名称不能为空,且不能包含路径分隔符",gitInitTitle:"该目录不是 git 仓库",gitInitDesc:"{{path}} 尚未 git init。YorZ 的 git 面板与 worktree 功能依赖 git 仓库。",gitInitConfirm:"执行 git init 并添加",failed:"添加失败:{{message}}"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",pin:"固定展开项目面板",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",projectRunning:"{{name}} 有任务正在运行"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",sessionDivider:"{{kind}} · {{time}}",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",usageLoading:"正在查询当前模型剩余用量…",usageError:"{{kind}} 剩余用量查询失败。",usageAvailableNoDetails:"{{kind}} 已连接,但未返回可展示的剩余用量明细。",usageSummary:"{{kind}} 用量:{{details}}",usageWindow:"{{label}} 剩余约 {{remaining}}%(已用 {{used}}%,重置:{{reset}})",usageWindowUnknown:"{{label}} 剩余用量未知",usageResetUnknown:"未知",usageSeparator:" · ",inputPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,Enter 发送…",draftPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",toolTextExpand:"展开全部 {{count}} 字符",toolTextCollapse:"收起",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发",addSlashCommandOption:"新增指令",addSlashCommandOptionDescription:"创建一个自定义斜杠指令",addSlashCommandTitle:"新增指令",editSlashCommandTitle:"编辑指令",slashCommandNoMatch:"没有匹配的指令",deleteSlashCommandTitle:"删除指令",deleteSlashCommandConfirm:"确定删除自定义指令 /{{name}}?此操作不可撤销。",slashCommandScopeProject:"当前项目",slashCommandScopeGlobal:"全局",customSlashCommandScope:"保存位置",customSlashCommandScopeProjectHint:"项目指令仅在当前项目可用,同名指令项目优先,保存后不可切换",customSlashCommandScopeGlobalHint:"全局指令在所有项目可用,保存后不可切换",customSlashCommandName:"名称",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"说明",customSlashCommandDescriptionPlaceholder:"提交当前会话相关的变更文件",customSlashCommandHiddenPrompt:"隐藏提示词",customSlashCommandHiddenPromptPlaceholder:"使用 git 提交当前会话相关的变更文件",customSlashCommandHiddenPromptHint:"发送时自动附加给 Agent,不会出现在输入框和聊天记录中",customSlashCommandPrefill:"预输入内容",customSlashCommandPrefillPlaceholder:"选择该指令后回填到输入框的内容",customSlashCommandPrefillHint:"选择该指令后回填到输入框,会自动带上 /指令名 前缀,可继续编辑后再发送",customSlashCommandNameRequired:"请输入指令名称",customSlashCommandNameInvalid:"名称只能包含字母、数字、下划线和连字符",customSlashCommandNoDescription:"自定义指令",editCustomSlashCommand:"编辑 {{name}}",deleteCustomSlashCommand:"删除 {{name}}",saveCustomSlashCommand:"保存"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",runningTasksPreventMerge:"存在进行中的命令或 Agent 任务,请等待任务结束后再合并",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",copySpecPath:"复制路径",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 10 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Spec 创建中…",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 10 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug 文档",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",appendSavedSpecBusy:"追加任务已保存;该 spec 有正在执行的会话,未自动派发,请在其结束后手动运行。",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",committing:"提交中…",discarding:"丢弃中…",commitPlaceholder:"commit message…({{shortcut}} 提交)",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:"},git:{title:"Git 状态",branchSelect:"切换分支",branchPlaceholder:"选择分支",branchFilterPlaceholder:"过滤分支…",noBranches:"没有匹配的分支",mergeBranch:"合并分支",mergeBranchPlaceholder:"选择要合并的分支",mergeFilterPlaceholder:"过滤本地 / 远程分支…",mergeAction:"合并",merging:"合并中…",merged:"已将 {{branch}} 合并到 {{current}}",mergeUpToDate:"{{current}} 已包含 {{branch}},无需合并",mergeSelfHint:"当前分支不能合并到自身",push:"推送",pushing:"推送中…",pushed:"已推送到远端({{branch}})",pull:"拉取",pulling:"拉取中…",pulled:"已拉取最新提交({{branch}})",upToDate:"已是最新,无需拉取",binaryFile:"二进制文件,无法展示差异",diffTruncated:"差异过大,已截断展示",diffEmpty:"该文件暂无可展示的差异",diffLoading:"差异加载中…"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agentPi:"Pi",agent:"Agent",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"任务结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",saveStatusSaving:"保存中...",saveStatusSaved:"已保存",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置"}},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",stop:"终止",stopping:"终止中…",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"},pairing:{title:"配对移动端",hint:"在手机上打开应用,扫描二维码或手动输入下方配对码完成配对。配对码 5 分钟内有效、仅可使用一次。",loading:"生成配对码中…",error:"生成配对码失败",retry:"重试",refresh:"刷新配对码",unauthorizedTitle:"未授权",unauthorized:"当前页面缺少有效令牌,请使用 `yorz serve` 启动日志中打印的带 token 链接打开本页面。"}},dx={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings",userGuide:"User Guide"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.'},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements."},addProject:{trigger:"Add Project",title:"Add Project",help:"Help",helpTooltip:"You can also run `yorz add <path>` to add a project",parent:"Parent directory",home:"Home directory",driveRoot:"This PC",empty:"No subdirectories here",truncated:"Too many subdirectories; showing the first 1000",showHidden:"Show hidden directories",choose:"Choose this directory",loading:"Loading…",newFolder:"New folder",newFolderPlaceholder:"Folder name",newFolderConfirm:"Create",invalidName:"Name must not be empty or contain a path separator",gitInitTitle:"Not a git repository",gitInitDesc:"{{path}} has not been git-initialized. The git panel and worktree features require a git repository.",gitInitConfirm:"Run git init and add",failed:"Failed to add: {{message}}"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",pin:"Keep project panel open",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",projectRunning:"Task running in {{name}}"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",sessionDivider:"{{kind}} · {{time}}",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",usageLoading:"Checking current model usage…",usageError:"Failed to query {{kind}} remaining usage.",usageAvailableNoDetails:"{{kind}} is connected, but returned no displayable usage details.",usageSummary:"{{kind}} usage: {{details}}",usageWindow:"{{label}} about {{remaining}}% remaining ({{used}}% used, resets: {{reset}})",usageWindowUnknown:"{{label}} remaining usage unknown",usageResetUnknown:"unknown",usageSeparator:" · ",inputPlaceholder:"Type a message, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",toolTextExpand:"Show all {{count}} chars",toolTextCollapse:"Collapse",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context",addSlashCommandOption:"Add Command",addSlashCommandOptionDescription:"Create a custom slash command",addSlashCommandTitle:"Add Command",editSlashCommandTitle:"Edit Command",slashCommandNoMatch:"No matching command",deleteSlashCommandTitle:"Delete command",deleteSlashCommandConfirm:"Delete the custom command /{{name}}? This cannot be undone.",slashCommandScopeProject:"This project",slashCommandScopeGlobal:"Global",customSlashCommandScope:"Saved in",customSlashCommandScopeProjectHint:"Available only in this project, shadows a global command of the same name, and cannot be moved after saving",customSlashCommandScopeGlobalHint:"Available in every project, and cannot be moved after saving",customSlashCommandName:"Name",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"Description",customSlashCommandDescriptionPlaceholder:"Commit files related to the current session",customSlashCommandHiddenPrompt:"Hidden Prompt",customSlashCommandHiddenPromptPlaceholder:"Use git to commit files related to this session",customSlashCommandHiddenPromptHint:"Sent to the Agent automatically; never shown in the composer or the chat log",customSlashCommandPrefill:"Prefill Content",customSlashCommandPrefillPlaceholder:"Content inserted into the input when selected",customSlashCommandPrefillHint:"Inserted into the composer on select, prefixed with /command-name; you can edit before sending",customSlashCommandNameRequired:"Enter a command name",customSlashCommandNameInvalid:"Use only letters, numbers, underscores, and hyphens",customSlashCommandNoDescription:"Custom command",editCustomSlashCommand:"Edit {{name}}",deleteCustomSlashCommand:"Delete {{name}}",saveCustomSlashCommand:"Save"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",runningTasksPreventMerge:"Wait for running commands or Agent tasks to finish before merging",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",copySpecPath:"Copy path",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 10 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Creating spec…",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 10 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug document",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",appendSavedSpecBusy:"Append saved. This spec already has a running session, so no round was dispatched — run it manually once that finishes.",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",committing:"Committing…",discarding:"Discarding…",commitPlaceholder:"commit message… ({{shortcut}} to commit)",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: "},git:{title:"Git status",branchSelect:"Switch branch",branchPlaceholder:"Select branch",branchFilterPlaceholder:"Filter branches…",noBranches:"No matching branches",mergeBranch:"Merge branch",mergeBranchPlaceholder:"Pick a branch to merge",mergeFilterPlaceholder:"Filter local / remote branches…",mergeAction:"Merge",merging:"Merging…",merged:"Merged {{branch}} into {{current}}",mergeUpToDate:"{{current}} already contains {{branch}}",mergeSelfHint:"The current branch cannot be merged into itself",push:"Push",pushing:"Pushing…",pushed:"Pushed to remote ({{branch}})",pull:"Pull",pulling:"Pulling…",pulled:"Pulled latest commits ({{branch}})",upToDate:"Already up to date",binaryFile:"Binary file — diff not shown",diffTruncated:"Diff too large, truncated",diffEmpty:"No diff to show for this file",diffLoading:"Loading diff…"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agentPi:"Pi",agent:"Agent",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Task end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",saveStatusSaving:"Saving...",saveStatusSaved:"Saved",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings"}},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",stop:"Stop",stopping:"Stopping...",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"},pairing:{title:"Pair a mobile device",hint:"Open the app on your phone, then scan the QR code or type the pairing code below. The code is valid for 5 minutes and can be used once.",loading:"Generating pairing code…",error:"Failed to generate pairing code",retry:"Retry",refresh:"Refresh code",unauthorizedTitle:"Unauthorized",unauthorized:"This page has no valid token. Open it using the token-bearing URL printed in the `yorz serve` startup log."}},Dl=cx({"zh-CN":{translation:lx},en:{translation:dx}}),{i18next:lf}=Dl,fx=["system","light","dark"],gx=["terminal","graphite","paper"],_m="(prefers-color-scheme: dark)",Em="yorz.appearanceHint";function px(e){return fx.includes(e)}function hx(e){return gx.includes(e)}function mx(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(Em);if(!e)return null;const t=JSON.parse(e);if(!t||typeof t!="object")return null;const{mode:n,name:r}=t;return!px(n)||!hx(r)?null:{mode:n,name:r}}catch{return null}}function Cm(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(Em,JSON.stringify({mode:e,name:t}))}catch{}}function Sm(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(_m).matches?"dark":"light"}function km(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const Il=mx(),[Zs,bx]=I(Il?.mode??"system"),[Xs,Am]=I(Il?.name??"paper"),[yx,vx]=I(km(Il?.mode??"system",Sm()==="dark"));let Tm=!1;function wx(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function Js(e,t){const n=km(e,Sm()==="dark");vx(n),wx(n,t),Tm&&Cm(e,t)}function Dm(e){bx(e),Js(e,Xs())}function xx(e){Am(e),Js(Zs(),e)}function _x(e,t){Am(t),Dm(e)}let df=!1;function Ex(e={}){df||(df=!0,Tm=e.persistHint??!1,Js(Zs(),Xs()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(_m).addEventListener("change",()=>{Zs()==="system"&&Js("system",Xs())}))}const Cx="x-yorz-pair-token";let Im=()=>null,Rm=()=>{};function Sx(e){e.tokenProvider&&(Im=e.tokenProvider),e.onUnauthorized&&(Rm=e.onUnauthorized)}function Om(){try{return Im()}catch{return null}}function kx(){try{Rm()}catch{}}function Nm(e){const t=Om();if(!t)return e??{};const n=new Headers(e?.headers);return n.set(Cx,t),{...e,headers:n}}function Ax(e){const t=Om();if(!t)return e;const n=e.includes("?")?"&":"?";return`${e}${n}token=${encodeURIComponent(t)}`}const Mm="yorz.token",[Tx,ff]=I(!1);function Dx(){try{return localStorage.getItem(Mm)}catch{return null}}function Ix(e){try{localStorage.setItem(Mm,e)}catch{}}function Rx(){try{const e=new URL(window.location.href),t=e.searchParams.get("token");if(t){Ix(t),ff(!1),e.searchParams.delete("token");const n=e.pathname+(e.search?e.search:"")+e.hash;window.history.replaceState(window.history.state,"",n)}}catch{}Sx({tokenProvider:Dx,onUnauthorized:()=>ff(!0)})}/**
|
|
2
|
+
* @license lucide-solid v1.24.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var Ox={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Do=Ox,Nx=ut({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Mx=$("<svg>"),Px=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Lx=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),$x=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),gf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fx=e=>{const t=$x(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bx=e=>{const[t,n]=de(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=st(Nx);return(()=>{var o=Mx();return fr(o,H(Do,{get width(){return t.size??r.size??Do.width},get height(){return t.size??r.size??Do.height},get stroke(){return t.color??r.color??Do.stroke},get"stroke-width"(){return Z(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??Do["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??Do["stroke-width"])},get class(){return Lx("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${gf(Fx(t.name))}`,`lucide-${gf(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Px(n)?"true":void 0}},n),!0,!0),x(o,f(rt,{get each(){return t.iconNode},children:([i,s])=>f(nm,H({component:i},s))})),o})()},He=Bx,zx=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ux=e=>f(He,H(e,{iconNode:zx,name:"arrow-left"})),Kx=Ux,jx=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],qx=e=>f(He,H(e,{iconNode:jx,name:"bell"})),Hx=qx,Gx=[["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"}]],Vx=e=>f(He,H(e,{iconNode:Gx,name:"book-open"})),Wx=Vx,Yx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zx=e=>f(He,H(e,{iconNode:Yx,name:"check"})),bs=Zx,Xx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jx=e=>f(He,H(e,{iconNode:Xx,name:"chevron-down"})),Rl=Jx,Qx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e2=e=>f(He,H(e,{iconNode:Qx,name:"chevron-right"})),Ol=e2,t2=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],n2=e=>f(He,H(e,{iconNode:t2,name:"chevrons-left"})),Pm=n2,r2=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],o2=e=>f(He,H(e,{iconNode:r2,name:"chevrons-right"})),el=o2,i2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],s2=e=>f(He,H(e,{iconNode:i2,name:"circle-check"})),a2=s2,u2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],c2=e=>f(He,H(e,{iconNode:u2,name:"circle-question-mark"})),l2=c2,d2=[["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"}]],f2=e=>f(He,H(e,{iconNode:d2,name:"copy"})),g2=f2,p2=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],h2=e=>f(He,H(e,{iconNode:p2,name:"corner-left-up"})),m2=h2,b2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],y2=e=>f(He,H(e,{iconNode:b2,name:"ellipsis"})),v2=y2,w2=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],x2=e=>f(He,H(e,{iconNode:w2,name:"folder-plus"})),_2=x2,E2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],C2=e=>f(He,H(e,{iconNode:E2,name:"folder"})),S2=C2,k2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],A2=e=>f(He,H(e,{iconNode:k2,name:"git-branch"})),Nl=A2,T2=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],D2=e=>f(He,H(e,{iconNode:T2,name:"git-merge"})),Lm=D2,I2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],R2=e=>f(He,H(e,{iconNode:I2,name:"house"})),O2=R2,N2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],M2=e=>f(He,H(e,{iconNode:N2,name:"info"})),P2=M2,L2=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],$2=e=>f(He,H(e,{iconNode:L2,name:"languages"})),F2=$2,B2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],z2=e=>f(He,H(e,{iconNode:B2,name:"loader-circle"})),Dn=z2,U2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],K2=e=>f(He,H(e,{iconNode:U2,name:"maximize-2"})),j2=K2,q2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],H2=e=>f(He,H(e,{iconNode:q2,name:"menu"})),G2=H2,V2=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],W2=e=>f(He,H(e,{iconNode:V2,name:"minimize-2"})),Y2=W2,Z2=[["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"}]],X2=e=>f(He,H(e,{iconNode:Z2,name:"monitor"})),$m=X2,J2=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Q2=e=>f(He,H(e,{iconNode:J2,name:"moon"})),e_=Q2,t_=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],n_=e=>f(He,H(e,{iconNode:t_,name:"palette"})),r_=n_,o_=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],i_=e=>f(He,H(e,{iconNode:o_,name:"paperclip"})),s_=i_,a_=[["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"}]],u_=e=>f(He,H(e,{iconNode:a_,name:"pencil"})),Fm=u_,c_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],l_=e=>f(He,H(e,{iconNode:c_,name:"plus"})),qr=l_,d_=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],f_=e=>f(He,H(e,{iconNode:d_,name:"qr-code"})),g_=f_,p_=[["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"}]],h_=e=>f(He,H(e,{iconNode:p_,name:"rotate-ccw"})),m_=h_,b_=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],y_=e=>f(He,H(e,{iconNode:b_,name:"rotate-cw"})),v_=y_,w_=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],x_=e=>f(He,H(e,{iconNode:w_,name:"send"})),ma=x_,__=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],E_=e=>f(He,H(e,{iconNode:__,name:"settings"})),C_=E_,S_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],k_=e=>f(He,H(e,{iconNode:S_,name:"square"})),Bm=k_,A_=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],T_=e=>f(He,H(e,{iconNode:A_,name:"sun"})),D_=T_,I_=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],R_=e=>f(He,H(e,{iconNode:I_,name:"terminal"})),O_=R_,N_=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],M_=e=>f(He,H(e,{iconNode:N_,name:"trash-2"})),Ml=M_,P_=[["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"}]],L_=e=>f(He,H(e,{iconNode:P_,name:"triangle-alert"})),$_=L_,F_=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],B_=e=>f(He,H(e,{iconNode:F_,name:"upload"})),z_=B_,U_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K_=e=>f(He,H(e,{iconNode:U_,name:"x"})),Zr=K_;async function Ps(e,t){const n=await fetch(e,Nm(t));return n.status===401&&kx(),n}function je(e){return`/api/projects/${encodeURIComponent(e)}`}async function Ls(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Te(e,t){const n=await Ps(e,t);if(!n.ok){const r=await Ls(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const ye={listSpecs:e=>Te(`${je(e)}/specs`),getSpec:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>Ps(`${je(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await Ls(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getProjectChanges:e=>Te(`${je(e)}/git/changes`),getFileDiff:(e,t)=>Te(`${je(e)}/git/diff?path=${encodeURIComponent(t)}`),getGitBranches:e=>Te(`${je(e)}/git/branches`),checkoutGitBranch:(e,t)=>Te(`${je(e)}/git/checkout`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),mergeGitBranch:(e,t)=>Te(`${je(e)}/git/merge`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),projectCommit:(e,t)=>Te(`${je(e)}/git/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectDiscard:(e,t)=>Te(`${je(e)}/git/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectPush:e=>Te(`${je(e)}/git/push`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),projectPull:e=>Te(`${je(e)}/git/pull`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),getDebug:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Te("/api/projects"),listDirs:(e,t)=>{const n=new URLSearchParams;e!==void 0&&n.set("path",e),t&&n.set("showHidden","1");const r=n.toString();return Te(`/api/fs/list${r?`?${r}`:""}`)},createDir:(e,t)=>Te("/api/fs/mkdir",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({parent:e,name:t})}),addProject:async(e,t)=>{const n=await Ps("/api/projects",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,...t?.gitInit?{gitInit:!0}:{}})});if(n.status===409){const r=await n.json();if(r.needGitInit)return{ok:!1,needGitInit:!0,path:r.path??e}}if(!n.ok){const r=await Ls(n);throw new Error(`${n.status} ${r||n.statusText}`)}return{ok:!0,project:await n.json()}},listSystemNotifications:()=>Te("/api/system-notifications"),deleteSystemNotification:e=>Te(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Te(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Te(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Te(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Te(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Te(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Te(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Te(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Te(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectCustomInstructions:e=>Te(`/api/projects/${encodeURIComponent(e)}/custom-instructions`),updateProjectCustomInstructions:(e,t)=>Te(`/api/projects/${encodeURIComponent(e)}/custom-instructions`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({customInstructions:t})}),getPairingCode:()=>Te("/api/pairing/code"),claimPairing:e=>Te("/api/pairing/claim",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({code:e})}),getVapidPublicKey:()=>Te("/api/push/vapid-public-key"),savePushSubscription:e=>Te("/api/push/subscriptions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),deletePushSubscription:e=>Te("/api/push/subscriptions",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({endpoint:e})}),getGlobalConfig:()=>Te("/api/global-config"),updateGlobalConfig:e=>Te("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Te(`${je(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await Ps(`${je(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await Ls(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Te(`${je(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Te(`${je(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${je(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${je(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Te(`${je(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Te(`${je(e)}/sessions`),getAgentUsageStatus:e=>Te(`${je(e)}/agent-usage`),createSession:(e,t={})=>Te(`${je(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Te(`${je(e)}/sessions/${encodeURIComponent(t)}/messages`),getSpecMessages:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Te(`${je(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Te(`${je(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Te(`${je(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Te(`${je(e)}/commands`),createCommand:(e,t)=>Te(`${je(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Te(`${je(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Te(`${je(e)}/command-runs`),getCommandRun:(e,t)=>Te(`${je(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Te(`${je(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Te(`${je(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Te(`${je(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Te(`${je(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[j_,zm]=I(""),[q_,Um]=I(null);function Fo(e,t){e&&(zm(e),Um(t&&t.userText?{sessionId:e,...t}:null))}function H_(){zm(""),Um(null)}const[vt,G_]=I(V_());function V_(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function bo(){const e=ji();return()=>e.projectId??vt()}function It(e="",t){const n=t??vt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[W_,Y_]=I(0),[Z_,pf]=I(null);let hf=0;function X_(){Y_(e=>e+1)}function J_(e){const t=++hf;pf(()=>e),ae(()=>{hf===t&&pf(null)})}const[Dr,Pl]=I(!1);function Km(){Pl(e=>!e)}function Qs(){Pl(!1)}let tl=0,su=!1;function Q_(){tl-=1,!su&&(su=!0,queueMicrotask(()=>{su=!1,tl<=0&&Pl(!1)}))}function qi(e){tl+=1,ae(Q_),J_(Km),se(()=>{if(!Dr())return;const t=n=>{n.key!=="Escape"||e?.()||Qs()};window.addEventListener("keydown",t),ae(()=>window.removeEventListener("keydown",t))})}const eE=16e3,tE=5e3;function nE(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class rE{clientId=nE();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;lastFrameAt=0;watchdogTimer=null;visibilityBound=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=Ax(`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`),n=new EventSource(t);this.source=n,this.lastFrameAt=Date.now(),this.startWatchdog(),n.addEventListener("open",()=>{this.lastFrameAt=Date.now(),this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{this.lastFrameAt=Date.now();let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{this.lastFrameAt=Date.now();let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}startWatchdog(){if(this.watchdogTimer===null){const t=setInterval(()=>this.checkAlive(),tE);t.unref?.(),this.watchdogTimer=t}!this.visibilityBound&&typeof document<"u"&&(this.visibilityBound=!0,document.addEventListener("visibilitychange",()=>{document.hidden||this.checkAlive()}))}checkAlive(){const t=this.source;if(!t)return;const n=Date.now()-this.lastFrameAt>eE,r=t.readyState===2;!n&&!r||this.reconnect()}reconnect(){const t=this.source;this.source=null;try{t?.close()}catch{}this.ensureOpen()}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",Nm({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})}))}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}dispose(){this.watchdogTimer!==null&&(clearInterval(this.watchdogTimer),this.watchdogTimer=null),this.syncTimer!==null&&(clearTimeout(this.syncTimer),this.syncTimer=null);try{this.source?.close()}catch{}this.source=null,this.handlers.clear()}}let gr=new rE;function ba(e){const t=e;return t.readyState=()=>gr.readyState(),t}function oE(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=gr.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ba(o)}function ya(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=gr.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ba(o)}function jm(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=gr.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ba(r)}function qm(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return gr.subscribe(n,r=>{r==="list-updated"&&t()})}function Hm(e){return gr.subscribe("projects",t=>{t==="projects-changed"&&e()})}function iE(e){return gr.subscribe("system-notifications",t=>{t==="updated"&&e()})}function sE(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return gr.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function aE(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return gr.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function uE(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:changes`,r=gr.subscribe(n,(o,i)=>{o==="changes-updated"&&t(i.changes)});return ba(r)}function Gm(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}const cE={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},lE={feat:"text-success",refct:"text-info",fix:"text-destructive"};function Vm(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}function dE(e,t){const n=Vm(e)?.type??e.split(".")[1]??"feat",r=t?.trim()??"";return r?`${n}: ${r}`:`${n}: update`}function fE(e){return`@.yorz/specs/${e}/spec.md`}function gE(e){return(...t)=>{for(const n of e)n&&n(...t)}}const J=e=>typeof e=="function"&&!e.length?e():e,mf=e=>Array.isArray(e)?e:e?[e]:[];function pE(e,...t){return typeof e=="function"?e(...t):e}const hE=ae;function mE(e,t,n,r){return e.addEventListener(t,n,r),hE(e.removeEventListener.bind(e,t,n,r))}function bE(e,t,n,r){const o=()=>{mf(J(e)).forEach(i=>{i&&mf(J(t)).forEach(s=>mE(i,s,n,r))})};typeof e=="function"?se(o):Me(o)}const au=Symbol("fallback");function bf(e){for(const t of e)t.dispose()}function yE(e,t,n,r={}){const o=new Map;return ae(()=>bf(o.values())),()=>{const s=e()||[];return s[xi],ft(()=>{if(!s.length)return bf(o.values()),o.clear(),r.fallback?[On(d=>(o.set(au,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),u=o.get(au);if(!o.size||u){u?.dispose(),o.delete(au);for(let l=0;l<s.length;l++){const d=s[l],g=t(d,l);i(a,d,l,g)}return a}const c=new Set(o.keys());for(let l=0;l<s.length;l++){const d=s[l],g=t(d,l);c.delete(g);const p=o.get(g);p?(a[l]=p.mapped,p.setIndex?.(l),p.setItem(()=>d)):i(a,d,l,g)}for(const l of c)o.get(l)?.dispose(),o.delete(l);return a})};function i(s,a,u,c){On(l=>{const[d,g]=I(a),p={setItem:g,dispose:l};if(n.length>1){const[h,m]=I(u);p.setIndex=m,p.mapped=n(d,h)}else p.mapped=n(d);o.set(c,p),s[u]=p.mapped})}}function vE(e){const{by:t}=e;return ie(yE(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}const wE=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function yf(e){const t={};let n;for(;n=wE.exec(e);)t[n[1]]=n[2];return t}function kn(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=yf(e)}else typeof t=="string"&&(t=yf(t));return{...e,...t}}function et(...e){return gE(e)}function xE(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function nl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _E(e){return typeof e=="number"}function Lo(e){return Object.prototype.toString.call(e)==="[object String]"}function Hi(e){return typeof e=="function"}function dn(e){return t=>`${e()}-${t}`}function Lt(e,t){return e?e===t||e.contains(t):!1}function gi(e,t=!1){const{activeElement:n}=ln(e);if(!n?.nodeName)return null;if(Wm(n)&&n.contentDocument)return gi(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=ln(n).getElementById(r);if(o)return o}}return n}function Ll(e){return ln(e).defaultView||window}function ln(e){return e?e.ownerDocument||e:document}function Wm(e){return e.tagName==="IFRAME"}var va=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(va||{});function Ym(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function $l(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Gi(){return $l(/^Mac/i)}function EE(){return $l(/^iPhone/i)}function CE(){return $l(/^iPad/i)||Gi()&&navigator.maxTouchPoints>1}function SE(){return EE()||CE()}function kE(){return Gi()||SE()}function AE(){return Ym(/AppleWebKit/i)&&!TE()}function TE(){return Ym(/Chrome/i)}function Ie(e,t){return t&&(Hi(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function dt(e){return t=>{for(const n of e)Ie(t,n)}}function DE(e){return Gi()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function xt(e){if(e)if(IE())e.focus({preventScroll:!0});else{const t=RE(e);e.focus(),OE(t)}}var ys=null;function IE(){if(ys==null){ys=!1;try{document.createElement("div").focus({get preventScroll(){return ys=!0,!0}})}catch{}}return ys}function RE(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function OE(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Zm=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],NE=[...Zm,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Fl=`${Zm.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,ME=NE.join(':not([hidden]):not([tabindex="-1"]),');function Xm(e,t){const r=Array.from(e.querySelectorAll(Fl)).filter(vf);return t&&vf(e)&&r.unshift(e),r.forEach((o,i)=>{if(Wm(o)&&o.contentDocument){const s=o.contentDocument.body,a=Xm(s,!1);r.splice(i,1,...a)}}),r}function vf(e){return Jm(e)&&!PE(e)}function Jm(e){return e.matches(Fl)&&Bl(e)}function PE(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Bl(e,t){return e.nodeName!=="#comment"&&LE(e)&&$E(e,t)&&(!e.parentElement||Bl(e.parentElement,e))}function LE(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function $E(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function FE(e,t,n){const r=t?.tabbable?ME:Fl,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Bl(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function wf(e){let t=e;for(;t&&!BE(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function BE(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zE(){}function UE(e){return[e.clientX,e.clientY]}function Qm(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,g]=t[u],[,p]=t[u===0?s-1:u-1]||[0,0],h=(l-g)*(n-c)-(c-d)*(r-l);if(g<l){if(r>=g&&r<l){if(h===0)return!0;h>0&&(r===g?r>p&&(o=!o):o=!o)}}else if(l<g){if(r>l&&r<=g){if(h===0)return!0;h<0&&(r===g?r<p&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function ke(e,t){return H(e,t)}var oi=new Map,xf=new Set;function _f(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=oi.get(n.target);r||(r=new Set,oi.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=oi.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),oi.delete(n.target)),oi.size===0)){for(const o of xf)o();xf.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?_f():document.addEventListener("DOMContentLoaded",_f));function rl(e,t){const n=Ef(e,t,"left"),r=Ef(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function Ef(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function KE(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=wf(e);for(;e&&o&&e!==n&&o!==n;)rl(o,e),e=o,o=wf(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var wa={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},Di="data-kb-top-layer",e0,ol=!1,or=[];function Ii(e){return or.findIndex(t=>t.node===e)}function jE(e){return or[Ii(e)]}function qE(e){return or.length>0&&or[or.length-1].node===e}function t0(){return or.filter(e=>e.isPointerBlocking)}function HE(){return[...t0()].slice(-1)[0]}function zl(){return t0().length>0}function n0(e){const t=Ii(HE()?.node);return Ii(e)<t}function GE(e){or.push(e)}function VE(e){const t=Ii(e);t<0||or.splice(t,1)}function WE(){for(const{node:e}of or)e.style.pointerEvents=n0(e)?"none":"auto"}function YE(e){if(zl()&&!ol){const t=ln(e);e0=document.body.style.pointerEvents,t.body.style.pointerEvents="none",ol=!0}}function ZE(e){if(zl())return;const t=ln(e);t.body.style.pointerEvents=e0,t.body.style.length===0&&t.body.removeAttribute("style"),ol=!1}var wn={layers:or,isTopMostLayer:qE,hasPointerBlockingLayer:zl,isBelowPointerBlockingLayer:n0,addLayer:GE,removeLayer:VE,indexOf:Ii,find:jE,assignPointerEventToLayers:WE,disableBodyPointerEvents:YE,restoreBodyPointerEvents:ZE};function xa(e,t){const[n,r]=I(Cf(t?.()));return se(()=>{r(e()?.tagName.toLowerCase()||Cf(t?.()))}),n}function Cf(e){return Lo(e)?e:void 0}function Le(e){const[t,n]=de(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(nm,H(n,{get component(){return t.as}}))}var XE=Object.defineProperty,Pn=(e,t)=>{for(var n in t)XE(e,n,{get:t[n],enumerable:!0})},JE={};Pn(JE,{Button:()=>r0,Root:()=>pr});var QE=["button","color","file","image","reset","submit"];function eC(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?QE.indexOf(e.type)!==-1:!1}function pr(e){let t;const n=ke({type:"button"},e),[r,o]=de(n,["ref","type","disabled"]),i=xa(()=>t,()=>"button"),s=ie(()=>{const c=i();return c==null?!1:eC({tagName:c,type:r.type})}),a=ie(()=>i()==="input"),u=ie(()=>i()==="a"&&t?.getAttribute("href")!=null);return f(Le,H({as:"button",ref(c){var l=et(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return Z(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return Z(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var r0=pr;function gt(e){return t=>(e(t),()=>e(void 0))}var Wt=e=>typeof e=="function"?e():e,tC=e=>{const t=ie(()=>{const s=Wt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=I(Wt(e.show)?"present":"hidden");let i="none";return se(s=>{const a=Wt(e.show);return ft(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),se(()=>{const s=Wt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ae(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},nC=tC,sr=nC,rC={};Pn(rC,{CloseButton:()=>i0,Description:()=>s0,List:()=>u0,ProgressFill:()=>c0,ProgressTrack:()=>l0,Region:()=>d0,Root:()=>f0,Title:()=>g0,Toast:()=>uo,toaster:()=>Ri,useToastContext:()=>Vi});var o0=ut();function Vi(){const e=st(o0);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function i0(e){const t=Vi(),[n,r]=de(e,["aria-label","onClick"]);return f(pr,H({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Ie(i,n.onClick),t.close()}},r))}function s0(e){const t=Vi(),n=ke({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerDescriptionId(r.id))),f(Le,H({as:"div",get id(){return r.id}},o))}var a0=ut();function Ul(){const e=st(a0);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function u0(e){let t;const n=Ul(),[r,o]=de(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{Ie(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{Ie(c,r.onFocusOut),Lt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{Ie(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{Ie(c,r.onPointerLeave),Lt(t,ln(t).activeElement)||n.resumeAllTimer()};return se(wt([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const d=ln(c),g=p=>{l.every(m=>p[m]||p.code===m)&&xt(c)};d.addEventListener("keydown",g),ae(()=>d.removeEventListener("keydown",g))})),se(()=>{if(!n.pauseOnPageIdle())return;const c=Ll(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),ae(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),f(Le,H({as:"ol",ref(c){var l=et(d=>t=d,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return f(rt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function c0(e){const t=Ul(),n=Vi(),[r,o]=de(e,["style"]),[i,s]=I(100);let a=0;return se(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});ae(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),f(Le,H({as:"div",get style(){return kn({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function l0(e){return f(Le,H({as:"div","aria-hidden":"true",role:"presentation"},e))}var[Kl,Wi]=Aw({toasts:[]});function oC(e){Wi("toasts",t=>[...t,e])}function iC(e){return Kl.toasts.find(t=>t.id===e)}function sC(e,t){const n=Kl.toasts.findIndex(r=>r.id===e);n!==-1&&Wi("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function aC(e){Wi("toasts",t=>t.id===e,"dismiss",!0)}function uC(e){Wi("toasts",t=>t.filter(n=>n.id!==e))}function cC(){Wi("toasts",[])}var go={toasts:()=>Kl.toasts,add:oC,get:iC,update:sC,dismiss:aC,remove:uC,clear:cC},Sf="{hotkey}",lC={close:"Close"},dC={notifications:e=>`Notifications (${e})`};function d0(e){const t=ke({id:`toast-region-${Rt()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:dC},e),[n,r]=de(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ie(()=>go.toasts().filter(g=>g.region===n.regionId&&g.dismiss===!1).slice(0,n.limit)),[i,s]=I(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(Sf)).replace(Sf,u()),l=()=>({[Di]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:dn(()=>r.id)};return f(a0.Provider,{value:d,get children(){return f(Le,H({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return kn({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var fC="toast.swipeStart",gC="toast.swipeMove",pC="toast.swipeCancel",hC="toast.swipeEnd";function f0(e){const t=Ul(),n=ke({id:`toast-${Rt()}`,priority:"high",translations:lC},e),[r,o]=de(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=I(!0),[a,u]=I(),[c,l]=I(),[d,g]=I(!0),[p,h]=I(),{present:m}=sr({show:i,element:()=>p()??null}),v=ie(()=>r.duration||t.duration());let y,b=0,w=v(),_=null,C=null;const k=()=>{s(!1),g(!0)},T=()=>{go.remove(r.toastId)},S=O=>{!O||r.persistent||(window.clearTimeout(y),b=new Date().getTime(),y=window.setTimeout(k,O))},A=()=>{S(w),r.onResume?.()},N=()=>{const O=new Date().getTime()-b;w=w-O,window.clearTimeout(y),r.onPause?.()},R=O=>{Ie(O,r.onKeyDown),O.key==="Escape"&&(r.onEscapeKeyDown?.(O),O.defaultPrevented||k())},L=O=>{Ie(O,r.onPointerDown),O.button===0&&(_={x:O.clientX,y:O.clientY})},M=O=>{if(Ie(O,r.onPointerMove),!_)return;const B=O.clientX-_.x,ne=O.clientY-_.y,G=!!C,K=["left","right"].includes(t.swipeDirection()),ce=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,U=K?ce(0,B):0,z=K?0:ce(0,ne),V=O.pointerType==="touch"?10:2,re={x:U,y:z},me={originalEvent:O,delta:re};if(G){C=re,vs(gC,r.onSwipeMove,me);const{x:W,y:Y}=re;O.currentTarget.setAttribute("data-swipe","move"),O.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${W}px`),O.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${Y}px`)}else kf(re,t.swipeDirection(),V)?(C=re,vs(fC,r.onSwipeStart,me),O.currentTarget.setAttribute("data-swipe","start"),O.target.setPointerCapture(O.pointerId)):(Math.abs(B)>V||Math.abs(ne)>V)&&(_=null)},D=O=>{Ie(O,r.onPointerUp);const B=C,ne=O.target;if(ne.hasPointerCapture(O.pointerId)&&ne.releasePointerCapture(O.pointerId),C=null,_=null,B){const G=O.currentTarget,K={originalEvent:O,delta:B};if(kf(B,t.swipeDirection(),t.swipeThreshold())){vs(hC,r.onSwipeEnd,K);const{x:ce,y:U}=B;O.currentTarget.setAttribute("data-swipe","end"),O.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),O.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),O.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${ce}px`),O.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${U}px`),k()}else vs(pC,r.onSwipeCancel,K),O.currentTarget.setAttribute("data-swipe","cancel"),O.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),O.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),O.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),O.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");G.addEventListener("click",ce=>ce.preventDefault(),{once:!0})}};Nn(()=>{t.toasts().find(O=>O.id===r.toastId&&O.update)&&g(!1)}),se(wt(()=>t.isPaused(),O=>{O?N():A()},{defer:!0})),se(wt([i,v],([O,B])=>{O&&!t.isPaused()&&S(B)})),se(wt(()=>go.get(r.toastId)?.dismiss,O=>O&&k())),se(wt(()=>m(),O=>!O&&T()));const F={translations:()=>r.translations,close:k,duration:v,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>b,generateId:dn(()=>o.id),registerTitleId:gt(u),registerDescriptionId:gt(l)};return f(q,{get when(){return m()},get children(){return f(o0.Provider,{value:F,get children(){return f(Le,H({as:"li",ref(O){var B=et(h,r.ref);typeof B=="function"&&B(O)},role:"status",tabIndex:0,get style(){return kn({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:R,onPointerDown:L,onPointerMove:M,onPointerUp:D},o))}})}})}function kf(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function vs(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function g0(e){const t=Vi(),n=ke({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerTitleId(r.id))),f(Le,H({as:"div",get id(){return r.id}},o))}var mC=0;function p0(e,t){const n=mC++;return go.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function il(e,t){go.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function bC(e,t,n){const r=p0(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Hi(e)?e():e).then(o=>il(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>il(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function yC(e){return go.dismiss(e),e}function vC(){go.clear()}var Ri={show:p0,update:il,promise:bC,dismiss:yC,clear:vC},uo=Object.assign(f0,{CloseButton:i0,Description:s0,List:u0,ProgressFill:c0,ProgressTrack:l0,Region:d0,Title:g0,toaster:Ri});function Yi(e){const[t,n]=I(e.defaultValue?.()),r=ie(()=>e.value?.()!==void 0),o=ie(()=>r()?e.value?.():t());return[o,s=>{ft(()=>{const a=pE(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function h0(e){const[t,n]=Yi(e);return[()=>t()??!1,n]}function wC(e){const[t,n]=Yi(e);return[()=>t()??[],n]}function m0(e={}){const[t,n]=h0({value:()=>J(e.isSelected),defaultValue:()=>!!J(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(i)},toggle:()=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(!t())}}}function b0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Lo(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Lo(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Lo(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Lo(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Lo(u)||_E(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=b0({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function xC(e,t=[]){return ie(()=>{const n=b0({dataSource:J(e.dataSource),getKey:J(e.getKey),getTextValue:J(e.getTextValue),getDisabled:J(e.getDisabled),getSectionChildren:J(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var _C=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),EC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function CC(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return _C.has(n)}const t=e.split("-")[0];return EC.has(t)}function SC(e){return CC(e)?"rtl":"ltr"}function y0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:SC(e)}}var sl=y0(),pi=new Set;function Af(){sl=y0();for(const e of pi)e(sl)}function kC(){const[e,t]=I(sl),n=ie(()=>e());return Nn(()=>{pi.size===0&&window.addEventListener("languagechange",Af),pi.add(t),ae(()=>{pi.delete(t),pi.size===0&&window.removeEventListener("languagechange",Af)})}),{locale:()=>n().locale,direction:()=>n().direction}}var AC=ut();function Xr(){const e=kC();return st(AC)||e}var uu=new Map;function v0(e){const{locale:t}=Xr(),n=ie(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ie(()=>{const r=n();let o;return uu.has(r)&&(o=uu.get(r)),o||(o=new Intl.Collator(t(),e),uu.set(r,o)),o})}var Qn=class w0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof w0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function TC(e){const[t,n]=Yi(e);return[()=>t()??new Qn,n]}function x0(e){return kE()?e.altKey:e.ctrlKey}function $o(e){return Gi()?e.metaKey:e.ctrlKey}function Tf(e){return new Qn(e)}function _0(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function DC(e){const t=ke({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=I(!1),[o,i]=I(),s=ie(()=>{const m=J(t.selectedKeys);return m!=null?Tf(m):m}),a=ie(()=>{const m=J(t.defaultSelectedKeys);return m!=null?Tf(m):new Qn}),[u,c]=TC({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[l,d]=I(J(t.selectionBehavior)),g=()=>J(t.selectionMode),p=()=>J(t.disallowEmptySelection)??!1,h=m=>{(J(t.allowDuplicateSelectionEvents)||!_0(m,u()))&&c(m)};return se(()=>{const m=u();J(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),se(()=>{d(J(t.selectionBehavior)??"toggle")}),{selectionMode:g,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:h}}function E0(e){const[t,n]=I(""),[r,o]=I(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(J(e.isDisabled))return;const a=J(e.keyboardDelegate),u=J(e.selectionManager);if(!a.getKeyForSearch)return;const c=IC(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(g=>g+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&RC(l)&&(l=l[0],d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function IC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function RC(e){return e.split("").every(t=>t===e[0])}function OC(e,t,n){const o=H({selectOnFocus:()=>J(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>n?.()??t(),{direction:s}=Xr();let a={top:0,left:0};bE(()=>J(o.isVirtualized)?void 0:i(),"scroll",()=>{const v=i();v&&(a={top:v.scrollTop,left:v.scrollLeft})});const{typeSelectHandlers:u}=E0({isDisabled:()=>J(o.disallowTypeAhead),keyboardDelegate:()=>J(o.keyboardDelegate),selectionManager:()=>J(o.selectionManager)}),c=()=>J(o.orientation)??"vertical",l=v=>{Ie(v,u.onKeyDown),v.altKey&&v.key==="Tab"&&v.preventDefault();const y=t();if(!y?.contains(v.target))return;const b=J(o.selectionManager),w=J(o.selectOnFocus),_=S=>{S!=null&&(b.setFocusedKey(S),v.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&!x0(v)&&b.replaceSelection(S))},C=J(o.keyboardDelegate),k=J(o.shouldFocusWrap),T=b.focusedKey();switch(v.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){v.preventDefault();let S;T!=null?S=C.getKeyBelow(T):S=C.getFirstKey?.(),S==null&&k&&(S=C.getFirstKey?.(T)),_(S)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){v.preventDefault();let S;T!=null?S=C.getKeyAbove(T):S=C.getLastKey?.(),S==null&&k&&(S=C.getLastKey?.(T)),_(S)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){v.preventDefault();const S=s()==="rtl";let A;T!=null?A=C.getKeyLeftOf(T):A=S?C.getFirstKey?.():C.getLastKey?.(),_(A)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){v.preventDefault();const S=s()==="rtl";let A;T!=null?A=C.getKeyRightOf(T):A=S?C.getLastKey?.():C.getFirstKey?.(),_(A)}break}case"Home":if(C.getFirstKey){v.preventDefault();const S=C.getFirstKey(T,$o(v));S!=null&&(b.setFocusedKey(S),$o(v)&&v.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&b.replaceSelection(S))}break;case"End":if(C.getLastKey){v.preventDefault();const S=C.getLastKey(T,$o(v));S!=null&&(b.setFocusedKey(S),$o(v)&&v.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&b.replaceSelection(S))}break;case"PageDown":if(C.getKeyPageBelow&&T!=null){v.preventDefault();const S=C.getKeyPageBelow(T);_(S)}break;case"PageUp":if(C.getKeyPageAbove&&T!=null){v.preventDefault();const S=C.getKeyPageAbove(T);_(S)}break;case"a":$o(v)&&b.selectionMode()==="multiple"&&J(o.disallowSelectAll)!==!0&&(v.preventDefault(),b.selectAll());break;case"Escape":v.defaultPrevented||(v.preventDefault(),J(o.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!J(o.allowsTabNavigation)){if(v.shiftKey)y.focus();else{const S=FE(y,{tabbable:!0});let A,N;do N=S.lastChild(),N&&(A=N);while(N);A&&!A.contains(document.activeElement)&&xt(A)}break}}},d=v=>{const y=J(o.selectionManager),b=J(o.keyboardDelegate),w=J(o.selectOnFocus);if(y.isFocused()){v.currentTarget.contains(v.target)||y.setFocused(!1);return}if(v.currentTarget.contains(v.target)){if(y.setFocused(!0),y.focusedKey()==null){const _=k=>{k!=null&&(y.setFocusedKey(k),w&&y.replaceSelection(k))},C=v.relatedTarget;C&&v.currentTarget.compareDocumentPosition(C)&Node.DOCUMENT_POSITION_FOLLOWING?_(y.lastSelectedKey()??b.getLastKey?.()):_(y.firstSelectedKey()??b.getFirstKey?.())}else if(!J(o.isVirtualized)){const _=i();if(_){_.scrollTop=a.top,_.scrollLeft=a.left;const C=_.querySelector(`[data-key="${y.focusedKey()}"]`);C&&(xt(C),rl(_,C))}}}},g=v=>{const y=J(o.selectionManager);v.currentTarget.contains(v.relatedTarget)||y.setFocused(!1)},p=v=>{i()===v.target&&v.preventDefault()},h=()=>{const v=J(o.autoFocus);if(!v)return;const y=J(o.selectionManager),b=J(o.keyboardDelegate);let w;v==="first"&&(w=b.getFirstKey?.()),v==="last"&&(w=b.getLastKey?.());const _=y.selectedKeys();_.size&&(w=_.values().next().value),y.setFocused(!0),y.setFocusedKey(w);const C=t();C&&w==null&&!J(o.shouldUseVirtualFocus)&&xt(C)};return Nn(()=>{o.deferAutoFocus?setTimeout(h,0):h()}),se(wt([i,()=>J(o.isVirtualized),()=>J(o.selectionManager).focusedKey()],v=>{const[y,b,w]=v;if(b)w&&o.scrollToKey?.(w);else if(w&&y){const _=y.querySelector(`[data-key="${w}"]`);_&&rl(y,_)}})),{tabIndex:ie(()=>{if(!J(o.shouldUseVirtualFocus))return J(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:d,onFocusOut:g}}function jl(e,t){const n=()=>J(e.selectionManager),r=()=>J(e.key),o=()=>J(e.shouldUseVirtualFocus),i=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||$o(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>J(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=b=>{u()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!J(e.shouldSelectOnPressUp)&&i(b))},d=b=>{u()&&b.pointerType==="mouse"&&b.button===0&&J(e.shouldSelectOnPressUp)&&J(e.allowsDifferentPressOrigin)&&i(b)},g=b=>{u()&&(J(e.shouldSelectOnPressUp)&&!J(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(b)},p=b=>{!u()||!["Enter"," "].includes(b.key)||(x0(b)?n().toggleSelection(r()):i(b))},h=b=>{a()&&b.preventDefault()},m=b=>{const w=t();o()||a()||!w||b.target===w&&n().setFocusedKey(r())},v=ie(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=ie(()=>J(e.virtualized)?void 0:r());return se(wt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([b,w,_,C,k])=>{b&&w===C&&k&&!_&&document.activeElement!==b&&(e.focus?e.focus():xt(b))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:v,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:g,onKeyDown:p,onMouseDown:h,onFocus:m}}var NC=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Qn(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Qn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Qn([t],t,t):new Qn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Qn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Qn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Df=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function ql(e){const t=DC(e),r=xC({dataSource:()=>J(e.dataSource),getKey:()=>J(e.getKey),getTextValue:()=>J(e.getTextValue),getDisabled:()=>J(e.getDisabled),getSectionChildren:()=>J(e.getSectionChildren),factory:i=>e.filter?new Df(e.filter(i)):new Df(i)},[()=>e.filter]),o=new NC(r,t);return qc(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var C0=ut();function S0(){return st(C0)}function MC(){const e=S0();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function k0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function PC(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&k0(o,n))return r+1}return 0}function LC(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:k0(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function A0(e,t){const n=LC(e);e!==n&&t(n)}function $C(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return ln(r).body}function FC(e,t){se(()=>{const n=setTimeout(()=>{A0(e(),t)});ae(()=>clearTimeout(n))})}function BC(e,t){if(typeof IntersectionObserver!="function"){FC(e,t);return}let n=[];se(()=>{const r=()=>{const s=!!n.length;n=e(),s&&A0(e(),t)},o=$C(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ae(()=>i.disconnect())})}function zC(e={}){const[t,n]=wC({value:()=>J(e.items),onChange:i=>e.onItemsChange?.(i)});BC(t,n);const r=i=>(n(s=>{const a=PC(s,i);return xE(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>f(C0.Provider,{value:{registerItem:r},get children(){return i.children}})}}function UC(e){const t=MC(),n=ke({shouldRegisterItem:!0},e);se(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ae(r)})}const KC=["top","right","bottom","left"],Hr=Math.min,xn=Math.max,ea=Math.round,ws=Math.floor,ir=e=>({x:e,y:e}),jC={left:"right",right:"left",bottom:"top",top:"bottom"};function al(e,t,n){return xn(e,Hr(t,n))}function yo(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function ei(e){return e.split("-")[1]}function T0(e){return e==="x"?"y":"x"}function Hl(e){return e==="y"?"height":"width"}function Ar(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gl(e){return T0(Ar(e))}function qC(e,t,n){n===void 0&&(n=!1);const r=ei(e),o=Gl(e),i=Hl(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ta(s)),[s,ta(s)]}function HC(e){const t=ta(e);return[ul(e),t,ul(t)]}function ul(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const If=["left","right"],Rf=["right","left"],GC=["top","bottom"],VC=["bottom","top"];function WC(e,t,n){switch(e){case"top":case"bottom":return n?t?Rf:If:t?If:Rf;case"left":case"right":return t?GC:VC;default:return[]}}function YC(e,t,n,r){const o=ei(e);let i=WC(Gr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ul)))),i}function ta(e){const t=Gr(e);return jC[t]+e.slice(t.length)}function ZC(e){return{top:0,right:0,bottom:0,left:0,...e}}function D0(e){return typeof e!="number"?ZC(e):{top:e,right:e,bottom:e,left:e}}function na(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Of(e,t,n){let{reference:r,floating:o}=e;const i=Ar(t),s=Gl(t),a=Hl(s),u=Gr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ei(t)){case"start":p[s]-=g*(n&&c?-1:1);break;case"end":p[s]+=g*(n&&c?-1:1);break}return p}async function XC(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:g=!1,padding:p=0}=yo(t,e),h=D0(p),v=a[g?d==="floating"?"reference":"floating":d],y=na(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:u}):b);return{top:(y.top-C.top+h.top)/_.y,bottom:(C.bottom-y.bottom+h.bottom)/_.y,left:(y.left-C.left+h.left)/_.x,right:(C.right-y.right+h.right)/_.x}}const JC=50,QC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:XC},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=Of(c,r,u),g=r,p=0;const h={};for(let m=0;m<i.length;m++){const v=i[m];if(!v)continue;const{name:y,fn:b}=v,{x:w,y:_,data:C,reset:k}=await b({x:l,y:d,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});l=w??l,d=_??d,h[y]={...h[y],...C},k&&p<JC&&(p++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:l,y:d}=Of(c,g,u)),m=-1)}return{x:l,y:d,placement:g,strategy:o,middlewareData:h}},eS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=yo(e,t)||{};if(c==null)return{};const d=D0(l),g={x:n,y:r},p=Gl(o),h=Hl(p),m=await s.getDimensions(c),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=i.reference[h]+i.reference[p]-g[p]-i.floating[h],C=g[p]-i.reference[p],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=k?k[w]:0;(!T||!await(s.isElement==null?void 0:s.isElement(k)))&&(T=a.floating[w]||i.floating[h]);const S=_/2-C/2,A=T/2-m[h]/2-1,N=Hr(d[y],A),R=Hr(d[b],A),L=N,M=T-m[h]-R,D=T/2-m[h]/2+S,F=al(L,D,M),O=!u.arrow&&ei(o)!=null&&D!==F&&i.reference[h]/2-(D<L?N:R)-m[h]/2<0,B=O?D<L?D-L:D-M:0;return{[p]:g[p]+B,data:{[p]:F,centerOffset:D-F-B,...O&&{alignmentOffset:B}},reset:O}}}),tS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=yo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Gr(o),b=Ar(a),w=Gr(a)===a,_=await(u.isRTL==null?void 0:u.isRTL(c.floating)),C=g||(w||!m?[ta(a)]:HC(a)),k=h!=="none";!g&&k&&C.push(...YC(a,m,h,_));const T=[a,...C],S=await u.detectOverflow(t,v),A=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&A.push(S[y]),d){const D=qC(o,s,_);A.push(S[D[0]],S[D[1]])}if(N=[...N,{placement:o,overflows:A}],!A.every(D=>D<=0)){var R,L;const D=(((R=i.flip)==null?void 0:R.index)||0)+1,F=T[D];if(F&&(!(d==="alignment"?b!==Ar(F):!1)||N.every(ne=>Ar(ne.placement)===b?ne.overflows[0]>0:!0)))return{data:{index:D,overflows:N},reset:{placement:F}};let O=(L=N.filter(B=>B.overflows[0]<=0).sort((B,ne)=>B.overflows[1]-ne.overflows[1])[0])==null?void 0:L.placement;if(!O)switch(p){case"bestFit":{var M;const B=(M=N.filter(ne=>{if(k){const G=Ar(ne.placement);return G===b||G==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(G=>G>0).reduce((G,K)=>G+K,0)]).sort((ne,G)=>ne[1]-G[1])[0])==null?void 0:M[0];B&&(O=B);break}case"initialPlacement":O=a;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function Nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mf(e){return KC.some(t=>e[t]>=0)}const nS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=yo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Nf(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Mf(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Nf(s,n.floating);return{data:{escapedOffsets:a,escaped:Mf(a)}}}default:return{}}}}},rS=new Set(["left","top"]);async function oS(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Gr(n),a=ei(n),u=Ar(n)==="y",c=rS.has(s)?-1:1,l=i&&u?-1:1,d=yo(t,e);let{mainAxis:g,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),u?{x:p*l,y:g*c}:{x:g*c,y:p*l}}const iS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await oS(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},sS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...c}=yo(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),g=Ar(Gr(o)),p=T0(g);let h=l[p],m=l[g];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+d[y],_=h-d[b];h=al(w,h,_)}if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=m+d[y],_=m-d[b];m=al(w,m,_)}const v=u.fn({...t,[p]:h,[g]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:s,[g]:a}}}}}},aS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=yo(e,t),l=await s.detectOverflow(t,c),d=Gr(o),g=ei(o),p=Ar(o)==="y",{width:h,height:m}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,v=g==="end"?"top":"bottom");const b=m-l.top-l.bottom,w=h-l.left-l.right,_=Hr(m-l[v],b),C=Hr(h-l[y],w),k=!t.middlewareData.shift;let T=_,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=b),k&&!g){const N=xn(l.left,0),R=xn(l.right,0),L=xn(l.top,0),M=xn(l.bottom,0);p?S=h-2*(N!==0||R!==0?N+R:xn(l.left,l.right)):T=m-2*(L!==0||M!==0?L+M:xn(l.top,l.bottom))}await u({...t,availableWidth:S,availableHeight:T});const A=await s.getDimensions(a.floating);return h!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function _a(){return typeof window<"u"}function ti(e){return I0(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(I0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function I0(e){return _a()?e instanceof Node||e instanceof En(e).Node:!1}function qn(e){return _a()?e instanceof Element||e instanceof En(e).Element:!1}function Ir(e){return _a()?e instanceof HTMLElement||e instanceof En(e).HTMLElement:!1}function Pf(e){return!_a()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof En(e).ShadowRoot}function Zi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function uS(e){return/^(table|td|th)$/.test(ti(e))}function Ea(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const cS=/transform|translate|scale|rotate|perspective|filter/,lS=/paint|layout|strict|content/,ro=e=>!!e&&e!=="none";let cu;function Vl(e){const t=qn(e)?Hn(e):e;return ro(t.transform)||ro(t.translate)||ro(t.scale)||ro(t.rotate)||ro(t.perspective)||!Wl()&&(ro(t.backdropFilter)||ro(t.filter))||cS.test(t.willChange||"")||lS.test(t.contain||"")}function dS(e){let t=Vr(e);for(;Ir(t)&&!Go(t);){if(Vl(t))return t;if(Ea(t))return null;t=Vr(t)}return null}function Wl(){return cu==null&&(cu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cu}function Go(e){return/^(html|body|#document)$/.test(ti(e))}function Hn(e){return En(e).getComputedStyle(e)}function Ca(e){return qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vr(e){if(ti(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pf(e)&&e.host||hr(e);return Pf(t)?t.host:t}function R0(e){const t=Vr(e);return Go(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ir(t)&&Zi(t)?t:R0(t)}function Oi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=R0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=En(o);if(i){const a=cl(s);return t.concat(s,s.visualViewport||[],Zi(o)?o:[],a&&n?Oi(a):[])}else return t.concat(o,Oi(o,[],n))}function cl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function O0(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ir(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ea(n)!==i||ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Yl(e){return qn(e)?e:e.contextElement}function Ko(e){const t=Yl(e);if(!Ir(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=O0(t);let s=(i?ea(n.width):n.width)/r,a=(i?ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const fS=ir(0);function N0(e){const t=En(e);return!Wl()||!t.visualViewport?fS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==En(e)?!1:t}function po(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Yl(e);let s=ir(1);t&&(r?qn(r)&&(s=Ko(r)):s=Ko(e));const a=gS(i,n,r)?N0(i):ir(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const g=En(i),p=r&&qn(r)?En(r):r;let h=g,m=cl(h);for(;m&&r&&p!==h;){const v=Ko(m),y=m.getBoundingClientRect(),b=Hn(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,_=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;u*=v.x,c*=v.y,l*=v.x,d*=v.y,u+=w,c+=_,h=En(m),m=cl(h)}}return na({width:l,height:d,x:u,y:c})}function Sa(e,t){const n=Ca(e).scrollLeft;return t?t.left+n:po(hr(e)).left+n}function M0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Sa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function pS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=hr(r),a=t?Ea(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=ir(1);const l=ir(0),d=Ir(r);if((d||!d&&!i)&&((ti(r)!=="body"||Zi(s))&&(u=Ca(r)),d)){const p=po(r);c=Ko(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const g=s&&!d&&!i?M0(s,u):ir(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-u.scrollTop*c.y+l.y+g.y}}function hS(e){return Array.from(e.getClientRects())}function mS(e){const t=hr(e),n=Ca(e),r=e.ownerDocument.body,o=xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Sa(e);const a=-n.scrollTop;return Hn(r).direction==="rtl"&&(s+=xn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Lf=25;function bS(e,t){const n=En(e),r=hr(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Wl();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Sa(r);if(c<=0){const l=r.ownerDocument,d=l.body,g=getComputedStyle(d),p=l.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Lf&&(i-=h)}else c<=Lf&&(i+=c);return{width:i,height:s,x:a,y:u}}function yS(e,t){const n=po(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ir(e)?Ko(e):ir(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function $f(e,t,n){let r;if(t==="viewport")r=bS(e,n);else if(t==="document")r=mS(hr(e));else if(qn(t))r=yS(t,n);else{const o=N0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return na(r)}function P0(e,t){const n=Vr(e);return n===t||!qn(n)||Go(n)?!1:Hn(n).position==="fixed"||P0(n,t)}function vS(e,t){const n=t.get(e);if(n)return n;let r=Oi(e,[],!1).filter(a=>qn(a)&&ti(a)!=="body"),o=null;const i=Hn(e).position==="fixed";let s=i?Vr(e):e;for(;qn(s)&&!Go(s);){const a=Hn(s),u=Vl(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Zi(s)&&!u&&P0(e,s))?r=r.filter(l=>l!==s):o=a,s=Vr(s)}return t.set(e,r),r}function wS(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ea(t)?[]:vS(t,this._c):[].concat(n),r],a=$f(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let g=1;g<s.length;g++){const p=$f(t,s[g],o);u=xn(p.top,u),c=Hr(p.right,c),l=Hr(p.bottom,l),d=xn(p.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function xS(e){const{width:t,height:n}=O0(e);return{width:t,height:n}}function _S(e,t,n){const r=Ir(t),o=hr(t),i=n==="fixed",s=po(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=ir(0);function c(){u.x=Sa(o)}if(r||!r&&!i)if((ti(t)!=="body"||Zi(o))&&(a=Ca(t)),r){const p=po(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?M0(o,a):ir(0),d=s.left+a.scrollLeft-u.x-l.x,g=s.top+a.scrollTop-u.y-l.y;return{x:d,y:g,width:s.width,height:s.height}}function lu(e){return Hn(e).position==="static"}function Ff(e,t){if(!Ir(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return hr(e)===n&&(n=n.ownerDocument.body),n}function L0(e,t){const n=En(e);if(Ea(e))return n;if(!Ir(e)){let o=Vr(e);for(;o&&!Go(o);){if(qn(o)&&!lu(o))return o;o=Vr(o)}return n}let r=Ff(e,t);for(;r&&uS(r)&&lu(r);)r=Ff(r,t);return r&&Go(r)&&lu(r)&&!Vl(r)?n:r||dS(e)||n}const ES=async function(e){const t=this.getOffsetParent||L0,n=this.getDimensions,r=await n(e.floating);return{reference:_S(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function CS(e){return Hn(e).direction==="rtl"}const $0={convertOffsetParentRelativeRectToViewportRelativeRect:pS,getDocumentElement:hr,getClippingRect:wS,getOffsetParent:L0,getElementRects:ES,getClientRects:hS,getDimensions:xS,getScale:Ko,isElement:qn,isRTL:CS};function F0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function SS(e,t){let n=null,r;const o=hr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:g,height:p}=c;if(a||t(),!g||!p)return;const h=ws(d),m=ws(o.clientWidth-(l+g)),v=ws(o.clientHeight-(d+p)),y=ws(l),w={rootMargin:-h+"px "+-m+"px "+-v+"px "+-y+"px",threshold:xn(0,Hr(1,u))||1};let _=!0;function C(k){const T=k[0].intersectionRatio;if(T!==u){if(!_)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!F0(c,e.getBoundingClientRect())&&s(),_=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),i}function kS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Yl(e),l=o||i?[...c?Oi(c):[],...t?Oi(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?SS(c,n):null;let g=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),c&&!u&&p.observe(c),t&&p.observe(t));let h,m=u?po(e):null;u&&v();function v(){const y=po(e);m&&!F0(m,y)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{var y;l.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const AS=iS,TS=sS,DS=tS,IS=aS,RS=nS,OS=eS,NS=(e,t,n)=>{const r=new Map,o={platform:$0,...n},i={...o.platform,_c:r};return QC(e,t,{...o,platform:i})};var MS=$('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Zl=ut();function Xl(){const e=st(Zl);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var ll=30,Bf=ll/2,PS={top:180,right:-90,bottom:0,left:90};function Rr(e){const t=Xl(),n=ke({size:ll},e),[r,o]=de(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=LS(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*(ll/r.size),d=()=>`rotate(${PS[i()]} ${Bf} ${Bf}) translate(0 2)`;return f(Le,H({as:"div",ref(g){var p=et(t.setArrowRef,r.ref);typeof p=="function"&&p(g)},"aria-hidden":"true",get style(){return kn({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var g=MS(),p=g.firstChild,h=p.firstChild;return h.nextSibling,Me(()=>Be(p,"transform",d())),g}}))}function LS(e){const[t,n]=I();return se(()=>{const r=e();r&&n(Ll(r).getComputedStyle(r))}),t}function $S(e){const t=Xl(),[n,r]=de(e,["ref","style"]);return f(Le,H({as:"div",ref(o){var i=et(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return kn({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function zf(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function FS(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?zf(r):e?e.getBoundingClientRect():zf()}}}function BS(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var zS={top:"bottom",right:"left",bottom:"top",left:"right"};function US(e,t){const[n,r]=e.split("-"),o=zS[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function KS(e){const t=ke({getAnchorRect:g=>g?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=I(),[o,i]=I(),[s,a]=I(t.placement),u=()=>FS(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Xr();async function l(){const g=u(),p=n(),h=o();if(!g||!p)return;const m=(h?.clientHeight||0)/2,v=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),g.getBoundingClientRect();const y=[AS(({placement:k})=>{const T=!!k.split("-")[1];return{mainAxis:v,crossAxis:T?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const k=typeof t.flip=="string"?t.flip.split(" "):void 0;if(k!==void 0&&!k.every(BS))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(DS({padding:t.overflowPadding,fallbackPlacements:k}))}(t.slide||t.overlap)&&y.push(TS({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(IS({padding:t.overflowPadding,apply({availableWidth:k,availableHeight:T,rects:S}){const A=Math.round(S.reference.width);k=Math.floor(k),T=Math.floor(T),p.style.setProperty("--kb-popper-anchor-width",`${A}px`),p.style.setProperty("--kb-popper-content-available-width",`${k}px`),p.style.setProperty("--kb-popper-content-available-height",`${T}px`),t.sameWidth&&(p.style.width=`${A}px`),t.fitViewport&&(p.style.maxWidth=`${k}px`,p.style.maxHeight=`${T}px`)}})),t.hideWhenDetached&&y.push(RS({padding:t.detachedPadding})),h&&y.push(OS({element:h,padding:t.arrowPadding}));const b=await NS(g,p,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...$0,isRTL:()=>c()==="rtl"}});if(a(b.placement),t.onCurrentPlacementChange?.(b.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",US(b.placement,c()));const w=Math.round(b.x),_=Math.round(b.y);let C;if(t.hideWhenDetached&&(C=b.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${_}px, 0)`,visibility:C}),h&&b.middlewareData.arrow){const{x:k,y:T}=b.middlewareData.arrow,S=b.placement.split("-")[0];Object.assign(h.style,{left:k!=null?`${k}px`:"",top:T!=null?`${T}px`:"",[S]:"100%"})}}se(()=>{const g=u(),p=n();if(!g||!p)return;const h=kS(g,p,l,{elementResize:typeof ResizeObserver=="function"});ae(h)}),se(()=>{const g=n(),p=t.contentRef?.();!g||!p||queueMicrotask(()=>{g.style.zIndex=getComputedStyle(p).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return f(Zl.Provider,{value:d,get children(){return t.children}})}var Jr=Object.assign(KS,{Arrow:Rr,Context:Zl,usePopperContext:Xl,Positioner:$S});function jS(e){const t=n=>{n.key===va.Escape&&e.onEscapeKeyDown?.(n)};se(()=>{if(J(e.isDisabled))return;const n=e.ownerDocument?.()??ln();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}var Uf="interactOutside.pointerDownOutside",Kf="interactOutside.focusOutside";function qS(e,t){let n,r=zE;const o=()=>ln(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const g=d.target;return!(g instanceof Element)||g.closest(`[${Di}]`)||!Lt(o(),g)||Lt(t(),g)?!1:!e.shouldExcludeElement?.(g)},c=d=>{function g(){const p=t(),h=d.target;if(!p||!h||!u(d))return;const m=dt([i,a]);h.addEventListener(Uf,m,{once:!0});const v=new CustomEvent(Uf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||DE(d)&&d.button===0}});h.dispatchEvent(v)}d.pointerType==="touch"?(o().removeEventListener("click",g),r=g,o().addEventListener("click",g,{once:!0})):g()},l=d=>{const g=t(),p=d.target;if(!g||!p||!u(d))return;const h=dt([s,a]);p.addEventListener(Kf,h,{once:!0});const m=new CustomEvent(Kf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});p.dispatchEvent(m)};se(()=>{J(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ae(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var B0=ut();function HS(){return st(B0)}function Xi(e){let t;const n=HS(),[r,o]=de(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const g=n?.registerNestedLayer(d);return()=>{i.delete(d),g?.()}};qS({shouldExcludeElement:d=>t?r.excludedElements?.some(g=>Lt(g(),d))||[...i].some(g=>Lt(g,d)):!1,onPointerDownOutside:d=>{!t||wn.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!wn.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),jS({ownerDocument:()=>ln(t),onEscapeKeyDown:d=>{!t||!wn.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Nn(()=>{if(!t)return;wn.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);wn.assignPointerEventToLayers(),wn.disableBodyPointerEvents(t),ae(()=>{t&&(wn.removeLayer(t),d?.(),wn.assignPointerEventToLayers(),wn.restoreBodyPointerEvents(t))})}),se(wt([()=>t,()=>r.disableOutsidePointerEvents],([d,g])=>{if(!d)return;const p=wn.find(d);p&&p.isPointerBlocking!==g&&(p.isPointerBlocking=g,wn.assignPointerEventToLayers()),g&&wn.disableBodyPointerEvents(d),ae(()=>{wn.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return f(B0.Provider,{value:l,get children(){return f(Le,H({as:"div",ref(d){var g=et(p=>t=p,r.ref);typeof g=="function"&&g(d)}},o))}})}function vo(e={}){const[t,n]=h0({value:()=>J(e.open),defaultValue:()=>!!J(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var GS={};Pn(GS,{Arrow:()=>Rr,Content:()=>U0,Portal:()=>K0,Root:()=>j0,Tooltip:()=>Ni,Trigger:()=>q0,useTooltipContext:()=>ka});var z0=ut();function ka(){const e=st(z0);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function U0(e){const t=ka(),n=ke({id:t.generateId("content")},e),[r,o]=de(n,["ref","style"]);return se(()=>ae(t.registerContentId(o.id))),f(q,{get when(){return t.contentPresent()},get children(){return f(Jr.Positioner,{get children(){return f(Xi,H({ref(i){var s=et(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return kn({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function K0(e){const t=ka();return f(q,{get when(){return t.contentPresent()},get children(){return f(Ki,e)}})}function VS(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var oo={},WS=0,Io=!1,Er,ii,Ro;function j0(e){const t=`tooltip-${Rt()}`,n=`${++WS}`,r=ke({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=de(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=I(),[c,l]=I(),[d,g]=I(),[p,h]=I(i.placement),m=vo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:D=>o.onOpenChange?.(D)}),{present:v}=sr({show:()=>o.forceMount||m.isOpen(),element:()=>d()??null}),y=()=>{oo[n]=w},b=()=>{for(const D in oo)D!==n&&(oo[D](!0),delete oo[D])},w=(D=!1)=>{D||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},o.closeDelay)),window.clearTimeout(Er),Er=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Ro=window.setTimeout(()=>{window.clearTimeout(Ro),Ro=void 0},o.skipDelayDuration)),Io&&(window.clearTimeout(ii),ii=window.setTimeout(()=>{delete oo[n],ii=void 0,Io=!1},o.closeDelay))},_=()=>{clearTimeout(s),s=void 0,b(),y(),Io=!0,m.open(),window.clearTimeout(Er),Er=void 0,window.clearTimeout(ii),ii=void 0,window.clearTimeout(Ro),Ro=void 0},C=()=>{b(),y(),!m.isOpen()&&!Er&&!Io?Er=window.setTimeout(()=>{Er=void 0,Io=!0,_()},o.openDelay):m.isOpen()||_()},k=(D=!1)=>{!D&&o.openDelay&&o.openDelay>0&&!s&&!Ro?C():_()},T=()=>{window.clearTimeout(Er),Er=void 0,Io=!1},S=()=>{window.clearTimeout(s),s=void 0},A=D=>Lt(c(),D)||Lt(d(),D),N=D=>{const F=c(),O=d();if(!(!F||!O))return VS(D,F,O)},R=D=>{const F=D.target;if(A(F)){S();return}if(!o.ignoreSafeArea){const O=N(p());if(O&&Qm(UE(D),O)){S();return}}s||w()};se(()=>{if(!m.isOpen())return;const D=ln();D.addEventListener("pointermove",R,!0),ae(()=>{D.removeEventListener("pointermove",R,!0)})}),se(()=>{const D=c();if(!D||!m.isOpen())return;const F=B=>{const ne=B.target;Lt(ne,D)&&w(!0)},O=Ll();O.addEventListener("scroll",F,{capture:!0}),ae(()=>{O.removeEventListener("scroll",F,{capture:!0})})}),ae(()=>{clearTimeout(s),oo[n]&&delete oo[n]});const M={dataset:ie(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:v,openTooltip:k,hideTooltip:w,cancelOpening:T,generateId:dn(()=>r.id),registerContentId:gt(u),isTargetOnTooltip:A,setTriggerRef:l,setContentRef:g};return f(z0.Provider,{value:M,get children(){return f(Jr,H({anchorRef:c,contentRef:d,onCurrentPlacementChange:D=>{h(D),o.onCurrentPlacementChange?.(D)}},i))}})}function q0(e){let t;const n=ka(),[r,o]=de(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},l=y=>{n.isOpen()&&!s&&!a&&n.hideTooltip(y)},d=y=>{Ie(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},g=y=>{Ie(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=y=>{Ie(y,r.onPointerDown),i=!0,ln(t).addEventListener("pointerup",u,{once:!0})},h=y=>{Ie(y,r.onClick),s=!1,a=!1,l(!0)},m=y=>{Ie(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},v=y=>{Ie(y,r.onBlur);const b=y.relatedTarget;n.isTargetOnTooltip(b)||(s=!1,a=!1,l(!0))};return ae(()=>{ln(t).removeEventListener("pointerup",u)}),f(Le,H({as:"button",ref(y){var b=et(w=>{n.setTriggerRef(w),t=w},r.ref);typeof b=="function"&&b(y)},get"aria-describedby"(){return Z(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:p,onClick:h,onFocus:m,onBlur:v},()=>n.dataset(),o))}var Ni=Object.assign(j0,{Arrow:Rr,Content:U0,Portal:K0,Trigger:q0}),Jl=["id","name","validationState","required","disabled","readOnly"];function Ql(e){const t=`form-control-${Rt()}`,n=ke({id:t},e),[r,o]=I(),[i,s]=I(),[a,u]=I(),[c,l]=I(),d=(m,v,y)=>{const b=y!=null||r()!=null;return[y,r(),b&&v!=null?m:void 0].filter(Boolean).join(" ")||void 0},g=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,p=ie(()=>({"data-valid":J(n.validationState)==="valid"?"":void 0,"data-invalid":J(n.validationState)==="invalid"?"":void 0,"data-required":J(n.required)?"":void 0,"data-disabled":J(n.disabled)?"":void 0,"data-readonly":J(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>J(n.name)??J(n.id),dataset:p,validationState:()=>J(n.validationState),isRequired:()=>J(n.required),isDisabled:()=>J(n.disabled),isReadOnly:()=>J(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:g,generateId:dn(()=>J(n.id)),registerLabel:gt(o),registerField:gt(s),registerDescription:gt(u),registerErrorMessage:gt(l)}}}var Aa=ut();function Ln(){const e=st(Aa);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Ji(e){const t=Ln(),n=ke({id:t.generateId("description")},e);return se(()=>ae(t.registerDescription(n.id))),f(Le,H({as:"div"},()=>t.dataset(),n))}var YS=$("<option>"),ZS=$("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function XS(e){let t;const[n,r]=de(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),o=Ln(),[i,s]=I(!1),a=u=>{const c=n.collection.getItem(u);return f(q,{get when(){return c?.type==="item"},get children(){var l=YS();return l.value=u,x(l,()=>c?.textValue),Me(()=>l.selected=n.selectionManager.isSelected(u)),l}})};return se(wt(()=>n.selectionManager.selectedKeys(),(u,c)=>{c&&_0(u,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var u=ZS(),c=u.firstChild,l=c.nextSibling;l.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),l.addEventListener("change",g=>{Ie(g,n.onChange),i()||n.selectionManager.setSelectedKeys(new Set([g.target.value])),s(!1)});var d=et(g=>t=g,n.ref);return typeof d=="function"&&jn(d,l),fr(l,H({get multiple(){return n.isMultiple},get name(){return o.name()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),x(l,f(q,{get when(){return n.isVirtualized},get fallback(){return f(rt,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return f(rt,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Me(g=>{var p=wa,h=n.selectionManager.isFocused()||n.isOpen?-1:0,m=o.isRequired(),v=o.isDisabled(),y=o.isReadOnly();return g.e=Ho(u,p,g.e),h!==g.t&&Be(c,"tabindex",g.t=h),m!==g.a&&(c.required=g.a=m),v!==g.o&&(c.disabled=g.o=v),y!==g.i&&(c.readOnly=g.i=y),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()}var jf=new WeakMap;function JS(e){let t=jf.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return jf.set(e,t),t}var H0=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function G0(e,t,n){const r=v0({usage:"search",sensitivity:"base"}),o=ie(()=>{const i=J(e.keyboardDelegate);return i||new H0(e.collection,t,r)});return OC({selectionManager:()=>J(e.selectionManager),keyboardDelegate:o,autoFocus:()=>J(e.autoFocus),deferAutoFocus:()=>J(e.deferAutoFocus),shouldFocusWrap:()=>J(e.shouldFocusWrap),disallowEmptySelection:()=>J(e.disallowEmptySelection),selectOnFocus:()=>J(e.selectOnFocus),disallowTypeAhead:()=>J(e.disallowTypeAhead),shouldUseVirtualFocus:()=>J(e.shouldUseVirtualFocus),allowsTabNavigation:()=>J(e.allowsTabNavigation),isVirtualized:()=>J(e.isVirtualized),scrollToKey:i=>J(e.scrollToKey)?.(i),orientation:()=>J(e.orientation)},t,n)}var QS={};Pn(QS,{Item:()=>Ta,ItemDescription:()=>Da,ItemIndicator:()=>Ia,ItemLabel:()=>Ra,Listbox:()=>ek,Root:()=>td,Section:()=>Oa,useListboxContext:()=>W0});var V0=ut();function W0(){const e=st(V0);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var Y0=ut();function ed(){const e=st(Y0);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function Ta(e){let t;const n=W0(),r=`${n.generateId("item")}-${Rt()}`,o=ke({id:r},e),[i,s]=de(o,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=I(),[c,l]=I(),d=()=>n.listState().selectionManager(),g=()=>d().focusedKey()===i.item.key,p=jl({key:()=>i.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>i.item.disabled},()=>t),h=()=>{if(d().selectionMode()!=="none")return p.isSelected()},m=ie(()=>!(Gi()&&AE())),v=()=>m()?i["aria-label"]:void 0,y=()=>m()?a():void 0,b=()=>m()?c():void 0,w=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(i.item.key)?.index;return S!=null?S+1:void 0},_=()=>{if(n.isVirtualized())return JS(n.listState().collection())},C=S=>{Ie(S,i.onPointerMove),S.pointerType==="mouse"&&!p.isDisabled()&&n.shouldFocusOnHover()&&(xt(S.currentTarget),d().setFocused(!0),d().setFocusedKey(i.item.key))},k=ie(()=>({"data-disabled":p.isDisabled()?"":void 0,"data-selected":p.isSelected()?"":void 0,"data-highlighted":g()?"":void 0})),T={isSelected:p.isSelected,dataset:k,generateId:dn(()=>s.id),registerLabelId:gt(u),registerDescriptionId:gt(l)};return f(Y0.Provider,{value:T,get children(){return f(Le,H({as:"li",ref(S){var A=et(N=>t=N,i.ref);typeof A=="function"&&A(S)},role:"option",get tabIndex(){return p.tabIndex()},get"aria-disabled"(){return p.isDisabled()},get"aria-selected"(){return h()},get"aria-label"(){return v()},get"aria-labelledby"(){return y()},get"aria-describedby"(){return b()},get"aria-posinset"(){return w()},get"aria-setsize"(){return _()},get"data-key"(){return p.dataKey()},get onPointerDown(){return dt([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return dt([i.onPointerUp,p.onPointerUp])},get onClick(){return dt([i.onClick,p.onClick])},get onKeyDown(){return dt([i.onKeyDown,p.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,p.onMouseDown])},get onFocus(){return dt([i.onFocus,p.onFocus])},onPointerMove:C},k,s))}})}function Da(e){const t=ed(),n=ke({id:t.generateId("description")},e);return se(()=>ae(t.registerDescriptionId(n.id))),f(Le,H({as:"div"},()=>t.dataset(),n))}function Ia(e){const t=ed(),n=ke({id:t.generateId("indicator")},e),[r,o]=de(n,["forceMount"]);return f(q,{get when(){return r.forceMount||t.isSelected()},get children(){return f(Le,H({as:"div","aria-hidden":"true"},()=>t.dataset(),o))}})}function Ra(e){const t=ed(),n=ke({id:t.generateId("label")},e);return se(()=>ae(t.registerLabelId(n.id))),f(Le,H({as:"div"},()=>t.dataset(),n))}function td(e){let t;const n=`listbox-${Rt()}`,r=ke({id:n,selectionMode:"single",virtualized:!1},e),[o,i]=de(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=ie(()=>o.state?o.state:ql({selectedKeys:()=>o.value,defaultSelectedKeys:()=>o.defaultValue,onSelectionChange:o.onChange,allowDuplicateSelectionEvents:()=>J(o.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(o.disallowEmptySelection),selectionBehavior:()=>J(o.selectionBehavior),selectionMode:()=>J(o.selectionMode),dataSource:()=>o.options??[],getKey:()=>o.optionValue,getTextValue:()=>o.optionTextValue,getDisabled:()=>o.optionDisabled,getSectionChildren:()=>o.optionGroupChildren})),a=G0({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>J(o.autoFocus),shouldFocusWrap:()=>J(o.shouldFocusWrap),keyboardDelegate:()=>o.keyboardDelegate,disallowEmptySelection:()=>J(o.disallowEmptySelection),selectOnFocus:()=>J(o.selectOnFocus),disallowTypeAhead:()=>J(o.disallowTypeAhead),shouldUseVirtualFocus:()=>J(o.shouldUseVirtualFocus),allowsTabNavigation:()=>J(o.allowsTabNavigation),isVirtualized:()=>o.virtualized,scrollToKey:()=>o.scrollToItem},()=>t,()=>o.scrollRef?.()),u={listState:s,generateId:dn(()=>i.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>o.virtualized};return f(V0.Provider,{value:u,get children(){return f(Le,H({as:"ul",ref(c){var l=et(d=>t=d,o.ref);typeof l=="function"&&l(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return dt([o.onKeyDown,a.onKeyDown])},get onMouseDown(){return dt([o.onMouseDown,a.onMouseDown])},get onFocusIn(){return dt([o.onFocusIn,a.onFocusIn])},get onFocusOut(){return dt([o.onFocusOut,a.onFocusOut])}},i,{get children(){return f(q,{get when(){return!o.virtualized},get fallback(){return o.children?.(s().collection)},get children(){return f(vE,{get each(){return[...s().collection()]},by:"key",children:c=>f(xv,{get children(){return[f(Ud,{get when(){return c().type==="section"},get children(){return o.renderSection?.(c())}}),f(Ud,{get when(){return c().type==="item"},get children(){return o.renderItem?.(c())}})]}})})}})}}))}})}function Oa(e){return f(Le,H({as:"li",role:"presentation"},e))}var ek=Object.assign(td,{Item:Ta,ItemDescription:Da,ItemIndicator:Ia,ItemLabel:Ra,Section:Oa}),du="focusScope.autoFocusOnMount",fu="focusScope.autoFocusOnUnmount",qf={bubbles:!1,cancelable:!0},Hf={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=nl(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=nl(this.stack,e),this.active()?.resume()}};function Na(e,t){const[n,r]=I(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=h=>e.onMountAutoFocus?.(h),a=h=>e.onUnmountAutoFocus?.(h),u=()=>ln(t()),c=()=>{const h=u().createElement("span");return h.setAttribute("data-focus-trap",""),h.tabIndex=0,Object.assign(h.style,wa),h},l=()=>{const h=t();return h?Xm(h,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const h=l();return h.length>0?h[0]:null},g=()=>{const h=l();return h.length>0?h[h.length-1]:null},p=()=>{const h=t();if(!h)return!1;const m=gi(h);return!m||Lt(h,m)?!1:Jm(m)};se(()=>{const h=t();if(!h)return;Hf.add(o);const m=gi(h);if(!Lt(h,m)){const y=new CustomEvent(du,qf);h.addEventListener(du,s),h.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{xt(d()),gi(h)===m&&xt(h)},0)}ae(()=>{h.removeEventListener(du,s),setTimeout(()=>{const y=new CustomEvent(fu,qf);p()&&y.preventDefault(),h.addEventListener(fu,a),h.dispatchEvent(y),y.defaultPrevented||xt(m??u().body),h.removeEventListener(fu,a),Hf.remove(o)},0)})}),se(()=>{const h=t();if(!h||!J(e.trapFocus)||n())return;const m=y=>{const b=y.target;b?.closest(`[${Di}]`)||(Lt(h,b)?i=b:xt(i))},v=y=>{const w=y.relatedTarget??gi(h);w?.closest(`[${Di}]`)||Lt(h,w)||xt(i)};u().addEventListener("focusin",m),u().addEventListener("focusout",v),ae(()=>{u().removeEventListener("focusin",m),u().removeEventListener("focusout",v)})}),se(()=>{const h=t();if(!h||!J(e.trapFocus)||n())return;const m=c();h.insertAdjacentElement("afterbegin",m);const v=c();h.insertAdjacentElement("beforeend",v);function y(w){const _=d(),C=g();w.relatedTarget===_?xt(C):xt(_)}m.addEventListener("focusin",y),v.addEventListener("focusin",y);const b=new MutationObserver(w=>{for(const _ of w)_.previousSibling===v&&(v.remove(),h.insertAdjacentElement("beforeend",v)),_.nextSibling===m&&(m.remove(),h.insertAdjacentElement("afterbegin",m))});b.observe(h,{childList:!0,subtree:!1}),ae(()=>{m.removeEventListener("focusin",y),v.removeEventListener("focusin",y),m.remove(),v.remove(),b.disconnect()})})}var tk="data-live-announcer";function Ma(e){se(()=>{J(e.isDisabled)||ae(nk(J(e.targets),J(e.root)))})}var si=new WeakMap,Tn=[];function nk(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const g of u.querySelectorAll(`[${tk}], [${Di}]`))n.add(g);const c=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const p of n)if(g.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let g=l.nextNode();for(;g!=null;)i(g),g=l.nextNode()}},i=u=>{const c=si.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),si.set(u,c+1))};Tn.length&&Tn[Tn.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Tn.push(a),()=>{s.disconnect();for(const u of r){const c=si.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),si.delete(u)):si.set(u,c-1)}a===Tn[Tn.length-1]?(Tn.pop(),Tn.length&&Tn[Tn.length-1].observe()):Tn.splice(Tn.indexOf(a),1)}}var Z0=["id","aria-label","aria-labelledby","aria-describedby"];function X0(e){const t=Ln(),n=ke({id:t.generateId("field")},e);return se(()=>ae(t.registerField(J(n.id)))),{fieldProps:{id:()=>J(n.id),ariaLabel:()=>J(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(J(n.id),J(n["aria-label"]),J(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(J(n["aria-describedby"]))}}}function nd(e){let t;const n=Ln(),r=ke({id:n.generateId("label")},e),[o,i]=de(r,["ref"]),s=xa(()=>t,()=>"label");return se(()=>ae(n.registerLabel(i.id))),f(Le,H({as:"label",ref(a){var u=et(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return Z(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function rd(e,t){se(wt(e,n=>{if(n==null)return;const r=rk(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ae(()=>{r.removeEventListener("reset",t)}))}))}function rk(e){return ok(e)?e.form:e.closest("form")}function ok(e){return e.matches("textarea, input, select, button")}function Qi(e){const t=Ln(),n=ke({id:t.generateId("error-message")},e),[r,o]=de(n,["forceMount"]),i=()=>t.validationState()==="invalid";return se(()=>{i()&&ae(t.registerErrorMessage(o.id))}),f(q,{get when(){return r.forceMount||i()},get children(){return f(Le,H({as:"div"},()=>t.dataset(),o))}})}var dl=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},xs=new Map,ik=e=>{se(()=>{const t=Wt(e.style)??{},n=Wt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=xs.get(e.key);o?o.activeCount++:xs.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ae(()=>{const i=xs.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}xs.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Gf=ik,sk=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},ak=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},uk=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=sk(o,t),d=l-u-r*c;(c!==0||d!==0)&&ak(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Vf,Wf]=I([]),ck=e=>Vf().indexOf(e)===Vf().length-1,lk=e=>{const t=H({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Rt();let r=[0,0],o=null,i=null;se(()=>{Wt(t.enabled)&&(Wf(c=>[...c,n]),ae(()=>{Wf(c=>c.filter(l=>l!==n))}))}),se(()=>{if(!Wt(t.enabled)||!Wt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Wt(t.preventScrollbarShift)){const d={overflow:"hidden"},g=[];l>0&&(Wt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,g.push({key:"--scrollbar-width",value:`${l}px`}));const p=window.scrollY,h=window.scrollX;Gf({key:"prevent-scroll",element:c,style:d,properties:g,cleanup:()=>{Wt(t.restoreScrollPosition)&&l>0&&window.scrollTo(h,p)}})}else Gf({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),se(()=>{!ck(n)||!Wt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=Yf(c),o=null,i=null},a=c=>{const l=c.target,d=Wt(t.element),g=dk(c),p=Math.abs(g[0])>Math.abs(g[1])?"x":"y",h=p==="x"?g[0]:g[1],m=Zf(l,p,h,d);let v;d&&dl(d,l)?v=!m:v=!0,v&&c.cancelable&&c.preventDefault()},u=c=>{const l=Wt(t.element),d=c.target;let g;if(c.touches.length===2)g=!Wt(t.allowPinchZoom);else{if(o==null||i===null){const p=Yf(c).map((m,v)=>r[v]-m),h=Math.abs(p[0])>Math.abs(p[1])?"x":"y";o=h,i=h==="x"?p[0]:p[1]}if(d.type==="range")g=!1;else{const p=Zf(d,o,i,l);l&&dl(l,d)?g=!p:g=!0}}g&&c.cancelable&&c.preventDefault()}},dk=e=>[e.deltaX,e.deltaY],Yf=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Zf=(e,t,n,r)=>{const o=r!==null&&dl(r,e),[i,s]=uk(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},fk=lk,Pa=fk,gk={};Pn(gk,{Arrow:()=>Rr,Content:()=>Q0,Description:()=>Ji,ErrorMessage:()=>Qi,HiddenSelect:()=>eb,Icon:()=>tb,Item:()=>Ta,ItemDescription:()=>Da,ItemIndicator:()=>Ia,ItemLabel:()=>Ra,Label:()=>nb,Listbox:()=>rb,Portal:()=>ob,Root:()=>ib,Section:()=>Oa,Select:()=>Xt,Trigger:()=>sb,Value:()=>ab,useSelectContext:()=>Or});var J0=ut();function Or(){const e=st(J0);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Q0(e){let t;const n=Or(),[r,o]=de(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),i=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return Ma({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Pa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Na({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(xt(n.triggerRef()),a.preventDefault())}},()=>t),f(q,{get when(){return n.contentPresent()},get children(){return f(Jr.Positioner,{get children(){return f(Xi,H({ref(a){var u=et(c=>{n.setContentRef(c),t=c},r.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return Z(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return kn({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:i,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function eb(e){const t=Or();return f(XS,H({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function tb(e){const t=Or(),n=ke({children:"▼"},e);return f(Le,H({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function nb(e){const t=Or(),[n,r]=de(e,["onClick"]);return f(nd,H({as:"span",onClick:i=>{Ie(i,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function rb(e){const t=Or(),n=ke({id:t.generateId("listbox")},e),[r,o]=de(n,["ref","id","onKeyDown"]);return se(()=>ae(t.registerListboxId(r.id))),f(td,H({ref(s){var a=et(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{Ie(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},o))}function ob(e){const t=Or();return f(q,{get when(){return t.contentPresent()},get children(){return f(Ki,e)}})}function pk(e){const t=`select-${Rt()}`,n=ke({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,o,i,s]=de(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],Jl),[a,u]=I(),[c,l]=I(),[d,g]=I(),[p,h]=I(),[m,v]=I(),[y,b]=I(),[w,_]=I(),[C,k]=I(!0),T=W=>{const Y=r.optionValue;return Y==null?String(W):String(Hi(Y)?Y(W):W[Y])},S=ie(()=>{const W=r.optionGroupChildren;return W==null?r.options:r.options.flatMap(Y=>Y[W]??Y)}),A=ie(()=>S().map(W=>T(W))),N=W=>[...W].map(Y=>S().find(ee=>T(ee)===Y)).filter(Y=>Y!=null),R=vo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:W=>r.onOpenChange?.(W)}),L=ql({selectedKeys:()=>r.value!=null?r.value.map(T):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(T):r.defaultValue,onSelectionChange:W=>{r.onChange?.(N(W)),r.closeOnSelection&&ne()},allowDuplicateSelectionEvents:()=>J(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(r.disallowEmptySelection),selectionBehavior:()=>J(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),M=ie(()=>N(L.selectionManager().selectedKeys())),D=W=>{L.selectionManager().toggleSelection(T(W))},{present:F}=sr({show:()=>r.forceMount||R.isOpen(),element:()=>m()??null}),O=()=>{const W=y();W&&xt(W)},B=W=>{if(r.options.length<=0)return;k(W),R.open();let Y=L.selectionManager().firstSelectedKey();Y==null&&(W==="first"?Y=L.collection().getFirstKey():W==="last"&&(Y=L.collection().getLastKey())),O(),L.selectionManager().setFocused(!0),L.selectionManager().setFocusedKey(Y)},ne=()=>{R.close(),L.selectionManager().setFocused(!1),L.selectionManager().setFocusedKey(void 0)},G=W=>{R.isOpen()?ne():B(W)},{formControlContext:K}=Ql(i);rd(p,()=>{const W=r.defaultValue?[...r.defaultValue].map(T):new Qn;L.selectionManager().setSelectedKeys(W)});const ce=v0({usage:"search",sensitivity:"base"}),U=ie(()=>{const W=J(r.keyboardDelegate);return W||new H0(L.collection,void 0,ce)}),z=W=>r.itemComponent?.({item:W}),V=W=>r.sectionComponent?.({section:W});se(wt([A],([W])=>{const ee=[...L.selectionManager().selectedKeys()].filter(he=>W.includes(he));L.selectionManager().setSelectedKeys(ee)},{defer:!0}));const re=ie(()=>({"data-expanded":R.isOpen()?"":void 0,"data-closed":R.isOpen()?void 0:""})),me={dataset:re,isOpen:R.isOpen,isDisabled:()=>K.isDisabled()??!1,isMultiple:()=>J(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??me.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:M,contentPresent:F,autoFocus:C,triggerRef:p,listState:()=>L,keyboardDelegate:U,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:_,setTriggerRef:h,setContentRef:v,setListboxRef:b,open:B,close:ne,toggle:G,placeholder:()=>r.placeholder,renderItem:z,renderSection:V,removeOptionFromSelection:D,generateId:dn(()=>J(i.id)),registerTriggerId:gt(u),registerValueId:gt(l),registerListboxId:gt(g)};return f(Aa.Provider,{value:K,get children(){return f(J0.Provider,{value:me,get children(){return f(Jr,H({anchorRef:p,contentRef:m},o,{get children(){return f(Le,H({as:"div",role:"group",get id(){return J(i.id)}},()=>K.dataset(),re,s))}}))}})}})}function ib(e){const[t,n]=de(e,["value","defaultValue","onChange","multiple"]),r=ie(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),o=ie(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return f(pk,H({get value(){return r()},get defaultValue(){return o()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function sb(e){const t=Ln(),n=Or(),r=ke({id:n.generateId("trigger")},e),[o,i,s]=de(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],Z0),a=()=>n.listState().selectionManager(),u=()=>n.keyboardDelegate(),c=()=>o.disabled||n.isDisabled(),{fieldProps:l}=X0(i),{typeSelectHandlers:d}=E0({keyboardDelegate:u,selectionManager:a,onTypeSelect:b=>a().select(b)}),g=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,p=b=>{Ie(b,o.onPointerDown),b.currentTarget.dataset.pointerType=b.pointerType,!c()&&b.pointerType!=="touch"&&b.button===0&&(b.preventDefault(),n.toggle(!0))},h=b=>{Ie(b,o.onClick),!c()&&b.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=b=>{if(Ie(b,o.onKeyDown),!c())switch(Ie(b,d.onKeyDown),b.key){case"Enter":case" ":case"ArrowDown":b.stopPropagation(),b.preventDefault(),n.toggle("first");break;case"ArrowUp":b.stopPropagation(),b.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(b.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),_=w!=null?u().getKeyAbove?.(w):u().getFirstKey?.();_!=null&&a().select(_);break}case"ArrowRight":{if(b.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),_=w!=null?u().getKeyBelow?.(w):u().getFirstKey?.();_!=null&&a().select(_);break}}},v=b=>{Ie(b,o.onFocus),!a().isFocused()&&a().setFocused(!0)},y=b=>{Ie(b,o.onBlur),!n.isOpen()&&a().setFocused(!1)};return se(()=>ae(n.registerTriggerId(l.id()))),se(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),f(pr,H({ref(b){var w=et(n.setTriggerRef,o.ref);typeof w=="function"&&w(b)},get id(){return l.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return Z(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return g()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:p,onClick:h,onKeyDown:m,onFocus:v,onBlur:y},()=>n.dataset(),()=>t.dataset(),s))}function ab(e){const t=Ln(),n=Or(),r=ke({id:n.generateId("value")},e),[o,i]=de(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const u=s().selectedKeys();return u.size===1&&u.has("")?!0:s().isEmpty()};return se(()=>ae(n.registerValueId(o.id))),f(Le,H({as:"span",get id(){return o.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),i,{get children(){return f(q,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return f(hk,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>s().clearSelection()},get children(){return o.children}})}})}}))}function hk(e){const t=Xo(()=>{const n=e.children;return Hi(n)?n(e.state):n});return Z(t)}var Xt=Object.assign(ib,{Arrow:Rr,Content:Q0,Description:Ji,ErrorMessage:Qi,HiddenSelect:eb,Icon:tb,Item:Ta,ItemDescription:Da,ItemIndicator:Ia,ItemLabel:Ra,Label:nb,Listbox:rb,Portal:ob,Section:Oa,Trigger:sb,Value:ab}),mk={};Pn(mk,{Anchor:()=>cb,Arrow:()=>Rr,CloseButton:()=>lb,Content:()=>db,Description:()=>fb,Popover:()=>Ur,Portal:()=>gb,Root:()=>pb,Title:()=>hb,Trigger:()=>mb,usePopoverContext:()=>Qr});var ub=ut();function Qr(){const e=st(ub);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function cb(e){const t=Qr(),[n,r]=de(e,["ref"]);return f(Le,H({as:"div",ref(o){var i=et(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function lb(e){const t=Qr(),[n,r]=de(e,["aria-label","onClick"]);return f(pr,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ie(i,n.onClick),t.close()}},()=>t.dataset(),r))}function db(e){let t;const n=Qr(),r=ke({id:n.generateId("content")},e),[o,i]=de(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=p=>{o.onCloseAutoFocus?.(p),n.isModal()?(p.preventDefault(),s||xt(n.triggerRef())):(p.defaultPrevented||(a||xt(n.triggerRef()),p.preventDefault()),a=!1,u=!1)},l=p=>{o.onPointerDownOutside?.(p),n.isModal()&&(s=p.detail.isContextMenu)},d=p=>{o.onFocusOutside?.(p),n.isOpen()&&n.isModal()&&p.preventDefault()},g=p=>{o.onInteractOutside?.(p),!n.isModal()&&(p.defaultPrevented||(a=!0,p.detail.originalEvent.type==="pointerdown"&&(u=!0)),Lt(n.triggerRef(),p.target)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&u&&p.preventDefault())};return Ma({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Pa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Na({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),se(()=>ae(n.registerContentId(i.id))),f(q,{get when(){return n.contentPresent()},get children(){return f(Jr.Positioner,{get children(){return f(Xi,H({ref(p){var h=et(m=>{n.setContentRef(m),t=m},o.ref);typeof h=="function"&&h(p)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Z(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return kn({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:g,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function fb(e){const t=Qr(),n=ke({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerDescriptionId(r.id))),f(Le,H({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function gb(e){const t=Qr();return f(q,{get when(){return t.contentPresent()},get children(){return f(Ki,e)}})}var Xf={dismiss:"Dismiss"};function pb(e){const t=`popover-${Rt()}`,n=ke({id:t,modal:!1,translations:Xf},e),[r,o]=de(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=I(),[a,u]=I(),[c,l]=I(),[d,g]=I(),[p,h]=I(),[m,v]=I(),y=vo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:k=>r.onOpenChange?.(k)}),b=()=>r.anchorRef?.()??i()??a(),{present:w}=sr({show:()=>r.forceMount||y.isOpen(),element:()=>c()??null}),_=ie(()=>({"data-expanded":y.isOpen()?"":void 0,"data-closed":y.isOpen()?void 0:""})),C={translations:()=>r.translations??Xf,dataset:_,isOpen:y.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??C.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:p,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:y.close,toggle:y.toggle,generateId:dn(()=>r.id),registerContentId:gt(g),registerTitleId:gt(h),registerDescriptionId:gt(v)};return f(ub.Provider,{value:C,get children(){return f(Jr,H({anchorRef:b,contentRef:c},o))}})}function hb(e){const t=Qr(),n=ke({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerTitleId(r.id))),f(Le,H({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function mb(e){const t=Qr(),[n,r]=de(e,["ref","onClick","onPointerDown"]);return f(pr,H({ref(s){var a=et(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Z(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Ie(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Ie(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Ur=Object.assign(pb,{Anchor:cb,Arrow:Rr,CloseButton:lb,Content:db,Description:fb,Portal:gb,Title:hb,Trigger:mb}),bk={};Pn(bk,{Description:()=>Ji,ErrorMessage:()=>Qi,Item:()=>vb,ItemControl:()=>wb,ItemDescription:()=>xb,ItemIndicator:()=>_b,ItemInput:()=>Eb,ItemLabel:()=>Cb,Label:()=>Sb,RadioGroup:()=>Gn,Root:()=>kb,useRadioGroupContext:()=>od});var bb=ut();function od(){const e=st(bb);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var yb=ut();function es(){const e=st(yb);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function vb(e){const t=Ln(),n=od(),r=`${t.generateId("item")}-${Rt()}`,o=ke({id:r},e),[i,s]=de(o,["value","disabled","onPointerDown"]),[a,u]=I(),[c,l]=I(),[d,g]=I(),[p,h]=I(),[m,v]=I(!1),y=ie(()=>n.isDefaultValue(i.value)),b=ie(()=>n.isSelectedValue(i.value)),w=ie(()=>i.disabled||t.isDisabled()||!1),_=T=>{Ie(T,i.onPointerDown),m()&&T.preventDefault()},C=ie(()=>({...t.dataset(),"data-disabled":w()?"":void 0,"data-checked":b()?"":void 0})),k={value:()=>i.value,dataset:C,isDefault:y,isSelected:b,isDisabled:w,inputId:a,labelId:c,descriptionId:d,inputRef:p,select:()=>n.setSelectedValue(i.value),generateId:dn(()=>s.id),registerInput:gt(u),registerLabel:gt(l),registerDescription:gt(g),setIsFocused:v,setInputRef:h};return f(yb.Provider,{value:k,get children(){return f(Le,H({as:"div",role:"group",onPointerDown:_},C,s))}})}function wb(e){const t=es(),n=ke({id:t.generateId("control")},e),[r,o]=de(n,["onClick","onKeyDown"]);return f(Le,H({as:"div",onClick:a=>{Ie(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Ie(a,r.onKeyDown),a.key===va.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function xb(e){const t=es(),n=ke({id:t.generateId("description")},e);return se(()=>ae(t.registerDescription(n.id))),f(Le,H({as:"div"},()=>t.dataset(),n))}function _b(e){const t=es(),n=ke({id:t.generateId("indicator")},e),[r,o]=de(n,["ref","forceMount"]),[i,s]=I(),{present:a}=sr({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return f(q,{get when(){return a()},get children(){return f(Le,H({as:"div",ref(u){var c=et(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function Eb(e){const t=Ln(),n=od(),r=es(),o=ke({id:r.generateId("input")},e),[i,s]=de(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=I(!1),d=h=>{if(Ie(h,i.onChange),h.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=h.target;m.checked=r.isSelected()}l(!1)},g=h=>{Ie(h,i.onFocus),r.setIsFocused(!0)},p=h=>{Ie(h,i.onBlur),r.setIsFocused(!1)};return se(wt([()=>r.isSelected(),()=>r.value()],h=>{if(!h[0]&&h[1]===r.value())return;l(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),se(()=>ae(r.registerInput(s.id))),f(Le,H({as:"input",ref(h){var m=et(r.setInputRef,i.ref);typeof m=="function"&&m(h)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return kn({...wa},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:g,onBlur:p},()=>r.dataset(),s))}function Cb(e){const t=es(),n=ke({id:t.generateId("label")},e);return se(()=>ae(t.registerLabel(n.id))),f(Le,H({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function Sb(e){return f(nd,H({as:"span"},e))}function kb(e){let t;const n=`radiogroup-${Rt()}`,r=ke({id:n,orientation:"vertical"},e),[o,i,s]=de(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Jl),[a,u]=Yi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:v=>o.onChange?.(v)}),{formControlContext:c}=Ql(i);rd(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(J(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),g=v=>v===e.defaultValue,p=v=>v===a(),m={ariaDescribedBy:d,isDefaultValue:g,isSelectedValue:p,setSelectedValue:v=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(v),t))for(const y of t.querySelectorAll("[type='radio']")){const b=y;b.checked=p(b.value)}}};return f(Aa.Provider,{value:c,get children(){return f(bb.Provider,{value:m,get children(){return f(Le,H({as:"div",ref(v){var y=et(b=>t=b,o.ref);typeof y=="function"&&y(v)},role:"radiogroup",get id(){return J(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var Gn=Object.assign(kb,{Description:Ji,ErrorMessage:Qi,Item:vb,ItemControl:wb,ItemDescription:xb,ItemIndicator:_b,ItemInput:Eb,ItemLabel:Cb,Label:Sb}),yk=ut();function La(){return st(yk)}var vk=ut();function Ab(){return st(vk)}var Tb=ut();function Db(){return st(Tb)}function Nr(){const e=Db();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var Ib=ut();function id(){const e=st(Ib);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var Rb=ut();function mr(){const e=st(Rb);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function sd(e){let t;const n=mr(),r=Nr(),o=ke({id:n.generateId(`item-${Rt()}`)},e),[i,s]=de(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=I(),[c,l]=I(),[d,g]=I(),p=()=>r.listState().selectionManager(),h=()=>s.id,m=()=>p().focusedKey()===h(),v=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};UC({getItem:()=>({ref:()=>t,type:"item",key:h(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=jl({key:h,selectionManager:p,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=A=>{Ie(A,i.onPointerMove),A.pointerType==="mouse"&&(i.disabled?r.onItemLeave(A):(r.onItemEnter(A),A.defaultPrevented||(xt(A.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(h()))))},w=A=>{Ie(A,i.onPointerLeave),A.pointerType==="mouse"&&r.onItemLeave(A)},_=A=>{Ie(A,i.onPointerUp),!i.disabled&&A.button===0&&v()},C=A=>{if(Ie(A,i.onKeyDown),!A.repeat&&!i.disabled)switch(A.key){case"Enter":case" ":v();break}},k=ie(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),T=ie(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":m()?"":void 0})),S={isChecked:()=>i.checked,dataset:T,setLabelRef:g,generateId:dn(()=>s.id),registerLabel:gt(u),registerDescription:gt(l)};return f(Ib.Provider,{value:S,get children(){return f(Le,H({as:"div",ref(A){var N=et(R=>t=R,i.ref);typeof N=="function"&&N(A)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return y.dataKey()},get onPointerDown(){return dt([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return dt([_,y.onPointerUp])},get onClick(){return dt([i.onClick,y.onClick])},get onKeyDown(){return dt([C,y.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,y.onMouseDown])},get onFocus(){return dt([i.onFocus,y.onFocus])},onPointerMove:b,onPointerLeave:w},T,s))}})}function Ob(e){const t=ke({closeOnSelect:!1},e),[n,r]=de(t,["checked","defaultChecked","onChange","onSelect"]),o=m0({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return f(sd,H({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Mi={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Mi.next(e==="ltr"?"rtl":"ltr",t)},Jf={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function Nb(e){const t=mr(),n=Nr(),r=La(),{direction:o}=Xr(),i=ke({id:t.generateId("trigger")},e),[s,a]=de(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=xa(()=>n.triggerRef(),()=>"button"),l=ie(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);se(wt(()=>r?.value(),y=>{l()&&y===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},g=y=>{Ie(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},p=y=>{Ie(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},h=y=>{if(Ie(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Jf.first(t.orientation()):y.stopPropagation(),y.preventDefault(),KE(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Jf.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Mi.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Mi.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},m=y=>{Ie(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},v=y=>{Ie(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return se(()=>ae(n.registerTriggerId(s.id))),f(pr,H({ref(y){var b=et(n.setTriggerRef,s.ref);typeof b=="function"&&b(y)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return Z(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:g,onMouseOver:m,onClick:p,onKeyDown:h,onFocus:v,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function Mb(e){let t;const n=mr(),r=Nr(),o=La(),i=Ab(),{direction:s}=Xr(),a=ke({id:n.generateId(`content-${Rt()}`)},e),[u,c]=de(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),g=G0({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);Na({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{o===void 0&&u.onOpenAutoFocus?.(w)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=w=>{if(Lt(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Mi.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Mi.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},h=w=>{u.onEscapeKeyDown?.(w),o?.setAutoFocusMenu(!1),r.close(!0)},m=w=>{u.onFocusOutside?.(w),n.isModal()&&w.preventDefault()},v=w=>{Ie(w,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=w=>{if(Ie(w,u.onPointerMove),w.pointerType!=="mouse")return;const _=w.target,C=l!==w.clientX;Lt(w.currentTarget,_)&&C&&(r.setPointerDir(w.clientX>l?"right":"left"),l=w.clientX)};se(()=>ae(r.registerContentId(u.id))),ae(()=>r.setContentRef(void 0));const b={ref:et(w=>{r.setContentRef(w),t=w},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return g.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:dt([u.onKeyDown,g.onKeyDown,p]),onMouseDown:dt([u.onMouseDown,g.onMouseDown]),onFocusIn:dt([u.onFocusIn,g.onFocusIn]),onFocusOut:dt([u.onFocusOut,g.onFocusOut]),onPointerEnter:v,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return f(q,{get when(){return r.contentPresent()},get children(){return f(q,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return f(Le,H({as:"div"},()=>r.dataset(),b,c))},get children(){return f(Jr.Positioner,{get children(){return f(Xi,H({get disableOutsidePointerEvents(){return Z(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return kn({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:h,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function wk(e){let t;const n=mr(),r=Nr(),[o,i]=de(e,["ref"]);return Pa({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),f(Mb,H({ref(s){var a=et(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var Pb=ut();function xk(){const e=st(Pb);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function ad(e){const t=mr(),n=ke({id:t.generateId(`group-${Rt()}`)},e),[r,o]=I(),i={generateId:dn(()=>n.id),registerLabelId:gt(o)};return f(Pb.Provider,{value:i,get children(){return f(Le,H({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function Lb(e){const t=xk(),n=ke({id:t.generateId("label")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerLabelId(r.id))),f(Le,H({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function $b(e){const t=Nr(),n=ke({children:"▼"},e);return f(Le,H({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Fb(e){return f(sd,H({role:"menuitem",closeOnSelect:!0},e))}function Bb(e){const t=id(),n=ke({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerDescription(r.id))),f(Le,H({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function zb(e){const t=id(),n=ke({id:t.generateId("indicator")},e),[r,o]=de(n,["forceMount"]);return f(q,{get when(){return r.forceMount||t.isChecked()},get children(){return f(Le,H({as:"div"},()=>t.dataset(),o))}})}function Ub(e){const t=id(),n=ke({id:t.generateId("label")},e),[r,o]=de(n,["ref","id"]);return se(()=>ae(t.registerLabel(r.id))),f(Le,H({as:"div",ref(i){var s=et(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Kb(e){const t=Nr();return f(q,{get when(){return t.contentPresent()},get children(){return f(Ki,e)}})}var jb=ut();function _k(){const e=st(jb);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function qb(e){const n=mr().generateId(`radiogroup-${Rt()}`),r=ke({id:n},e),[o,i]=de(r,["value","defaultValue","onChange","disabled"]),[s,a]=Yi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return f(jb.Provider,{value:u,get children(){return f(ad,i)}})}function Hb(e){const t=_k(),n=ke({closeOnSelect:!1},e),[r,o]=de(n,["value","onSelect"]);return f(sd,H({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function Ek(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function Ck(e,t){return t?Qm([e.clientX,e.clientY],t):!1}function Gb(e){const t=mr(),n=S0(),r=Db(),o=La(),i=Ab(),s=ke({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=de(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[g,p]=I(),[h,m]=I(),[v,y]=I(),[b,w]=I(),[_,C]=I(!0),[k,T]=I(u.placement),[S,A]=I([]),[N,R]=I([]),{DomCollectionProvider:L}=zC({items:N,onItemsChange:R}),M=vo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:Y=>a.onOpenChange?.(Y)}),{present:D}=sr({show:()=>t.forceMount()||M.isOpen(),element:()=>b()??null}),F=ql({selectionMode:"none",dataSource:N}),O=Y=>{C(Y),M.open()},B=(Y=!1)=>{M.close(),Y&&r&&r.close(!0)},ne=Y=>{C(Y),M.toggle()},G=()=>{const Y=b();Y&&(xt(Y),F.selectionManager().setFocused(!0),F.selectionManager().setFocusedKey(void 0))},K=()=>{i!=null?setTimeout(()=>G()):G()},ce=Y=>{A(he=>[...he,Y]);const ee=r?.registerNestedMenu(Y);return()=>{A(he=>nl(he,Y)),ee?.()}},U=Y=>d===l?.side&&Ck(Y,l?.area),z=Y=>{U(Y)&&Y.preventDefault()},V=Y=>{U(Y)||K()},re=Y=>{U(Y)&&Y.preventDefault()};Ma({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[b(),...S()].filter(Boolean)}),se(()=>{const Y=b();if(!Y||!r)return;const ee=r.registerNestedMenu(Y);ae(()=>{ee()})}),se(()=>{r===void 0&&o?.registerMenu(t.value(),[b(),...S()])}),se(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(v()?.focus(),o.autoFocusMenu()&&O(!0)):B())}),se(()=>{r!==void 0||o===void 0||M.isOpen()&&o.setValue(t.value())}),ae(()=>{r===void 0&&o?.unregisterMenu(t.value())});const W={dataset:ie(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresent:D,nestedMenus:S,currentPlacement:k,pointerGraceTimeoutId:()=>c,autoFocus:_,listState:()=>F,parentMenuContext:()=>r,triggerRef:v,contentRef:b,triggerId:g,contentId:h,setTriggerRef:y,setContentRef:w,open:O,close:B,toggle:ne,focusContent:K,onItemEnter:z,onItemLeave:V,onTriggerLeave:re,setPointerDir:Y=>d=Y,setPointerGraceTimeoutId:Y=>c=Y,setPointerGraceIntent:Y=>l=Y,registerNestedMenu:ce,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:gt(p),registerContentId:gt(m)};return f(L,{get children(){return f(Tb.Provider,{value:W,get children(){return f(q,{when:i===void 0,get fallback(){return u.children},get children(){return f(Jr,H({anchorRef:v,contentRef:b,onCurrentPlacementChange:T},u))}})}})}})}function Vb(e){const{direction:t}=Xr();return f(Gb,H({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Sk={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Wb(e){const t=Nr(),n=mr(),[r,o]=de(e,["onFocusOutside","onKeyDown"]),{direction:i}=Xr();return f(Mb,H({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Lt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Ie(l,r.onKeyDown);const d=Lt(l.currentTarget,l.target),g=Sk.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;d&&g&&p&&(t.close(),xt(t.triggerRef()))}},o))}var Qf=["Enter"," "],kk={open:(e,t)=>e==="ltr"?[...Qf,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Qf,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Yb(e){let t;const n=mr(),r=Nr(),o=ke({id:n.generateId(`sub-trigger-${Rt()}`)},e),[i,s]=de(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Xr(),l=()=>i.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},g=()=>r.listState().collection(),p=()=>d().focusedKey()===l(),h=jl({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),m=w=>{Ie(w,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},v=w=>{if(Ie(w,i.onPointerMove),w.pointerType!=="mouse")return;const _=r.parentMenuContext();if(_?.onItemEnter(w),!w.defaultPrevented){if(i.disabled){_?.onItemLeave(w);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),_?.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),xt(w.currentTarget),_?.listState().selectionManager().setFocused(!0),_?.listState().selectionManager().setFocusedKey(l()))}},y=w=>{if(Ie(w,i.onPointerLeave),w.pointerType!=="mouse")return;u();const _=r.parentMenuContext(),C=r.contentRef();if(C){_?.setPointerGraceIntent({area:Ek(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(_?.pointerGraceTimeoutId());const k=window.setTimeout(()=>{_?.setPointerGraceIntent(null)},300);_?.setPointerGraceTimeoutId(k)}else{if(_?.onTriggerLeave(w),w.defaultPrevented)return;_?.setPointerGraceIntent(null)}_?.onItemLeave(w)},b=w=>{Ie(w,i.onKeyDown),!w.repeat&&(i.disabled||kk.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g().getFirstKey())))};return se(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ae(w)}),se(wt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),w=>{ae(()=>{window.clearTimeout(w),r.parentMenuContext()?.setPointerGraceIntent(null)})})),se(()=>ae(r.registerTriggerId(i.id))),ae(()=>{u()}),f(Le,H({as:"div",ref(w){var _=et(C=>{r.setTriggerRef(C),t=C},i.ref);typeof _=="function"&&_(w)},get id(){return i.id},role:"menuitem",get tabIndex(){return h.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return Z(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return h.dataKey()},get"data-highlighted"(){return p()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return dt([i.onPointerDown,h.onPointerDown])},get onPointerUp(){return dt([i.onPointerUp,h.onPointerUp])},get onClick(){return dt([m,h.onClick])},get onKeyDown(){return dt([b,h.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,h.onMouseDown])},get onFocus(){return dt([i.onFocus,h.onFocus])},onPointerMove:v,onPointerLeave:y},()=>r.dataset(),s))}function Ak(e){const t=La(),n=`menu-${Rt()}`,r=ke({id:n,modal:!0},e),[o,i]=de(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=vo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:dn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return f(Rb.Provider,{value:a,get children(){return f(Gb,H({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var Tk={};Pn(Tk,{Root:()=>$a,Separator:()=>Dk});function $a(e){let t;const n=ke({orientation:"horizontal"},e),[r,o]=de(n,["ref","orientation"]),i=xa(()=>t,()=>"hr");return f(Le,H({as:"hr",ref(s){var a=et(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Dk=$a,Ik={};Pn(Ik,{Arrow:()=>Rr,CheckboxItem:()=>Ob,Content:()=>Zb,DropdownMenu:()=>Cn,Group:()=>ad,GroupLabel:()=>Lb,Icon:()=>$b,Item:()=>Fb,ItemDescription:()=>Bb,ItemIndicator:()=>zb,ItemLabel:()=>Ub,Portal:()=>Kb,RadioGroup:()=>qb,RadioItem:()=>Hb,Root:()=>Xb,Separator:()=>$a,Sub:()=>Vb,SubContent:()=>Wb,SubTrigger:()=>Yb,Trigger:()=>Nb});function Zb(e){const t=mr(),n=Nr(),[r,o]=de(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return f(wk,H({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||xt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function Xb(e){const t=`dropdownmenu-${Rt()}`,n=ke({id:t},e);return f(Ak,n)}var Cn=Object.assign(Xb,{Arrow:Rr,CheckboxItem:Ob,Content:Zb,Group:ad,GroupLabel:Lb,Icon:$b,Item:Fb,ItemDescription:Bb,ItemIndicator:zb,ItemLabel:Ub,Portal:Kb,RadioGroup:qb,RadioItem:Hb,Separator:$a,Sub:Vb,SubContent:Wb,SubTrigger:Yb,Trigger:Nb}),Rk={};Pn(Rk,{Collapsible:()=>Fa,Content:()=>Qb,Root:()=>e1,Trigger:()=>t1,useCollapsibleContext:()=>ud});var Jb=ut();function ud(){const e=st(Jb);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Qb(e){const[t,n]=I(),r=ud(),o=ke({id:r.generateId("content")},e),[i,s]=de(o,["ref","id","style"]),{present:a}=sr({show:r.shouldMount,element:()=>t()??null}),[u,c]=I(0),[l,d]=I(0);let p=r.isOpen()||a();return Nn(()=>{const h=requestAnimationFrame(()=>{p=!1});ae(()=>{cancelAnimationFrame(h)})}),se(wt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const h=t().getBoundingClientRect();c(h.height),d(h.width),p||(t().style.transitionDuration="",t().style.animationName="")})),se(wt(r.isOpen,h=>{!h&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),se(()=>ae(r.registerContentId(i.id))),f(q,{get when(){return a()},get children(){return f(Le,H({as:"div",ref(h){var m=et(n,i.ref);typeof m=="function"&&m(h)},get id(){return i.id},get style(){return kn({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function e1(e){const t=`collapsible-${Rt()}`,n=ke({id:t},e),[r,o]=de(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=I(),a=vo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ie(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:dn(()=>o.id),registerContentId:gt(s)};return f(Jb.Provider,{value:c,get children(){return f(Le,H({as:"div"},u,o))}})}function t1(e){const t=ud(),[n,r]=de(e,["onClick"]);return f(pr,H({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Z(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Ie(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Fa=Object.assign(e1,{Content:Qb,Trigger:t1}),Ok={};Pn(Ok,{CloseButton:()=>r1,Content:()=>o1,Description:()=>i1,Dialog:()=>Tr,Overlay:()=>s1,Portal:()=>a1,Root:()=>u1,Title:()=>c1,Trigger:()=>l1,useDialogContext:()=>eo});var n1=ut();function eo(){const e=st(n1);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function r1(e){const t=eo(),[n,r]=de(e,["aria-label","onClick"]);return f(pr,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ie(i,n.onClick),t.close()}},r))}function o1(e){let t;const n=eo(),r=ke({id:n.generateId("content")},e),[o,i]=de(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=g=>{o.onPointerDownOutside?.(g),n.modal()&&g.detail.isContextMenu&&g.preventDefault()},c=g=>{o.onFocusOutside?.(g),n.modal()&&g.preventDefault()},l=g=>{o.onInteractOutside?.(g),!n.modal()&&(g.defaultPrevented||(s=!0,g.detail.originalEvent.type==="pointerdown"&&(a=!0)),Lt(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&a&&g.preventDefault())},d=g=>{o.onCloseAutoFocus?.(g),n.modal()?(g.preventDefault(),xt(n.triggerRef())):(g.defaultPrevented||(s||xt(n.triggerRef()),g.preventDefault()),s=!1,a=!1)};return Ma({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),Pa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Na({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),se(()=>ae(n.registerContentId(i.id))),f(q,{get when(){return n.contentPresent()},get children(){return f(Xi,H({ref(g){var p=et(h=>{n.setContentRef(h),t=h},o.ref);typeof p=="function"&&p(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Z(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function i1(e){const t=eo(),n=ke({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerDescriptionId(r.id))),f(Le,H({as:"p",get id(){return r.id}},o))}function s1(e){const t=eo(),[n,r]=de(e,["ref","style","onPointerDown"]),o=i=>{Ie(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return f(q,{get when(){return t.overlayPresent()},get children(){return f(Le,H({as:"div",ref(i){var s=et(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return kn({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function a1(e){const t=eo();return f(q,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return f(Ki,e)}})}var eg={dismiss:"Dismiss"};function u1(e){const t=`dialog-${Rt()}`,n=ke({id:t,modal:!0,translations:eg},e),[r,o]=I(),[i,s]=I(),[a,u]=I(),[c,l]=I(),[d,g]=I(),[p,h]=I(),m=vo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:_=>n.onOpenChange?.(_)}),v=()=>n.forceMount||m.isOpen(),{present:y}=sr({show:v,element:()=>c()??null}),{present:b}=sr({show:v,element:()=>d()??null}),w={translations:()=>n.translations??eg,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:p,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:g,overlayPresent:y,contentPresent:b,close:m.close,toggle:m.toggle,setTriggerRef:h,generateId:dn(()=>n.id),registerContentId:gt(o),registerTitleId:gt(s),registerDescriptionId:gt(u)};return f(n1.Provider,{value:w,get children(){return n.children}})}function c1(e){const t=eo(),n=ke({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return se(()=>ae(t.registerTitleId(r.id))),f(Le,H({as:"h2",get id(){return r.id}},o))}function l1(e){const t=eo(),[n,r]=de(e,["ref","onClick"]);return f(pr,H({ref(i){var s=et(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Z(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Ie(i,n.onClick),t.toggle()}},r))}var Tr=Object.assign(u1,{CloseButton:r1,Content:o1,Description:i1,Overlay:s1,Portal:a1,Title:c1,Trigger:l1}),Nk={};Pn(Nk,{Checkbox:()=>Kr,Control:()=>f1,Description:()=>g1,ErrorMessage:()=>p1,Indicator:()=>h1,Input:()=>m1,Label:()=>b1,Root:()=>y1,useCheckboxContext:()=>wo});var d1=ut();function wo(){const e=st(d1);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function f1(e){const t=Ln(),n=wo(),r=ke({id:n.generateId("control")},e),[o,i]=de(r,["onClick","onKeyDown"]);return f(Le,H({as:"div",onClick:u=>{Ie(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Ie(u,o.onKeyDown),u.key===va.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function g1(e){const t=wo();return f(Ji,H(()=>t.dataset(),e))}function p1(e){const t=wo();return f(Qi,H(()=>t.dataset(),e))}function h1(e){const t=Ln(),n=wo(),[r,o]=I(),i=ke({id:n.generateId("indicator")},e),[s,a]=de(i,["ref","forceMount"]),{present:u}=sr({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return f(q,{get when(){return u()},get children(){return f(Le,H({as:"div",ref(c){var l=et(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function m1(e){let t;const n=Ln(),r=wo(),o=ke({id:r.generateId("input")},e),[i,s,a]=de(o,["ref","style","onChange","onFocus","onBlur"],Z0),{fieldProps:u}=X0(s),[c,l]=I(!1),d=h=>{if(Ie(h,i.onChange),h.stopPropagation(),!c()){const m=h.target;r.setIsChecked(m.checked),m.checked=r.checked()}l(!1)},g=h=>{Ie(h,i.onFocus),r.setIsFocused(!0)},p=h=>{Ie(h,i.onBlur),r.setIsFocused(!1)};return se(wt([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),se(wt([()=>t,()=>r.indeterminate(),()=>r.checked()],([h,m])=>{h&&(h.indeterminate=m)})),f(Le,H({as:"input",ref(h){var m=et(v=>{r.setInputRef(v),t=v},i.ref);typeof m=="function"&&m(h)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return kn(wa,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:g,onBlur:p},()=>n.dataset(),()=>r.dataset(),a))}function b1(e){const t=wo();return f(nd,H(()=>t.dataset(),e))}function y1(e){let t;const n=`checkbox-${Rt()}`,r=ke({value:"on",id:n},e),[o,i,s]=de(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],Jl),[a,u]=I(),[c,l]=I(!1),{formControlContext:d}=Ql(i),g=m0({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:v=>o.onChange?.(v),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});rd(()=>t,()=>g.setIsSelected(o.defaultChecked??!1));const p=v=>{Ie(v,o.onPointerDown),c()&&v.preventDefault()},h=ie(()=>({"data-checked":g.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),m={value:()=>o.value,dataset:h,checked:()=>g.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:dn(()=>J(i.id)),toggle:()=>g.toggle(),setIsChecked:v=>g.setIsSelected(v),setIsFocused:l,setInputRef:u};return f(Aa.Provider,{value:d,get children(){return f(d1.Provider,{value:m,get children(){return f(Le,H({as:"div",ref(v){var y=et(b=>t=b,o.ref);typeof y=="function"&&y(v)},role:"group",get id(){return J(i.id)},onPointerDown:p},()=>d.dataset(),h,s,{get children(){return f(Mk,{state:m,get children(){return o.children}})}}))}})}})}function Mk(e){const t=Xo(()=>{const n=e.children;return Hi(n)?n(e.state):n});return Z(t)}var Kr=Object.assign(y1,{Control:f1,Description:g1,ErrorMessage:p1,Indicator:h1,Input:m1,Label:b1});function v1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=v1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function w1(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=v1(e))&&(r&&(r+=" "),r+=t);return r}const Pk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Lk=(e,t)=>({classGroupId:e,validator:t}),x1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ra="-",tg=[],$k="arbitrary..",Fk=e=>{const t=zk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Bk(s);const a=s.split(ra),u=a[0]===""&&a.length>1?1:0;return _1(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?Pk(c,u):u:c||tg}return n[s]||tg}}},_1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=_1(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ra):e.slice(t).join(ra),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},Bk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?$k+r:void 0})(),zk=e=>{const{theme:t,classGroups:n}=e;return Uk(n,t)},Uk=(e,t)=>{const n=x1();for(const r in e){const o=e[r];cd(o,n,r,t)}return n},cd=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Kk(s,t,n,r)}},Kk=(e,t,n,r)=>{if(typeof e=="string"){jk(e,t,n);return}if(typeof e=="function"){qk(e,t,n,r);return}Hk(e,t,n,r)},jk=(e,t,n)=>{const r=e===""?t:E1(t,e);r.classGroupId=n},qk=(e,t,n,r)=>{if(Gk(e)){cd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Lk(n,e))},Hk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];cd(u,E1(t,a),n,r)}},E1=(e,t)=>{let n=e;const r=t.split(ra),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=x1(),n.nextPart.set(s,a)),n=a}return n},Gk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Vk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},fl="!",ng=":",Wk=[],rg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Yk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let m=0;m<l;m++){const v=o[m];if(s===0&&a===0){if(v===ng){i.push(o.slice(u,m)),u=m+1;continue}if(v==="/"){c=m;continue}}v==="["?s++:v==="]"?s--:v==="("?a++:v===")"&&a--}const d=i.length===0?o:o.slice(u);let g=d,p=!1;d.endsWith(fl)?(g=d.slice(0,-1),p=!0):d.startsWith(fl)&&(g=d.slice(1),p=!0);const h=c&&c>u?c-u:void 0;return rg(i,p,g,h)};if(t){const o=t+ng,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):rg(Wk,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Zk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Xk=e=>({cache:Vk(e.cacheSize),parseClassName:Yk(e),sortModifiers:Zk(e),postfixLookupClassGroupIds:Jk(e),...Fk(e)}),Jk=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Qk=/\s+/,e3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Qk);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:g,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}=n(d);if(g){c=d+(c.length>0?" "+c:c);continue}let y=!!v,b;if(y){const T=m.substring(0,v);b=r(T);const S=b&&s[b]?r(m):void 0;S&&S!==b&&(b=S,y=!1)}else b=r(m);if(!b){if(!y){c=d+(c.length>0?" "+c:c);continue}if(b=r(m),!b){c=d+(c.length>0?" "+c:c);continue}y=!1}const w=p.length===0?"":p.length===1?p[0]:i(p).join(":"),_=h?w+fl:w,C=_+b;if(a.indexOf(C)>-1)continue;a.push(C);const k=o(b,y);for(let T=0;T<k.length;++T){const S=k[T];a.push(_+S)}c=d+(c.length>0?" "+c:c)}return c},t3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=C1(n))&&(o&&(o+=" "),o+=r);return o},C1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=C1(e[r]))&&(n&&(n+=" "),n+=t);return n},n3=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Xk(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=e3(u,n);return o(u,l),l};return i=s,(...u)=>i(t3(...u))},r3=[],Pt=e=>{const t=n=>n[e]||r3;return t.isThemeGetter=!0,t},S1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,o3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,i3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s3=/\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$/,a3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pr=e=>o3.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Xn=e=>!!e&&Number.isInteger(Number(e)),gu=e=>e.endsWith("%")&&We(e.slice(0,-1)),Cr=e=>i3.test(e),A1=()=>!0,l3=e=>s3.test(e)&&!a3.test(e),ld=()=>!1,d3=e=>u3.test(e),f3=e=>c3.test(e),g3=e=>!Ce(e)&&!Se(e),p3=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),h3=e=>to(e,I1,ld),Ce=e=>S1.test(e),io=e=>to(e,R1,l3),og=e=>to(e,E3,We),m3=e=>to(e,N1,A1),b3=e=>to(e,O1,ld),ig=e=>to(e,T1,ld),y3=e=>to(e,D1,f3),_s=e=>to(e,M1,d3),Se=e=>k1.test(e),ai=e=>xo(e,R1),v3=e=>xo(e,O1),sg=e=>xo(e,T1),w3=e=>xo(e,I1),x3=e=>xo(e,D1),Es=e=>xo(e,M1,!0),_3=e=>xo(e,N1,!0),to=(e,t,n)=>{const r=S1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xo=(e,t,n=!1)=>{const r=k1.exec(e);return r?r[1]?t(r[1]):n:!1},T1=e=>e==="position"||e==="percentage",D1=e=>e==="image"||e==="url",I1=e=>e==="length"||e==="size"||e==="bg-size",R1=e=>e==="length",E3=e=>e==="number",O1=e=>e==="family-name",N1=e=>e==="number"||e==="weight",M1=e=>e==="shadow",C3=()=>{const e=Pt("color"),t=Pt("font"),n=Pt("text"),r=Pt("font-weight"),o=Pt("tracking"),i=Pt("leading"),s=Pt("breakpoint"),a=Pt("container"),u=Pt("spacing"),c=Pt("radius"),l=Pt("shadow"),d=Pt("inset-shadow"),g=Pt("text-shadow"),p=Pt("drop-shadow"),h=Pt("blur"),m=Pt("perspective"),v=Pt("aspect"),y=Pt("ease"),b=Pt("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),Se,Ce],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],S=()=>[Se,Ce,u],A=()=>[Pr,"full","auto",...S()],N=()=>[Xn,"none","subgrid",Se,Ce],R=()=>["auto",{span:["full",Xn,Se,Ce]},Xn,Se,Ce],L=()=>[Xn,"auto",Se,Ce],M=()=>["auto","min","max","fr",Se,Ce],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...S()],B=()=>[Pr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],ne=()=>[Pr,"screen","full","dvw","lvw","svw","min","max","fit",...S()],G=()=>[Pr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],K=()=>[e,Se,Ce],ce=()=>[..._(),sg,ig,{position:[Se,Ce]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",w3,h3,{size:[Se,Ce]}],V=()=>[gu,ai,io],re=()=>["","none","full",c,Se,Ce],me=()=>["",We,ai,io],W=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,gu,sg,ig],he=()=>["","none",h,Se,Ce],Q=()=>["none",We,Se,Ce],X=()=>["none",We,Se,Ce],te=()=>[We,Se,Ce],le=()=>[Pr,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cr],breakpoint:[Cr],color:[A1],container:[Cr],"drop-shadow":[Cr],ease:["in","out","in-out"],font:[g3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cr],shadow:[Cr],spacing:["px",We],text:[Cr],"text-shadow":[Cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pr,Ce,Se,v]}],container:["container"],"container-type":[{"@container":["","normal","size",Se,Ce]}],"container-named":[p3],columns:[{columns:[We,Ce,Se,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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"],sr:["sr-only","not-sr-only"],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:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Xn,"auto",Se,Ce]}],basis:[{basis:[Pr,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Pr,"auto","initial","none",Ce]}],grow:[{grow:["",We,Se,Ce]}],shrink:[{shrink:["",We,Se,Ce]}],order:[{order:[Xn,"first","last","none",Se,Ce]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,ai,io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_3,m3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gu,Ce]}],"font-family":[{font:[v3,b3,t]}],"font-features":[{"font-features":[Ce]}],"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:[o,Se,Ce]}],"line-clamp":[{"line-clamp":[We,"none",Se,og]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",Se,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,io]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[We,"auto",Se,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Xn,Se,Ce]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xn,Se,Ce],radial:["",Se,Ce],conic:[Xn,Se,Ce]},x3,y3]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,Ce]}],"outline-w":[{outline:["",We,ai,io]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",l,Es,_s]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,Es,_s]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[We,io]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,Es,_s]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[We,Se,Ce]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Se,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,Ce]}],filter:[{filter:["","none",Se,Ce]}],blur:[{blur:he()}],brightness:[{brightness:[We,Se,Ce]}],contrast:[{contrast:[We,Se,Ce]}],"drop-shadow":[{"drop-shadow":["","none",p,Es,_s]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",We,Se,Ce]}],"hue-rotate":[{"hue-rotate":[We,Se,Ce]}],invert:[{invert:["",We,Se,Ce]}],saturate:[{saturate:[We,Se,Ce]}],sepia:[{sepia:["",We,Se,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,Ce]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,Ce]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,Ce]}],ease:[{ease:["linear","initial",y,Se,Ce]}],delay:[{delay:[We,Se,Ce]}],animate:[{animate:["none",b,Se,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Se,Ce]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[Se,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],zoom:[{zoom:[Xn,Se,Ce]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Se,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Se,Ce]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[We,ai,io,og]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},S3=n3(C3);function ot(...e){return S3(w1(e))}const E=Dl.t,P1=Dl.useTranslation;var k3=$("<div>"),A3=$("<div class=min-w-0>");const T3={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},D3={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function I3(e){switch(e.type){case"success":return f(a2,{class:"h-4 w-4"});case"info":return f(P2,{class:"h-4 w-4"});case"warning":case"error":return f($_,{class:"h-4 w-4"});case"loading":return f(Dn,{class:"h-4 w-4 animate-spin"});default:return null}}function R3(e){return f(uo,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return ot("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=k3();return x(t,f(I3,{get type(){return e.type}})),Me(()=>_t(t,ot("shrink-0 self-center",D3[e.type]))),t})(),(()=>{var t=A3();return x(t,f(uo.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),x(t,(()=>{var n=Z(()=>!!e.description);return()=>n()?f(uo.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),f(uo.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return E("common.close")},get children(){return f(Zr,{class:"h-4 w-4"})}})]}})}function Oo(e,t,n={}){return Ri.show(r=>f(R3,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const $t=Object.assign((e,t)=>Oo("default",e,t),{success:(e,t)=>Oo("success",e,t),info:(e,t)=>Oo("info",e,t),warning:(e,t)=>Oo("warning",e,t),error:(e,t)=>Oo("error",e,t),loading:(e,t)=>Oo("loading",e,t),dismiss:e=>{if(typeof e=="number")return Ri.dismiss(e);Ri.clear()}}),O3=e=>{const[t,n]=de(e,["position","duration","visibleToasts","class"]);return f(uo.Region,H({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return ot("!pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",T3[t.position??"bottom-right"],t.class)}},n,{get children(){return f(uo.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};async function L1(e){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(fE(e)),$t.success(E("specDetail.specPathCopied"))}catch{$t.error(E("specDetail.specPathCopyFailed"))}}function N3(e,t){return e.some(n=>n.status==="running")||t.some(n=>n.running)}async function ag(e,t){const[n,r]=await Promise.all([t.listCommandRuns(e),t.listSessions(e)]);return!N3(n,r)}function M3(e,t=()=>{}){let n=!1;async function r(o){if(!n){n=!0,t(!0);try{return await o()}finally{n=!1,t(!1)}}}return{async check(o){const i=await r(()=>ag(o,e));return i===void 0?"busy":i?"allowed":"running"},async merge(o,i){return await r(async()=>await ag(o,e)?{status:"merged",value:await i()}:{status:"blocked",reason:"running"})??{status:"blocked",reason:"busy"}}}}const ug=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cg=w1,$1=(e,t)=>n=>{var r;if(t?.variants==null)return cg(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const g=ug(l)||ug(d);return o[c][g]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,g]=l;return g===void 0||(c[d]=g),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:g,...p}=l;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,d,g]:c},[]);return cg(e,s,u,n?.class,n?.className)},P3=$1("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ve=e=>{const[t,n]=de(e,["class","variant","size"]);return f(r0,H({get class(){return ot(P3({size:t.size,variant:t.variant}),t.class)}},n))};var L3=$("<div>");const $3=$1("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),F1=e=>{const[t,n]=de(e,["class","variant"]);return(()=>{var r=L3();return fr(r,H({get class(){return ot($3({variant:t.variant}),t.class)}},n),!1,!1),r})()},ts=()=>{const e=()=>Dr()?E("specDetail.exitFullscreen"):E("specDetail.fullscreen");return f(ve,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:Km,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return Dr()},get children(){return f(q,{get when(){return Dr()},get fallback(){return f(j2,{class:"h-3 w-3"})},get children(){return f(Y2,{class:"h-3 w-3"})}})}})};var F3=$("<input>");const ar=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=F3();return fr(r,H({get class(){return ot("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},dd=Cn.Trigger;Cn.Group;const lg=Cn.Sub;Cn.RadioGroup;const fd=e=>{const t=H({gutter:4,flip:!1},e);return f(Cn,t)},gd=e=>{const[t,n]=de(e,["class"]);return f(Cn.Portal,{get children(){return f(Cn.Content,H({get class(){return ot("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},er=e=>{const[t,n]=de(e,["class","inset"]);return f(Cn.Item,H({get class(){return ot("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},dg=e=>{const[t,n]=de(e,["class","children"]);return f(Cn.SubTrigger,H({get class(){return ot("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[Z(()=>t.children),f(Ol,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},fg=e=>{const[t,n]=de(e,["class"]);return f(Cn.Portal,{get children(){return f(Cn.SubContent,H({get class(){return ot("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible:outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},gl=e=>{const[t,n]=de(e,["class"]);return f(Cn.Separator,H({get class(){return ot("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var B3=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),B1=$("<div>");const un=Tr;Tr.Trigger;const ur=e=>{const[t,n]=de(e,["class","children"]);return f(Tr.Portal,{get children(){return[f(Tr.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(Tr.Content,H({get class(){return ot("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)}},n,{get children(){return[Z(()=>t.children),f(Tr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return B3()}})]}}))]}})},cr=e=>{const[t,n]=de(e,["class"]);return f(Tr.Title,H({get class(){return ot("text-lg font-semibold text-foreground",t.class)}},n))},Ba=e=>{const[t,n]=de(e,["class"]);return f(Tr.Description,H({get class(){return ot(" text-muted-foreground",t.class)}},n))},lr=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=B1();return fr(r,H({get class(){return ot("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},dr=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=B1();return fr(r,H({get class(){return ot("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var z3=$('<p class="m-0 text-destructive">'),U3=$('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),K3=$('<div class="flex items-center">'),j3=$('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),q3=$('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),H3=$('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const G3=e=>{const t=Yr(),[n,{refetch:r}]=Jt(e.projectId,y=>y?ye.listCommands(y):Promise.resolve([])),[o,i]=I(!1),[s,a]=I(""),[u,c]=I(""),[l,d]=I(!1),[g,p]=I(null);async function h(y){const b=e.projectId();if(b)try{const w=await ye.runCommand(b,y.id);e.onRunStarted?.(),t(It(`commands/${encodeURIComponent(w.runId)}`))}catch(w){$t.error(w.message)}}async function m(y){const b=e.projectId();if(b)try{await ye.deleteCommand(b,y.id),await r()}catch(w){$t.error(w.message)}}async function v(y){y.preventDefault();const b=e.projectId();if(!b)return;const w=s().trim(),_=u().trim();if(!(!w||!_)){d(!0),p(null);try{await ye.createCommand(b,{name:w,cli:_}),a(""),c(""),i(!1),await r()}catch(C){p(C.message)}finally{d(!1)}}}return(()=>{var y=K3();return x(y,f(fd,{placement:"bottom-start",get children(){return[f(dd,{as:ve,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return E("commands.menuTitle")},get children(){return f(O_,{class:"h-4 w-4"})}}),f(gd,{class:"min-w-56",get children(){return[f(q,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var b=j3();return x(b,()=>E("commands.empty")),b})()},get children(){return f(rt,{get each(){return n()??[]},children:b=>f(er,{class:"group flex items-center justify-between gap-2",onSelect:()=>void h(b),get children(){return[(()=>{var w=q3(),_=w.firstChild,C=_.nextSibling;return x(_,()=>b.name),x(C,()=>b.cli),w})(),(()=>{var w=H3();return w.$$click=_=>{_.stopPropagation(),_.preventDefault(),m(b)},w.$$keydown=_=>_.stopPropagation(),w.$$pointerup=_=>_.stopPropagation(),w.$$pointerdown=_=>_.stopPropagation(),x(w,f(Ml,{class:"h-3.5 w-3.5 text-destructive"})),Me(()=>Be(w,"title",E("commands.deleteDef"))),w})()]}})})}}),f(gl,{}),f(er,{onSelect:()=>i(!0),get children(){return[f(qr,{class:"mr-1 h-4 w-4"}),Z(()=>E("commands.add"))]}})]}})]}}),null),x(y,f(un,{get open(){return o()},onOpenChange:b=>{i(b),b||p(null)},get children(){return f(ur,{class:"max-w-md",get children(){return[f(lr,{get children(){return f(cr,{get children(){return E("commands.addTitle")}})}}),(()=>{var b=U3(),w=b.firstChild,_=w.nextSibling;return b.addEventListener("submit",C=>void v(C)),x(w,()=>E("commands.name"),null),x(w,f(ar,{id:"command-name",get value(){return s()},get placeholder(){return E("commands.namePlaceholder")},onInput:C=>a(C.currentTarget.value),get disabled(){return l()}}),null),x(_,()=>E("commands.cli"),null),x(_,f(ar,{id:"command-cli",get value(){return u()},get placeholder(){return E("commands.cliPlaceholder")},onInput:C=>c(C.currentTarget.value),get disabled(){return l()}}),null),x(b,f(q,{get when(){return g()},get children(){var C=z3();return x(C,g),C}}),null),x(b,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return E("common.cancel")}}),f(ve,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return Z(()=>!!l())()?E("common.submitting"):E("commands.submit")}})]}}),null),b})()]}})}}),null),y})()};Qt(["pointerdown","pointerup","keydown","click"]);var V3=$("<span>");const W3={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},z1=e=>(()=>{var t=V3();return x(t,()=>E(`commands.status.${e.status}`)),Me(()=>_t(t,`shrink-0 text-xs font-medium ${W3[e.status]} ${e.class??""}`)),t})();var Y3=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const za=Ur.Trigger,U1=Ur.Title;Ur.Description;const Ua=e=>{const t=H({gutter:4,flip:!1},e);return f(Ur,t)},Ka=e=>{const[t,n]=de(e,["class","children"]);return f(Ur.Portal,{get children(){return f(Ur.Content,H({get class(){return ot("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[Z(()=>t.children),f(Ur.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return Y3()}})]}}))}})};function K1(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}var Z3=$('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),X3=$('<span class="truncate font-medium">'),J3=$('<span class="truncate font-mono text-xs text-muted-foreground">'),Q3=$('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),eA=$('<p class="m-0 text-sm font-medium">'),tA=$('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),nA=$('<div class="flex justify-end">'),rA=$('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');const oA=e=>{const[t,{refetch:n,mutate:r}]=Jt(e.projectId,p=>p?ye.listCommandRuns(p):Promise.resolve([])),[o,i]=I(Date.now()),[s,a]=I(null),[u,c]=I(null),l=setInterval(()=>i(Date.now()),1e3);ae(()=>clearInterval(l)),se(()=>{e.revision?.(),n()}),se(()=>{const p=e.projectId();if(!p)return;const h=sE(p,m=>r(m));ae(h)});async function d(p){const h=e.projectId();if(h){a(p.runId);try{await ye.clearCommandRun(h,p.runId),await n()}catch(m){$t.error(m.message)}finally{a(null)}}}async function g(p){const h=e.projectId();if(h){c(p.runId);try{await ye.clearCommandRun(h,p.runId),await ye.runCommand(h,p.commandId),await n()}catch(m){$t.error(m.message)}finally{c(null)}}}return f(q,{get when(){return(t()??[]).length>0},get children(){var p=Z3(),h=p.firstChild,m=h.nextSibling;return x(h,()=>E("commands.running")),x(m,f(rt,{get each(){return t()??[]},children:v=>(()=>{var y=rA(),b=y.firstChild;return x(y,f(zn,{get href(){return It(`commands/${encodeURIComponent(v.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[f(z1,{get status(){return v.status}}),(()=>{var w=X3();return x(w,()=>v.name),w})(),(()=>{var w=J3();return x(w,()=>v.cli),w})(),(()=>{var w=Q3();return x(w,()=>K1(v.startedAt,v.endedAt,o())),w})()]}}),b),x(b,f(ve,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return E("commands.restart")},get disabled(){return u()===v.runId||s()===v.runId},onClick:()=>void g(v),get children(){return f(m_,{class:"h-4 w-4"})}}),null),x(b,f(Ua,{get children(){return[f(za,{as:ve,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return E("commands.clear")},get disabled(){return u()===v.runId},get children(){return f(Zr,{class:"h-4 w-4"})}}),f(Ka,{class:"w-72",get children(){return[(()=>{var w=eA();return x(w,()=>E("commands.clearTitle")),w})(),(()=>{var w=tA();return x(w,()=>E("commands.clearDescription")),w})(),(()=>{var w=nA();return x(w,f(ve,{variant:"destructive",size:"sm",get disabled(){return s()===v.runId},onClick:()=>void d(v),get children(){return Z(()=>s()===v.runId)()?E("common.deleting"):E("commands.clear")}})),w})()]}})]}}),null),y})()})),p}})};var iA=$('<span class=" text-muted-foreground">'),sA=$('<span class=" text-destructive">'),aA=$('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),uA=$('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),cA=$('<div class="py-6 text-center text-sm text-muted-foreground">'),gg=$('<p class=" text-destructive">'),lA=$('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),dA=$('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="mr-2 text-xl">'),fA=$('<p class=" text-muted-foreground">'),gA=$('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),pA=$('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),hA=$('<h2 class="my-1.5 text-base font-semibold">'),mA=$('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),bA=$('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),yA=$('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),pg=$("<span>."),vA=$("<span>");const pu=40,wA=()=>{const e=Yr(),t=bo(),[n,{refetch:r}]=Jt(t,z=>z?ye.listSpecs(z):Promise.resolve([])),[o,{refetch:i}]=Jt(()=>ye.listProjects()),s=ie(()=>(o()??[]).find(z=>z.id===t())),a=ie(()=>{const z=s();return z?.worktree?(o()??[]).some(V=>V.id===z.worktree.mainProjectId):!0}),u=ie(()=>{const z=s();return z?.worktree?`feat(${z.worktree.branch}): merge from worktree`:""}),[c,l]=I(!1),[d,g]=I(!1),[p,h]=I(null),[m,v]=I(!1),[y,b]=I(""),[w,_]=I(null),[C,k]=I(0),[T,S]=I(!1),[A,N]=I(null),R=M3(ye,g);qi(()=>m()||w()!==null);const[L,M]=I(pu),D=ie(()=>(n()??[]).slice(0,L())),F=ie(()=>L()<(n()??[]).length),[O,B]=I(null);se(()=>{t(),M(pu)}),Nn(()=>{const z=new IntersectionObserver(V=>{if(!V.some(me=>me.isIntersecting))return;const re=(n()??[]).length;M(me=>me>=re?me:Math.min(me+pu,re))},{rootMargin:"300px"});se(()=>{const V=O();L(),V&&(z.observe(V),ae(()=>z.unobserve(V)))}),ae(()=>z.disconnect())});let ne=null;se(()=>{const z=t();ne?.(),ne=null,z&&(ne=qm(z,()=>{r()}))}),Nn(()=>{const z=Hm(()=>{(async()=>{const V=s()?.worktree?.mainProjectId??null;await i();const re=t();!re||(o()??[]).some(W=>W.id===re)||V&&e(`/${encodeURIComponent(V)}`)})()});ae(z)}),ae(()=>{ne?.(),ne=null});async function G(){const z=t();if(!z)return!1;h(null);try{const V=await R.check(z);return V==="running"?(h(E("home.runningTasksPreventMerge")),!1):V==="allowed"}catch(V){return h(V.message),!1}}async function K(){s()?.worktree&&a()&&await G()&&(b(u()),h(null),v(!0))}async function ce(){const z=s();if(!z?.worktree||!a())return;const V=y().trim()||u();h(null);try{const re=await R.merge(z.id,async()=>{l(!0);try{return await ye.mergeWorktreeToMain(z.id,{commitMessage:V})}finally{l(!1)}});if(re.status==="blocked"){re.reason==="running"&&h(E("home.runningTasksPreventMerge"));return}const me=re.value;v(!1),me.status==="merged"?($t.success(E("home.merged")),await i(),e(`/${encodeURIComponent(me.mainProjectId)}`)):($t.info(E("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(me.mainProjectId)}/specs/${encodeURIComponent(me.conflictSpecId)}`))}catch(re){h(re.message)}}async function U(z){const V=t();if(V){S(!0),N(null);try{await ye.deleteSpec(V,z),_(null),await r()}catch(re){N(re.message)}finally{S(!1)}}}return(()=>{var z=dA(),V=z.firstChild,re=V.firstChild,me=re.firstChild;return x(me,()=>E("home.specList")),x(re,f(G3,{projectId:t,onRunStarted:()=>k(W=>W+1)}),null),x(re,f(ve,{as:zn,get href(){return It("git")},variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return E("git.title")},get children(){return f(Nl,{class:"h-4 w-4"})}}),null),x(V,f(ts,{}),null),x(z,f(oA,{projectId:t,revision:C}),null),x(z,f(q,{get when(){return s()?.worktree},get children(){var W=aA(),Y=W.firstChild,ee=Y.firstChild;return x(ee,()=>E("home.mainProject"),null),x(ee,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),x(W,f(ve,{variant:"default",size:"sm",onClick:()=>void K(),get disabled(){return c()||d()||!a()},get title(){return Z(()=>!!a())()?E("home.mergeHint"):E("home.mainUnreachable")},get children(){return[f(Lm,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>Z(()=>!!c())()?E("home.merging"):E("home.mergeToMain"))]}}),null),x(W,f(q,{get when(){return!a()},get children(){var he=iA();return x(he,()=>E("home.mainUnreachable")),he}}),null),x(W,f(q,{get when(){return p()},get children(){var he=sA();return x(he,p),he}}),null),W}}),null),x(z,f(pa,{get fallback(){return(()=>{var W=fA();return x(W,()=>E("common.loading")),W})()},get children(){return f(q,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var W=gA(),Y=W.firstChild;return x(Y,()=>E("home.noSpecs")),x(W,f(ve,{as:zn,get href(){return It("specs/new")},variant:"default",size:"sm",get children(){return[f(qr,{class:"mr-1 h-4 w-4"}),Z(()=>E("home.createFirst"))]}}),null),W})()},get children(){return[(()=>{var W=uA();return x(W,f(rt,{get each(){return D()},children:Y=>{const ee=Vm(Y.id);return(()=>{var he=yA(),Q=he.firstChild;return x(he,f(zn,{get href(){return It(`specs/${encodeURIComponent(Y.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var X=pA(),te=X.firstChild;return x(X,f(F1,{variant:"outline",get class(){return`font-mono ${cE[Y.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return Y.stage}}),te),x(te,()=>Gm(Y.updated_at)),X})(),(()=>{var X=hA();return x(X,()=>Y.title||E("common.pendingAgent")),X})(),(()=>{var X=mA();return x(X,()=>Y.summary||E("common.pendingAgent")),X})(),(()=>{var X=bA();return x(X,f(q,{when:ee,get fallback(){return Y.id},children:te=>[(()=>{var le=pg(),Ae=le.firstChild;return x(le,()=>te().prefix,Ae),le})(),(()=>{var le=vA();return x(le,()=>te().type),Me(()=>_t(le,`font-semibold ${lE[te().type]??"text-foreground"}`)),le})(),(()=>{var le=pg();return le.firstChild,x(le,()=>te().suffix,null),le})()]})),X})()]}}),Q),x(Q,f(fd,{placement:"bottom-end",get children(){return[f(dd,{as:ve,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return E("home.moreActions")},get children(){return f(v2,{class:"h-4 w-4"})}}),f(gd,{get children(){return[f(er,{onSelect:()=>void L1(Y.id),get children(){return E("home.copySpecPath")}}),f(er,{class:"text-destructive focus:text-destructive",onSelect:()=>_(Y.id),get children(){return E("common.delete")}})]}})]}})),he})()}})),W})(),f(q,{get when(){return F()},get children(){var W=cA();return jn(Y=>B(Y),W),x(W,()=>E("common.loading")),W}})]}})}}),null),x(z,f(un,{get open(){return m()},onOpenChange:W=>{v(W),W||h(null)},get children(){return f(ur,{class:"max-w-md",get children(){return[f(lr,{get children(){return[f(cr,{get children(){return E("home.mergeDialogTitle")}}),f(Ba,{get children(){return E("home.mergeDialogDescription")}})]}}),(()=>{var W=lA(),Y=W.firstChild;return W.addEventListener("submit",ee=>{ee.preventDefault(),ce()}),x(Y,()=>E("home.mergeCommitMessage"),null),x(Y,f(ar,{id:"merge-commit-message",get value(){return y()},onInput:ee=>b(ee.currentTarget.value),get disabled(){return c()}}),null),x(W,f(q,{get when(){return p()},get children(){var ee=gg();return x(ee,p),ee}}),null),x(W,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",onClick:()=>v(!1),get disabled(){return c()},get children(){return E("common.cancel")}}),f(ve,{type:"submit",get disabled(){return c()||d()||!a()},get children(){return Z(()=>!!c())()?E("home.merging"):E("home.mergeToMain")}})]}}),null),W})()]}})}}),null),x(z,f(un,{get open(){return w()!==null},onOpenChange:W=>{W||(_(null),N(null))},get children(){return f(ur,{class:"max-w-sm",get children(){return[f(lr,{get children(){return f(cr,{get children(){return E("home.confirmDeleteSpec")}})}}),f(q,{get when(){return A()},get children(){var W=gg();return x(W,A),W}}),f(dr,{get children(){return[f(ve,{variant:"outline",onClick:()=>_(null),get disabled(){return T()},get children(){return E("common.cancel")}}),f(ve,{variant:"destructive",onClick:()=>w()&&void U(w()),get disabled(){return T()},get children(){return Z(()=>!!T())()?E("common.deleting"):E("common.confirmDelete")}})]}})]}})}}),null),z})()},j1="",xA=10*1024*1024,jo=10;function _A(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":"file"}function EA(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function hg(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function CA(){return Math.random().toString(36).slice(2,8)}function q1(e){const t=e.labels,[n,r]=I([]),[o,i]=I(null),[s,a]=I(null),[u,c]=I(null),[l,d]=I(""),g=ie(()=>n().length),p=ie(()=>n().some(R=>R.status==="pending")),h=ie(()=>n().some(R=>R.status==="failed"));ae(()=>{for(const R of n())R.previewUrl&&URL.revokeObjectURL(R.previewUrl)});async function m(){const R=o();if(R)return R;const{draftId:L}=await ye.createDraft(e.projectId());return i(L),L}function v(R){r(L=>[...L,R])}function y(R,L){r(M=>M.map(D=>D.id===R?{...D,...L}:D))}function b(R){r(L=>{const M=[];for(const D of L){if(D.id===R){D.previewUrl&&URL.revokeObjectURL(D.previewUrl);continue}M.push(D)}return M})}async function w(R){a(null);const L=n(),M=jo-L.length;if(M<=0){a(t.attachmentLimit(jo));return}const D=[];for(const F of R.slice(0,M)){const O=EA(F),B=_A(O);if(O.size>xA){a(t.fileTooLarge(O.name));continue}const ne=`att-${Date.now()}-${CA()}`,G=B==="image"?URL.createObjectURL(O):void 0;D.push({id:ne,file:O,name:O.name,kind:B,previewUrl:G,status:"pending"})}if(D.length!==0){R.length>M&&a(t.attachmentRoomLimit(M,L.length,jo));for(const F of D)v(F);try{const F=await m();for(const O of D)try{const B=await ye.uploadAttachment(e.projectId(),F,O.file);y(O.id,{storedName:B.storedName,name:B.storedName,status:"uploaded"})}catch(B){y(O.id,{status:"failed",error:B.message})}}catch(F){a(F.message);for(const O of D)y(O.id,{status:"failed",error:F.message})}}}async function _(R){const L=R.currentTarget;if(!L.files)return;const M=Array.from(L.files);L.value="",await w(M)}async function C(R){const L=R.clipboardData?.items;if(!L)return;const M=[];for(const D of Array.from(L))if(D.kind==="file"&&D.type.startsWith("image/")){const F=D.getAsFile();F&&M.push(F)}M.length!==0&&(R.preventDefault(),await w(M))}async function k(R){const L=n().find(M=>M.id===R);if(L){if(L.storedName&&o())try{await ye.deleteAttachment(e.projectId(),o(),L.storedName)}catch(M){a(M.message)}b(R)}}function T(R){d(hg(R.name)),c(R.id)}async function S(R){const L=l().trim();if(c(null),!(!L||!R.storedName||!o())&&L!==hg(R.name))try{const M=await ye.renameAttachment(e.projectId(),o(),R.storedName,L);y(R.id,{storedName:M.storedName,name:M.storedName})}catch(M){a(M.message)}}function A(){c(null)}function N(){const R=ft(n);for(const L of R)L.previewUrl&&URL.revokeObjectURL(L.previewUrl);R.length>0&&r([]),i(null),c(null),d(""),a(null)}return{attachments:n,draftId:o,error:s,setError:a,count:g,hasPending:p,hasFailed:h,renamingId:u,renameDraft:l,setRenameDraft:d,addFiles:w,onFileInputChange:_,onPaste:C,removeAttachment:k,beginRename:T,commitRename:S,cancelRename:A,reset:N}}const H1={attachmentLimit:e=>E("newSpec.attachmentLimit",{max:e}),unsupportedType:e=>E("newSpec.unsupportedType",{name:e}),unsupportedMime:e=>E("newSpec.unsupportedMime",{mime:e}),fileTooLarge:e=>E("newSpec.fileTooLarge",{name:e}),attachmentRoomLimit:(e,t,n)=>E("newSpec.attachmentRoomLimit",{room:e,current:t,max:n})},SA=150,kA=16,AA=48,TA=24,DA=8;function hu(e){return e.replace(/^\/+/,"")}function IA(e,t){return t===0?!0:/[\s/_.-]/.test(e[t-1]??"")}function mg(e,t){if(!e)return 0;const n=e.toLowerCase(),r=t.toLowerCase();let o=0,i=-1;for(let s=0;s<n.length;s++){const a=r.indexOf(n[s],i+1);if(a===-1)return null;o+=kA,a===s&&(o+=AA),a===i+1&&(o+=TA),IA(t,a)&&(o+=DA),o-=Math.max(0,a-i-1),i=a}return o-t.length*.01}function RA(e,t){const n=hu(e.trim());if(!n)return 0;const r=mg(n,hu(t.value)),o=t.label?mg(n,hu(t.label)):null;return r==null?o:o==null?r:Math.max(r,o)}function OA(e,t){return t?e.map((n,r)=>{const o=RA(t,n);return o==null?null:{cmd:n,score:o,index:r}}).filter(n=>n!=null).sort((n,r)=>r.score-n.score||n.index-r.index).map(n=>n.cmd):e}function NA(e,t,n){const r=e.slice(0,t);if(n&&/^\/[\w-]*$/.test(r))return{kind:"slash",query:r.slice(1)};const o=r.lastIndexOf("@");if(o===-1)return null;const i=r.slice(o+1);return/^[\w./@-]*$/.test(i)?{kind:"mention",start:o,query:i}:null}function bg(e,t,n){const r=t.kind==="slash"?0:t.start,o=e.slice(0,r),i=e.slice(r+1+t.query.length);return{next:o+n+i,cursorPos:o.length+n.length}}function MA(e){return e.kind==="mention"?`@${e.value}`:e.replacement??`${e.value} `}function PA(e){const[t,n]=I(!1),[r,o]=I([]),[i,s]=I(0),[a,u]=I(!1);let c=null,l=null;ae(()=>{l&&clearTimeout(l)});function d(){n(!1),u(!1),o([]),s(0),c=null,l&&(clearTimeout(l),l=null)}function g(b){l&&clearTimeout(l),l=setTimeout(async()=>{const w=e.projectId();if(w)try{const _=await ye.listFiles(w,b);if(c?.kind!=="mention"||c.query!==b)return;o(_.items.map(C=>({kind:"mention",value:C}))),s(0)}catch{o([])}},e.searchDebounceMs??SA)}function p(b){const w=e.slashCommands?.()??[],_=OA(w,b).map(C=>({kind:"slash",value:C.value,label:C.label??C.value,description:C.description,replacement:C.replacement,action:C.action,customId:C.customId,editable:C.editable,editLabel:C.editLabel,deletable:C.deletable,deleteLabel:C.deleteLabel,icon:C.icon,command:C}));o(_),s(0),_.length>0?(u(!1),n(!0)):e.slashEmptyEnabled?.()?(u(!0),n(!0)):d()}function h(b){const w=(e.slashCommands?.()??[]).length>0,_=NA(b.value,b.selectionStart,w);if(!_){d();return}if(c=_,_.kind==="slash"){p(_.query);return}u(!1),t()||n(!0),g(_.query)}function m(b){const w=c;if(!w)return{kind:"noop"};if(b.kind==="slash"&&b.action==="add"){const{next:k}=bg(e.value(),w,"");return e.onValueChange(k),d(),{kind:"action",command:b.command}}const{next:_,cursorPos:C}=bg(e.value(),w,MA(b));return e.onValueChange(_),d(),{kind:"text",cursorPos:C}}function v(b){const w=r();w.length!==0&&s(_=>(_+b+w.length)%w.length)}function y(b){if(!b)return;const w=r().filter(_=>_.kind!=="slash"||_.customId!==b);o(w),s(_=>Math.min(_,Math.max(0,w.length-1))),w.length===0&&d()}return{open:t,items:r,index:i,setIndex:s,slashEmpty:a,handleInput:h,select:m,close:d,moveIndex:v,removeSlashItem:y}}var LA=$("<textarea>");const pl=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=LA();return fr(r,H({get class(){return ot("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},yg=1.5,G1=2,$A=10;function FA(e,t=G1,n=$A){if(!e)return;const r=getComputedStyle(e),o=parseFloat(r.fontSize)||14,i=r.lineHeight==="normal"?o*yg:parseFloat(r.lineHeight)||o*yg,s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),a=i*t+s,u=i*n+s;e.style.height="auto",e.style.height=`${Math.min(Math.max(e.scrollHeight,a),u)}px`,e.style.overflowY=e.scrollHeight>u?"auto":"hidden"}const oa=e=>{const[t,n]=de(e,["minRows","maxRows","class","ref","onInput"]);let r;const o=()=>FA(r,t.minRows,t.maxRows),i=a=>{r=a;const u=t.ref;typeof u=="function"&&u(a)},s=a=>{const u=t.onInput;typeof u=="function"?u(a):Array.isArray(u)&&u[0](u[1],a),o()};return Nn(()=>{o(),requestAnimationFrame(o)}),se(wt(()=>e.value,o)),f(pl,H({ref:i,get class(){return ot("min-h-0 resize-none",t.class)},get rows(){return t.minRows??G1},onInput:s},n))};var BA=$('<li class="px-3 py-1.5 text-sm text-muted-foreground">'),zA=$('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),UA=$('<div class="relative w-full">'),KA=$("<span>"),jA=$('<div class="mr-1 flex shrink-0 items-center gap-0.5">'),qA=$('<li><button type=button class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden border-0 bg-transparent px-3 py-1.5 text-left text-sm text-inherit"><span class="min-w-0 flex-1"><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const HA=150,ja=e=>{let t,n=[],r=null;ae(()=>{r&&clearTimeout(r)});const o=PA({projectId:()=>e.projectId,value:()=>e.value,onValueChange:l=>e.onValueChange(l),slashCommands:()=>e.slashCommands??[],slashEmptyEnabled:()=>!!e.slashEmptyLabel});function i(l){n=[];const d=o.select(l);if(d.kind!=="noop"){if(d.kind==="action"){e.onSlashCommandAction?.(d.command),requestAnimationFrame(()=>t?.focus());return}requestAnimationFrame(()=>{t&&(t.focus(),t.setSelectionRange(d.cursorPos,d.cursorPos))})}}function s(l){l.kind==="slash"&&(e.onDeleteSlashCommand?.(l.command),l.customId&&o.removeSlashItem(l.customId))}function a(l){l.kind==="slash"&&(e.onEditSlashCommand?.(l.command),o.close(),requestAnimationFrame(()=>t?.focus()))}function u(){n[o.index()]?.scrollIntoView({block:"nearest"})}function c(l){const d=o.items();if(o.open()&&d.length>0){if(l.key==="ArrowDown"){l.preventDefault(),o.moveIndex(1),requestAnimationFrame(u);return}if(l.key==="ArrowUp"){l.preventDefault(),o.moveIndex(-1),requestAnimationFrame(u);return}if(l.key==="Enter"||l.key==="Tab"){if(!l.isComposing){l.preventDefault(),i(d[o.index()]);return}}else if(l.key==="Escape"){l.preventDefault(),o.close();return}}e.onKeyDown?.(l)}return(()=>{var l=UA();return x(l,f(oa,{ref(d){var g=t;typeof g=="function"?g(d):t=d},get minRows(){return e.minRows},get maxRows(){return e.maxRows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return e.class},onInput:d=>{e.onValueChange(d.currentTarget.value),n=[],o.handleInput(d.currentTarget)},onKeyDown:c,onPaste:d=>e.onPaste?.(d),onBlur:()=>{r&&clearTimeout(r),r=setTimeout(o.close,HA)}}),null),x(l,f(q,{get when(){return Z(()=>!!o.open())()&&(o.items().length>0||o.slashEmpty())},get children(){var d=zA();return x(d,f(q,{get when(){return o.slashEmpty()},get children(){var g=BA();return x(g,()=>e.slashEmptyLabel),g}}),null),x(d,f(rt,{get each(){return o.items()},children:(g,p)=>(()=>{var h=qA(),m=h.firstChild,v=m.firstChild,y=v.firstChild;return h.addEventListener("mouseenter",()=>o.setIndex(p())),jn(b=>n[p()]=b,h),m.$$mousedown=b=>{b.preventDefault(),i(g)},x(m,f(q,{get when(){return Z(()=>g.kind==="slash")()&&g.icon==="plus"},get children(){return f(qr,{class:"h-3.5 w-3.5 shrink-0"})}}),v),x(y,(()=>{var b=Z(()=>g.kind==="slash");return()=>b()?g.label:g.value})()),x(v,f(q,{get when(){return Z(()=>g.kind==="slash")()&&g.description},get children(){var b=KA();return x(b,(()=>{var w=Z(()=>g.kind==="slash");return()=>w()?g.description:""})()),Me(()=>_t(b,ot("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",o.index()===p()?"text-primary-foreground/80":"text-muted-foreground"))),b}}),null),x(h,f(q,{get when(){return Z(()=>g.kind==="slash")()&&(g.editable||g.deletable)},get children(){var b=jA();return x(b,f(q,{get when(){return Z(()=>g.kind==="slash")()&&g.editable},get children(){return f(ve,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return Z(()=>g.kind==="slash")()?g.editLabel:void 0},get class(){return ot("h-7 w-7 p-0",o.index()===p()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},onMouseDown:w=>{w.preventDefault(),w.stopPropagation(),a(g)},get children(){return f(Fm,{class:"h-3.5 w-3.5"})}})}}),null),x(b,f(q,{get when(){return Z(()=>g.kind==="slash")()&&g.deletable},get children(){return f(ve,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return Z(()=>g.kind==="slash")()?g.deleteLabel:void 0},get class(){return ot("h-7 w-7 p-0",o.index()===p()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-destructive hover:bg-destructive/10 hover:text-destructive")},onMouseDown:w=>{w.preventDefault(),w.stopPropagation(),s(g)},get children(){return f(Ml,{class:"h-3.5 w-3.5"})}})}}),null),b}}),null),Me(b=>{var w=ot("flex items-center",o.index()===p()?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),_=g.kind==="slash"&&g.description?g.description:g.value;return w!==b.e&&_t(h,b.e=w),_!==b.t&&Be(m,"title",b.t=_),b},{e:void 0,t:void 0}),h})()}),null),d}}),null),l})()};Qt(["mousedown"]);const pd=Ni.Trigger,hd=e=>{const t=H({gutter:4,flip:!1},e);return f(Ni,t)},md=e=>{const[t,n]=de(e,["class"]);return f(Ni.Portal,{get children(){return f(Ni.Content,H({get class(){return ot("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var GA=$('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const VA=e=>f(un,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(un.Portal,{get children(){return[f(un.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(un.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[f(q,{get when(){return e.src},get children(){var t=GA();return Me(n=>{var r=e.src,o=e.alt;return r!==n.e&&Be(t,"src",n.e=r),o!==n.t&&Be(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),f(un.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return f(Zr,{class:"h-4 w-4"})}})]}})]}})}});var WA=$('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),V1=$('<img class="h-full w-full object-cover">'),YA=$('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),ZA=$('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),XA=$('<span class="text-xs font-bold text-muted-foreground">'),JA=$('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),QA=$('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),eT=$('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),tT=$('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function W1(e){return e==="pdf"?"PDF":e==="text"?"TXT":"FILE"}function nT(e){return e.status==="pending"?`${e.name} · ${E("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${E("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const Y1=e=>{const t=e.ctrl,[n,r]=I(),[o,i]=I(),[s,a]=I(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return f(q,{get when(){return e.compact},get fallback(){return f(rT,e)},get children(){return[(()=>{var c=WA();return x(c,f(rt,{get each(){return t.attachments()},children:l=>(()=>{var d=ZA(),g=d.firstChild;return x(d,f(hd,{openDelay:150,closeDelay:0,get children(){return[f(pd,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[f(q,{get when(){return Z(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=XA();return x(p,()=>W1(l.kind)),p})()},get children(){var p=V1();return Me(h=>{var m=l.previewUrl,v=l.name;return m!==h.e&&Be(p,"src",h.e=m),v!==h.t&&Be(p,"alt",h.t=v),h},{e:void 0,t:void 0}),p}}),f(q,{get when(){return l.status==="pending"},get children(){var p=YA();return x(p,f(Dn,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),f(md,{get children(){return nT(l)}})]}}),g),g.$$click=()=>void t.removeAttachment(l.id),x(g,f(Zr,{class:"h-3 w-3"})),Me(p=>{var h=e.busy,m=E("newSpec.deleteAttachment",{name:l.name});return h!==p.e&&(g.disabled=p.e=h),m!==p.t&&Be(g,"aria-label",p.t=m),p},{e:void 0,t:void 0}),d})()})),c})(),f(VA,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},rT=e=>{const t=e.ctrl;return(()=>{var n=JA();return x(n,f(rt,{get each(){return t.attachments()},children:r=>(()=>{var o=QA(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return x(i,f(q,{get when(){return Z(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=eT();return x(u,()=>W1(r.kind)),u})()},get children(){var u=V1();return Me(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&Be(u,"src",c.e=l),d!==c.t&&Be(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),x(s,f(q,{get when(){return Z(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=tT();return u.$$click=()=>e.allowRename&&t.beginRename(r),x(u,()=>r.name),Me(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?E("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&Be(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return f(ar,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),x(a,f(q,{get when(){return r.status==="pending"},get children(){return[f(Dn,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),Z(()=>E("newSpec.uploading"))]}}),null),x(a,f(q,{get when(){return r.status==="failed"},get children(){return E("newSpec.uploadFailed",{error:r.error})}}),null),x(a,f(q,{get when(){return r.status==="uploaded"},get children(){return[Z(()=>Math.round(r.file.size/1024))," KB · ",Z(()=>r.kind)]}}),null),x(o,f(ve,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return E("newSpec.deleteAttachment",{name:r.name})},get children(){return f(Zr,{class:"h-3.5 w-3.5"})}}),null),Me(()=>_t(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};Qt(["click"]);var oT=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Pi=Kr.Label,Vo=Kr;Kr.ErrorMessage;Kr.Description;const Wo=e=>{const[t,n]=de(e,["class","children"]);return[f(Kr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),f(Kr.Control,H({get class(){return ot("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return f(Kr.Indicator,{class:"flex items-center justify-center text-current",get children(){return oT()}})}}))]};Gn.Description;Gn.ErrorMessage;Gn.ItemDescription;const on=Gn.ItemInput,sn=Gn.ItemLabel,Li=Gn.Label,Rn=Gn,an=Gn.Item,pn=e=>{const[t,n]=de(e,["class"]);return f(Gn.ItemControl,H({get class(){return ot("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return f(Gn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var iT=$('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),sT=$('<span class="truncate font-medium text-foreground">');const ns=e=>(()=>{var t=iT();return x(t,f(rt,{get each(){return e.items},children:(n,r)=>[f(q,{get when(){return r()>0},get children(){return f(Ol,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),f(q,{get when(){return n.href},get fallback(){return(()=>{var o=sT();return x(o,()=>n.label),o})()},get children(){return f(zn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})(),aT="yorz:new-spec-draft:";function uT(e){return e==="feat"||e==="refct"||e==="fix"}function bd(e){return`${aT}${e}`}function cT(e){if(!e||typeof window>"u")return{};try{const t=window.localStorage.getItem(bd(e));if(!t)return{};const n=JSON.parse(t);return{content:typeof n.content=="string"?n.content:void 0,type:uT(n.type)?n.type:void 0,useWorktree:typeof n.useWorktree=="boolean"?n.useWorktree:void 0}}catch{return{}}}function lT(e,t){if(!(!e||typeof window>"u"))try{const n=t.content.trim().length>0||t.type!=="feat"||t.useWorktree!==!1,r=bd(e);if(!n){window.localStorage.removeItem(r);return}window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function vg(e){return JSON.stringify(e)}function wg(e){if(!(!e||typeof window>"u"))try{window.localStorage.removeItem(bd(e))}catch{}}function dT(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}function fT(e){let t=new Set,n=!1;return{setBaseline(r){t=new Set(r),n=!1},async poll(){if(!n)try{const o=(await e.listSpecs()).find(i=>!t.has(i.id));if(!o||n)return;n=!0,e.onFound(o.id)}catch{}},found:()=>n}}var xg=$('<span class="text-sm text-muted-foreground">'),gT=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),pT=$('<strong class=" ">'),hT=$('<p class=" text-destructive">');const mT=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],bT=()=>{const e=Yr(),t=bo(),[n,r]=I(""),[o,i]=I("feat"),[s,a]=I("idle"),[u,c]=I(!1),l=()=>s()==="creating",d=q1({projectId:t,labels:H1}),g=d.error,p=d.setError;let h=null,m=null,v="",y="",b,w=!1,_="";ae(()=>{h?.(),m?.()}),se(wt(t,T=>{w=!0;const S=cT(T);r(S.content??""),i(S.type??"feat"),c(S.useWorktree??!1),w=!1})),se(()=>{if(w||l())return;const T={content:n(),type:o(),useWorktree:u()};vg(T)!==_&&(_="",lT(t(),T))});const C=fT({listSpecs:()=>ye.listSpecs(v||t()),onFound:T=>{const S=v||t();h?.(),h=null,m?.(),m=null;const A=S?`/${S}/specs/${encodeURIComponent(T)}`:It(`specs/${encodeURIComponent(T)}`);e(A),y&&(Fo(y),y="")}});async function k(T){if(T.preventDefault(),s()==="creating")return;p(null);const S=n().trim();if(S.length<5){p(E("newSpec.descTooShort"));return}const A=d.attachments().filter(N=>N.status==="failed");if(A.length>0){p(E("newSpec.attachmentFailedCount",{count:A.length}));return}if(d.hasPending()){p(E("newSpec.attachmentUploading"));return}a("creating");try{const N=t();_=vg({content:n(),type:o(),useWorktree:u()}),wg(N);let R=N;if(u()){const O=dT(S);R=(await ye.createWorktree(N,{specSlug:O})).id,wg(R)}v=R;const L=await ye.listSpecs(R);C.setBaseline(L.map(O=>O.id));const M={type:o(),requirement:S},D=d.draftId();D&&(M.draftId=D,R!==N&&(M.draftProjectId=N));const F=await ye.createSpec(R,M);"draft"in F&&F.draft?(y=F.sessionId,m=ya(R,F.sessionId,{onEvent:O=>{O.type==="error"&&(a("failed"),p(O.message||E("newSpec.agentRunFailed")),m?.(),m=null)}}),h=qm(R,()=>{C.poll()}),C.poll()):"id"in F&&e(`/${R}/specs/${encodeURIComponent(F.id)}`)}catch(N){p(N.message),a("failed")}}return(()=>{var T=gT(),S=T.firstChild,A=S.nextSibling,N=A.nextSibling,R=N.firstChild,L=R.firstChild,M=R.nextSibling,D=M.firstChild,F=D.firstChild,O=F.nextSibling,B=O.nextSibling;x(S,f(ns,{get items(){return[{label:E("breadcrumb.specList"),href:It("")},{label:E("breadcrumb.newSpec")}]}})),x(A,()=>E("newSpec.description")),N.addEventListener("submit",k),x(N,f(Rn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:G=>i(G),get disabled(){return l()},get children(){return[f(Li,{class:"mb-1.5 w-full font-medium",get children(){return E("newSpec.type")}}),Z(()=>mT.map(G=>f(an,{get value(){return G.value},class:"flex min-h-[44px] flex-1",get children(){return[f(on,{class:"sr-only"}),f(sn,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===G.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var K=pT();return x(K,()=>E(G.labelKey)),K})(),(()=>{var K=xg();return x(K,()=>E(G.hintKey)),K})()]}})]}})))]}}),R),x(N,f(Vo,{get checked(){return u()},onChange:G=>c(G),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[f(Wo,{}),f(Pi,{class:"cursor-pointer font-medium",get children(){return E("newSpec.parallelWorktree")}}),(()=>{var G=xg();return x(G,()=>E("newSpec.parallelWorktreeDesc")),G})()]}}),R),x(L,()=>E("newSpec.requirement")),x(R,f(ja,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return E("newSpec.requirementPlaceholder")},minRows:10,maxRows:10,required:!0,autofocus:!0,get disabled(){return l()}}),null),js(M,"paste",d.onPaste),x(F,()=>E("newSpec.attachments")),x(O,()=>E("newSpec.attachmentsHint",{count:d.count(),max:jo})),x(D,f(ve,{variant:"outline",size:"sm",type:"button",onClick:()=>b?.click(),get disabled(){return l()||d.count()>=jo},get children(){return[f(z_,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>E("newSpec.importAttachment"))]}}),B),js(B,"change",d.onFileInputChange);var ne=b;return typeof ne=="function"?jn(ne,B):b=B,Be(B,"accept",j1),x(M,f(q,{get when(){return d.count()>0},get children(){return f(Y1,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),x(N,(()=>{var G=Z(()=>!!g());return()=>G()&&(()=>{var K=hT();return x(K,g),K})()})(),null),x(N,f(ve,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[Z(()=>Z(()=>!!l())()?f(Dn,{class:"mr-1 h-4 w-4 animate-spin"}):f(ma,{class:"mr-1 h-4 w-4"})),Z(()=>Z(()=>!!l())()?E("newSpec.creating"):E("newSpec.createAndStart"))]}}),null),T})()};var _g=11;function yT(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===_g||e.nodeType===_g)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var Cs,vT="http://www.w3.org/1999/xhtml",cn=typeof document>"u"?void 0:document,wT=!!cn&&"content"in cn.createElement("template"),xT=!!cn&&cn.createRange&&"createContextualFragment"in cn.createRange();function _T(e){var t=cn.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function ET(e){Cs||(Cs=cn.createRange(),Cs.selectNode(cn.body));var t=Cs.createContextualFragment(e);return t.childNodes[0]}function CT(e){var t=cn.createElement("body");return t.innerHTML=e,t.childNodes[0]}function ST(e){return e=e.trim(),wT?_T(e):xT?ET(e):CT(e)}function Ss(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function kT(e,t){return!t||t===vT?cn.createElement(e):cn.createElementNS(t,e)}function AT(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function mu(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Eg={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}mu(e,t,"selected")},INPUT:function(e,t){mu(e,t,"checked"),mu(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},ui=1,Cg=11,Sg=3,kg=8;function Lr(){}function TT(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function DT(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=cn.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=cn.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=ST(r);else r.nodeType===Cg&&(r=r.firstElementChild);var u=o.getNodeKey||TT,c=o.onBeforeNodeAdded||Lr,l=o.onNodeAdded||Lr,d=o.onBeforeElUpdated||Lr,g=o.onElUpdated||Lr,p=o.onBeforeNodeDiscarded||Lr,h=o.onNodeDiscarded||Lr,m=o.onBeforeElChildrenUpdated||Lr,v=o.skipFromChildren||Lr,y=o.addChild||function(G,K){return G.appendChild(K)},b=o.childrenOnly===!0,w=Object.create(null),_=[];function C(G){_.push(G)}function k(G,K){if(G.nodeType===ui)for(var ce=G.firstChild;ce;){var U=void 0;K&&(U=u(ce))?C(U):(h(ce),ce.firstChild&&k(ce,K)),ce=ce.nextSibling}}function T(G,K,ce){p(G)!==!1&&(K&&K.removeChild(G),h(G),k(G,ce))}function S(G){if(G.nodeType===ui||G.nodeType===Cg)for(var K=G.firstChild;K;){var ce=u(K);ce&&(w[ce]=K),S(K),K=K.nextSibling}}S(n);function A(G){l(G);for(var K=G.firstChild;K;){var ce=K.nextSibling,U=u(K);if(U){var z=w[U];z&&Ss(K,z)?(K.parentNode.replaceChild(z,K),R(z,K)):A(K)}else A(K);K=ce}}function N(G,K,ce){for(;K;){var U=K.nextSibling;(ce=u(K))?C(ce):T(K,G,!0),K=U}}function R(G,K,ce){var U=u(K);if(U&&delete w[U],!ce){var z=d(G,K);if(z===!1||(z instanceof HTMLElement&&(G=z,S(G)),e(G,K),g(G),m(G,K)===!1))return}G.nodeName!=="TEXTAREA"?L(G,K):Eg.TEXTAREA(G,K)}function L(G,K){var ce=v(G,K),U=K.firstChild,z=G.firstChild,V,re,me,W,Y;e:for(;U;){for(W=U.nextSibling,V=u(U);!ce&&z;){if(me=z.nextSibling,U.isSameNode&&U.isSameNode(z)){U=W,z=me;continue e}re=u(z);var ee=z.nodeType,he=void 0;if(ee===U.nodeType&&(ee===ui?(V?V!==re&&((Y=w[V])?me===Y?he=!1:(G.insertBefore(Y,z),re?C(re):T(z,G,!0),z=Y,re=u(z)):he=!1):re&&(he=!1),he=he!==!1&&Ss(z,U),he&&R(z,U)):(ee===Sg||ee==kg)&&(he=!0,z.nodeValue!==U.nodeValue&&(z.nodeValue=U.nodeValue))),he){U=W,z=me;continue e}re?C(re):T(z,G,!0),z=me}if(V&&(Y=w[V])&&Ss(Y,U))ce||y(G,Y),R(Y,U);else{var Q=c(U);Q!==!1&&(Q&&(U=Q),U.actualize&&(U=U.actualize(G.ownerDocument||cn)),y(G,U),A(U))}U=W,z=me}N(G,z,re);var X=Eg[G.nodeName];X&&X(G,K)}var M=n,D=M.nodeType,F=r.nodeType;if(!b){if(D===ui)F===ui?Ss(n,r)||(h(n),M=AT(n,kT(r.nodeName,r.namespaceURI))):M=r;else if(D===Sg||D===kg){if(F===D)return M.nodeValue!==r.nodeValue&&(M.nodeValue=r.nodeValue),M;M=r}}if(M===r)h(n);else{if(r.isSameNode&&r.isSameNode(M))return;if(R(M,r,b),_)for(var O=0,B=_.length;O<B;O++){var ne=w[_[O]];ne&&T(ne,ne.parentNode,!1)}}return!b&&M!==n&&n.parentNode&&(M.actualize&&(M=M.actualize(n.ownerDocument||cn)),n.parentNode.replaceChild(M,n)),M}}var IT=DT(yT);const Ag={};function RT(e){let t=Ag[e];if(t)return t;t=Ag[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Yo(e,t){typeof t!="string"&&(t=Yo.defaultChars);const n=RT(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let d=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}Yo.defaultChars=";/?:@&=+$,#";Yo.componentChars="";const Tg={};function OT(e){let t=Tg[e];if(t)return t;t=Tg[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function rs(e,t,n){typeof t!="string"&&(n=t,t=rs.defaultChars),typeof n>"u"&&(n=!0);const r=OT(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}rs.defaultChars=";/?:@&=+$,-_.!~*'()#";rs.componentChars="-_.!~*'()";function yd(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function ia(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const NT=/^([a-z0-9.+-]+:)/i,MT=/:[0-9]*$/,PT=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,LT=["<",">",'"',"`"," ","\r",`
|
|
7
|
+
`," "],$T=["{","}","|","\\","^","`"].concat(LT),FT=["'"].concat($T),Dg=["%","/","?",";","#"].concat(FT),Ig=["/","?","#"],BT=255,Rg=/^[+a-z0-9A-Z_-]{0,63}$/,zT=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Og={javascript:!0,"javascript:":!0},Ng={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function vd(e,t){if(e&&e instanceof ia)return e;const n=new ia;return n.parse(e,t),n}ia.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=PT.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=NT.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&Og[s])&&(i=i.substr(2),this.slashes=!0)),!Og[s]&&(o||s&&!Ng[s])){let c=-1;for(let h=0;h<Ig.length;h++)r=i.indexOf(Ig[h]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let h=0;h<Dg.length;h++)r=i.indexOf(Dg[h]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const g=i.slice(0,c);i=i.slice(c),this.parseHost(g),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const h=this.hostname.split(/\./);for(let m=0,v=h.length;m<v;m++){const y=h[m];if(y&&!y.match(Rg)){let b="";for(let w=0,_=y.length;w<_;w++)y.charCodeAt(w)>127?b+="x":b+=y[w];if(!b.match(Rg)){const w=h.slice(0,m),_=h.slice(m+1),C=y.match(zT);C&&(w.push(C[1]),_.unshift(C[2])),_.length&&(i=_.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>BT&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),Ng[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ia.prototype.parseHost=function(e){let t=MT.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const UT=Object.freeze(Object.defineProperty({__proto__:null,decode:Yo,encode:rs,format:yd,parse:vd},Symbol.toStringTag,{value:"Module"})),Z1=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,X1=/[\0-\x1F\x7F-\x9F]/,KT=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,wd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,J1=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Q1=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,jT=Object.freeze(Object.defineProperty({__proto__:null,Any:Z1,Cc:X1,Cf:KT,P:wd,S:J1,Z:Q1},Symbol.toStringTag,{value:"Module"})),qT=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),HT=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var bu;const GT=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),VT=(bu=String.fromCodePoint)!==null&&bu!==void 0?bu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function WT(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=GT.get(e))!==null&&t!==void 0?t:e}var Ut;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ut||(Ut={}));const YT=32;var zr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(zr||(zr={}));function hl(e){return e>=Ut.ZERO&&e<=Ut.NINE}function ZT(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_F||e>=Ut.LOWER_A&&e<=Ut.LOWER_F}function XT(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_Z||e>=Ut.LOWER_A&&e<=Ut.LOWER_Z||hl(e)}function JT(e){return e===Ut.EQUALS||XT(e)}var zt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(zt||(zt={}));var kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kr||(kr={}));class QT{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=zt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kr.Strict}startEntity(t){this.decodeMode=t,this.state=zt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case zt.EntityStart:return t.charCodeAt(n)===Ut.NUM?(this.state=zt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=zt.NamedEntity,this.stateNamedEntity(t,n));case zt.NumericStart:return this.stateNumericStart(t,n);case zt.NumericDecimal:return this.stateNumericDecimal(t,n);case zt.NumericHex:return this.stateNumericHex(t,n);case zt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|YT)===Ut.LOWER_X?(this.state=zt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=zt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(hl(o)||ZT(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(hl(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ut.SEMI)this.consumed+=1;else if(this.decodeMode===kr.Strict)return 0;return this.emitCodePoint(WT(this.result),this.consumed),this.errors&&(t!==Ut.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&zr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=eD(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===kr.Attribute&&(i===0||JT(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&zr.VALUE_LENGTH)>>14,i!==0){if(s===Ut.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==kr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&zr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~zr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case zt.NamedEntity:return this.result!==0&&(this.decodeMode!==kr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zt.NumericDecimal:return this.emitNumericEntity(0,2);case zt.NumericHex:return this.emitNumericEntity(0,3);case zt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zt.EntityStart:return 0}}}function ey(e){let t="";const n=new QT(e,r=>t+=VT(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function eD(e,t,n,r){const o=(t&zr.BRANCH_LENGTH)>>7,i=t&zr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const ty=ey(qT);ey(HT);function tD(e,t=kr.Legacy){return ty(e,t)}function nD(e){return ty(e,kr.Strict)}function rD(e){return Object.prototype.toString.call(e)}function xd(e){return rD(e)==="[object String]"}const oD=Object.prototype.hasOwnProperty;function iD(e,t){return oD.call(e,t)}function qa(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function ny(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function _d(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function $i(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const ry=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,sD=/&([a-z#][a-z0-9]{1,31});/gi,aD=new RegExp(ry.source+"|"+sD.source,"gi"),uD=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function cD(e,t){if(t.charCodeAt(0)===35&&uD.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return _d(r)?$i(r):e}const n=tD(e);return n!==e?n:e}function lD(e){return e.indexOf("\\")<0?e:e.replace(ry,"$1")}function Zo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(aD,function(t,n,r){return n||cD(t,r)})}const dD=/[&<>"]/,fD=/[&<>"]/g,gD={"&":"&","<":"<",">":">",'"':"""};function pD(e){return gD[e]}function Wr(e){return dD.test(e)?e.replace(fD,pD):e}const hD=/[.?*+^$[\]\\(){}|-]/g;function mD(e){return e.replace(hD,"\\$&")}function bt(e){switch(e){case 9:case 32:return!0}return!1}function Fi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function oy(e){return wd.test(e)||J1.test(e)}function Bi(e){return oy($i(e))}function zi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ha(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Mg(e){return e===32||e===9||e===10||e===13}function Ga(e){let t=0;for(;t<e.length&&Mg(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Mg(e.charCodeAt(n));n--);return e.slice(t,n+1)}const bD={mdurl:UT,ucmicro:jT},yD=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:ny,asciiTrim:Ga,assign:qa,escapeHtml:Wr,escapeRE:mD,fromCodePoint:$i,has:iD,isMdAsciiPunct:zi,isPunctChar:oy,isPunctCharCode:Bi,isSpace:bt,isString:xd,isValidEntityCode:_d,isWhiteSpace:Fi,lib:bD,normalizeReference:Ha,unescapeAll:Zo,unescapeMd:lD},Symbol.toStringTag,{value:"Module"}));function vD(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function wD(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=Zo(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Zo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function xD(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=Zo(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=Zo(e.slice(t,i)),s}const _D=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:wD,parseLinkLabel:vD,parseLinkTitle:xD},Symbol.toStringTag,{value:"Module"})),br={};br.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+Wr(i.content)+"</code>"};br.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+Wr(e[t].content)+`</code></pre>
|
|
8
|
+
`};br.fence=function(e,t,n,r,o){const i=e[t],s=i.info?Zo(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||Wr(i.content):c=Wr(i.content),c.indexOf("<pre")===0)return c+`
|
|
9
|
+
`;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const g={attrs:d};return`<pre><code${o.renderAttrs(g)}>${c}</code></pre>
|
|
10
|
+
`}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
|
|
11
|
+
`};br.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};br.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
12
|
+
`:`<br>
|
|
13
|
+
`};br.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
14
|
+
`:`<br>
|
|
15
|
+
`:`
|
|
16
|
+
`};br.text=function(e,t){return Wr(e[t].content)};br.html_block=function(e,t){return e[t].content};br.html_inline=function(e,t){return e[t].content};function ni(){this.rules=qa({},br)}ni.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Wr(t.attrs[n][0])+'="'+Wr(t.attrs[n][1])+'"';return o};ni.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
|
|
17
|
+
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
18
|
+
`:">",i};ni.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};ni.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
19
|
+
`;break}return r};ni.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function hn(){this.__rules__=[],this.__cache__=null}hn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};hn.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};hn.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};hn.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};hn.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};hn.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};hn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};hn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};hn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};hn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Vn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Vn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};Vn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Vn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};Vn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Vn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function iy(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}iy.prototype.Token=Vn;const ED=/\r\n?|\n/g,CD=/\0/g;function SD(e){let t;t=e.src.replace(ED,`
|
|
20
|
+
`),t=t.replace(CD,"�"),e.src=t}function kD(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function AD(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function TD(e){return/^<a[>\s]/i.test(e)}function DD(e){return/^<\/a\s*>/i.test(e)}function ID(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(TD(a.content)&&i>0&&i--,DD(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,g=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const h=c[p].url,m=e.md.normalizeLink(h);if(!e.md.validateLink(m))continue;let v=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const y=c[p].index;if(y>g){const C=new e.Token("text","",0);C.content=u.slice(g,y),C.level=d,l.push(C)}const b=new e.Token("link_open","a",1);b.attrs=[["href",m]],b.level=d++,b.markup="linkify",b.info="auto",l.push(b);const w=new e.Token("text","",0);w.content=v,w.level=d,l.push(w);const _=new e.Token("link_close","a",-1);_.level=--d,_.markup="linkify",_.info="auto",l.push(_),g=c[p].lastIndex}if(g<u.length){const p=new e.Token("text","",0);p.content=u.slice(g),p.level=d,l.push(p)}t[n].children=o=ny(o,s,l)}}}}const sy=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,RD=/\((c|tm|r)\)/i,OD=/\((c|tm|r)\)/ig,ND={c:"©",r:"®",tm:"™"};function MD(e,t){return ND[t.toLowerCase()]}function PD(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(OD,MD)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function LD(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&sy.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function $D(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(RD.test(e.tokens[t].content)&&PD(e.tokens[t].children),sy.test(e.tokens[t].content)&&LD(e.tokens[t].children))}const FD=/['"]/,Pg=/['"]/g,Lg="’";function ks(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function BD(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function zD(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){Pg.lastIndex=c;const d=Pg.exec(u);if(!d)break;let g=!0,p=!0;c=d.index+1;const h=d[0]==="'";let m=32;if(d.index-1>=0)m=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(c<l)v=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){v=e[n].content.charCodeAt(0);break}const y=zi(m)||Bi(m),b=zi(v)||Bi(v),w=Fi(m),_=Fi(v);if(_?g=!1:b&&(w||y||(g=!1)),w?p=!1:y&&(_||b||(p=!1)),v===34&&d[0]==='"'&&m>=48&&m<=57&&(p=g=!1),g&&p&&(g=y,p=b),!g&&!p){h&&ks(o,i,d.index,Lg);continue}if(p)for(n=r.length-1;n>=0;n--){let C=r[n];if(r[n].level<a)break;if(C.single===h&&r[n].level===a){C=r[n];let k,T;h?(k=t.md.options.quotes[2],T=t.md.options.quotes[3]):(k=t.md.options.quotes[0],T=t.md.options.quotes[1]),ks(o,i,d.index,T),ks(o,C.token,C.pos,k),r.length=n;continue e}}g?r.push({token:i,pos:d.index,single:h,level:a}):p&&h&&ks(o,i,d.index,Lg)}}Object.keys(o).forEach(function(i){e[i].content=BD(e[i].content,o[i])})}function UD(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!FD.test(e.tokens[t].content)||zD(e.tokens[t].children,e)}function KD(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const yu=[["normalize",SD],["block",kD],["inline",AD],["linkify",ID],["replacements",$D],["smartquotes",UD],["text_join",KD]];function Ed(){this.ruler=new hn;for(let e=0;e<yu.length;e++)this.ruler.push(yu[e][0],yu[e][1])}Ed.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Ed.prototype.State=iy;function yr(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const d=o.charCodeAt(s);if(!l)if(bt(d)){a++,d===9?u+=4-u%4:u++;continue}else l=!0;(d===10||s===c-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}yr.prototype.push=function(e,t,n){const r=new Vn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};yr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};yr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};yr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!bt(r))break}return t};yr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!bt(this.src.charCodeAt(--t)))return t+1;return t};yr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};yr.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};yr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const g=this.src.charCodeAt(l);if(bt(g))g===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};yr.prototype.Token=Vn;const jD=65536;function vu(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function $g(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function qD(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!bt(a)||s===45&&bt(a))return!1;for(;i<e.eMarks[o];){const _=e.src.charCodeAt(i);if(_!==124&&_!==45&&_!==58&&!bt(_))return!1;i++}let u=vu(e,t+1),c=u.split("|");const l=[];for(let _=0;_<c.length;_++){const C=c[_].trim();if(!C){if(_===0||_===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?l.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=vu(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=$g(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const g=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let _=0;_<c.length;_++){const C=e.push("th_open","th",1);l[_]&&(C.attrs=[["style","text-align:"+l[_]]]);const k=e.push("inline","",0);k.content=c[_].trim(),k.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,w=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let _=!1;for(let k=0,T=p.length;k<T;k++)if(p[k](e,o,n,!0)){_=!0;break}if(_||(u=vu(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=$g(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),w+=d-c.length,w>jD))break;if(o===t+2){const k=e.push("tbody_open","tbody",1);k.map=b=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[o,o+1];for(let k=0;k<d;k++){const T=e.push("td_open","td",1);l[k]&&(T.attrs=[["style","text-align:"+l[k]]]);const S=e.push("inline","",0);S.content=c[k]?c[k].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=g,e.line=o,!0}function HD(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
21
|
+
`,i.map=[t,e.line],!0}function GD(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,g=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){g=!0;break}u=e.sCount[t],e.line=d+(g?1:0);const p=e.push("fence","code",0);return p.info=l,p.content=e.getLines(t+1,d,u,!0),p.markup=c,p.map=[t,e.line],!0}function VD(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h<n;h++){const w=e.sCount[h]<e.blkIndent;if(o=e.bMarks[h]+e.tShift[h],i=e.eMarks[h],o>=i)break;if(e.src.charCodeAt(o++)===62&&!w){let C=e.sCount[h]+1,k,T;e.src.charCodeAt(o)===32?(o++,C++,T=!1,k=!0):e.src.charCodeAt(o)===9?(k=!0,(e.bsCount[h]+C)%4===3?(o++,C++,T=!1):T=!0):k=!1;let S=C;for(a.push(e.bMarks[h]),e.bMarks[h]=o;o<i;){const A=e.src.charCodeAt(o);if(bt(A))A===9?S+=4-(S+e.bsCount[h]+(T?1:0))%4:S++;else break;o++}p=o>=i,u.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(k?1:0),c.push(e.sCount[h]),e.sCount[h]=S-C,l.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let _=!1;for(let C=0,k=d.length;C<k;C++)if(d[C](e,h,n,!0)){_=!0;break}if(_){e.lineMax=h,e.blkIndent!==0&&(a.push(e.bMarks[h]),u.push(e.bsCount[h]),l.push(e.tShift[h]),c.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}a.push(e.bMarks[h]),u.push(e.bsCount[h]),l.push(e.tShift[h]),c.push(e.sCount[h]),e.sCount[h]=-1}const m=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const y=[t,0];v.map=y,e.md.block.tokenize(e,t,h);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=s,e.parentType=g,y[1]=e.line;for(let w=0;w<l.length;w++)e.bMarks[w+t]=a[w],e.tShift[w+t]=l[w],e.sCount[w+t]=c[w],e.bsCount[w+t]=u[w];return e.blkIndent=m,!0}function WD(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!bt(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Fg(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!bt(i))return-1}return r}function Bg(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!bt(i))?-1:o}function YD(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function ZD(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,g,p;if((p=Bg(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],g=Number(e.src.slice(s,p-1)),l&&g!==1)return!1}else if((p=Fg(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),g!==1&&(a.attrs=[["start",g]])):a=e.push("bullet_list_open","ul",1);const v=[u,0];a.map=v,a.markup=String.fromCharCode(h);let y=!1;const b=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";u<n;){i=p,o=e.eMarks[u];const _=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let C=_;for(;i<o;){const F=e.src.charCodeAt(i);if(F===9)C+=4-(C+e.bsCount[u])%4;else if(F===32)C++;else break;i++}const k=i;let T;k>=o?T=1:T=C-_,T>4&&(T=1);const S=_+T;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);const A=[u,0];a.map=A,d&&(a.info=e.src.slice(s,p-1));const N=e.tight,R=e.tShift[u],L=e.sCount[u],M=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[u]=k-e.bMarks[u],e.sCount[u]=C,k>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=M,e.tShift[u]=R,e.sCount[u]=L,e.tight=N,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),u=e.line,A[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let D=!1;for(let F=0,O=b.length;F<O;F++)if(b[F](e,u,n,!0)){D=!0;break}if(D)break;if(d){if(p=Bg(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=Fg(e,u),p<0)break;if(h!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(h),v[1]=u,e.line=u,e.parentType=w,c&&YD(e,m),!0}function XD(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(b){const w=e.lineMax;if(b>=w||e.isEmpty(b))return null;let _=!1;if(e.sCount[b]-e.blkIndent>3&&(_=!0),e.sCount[b]<0&&(_=!0),!_){const T=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let A=!1;for(let N=0,R=T.length;N<R;N++)if(T[N](e,b,w,!0)){A=!0;break}if(e.parentType=S,A)return null}const C=e.bMarks[b]+e.tShift[b],k=e.eMarks[b];return e.src.slice(C,k+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const b=u.charCodeAt(o);if(b===91)return!1;if(b===93){c=o;break}else if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(b===92&&(o++,o<i&&u.charCodeAt(o)===10)){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const b=u.charCodeAt(o);if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(!bt(b))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const g=o,p=s,h=o;for(;o<i;o++){const b=u.charCodeAt(o);if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(!bt(b))break}let m=e.md.helpers.parseLinkTitle(u,o,i);for(;m.can_continue;){const b=a(s);if(b===null)break;u+=b,o=i,i=u.length,s++,m=e.md.helpers.parseLinkTitle(u,o,i,m)}let v;for(o<i&&h!==o&&m.ok?(v=m.str,o=m.pos):(v="",o=g,s=p);o<i;){const b=u.charCodeAt(o);if(!bt(b))break;o++}if(o<i&&u.charCodeAt(o)!==10&&v)for(v="",o=g,s=p;o<i;){const b=u.charCodeAt(o);if(!bt(b))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=Ha(u.slice(1,c));return y?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:v,href:d}),e.line=s),!0):!1}const JD=["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"],QD="[a-zA-Z_:][a-zA-Z0-9:._-]*",eI="[^\"'=<>`\\x00-\\x20]+",tI="'[^']*'",nI='"[^"]*"',rI="(?:"+eI+"|"+tI+"|"+nI+")",oI="(?:\\s+"+QD+"(?:\\s*=\\s*"+rI+")?)",ay="<[A-Za-z][A-Za-z0-9\\-]*"+oI+"*\\s*\\/?>",uy="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",iI="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",sI="<[?][\\s\\S]*?[?]>",aI="<![A-Za-z][^>]*>",uI="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",cI=new RegExp("^(?:"+ay+"|"+uy+"|"+iI+"|"+sI+"|"+aI+"|"+uI+")"),lI=new RegExp("^(?:"+ay+"|"+uy+")"),so=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+JD.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(lI.source+"\\s*$"),/^$/,!1]];function dI(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<so.length&&!so[a][0].test(s);a++);if(a===so.length)return!1;if(r)return so[a][2];let u=t+1;const c=so[a][1].test("");if(!so[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),so[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function fI(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!bt(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&bt(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Ga(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function gI(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const h=e.eMarks[a];if(p<h&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=h))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let g=!1;for(let p=0,h=r.length;p<h;p++)if(r[p](e,a,n,!0)){g=!0;break}if(g)break}if(!i)return e.parentType=o,!1;const u=Ga(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function pI(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Ga(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const As=[["table",qD,["paragraph","reference"]],["code",HD],["fence",GD,["paragraph","reference","blockquote","list"]],["blockquote",VD,["paragraph","reference","blockquote","list"]],["hr",WD,["paragraph","reference","blockquote","list"]],["list",ZD,["paragraph","reference","blockquote"]],["reference",XD],["html_block",dI,["paragraph","reference","blockquote"]],["heading",fI,["paragraph","reference","blockquote"]],["lheading",gI],["paragraph",pI]];function Va(){this.ruler=new hn;for(let e=0;e<As.length;e++)this.ruler.push(As[e][0],As[e][1],{alt:(As[e][2]||[]).slice()})}Va.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Va.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};Va.prototype.State=yr;function os(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}os.prototype.pushPending=function(){const e=new Vn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};os.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Vn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};os.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const v=this.src.charCodeAt(e-2);o=(v&64512)===55296?65536+(v-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const v=this.src.charCodeAt(i+1);a=(v&64512)===56320?65536+(a-55296<<10)+(v-56320):65533}else(a&64512)===56320&&(a=65533);const u=zi(o)||Bi(o),c=zi(a)||Bi(a),l=Fi(o),d=Fi(a),g=!d&&(!c||l||u),p=!l&&(!u||d||c);return{can_open:g&&(t||!p||u),can_close:p&&(t||!g||c),length:s}};os.prototype.Token=Vn;function hI(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function mI(e,t){let n=e.pos;for(;n<e.posMax&&!hI(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const bI=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function yI(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(bI);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=a.length-i.length,!0}function vI(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&bt(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Cd=[];for(let e=0;e<256;e++)Cd.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Cd[e.charCodeAt(0)]=1});function wI(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!bt(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&Cd[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function xI(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function _I(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function zg(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function EI(e){const t=e.tokens_meta,n=e.tokens_meta.length;zg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&zg(e,t[r].delimiters)}const cy={tokenize:_I,postProcess:EI};function CI(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Ug(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function SI(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ug(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ug(e,t[r].delimiters)}const ly={tokenize:CI,postProcess:SI};function kI(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,g=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&e.src.charCodeAt(h)===40){for(c=!1,h++;h<d&&(n=e.src.charCodeAt(h),!(!bt(n)&&n!==10));h++);if(h>=d)return!1;if(u=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",u=h;h<d&&(n=e.src.charCodeAt(h),!(!bt(n)&&n!==10));h++);if(o=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&u!==h&&o.ok)for(a=o.str,h=o.pos;h<d&&(n=e.src.charCodeAt(h),!(!bt(n)&&n!==10));h++);}(h>=d||e.src.charCodeAt(h)!==41)&&(c=!0),h++}if(c){if(typeof e.env.references>"u")return!1;if(h<d&&e.src.charCodeAt(h)===91?(u=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?r=e.src.slice(u,h++):h=p+1):h=p+1,r||(r=e.src.slice(g,p)),i=e.env.references[Ha(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=g,e.posMax=p;const m=e.push("link_open","a",1),v=[["href",s]];m.attrs=v,a&&v.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function AI(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(n=e.src.charCodeAt(i),!(!bt(n)&&n!==10));i++);if(i>=g)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<g&&(n=e.src.charCodeAt(i),!(!bt(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<g&&(n=e.src.charCodeAt(i),!(!bt(n)&&n!==10));i++);else u="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Ha(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(p,h);const m=[];e.md.inline.parse(r,e.md,e.env,m);const v=e.push("image","img",0),y=[["src",l],["alt",""]];v.attrs=y,v.children=m,v.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=g,!0}const TI=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,DI=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function II(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(DI.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(TI.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function RI(e){return/^<a[>\s]/i.test(e)}function OI(e){return/^<\/a\s*>/i.test(e)}function NI(e){const t=e|32;return t>=97&&t<=122}function MI(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!NI(o))return!1;const i=e.src.slice(r).match(cI);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],RI(s.content)&&e.linkLevel++,OI(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const PI=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,LI=/^&([a-z][a-z0-9]{1,31});/i;function $I(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(PI);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=_d(s)?$i(s):$i(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(LI);if(i){const s=nD(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function Kg(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let g=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(g=!0),!g){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+p,i[c]=p,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function FI(e){const t=e.tokens_meta,n=e.tokens_meta.length;Kg(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Kg(t[r].delimiters)}function BI(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const wu=[["text",mI],["linkify",yI],["newline",vI],["escape",wI],["backticks",xI],["strikethrough",cy.tokenize],["emphasis",ly.tokenize],["link",kI],["image",AI],["autolink",II],["html_inline",MI],["entity",$I]],xu=[["balance_pairs",FI],["strikethrough",cy.postProcess],["emphasis",ly.postProcess],["fragments_join",BI]];function is(){this.ruler=new hn;for(let e=0;e<wu.length;e++)this.ruler.push(wu[e][0],wu[e][1]);this.ruler2=new hn;for(let e=0;e<xu.length;e++)this.ruler2.push(xu[e][0],xu[e][1])}is.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};is.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};is.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};is.prototype.State=os;function zI(e){const t={};e=e||{},t.src_Any=Z1.source,t.src_Cc=X1.source,t.src_Z=Q1.source,t.src_P=wd.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function ml(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Wa(e){return Object.prototype.toString.call(e)}function UI(e){return Wa(e)==="[object String]"}function KI(e){return Wa(e)==="[object Object]"}function jI(e){return Wa(e)==="[object RegExp]"}function jg(e){return Wa(e)==="[object Function]"}function qI(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const dy={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function HI(e){return Object.keys(e||{}).reduce(function(t,n){return t||dy.hasOwnProperty(n)},!1)}const GI={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},VI="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",WI="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function YI(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function qg(){return function(e,t){t.normalize(e)}}function sa(e){const t=e.re=zI(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(VI),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,KI(u)){jI(u.validate)?c.validate=YI(u.validate):jg(u.validate)?c.validate=u.validate:i(a,u),jg(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=qg();return}if(UI(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:qg()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(qI).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function fy(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function Sn(e,t){if(!(this instanceof Sn))return new Sn(e,t);t||HI(e)&&(t=e,e={}),this.__opts__=ml({},dy,t),this.__schemas__=ml({},GI,e),this.__compiled__={},this.__tlds__=WI,this.__tlds_replaced__=!1,this.re={},sa(this)}Sn.prototype.add=function(t,n){return this.__schemas__[t]=n,sa(this),this};Sn.prototype.set=function(t){return this.__opts__=ml(this.__opts__,t),this};Sn.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Sn.prototype.pretest=function(t){return this.re.pretest.test(t)};Sn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Sn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(g,p){return g?p?g.index!==p.index?g.index<p.index?g:p:g.lastIndex>=p.lastIndex?g:p:g:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const g=[r[l[0]],i[l[1]],o[l[2]]],p=c(c(g[0],g[1]),g[2]);if(!p)break;if(p===g[0]?l[0]++:p===g[1]?l[1]++:l[2]++,p.index<d)continue;const h=new fy(t,p.schema,p.index,p.lastIndex);this.__compiled__[h.schema].normalize(h,this),n.push(h),d=p.lastIndex}return n.length?n:null};Sn.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new fy(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};Sn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),sa(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,sa(this),this)};Sn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Sn.prototype.onCompile=function(){};const qo=2147483647,nr=36,Sd=1,Ui=26,ZI=38,XI=700,gy=72,py=128,hy="-",JI=/^xn--/,QI=/[^\0-\x7F]/,e6=/[\x2E\u3002\uFF0E\uFF61]/g,t6={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_u=nr-Sd,rr=Math.floor,Eu=String.fromCharCode;function Br(e){throw new RangeError(t6[e])}function n6(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function my(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(e6,".");const o=e.split("."),i=n6(o,t).join(".");return r+i}function by(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const r6=e=>String.fromCodePoint(...e),o6=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:nr},Hg=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},yy=function(e,t,n){let r=0;for(e=n?rr(e/XI):e>>1,e+=rr(e/t);e>_u*Ui>>1;r+=nr)e=rr(e/_u);return rr(r+(_u+1)*e/(e+ZI))},vy=function(e){const t=[],n=e.length;let r=0,o=py,i=gy,s=e.lastIndexOf(hy);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Br("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=nr;;d+=nr){a>=n&&Br("invalid-input");const g=o6(e.charCodeAt(a++));g>=nr&&Br("invalid-input"),g>rr((qo-r)/l)&&Br("overflow"),r+=g*l;const p=d<=i?Sd:d>=i+Ui?Ui:d-i;if(g<p)break;const h=nr-p;l>rr(qo/h)&&Br("overflow"),l*=h}const c=t.length+1;i=yy(r-u,c,u==0),rr(r/c)>qo-o&&Br("overflow"),o+=rr(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},wy=function(e){const t=[];e=by(e);const n=e.length;let r=py,o=0,i=gy;for(const u of e)u<128&&t.push(Eu(u));const s=t.length;let a=s;for(s&&t.push(hy);a<n;){let u=qo;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>rr((qo-o)/c)&&Br("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>qo&&Br("overflow"),l===r){let d=o;for(let g=nr;;g+=nr){const p=g<=i?Sd:g>=i+Ui?Ui:g-i;if(d<p)break;const h=d-p,m=nr-p;t.push(Eu(Hg(p+h%m,0))),d=rr(h/m)}t.push(Eu(Hg(d,0))),i=yy(o,c,a===s),o=0,++a}++o,++r}return t.join("")},i6=function(e){return my(e,function(t){return JI.test(t)?vy(t.slice(4).toLowerCase()):t})},s6=function(e){return my(e,function(t){return QI.test(t)?"xn--"+wy(t):t})},xy={version:"2.3.1",ucs2:{decode:by,encode:r6},decode:vy,encode:wy,toASCII:s6,toUnicode:i6},a6={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},u6={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},c6={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},l6={default:a6,zero:u6,commonmark:c6},d6=/^(vbscript|javascript|file|data):/,f6=/^data:image\/(gif|png|jpeg|webp);/;function g6(e){const t=e.trim().toLowerCase();return d6.test(t)?f6.test(t):!0}const _y=["http:","https:","mailto:"];function p6(e){const t=vd(e,!0);if(t.hostname&&(!t.protocol||_y.indexOf(t.protocol)>=0))try{t.hostname=xy.toASCII(t.hostname)}catch{}return rs(yd(t))}function h6(e){const t=vd(e,!0);if(t.hostname&&(!t.protocol||_y.indexOf(t.protocol)>=0))try{t.hostname=xy.toUnicode(t.hostname)}catch{}return Yo(yd(t),Yo.defaultChars+"%")}function Mn(e,t){if(!(this instanceof Mn))return new Mn(e,t);t||xd(e)||(t=e||{},e="default"),this.inline=new is,this.block=new Va,this.core=new Ed,this.renderer=new ni,this.linkify=new Sn,this.validateLink=g6,this.normalizeLink=p6,this.normalizeLinkText=h6,this.utils=yD,this.helpers=qa({},_D),this.options={},this.configure(e),t&&this.set(t)}Mn.prototype.set=function(e){return qa(this.options,e),this};Mn.prototype.configure=function(e){const t=this;if(xd(e)){const n=e;if(e=l6[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Mn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Mn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Mn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Mn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Mn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Mn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Mn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cu,Gg;function m6(){if(Gg)return Cu;Gg=1;var e=!0,t=!1,n=!1;Cu=function(m,v){v&&(e=!v.enabled,t=!!v.label,n=!!v.labelAfter),m.core.ruler.after("inline","github-task-lists",function(y){for(var b=y.tokens,w=2;w<b.length;w++)i(b,w)&&(s(b[w],y.Token),r(b[w-2],"class","task-list-item"+(e?"":" enabled")),r(b[o(b,w-2)],"class","contains-task-list"))})};function r(m,v,y){var b=m.attrIndex(v),w=[v,y];b<0?m.attrPush(w):m.attrs[b]=w}function o(m,v){for(var y=m[v].level-1,b=v-1;b>=0;b--)if(m[b].level===y)return b;return-1}function i(m,v){return d(m[v])&&g(m[v-1])&&p(m[v-2])&&h(m[v])}function s(m,v){if(m.children.unshift(a(m,v)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),t)if(n){m.children.pop();var y="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+y+'">',m.children.push(l(m.content,y,v))}else m.children.unshift(u(v)),m.children.push(c(v))}function a(m,v){var y=new v("html_inline","",0),b=e?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?y.content='<input class="task-list-item-checkbox"'+b+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(y.content='<input class="task-list-item-checkbox" checked=""'+b+'type="checkbox">'),y}function u(m){var v=new m("html_inline","",0);return v.content="<label>",v}function c(m){var v=new m("html_inline","",0);return v.content="</label>",v}function l(m,v,y){var b=new y("html_inline","",0);return b.content='<label class="task-list-item-label" for="'+v+'">'+m+"</label>",b.attrs=[{for:v}],b}function d(m){return m.type==="inline"}function g(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function h(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return Cu}var b6=m6();const y6=ss(b6);var Su,Vg;function v6(){if(Vg)return Su;Vg=1;function e(P){return P instanceof Map?P.clear=P.delete=P.set=function(){throw new Error("map is read-only")}:P instanceof Set&&(P.add=P.clear=P.delete=function(){throw new Error("set is read-only")}),Object.freeze(P),Object.getOwnPropertyNames(P).forEach(oe=>{const be=P[oe],Ue=typeof be;(Ue==="object"||Ue==="function")&&!Object.isFrozen(be)&&e(be)}),P}class t{constructor(oe){oe.data===void 0&&(oe.data={}),this.data=oe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(P){return P.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(P,...oe){const be=Object.create(null);for(const Ue in P)be[Ue]=P[Ue];return oe.forEach(function(Ue){for(const Ct in Ue)be[Ct]=Ue[Ct]}),be}const o="</span>",i=P=>!!P.scope,s=(P,{prefix:oe})=>{if(P.startsWith("language:"))return P.replace("language:","language-");if(P.includes(".")){const be=P.split(".");return[`${oe}${be.shift()}`,...be.map((Ue,Ct)=>`${Ue}${"_".repeat(Ct+1)}`)].join(" ")}return`${oe}${P}`};class a{constructor(oe,be){this.buffer="",this.classPrefix=be.classPrefix,oe.walk(this)}addText(oe){this.buffer+=n(oe)}openNode(oe){if(!i(oe))return;const be=s(oe.scope,{prefix:this.classPrefix});this.span(be)}closeNode(oe){i(oe)&&(this.buffer+=o)}value(){return this.buffer}span(oe){this.buffer+=`<span class="${oe}">`}}const u=(P={})=>{const oe={children:[]};return Object.assign(oe,P),oe};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(oe){this.top.children.push(oe)}openNode(oe){const be=u({scope:oe});this.add(be),this.stack.push(be)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(oe){return this.constructor._walk(oe,this.rootNode)}static _walk(oe,be){return typeof be=="string"?oe.addText(be):be.children&&(oe.openNode(be),be.children.forEach(Ue=>this._walk(oe,Ue)),oe.closeNode(be)),oe}static _collapse(oe){typeof oe!="string"&&oe.children&&(oe.children.every(be=>typeof be=="string")?oe.children=[oe.children.join("")]:oe.children.forEach(be=>{c._collapse(be)}))}}class l extends c{constructor(oe){super(),this.options=oe}addText(oe){oe!==""&&this.add(oe)}startScope(oe){this.openNode(oe)}endScope(){this.closeNode()}__addSublanguage(oe,be){const Ue=oe.root;be&&(Ue.scope=`language:${be}`),this.add(Ue)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(P){return P?typeof P=="string"?P:P.source:null}function g(P){return m("(?=",P,")")}function p(P){return m("(?:",P,")*")}function h(P){return m("(?:",P,")?")}function m(...P){return P.map(be=>d(be)).join("")}function v(P){const oe=P[P.length-1];return typeof oe=="object"&&oe.constructor===Object?(P.splice(P.length-1,1),oe):{}}function y(...P){return"("+(v(P).capture?"":"?:")+P.map(Ue=>d(Ue)).join("|")+")"}function b(P){return new RegExp(P.toString()+"|").exec("").length-1}function w(P,oe){const be=P&&P.exec(oe);return be&&be.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(P,{joinWith:oe}){let be=0;return P.map(Ue=>{be+=1;const Ct=be;let St=d(Ue),De="";for(;St.length>0;){const j=_.exec(St);if(!j){De+=St;break}De+=St.substring(0,j.index),St=St.substring(j.index+j[0].length),j[0][0]==="\\"&&j[1]?De+="\\"+String(Number(j[1])+Ct):(De+=j[0],j[0]==="("&&be++)}return De}).map(Ue=>`(${Ue})`).join(oe)}const k=/\b\B/,T="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",A="\\b\\d+(\\.\\d+)?",N="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",R="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(P={})=>{const oe=/^#![ ]*\//;return P.binary&&(P.begin=m(oe,/.*\b/,P.binary,/\b.*/)),r({scope:"meta",begin:oe,end:/$/,relevance:0,"on:begin":(be,Ue)=>{be.index!==0&&Ue.ignoreMatch()}},P)},D={begin:"\\\\[\\s\\S]",relevance:0},F={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[D]},O={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[D]},B={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(P,oe,be={}){const Ue=r({scope:"comment",begin:P,end:oe,contains:[]},be);Ue.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ct=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ue.contains.push({begin:m(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ue},G=ne("//","$"),K=ne("/\\*","\\*/"),ce=ne("#","$"),U={scope:"number",begin:A,relevance:0},z={scope:"number",begin:N,relevance:0},V={scope:"number",begin:R,relevance:0},re={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[D,{begin:/\[/,end:/\]/,relevance:0,contains:[D]}]},me={scope:"title",begin:T,relevance:0},W={scope:"title",begin:S,relevance:0},Y={begin:"\\.\\s*"+S,relevance:0};var he=Object.freeze({__proto__:null,APOS_STRING_MODE:F,BACKSLASH_ESCAPE:D,BINARY_NUMBER_MODE:V,BINARY_NUMBER_RE:R,COMMENT:ne,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:G,C_NUMBER_MODE:z,C_NUMBER_RE:N,END_SAME_AS_BEGIN:function(P){return Object.assign(P,{"on:begin":(oe,be)=>{be.data._beginMatch=oe[1]},"on:end":(oe,be)=>{be.data._beginMatch!==oe[1]&&be.ignoreMatch()}})},HASH_COMMENT_MODE:ce,IDENT_RE:T,MATCH_NOTHING_RE:k,METHOD_GUARD:Y,NUMBER_MODE:U,NUMBER_RE:A,PHRASAL_WORDS_MODE:B,QUOTE_STRING_MODE:O,REGEXP_MODE:re,RE_STARTERS_RE:L,SHEBANG:M,TITLE_MODE:me,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:W});function Q(P,oe){P.input[P.index-1]==="."&&oe.ignoreMatch()}function X(P,oe){P.className!==void 0&&(P.scope=P.className,delete P.className)}function te(P,oe){oe&&P.beginKeywords&&(P.begin="\\b("+P.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",P.__beforeBegin=Q,P.keywords=P.keywords||P.beginKeywords,delete P.beginKeywords,P.relevance===void 0&&(P.relevance=0))}function le(P,oe){Array.isArray(P.illegal)&&(P.illegal=y(...P.illegal))}function Ae(P,oe){if(P.match){if(P.begin||P.end)throw new Error("begin & end are not supported with match");P.begin=P.match,delete P.match}}function ct(P,oe){P.relevance===void 0&&(P.relevance=1)}const yt=(P,oe)=>{if(!P.beforeMatch)return;if(P.starts)throw new Error("beforeMatch cannot be used with starts");const be=Object.assign({},P);Object.keys(P).forEach(Ue=>{delete P[Ue]}),P.keywords=be.keywords,P.begin=m(be.beforeMatch,g(be.begin)),P.starts={relevance:0,contains:[Object.assign(be,{endsParent:!0})]},P.relevance=0,delete be.beforeMatch},Ge=["of","and","for","in","not","or","if","then","parent","list","value"],Fe="keyword";function Et(P,oe,be=Fe){const Ue=Object.create(null);return typeof P=="string"?Ct(be,P.split(" ")):Array.isArray(P)?Ct(be,P):Object.keys(P).forEach(function(St){Object.assign(Ue,Et(P[St],oe,St))}),Ue;function Ct(St,De){oe&&(De=De.map(j=>j.toLowerCase())),De.forEach(function(j){const ue=j.split("|");Ue[ue[0]]=[St,Ze(ue[0],ue[1])]})}}function Ze(P,oe){return oe?Number(oe):en(P)?0:1}function en(P){return Ge.includes(P.toLowerCase())}const it={},Kt=P=>{console.error(P)},jt=(P,...oe)=>{console.log(`WARN: ${P}`,...oe)},Ft=(P,oe)=>{it[`${P}/${oe}`]||(console.log(`Deprecated as of ${P}. ${oe}`),it[`${P}/${oe}`]=!0)},$n=new Error;function vr(P,oe,{key:be}){let Ue=0;const Ct=P[be],St={},De={};for(let j=1;j<=oe.length;j++)De[j+Ue]=Ct[j],St[j+Ue]=!0,Ue+=b(oe[j-1]);P[be]=De,P[be]._emit=St,P[be]._multi=!0}function fe(P){if(Array.isArray(P.begin)){if(P.skip||P.excludeBegin||P.returnBegin)throw Kt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),$n;if(typeof P.beginScope!="object"||P.beginScope===null)throw Kt("beginScope must be object"),$n;vr(P,P.begin,{key:"beginScope"}),P.begin=C(P.begin,{joinWith:""})}}function _e(P){if(Array.isArray(P.end)){if(P.skip||P.excludeEnd||P.returnEnd)throw Kt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),$n;if(typeof P.endScope!="object"||P.endScope===null)throw Kt("endScope must be object"),$n;vr(P,P.end,{key:"endScope"}),P.end=C(P.end,{joinWith:""})}}function Re(P){P.scope&&typeof P.scope=="object"&&P.scope!==null&&(P.beginScope=P.scope,delete P.scope)}function pt(P){Re(P),typeof P.beginScope=="string"&&(P.beginScope={_wrap:P.beginScope}),typeof P.endScope=="string"&&(P.endScope={_wrap:P.endScope}),fe(P),_e(P)}function mn(P){function oe(De,j){return new RegExp(d(De),"m"+(P.case_insensitive?"i":"")+(P.unicodeRegex?"u":"")+(j?"g":""))}class be{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(j,ue){ue.position=this.position++,this.matchIndexes[this.matchAt]=ue,this.regexes.push([ue,j]),this.matchAt+=b(j)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const j=this.regexes.map(ue=>ue[1]);this.matcherRe=oe(C(j,{joinWith:"|"}),!0),this.lastIndex=0}exec(j){this.matcherRe.lastIndex=this.lastIndex;const ue=this.matcherRe.exec(j);if(!ue)return null;const ge=ue.findIndex((Dt,Nt)=>Nt>0&&Dt!==void 0),$e=this.matchIndexes[ge];return ue.splice(0,ge),Object.assign(ue,$e)}}class Ue{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(j){if(this.multiRegexes[j])return this.multiRegexes[j];const ue=new be;return this.rules.slice(j).forEach(([ge,$e])=>ue.addRule(ge,$e)),ue.compile(),this.multiRegexes[j]=ue,ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(j,ue){this.rules.push([j,ue]),ue.type==="begin"&&this.count++}exec(j){const ue=this.getMatcher(this.regexIndex);ue.lastIndex=this.lastIndex;let ge=ue.exec(j);if(this.resumingScanAtSamePosition()&&!(ge&&ge.index===this.lastIndex)){const $e=this.getMatcher(0);$e.lastIndex=this.lastIndex+1,ge=$e.exec(j)}return ge&&(this.regexIndex+=ge.position+1,this.regexIndex===this.count&&this.considerAll()),ge}}function Ct(De){const j=new Ue;return De.contains.forEach(ue=>j.addRule(ue.begin,{rule:ue,type:"begin"})),De.terminatorEnd&&j.addRule(De.terminatorEnd,{type:"end"}),De.illegal&&j.addRule(De.illegal,{type:"illegal"}),j}function St(De,j){const ue=De;if(De.isCompiled)return ue;[X,Ae,pt,yt].forEach($e=>$e(De,j)),P.compilerExtensions.forEach($e=>$e(De,j)),De.__beforeBegin=null,[te,le,ct].forEach($e=>$e(De,j)),De.isCompiled=!0;let ge=null;return typeof De.keywords=="object"&&De.keywords.$pattern&&(De.keywords=Object.assign({},De.keywords),ge=De.keywords.$pattern,delete De.keywords.$pattern),ge=ge||/\w+/,De.keywords&&(De.keywords=Et(De.keywords,P.case_insensitive)),ue.keywordPatternRe=oe(ge,!0),j&&(De.begin||(De.begin=/\B|\b/),ue.beginRe=oe(ue.begin),!De.end&&!De.endsWithParent&&(De.end=/\B|\b/),De.end&&(ue.endRe=oe(ue.end)),ue.terminatorEnd=d(ue.end)||"",De.endsWithParent&&j.terminatorEnd&&(ue.terminatorEnd+=(De.end?"|":"")+j.terminatorEnd)),De.illegal&&(ue.illegalRe=oe(De.illegal)),De.contains||(De.contains=[]),De.contains=[].concat(...De.contains.map(function($e){return Je($e==="self"?De:$e)})),De.contains.forEach(function($e){St($e,ue)}),De.starts&&St(De.starts,j),ue.matcher=Ct(ue),ue}if(P.compilerExtensions||(P.compilerExtensions=[]),P.contains&&P.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return P.classNameAliases=r(P.classNameAliases||{}),St(P)}function Ee(P){return P?P.endsWithParent||Ee(P.starts):!1}function Je(P){return P.variants&&!P.cachedVariants&&(P.cachedVariants=P.variants.map(function(oe){return r(P,{variants:null},oe)})),P.cachedVariants?P.cachedVariants:Ee(P)?r(P,{starts:P.starts?r(P.starts):null}):Object.isFrozen(P)?r(P):P}var tn="11.11.1";class kt extends Error{constructor(oe,be){super(oe),this.name="HTMLInjectionError",this.html=be}}const Ot=n,nn=r,Xe=Symbol("nomatch"),bn=7,Bt=function(P){const oe=Object.create(null),be=Object.create(null),Ue=[];let Ct=!0;const St="Could not find the language '{}', did you forget to load/include a language module?",De={disableAutodetect:!0,name:"Plain text",contains:[]};let j={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function ue(pe){return j.noHighlightRe.test(pe)}function ge(pe){let Pe=pe.className+" ";Pe+=pe.parentNode?pe.parentNode.className:"";const Qe=j.languageDetectRe.exec(Pe);if(Qe){const ht=Fn(Qe[1]);return ht||(jt(St.replace("{}",Qe[1])),jt("Falling back to no-highlight mode for this block.",pe)),ht?Qe[1]:"no-highlight"}return Pe.split(/\s+/).find(ht=>ue(ht)||Fn(ht))}function $e(pe,Pe,Qe){let ht="",Mt="";typeof Pe=="object"?(ht=pe,Qe=Pe.ignoreIllegals,Mt=Pe.language):(Ft("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ft("10.7.0",`Please use highlight(code, options) instead.
|
|
22
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Mt=pe,ht=Pe),Qe===void 0&&(Qe=!0);const Bn={code:ht,language:Mt};ds("before:highlight",Bn);const Mr=Bn.result?Bn.result:Dt(Bn.language,Bn.code,Qe);return Mr.code=Bn.code,ds("after:highlight",Mr),Mr}function Dt(pe,Pe,Qe,ht){const Mt=Object.create(null);function Bn(we,Ne){return we.keywords[Ne]}function Mr(){if(!qe.keywords){Ht.addText(mt);return}let we=0;qe.keywordPatternRe.lastIndex=0;let Ne=qe.keywordPatternRe.exec(mt),Ve="";for(;Ne;){Ve+=mt.substring(we,Ne.index);const at=Zn.case_insensitive?Ne[0].toLowerCase():Ne[0],Vt=Bn(qe,at);if(Vt){const[wr,sv]=Vt;if(Ht.addText(Ve),Ve="",Mt[at]=(Mt[at]||0)+1,Mt[at]<=bn&&(ps+=sv),wr.startsWith("_"))Ve+=Ne[0];else{const av=Zn.classNameAliases[wr]||wr;Yn(Ne[0],av)}}else Ve+=Ne[0];we=qe.keywordPatternRe.lastIndex,Ne=qe.keywordPatternRe.exec(mt)}Ve+=mt.substring(we),Ht.addText(Ve)}function fs(){if(mt==="")return;let we=null;if(typeof qe.subLanguage=="string"){if(!oe[qe.subLanguage]){Ht.addText(mt);return}we=Dt(qe.subLanguage,mt,!0,$d[qe.subLanguage]),$d[qe.subLanguage]=we._top}else we=qt(mt,qe.subLanguage.length?qe.subLanguage:null);qe.relevance>0&&(ps+=we.relevance),Ht.__addSublanguage(we._emitter,we.language)}function vn(){qe.subLanguage!=null?fs():Mr(),mt=""}function Yn(we,Ne){we!==""&&(Ht.startScope(Ne),Ht.addText(we),Ht.endScope())}function Nd(we,Ne){let Ve=1;const at=Ne.length-1;for(;Ve<=at;){if(!we._emit[Ve]){Ve++;continue}const Vt=Zn.classNameAliases[we[Ve]]||we[Ve],wr=Ne[Ve];Vt?Yn(wr,Vt):(mt=wr,Mr(),mt=""),Ve++}}function Md(we,Ne){return we.scope&&typeof we.scope=="string"&&Ht.openNode(Zn.classNameAliases[we.scope]||we.scope),we.beginScope&&(we.beginScope._wrap?(Yn(mt,Zn.classNameAliases[we.beginScope._wrap]||we.beginScope._wrap),mt=""):we.beginScope._multi&&(Nd(we.beginScope,Ne),mt="")),qe=Object.create(we,{parent:{value:qe}}),qe}function Pd(we,Ne,Ve){let at=w(we.endRe,Ve);if(at){if(we["on:end"]){const Vt=new t(we);we["on:end"](Ne,Vt),Vt.isMatchIgnored&&(at=!1)}if(at){for(;we.endsParent&&we.parent;)we=we.parent;return we}}if(we.endsWithParent)return Pd(we.parent,Ne,Ve)}function tv(we){return qe.matcher.regexIndex===0?(mt+=we[0],1):(Qa=!0,0)}function nv(we){const Ne=we[0],Ve=we.rule,at=new t(Ve),Vt=[Ve.__beforeBegin,Ve["on:begin"]];for(const wr of Vt)if(wr&&(wr(we,at),at.isMatchIgnored))return tv(Ne);return Ve.skip?mt+=Ne:(Ve.excludeBegin&&(mt+=Ne),vn(),!Ve.returnBegin&&!Ve.excludeBegin&&(mt=Ne)),Md(Ve,we),Ve.returnBegin?0:Ne.length}function rv(we){const Ne=we[0],Ve=Pe.substring(we.index),at=Pd(qe,we,Ve);if(!at)return Xe;const Vt=qe;qe.endScope&&qe.endScope._wrap?(vn(),Yn(Ne,qe.endScope._wrap)):qe.endScope&&qe.endScope._multi?(vn(),Nd(qe.endScope,we)):Vt.skip?mt+=Ne:(Vt.returnEnd||Vt.excludeEnd||(mt+=Ne),vn(),Vt.excludeEnd&&(mt=Ne));do qe.scope&&Ht.closeNode(),!qe.skip&&!qe.subLanguage&&(ps+=qe.relevance),qe=qe.parent;while(qe!==at.parent);return at.starts&&Md(at.starts,we),Vt.returnEnd?0:Ne.length}function ov(){const we=[];for(let Ne=qe;Ne!==Zn;Ne=Ne.parent)Ne.scope&&we.unshift(Ne.scope);we.forEach(Ne=>Ht.openNode(Ne))}let gs={};function Ld(we,Ne){const Ve=Ne&&Ne[0];if(mt+=we,Ve==null)return vn(),0;if(gs.type==="begin"&&Ne.type==="end"&&gs.index===Ne.index&&Ve===""){if(mt+=Pe.slice(Ne.index,Ne.index+1),!Ct){const at=new Error(`0 width match regex (${pe})`);throw at.languageName=pe,at.badRule=gs.rule,at}return 1}if(gs=Ne,Ne.type==="begin")return nv(Ne);if(Ne.type==="illegal"&&!Qe){const at=new Error('Illegal lexeme "'+Ve+'" for mode "'+(qe.scope||"<unnamed>")+'"');throw at.mode=qe,at}else if(Ne.type==="end"){const at=rv(Ne);if(at!==Xe)return at}if(Ne.type==="illegal"&&Ve==="")return mt+=`
|
|
23
|
+
`,1;if(Ja>1e5&&Ja>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return mt+=Ve,Ve.length}const Zn=Fn(pe);if(!Zn)throw Kt(St.replace("{}",pe)),new Error('Unknown language: "'+pe+'"');const iv=mn(Zn);let Xa="",qe=ht||iv;const $d={},Ht=new j.__emitter(j);ov();let mt="",ps=0,no=0,Ja=0,Qa=!1;try{if(Zn.__emitTokens)Zn.__emitTokens(Pe,Ht);else{for(qe.matcher.considerAll();;){Ja++,Qa?Qa=!1:qe.matcher.considerAll(),qe.matcher.lastIndex=no;const we=qe.matcher.exec(Pe);if(!we)break;const Ne=Pe.substring(no,we.index),Ve=Ld(Ne,we);no=we.index+Ve}Ld(Pe.substring(no))}return Ht.finalize(),Xa=Ht.toHTML(),{language:pe,value:Xa,relevance:ps,illegal:!1,_emitter:Ht,_top:qe}}catch(we){if(we.message&&we.message.includes("Illegal"))return{language:pe,value:Ot(Pe),illegal:!0,relevance:0,_illegalBy:{message:we.message,index:no,context:Pe.slice(no-100,no+100),mode:we.mode,resultSoFar:Xa},_emitter:Ht};if(Ct)return{language:pe,value:Ot(Pe),illegal:!1,relevance:0,errorRaised:we,_emitter:Ht,_top:qe};throw we}}function Nt(pe){const Pe={value:Ot(pe),illegal:!1,relevance:0,_top:De,_emitter:new j.__emitter(j)};return Pe._emitter.addText(pe),Pe}function qt(pe,Pe){Pe=Pe||j.languages||Object.keys(oe);const Qe=Nt(pe),ht=Pe.filter(Fn).filter(gn).map(vn=>Dt(vn,pe,!1));ht.unshift(Qe);const Mt=ht.sort((vn,Yn)=>{if(vn.relevance!==Yn.relevance)return Yn.relevance-vn.relevance;if(vn.language&&Yn.language){if(Fn(vn.language).supersetOf===Yn.language)return 1;if(Fn(Yn.language).supersetOf===vn.language)return-1}return 0}),[Bn,Mr]=Mt,fs=Bn;return fs.secondBest=Mr,fs}function An(pe,Pe,Qe){const ht=Pe&&be[Pe]||Qe;pe.classList.add("hljs"),pe.classList.add(`language-${ht}`)}function yn(pe){let Pe=null;const Qe=ge(pe);if(ue(Qe))return;if(ds("before:highlightElement",{el:pe,language:Qe}),pe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",pe);return}if(pe.children.length>0&&(j.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(pe)),j.throwUnescapedHTML))throw new kt("One of your code blocks includes unescaped HTML.",pe.innerHTML);Pe=pe;const ht=Pe.textContent,Mt=Qe?$e(ht,{language:Qe,ignoreIllegals:!0}):qt(ht);pe.innerHTML=Mt.value,pe.dataset.highlighted="yes",An(pe,Qe,Mt.language),pe.result={language:Mt.language,re:Mt.relevance,relevance:Mt.relevance},Mt.secondBest&&(pe.secondBest={language:Mt.secondBest.language,relevance:Mt.secondBest.relevance}),ds("after:highlightElement",{el:pe,result:Mt,text:ht})}function rn(pe){j=nn(j,pe)}const lt=()=>{tt(),Ft("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Oe(){tt(),Ft("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let At=!1;function tt(){function pe(){tt()}if(document.readyState==="loading"){At||window.addEventListener("DOMContentLoaded",pe,!1),At=!0;return}document.querySelectorAll(j.cssSelector).forEach(yn)}function Gt(pe,Pe){let Qe=null;try{Qe=Pe(P)}catch(ht){if(Kt("Language definition for '{}' could not be registered.".replace("{}",pe)),Ct)Kt(ht);else throw ht;Qe=De}Qe.name||(Qe.name=pe),oe[pe]=Qe,Qe.rawDefinition=Pe.bind(null,P),Qe.aliases&&So(Qe.aliases,{languageName:pe})}function Co(pe){delete oe[pe];for(const Pe of Object.keys(be))be[Pe]===pe&&delete be[Pe]}function as(){return Object.keys(oe)}function Fn(pe){return pe=(pe||"").toLowerCase(),oe[pe]||oe[be[pe]]}function So(pe,{languageName:Pe}){typeof pe=="string"&&(pe=[pe]),pe.forEach(Qe=>{be[Qe.toLowerCase()]=Pe})}function gn(pe){const Pe=Fn(pe);return Pe&&!Pe.disableAutodetect}function us(pe){pe["before:highlightBlock"]&&!pe["before:highlightElement"]&&(pe["before:highlightElement"]=Pe=>{pe["before:highlightBlock"](Object.assign({block:Pe.el},Pe))}),pe["after:highlightBlock"]&&!pe["after:highlightElement"]&&(pe["after:highlightElement"]=Pe=>{pe["after:highlightBlock"](Object.assign({block:Pe.el},Pe))})}function cs(pe){us(pe),Ue.push(pe)}function ls(pe){const Pe=Ue.indexOf(pe);Pe!==-1&&Ue.splice(Pe,1)}function ds(pe,Pe){const Qe=pe;Ue.forEach(function(ht){ht[Qe]&&ht[Qe](Pe)})}function ev(pe){return Ft("10.7.0","highlightBlock will be removed entirely in v12.0"),Ft("10.7.0","Please use highlightElement now."),yn(pe)}Object.assign(P,{highlight:$e,highlightAuto:qt,highlightAll:tt,highlightElement:yn,highlightBlock:ev,configure:rn,initHighlighting:lt,initHighlightingOnLoad:Oe,registerLanguage:Gt,unregisterLanguage:Co,listLanguages:as,getLanguage:Fn,registerAliases:So,autoDetection:gn,inherit:nn,addPlugin:cs,removePlugin:ls}),P.debugMode=function(){Ct=!1},P.safeMode=function(){Ct=!0},P.versionString=tn,P.regex={concat:m,lookahead:g,either:y,optional:h,anyNumberOfTimes:p};for(const pe in he)typeof he[pe]=="object"&&e(he[pe]);return Object.assign(P,he),P},fn=Bt({});return fn.newInstance=()=>Bt({}),Su=fn,fn.HighlightJS=fn,fn.default=fn,Su}var ku,Wg;function w6(){if(Wg)return ku;Wg=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return ku=e,ku}var Au,Yg;function x6(){if(Yg)return Au;Yg=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=t.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],b={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:y,built_in:[...w,..._,"set","shopt",...C,...k]},contains:[h,t.SHEBANG(),m,g,s,a,b,u,c,l,d,r]}}return Au=e,Au}var Tu,Zg;function _6(){if(Zg)return Tu;Zg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},h=n.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[g,u,r,t.C_BLOCK_COMMENT_MODE,d,l],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:b.concat([{begin:/\(/,end:/\)/,keywords:y,contains:b.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+a+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:h,returnBegin:!0,contains:[t.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(w,_,b,[g,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:g,strings:l,keywords:y}}}return Tu=e,Tu}var Du,Xg;function E6(){if(Xg)return Du;Xg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},h=n.optional(i)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],v=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:v,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},k={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},T=[k,g,u,r,t.C_BLOCK_COMMENT_MODE,d,l],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:T.concat([{begin:/\(/,end:/\)/,keywords:C,contains:T.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+a+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:C,relevance:0},{begin:h,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(S,A,k,T,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return Du=e,Du}var Iu,Jg;function C6(){if(Jg)return Iu;Jg=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=t.inherit(d,{illegal:/\n/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:a},h=t.inherit(p,{illegal:/\n/}),m={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,h]},v={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},y=t.inherit(v,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]});p.contains=[v,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],h.contains=[y,m,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[l,v,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},w={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},_=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},b,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,w,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,w,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,w],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[b,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},C]}}return Iu=e,Iu}var Ru,Qg;function S6(){if(Qg)return Ru;Qg=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),g={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},p="and or not only",h=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",v=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,g,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...v,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...v,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:h},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...v,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return Ru=u,Ru}var Ou,ep;function k6(){if(ep)return Ou;ep=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=t.inherit(l,{contains:[]}),p=t.inherit(d,{contains:[]});l.contains.push(p),d.contains.push(g);let h=[r,c];return[l,d,g,p].forEach(b=>{b.contains=b.contains.concat(h)}),h=h.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:h},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:h}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:h,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Ou=e,Ou}var Nu,tp;function A6(){if(tp)return Nu;tp=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return Nu=e,Nu}var Mu,np;function T6(){if(np)return Mu;np=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},g={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},p="[1-9](_?[0-9])*|0",h="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${h}))?([eE][+-]?(${h})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},v={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},T=[g,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:r}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=T,v.contains=T;const R=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:T}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(R).concat(l).concat(T)}}return Mu=e,Mu}var Pu,rp;function D6(){if(rp)return Pu;rp=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return Pu=e,Pu}var Lu,op;function I6(){if(op)return Lu;op=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return Lu=e,Lu}var $u,ip;function R6(){if(ip)return $u;ip=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,g=n.either(c,l,d),p=n.concat(g,"(\\s*\\.\\s*",g,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return $u=e,$u}var Fu,sp;function O6(){if(sp)return Fu;sp=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},v={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[v,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,m]}}return Fu=i,Fu}var Bu,ap;function N6(){if(ap)return Bu;ap=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,d=(W,{after:Y})=>{const ee="</"+W[0].slice(1);return W.input.indexOf(ee,Y)!==-1},g=e,p={begin:"<>",end:"</>"},h=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,Y)=>{const ee=W[0].length+W.index,he=W.input[ee];if(he==="<"||he===","){Y.ignoreMatch();return}he===">"&&(d(W,{after:ee})||Y.ignoreMatch());let Q;const X=W.input.substring(ee);if(Q=X.match(/^\s*=/)){Y.ignoreMatch();return}if((Q=X.match(/^\s+extends\s+/))&&Q.index===0){Y.ignoreMatch();return}}},v={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",b=`\\.(${y})`,w="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",_={className:"number",variants:[{begin:`(\\b(${w})((${b})|\\.)?|(${b}))[eE][+-]?(${y})\\b`},{begin:`\\b(${w})\\b((${b})\\b|\\.)?|(${b})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:v,contains:[]},k={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,C]},R={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},L=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,T,S,A,{match:/\$\d+/},_];C.contains=L.concat({begin:/\{/,end:/\}/,keywords:v,contains:["self"].concat(L)});const M=[].concat(R,C.contains),D=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:v,contains:["self"].concat(M)}]),F={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:D},O={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,l.concat(g,"(",l.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},G={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ce(W){return l.concat("(?!",W.join("|"),")")}const U={match:l.concat(/\b/,ce([...i,"super","import"].map(W=>`${W}\\s*\\(`)),g,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:l.concat(/\./,l.lookahead(l.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},re="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(re)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:v,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,T,S,A,R,{match:/\$\d+/},_,B,{scope:"attr",match:g+l.lookahead(":"),relevance:0},me,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,c.REGEXP_MODE,{className:"function",begin:re,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:h},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},G,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,c.inherit(c.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},U,K,O,V,{match:/\$[(.]/}]}}return Bu=u,Bu}var zu,up;function M6(){if(up)return zu;up=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return zu=e,zu}var Uu,cp;function P6(){if(cp)return Uu;cp=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},h=r,m=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),v={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=v;return y.variants[1].contains=[v],v.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,m,a,u,g,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[v,i.C_LINE_COMMENT_MODE,m],relevance:0},i.C_LINE_COMMENT_MODE,m,g,p,d,i.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},g,p]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
24
|
+
`},h]}}return Uu=o,Uu}var Ku,lp;function L6(){if(lp)return Ku;lp=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),g=u,p="and or not only",h="[\\w-]+",m="("+h+"|@\\{"+h+"\\})",v=[],y=[],b=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},w=function(M,D,F){return{className:M,begin:D,relevance:F}},_={$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},C={begin:"\\(",end:"\\)",contains:y,keywords:_,relevance:0};y.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,b("'"),b('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,C,w("variable","@@?"+h,10),w("variable","@\\{"+h+"\\}"),w("built_in","~?`[^`]*?`"),{className:"attribute",begin:h+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const k=y.concat({begin:/\{/,end:/\}/,contains:v}),T={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},S={begin:m+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:y}}]},A={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:_,returnEnd:!0,contains:y,relevance:0}},N={className:"variable",variants:[{begin:"@"+h+"\\s*:",relevance:15},{begin:"@"+h}],starts:{end:"[;}]",returnEnd:!0,contains:k}},R={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:m,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,T,w("keyword","all\\b"),w("variable","@\\{"+h+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,w("selector-tag",m,0),w("selector-id","#"+m),w("selector-class","\\."+m,0),w("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:k},{begin:"!important"},d.FUNCTION_DISPATCH]},L={begin:h+`:(:)?(${g.join("|")})`,returnBegin:!0,contains:[R]};return v.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,A,N,L,S,R,T,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:v}}return Ku=c,Ku}var ju,dp;function $6(){if(dp)return ju;dp=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return ju=e,ju}var qu,fp;function F6(){if(fp)return qu;fp=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return qu=e,qu}var Hu,gp;function B6(){if(gp)return Hu;gp=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(v,y,b="\\1")=>{const w=b==="\\1"?b:n.concat(b,y);return n.concat(n.concat("(?:",v,")"),y,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,b,o)},h=(v,y,b)=>n.concat(n.concat("(?:",v,")"),y,/(?:\\.|[^\\\/])*?/,b,o),m=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",n.either(...g,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=m,a.contains=m,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:m}}return Hu=e,Hu}var Gu,pp;function z6(){if(pp)return Gu;pp=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Gu=e,Gu}var Vu,hp;function U6(){if(hp)return Vu;hp=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(F,O)=>{O.data._beginMatch=F[1]||F[2]},"on:end":(F,O)=>{O.data._beginMatch!==F[1]&&O.ignoreMatch()}},p=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),h=`[
|
|
25
|
+
]`,m={scope:"string",variants:[d,l,g,p]},v={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(F=>{const O=[];return F.forEach(B=>{O.push(B),B.toLowerCase()===B?O.push(B.toUpperCase()):O.push(B.toLowerCase())}),O})(y),built_in:w},k=F=>F.map(O=>O.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,n.concat(h,"+"),n.concat("(?!",k(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},S=n.concat(o,"\\b(?!\\()"),A={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},N={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},R={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[N,a,A,t.C_BLOCK_COMMENT_MODE,m,v,T]},L={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",k(b).join("\\b|"),"|",k(w).join("\\b|"),"\\b)"),o,n.concat(h,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[R]};R.contains.push(L);const M=[N,A,t.C_BLOCK_COMMENT_MODE,m,v,T],D={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:C,contains:[D,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,L,A,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",D,a,A,t.C_BLOCK_COMMENT_MODE,m,v]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},m,v]}}return Vu=e,Vu}var Wu,mp;function K6(){if(mp)return Wu;mp=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Wu=e,Wu}var Yu,bp;function j6(){if(bp)return Yu;bp=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Yu=e,Yu}var Zu,yp;function q6(){if(yp)return Zu;yp=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},g={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",h=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,m=`\\b|${o.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${h}))[eE][+-]?(${p})[jJ]?(?=${m})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${p})[jJ](?=${m})`}]},y={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,v,g,t.HASH_COMMENT_MODE]}]};return l.contains=[g,v,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[v,b,g]}]}}return Zu=e,Zu}var Xu,vp;function H6(){if(vp)return Xu;vp=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Xu=e,Xu}var Ju,wp;function G6(){if(wp)return Ju;wp=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Ju=e,Ju}var Qu,xp;function V6(){if(xp)return Qu;xp=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:d}},{className:"punctuation",begin:"->"},s]}}return Qu=e,Qu}var ec,_p;function W6(){if(_p)return ec;_p=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,g=i,p="@[a-z-]+",h="and or not only",v={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+g.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},v,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,v,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:p,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},contains:[{begin:p,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},v,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return ec=u,ec}var tc,Ep;function Y6(){if(Ep)return tc;Ep=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return tc=e,tc}var nc,Cp;function Z6(){if(Cp)return nc;Cp=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=d,m=[...l,...c].filter(k=>!d.includes(k)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:n.concat(/\b/,n.either(...h),/\s*\(/),relevance:0,keywords:{built_in:h}};function w(k){return n.concat(/\b/,n.either(...k.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:w(p),relevance:0};function C(k,{exceptions:T,when:S}={}){const A=S;return T=T||[],k.map(N=>N.match(/\|\d+$/)||T.includes(N)?N:A(N)?`${N}|0`:N)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(m,{when:k=>k.length<3}),literal:s,type:u,built_in:g},contains:[{scope:"type",match:w(a)},_,b,v,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return nc=e,nc}var rc,Sp;function X6(){if(Sp)return rc;Sp=1;function e(S){return S?typeof S=="string"?S:S.source:null}function t(S){return n("(?=",S,")")}function n(...S){return S.map(N=>e(N)).join("")}function r(S){const A=S[S.length-1];return typeof A=="object"&&A.constructor===Object?(S.splice(S.length-1,1),A):{}}function o(...S){return"("+(r(S).capture?"":"?:")+S.map(R=>e(R)).join("|")+")"}const i=S=>n(/\b/,S,/\w$/.test(S)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],g=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],h=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),m=o(h,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),v=n(h,m,"*"),y=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),b=o(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=n(y,b,"*"),_=n(/[A-Z]/,b,"*"),C=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],k=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function T(S){const A={match:/\s+/,relevance:0},N=S.COMMENT("/\\*","\\*/",{contains:["self"]}),R=[S.C_LINE_COMMENT_MODE,N],L={match:[/\./,o(...s,...a)],className:{2:"keyword"}},M={match:n(/\./,o(...c)),relevance:0},D=c.filter(Xe=>typeof Xe=="string").concat(["_|0"]),F=c.filter(Xe=>typeof Xe!="string").concat(u).map(i),O={variants:[{className:"keyword",match:o(...F,...a)}]},B={$pattern:o(/\b\w+/,/#\w+/),keyword:D.concat(g),literal:l},ne=[L,M,O],G={match:n(/\./,o(...p)),relevance:0},K={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},ce=[G,K],U={match:/->/,relevance:0},z={className:"operator",relevance:0,variants:[{match:v},{match:`\\.(\\.|${m})+`}]},V=[U,z],re="([0-9]_*)+",me="([0-9a-fA-F]_*)+",W={className:"number",relevance:0,variants:[{match:`\\b(${re})(\\.(${re}))?([eE][+-]?(${re}))?\\b`},{match:`\\b0x(${me})(\\.(${me}))?([pP][+-]?(${re}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Y=(Xe="")=>({className:"subst",variants:[{match:n(/\\/,Xe,/[0\\tnr"']/)},{match:n(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ee=(Xe="")=>({className:"subst",match:n(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),he=(Xe="")=>({className:"subst",label:"interpol",begin:n(/\\/,Xe,/\(/),end:/\)/}),Q=(Xe="")=>({begin:n(Xe,/"""/),end:n(/"""/,Xe),contains:[Y(Xe),ee(Xe),he(Xe)]}),X=(Xe="")=>({begin:n(Xe,/"/),end:n(/"/,Xe),contains:[Y(Xe),he(Xe)]}),te={className:"string",variants:[Q(),Q("#"),Q("##"),Q("###"),X(),X("#"),X("##"),X("###")]},le=[S.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[S.BACKSLASH_ESCAPE]}],Ae={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:le},ct=Xe=>{const bn=n(Xe,/\//),Bt=n(/\//,Xe);return{begin:bn,end:Bt,contains:[...le,{scope:"comment",begin:`#(?!.*${Bt})`,end:/$/}]}},yt={scope:"regexp",variants:[ct("###"),ct("##"),ct("#"),Ae]},Ge={match:n(/`/,w,/`/)},Fe={className:"variable",match:/\$\d+/},Et={className:"variable",match:`\\$${b}+`},Ze=[Ge,Fe,Et],en={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:k,contains:[...V,W,te]}]}},it={scope:"keyword",match:n(/@/,o(...C),t(o(/\(/,/\s+/)))},Kt={scope:"meta",match:n(/@/,w)},jt=[en,it,Kt],Ft={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,b,"+")},{className:"type",match:_,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(_)),relevance:0}]},$n={begin:/</,end:/>/,keywords:B,contains:[...R,...ne,...jt,U,Ft]};Ft.contains.push($n);const vr={match:n(w,/\s*:/),keywords:"_|0",relevance:0},fe={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",vr,...R,yt,...ne,...ce,...V,W,te,...Ze,...jt,Ft]},_e={begin:/</,end:/>/,keywords:"repeat each",contains:[...R,Ft]},Re={begin:o(t(n(w,/\s*:/)),t(n(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:w}]},pt={begin:/\(/,end:/\)/,keywords:B,contains:[Re,...R,...ne,...V,W,te,...jt,Ft,fe],endsParent:!0,illegal:/["']/},mn={match:[/(func|macro)/,/\s+/,o(Ge.match,w,v)],className:{1:"keyword",3:"title.function"},contains:[_e,pt,A],illegal:[/\[/,/%/]},Ee={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[_e,pt,A],illegal:/\[|%/},Je={match:[/operator/,/\s+/,v],className:{1:"keyword",3:"title"}},tn={begin:[/precedencegroup/,/\s+/,_],className:{1:"keyword",3:"title"},contains:[Ft],keywords:[...d,...l],end:/}/},kt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ot={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},nn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,w,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:B,contains:[_e,...ne,{begin:/:/,end:/\{/,keywords:B,contains:[{scope:"title.class.inherited",match:_},...ne],relevance:0}]};for(const Xe of te.variants){const bn=Xe.contains.find(fn=>fn.label==="interpol");bn.keywords=B;const Bt=[...ne,...ce,...V,W,te,...Ze];bn.contains=[...Bt,{begin:/\(/,end:/\)/,contains:["self",...Bt]}]}return{name:"Swift",keywords:B,contains:[...R,mn,Ee,kt,Ot,nn,Je,tn,{beginKeywords:"import",end:/$/,contains:[...R],relevance:0},yt,...ne,...ce,...V,W,te,...Ze,...jt,Ft,fe]}}return rc=T,rc}var oc,kp;function J6(){if(kp)return oc;kp=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},m={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},y=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,v,s,a],b=[...y];return b.pop(),b.push(u),h.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return oc=e,oc}var ic,Ap;function Q6(){if(Ap)return ic;Ap=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,g=(Y,{after:ee})=>{const he="</"+Y[0].slice(1);return Y.input.indexOf(he,ee)!==-1},p=e,h={begin:"<>",end:"</>"},m=/<[A-Za-z0-9\\._:-]+\s*\/>/,v={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,ee)=>{const he=Y[0].length+Y.index,Q=Y.input[he];if(Q==="<"||Q===","){ee.ignoreMatch();return}Q===">"&&(g(Y,{after:he})||ee.ignoreMatch());let X;const te=Y.input.substring(he);if(X=te.match(/^\s*=/)){ee.ignoreMatch();return}if((X=te.match(/^\s+extends\s+/))&&X.index===0){ee.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},b="[0-9](_?[0-9])*",w=`\\.(${b})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${_})((${w})|\\.)?|(${w}))[eE][+-]?(${b})\\b`},{begin:`\\b(${_})\\b((${w})\\b|\\.)?|(${w})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"css"}},A={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,k]},L={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:p+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},M=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,S,A,N,{match:/\$\d+/},C];k.contains=M.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(M)});const D=[].concat(L,k.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(D)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:F},B={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,d.concat(p,"(",d.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},ne={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,p,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},ce={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(Y){return d.concat("(?!",Y.join("|"),")")}const z={match:d.concat(/\b/,U([...i,"super","import"].map(Y=>`${Y}\\s*\\(`)),p,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},V={begin:d.concat(/\./,d.lookahead(d.concat(p,/(?![0-9A-Za-z$_(])/))),end:p,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},re={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},me="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(me)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:ne},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,S,A,N,L,{match:/\$\d+/},C,ne,{scope:"attr",match:p+d.lookahead(":"),relevance:0},W,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,l.REGEXP_MODE,{className:"function",begin:me,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:h.begin,end:h.end},{match:m},{begin:v.begin,"on:begin":v.isTrulyOpeningTag,end:v.end}],subLanguage:"xml",contains:[{begin:v.begin,end:v.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,l.inherit(l.TITLE_MODE,{begin:p,className:"title.function"})]},{match:/\.\.\./,relevance:0},V,{match:"\\$"+p,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},z,ce,B,re,{match:/\$[(.]/}]}}function c(l){const d=l.regex,g=u(l),p=e,h=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],m={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},v={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:h},contains:[g.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},b=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],w={$pattern:e,keyword:t.concat(b),literal:n,built_in:a.concat(h),"variable.language":s},_={className:"meta",begin:"@"+p},C=(A,N,R)=>{const L=A.contains.findIndex(M=>M.label===N);if(L===-1)throw new Error("can not find mode to replace");A.contains.splice(L,1,R)};Object.assign(g.keywords,w),g.exports.PARAMS_CONTAINS.push(_);const k=g.contains.find(A=>A.scope==="attr"),T=Object.assign({},k,{match:d.concat(p,d.lookahead(/\s*\?:/))});g.exports.PARAMS_CONTAINS.push([g.exports.CLASS_REFERENCE,k,T]),g.contains=g.contains.concat([_,m,v,T]),C(g,"shebang",l.SHEBANG()),C(g,"use_strict",y);const S=g.contains.find(A=>A.label==="func.def");return S.relevance=0,Object.assign(g,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),g}return ic=c,ic}var sc,Tp;function eR(){if(Tp)return sc;Tp=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},g=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,g,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}return sc=e,sc}var ac,Dp;function tR(){if(Dp)return ac;Dp=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return ac=e,ac}var uc,Ip;function nR(){if(Ip)return uc;Ip=1;var e=v6();return e.registerLanguage("xml",w6()),e.registerLanguage("bash",x6()),e.registerLanguage("c",_6()),e.registerLanguage("cpp",E6()),e.registerLanguage("csharp",C6()),e.registerLanguage("css",S6()),e.registerLanguage("markdown",k6()),e.registerLanguage("diff",A6()),e.registerLanguage("ruby",T6()),e.registerLanguage("go",D6()),e.registerLanguage("graphql",I6()),e.registerLanguage("ini",R6()),e.registerLanguage("java",O6()),e.registerLanguage("javascript",N6()),e.registerLanguage("json",M6()),e.registerLanguage("kotlin",P6()),e.registerLanguage("less",L6()),e.registerLanguage("lua",$6()),e.registerLanguage("makefile",F6()),e.registerLanguage("perl",B6()),e.registerLanguage("objectivec",z6()),e.registerLanguage("php",U6()),e.registerLanguage("php-template",K6()),e.registerLanguage("plaintext",j6()),e.registerLanguage("python",q6()),e.registerLanguage("python-repl",H6()),e.registerLanguage("r",G6()),e.registerLanguage("rust",V6()),e.registerLanguage("scss",W6()),e.registerLanguage("shell",Y6()),e.registerLanguage("sql",Z6()),e.registerLanguage("swift",X6()),e.registerLanguage("yaml",J6()),e.registerLanguage("typescript",Q6()),e.registerLanguage("vbnet",eR()),e.registerLanguage("wasm",tR()),e.HighlightJS=e,e.default=e,uc=e,uc}var rR=nR();const aa=ss(rR),Wn=new Mn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&aa.getLanguage(t))try{const n=aa.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),oR=/^<\/?(?:details|summary)>$/i,iR=/^<details\s+open\s*>$/i,sR=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function aR(e){return oR.test(e)||iR.test(e)||sR.test(e)}function Ey(e){const t=Wn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=aR(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}Wn.renderer.rules.html_block=(e,t)=>Ey(e[t].content);Wn.renderer.rules.html_inline=(e,t)=>Ey(e[t].content);const uR=Wn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),Rp=Wn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),cR=Wn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Cy(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function lR(e){return e.replace(/:\d+(?::\d+)?$/,"")}function dR(e){const n=lR(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function fR(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&dR(e)}function cc(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function No(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}Wn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=Cy(u[1],s,i?.projectId))}return uR(e,t,n,r,o)};Wn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&fR(a[1])){const c=a[1];return cc(s,"href"),cc(s,"target"),cc(s,"rel"),No(s,"role","button"),No(s,"tabindex","0"),No(s,"data-file-link","true"),No(s,"data-file-path",c),i.fileLinkTitle&&(No(s,"title",i.fileLinkTitle),No(s,"aria-label",i.fileLinkTitle)),Rp(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Cy(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return Rp(e,t,n,r,o)};Wn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}">${u}</div>`}return cR(e,t,n,r,o)};Wn.use(y6,{enabled:!1,label:!1});function kd(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),Wn.render(e,n)}function gR(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const pR="modulepreload",hR=function(e){return"/"+e},Op={},mR=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=hR(c),c in Op)return;Op[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":pR,l||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),l)return new Promise((p,h)=>{g.addEventListener("load",p),g.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let lc=null,Np=Promise.resolve();const bl=new WeakMap,bR=30,Mp=3;async function yR(e,t){for(let n=0;n<bR;n+=1){if(!Fs(e,t))return!1;if(e.isConnected)return!0;await $s()}return e.querySelectorAll(".mermaid").length,!1}function vR(e){return Array.from(e.querySelectorAll(".mermaid")).filter(t=>{const n=t.getAttribute("data-mermaid-source");return n!==null&&n!==""&&t.querySelector("svg")===null})}async function wR(){return lc||(lc=mR(()=>import("./mermaid.core-DX3ME3Gu.js").then(e=>e.bp),[]).then(e=>e.default)),lc}function xR(){return yx()==="dark"?"dark":"default"}function $s(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function _R(e){const t=(bl.get(e)??0)+1;return bl.set(e,t),t}function Fs(e,t){return bl.get(e)===t}async function ER(e){const t=Np.then(e,e);Np=t.catch(()=>{}),await t}async function CR(e,t={}){if(e.querySelector(".mermaid")===null)return()=>{};const n=_R(e),r=await wR();if(!Fs(e,n))return()=>{};if(!await yR(e,n))return()=>{};let o=()=>{},i=!1;function s(){o(),o=t.enhance?t.enhance(e):()=>{}}async function a(d){const g=d.filter(p=>p.isConnected&&e.contains(p));if(g.length===0){d.length;return}await ER(async()=>{if(!Fs(e,n))return;const p=g.filter(m=>m.isConnected&&e.contains(m));if(p.length===0){g.length;return}const h=xR();r.initialize({startOnLoad:!1,theme:h}),o(),o=()=>{},p.forEach(m=>{const v=m.getAttribute("data-mermaid-source");v&&(m.removeAttribute("data-processed"),m.textContent=v)});try{await r.run({nodes:p}),await $s(),s()}catch(m){i=!0,console.error("[mermaid] render error:",m)}})}let u=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));for(let d=1;d<=Mp&&(u.length>0&&await a(u),!(i||!Fs(e,n)));d+=1){const g=vR(e);if(g.length===0)break;if(d===Mp){g.length;break}await $s(),u=g}await $s(),s();const c=()=>void a(Array.from(e.querySelectorAll(".mermaid"))),l=new window.MutationObserver(c);return l.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{o(),l.disconnect()}}const Ts=new WeakMap;let Bo=null;const Pp=96,Sy=.25,SR=8,kR=2.5;function ky(e,t,n){return Math.min(n,Math.max(t,e))}function Ds(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Lp(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function AR(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Lp(e.getAttribute("width"))??0,height:Lp(e.getAttribute("height"))??0}}function TR(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-Pp,n.width*.5),o=Math.max(n.height-Pp,n.height*.5),i=Math.min(r/e.width,o/e.height);return ky(i,Sy,kR)}function hi(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function Ay(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function DR(e,t){if(Ay(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function IR(e,t){Bo?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",E("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=hi("mermaid-overlay__button",E("mermaid.zoomOut"),"-"),c=hi("mermaid-overlay__button",E("mermaid.zoomIn"),"+"),l=hi("mermaid-overlay__button",E("mermaid.reset"),"1:1"),d=hi("mermaid-overlay__button",E("mermaid.close"),"x");a.append(u,c,l,d);const g=document.createElement("div");g.className="mermaid-overlay__viewport";const p=document.createElement("div");p.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),p.appendChild(t),g.appendChild(p),s.append(a,g),document.body.appendChild(s);const h=AR(t),m=TR(h,g);let v=m,y=0,b=0,w=!1,_=0,C=0,k=0,T=0;const S=()=>{p.style.transform=`translate(${Ds(y)}px, ${Ds(b)}px)`},A=()=>{h.width<=0||h.height<=0||(t.style.width=`${Ds(h.width*v)}px`,t.style.height=`${Ds(h.height*v)}px`)},N=()=>{A(),S()},R=(G,K,ce)=>{const U=g.getBoundingClientRect(),z=K===void 0?U.width/2:K-U.left,V=ce===void 0?U.height/2:ce-U.top,re=U.width/2,me=U.height/2,W=v;v=ky(G,Sy,SR),y=z-re-(z-re-y)/W*v,b=V-me-(V-me-b)/W*v,N()},L=()=>{v=m,y=h.width>0?-(h.width*v)/2:0,b=h.height>0?-(h.height*v)/2:0,N()},M=()=>{if(document.removeEventListener("keydown",ne),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const G=r?.parentNode===n?r:null;n.insertBefore(t,G)}s.remove(),Bo?.close===M&&(Bo=null)},D=G=>{G.preventDefault();const K=G.deltaY>0?.9:1.1;R(v*K,G.clientX,G.clientY)},F=G=>{G.button===0&&(w=!0,_=G.clientX,C=G.clientY,k=y,T=b,g.setPointerCapture(G.pointerId),g.classList.add("is-dragging"))},O=G=>{w&&(y=k+G.clientX-_,b=T+G.clientY-C,S())},B=G=>{w&&(w=!1,g.classList.remove("is-dragging"),g.hasPointerCapture(G.pointerId)&&g.releasePointerCapture(G.pointerId))},ne=G=>{G.key==="Escape"&&(G.stopPropagation(),M())};return u.addEventListener("click",()=>R(v/1.2)),c.addEventListener("click",()=>R(v*1.2)),l.addEventListener("click",L),d.addEventListener("click",M),g.addEventListener("wheel",D,{passive:!1}),g.addEventListener("pointerdown",F),g.addEventListener("pointermove",O),g.addEventListener("pointerup",B),g.addEventListener("pointercancel",B),document.addEventListener("keydown",ne),Bo={host:e,sourceSvg:t,close:M},L(),d.focus(),M}function RR(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=DR(n,e);if(!r)return;const{host:o}=r,i=Ts.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=hi("mermaid-fullscreen-button",E("mermaid.maximize"),"⤢"),a=()=>{const c=Ay(n)&&n.isConnected?n:o.querySelector("svg");c&&IR(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{Bo?.host===o&&Bo.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),Ts.get(o)?.button===s&&Ts.delete(o)};Ts.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function Ty(e){return CR(e,{enhance:RR})}function OR(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function NR(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function MR(e,t,n){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!NR(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=OR(u.startContainer,e),g=n.noSectionLabel,p=d&&d.textContent?.trim()||g;i=c,t({text:c,rect:l,sectionPath:p})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}function PR(e,t,n={}){return MR(e,t,{...n,noSectionLabel:E("selection.noSection")})}const LR=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,$R=/^##\s+/,FR=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,BR=/^\d+\.\s+(.*\S)\s*$/,zR=/^\s*$/,$p=/\s*[((]推荐[))]\s*$/,Fp=/\s*(自由文本)\s*$/,UR=/^\[(choice|confirm)\]\s*/i,KR=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,jR=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function qR(e){const t=e.split(`
|
|
26
|
+
`);let n=0;for(;n<t.length&&!LR.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if($R.test(i))break;const s=WR(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>HR(i,s))}function HR(e,t){const n=UR.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Fp.test(o),s=i?o.replace(Fp,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=GR(e.bodyLines);return{id:Bp(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=VR(e.bodyLines,t,s),u=i||a.length===0;return{id:Bp(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function GR(e){let t,n;for(const r of e){const o=r.trim(),i=KR.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=jR.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function VR(e,t,n){const r=[];let o=0;for(const i of e){if(zR.test(i))continue;const s=YR(i);if(s===null)continue;const a=$p.test(s),u=a?s.replace($p,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:ZR(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function WR(e){const t=FR.exec(e);return t?t[1]:null}function YR(e){const t=BR.exec(e);return t?t[1]:null}function Bp(e,t){return`q-${e}-${Dy(t)}`}function ZR(e,t,n){return`q-${e}-o-${t}-${Dy(n)}`}function Dy(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var XR=$('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const JR=36,QR=140,eO=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-JR-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-QR-8);return{top:i,left:s,visible:!0}};return f(q,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=XR();return o.$$mousedown=i=>i.preventDefault(),x(o,f(ve,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return E("selectionMenu.annotate")}}),null),x(o,f(ve,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return E("selectionMenu.explain")}}),null),Me(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Ci(o,"top",i.e=s),a!==i.t&&Ci(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};Qt(["mousedown"]);var tO=$('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-visible rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),nO=$('<p class="text-destructive ">');const rO=500,$r=8,oO=e=>{const[t,n]=I(""),[r,o]=I(!1),[i,s]=I(null),[a,u]=I(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const g=a()||260,p=window.innerHeight,h=d.rect.bottom+$r,m=d.rect.top-$r-g;let v;h+g<=p-$r?v=h:m>=$r?v=m:v=Math.max($r,p-g-$r);const y=Math.min(Math.max($r,d.rect.left),window.innerWidth-rO-$r);return{top:v,left:y}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(g){s(g.message)}finally{o(!1)}}}return f(q,{get when(){return Z(()=>!!e.open)()&&e.snap},get children(){var d=tO(),g=d.firstChild,p=g.firstChild,h=g.nextSibling,m=h.firstChild,v=m.nextSibling,y=v.nextSibling,b=y.nextSibling,w=b.nextSibling;w.nextSibling;var _=h.nextSibling,C=_.firstChild;return d.$$mousedown=k=>k.stopPropagation(),jn(k=>{queueMicrotask(()=>{k.offsetHeight!==a()&&u(k.offsetHeight)})},d),x(p,()=>E("annotate.title")),x(m,()=>e.snap?.sectionPath),x(h,()=>E("annotate.inSection"),y),x(h,()=>(e.snap?.text??"").slice(0,200),w),_.addEventListener("submit",l),x(_,f(ja,{get projectId(){return e.projectId},minRows:3,maxRows:3,get value(){return t()},onValueChange:n,get placeholder(){return E("annotate.placeholder")},autofocus:!0}),C),x(_,(()=>{var k=Z(()=>!!i());return()=>k()&&(()=>{var T=nO();return x(T,i),T})()})(),C),x(C,f(ve,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return E("common.cancel")}}),null),x(C,f(ve,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return Z(()=>!!r())()?E("common.submitting"):E("annotate.submit")}}),null),Me(k=>{var T=`${c().top}px`,S=`${c().left}px`;return T!==k.e&&Ci(d,"top",k.e=T),S!==k.t&&Ci(d,"left",k.t=S),k},{e:void 0,t:void 0}),d}})};Qt(["mousedown"]);var iO=$("<div><span class=text-muted-foreground></span><code class=font-mono>"),sO=$('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),aO=$('<div class="flex flex-col gap-1 text-sm">'),uO=$('<p class="text-destructive ">'),cO=$('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const lO={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},dO=e=>{const[t,n]=I("fix"),[r,o]=I(""),[i,s]=I(!1),[a,u]=I(null),[c,l]=I(null);se(()=>{if(!e.open){l(null);return}const h=e.anchorEl;if(!h)return;const m=h.getBoundingClientRect(),y=Math.max(16,Math.min(m.left,window.innerWidth-384-16));l({top:m.bottom+8,left:y})}),se(()=>{if(!e.open)return;const h=m=>{m.defaultPrevented||m.key==="Escape"&&(m.preventDefault(),p())};window.addEventListener("keydown",h),ae(()=>window.removeEventListener("keydown",h))});function d(){n("fix"),o(""),u(null)}async function g(h){h.preventDefault();const m=r().trim();if(!m){u(E("appendTask.descRequired"));return}s(!0),u(null);try{await e.onSubmit({kind:t(),description:m,sectionPath:e.sectionPath,quote:e.quote}),d(),e.onCancel()}catch(v){u(v.message)}finally{s(!1)}}function p(){e.onCancel()}return f(q,{get when(){return e.open},get children(){var h=cO(),m=h.firstChild,v=m.firstChild,y=v.firstChild,b=y.nextSibling,w=v.nextSibling,_=w.firstChild,C=_.firstChild,k=_.nextSibling;return h.$$mousedown=p,m.$$mousedown=T=>T.stopPropagation(),x(y,()=>E("appendTask.title")),x(b,()=>E("appendTask.hint")),w.addEventListener("submit",g),x(w,f(Rn,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:T=>n(T),get disabled(){return i()},get children(){return[f(Li,{class:"mb-1 font-medium",get children(){return E("appendTask.type")}}),Z(()=>["feat","refct","fix"].map(T=>f(an,{value:T,class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return E(lO[T])}})]}})))]}}),_),x(C,()=>E("appendTask.description")),x(_,f(ja,{get projectId(){return e.projectId},minRows:5,maxRows:5,get value(){return r()},onValueChange:o,get placeholder(){return E("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return i()}}),null),x(w,f(q,{get when(){return e.sectionPath||e.quote},get children(){var T=aO();return x(T,f(q,{get when(){return e.sectionPath},get children(){var S=iO(),A=S.firstChild,N=A.nextSibling;return x(A,()=>E("appendTask.refSection")),x(N,()=>e.sectionPath),S}}),null),x(T,f(q,{get when(){return e.quote},get children(){var S=sO();return x(S,()=>e.quote?.slice(0,200)),S}}),null),T}}),k),x(w,f(q,{get when(){return a()},get children(){var T=uO();return x(T,a),T}}),k),x(k,f(ve,{type:"button",variant:"ghost",size:"sm",onClick:p,get disabled(){return i()},get children(){return E("common.cancel")}}),null),x(k,f(ve,{type:"submit",variant:"default",size:"sm",get disabled(){return i()},get children(){return[f(ma,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>Z(()=>!!i())()?E("common.submitting"):E("appendTask.submit"))]}}),null),Me(T=>{var S=E("appendTask.title"),A=c()?{top:`${c().top}px`,left:`${c().left}px`}:void 0;return S!==T.e&&Be(m,"aria-label",T.e=S),T.t=Ho(m,A,T.t),T},{e:void 0,t:void 0}),h}})};Qt(["mousedown"]);const ua="__freeform__",fO={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},gO="accept";function pO(e){return e!==gO}function hO(e,t,n){const r=fO[t],o=(n??"").trim();if(pO(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function mO(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===ua?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}function Iy(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function bO(e){const t=Iy(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function yO(e){const t={};for(const n of e){if(n.kind==="confirm"){t[n.id]={note:"",confirmTop:"accept"};continue}const r=n.options.find(o=>o.recommended);t[n.id]={selectedOptionLabel:r?.label??n.options[0]?.label,note:""}}return t}function vO(e,t){let n=0;for(const r of e){const o=t[r.id];if(!o){n+=1;continue}if(r.kind==="confirm"){bO(o)||(n+=1);continue}const i=o.note??"";r.isFreeform||o.selectedOptionLabel===ua?i.trim()||(n+=1):o.selectedOptionLabel||(n+=1)}return n}function wO(e,t){const n=[];for(const r of e){const o=t[r.id]??{note:""};if(r.kind==="confirm"){const s=Iy(o);if(!s)continue;const a=hO(r,s,o.note);if(!a)return{ok:!1,reason:"reasonRequired"};n.push(a);continue}const i=mO(r,o);i&&n.push(i)}return{ok:!0,items:n}}function xO(e){return`f-${Date.now()}-${e}`}function _O(e){return e.map(t=>({sectionPath:t.sectionPath,quote:t.quote,note:t.note}))}function EO(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}var CO=$('<p class="text-destructive mx-3 mt-1 ">'),SO=$('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-warning"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),zp=$('<p class="m-0 break-words"><strong></strong>:'),kO=$("<div>"),AO=$('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),TO=$('<em class="text-sm not-italic text-primary"> '),DO=$('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');const IO=e=>{const t=ie(()=>yO(e.questions)),[n,r]=I({}),o=ie(()=>({...t(),...n()})),[i,s]=I(!1),[a,u]=I(null);function c(y,b){r(w=>({...w,[y]:{...w[y]??o()[y],...b}}))}function l(y,b){c(y,{selectedOptionLabel:b})}function d(y,b){c(y,{note:b})}function g(y,b){b==="accept"?c(y,{confirmTop:b,confirmIntent:void 0,confirmDrop:void 0}):c(y,{confirmTop:b})}function p(y,b){b==="dropGoal"?c(y,{confirmIntent:b}):c(y,{confirmIntent:b,confirmDrop:void 0})}function h(y,b){c(y,{confirmDrop:b})}const m=ie(()=>vO(e.questions,o()));async function v(){s(!0),u(null);try{const y=wO(e.questions,o());if(!y.ok){u(E("questionConfirm.reasonRequired"));return}const b={answers:y.items,freeformAnnotations:_O(e.freeforms)};if(b.answers.length===0&&b.freeformAnnotations.length===0){u(E("questionConfirm.noAnswers"));return}await e.onSubmit(b)}catch(y){u(y.message)}finally{s(!1)}}return(()=>{var y=SO(),b=y.firstChild,w=b.firstChild,_=w.firstChild,C=_.nextSibling,k=C.firstChild,T=k.nextSibling;T.nextSibling;var S=b.nextSibling;return x(_,()=>E("questionConfirm.title")),x(C,()=>E("questionConfirm.unanswered"),k),x(T,m),x(C,()=>e.questions.length,null),x(b,f(ve,{size:"sm",class:"shrink-0",get disabled(){return i()||e.running},onClick:v,get children(){return[f(ma,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>Z(()=>!!i())()?E("common.submitting"):Z(()=>!!e.running)()?E("questionConfirm.running"):E("questionConfirm.submitAll"))]}}),null),x(y,f(q,{get when(){return a()},get children(){var A=CO();return x(A,a),A}}),S),x(S,f(rt,{get each(){return e.questions},children:A=>{const N=()=>o()[A.id]??{note:""},R=()=>A.kind!=="confirm"&&(A.isFreeform||N().selectedOptionLabel===ua),L=()=>A.kind==="confirm"&&N().confirmTop==="reject";return(()=>{var M=AO(),D=M.firstChild;return x(D,()=>A.text),x(M,f(q,{get when(){return A.kind==="choice"},get children(){return f(Rn,{class:"m-0 flex flex-col gap-1 p-0",get value(){return N().selectedOptionLabel??""},onChange:F=>l(A.id,F),get children(){return[f(rt,{get each(){return A.options},children:F=>f(an,{get value(){return F.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"min-w-0 cursor-pointer break-words",get children(){return[Z(()=>F.label),f(q,{get when(){return F.recommended},get children(){var O=TO();return O.firstChild,x(O,()=>E("questionConfirm.recommended"),null),O}})]}})]}})}),f(an,{value:ua,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"qcp-option-freeform cursor-pointer",get children(){return E("questionConfirm.freeformLabel")}})]}})]}})}}),null),x(M,f(q,{get when(){return A.kind==="confirm"},get children(){return[(()=>{var F=kO();return x(F,f(q,{get when(){return A.plan},get children(){var O=zp(),B=O.firstChild;return B.nextSibling,x(B,()=>E("questionConfirm.confirmPlanLabel")),x(O,()=>A.plan,null),O}}),null),x(F,f(q,{get when(){return A.impact},get children(){var O=zp(),B=O.firstChild;return B.nextSibling,x(B,()=>E("questionConfirm.confirmImpactLabel")),x(O,()=>A.impact,null),O}}),null),Me(()=>_t(F,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${EO(A.impact)}`)),F})(),f(Rn,{class:"m-0 flex flex-col gap-1 p-0",get value(){return N().confirmTop??""},onChange:F=>g(A.id,F),get children(){return[f(an,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"qcp-confirm-accept cursor-pointer",get children(){return E("questionConfirm.decisionAccept")}})]}}),f(an,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return E("questionConfirm.decisionReject")}})]}})]}}),f(q,{get when(){return N().confirmTop==="reject"},get children(){return f(Rn,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return N().confirmIntent??""},onChange:F=>p(A.id,F),get children(){return[f(rt,{get each(){return[["alternative",E("questionConfirm.intentAlternative")],["constraint",E("questionConfirm.intentConstraint")],["dropGoal",E("questionConfirm.intentDropGoal")]]},children:([F,O])=>f(an,{value:F,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"min-w-0 cursor-pointer break-words",children:O})]}})}),f(q,{get when(){return N().confirmIntent==="dropGoal"},get children(){return f(Rn,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return N().confirmDrop??""},onChange:F=>h(A.id,F),get children(){return f(rt,{get each(){return[["current",E("questionConfirm.dropGoalCurrent")],["spec",E("questionConfirm.dropGoalSpec")]]},children:([F,O])=>f(an,{value:F,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"min-w-0 cursor-pointer break-words",children:O})]}})})}})}})]}})}})]}}),null),x(M,f(q,{get when(){return R()},get children(){return f(pl,{class:"qcp-note",rows:2,get placeholder(){return E("questionConfirm.notePlaceholder")},get value(){return N().note},onInput:F=>d(A.id,F.currentTarget.value)})}}),null),x(M,f(q,{get when(){return L()},get children(){return f(pl,{class:"qcp-reject-reason",rows:2,get placeholder(){return E("questionConfirm.reasonPlaceholder")},get value(){return N().note},onInput:F=>d(A.id,F.currentTarget.value)})}}),null),M})()}}),null),x(S,f(rt,{get each(){return e.freeforms},children:A=>(()=>{var N=DO(),R=N.firstChild,L=R.firstChild,M=R.nextSibling,D=M.firstChild,F=D.nextSibling,O=F.nextSibling,B=O.nextSibling,ne=B.nextSibling;ne.nextSibling;var G=M.nextSibling;return G.firstChild,x(L,()=>E("questionConfirm.selectionAnnotation")),x(R,f(ve,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(A.id),"aria-label":"remove",get children(){return f(Zr,{class:"h-4 w-4"})}}),null),x(D,()=>A.sectionPath),x(M,()=>E("questionConfirm.quoteConnector"),O),x(M,()=>A.quote.slice(0,200),ne),x(G,()=>A.note,null),N})()}),null),Me(()=>Be(_,"title",E("questionConfirm.title"))),y})()};var RO=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),Up=$("<p class=text-muted-foreground>"),OO=$('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),NO=$('<p class="text-destructive ">'),MO=$('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const PO={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},LO=120,Kp=3,$O=150,FO=e=>new Promise(t=>setTimeout(t,e));async function BO(e,t,n){for(let r=0;r<=Kp;r+=1)try{return await ye.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<Kp&&await FO($O)}return n??null}const zO=()=>{const e=ji(),t=bo(),[n,r]=I(0),[o,i]=I(!1),[s,a]=I(""),[u]=Jt(()=>[t(),e.id,n()],async([U,z],V)=>BO(U,z,V.value)),[c]=Jt(()=>[t(),e.id,n()],async([U,z])=>{try{return await ye.getDebug(U,z)}catch{return{exists:!1,text:""}}}),[l,d]=I(null),[g,p]=I(!1),[h,m]=I(null),[v,y]=I(null),[b,w]=I(null),[_,C]=I([]),[k,T]=I(!1),[S,A]=I(null);let N;const R=ie(()=>{const U=u();return U?qR(U.body):[]}),L=ie(()=>!u()||o()?!1:R().length>0||_().length>0);se(()=>{const U=e.id,z=t();if(!U||!z)return;let V;const re=oE(z,U,{onUpdated:()=>{V&&clearTimeout(V),V=setTimeout(()=>void Wh(()=>r(me=>me+1)),LO)}});ae(()=>{V&&clearTimeout(V),re()})}),se(()=>{const U=e.id,z=t();!U||!z||ye.getSpecSession(z,U).then(({sessionId:V,running:re})=>{V&&(a(V),i(re),Fo(V))}).catch(()=>{})}),se(()=>{const U=t(),z=s();if(!U||!z)return;const V=jm(U,{onStatus:re=>{re.sessionId===z&&i(re.running)}});ae(V)}),se(()=>{const U=t(),z=s();if(!U||!z)return;const V=ya(U,z,{onEvent:re=>{(re.type==="turn-completed"||re.type==="error")&&i(!1)}});ae(V)}),se(()=>{const U=b();if(!U)return;const z=PR(U,d);ae(z)}),qi(()=>k()||g()),se(()=>{const U=b(),z=u();if(!U||!z)return;const V=t();let re=!0,me;const W=kd(z.body,{specId:z.id,projectId:V||void 0});IT(U,`<article>${W}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Y,ee)=>!(Y.classList?.contains("mermaid")&&Y.getAttribute("data-mermaid-source")===ee.getAttribute?.("data-mermaid-source"))}),Ty(U).then(Y=>{if(!re){Y();return}me=Y}),ae(()=>{re=!1,me?.()})});async function M(){y(null),i(!0);try{const U=t(),{sessionId:z}=await ye.runAgent(U,e.id);a(z),Fo(z)}catch(U){i(!1),y(U.message)}}async function D(U){y(null);try{await ye.setStage(t(),e.id,U),r(z=>z+1)}catch(z){y(z.message)}}function F(U){m(U),p(!0)}async function O(U){const z=h();z&&C(V=>[...V,{id:xO(V.length),sectionPath:z.sectionPath,quote:z.text,note:U}])}function B(U){C(z=>z.filter(V=>V.id!==U))}async function ne(U){await ye.submitQuestionAnswers(t(),e.id,U),C([]),await M()}function G(){A(l()),T(!0)}async function K(U){const z=t(),V=await ye.appendItem(z,e.id,U);V.busy&&y(E("specDetail.appendSavedSpecBusy")),V.sessionId&&(i(!0),a(V.sessionId),Fo(V.sessionId,V.commandLine?{userText:V.commandLine,kind:V.kind??"claude"}:void 0))}async function ce(U){i(!0);try{const z=t(),{sessionId:V}=await ye.explain(z,e.id,U.text);a(V),Fo(V)}catch(z){i(!1),y(z.message)}}return(()=>{var U=RO();return x(U,f(pa,{get fallback(){return(()=>{var z=Up();return x(z,()=>E("common.loading")),z})()},get children(){return f(q,{get when(){return u()},get fallback(){return(()=>{var z=Up();return x(z,()=>E("specDetail.notFound")),z})()},children:z=>[(()=>{var V=OO(),re=V.firstChild,me=re.firstChild,W=re.nextSibling,Y=W.firstChild,ee=W.nextSibling,he=ee.firstChild,Q=he.firstChild,X=Q.nextSibling,te=he.nextSibling;return x(me,f(ns,{get items(){return[{label:E("breadcrumb.specList"),href:It("")},{label:z().id}]}}),null),x(me,f(ve,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return E("specDetail.copySpecPath")},get"aria-label"(){return E("specDetail.copySpecPath")},onClick:()=>void L1(e.id),get children(){return f(g2,{class:"h-3.5 w-3.5"})}}),null),x(re,f(ts,{}),null),x(Y,()=>z().frontmatter.summary||E("common.pendingAgent")),x(Q,()=>z().frontmatter.stage),X.addEventListener("change",le=>D(le.currentTarget.value)),x(te,()=>Gm(z().frontmatter.updated_at)),x(ee,f(ve,{variant:"outline",size:"sm",class:"append-btn",ref(le){var Ae=N;typeof Ae=="function"?Ae(le):N=le},onClick:G,get children(){return E("specDetail.appendTask")}}),null),x(ee,f(q,{get when(){return c()?.exists},get children(){return f(zn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return It(`specs/${z().id}/debug`)},get children(){return E("specDetail.debug")}})}}),null),x(ee,f(zn,{class:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground",get href(){return It(`specs/${z().id}/review`)},get title(){return E("git.title")},get children(){return f(Nl,{class:"h-4 w-4"})}}),null),x(ee,f(q,{get when(){return o()},get children(){return f(F1,{variant:"secondary",get children(){return E("specDetail.running")}})}}),null),Me(le=>{var Ae=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${PO[z().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,ct=E("specDetail.forceStage"),yt=E("specDetail.forceStage");return Ae!==le.e&&_t(Q,le.e=Ae),ct!==le.t&&Be(X,"title",le.t=ct),yt!==le.a&&Be(X,"aria-label",le.a=yt),le},{e:void 0,t:void 0,a:void 0}),Me(()=>X.value=z().frontmatter.stage),V})(),f(q,{get when(){return v()},get children(){var V=NO();return x(V,v),V}}),(()=>{var V=MO(),re=V.firstChild;return x(V,f(q,{get when(){return L()},get children(){return f(IO,{get questions(){return R()},get freeforms(){return _()},get running(){return o()},onRemoveFreeform:B,onSubmit:ne})}}),re),jn(w,re),V})(),f(eO,{get snap(){return Z(()=>!!g())()?null:l()},onAnnotate:F,onExplain:ce}),f(oO,{get open(){return g()},get projectId(){return t()},get snap(){return h()},onCancel:()=>p(!1),onSubmit:O}),f(dO,{get open(){return k()},get projectId(){return t()},get sectionPath(){return S()?.sectionPath},get quote(){return S()?.text},anchorEl:N,onCancel:()=>T(!1),onSubmit:K})]})}})),U})()},UO={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"};function KO(e){return UO[e]??""}function jO(e,t,n){const r=new Set(n.map(i=>i.path)),o=new Set;for(const i of e)r.has(i)&&o.add(i);return{selected:o,active:t&&r.has(t)?t:null}}function qO(e){return`${e?.index??""}${e?.worktree??""}`}var HO=$('<svg><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m8 9l4-4l4 4m0 6l-4 4l-4-4"></svg>',!1,!0,!1),GO=$('<svg xmlns=http://www.w3.org/2000/svg class="h-4 w-4"viewBox="0 0 24 24"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checked');const VO=Xt,WO=Xt.Value;Xt.Description;Xt.ErrorMessage;Xt.ItemDescription;Xt.HiddenSelect;Xt.Section;const YO=e=>{const[t,n]=de(e,["class","children"]);return f(Xt.Trigger,H({get class(){return ot("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background transition-shadow placeholder:text-muted-foreground focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n,{get children(){return[Z(()=>t.children),f(Xt.Icon,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"flex size-4 items-center justify-center opacity-50",get children(){return HO()}})]}}))},ZO=e=>{const[t,n]=de(e,["class","children"]);return f(Xt.Portal,{get children(){return f(Xt.Content,H({get class(){return ot("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[Z(()=>t.children),f(Xt.Listbox,{class:"p-1 focus-visible:outline-none"})]}}))}})},XO=e=>{const[t,n]=de(e,["class","children"]);return f(Xt.Item,H({get class(){return ot("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[f(Xt.ItemIndicator,{class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",get children(){return GO()}}),f(Xt.ItemLabel,{get children(){return t.children}})]}}))};var dc,jp;function JO(){if(jp)return dc;jp=1,dc=l=>{if(!l)return[];if(typeof l!="string"||l.match(/^\s+$/))return[];const d=l.split(`
|
|
27
|
+
`);if(d.length===0)return[];const g=[];let p=null,h=null,m=0,v=0,y=null;const b=U=>{h?.changes.push({type:"normal",normal:!0,ln1:m++,ln2:v++,content:U}),y.oldLines--,y.newLines--},w=U=>{const[z,V]=n(U)??[];p={chunks:[],deletions:0,additions:0,from:z,to:V},g.push(p)},_=()=>{(!p||p.chunks.length)&&w()},C=(U,z)=>{_(),p.new=!0,p.newMode=z[1],p.from="/dev/null"},k=(U,z)=>{_(),p.deleted=!0,p.oldMode=z[1],p.to="/dev/null"},T=(U,z)=>{_(),p.oldMode=z[1]},S=(U,z)=>{_(),p.newMode=z[1]},A=(U,z)=>{_(),p.index=U.split(" ").slice(1),z[1]&&(p.oldMode=p.newMode=z[1].trim())},N=U=>{_(),p.from=o(U)},R=U=>{_(),p.to=o(U)},L=U=>+(U||1),M=(U,z)=>{p||w(U);const[V,re,me,W]=z.slice(1);m=+V,v=+me,h={content:U,changes:[],oldStart:+V,oldLines:L(re),newStart:+me,newLines:L(W)},y={oldLines:L(re),newLines:L(W)},p.chunks.push(h)},D=U=>{h&&(h.changes.push({type:"del",del:!0,ln:m++,content:U}),p.deletions++,y.oldLines--)},F=U=>{h&&(h.changes.push({type:"add",add:!0,ln:v++,content:U}),p.additions++,y.newLines--)},O=U=>{if(!h)return;const[z]=h.changes.slice(-1);h.changes.push({type:z.type,[z.type]:!0,ln1:z.ln1,ln2:z.ln2,ln:z.ln,content:U})},B=[[/^diff\s/,w],[/^new file mode (\d+)$/,C],[/^deleted file mode (\d+)$/,k],[/^old mode (\d+)$/,T],[/^new mode (\d+)$/,S],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,A],[/^---\s/,N],[/^\+\+\+\s/,R],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,M],[/^\$/,O]],ne=[[/^\$/,O],[/^-/,D],[/^\+/,F],[/^\s*/,b]],G=U=>{for(const[z,V]of ne){const re=U.match(z);if(re){V(U,re);break}}y.oldLines===0&&y.newLines===0&&(y=null)},K=U=>{for(const[z,V]of B){const re=U.match(z);if(re){V(U,re);break}}},ce=U=>{y?G(U):K(U)};for(const U of d)ce(U);return g};const e=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,t=/^(a|b|i|w|c|o|1|2)\//,n=l=>l?.match(e)?.map(d=>d.replace(t,"").replace(/("|')$/,"")),r=/^\\?['"]|\\?['"]$/g,o=l=>{let d=i(l,"-+").trim();return d=a(d),d.replace(r,"").replace(t,"")},i=(l,d)=>{l=c(l);const g=u(d);return l.replace(new RegExp(`^${g}+`),"")},s=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,a=l=>{const d=s.exec(l);return d&&(l=l.substring(0,d.index).trim()),l},u=l=>l instanceof RegExp?l.source:`[${c(l).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,c=l=>`${l??""}`;return dc}var QO=JO();const e4=ss(QO),t4={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",vue:"xml",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql"};function n4(e){const t=e.split(".").pop()?.toLowerCase()??"",n=t4[t];return n&&aa.getLanguage(n)?n:void 0}function r4(e,t){if(!(!t||!e))try{return aa.highlight(e,{language:t,ignoreIllegals:!0}).value}catch{return}}function o4(e){return e?e4(e).map(t=>({chunks:t.chunks.map(n=>({header:n.content,rows:n.changes.map(i4)}))})):[]}function i4(e){const t=e.type==="add"?"":e.type==="del"?e.ln:e.ln1,n=e.type==="del"?"":e.type==="add"?e.ln:e.ln2;return{oldLn:t,newLn:n,marker:e.content.slice(0,1),code:e.content.slice(1),tone:e.type==="add"?"add":e.type==="del"?"del":"normal"}}var s4=$('<span class="shrink-0 text-sm text-warning">'),a4=$('<button type=button class="ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring">'),u4=$('<div data-testid=git-diff-pane class="code-highlight flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border bg-card"><div class="flex items-center gap-2 border-b px-2 py-1"><span class="min-w-0 flex-1 truncate font-mono text-sm"></span></div><div class="min-h-0 flex-1 overflow-auto">'),fc=$('<p class="p-3 text-muted-foreground">'),c4=$('<p class="p-3 text-destructive">'),l4=$('<div><div class="bg-muted px-2 py-0.5 font-mono text-sm text-muted-foreground">'),d4=$('<div><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><pre class="m-0 flex-1 whitespace-pre-wrap break-all px-2"><span>'),f4=$("<span>"),g4=$("<span class=hljs>");const p4=e=>{const t=ie(()=>o4(e.patch)),n=ie(()=>t().some(o=>o.chunks.length>0)),r=ie(()=>n4(e.path));return(()=>{var o=u4(),i=o.firstChild,s=i.firstChild,a=i.nextSibling;return x(s,()=>e.path),x(i,f(q,{get when(){return e.truncated},get children(){var u=s4();return x(u,()=>E("git.diffTruncated")),u}}),null),x(i,f(q,{get when(){return e.onClose},get children(){var u=a4();return u.$$click=()=>e.onClose?.(),x(u,f(Zr,{class:"h-4 w-4"})),Me(c=>{var l=E("common.close"),d=E("common.close");return l!==c.e&&Be(u,"aria-label",c.e=l),d!==c.t&&Be(u,"title",c.t=d),c},{e:void 0,t:void 0}),u}}),null),x(a,f(q,{get when(){return!e.loading},get fallback(){return(()=>{var u=fc();return x(u,()=>E("git.diffLoading")),u})()},get children(){return f(q,{get when(){return!e.error},get fallback(){return(()=>{var u=c4();return x(u,()=>e.error),u})()},get children(){return f(q,{get when(){return!e.binary},get fallback(){return(()=>{var u=fc();return x(u,()=>E("git.binaryFile")),u})()},get children(){return f(q,{get when(){return n()},get fallback(){return(()=>{var u=fc();return x(u,()=>E("git.diffEmpty")),u})()},get children(){return f(rt,{get each(){return t()},children:u=>f(rt,{get each(){return u.chunks},children:c=>(()=>{var l=l4(),d=l.firstChild;return x(d,()=>c.header),x(l,f(rt,{get each(){return c.rows},children:g=>{const p=g.tone==="add"?"bg-success/10":g.tone==="del"?"bg-destructive/10":"",h=g.tone==="add"?"text-success":g.tone==="del"?"text-destructive":"text-muted-foreground",m=r4(g.code,r());return(()=>{var v=d4(),y=v.firstChild,b=y.nextSibling,w=b.nextSibling,_=w.firstChild;return _t(v,`flex font-mono text-sm ${p}`),x(y,()=>g.oldLn),x(b,()=>g.newLn),_t(_,`select-none ${h}`),x(_,()=>g.marker),x(w,f(q,{when:m,get fallback(){return(()=>{var C=f4();return x(C,()=>g.code),C})()},children:C=>(()=>{var k=g4();return Me(()=>k.innerHTML=C()),k})()}),null),v})()}}),null),l})()})})}})}})}})}})),Me(()=>Be(s,"title",e.path)),o})()};Qt(["click"]);var h4=$('<span class="min-w-0 flex-1 truncate text-left font-mono">'),m4=$('<div class="border-b p-1">'),qp=$('<div class="px-2 py-2 text-sm text-muted-foreground">'),b4=$('<div class="border-b p-1 pr-9">'),y4=$('<div class="max-h-64 overflow-auto p-1">'),v4=$('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),w4=$('<p class=" text-muted-foreground">'),x4=$('<p class="text-destructive ">'),_4=$('<p class=" text-muted-foreground">(runId: <code></code>)'),E4=$('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><span aria-hidden=true class="select-none text-border">|</span><span aria-hidden=true class="select-none text-border">|'),C4=$('<span class="truncate font-mono text-sm">'),S4=$('<div><button type=button class="min-w-0 flex-1 truncate border-0 bg-transparent p-0 text-left font-mono text-sm disabled:opacity-50">'),k4=$('<div><button type=button class="flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left"><span></span><span class="truncate font-mono text-sm">');const A4=new Set(["commit","discard"]),T4=typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),D4=T4?"⌘ + Enter":"Ctrl + Enter",Ry=e=>{const[t,n]=I([]),[r,o]=I("manual"),[i,s]=I(new Set),[a,u]=I(null),[c,l]=I(""),[d,g]=I(!1),[p,h]=I(null),[m,v]=I(""),[y,b]=I(""),[w,_]=I(null),[C,k]=I(!1),[T,S]=I(null),[A,N]=I(null),[R,L]=I(null),[M,D]=I(null),[F,O]=I(""),[B,ne]=I(null);function G(fe){return O(fe),new Promise(_e=>ne(()=>_e))}function K(fe){const _e=B();_e&&(ne(null),_e(fe))}const ce=()=>e.specId?.(),U=ie(()=>!!ce());let z=null;ae(()=>z?.()),ae(()=>K(!1)),se(()=>{const fe=e.initialMessage?.()??"";fe&&!d()&&l(fe)});const[V,{refetch:re,mutate:me}]=Jt(e.projectId,fe=>ye.getGitBranches(fe)),W=ie(()=>{const fe=m().trim().toLowerCase(),_e=V()?.branches??[];return fe?_e.filter(Re=>Re.toLowerCase().includes(fe)):_e}),Y=ie(()=>{const fe=V();return[...fe?.branches??[],...fe?.remoteBranches??[]]}),ee=ie(()=>{const fe=y().trim().toLowerCase(),_e=Y();return fe?_e.filter(Re=>Re.toLowerCase().includes(fe)):_e});function he(fe){n(fe);const _e=jO(i(),a(),fe);s(_e.selected),u(_e.active)}se(()=>{const fe=e.projectId();if(!fe)return;let _e=!1,Re=!1;ye.getProjectChanges(fe).then(mn=>{_e||Re||he(mn.changes)}).catch(()=>{});const pt=uE(fe,mn=>{Re=!0,he(mn)});ae(()=>{_e=!0,pt()})});const[Q]=Jt(()=>{const fe=a(),_e=e.projectId();if(!fe||!_e)return null;const Re=t().find(pt=>pt.path===fe);return{pid:_e,path:fe,revision:qO(Re)}},fe=>ye.getFileDiff(fe.pid,fe.path));function X(fe){return M()===fe}const te=ie(()=>T()!==null||M()!==null||p()!==null),le=ie(()=>A()??(V.error?V.error.message:null));function Ae(fe,_e){z?.(),D(fe),z=ya(e.projectId(),_e,{onEvent:Re=>{(Re.type==="turn-completed"||Re.type==="error")&&(D(null),z?.(),z=null)}})}function ct(){return r()==="agent"?t().map(fe=>fe.path):[...i()]}async function yt(fe){if(te())return;N(null);const _e=ct();if(_e.length===0){N(E("review.selectAtLeastOne"));return}if(!(fe==="discard"&&!await G(E("review.confirmDiscard")))){h(fe);try{if(fe==="commit"){const pt=c().trim();if(!pt){N(E("review.enterCommitMsg"));return}await ye.projectCommit(e.projectId(),{message:pt,paths:_e})}else await ye.projectDiscard(e.projectId(),{paths:_e});s(new Set),u(null);const Re=await ye.getProjectChanges(e.projectId());he(Re.changes)}catch(Re){N(Re.message)}finally{h(null)}}}async function Ge(fe){const _e=ce();if(!(!_e||te())&&(N(null),!(fe==="discard"&&!await G(E("review.confirmDiscardAll"))))){S(fe);try{const Re=await ye.gitOp(e.projectId(),_e,fe);L({kind:fe,runId:Re.runId}),Fo(Re.sessionId),Ae(fe,Re.sessionId)}catch(Re){N(Re.message)}finally{S(null)}}}async function Fe(fe){r()==="manual"?await yt(fe):await Ge(fe)}async function Et(fe){if(!te()){N(null),h(fe);try{if(fe==="push"){const _e=await ye.projectPush(e.projectId());$t.success(E("git.pushed",{branch:_e.branch}))}else{const _e=await ye.projectPull(e.projectId());$t.success(_e.updated?E("git.pulled",{branch:_e.branch}):E("git.upToDate"))}}catch(_e){N(_e.message)}finally{h(null)}}}async function Ze(fe){const _e=fe?.trim(),Re=e.projectId();if(!(!_e||!Re||te())&&_e!==V()?.current){N(null),h("checkout");try{const pt=await ye.checkoutGitBranch(Re,_e);me(Ee=>({current:pt.current,branches:Ee?.branches.includes(pt.current)?Ee.branches:[...Ee?.branches??[],pt.current].sort(),remoteBranches:Ee?.remoteBranches??[]})),s(new Set),u(null),v("");const mn=await ye.getProjectChanges(Re);n(mn.changes),await re()}catch(pt){N(pt.message)}finally{h(null)}}}async function en(fe){const _e=e.projectId();if(!(!fe||!_e||te())){N(null),h("merge");try{const Re=await ye.mergeGitBranch(_e,fe);$t.success(Re.alreadyUpToDate?E("git.mergeUpToDate",{current:Re.current,branch:Re.merged}):E("git.merged",{current:Re.current,branch:Re.merged})),_(null),b("");const pt=await ye.getProjectChanges(_e);n(pt.changes),await re()}catch(Re){N(Re.message)}finally{h(null),k(!1)}}}function it(fe){return p()===fe||A4.has(fe)&&(X(fe)||T()===fe)}function Kt(fe){s(_e=>{const Re=new Set(_e);return Re.has(fe)?Re.delete(fe):Re.add(fe),Re})}function jt(){t().every(fe=>i().has(fe.path))?s(new Set):s(new Set(t().map(fe=>fe.path)))}const Ft=ie(()=>t().length>0&&t().every(fe=>i().has(fe.path))),$n=ie(()=>r()==="manual"&&i().size===0),vr=ie(()=>te()||r()==="manual"&&($n()||c().trim()===""));return(()=>{var fe=E4(),_e=fe.firstChild,Re=_e.firstChild,pt=Re.firstChild,mn=pt.nextSibling;return x(Re,f(VO,{get options(){return W()},get value(){return V()?.current??null},onChange:Ee=>void Ze(Ee),optionValue:Ee=>Ee,optionTextValue:Ee=>Ee,get disabled(){return te()||V.loading||!!V.error},get placeholder(){return E("git.branchPlaceholder")},itemComponent:Ee=>f(XO,{get item(){return Ee.item},get children(){var Je=C4();return x(Je,()=>Ee.item.rawValue),Je}}),get children(){return[f(YO,{class:"h-8 w-56 max-w-full gap-2 px-2 text-sm",get title(){return E("git.branchSelect")},get"aria-label"(){return E("git.branchSelect")},get children(){return[f(q,{get when(){return Z(()=>!V.loading)()&&p()!=="checkout"},get fallback(){return f(Dn,{class:"h-3.5 w-3.5 shrink-0 animate-spin"})},get children(){return f(Nl,{class:"h-3.5 w-3.5 shrink-0"})}}),(()=>{var Ee=h4();return x(Ee,f(WO,{children:Je=>Je.selectedOption()??E("git.branchPlaceholder")})),Ee})()]}}),f(ZO,{class:"w-64",get children(){return[(()=>{var Ee=m4();return x(Ee,f(ar,{get value(){return m()},onInput:Je=>v(Je.currentTarget.value),onKeyDown:Je=>Je.stopPropagation(),get placeholder(){return E("git.branchFilterPlaceholder")},class:"h-8 text-sm"})),Ee})(),f(q,{get when(){return Z(()=>!V.loading)()&&W().length===0},get children(){var Ee=qp();return x(Ee,()=>E("git.noBranches")),Ee}})]}})]}}),pt),x(Re,f(ve,{variant:"default",size:"sm",get disabled(){return vr()},onClick:()=>Fe("commit"),get children(){return[f(q,{get when(){return it("commit")},get children(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})}}),Z(()=>Z(()=>!!it("commit"))()?E("review.committing"):E("review.commit"))]}}),pt),x(Re,f(ve,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return te()||$n()},onClick:()=>Fe("discard"),get children(){return[f(q,{get when(){return it("discard")},get children(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})}}),Z(()=>Z(()=>!!it("discard"))()?E("review.discarding"):E("review.discard"))]}}),pt),x(Re,f(Ua,{get open(){return C()},onOpenChange:Ee=>{k(Ee),Ee||(b(""),_(null))},get children(){return[f(za,{as:ve,variant:"ghost",size:"sm",get disabled(){return te()||V.loading||!!V.error},get title(){return E("git.mergeBranch")},get children(){return[f(q,{get when(){return!it("merge")},get fallback(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})},get children(){return f(Lm,{class:"mr-1 h-3 w-3"})}}),Z(()=>Z(()=>!!it("merge"))()?E("git.merging"):E("git.mergeBranch"))]}}),f(Ka,{class:"w-72 p-0",get children(){return[(()=>{var Ee=b4();return x(Ee,f(ar,{get value(){return y()},onInput:Je=>b(Je.currentTarget.value),get placeholder(){return E("git.mergeFilterPlaceholder")},class:"h-8 text-sm"})),Ee})(),(()=>{var Ee=y4();return x(Ee,f(rt,{get each(){return ee()},children:Je=>(()=>{var tn=S4(),kt=tn.firstChild;return kt.$$click=()=>_(Je),x(kt,Je),x(tn,f(q,{get when(){return w()===Je},get children(){return f(ve,{size:"sm",variant:"secondary",class:"h-6 shrink-0 px-2 text-xs",get disabled(){return te()},onClick:()=>void en(Je),get children(){return[f(q,{get when(){return it("merge")},get children(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})}}),Z(()=>Z(()=>!!it("merge"))()?E("git.merging"):E("git.mergeAction"))]}})}}),null),Me(Ot=>{var nn=`flex items-center gap-2 rounded-sm px-2 py-1 ${w()===Je?"bg-accent":""}`,Xe=Je===V()?.current,bn=Je===V()?.current?E("git.mergeSelfHint"):Je;return nn!==Ot.e&&_t(tn,Ot.e=nn),Xe!==Ot.t&&(kt.disabled=Ot.t=Xe),bn!==Ot.a&&Be(kt,"title",Ot.a=bn),Ot},{e:void 0,t:void 0,a:void 0}),tn})()}),null),x(Ee,f(q,{get when(){return Z(()=>!V.loading)()&&ee().length===0},get children(){var Je=qp();return x(Je,()=>E("git.noBranches")),Je}}),null),Ee})()]}})]}}),mn),x(Re,f(ve,{variant:"ghost",size:"sm",get disabled(){return te()},onClick:()=>void Et("push"),get children(){return[f(q,{get when(){return it("push")},get children(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})}}),Z(()=>Z(()=>!!it("push"))()?E("git.pushing"):E("git.push"))]}}),null),x(Re,f(ve,{variant:"ghost",size:"sm",get disabled(){return te()},onClick:()=>void Et("pull"),get children(){return[f(q,{get when(){return it("pull")},get children(){return f(Dn,{class:"mr-1 h-3 w-3 animate-spin"})}}),Z(()=>Z(()=>!!it("pull"))()?E("git.pulling"):E("git.pull"))]}}),null),x(_e,f(oa,{get placeholder(){return E("review.commitPlaceholder",{shortcut:D4})},get value(){return c()},onInput:Ee=>{g(!0),l(Ee.currentTarget.value)},onKeyDown:Ee=>{Ee.key!=="Enter"||!(Ee.metaKey||Ee.ctrlKey)||(Ee.preventDefault(),!vr()&&Fe("commit"))},get disabled(){return te()},minRows:1,maxRows:3}),null),x(_e,f(q,{get when(){return U()},get children(){return f(Rn,{class:"flex gap-4",get value(){return r()},onChange:Ee=>o(Ee),get disabled(){return te()},get children(){return[f(an,{value:"manual",class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return E("review.manualSelect")}})]}}),f(an,{value:"agent",class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return E("review.agentSelect")}})]}})]}})}}),null),x(_e,f(q,{get when(){return Z(()=>r()==="manual")()&&t().length>0},get children(){var Ee=v4(),Je=Ee.firstChild,tn=Je.firstChild;return x(Je,f(ve,{variant:"ghost",size:"sm",onClick:jt,get disabled(){return te()},get children(){return Z(()=>!!Ft())()?E("review.deselectAll"):E("review.selectAll")}}),tn),x(tn,()=>E("review.fileCount",{selected:i().size,total:t().length})),x(Ee,f(rt,{get each(){return t()},children:kt=>(()=>{var Ot=k4(),nn=Ot.firstChild,Xe=nn.firstChild,bn=Xe.nextSibling;return x(Ot,f(Vo,{get checked(){return i().has(kt.path)},onChange:()=>Kt(kt.path),get disabled(){return te()},get children(){return f(Wo,{})}}),nn),nn.$$click=()=>u(kt.path),x(Xe,()=>kt.status),x(bn,()=>kt.path),Me(Bt=>{var fn=`flex items-center gap-2 px-2 py-0.5 ${a()===kt.path?"bg-accent":""}`,P=kt.path,oe=`inline-block w-6 text-center text-sm font-bold ${KO(kt.status)}`;return fn!==Bt.e&&_t(Ot,Bt.e=fn),P!==Bt.t&&Be(nn,"title",Bt.t=P),oe!==Bt.a&&_t(Xe,Bt.a=oe),Bt},{e:void 0,t:void 0,a:void 0}),Ot})()}),null),Ee}}),null),x(_e,f(q,{get when(){return Z(()=>r()==="manual")()&&t().length===0},get children(){var Ee=w4();return x(Ee,()=>E("review.noChanges")),Ee}}),null),x(_e,f(q,{get when(){return le()},get children(){var Ee=x4();return x(Ee,le),Ee}}),null),x(_e,f(q,{get when(){return R()},get children(){var Ee=_4(),Je=Ee.firstChild,tn=Je.nextSibling;return x(Ee,()=>E("review.dispatched"),Je),x(Ee,(()=>{var kt=Z(()=>R().kind==="commit");return()=>kt()?E("review.commit"):E("review.discard")})(),Je),x(tn,()=>R().runId.slice(0,8)),Ee}}),null),x(fe,f(q,{get when(){return a()},children:Ee=>f(p4,{get path(){return Ee()},get patch(){return Q()?.patch??""},get binary(){return Q()?.binary??!1},get truncated(){return Q()?.truncated??!1},get loading(){return Q.loading},get error(){return Z(()=>!!Q.error)()?Q.error.message:null},onClose:()=>u(null)})}),null),x(fe,f(un,{get open(){return B()!==null},onOpenChange:Ee=>{Ee||K(!1)},get children(){return f(ur,{class:"max-w-sm",get children(){return[f(lr,{get children(){return[f(cr,{get children(){return E("review.discardTitle")}}),f(Ba,{get children(){return F()}})]}}),f(dr,{get children(){return[f(ve,{variant:"outline",onClick:()=>K(!1),get children(){return E("common.cancel")}}),f(ve,{variant:"destructive",onClick:()=>K(!0),get children(){return E("review.confirmDiscardAction")}})]}})]}})}}),null),fe})()};Qt(["click"]);var I4=$('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),R4=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),O4=$("<p class=text-muted-foreground>");const N4=()=>{const e=ji(),t=bo(),[n]=Jt(()=>[t(),e.id],([o,i])=>ye.getSpec(o,i));qi();const r=ie(()=>dE(e.id,n()?.frontmatter.summary));return(()=>{var o=R4();return x(o,f(pa,{get fallback(){return(()=>{var i=O4();return x(i,()=>E("common.loading")),i})()},get children(){return[(()=>{var i=I4(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return x(s,f(ns,{get items(){return[{label:E("breadcrumb.specList"),href:It("")},{label:e.id,href:It(`specs/${e.id}`)},{label:E("git.title")}]}}),a),x(a,()=>n()?.frontmatter.summary||E("common.pendingAgent")),x(u,f(ts,{})),i})(),f(Ry,{projectId:t,specId:()=>e.id,initialMessage:r})]}})),o})()};var M4=$('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),Hp=$("<p class=text-muted-foreground>"),P4=$('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),L4=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),$4=$('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),F4=$('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const B4=()=>{const e=ji(),t=bo();qi();const[n]=Jt(()=>[t(),e.id],([a,u])=>ye.getSpec(a,u)),[r]=Jt(()=>[t(),e.id],([a,u])=>ye.getDebug(a,u)),o=ie(()=>{const a=gR(r()?.text??"");return a.trim()?kd(a,{specId:e.id,projectId:t()}):""}),[i,s]=I(null);return se(()=>{const a=i(),u=o();if(!a)return;a.innerHTML=u;let c=!0,l;Ty(a).then(d=>{if(!c){d();return}l=d}),ae(()=>{c=!1,l?.()})}),(()=>{var a=L4();return x(a,f(pa,{get fallback(){return(()=>{var u=Hp();return x(u,()=>E("common.loading")),u})()},get children(){return[(()=>{var u=M4(),c=u.firstChild,l=c.firstChild,d=c.nextSibling;return x(c,f(ns,{get items(){return[{label:E("breadcrumb.specList"),href:It("")},{label:e.id,href:It(`specs/${e.id}`)},{label:E("specDetail.debug")}]}}),l),x(l,()=>n()?.frontmatter.summary||E("common.pendingAgent")),x(d,f(ts,{})),u})(),(()=>{var u=P4();return x(u,f(q,{get when(){return r.loading},get fallback(){return f(q,{get when(){return o()},get fallback(){return(()=>{var c=F4();return x(c,()=>E("specDebug.empty")),c})()},get children(){var c=$4();return jn(s,c),c}})},get children(){var c=Hp();return x(c,()=>E("common.loading")),c}})),u})()]}})),a})()};var z4=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex items-start justify-between gap-2"><div class="flex shrink-0 items-center gap-2 text-muted-foreground">');const U4=()=>{const e=bo();return qi(),(()=>{var t=z4(),n=t.firstChild,r=n.firstChild;return x(n,f(ns,{get items(){return[{label:E("breadcrumb.specList"),href:It("")},{label:E("git.title")}]}}),r),x(r,f(ts,{})),x(t,f(Ry,{projectId:e}),null),t})()};function Gp(){return{text:"",nextOffset:0,truncated:!1}}function K4(e){return{text:e.text,nextOffset:e.offset+yl(e.text),truncated:e.truncated}}function j4(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+yl(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+yl(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function Vp(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function yl(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}const q4=80,Wp=4e5;function H4(e){const[t,{mutate:n}]=Jt(()=>[e.projectId(),e.runId()],async([b,w])=>b&&w?ye.getCommandRun(b,w):null),[r,o]=I(Gp()),[i,s]=I(null),[a,u]=I(!1),[c,l]=I(Date.now());let d=null,g=null,p=!1;const h=setInterval(()=>l(Date.now()),1e3);ae(()=>clearInterval(h)),ae(()=>{g!==null&&window.clearTimeout(g)});function m(b){d=Vp(b,Wp),g===null&&(g=window.setTimeout(()=>{g=null,d&&(o(d),d=null,e.onFlush?.())},q4))}async function v(){const b=e.projectId(),w=e.runId();if(!(!b||!w||p)){p=!0;try{const _=await ye.readCommandOutput(b,w),C=Vp(K4(_),Wp);d=null,o(C),s(null),e.onReset?.()}catch(_){s(_.message)}finally{p=!1}}}se(()=>{const b=e.projectId(),w=e.runId();if(!b||!w)return;o(Gp()),v();const _=aE(b,w,{onOutput:C=>{const k=d??r(),T=j4(k,C);T.needsRefetch?v():m(T.state)},onRun:C=>n(C),onError:C=>s(C)});ae(_)});async function y(){const b=e.projectId(),w=t();if(!b||!w)return{ok:!1};u(!0);try{const _=await ye.stopCommandRun(b,w.runId);return n(_.run),{ok:!0}}catch(_){return{ok:!1,error:_.message}}finally{u(!1)}}return{run:t,text:()=>r().text,truncated:()=>r().truncated,loadError:i,stopping:a,now:c,reload:v,stop:y}}var G4=$('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),V4=$("<p class=text-muted-foreground>"),W4=$('<span class="text-xs text-muted-foreground">: '),Y4=$('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),Z4=$('<p class="m-0 mt-2 text-xs text-muted-foreground">'),X4=$('<p class="m-0 mt-2 text-xs text-destructive">'),J4=$('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const Q4=96,eN=()=>{const e=ji(),t=bo();let n,r=!0;const o=H4({projectId:()=>t()||void 0,runId:()=>e.runId,onFlush:()=>{r&&n&&(n.scrollTop=n.scrollHeight)},onReset:()=>{n&&(n.scrollTop=n.scrollHeight)}}),{run:i,loadError:s,stopping:a,now:u}=o;function c(){n&&(r=n.scrollHeight-n.scrollTop-n.clientHeight<=Q4)}async function l(){const d=await o.stop();d.error&&$t.error(d.error)}return(()=>{var d=G4(),g=d.firstChild,p=g.firstChild;return x(g,f(ve,{as:zn,get href(){return It("")},variant:"ghost",size:"sm",get children(){return[f(Kx,{class:"mr-1 h-4 w-4"}),Z(()=>E("commands.back"))]}}),p),x(p,()=>E("commands.detailTitle")),x(d,f(q,{get when(){return i()},get fallback(){return(()=>{var h=V4();return x(h,()=>s()??E("common.loading")),h})()},children:h=>[(()=>{var m=Y4(),v=m.firstChild,y=v.nextSibling,b=y.nextSibling,w=b.firstChild,_=b.nextSibling,C=_.firstChild;return x(m,f(q,{get when(){return h().status==="running"},get children(){return f(ve,{variant:"destructive",size:"sm",get disabled(){return a()},onClick:()=>void l(),get children(){return[f(Bm,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>Z(()=>!!a())()?E("commands.stopping"):E("commands.stop"))]}})}}),v),x(m,f(z1,{get status(){return h().status}}),v),x(v,()=>h().name),x(y,()=>h().cli),x(b,()=>E("commands.duration"),w),x(b,()=>K1(h().startedAt,h().endedAt,u()),null),x(m,f(q,{get when(){return h().status!=="running"},get children(){var k=W4(),T=k.firstChild;return x(k,()=>E("commands.exitCode"),T),x(k,()=>h().exitCode??h().signal??"—",null),k}}),_),x(_,()=>E("commands.logFile"),C),x(_,()=>h().logFile,null),m})(),f(q,{get when(){return o.truncated()},get children(){var m=Z4();return x(m,()=>E("commands.outputTruncated")),m}}),f(q,{get when(){return s()},get children(){var m=X4();return x(m,s),m}}),(()=>{var m=J4();m.addEventListener("scroll",c);var v=n;return typeof v=="function"?jn(v,m):n=m,x(m,()=>o.text()||E("commands.outputEmpty")),m})()]}),null),d})()};function tN(e,t){if(!e)return[];if(t==="\\"){const n=/^\\\\([^\\]+)\\([^\\]+)(.*)$/.exec(e);if(n){const o=`\\\\${n[1]}\\${n[2]}`;return[{label:o,path:o},...gc(o,n[3]??"",t)]}const r=/^([A-Za-z]:)\\?(.*)$/.exec(e);if(r){const o=r[1];return[{label:o,path:`${o}\\`},...gc(`${o}\\`,r[2]??"",t)]}return[]}return[{label:t,path:t},...gc(t,e.slice(1),t)]}function Oy(e,t,n){return e?e.endsWith(n)?`${e}${t}`:`${e}${n}${t}`:t}function Yp(e){const t=e.trim();return!(!t||t==="."||t===".."||t.includes("/")||t.includes("\\"))}function gc(e,t,n){const r=t.split(n).filter(Boolean),o=[];let i=e;for(const s of r)i=Oy(i,s,n),o.push({label:s,path:i});return o}var nN=$('<div class="flex items-center gap-1.5">'),rN=$('<button type=button class="inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground">'),oN=$('<div class="flex items-center gap-2">'),iN=$('<button type=button class="flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground">'),sN=$('<p class="m-0 px-3 py-1.5 text-sm text-muted-foreground">'),aN=$('<p class="m-0 text-sm text-destructive break-all">'),uN=$('<div class="grid gap-3"><div class="flex items-center gap-1"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1 text-sm text-muted-foreground"><button type=button class="inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground"></button></div></div><div class="h-64 overflow-y-auto rounded border">'),cN=$('<div class="grid gap-4"><p class="m-0 font-medium"></p><p class="m-0 text-sm text-muted-foreground break-all">'),lN=$('<button type=button class="rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground">'),Zp=$('<p class="m-0 p-3 text-sm text-muted-foreground">'),dN=$('<button type=button class="flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground"><span class=truncate>');const Ny=e=>{const[t,n]=I(null),[r,o]=I(!1),[i,s]=I(null),[a,u]=I(!1),[c,l]=I(!1),[d,g]=I(null),[p,h]=I(!1),[m,v]=I(""),[y,b]=I(!1),w=()=>{const A=t();return!A||A.path===""?null:A.path},_=()=>t()?.sep==="\\";async function C(A){o(!0),s(null);try{const N=await ye.listDirs(A,a());n(N)}catch(N){s(N.message)}finally{o(!1)}}se(wt(()=>e.open,A=>{A?(g(null),s(null),k(),C()):(n(null),k())}));function k(){h(!1),v("")}async function T(){const A=w(),N=m().trim();if(!A||!Yp(N)){s(E("addProject.invalidName"));return}b(!0),s(null);try{const R=await ye.createDir(A,N);k(),await C(R.path)}catch(R){s(R.message)}finally{b(!1)}}async function S(A){const N=w();if(N){l(!0),s(null);try{const R=await ye.addProject(N,A?{gitInit:!0}:void 0);if(!R.ok){g(R.path);return}g(null),e.onOpenChange(!1),e.onAdded?.(R.project.id)}catch(R){s(E("addProject.failed",{message:R.message}))}finally{l(!1)}}}return f(un,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(ur,{class:"max-w-xl",onOpenAutoFocus:A=>{A.preventDefault();const N=A.currentTarget;N instanceof HTMLElement&&N.focus()},get children(){return[f(lr,{get children(){var A=nN();return x(A,f(cr,{get children(){return E("addProject.title")}}),null),x(A,f(hd,{openDelay:150,closeDelay:0,get children(){return[f(pd,{as:ve,type:"button",variant:"ghost",size:"icon",class:"h-6 w-6 text-muted-foreground",get"aria-label"(){return E("addProject.help")},get children(){return f(l2,{class:"h-4 w-4"})}}),f(md,{get children(){return E("addProject.helpTooltip")}})]}}),null),A}}),f(q,{get when(){return!d()},get fallback(){return(()=>{var A=cN(),N=A.firstChild,R=N.nextSibling;return x(N,()=>E("addProject.gitInitTitle")),x(R,()=>E("addProject.gitInitDesc",{path:d()??""})),x(A,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",get disabled(){return c()},onClick:()=>g(null),get children(){return E("common.cancel")}}),f(ve,{type:"button",get disabled(){return c()},onClick:()=>void S(!0),get children(){return Z(()=>!!c())()?E("common.submitting"):E("addProject.gitInitConfirm")}})]}}),null),A})()},get children(){var A=uN(),N=A.firstChild,R=N.firstChild,L=R.firstChild,M=N.nextSibling;return L.$$click=()=>void C(t()?.home),x(L,f(O2,{class:"h-3.5 w-3.5"})),x(R,f(q,{get when(){return _()},get children(){var D=rN();return D.$$click=()=>void C(""),x(D,f($m,{class:"h-3.5 w-3.5"})),Me(F=>{var O=E("addProject.driveRoot"),B=E("addProject.driveRoot");return O!==F.e&&Be(D,"aria-label",F.e=O),B!==F.t&&Be(D,"title",F.t=B),F},{e:void 0,t:void 0}),D}}),null),x(R,f(rt,{get each(){return tN(t()?.path??"",t()?.sep??"/")},children:D=>[f(Ol,{class:"h-3 w-3 shrink-0 opacity-50"}),(()=>{var F=lN();return F.$$click=()=>void C(D.path),x(F,()=>D.label),F})()]}),null),x(N,f(ve,{type:"button",variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get"aria-label"(){return E("addProject.newFolder")},get title(){return E("addProject.newFolder")},get disabled(){return!w()||r()||c()},onClick:()=>{s(null),h(!0)},get children(){return f(_2,{class:"h-4 w-4"})}}),null),x(A,f(q,{get when(){return p()},get children(){var D=oN();return x(D,f(ar,{id:"add-project-new-folder",class:"h-8",autofocus:!0,get value(){return m()},get placeholder(){return E("addProject.newFolderPlaceholder")},get disabled(){return y()},onInput:F=>v(F.currentTarget.value),onKeyDown:F=>{F.key==="Enter"?(F.preventDefault(),T()):F.key==="Escape"&&(F.preventDefault(),k())}}),null),x(D,f(ve,{type:"button",size:"sm",class:"shrink-0",get disabled(){return y()||!Yp(m())},onClick:()=>void T(),get children(){return E("addProject.newFolderConfirm")}}),null),x(D,f(ve,{type:"button",size:"sm",variant:"outline",class:"shrink-0",get disabled(){return y()},onClick:k,get children(){return E("common.cancel")}}),null),D}}),M),x(M,f(q,{get when(){return!r()},get fallback(){return(()=>{var D=Zp();return x(D,()=>E("addProject.loading")),D})()},get children(){return[f(q,{get when(){return Z(()=>t()?.parent!==null)()&&t()?.parent!==void 0},get children(){var D=iN();return D.$$click=()=>void C(t().parent),x(D,f(m2,{class:"h-4 w-4 shrink-0 opacity-70"}),null),x(D,()=>E("addProject.parent"),null),D}}),f(rt,{get each(){return t()?.entries??[]},get fallback(){return f(q,{get when(){return Z(()=>!!t())()&&t().entries.length===0},get children(){var D=Zp();return x(D,()=>E("addProject.empty")),D}})},children:D=>(()=>{var F=dN(),O=F.firstChild;return F.$$click=()=>void C(Oy(t().path,D.name,t().sep)),x(F,f(S2,{class:"h-4 w-4 shrink-0 opacity-70"}),O),x(O,()=>D.name),F})()}),f(q,{get when(){return t()?.truncated},get children(){var D=sN();return x(D,()=>E("addProject.truncated")),D}})]}})),x(A,f(Vo,{class:"flex items-center gap-2",get checked(){return a()},onChange:D=>{u(D),C(t()?.path)},get children(){return[f(Wo,{}),f(Pi,{class:"text-sm",get children(){return E("addProject.showHidden")}})]}}),null),x(A,f(q,{get when(){return i()},get children(){var D=aN();return x(D,i),D}}),null),x(A,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",get disabled(){return c()},onClick:()=>e.onOpenChange(!1),get children(){return E("common.cancel")}}),f(ve,{type:"button",get disabled(){return c()||r()||!w()},onClick:()=>void S(!1),get children(){return Z(()=>!!c())()?E("common.submitting"):E("addProject.choose")}})]}}),null),Me(D=>{var F=E("addProject.home"),O=E("addProject.home"),B=!t();return F!==D.e&&Be(L,"aria-label",D.e=F),O!==D.t&&Be(L,"title",D.t=O),B!==D.a&&(L.disabled=D.a=B),D},{e:void 0,t:void 0,a:void 0}),A}})]}})}})};Qt(["click"]);var fN=$('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground>');const My=()=>{const e=Yr(),[t,n]=I(!1);return(()=>{var r=fN(),o=r.firstChild,i=o.firstChild,s=o.nextSibling;return x(i,()=>E("welcome.title")),x(s,()=>E("welcome.description")),x(r,f(ve,{class:"mt-4 gap-1",onClick:()=>n(!0),get children(){return[f(qr,{class:"h-4 w-4"}),Z(()=>E("addProject.trigger"))]}}),null),x(r,f(Ny,{get open(){return t()},onOpenChange:n,onAdded:a=>e(It("",a))}),null),r})()};var gN=$('<p class="p-8 text-muted-foreground">');const pN=()=>{const[e]=Jt(()=>ye.listProjects());return f(q,{get when(){return!e.loading},get fallback(){return(()=>{var t=gN();return x(t,()=>E("common.loading")),t})()},get children(){return f(q,{get when(){return(e()??[]).length>0},get fallback(){return f(My,{})},get children(){return(()=>{const n=(e()??[])[0];return n?f(_w,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})},Xp="data-vt";function hN(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function mN(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Jp(e){return e.split("/").filter(Boolean).length}function bN(e,t){const n=Jp(e),r=Jp(t);return r>n?"forward":r<n?"back":"lateral"}function Py(e){const t=typeof window>"u"?"http://localhost":window.location.origin;try{return new URL(e,t).pathname}catch{return e}}function Qp(e,t=600){return e()?Promise.resolve():new Promise(n=>{let r=!1,o;const i=setTimeout(s,t);function s(){r||(r=!0,clearTimeout(i),o?.(),n())}On(a=>{o=a,se(()=>{e()&&s()})})})}let Is=null;function yN(e,t){const n=document.documentElement;Is?.skipTransition(),n.setAttribute(Xp,e);const r=document.startViewTransition(async()=>{await t()});Is=r,r.finished.catch(()=>{}).finally(()=>{Is===r&&(Is=null,n.removeAttribute(Xp))})}function vN(e,t){return e.defaultPrevented||e.enabled===!1||e.replace||typeof e.to=="string"&&Py(e.to)===e.fromPathname?null:t(e.fromPathname,e.to)}function wN(e){const t=Qo(),n=rw();ow(r=>{const o=t.pathname,i=vN({fromPathname:o,to:r.to,replace:r.options?.replace,defaultPrevented:r.defaultPrevented,enabled:hN()&&!mN()},e.resolveDirection);if(!i)return;const s=typeof r.to=="number";r.preventDefault();const a=s?xN():void 0;yN(i,async()=>{a&&await a,r.retry(!0),s&&await Qp(()=>t.pathname!==o),await Qp(()=>!n())})})}function xN(e=600){return new Promise(t=>{let n=!1;function r(){n||(n=!0,clearTimeout(o),window.removeEventListener("popstate",r),t())}const o=setTimeout(r,e);window.addEventListener("popstate",r,{once:!0})})}var _N=$('<form class="flex flex-col gap-4"><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),EN=$('<p class=" text-muted-foreground">'),CN=$('<p class=" text-destructive">');const ci=".yorz/specs",SN=e=>{const[t,n]=I("inherit"),[r,o]=I(ci),[i,s]=I(ci),[a,u]=I(!1),[c,l]=I(!1),[d,g]=I(null);se(()=>{e.open&&(g(null),u(!0),(async()=>{try{const y=await ye.getProjectConfig(e.projectId);p(y)}catch(y){g(y.message)}finally{u(!1)}})())});function p(y){n(y.agent.kind);const b=y.specsDir||ci;o(b),s(b)}function h(){return{kind:t()}}function m(y){return E(y==="inherit"?"projectConfig.inheritGlobal":y==="codex"?"projectConfig.agentCodex":y==="opencode"?"projectConfig.agentOpencode":y==="pi"?"projectConfig.agentPi":"projectConfig.agentClaude")}async function v(y){y.preventDefault(),g(null);const b=h(),w=r().trim()||ci;if(w.split(/[\\/]/).some(_=>_==="..")){g(E("projectConfig.invalidPath"));return}l(!0);try{await ye.updateProjectConfig(e.projectId,{agent:b,specsDir:w});let _=E("projectConfig.saved");w!==i()&&(_+=E("projectConfig.oldSpecsHint")),e.onSaved?.(_),e.onClose()}catch(_){g(_.message)}finally{l(!1)}}return f(un,{get open(){return e.open},onOpenChange:y=>!y&&e.onClose(),get children(){return f(ur,{class:"max-w-[480px]",get children(){return[f(lr,{get children(){return f(cr,{get children(){return[Z(()=>E("projectConfig.title"))," · ",Z(()=>e.projectName)]}})}}),f(q,{get when(){return!a()},get fallback(){return(()=>{var y=EN();return x(y,()=>E("common.loading")),y})()},get children(){var y=_N(),b=y.firstChild,w=b.firstChild,_=w.nextSibling;return y.addEventListener("submit",v),x(y,f(Rn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:C=>n(C),get disabled(){return c()},get children(){return[f(Li,{class:"mb-1.5 w-full font-medium",get children(){return E("projectConfig.agent")}}),Z(()=>["inherit","claude","opencode","codex","pi"].map(C=>f(an,{value:C,class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return m(C)}})]}})))]}}),b),x(w,()=>E("projectConfig.specsDir")),x(b,f(ar,{type:"text",get value(){return r()},onInput:C=>o(C.currentTarget.value),placeholder:ci,get disabled(){return c()}}),_),x(_,()=>E("projectConfig.specsDirHint")),x(y,(()=>{var C=Z(()=>!!d());return()=>C()&&(()=>{var k=CN();return x(k,d),k})()})(),null),x(y,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return c()},get children(){return E("common.cancel")}}),f(ve,{type:"submit",get disabled(){return c()},get children(){return Z(()=>!!c())()?E("common.saving"):E("projectConfig.save")}})]}}),null),y}})]}})}})};function eh(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}function th(e){return(e[0]??"?").toUpperCase()}function kN(e){const t=new Set(e.map(s=>s.id)),n=new Map,r=s=>s.worktree&&t.has(s.worktree.mainProjectId)?s.worktree.mainProjectId:s.id;e.forEach((s,a)=>{const u=r(s),c=n.get(u);c?c.push(a):n.set(u,[a])});const o=Array.from(n.entries()).map(([s,a])=>({key:s,idxs:a,freshness:Math.min(...a)}));o.sort((s,a)=>s.freshness-a.freshness||(s.key<a.key?-1:s.key>a.key?1:0));const i=[];for(const s of o){const a=s.idxs.length>=2,u=[...s.idxs].sort((d,g)=>{const p=e[d].id===s.key?0:1,h=e[g].id===s.key?0:1;return p-h||d-g}),c=u.find(d=>e[d].id===s.key)??u[0],l=th(e[c].name);u.forEach((d,g)=>{i.push({project:e[d],groupId:s.key,grouped:a,indexInGroup:a?g:0,groupSize:s.idxs.length,letter:a?l:th(e[d].name)})})}return i}var AN=$('<span class=" font-semibold tracking-wide">'),TN=$('<div class="flex items-center gap-1">'),DN=$('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),IN=$('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),RN=$("<aside data-testid=projects-sidebar><div data-testid=projects-sidebar-panel><header></header><footer>"),ON=$('<p class="px-2.5 py-2 text-muted-foreground">'),NN=$('<span class="flex min-w-0 items-center"><span></span><span class=truncate>'),MN=$('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),PN=$('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),LN=$('<li class="group relative flex items-center">'),$N=$('<sub class="absolute -bottom-1 -right-2 text-[9px] font-semibold leading-none">'),FN=$('<span class="absolute -right-2 -top-1 size-1.5 animate-pulse rounded-full bg-primary">'),BN=$('<span class="relative inline-block font-semibold">'),zN=$('<button type=button class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground hover:text-foreground">'),UN=$('<p class="mt-1 text-sm text-destructive break-words">'),KN=$('<p class="break-all font-semibold">');const Ly="yorz.projectsSidebar.collapsed",$y="yorz.projectsSidebar.width",jN=300,Ad=220,qN=.2,HN=160,GN=640;function VN(){try{return typeof window<"u"&&window.localStorage.getItem(Ly)==="1"}catch{return!1}}function nh(e){try{typeof window<"u"&&window.localStorage.setItem(Ly,e?"1":"0")}catch{}}function Ya(e){return Number.isFinite(e)?Math.min(GN,Math.max(HN,Math.round(e))):Ad}function pc(){return typeof window>"u"?Ad:Ya(window.innerWidth*qN)}function WN(){try{if(typeof window>"u")return Ad;const e=window.localStorage.getItem($y);if(!e)return pc();const t=Number(e);return Number.isFinite(t)?Ya(t):pc()}catch{return pc()}}function YN(e){try{typeof window<"u"&&window.localStorage.setItem($y,String(Ya(e)))}catch{}}const ZN=()=>{const[e,t]=I(VN()),[n,r]=I(WN()),[o,{refetch:i}]=Jt(()=>ye.listProjects()),[s,a]=I(null),[u,c]=I(null),[l,d]=I(null),[g,p]=I(!1),[h,m]=I(!1),[v,y]=I(!1),b=Yr(),w=Qo(),_=ie(()=>{const ee=w.pathname.match(/^\/([^/]+)/);return ee&&ee[1]!=="api"?ee[1]:""}),C=()=>e()||Dr(),[k,T]=I(!1);let S=null;function A(){S!=null&&(window.clearTimeout(S),S=null)}const N=()=>u()!==null||l()!==null,R=()=>C()&&(k()||N()),L=()=>C()&&!R();function M(){!C()||k()||(A(),S=window.setTimeout(()=>{S=null,C()&&T(!0)},jN))}function D(){A(),T(!1)}function F(){A()}ae(A);function O(){A(),T(!1),Dr()&&Qs(),t(!1),nh(!1)}function B(){if(Dr()){Qs();return}const ee=!e();t(ee),nh(ee)}let ne=null,G=null,K=null;Nn(()=>{const ee=Hm(()=>{i()});ae(ee)});let ce=0;se(()=>{const ee=W_();if(ee===0||ee===ce)return;if(ft(u)){ce=ee,c(null);return}const he=ft(_),Q=(o()??[]).find(X=>X.id===he);Q&&(ce=ee,c(Q))});function U(ee){C()||(ee.preventDefault(),ne={startX:ee.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),G=he=>{if(!ne)return;const Q=he.clientX-ne.startX,X=Ya(ne.startW+Q);ne.raf==null&&(ne.raf=requestAnimationFrame(()=>{ne&&(ne.raf=null,r(X))}))},K=()=>{ne?.raf!=null&&cancelAnimationFrame(ne.raf),ne=null,document.body.classList.remove("is-resizing"),G&&document.removeEventListener("mousemove",G),K&&document.removeEventListener("mouseup",K),G=null,K=null,YN(n())},document.addEventListener("mousemove",G),document.addEventListener("mouseup",K))}ae(()=>{G&&document.removeEventListener("mousemove",G),K&&document.removeEventListener("mouseup",K),document.body.classList.remove("is-resizing")});function z(ee,he){he.preventDefault(),he.stopPropagation(),c(ee)}function V(ee,he="success"){he==="error"?$t.error(ee):$t.success(ee)}function re(ee,he){he.preventDefault(),he.stopPropagation(),p(!1),d(ee)}async function me(){const ee=l();if(ee){m(!0);try{g()&&ee.worktree?await ye.removeProjectWithFiles(ee.id):await ye.removeProject(ee.id),await i(),_()===ee.id&&b("/"),d(null)}catch(he){const Q=he.message;Q.includes("409")?($t.error(E("sidebar.uncommittedChanges")),d(null)):(a(Q),$t.error(Q))}finally{m(!1)}}}const W=()=>C()?void 0:{width:`${n()}px`},Y=()=>L()?void 0:{width:`${n()}px`};return(()=>{var ee=RN(),he=ee.firstChild,Q=he.firstChild,X=Q.nextSibling;return ee.addEventListener("mouseleave",D),ee.addEventListener("mouseenter",M),x(Q,f(q,{get when(){return!L()},get fallback(){return f(ve,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:B,onMouseEnter:F,onMouseLeave:M,get title(){return E("sidebar.expand")},get children(){return f(el,{class:"h-4 w-4"})}})},get children(){return[(()=>{var te=AN();return x(te,()=>E("sidebar.title")),te})(),(()=>{var te=TN();return x(te,f(ve,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",get onClick(){return R()?O:B},get title(){return Z(()=>!!R())()?E("sidebar.pin"):E("sidebar.collapse")},get children(){return f(q,{get when(){return R()},get fallback(){return f(Pm,{class:"h-4 w-4"})},get children(){return f(el,{class:"h-4 w-4"})}})}})),te})()]}})),x(he,f(q,{get when(){return o()!==void 0},get fallback(){return(()=>{var te=ON();return x(te,()=>E("common.loading")),te})()},get children(){var te=DN();return x(te,f(rt,{get each(){return kN(o()??[])},children:le=>{const Ae=le.project,ct=()=>_()===Ae.id;return(()=>{var yt=LN();return x(yt,f(zn,{get href(){return`/${encodeURIComponent(Ae.id)}`},get class(){return`flex-1 truncate py-1.5 no-underline ${ct()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${L()?"px-0 text-center":"pl-2.5 pr-12"}`},get title(){return Z(()=>!!Ae.worktree)()?`${Ae.path}
|
|
28
|
+
worktree of ${Ae.worktree.mainPath}`:Ae.path},get children(){return f(q,{get when(){return!L()},get fallback(){return(()=>{var Ge=BN();return x(Ge,()=>le.letter,null),x(Ge,f(q,{get when(){return le.grouped},get children(){var Fe=$N();return x(Fe,()=>le.indexInGroup),Fe}}),null),x(Ge,f(q,{get when(){return Ae.running},get children(){var Fe=FN();return Me(()=>Be(Fe,"aria-label",E("sidebar.projectRunning",{name:Ae.name}))),Fe}}),null),Ge})()},get children(){var Ge=NN(),Fe=Ge.firstChild,Et=Fe.nextSibling;return x(Et,()=>eh(Ae)),Me(Ze=>{var en=ot("mr-1.5 size-2 shrink-0 rounded-full",Ae.running?"animate-pulse bg-primary":"bg-transparent"),it=Ae.running?E("sidebar.projectRunning",{name:Ae.name}):void 0;return en!==Ze.e&&_t(Fe,Ze.e=en),it!==Ze.t&&Be(Fe,"aria-label",Ze.t=it),Ze},{e:void 0,t:void 0}),Ge}})}}),null),x(yt,f(q,{get when(){return!L()},get children(){return[(()=>{var Ge=MN();return Ge.$$click=Fe=>z(Ae,Fe),x(Ge,f(Fm,{class:"h-3.5 w-3.5"})),Me(Fe=>{var Et=E("sidebar.configure",{name:Ae.name}),Ze=E("sidebar.projectConfig");return Et!==Fe.e&&Be(Ge,"aria-label",Fe.e=Et),Ze!==Fe.t&&Be(Ge,"title",Fe.t=Ze),Fe},{e:void 0,t:void 0}),Ge})(),(()=>{var Ge=PN();return Ge.$$click=Fe=>void re(Ae,Fe),x(Ge,f(Zr,{class:"h-3.5 w-3.5"})),Me(Fe=>{var Et=E("sidebar.removeProject",{name:Ae.name}),Ze=E("sidebar.deleteProject");return Et!==Fe.e&&Be(Ge,"aria-label",Fe.e=Et),Ze!==Fe.t&&Be(Ge,"title",Fe.t=Ze),Fe},{e:void 0,t:void 0}),Ge})()]}}),null),yt})()}})),te}}),X),x(X,f(q,{get when(){return!L()},get fallback(){return(()=>{var te=zN();return te.$$click=()=>y(!0),x(te,f(qr,{class:"h-3.5 w-3.5"})),Me(le=>{var Ae=E("addProject.trigger"),ct=E("addProject.trigger");return Ae!==le.e&&Be(te,"title",le.e=Ae),ct!==le.t&&Be(te,"aria-label",le.t=ct),le},{e:void 0,t:void 0}),te})()},get children(){return f(ve,{variant:"outline",size:"sm",class:"w-full justify-start gap-1",onClick:()=>y(!0),get children(){return[f(qr,{class:"h-3.5 w-3.5"}),Z(()=>E("addProject.trigger"))]}})}}),null),x(X,(()=>{var te=Z(()=>!!s());return()=>te()&&(()=>{var le=UN();return x(le,s),Me(()=>Be(le,"title",s())),le})()})(),null),x(he,f(q,{get when(){return!C()},get children(){var te=IN();return te.$$mousedown=U,Me(()=>Be(te,"aria-label",E("sidebar.resizeHint"))),te}}),null),x(ee,f(Ny,{get open(){return v()},onOpenChange:y,onAdded:te=>b(It("",te))}),null),x(ee,f(q,{get when(){return u()},children:te=>f(SN,{open:!0,get projectId(){return te().id},get projectName(){return te().name},onClose:()=>c(null),onSaved:le=>V(le)})}),null),x(ee,f(un,{get open(){return l()!==null},onOpenChange:te=>!te&&!h()&&d(null),get children(){return f(ur,{class:"max-w-sm",get children(){return[f(lr,{get children(){return[f(cr,{get children(){return E("sidebar.deleteProject")}}),f(Ba,{get children(){return E("sidebar.deleteDesc")}})]}}),f(q,{get when(){return l()},children:te=>[(()=>{var le=KN();return x(le,()=>eh(te())),le})(),f(q,{get when(){return te().worktree},get children(){return f(Vo,{get checked(){return g()},onChange:le=>p(le),class:"flex items-center gap-2 text-destructive",get children(){return[f(Wo,{}),f(Pi,{get children(){return E("sidebar.deleteFiles")}})]}})}})]}),f(dr,{get children(){return[f(ve,{variant:"outline",onClick:()=>d(null),get disabled(){return h()},get children(){return E("common.cancel")}}),f(ve,{variant:"destructive",onClick:()=>void me(),get disabled(){return h()},get children(){return Z(()=>!!h())()?E("common.deleting"):E("common.confirmDelete")}})]}})]}})}}),null),Me(te=>{var le=`relative shrink-0 ${C()?"w-9 transition-[width] duration-150":""}`,Ae=W(),ct=R()?"1":void 0,yt=`flex flex-col border-r bg-background ${R()?"absolute left-0 top-0 z-40 h-full shadow-xl animate-in fade-in-0 slide-in-from-left-2 duration-150":"h-full w-full"}`,Ge=Y(),Fe=`flex items-center border-b ${L()?"justify-center py-2":"justify-between px-2.5 py-2"}`,Et=`border-t ${L()?"flex justify-center py-2":"p-2"}`;return le!==te.e&&_t(ee,te.e=le),te.t=Ho(ee,Ae,te.t),ct!==te.a&&Be(he,"data-peek",te.a=ct),yt!==te.o&&_t(he,te.o=yt),te.i=Ho(he,Ge,te.i),Fe!==te.n&&_t(Q,te.n=Fe),Et!==te.s&&_t(X,te.s=Et),te},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),ee})()};Qt(["mousedown","click"]);var XN=["second","minute","hour","day","week","month","year"];function JN(e,t){if(t===0)return["just now","right now"];var n=XN[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var QN=["秒","分钟","小时","天","周","个月","年"];function eM(e,t){if(t===0)return["刚刚","片刻后"];var n=QN[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var vl={},Za=function(e,t){vl[e]=t},tM=function(e){return vl[e]||vl.en_US},hc=[60,60,24,7,365/7/12,12];function nM(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function rM(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=hc[o]&&o<hc.length;o++)e/=hc[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function oM(e,t){var n=new Date;return(+n-+nM(e))/1e3}var iM=function(e,t,n){var r=oM(e);return rM(r,tM(t))};Za("en_US",JN);Za("zh_CN",eM);var Rs={},rh;function sM(){if(rh)return Rs;rh=1,Object.defineProperty(Rs,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Rs.default=t,Rs}var aM=sM();const uM=ss(aM),oh=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function cM(e,t){return oh[t]??oh[0]}const lM=2;function dM(e,t){if(!e)return t.t("chat.usageResetUnknown");const n=new Date(e);return Number.isFinite(n.getTime())?t.formatTime(n):t.t("chat.usageResetUnknown")}function fM(e,t){if(typeof e.utilization!="number")return t.t("chat.usageWindowUnknown",{label:e.label});const n=Math.min(100,Math.max(0,Math.round(e.utilization)));return t.t("chat.usageWindow",{label:e.label,remaining:Math.max(0,100-n),used:n,reset:dM(e.resetsAt,t)})}function gM(e,t,n){if(t)return n.t("chat.usageLoading");if(!e)return"";if(e.status==="error")return n.t("chat.usageError",{kind:e.kind});if(e.status==="unavailable")return"";const r=e.windows??[];return r.length===0?n.t("chat.usageAvailableNoDetails",{kind:e.kind}):n.t("chat.usageSummary",{kind:e.kind,details:r.slice(0,lM).map(o=>fM(o,n)).join(n.t("chat.usageSeparator"))})}const yi={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1},push:{enabled:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"},appearance:{themeMode:"system",themeName:"paper",language:"zh-CN"},customInstructions:[]},[In,wl]=I(yi);async function pM(){try{const e=await ye.getGlobalConfig();return wl(e),xl(e),hM(e),e}catch{return wl(yi),xl(yi,!1),yi}}async function Fy(e){const t=await ye.updateGlobalConfig(e);return wl(t.config),xl(t.config),By(),t.config}async function vi(e){return Fy(e(In()))}async function ih(e){return vi(t=>({...t,customInstructions:e}))}function xl(e,t=!0){_x(e.appearance.themeMode,e.appearance.themeName),t&&Cm(e.appearance.themeMode,e.appearance.themeName),lf.language!==e.appearance.language&&lf.changeLanguage(e.appearance.language)}function hM(e){if(!(typeof window>"u"))try{const t=window.localStorage,n=t.getItem("yorz.theme"),r=t.getItem("yorz.themeName"),o=t.getItem("yorz.lang"),i=vM(t.getItem("yorz.chat.customSlashCommands")),s=e.appearance,a={themeMode:mM(n)?n:s.themeMode,themeName:bM(r)?r:s.themeName,language:yM(o)?o:s.language},u=e.customInstructions.length>0||i.length===0?e.customInstructions:i;if(a.themeMode===s.themeMode&&a.themeName===s.themeName&&a.language===s.language&&u===e.customInstructions){By();return}vi(c=>({...c,appearance:a,customInstructions:u}))}catch{}}function By(){if(!(typeof window>"u"))try{window.localStorage.removeItem("yorz.theme"),window.localStorage.removeItem("yorz.themeName"),window.localStorage.removeItem("yorz.lang"),window.localStorage.removeItem("yorz.chat.customSlashCommands")}catch{}}function mM(e){return e==="system"||e==="light"||e==="dark"}function bM(e){return e==="terminal"||e==="graphite"||e==="paper"}function yM(e){return e==="zh-CN"||e==="en"}function vM(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(wM).filter(n=>n!==null):[]}catch{return[]}}function wM(e){if(!e||typeof e!="object")return null;const t=e,n=typeof t.hiddenPrompt=="string"?t.hiddenPrompt:typeof t.systemPrompt=="string"?t.systemPrompt:null;return typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||n===null||typeof t.prefill!="string"||typeof t.createdAt!="number"?null:{id:t.id,name:t.name,description:t.description,hiddenPrompt:n,prefill:t.prefill,createdAt:t.createdAt}}const[xM,_M]=I({});function mc(e){return e?xM()[e]??[]:[]}function _l(e,t){return _M(n=>({...n,[e]:t})),t}async function EM(e){if(!e)return[];try{const t=await ye.getProjectCustomInstructions(e);return _l(e,t.customInstructions)}catch{return _l(e,[])}}async function sh(e,t){const n=await ye.updateProjectCustomInstructions(e,t);return _l(e,n.customInstructions)}function CM(e,t){const n=`/${e}`;return t.trim()?SM(t,e)?t:`${n} ${t}`:`${n} `}function SM(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^/${n}(\\s|$)`).test(e.trimStart())}function kM(e,t){const n=new Set(e.map(r=>r.name));return[...e.map(r=>({...r,scope:"project"})),...t.filter(r=>!n.has(r.name)).map(r=>({...r,scope:"global"}))]}const zy=`
|
|
29
|
+
|
|
30
|
+
`,AM="<!-- yorz:hidden -->",TM=/<!-- yorz:hidden -->[\s\S]*?<!-- \/yorz:hidden -->\n?/g;function DM(e){return e.includes(AM)?e.replace(TM,"").trim():e}function IM(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:e==="user"?DM(t.text):t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function Uy(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=IM(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:zy+i.text}:i),r=!0}else t.push(i)}}return t}function RM(e){const t=[];for(const n of e){const r=Uy(n.messages);r.length!==0&&(t.length>0&&t.push({kind:"divider",sessionId:n.sessionId,agentKind:n.kind,startedAt:n.createdAt}),t.push(...r))}return t}function OM(e,t){return!e||!t||e.endsWith(`
|
|
31
|
+
`)||t.startsWith(`
|
|
32
|
+
`)?e+t:e+zy+t}function NM(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function ah(e,t,n){return`${e}#${t}:${n}`}function MM(e){const t=[];let n=null,r=0;const o=()=>`t${r++}`,i=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const s of e){if(s.kind==="divider"){n=null,t.push({kind:"divider",sessionId:s.sessionId,agentKind:s.agentKind,startedAt:s.startedAt});continue}if(s.kind==="context"){n=null;const c=t[t.length-1];c?.kind==="context"?c.contexts.push(s):t.push({kind:"context",contexts:[s]});continue}if(s.kind==="text"&&s.role==="user"){n=null;const c=t[t.length-1];c?.kind==="user"?c.text=OM(c.text,s.text):t.push({kind:"user",text:s.text});continue}const a=i(),u=a.segments[a.segments.length-1];if(s.kind==="text"){u?.kind==="text"?u.text+=s.text:a.segments.push({kind:"text",text:s.text});continue}u?.kind==="tools"?s.result!==void 0&&s.name===void 0?NM(u.tools,s.result):u.tools.push({...s}):a.segments.push({kind:"tools",id:o(),tools:[{...s}]})}return t.filter(s=>s.kind!=="assistant"||s.segments.length>0)}function PM(e){const{sid:t,displayedSid:n,displayedSpecId:r,fresh:o,listPending:i,known:s,specId:a,running:u}=e;if(!t)return{action:"idle"};const c=n===t;return o&&c?{action:"fresh"}:!s&&i?{action:"hold"}:u&&c&&r===a?{action:"keep"}:{action:"load",clear:!c,specId:a}}function LM(){let e=0;return{begin(){const t=++e;return()=>t===e},invalidate(){e+=1}}}const $M="\0";function bc(e,t){return`${e}${$M}${t}`}function Ky(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.role===t.role&&e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.name===t.name&&e.result===t.result:e.kind==="context"&&t.kind==="context"?e.contextKind===t.contextKind&&e.text===t.text:e.kind==="divider"&&t.kind==="divider"?e.sessionId===t.sessionId&&e.startedAt===t.startedAt:!1}function FM(e,t){return e.length!==t.length?!1:e.length===0?!0:Ky(e[e.length-1],t[t.length-1])}function BM(e,t){if(e.length>t.length)return!1;for(let n=0;n<e.length;n++)if(!Ky(e[n],t[n]))return!1;return!0}const zM=80,UM=1500;function KM(e){return new Promise(t=>window.setTimeout(t,e))}function jM(e){const[t,n]=I([]),r=ie(()=>MM(t())),[o,i]=I(!1),[s,a]=I(!1),[u,c]=I({}),l={isExpanded:Q=>u()[Q]===!0,set:(Q,X)=>c(te=>te[Q]===X?te:{...te,[Q]:X})};function d(){c(Q=>Object.keys(Q).length===0?Q:{})}const g=new Set,[p,h]=I(0);let m=new Set,v=!1,y;const[b,w]=I(0);let _=null;function C(){_==null&&(_=window.setTimeout(()=>{_=null,w(Q=>Q+1)},120))}let k="",T,S="";const A=LM();function N(Q){return k!==Q&&S!==Q?!1:ft(t).length>0}function R(Q,X){if(S===X||N(X))return!0;const te=e.transcriptCache?.get(bc(Q,X));return!te||te.parts.length===0?!1:(z(te.parts),S=X,!0)}const L=new Map;function M(Q){let X=L.get(Q);if(!X){let te=()=>{};X={promise:new Promise(Ae=>{te=Ae}),resolve:te},L.set(Q,X)}return X.promise}function D(Q){M(Q),L.get(Q)?.resolve()}function F(Q){g.delete(Q)&&Q===e.sessionId()&&h(X=>X+1)}let O="",B=null;function ne(Q,X){const te=Q[Q.length-1];return te&&te.kind==="text"&&te.role==="assistant"?[...Q.slice(0,-1),{...te,text:te.text+X}]:[...Q,{kind:"text",role:"assistant",text:X}]}function G(){B!=null&&(clearTimeout(B),B=null);const Q=O;O="",Q&&n(X=>ne(X,Q))}function K(Q){O+=Q,B==null&&(B=window.setTimeout(G,zM))}function ce(Q){G(),n(X=>ne(X,Q))}function U(Q){G(),n(X=>[...X,Q])}function z(Q=[]){B!=null&&(clearTimeout(B),B=null),O="",n(X=>Q.length===0&&X.length===0?X:Q)}function V(Q){ce(`
|
|
33
|
+
${e.errorLabel(Q)}
|
|
34
|
+
`)}se(()=>{const Q=e.projectId(),X=e.sessionId(),te=e.specId(),le=te?e.running():!1,Ae=PM({sid:X,displayedSid:k,displayedSpecId:T,fresh:g.has(X),listPending:e.listPending?.()??!1,known:e.known?.()??!0,specId:te,running:le});if(p(),b(),!Q){a(!1);return}if(Ae.action==="hold"){a(!R(Q,X));return}if(Ae.action==="idle"||Ae.action==="keep"){a(!1);return}if(Ae.action==="fresh"){a(!1),e.onSubjectChange?.();return}e.onSubjectChange?.(),Ae.clear&&S!==X&&(z(),d()),Ae.clear&&(m=new Set,v=!1,y&&y.sid!==X&&(y=void 0)),k=X,T=Ae.specId;const ct=A.begin();a(!R(Q,X)),(Ae.specId?ye.getSpecMessages(Q,Ae.specId).then(Ge=>({next:RM(Ge),folded:new Set(Ge.filter(Fe=>Fe.messages.length>0).map(Fe=>Fe.sessionId))})):ye.getSessionMessages(Q,X).then(Ge=>({next:Uy(Ge),folded:new Set(Ge.length>0?[X]:[])}))).then(({next:Ge,folded:Fe})=>{if(!ct())return;y&&y.sid===X&&Fe.has(X)&&(y=void 0);const Et=!!(Ae.specId&&y&&y.sid===X&&!Fe.has(X));if(Ae.specId&&!Fe.has(X)&&v&&!Et){a(!1);return}let Ze=Ge;if(Et&&y){const jt=[];Ge.length>0&&jt.push({kind:"divider",sessionId:X,agentKind:y.kind,startedAt:y.startedAt}),jt.push({kind:"text",role:"user",text:y.userText}),Ze=[...Ge,...jt]}S="";const en=ft(t),it=FM(en,Ze)||BM(Ze,en);it||z(Ze),m=Fe,Fe.has(X)&&(v=!1),a(!1);const Kt=it?en:Ze;Kt.length>0&&e.transcriptCache?.set(bc(Q,X),{specId:Ae.specId,parts:Kt})}).catch(()=>{ct()&&a(!1)})}),se(()=>{const Q=e.projectId(),X=e.sessionId();if(!Q||!X)return;const te=ya(Q,X,{onReady:()=>D(X),onEvent:le=>{const Ae=()=>{e.specId()&&X===e.sessionId()&&!m.has(X)&&(v=!0)};le.type==="text"?(K(le.delta),Ae()):le.type==="tool-use"?(U({kind:"tool",name:le.name,input:le.input}),Ae()):le.type==="tool-result"?(U({kind:"tool",result:le.text}),Ae()):le.type==="turn-completed"?(G(),F(X),e.onRunningChange(X,!1),e.specId()&&X===e.sessionId()&&!m.has(X)&&(v=!0,C())):le.type==="error"?(V(le.message),e.onRunningChange(X,!1)):le.type==="session-started"&&le.sessionId!==X&&Sl(()=>{g.has(X)&&g.add(le.sessionId),k===X&&(k=le.sessionId),e.onSessionIdChange(le.sessionId),e.onRunningChange(X,!1),e.onRunningChange(le.sessionId,!0),e.onSessionsChanged?.()})}});ae(()=>{L.delete(X),te()})}),ae(()=>{B!=null&&clearTimeout(B),_!=null&&clearTimeout(_),A.invalidate();const Q=e.projectId(),X=t();Q&&k&&X.length>0&&e.transcriptCache?.set(bc(Q,k),{specId:T,parts:X})});function re(){z(),d(),A.invalidate(),a(!1),k="",T=void 0,S="",m=new Set,v=!1,y=void 0,_!=null&&(clearTimeout(_),_=null),e.onSubjectChange?.()}function me(Q,X,te){!Q||!X||(y={sid:Q,userText:X,kind:te,startedAt:Date.now()},v=!0,C())}function W(){re(),i(!1),g.clear(),h(Q=>Q+1),L.clear()}async function Y(Q,X){const te=e.projectId(),le=e.sessionId();if(!te||!Q||o()||e.running())return"failed";if(e.onSubjectChange?.(),!le)return ee(te,Q,X);U({kind:"text",role:"user",text:Q}),a(!1),e.onRunningChange(le,!0);try{return await ye.sendSessionMessage(te,le,Q,X),"sent"}catch(Ae){return V(Ae.message),e.onRunningChange(le,!1),"failed"}}async function ee(Q,X,te){i(!0);try{let le;try{le=(await ye.createSession(Q,{})).sessionId}catch(yt){return V(yt.message),"not-started"}g.add(le);const Ae=M(le);z([{kind:"text",role:"user",text:X}]),d(),A.invalidate(),k=le,T=void 0,S="",e.onRunningChange(le,!0),e.onSessionIdChange(le),await Promise.race([Ae,KM(UM)]);let ct;try{await ye.sendSessionMessage(Q,le,X,te),ct="sent"}catch(yt){V(yt.message),e.onRunningChange(le,!1),ct="failed"}return e.onSessionsChanged?.(),ct}finally{i(!1)}}async function he(){const Q=e.projectId(),X=e.sessionId();!Q||!X||(await ye.abortSession(Q,X).catch(()=>{}),e.onRunningChange(X,!1))}return{blocks:r,running:e.running,starting:o,historyLoading:s,toolExpand:l,send:Y,beginOptimisticRound:me,abort:he,reset:re,markPersisted:F,resetAll:W}}function qM(e,t){const n=[],r=new Map;for(const o of e){const i=t(o.id);if(!o.specId){n.push({key:o.id,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i});continue}const s=r.get(o.specId);if(!s){const a={key:o.specId,specId:o.specId,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i};r.set(o.specId,a),n.push(a);continue}s.sessions.push(o),o.updatedAt>s.latest.updatedAt&&(s.latest=o),s.updatedAt=Math.max(s.updatedAt,o.updatedAt),s.running||=i}for(const o of r.values())o.sessions.sort((i,s)=>i.createdAt-s.createdAt);return n}function HM(e,t){return e.find(n=>n.sessions.some(r=>r.id===t))}var GM=$("<div>");const VM=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=GM();return fr(r,H({get class(){return ot("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},WM=300;function YM(e,t=WM){const n=e.length;return n<=t?{truncated:!1,preview:e,length:n}:{truncated:!0,preview:e.slice(0,t),length:n}}const Td=Fa;Fa.Trigger;const Dd=e=>{const[t,n]=de(e,["class"]);return f(Fa.Content,H({get class(){return ot("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var ZM=$('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),XM=$('<div class="mt-1 max-h-[32rem] space-y-2 overflow-auto rounded border bg-background p-2">'),JM=$('<div class="font-mono text-xs font-semibold">'),QM=$("<div class=space-y-1>"),eP=$('<button type=button class="inline-flex w-fit cursor-pointer items-center text-left text-[11px] text-muted-foreground/70">'),tP=$("<div class=space-y-1><pre>");const nP=e=>{const t=()=>e.expand.isExpanded(e.segment.id),n=r=>e.expand.set(e.segment.id,r);return f(Td,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=ZM(),o=r.firstChild;return r.$$click=()=>n(!t()),x(r,f(Rl,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),x(o,()=>E("chat.toolCollapsed",{count:e.segment.tools.length})),r})(),f(Dd,{get children(){var r=XM();return x(r,f(Yc,{get each(){return e.segment.tools},children:(o,i)=>(()=>{var s=QM();return x(s,f(q,{get when(){return o().name},get children(){var a=JM();return x(a,()=>o().name),a}}),null),x(s,f(q,{get when(){return o().input!==void 0},get children(){return f(uh,{get text(){return rP(o().input)},get expandKey(){return ah(e.segment.id,i,"input")},get expand(){return e.expand}})}}),null),x(s,f(q,{get when(){return o().result!==void 0},get children(){return f(uh,{get text(){return o().result??""},get expandKey(){return ah(e.segment.id,i,"result")},get expand(){return e.expand},wrap:!0})}}),null),s})()})),r}})]}})},uh=e=>{const t=()=>YM(e.text),n=()=>e.expand.isExpanded(e.expandKey),r=()=>t().truncated&&!n();return(()=>{var o=tP(),i=o.firstChild;return x(i,(()=>{var s=Z(()=>!!r());return()=>s()?`${t().preview}…`:e.text})()),x(o,f(q,{get when(){return t().truncated},get children(){var s=eP();return s.$$click=()=>e.expand.set(e.expandKey,!n()),x(s,(()=>{var a=Z(()=>!!n());return()=>a()?E("chat.toolTextCollapse"):E("chat.toolTextExpand",{count:t().length})})()),s}}),null),Me(()=>_t(i,`overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug ${e.wrap?"whitespace-pre-wrap":""}`)),o})()};function rP(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}Qt(["click"]);var oP=$('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),iP=$('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),sP=$('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const aP=e=>{const[t,n]=I(!1);return f(Td,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=oP(),o=r.firstChild;return r.$$click=()=>n(!t()),x(r,f(Rl,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),x(o,()=>E("chat.agentContextCollapsed",{count:e.contexts.length})),Me(()=>Be(r,"title",E("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),f(Dd,{get children(){var r=iP();return x(r,f(rt,{get each(){return e.contexts},children:o=>(()=>{var i=sP();return x(i,()=>o.text),i})()})),r}})]}})};Qt(["click"]);var uP=$('<span class="font-semibold tracking-wide">'),ch=$("<span>"),cP=$('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),lP=$('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),dP=$("<div class=mb-1.5>"),fP=$('<p class="mb-1 text-xs text-destructive">'),gP=$('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto p-2 pt-0 pr-1 mr-1 "></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),pP=$('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),hP=$('<p class="m-0 text-sm text-destructive">'),mP=$('<form class="flex flex-col gap-4"><div class="flex flex-col gap-1 font-medium"><span class="text-xs font-normal text-muted-foreground"></span></div><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-name></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-description></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-hidden-prompt><span class="text-xs font-normal text-muted-foreground"></span></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-prefill><span class="text-xs font-normal text-muted-foreground">'),bP=$("<aside><header>"),yP=$('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),vP=$('<span class="shrink-0 text-[11px] font-normal tabular-nums text-muted-foreground">×'),wP=$('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),xP=$("<div class=text-muted-foreground><p class=m-0>"),_P=$('<p class="mt-1 text-sm">'),EP=$('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),CP=$('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),SP=$('<div class="markdown chat-md">'),kP=$('<div class="my-3 flex items-center gap-2 text-[11px] text-muted-foreground"><span class="h-px flex-1 bg-border"></span><span class="shrink-0 tabular-nums"></span><span class="h-px flex-1 bg-border">'),AP=$('<span class="text-sm font-normal text-muted-foreground">');const yc="yorz.layout.col2.collapsed",El="yorz.layout.col2.width",lh="yorz.chat.sessionList.collapsed",jy="yorz.chat.sessionList.rows",TP="yorz.chat.sessionList.limit",DP="yorz.chat.sessionList.showHistory",qy=[3,5,10],IP=28,Id=340,RP=.4,Hy=260,OP=960,NP=.8,MP=96,PP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,LP=e=>e.kind==="divider"?e:null,$P=e=>e.kind==="context"?e:null,FP=e=>e.kind==="assistant"?e:null,BP=e=>e.kind==="user"?e:null,zP=e=>e.kind==="tools"?e:null,UP=e=>e.kind==="text"?e.text:"";Za("en",cM);Za("zh-CN",uM);function KP(){return typeof window>"u"?OP:Math.max(Hy,Math.round(window.innerWidth*NP))}function ca(e){return Number.isFinite(e)?Math.min(KP(),Math.max(Hy,Math.round(e))):Id}function vc(){return typeof window>"u"?Id:ca(window.innerWidth*RP)}function dh(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function jP(){try{if(typeof window>"u")return Id;const e=window.localStorage.getItem(El);if(!e)return vc();const t=Number(e);return Number.isFinite(t)?ca(t):vc()}catch{return vc()}}function wi(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Mo(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Cl(e){return qy.includes(e)}function qP(){const e=Number(wi(jy,""));if(Cl(e))return e;const t=Number(wi(TP,""));return Cl(t)?t:wi(DP,"0")==="1"?10:3}const fh=3,gh=10;function ph(e){return e.trim().replace(/^\/+/,"")}function HP(e){return/^[\w-]+$/.test(e)}function GP(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const VP=()=>{let e,t;const{lng:n}=P1(),r=q1({projectId:()=>vt()||"",labels:H1}),o=ie(()=>kM(mc(vt()||""),In().customInstructions));se(()=>{const j=vt()||"";j&&EM(j)});const[i,s]=I(!1),[a,u]=I(""),[c,l]=I(""),[d,g]=I(""),[p,h]=I(""),[m,v]=I("project"),[y,b]=I(null),[w,_]=I(!1),[C,k]=I(null),[T,S]=I(null),[A,N]=I(!1),R=ie(()=>{n();const j=o().map(ue=>{const ge=`/${ue.name}`;return{value:ge,label:ge,description:ue.description||E("chat.customSlashCommandNoDescription"),replacement:CM(ue.name,ue.prefill),customId:ue.id,editable:!0,editLabel:E("chat.editCustomSlashCommand",{name:ue.name}),deletable:!0,deleteLabel:E("chat.deleteCustomSlashCommand",{name:ue.name})}});return[{value:"/yorz-debug",description:E("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:E("chat.slashCommandYorzSpec")},...j,{value:"/add-command",label:E("chat.addSlashCommandOption"),description:E("chat.addSlashCommandOptionDescription"),action:"add",icon:"plus"}]}),[L,M]=I(wi(yc,"0")==="1"),[D,F]=I(jP()),[O,B]=I(wi(lh,"0")!=="1"),[ne,G]=I(qP()),[K,ce]=I(""),[U,z]=I(""),[V,re]=I(!0),[me,W]=I(Date.now()),[Y,ee]=I({}),[he,{refetch:Q}]=Jt(()=>vt()||void 0,j=>ye.listSessions(j)),[X]=Jt(()=>{const j=vt();return j&&!K()?j:void 0},j=>ye.getAgentUsageStatus(j));se(()=>{const j=he();if(!j)return;const ue=K();for(const ge of j)ge.running||Ze.markPersisted(ge.id);ee(ge=>{const $e={};for(const Dt of j)$e[Dt.id]=!!Dt.running;return ue&&!(ue in $e)&&ge[ue]===!0&&($e[ue]=!0),$e})}),se(wt(vt,()=>{ce(""),ee({}),Ze.resetAll(),r.reset()})),se(()=>{const j=vt();if(!j)return;const ue=jm(j,{onStatus:ge=>{ee($e=>({...$e,[ge.sessionId]:ge.running})),Q()}});ae(ue)});const te=j=>Y()[j]===!0,le=ie(()=>{const j=K();return j?te(j):!1}),Ae=ie(()=>qM(he()??[],te)),ct=ie(()=>Ae().filter(j=>j.running).length),yt=ie(()=>HM(Ae(),K())),Ge=ie(()=>yt()?.specId),Fe=ie(()=>!!yt()),Et=ie(()=>!Fe()&&he.loading),Ze=jM({projectId:()=>vt()||"",sessionId:K,specId:Ge,running:le,listPending:Et,known:Fe,onSessionIdChange:ce,onRunningChange:(j,ue)=>ee(ge=>({...ge,[j]:ue})),onSessionsChanged:()=>void Q(),onSubjectChange:()=>re(!0),errorLabel:j=>E("chat.errorMessage",{message:j})});function en(j){!j||j===K()||(Q(),ce(j))}se(()=>{const j=j_();if(!j)return;const ue=q_();H_(),en(j),ue&&ue.sessionId===j&&Ze.beginOptimisticRound(j,ue.userText,ue.kind),L()&&(M(!1),Mo(yc,"0"))});const it=()=>L()||Dr();function Kt(){if(Dr()){Qs();return}const j=!L();M(j),Mo(yc,j?"1":"0")}function jt(j){B(j),Mo(lh,j?"0":"1")}function Ft(j){const ue=Number(j);Cl(ue)&&(G(ue),Mo(jy,String(ue)))}function $n(j){return E(j===3?"chat.sessionListRows3":j===5?"chat.sessionListRows5":"chat.sessionListRows10")}function vr(j){const ue=j.title.trim();return ue&&ue!==j.id&&!PP.test(ue)?ue:j.id}Nn(()=>{const j=()=>{const ue=ca(D());ue!==D()&&(F(ue),Mo(El,String(ue)))};window.addEventListener("resize",j),ae(()=>window.removeEventListener("resize",j))}),Nn(()=>{const j=window.setInterval(()=>W(Date.now()),6e4);ae(()=>window.clearInterval(j))});let fe=null,_e=null,Re=null;function pt(j){it()||(j.preventDefault(),fe={startX:j.clientX,startW:D(),raf:null},document.body.classList.add("is-resizing"),_e=ue=>{if(!fe)return;const ge=ca(fe.startW+(ue.clientX-fe.startX));fe.raf==null&&(fe.raf=requestAnimationFrame(()=>{fe&&(fe.raf=null,F(ge))}))},Re=()=>{fe?.raf!=null&&cancelAnimationFrame(fe.raf),fe=null,document.body.classList.remove("is-resizing"),_e&&document.removeEventListener("mousemove",_e),Re&&document.removeEventListener("mouseup",Re),_e=null,Re=null,Mo(El,String(D()))},document.addEventListener("mousemove",_e),document.addEventListener("mouseup",Re))}ae(()=>{_e&&document.removeEventListener("mousemove",_e),Re&&document.removeEventListener("mouseup",Re),document.body.classList.remove("is-resizing")}),se(()=>{Ze.blocks(),V()&&requestAnimationFrame(Ee)});function mn(j){return j.scrollHeight-j.scrollTop-j.clientHeight<=MP}function Ee(){e&&(e.scrollTop=e.scrollHeight)}function Je(){e&&re(mn(e))}function tn(j){return me(),!Number.isFinite(j)||j<=0?"":iM(j,n())}function kt(j){return!Number.isFinite(j)||j<=0?"":new Date(j).toLocaleString(n())}const Ot=ie(()=>(n(),gM(X(),X.loading,{t:E,formatTime:j=>j.toLocaleString(n())})));async function nn(j){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(j),$t.success(E("chat.filePathCopied"))}catch{$t.error(E("chat.filePathCopyFailed"))}}function Xe(j){const ue=dh(j.target);if(!ue||e&&!e.contains(ue))return;const ge=ue.dataset.filePath;ge&&(j.preventDefault(),nn(ge))}function bn(j){if(j.key!=="Enter"&&j.key!==" ")return;const ue=dh(j.target);if(!ue||e&&!e.contains(ue))return;const ge=ue.dataset.filePath;ge&&(j.preventDefault(),nn(ge))}function Bt(){!vt()||!K()||(ce(""),Ze.reset(),r.reset())}async function fn(){const j=U().trim();if(!vt()||!j||Ze.starting()||le()||r.hasPending())return;z("");const ue=await Ze.send(j,r.draftId()??void 0);ue==="sent"?r.reset():ue==="not-started"&&z(j)}function P(j){j.defaultPrevented||j.isComposing||j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),fn())}function oe(){return C()===null&&!!vt()}function be(){u(""),l(""),g(""),h(""),v(vt()?"project":"global"),b(null),k(null)}function Ue(){be(),s(!0)}function Ct(j){const ue=j.customId,ge=ue?o().find($e=>$e.id===ue):void 0;ge&&(k(ge.id),u(ge.name),l(ge.description),g(ge.hiddenPrompt),h(ge.prefill),v(ge.scope),b(null),s(!0))}async function St(j){if(j.preventDefault(),w())return;const ue=ph(a());if(!ue){b(E("chat.customSlashCommandNameRequired"));return}if(!HP(ue)){b(E("chat.customSlashCommandNameInvalid"));return}const ge=C(),$e=vt()||"",Dt=m()==="project"&&$e?"project":"global",Nt=Dt==="project"?mc($e):In().customInstructions,qt=ge?Nt.find(rn=>rn.id===ge):void 0,An={id:qt?.id??GP(),name:ue,description:c().trim(),hiddenPrompt:d().trim(),prefill:p(),createdAt:qt?.createdAt??Date.now()},yn=[...Nt.filter(rn=>rn.id!==An.id&&rn.name!==ue),An];_(!0);try{Dt==="project"?await sh($e,yn):await ih(yn),s(!1),be()}catch(rn){b(rn.message)}finally{_(!1)}}async function De(){const j=T()?.customId;if(!j)return;const ue=o().find(ge=>ge.id===j);if(ue){N(!0);try{if(ue.scope==="project"){const ge=vt()||"";await sh(ge,mc(ge).filter($e=>$e.id!==j))}else await ih(In().customInstructions.filter(ge=>ge.id!==j));S(null)}catch(ge){$t.error(ge.message)}finally{N(!1)}}}return(()=>{var j=bP(),ue=j.firstChild;return x(ue,f(q,{get when(){return!it()},get fallback(){return f(ve,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:Kt,get title(){return E("chat.expand")},get children(){return f(el,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ge=uP();return x(ge,()=>E("chat.title")),ge})(),f(ve,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:Kt,get title(){return E("chat.collapse")},get children(){return f(Pm,{class:"h-4 w-4"})}})]}})),x(j,f(q,{get when(){return!it()},get children(){var ge=gP(),$e=ge.firstChild,Dt=$e.nextSibling,Nt=Dt.firstChild,qt=Nt.firstChild,An=Nt.nextSibling;x(ge,f(q,{get when(){return vt()},get children(){return f(VM,{class:"m-2 rounded-lg shadow-none",get children(){return f(Td,{get open(){return O()},onOpenChange:jt,get children(){return[(()=>{var lt=cP(),Oe=lt.firstChild,At=Oe.nextSibling;return Oe.$$click=()=>jt(!O()),x(Oe,f(q,{get when(){return ct()>0},get fallback(){return(()=>{var tt=ch();return x(tt,()=>E("chat.sessionsLabelPlain")),tt})()},get children(){var tt=ch();return x(tt,()=>E("chat.sessionsLabel",{count:ct()})),tt}})),x(lt,f(Rn,{class:"flex shrink-0 items-center gap-2",get value(){return String(ne())},onChange:Ft,get"aria-label"(){return E("chat.sessionListRows")},get children(){return f(rt,{each:qy,children:tt=>f(an,{get value(){return String(tt)},class:"flex items-center gap-1",get children(){return[f(on,{}),f(pn,{class:"h-3 w-3"}),f(sn,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return $n(tt)}})]}})})}}),At),At.$$click=()=>jt(!O()),x(At,f(Rl,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${O()?"":"-rotate-90"}`}})),Me(tt=>{var Gt=O()?E("chat.collapseSessions"):E("chat.expandSessions"),Co=O()?E("chat.collapseSessions"):E("chat.expandSessions");return Gt!==tt.e&&Be(Oe,"title",tt.e=Gt),Co!==tt.t&&Be(At,"title",tt.t=Co),tt},{e:void 0,t:void 0}),lt})(),f(Dd,{get children(){var lt=lP();return x(lt,f(q,{get when(){return Ae().length>0},get fallback(){return(()=>{var Oe=yP();return x(Oe,()=>E("chat.noRunningSessions")),Oe})()},get children(){return f(rt,{get each(){return Ae()},children:Oe=>(()=>{var At=wP(),tt=At.firstChild,Gt=tt.firstChild,Co=Gt.firstChild,as=Co.nextSibling;as.nextSibling;var Fn=Gt.nextSibling,So=Fn.nextSibling;return tt.$$click=()=>en(Oe.latest.id),x(tt,f(q,{get when(){return Oe.running},get children(){return f(Dn,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Gt),x(Gt,()=>Oe.latest.kind,as),x(Fn,()=>vr(Oe.latest)),x(tt,f(q,{get when(){return Oe.sessions.length>1},get children(){var gn=vP();return gn.firstChild,x(gn,()=>Oe.sessions.length,null),gn}}),So),x(So,()=>tn(Oe.updatedAt)),Me(gn=>{var us=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${yt()?.key===Oe.key?"bg-primary-soft font-semibold":"hover:bg-accent"}`,cs=Oe.running?E("chat.sessionTitleRunning",{kind:Oe.latest.kind,id:Oe.latest.id}):E("chat.sessionTitle",{kind:Oe.latest.kind,id:Oe.latest.id}),ls=kt(Oe.updatedAt);return us!==gn.e&&_t(tt,gn.e=us),cs!==gn.t&&Be(tt,"title",gn.t=cs),ls!==gn.a&&Be(So,"title",gn.a=ls),gn},{e:void 0,t:void 0,a:void 0}),At})()})}})),Me(Oe=>Ci(lt,"max-height",`${ne()*IP+4}px`)),lt}})]}})}})}}),$e),$e.addEventListener("scroll",Je),$e.$$keydown=bn,$e.$$click=Xe;var yn=e;typeof yn=="function"?jn(yn,$e):e=$e,x($e,f(q,{get when(){return Ze.blocks().length>0},get fallback(){return(()=>{var lt=xP(),Oe=lt.firstChild;return x(Oe,(()=>{var At=Z(()=>!!K());return()=>At()?E("chat.empty"):E("chat.draftEmpty")})()),x(lt,f(q,{get when(){return Z(()=>!K())()&&Ot()},children:At=>(()=>{var tt=_P();return x(tt,At),tt})()}),null),lt})()},get children(){return f(Yc,{get each(){return Ze.blocks()},children:lt=>f(q,{get when(){return LP(lt())},get fallback(){return f(q,{get when(){return $P(lt())},get fallback(){return f(q,{get when(){return FP(lt())},get fallback(){return(()=>{var Oe=EP();return x(Oe,()=>BP(lt())?.text),Oe})()},children:Oe=>(()=>{var At=CP();return x(At,f(Yc,{get each(){return Oe().segments},children:tt=>f(q,{get when(){return zP(tt())},get fallback(){return(()=>{var Gt=SP();return Me(()=>Gt.innerHTML=kd(UP(tt()),{mermaid:"code",fileLinks:"copy",fileLinkTitle:E("chat.copyFilePath")})),Gt})()},children:Gt=>f(nP,{get segment(){return Gt()},get expand(){return Ze.toolExpand}})})})),At})()})},children:Oe=>f(aP,{get contexts(){return Oe().contexts}})})},children:Oe=>(()=>{var At=kP(),tt=At.firstChild,Gt=tt.nextSibling;return x(Gt,()=>E("chat.sessionDivider",{kind:Oe().agentKind,time:kt(Oe().startedAt)})),At})()})})}})),x(Dt,f(q,{get when(){return r.count()>0},get children(){var lt=dP();return x(lt,f(Y1,{ctrl:r,compact:!0})),lt}}),Nt),x(Dt,f(q,{get when(){return r.error()},get children(){var lt=fP();return x(lt,()=>r.error()),lt}}),Nt),x(Nt,f(ja,{get projectId(){return vt()||""},get value(){return U()},onValueChange:z,get slashCommands(){return R()},get slashEmptyLabel(){return E("chat.slashCommandNoMatch")},onSlashCommandAction:Ue,onEditSlashCommand:Ct,onDeleteSlashCommand:S,onKeyDown:P,get onPaste(){return r.onPaste},get placeholder(){return Z(()=>!vt())()?E("chat.noSessionPlaceholder"):Z(()=>!!K())()?E("chat.inputPlaceholder"):E("chat.draftPlaceholder")},get disabled(){return!vt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),qt),x(Nt,f(ve,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!vt()||r.count()>=jo},get title(){return E("newSpec.importAttachment")},get children(){return f(s_,{class:"h-4 w-4"})}}),qt),js(qt,"change",r.onFileInputChange);var rn=t;return typeof rn=="function"?jn(rn,qt):t=qt,Be(qt,"accept",j1),x(An,f(ve,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:Bt,get disabled(){return!vt()||!K()},get title(){return E("chat.newSession")},get children(){return f(qr,{class:"h-4 w-4"})}}),null),x(An,f(q,{get when(){return le()},get fallback(){return f(ve,{size:"sm",onClick:()=>void fn(),get disabled(){return!vt()||!U().trim()||Ze.starting()||r.hasPending()},get children(){return[f(ma,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>E("chat.send"))]}})},get children(){return f(ve,{variant:"outline",size:"sm",onClick:()=>void Ze.abort(),get title(){return E("chat.abort")},get children(){return[f(Bm,{class:"mr-1 h-3.5 w-3.5"}),Z(()=>E("chat.abort"))]}})}}),null),ge}}),null),x(j,f(q,{get when(){return!it()},get children(){var ge=pP();return ge.$$mousedown=pt,ge}}),null),x(j,f(un,{get open(){return i()},onOpenChange:ge=>{!ge&&w()||(s(ge),ge||be())},get children(){return f(ur,{class:"max-w-[700px]",get children(){return[f(lr,{get children(){return f(cr,{get children(){return Z(()=>!!C())()?E("chat.editSlashCommandTitle"):E("chat.addSlashCommandTitle")}})}}),(()=>{var ge=mP(),$e=ge.firstChild,Dt=$e.firstChild,Nt=$e.nextSibling,qt=Nt.nextSibling,An=qt.nextSibling,yn=An.firstChild,rn=An.nextSibling,lt=rn.firstChild;return ge.addEventListener("submit",Oe=>void St(Oe)),x($e,()=>E("chat.customSlashCommandScope"),Dt),x($e,f(q,{get when(){return oe()},get fallback(){return(()=>{var Oe=AP();return x(Oe,(()=>{var At=Z(()=>m()==="project");return()=>At()?E("chat.slashCommandScopeProject"):E("chat.slashCommandScopeGlobal")})()),Oe})()},get children(){return f(Rn,{get value(){return m()},onChange:Oe=>v(Oe),class:"flex items-center gap-4",get children(){return f(rt,{get each(){return[{value:"project",label:E("chat.slashCommandScopeProject")},{value:"global",label:E("chat.slashCommandScopeGlobal")}]},children:Oe=>f(an,{get value(){return Oe.value},class:"flex items-center gap-1",get children(){return[f(on,{}),f(pn,{class:"h-3 w-3"}),f(sn,{class:"cursor-pointer text-sm font-normal",get children(){return Oe.label}})]}})})}})}}),Dt),x(Dt,(()=>{var Oe=Z(()=>m()==="project");return()=>Oe()?E("chat.customSlashCommandScopeProjectHint"):E("chat.customSlashCommandScopeGlobalHint")})()),x(Nt,()=>E("chat.customSlashCommandName"),null),x(Nt,f(ar,{id:"chat-custom-command-name",get value(){return a()},get placeholder(){return E("chat.customSlashCommandNamePlaceholder")},onInput:Oe=>{u(Oe.currentTarget.value),b(null)},required:!0}),null),x(qt,()=>E("chat.customSlashCommandDescription"),null),x(qt,f(ar,{id:"chat-custom-command-description",get value(){return c()},get placeholder(){return E("chat.customSlashCommandDescriptionPlaceholder")},onInput:Oe=>l(Oe.currentTarget.value)}),null),x(An,()=>E("chat.customSlashCommandHiddenPrompt"),yn),x(An,f(oa,{id:"chat-custom-command-hidden-prompt",get value(){return d()},get placeholder(){return E("chat.customSlashCommandHiddenPromptPlaceholder")},minRows:fh,maxRows:gh,onInput:Oe=>g(Oe.currentTarget.value)}),yn),x(yn,()=>E("chat.customSlashCommandHiddenPromptHint")),x(rn,()=>E("chat.customSlashCommandPrefill"),lt),x(rn,f(oa,{id:"chat-custom-command-prefill",get value(){return p()},get placeholder(){return E("chat.customSlashCommandPrefillPlaceholder")},minRows:fh,maxRows:gh,onInput:Oe=>h(Oe.currentTarget.value)}),lt),x(lt,()=>E("chat.customSlashCommandPrefillHint")),x(ge,f(q,{get when(){return y()},get children(){var Oe=hP();return x(Oe,y),Oe}}),null),x(ge,f(dr,{get children(){return[f(ve,{type:"button",variant:"outline",onClick:()=>s(!1),get disabled(){return w()},get children(){return E("common.cancel")}}),f(ve,{type:"submit",get disabled(){return!a().trim()||w()},get children(){return Z(()=>!!w())()?E("common.saving"):E("chat.saveCustomSlashCommand")}})]}}),null),ge})()]}})}}),null),x(j,f(un,{get open(){return T()!==null},onOpenChange:ge=>!ge&&!A()&&S(null),get children(){return f(ur,{class:"max-w-sm",get children(){return[f(lr,{get children(){return[f(cr,{get children(){return E("chat.deleteSlashCommandTitle")}}),f(Ba,{get children(){return E("chat.deleteSlashCommandConfirm",{name:ph(T()?.value??"")})}})]}}),f(dr,{get children(){return[f(ve,{variant:"outline",onClick:()=>S(null),get disabled(){return A()},get children(){return E("common.cancel")}}),f(ve,{variant:"destructive",onClick:()=>void De(),get disabled(){return A()},get children(){return Z(()=>!!A())()?E("common.deleting"):E("common.confirmDelete")}})]}})]}})}}),null),Me(ge=>{var $e=`relative flex flex-col border-r bg-background text-base shrink-0 ${it()?"w-9 transition-[width] duration-150":""}`,Dt=it()?void 0:{width:`${D()}px`},Nt=`flex items-center border-b ${it()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return $e!==ge.e&&_t(j,ge.e=$e),ge.t=Ho(j,Dt,ge.t),Nt!==ge.a&&_t(ue,ge.a=Nt),ge},{e:void 0,t:void 0,a:void 0}),j})()};Qt(["click","keydown","mousedown"]);const Gy=["newSpec","toggleSpecDetailFullscreen","projectSettings"],lo={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S"},WP=new Set(["Control","Shift","Alt","Meta"]);function wc(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=Rd(r)}return n.key?Wy(n):null}function Vy(e){if(WP.has(e.key))return null;const t=Rd(e.key);return t?Wy({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function la(e){return{newSpec:wc(e?.newSpec)??lo.newSpec,toggleSpecDetailFullscreen:wc(e?.toggleSpecDetailFullscreen)??lo.toggleSpecDetailFullscreen,projectSettings:wc(e?.projectSettings)??lo.projectSettings}}function hh(e){const t=la(e),n=new Map,r=new Set;for(const o of Gy){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function YP(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function Wy(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(Rd(e.key)),t.join("+")}function Rd(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var ZP=$("<span>"),XP=$('<span class="text-xs font-normal text-muted-foreground">'),JP=$('<p class="m-0 text-sm text-destructive">'),QP=$('<div class="flex flex-col gap-4"><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),eL=$("<p class=text-muted-foreground>"),tL=$('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),nL=$("<p class=text-destructive>");const rL=e=>{const[t,n]=I("claude"),[r,o]=I(!1),[i,s]=I(!1),[a,u]=I("system-default"),[c,l]=I({}),[d,g]=I(null),[p,h]=I(!1),[m,v]=I("idle"),[y,b]=I(null),w=ie(()=>new Set(hh(c())));let _;se(()=>{e.open&&(b(null),T(),v("idle"),h(!0),(async()=>{try{C(await ye.getGlobalConfig())}catch(B){b(B.message),C(yi)}finally{h(!1)}})())});function C(B){n(B.agent.defaultKind),o(!!B.notifications.sessionEnd.banner),s(!!B.notifications.sessionEnd.sound),u(B.power?.inhibitWhenRunning??"system-default"),l(B.shortcuts??{}),g(null)}se(()=>{const B=d();if(!B)return;const ne=G=>{if(G.preventDefault(),G.stopPropagation(),G.key==="Escape"){g(null);return}if(G.key==="Backspace"||G.key==="Delete"){const U={...c(),[B]:null};l(U),g(null),k({shortcuts:U});return}const K=Vy(G);if(!K)return;const ce={...c(),[B]:K};l(ce),g(null),k({shortcuts:ce})};window.addEventListener("keydown",ne,!0),ae(()=>window.removeEventListener("keydown",ne,!0))});async function k(B){b(null);const ne=B.shortcuts??c();if(hh(ne).length>0){b(E("globalConfig.shortcutConflict"));return}T(),v("saving");try{await Fy({agent:{defaultKind:B.agent?.defaultKind??t()},notifications:{sessionEnd:{banner:B.notifications?.sessionEnd.banner??r(),sound:B.notifications?.sessionEnd.sound??i()},push:B.notifications?.push??In().notifications.push},shortcuts:ne,power:{inhibitWhenRunning:B.power?.inhibitWhenRunning??a()},appearance:In().appearance,customInstructions:In().customInstructions}),v("saved"),_=setTimeout(()=>v("idle"),2e3)}catch(G){v("idle"),b(G.message)}}function T(){_&&(clearTimeout(_),_=void 0)}ae(T);function S(B){return E(B==="codex"?"projectConfig.agentCodex":B==="opencode"?"projectConfig.agentOpencode":B==="pi"?"projectConfig.agentPi":"projectConfig.agentClaude")}function A(B){return E(`globalConfig.shortcuts.${B}`)}function N(B){return E(B==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":B==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function R(B){return d()===B?E("globalConfig.shortcutRecording"):la(c())[B]}function L(B){const ne={...c(),[B]:null};l(ne),k({shortcuts:ne})}function M(B){n(B),k({agent:{defaultKind:B}})}function D(B){o(B),k({notifications:{sessionEnd:{banner:B,sound:i()},push:In().notifications.push}})}function F(B){s(B),k({notifications:{sessionEnd:{banner:r(),sound:B},push:In().notifications.push}})}function O(B){u(B),k({power:{inhibitWhenRunning:B}})}return f(un,{get open(){return e.open},onOpenChange:B=>!B&&e.onClose(),get children(){return f(ur,{class:"max-w-[560px]",get children(){return[f(lr,{get children(){return f(cr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var B=ZP();return x(B,()=>E("globalConfig.title")),B})(),f(q,{get when(){return m()!=="idle"},get children(){var B=XP();return x(B,(()=>{var ne=Z(()=>m()==="saving");return()=>ne()?E("globalConfig.saveStatusSaving"):E("globalConfig.saveStatusSaved")})()),B}})]}})}}),f(q,{get when(){return!p()},get fallback(){return(()=>{var B=eL();return x(B,()=>E("common.loading")),B})()},get children(){var B=QP(),ne=B.firstChild,G=ne.firstChild,K=G.nextSibling,ce=ne.nextSibling,U=ce.firstChild,z=U.nextSibling;return x(B,f(Rn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:V=>M(V),get children(){return[f(Li,{class:"mb-1.5 w-full font-medium",get children(){return E("globalConfig.agentDefault")}}),Z(()=>["claude","opencode","codex","pi"].map(V=>f(an,{value:V,class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return S(V)}})]}})))]}}),ne),x(G,()=>E("globalConfig.sessionEnd")),x(K,f(Vo,{get checked(){return r()},onChange:D,class:"flex items-center gap-2",get children(){return[f(Wo,{}),f(Pi,{get children(){return E("globalConfig.banner")}})]}}),null),x(K,f(Vo,{get checked(){return i()},onChange:F,class:"flex items-center gap-2",get children(){return[f(Wo,{}),f(Pi,{get children(){return E("globalConfig.sound")}})]}}),null),x(B,f(Rn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return a()},onChange:V=>O(V),get children(){return[f(Li,{class:"mb-1.5 w-full font-medium",get children(){return E("globalConfig.powerTitle")}}),Z(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(V=>f(an,{value:V,class:"flex items-center gap-1.5",get children(){return[f(on,{}),f(pn,{}),f(sn,{class:"cursor-pointer",get children(){return N(V)}})]}})))]}}),ce),x(U,()=>E("globalConfig.shortcutsTitle")),x(z,f(rt,{each:Gy,children:V=>(()=>{var re=tL(),me=re.firstChild,W=me.firstChild,Y=W.nextSibling;return x(W,()=>A(V)),x(Y,()=>R(V)),x(re,f(ve,{type:"button",variant:"outline",size:"sm",onClick:()=>g(V),get children(){return Z(()=>d()===V)()?E("globalConfig.shortcutRecordingButton"):E("globalConfig.shortcutRecord")}}),null),x(re,f(ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>L(V),get disabled(){return R(V)===lo[V]},get children(){return E("globalConfig.shortcutReset")}}),null),Me(()=>_t(Y,`m-0 font-mono text-sm ${w().has(V)?"text-destructive":"text-muted-foreground"}`)),re})()})),x(ce,f(q,{get when(){return w().size>0},get children(){var V=JP();return x(V,()=>E("globalConfig.shortcutConflict")),V}}),null),x(B,(()=>{var V=Z(()=>!!y());return()=>V()&&(()=>{var re=nL();return x(re,y),re})()})(),null),B}})]}})}})},oL=200,iL=8e3;async function sL({id:e,list:t,intervalMs:n=oL,timeoutMs:r=iL,sleep:o=aL}){const i=Math.max(1,n),s=Math.max(1,Math.ceil(r/i)+1);for(let a=0;a<s;a++){try{if(!(await t()).some(c=>c.id===e))return!0}catch{}a<s-1&&await o(i)}return!1}function aL(e){return new Promise(t=>window.setTimeout(t,e))}var uL=$('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),cL=$('<div class="border-b px-3 py-2">'),lL=$('<div class="max-h-96 overflow-auto p-2">'),dL=$('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function fL(){const[e,t]=I([]),[n,r]=I(null);async function o(){try{t(await ye.listSystemNotifications())}catch{}}se(()=>{o();const u=iE(()=>void o());ae(u)});async function i(u){r(u);try{await ye.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await ye.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await ye.restartSystemNotification(u),t(c=>c.filter(l=>l.id!==u)),await sL({id:u,list:ye.listSystemNotifications}),window.location.reload()}finally{r(null)}}return f(q,{get when(){return e().length>0},get children(){return f(Ua,{placement:"bottom-start",get children(){return[f(za,{as:ve,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return E("systemNotifications.title")},get children(){return[f(Hx,{class:"h-4 w-4"}),uL()]}}),f(Ka,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=cL();return x(u,f(U1,{class:"text-sm font-semibold",get children(){return E("systemNotifications.title")}})),u})(),(()=>{var u=lL();return x(u,f(rt,{get each(){return e()},children:c=>(()=>{var l=dL(),d=l.firstChild,g=d.firstChild,p=g.firstChild,h=p.nextSibling,m=g.nextSibling;return x(p,()=>gL(c)),x(h,()=>pL(c)),x(m,f(q,{get when(){return c.kind==="version-update"},get children(){return f(q,{get when(){return c.action==="restart-ready"},get fallback(){return f(ve,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id||c.action==="updating"},onClick:()=>void s(c.id),get children(){return f(q,{get when(){return n()===c.id||c.action==="updating"},get fallback(){return E("systemNotifications.update")},get children(){return[f(v_,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),Z(()=>E("systemNotifications.updating"))]}})}})},get children(){return f(hd,{openDelay:150,closeDelay:0,get children(){return[f(pd,{as:ve,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id},onClick:()=>void a(c.id),get children(){return E("systemNotifications.restart")}}),f(md,{get children(){return E("systemNotifications.restartTooltip")}})]}})}})}}),null),x(m,f(ve,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return E("systemNotifications.delete")},get disabled(){return n()===c.id},onClick:()=>void i(c.id),get children(){return f(Ml,{class:"h-4 w-4"})}}),null),l})()})),u})()]}})]}})}})}function gL(e){return e.kind==="version-update"?E("systemNotifications.versionTitle"):e.title}function pL(e){return e.kind!=="version-update"?e.message:E("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}var Po={},xc,mh;function hL(){return mh||(mh=1,xc=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),xc}var _c={},Fr={},bh;function _o(){if(bh)return Fr;bh=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Fr.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Fr.getSymbolTotalCodewords=function(r){return t[r]},Fr.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Fr.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Fr.isKanjiModeEnabled=function(){return typeof e<"u"},Fr.toSJIS=function(r){return e(r)},Fr}var Ec={},yh;function Od(){return yh||(yh=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Ec)),Ec}var Cc,vh;function mL(){if(vh)return Cc;vh=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Cc=e,Cc}var Sc,wh;function bL(){if(wh)return Sc;wh=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const i=t*this.size+n;this.data[i]=r,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Sc=e,Sc}var kc={},xh;function yL(){return xh||(xh=1,(function(e){const t=_o().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,i=t(r),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,a=[i-7];for(let u=1;u<o-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},e.getPositions=function(r){const o=[],i=e.getRowColCoords(r),s=i.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||o.push([i[a],i[u]]);return o}})(kc)),kc}var Ac={},_h;function vL(){if(_h)return Ac;_h=1;const e=_o().getSymbolSize,t=7;return Ac.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},Ac}var Tc={},Eh;function wL(){return Eh||(Eh=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,a=0,u=0,c=null,l=null;for(let d=0;d<i;d++){a=u=0,c=l=null;for(let g=0;g<i;g++){let p=o.get(d,g);p===c?a++:(a>=5&&(s+=t.N1+(a-5)),c=p,a=1),p=o.get(g,d),p===l?u++:(u>=5&&(s+=t.N1+(u-5)),l=p,u=1)}a>=5&&(s+=t.N1+(a-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let a=0;a<i-1;a++)for(let u=0;u<i-1;u++){const c=o.get(a,u)+o.get(a,u+1)+o.get(a+1,u)+o.get(a+1,u+1);(c===4||c===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,a=0,u=0;for(let c=0;c<i;c++){a=u=0;for(let l=0;l<i;l++)a=a<<1&2047|o.get(c,l),l>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|o.get(l,c),l>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let u=0;u<s;u++)i+=o.data[u];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function n(r,o,i){switch(r){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,i){const s=i.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)i.isReserved(u,a)||i.xor(u,a,n(o,u,a))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){i(c),e.applyMask(c,o);const l=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(c,o),l<u&&(u=l,a=c)}return a}})(Tc)),Tc}var Os={},Ch;function Yy(){if(Ch)return Os;Ch=1;const e=Od(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Os.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Os.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Os}var Dc={},li={},Sh;function xL(){if(Sh)return li;Sh=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),li.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},li.exp=function(r){return e[r]},li.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},li}var kh;function _L(){return kh||(kh=1,(function(e){const t=xL();e.mul=function(r,o){const i=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<o.length;a++)i[s+a]^=t.mul(r[s],o[a]);return i},e.mod=function(r,o){let i=new Uint8Array(r);for(;i.length-o.length>=0;){const s=i[0];for(let u=0;u<o.length;u++)i[u]^=t.mul(o[u],s);let a=0;for(;a<i.length&&i[a]===0;)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let i=0;i<r;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(Dc)),Dc}var Ic,Ah;function EL(){if(Ah)return Ic;Ah=1;const e=_L();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(i,s),a}return i},Ic=t,Ic}var Rc={},Oc={},Nc={},Th;function Zy(){return Th||(Th=1,Nc.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Nc}var Jn={},Dh;function Xy(){if(Dh)return Jn;Dh=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
35
|
+
]))+`;Jn.KANJI=new RegExp(n,"g"),Jn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Jn.BYTE=new RegExp(r,"g"),Jn.NUMERIC=new RegExp(e,"g"),Jn.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Jn.testKanji=function(u){return o.test(u)},Jn.testNumeric=function(u){return i.test(u)},Jn.testAlphanumeric=function(u){return s.test(u)},Jn}var Ih;function Eo(){return Ih||(Ih=1,(function(e){const t=Zy(),n=Xy();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return n.testNumeric(i)?e.NUMERIC:n.testAlphanumeric(i)?e.ALPHANUMERIC:n.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return r(i)}catch{return s}}})(Oc)),Oc}var Rh;function CL(){return Rh||(Rh=1,(function(e){const t=_o(),n=Yy(),r=Od(),o=Eo(),i=Zy(),s=7973,a=t.getBCHDigit(s);function u(g,p,h){for(let m=1;m<=40;m++)if(p<=e.getCapacity(m,h,g))return m}function c(g,p){return o.getCharCountIndicator(g,p)+4}function l(g,p){let h=0;return g.forEach(function(m){const v=c(m.mode,p);h+=v+m.getBitsLength()}),h}function d(g,p){for(let h=1;h<=40;h++)if(l(g,h)<=e.getCapacity(h,p,o.MIXED))return h}e.from=function(p,h){return i.isValid(p)?parseInt(p,10):h},e.getCapacity=function(p,h,m){if(!i.isValid(p))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=o.BYTE);const v=t.getSymbolTotalCodewords(p),y=n.getTotalCodewordsCount(p,h),b=(v-y)*8;if(m===o.MIXED)return b;const w=b-c(m,p);switch(m){case o.NUMERIC:return Math.floor(w/10*3);case o.ALPHANUMERIC:return Math.floor(w/11*2);case o.KANJI:return Math.floor(w/13);case o.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(p,h){let m;const v=r.from(h,r.M);if(Array.isArray(p)){if(p.length>1)return d(p,v);if(p.length===0)return 1;m=p[0]}else m=p;return u(m.mode,m.getLength(),v)},e.getEncodedBits=function(p){if(!i.isValid(p)||p<7)throw new Error("Invalid QR Code version");let h=p<<12;for(;t.getBCHDigit(h)-a>=0;)h^=s<<t.getBCHDigit(h)-a;return p<<12|h}})(Rc)),Rc}var Mc={},Oh;function SL(){if(Oh)return Mc;Oh=1;const e=_o(),t=1335,n=21522,r=e.getBCHDigit(t);return Mc.getEncodedBits=function(i,s){const a=i.bit<<3|s;let u=a<<10;for(;e.getBCHDigit(u)-r>=0;)u^=t<<e.getBCHDigit(u)-r;return(a<<10|u)^n},Mc}var Pc={},Lc,Nh;function kL(){if(Nh)return Lc;Nh=1;const e=Eo();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,i,s;for(o=0;o+3<=this.data.length;o+=3)i=this.data.substr(o,3),s=parseInt(i,10),r.put(s,10);const a=this.data.length-o;a>0&&(i=this.data.substr(o),s=parseInt(i,10),r.put(s,a*3+1))},Lc=t,Lc}var $c,Mh;function AL(){if(Mh)return $c;Mh=1;const e=Eo(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[i]),6)},$c=n,$c}var Fc,Ph;function TL(){if(Ph)return Fc;Ph=1;const e=Eo();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},Fc=t,Fc}var Bc,Lh;function DL(){if(Lh)return Bc;Lh=1;const e=Eo(),t=_o();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let i=t.toSJIS(this.data[o]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
36
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),r.put(i,13)}},Bc=n,Bc}var zc={exports:{}},$h;function IL(){return $h||($h=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var i={},s={};s[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var u,c,l,d,g,p,h,m,v;!a.empty();){u=a.pop(),c=u.value,d=u.cost,g=n[c]||{};for(l in g)g.hasOwnProperty(l)&&(p=g[l],h=d+p,m=s[l],v=typeof s[l]>"u",(v||m>h)&&(s[l]=h,a.push(l,h),i[l]=c))}if(typeof o<"u"&&typeof s[o]>"u"){var y=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(y)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],i=r;i;)o.push(i),n[i],i=n[i];return o.reverse(),o},find_path:function(n,r,o){var i=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(zc)),zc.exports}var Fh;function RL(){return Fh||(Fh=1,(function(e){const t=Eo(),n=kL(),r=AL(),o=TL(),i=DL(),s=Xy(),a=_o(),u=IL();function c(y){return unescape(encodeURIComponent(y)).length}function l(y,b,w){const _=[];let C;for(;(C=y.exec(w))!==null;)_.push({data:C[0],index:C.index,mode:b,length:C[0].length});return _}function d(y){const b=l(s.NUMERIC,t.NUMERIC,y),w=l(s.ALPHANUMERIC,t.ALPHANUMERIC,y);let _,C;return a.isKanjiModeEnabled()?(_=l(s.BYTE,t.BYTE,y),C=l(s.KANJI,t.KANJI,y)):(_=l(s.BYTE_KANJI,t.BYTE,y),C=[]),b.concat(w,_,C).sort(function(T,S){return T.index-S.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function g(y,b){switch(b){case t.NUMERIC:return n.getBitsLength(y);case t.ALPHANUMERIC:return r.getBitsLength(y);case t.KANJI:return i.getBitsLength(y);case t.BYTE:return o.getBitsLength(y)}}function p(y){return y.reduce(function(b,w){const _=b.length-1>=0?b[b.length-1]:null;return _&&_.mode===w.mode?(b[b.length-1].data+=w.data,b):(b.push(w),b)},[])}function h(y){const b=[];for(let w=0;w<y.length;w++){const _=y[w];switch(_.mode){case t.NUMERIC:b.push([_,{data:_.data,mode:t.ALPHANUMERIC,length:_.length},{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.ALPHANUMERIC:b.push([_,{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.KANJI:b.push([_,{data:_.data,mode:t.BYTE,length:c(_.data)}]);break;case t.BYTE:b.push([{data:_.data,mode:t.BYTE,length:c(_.data)}])}}return b}function m(y,b){const w={},_={start:{}};let C=["start"];for(let k=0;k<y.length;k++){const T=y[k],S=[];for(let A=0;A<T.length;A++){const N=T[A],R=""+k+A;S.push(R),w[R]={node:N,lastCount:0},_[R]={};for(let L=0;L<C.length;L++){const M=C[L];w[M]&&w[M].node.mode===N.mode?(_[M][R]=g(w[M].lastCount+N.length,N.mode)-g(w[M].lastCount,N.mode),w[M].lastCount+=N.length):(w[M]&&(w[M].lastCount=N.length),_[M][R]=g(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,b))}}C=S}for(let k=0;k<C.length;k++)_[C[k]].end=0;return{map:_,table:w}}function v(y,b){let w;const _=t.getBestModeForData(y);if(w=t.from(b,_),w!==t.BYTE&&w.bit<_.bit)throw new Error('"'+y+'" cannot be encoded with mode '+t.toString(w)+`.
|
|
37
|
+
Suggested mode is: `+t.toString(_));switch(w===t.KANJI&&!a.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new n(y);case t.ALPHANUMERIC:return new r(y);case t.KANJI:return new i(y);case t.BYTE:return new o(y)}}e.fromArray=function(b){return b.reduce(function(w,_){return typeof _=="string"?w.push(v(_,null)):_.data&&w.push(v(_.data,_.mode)),w},[])},e.fromString=function(b,w){const _=d(b,a.isKanjiModeEnabled()),C=h(_),k=m(C,w),T=u.find_path(k.map,"start","end"),S=[];for(let A=1;A<T.length-1;A++)S.push(k.table[T[A]].node);return e.fromArray(p(S))},e.rawSplit=function(b){return e.fromArray(d(b,a.isKanjiModeEnabled()))}})(Pc)),Pc}var Bh;function OL(){if(Bh)return _c;Bh=1;const e=_o(),t=Od(),n=mL(),r=bL(),o=yL(),i=vL(),s=wL(),a=Yy(),u=EL(),c=CL(),l=SL(),d=Eo(),g=RL();function p(k,T){const S=k.size,A=i.getPositions(T);for(let N=0;N<A.length;N++){const R=A[N][0],L=A[N][1];for(let M=-1;M<=7;M++)if(!(R+M<=-1||S<=R+M))for(let D=-1;D<=7;D++)L+D<=-1||S<=L+D||(M>=0&&M<=6&&(D===0||D===6)||D>=0&&D<=6&&(M===0||M===6)||M>=2&&M<=4&&D>=2&&D<=4?k.set(R+M,L+D,!0,!0):k.set(R+M,L+D,!1,!0))}}function h(k){const T=k.size;for(let S=8;S<T-8;S++){const A=S%2===0;k.set(S,6,A,!0),k.set(6,S,A,!0)}}function m(k,T){const S=o.getPositions(T);for(let A=0;A<S.length;A++){const N=S[A][0],R=S[A][1];for(let L=-2;L<=2;L++)for(let M=-2;M<=2;M++)L===-2||L===2||M===-2||M===2||L===0&&M===0?k.set(N+L,R+M,!0,!0):k.set(N+L,R+M,!1,!0)}}function v(k,T){const S=k.size,A=c.getEncodedBits(T);let N,R,L;for(let M=0;M<18;M++)N=Math.floor(M/3),R=M%3+S-8-3,L=(A>>M&1)===1,k.set(N,R,L,!0),k.set(R,N,L,!0)}function y(k,T,S){const A=k.size,N=l.getEncodedBits(T,S);let R,L;for(R=0;R<15;R++)L=(N>>R&1)===1,R<6?k.set(R,8,L,!0):R<8?k.set(R+1,8,L,!0):k.set(A-15+R,8,L,!0),R<8?k.set(8,A-R-1,L,!0):R<9?k.set(8,15-R-1+1,L,!0):k.set(8,15-R-1,L,!0);k.set(A-8,8,1,!0)}function b(k,T){const S=k.size;let A=-1,N=S-1,R=7,L=0;for(let M=S-1;M>0;M-=2)for(M===6&&M--;;){for(let D=0;D<2;D++)if(!k.isReserved(N,M-D)){let F=!1;L<T.length&&(F=(T[L]>>>R&1)===1),k.set(N,M-D,F),R--,R===-1&&(L++,R=7)}if(N+=A,N<0||S<=N){N-=A,A=-A;break}}}function w(k,T,S){const A=new n;S.forEach(function(D){A.put(D.mode.bit,4),A.put(D.getLength(),d.getCharCountIndicator(D.mode,k)),D.write(A)});const N=e.getSymbolTotalCodewords(k),R=a.getTotalCodewordsCount(k,T),L=(N-R)*8;for(A.getLengthInBits()+4<=L&&A.put(0,4);A.getLengthInBits()%8!==0;)A.putBit(0);const M=(L-A.getLengthInBits())/8;for(let D=0;D<M;D++)A.put(D%2?17:236,8);return _(A,k,T)}function _(k,T,S){const A=e.getSymbolTotalCodewords(T),N=a.getTotalCodewordsCount(T,S),R=A-N,L=a.getBlocksCount(T,S),M=A%L,D=L-M,F=Math.floor(A/L),O=Math.floor(R/L),B=O+1,ne=F-O,G=new u(ne);let K=0;const ce=new Array(L),U=new Array(L);let z=0;const V=new Uint8Array(k.buffer);for(let ee=0;ee<L;ee++){const he=ee<D?O:B;ce[ee]=V.slice(K,K+he),U[ee]=G.encode(ce[ee]),K+=he,z=Math.max(z,he)}const re=new Uint8Array(A);let me=0,W,Y;for(W=0;W<z;W++)for(Y=0;Y<L;Y++)W<ce[Y].length&&(re[me++]=ce[Y][W]);for(W=0;W<ne;W++)for(Y=0;Y<L;Y++)re[me++]=U[Y][W];return re}function C(k,T,S,A){let N;if(Array.isArray(k))N=g.fromArray(k);else if(typeof k=="string"){let F=T;if(!F){const O=g.rawSplit(k);F=c.getBestVersionForData(O,S)}N=g.fromString(k,F||40)}else throw new Error("Invalid data");const R=c.getBestVersionForData(N,S);if(!R)throw new Error("The amount of data is too big to be stored in a QR Code");if(!T)T=R;else if(T<R)throw new Error(`
|
|
38
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
39
|
+
Minimum version required to store current data is: `+R+`.
|
|
40
|
+
`);const L=w(T,S,N),M=e.getSymbolSize(T),D=new r(M);return p(D,T),h(D),m(D,T),y(D,S,0),T>=7&&v(D,T),b(D,L),isNaN(A)&&(A=s.getBestMask(D,y.bind(null,D,S))),s.applyMask(A,D),y(D,S,A),{modules:D,version:T,errorCorrectionLevel:S,maskPattern:A,segments:N}}return _c.create=function(T,S){if(typeof T>"u"||T==="")throw new Error("No input text");let A=t.M,N,R;return typeof S<"u"&&(A=t.from(S.errorCorrectionLevel,t.M),N=c.from(S.version),R=s.from(S.maskPattern),S.toSJISFunc&&e.setToSJISFunction(S.toSJISFunc)),C(T,N,A,R)},_c}var Uc={},Kc={},zh;function Jy(){return zh||(zh=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const i=e.getScale(r,o);return Math.floor((r+o.margin*2)*i)},e.qrToImageData=function(r,o,i){const s=o.modules.size,a=o.modules.data,u=e.getScale(s,i),c=Math.floor((s+i.margin*2)*u),l=i.margin*u,d=[i.color.light,i.color.dark];for(let g=0;g<c;g++)for(let p=0;p<c;p++){let h=(g*c+p)*4,m=i.color.light;if(g>=l&&p>=l&&g<c-l&&p<c-l){const v=Math.floor((g-l)/u),y=Math.floor((p-l)/u);m=d[a[v*s+y]?1:0]}r[h++]=m.r,r[h++]=m.g,r[h++]=m.b,r[h]=m.a}}})(Kc)),Kc}var Uh;function NL(){return Uh||(Uh=1,(function(e){const t=Jy();function n(o,i,s){o.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,a){let u=a,c=s;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=t.getOptions(u);const l=t.getImageWidth(i.modules.size,u),d=c.getContext("2d"),g=d.createImageData(l,l);return t.qrToImageData(g.data,i,u),n(d,c,l),d.putImageData(g,0,0),c},e.renderToDataURL=function(i,s,a){let u=a;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=e.render(i,s,u),l=u.type||"image/png",d=u.rendererOpts||{};return c.toDataURL(l,d.quality)}})(Uc)),Uc}var jc={},Kh;function ML(){if(Kh)return jc;Kh=1;const e=Jy();function t(o,i){const s=o.a/255,a=i+'="'+o.hex+'"';return s<1?a+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(o,i,s){let a=o+i;return typeof s<"u"&&(a+=" "+s),a}function r(o,i,s){let a="",u=0,c=!1,l=0;for(let d=0;d<o.length;d++){const g=Math.floor(d%i),p=Math.floor(d/i);!g&&!c&&(c=!0),o[d]?(l++,d>0&&g>0&&o[d-1]||(a+=c?n("M",g+s,.5+p+s):n("m",u,0),u=0,c=!1),g+1<i&&o[d+1]||(a+=n("h",l),l=0)):u++}return a}return jc.render=function(i,s,a){const u=e.getOptions(s),c=i.modules.size,l=i.modules.data,d=c+u.margin*2,g=u.color.light.a?"<path "+t(u.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",p="<path "+t(u.color.dark,"stroke")+' d="'+r(l,c,u.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+h+' shape-rendering="crispEdges">'+g+p+`</svg>
|
|
41
|
+
`;return typeof a=="function"&&a(null,v),v},jc}var jh;function PL(){if(jh)return Po;jh=1;const e=hL(),t=OL(),n=NL(),r=ML();function o(i,s,a,u,c){const l=[].slice.call(arguments,1),d=l.length,g=typeof l[d-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(d<2)throw new Error("Too few arguments provided");d===2?(c=a,a=s,s=u=void 0):d===3&&(s.getContext&&typeof c>"u"?(c=u,u=void 0):(c=u,u=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=u=void 0):d===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(p,h){try{const m=t.create(a,u);p(i(m,s,u))}catch(m){h(m)}})}try{const p=t.create(a,u);c(null,i(p,s,u))}catch(p){c(p)}}return Po.create=t.create,Po.toCanvas=o.bind(null,n.render),Po.toDataURL=o.bind(null,n.renderToDataURL),Po.toString=o.bind(null,function(i,s,a){return r.render(i,a)}),Po}var LL=PL();const $L=ss(LL);var FL=$('<p class="mb-3 text-xs text-muted-foreground">'),BL=$('<img class="h-44 w-44 rounded bg-white p-2">'),zL=$('<div class="flex flex-col items-center gap-3"><div class="font-mono text-lg tracking-widest"></div><button type=button class="text-xs text-muted-foreground underline">'),UL=$('<div class="py-10 text-center text-sm text-muted-foreground">'),KL=$('<div class="flex flex-col items-center gap-3 py-4"><p class="text-sm text-destructive">');function jL(){const[e,t]=I(!1),[n,r]=I(null),[o,i]=I(null),[s,a]=I(!1),[u,c]=I(!1),l=async()=>{c(!0),a(!1);try{const d=await ye.getPairingCode();r(d.code);const g=await $L.toDataURL(d.code,{width:220,margin:1});i(g)}catch{a(!0),r(null),i(null)}finally{c(!1)}};return se(()=>{e()&&l()}),f(Ua,{get open(){return e()},onOpenChange:t,get children(){return[f(za,{as:ve,variant:"ghost",size:"icon",get title(){return E("pairing.title")},get children(){return f(g_,{class:"h-4 w-4"})}}),f(Ka,{class:"w-72",get children(){return[f(U1,{class:"mb-2 pr-6 text-sm font-semibold",get children(){return E("pairing.title")}}),(()=>{var d=FL();return x(d,()=>E("pairing.hint")),d})(),f(q,{get when(){return!u()},get fallback(){return(()=>{var d=UL();return x(d,()=>E("pairing.loading")),d})()},get children(){return f(q,{get when(){return!s()},get fallback(){return(()=>{var d=KL(),g=d.firstChild;return x(g,()=>E("pairing.error")),x(d,f(ve,{size:"sm",variant:"outline",onClick:()=>void l(),get children(){return E("pairing.retry")}}),null),d})()},get children(){var d=zL(),g=d.firstChild,p=g.nextSibling;return x(d,f(q,{get when(){return o()},get children(){var h=BL();return Me(m=>{var v=o(),y=E("pairing.title");return v!==m.e&&Be(h,"src",m.e=v),y!==m.t&&Be(h,"alt",m.t=y),m},{e:void 0,t:void 0}),h}}),g),x(g,n),p.$$click=()=>void l(),x(p,()=>E("pairing.refresh")),d}})}})]}})]}})}Qt(["click"]);function qL(e,t){return typeof t=="number"?t===0?null:t<0?"back":"forward":bN(e,Py(t))}var qh=$('<div class="px-2 py-1 text-xs text-muted-foreground">'),HL=$('<div class="shrink-0 border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-xs text-destructive">'),GL=$('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="vt-page flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const VL=[{mode:"system",labelKey:"shell.themeSystem",icon:$m},{mode:"light",labelKey:"shell.themeLight",icon:D_},{mode:"dark",labelKey:"shell.themeDark",icon:e_}],WL=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],YL="https://github.com/hughfenghen/YorZ/blob/main/docs",ZL=e=>{const t=Qo(),n=Yr();wN({resolveDirection:qL});const{lng:r,changeLanguage:o}=P1(),[i,s]=I(!1),a=ie(()=>t.pathname===It("specs/new")),u=ie(()=>`${YL}/${r().startsWith("en")?"User-Guide.md":"User-Guide-CN.md"}`);function c(m){m!==r()&&(o(m),vi(v=>({...v,appearance:{...v.appearance,language:m}})))}function l(m){Dm(m),vi(v=>({...v,appearance:{...v.appearance,themeMode:m}}))}function d(m){xx(m),vi(v=>({...v,appearance:{...v.appearance,themeName:m}}))}function g(){if(!vt())return;const m=It("specs/new");a()?window.open(m,"_blank","noopener"):n(m)}function p(m){const v=la(In().shortcuts);if(m===v.newSpec)return g(),!0;if(m===v.projectSettings)return X_(),!0;if(m===v.toggleSpecDetailFullscreen){const y=Z_();return y?(y(),!0):!1}return!1}const h=m=>{if(m.defaultPrevented)return;const v=Vy(m);if(!v)return;const y=la(In().shortcuts),b=v===y.toggleSpecDetailFullscreen||v===y.projectSettings;YP(m.target)&&!b||v!==lo.newSpec&&v!==lo.projectSettings&&v!==lo.toggleSpecDetailFullscreen&&!Object.values(In().shortcuts).includes(v)||p(v)&&m.preventDefault()};return Nn(()=>{pM(),window.addEventListener("keydown",h)}),ae(()=>window.removeEventListener("keydown",h)),se(()=>{const m=t.pathname.match(/^\/([^/]+)/);G_(m&&m[1]!=="api"?m[1]:"")}),(()=>{var m=GL(),v=m.firstChild,y=v.firstChild,b=v.nextSibling,w=b.firstChild;return x(v,f(zn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),y),x(v,f(jL,{}),y),x(v,f(fL,{}),y),x(y,f(q,{get when(){return vt()},get children(){return f(ve,{as:zn,get href(){return It("specs/new")},get target(){return a()?"_blank":void 0},get rel(){return a()?"noopener":void 0},variant:"default",size:"sm",get children(){return[f(qr,{class:"mr-1 h-4 w-4"}),Z(()=>E("shell.newSpec"))]}})}}),null),x(y,f(fd,{placement:"bottom-end",get children(){return[f(dd,{as:ve,variant:"ghost",size:"icon",get title(){return E("shell.settingsMenu")},get children(){return f(G2,{class:"h-4 w-4"})}}),f(gd,{get children(){return[f(lg,{get children(){return[f(dg,{"data-submenu":"language",get children(){return[f(F2,{class:"mr-2 h-4 w-4"}),Z(()=>E("shell.languageSwitch"))]}}),f(fg,{get children(){return[f(er,{onSelect:()=>c("zh-CN"),get children(){return[f(bs,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),Z(()=>E("shell.langZh"))]}}),f(er,{onSelect:()=>c("en"),get children(){return[f(bs,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),Z(()=>E("shell.langEn"))]}})]}})]}}),f(lg,{get children(){return[f(dg,{"data-submenu":"theme",get children(){return[f(r_,{class:"mr-2 h-4 w-4"}),Z(()=>E("shell.themeSwitch"))]}}),f(fg,{get children(){return[(()=>{var _=qh();return x(_,()=>E("shell.themeModeGroup")),_})(),f(rt,{each:VL,children:_=>f(er,{get"data-theme-option"(){return _.mode},onSelect:()=>l(_.mode),get children(){return[f(bs,{get class(){return`mr-2 h-4 w-4 ${Zs()===_.mode?"opacity-100":"opacity-0"}`}}),f(_.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),Z(()=>E(_.labelKey))]}})}),f(gl,{}),(()=>{var _=qh();return x(_,()=>E("shell.themeNameGroup")),_})(),f(rt,{each:WL,children:_=>f(er,{get"data-theme-name-option"(){return _.name},onSelect:()=>d(_.name),get children(){return[f(bs,{get class(){return`mr-2 h-4 w-4 ${Xs()===_.name?"opacity-100":"opacity-0"}`}}),Z(()=>E(_.labelKey))]}})})]}})]}}),f(gl,{}),f(er,{onSelect:()=>s(!0),get children(){return[f(C_,{class:"mr-2 h-4 w-4"}),Z(()=>E("shell.globalConfig"))]}}),f(er,{as:"a","data-menu-item":"user-guide",get href(){return u()},target:"_blank",rel:"noopener noreferrer",get children(){return[f(Wx,{class:"mr-2 h-4 w-4"}),Z(()=>E("shell.userGuide"))]}})]}})]}}),null),x(m,f(q,{get when(){return Tx()},get children(){var _=HL();return x(_,()=>E("pairing.unauthorized")),_}}),b),x(b,f(ZN,{}),w),x(b,f(VP,{}),w),x(w,()=>e.children),x(m,f(O3,{position:"top-center"}),null),x(m,f(rL,{get open(){return i()},onClose:()=>s(!1)}),null),m})()};Ex({persistHint:!1});Rx();const Qy=document.getElementById("app");if(!Qy)throw new Error("missing #app root");Nv(()=>f(ww,{root:ZL,get children(){return[f(xr,{path:"/",component:pN}),f(xr,{path:"/:projectId",component:wA}),f(xr,{path:"/:projectId/git",component:U4}),f(xr,{path:"/:projectId/commands/:runId",component:eN}),f(xr,{path:"/:projectId/specs/new",component:bT}),f(xr,{path:"/:projectId/specs/:id",component:zO}),f(xr,{path:"/:projectId/specs/:id/review",component:N4}),f(xr,{path:"/:projectId/specs/:id/debug",component:B4}),f(xr,{path:"*",component:My})]}}),Qy);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{mR as _,ss as g};
|