@aggroot-team/aggroot 1.10.5 → 1.10.7
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/index.cjs +839 -824
- package/package.json +156 -157
- package/share/agents/agent-coder.json +256 -256
- package/share/agents/agent-devops.json +75 -61
- package/share/agents/agent-meeting-export.json +33 -38
- package/share/scripts/_utils.py +1 -1
- package/share/web/dist/assets/{arc-DAWWGenL.js → arc-BlaRQKUA.js} +1 -1
- package/share/web/dist/assets/{architectureDiagram-3BPJPVTR-Cjrx69uF.js → architectureDiagram-3BPJPVTR-3hbIeNlM.js} +1 -1
- package/share/web/dist/assets/{blockDiagram-GPEHLZMM-DLOBpwDC.js → blockDiagram-GPEHLZMM-D0HBY6LU.js} +1 -1
- package/share/web/dist/assets/{c4Diagram-AAUBKEIU-BcJ4_JAq.js → c4Diagram-AAUBKEIU-BtXR-tZb.js} +1 -1
- package/share/web/dist/assets/channel-Cnf9lfJy.js +1 -0
- package/share/web/dist/assets/{chunk-2J33WTMH-BISdYB-C.js → chunk-2J33WTMH-9FF83i-m.js} +1 -1
- package/share/web/dist/assets/{chunk-4BX2VUAB-CCQ9jIht.js → chunk-4BX2VUAB-BTNyldUN.js} +1 -1
- package/share/web/dist/assets/{chunk-55IACEB6-BPBdaRwo.js → chunk-55IACEB6-BSHgOvJ-.js} +1 -1
- package/share/web/dist/assets/{chunk-727SXJPM-CmcZ5Wyu.js → chunk-727SXJPM-DeYZVnTV.js} +1 -1
- package/share/web/dist/assets/{chunk-AQP2D5EJ-Duv8-QjT.js → chunk-AQP2D5EJ-lAhxexsW.js} +1 -1
- package/share/web/dist/assets/{chunk-FMBD7UC4-Dp4dDCyM.js → chunk-FMBD7UC4-BhpSyTvy.js} +1 -1
- package/share/web/dist/assets/{chunk-ND2GUHAM-AtOkcwxO.js → chunk-ND2GUHAM-BW3zIC-_.js} +1 -1
- package/share/web/dist/assets/{chunk-QZHKN3VN-BtT9oUo_.js → chunk-QZHKN3VN-CXJHIVX5.js} +1 -1
- package/share/web/dist/assets/classDiagram-4FO5ZUOK-DSiH2rFL.js +1 -0
- package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-DSiH2rFL.js +1 -0
- package/share/web/dist/assets/{cose-bilkent-S5V4N54A-CWS9LN88.js → cose-bilkent-S5V4N54A-HgNozuI9.js} +1 -1
- package/share/web/dist/assets/{dagre-BM42HDAG-CrTY01ZS.js → dagre-BM42HDAG-DuFehwqT.js} +1 -1
- package/share/web/dist/assets/{diagram-2AECGRRQ-4mPaQta7.js → diagram-2AECGRRQ-DDdI0uEK.js} +1 -1
- package/share/web/dist/assets/{diagram-5GNKFQAL-B8EZUuHv.js → diagram-5GNKFQAL-DjfrsPLC.js} +1 -1
- package/share/web/dist/assets/{diagram-KO2AKTUF-BIQRBLfy.js → diagram-KO2AKTUF-DUlrOKY_.js} +1 -1
- package/share/web/dist/assets/{diagram-LMA3HP47-CTcd_yQW.js → diagram-LMA3HP47-AWc_twDt.js} +1 -1
- package/share/web/dist/assets/{diagram-OG6HWLK6-CNMAfaNl.js → diagram-OG6HWLK6-DczXzYze.js} +1 -1
- package/share/web/dist/assets/{erDiagram-TEJ5UH35-DJ5B_v36.js → erDiagram-TEJ5UH35-kB2Dv3Eg.js} +1 -1
- package/share/web/dist/assets/{flowDiagram-I6XJVG4X-CcNqYro5.js → flowDiagram-I6XJVG4X-C4HhF__U.js} +1 -1
- package/share/web/dist/assets/{ganttDiagram-6RSMTGT7-BqQpl_AI.js → ganttDiagram-6RSMTGT7-DX5o7rTU.js} +1 -1
- package/share/web/dist/assets/{gitGraphDiagram-PVQCEYII-CEFbnH6X.js → gitGraphDiagram-PVQCEYII-71rP5XPJ.js} +1 -1
- package/share/web/dist/assets/index-BuMJegY0.js +470 -0
- package/share/web/dist/assets/{infoDiagram-5YYISTIA-BnCd67vl.js → infoDiagram-5YYISTIA-DBvPer2N.js} +1 -1
- package/share/web/dist/assets/{ishikawaDiagram-YF4QCWOH-C-w0E12m.js → ishikawaDiagram-YF4QCWOH-CgUep-i8.js} +1 -1
- package/share/web/dist/assets/{journeyDiagram-JHISSGLW-Cmyx-4-x.js → journeyDiagram-JHISSGLW-_wUVQQqc.js} +1 -1
- package/share/web/dist/assets/{kanban-definition-UN3LZRKU-DUkxtwzE.js → kanban-definition-UN3LZRKU-Dui9E6Ob.js} +1 -1
- package/share/web/dist/assets/{linear-B3Fq5BWd.js → linear-DiLRoIVy.js} +1 -1
- package/share/web/dist/assets/{mindmap-definition-RKZ34NQL-BjID6Hwn.js → mindmap-definition-RKZ34NQL-CdQkrn48.js} +1 -1
- package/share/web/dist/assets/{pieDiagram-4H26LBE5-D4x-T8gz.js → pieDiagram-4H26LBE5-Bd4Y92PJ.js} +1 -1
- package/share/web/dist/assets/{quadrantDiagram-W4KKPZXB-DVV9SA8B.js → quadrantDiagram-W4KKPZXB-CTcGIiQn.js} +1 -1
- package/share/web/dist/assets/{requirementDiagram-4Y6WPE33-79_wp-3B.js → requirementDiagram-4Y6WPE33-PFMmQnSB.js} +1 -1
- package/share/web/dist/assets/{sankeyDiagram-5OEKKPKP-D47XBz-f.js → sankeyDiagram-5OEKKPKP-C_VXI7-f.js} +1 -1
- package/share/web/dist/assets/{sequenceDiagram-3UESZ5HK-CT6TJy_g.js → sequenceDiagram-3UESZ5HK-BijNqzUr.js} +1 -1
- package/share/web/dist/assets/{stateDiagram-AJRCARHV-CbopWyKG.js → stateDiagram-AJRCARHV-BAeQjHqE.js} +1 -1
- package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-UIUY7oFN.js +1 -0
- package/share/web/dist/assets/{timeline-definition-PNZ67QCA-DVXrrEwF.js → timeline-definition-PNZ67QCA-DZCID9hB.js} +1 -1
- package/share/web/dist/assets/{vennDiagram-CIIHVFJN-DRarK0mr.js → vennDiagram-CIIHVFJN-QvX87x-_.js} +1 -1
- package/share/web/dist/assets/{wardley-L42UT6IY-BHzWkMs7.js → wardley-L42UT6IY-CbAQ1l2l.js} +1 -1
- package/share/web/dist/assets/{wardleyDiagram-YWT4CUSO-CG_fUTZL.js → wardleyDiagram-YWT4CUSO-DEF9mErf.js} +1 -1
- package/share/web/dist/assets/{xychartDiagram-2RQKCTM6-BJFWt8tQ.js → xychartDiagram-2RQKCTM6-De9GfjwK.js} +1 -1
- package/share/web/dist/index.html +1 -1
- package/share/web/dist/assets/arc-DGAyaozb.js +0 -1
- package/share/web/dist/assets/arc-HbtxQJy3.js +0 -1
- package/share/web/dist/assets/architectureDiagram-3BPJPVTR-CJQ3_Xaw.js +0 -36
- package/share/web/dist/assets/architectureDiagram-3BPJPVTR-DBjyco54.js +0 -36
- package/share/web/dist/assets/blockDiagram-GPEHLZMM-3t2ofZz0.js +0 -132
- package/share/web/dist/assets/blockDiagram-GPEHLZMM-DV_MSqCU.js +0 -132
- package/share/web/dist/assets/c4Diagram-AAUBKEIU-B3e26q4H.js +0 -10
- package/share/web/dist/assets/c4Diagram-AAUBKEIU-qBKEMeh0.js +0 -10
- package/share/web/dist/assets/channel-88yq8-21.js +0 -1
- package/share/web/dist/assets/channel-BBcKWs2I.js +0 -1
- package/share/web/dist/assets/channel-D3uC32yU.js +0 -1
- package/share/web/dist/assets/chunk-2J33WTMH-KQRj36t0.js +0 -1
- package/share/web/dist/assets/chunk-2J33WTMH-tf0mV7GG.js +0 -1
- package/share/web/dist/assets/chunk-4BX2VUAB-CiQaygfY.js +0 -1
- package/share/web/dist/assets/chunk-4BX2VUAB-HgR5mMZH.js +0 -1
- package/share/web/dist/assets/chunk-55IACEB6-C5Ps8JH7.js +0 -1
- package/share/web/dist/assets/chunk-55IACEB6-Dghi_9zV.js +0 -1
- package/share/web/dist/assets/chunk-727SXJPM-B9F6yQpk.js +0 -206
- package/share/web/dist/assets/chunk-727SXJPM-fQM7qqXa.js +0 -206
- package/share/web/dist/assets/chunk-AQP2D5EJ-CKe_kWkr.js +0 -231
- package/share/web/dist/assets/chunk-AQP2D5EJ-Wp1_vZxD.js +0 -231
- package/share/web/dist/assets/chunk-FMBD7UC4-JzMA_sn1.js +0 -15
- package/share/web/dist/assets/chunk-FMBD7UC4-t5dwvEtU.js +0 -15
- package/share/web/dist/assets/chunk-ND2GUHAM-DcXw_V8A.js +0 -1
- package/share/web/dist/assets/chunk-ND2GUHAM-DvOTRk5O.js +0 -1
- package/share/web/dist/assets/chunk-QZHKN3VN-DdX7pvQV.js +0 -1
- package/share/web/dist/assets/chunk-QZHKN3VN-Dsnaya_3.js +0 -1
- package/share/web/dist/assets/classDiagram-4FO5ZUOK-BG6G2w7M.js +0 -1
- package/share/web/dist/assets/classDiagram-4FO5ZUOK-YD7aFmk4.js +0 -1
- package/share/web/dist/assets/classDiagram-4FO5ZUOK-pN64LTX2.js +0 -1
- package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BG6G2w7M.js +0 -1
- package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-YD7aFmk4.js +0 -1
- package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-pN64LTX2.js +0 -1
- package/share/web/dist/assets/cose-bilkent-S5V4N54A-BiISwttp.js +0 -1
- package/share/web/dist/assets/cose-bilkent-S5V4N54A-Cdcu1udn.js +0 -1
- package/share/web/dist/assets/dagre-BM42HDAG-DH48KSnI.js +0 -4
- package/share/web/dist/assets/dagre-BM42HDAG-DSaFUOac.js +0 -4
- package/share/web/dist/assets/diagram-2AECGRRQ-CZFZ-P_g.js +0 -43
- package/share/web/dist/assets/diagram-2AECGRRQ-WHrjNyOs.js +0 -43
- package/share/web/dist/assets/diagram-5GNKFQAL-BIBtKl2n.js +0 -10
- package/share/web/dist/assets/diagram-5GNKFQAL-Cel1H_0m.js +0 -10
- package/share/web/dist/assets/diagram-KO2AKTUF-CgSCgVpo.js +0 -3
- package/share/web/dist/assets/diagram-KO2AKTUF-YkLoN09n.js +0 -3
- package/share/web/dist/assets/diagram-LMA3HP47-BglDNnD6.js +0 -24
- package/share/web/dist/assets/diagram-LMA3HP47-CtUrWgF8.js +0 -24
- package/share/web/dist/assets/diagram-OG6HWLK6-BQYYwCRp.js +0 -24
- package/share/web/dist/assets/diagram-OG6HWLK6-DdZyiUTB.js +0 -24
- package/share/web/dist/assets/erDiagram-TEJ5UH35-BAiUH7TI.js +0 -85
- package/share/web/dist/assets/erDiagram-TEJ5UH35-DjazTN-w.js +0 -85
- package/share/web/dist/assets/flowDiagram-I6XJVG4X-CClDxjPP.js +0 -162
- package/share/web/dist/assets/flowDiagram-I6XJVG4X-FgXGamXq.js +0 -162
- package/share/web/dist/assets/ganttDiagram-6RSMTGT7-Bv7SCXEy.js +0 -292
- package/share/web/dist/assets/ganttDiagram-6RSMTGT7-DRFGnwMy.js +0 -292
- package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-B9dyglKH.js +0 -106
- package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-DtD0_1xU.js +0 -106
- package/share/web/dist/assets/index-BJJGse-6.js +0 -462
- package/share/web/dist/assets/index-CVJm2nsZ.js +0 -462
- package/share/web/dist/assets/index-DGGq2-jY.js +0 -462
- package/share/web/dist/assets/infoDiagram-5YYISTIA-Cx52pYbR.js +0 -2
- package/share/web/dist/assets/infoDiagram-5YYISTIA-D-CZ12ig.js +0 -2
- package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-BIbBK9lj.js +0 -70
- package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-IPq1s0X7.js +0 -70
- package/share/web/dist/assets/journeyDiagram-JHISSGLW-C6NL_U-x.js +0 -139
- package/share/web/dist/assets/journeyDiagram-JHISSGLW-DSlilcAu.js +0 -139
- package/share/web/dist/assets/kanban-definition-UN3LZRKU-BPtRy2FR.js +0 -89
- package/share/web/dist/assets/kanban-definition-UN3LZRKU-DyrJY_CA.js +0 -89
- package/share/web/dist/assets/linear-C4T9mQF3.js +0 -1
- package/share/web/dist/assets/linear-CRXFvyA0.js +0 -1
- package/share/web/dist/assets/mindmap-definition-RKZ34NQL-BhdejNSk.js +0 -96
- package/share/web/dist/assets/mindmap-definition-RKZ34NQL-Bp1Xd8bl.js +0 -96
- package/share/web/dist/assets/pieDiagram-4H26LBE5-Bhea-GHU.js +0 -30
- package/share/web/dist/assets/pieDiagram-4H26LBE5-DQcREwFf.js +0 -30
- package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-B3DF7GL3.js +0 -7
- package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-Tlzu5KWj.js +0 -7
- package/share/web/dist/assets/requirementDiagram-4Y6WPE33--mgl6P6d.js +0 -84
- package/share/web/dist/assets/requirementDiagram-4Y6WPE33-B3Ezfu1x.js +0 -84
- package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-BaUWYvhY.js +0 -40
- package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-D4sBgt2H.js +0 -40
- package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-CROVFpmb.js +0 -162
- package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-DKJomVzD.js +0 -162
- package/share/web/dist/assets/stateDiagram-AJRCARHV-B97uFUIB.js +0 -1
- package/share/web/dist/assets/stateDiagram-AJRCARHV-ChI1w0kO.js +0 -1
- package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DVp4s1rd.js +0 -1
- package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-ElXbEc84.js +0 -1
- package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-uMR_aTUu.js +0 -1
- package/share/web/dist/assets/timeline-definition-PNZ67QCA-DOcZCwg5.js +0 -120
- package/share/web/dist/assets/timeline-definition-PNZ67QCA-DvuHWqCp.js +0 -120
- package/share/web/dist/assets/vennDiagram-CIIHVFJN-CaM3hdOc.js +0 -34
- package/share/web/dist/assets/vennDiagram-CIIHVFJN-HIUt9U0v.js +0 -34
- package/share/web/dist/assets/wardley-L42UT6IY-B3_K9jdm.js +0 -173
- package/share/web/dist/assets/wardley-L42UT6IY-C4--5SCJ.js +0 -173
- package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-BiDxx2jY.js +0 -78
- package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-CZFHdmZ7.js +0 -78
- package/share/web/dist/assets/xychartDiagram-2RQKCTM6-3SwAaDmP.js +0 -7
- package/share/web/dist/assets/xychartDiagram-2RQKCTM6-_2nMxLXq.js +0 -7
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-DuFehwqT.js","assets/graph-BEmEBUp_.js","assets/layout-Bw0msyOw.js","assets/cose-bilkent-S5V4N54A-HgNozuI9.js","assets/cytoscape.esm-LDYqcvCF.js","assets/c4Diagram-AAUBKEIU-BtXR-tZb.js","assets/chunk-ND2GUHAM-BW3zIC-_.js","assets/flowDiagram-I6XJVG4X-C4HhF__U.js","assets/chunk-FMBD7UC4-BhpSyTvy.js","assets/chunk-55IACEB6-BSHgOvJ-.js","assets/chunk-2J33WTMH-9FF83i-m.js","assets/channel-Cnf9lfJy.js","assets/erDiagram-TEJ5UH35-kB2Dv3Eg.js","assets/gitGraphDiagram-PVQCEYII-71rP5XPJ.js","assets/chunk-4BX2VUAB-BTNyldUN.js","assets/chunk-QZHKN3VN-CXJHIVX5.js","assets/wardley-L42UT6IY-CbAQ1l2l.js","assets/ganttDiagram-6RSMTGT7-DX5o7rTU.js","assets/linear-DiLRoIVy.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-CrowFXzY.js","assets/infoDiagram-5YYISTIA-DBvPer2N.js","assets/pieDiagram-4H26LBE5-Bd4Y92PJ.js","assets/arc-BlaRQKUA.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-CTcGIiQn.js","assets/xychartDiagram-2RQKCTM6-De9GfjwK.js","assets/requirementDiagram-4Y6WPE33-PFMmQnSB.js","assets/sequenceDiagram-3UESZ5HK-BijNqzUr.js","assets/classDiagram-4FO5ZUOK-DSiH2rFL.js","assets/chunk-727SXJPM-DeYZVnTV.js","assets/classDiagram-v2-Q7XG4LA2-DSiH2rFL.js","assets/stateDiagram-AJRCARHV-BAeQjHqE.js","assets/chunk-AQP2D5EJ-lAhxexsW.js","assets/stateDiagram-v2-BHNVJYJU-UIUY7oFN.js","assets/journeyDiagram-JHISSGLW-_wUVQQqc.js","assets/timeline-definition-PNZ67QCA-DZCID9hB.js","assets/mindmap-definition-RKZ34NQL-CdQkrn48.js","assets/kanban-definition-UN3LZRKU-Dui9E6Ob.js","assets/sankeyDiagram-5OEKKPKP-C_VXI7-f.js","assets/diagram-LMA3HP47-AWc_twDt.js","assets/diagram-2AECGRRQ-DDdI0uEK.js","assets/blockDiagram-GPEHLZMM-D0HBY6LU.js","assets/diagram-5GNKFQAL-DjfrsPLC.js","assets/architectureDiagram-3BPJPVTR-3hbIeNlM.js","assets/diagram-KO2AKTUF-DUlrOKY_.js","assets/diagram-OG6HWLK6-DczXzYze.js","assets/wardleyDiagram-YWT4CUSO-DEF9mErf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var rA=Object.defineProperty;var aA=(e,t,i)=>t in e?rA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Lt=(e,t,i)=>aA(e,typeof t!="symbol"?t+"":t,i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=i(s);fetch(s.href,l)}})();function Fm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},qo={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var N1;function nA(){if(N1)return qo;N1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var h in s)h!=="key"&&(l[h]=s[h])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return qo.Fragment=t,qo.jsx=i,qo.jsxs=i,qo}var q1;function sA(){return q1||(q1=1,Xp.exports=nA()),Xp.exports}var B=sA(),Vp={exports:{}},Ut={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var I1;function lA(){if(I1)return Ut;I1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function m(I){return I===null||typeof I!="object"?null:(I=x&&I[x]||I["@@iterator"],typeof I=="function"?I:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function T(I,it,ut){this.props=I,this.context=it,this.refs=k,this.updater=ut||v}T.prototype.isReactComponent={},T.prototype.setState=function(I,it){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,it,"setState")},T.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function _(){}_.prototype=T.prototype;function E(I,it,ut){this.props=I,this.context=it,this.refs=k,this.updater=ut||v}var F=E.prototype=new _;F.constructor=E,C(F,T.prototype),F.isPureReactComponent=!0;var D=Array.isArray;function N(){}var U={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function V(I,it,ut){var dt=ut.ref;return{$$typeof:e,type:I,key:it,ref:dt!==void 0?dt:null,props:ut}}function Y(I,it){return V(I.type,it,I.props)}function G(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function et(I){var it={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ut){return it[ut]})}var J=/\/+/g;function q(I,it){return typeof I=="object"&&I!==null&&I.key!=null?et(""+I.key):it.toString(36)}function j(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(N,N):(I.status="pending",I.then(function(it){I.status==="pending"&&(I.status="fulfilled",I.value=it)},function(it){I.status==="pending"&&(I.status="rejected",I.reason=it)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function A(I,it,ut,dt,yt){var xt=typeof I;(xt==="undefined"||xt==="boolean")&&(I=null);var Rt=!1;if(I===null)Rt=!0;else switch(xt){case"bigint":case"string":case"number":Rt=!0;break;case"object":switch(I.$$typeof){case e:case t:Rt=!0;break;case p:return Rt=I._init,A(Rt(I._payload),it,ut,dt,yt)}}if(Rt)return yt=yt(I),Rt=dt===""?"."+q(I,0):dt,D(yt)?(ut="",Rt!=null&&(ut=Rt.replace(J,"$&/")+"/"),A(yt,it,ut,"",function(W){return W})):yt!=null&&(G(yt)&&(yt=Y(yt,ut+(yt.key==null||I&&I.key===yt.key?"":(""+yt.key).replace(J,"$&/")+"/")+Rt)),it.push(yt)),1;Rt=0;var Ot=dt===""?".":dt+":";if(D(I))for(var Pt=0;Pt<I.length;Pt++)dt=I[Pt],xt=Ot+q(dt,Pt),Rt+=A(dt,it,ut,xt,yt);else if(Pt=m(I),typeof Pt=="function")for(I=Pt.call(I),Pt=0;!(dt=I.next()).done;)dt=dt.value,xt=Ot+q(dt,Pt++),Rt+=A(dt,it,ut,xt,yt);else if(xt==="object"){if(typeof I.then=="function")return A(j(I),it,ut,dt,yt);throw it=String(I),Error("Objects are not valid as a React child (found: "+(it==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":it)+"). If you meant to render a collection of children, use an array instead.")}return Rt}function H(I,it,ut){if(I==null)return I;var dt=[],yt=0;return A(I,dt,"","",function(xt){return it.call(ut,xt,yt++)}),dt}function z(I){if(I._status===-1){var it=I._result;it=it(),it.then(function(ut){(I._status===0||I._status===-1)&&(I._status=1,I._result=ut)},function(ut){(I._status===0||I._status===-1)&&(I._status=2,I._result=ut)}),I._status===-1&&(I._status=0,I._result=it)}if(I._status===1)return I._result.default;throw I._result}var $=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var it=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(it))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},Q={map:H,forEach:function(I,it,ut){H(I,function(){it.apply(this,arguments)},ut)},count:function(I){var it=0;return H(I,function(){it++}),it},toArray:function(I){return H(I,function(it){return it})||[]},only:function(I){if(!G(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Ut.Activity=g,Ut.Children=Q,Ut.Component=T,Ut.Fragment=i,Ut.Profiler=s,Ut.PureComponent=E,Ut.StrictMode=a,Ut.Suspense=u,Ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ut.__COMPILER_RUNTIME={__proto__:null,c:function(I){return U.H.useMemoCache(I)}},Ut.cache=function(I){return function(){return I.apply(null,arguments)}},Ut.cacheSignal=function(){return null},Ut.cloneElement=function(I,it,ut){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var dt=C({},I.props),yt=I.key;if(it!=null)for(xt in it.key!==void 0&&(yt=""+it.key),it)!R.call(it,xt)||xt==="key"||xt==="__self"||xt==="__source"||xt==="ref"&&it.ref===void 0||(dt[xt]=it[xt]);var xt=arguments.length-2;if(xt===1)dt.children=ut;else if(1<xt){for(var Rt=Array(xt),Ot=0;Ot<xt;Ot++)Rt[Ot]=arguments[Ot+2];dt.children=Rt}return V(I.type,yt,dt)},Ut.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Ut.createElement=function(I,it,ut){var dt,yt={},xt=null;if(it!=null)for(dt in it.key!==void 0&&(xt=""+it.key),it)R.call(it,dt)&&dt!=="key"&&dt!=="__self"&&dt!=="__source"&&(yt[dt]=it[dt]);var Rt=arguments.length-2;if(Rt===1)yt.children=ut;else if(1<Rt){for(var Ot=Array(Rt),Pt=0;Pt<Rt;Pt++)Ot[Pt]=arguments[Pt+2];yt.children=Ot}if(I&&I.defaultProps)for(dt in Rt=I.defaultProps,Rt)yt[dt]===void 0&&(yt[dt]=Rt[dt]);return V(I,xt,yt)},Ut.createRef=function(){return{current:null}},Ut.forwardRef=function(I){return{$$typeof:h,render:I}},Ut.isValidElement=G,Ut.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:z}},Ut.memo=function(I,it){return{$$typeof:f,type:I,compare:it===void 0?null:it}},Ut.startTransition=function(I){var it=U.T,ut={};U.T=ut;try{var dt=I(),yt=U.S;yt!==null&&yt(ut,dt),typeof dt=="object"&&dt!==null&&typeof dt.then=="function"&&dt.then(N,$)}catch(xt){$(xt)}finally{it!==null&&ut.types!==null&&(it.types=ut.types),U.T=it}},Ut.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ut.use=function(I){return U.H.use(I)},Ut.useActionState=function(I,it,ut){return U.H.useActionState(I,it,ut)},Ut.useCallback=function(I,it){return U.H.useCallback(I,it)},Ut.useContext=function(I){return U.H.useContext(I)},Ut.useDebugValue=function(){},Ut.useDeferredValue=function(I,it){return U.H.useDeferredValue(I,it)},Ut.useEffect=function(I,it){return U.H.useEffect(I,it)},Ut.useEffectEvent=function(I){return U.H.useEffectEvent(I)},Ut.useId=function(){return U.H.useId()},Ut.useImperativeHandle=function(I,it,ut){return U.H.useImperativeHandle(I,it,ut)},Ut.useInsertionEffect=function(I,it){return U.H.useInsertionEffect(I,it)},Ut.useLayoutEffect=function(I,it){return U.H.useLayoutEffect(I,it)},Ut.useMemo=function(I,it){return U.H.useMemo(I,it)},Ut.useOptimistic=function(I,it){return U.H.useOptimistic(I,it)},Ut.useReducer=function(I,it,ut){return U.H.useReducer(I,it,ut)},Ut.useRef=function(I){return U.H.useRef(I)},Ut.useState=function(I){return U.H.useState(I)},Ut.useSyncExternalStore=function(I,it,ut){return U.H.useSyncExternalStore(I,it,ut)},Ut.useTransition=function(){return U.H.useTransition()},Ut.version="19.2.6",Ut}var j1;function Om(){return j1||(j1=1,Vp.exports=lA()),Vp.exports}var O=Om();const oA=Fm(O);var Zp={exports:{}},Io={},Qp={exports:{}},Kp={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var H1;function cA(){return H1||(H1=1,(function(e){function t(A,H){var z=A.length;A.push(H);t:for(;0<z;){var $=z-1>>>1,Q=A[$];if(0<s(Q,H))A[$]=H,A[z]=Q,z=$;else break t}}function i(A){return A.length===0?null:A[0]}function a(A){if(A.length===0)return null;var H=A[0],z=A.pop();if(z!==H){A[0]=z;t:for(var $=0,Q=A.length,I=Q>>>1;$<I;){var it=2*($+1)-1,ut=A[it],dt=it+1,yt=A[dt];if(0>s(ut,z))dt<Q&&0>s(yt,ut)?(A[$]=yt,A[dt]=z,$=dt):(A[$]=ut,A[it]=z,$=it);else if(dt<Q&&0>s(yt,z))A[$]=yt,A[dt]=z,$=dt;else break t}}return H}function s(A,H){var z=A.sortIndex-H.sortIndex;return z!==0?z:A.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var u=[],f=[],p=1,g=null,x=3,m=!1,v=!1,C=!1,k=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function F(A){for(var H=i(f);H!==null;){if(H.callback===null)a(f);else if(H.startTime<=A)a(f),H.sortIndex=H.expirationTime,t(u,H);else break;H=i(f)}}function D(A){if(C=!1,F(A),!v)if(i(u)!==null)v=!0,N||(N=!0,et());else{var H=i(f);H!==null&&j(D,H.startTime-A)}}var N=!1,U=-1,R=5,V=-1;function Y(){return k?!0:!(e.unstable_now()-V<R)}function G(){if(k=!1,N){var A=e.unstable_now();V=A;var H=!0;try{t:{v=!1,C&&(C=!1,_(U),U=-1),m=!0;var z=x;try{e:{for(F(A),g=i(u);g!==null&&!(g.expirationTime>A&&Y());){var $=g.callback;if(typeof $=="function"){g.callback=null,x=g.priorityLevel;var Q=$(g.expirationTime<=A);if(A=e.unstable_now(),typeof Q=="function"){g.callback=Q,F(A),H=!0;break e}g===i(u)&&a(u),F(A)}else a(u);g=i(u)}if(g!==null)H=!0;else{var I=i(f);I!==null&&j(D,I.startTime-A),H=!1}}break t}finally{g=null,x=z,m=!1}H=void 0}}finally{H?et():N=!1}}}var et;if(typeof E=="function")et=function(){E(G)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,q=J.port2;J.port1.onmessage=G,et=function(){q.postMessage(null)}}else et=function(){T(G,0)};function j(A,H){U=T(function(){A(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(A){switch(x){case 1:case 2:case 3:var H=3;break;default:H=x}var z=x;x=H;try{return A()}finally{x=z}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(A,H){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=x;x=A;try{return H()}finally{x=z}},e.unstable_scheduleCallback=function(A,H,z){var $=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?$+z:$):z=$,A){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=z+Q,A={id:p++,callback:H,priorityLevel:A,startTime:z,expirationTime:Q,sortIndex:-1},z>$?(A.sortIndex=z,t(f,A),i(u)===null&&A===i(f)&&(C?(_(U),U=-1):C=!0,j(D,z-$))):(A.sortIndex=Q,t(u,A),v||m||(v=!0,N||(N=!0,et()))),A},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(A){var H=x;return function(){var z=x;x=H;try{return A.apply(this,arguments)}finally{x=z}}}})(Kp)),Kp}var U1;function hA(){return U1||(U1=1,Qp.exports=cA()),Qp.exports}var Jp={exports:{}},di={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var P1;function uA(){if(P1)return di;P1=1;var e=Om();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(u,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:u,containerInfo:f,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return di.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,di.createPortal=function(u,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return l(u,f,null,p)},di.flushSync=function(u){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,u)return u()}finally{c.T=f,a.p=p,a.d.f()}},di.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(u,f))},di.prefetchDNS=function(u){typeof u=="string"&&a.d.D(u)},di.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,m=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:m}):p==="script"&&a.d.X(u,{crossOrigin:g,integrity:x,fetchPriority:m,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},di.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);a.d.M(u,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(u)},di.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);a.d.L(u,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},di.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=h(f.as,f.crossOrigin);a.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(u)},di.requestFormReset=function(u){a.d.r(u)},di.unstable_batchedUpdates=function(u,f){return u(f)},di.useFormState=function(u,f,p){return c.H.useFormState(u,f,p)},di.useFormStatus=function(){return c.H.useHostTransitionStatus()},di.version="19.2.6",di}var W1;function dA(){if(W1)return Jp.exports;W1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jp.exports=uA(),Jp.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var Y1;function fA(){if(Y1)return Io;Y1=1;var e=hA(),t=Om(),i=dA();function a(r){var n="https://react.dev/errors/"+r;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var n=r,o=r;if(r.alternate)for(;n.return;)n=n.return;else{r=n;do n=r,(n.flags&4098)!==0&&(o=n.return),r=n.return;while(r)}return n.tag===3?o:null}function c(r){if(r.tag===13){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function h(r){if(r.tag===31){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function u(r){if(l(r)!==r)throw Error(a(188))}function f(r){var n=r.alternate;if(!n){if(n=l(r),n===null)throw Error(a(188));return n!==r?null:r}for(var o=r,d=n;;){var y=o.return;if(y===null)break;var b=y.alternate;if(b===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===o)return u(y),r;if(b===d)return u(y),n;b=b.sibling}throw Error(a(188))}if(o.return!==d.return)o=y,d=b;else{for(var w=!1,M=y.child;M;){if(M===o){w=!0,o=y,d=b;break}if(M===d){w=!0,d=y,o=b;break}M=M.sibling}if(!w){for(M=b.child;M;){if(M===o){w=!0,o=b,d=y;break}if(M===d){w=!0,d=b,o=y;break}M=M.sibling}if(!w)throw Error(a(189))}}if(o.alternate!==d)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:n}function p(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r;for(r=r.child;r!==null;){if(n=p(r),n!==null)return n;r=r.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),E=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function et(r){return r===null||typeof r!="object"?null:(r=G&&r[G]||r["@@iterator"],typeof r=="function"?r:null)}var J=Symbol.for("react.client.reference");function q(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===J?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case C:return"Fragment";case T:return"Profiler";case k:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case V:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case v:return"Portal";case E:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case F:var n=r.render;return r=r.displayName,r||(r=n.displayName||n.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return n=r.displayName||null,n!==null?n:q(r.type)||"Memo";case R:n=r._payload,r=r._init;try{return q(r(n))}catch{}}return null}var j=Array.isArray,A=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},$=[],Q=-1;function I(r){return{current:r}}function it(r){0>Q||(r.current=$[Q],$[Q]=null,Q--)}function ut(r,n){Q++,$[Q]=r.current,r.current=n}var dt=I(null),yt=I(null),xt=I(null),Rt=I(null);function Ot(r,n){switch(ut(xt,n),ut(yt,r),ut(dt,null),n.nodeType){case 9:case 11:r=(r=n.documentElement)&&(r=r.namespaceURI)?l1(r):0;break;default:if(r=n.tagName,n=n.namespaceURI)n=l1(n),r=o1(n,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}it(dt),ut(dt,r)}function Pt(){it(dt),it(yt),it(xt)}function W(r){r.memoizedState!==null&&ut(Rt,r);var n=dt.current,o=o1(n,r.type);n!==o&&(ut(yt,r),ut(dt,o))}function ct(r){yt.current===r&&(it(dt),it(yt)),Rt.current===r&&(it(Rt),Do._currentValue=z)}var Ct,Ft;function Jt(r){if(Ct===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Ct=n&&n[1]||"",Ft=-1<o.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Ct+r+Ft}var me=!1;function Ht(r,n){if(!r||me)return"";me=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(n){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(ot){var nt=ot}Reflect.construct(r,[],gt)}else{try{gt.call()}catch(ot){nt=ot}r.call(gt.prototype)}}else{try{throw Error()}catch(ot){nt=ot}(gt=r())&&typeof gt.catch=="function"&>.catch(function(){})}}catch(ot){if(ot&&nt&&typeof ot.stack=="string")return[ot.stack,nt.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),w=b[0],M=b[1];if(w&&M){var X=w.split(`
|
|
45
|
+
`),at=M.split(`
|
|
46
|
+
`);for(y=d=0;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;for(;y<at.length&&!at[y].includes("DetermineComponentFrameRoot");)y++;if(d===X.length||y===at.length)for(d=X.length-1,y=at.length-1;1<=d&&0<=y&&X[d]!==at[y];)y--;for(;1<=d&&0<=y;d--,y--)if(X[d]!==at[y]){if(d!==1||y!==1)do if(d--,y--,0>y||X[d]!==at[y]){var ht=`
|
|
47
|
+
`+X[d].replace(" at new "," at ");return r.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",r.displayName)),ht}while(1<=d&&0<=y);break}}}finally{me=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Jt(o):""}function Ae(r,n){switch(r.tag){case 26:case 27:case 5:return Jt(r.type);case 16:return Jt("Lazy");case 13:return r.child!==n&&n!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return Ht(r.type,!1);case 11:return Ht(r.type.render,!1);case 1:return Ht(r.type,!0);case 31:return Jt("Activity");default:return""}}function De(r){try{var n="",o=null;do n+=Ae(r,o),o=r,r=r.return;while(r);return n}catch(d){return`
|
|
48
|
+
Error generating stack: `+d.message+`
|
|
49
|
+
`+d.stack}}var Je=Object.prototype.hasOwnProperty,Jr=e.unstable_scheduleCallback,Ki=e.unstable_cancelCallback,pr=e.unstable_shouldYield,us=e.unstable_requestPaint,ci=e.unstable_now,qc=e.unstable_getCurrentPriorityLevel,Wl=e.unstable_ImmediatePriority,ds=e.unstable_UserBlockingPriority,Dr=e.unstable_NormalPriority,Ma=e.unstable_LowPriority,qi=e.unstable_IdlePriority,Yl=e.log,Ic=e.unstable_setDisableYieldValue,Ra=null,ti=null;function gr(r){if(typeof Yl=="function"&&Ic(r),ti&&typeof ti.setStrictMode=="function")try{ti.setStrictMode(Ra,r)}catch{}}var Ze=Math.clz32?Math.clz32:Fa,fs=Math.log,Ji=Math.LN2;function Fa(r){return r>>>=0,r===0?32:31-(fs(r)/Ji|0)|0}var Oa=256,Da=262144,ps=4194304;function mr(r){var n=r&42;if(n!==0)return n;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function $a(r,n,o){var d=r.pendingLanes;if(d===0)return 0;var y=0,b=r.suspendedLanes,w=r.pingedLanes;r=r.warmLanes;var M=d&134217727;return M!==0?(d=M&~b,d!==0?y=mr(d):(w&=M,w!==0?y=mr(w):o||(o=M&~r,o!==0&&(y=mr(o))))):(M=d&~b,M!==0?y=mr(M):w!==0?y=mr(w):o||(o=d&~r,o!==0&&(y=mr(o)))),y===0?0:n!==0&&n!==y&&(n&b)===0&&(b=y&-y,o=n&-n,b>=o||b===32&&(o&4194048)!==0)?n:y}function wn(r,n){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&n)===0}function _n(r,n){switch(r){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jc(){var r=ps;return ps<<=1,(ps&62914560)===0&&(ps=4194304),r}function Gl(r){for(var n=[],o=0;31>o;o++)n.push(r);return n}function ve(r,n){r.pendingLanes|=n,n!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function za(r,n,o,d,y,b){var w=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var M=r.entanglements,X=r.expirationTimes,at=r.hiddenUpdates;for(o=w&~o;0<o;){var ht=31-Ze(o),gt=1<<ht;M[ht]=0,X[ht]=-1;var nt=at[ht];if(nt!==null)for(at[ht]=null,ht=0;ht<nt.length;ht++){var ot=nt[ht];ot!==null&&(ot.lane&=-536870913)}o&=~gt}d!==0&&Hc(r,d,0),b!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=b&~(w&~n))}function Hc(r,n,o){r.pendingLanes|=n,r.suspendedLanes&=~n;var d=31-Ze(n);r.entangledLanes|=n,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function Xl(r,n){var o=r.entangledLanes|=n;for(r=r.entanglements;o;){var d=31-Ze(o),y=1<<d;y&n|r[d]&n&&(r[d]|=n),o&=~y}}function gs(r,n){var o=n&-n;return o=(o&42)!==0?1:ms(o),(o&(r.suspendedLanes|n))!==0?0:o}function ms(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function ys(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Uc(){var r=H.p;return r!==0?r:(r=window.event,r===void 0?32:M1(r.type))}function _i(r,n){var o=H.p;try{return H.p=r,n()}finally{H.p=o}}var hi=Math.random().toString(36).slice(2),qe="__reactFiber$"+hi,ei="__reactProps$"+hi,ta="__reactContainer$"+hi,Na="__reactEvents$"+hi,Vl="__reactListeners$"+hi,xs="__reactHandles$"+hi,tr="__reactResources$"+hi,qa="__reactMarker$"+hi;function bs(r){delete r[qe],delete r[ei],delete r[Na],delete r[Vl],delete r[xs]}function Ia(r){var n=r[qe];if(n)return n;for(var o=r.parentNode;o;){if(n=o[ta]||o[qe]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(r=g1(r);r!==null;){if(o=r[qe])return o;r=g1(r)}return n}r=o,o=r.parentNode}return null}function ea(r){if(r=r[qe]||r[ta]){var n=r.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return r}return null}function ja(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r.stateNode;throw Error(a(33))}function $r(r){var n=r[tr];return n||(n=r[tr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ee(r){r[qa]=!0}var wt=new Set,P={};function ft(r,n){bt(r,n),bt(r+"Capture",n)}function bt(r,n){for(P[r]=n,r=0;r<n.length;r++)wt.add(n[r])}var ce=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ae={},ke={};function Bi(r){return Je.call(ke,r)?!0:Je.call(ae,r)?!1:ce.test(r)?ke[r]=!0:(ae[r]=!0,!1)}function xi(r,n,o){if(Bi(n))if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(n);return;case"boolean":var d=n.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(n);return}}r.setAttribute(n,""+o)}}function ui(r,n,o){if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(n);return}r.setAttribute(n,""+o)}}function Ii(r,n,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(n,o,""+d)}}function he(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Zl(r){var n=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Pc(r,n,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,n);if(!r.hasOwnProperty(n)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,b=d.set;return Object.defineProperty(r,n,{configurable:!0,get:function(){return y.call(this)},set:function(w){o=""+w,b.call(this,w)}}),Object.defineProperty(r,n,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){r._valueTracker=null,delete r[n]}}}}function Id(r){if(!r._valueTracker){var n=Zl(r)?"checked":"value";r._valueTracker=Pc(r,n,""+r[n])}}function t0(r){if(!r)return!1;var n=r._valueTracker;if(!n)return!0;var o=n.getValue(),d="";return r&&(d=Zl(r)?r.checked?"true":"false":r.value),r=d,r!==o?(n.setValue(r),!0):!1}function Wc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var QB=/[\n"\\]/g;function er(r){return r.replace(QB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function jd(r,n,o,d,y,b,w,M){r.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.type=w:r.removeAttribute("type"),n!=null?w==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=""+he(n)):r.value!==""+he(n)&&(r.value=""+he(n)):w!=="submit"&&w!=="reset"||r.removeAttribute("value"),n!=null?Hd(r,w,he(n)):o!=null?Hd(r,w,he(o)):d!=null&&r.removeAttribute("value"),y==null&&b!=null&&(r.defaultChecked=!!b),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+he(M):r.removeAttribute("name")}function e0(r,n,o,d,y,b,w,M){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),n!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){Id(r);return}o=o!=null?""+he(o):"",n=n!=null?""+he(n):o,M||n===r.value||(r.value=n),r.defaultValue=n}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=M?r.checked:!!d,r.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(r.name=w),Id(r)}function Hd(r,n,o){n==="number"&&Wc(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function Cs(r,n,o,d){if(r=r.options,n){n={};for(var y=0;y<o.length;y++)n["$"+o[y]]=!0;for(o=0;o<r.length;o++)y=n.hasOwnProperty("$"+r[o].value),r[o].selected!==y&&(r[o].selected=y),y&&d&&(r[o].defaultSelected=!0)}else{for(o=""+he(o),n=null,y=0;y<r.length;y++){if(r[y].value===o){r[y].selected=!0,d&&(r[y].defaultSelected=!0);return}n!==null||r[y].disabled||(n=r[y])}n!==null&&(n.selected=!0)}}function i0(r,n,o){if(n!=null&&(n=""+he(n),n!==r.value&&(r.value=n),o==null)){r.defaultValue!==n&&(r.defaultValue=n);return}r.defaultValue=o!=null?""+he(o):""}function r0(r,n,o,d){if(n==null){if(d!=null){if(o!=null)throw Error(a(92));if(j(d)){if(1<d.length)throw Error(a(93));d=d[0]}o=d}o==null&&(o=""),n=o}o=he(n),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),Id(r)}function vs(r,n){if(n){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=n;return}}r.textContent=n}var KB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function a0(r,n,o){var d=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(n,""):n==="float"?r.cssFloat="":r[n]="":d?r.setProperty(n,o):typeof o!="number"||o===0||KB.has(n)?n==="float"?r.cssFloat=o:r[n]=(""+o).trim():r[n]=o+"px"}function n0(r,n,o){if(n!=null&&typeof n!="object")throw Error(a(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||n!=null&&n.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var y in n)d=n[y],n.hasOwnProperty(y)&&o[y]!==d&&a0(r,y,d)}else for(var b in n)n.hasOwnProperty(b)&&a0(r,b,n[b])}function Ud(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var JB=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yc(r){return tE.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ia(){}var Pd=null;function Wd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ks=null,Ss=null;function s0(r){var n=ea(r);if(n&&(r=n.stateNode)){var o=r[ei]||null;t:switch(r=n.stateNode,n.type){case"input":if(jd(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+er(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var d=o[n];if(d!==r&&d.form===r.form){var y=d[ei]||null;if(!y)throw Error(a(90));jd(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(n=0;n<o.length;n++)d=o[n],d.form===r.form&&t0(d)}break t;case"textarea":i0(r,o.value,o.defaultValue);break t;case"select":n=o.value,n!=null&&Cs(r,!!o.multiple,n,!1)}}}var Yd=!1;function l0(r,n,o){if(Yd)return r(n,o);Yd=!0;try{var d=r(n);return d}finally{if(Yd=!1,(ks!==null||Ss!==null)&&(Fh(),ks&&(n=ks,r=Ss,Ss=ks=null,s0(n),r)))for(n=0;n<r.length;n++)s0(r[n])}}function Ql(r,n){var o=r.stateNode;if(o===null)return null;var d=o[ei]||null;if(d===null)return null;o=d[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break t;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,n,typeof o));return o}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(ra)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Gd=!1}var Ha=null,Xd=null,Gc=null;function o0(){if(Gc)return Gc;var r,n=Xd,o=n.length,d,y="value"in Ha?Ha.value:Ha.textContent,b=y.length;for(r=0;r<o&&n[r]===y[r];r++);var w=o-r;for(d=1;d<=w&&n[o-d]===y[b-d];d++);return Gc=y.slice(r,1<d?1-d:void 0)}function Xc(r){var n=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&n===13&&(r=13)):r=n,r===10&&(r=13),32<=r||r===13?r:0}function Vc(){return!0}function c0(){return!1}function Ei(r){function n(o,d,y,b,w){this._reactName=o,this._targetInst=y,this.type=d,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(o=r[M],this[M]=o?o(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Vc:c0,this.isPropagationStopped=c0,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Vc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Vc)},persist:function(){},isPersistent:Vc}),n}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=Ei(Bn),Jl=g({},Bn,{view:0,detail:0}),eE=Ei(Jl),Vd,Zd,to,Qc=g({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==to&&(to&&r.type==="mousemove"?(Vd=r.screenX-to.screenX,Zd=r.screenY-to.screenY):Zd=Vd=0,to=r),Vd)},movementY:function(r){return"movementY"in r?r.movementY:Zd}}),h0=Ei(Qc),iE=g({},Qc,{dataTransfer:0}),rE=Ei(iE),aE=g({},Jl,{relatedTarget:0}),Qd=Ei(aE),nE=g({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),sE=Ei(nE),lE=g({},Bn,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),oE=Ei(lE),cE=g({},Bn,{data:0}),u0=Ei(cE),hE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fE(r){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(r):(r=dE[r])?!!n[r]:!1}function Kd(){return fE}var pE=g({},Jl,{key:function(r){if(r.key){var n=hE[r.key]||r.key;if(n!=="Unidentified")return n}return r.type==="keypress"?(r=Xc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?uE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(r){return r.type==="keypress"?Xc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Xc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),gE=Ei(pE),mE=g({},Qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=Ei(mE),yE=g({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),xE=Ei(yE),bE=g({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),CE=Ei(bE),vE=g({},Qc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),kE=Ei(vE),SE=g({},Bn,{newState:0,oldState:0}),TE=Ei(SE),wE=[9,13,27,32],Jd=ra&&"CompositionEvent"in window,eo=null;ra&&"documentMode"in document&&(eo=document.documentMode);var _E=ra&&"TextEvent"in window&&!eo,f0=ra&&(!Jd||eo&&8<eo&&11>=eo),p0=" ",g0=!1;function m0(r,n){switch(r){case"keyup":return wE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ts=!1;function BE(r,n){switch(r){case"compositionend":return y0(n);case"keypress":return n.which!==32?null:(g0=!0,p0);case"textInput":return r=n.data,r===p0&&g0?null:r;default:return null}}function EE(r,n){if(Ts)return r==="compositionend"||!Jd&&m0(r,n)?(r=o0(),Gc=Xd=Ha=null,Ts=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return f0&&n.locale!=="ko"?null:n.data;default:return null}}var LE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function x0(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n==="input"?!!LE[r.type]:n==="textarea"}function b0(r,n,o,d){ks?Ss?Ss.push(d):Ss=[d]:ks=d,n=Ih(n,"onChange"),0<n.length&&(o=new Zc("onChange","change",null,o,d),r.push({event:o,listeners:n}))}var io=null,ro=null;function AE(r){e1(r,0)}function Kc(r){var n=ja(r);if(t0(n))return r}function C0(r,n){if(r==="change")return n}var v0=!1;if(ra){var tf;if(ra){var ef="oninput"in document;if(!ef){var k0=document.createElement("div");k0.setAttribute("oninput","return;"),ef=typeof k0.oninput=="function"}tf=ef}else tf=!1;v0=tf&&(!document.documentMode||9<document.documentMode)}function S0(){io&&(io.detachEvent("onpropertychange",T0),ro=io=null)}function T0(r){if(r.propertyName==="value"&&Kc(ro)){var n=[];b0(n,ro,r,Wd(r)),l0(AE,n)}}function ME(r,n,o){r==="focusin"?(S0(),io=n,ro=o,io.attachEvent("onpropertychange",T0)):r==="focusout"&&S0()}function RE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Kc(ro)}function FE(r,n){if(r==="click")return Kc(n)}function OE(r,n){if(r==="input"||r==="change")return Kc(n)}function DE(r,n){return r===n&&(r!==0||1/r===1/n)||r!==r&&n!==n}var ji=typeof Object.is=="function"?Object.is:DE;function ao(r,n){if(ji(r,n))return!0;if(typeof r!="object"||r===null||typeof n!="object"||n===null)return!1;var o=Object.keys(r),d=Object.keys(n);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!Je.call(n,y)||!ji(r[y],n[y]))return!1}return!0}function w0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function _0(r,n){var o=w0(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=n&&d>=n)return{node:o,offset:n-r};r=d}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=w0(o)}}function B0(r,n){return r&&n?r===n?!0:r&&r.nodeType===3?!1:n&&n.nodeType===3?B0(r,n.parentNode):"contains"in r?r.contains(n):r.compareDocumentPosition?!!(r.compareDocumentPosition(n)&16):!1:!1}function E0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var n=Wc(r.document);n instanceof r.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)r=n.contentWindow;else break;n=Wc(r.document)}return n}function rf(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n&&(n==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||n==="textarea"||r.contentEditable==="true")}var $E=ra&&"documentMode"in document&&11>=document.documentMode,ws=null,af=null,no=null,nf=!1;function L0(r,n,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;nf||ws==null||ws!==Wc(d)||(d=ws,"selectionStart"in d&&rf(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),no&&ao(no,d)||(no=d,d=Ih(af,"onSelect"),0<d.length&&(n=new Zc("onSelect","select",null,n,o),r.push({event:n,listeners:d}),n.target=ws)))}function En(r,n){var o={};return o[r.toLowerCase()]=n.toLowerCase(),o["Webkit"+r]="webkit"+n,o["Moz"+r]="moz"+n,o}var _s={animationend:En("Animation","AnimationEnd"),animationiteration:En("Animation","AnimationIteration"),animationstart:En("Animation","AnimationStart"),transitionrun:En("Transition","TransitionRun"),transitionstart:En("Transition","TransitionStart"),transitioncancel:En("Transition","TransitionCancel"),transitionend:En("Transition","TransitionEnd")},sf={},A0={};ra&&(A0=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function Ln(r){if(sf[r])return sf[r];if(!_s[r])return r;var n=_s[r],o;for(o in n)if(n.hasOwnProperty(o)&&o in A0)return sf[r]=n[o];return r}var M0=Ln("animationend"),R0=Ln("animationiteration"),F0=Ln("animationstart"),zE=Ln("transitionrun"),NE=Ln("transitionstart"),qE=Ln("transitioncancel"),O0=Ln("transitionend"),D0=new Map,lf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lf.push("scrollEnd");function yr(r,n){D0.set(r,n),ft(n,[r])}var Jc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},ir=[],Bs=0,of=0;function th(){for(var r=Bs,n=of=Bs=0;n<r;){var o=ir[n];ir[n++]=null;var d=ir[n];ir[n++]=null;var y=ir[n];ir[n++]=null;var b=ir[n];if(ir[n++]=null,d!==null&&y!==null){var w=d.pending;w===null?y.next=y:(y.next=w.next,w.next=y),d.pending=y}b!==0&&$0(o,y,b)}}function eh(r,n,o,d){ir[Bs++]=r,ir[Bs++]=n,ir[Bs++]=o,ir[Bs++]=d,of|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function cf(r,n,o,d){return eh(r,n,o,d),ih(r)}function An(r,n){return eh(r,null,null,n),ih(r)}function $0(r,n,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var y=!1,b=r.return;b!==null;)b.childLanes|=o,d=b.alternate,d!==null&&(d.childLanes|=o),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(y=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,y&&n!==null&&(y=31-Ze(o),r=b.hiddenUpdates,d=r[y],d===null?r[y]=[n]:d.push(n),n.lane=o|536870912),b):null}function ih(r){if(50<Eo)throw Eo=0,xp=null,Error(a(185));for(var n=r.return;n!==null;)r=n,n=r.return;return r.tag===3?r.stateNode:null}var Es={};function IE(r,n,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hi(r,n,o,d){return new IE(r,n,o,d)}function hf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function aa(r,n){var o=r.alternate;return o===null?(o=Hi(r.tag,n,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=n,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,n=r.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function z0(r,n){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=n,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,n=o.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),r}function rh(r,n,o,d,y,b){var w=0;if(d=r,typeof r=="function")hf(r)&&(w=1);else if(typeof r=="string")w=WL(r,o,dt.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case V:return r=Hi(31,o,n,y),r.elementType=V,r.lanes=b,r;case C:return Mn(o.children,y,b,n);case k:w=8,y|=24;break;case T:return r=Hi(12,o,n,y|2),r.elementType=T,r.lanes=b,r;case D:return r=Hi(13,o,n,y),r.elementType=D,r.lanes=b,r;case N:return r=Hi(19,o,n,y),r.elementType=N,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case E:w=10;break t;case _:w=9;break t;case F:w=11;break t;case U:w=14;break t;case R:w=16,d=null;break t}w=29,o=Error(a(130,r===null?"null":typeof r,"")),d=null}return n=Hi(w,o,n,y),n.elementType=r,n.type=d,n.lanes=b,n}function Mn(r,n,o,d){return r=Hi(7,r,d,n),r.lanes=o,r}function uf(r,n,o){return r=Hi(6,r,null,n),r.lanes=o,r}function N0(r){var n=Hi(18,null,null,0);return n.stateNode=r,n}function df(r,n,o){return n=Hi(4,r.children!==null?r.children:[],r.key,n),n.lanes=o,n.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},n}var q0=new WeakMap;function rr(r,n){if(typeof r=="object"&&r!==null){var o=q0.get(r);return o!==void 0?o:(n={value:r,source:n,stack:De(n)},q0.set(r,n),n)}return{value:r,source:n,stack:De(n)}}var Ls=[],As=0,ah=null,so=0,ar=[],nr=0,Ua=null,zr=1,Nr="";function na(r,n){Ls[As++]=so,Ls[As++]=ah,ah=r,so=n}function I0(r,n,o){ar[nr++]=zr,ar[nr++]=Nr,ar[nr++]=Ua,Ua=r;var d=zr;r=Nr;var y=32-Ze(d)-1;d&=~(1<<y),o+=1;var b=32-Ze(n)+y;if(30<b){var w=y-y%5;b=(d&(1<<w)-1).toString(32),d>>=w,y-=w,zr=1<<32-Ze(n)+y|o<<y|d,Nr=b+r}else zr=1<<b|o<<y|d,Nr=r}function ff(r){r.return!==null&&(na(r,1),I0(r,1,0))}function pf(r){for(;r===ah;)ah=Ls[--As],Ls[As]=null,so=Ls[--As],Ls[As]=null;for(;r===Ua;)Ua=ar[--nr],ar[nr]=null,Nr=ar[--nr],ar[nr]=null,zr=ar[--nr],ar[nr]=null}function j0(r,n){ar[nr++]=zr,ar[nr++]=Nr,ar[nr++]=Ua,zr=n.id,Nr=n.overflow,Ua=r}var ii=null,Se=null,te=!1,Pa=null,sr=!1,gf=Error(a(519));function Wa(r){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lo(rr(n,r)),gf}function H0(r){var n=r.stateNode,o=r.type,d=r.memoizedProps;switch(n[qe]=r,n[ei]=d,o){case"dialog":Zt("cancel",n),Zt("close",n);break;case"iframe":case"object":case"embed":Zt("load",n);break;case"video":case"audio":for(o=0;o<Ao.length;o++)Zt(Ao[o],n);break;case"source":Zt("error",n);break;case"img":case"image":case"link":Zt("error",n),Zt("load",n);break;case"details":Zt("toggle",n);break;case"input":Zt("invalid",n),e0(n,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Zt("invalid",n);break;case"textarea":Zt("invalid",n),r0(n,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||d.suppressHydrationWarning===!0||n1(n.textContent,o)?(d.popover!=null&&(Zt("beforetoggle",n),Zt("toggle",n)),d.onScroll!=null&&Zt("scroll",n),d.onScrollEnd!=null&&Zt("scrollend",n),d.onClick!=null&&(n.onclick=ia),n=!0):n=!1,n||Wa(r,!0)}function U0(r){for(ii=r.return;ii;)switch(ii.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:ii=ii.return}}function Ms(r){if(r!==ii)return!1;if(!te)return U0(r),te=!0,!1;var n=r.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||Fp(r.type,r.memoizedProps)),o=!o),o&&Se&&Wa(r),U0(r),n===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Se=p1(r)}else if(n===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Se=p1(r)}else n===27?(n=Se,sn(r.type)?(r=Np,Np=null,Se=r):Se=n):Se=ii?or(r.stateNode.nextSibling):null;return!0}function Rn(){Se=ii=null,te=!1}function mf(){var r=Pa;return r!==null&&(Ri===null?Ri=r:Ri.push.apply(Ri,r),Pa=null),r}function lo(r){Pa===null?Pa=[r]:Pa.push(r)}var yf=I(null),Fn=null,sa=null;function Ya(r,n,o){ut(yf,n._currentValue),n._currentValue=o}function la(r){r._currentValue=yf.current,it(yf)}function xf(r,n,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&n)!==n?(r.childLanes|=n,d!==null&&(d.childLanes|=n)):d!==null&&(d.childLanes&n)!==n&&(d.childLanes|=n),r===o)break;r=r.return}}function bf(r,n,o,d){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var b=y.dependencies;if(b!==null){var w=y.child;b=b.firstContext;t:for(;b!==null;){var M=b;b=y;for(var X=0;X<n.length;X++)if(M.context===n[X]){b.lanes|=o,M=b.alternate,M!==null&&(M.lanes|=o),xf(b.return,o,r),d||(w=null);break t}b=M.next}}else if(y.tag===18){if(w=y.return,w===null)throw Error(a(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),xf(w,o,r),w=null}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===r){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}}function Rs(r,n,o,d){r=null;for(var y=n,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var w=y.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var M=y.type;ji(y.pendingProps.value,w.value)||(r!==null?r.push(M):r=[M])}}else if(y===Rt.current){if(w=y.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(Do):r=[Do])}y=y.return}r!==null&&bf(n,r,o,d),n.flags|=262144}function nh(r){for(r=r.firstContext;r!==null;){if(!ji(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function On(r){Fn=r,sa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function ri(r){return P0(Fn,r)}function sh(r,n){return Fn===null&&On(r),P0(r,n)}function P0(r,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},sa===null){if(r===null)throw Error(a(308));sa=n,r.dependencies={lanes:0,firstContext:n},r.flags|=524288}else sa=sa.next=n;return o}var jE=typeof AbortController<"u"?AbortController:function(){var r=[],n=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){n.aborted=!0,r.forEach(function(o){return o()})}},HE=e.unstable_scheduleCallback,UE=e.unstable_NormalPriority,Ie={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cf(){return{controller:new jE,data:new Map,refCount:0}}function oo(r){r.refCount--,r.refCount===0&&HE(UE,function(){r.controller.abort()})}var co=null,vf=0,Fs=0,Os=null;function PE(r,n){if(co===null){var o=co=[];vf=0,Fs=Tp(),Os={status:"pending",value:void 0,then:function(d){o.push(d)}}}return vf++,n.then(W0,W0),n}function W0(){if(--vf===0&&co!==null){Os!==null&&(Os.status="fulfilled");var r=co;co=null,Fs=0,Os=null;for(var n=0;n<r.length;n++)(0,r[n])()}}function WE(r,n){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return r.then(function(){d.status="fulfilled",d.value=n;for(var y=0;y<o.length;y++)(0,o[y])(n)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}var Y0=A.S;A.S=function(r,n){Lb=ci(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&PE(r,n),Y0!==null&&Y0(r,n)};var Dn=I(null);function kf(){var r=Dn.current;return r!==null?r:Ce.pooledCache}function lh(r,n){n===null?ut(Dn,Dn.current):ut(Dn,n.pool)}function G0(){var r=kf();return r===null?null:{parent:Ie._currentValue,pool:r}}var Ds=Error(a(460)),Sf=Error(a(474)),oh=Error(a(542)),ch={then:function(){}};function X0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function V0(r,n,o){switch(o=r[o],o===void 0?r.push(n):o!==n&&(n.then(ia,ia),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,Q0(r),r;default:if(typeof n.status=="string")n.then(ia,ia);else{if(r=Ce,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=n,r.status="pending",r.then(function(d){if(n.status==="pending"){var y=n;y.status="fulfilled",y.value=d}},function(d){if(n.status==="pending"){var y=n;y.status="rejected",y.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,Q0(r),r}throw zn=n,Ds}}function $n(r){try{var n=r._init;return n(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(zn=o,Ds):o}}var zn=null;function Z0(){if(zn===null)throw Error(a(459));var r=zn;return zn=null,r}function Q0(r){if(r===Ds||r===oh)throw Error(a(483))}var $s=null,ho=0;function hh(r){var n=ho;return ho+=1,$s===null&&($s=[]),V0($s,r,n)}function uo(r,n){n=n.props.ref,r.ref=n!==void 0?n:null}function uh(r,n){throw n.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(n),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":r)))}function K0(r){function n(tt,Z){if(r){var rt=tt.deletions;rt===null?(tt.deletions=[Z],tt.flags|=16):rt.push(Z)}}function o(tt,Z){if(!r)return null;for(;Z!==null;)n(tt,Z),Z=Z.sibling;return null}function d(tt){for(var Z=new Map;tt!==null;)tt.key!==null?Z.set(tt.key,tt):Z.set(tt.index,tt),tt=tt.sibling;return Z}function y(tt,Z){return tt=aa(tt,Z),tt.index=0,tt.sibling=null,tt}function b(tt,Z,rt){return tt.index=rt,r?(rt=tt.alternate,rt!==null?(rt=rt.index,rt<Z?(tt.flags|=67108866,Z):rt):(tt.flags|=67108866,Z)):(tt.flags|=1048576,Z)}function w(tt){return r&&tt.alternate===null&&(tt.flags|=67108866),tt}function M(tt,Z,rt,pt){return Z===null||Z.tag!==6?(Z=uf(rt,tt.mode,pt),Z.return=tt,Z):(Z=y(Z,rt),Z.return=tt,Z)}function X(tt,Z,rt,pt){var Mt=rt.type;return Mt===C?ht(tt,Z,rt.props.children,pt,rt.key):Z!==null&&(Z.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===R&&$n(Mt)===Z.type)?(Z=y(Z,rt.props),uo(Z,rt),Z.return=tt,Z):(Z=rh(rt.type,rt.key,rt.props,null,tt.mode,pt),uo(Z,rt),Z.return=tt,Z)}function at(tt,Z,rt,pt){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==rt.containerInfo||Z.stateNode.implementation!==rt.implementation?(Z=df(rt,tt.mode,pt),Z.return=tt,Z):(Z=y(Z,rt.children||[]),Z.return=tt,Z)}function ht(tt,Z,rt,pt,Mt){return Z===null||Z.tag!==7?(Z=Mn(rt,tt.mode,pt,Mt),Z.return=tt,Z):(Z=y(Z,rt),Z.return=tt,Z)}function gt(tt,Z,rt){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=uf(""+Z,tt.mode,rt),Z.return=tt,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case m:return rt=rh(Z.type,Z.key,Z.props,null,tt.mode,rt),uo(rt,Z),rt.return=tt,rt;case v:return Z=df(Z,tt.mode,rt),Z.return=tt,Z;case R:return Z=$n(Z),gt(tt,Z,rt)}if(j(Z)||et(Z))return Z=Mn(Z,tt.mode,rt,null),Z.return=tt,Z;if(typeof Z.then=="function")return gt(tt,hh(Z),rt);if(Z.$$typeof===E)return gt(tt,sh(tt,Z),rt);uh(tt,Z)}return null}function nt(tt,Z,rt,pt){var Mt=Z!==null?Z.key:null;if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return Mt!==null?null:M(tt,Z,""+rt,pt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case m:return rt.key===Mt?X(tt,Z,rt,pt):null;case v:return rt.key===Mt?at(tt,Z,rt,pt):null;case R:return rt=$n(rt),nt(tt,Z,rt,pt)}if(j(rt)||et(rt))return Mt!==null?null:ht(tt,Z,rt,pt,null);if(typeof rt.then=="function")return nt(tt,Z,hh(rt),pt);if(rt.$$typeof===E)return nt(tt,Z,sh(tt,rt),pt);uh(tt,rt)}return null}function ot(tt,Z,rt,pt,Mt){if(typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint")return tt=tt.get(rt)||null,M(Z,tt,""+pt,Mt);if(typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case m:return tt=tt.get(pt.key===null?rt:pt.key)||null,X(Z,tt,pt,Mt);case v:return tt=tt.get(pt.key===null?rt:pt.key)||null,at(Z,tt,pt,Mt);case R:return pt=$n(pt),ot(tt,Z,rt,pt,Mt)}if(j(pt)||et(pt))return tt=tt.get(rt)||null,ht(Z,tt,pt,Mt,null);if(typeof pt.then=="function")return ot(tt,Z,rt,hh(pt),Mt);if(pt.$$typeof===E)return ot(tt,Z,rt,sh(Z,pt),Mt);uh(Z,pt)}return null}function kt(tt,Z,rt,pt){for(var Mt=null,ne=null,Bt=Z,Yt=Z=0,Kt=null;Bt!==null&&Yt<rt.length;Yt++){Bt.index>Yt?(Kt=Bt,Bt=null):Kt=Bt.sibling;var se=nt(tt,Bt,rt[Yt],pt);if(se===null){Bt===null&&(Bt=Kt);break}r&&Bt&&se.alternate===null&&n(tt,Bt),Z=b(se,Z,Yt),ne===null?Mt=se:ne.sibling=se,ne=se,Bt=Kt}if(Yt===rt.length)return o(tt,Bt),te&&na(tt,Yt),Mt;if(Bt===null){for(;Yt<rt.length;Yt++)Bt=gt(tt,rt[Yt],pt),Bt!==null&&(Z=b(Bt,Z,Yt),ne===null?Mt=Bt:ne.sibling=Bt,ne=Bt);return te&&na(tt,Yt),Mt}for(Bt=d(Bt);Yt<rt.length;Yt++)Kt=ot(Bt,tt,Yt,rt[Yt],pt),Kt!==null&&(r&&Kt.alternate!==null&&Bt.delete(Kt.key===null?Yt:Kt.key),Z=b(Kt,Z,Yt),ne===null?Mt=Kt:ne.sibling=Kt,ne=Kt);return r&&Bt.forEach(function(un){return n(tt,un)}),te&&na(tt,Yt),Mt}function $t(tt,Z,rt,pt){if(rt==null)throw Error(a(151));for(var Mt=null,ne=null,Bt=Z,Yt=Z=0,Kt=null,se=rt.next();Bt!==null&&!se.done;Yt++,se=rt.next()){Bt.index>Yt?(Kt=Bt,Bt=null):Kt=Bt.sibling;var un=nt(tt,Bt,se.value,pt);if(un===null){Bt===null&&(Bt=Kt);break}r&&Bt&&un.alternate===null&&n(tt,Bt),Z=b(un,Z,Yt),ne===null?Mt=un:ne.sibling=un,ne=un,Bt=Kt}if(se.done)return o(tt,Bt),te&&na(tt,Yt),Mt;if(Bt===null){for(;!se.done;Yt++,se=rt.next())se=gt(tt,se.value,pt),se!==null&&(Z=b(se,Z,Yt),ne===null?Mt=se:ne.sibling=se,ne=se);return te&&na(tt,Yt),Mt}for(Bt=d(Bt);!se.done;Yt++,se=rt.next())se=ot(Bt,tt,Yt,se.value,pt),se!==null&&(r&&se.alternate!==null&&Bt.delete(se.key===null?Yt:se.key),Z=b(se,Z,Yt),ne===null?Mt=se:ne.sibling=se,ne=se);return r&&Bt.forEach(function(iA){return n(tt,iA)}),te&&na(tt,Yt),Mt}function be(tt,Z,rt,pt){if(typeof rt=="object"&&rt!==null&&rt.type===C&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case m:t:{for(var Mt=rt.key;Z!==null;){if(Z.key===Mt){if(Mt=rt.type,Mt===C){if(Z.tag===7){o(tt,Z.sibling),pt=y(Z,rt.props.children),pt.return=tt,tt=pt;break t}}else if(Z.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===R&&$n(Mt)===Z.type){o(tt,Z.sibling),pt=y(Z,rt.props),uo(pt,rt),pt.return=tt,tt=pt;break t}o(tt,Z);break}else n(tt,Z);Z=Z.sibling}rt.type===C?(pt=Mn(rt.props.children,tt.mode,pt,rt.key),pt.return=tt,tt=pt):(pt=rh(rt.type,rt.key,rt.props,null,tt.mode,pt),uo(pt,rt),pt.return=tt,tt=pt)}return w(tt);case v:t:{for(Mt=rt.key;Z!==null;){if(Z.key===Mt)if(Z.tag===4&&Z.stateNode.containerInfo===rt.containerInfo&&Z.stateNode.implementation===rt.implementation){o(tt,Z.sibling),pt=y(Z,rt.children||[]),pt.return=tt,tt=pt;break t}else{o(tt,Z);break}else n(tt,Z);Z=Z.sibling}pt=df(rt,tt.mode,pt),pt.return=tt,tt=pt}return w(tt);case R:return rt=$n(rt),be(tt,Z,rt,pt)}if(j(rt))return kt(tt,Z,rt,pt);if(et(rt)){if(Mt=et(rt),typeof Mt!="function")throw Error(a(150));return rt=Mt.call(rt),$t(tt,Z,rt,pt)}if(typeof rt.then=="function")return be(tt,Z,hh(rt),pt);if(rt.$$typeof===E)return be(tt,Z,sh(tt,rt),pt);uh(tt,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint"?(rt=""+rt,Z!==null&&Z.tag===6?(o(tt,Z.sibling),pt=y(Z,rt),pt.return=tt,tt=pt):(o(tt,Z),pt=uf(rt,tt.mode,pt),pt.return=tt,tt=pt),w(tt)):o(tt,Z)}return function(tt,Z,rt,pt){try{ho=0;var Mt=be(tt,Z,rt,pt);return $s=null,Mt}catch(Bt){if(Bt===Ds||Bt===oh)throw Bt;var ne=Hi(29,Bt,null,tt.mode);return ne.lanes=pt,ne.return=tt,ne}finally{}}}var Nn=K0(!0),J0=K0(!1),Ga=!1;function Tf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wf(r,n){r=r.updateQueue,n.updateQueue===r&&(n.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Xa(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Va(r,n,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ue&2)!==0){var y=d.pending;return y===null?n.next=n:(n.next=y.next,y.next=n),d.pending=n,n=ih(r),$0(r,null,o),n}return eh(r,d,n,o),ih(r)}function fo(r,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var d=n.lanes;d&=r.pendingLanes,o|=d,n.lanes=o,Xl(r,o)}}function _f(r,n){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?y=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?y=b=n:b=b.next=n}else y=b=n;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=n:r.next=n,o.lastBaseUpdate=n}var Bf=!1;function po(){if(Bf){var r=Os;if(r!==null)throw r}}function go(r,n,o,d){Bf=!1;var y=r.updateQueue;Ga=!1;var b=y.firstBaseUpdate,w=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var X=M,at=X.next;X.next=null,w===null?b=at:w.next=at,w=X;var ht=r.alternate;ht!==null&&(ht=ht.updateQueue,M=ht.lastBaseUpdate,M!==w&&(M===null?ht.firstBaseUpdate=at:M.next=at,ht.lastBaseUpdate=X))}if(b!==null){var gt=y.baseState;w=0,ht=at=X=null,M=b;do{var nt=M.lane&-536870913,ot=nt!==M.lane;if(ot?(Qt&nt)===nt:(d&nt)===nt){nt!==0&&nt===Fs&&(Bf=!0),ht!==null&&(ht=ht.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});t:{var kt=r,$t=M;nt=n;var be=o;switch($t.tag){case 1:if(kt=$t.payload,typeof kt=="function"){gt=kt.call(be,gt,nt);break t}gt=kt;break t;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=$t.payload,nt=typeof kt=="function"?kt.call(be,gt,nt):kt,nt==null)break t;gt=g({},gt,nt);break t;case 2:Ga=!0}}nt=M.callback,nt!==null&&(r.flags|=64,ot&&(r.flags|=8192),ot=y.callbacks,ot===null?y.callbacks=[nt]:ot.push(nt))}else ot={lane:nt,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ht===null?(at=ht=ot,X=gt):ht=ht.next=ot,w|=nt;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ot=M,M=ot.next,ot.next=null,y.lastBaseUpdate=ot,y.shared.pending=null}}while(!0);ht===null&&(X=gt),y.baseState=X,y.firstBaseUpdate=at,y.lastBaseUpdate=ht,b===null&&(y.shared.lanes=0),tn|=w,r.lanes=w,r.memoizedState=gt}}function tx(r,n){if(typeof r!="function")throw Error(a(191,r));r.call(n)}function ex(r,n){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)tx(o[r],n)}var zs=I(null),dh=I(0);function ix(r,n){r=ma,ut(dh,r),ut(zs,n),ma=r|n.baseLanes}function Ef(){ut(dh,ma),ut(zs,zs.current)}function Lf(){ma=dh.current,it(zs),it(dh)}var Ui=I(null),lr=null;function Za(r){var n=r.alternate;ut($e,$e.current&1),ut(Ui,r),lr===null&&(n===null||zs.current!==null||n.memoizedState!==null)&&(lr=r)}function Af(r){ut($e,$e.current),ut(Ui,r),lr===null&&(lr=r)}function rx(r){r.tag===22?(ut($e,$e.current),ut(Ui,r),lr===null&&(lr=r)):Qa()}function Qa(){ut($e,$e.current),ut(Ui,Ui.current)}function Pi(r){it(Ui),lr===r&&(lr=null),it($e)}var $e=I(0);function fh(r){for(var n=r;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||$p(o)||zp(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var oa=0,Wt=null,ye=null,je=null,ph=!1,Ns=!1,qn=!1,gh=0,mo=0,qs=null,YE=0;function Me(){throw Error(a(321))}function Mf(r,n){if(n===null)return!1;for(var o=0;o<n.length&&o<r.length;o++)if(!ji(r[o],n[o]))return!1;return!0}function Rf(r,n,o,d,y,b){return oa=b,Wt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=r===null||r.memoizedState===null?Ix:Gf,qn=!1,b=o(d,y),qn=!1,Ns&&(b=nx(n,o,d,y)),ax(r),b}function ax(r){A.H=bo;var n=ye!==null&&ye.next!==null;if(oa=0,je=ye=Wt=null,ph=!1,mo=0,qs=null,n)throw Error(a(300));r===null||He||(r=r.dependencies,r!==null&&nh(r)&&(He=!0))}function nx(r,n,o,d){Wt=r;var y=0;do{if(Ns&&(qs=null),mo=0,Ns=!1,25<=y)throw Error(a(301));if(y+=1,je=ye=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}A.H=jx,b=n(o,d)}while(Ns);return b}function GE(){var r=A.H,n=r.useState()[0];return n=typeof n.then=="function"?yo(n):n,r=r.useState()[0],(ye!==null?ye.memoizedState:null)!==r&&(Wt.flags|=1024),n}function Ff(){var r=gh!==0;return gh=0,r}function Of(r,n,o){n.updateQueue=r.updateQueue,n.flags&=-2053,r.lanes&=~o}function Df(r){if(ph){for(r=r.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}ph=!1}oa=0,je=ye=Wt=null,Ns=!1,mo=gh=0,qs=null}function bi(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?Wt.memoizedState=je=r:je=je.next=r,je}function ze(){if(ye===null){var r=Wt.alternate;r=r!==null?r.memoizedState:null}else r=ye.next;var n=je===null?Wt.memoizedState:je.next;if(n!==null)je=n,ye=r;else{if(r===null)throw Wt.alternate===null?Error(a(467)):Error(a(310));ye=r,r={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},je===null?Wt.memoizedState=je=r:je=je.next=r}return je}function mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yo(r){var n=mo;return mo+=1,qs===null&&(qs=[]),r=V0(qs,r,n),n=Wt,(je===null?n.memoizedState:je.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?Ix:Gf),r}function yh(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return yo(r);if(r.$$typeof===E)return ri(r)}throw Error(a(438,String(r)))}function $f(r){var n=null,o=Wt.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var d=Wt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(n={data:d.data.map(function(y){return y.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=mh(),Wt.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(r),d=0;d<r;d++)o[d]=Y;return n.index++,o}function ca(r,n){return typeof n=="function"?n(r):n}function xh(r){var n=ze();return zf(n,ye,r)}function zf(r,n,o){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=o;var y=r.baseQueue,b=d.pending;if(b!==null){if(y!==null){var w=y.next;y.next=b.next,b.next=w}n.baseQueue=y=b,d.pending=null}if(b=r.baseState,y===null)r.memoizedState=b;else{n=y.next;var M=w=null,X=null,at=n,ht=!1;do{var gt=at.lane&-536870913;if(gt!==at.lane?(Qt>)===gt:(oa>)===gt){var nt=at.revertLane;if(nt===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null}),gt===Fs&&(ht=!0);else if((oa&nt)===nt){at=at.next,nt===Fs&&(ht=!0);continue}else gt={lane:0,revertLane:at.revertLane,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},X===null?(M=X=gt,w=b):X=X.next=gt,Wt.lanes|=nt,tn|=nt;gt=at.action,qn&&o(b,gt),b=at.hasEagerState?at.eagerState:o(b,gt)}else nt={lane:gt,revertLane:at.revertLane,gesture:at.gesture,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},X===null?(M=X=nt,w=b):X=X.next=nt,Wt.lanes|=gt,tn|=gt;at=at.next}while(at!==null&&at!==n);if(X===null?w=b:X.next=M,!ji(b,r.memoizedState)&&(He=!0,ht&&(o=Os,o!==null)))throw o;r.memoizedState=b,r.baseState=w,r.baseQueue=X,d.lastRenderedState=b}return y===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Nf(r){var n=ze(),o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var d=o.dispatch,y=o.pending,b=n.memoizedState;if(y!==null){o.pending=null;var w=y=y.next;do b=r(b,w.action),w=w.next;while(w!==y);ji(b,n.memoizedState)||(He=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),o.lastRenderedState=b}return[b,d]}function sx(r,n,o){var d=Wt,y=ze(),b=te;if(b){if(o===void 0)throw Error(a(407));o=o()}else o=n();var w=!ji((ye||y).memoizedState,o);if(w&&(y.memoizedState=o,He=!0),y=y.queue,jf(cx.bind(null,d,y,r),[r]),y.getSnapshot!==n||w||je!==null&&je.memoizedState.tag&1){if(d.flags|=2048,Is(9,{destroy:void 0},ox.bind(null,d,y,o,n),null),Ce===null)throw Error(a(349));b||(oa&127)!==0||lx(d,n,o)}return o}function lx(r,n,o){r.flags|=16384,r={getSnapshot:n,value:o},n=Wt.updateQueue,n===null?(n=mh(),Wt.updateQueue=n,n.stores=[r]):(o=n.stores,o===null?n.stores=[r]:o.push(r))}function ox(r,n,o,d){n.value=o,n.getSnapshot=d,hx(n)&&ux(r)}function cx(r,n,o){return o(function(){hx(n)&&ux(r)})}function hx(r){var n=r.getSnapshot;r=r.value;try{var o=n();return!ji(r,o)}catch{return!0}}function ux(r){var n=An(r,2);n!==null&&Fi(n,r,2)}function qf(r){var n=bi();if(typeof r=="function"){var o=r;if(r=o(),qn){gr(!0);try{o()}finally{gr(!1)}}}return n.memoizedState=n.baseState=r,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:r},n}function dx(r,n,o,d){return r.baseState=o,zf(r,ye,typeof d=="function"?d:ca)}function XE(r,n,o,d,y){if(vh(r))throw Error(a(485));if(r=n.action,r!==null){var b={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};A.T!==null?o(!0):b.isTransition=!1,d(b),o=n.pending,o===null?(b.next=n.pending=b,fx(n,b)):(b.next=o.next,n.pending=o.next=b)}}function fx(r,n){var o=n.action,d=n.payload,y=r.state;if(n.isTransition){var b=A.T,w={};A.T=w;try{var M=o(y,d),X=A.S;X!==null&&X(w,M),px(r,n,M)}catch(at){If(r,n,at)}finally{b!==null&&w.types!==null&&(b.types=w.types),A.T=b}}else try{b=o(y,d),px(r,n,b)}catch(at){If(r,n,at)}}function px(r,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){gx(r,n,d)},function(d){return If(r,n,d)}):gx(r,n,o)}function gx(r,n,o){n.status="fulfilled",n.value=o,mx(n),r.state=o,n=r.pending,n!==null&&(o=n.next,o===n?r.pending=null:(o=o.next,n.next=o,fx(r,o)))}function If(r,n,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do n.status="rejected",n.reason=o,mx(n),n=n.next;while(n!==d)}r.action=null}function mx(r){r=r.listeners;for(var n=0;n<r.length;n++)(0,r[n])()}function yx(r,n){return n}function xx(r,n){if(te){var o=Ce.formState;if(o!==null){t:{var d=Wt;if(te){if(Se){e:{for(var y=Se,b=sr;y.nodeType!==8;){if(!b){y=null;break e}if(y=or(y.nextSibling),y===null){y=null;break e}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){Se=or(y.nextSibling),d=y.data==="F!";break t}}Wa(d)}d=!1}d&&(n=o[0])}}return o=bi(),o.memoizedState=o.baseState=n,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yx,lastRenderedState:n},o.queue=d,o=zx.bind(null,Wt,d),d.dispatch=o,d=qf(!1),b=Yf.bind(null,Wt,!1,d.queue),d=bi(),y={state:n,dispatch:null,action:r,pending:null},d.queue=y,o=XE.bind(null,Wt,y,b,o),y.dispatch=o,d.memoizedState=r,[n,o,!1]}function bx(r){var n=ze();return Cx(n,ye,r)}function Cx(r,n,o){if(n=zf(r,n,yx)[0],r=xh(ca)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var d=yo(n)}catch(w){throw w===Ds?oh:w}else d=n;n=ze();var y=n.queue,b=y.dispatch;return o!==n.memoizedState&&(Wt.flags|=2048,Is(9,{destroy:void 0},VE.bind(null,y,o),null)),[d,b,r]}function VE(r,n){r.action=n}function vx(r){var n=ze(),o=ye;if(o!==null)return Cx(n,o,r);ze(),n=n.memoizedState,o=ze();var d=o.queue.dispatch;return o.memoizedState=r,[n,d,!1]}function Is(r,n,o,d){return r={tag:r,create:o,deps:d,inst:n,next:null},n=Wt.updateQueue,n===null&&(n=mh(),Wt.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,n.lastEffect=r),r}function kx(){return ze().memoizedState}function bh(r,n,o,d){var y=bi();Wt.flags|=r,y.memoizedState=Is(1|n,{destroy:void 0},o,d===void 0?null:d)}function Ch(r,n,o,d){var y=ze();d=d===void 0?null:d;var b=y.memoizedState.inst;ye!==null&&d!==null&&Mf(d,ye.memoizedState.deps)?y.memoizedState=Is(n,b,o,d):(Wt.flags|=r,y.memoizedState=Is(1|n,b,o,d))}function Sx(r,n){bh(8390656,8,r,n)}function jf(r,n){Ch(2048,8,r,n)}function ZE(r){Wt.flags|=4;var n=Wt.updateQueue;if(n===null)n=mh(),Wt.updateQueue=n,n.events=[r];else{var o=n.events;o===null?n.events=[r]:o.push(r)}}function Tx(r){var n=ze().memoizedState;return ZE({ref:n,nextImpl:r}),function(){if((ue&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function wx(r,n){return Ch(4,2,r,n)}function _x(r,n){return Ch(4,4,r,n)}function Bx(r,n){if(typeof n=="function"){r=r();var o=n(r);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return r=r(),n.current=r,function(){n.current=null}}function Ex(r,n,o){o=o!=null?o.concat([r]):null,Ch(4,4,Bx.bind(null,n,r),o)}function Hf(){}function Lx(r,n){var o=ze();n=n===void 0?null:n;var d=o.memoizedState;return n!==null&&Mf(n,d[1])?d[0]:(o.memoizedState=[r,n],r)}function Ax(r,n){var o=ze();n=n===void 0?null:n;var d=o.memoizedState;if(n!==null&&Mf(n,d[1]))return d[0];if(d=r(),qn){gr(!0);try{r()}finally{gr(!1)}}return o.memoizedState=[d,n],d}function Uf(r,n,o){return o===void 0||(oa&1073741824)!==0&&(Qt&261930)===0?r.memoizedState=n:(r.memoizedState=o,r=Mb(),Wt.lanes|=r,tn|=r,o)}function Mx(r,n,o,d){return ji(o,n)?o:zs.current!==null?(r=Uf(r,o,d),ji(r,n)||(He=!0),r):(oa&42)===0||(oa&1073741824)!==0&&(Qt&261930)===0?(He=!0,r.memoizedState=o):(r=Mb(),Wt.lanes|=r,tn|=r,n)}function Rx(r,n,o,d,y){var b=H.p;H.p=b!==0&&8>b?b:8;var w=A.T,M={};A.T=M,Yf(r,!1,n,o);try{var X=y(),at=A.S;if(at!==null&&at(M,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ht=WE(X,d);xo(r,n,ht,Gi(r))}else xo(r,n,d,Gi(r))}catch(gt){xo(r,n,{then:function(){},status:"rejected",reason:gt},Gi())}finally{H.p=b,w!==null&&M.types!==null&&(w.types=M.types),A.T=w}}function QE(){}function Pf(r,n,o,d){if(r.tag!==5)throw Error(a(476));var y=Fx(r).queue;Rx(r,y,n,z,o===null?QE:function(){return Ox(r),o(d)})}function Fx(r){var n=r.memoizedState;if(n!==null)return n;n={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:z},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:o},next:null},r.memoizedState=n,r=r.alternate,r!==null&&(r.memoizedState=n),n}function Ox(r){var n=Fx(r);n.next===null&&(n=r.alternate.memoizedState),xo(r,n.next.queue,{},Gi())}function Wf(){return ri(Do)}function Dx(){return ze().memoizedState}function $x(){return ze().memoizedState}function KE(r){for(var n=r.return;n!==null;){switch(n.tag){case 24:case 3:var o=Gi();r=Xa(o);var d=Va(n,r,o);d!==null&&(Fi(d,n,o),fo(d,n,o)),n={cache:Cf()},r.payload=n;return}n=n.return}}function JE(r,n,o){var d=Gi();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},vh(r)?Nx(n,o):(o=cf(r,n,o,d),o!==null&&(Fi(o,r,d),qx(o,n,d)))}function zx(r,n,o){var d=Gi();xo(r,n,o,d)}function xo(r,n,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(vh(r))Nx(n,y);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var w=n.lastRenderedState,M=b(w,o);if(y.hasEagerState=!0,y.eagerState=M,ji(M,w))return eh(r,n,y,0),Ce===null&&th(),!1}catch{}finally{}if(o=cf(r,n,y,d),o!==null)return Fi(o,r,d),qx(o,n,d),!0}return!1}function Yf(r,n,o,d){if(d={lane:2,revertLane:Tp(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},vh(r)){if(n)throw Error(a(479))}else n=cf(r,o,d,2),n!==null&&Fi(n,r,2)}function vh(r){var n=r.alternate;return r===Wt||n!==null&&n===Wt}function Nx(r,n){Ns=ph=!0;var o=r.pending;o===null?n.next=n:(n.next=o.next,o.next=n),r.pending=n}function qx(r,n,o){if((o&4194048)!==0){var d=n.lanes;d&=r.pendingLanes,o|=d,n.lanes=o,Xl(r,o)}}var bo={readContext:ri,use:yh,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};bo.useEffectEvent=Me;var Ix={readContext:ri,use:yh,useCallback:function(r,n){return bi().memoizedState=[r,n===void 0?null:n],r},useContext:ri,useEffect:Sx,useImperativeHandle:function(r,n,o){o=o!=null?o.concat([r]):null,bh(4194308,4,Bx.bind(null,n,r),o)},useLayoutEffect:function(r,n){return bh(4194308,4,r,n)},useInsertionEffect:function(r,n){bh(4,2,r,n)},useMemo:function(r,n){var o=bi();n=n===void 0?null:n;var d=r();if(qn){gr(!0);try{r()}finally{gr(!1)}}return o.memoizedState=[d,n],d},useReducer:function(r,n,o){var d=bi();if(o!==void 0){var y=o(n);if(qn){gr(!0);try{o(n)}finally{gr(!1)}}}else y=n;return d.memoizedState=d.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},d.queue=r,r=r.dispatch=JE.bind(null,Wt,r),[d.memoizedState,r]},useRef:function(r){var n=bi();return r={current:r},n.memoizedState=r},useState:function(r){r=qf(r);var n=r.queue,o=zx.bind(null,Wt,n);return n.dispatch=o,[r.memoizedState,o]},useDebugValue:Hf,useDeferredValue:function(r,n){var o=bi();return Uf(o,r,n)},useTransition:function(){var r=qf(!1);return r=Rx.bind(null,Wt,r.queue,!0,!1),bi().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,n,o){var d=Wt,y=bi();if(te){if(o===void 0)throw Error(a(407));o=o()}else{if(o=n(),Ce===null)throw Error(a(349));(Qt&127)!==0||lx(d,n,o)}y.memoizedState=o;var b={value:o,getSnapshot:n};return y.queue=b,Sx(cx.bind(null,d,b,r),[r]),d.flags|=2048,Is(9,{destroy:void 0},ox.bind(null,d,b,o,n),null),o},useId:function(){var r=bi(),n=Ce.identifierPrefix;if(te){var o=Nr,d=zr;o=(d&~(1<<32-Ze(d)-1)).toString(32)+o,n="_"+n+"R_"+o,o=gh++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=YE++,n="_"+n+"r_"+o.toString(32)+"_";return r.memoizedState=n},useHostTransitionStatus:Wf,useFormState:xx,useActionState:xx,useOptimistic:function(r){var n=bi();n.memoizedState=n.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Yf.bind(null,Wt,!0,o),o.dispatch=n,[r,n]},useMemoCache:$f,useCacheRefresh:function(){return bi().memoizedState=KE.bind(null,Wt)},useEffectEvent:function(r){var n=bi(),o={impl:r};return n.memoizedState=o,function(){if((ue&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Gf={readContext:ri,use:yh,useCallback:Lx,useContext:ri,useEffect:jf,useImperativeHandle:Ex,useInsertionEffect:wx,useLayoutEffect:_x,useMemo:Ax,useReducer:xh,useRef:kx,useState:function(){return xh(ca)},useDebugValue:Hf,useDeferredValue:function(r,n){var o=ze();return Mx(o,ye.memoizedState,r,n)},useTransition:function(){var r=xh(ca)[0],n=ze().memoizedState;return[typeof r=="boolean"?r:yo(r),n]},useSyncExternalStore:sx,useId:Dx,useHostTransitionStatus:Wf,useFormState:bx,useActionState:bx,useOptimistic:function(r,n){var o=ze();return dx(o,ye,r,n)},useMemoCache:$f,useCacheRefresh:$x};Gf.useEffectEvent=Tx;var jx={readContext:ri,use:yh,useCallback:Lx,useContext:ri,useEffect:jf,useImperativeHandle:Ex,useInsertionEffect:wx,useLayoutEffect:_x,useMemo:Ax,useReducer:Nf,useRef:kx,useState:function(){return Nf(ca)},useDebugValue:Hf,useDeferredValue:function(r,n){var o=ze();return ye===null?Uf(o,r,n):Mx(o,ye.memoizedState,r,n)},useTransition:function(){var r=Nf(ca)[0],n=ze().memoizedState;return[typeof r=="boolean"?r:yo(r),n]},useSyncExternalStore:sx,useId:Dx,useHostTransitionStatus:Wf,useFormState:vx,useActionState:vx,useOptimistic:function(r,n){var o=ze();return ye!==null?dx(o,ye,r,n):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:$f,useCacheRefresh:$x};jx.useEffectEvent=Tx;function Xf(r,n,o,d){n=r.memoizedState,o=o(d,n),o=o==null?n:g({},n,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var Vf={enqueueSetState:function(r,n,o){r=r._reactInternals;var d=Gi(),y=Xa(d);y.payload=n,o!=null&&(y.callback=o),n=Va(r,y,d),n!==null&&(Fi(n,r,d),fo(n,r,d))},enqueueReplaceState:function(r,n,o){r=r._reactInternals;var d=Gi(),y=Xa(d);y.tag=1,y.payload=n,o!=null&&(y.callback=o),n=Va(r,y,d),n!==null&&(Fi(n,r,d),fo(n,r,d))},enqueueForceUpdate:function(r,n){r=r._reactInternals;var o=Gi(),d=Xa(o);d.tag=2,n!=null&&(d.callback=n),n=Va(r,d,o),n!==null&&(Fi(n,r,o),fo(n,r,o))}};function Hx(r,n,o,d,y,b,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,b,w):n.prototype&&n.prototype.isPureReactComponent?!ao(o,d)||!ao(y,b):!0}function Ux(r,n,o,d){r=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,d),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,d),n.state!==r&&Vf.enqueueReplaceState(n,n.state,null)}function In(r,n){var o=n;if("ref"in n){o={};for(var d in n)d!=="ref"&&(o[d]=n[d])}if(r=r.defaultProps){o===n&&(o=g({},o));for(var y in r)o[y]===void 0&&(o[y]=r[y])}return o}function Px(r){Jc(r)}function Wx(r){console.error(r)}function Yx(r){Jc(r)}function kh(r,n){try{var o=r.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(d){setTimeout(function(){throw d})}}function Gx(r,n,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Zf(r,n,o){return o=Xa(o),o.tag=3,o.payload={element:null},o.callback=function(){kh(r,n)},o}function Xx(r){return r=Xa(r),r.tag=3,r}function Vx(r,n,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var b=d.value;r.payload=function(){return y(b)},r.callback=function(){Gx(n,o,d)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(r.callback=function(){Gx(n,o,d),typeof y!="function"&&(en===null?en=new Set([this]):en.add(this));var M=d.stack;this.componentDidCatch(d.value,{componentStack:M!==null?M:""})})}function tL(r,n,o,d,y){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(n=o.alternate,n!==null&&Rs(n,o,y,!0),o=Ui.current,o!==null){switch(o.tag){case 31:case 13:return lr===null?Oh():o.alternate===null&&Re===0&&(Re=3),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ch?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([d]):n.add(d),vp(r,d,y)),!1;case 22:return o.flags|=65536,d===ch?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([d]):o.add(d)),vp(r,d,y)),!1}throw Error(a(435,o.tag))}return vp(r,d,y),Oh(),!1}if(te)return n=Ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=y,d!==gf&&(r=Error(a(422),{cause:d}),lo(rr(r,o)))):(d!==gf&&(n=Error(a(423),{cause:d}),lo(rr(n,o))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,d=rr(d,o),y=Zf(r.stateNode,d,y),_f(r,y),Re!==4&&(Re=2)),!1;var b=Error(a(520),{cause:d});if(b=rr(b,o),Bo===null?Bo=[b]:Bo.push(b),Re!==4&&(Re=2),n===null)return!0;d=rr(d,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,r=y&-y,o.lanes|=r,r=Zf(o.stateNode,d,r),_f(o,r),!1;case 1:if(n=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(en===null||!en.has(b))))return o.flags|=65536,y&=-y,o.lanes|=y,y=Xx(y),Vx(y,r,o,d),_f(o,y),!1}o=o.return}while(o!==null);return!1}var Qf=Error(a(461)),He=!1;function ai(r,n,o,d){n.child=r===null?J0(n,null,o,d):Nn(n,r.child,o,d)}function Zx(r,n,o,d,y){o=o.render;var b=n.ref;if("ref"in d){var w={};for(var M in d)M!=="ref"&&(w[M]=d[M])}else w=d;return On(n),d=Rf(r,n,o,w,b,y),M=Ff(),r!==null&&!He?(Of(r,n,y),ha(r,n,y)):(te&&M&&ff(n),n.flags|=1,ai(r,n,d,y),n.child)}function Qx(r,n,o,d,y){if(r===null){var b=o.type;return typeof b=="function"&&!hf(b)&&b.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=b,Kx(r,n,b,d,y)):(r=rh(o.type,null,d,n,n.mode,y),r.ref=n.ref,r.return=n,n.child=r)}if(b=r.child,!np(r,y)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:ao,o(w,d)&&r.ref===n.ref)return ha(r,n,y)}return n.flags|=1,r=aa(b,d),r.ref=n.ref,r.return=n,n.child=r}function Kx(r,n,o,d,y){if(r!==null){var b=r.memoizedProps;if(ao(b,d)&&r.ref===n.ref)if(He=!1,n.pendingProps=d=b,np(r,y))(r.flags&131072)!==0&&(He=!0);else return n.lanes=r.lanes,ha(r,n,y)}return Kf(r,n,o,d,y)}function Jx(r,n,o,d){var y=d.children,b=r!==null?r.memoizedState:null;if(r===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((n.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,r!==null){for(d=n.child=r.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~b}else d=0,n.child=null;return tb(r,n,b,o,d)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},r!==null&&lh(n,b!==null?b.cachePool:null),b!==null?ix(n,b):Ef(),rx(n);else return d=n.lanes=536870912,tb(r,n,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(lh(n,b.cachePool),ix(n,b),Qa(),n.memoizedState=null):(r!==null&&lh(n,null),Ef(),Qa());return ai(r,n,y,o),n.child}function Co(r,n){return r!==null&&r.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function tb(r,n,o,d,y){var b=kf();return b=b===null?null:{parent:Ie._currentValue,pool:b},n.memoizedState={baseLanes:o,cachePool:b},r!==null&&lh(n,null),Ef(),rx(n),r!==null&&Rs(r,n,d,!0),n.childLanes=y,null}function Sh(r,n){return n=wh({mode:n.mode,children:n.children},r.mode),n.ref=r.ref,r.child=n,n.return=r,n}function eb(r,n,o){return Nn(n,r.child,null,o),r=Sh(n,n.pendingProps),r.flags|=2,Pi(n),n.memoizedState=null,r}function eL(r,n,o){var d=n.pendingProps,y=(n.flags&128)!==0;if(n.flags&=-129,r===null){if(te){if(d.mode==="hidden")return r=Sh(n,d),n.lanes=536870912,Co(null,r);if(Af(n),(r=Se)?(r=f1(r,sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Ua!==null?{id:zr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},o=N0(r),o.return=n,n.child=o,ii=n,Se=null)):r=null,r===null)throw Wa(n);return n.lanes=536870912,null}return Sh(n,d)}var b=r.memoizedState;if(b!==null){var w=b.dehydrated;if(Af(n),y)if(n.flags&256)n.flags&=-257,n=eb(r,n,o);else if(n.memoizedState!==null)n.child=r.child,n.flags|=128,n=null;else throw Error(a(558));else if(He||Rs(r,n,o,!1),y=(o&r.childLanes)!==0,He||y){if(d=Ce,d!==null&&(w=gs(d,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,An(r,w),Fi(d,r,w),Qf;Oh(),n=eb(r,n,o)}else r=b.treeContext,Se=or(w.nextSibling),ii=n,te=!0,Pa=null,sr=!1,r!==null&&j0(n,r),n=Sh(n,d),n.flags|=4096;return n}return r=aa(r.child,{mode:d.mode,children:d.children}),r.ref=n.ref,n.child=r,r.return=n,r}function Th(r,n){var o=n.ref;if(o===null)r!==null&&r.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(n.flags|=4194816)}}function Kf(r,n,o,d,y){return On(n),o=Rf(r,n,o,d,void 0,y),d=Ff(),r!==null&&!He?(Of(r,n,y),ha(r,n,y)):(te&&d&&ff(n),n.flags|=1,ai(r,n,o,y),n.child)}function ib(r,n,o,d,y,b){return On(n),n.updateQueue=null,o=nx(n,d,o,y),ax(r),d=Ff(),r!==null&&!He?(Of(r,n,b),ha(r,n,b)):(te&&d&&ff(n),n.flags|=1,ai(r,n,o,b),n.child)}function rb(r,n,o,d,y){if(On(n),n.stateNode===null){var b=Es,w=o.contextType;typeof w=="object"&&w!==null&&(b=ri(w)),b=new o(d,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Vf,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=d,b.state=n.memoizedState,b.refs={},Tf(n),w=o.contextType,b.context=typeof w=="object"&&w!==null?ri(w):Es,b.state=n.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Xf(n,o,w,d),b.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&Vf.enqueueReplaceState(b,b.state,null),go(n,d,b,y),po(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),d=!0}else if(r===null){b=n.stateNode;var M=n.memoizedProps,X=In(o,M);b.props=X;var at=b.context,ht=o.contextType;w=Es,typeof ht=="object"&&ht!==null&&(w=ri(ht));var gt=o.getDerivedStateFromProps;ht=typeof gt=="function"||typeof b.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,ht||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(M||at!==w)&&Ux(n,b,d,w),Ga=!1;var nt=n.memoizedState;b.state=nt,go(n,d,b,y),po(),at=n.memoizedState,M||nt!==at||Ga?(typeof gt=="function"&&(Xf(n,o,gt,d),at=n.memoizedState),(X=Ga||Hx(n,o,X,d,nt,at,w))?(ht||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(n.flags|=4194308)):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=d,n.memoizedState=at),b.props=d,b.state=at,b.context=w,d=X):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),d=!1)}else{b=n.stateNode,wf(r,n),w=n.memoizedProps,ht=In(o,w),b.props=ht,gt=n.pendingProps,nt=b.context,at=o.contextType,X=Es,typeof at=="object"&&at!==null&&(X=ri(at)),M=o.getDerivedStateFromProps,(at=typeof M=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==gt||nt!==X)&&Ux(n,b,d,X),Ga=!1,nt=n.memoizedState,b.state=nt,go(n,d,b,y),po();var ot=n.memoizedState;w!==gt||nt!==ot||Ga||r!==null&&r.dependencies!==null&&nh(r.dependencies)?(typeof M=="function"&&(Xf(n,o,M,d),ot=n.memoizedState),(ht=Ga||Hx(n,o,ht,d,nt,ot,X)||r!==null&&r.dependencies!==null&&nh(r.dependencies))?(at||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,ot,X),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,ot,X)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=1024),n.memoizedProps=d,n.memoizedState=ot),b.props=d,b.state=ot,b.context=X,d=ht):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=1024),d=!1)}return b=d,Th(r,n),d=(n.flags&128)!==0,b||d?(b=n.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,r!==null&&d?(n.child=Nn(n,r.child,null,y),n.child=Nn(n,null,o,y)):ai(r,n,o,y),n.memoizedState=b.state,r=n.child):r=ha(r,n,y),r}function ab(r,n,o,d){return Rn(),n.flags|=256,ai(r,n,o,d),n.child}var Jf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(r){return{baseLanes:r,cachePool:G0()}}function ep(r,n,o){return r=r!==null?r.childLanes&~o:0,n&&(r|=Yi),r}function nb(r,n,o){var d=n.pendingProps,y=!1,b=(n.flags&128)!==0,w;if((w=b)||(w=r!==null&&r.memoizedState===null?!1:($e.current&2)!==0),w&&(y=!0,n.flags&=-129),w=(n.flags&32)!==0,n.flags&=-33,r===null){if(te){if(y?Za(n):Qa(),(r=Se)?(r=f1(r,sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Ua!==null?{id:zr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},o=N0(r),o.return=n,n.child=o,ii=n,Se=null)):r=null,r===null)throw Wa(n);return zp(r)?n.lanes=32:n.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(Qa(),y=n.mode,M=wh({mode:"hidden",children:M},y),d=Mn(d,y,o,null),M.return=n,d.return=n,M.sibling=d,n.child=M,d=n.child,d.memoizedState=tp(o),d.childLanes=ep(r,w,o),n.memoizedState=Jf,Co(null,d)):(Za(n),ip(n,M))}var X=r.memoizedState;if(X!==null&&(M=X.dehydrated,M!==null)){if(b)n.flags&256?(Za(n),n.flags&=-257,n=rp(r,n,o)):n.memoizedState!==null?(Qa(),n.child=r.child,n.flags|=128,n=null):(Qa(),M=d.fallback,y=n.mode,d=wh({mode:"visible",children:d.children},y),M=Mn(M,y,o,null),M.flags|=2,d.return=n,M.return=n,d.sibling=M,n.child=d,Nn(n,r.child,null,o),d=n.child,d.memoizedState=tp(o),d.childLanes=ep(r,w,o),n.memoizedState=Jf,n=Co(null,d));else if(Za(n),zp(M)){if(w=M.nextSibling&&M.nextSibling.dataset,w)var at=w.dgst;w=at,d=Error(a(419)),d.stack="",d.digest=w,lo({value:d,source:null,stack:null}),n=rp(r,n,o)}else if(He||Rs(r,n,o,!1),w=(o&r.childLanes)!==0,He||w){if(w=Ce,w!==null&&(d=gs(w,o),d!==0&&d!==X.retryLane))throw X.retryLane=d,An(r,d),Fi(w,r,d),Qf;$p(M)||Oh(),n=rp(r,n,o)}else $p(M)?(n.flags|=192,n.child=r.child,n=null):(r=X.treeContext,Se=or(M.nextSibling),ii=n,te=!0,Pa=null,sr=!1,r!==null&&j0(n,r),n=ip(n,d.children),n.flags|=4096);return n}return y?(Qa(),M=d.fallback,y=n.mode,X=r.child,at=X.sibling,d=aa(X,{mode:"hidden",children:d.children}),d.subtreeFlags=X.subtreeFlags&65011712,at!==null?M=aa(at,M):(M=Mn(M,y,o,null),M.flags|=2),M.return=n,d.return=n,d.sibling=M,n.child=d,Co(null,d),d=n.child,M=r.child.memoizedState,M===null?M=tp(o):(y=M.cachePool,y!==null?(X=Ie._currentValue,y=y.parent!==X?{parent:X,pool:X}:y):y=G0(),M={baseLanes:M.baseLanes|o,cachePool:y}),d.memoizedState=M,d.childLanes=ep(r,w,o),n.memoizedState=Jf,Co(r.child,d)):(Za(n),o=r.child,r=o.sibling,o=aa(o,{mode:"visible",children:d.children}),o.return=n,o.sibling=null,r!==null&&(w=n.deletions,w===null?(n.deletions=[r],n.flags|=16):w.push(r)),n.child=o,n.memoizedState=null,o)}function ip(r,n){return n=wh({mode:"visible",children:n},r.mode),n.return=r,r.child=n}function wh(r,n){return r=Hi(22,r,null,n),r.lanes=0,r}function rp(r,n,o){return Nn(n,r.child,null,o),r=ip(n,n.pendingProps.children),r.flags|=2,n.memoizedState=null,r}function sb(r,n,o){r.lanes|=n;var d=r.alternate;d!==null&&(d.lanes|=n),xf(r.return,n,o)}function ap(r,n,o,d,y,b){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:b}:(w.isBackwards=n,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=o,w.tailMode=y,w.treeForkCount=b)}function lb(r,n,o){var d=n.pendingProps,y=d.revealOrder,b=d.tail;d=d.children;var w=$e.current,M=(w&2)!==0;if(M?(w=w&1|2,n.flags|=128):w&=1,ut($e,w),ai(r,n,d,o),d=te?so:0,!M&&r!==null&&(r.flags&128)!==0)t:for(r=n.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&sb(r,o,n);else if(r.tag===19)sb(r,o,n);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break t;for(;r.sibling===null;){if(r.return===null||r.return===n)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(o=n.child,y=null;o!==null;)r=o.alternate,r!==null&&fh(r)===null&&(y=o),o=o.sibling;o=y,o===null?(y=n.child,n.child=null):(y=o.sibling,o.sibling=null),ap(n,!1,y,o,b,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=n.child,n.child=null;y!==null;){if(r=y.alternate,r!==null&&fh(r)===null){n.child=y;break}r=y.sibling,y.sibling=o,o=y,y=r}ap(n,!0,o,null,b,d);break;case"together":ap(n,!1,null,null,void 0,d);break;default:n.memoizedState=null}return n.child}function ha(r,n,o){if(r!==null&&(n.dependencies=r.dependencies),tn|=n.lanes,(o&n.childLanes)===0)if(r!==null){if(Rs(r,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(r!==null&&n.child!==r.child)throw Error(a(153));if(n.child!==null){for(r=n.child,o=aa(r,r.pendingProps),n.child=o,o.return=n;r.sibling!==null;)r=r.sibling,o=o.sibling=aa(r,r.pendingProps),o.return=n;o.sibling=null}return n.child}function np(r,n){return(r.lanes&n)!==0?!0:(r=r.dependencies,!!(r!==null&&nh(r)))}function iL(r,n,o){switch(n.tag){case 3:Ot(n,n.stateNode.containerInfo),Ya(n,Ie,r.memoizedState.cache),Rn();break;case 27:case 5:W(n);break;case 4:Ot(n,n.stateNode.containerInfo);break;case 10:Ya(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Af(n),null;break;case 13:var d=n.memoizedState;if(d!==null)return d.dehydrated!==null?(Za(n),n.flags|=128,null):(o&n.child.childLanes)!==0?nb(r,n,o):(Za(n),r=ha(r,n,o),r!==null?r.sibling:null);Za(n);break;case 19:var y=(r.flags&128)!==0;if(d=(o&n.childLanes)!==0,d||(Rs(r,n,o,!1),d=(o&n.childLanes)!==0),y){if(d)return lb(r,n,o);n.flags|=128}if(y=n.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ut($e,$e.current),d)break;return null;case 22:return n.lanes=0,Jx(r,n,o,n.pendingProps);case 24:Ya(n,Ie,r.memoizedState.cache)}return ha(r,n,o)}function ob(r,n,o){if(r!==null)if(r.memoizedProps!==n.pendingProps)He=!0;else{if(!np(r,o)&&(n.flags&128)===0)return He=!1,iL(r,n,o);He=(r.flags&131072)!==0}else He=!1,te&&(n.flags&1048576)!==0&&I0(n,so,n.index);switch(n.lanes=0,n.tag){case 16:t:{var d=n.pendingProps;if(r=$n(n.elementType),n.type=r,typeof r=="function")hf(r)?(d=In(r,d),n.tag=1,n=rb(null,n,r,d,o)):(n.tag=0,n=Kf(null,n,r,d,o));else{if(r!=null){var y=r.$$typeof;if(y===F){n.tag=11,n=Zx(null,n,r,d,o);break t}else if(y===U){n.tag=14,n=Qx(null,n,r,d,o);break t}}throw n=q(r)||r,Error(a(306,n,""))}}return n;case 0:return Kf(r,n,n.type,n.pendingProps,o);case 1:return d=n.type,y=In(d,n.pendingProps),rb(r,n,d,y,o);case 3:t:{if(Ot(n,n.stateNode.containerInfo),r===null)throw Error(a(387));d=n.pendingProps;var b=n.memoizedState;y=b.element,wf(r,n),go(n,d,null,o);var w=n.memoizedState;if(d=w.cache,Ya(n,Ie,d),d!==b.cache&&bf(n,[Ie],o,!0),po(),d=w.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:w.cache},n.updateQueue.baseState=b,n.memoizedState=b,n.flags&256){n=ab(r,n,d,o);break t}else if(d!==y){y=rr(Error(a(424)),n),lo(y),n=ab(r,n,d,o);break t}else{switch(r=n.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Se=or(r.firstChild),ii=n,te=!0,Pa=null,sr=!0,o=J0(n,null,d,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Rn(),d===y){n=ha(r,n,o);break t}ai(r,n,d,o)}n=n.child}return n;case 26:return Th(r,n),r===null?(o=b1(n.type,null,n.pendingProps,null))?n.memoizedState=o:te||(o=n.type,r=n.pendingProps,d=jh(xt.current).createElement(o),d[qe]=n,d[ei]=r,ni(d,o,r),Ee(d),n.stateNode=d):n.memoizedState=b1(n.type,r.memoizedProps,n.pendingProps,r.memoizedState),null;case 27:return W(n),r===null&&te&&(d=n.stateNode=m1(n.type,n.pendingProps,xt.current),ii=n,sr=!0,y=Se,sn(n.type)?(Np=y,Se=or(d.firstChild)):Se=y),ai(r,n,n.pendingProps.children,o),Th(r,n),r===null&&(n.flags|=4194304),n.child;case 5:return r===null&&te&&((y=d=Se)&&(d=RL(d,n.type,n.pendingProps,sr),d!==null?(n.stateNode=d,ii=n,Se=or(d.firstChild),sr=!1,y=!0):y=!1),y||Wa(n)),W(n),y=n.type,b=n.pendingProps,w=r!==null?r.memoizedProps:null,d=b.children,Fp(y,b)?d=null:w!==null&&Fp(y,w)&&(n.flags|=32),n.memoizedState!==null&&(y=Rf(r,n,GE,null,null,o),Do._currentValue=y),Th(r,n),ai(r,n,d,o),n.child;case 6:return r===null&&te&&((r=o=Se)&&(o=FL(o,n.pendingProps,sr),o!==null?(n.stateNode=o,ii=n,Se=null,r=!0):r=!1),r||Wa(n)),null;case 13:return nb(r,n,o);case 4:return Ot(n,n.stateNode.containerInfo),d=n.pendingProps,r===null?n.child=Nn(n,null,d,o):ai(r,n,d,o),n.child;case 11:return Zx(r,n,n.type,n.pendingProps,o);case 7:return ai(r,n,n.pendingProps,o),n.child;case 8:return ai(r,n,n.pendingProps.children,o),n.child;case 12:return ai(r,n,n.pendingProps.children,o),n.child;case 10:return d=n.pendingProps,Ya(n,n.type,d.value),ai(r,n,d.children,o),n.child;case 9:return y=n.type._context,d=n.pendingProps.children,On(n),y=ri(y),d=d(y),n.flags|=1,ai(r,n,d,o),n.child;case 14:return Qx(r,n,n.type,n.pendingProps,o);case 15:return Kx(r,n,n.type,n.pendingProps,o);case 19:return lb(r,n,o);case 31:return eL(r,n,o);case 22:return Jx(r,n,o,n.pendingProps);case 24:return On(n),d=ri(Ie),r===null?(y=kf(),y===null&&(y=Ce,b=Cf(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=o),y=b),n.memoizedState={parent:d,cache:y},Tf(n),Ya(n,Ie,y)):((r.lanes&o)!==0&&(wf(r,n),go(n,null,null,o),po()),y=r.memoizedState,b=n.memoizedState,y.parent!==d?(y={parent:d,cache:d},n.memoizedState=y,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=y),Ya(n,Ie,d)):(d=b.cache,Ya(n,Ie,d),d!==y.cache&&bf(n,[Ie],o,!0))),ai(r,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ua(r){r.flags|=4}function sp(r,n,o,d,y){if((n=(r.mode&32)!==0)&&(n=!1),n){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(Db())r.flags|=8192;else throw zn=ch,Sf}else r.flags&=-16777217}function cb(r,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!T1(n))if(Db())r.flags|=8192;else throw zn=ch,Sf}function _h(r,n){n!==null&&(r.flags|=4),r.flags&16384&&(n=r.tag!==22?jc():536870912,r.lanes|=n,Ps|=n)}function vo(r,n){if(!te)switch(r.tailMode){case"hidden":n=r.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?n||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Te(r){var n=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(n)for(var y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=d,r.childLanes=o,n}function rL(r,n,o){var d=n.pendingProps;switch(pf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Te(n),null;case 1:return Te(n),null;case 3:return o=n.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),n.memoizedState.cache!==d&&(n.flags|=2048),la(Ie),Pt(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Ms(n)?ua(n):r===null||r.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,mf())),Te(n),null;case 26:var y=n.type,b=n.memoizedState;return r===null?(ua(n),b!==null?(Te(n),cb(n,b)):(Te(n),sp(n,y,null,d,o))):b?b!==r.memoizedState?(ua(n),Te(n),cb(n,b)):(Te(n),n.flags&=-16777217):(r=r.memoizedProps,r!==d&&ua(n),Te(n),sp(n,y,r,d,o)),null;case 27:if(ct(n),o=xt.current,y=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==d&&ua(n);else{if(!d){if(n.stateNode===null)throw Error(a(166));return Te(n),null}r=dt.current,Ms(n)?H0(n):(r=m1(y,d,o),n.stateNode=r,ua(n))}return Te(n),null;case 5:if(ct(n),y=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==d&&ua(n);else{if(!d){if(n.stateNode===null)throw Error(a(166));return Te(n),null}if(b=dt.current,Ms(n))H0(n);else{var w=jh(xt.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?w.createElement(y,{is:d.is}):w.createElement(y)}}b[qe]=n,b[ei]=d;t:for(w=n.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===n)break t;for(;w.sibling===null;){if(w.return===null||w.return===n)break t;w=w.return}w.sibling.return=w.return,w=w.sibling}n.stateNode=b;t:switch(ni(b,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break t;case"img":d=!0;break t;default:d=!1}d&&ua(n)}}return Te(n),sp(n,n.type,r===null?null:r.memoizedProps,n.pendingProps,o),null;case 6:if(r&&n.stateNode!=null)r.memoizedProps!==d&&ua(n);else{if(typeof d!="string"&&n.stateNode===null)throw Error(a(166));if(r=xt.current,Ms(n)){if(r=n.stateNode,o=n.memoizedProps,d=null,y=ii,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}r[qe]=n,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||n1(r.nodeValue,o)),r||Wa(n,!0)}else r=jh(r).createTextNode(d),r[qe]=n,n.stateNode=r}return Te(n),null;case 31:if(o=n.memoizedState,r===null||r.memoizedState!==null){if(d=Ms(n),o!==null){if(r===null){if(!d)throw Error(a(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[qe]=n}else Rn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),r=!1}else o=mf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return n.flags&256?(Pi(n),n):(Pi(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Te(n),null;case 13:if(d=n.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=Ms(n),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(a(318));if(y=n.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(a(317));y[qe]=n}else Rn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),y=!1}else y=mf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return n.flags&256?(Pi(n),n):(Pi(n),null)}return Pi(n),(n.flags&128)!==0?(n.lanes=o,n):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=n.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==y&&(d.flags|=2048)),o!==r&&o&&(n.child.flags|=8192),_h(n,n.updateQueue),Te(n),null);case 4:return Pt(),r===null&&Ep(n.stateNode.containerInfo),Te(n),null;case 10:return la(n.type),Te(n),null;case 19:if(it($e),d=n.memoizedState,d===null)return Te(n),null;if(y=(n.flags&128)!==0,b=d.rendering,b===null)if(y)vo(d,!1);else{if(Re!==0||r!==null&&(r.flags&128)!==0)for(r=n.child;r!==null;){if(b=fh(r),b!==null){for(n.flags|=128,vo(d,!1),r=b.updateQueue,n.updateQueue=r,_h(n,r),n.subtreeFlags=0,r=o,o=n.child;o!==null;)z0(o,r),o=o.sibling;return ut($e,$e.current&1|2),te&&na(n,d.treeForkCount),n.child}r=r.sibling}d.tail!==null&&ci()>Mh&&(n.flags|=128,y=!0,vo(d,!1),n.lanes=4194304)}else{if(!y)if(r=fh(b),r!==null){if(n.flags|=128,y=!0,r=r.updateQueue,n.updateQueue=r,_h(n,r),vo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!te)return Te(n),null}else 2*ci()-d.renderingStartTime>Mh&&o!==536870912&&(n.flags|=128,y=!0,vo(d,!1),n.lanes=4194304);d.isBackwards?(b.sibling=n.child,n.child=b):(r=d.last,r!==null?r.sibling=b:n.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=ci(),r.sibling=null,o=$e.current,ut($e,y?o&1|2:o&1),te&&na(n,d.treeForkCount),r):(Te(n),null);case 22:case 23:return Pi(n),Lf(),d=n.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(n.flags|=8192):d&&(n.flags|=8192),d?(o&536870912)!==0&&(n.flags&128)===0&&(Te(n),n.subtreeFlags&6&&(n.flags|=8192)):Te(n),o=n.updateQueue,o!==null&&_h(n,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==o&&(n.flags|=2048),r!==null&&it(Dn),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),la(Ie),Te(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function aL(r,n){switch(pf(n),n.tag){case 1:return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 3:return la(Ie),Pt(),r=n.flags,(r&65536)!==0&&(r&128)===0?(n.flags=r&-65537|128,n):null;case 26:case 27:case 5:return ct(n),null;case 31:if(n.memoizedState!==null){if(Pi(n),n.alternate===null)throw Error(a(340));Rn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 13:if(Pi(n),r=n.memoizedState,r!==null&&r.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Rn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 19:return it($e),null;case 4:return Pt(),null;case 10:return la(n.type),null;case 22:case 23:return Pi(n),Lf(),r!==null&&it(Dn),r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 24:return la(Ie),null;case 25:return null;default:return null}}function hb(r,n){switch(pf(n),n.tag){case 3:la(Ie),Pt();break;case 26:case 27:case 5:ct(n);break;case 4:Pt();break;case 31:n.memoizedState!==null&&Pi(n);break;case 13:Pi(n);break;case 19:it($e);break;case 10:la(n.type);break;case 22:case 23:Pi(n),Lf(),r!==null&&it(Dn);break;case 24:la(Ie)}}function ko(r,n){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&r)===r){d=void 0;var b=o.create,w=o.inst;d=b(),w.destroy=d}o=o.next}while(o!==y)}}catch(M){ge(n,n.return,M)}}function Ka(r,n,o){try{var d=n.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var b=y.next;d=b;do{if((d.tag&r)===r){var w=d.inst,M=w.destroy;if(M!==void 0){w.destroy=void 0,y=n;var X=o,at=M;try{at()}catch(ht){ge(y,X,ht)}}}d=d.next}while(d!==b)}}catch(ht){ge(n,n.return,ht)}}function ub(r){var n=r.updateQueue;if(n!==null){var o=r.stateNode;try{ex(n,o)}catch(d){ge(r,r.return,d)}}}function db(r,n,o){o.props=In(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){ge(r,n,d)}}function So(r,n){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(y){ge(r,n,y)}}function qr(r,n){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(y){ge(r,n,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(y){ge(r,n,y)}else o.current=null}function fb(r){var n=r.type,o=r.memoizedProps,d=r.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break t;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(y){ge(r,r.return,y)}}function lp(r,n,o){try{var d=r.stateNode;_L(d,r.type,o,n),d[ei]=n}catch(y){ge(r,r.return,y)}}function pb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&sn(r.type)||r.tag===4}function op(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||pb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&sn(r.type)||r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function cp(r,n,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(r),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=ia));else if(d!==4&&(d===27&&sn(r.type)&&(o=r.stateNode,n=null),r=r.child,r!==null))for(cp(r,n,o),r=r.sibling;r!==null;)cp(r,n,o),r=r.sibling}function Bh(r,n,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,n?o.insertBefore(r,n):o.appendChild(r);else if(d!==4&&(d===27&&sn(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(Bh(r,n,o),r=r.sibling;r!==null;)Bh(r,n,o),r=r.sibling}function gb(r){var n=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,y=n.attributes;y.length;)n.removeAttributeNode(y[0]);ni(n,d,o),n[qe]=r,n[ei]=o}catch(b){ge(r,r.return,b)}}var da=!1,Ue=!1,hp=!1,mb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function nL(r,n){if(r=r.containerInfo,Mp=Xh,r=E0(r),rf(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else t:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var y=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break t}var w=0,M=-1,X=-1,at=0,ht=0,gt=r,nt=null;e:for(;;){for(var ot;gt!==o||y!==0&>.nodeType!==3||(M=w+y),gt!==b||d!==0&>.nodeType!==3||(X=w+d),gt.nodeType===3&&(w+=gt.nodeValue.length),(ot=gt.firstChild)!==null;)nt=gt,gt=ot;for(;;){if(gt===r)break e;if(nt===o&&++at===y&&(M=w),nt===b&&++ht===d&&(X=w),(ot=gt.nextSibling)!==null)break;gt=nt,nt=gt.parentNode}gt=ot}o=M===-1||X===-1?null:{start:M,end:X}}else o=null}o=o||{start:0,end:0}}else o=null;for(Rp={focusedElem:r,selectionRange:o},Xh=!1,Qe=n;Qe!==null;)if(n=Qe,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,Qe=r;else for(;Qe!==null;){switch(n=Qe,b=n.alternate,r=n.flags,n.tag){case 0:if((r&4)!==0&&(r=n.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)y=r[o],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,o=n,y=b.memoizedProps,b=b.memoizedState,d=o.stateNode;try{var kt=In(o.type,y);r=d.getSnapshotBeforeUpdate(kt,b),d.__reactInternalSnapshotBeforeUpdate=r}catch($t){ge(o,o.return,$t)}}break;case 3:if((r&1024)!==0){if(r=n.stateNode.containerInfo,o=r.nodeType,o===9)Dp(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Dp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=n.sibling,r!==null){r.return=n.return,Qe=r;break}Qe=n.return}}function yb(r,n,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:pa(r,o),d&4&&ko(5,o);break;case 1:if(pa(r,o),d&4)if(r=o.stateNode,n===null)try{r.componentDidMount()}catch(w){ge(o,o.return,w)}else{var y=In(o.type,n.memoizedProps);n=n.memoizedState;try{r.componentDidUpdate(y,n,r.__reactInternalSnapshotBeforeUpdate)}catch(w){ge(o,o.return,w)}}d&64&&ub(o),d&512&&So(o,o.return);break;case 3:if(pa(r,o),d&64&&(r=o.updateQueue,r!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{ex(r,n)}catch(w){ge(o,o.return,w)}}break;case 27:n===null&&d&4&&gb(o);case 26:case 5:pa(r,o),n===null&&d&4&&fb(o),d&512&&So(o,o.return);break;case 12:pa(r,o);break;case 31:pa(r,o),d&4&&Cb(r,o);break;case 13:pa(r,o),d&4&&vb(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=pL.bind(null,o),OL(r,o))));break;case 22:if(d=o.memoizedState!==null||da,!d){n=n!==null&&n.memoizedState!==null||Ue,y=da;var b=Ue;da=d,(Ue=n)&&!b?ga(r,o,(o.subtreeFlags&8772)!==0):pa(r,o),da=y,Ue=b}break;case 30:break;default:pa(r,o)}}function xb(r){var n=r.alternate;n!==null&&(r.alternate=null,xb(n)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(n=r.stateNode,n!==null&&bs(n)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var we=null,Li=!1;function fa(r,n,o){for(o=o.child;o!==null;)bb(r,n,o),o=o.sibling}function bb(r,n,o){if(ti&&typeof ti.onCommitFiberUnmount=="function")try{ti.onCommitFiberUnmount(Ra,o)}catch{}switch(o.tag){case 26:Ue||qr(o,n),fa(r,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ue||qr(o,n);var d=we,y=Li;sn(o.type)&&(we=o.stateNode,Li=!1),fa(r,n,o),Ro(o.stateNode),we=d,Li=y;break;case 5:Ue||qr(o,n);case 6:if(d=we,y=Li,we=null,fa(r,n,o),we=d,Li=y,we!==null)if(Li)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(o.stateNode)}catch(b){ge(o,n,b)}else try{we.removeChild(o.stateNode)}catch(b){ge(o,n,b)}break;case 18:we!==null&&(Li?(r=we,u1(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Ks(r)):u1(we,o.stateNode));break;case 4:d=we,y=Li,we=o.stateNode.containerInfo,Li=!0,fa(r,n,o),we=d,Li=y;break;case 0:case 11:case 14:case 15:Ka(2,o,n),Ue||Ka(4,o,n),fa(r,n,o);break;case 1:Ue||(qr(o,n),d=o.stateNode,typeof d.componentWillUnmount=="function"&&db(o,n,d)),fa(r,n,o);break;case 21:fa(r,n,o);break;case 22:Ue=(d=Ue)||o.memoizedState!==null,fa(r,n,o),Ue=d;break;default:fa(r,n,o)}}function Cb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ks(r)}catch(o){ge(n,n.return,o)}}}function vb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ks(r)}catch(o){ge(n,n.return,o)}}function sL(r){switch(r.tag){case 31:case 13:case 19:var n=r.stateNode;return n===null&&(n=r.stateNode=new mb),n;case 22:return r=r.stateNode,n=r._retryCache,n===null&&(n=r._retryCache=new mb),n;default:throw Error(a(435,r.tag))}}function Eh(r,n){var o=sL(r);n.forEach(function(d){if(!o.has(d)){o.add(d);var y=gL.bind(null,r,d);d.then(y,y)}})}function Ai(r,n){var o=n.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=o[d],b=r,w=n,M=w;t:for(;M!==null;){switch(M.tag){case 27:if(sn(M.type)){we=M.stateNode,Li=!1;break t}break;case 5:we=M.stateNode,Li=!1;break t;case 3:case 4:we=M.stateNode.containerInfo,Li=!0;break t}M=M.return}if(we===null)throw Error(a(160));bb(b,w,y),we=null,Li=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)kb(n,r),n=n.sibling}var xr=null;function kb(r,n){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ai(n,r),Mi(r),d&4&&(Ka(3,r,r.return),ko(3,r),Ka(5,r,r.return));break;case 1:Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),d&64&&da&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var y=xr;if(Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),d&4){var b=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){t:{d=r.type,o=r.memoizedProps,y=y.ownerDocument||y;e:switch(d){case"title":b=y.getElementsByTagName("title")[0],(!b||b[qa]||b[qe]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(d),y.head.insertBefore(b,y.querySelector("head > title"))),ni(b,d,o),b[qe]=r,Ee(b),d=b;break t;case"link":var w=k1("link","href",y).get(d+(o.href||""));if(w){for(var M=0;M<w.length;M++)if(b=w[M],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(M,1);break e}}b=y.createElement(d),ni(b,d,o),y.head.appendChild(b);break;case"meta":if(w=k1("meta","content",y).get(d+(o.content||""))){for(M=0;M<w.length;M++)if(b=w[M],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(M,1);break e}}b=y.createElement(d),ni(b,d,o),y.head.appendChild(b);break;default:throw Error(a(468,d))}b[qe]=r,Ee(b),d=b}r.stateNode=d}else S1(y,r.type,r.stateNode);else r.stateNode=v1(y,d,r.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?S1(y,r.type,r.stateNode):v1(y,d,r.memoizedProps)):d===null&&r.stateNode!==null&&lp(r,r.memoizedProps,o.memoizedProps)}break;case 27:Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),o!==null&&d&4&&lp(r,r.memoizedProps,o.memoizedProps);break;case 5:if(Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),r.flags&32){y=r.stateNode;try{vs(y,"")}catch(kt){ge(r,r.return,kt)}}d&4&&r.stateNode!=null&&(y=r.memoizedProps,lp(r,y,o!==null?o.memoizedProps:y)),d&1024&&(hp=!0);break;case 6:if(Ai(n,r),Mi(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(kt){ge(r,r.return,kt)}}break;case 3:if(Ph=null,y=xr,xr=Hh(n.containerInfo),Ai(n,r),xr=y,Mi(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Ks(n.containerInfo)}catch(kt){ge(r,r.return,kt)}hp&&(hp=!1,Sb(r));break;case 4:d=xr,xr=Hh(r.stateNode.containerInfo),Ai(n,r),Mi(r),xr=d;break;case 12:Ai(n,r),Mi(r);break;case 31:Ai(n,r),Mi(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 13:Ai(n,r),Mi(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ah=ci()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 22:y=r.memoizedState!==null;var X=o!==null&&o.memoizedState!==null,at=da,ht=Ue;if(da=at||y,Ue=ht||X,Ai(n,r),Ue=ht,da=at,Mi(r),d&8192)t:for(n=r.stateNode,n._visibility=y?n._visibility&-2:n._visibility|1,y&&(o===null||X||da||Ue||jn(r)),o=null,n=r;;){if(n.tag===5||n.tag===26){if(o===null){X=o=n;try{if(b=X.stateNode,y)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{M=X.stateNode;var gt=X.memoizedProps.style,nt=gt!=null&>.hasOwnProperty("display")?gt.display:null;M.style.display=nt==null||typeof nt=="boolean"?"":(""+nt).trim()}}catch(kt){ge(X,X.return,kt)}}}else if(n.tag===6){if(o===null){X=n;try{X.stateNode.nodeValue=y?"":X.memoizedProps}catch(kt){ge(X,X.return,kt)}}}else if(n.tag===18){if(o===null){X=n;try{var ot=X.stateNode;y?d1(ot,!0):d1(X.stateNode,!1)}catch(kt){ge(X,X.return,kt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===r)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break t;for(;n.sibling===null;){if(n.return===null||n.return===r)break t;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Eh(r,o))));break;case 19:Ai(n,r),Mi(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 30:break;case 21:break;default:Ai(n,r),Mi(r)}}function Mi(r){var n=r.flags;if(n&2){try{for(var o,d=r.return;d!==null;){if(pb(d)){o=d;break}d=d.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var y=o.stateNode,b=op(r);Bh(r,b,y);break;case 5:var w=o.stateNode;o.flags&32&&(vs(w,""),o.flags&=-33);var M=op(r);Bh(r,M,w);break;case 3:case 4:var X=o.stateNode.containerInfo,at=op(r);cp(r,at,X);break;default:throw Error(a(161))}}catch(ht){ge(r,r.return,ht)}r.flags&=-3}n&4096&&(r.flags&=-4097)}function Sb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var n=r;Sb(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),r=r.sibling}}function pa(r,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)yb(r,n.alternate,n),n=n.sibling}function jn(r){for(r=r.child;r!==null;){var n=r;switch(n.tag){case 0:case 11:case 14:case 15:Ka(4,n,n.return),jn(n);break;case 1:qr(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&db(n,n.return,o),jn(n);break;case 27:Ro(n.stateNode);case 26:case 5:qr(n,n.return),jn(n);break;case 22:n.memoizedState===null&&jn(n);break;case 30:jn(n);break;default:jn(n)}r=r.sibling}}function ga(r,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var d=n.alternate,y=r,b=n,w=b.flags;switch(b.tag){case 0:case 11:case 15:ga(y,b,o),ko(4,b);break;case 1:if(ga(y,b,o),d=b,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(at){ge(d,d.return,at)}if(d=b,y=d.updateQueue,y!==null){var M=d.stateNode;try{var X=y.shared.hiddenCallbacks;if(X!==null)for(y.shared.hiddenCallbacks=null,y=0;y<X.length;y++)tx(X[y],M)}catch(at){ge(d,d.return,at)}}o&&w&64&&ub(b),So(b,b.return);break;case 27:gb(b);case 26:case 5:ga(y,b,o),o&&d===null&&w&4&&fb(b),So(b,b.return);break;case 12:ga(y,b,o);break;case 31:ga(y,b,o),o&&w&4&&Cb(y,b);break;case 13:ga(y,b,o),o&&w&4&&vb(y,b);break;case 22:b.memoizedState===null&&ga(y,b,o),So(b,b.return);break;case 30:break;default:ga(y,b,o)}n=n.sibling}}function up(r,n){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&oo(o))}function dp(r,n){r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&oo(r))}function br(r,n,o,d){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Tb(r,n,o,d),n=n.sibling}function Tb(r,n,o,d){var y=n.flags;switch(n.tag){case 0:case 11:case 15:br(r,n,o,d),y&2048&&ko(9,n);break;case 1:br(r,n,o,d);break;case 3:br(r,n,o,d),y&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&oo(r)));break;case 12:if(y&2048){br(r,n,o,d),r=n.stateNode;try{var b=n.memoizedProps,w=b.id,M=b.onPostCommit;typeof M=="function"&&M(w,n.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(X){ge(n,n.return,X)}}else br(r,n,o,d);break;case 31:br(r,n,o,d);break;case 13:br(r,n,o,d);break;case 23:break;case 22:b=n.stateNode,w=n.alternate,n.memoizedState!==null?b._visibility&2?br(r,n,o,d):To(r,n):b._visibility&2?br(r,n,o,d):(b._visibility|=2,js(r,n,o,d,(n.subtreeFlags&10256)!==0||!1)),y&2048&&up(w,n);break;case 24:br(r,n,o,d),y&2048&&dp(n.alternate,n);break;default:br(r,n,o,d)}}function js(r,n,o,d,y){for(y=y&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=r,w=n,M=o,X=d,at=w.flags;switch(w.tag){case 0:case 11:case 15:js(b,w,M,X,y),ko(8,w);break;case 23:break;case 22:var ht=w.stateNode;w.memoizedState!==null?ht._visibility&2?js(b,w,M,X,y):To(b,w):(ht._visibility|=2,js(b,w,M,X,y)),y&&at&2048&&up(w.alternate,w);break;case 24:js(b,w,M,X,y),y&&at&2048&&dp(w.alternate,w);break;default:js(b,w,M,X,y)}n=n.sibling}}function To(r,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=r,d=n,y=d.flags;switch(d.tag){case 22:To(o,d),y&2048&&up(d.alternate,d);break;case 24:To(o,d),y&2048&&dp(d.alternate,d);break;default:To(o,d)}n=n.sibling}}var wo=8192;function Hs(r,n,o){if(r.subtreeFlags&wo)for(r=r.child;r!==null;)wb(r,n,o),r=r.sibling}function wb(r,n,o){switch(r.tag){case 26:Hs(r,n,o),r.flags&wo&&r.memoizedState!==null&&YL(o,xr,r.memoizedState,r.memoizedProps);break;case 5:Hs(r,n,o);break;case 3:case 4:var d=xr;xr=Hh(r.stateNode.containerInfo),Hs(r,n,o),xr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=wo,wo=16777216,Hs(r,n,o),wo=d):Hs(r,n,o));break;default:Hs(r,n,o)}}function _b(r){var n=r.alternate;if(n!==null&&(r=n.child,r!==null)){n.child=null;do n=r.sibling,r.sibling=null,r=n;while(r!==null)}}function _o(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var d=n[o];Qe=d,Eb(d,r)}_b(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Bb(r),r=r.sibling}function Bb(r){switch(r.tag){case 0:case 11:case 15:_o(r),r.flags&2048&&Ka(9,r,r.return);break;case 3:_o(r);break;case 12:_o(r);break;case 22:var n=r.stateNode;r.memoizedState!==null&&n._visibility&2&&(r.return===null||r.return.tag!==13)?(n._visibility&=-3,Lh(r)):_o(r);break;default:_o(r)}}function Lh(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var d=n[o];Qe=d,Eb(d,r)}_b(r)}for(r=r.child;r!==null;){switch(n=r,n.tag){case 0:case 11:case 15:Ka(8,n,n.return),Lh(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Lh(n));break;default:Lh(n)}r=r.sibling}}function Eb(r,n){for(;Qe!==null;){var o=Qe;switch(o.tag){case 0:case 11:case 15:Ka(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:oo(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,Qe=d;else t:for(o=r;Qe!==null;){d=Qe;var y=d.sibling,b=d.return;if(xb(d),d===o){Qe=null;break t}if(y!==null){y.return=b,Qe=y;break t}Qe=b}}}var lL={getCacheForType:function(r){var n=ri(Ie),o=n.data.get(r);return o===void 0&&(o=r(),n.data.set(r,o)),o},cacheSignal:function(){return ri(Ie).controller.signal}},oL=typeof WeakMap=="function"?WeakMap:Map,ue=0,Ce=null,Vt=null,Qt=0,pe=0,Wi=null,Ja=!1,Us=!1,fp=!1,ma=0,Re=0,tn=0,Hn=0,pp=0,Yi=0,Ps=0,Bo=null,Ri=null,gp=!1,Ah=0,Lb=0,Mh=1/0,Rh=null,en=null,Ye=0,rn=null,Ws=null,ya=0,mp=0,yp=null,Ab=null,Eo=0,xp=null;function Gi(){return(ue&2)!==0&&Qt!==0?Qt&-Qt:A.T!==null?Tp():Uc()}function Mb(){if(Yi===0)if((Qt&536870912)===0||te){var r=Da;Da<<=1,(Da&3932160)===0&&(Da=262144),Yi=r}else Yi=536870912;return r=Ui.current,r!==null&&(r.flags|=32),Yi}function Fi(r,n,o){(r===Ce&&(pe===2||pe===9)||r.cancelPendingCommit!==null)&&(Ys(r,0),an(r,Qt,Yi,!1)),ve(r,o),((ue&2)===0||r!==Ce)&&(r===Ce&&((ue&2)===0&&(Hn|=o),Re===4&&an(r,Qt,Yi,!1)),Ir(r))}function Rb(r,n,o){if((ue&6)!==0)throw Error(a(327));var d=!o&&(n&127)===0&&(n&r.expiredLanes)===0||wn(r,n),y=d?uL(r,n):Cp(r,n,!0),b=d;do{if(y===0){Us&&!d&&an(r,n,0,!1);break}else{if(o=r.current.alternate,b&&!cL(o)){y=Cp(r,n,!1),b=!1;continue}if(y===2){if(b=n,r.errorRecoveryDisabledLanes&b)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){n=w;t:{var M=r;y=Bo;var X=M.current.memoizedState.isDehydrated;if(X&&(Ys(M,w).flags|=256),w=Cp(M,w,!1),w!==2){if(fp&&!X){M.errorRecoveryDisabledLanes|=b,Hn|=b,y=4;break t}b=Ri,Ri=y,b!==null&&(Ri===null?Ri=b:Ri.push.apply(Ri,b))}y=w}if(b=!1,y!==2)continue}}if(y===1){Ys(r,0),an(r,n,0,!0);break}t:{switch(d=r,b=y,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:an(d,n,Yi,!Ja);break t;case 2:Ri=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(y=Ah+300-ci(),10<y)){if(an(d,n,Yi,!Ja),$a(d,0,!0)!==0)break t;ya=n,d.timeoutHandle=c1(Fb.bind(null,d,o,Ri,Rh,gp,n,Yi,Hn,Ps,Ja,b,"Throttled",-0,0),y);break t}Fb(d,o,Ri,Rh,gp,n,Yi,Hn,Ps,Ja,b,null,-0,0)}}break}while(!0);Ir(r)}function Fb(r,n,o,d,y,b,w,M,X,at,ht,gt,nt,ot){if(r.timeoutHandle=-1,gt=n.subtreeFlags,gt&8192||(gt&16785408)===16785408){gt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ia},wb(n,b,gt);var kt=(b&62914560)===b?Ah-ci():(b&4194048)===b?Lb-ci():0;if(kt=GL(gt,kt),kt!==null){ya=b,r.cancelPendingCommit=kt(jb.bind(null,r,n,b,o,d,y,w,M,X,ht,gt,null,nt,ot)),an(r,b,w,!at);return}}jb(r,n,b,o,d,y,w,M,X)}function cL(r){for(var n=r;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],b=y.getSnapshot;y=y.value;try{if(!ji(b(),y))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function an(r,n,o,d){n&=~pp,n&=~Hn,r.suspendedLanes|=n,r.pingedLanes&=~n,d&&(r.warmLanes|=n),d=r.expirationTimes;for(var y=n;0<y;){var b=31-Ze(y),w=1<<b;d[b]=-1,y&=~w}o!==0&&Hc(r,o,n)}function Fh(){return(ue&6)===0?(Lo(0),!1):!0}function bp(){if(Vt!==null){if(pe===0)var r=Vt.return;else r=Vt,sa=Fn=null,Df(r),$s=null,ho=0,r=Vt;for(;r!==null;)hb(r.alternate,r),r=r.return;Vt=null}}function Ys(r,n){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,LL(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),ya=0,bp(),Ce=r,Vt=o=aa(r.current,null),Qt=n,pe=0,Wi=null,Ja=!1,Us=wn(r,n),fp=!1,Ps=Yi=pp=Hn=tn=Re=0,Ri=Bo=null,gp=!1,(n&8)!==0&&(n|=n&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=n;0<d;){var y=31-Ze(d),b=1<<y;n|=r[y],d&=~b}return ma=n,th(),o}function Ob(r,n){Wt=null,A.H=bo,n===Ds||n===oh?(n=Z0(),pe=3):n===Sf?(n=Z0(),pe=4):pe=n===Qf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Wi=n,Vt===null&&(Re=1,kh(r,rr(n,r.current)))}function Db(){var r=Ui.current;return r===null?!0:(Qt&4194048)===Qt?lr===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?r===lr:!1}function $b(){var r=A.H;return A.H=bo,r===null?bo:r}function zb(){var r=A.A;return A.A=lL,r}function Oh(){Re=4,Ja||(Qt&4194048)!==Qt&&Ui.current!==null||(Us=!0),(tn&134217727)===0&&(Hn&134217727)===0||Ce===null||an(Ce,Qt,Yi,!1)}function Cp(r,n,o){var d=ue;ue|=2;var y=$b(),b=zb();(Ce!==r||Qt!==n)&&(Rh=null,Ys(r,n)),n=!1;var w=Re;t:do try{if(pe!==0&&Vt!==null){var M=Vt,X=Wi;switch(pe){case 8:bp(),w=6;break t;case 3:case 2:case 9:case 6:Ui.current===null&&(n=!0);var at=pe;if(pe=0,Wi=null,Gs(r,M,X,at),o&&Us){w=0;break t}break;default:at=pe,pe=0,Wi=null,Gs(r,M,X,at)}}hL(),w=Re;break}catch(ht){Ob(r,ht)}while(!0);return n&&r.shellSuspendCounter++,sa=Fn=null,ue=d,A.H=y,A.A=b,Vt===null&&(Ce=null,Qt=0,th()),w}function hL(){for(;Vt!==null;)Nb(Vt)}function uL(r,n){var o=ue;ue|=2;var d=$b(),y=zb();Ce!==r||Qt!==n?(Rh=null,Mh=ci()+500,Ys(r,n)):Us=wn(r,n);t:do try{if(pe!==0&&Vt!==null){n=Vt;var b=Wi;e:switch(pe){case 1:pe=0,Wi=null,Gs(r,n,b,1);break;case 2:case 9:if(X0(b)){pe=0,Wi=null,qb(n);break}n=function(){pe!==2&&pe!==9||Ce!==r||(pe=7),Ir(r)},b.then(n,n);break t;case 3:pe=7;break t;case 4:pe=5;break t;case 7:X0(b)?(pe=0,Wi=null,qb(n)):(pe=0,Wi=null,Gs(r,n,b,7));break;case 5:var w=null;switch(Vt.tag){case 26:w=Vt.memoizedState;case 5:case 27:var M=Vt;if(w?T1(w):M.stateNode.complete){pe=0,Wi=null;var X=M.sibling;if(X!==null)Vt=X;else{var at=M.return;at!==null?(Vt=at,Dh(at)):Vt=null}break e}}pe=0,Wi=null,Gs(r,n,b,5);break;case 6:pe=0,Wi=null,Gs(r,n,b,6);break;case 8:bp(),Re=6;break t;default:throw Error(a(462))}}dL();break}catch(ht){Ob(r,ht)}while(!0);return sa=Fn=null,A.H=d,A.A=y,ue=o,Vt!==null?0:(Ce=null,Qt=0,th(),Re)}function dL(){for(;Vt!==null&&!pr();)Nb(Vt)}function Nb(r){var n=ob(r.alternate,r,ma);r.memoizedProps=r.pendingProps,n===null?Dh(r):Vt=n}function qb(r){var n=r,o=n.alternate;switch(n.tag){case 15:case 0:n=ib(o,n,n.pendingProps,n.type,void 0,Qt);break;case 11:n=ib(o,n,n.pendingProps,n.type.render,n.ref,Qt);break;case 5:Df(n);default:hb(o,n),n=Vt=z0(n,ma),n=ob(o,n,ma)}r.memoizedProps=r.pendingProps,n===null?Dh(r):Vt=n}function Gs(r,n,o,d){sa=Fn=null,Df(n),$s=null,ho=0;var y=n.return;try{if(tL(r,y,n,o,Qt)){Re=1,kh(r,rr(o,r.current)),Vt=null;return}}catch(b){if(y!==null)throw Vt=y,b;Re=1,kh(r,rr(o,r.current)),Vt=null;return}n.flags&32768?(te||d===1?r=!0:Us||(Qt&536870912)!==0?r=!1:(Ja=r=!0,(d===2||d===9||d===3||d===6)&&(d=Ui.current,d!==null&&d.tag===13&&(d.flags|=16384))),Ib(n,r)):Dh(n)}function Dh(r){var n=r;do{if((n.flags&32768)!==0){Ib(n,Ja);return}r=n.return;var o=rL(n.alternate,n,ma);if(o!==null){Vt=o;return}if(n=n.sibling,n!==null){Vt=n;return}Vt=n=r}while(n!==null);Re===0&&(Re=5)}function Ib(r,n){do{var o=aL(r.alternate,r);if(o!==null){o.flags&=32767,Vt=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(r=r.sibling,r!==null)){Vt=r;return}Vt=r=o}while(r!==null);Re=6,Vt=null}function jb(r,n,o,d,y,b,w,M,X){r.cancelPendingCommit=null;do $h();while(Ye!==0);if((ue&6)!==0)throw Error(a(327));if(n!==null){if(n===r.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=of,za(r,o,b,w,M,X),r===Ce&&(Vt=Ce=null,Qt=0),Ws=n,rn=r,ya=o,mp=b,yp=y,Ab=d,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,mL(Dr,function(){return Yb(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||d){d=A.T,A.T=null,y=H.p,H.p=2,w=ue,ue|=4;try{nL(r,n,o)}finally{ue=w,H.p=y,A.T=d}}Ye=1,Hb(),Ub(),Pb()}}function Hb(){if(Ye===1){Ye=0;var r=rn,n=Ws,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null;var d=H.p;H.p=2;var y=ue;ue|=4;try{kb(n,r);var b=Rp,w=E0(r.containerInfo),M=b.focusedElem,X=b.selectionRange;if(w!==M&&M&&M.ownerDocument&&B0(M.ownerDocument.documentElement,M)){if(X!==null&&rf(M)){var at=X.start,ht=X.end;if(ht===void 0&&(ht=at),"selectionStart"in M)M.selectionStart=at,M.selectionEnd=Math.min(ht,M.value.length);else{var gt=M.ownerDocument||document,nt=gt&>.defaultView||window;if(nt.getSelection){var ot=nt.getSelection(),kt=M.textContent.length,$t=Math.min(X.start,kt),be=X.end===void 0?$t:Math.min(X.end,kt);!ot.extend&&$t>be&&(w=be,be=$t,$t=w);var tt=_0(M,$t),Z=_0(M,be);if(tt&&Z&&(ot.rangeCount!==1||ot.anchorNode!==tt.node||ot.anchorOffset!==tt.offset||ot.focusNode!==Z.node||ot.focusOffset!==Z.offset)){var rt=gt.createRange();rt.setStart(tt.node,tt.offset),ot.removeAllRanges(),$t>be?(ot.addRange(rt),ot.extend(Z.node,Z.offset)):(rt.setEnd(Z.node,Z.offset),ot.addRange(rt))}}}}for(gt=[],ot=M;ot=ot.parentNode;)ot.nodeType===1&>.push({element:ot,left:ot.scrollLeft,top:ot.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<gt.length;M++){var pt=gt[M];pt.element.scrollLeft=pt.left,pt.element.scrollTop=pt.top}}Xh=!!Mp,Rp=Mp=null}finally{ue=y,H.p=d,A.T=o}}r.current=n,Ye=2}}function Ub(){if(Ye===2){Ye=0;var r=rn,n=Ws,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=A.T,A.T=null;var d=H.p;H.p=2;var y=ue;ue|=4;try{yb(r,n.alternate,n)}finally{ue=y,H.p=d,A.T=o}}Ye=3}}function Pb(){if(Ye===4||Ye===3){Ye=0,us();var r=rn,n=Ws,o=ya,d=Ab;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ye=5:(Ye=0,Ws=rn=null,Wb(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(en=null),ys(o),n=n.stateNode,ti&&typeof ti.onCommitFiberRoot=="function")try{ti.onCommitFiberRoot(Ra,n,void 0,(n.current.flags&128)===128)}catch{}if(d!==null){n=A.T,y=H.p,H.p=2,A.T=null;try{for(var b=r.onRecoverableError,w=0;w<d.length;w++){var M=d[w];b(M.value,{componentStack:M.stack})}}finally{A.T=n,H.p=y}}(ya&3)!==0&&$h(),Ir(r),y=r.pendingLanes,(o&261930)!==0&&(y&42)!==0?r===xp?Eo++:(Eo=0,xp=r):Eo=0,Lo(0)}}function Wb(r,n){(r.pooledCacheLanes&=n)===0&&(n=r.pooledCache,n!=null&&(r.pooledCache=null,oo(n)))}function $h(){return Hb(),Ub(),Pb(),Yb()}function Yb(){if(Ye!==5)return!1;var r=rn,n=mp;mp=0;var o=ys(ya),d=A.T,y=H.p;try{H.p=32>o?32:o,A.T=null,o=yp,yp=null;var b=rn,w=ya;if(Ye=0,Ws=rn=null,ya=0,(ue&6)!==0)throw Error(a(331));var M=ue;if(ue|=4,Bb(b.current),Tb(b,b.current,w,o),ue=M,Lo(0,!1),ti&&typeof ti.onPostCommitFiberRoot=="function")try{ti.onPostCommitFiberRoot(Ra,b)}catch{}return!0}finally{H.p=y,A.T=d,Wb(r,n)}}function Gb(r,n,o){n=rr(o,n),n=Zf(r.stateNode,n,2),r=Va(r,n,2),r!==null&&(ve(r,2),Ir(r))}function ge(r,n,o){if(r.tag===3)Gb(r,r,o);else for(;n!==null;){if(n.tag===3){Gb(n,r,o);break}else if(n.tag===1){var d=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(en===null||!en.has(d))){r=rr(o,r),o=Xx(2),d=Va(n,o,2),d!==null&&(Vx(o,d,n,r),ve(d,2),Ir(d));break}}n=n.return}}function vp(r,n,o){var d=r.pingCache;if(d===null){d=r.pingCache=new oL;var y=new Set;d.set(n,y)}else y=d.get(n),y===void 0&&(y=new Set,d.set(n,y));y.has(o)||(fp=!0,y.add(o),r=fL.bind(null,r,n,o),n.then(r,r))}function fL(r,n,o){var d=r.pingCache;d!==null&&d.delete(n),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,Ce===r&&(Qt&o)===o&&(Re===4||Re===3&&(Qt&62914560)===Qt&&300>ci()-Ah?(ue&2)===0&&Ys(r,0):pp|=o,Ps===Qt&&(Ps=0)),Ir(r)}function Xb(r,n){n===0&&(n=jc()),r=An(r,n),r!==null&&(ve(r,n),Ir(r))}function pL(r){var n=r.memoizedState,o=0;n!==null&&(o=n.retryLane),Xb(r,o)}function gL(r,n){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,y=r.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(n),Xb(r,o)}function mL(r,n){return Jr(r,n)}var zh=null,Xs=null,kp=!1,Nh=!1,Sp=!1,nn=0;function Ir(r){r!==Xs&&r.next===null&&(Xs===null?zh=Xs=r:Xs=Xs.next=r),Nh=!0,kp||(kp=!0,xL())}function Lo(r,n){if(!Sp&&Nh){Sp=!0;do for(var o=!1,d=zh;d!==null;){if(r!==0){var y=d.pendingLanes;if(y===0)var b=0;else{var w=d.suspendedLanes,M=d.pingedLanes;b=(1<<31-Ze(42|r)+1)-1,b&=y&~(w&~M),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Kb(d,b))}else b=Qt,b=$a(d,d===Ce?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||wn(d,b)||(o=!0,Kb(d,b));d=d.next}while(o);Sp=!1}}function yL(){Vb()}function Vb(){Nh=kp=!1;var r=0;nn!==0&&EL()&&(r=nn);for(var n=ci(),o=null,d=zh;d!==null;){var y=d.next,b=Zb(d,n);b===0?(d.next=null,o===null?zh=y:o.next=y,y===null&&(Xs=o)):(o=d,(r!==0||(b&3)!==0)&&(Nh=!0)),d=y}Ye!==0&&Ye!==5||Lo(r),nn!==0&&(nn=0)}function Zb(r,n){for(var o=r.suspendedLanes,d=r.pingedLanes,y=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var w=31-Ze(b),M=1<<w,X=y[w];X===-1?((M&o)===0||(M&d)!==0)&&(y[w]=_n(M,n)):X<=n&&(r.expiredLanes|=M),b&=~M}if(n=Ce,o=Qt,o=$a(r,r===n?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===n&&(pe===2||pe===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ki(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||wn(r,o)){if(n=o&-o,n===r.callbackPriority)return n;switch(d!==null&&Ki(d),ys(o)){case 2:case 8:o=ds;break;case 32:o=Dr;break;case 268435456:o=qi;break;default:o=Dr}return d=Qb.bind(null,r),o=Jr(o,d),r.callbackPriority=n,r.callbackNode=o,n}return d!==null&&d!==null&&Ki(d),r.callbackPriority=2,r.callbackNode=null,2}function Qb(r,n){if(Ye!==0&&Ye!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if($h()&&r.callbackNode!==o)return null;var d=Qt;return d=$a(r,r===Ce?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(Rb(r,d,n),Zb(r,ci()),r.callbackNode!=null&&r.callbackNode===o?Qb.bind(null,r):null)}function Kb(r,n){if($h())return null;Rb(r,n,!0)}function xL(){AL(function(){(ue&6)!==0?Jr(Wl,yL):Vb()})}function Tp(){if(nn===0){var r=Fs;r===0&&(r=Oa,Oa<<=1,(Oa&261888)===0&&(Oa=256)),nn=r}return nn}function Jb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Yc(""+r)}function t1(r,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,r.id&&o.setAttribute("form",r.id),n.parentNode.insertBefore(o,n),r=new FormData(r),o.parentNode.removeChild(o),r}function bL(r,n,o,d,y){if(n==="submit"&&o&&o.stateNode===y){var b=Jb((y[ei]||null).action),w=d.submitter;w&&(n=(n=w[ei]||null)?Jb(n.formAction):w.getAttribute("formAction"),n!==null&&(b=n,w=null));var M=new Zc("action","action",null,d,y);r.push({event:M,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(nn!==0){var X=w?t1(y,w):new FormData(y);Pf(o,{pending:!0,data:X,method:y.method,action:b},null,X)}}else typeof b=="function"&&(M.preventDefault(),X=w?t1(y,w):new FormData(y),Pf(o,{pending:!0,data:X,method:y.method,action:b},b,X))},currentTarget:y}]})}}for(var wp=0;wp<lf.length;wp++){var _p=lf[wp],CL=_p.toLowerCase(),vL=_p[0].toUpperCase()+_p.slice(1);yr(CL,"on"+vL)}yr(M0,"onAnimationEnd"),yr(R0,"onAnimationIteration"),yr(F0,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(zE,"onTransitionRun"),yr(NE,"onTransitionStart"),yr(qE,"onTransitionCancel"),yr(O0,"onTransitionEnd"),bt("onMouseEnter",["mouseout","mouseover"]),bt("onMouseLeave",["mouseout","mouseover"]),bt("onPointerEnter",["pointerout","pointerover"]),bt("onPointerLeave",["pointerout","pointerover"]),ft("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ft("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ft("onBeforeInput",["compositionend","keypress","textInput","paste"]),ft("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ao="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ao));function e1(r,n){n=(n&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],y=d.event;d=d.listeners;t:{var b=void 0;if(n)for(var w=d.length-1;0<=w;w--){var M=d[w],X=M.instance,at=M.currentTarget;if(M=M.listener,X!==b&&y.isPropagationStopped())break t;b=M,y.currentTarget=at;try{b(y)}catch(ht){Jc(ht)}y.currentTarget=null,b=X}else for(w=0;w<d.length;w++){if(M=d[w],X=M.instance,at=M.currentTarget,M=M.listener,X!==b&&y.isPropagationStopped())break t;b=M,y.currentTarget=at;try{b(y)}catch(ht){Jc(ht)}y.currentTarget=null,b=X}}}}function Zt(r,n){var o=n[Na];o===void 0&&(o=n[Na]=new Set);var d=r+"__bubble";o.has(d)||(i1(n,r,2,!1),o.add(d))}function Bp(r,n,o){var d=0;n&&(d|=4),i1(o,r,d,n)}var qh="_reactListening"+Math.random().toString(36).slice(2);function Ep(r){if(!r[qh]){r[qh]=!0,wt.forEach(function(o){o!=="selectionchange"&&(kL.has(o)||Bp(o,!1,r),Bp(o,!0,r))});var n=r.nodeType===9?r:r.ownerDocument;n===null||n[qh]||(n[qh]=!0,Bp("selectionchange",!1,n))}}function i1(r,n,o,d){switch(M1(n)){case 2:var y=ZL;break;case 8:y=QL;break;default:y=Up}o=y.bind(null,n,o,r),y=void 0,!Gd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(y=!0),d?y!==void 0?r.addEventListener(n,o,{capture:!0,passive:y}):r.addEventListener(n,o,!0):y!==void 0?r.addEventListener(n,o,{passive:y}):r.addEventListener(n,o,!1)}function Lp(r,n,o,d,y){var b=d;if((n&1)===0&&(n&2)===0&&d!==null)t:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var M=d.stateNode.containerInfo;if(M===y)break;if(w===4)for(w=d.return;w!==null;){var X=w.tag;if((X===3||X===4)&&w.stateNode.containerInfo===y)return;w=w.return}for(;M!==null;){if(w=Ia(M),w===null)return;if(X=w.tag,X===5||X===6||X===26||X===27){d=b=w;continue t}M=M.parentNode}}d=d.return}l0(function(){var at=b,ht=Wd(o),gt=[];t:{var nt=D0.get(r);if(nt!==void 0){var ot=Zc,kt=r;switch(r){case"keypress":if(Xc(o)===0)break t;case"keydown":case"keyup":ot=gE;break;case"focusin":kt="focus",ot=Qd;break;case"focusout":kt="blur",ot=Qd;break;case"beforeblur":case"afterblur":ot=Qd;break;case"click":if(o.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ot=h0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ot=rE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ot=xE;break;case M0:case R0:case F0:ot=sE;break;case O0:ot=CE;break;case"scroll":case"scrollend":ot=eE;break;case"wheel":ot=kE;break;case"copy":case"cut":case"paste":ot=oE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ot=d0;break;case"toggle":case"beforetoggle":ot=TE}var $t=(n&4)!==0,be=!$t&&(r==="scroll"||r==="scrollend"),tt=$t?nt!==null?nt+"Capture":null:nt;$t=[];for(var Z=at,rt;Z!==null;){var pt=Z;if(rt=pt.stateNode,pt=pt.tag,pt!==5&&pt!==26&&pt!==27||rt===null||tt===null||(pt=Ql(Z,tt),pt!=null&&$t.push(Mo(Z,pt,rt))),be)break;Z=Z.return}0<$t.length&&(nt=new ot(nt,kt,null,o,ht),gt.push({event:nt,listeners:$t}))}}if((n&7)===0){t:{if(nt=r==="mouseover"||r==="pointerover",ot=r==="mouseout"||r==="pointerout",nt&&o!==Pd&&(kt=o.relatedTarget||o.fromElement)&&(Ia(kt)||kt[ta]))break t;if((ot||nt)&&(nt=ht.window===ht?ht:(nt=ht.ownerDocument)?nt.defaultView||nt.parentWindow:window,ot?(kt=o.relatedTarget||o.toElement,ot=at,kt=kt?Ia(kt):null,kt!==null&&(be=l(kt),$t=kt.tag,kt!==be||$t!==5&&$t!==27&&$t!==6)&&(kt=null)):(ot=null,kt=at),ot!==kt)){if($t=h0,pt="onMouseLeave",tt="onMouseEnter",Z="mouse",(r==="pointerout"||r==="pointerover")&&($t=d0,pt="onPointerLeave",tt="onPointerEnter",Z="pointer"),be=ot==null?nt:ja(ot),rt=kt==null?nt:ja(kt),nt=new $t(pt,Z+"leave",ot,o,ht),nt.target=be,nt.relatedTarget=rt,pt=null,Ia(ht)===at&&($t=new $t(tt,Z+"enter",kt,o,ht),$t.target=rt,$t.relatedTarget=be,pt=$t),be=pt,ot&&kt)e:{for($t=SL,tt=ot,Z=kt,rt=0,pt=tt;pt;pt=$t(pt))rt++;pt=0;for(var Mt=Z;Mt;Mt=$t(Mt))pt++;for(;0<rt-pt;)tt=$t(tt),rt--;for(;0<pt-rt;)Z=$t(Z),pt--;for(;rt--;){if(tt===Z||Z!==null&&tt===Z.alternate){$t=tt;break e}tt=$t(tt),Z=$t(Z)}$t=null}else $t=null;ot!==null&&r1(gt,nt,ot,$t,!1),kt!==null&&be!==null&&r1(gt,be,kt,$t,!0)}}t:{if(nt=at?ja(at):window,ot=nt.nodeName&&nt.nodeName.toLowerCase(),ot==="select"||ot==="input"&&nt.type==="file")var ne=C0;else if(x0(nt))if(v0)ne=OE;else{ne=RE;var Bt=ME}else ot=nt.nodeName,!ot||ot.toLowerCase()!=="input"||nt.type!=="checkbox"&&nt.type!=="radio"?at&&Ud(at.elementType)&&(ne=C0):ne=FE;if(ne&&(ne=ne(r,at))){b0(gt,ne,o,ht);break t}Bt&&Bt(r,nt,at),r==="focusout"&&at&&nt.type==="number"&&at.memoizedProps.value!=null&&Hd(nt,"number",nt.value)}switch(Bt=at?ja(at):window,r){case"focusin":(x0(Bt)||Bt.contentEditable==="true")&&(ws=Bt,af=at,no=null);break;case"focusout":no=af=ws=null;break;case"mousedown":nf=!0;break;case"contextmenu":case"mouseup":case"dragend":nf=!1,L0(gt,o,ht);break;case"selectionchange":if($E)break;case"keydown":case"keyup":L0(gt,o,ht)}var Yt;if(Jd)t:{switch(r){case"compositionstart":var Kt="onCompositionStart";break t;case"compositionend":Kt="onCompositionEnd";break t;case"compositionupdate":Kt="onCompositionUpdate";break t}Kt=void 0}else Ts?m0(r,o)&&(Kt="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Kt="onCompositionStart");Kt&&(f0&&o.locale!=="ko"&&(Ts||Kt!=="onCompositionStart"?Kt==="onCompositionEnd"&&Ts&&(Yt=o0()):(Ha=ht,Xd="value"in Ha?Ha.value:Ha.textContent,Ts=!0)),Bt=Ih(at,Kt),0<Bt.length&&(Kt=new u0(Kt,r,null,o,ht),gt.push({event:Kt,listeners:Bt}),Yt?Kt.data=Yt:(Yt=y0(o),Yt!==null&&(Kt.data=Yt)))),(Yt=_E?BE(r,o):EE(r,o))&&(Kt=Ih(at,"onBeforeInput"),0<Kt.length&&(Bt=new u0("onBeforeInput","beforeinput",null,o,ht),gt.push({event:Bt,listeners:Kt}),Bt.data=Yt)),bL(gt,r,at,o,ht)}e1(gt,n)})}function Mo(r,n,o){return{instance:r,listener:n,currentTarget:o}}function Ih(r,n){for(var o=n+"Capture",d=[];r!==null;){var y=r,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Ql(r,o),y!=null&&d.unshift(Mo(r,y,b)),y=Ql(r,n),y!=null&&d.push(Mo(r,y,b))),r.tag===3)return d;r=r.return}return[]}function SL(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function r1(r,n,o,d,y){for(var b=n._reactName,w=[];o!==null&&o!==d;){var M=o,X=M.alternate,at=M.stateNode;if(M=M.tag,X!==null&&X===d)break;M!==5&&M!==26&&M!==27||at===null||(X=at,y?(at=Ql(o,b),at!=null&&w.unshift(Mo(o,at,X))):y||(at=Ql(o,b),at!=null&&w.push(Mo(o,at,X)))),o=o.return}w.length!==0&&r.push({event:n,listeners:w})}var TL=/\r\n?/g,wL=/\u0000|\uFFFD/g;function a1(r){return(typeof r=="string"?r:""+r).replace(TL,`
|
|
50
|
+
`).replace(wL,"")}function n1(r,n){return n=a1(n),a1(r)===n}function xe(r,n,o,d,y,b){switch(o){case"children":typeof d=="string"?n==="body"||n==="textarea"&&d===""||vs(r,d):(typeof d=="number"||typeof d=="bigint")&&n!=="body"&&vs(r,""+d);break;case"className":ui(r,"class",d);break;case"tabIndex":ui(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":ui(r,o,d);break;case"style":n0(r,d,b);break;case"data":if(n!=="object"){ui(r,"data",d);break}case"src":case"href":if(d===""&&(n!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Yc(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(o==="formAction"?(n!=="input"&&xe(r,n,"name",y.name,y,null),xe(r,n,"formEncType",y.formEncType,y,null),xe(r,n,"formMethod",y.formMethod,y,null),xe(r,n,"formTarget",y.formTarget,y,null)):(xe(r,n,"encType",y.encType,y,null),xe(r,n,"method",y.method,y,null),xe(r,n,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Yc(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=ia);break;case"onScroll":d!=null&&Zt("scroll",r);break;case"onScrollEnd":d!=null&&Zt("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=Yc(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":Zt("beforetoggle",r),Zt("toggle",r),xi(r,"popover",d);break;case"xlinkActuate":Ii(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Ii(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Ii(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Ii(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Ii(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Ii(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":xi(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=JB.get(o)||o,xi(r,o,d))}}function Ap(r,n,o,d,y,b){switch(o){case"style":n0(r,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof d=="string"?vs(r,d):(typeof d=="number"||typeof d=="bigint")&&vs(r,""+d);break;case"onScroll":d!=null&&Zt("scroll",r);break;case"onScrollEnd":d!=null&&Zt("scrollend",r);break;case"onClick":d!=null&&(r.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P.hasOwnProperty(o))t:{if(o[0]==="o"&&o[1]==="n"&&(y=o.endsWith("Capture"),n=o.slice(2,y?o.length-7:void 0),b=r[ei]||null,b=b!=null?b[o]:null,typeof b=="function"&&r.removeEventListener(n,b,y),typeof d=="function")){typeof b!="function"&&b!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(n,d,y);break t}o in r?r[o]=d:d===!0?r.setAttribute(o,""):xi(r,o,d)}}}function ni(r,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zt("error",r),Zt("load",r);var d=!1,y=!1,b;for(b in o)if(o.hasOwnProperty(b)){var w=o[b];if(w!=null)switch(b){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,b,w,o,null)}}y&&xe(r,n,"srcSet",o.srcSet,o,null),d&&xe(r,n,"src",o.src,o,null);return;case"input":Zt("invalid",r);var M=b=w=y=null,X=null,at=null;for(d in o)if(o.hasOwnProperty(d)){var ht=o[d];if(ht!=null)switch(d){case"name":y=ht;break;case"type":w=ht;break;case"checked":X=ht;break;case"defaultChecked":at=ht;break;case"value":b=ht;break;case"defaultValue":M=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(a(137,n));break;default:xe(r,n,d,ht,o,null)}}e0(r,b,M,X,at,w,y,!1);return;case"select":Zt("invalid",r),d=w=b=null;for(y in o)if(o.hasOwnProperty(y)&&(M=o[y],M!=null))switch(y){case"value":b=M;break;case"defaultValue":w=M;break;case"multiple":d=M;default:xe(r,n,y,M,o,null)}n=b,o=w,r.multiple=!!d,n!=null?Cs(r,!!d,n,!1):o!=null&&Cs(r,!!d,o,!0);return;case"textarea":Zt("invalid",r),b=y=d=null;for(w in o)if(o.hasOwnProperty(w)&&(M=o[w],M!=null))switch(w){case"value":d=M;break;case"defaultValue":y=M;break;case"children":b=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:xe(r,n,w,M,o,null)}r0(r,d,y,b);return;case"option":for(X in o)if(o.hasOwnProperty(X)&&(d=o[X],d!=null))switch(X){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:xe(r,n,X,d,o,null)}return;case"dialog":Zt("beforetoggle",r),Zt("toggle",r),Zt("cancel",r),Zt("close",r);break;case"iframe":case"object":Zt("load",r);break;case"video":case"audio":for(d=0;d<Ao.length;d++)Zt(Ao[d],r);break;case"image":Zt("error",r),Zt("load",r);break;case"details":Zt("toggle",r);break;case"embed":case"source":case"link":Zt("error",r),Zt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(at in o)if(o.hasOwnProperty(at)&&(d=o[at],d!=null))switch(at){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,at,d,o,null)}return;default:if(Ud(n)){for(ht in o)o.hasOwnProperty(ht)&&(d=o[ht],d!==void 0&&Ap(r,n,ht,d,o,void 0));return}}for(M in o)o.hasOwnProperty(M)&&(d=o[M],d!=null&&xe(r,n,M,d,o,null))}function _L(r,n,o,d){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,w=null,M=null,X=null,at=null,ht=null;for(ot in o){var gt=o[ot];if(o.hasOwnProperty(ot)&>!=null)switch(ot){case"checked":break;case"value":break;case"defaultValue":X=gt;default:d.hasOwnProperty(ot)||xe(r,n,ot,null,d,gt)}}for(var nt in d){var ot=d[nt];if(gt=o[nt],d.hasOwnProperty(nt)&&(ot!=null||gt!=null))switch(nt){case"type":b=ot;break;case"name":y=ot;break;case"checked":at=ot;break;case"defaultChecked":ht=ot;break;case"value":w=ot;break;case"defaultValue":M=ot;break;case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(a(137,n));break;default:ot!==gt&&xe(r,n,nt,ot,d,gt)}}jd(r,w,M,X,at,ht,b,y);return;case"select":ot=w=M=nt=null;for(b in o)if(X=o[b],o.hasOwnProperty(b)&&X!=null)switch(b){case"value":break;case"multiple":ot=X;default:d.hasOwnProperty(b)||xe(r,n,b,null,d,X)}for(y in d)if(b=d[y],X=o[y],d.hasOwnProperty(y)&&(b!=null||X!=null))switch(y){case"value":nt=b;break;case"defaultValue":M=b;break;case"multiple":w=b;default:b!==X&&xe(r,n,y,b,d,X)}n=M,o=w,d=ot,nt!=null?Cs(r,!!o,nt,!1):!!d!=!!o&&(n!=null?Cs(r,!!o,n,!0):Cs(r,!!o,o?[]:"",!1));return;case"textarea":ot=nt=null;for(M in o)if(y=o[M],o.hasOwnProperty(M)&&y!=null&&!d.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:xe(r,n,M,null,d,y)}for(w in d)if(y=d[w],b=o[w],d.hasOwnProperty(w)&&(y!=null||b!=null))switch(w){case"value":nt=y;break;case"defaultValue":ot=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==b&&xe(r,n,w,y,d,b)}i0(r,nt,ot);return;case"option":for(var kt in o)if(nt=o[kt],o.hasOwnProperty(kt)&&nt!=null&&!d.hasOwnProperty(kt))switch(kt){case"selected":r.selected=!1;break;default:xe(r,n,kt,null,d,nt)}for(X in d)if(nt=d[X],ot=o[X],d.hasOwnProperty(X)&&nt!==ot&&(nt!=null||ot!=null))switch(X){case"selected":r.selected=nt&&typeof nt!="function"&&typeof nt!="symbol";break;default:xe(r,n,X,nt,d,ot)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $t in o)nt=o[$t],o.hasOwnProperty($t)&&nt!=null&&!d.hasOwnProperty($t)&&xe(r,n,$t,null,d,nt);for(at in d)if(nt=d[at],ot=o[at],d.hasOwnProperty(at)&&nt!==ot&&(nt!=null||ot!=null))switch(at){case"children":case"dangerouslySetInnerHTML":if(nt!=null)throw Error(a(137,n));break;default:xe(r,n,at,nt,d,ot)}return;default:if(Ud(n)){for(var be in o)nt=o[be],o.hasOwnProperty(be)&&nt!==void 0&&!d.hasOwnProperty(be)&&Ap(r,n,be,void 0,d,nt);for(ht in d)nt=d[ht],ot=o[ht],!d.hasOwnProperty(ht)||nt===ot||nt===void 0&&ot===void 0||Ap(r,n,ht,nt,d,ot);return}}for(var tt in o)nt=o[tt],o.hasOwnProperty(tt)&&nt!=null&&!d.hasOwnProperty(tt)&&xe(r,n,tt,null,d,nt);for(gt in d)nt=d[gt],ot=o[gt],!d.hasOwnProperty(gt)||nt===ot||nt==null&&ot==null||xe(r,n,gt,nt,d,ot)}function s1(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BL(){if(typeof performance.getEntriesByType=="function"){for(var r=0,n=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var y=o[d],b=y.transferSize,w=y.initiatorType,M=y.duration;if(b&&M&&s1(w)){for(w=0,M=y.responseEnd,d+=1;d<o.length;d++){var X=o[d],at=X.startTime;if(at>M)break;var ht=X.transferSize,gt=X.initiatorType;ht&&s1(gt)&&(X=X.responseEnd,w+=ht*(X<M?1:(M-at)/(X-at)))}if(--d,n+=8*(b+w)/(y.duration/1e3),r++,10<r)break}}if(0<r)return n/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Mp=null,Rp=null;function jh(r){return r.nodeType===9?r:r.ownerDocument}function l1(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function o1(r,n){if(r===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&n==="foreignObject"?0:r}function Fp(r,n){return r==="textarea"||r==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Op=null;function EL(){var r=window.event;return r&&r.type==="popstate"?r===Op?!1:(Op=r,!0):(Op=null,!1)}var c1=typeof setTimeout=="function"?setTimeout:void 0,LL=typeof clearTimeout=="function"?clearTimeout:void 0,h1=typeof Promise=="function"?Promise:void 0,AL=typeof queueMicrotask=="function"?queueMicrotask:typeof h1<"u"?function(r){return h1.resolve(null).then(r).catch(ML)}:c1;function ML(r){setTimeout(function(){throw r})}function sn(r){return r==="head"}function u1(r,n){var o=n,d=0;do{var y=o.nextSibling;if(r.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(y),Ks(n);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")Ro(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,Ro(o);for(var b=o.firstChild;b;){var w=b.nextSibling,M=b.nodeName;b[qa]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&Ro(r.ownerDocument.body);o=y}while(o);Ks(n)}function d1(r,n){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function Dp(r){var n=r.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Dp(o),bs(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function RL(r,n,o,d){for(;r.nodeType===1;){var y=o;if(r.nodeName.toLowerCase()!==n.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[qa])switch(n){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(n==="input"&&r.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=or(r.nextSibling),r===null)break}return null}function FL(r,n,o){if(n==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=or(r.nextSibling),r===null))return null;return r}function f1(r,n){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!n||(r=or(r.nextSibling),r===null))return null;return r}function $p(r){return r.data==="$?"||r.data==="$~"}function zp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function OL(r,n){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=n;else if(r.data!=="$?"||o.readyState!=="loading")n();else{var d=function(){n(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function or(r){for(;r!=null;r=r.nextSibling){var n=r.nodeType;if(n===1||n===3)break;if(n===8){if(n=r.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return r}var Np=null;function p1(r){r=r.nextSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(n===0)return or(r.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}r=r.nextSibling}return null}function g1(r){r=r.previousSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return r;n--}else o!=="/$"&&o!=="/&"||n++}r=r.previousSibling}return null}function m1(r,n,o){switch(n=jh(o),r){case"html":if(r=n.documentElement,!r)throw Error(a(452));return r;case"head":if(r=n.head,!r)throw Error(a(453));return r;case"body":if(r=n.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ro(r){for(var n=r.attributes;n.length;)r.removeAttributeNode(n[0]);bs(r)}var cr=new Map,y1=new Set;function Hh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var xa=H.d;H.d={f:DL,r:$L,D:zL,C:NL,L:qL,m:IL,X:HL,S:jL,M:UL};function DL(){var r=xa.f(),n=Fh();return r||n}function $L(r){var n=ea(r);n!==null&&n.tag===5&&n.type==="form"?Ox(n):xa.r(r)}var Vs=typeof document>"u"?null:document;function x1(r,n,o){var d=Vs;if(d&&typeof n=="string"&&n){var y=er(n);y='link[rel="'+r+'"][href="'+y+'"]',typeof o=="string"&&(y+='[crossorigin="'+o+'"]'),y1.has(y)||(y1.add(y),r={rel:r,crossOrigin:o,href:n},d.querySelector(y)===null&&(n=d.createElement("link"),ni(n,"link",r),Ee(n),d.head.appendChild(n)))}}function zL(r){xa.D(r),x1("dns-prefetch",r,null)}function NL(r,n){xa.C(r,n),x1("preconnect",r,n)}function qL(r,n,o){xa.L(r,n,o);var d=Vs;if(d&&r&&n){var y='link[rel="preload"][as="'+er(n)+'"]';n==="image"&&o&&o.imageSrcSet?(y+='[imagesrcset="'+er(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(y+='[imagesizes="'+er(o.imageSizes)+'"]')):y+='[href="'+er(r)+'"]';var b=y;switch(n){case"style":b=Zs(r);break;case"script":b=Qs(r)}cr.has(b)||(r=g({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:r,as:n},o),cr.set(b,r),d.querySelector(y)!==null||n==="style"&&d.querySelector(Fo(b))||n==="script"&&d.querySelector(Oo(b))||(n=d.createElement("link"),ni(n,"link",r),Ee(n),d.head.appendChild(n)))}}function IL(r,n){xa.m(r,n);var o=Vs;if(o&&r){var d=n&&typeof n.as=="string"?n.as:"script",y='link[rel="modulepreload"][as="'+er(d)+'"][href="'+er(r)+'"]',b=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Qs(r)}if(!cr.has(b)&&(r=g({rel:"modulepreload",href:r},n),cr.set(b,r),o.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Oo(b)))return}d=o.createElement("link"),ni(d,"link",r),Ee(d),o.head.appendChild(d)}}}function jL(r,n,o){xa.S(r,n,o);var d=Vs;if(d&&r){var y=$r(d).hoistableStyles,b=Zs(r);n=n||"default";var w=y.get(b);if(!w){var M={loading:0,preload:null};if(w=d.querySelector(Fo(b)))M.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":n},o),(o=cr.get(b))&&qp(r,o);var X=w=d.createElement("link");Ee(X),ni(X,"link",r),X._p=new Promise(function(at,ht){X.onload=at,X.onerror=ht}),X.addEventListener("load",function(){M.loading|=1}),X.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Uh(w,n,d)}w={type:"stylesheet",instance:w,count:1,state:M},y.set(b,w)}}}function HL(r,n){xa.X(r,n);var o=Vs;if(o&&r){var d=$r(o).hoistableScripts,y=Qs(r),b=d.get(y);b||(b=o.querySelector(Oo(y)),b||(r=g({src:r,async:!0},n),(n=cr.get(y))&&Ip(r,n),b=o.createElement("script"),Ee(b),ni(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(y,b))}}function UL(r,n){xa.M(r,n);var o=Vs;if(o&&r){var d=$r(o).hoistableScripts,y=Qs(r),b=d.get(y);b||(b=o.querySelector(Oo(y)),b||(r=g({src:r,async:!0,type:"module"},n),(n=cr.get(y))&&Ip(r,n),b=o.createElement("script"),Ee(b),ni(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(y,b))}}function b1(r,n,o,d){var y=(y=xt.current)?Hh(y):null;if(!y)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=Zs(o.href),o=$r(y).hoistableStyles,d=o.get(n),d||(d={type:"style",instance:null,count:0,state:null},o.set(n,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Zs(o.href);var b=$r(y).hoistableStyles,w=b.get(r);if(w||(y=y.ownerDocument||y,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,w),(b=y.querySelector(Fo(r)))&&!b._p&&(w.instance=b,w.state.loading=5),cr.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},cr.set(r,o),b||PL(y,r,o,w.state))),n&&d===null)throw Error(a(528,""));return w}if(n&&d!==null)throw Error(a(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Qs(o),o=$r(y).hoistableScripts,d=o.get(n),d||(d={type:"script",instance:null,count:0,state:null},o.set(n,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Zs(r){return'href="'+er(r)+'"'}function Fo(r){return'link[rel="stylesheet"]['+r+"]"}function C1(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function PL(r,n,o,d){r.querySelector('link[rel="preload"][as="style"]['+n+"]")?d.loading=1:(n=r.createElement("link"),d.preload=n,n.addEventListener("load",function(){return d.loading|=1}),n.addEventListener("error",function(){return d.loading|=2}),ni(n,"link",o),Ee(n),r.head.appendChild(n))}function Qs(r){return'[src="'+er(r)+'"]'}function Oo(r){return"script[async]"+r}function v1(r,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var d=r.querySelector('style[data-href~="'+er(o.href)+'"]');if(d)return n.instance=d,Ee(d),d;var y=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Ee(d),ni(d,"style",y),Uh(d,o.precedence,r),n.instance=d;case"stylesheet":y=Zs(o.href);var b=r.querySelector(Fo(y));if(b)return n.state.loading|=4,n.instance=b,Ee(b),b;d=C1(o),(y=cr.get(y))&&qp(d,y),b=(r.ownerDocument||r).createElement("link"),Ee(b);var w=b;return w._p=new Promise(function(M,X){w.onload=M,w.onerror=X}),ni(b,"link",d),n.state.loading|=4,Uh(b,o.precedence,r),n.instance=b;case"script":return b=Qs(o.src),(y=r.querySelector(Oo(b)))?(n.instance=y,Ee(y),y):(d=o,(y=cr.get(b))&&(d=g({},o),Ip(d,y)),r=r.ownerDocument||r,y=r.createElement("script"),Ee(y),ni(y,"link",d),r.head.appendChild(y),n.instance=y);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(d=n.instance,n.state.loading|=4,Uh(d,o.precedence,r));return n.instance}function Uh(r,n,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,b=y,w=0;w<d.length;w++){var M=d[w];if(M.dataset.precedence===n)b=M;else if(b!==y)break}b?b.parentNode.insertBefore(r,b.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(r,n.firstChild))}function qp(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.title==null&&(r.title=n.title)}function Ip(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.integrity==null&&(r.integrity=n.integrity)}var Ph=null;function k1(r,n,o){if(Ph===null){var d=new Map,y=Ph=new Map;y.set(o,d)}else y=Ph,d=y.get(o),d||(d=new Map,y.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),y=0;y<o.length;y++){var b=o[y];if(!(b[qa]||b[qe]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(n)||"";w=r+w;var M=d.get(w);M?M.push(b):d.set(w,[b])}}return d}function S1(r,n,o){r=r.ownerDocument||r,r.head.insertBefore(o,n==="title"?r.querySelector("head > title"):null)}function WL(r,n,o){if(o===1||n.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return r=n.disabled,typeof n.precedence=="string"&&r==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function T1(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function YL(r,n,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var y=Zs(d.href),b=n.querySelector(Fo(y));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(r.count++,r=Wh.bind(r),n.then(r,r)),o.state.loading|=4,o.instance=b,Ee(b);return}b=n.ownerDocument||n,d=C1(d),(y=cr.get(y))&&qp(d,y),b=b.createElement("link"),Ee(b);var w=b;w._p=new Promise(function(M,X){w.onload=M,w.onerror=X}),ni(b,"link",d),o.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=Wh.bind(r),n.addEventListener("load",o),n.addEventListener("error",o))}}var jp=0;function GL(r,n){return r.stylesheets&&r.count===0&&Gh(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Gh(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+n);0<r.imgBytes&&jp===0&&(jp=62500*BL());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Gh(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>jp?50:800)+n);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function Wh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Yh=null;function Gh(r,n){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Yh=new Map,n.forEach(XL,r),Yh=null,Wh.call(r))}function XL(r,n){if(!(n.state.loading&4)){var o=Yh.get(r);if(o)var d=o.get(null);else{o=new Map,Yh.set(r,o);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var w=y[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),d=w)}d&&o.set(null,d)}y=n.instance,w=y.getAttribute("data-precedence"),b=o.get(w)||d,b===d&&o.set(null,y),o.set(w,y),this.count++,d=Wh.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),b?b.parentNode.insertBefore(y,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),n.state.loading|=4}}var Do={$$typeof:E,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function VL(r,n,o,d,y,b,w,M,X){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.hiddenUpdates=Gl(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function w1(r,n,o,d,y,b,w,M,X,at,ht,gt){return r=new VL(r,n,o,w,X,at,ht,gt,M),n=1,b===!0&&(n|=24),b=Hi(3,null,null,n),r.current=b,b.stateNode=r,n=Cf(),n.refCount++,r.pooledCache=n,n.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:n},Tf(b),r}function _1(r){return r?(r=Es,r):Es}function B1(r,n,o,d,y,b){y=_1(y),d.context===null?d.context=y:d.pendingContext=y,d=Xa(n),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Va(r,d,n),o!==null&&(Fi(o,r,n),fo(o,r,n))}function E1(r,n){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<n?o:n}}function Hp(r,n){E1(r,n),(r=r.alternate)&&E1(r,n)}function L1(r){if(r.tag===13||r.tag===31){var n=An(r,67108864);n!==null&&Fi(n,r,67108864),Hp(r,67108864)}}function A1(r){if(r.tag===13||r.tag===31){var n=Gi();n=ms(n);var o=An(r,n);o!==null&&Fi(o,r,n),Hp(r,n)}}var Xh=!0;function ZL(r,n,o,d){var y=A.T;A.T=null;var b=H.p;try{H.p=2,Up(r,n,o,d)}finally{H.p=b,A.T=y}}function QL(r,n,o,d){var y=A.T;A.T=null;var b=H.p;try{H.p=8,Up(r,n,o,d)}finally{H.p=b,A.T=y}}function Up(r,n,o,d){if(Xh){var y=Pp(d);if(y===null)Lp(r,n,d,Vh,o),R1(r,d);else if(JL(y,r,n,o,d))d.stopPropagation();else if(R1(r,d),n&4&&-1<KL.indexOf(r)){for(;y!==null;){var b=ea(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=mr(b.pendingLanes);if(w!==0){var M=b;for(M.pendingLanes|=2,M.entangledLanes|=2;w;){var X=1<<31-Ze(w);M.entanglements[1]|=X,w&=~X}Ir(b),(ue&6)===0&&(Mh=ci()+500,Lo(0))}}break;case 31:case 13:M=An(b,2),M!==null&&Fi(M,b,2),Fh(),Hp(b,2)}if(b=Pp(d),b===null&&Lp(r,n,d,Vh,o),b===y)break;y=b}y!==null&&d.stopPropagation()}else Lp(r,n,d,null,o)}}function Pp(r){return r=Wd(r),Wp(r)}var Vh=null;function Wp(r){if(Vh=null,r=Ia(r),r!==null){var n=l(r);if(n===null)r=null;else{var o=n.tag;if(o===13){if(r=c(n),r!==null)return r;r=null}else if(o===31){if(r=h(n),r!==null)return r;r=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;r=null}else n!==r&&(r=null)}}return Vh=r,null}function M1(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qc()){case Wl:return 2;case ds:return 8;case Dr:case Ma:return 32;case qi:return 268435456;default:return 32}default:return 32}}var Yp=!1,ln=null,on=null,cn=null,$o=new Map,zo=new Map,hn=[],KL="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function R1(r,n){switch(r){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":$o.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(n.pointerId)}}function No(r,n,o,d,y,b){return r===null||r.nativeEvent!==b?(r={blockedOn:n,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[y]},n!==null&&(n=ea(n),n!==null&&L1(n)),r):(r.eventSystemFlags|=d,n=r.targetContainers,y!==null&&n.indexOf(y)===-1&&n.push(y),r)}function JL(r,n,o,d,y){switch(n){case"focusin":return ln=No(ln,r,n,o,d,y),!0;case"dragenter":return on=No(on,r,n,o,d,y),!0;case"mouseover":return cn=No(cn,r,n,o,d,y),!0;case"pointerover":var b=y.pointerId;return $o.set(b,No($o.get(b)||null,r,n,o,d,y)),!0;case"gotpointercapture":return b=y.pointerId,zo.set(b,No(zo.get(b)||null,r,n,o,d,y)),!0}return!1}function F1(r){var n=Ia(r.target);if(n!==null){var o=l(n);if(o!==null){if(n=o.tag,n===13){if(n=c(o),n!==null){r.blockedOn=n,_i(r.priority,function(){A1(o)});return}}else if(n===31){if(n=h(o),n!==null){r.blockedOn=n,_i(r.priority,function(){A1(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Zh(r){if(r.blockedOn!==null)return!1;for(var n=r.targetContainers;0<n.length;){var o=Pp(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Pd=d,o.target.dispatchEvent(d),Pd=null}else return n=ea(o),n!==null&&L1(n),r.blockedOn=o,!1;n.shift()}return!0}function O1(r,n,o){Zh(r)&&o.delete(n)}function tA(){Yp=!1,ln!==null&&Zh(ln)&&(ln=null),on!==null&&Zh(on)&&(on=null),cn!==null&&Zh(cn)&&(cn=null),$o.forEach(O1),zo.forEach(O1)}function Qh(r,n){r.blockedOn===n&&(r.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,tA)))}var Kh=null;function D1(r){Kh!==r&&(Kh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kh===r&&(Kh=null);for(var n=0;n<r.length;n+=3){var o=r[n],d=r[n+1],y=r[n+2];if(typeof d!="function"){if(Wp(d||o)===null)continue;break}var b=ea(o);b!==null&&(r.splice(n,3),n-=3,Pf(b,{pending:!0,data:y,method:o.method,action:d},d,y))}}))}function Ks(r){function n(X){return Qh(X,r)}ln!==null&&Qh(ln,r),on!==null&&Qh(on,r),cn!==null&&Qh(cn,r),$o.forEach(n),zo.forEach(n);for(var o=0;o<hn.length;o++){var d=hn[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<hn.length&&(o=hn[0],o.blockedOn===null);)F1(o),o.blockedOn===null&&hn.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var y=o[d],b=o[d+1],w=y[ei]||null;if(typeof b=="function")w||D1(o);else if(w){var M=null;if(b&&b.hasAttribute("formAction")){if(y=b,w=b[ei]||null)M=w.formAction;else if(Wp(y)!==null)continue}else M=w.action;typeof M=="function"?o[d+1]=M:(o.splice(d,3),d-=3),D1(o)}}}function $1(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return y=w})},focusReset:"manual",scroll:"manual"})}function n(){y!==null&&(y(),y=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),y!==null&&(y(),y=null)}}}function Gp(r){this._internalRoot=r}Jh.prototype.render=Gp.prototype.render=function(r){var n=this._internalRoot;if(n===null)throw Error(a(409));var o=n.current,d=Gi();B1(o,d,r,n,null,null)},Jh.prototype.unmount=Gp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var n=r.containerInfo;B1(r.current,2,null,r,null,null),Fh(),n[ta]=null}};function Jh(r){this._internalRoot=r}Jh.prototype.unstable_scheduleHydration=function(r){if(r){var n=Uc();r={blockedOn:null,target:r,priority:n};for(var o=0;o<hn.length&&n!==0&&n<hn[o].priority;o++);hn.splice(o,0,r),o===0&&F1(r)}};var z1=t.version;if(z1!=="19.2.6")throw Error(a(527,z1,"19.2.6"));H.findDOMNode=function(r){var n=r._reactInternals;if(n===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(n),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var eA={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{Ra=tu.inject(eA),ti=tu}catch{}}return Io.createRoot=function(r,n){if(!s(r))throw Error(a(299));var o=!1,d="",y=Px,b=Wx,w=Yx;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(d=n.identifierPrefix),n.onUncaughtError!==void 0&&(y=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(w=n.onRecoverableError)),n=w1(r,1,!1,null,null,o,d,null,y,b,w,$1),r[ta]=n.current,Ep(r),new Gp(n)},Io.hydrateRoot=function(r,n,o){if(!s(r))throw Error(a(299));var d=!1,y="",b=Px,w=Wx,M=Yx,X=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError),o.formState!==void 0&&(X=o.formState)),n=w1(r,1,!0,n,o??null,d,y,X,b,w,M,$1),n.context=_1(null),o=n.current,d=Gi(),d=ms(d),y=Xa(d),y.callback=null,Va(o,y,d),o=d,n.current.lanes=o,ve(n,o),Ir(n),r[ta]=n.current,Ep(r),new Jh(n)},Io.version="19.2.6",Io}var G1;function pA(){if(G1)return Zp.exports;G1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=fA(),Zp.exports}var gA=pA();const mA=Fm(gA);/**
|
|
51
|
+
* react-router v7.15.1
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/var X1="popstate";function V1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function yA(e={}){function t(a,s){var f;let l=(f=s.state)==null?void 0:f.masked,{pathname:c,search:h,hash:u}=l||a.location;return Bg("",{pathname:c,search:h,hash:u},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,s){return typeof s=="string"?s:pc(s)}return bA(t,i,null,e)}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ar(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xA(){return Math.random().toString(36).substring(2,10)}function Z1(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Bg(e,t,i=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?zl(t):t,state:i,key:t&&t.key||a||xA(),mask:s}}function pc({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function zl(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function bA(e,t,i,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,h="POP",u=null,f=p();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function p(){return(c.state||{idx:null}).idx}function g(){h="POP";let k=p(),T=k==null?null:k-f;f=k,u&&u({action:h,location:C.location,delta:T})}function x(k,T){h="PUSH";let _=V1(k)?k:Bg(C.location,k,T);f=p()+1;let E=Z1(_,f),F=C.createHref(_.mask||_);try{c.pushState(E,"",F)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;s.location.assign(F)}l&&u&&u({action:h,location:C.location,delta:1})}function m(k,T){h="REPLACE";let _=V1(k)?k:Bg(C.location,k,T);f=p();let E=Z1(_,f),F=C.createHref(_.mask||_);c.replaceState(E,"",F),l&&u&&u({action:h,location:C.location,delta:0})}function v(k){return CA(k)}let C={get action(){return h},get location(){return e(s,c)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(X1,g),u=k,()=>{s.removeEventListener(X1,g),u=null}},createHref(k){return t(s,k)},createURL:v,encodeLocation(k){let T=v(k);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:m,go(k){return c.go(k)}};return C}function CA(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Be(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:pc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function Vv(e,t,i="/"){return vA(e,t,i,!1)}function vA(e,t,i,a,s){let l=typeof t=="string"?zl(t):t,c=wa(l.pathname||"/",i);if(c==null)return null;let h=kA(e),u=null,f=OA(c);for(let p=0;u==null&&p<h.length;++p)u=RA(h[p],f,a);return u}function kA(e){let t=Zv(e);return SA(t),t}function Zv(e,t=[],i=[],a="",s=!1){let l=(c,h,u=s,f)=>{let p={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&u)return;Be(p.relativePath.startsWith(a),`Absolute route path "${p.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(a.length)}let g=Br([a,p.relativePath]),x=i.concat(p);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Zv(c.children,t,x,g,u)),!(c.path==null&&!c.index)&&t.push({path:g,score:AA(g,c.index),routesMeta:x})};return e.forEach((c,h)=>{var u;if(c.path===""||!((u=c.path)!=null&&u.includes("?")))l(c,h);else for(let f of Qv(c.path))l(c,h,!0,f)}),t}function Qv(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,s=i.endsWith("?"),l=i.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=Qv(a.join("/")),h=[];return h.push(...c.map(u=>u===""?l:[l,u].join("/"))),s&&h.push(...c),h.map(u=>e.startsWith("/")&&u===""?"/":u)}function SA(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:MA(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var TA=/^:[\w-]+$/,wA=3,_A=2,BA=1,EA=10,LA=-2,Q1=e=>e==="*";function AA(e,t){let i=e.split("/"),a=i.length;return i.some(Q1)&&(a+=LA),t&&(a+=_A),i.filter(s=>!Q1(s)).reduce((s,l)=>s+(TA.test(l)?wA:l===""?BA:EA),a)}function MA(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function RA(e,t,i=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let h=0;h<a.length;++h){let u=a[h],f=h===a.length-1,p=l==="/"?t:t.slice(l.length)||"/",g=Fu({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),x=u.route;if(!g&&f&&i&&!a[a.length-1].route.index&&(g=Fu({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Br([l,g.pathname]),pathnameBase:NA(Br([l,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(l=Br([l,g.pathnameBase]))}return c}function Fu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=FA(e.path,e.caseSensitive,e.end),s=t.match(i);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:a.reduce((f,{paramName:p,isOptional:g},x)=>{if(p==="*"){let v=h[x]||"";c=l.slice(0,l.length-v.length).replace(/(.)\/+$/,"$1")}const m=h[x];return g&&!m?f[p]=void 0:f[p]=(m||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:c,pattern:e}}function FA(e,t=!1,i=!0){Ar(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,u,f,p)=>{if(a.push({paramName:h,isOptional:u!=null}),u){let g=p.charAt(f+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function OA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ar(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function wa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}var DA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function $A(e,t="/"){let{pathname:i,search:a="",hash:s=""}=typeof e=="string"?zl(e):e,l;return i?(i=Kv(i),i.startsWith("/")?l=K1(i.substring(1),"/"):l=K1(i,t)):l=t,{pathname:l,search:qA(a),hash:IA(s)}}function K1(e,t){let i=Ou(t).split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function tg(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zA(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Dm(e){let t=zA(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function gd(e,t,i,a=!1){let s;typeof e=="string"?s=zl(e):(s={...e},Be(!s.pathname||!s.pathname.includes("?"),tg("?","pathname","search",s)),Be(!s.pathname||!s.pathname.includes("#"),tg("#","pathname","hash",s)),Be(!s.search||!s.search.includes("#"),tg("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,h;if(c==null)h=i;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}h=g>=0?t[g]:"/"}let u=$A(s,h),f=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&i.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}var Kv=e=>e.replace(/\/\/+/g,"/"),Br=e=>Kv(e.join("/")),Ou=e=>e.replace(/\/+$/,""),NA=e=>Ou(e).replace(/^\/*/,"/"),qA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,jA=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function HA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function UA(e){let t=e.map(i=>i.route.path).filter(Boolean);return Br(t)||"/"}var Jv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function t2(e,t){let i=e;if(typeof i!="string"||!DA.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,s=!1;if(Jv)try{let l=new URL(window.location.href),c=i.startsWith("//")?new URL(l.protocol+i):new URL(i),h=wa(c.pathname,t);c.origin===l.origin&&h!=null?i=h+c.search+c.hash:s=!0}catch{Ar(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var e2=["POST","PUT","PATCH","DELETE"];new Set(e2);var PA=["GET",...e2];new Set(PA);var Nl=O.createContext(null);Nl.displayName="DataRouter";var md=O.createContext(null);md.displayName="DataRouterState";var i2=O.createContext(!1);function WA(){return O.useContext(i2)}var r2=O.createContext({isTransitioning:!1});r2.displayName="ViewTransition";var YA=O.createContext(new Map);YA.displayName="Fetchers";var GA=O.createContext(null);GA.displayName="Await";var Qi=O.createContext(null);Qi.displayName="Navigation";var Bc=O.createContext(null);Bc.displayName="Location";var fr=O.createContext({outlet:null,matches:[],isDataRoute:!1});fr.displayName="Route";var $m=O.createContext(null);$m.displayName="RouteError";var a2="REACT_ROUTER_ERROR",XA="REDIRECT",VA="ROUTE_ERROR_RESPONSE";function ZA(e){if(e.startsWith(`${a2}:${XA}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function QA(e){if(e.startsWith(`${a2}:${VA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new jA(t.status,t.statusText,t.data)}catch{}}function KA(e,{relative:t}={}){Be(ql(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=O.useContext(Qi),{hash:s,pathname:l,search:c}=Ec(e,{relative:t}),h=l;return i!=="/"&&(h=l==="/"?i:Br([i,l])),a.createHref({pathname:h,search:c,hash:s})}function ql(){return O.useContext(Bc)!=null}function Rr(){return Be(ql(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Bc).location}var n2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s2(e){O.useContext(Qi).static||O.useLayoutEffect(e)}function os(){let{isDataRoute:e}=O.useContext(fr);return e?f3():JA()}function JA(){Be(ql(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(Nl),{basename:t,navigator:i}=O.useContext(Qi),{matches:a}=O.useContext(fr),{pathname:s}=Rr(),l=JSON.stringify(Dm(a)),c=O.useRef(!1);return s2(()=>{c.current=!0}),O.useCallback((u,f={})=>{if(Ar(c.current,n2),!c.current)return;if(typeof u=="number"){i.go(u);return}let p=gd(u,JSON.parse(l),s,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Br([t,p.pathname])),(f.replace?i.replace:i.push)(p,f.state,f)},[t,i,l,s,e])}var t3=O.createContext(null);function e3(e){let t=O.useContext(fr).outlet;return O.useMemo(()=>t&&O.createElement(t3.Provider,{value:e},t),[t,e])}function l2(){let{matches:e}=O.useContext(fr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Ec(e,{relative:t}={}){let{matches:i}=O.useContext(fr),{pathname:a}=Rr(),s=JSON.stringify(Dm(i));return O.useMemo(()=>gd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function i3(e,t){return o2(e,t)}function o2(e,t,i){var k;Be(ql(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(Qi),{matches:s}=O.useContext(fr),l=s[s.length-1],c=l?l.params:{},h=l?l.pathname:"/",u=l?l.pathnameBase:"/",f=l&&l.route;{let T=f&&f.path||"";h2(h,!f||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let p=Rr(),g;if(t){let T=typeof t=="string"?zl(t):t;Be(u==="/"||((k=T.pathname)==null?void 0:k.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${T.pathname}" was given in the \`location\` prop.`),g=T}else g=p;let x=g.pathname||"/",m=x;if(u!=="/"){let T=u.replace(/^\//,"").split("/");m="/"+x.replace(/^\//,"").split("/").slice(T.length).join("/")}let v=i&&i.state.matches.length?i.state.matches.map(T=>Object.assign(T,{route:i.manifest[T.route.id]||T.route})):Vv(e,{pathname:m});Ar(f||v!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ar(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=l3(v&&v.map(T=>Object.assign({},T,{params:Object.assign({},c,T.params),pathname:Br([u,a.encodeLocation?a.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?u:Br([u,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),s,i);return t&&C?O.createElement(Bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},C):C}function r3(){let e=d3(),t=HA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:l},"ErrorBoundary")," or"," ",O.createElement("code",{style:l},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),i?O.createElement("pre",{style:s},i):null,c)}var a3=O.createElement(r3,null),c2=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=QA(e.digest);i&&(e=i)}let t=e!==void 0?O.createElement(fr.Provider,{value:this.props.routeContext},O.createElement($m.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(n3,{error:e},t):t}};c2.contextType=i2;var eg=new WeakMap;function n3({children:e,error:t}){let{basename:i}=O.useContext(Qi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=ZA(t.digest);if(a){let s=eg.get(t);if(s)throw s;let l=t2(a.location,i);if(Jv&&!eg.get(t))if(l.isExternal||a.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw eg.set(t,c),c}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function s3({routeContext:e,match:t,children:i}){let a=O.useContext(Nl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(fr.Provider,{value:e},i)}function l3(e,t=[],i){let a=i==null?void 0:i.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,l=a==null?void 0:a.errors;if(l!=null){let p=s.findIndex(g=>g.route.id&&(l==null?void 0:l[g.route.id])!==void 0);Be(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,h=-1;if(i&&a){c=a.renderFallback;for(let p=0;p<s.length;p++){let g=s[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=p),g.route.id){let{loaderData:x,errors:m}=a,v=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!m||m[g.route.id]===void 0);if(g.route.lazy||v){i.isStatic&&(c=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let u=i==null?void 0:i.onError,f=a&&u?(p,g)=>{var x,m;u(p,{location:a.location,params:((m=(x=a.matches)==null?void 0:x[0])==null?void 0:m.params)??{},pattern:UA(a.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,x)=>{let m,v=!1,C=null,k=null;a&&(m=l&&g.route.id?l[g.route.id]:void 0,C=g.route.errorElement||a3,c&&(h<0&&x===0?(h2("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,k=null):h===x&&(v=!0,k=g.route.hydrateFallbackElement||null)));let T=t.concat(s.slice(0,x+1)),_=()=>{let E;return m?E=C:v?E=k:g.route.Component?E=O.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=p,O.createElement(s3,{match:g,routeContext:{outlet:p,matches:T,isDataRoute:a!=null},children:E})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?O.createElement(c2,{location:a.location,revalidation:a.revalidation,component:C,error:m,children:_(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:f}):_()},null)}function zm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function o3(e){let t=O.useContext(Nl);return Be(t,zm(e)),t}function c3(e){let t=O.useContext(md);return Be(t,zm(e)),t}function h3(e){let t=O.useContext(fr);return Be(t,zm(e)),t}function Nm(e){let t=h3(e),i=t.matches[t.matches.length-1];return Be(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function u3(){return Nm("useRouteId")}function d3(){var a;let e=O.useContext($m),t=c3("useRouteError"),i=Nm("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[i]}function f3(){let{router:e}=o3("useNavigate"),t=Nm("useNavigate"),i=O.useRef(!1);return s2(()=>{i.current=!0}),O.useCallback(async(s,l={})=>{Ar(i.current,n2),i.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var J1={};function h2(e,t,i){!t&&!J1[e]&&(J1[e]=!0,Ar(!1,i))}O.memo(p3);function p3({routes:e,manifest:t,future:i,state:a,isStatic:s,onError:l}){return o2(e,void 0,{manifest:t,state:a,isStatic:s,onError:l})}function g3({to:e,replace:t,state:i,relative:a}){Be(ql(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=O.useContext(Qi);Ar(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=O.useContext(fr),{pathname:c}=Rr(),h=os(),u=gd(e,Dm(l),c,a==="path"),f=JSON.stringify(u);return O.useEffect(()=>{h(JSON.parse(f),{replace:t,state:i,relative:a})},[h,f,a,t,i]),null}function m3(e){return e3(e.context)}function jr(e){Be(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function y3({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:s,static:l=!1,useTransitions:c}){Be(!ql(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),u=O.useMemo(()=>({basename:h,navigator:s,static:l,useTransitions:c,future:{}}),[h,s,l,c]);typeof i=="string"&&(i=zl(i));let{pathname:f="/",search:p="",hash:g="",state:x=null,key:m="default",mask:v}=i,C=O.useMemo(()=>{let k=wa(f,h);return k==null?null:{location:{pathname:k,search:p,hash:g,state:x,key:m,mask:v},navigationType:a}},[h,f,p,g,x,m,a,v]);return Ar(C!=null,`<Router basename="${h}"> is not able to match the URL "${f}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:O.createElement(Qi.Provider,{value:u},O.createElement(Bc.Provider,{children:t,value:C}))}function x3({children:e,location:t}){return i3(Eg(e),t)}function Eg(e,t=[]){let i=[];return O.Children.forEach(e,(a,s)=>{if(!O.isValidElement(a))return;let l=[...t,s];if(a.type===O.Fragment){i.push.apply(i,Eg(a.props.children,l));return}Be(a.type===jr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||l.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Eg(a.props.children,l)),i.push(c)}),i}var yu="get",xu="application/x-www-form-urlencoded";function yd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function b3(e){return yd(e)&&e.tagName.toLowerCase()==="button"}function C3(e){return yd(e)&&e.tagName.toLowerCase()==="form"}function v3(e){return yd(e)&&e.tagName.toLowerCase()==="input"}function k3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function S3(e,t){return e.button===0&&(!t||t==="_self")&&!k3(e)}var eu=null;function T3(){if(eu===null)try{new FormData(document.createElement("form"),0),eu=!1}catch{eu=!0}return eu}var w3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ig(e){return e!=null&&!w3.has(e)?(Ar(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xu}"`),null):e}function _3(e,t){let i,a,s,l,c;if(C3(e)){let h=e.getAttribute("action");a=h?wa(h,t):null,i=e.getAttribute("method")||yu,s=ig(e.getAttribute("enctype"))||xu,l=new FormData(e)}else if(b3(e)||v3(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||h.getAttribute("action");if(a=u?wa(u,t):null,i=e.getAttribute("formmethod")||h.getAttribute("method")||yu,s=ig(e.getAttribute("formenctype"))||ig(h.getAttribute("enctype"))||xu,l=new FormData(h,e),!T3()){let{name:f,type:p,value:g}=e;if(p==="image"){let x=f?`${f}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else f&&l.append(f,g)}}else{if(yd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=yu,a=null,s=xu,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:i.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function u2(e,t,i,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&wa(s.pathname,t)==="/"?s.pathname=`${Ou(t)}/_root.${a}`:s.pathname=`${Ou(s.pathname)}.${a}`,s}async function B3(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function E3(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function L3(e,t,i){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await B3(l,i);return c.links?c.links():[]}return[]}));return F3(a.flat(1).filter(E3).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function tC(e,t,i,a,s,l){let c=(u,f)=>i[f]?u.route.id!==i[f].route.id:!0,h=(u,f)=>{var p;return i[f].pathname!==u.pathname||((p=i[f].route.path)==null?void 0:p.endsWith("*"))&&i[f].params["*"]!==u.params["*"]};return l==="assets"?t.filter((u,f)=>c(u,f)||h(u,f)):l==="data"?t.filter((u,f)=>{var g;let p=a.routes[u.route.id];if(!p||!p.hasLoader)return!1;if(c(u,f)||h(u,f))return!0;if(u.route.shouldRevalidate){let x=u.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=i[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function A3(e,t,{includeHydrateFallback:i}={}){return M3(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function M3(e){return[...new Set(e)]}function R3(e){let t={},i=Object.keys(e).sort();for(let a of i)t[a]=e[a];return t}function F3(e,t){let i=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(R3(s));return i.has(l)||(i.add(l),a.push({key:l,link:s})),a},[])}function Im(){let e=O.useContext(Nl);return qm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function O3(){let e=O.useContext(md);return qm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jm=O.createContext(void 0);jm.displayName="FrameworkContext";function Hm(){let e=O.useContext(jm);return qm(e,"You must render this element inside a <HydratedRouter> element"),e}function D3(e,t){let i=O.useContext(jm),[a,s]=O.useState(!1),[l,c]=O.useState(!1),{onFocus:h,onBlur:u,onMouseEnter:f,onMouseLeave:p,onTouchStart:g}=t,x=O.useRef(null);O.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(_=>{c(_.isIntersecting)})},k=new IntersectionObserver(C,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[e]),O.useEffect(()=>{if(a){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[a]);let m=()=>{s(!0)},v=()=>{s(!1),c(!1)};return i?e!=="intent"?[l,x,{}]:[l,x,{onFocus:jo(h,m),onBlur:jo(u,v),onMouseEnter:jo(f,m),onMouseLeave:jo(p,v),onTouchStart:jo(g,m)}]:[!1,x,{}]}function jo(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function $3({page:e,...t}){let i=WA(),{router:a}=Im(),s=O.useMemo(()=>Vv(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?i?O.createElement(N3,{page:e,matches:s,...t}):O.createElement(q3,{page:e,matches:s,...t}):null}function z3(e){let{manifest:t,routeModules:i}=Hm(),[a,s]=O.useState([]);return O.useEffect(()=>{let l=!1;return L3(e,t,i).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,i]),a}function N3({page:e,matches:t,...i}){let a=Rr(),{future:s}=Hm(),{basename:l}=Im(),c=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let h=u2(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,f=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?u=!0:f.push(p.route.id);return u&&f.length>0&&h.searchParams.set("_routes",f.join(",")),[h.pathname+h.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return O.createElement(O.Fragment,null,c.map(h=>O.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function q3({page:e,matches:t,...i}){let a=Rr(),{future:s,manifest:l,routeModules:c}=Hm(),{basename:h}=Im(),{loaderData:u,matches:f}=O3(),p=O.useMemo(()=>tC(e,t,f,l,a,"data"),[e,t,f,l,a]),g=O.useMemo(()=>tC(e,t,f,l,a,"assets"),[e,t,f,l,a]),x=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let C=new Set,k=!1;if(t.forEach(_=>{var F;let E=l.routes[_.route.id];!E||!E.hasLoader||(!p.some(D=>D.route.id===_.route.id)&&_.route.id in u&&((F=c[_.route.id])!=null&&F.shouldRevalidate)||E.hasClientLoader?k=!0:C.add(_.route.id))}),C.size===0)return[];let T=u2(e,h,s.unstable_trailingSlashAwareDataRequests,"data");return k&&C.size>0&&T.searchParams.set("_routes",t.filter(_=>C.has(_.route.id)).map(_=>_.route.id).join(",")),[T.pathname+T.search]},[h,s.unstable_trailingSlashAwareDataRequests,u,a,l,p,t,e,c]),m=O.useMemo(()=>A3(g,l),[g,l]),v=z3(g);return O.createElement(O.Fragment,null,x.map(C=>O.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...i})),m.map(C=>O.createElement("link",{key:C,rel:"modulepreload",href:C,...i})),v.map(({key:C,link:k})=>O.createElement("link",{key:C,nonce:i.nonce,...k,crossOrigin:k.crossOrigin??i.crossOrigin})))}function I3(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var j3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{j3&&(window.__reactRouterVersion="7.15.1")}catch{}function H3({basename:e,children:t,useTransitions:i,window:a}){let s=O.useRef();s.current==null&&(s.current=yA({window:a,v5Compat:!0}));let l=s.current,[c,h]=O.useState({action:l.action,location:l.location}),u=O.useCallback(f=>{i===!1?h(f):O.startTransition(()=>h(f))},[i]);return O.useLayoutEffect(()=>l.listen(u),[l,u]),O.createElement(y3,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:i})}var d2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,f2=O.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,mask:h,state:u,target:f,to:p,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:m,...v},C){let{basename:k,navigator:T,useTransitions:_}=O.useContext(Qi),E=typeof p=="string"&&d2.test(p),F=t2(p,k);p=F.to;let D=KA(p,{relative:s}),N=Rr(),U=null;if(h){let j=gd(h,[],N.mask?N.mask.pathname:"/",!0);k!=="/"&&(j.pathname=j.pathname==="/"?k:Br([k,j.pathname])),U=T.createHref(j)}let[R,V,Y]=D3(a,v),G=W3(p,{replace:c,mask:h,state:u,target:f,preventScrollReset:g,relative:s,viewTransition:x,defaultShouldRevalidate:m,useTransitions:_});function et(j){t&&t(j),j.defaultPrevented||G(j)}let J=!(F.isExternal||l),q=O.createElement("a",{...v,...Y,href:(J?U:void 0)||F.absoluteURL||D,onClick:J?et:t,ref:I3(C,V),target:f,"data-discover":!E&&i==="render"?"true":void 0});return R&&!E?O.createElement(O.Fragment,null,q,O.createElement($3,{page:D})):q});f2.displayName="Link";var p2=O.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:h,children:u,...f},p){let g=Ec(c,{relative:f.relative}),x=Rr(),m=O.useContext(md),{navigator:v,basename:C}=O.useContext(Qi),k=m!=null&&Z3(g)&&h===!0,T=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,_=x.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(_=_.toLowerCase(),E=E?E.toLowerCase():null,T=T.toLowerCase()),E&&C&&(E=wa(E,C)||E);const F=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let D=_===T||!s&&_.startsWith(T)&&_.charAt(F)==="/",N=E!=null&&(E===T||!s&&E.startsWith(T)&&E.charAt(T.length)==="/"),U={isActive:D,isPending:N,isTransitioning:k},R=D?t:void 0,V;typeof a=="function"?V=a(U):V=[a,D?"active":null,N?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let Y=typeof l=="function"?l(U):l;return O.createElement(f2,{...f,"aria-current":R,className:V,ref:p,style:Y,to:c,viewTransition:h},typeof u=="function"?u(U):u)});p2.displayName="NavLink";var U3=O.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:s,state:l,method:c=yu,action:h,onSubmit:u,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x,...m},v)=>{let{useTransitions:C}=O.useContext(Qi),k=X3(),T=V3(h,{relative:f}),_=c.toLowerCase()==="get"?"get":"post",E=typeof h=="string"&&d2.test(h),F=D=>{if(u&&u(D),D.defaultPrevented)return;D.preventDefault();let N=D.nativeEvent.submitter,U=(N==null?void 0:N.getAttribute("formmethod"))||c,R=()=>k(N||D.currentTarget,{fetcherKey:t,method:U,navigate:i,replace:s,state:l,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x});C&&i!==!1?O.startTransition(()=>R()):R()};return O.createElement("form",{ref:v,method:_,action:T,onSubmit:a?u:F,...m,"data-discover":!E&&e==="render"?"true":void 0})});U3.displayName="Form";function P3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function g2(e){let t=O.useContext(Nl);return Be(t,P3(e)),t}function W3(e,{target:t,replace:i,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:u,useTransitions:f}={}){let p=os(),g=Rr(),x=Ec(e,{relative:c});return O.useCallback(m=>{if(S3(m,t)){m.preventDefault();let v=i!==void 0?i:pc(g)===pc(x),C=()=>p(e,{replace:v,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:u});f?O.startTransition(()=>C()):C()}},[g,p,x,i,a,s,t,e,l,c,h,u,f])}var Y3=0,G3=()=>`__${String(++Y3)}__`;function X3(){let{router:e}=g2("useSubmit"),{basename:t}=O.useContext(Qi),i=u3(),a=e.fetch,s=e.navigate;return O.useCallback(async(l,c={})=>{let{action:h,method:u,encType:f,formData:p,body:g}=_3(l,t);if(c.navigate===!1){let x=c.fetcherKey||G3();await a(x,i,c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||u,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||u,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,i])}function V3(e,{relative:t}={}){let{basename:i}=O.useContext(Qi),a=O.useContext(fr);Be(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Ec(e||".",{relative:t})},c=Rr();if(e==null){l.search=c.search;let h=new URLSearchParams(l.search),u=h.getAll("index");if(u.some(p=>p==="")){h.delete("index"),u.filter(g=>g).forEach(g=>h.append("index",g));let p=h.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(l.pathname=l.pathname==="/"?i:Br([i,l.pathname])),pc(l)}function Z3(e,{relative:t}={}){let i=O.useContext(r2);Be(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=g2("useViewTransitionState"),s=Ec(e,{relative:t});if(!i.isTransitioning)return!1;let l=wa(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=wa(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Fu(s.pathname,c)!=null||Fu(s.pathname,l)!=null}const Q3="",K3=`ws://${window.location.host}`;class J3{constructor(t=Q3,i=K3){Lt(this,"baseUrl");Lt(this,"wsBaseUrl");Lt(this,"apiKey");Lt(this,"ws",null);Lt(this,"wsHandlers",new Map);this.baseUrl=t,this.wsBaseUrl=i,this.apiKey=""}setApiKey(t){this.apiKey=t}headers(){const t={"Content-Type":"application/json"};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}authHeaders(){const t={};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}async health(){return(await fetch(`${this.baseUrl}/health`)).json()}async chatCompletions(t){var l,c,h,u,f,p,g;if(t.stream)return this.chatCompletionsSSE(t);const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!1,chatId:t.chatId}),signal:t.signal});if(!i.ok){const x=await i.json().catch(()=>({error:{message:i.statusText}}));(c=t.onError)==null||c.call(t,((l=x.error)==null?void 0:l.message)??"Request failed");return}const a=await i.json(),s={v:1,id:a.id,type:"stream.content",payload:{content:((f=(u=(h=a.choices)==null?void 0:h[0])==null?void 0:u.message)==null?void 0:f.content)??"",messageId:a.id},ts:Date.now(),sessionId:t.chatId??""};(p=t.onChunk)==null||p.call(t,s),(g=t.onDone)==null||g.call(t)}async chatCompletionsSSE(t){var h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U;const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!0,chatId:t.chatId}),signal:t.signal});if(!i.ok){const R=await i.json().catch(()=>({error:{message:i.statusText}}));(u=t.onError)==null||u.call(t,((h=R.error)==null?void 0:h.message)??"Request failed");return}const a=(f=i.body)==null?void 0:f.getReader();if(!a){(p=t.onError)==null||p.call(t,"No response body");return}const s=new TextDecoder;let l="",c="";for(;;){const{done:R,value:V}=await a.read();if(R)break;l+=s.decode(V,{stream:!0});const Y=l.split(`
|
|
62
|
+
`);l=Y.pop()??"";for(const G of Y)if(G.startsWith("event: "))c=G.slice(7).trim();else if(G.startsWith("data: ")){const et=G.slice(6).trim();if(et==="[DONE]"){(g=t.onDone)==null||g.call(t);return}try{const J=JSON.parse(et);if(c==="tool_result")(x=t.onToolResult)==null||x.call(t,J);else if(c==="status")(m=t.onStatus)==null||m.call(t,J);else if(c==="subagent")(v=t.onSubagent)==null||v.call(t,J);else if(c==="tool_use")(C=t.onToolUse)==null||C.call(t,J);else{const q=(T=(k=J.choices)==null?void 0:k[0])==null?void 0:T.delta;if(q){if(q.content){const j={v:1,id:J.id,type:"stream.content",payload:{content:q.content,messageId:J.id},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(_=t.onChunk)==null||_.call(t,j)}if(q.reasoning_content){const j={v:1,id:J.id,type:"stream.reasoning",payload:{content:q.reasoning_content,messageId:J.id},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(E=t.onChunk)==null||E.call(t,j)}if(q.tool_calls)for(const j of q.tool_calls){const A={v:1,id:J.id,type:"stream.tool_call",payload:{toolCallId:j.id,toolName:(F=j.function)==null?void 0:F.name,argsPreview:(D=j.function)==null?void 0:D.arguments,riskLevel:"safe"},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(N=t.onChunk)==null||N.call(t,A)}}}}catch{}c=""}else G.trim()===""&&(c="")}(U=t.onDone)==null||U.call(t)}async listSessions(){return((await(await fetch(`${this.baseUrl}/api/sessions`,{headers:this.authHeaders()})).json()).sessions??[]).map(s=>({id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,messageCount:s.messageCount??0,createdAt:s.createdAt}))}async createSession(t,i){const s=await(await fetch(`${this.baseUrl}/api/sessions`,{method:"POST",headers:this.headers(),body:JSON.stringify({name:t,agentType:i})})).json();return{id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,createdAt:s.createdAt}}async listModels(){return(await(await fetch(`${this.baseUrl}/v1/models`,{headers:this.authHeaders()})).json()).data??[]}async switchModel(t){return(await fetch(`${this.baseUrl}/api/models/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({modelId:t})})).json()}async getStatus(){return(await fetch(`${this.baseUrl}/api/status`,{headers:this.authHeaders()})).json()}async deleteSession(t){var a;const i=await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!i.ok){const s=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Delete failed: ${i.status}`)}return i.json()}async deleteAllSessions(){var i;const t=await fetch(`${this.baseUrl}/api/sessions`,{method:"DELETE",headers:this.authHeaders()});if(!t.ok){const a=await t.json().catch(()=>({error:{message:t.statusText}}));throw new Error(((i=a.error)==null?void 0:i.message)??`Delete all failed: ${t.status}`)}return t.json()}async clearSession(t){var a;const i=await fetch(`${this.baseUrl}/api/sessions/${t}/clear`,{method:"POST",headers:this.authHeaders()});if(!i.ok){const s=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Clear failed: ${i.status}`)}return i.json()}async renameSession(t,i){return(await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"PATCH",headers:this.headers(),body:JSON.stringify({name:i})})).json()}async activateSession(t){return(await fetch(`${this.baseUrl}/api/sessions/${t}/activate`,{method:"POST",headers:this.authHeaders()})).json()}async fetchMessages(t){return(await(await fetch(`${this.baseUrl}/api/sessions/${t}/messages`,{headers:this.authHeaders()})).json()).messages??[]}async listAgents(){return(await fetch(`${this.baseUrl}/api/agents`,{headers:this.authHeaders()})).json()}async switchAgent(t){return(await fetch(`${this.baseUrl}/api/agents/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({agentName:t})})).json()}async getSettings(){return(await fetch(`${this.baseUrl}/api/settings`,{headers:this.authHeaders()})).json()}async updateSettings(t){return(await fetch(`${this.baseUrl}/api/settings`,{method:"PATCH",headers:this.headers(),body:JSON.stringify(t)})).json()}async addCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models`,{method:"POST",headers:this.headers(),body:JSON.stringify(t)})).json()}async removeCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models/${encodeURIComponent(t)}`,{method:"DELETE",headers:this.authHeaders()})).json()}async abort(){return(await fetch(`${this.baseUrl}/api/abort`,{method:"POST",headers:this.authHeaders()})).json()}async respondApproval(t,i){await fetch(`${this.baseUrl}/api/approval/respond`,{method:"POST",headers:this.headers(),body:JSON.stringify({requestId:t,approved:i})})}connectWebSocket(t,i){const a=`${this.wsBaseUrl}/ws`,s=new WebSocket(a);return this.ws=s,s.onopen=()=>{this.wsHandlers.set(t,i)},s.onmessage=l=>{try{const c=JSON.parse(l.data);i(c)}catch{}},s.onclose=()=>{this.wsHandlers.delete(t),this.ws=null},()=>{s.close()}}sendWebSocketMessage(t,i){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const a={v:1,id:`msg_${Date.now()}`,type:"chat.send",payload:{message:i},ts:Date.now(),sessionId:t};this.ws.send(JSON.stringify(a))}async listTodos(){const t=await fetch(`${this.baseUrl}/api/todos`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to list todos");return t.json()}async listRules(){const t=await fetch(`${this.baseUrl}/api/rules`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to list rules");return(await t.json()).rules??[]}async createRule(t){return(await fetch(`${this.baseUrl}/api/rules`,{method:"POST",headers:this.headers(),body:JSON.stringify(t)})).json()}async updateRule(t,i){return(await fetch(`${this.baseUrl}/api/rules/${encodeURIComponent(t)}`,{method:"PUT",headers:this.headers(),body:JSON.stringify(i)})).json()}async deleteRule(t){return(await fetch(`${this.baseUrl}/api/rules/${encodeURIComponent(t)}`,{method:"DELETE",headers:this.authHeaders()})).json()}async transcribeAudio(t,i){var s;const a=await fetch(`${this.baseUrl}/api/audio/transcribe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audio:t,language:i})});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Transcription failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Transcription failed")}return a.json()}async synthesizeAudio(t,i){var s;const a=await fetch(`${this.baseUrl}/api/audio/synthesize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t,...i})});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Synthesis failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Synthesis failed")}return a.arrayBuffer()}async listMeetings(){const t=await fetch(`${this.baseUrl}/api/meetings`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to list meetings");return t.json()}async createMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings`,{method:"POST",headers:this.headers(),body:JSON.stringify({title:t})});if(!i.ok)throw new Error("Failed to create meeting");return i.json()}async getMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}`,{headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to get meeting");return i.json()}async stopMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}/stop`,{method:"POST",headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to stop meeting");return i.json()}async appendMeetingTranscript(t,i){const a=await fetch(`${this.baseUrl}/api/meetings/${t}/transcript`,{method:"POST",headers:this.headers(),body:JSON.stringify({text:i})});if(!a.ok)throw new Error("Failed to append transcript");return a.json()}async deleteMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to delete meeting");return i.json()}async exportMeeting(t,i){var s;const a=await fetch(`${this.baseUrl}/api/meetings/${t}/export?format=${i}`,{headers:this.authHeaders()});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Export failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Export failed")}return a.blob()}async exportMeetingAI(t,i,a){var C,k,T,_;const s=await fetch(`${this.baseUrl}/api/meetings/${t}/export-ai`,{method:"POST",headers:this.headers(),body:JSON.stringify({format:i}),signal:a==null?void 0:a.signal});if(!s.ok){const E=await s.json().catch(()=>({error:{message:"AI export failed"}}));throw new Error(((C=E.error)==null?void 0:C.message)||"AI export failed")}const l=(k=s.body)==null?void 0:k.getReader();if(!l)throw new Error("No response body for SSE stream");const c=new TextDecoder;let h="",u=null,f="",p=null,g=[];for(;;){const{done:E,value:F}=await l.read();if(E)break;h+=c.decode(F,{stream:!0});const D=h.split(`
|
|
63
|
+
`);h=D.pop()??"";for(const N of D)if(N.startsWith("event: "))f=N.slice(7).trim();else if(N.startsWith("data: "))g.push(N.slice(6));else if(N.trim()===""){if(g.length>0){const U=g.join("");g=[];try{const R=JSON.parse(U);f==="status"?(T=a==null?void 0:a.onStatus)==null||T.call(a,R):f==="error"?(p=R.message||"AI export failed",(_=a==null?void 0:a.onError)==null||_.call(a,p)):f==="result"&&(u=R)}catch{}}f=""}}if(g.length>0){const E=g.join("");try{const F=JSON.parse(E);f==="result"?u=F:f==="error"&&(p=F.message||"AI export failed")}catch{}}if(p)throw new Error(p);if(!(u!=null&&u.data))throw new Error("AI export did not return file data");const x=atob(u.data),m=new Uint8Array(x.length);for(let E=0;E<x.length;E++)m[E]=x.charCodeAt(E);const v=u.format==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":"application/vnd.openxmlformats-officedocument.wordprocessingml.document";return new Blob([m],{type:v})}async summarizeMeeting(t,i){var g,x,m,v;const a=await fetch(`${this.baseUrl}/api/meetings/${t}/summarize`,{method:"POST",headers:this.headers(),signal:i==null?void 0:i.signal});if(!a.ok){const C=await a.json().catch(()=>({error:{message:"Summarize failed"}}));throw new Error(((g=C.error)==null?void 0:g.message)||"Summarize failed")}const s=(x=a.body)==null?void 0:x.getReader();if(!s)throw new Error("No response body");const l=new TextDecoder;let c="",h="",u=[],f="",p=null;for(;;){const{done:C,value:k}=await s.read();if(C)break;c+=l.decode(k,{stream:!0});const T=c.split(`
|
|
64
|
+
`);c=T.pop()??"";for(const _ of T)if(_.startsWith("event: "))h=_.slice(7).trim();else if(_.startsWith("data: "))u.push(_.slice(6));else if(_.trim()===""){if(u.length>0){const E=u.join("");u=[];try{const F=JSON.parse(E);h==="status"?(m=i==null?void 0:i.onStatus)==null||m.call(i,F):h==="error"?(p=F.message||"Summarize failed",(v=i==null?void 0:i.onError)==null||v.call(i,p)):h==="result"&&(f=F.aiSummary||"")}catch{}}h=""}}if(p)throw new Error(p);return f}async getAudioSettings(){const t=await fetch(`${this.baseUrl}/api/audio/settings`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to get audio settings");return t.json()}async updateAudioSettings(t){const i=await fetch(`${this.baseUrl}/api/audio/settings`,{method:"PATCH",headers:this.headers(),body:JSON.stringify(t)});if(!i.ok)throw new Error("Failed to update audio settings");return i.json()}}const jt=new J3,m2=O.createContext({currentSession:null,contextPercentage:0,status:null,setCurrentSession:()=>{},refreshStatus:async()=>{},getMessageCache:()=>[],setMessageCache:()=>{},clearMessageCache:()=>{}});function xd(){return O.useContext(m2)}function tM({children:e}){const[t,i]=O.useState(null),[a,s]=O.useState(null),[l,c]=O.useState(0),h=os(),u=Rr(),f=O.useRef(!1),p=O.useRef(new Map),g=O.useCallback(C=>p.current.get(C)??[],[]),x=O.useCallback((C,k)=>{p.current.set(C,k)},[]),m=O.useCallback(C=>{p.current.delete(C)},[]),v=O.useCallback(async()=>{try{const C=await jt.getStatus();i(C),c(C.contextPercentage??0),C.currentSession?(s({id:C.currentSession.id,name:C.currentSession.name,messageCount:C.currentSession.messageCount}),f.current||(f.current=!0,u.pathname==="/chat"&&h(`/chat/${C.currentSession.id}`,{replace:!0}))):f.current=!0}catch{}},[h,u.pathname]);return O.useEffect(()=>{v();const C=setInterval(v,3e3);return()=>clearInterval(C)},[v]),B.jsx(m2.Provider,{value:{currentSession:a,contextPercentage:l,status:t,setCurrentSession:s,refreshStatus:v,getMessageCache:g,setMessageCache:x,clearMessageCache:m},children:e})}const eM=[{to:"/chat",label:"Chat",icon:"💬"},{to:"/sessions",label:"Sessions",icon:"📋"},{to:"/meetings",label:"Meetings",icon:"🎙️"},{to:"/rules",label:"Rules",icon:"📜"},{to:"/settings",label:"Settings",icon:"⚙️"}];function iM(){const{currentSession:e,contextPercentage:t,status:i,setCurrentSession:a,refreshStatus:s}=xd(),l=os(),[c,h]=O.useState(null);O.useEffect(()=>{let p=!1;const g=async()=>{try{const m=await jt.listTodos();p||h(m)}catch{}};g();const x=setInterval(g,3e3);return()=>{p=!0,clearInterval(x)}},[]);const u=t??0,f=u>50?"var(--safe)":u>20?"var(--moderate)":"var(--dangerous)";return B.jsxs("div",{style:{display:"flex",height:"100vh"},children:[B.jsxs("nav",{style:{width:220,minWidth:220,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",padding:"12px 0"},children:[B.jsxs("div",{style:{padding:"12px 16px",fontSize:18,fontWeight:700,borderBottom:"1px solid var(--border)",marginBottom:8},children:[B.jsx("span",{className:"gradient-text",children:"AggRoot"}),B.jsxs("span",{style:{fontSize:11,fontWeight:400,color:"var(--text-tertiary)",marginLeft:6},children:["v","1.10.7"]})]}),eM.map(p=>B.jsxs(p2,{to:p.to,style:({isActive:g})=>({display:"flex",alignItems:"center",gap:10,padding:"10px 16px",color:g?"var(--text-primary)":"var(--text-secondary)",background:g?"var(--bg-hover)":"transparent",textDecoration:"none",fontSize:14,borderLeft:g?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s"}),children:[B.jsx("span",{children:p.icon}),B.jsx("span",{children:p.label})]},p.to)),B.jsx("div",{style:{flex:1}}),B.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--border)",fontSize:12,color:"var(--text-muted)"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:[B.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i?"var(--emerald)":"var(--text-muted)",boxShadow:i?"0 0 6px var(--emerald)":"none"}}),i?"Connected":"Disconnected"]}),e?B.jsxs("div",{onClick:()=>l(`/chat/${e.id}`),style:{padding:"8px 10px",background:"var(--accent-soft)",borderRadius:"var(--radius)",cursor:"pointer",transition:"background 0.15s",marginBottom:8,border:"1px solid rgba(99, 102, 241, 0.15)"},onMouseEnter:p=>p.currentTarget.style.background="var(--bg-hover)",onMouseLeave:p=>p.currentTarget.style.background="var(--accent-soft)",children:[B.jsx("div",{style:{fontSize:10,color:"var(--accent)",marginBottom:2,fontWeight:600},children:"Current Session"}),B.jsx("div",{style:{color:"var(--text-secondary)",fontSize:12,fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),B.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:[e.messageCount," messages"]})]}):B.jsx("div",{style:{padding:"8px 10px",background:"var(--bg-tertiary)",borderRadius:"var(--radius)",marginBottom:8,fontSize:12,color:"var(--text-muted)"},children:"No active session"}),(i==null?void 0:i.model)&&B.jsxs("div",{style:{marginBottom:8},children:[B.jsx("div",{style:{height:4,background:"rgba(255,255,255,0.05)",borderRadius:2,overflow:"hidden"},children:B.jsx("div",{style:{height:"100%",width:`${u}%`,background:"linear-gradient(90deg, var(--emerald), var(--amber), var(--rose))",borderRadius:2,transition:"width 0.3s",boxShadow:`0 0 8px ${u>50?"var(--emerald)":u>20?"var(--amber)":"var(--rose)"}`}})}),B.jsxs("div",{style:{fontSize:10,marginTop:2,color:f,fontWeight:500},children:["Context: ",u,"%"]})]}),c&&c.progress.total>0&&B.jsxs("div",{style:{marginBottom:8},children:[B.jsx("div",{style:{height:4,background:"rgba(255,255,255,0.05)",borderRadius:2,overflow:"hidden"},children:B.jsx("div",{style:{height:"100%",width:`${c.progress.percentage}%`,background:"var(--accent)",borderRadius:2,transition:"width 0.3s"}})}),B.jsxs("div",{style:{fontSize:10,marginTop:2,color:"var(--accent)",fontWeight:500},children:["Todo: ",c.progress.completed,"/",c.progress.total,c.progress.inProgress>0&&` (${c.progress.inProgress} active)`]})]})]})]}),B.jsx("main",{style:{flex:1,overflow:"auto",background:"var(--bg-primary)"},children:B.jsx(m3,{})})]})}function y2(){const[e,t]=O.useState(!1),[i,a]=O.useState(!1),[s,l]=O.useState(""),[c,h]=O.useState(null),u=O.useRef(null),f=O.useRef(null),p=O.useRef([]),g=O.useRef(null),x=O.useRef(null),m=O.useRef(null),v=O.useRef(""),C=O.useCallback(()=>{const U=v.current;return U?(v.current="",U):""},[]),k=O.useRef({ttsProvider:"edge",ttsVoice:"zh-CN-XiaoxiaoNeural",ttsRate:"+0%"}),T=O.useCallback(U=>{k.current={...k.current,...U}},[]),_=O.useCallback(async()=>{try{h(null),l(""),v.current="";const U=window.SpeechRecognition||window.webkitSpeechRecognition;if(U){const R=new U;R.continuous=!0,R.interimResults=!0,R.lang="zh-CN",R.onresult=V=>{let Y="",G="";for(let et=V.resultIndex;et<V.results.length;et++)V.results[et].isFinal?Y+=V.results[et][0].transcript:G+=V.results[et][0].transcript;Y&&(v.current+=Y),l(v.current+G)},R.onerror=V=>{console.error("[useVoice] Speech recognition error:",V.error),V.error==="not-allowed"?h("Microphone access denied"):V.error!=="aborted"&&h(`Speech recognition error: ${V.error}`),t(!1),m.current=null},R.onend=()=>{if(m.current)try{R.start()}catch{}},m.current=R,R.start(),t(!0)}else{const R=await navigator.mediaDevices.getUserMedia({audio:!0});f.current=R;const V=new MediaRecorder(R,{mimeType:MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm"});u.current=V,p.current=[],V.ondataavailable=G=>{G.data.size>0&&p.current.push(G.data)},V.start(1e3);const Y=setInterval(async()=>{if(p.current.length===0)return;const G=new Blob(p.current,{type:"audio/webm"});p.current=[];try{const et=await G.arrayBuffer(),J=new Uint8Array(et);let q="";for(let H=0;H<J.byteLength;H++)q+=String.fromCharCode(J[H]);const j=window.btoa(q),A=await jt.transcribeAudio(j);A.text&&l(H=>H?H+" "+A.text:A.text)}catch{}},5e3);V._chunkTimer=Y,t(!0)}}catch(U){h(U instanceof Error?U.message:"Failed to start recording")}},[]),E=O.useCallback(()=>{if(m.current){const R=m.current;m.current=null;try{R.stop()}catch{}}const U=u.current;if(U&&U.state!=="inactive"){const R=U._chunkTimer;R&&clearInterval(R),U.stop()}f.current&&(f.current.getTracks().forEach(R=>R.stop()),f.current=null),u.current=null,t(!1)},[]),F=O.useCallback(()=>{g.current&&(window.speechSynthesis.cancel(),g.current=null),x.current&&(x.current.pause(),x.current.src="",x.current=null),a(!1)},[]),D=O.useCallback(async U=>{F();const R=k.current;if(R.ttsProvider==="edge")try{const Y=await jt.synthesizeAudio(U,{voice:R.ttsVoice,rate:R.ttsRate}),G=new Blob([Y],{type:"audio/mpeg"}),et=URL.createObjectURL(G),J=new Audio(et);x.current=J,a(!0),J.onended=()=>{a(!1),URL.revokeObjectURL(et),x.current=null},J.onerror=()=>{a(!1),URL.revokeObjectURL(et),x.current=null},await J.play();return}catch(Y){console.warn("[useVoice] Edge TTS failed, falling back to browser:",Y)}if(!("speechSynthesis"in window)){h("Speech not supported in this browser");return}const V=new SpeechSynthesisUtterance(U);if(g.current=V,R.ttsRate){const Y=parseFloat(R.ttsRate);isNaN(Y)||(V.rate=Y)}V.onend=()=>{a(!1),g.current=null},V.onerror=()=>{a(!1),g.current=null},a(!0),window.speechSynthesis.speak(V)},[F]),N=O.useCallback(()=>l(""),[]);return{isRecording:e,isPlaying:i,transcript:s,error:c,startRecording:_,stopRecording:E,speak:D,stopSpeaking:F,clearTranscript:N,drainFinalized:C,updateSettings:T}}function rM(e){const{getMessageCache:t,setMessageCache:i,clearMessageCache:a,refreshStatus:s}=xd(),l=e??"__default__",[c,h]=O.useState(()=>t(l)),[u,f]=O.useState(!1),[p,g]=O.useState(!1),[x,m]=O.useState(null),[v,C]=O.useState([]),[k,T]=O.useState(null),_=O.useRef(null),E=O.useRef(null),F=O.useRef(l),D=O.useRef(new Set),N=G=>{if(G.includes(`
|
|
65
|
+
`))return G;let et=G;return et=et.replace(/(#{1,6})([^\s#\n\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,"$1 $2"),et=et.replace(/(-)(?=[^\s\-])/g,"$1 "),et=et.replace(/([^\n])(#{1,6}\s)/g,`$1
|
|
66
|
+
|
|
67
|
+
$2`),et=et.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
|
|
68
|
+
`),et=et.replace(/([^\n])(- (?!-))/g,`$1
|
|
69
|
+
$2`),et=et.replace(/([^\n])(\d+\.\s)/g,`$1
|
|
70
|
+
$2`),et=et.replace(/([^\n])(```|~~~)/g,`$1
|
|
71
|
+
$2`),et=et.replace(/([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,`$1
|
|
72
|
+
$2`),et},U=G=>{var q;const et=[];let J=null;for(const j of G)if(j.role!=="system"){if(j.role==="user")J&&(et.push(J),J=null),et.push({id:j.id,role:"user",content:j.content??"",timestamp:j.timestamp});else if(j.role==="assistant")J&&et.push(J),J={id:j.id,role:"assistant",content:N(j.content??""),reasoning:void 0,toolCalls:((q=j.toolCalls)==null?void 0:q.map(A=>{var H,z,$;return{id:A.id??"",name:((H=A.function)==null?void 0:H.name)??A.name??"",argsPreview:typeof((z=A.function)==null?void 0:z.arguments)=="string"?A.function.arguments:JSON.stringify((($=A.function)==null?void 0:$.arguments)??A.args??""),riskLevel:"safe"}}))??[],timestamp:j.timestamp};else if(j.role==="tool"&&J){const A=j.toolCallId;if(A&&J.toolCalls){const H=J.toolCalls.find(z=>z.id===A);H&&(H.result=j.content??void 0,H.success=!0)}}}return J&&et.push(J),et};O.useEffect(()=>{if(!e)return;(async()=>{const et=t(l);if(et.length>0){l!==F.current&&(F.current=l,h(et),m(null),C([]),T(null));return}if(!D.current.has(e)){D.current.add(e),g(!0);try{const J=await jt.fetchMessages(e);if(J.length>0){const q=U(J);h(q),i(l,q)}}catch{}g(!1)}})()},[l,e,t,i]),O.useEffect(()=>{if(l!==F.current){F.current=l;const G=t(l);h(G),m(null),C([]),T(null)}},[l,t]),O.useEffect(()=>{i(l,c)},[c,l,i]);const R=O.useCallback(async G=>{if(!G.trim()||u)return;m(null),C([]),T({phase:"thinking",text:"Thinking...",startTime:Date.now()});const et=new AbortController;E.current=et;const J={id:`user_${Date.now()}`,role:"user",content:G,timestamp:Date.now()};h(H=>[...H,J]);const q=`asst_${Date.now()}`;_.current=q;const j={id:q,role:"assistant",content:"",isStreaming:!0,timestamp:Date.now()};h(H=>[...H,j]),f(!0);const A=()=>{f(!1),T(null),C([]),E.current=null};try{const H=[...c,J].map(z=>({role:z.role,content:z.content}));await jt.chatCompletions({messages:H,stream:!0,chatId:e,signal:et.signal,onChunk:z=>{if(z.type==="stream.content"){const $=z.payload.content??"";h(Q=>Q.map(I=>I.id===q?{...I,content:I.content+$}:I)),T({phase:"generating",text:"Generating...",startTime:Date.now()})}else if(z.type==="stream.reasoning"){const $=z.payload.content??"";h(Q=>Q.map(I=>I.id===q?{...I,reasoning:(I.reasoning??"")+$}:I)),T(Q=>(Q==null?void 0:Q.phase)!=="tool_calling"?{phase:"thinking",text:"Thinking...",startTime:(Q==null?void 0:Q.startTime)??Date.now()}:Q)}else if(z.type==="stream.tool_call"){const $=z.payload;h(Q=>Q.map(I=>I.id===q?{...I,toolCalls:[...I.toolCalls??[],{id:$.toolCallId,name:$.toolName,argsPreview:$.argsPreview,riskLevel:$.riskLevel}]}:I)),T({phase:"tool_calling",text:`Calling ${$.toolName}...`,startTime:Date.now()})}else if(z.type==="stream.error"){const $=z.payload.content??"Error";m($)}},onToolResult:z=>{h($=>$.map(Q=>{var I;return Q.id===q?{...Q,toolCalls:(I=Q.toolCalls)==null?void 0:I.map(it=>it.id===z.toolCallId||it.name===z.toolName?{...it,result:z.stdout||z.result||z.stderr||"",stdout:z.stdout??void 0,stderr:z.stderr??void 0,success:z.success,duration:z.duration}:it)}:Q}))},onStatus:z=>{z.toolName?T({phase:"tool_calling",text:`${z.toolName}: ${z.content}`,startTime:Date.now()}):T({phase:"thinking",text:z.content,startTime:Date.now()})},onSubagent:z=>{const $=z,Q=$.type,I=$.subAgentId;Q==="started"?(C(it=>[...it,{id:I,name:$.subAgentName??$.name??"SubAgent",task:$.task??"",status:"running",toolCount:0,lines:[],startTime:Date.now()}]),T({phase:"tool_calling",text:`SubAgent: ${$.subAgentName??$.name??"running"}...`,startTime:Date.now()})):Q==="tool_use"?C(it=>it.map(ut=>ut.id===I?{...ut,toolCount:ut.toolCount+1,lines:[...ut.lines,`🔧 ${$.toolName??"tool"}`]}:ut)):Q==="tool_result"?C(it=>it.map(ut=>ut.id===I?{...ut,lines:[...ut.lines,`✓ ${$.toolName??"tool"} (${$.duration??0}ms)`]}:ut)):Q==="completed"&&C([])},onDone:()=>{h(z=>z.map($=>$.id===q?{...$,isStreaming:!1}:$)),A(),s()},onError:z=>{m(z),h($=>$.map(Q=>Q.id===q?{...Q,isStreaming:!1,content:`Error: ${z}`}:Q)),A()}})}catch(H){if(H instanceof Error&&H.name==="AbortError"){h($=>$.map(Q=>Q.id===q?{...Q,isStreaming:!1}:Q)),A();return}const z=H instanceof Error?H.message:String(H);m(z),A()}},[c,u,e]),V=O.useCallback(()=>{h([]),a(l),m(null),C([]),T(null)},[l,a]),Y=O.useCallback(async()=>{E.current&&E.current.abort();try{await jt.abort()}catch{}},[]);return{messages:c,isLoading:u,isHistoryLoading:p,error:x,sendMessage:R,clearMessages:V,abortChat:Y,subAgents:v,thinkingStatus:k}}function aM(){const[e,t]=O.useState([]),[i,a]=O.useState(!1),s=O.useCallback(async()=>{a(!0);try{const g=await jt.listSessions();t(g)}catch{}a(!1)},[]),l=O.useCallback(async(g,x)=>{const m=await jt.createSession(g,x);return t(v=>[...v,m]),await s(),m},[s]),c=O.useCallback(async g=>{t(x=>x.filter(m=>m.id!==g));try{await jt.deleteSession(g)}catch(x){const m=await jt.listSessions();throw t(m),x}},[]),h=O.useCallback(async()=>{t([]);try{return(await jt.deleteAllSessions()).deletedCount}catch(g){const x=await jt.listSessions();throw t(x),g}},[]),u=O.useCallback(async g=>{await jt.clearSession(g)},[]),f=O.useCallback(async(g,x)=>{await jt.renameSession(g,x),t(m=>m.map(v=>v.id===g?{...v,name:x}:v))},[]),p=O.useCallback(async g=>{await jt.activateSession(g)},[]);return{sessions:e,isLoading:i,fetchSessions:s,createSession:l,deleteSession:c,deleteAllSessions:h,clearSession:u,renameSession:f,activateSession:p}}function Um(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var cs=Um();function x2(e){cs=e}var Gn={exec:()=>null};function Js(e){let t=[];return i=>{let a=Math.max(0,Math.min(3,i-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function re(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(gi.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var nM=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),gi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Js(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Js(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Js(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Js(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Js(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Js(e=>new RegExp(`^ {0,${e}}>`))},sM=/^(?:[ \t]*(?:\n|$))+/,lM=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pm=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,b2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C2=re(b2).replace(/bull/g,Pm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),hM=re(b2).replace(/bull/g,Pm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Wm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uM=/^[^\n]+/,Ym=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dM=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ym).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fM=re(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pm).getRegex(),bd="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pM=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Gm).replace("tag",bd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v2=re(Wm).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex(),gM=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v2).getRegex(),Xm={blockquote:gM,code:lM,def:dM,fences:oM,heading:cM,hr:Lc,html:pM,lheading:C2,list:fM,newline:sM,paragraph:v2,table:Gn,text:uM},eC=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex(),mM={...Xm,lheading:hM,table:eC,paragraph:re(Wm).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",eC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex()},yM={...Xm,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Wm).replace("hr",Lc).replace("heading",` *#{1,6} *[^
|
|
73
|
+
]`).replace("lheading",C2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,k2=/^( {2,}|\\)\n(?!\s*$)/,CM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Il=/[\p{P}\p{S}]/u,Cd=/[\s\p{P}\p{S}]/u,Vm=/[^\s\p{P}\p{S}]/u,vM=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Cd).getRegex(),S2=/(?!~)[\p{P}\p{S}]/u,kM=/(?!~)[\s\p{P}\p{S}]/u,SM=/(?:[^\s\p{P}\p{S}]|~)/u,TM=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",nM?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),T2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wM=re(T2,"u").replace(/punct/g,Il).getRegex(),_M=re(T2,"u").replace(/punct/g,S2).getRegex(),w2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BM=re(w2,"gu").replace(/notPunctSpace/g,Vm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),EM=re(w2,"gu").replace(/notPunctSpace/g,SM).replace(/punctSpace/g,kM).replace(/punct/g,S2).getRegex(),LM=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),AM=re(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Il).getRegex(),MM="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",RM=re(MM,"gu").replace(/notPunctSpace/g,Vm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),FM=re(/\\(punct)/,"gu").replace(/punct/g,Il).getRegex(),OM=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),DM=re(Gm).replace("(?:-->|$)","-->").getRegex(),$M=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",DM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Du=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,zM=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Du).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_2=re(/^!?\[(label)\]\[(ref)\]/).replace("label",Du).replace("ref",Ym).getRegex(),B2=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ym).getRegex(),NM=re("reflink|nolink(?!\\()","g").replace("reflink",_2).replace("nolink",B2).getRegex(),iC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zm={_backpedal:Gn,anyPunctuation:FM,autolink:OM,blockSkip:TM,br:k2,code:bM,del:Gn,delLDelim:Gn,delRDelim:Gn,emStrongLDelim:wM,emStrongRDelimAst:BM,emStrongRDelimUnd:LM,escape:xM,link:zM,nolink:B2,punctuation:vM,reflink:_2,reflinkSearch:NM,tag:$M,text:CM,url:Gn},qM={...Zm,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",Du).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Du).getRegex()},Lg={...Zm,emStrongRDelimAst:EM,emStrongLDelim:_M,delLDelim:AM,delRDelim:RM,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",iC).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",iC).getRegex()},IM={...Lg,br:re(k2).replace("{2,}","*").getRegex(),text:re(Lg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},iu={normal:Xm,gfm:mM,pedantic:yM},Ho={normal:Zm,gfm:Lg,breaks:IM,pedantic:qM},jM={"&":"&","<":"<",">":">",'"':""","'":"'"},rC=e=>jM[e];function Hr(e,t){if(t){if(gi.escapeTest.test(e))return e.replace(gi.escapeReplace,rC)}else if(gi.escapeTestNoEncode.test(e))return e.replace(gi.escapeReplaceNoEncode,rC);return e}function aC(e){try{e=encodeURI(e).replace(gi.percentDecode,"%")}catch{return null}return e}function nC(e,t){var l;let i=e.replace(gi.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(gi.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(gi.slashPipe,"|");return a}function dn(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function sC(e){let t=e.split(`
|
|
74
|
+
`),i=t.length-1;for(;i>=0&&gi.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join(`
|
|
75
|
+
`)}function HM(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function UM(e,t=0){let i=t,a="";for(let s of e)if(s===" "){let l=4-i%4;a+=" ".repeat(l),i+=l}else a+=s,i++;return a}function lC(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,u}function PM(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
|
|
76
|
+
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
|
|
77
|
+
`)}var $u=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||cs}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=this.options.pedantic?i[0]:sC(i[0]),s=a.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a,codeBlockStyle:"indented",text:s}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=PM(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=dn(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:dn(i[0],`
|
|
78
|
+
`),depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:dn(i[0],`
|
|
79
|
+
`)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=dn(i[0],`
|
|
80
|
+
`).split(`
|
|
81
|
+
`),s="",l="",c=[];for(;a.length>0;){let h=!1,u=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))u.push(a[f]),h=!0;else if(!h)u.push(a[f]);else break;a=a.slice(f);let p=u.join(`
|
|
82
|
+
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
83
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
84
|
+
${p}`:p,l=l?`${l}
|
|
85
|
+
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,a.length===0)break;let m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let v=m,C=v.raw+`
|
|
86
|
+
`+a.join(`
|
|
87
|
+
`),k=this.blockquote(C);c[c.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,l=l.substring(0,l.length-v.text.length)+k.text;break}else if((m==null?void 0:m.type)==="list"){let v=m,C=v.raw+`
|
|
88
|
+
`+a.join(`
|
|
89
|
+
`),k=this.list(C);c[c.length-1]=k,s=s.substring(0,s.length-m.raw.length)+k.raw,l=l.substring(0,l.length-v.raw.length)+k.raw,a=C.substring(c.at(-1).raw.length).split(`
|
|
90
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=UM(i[2].split(`
|
|
91
|
+
`,1)[0],i[1].length),m=t.split(`
|
|
92
|
+
`,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=i[1].length+1:(C=x.search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=i[1].length),v&&this.rules.other.blankLine.test(m)&&(p+=m+`
|
|
93
|
+
`,t=t.substring(m.length+1),f=!0),!f){let k=this.rules.other.nextBulletRegex(C),T=this.rules.other.hrRegex(C),_=this.rules.other.fencesBeginRegex(C),E=this.rules.other.headingBeginRegex(C),F=this.rules.other.htmlBeginRegex(C),D=this.rules.other.blockquoteBeginRegex(C);for(;t;){let N=t.split(`
|
|
94
|
+
`,1)[0],U;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),U=m):U=m.replace(this.rules.other.tabCharGlobal," "),_.test(m)||E.test(m)||F.test(m)||D.test(m)||k.test(m)||T.test(m))break;if(U.search(this.rules.other.nonSpaceChar)>=C||!m.trim())g+=`
|
|
95
|
+
`+U.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(x)||E.test(x)||T.test(x))break;g+=`
|
|
96
|
+
`+m}v=!m.trim(),p+=N+`
|
|
97
|
+
`,t=t.substring(N.length+1),x=U.slice(C)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),l.raw+=p}let u=l.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f of l.items){this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]);let p=f.tokens[0];if(f.task&&((p==null?void 0:p.type)==="text"||(p==null?void 0:p.type)==="paragraph")){f.text=f.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let x=this.lexer.inlineQueue.length-1;x>=0;x--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)){this.lexer.inlineQueue[x].src=this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask,"");break}let g=this.rules.other.listTaskCheckbox.exec(f.raw);if(g){let x={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};f.checked=x.checked,l.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=x.raw+f.tokens[0].raw,f.tokens[0].text=x.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(x)):f.tokens.unshift({type:"paragraph",raw:x.raw,text:x.raw,tokens:[x]}):f.tokens.unshift(x)}}else f.task&&(f.task=!1);if(!l.loose){let g=f.tokens.filter(m=>m.type==="space"),x=g.length>0&&g.some(m=>this.rules.other.anyLine.test(m.raw));l.loose=x}}if(l.loose)for(let f of l.items){f.loose=!0;for(let p of f.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(t){let i=this.rules.block.html.exec(t);if(i){let a=sC(i[0]);return{type:"html",block:!0,raw:a,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:a}}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:dn(i[0],`
|
|
98
|
+
`),href:s,title:l}}}table(t){var h;let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=nC(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
99
|
+
`):[],c={type:"table",raw:dn(i[0],`
|
|
100
|
+
`),header:[],align:[],rows:[]};if(a.length===s.length){for(let u of s)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<a.length;u++)c.header.push({text:a[u],tokens:this.lexer.inline(a[u]),header:!0,align:c.align[u]});for(let u of l)c.rows.push(nC(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i){let a=i[1].trim();return{type:"heading",raw:dn(i[0],`
|
|
101
|
+
`),depth:i[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
|
|
102
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=dn(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=HM(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),lC(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return lC(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){u+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t,i,a=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=this.rules.inline.delRDelim;for(f.lastIndex=0,i=i.slice(-1*t.length+l);(s=f.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c||(h=[...c].length,h!==l))continue;if(s[3]||s[4]){u+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u);let p=[...s[0]][0].length,g=t.slice(0,l+s.index+p+h),x=g.slice(l,-l);return{type:"del",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let s,l;if(i[2]==="@")s=i[0],l="mailto:"+s;else{let c;do c=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(c!==i[0]);s=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},vr=class Ag{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"inlineQueue");Lt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||cs,this.options.tokenizer=this.options.tokenizer||new $u,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:gi,block:iu.normal,inline:Ho.normal};this.options.pedantic?(i.block=iu.pedantic,i.inline=Ho.pedantic):this.options.gfm&&(i.block=iu.gfm,this.options.breaks?i.inline=Ho.breaks:i.inline=Ho.gfm),this.tokenizer.rules=i}static get rules(){return{block:iu,inline:Ho}}static lex(t,i){return new Ag(i).lex(t)}static lexInline(t,i){return new Ag(i).inlineTokens(t)}lex(t){t=t.replace(gi.carriageReturn,`
|
|
103
|
+
`),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var l,c,h;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(gi.tabCharGlobal," ").replace(gi.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let u;if((c=(l=this.options.extensions)==null?void 0:l.block)!=null&&c.some(p=>(u=p.call({lexer:this},t,i))?(t=t.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);let p=i.at(-1);u.raw.length===1&&p!==void 0?p.raw+=`
|
|
104
|
+
`:i.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
105
|
+
`)?"":`
|
|
106
|
+
`)+u.raw,p.text+=`
|
|
107
|
+
`+u.text,this.inlineQueue.at(-1).src=p.text):i.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
108
|
+
`)?"":`
|
|
109
|
+
`)+u.raw,p.text+=`
|
|
110
|
+
`+u.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},i.push(u));continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),i.push(u);continue}let f=t;if((h=this.options.extensions)!=null&&h.startBlock){let p=1/0,g=t.slice(1),x;this.options.extensions.startBlock.forEach(m=>{x=m.call({lexer:this},g),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(this.state.top&&(u=this.tokenizer.paragraph(f))){let p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
|
|
111
|
+
`)?"":`
|
|
112
|
+
`)+u.raw,p.text+=`
|
|
113
|
+
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(u),a=f.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
114
|
+
`)?"":`
|
|
115
|
+
`)+u.raw,p.text+=`
|
|
116
|
+
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(u);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var f,p,g,x,m;this.tokenizer.lexer=this;let a=t,s=null;if(this.tokens.links){let v=Object.keys(this.tokens.links);if(v.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)v.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},a))??a;let c=!1,h="",u=1/0;for(;t;){if(t.length<u)u=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let v;if((x=(g=this.options.extensions)==null?void 0:g.inline)!=null&&x.some(k=>(v=k.call({lexer:this},t,i))?(t=t.substring(v.raw.length),i.push(v),!0):!1))continue;if(v=this.tokenizer.escape(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.tag(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.link(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(v.raw.length);let k=i.at(-1);v.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=v.raw,k.text+=v.text):i.push(v);continue}if(v=this.tokenizer.emStrong(t,a,h)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.codespan(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.br(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.del(t,a,h)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.autolink(t)){t=t.substring(v.raw.length),i.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(t))){t=t.substring(v.raw.length),i.push(v);continue}let C=t;if((m=this.options.extensions)!=null&&m.startInline){let k=1/0,T=t.slice(1),_;this.options.extensions.startInline.forEach(E=>{_=E.call({lexer:this},T),typeof _=="number"&&_>=0&&(k=Math.min(k,_))}),k<1/0&&k>=0&&(C=t.substring(0,k+1))}if(v=this.tokenizer.inlineText(C)){t=t.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(h=v.raw.slice(-1)),c=!0;let k=i.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=v.raw,k.text+=v.text):i.push(v);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return i}infiniteLoopError(t){let i="Infinite loop on byte: "+t;if(this.options.silent)console.error(i);else throw new Error(i)}},zu=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||cs}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let s=(c=(i||"").match(gi.notSpaceStart))==null?void 0:c[0],l=t.replace(gi.endingNewline,"")+`
|
|
117
|
+
`;return s?'<pre><code class="language-'+Hr(s)+'">'+(a?l:Hr(l,!0))+`</code></pre>
|
|
118
|
+
`:"<pre><code>"+(a?l:Hr(l,!0))+`</code></pre>
|
|
119
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
120
|
+
${this.parser.parse(t)}</blockquote>
|
|
121
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
|
|
122
|
+
`}hr(t){return`<hr>
|
|
123
|
+
`}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let u=t.items[h];s+=this.listitem(u)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
|
|
124
|
+
`+s+"</"+l+`>
|
|
125
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
126
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
127
|
+
`}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
128
|
+
<thead>
|
|
129
|
+
`+i+`</thead>
|
|
130
|
+
`+s+`</table>
|
|
131
|
+
`}tablerow({text:t}){return`<tr>
|
|
132
|
+
${t}</tr>
|
|
133
|
+
`}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
|
|
134
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Hr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=aC(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Hr(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=aC(t);if(l===null)return Hr(a);t=l;let c=`<img src="${t}" alt="${Hr(a)}"`;return i&&(c+=` title="${Hr(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Hr(t.text)}},Qm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},kr=class Mg{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||cs,this.options.renderer=this.options.renderer||new zu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Qm}static parse(t,i){return new Mg(i).parse(t)}static parseInline(t,i){return new Mg(i).parseInline(t)}parse(t){var a,s;this.renderer.parser=this;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[c.type]){let u=c,f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){i+=f||"";continue}}let h=c;switch(h.type){case"space":{i+=this.renderer.space(h);break}case"hr":{i+=this.renderer.hr(h);break}case"heading":{i+=this.renderer.heading(h);break}case"code":{i+=this.renderer.code(h);break}case"table":{i+=this.renderer.table(h);break}case"blockquote":{i+=this.renderer.blockquote(h);break}case"list":{i+=this.renderer.list(h);break}case"checkbox":{i+=this.renderer.checkbox(h);break}case"html":{i+=this.renderer.html(h);break}case"def":{i+=this.renderer.def(h);break}case"paragraph":{i+=this.renderer.paragraph(h);break}case"text":{i+=this.renderer.text(h);break}default:{let u='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return i}parseInline(t,i=this.renderer){var s,l;this.renderer.parser=this;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=f||"";continue}}let u=h;switch(u.type){case"escape":{a+=i.text(u);break}case"html":{a+=i.html(u);break}case"link":{a+=i.link(u);break}case"image":{a+=i.image(u);break}case"checkbox":{a+=i.checkbox(u);break}case"strong":{a+=i.strong(u);break}case"em":{a+=i.em(u);break}case"codespan":{a+=i.codespan(u);break}case"br":{a+=i.br(u);break}case"del":{a+=i.del(u);break}case"text":{a+=i.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},gu,Ko=(gu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||cs}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?vr.lex:vr.lexInline}provideParser(t=this.block){return t?kr.parse:kr.parseInline}},Lt(gu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(gu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),gu),WM=class{constructor(...t){Lt(this,"defaults",Um());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",kr);Lt(this,"Renderer",zu);Lt(this,"TextRenderer",Qm);Lt(this,"Lexer",vr);Lt(this,"Tokenizer",$u);Lt(this,"Hooks",Ko);this.use(...t)}walkTokens(t,i){var s,l;let a=[];for(let c of t)switch(a=a.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)a=a.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let f of u)a=a.concat(this.walkTokens(f.tokens,i));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,i));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);a=a.concat(this.walkTokens(f,i))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let u=l.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new zu(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new $u(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new Ko;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=a.hooks[h],f=l[h];Ko.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&Ko.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(l,p);return f.call(l,x)})();let g=u.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),l&&(u=u.concat(l.call(this,h))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return vr.lex(t,i??this.defaults)}parser(t,i){return kr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,u=await(l.hooks?await l.hooks.provideLexer(t):t?vr.lex:vr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(u):u;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser(t):t?kr.parse:kr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer(t):t?vr.lex:vr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let u=(l.hooks?l.hooks.provideParser(t):t?kr.parse:kr.parseInline)(h,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
|
|
135
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Hr(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},ts=new WM;function de(e,t){return ts.parse(e,t)}de.options=de.setOptions=function(e){return ts.setOptions(e),de.defaults=ts.defaults,x2(de.defaults),de};de.getDefaults=Um;de.defaults=cs;de.use=function(...e){return ts.use(...e),de.defaults=ts.defaults,x2(de.defaults),de};de.walkTokens=function(e,t){return ts.walkTokens(e,t)};de.parseInline=ts.parseInline;de.Parser=kr;de.parser=kr.parse;de.Renderer=zu;de.TextRenderer=Qm;de.Lexer=vr;de.lexer=vr.lex;de.Tokenizer=$u;de.Hooks=Ko;de.parse=de;de.options;de.setOptions;de.use;de.walkTokens;de.parseInline;kr.parse;vr.lex;const YM="modulepreload",GM=function(e){return"/"+e},oC={},ie=function(t,i,a){let s=Promise.resolve();if(i&&i.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));s=c(i.map(f=>{if(f=GM(f),f in oC)return;oC[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":YM,p||(x.as="script"),x.crossOrigin="",x.href=f,u&&x.setAttribute("nonce",u),document.head.appendChild(x),p)return new Promise((m,v)=>{x.addEventListener("load",m),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return s.then(c=>{for(const h of c||[])h.status==="rejected"&&l(h.reason);return t().catch(l)})};var bu={exports:{}},XM=bu.exports,cC;function VM(){return cC||(cC=1,(function(e,t){(function(i,a){e.exports=a()})(XM,(function(){var i=1e3,a=6e4,s=36e5,l="millisecond",c="second",h="minute",u="hour",f="day",p="week",g="month",x="quarter",m="year",v="date",C="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var j=["th","st","nd","rd"],A=q%100;return"["+q+(j[(A-20)%10]||j[A]||j[0])+"]"}},E=function(q,j,A){var H=String(q);return!H||H.length>=j?q:""+Array(j+1-H.length).join(A)+q},F={s:E,z:function(q){var j=-q.utcOffset(),A=Math.abs(j),H=Math.floor(A/60),z=A%60;return(j<=0?"+":"-")+E(H,2,"0")+":"+E(z,2,"0")},m:function q(j,A){if(j.date()<A.date())return-q(A,j);var H=12*(A.year()-j.year())+(A.month()-j.month()),z=j.clone().add(H,g),$=A-z<0,Q=j.clone().add(H+($?-1:1),g);return+(-(H+(A-z)/($?z-Q:Q-z))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:g,y:m,w:p,d:f,D:v,h:u,m:h,s:c,ms:l,Q:x}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},D="en",N={};N[D]=_;var U="$isDayjsObject",R=function(q){return q instanceof et||!(!q||!q[U])},V=function q(j,A,H){var z;if(!j)return D;if(typeof j=="string"){var $=j.toLowerCase();N[$]&&(z=$),A&&(N[$]=A,z=$);var Q=j.split("-");if(!z&&Q.length>1)return q(Q[0])}else{var I=j.name;N[I]=j,z=I}return!H&&z&&(D=z),z||!H&&D},Y=function(q,j){if(R(q))return q.clone();var A=typeof j=="object"?j:{};return A.date=q,A.args=arguments,new et(A)},G=F;G.l=V,G.i=R,G.w=function(q,j){return Y(q,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var et=(function(){function q(A){this.$L=V(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[U]=!0}var j=q.prototype;return j.parse=function(A){this.$d=(function(H){var z=H.date,$=H.utc;if(z===null)return new Date(NaN);if(G.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var Q=z.match(k);if(Q){var I=Q[2]-1||0,it=(Q[7]||"0").substring(0,3);return $?new Date(Date.UTC(Q[1],I,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,it)):new Date(Q[1],I,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,it)}}return new Date(z)})(A),this.init()},j.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},j.$utils=function(){return G},j.isValid=function(){return this.$d.toString()!==C},j.isSame=function(A,H){var z=Y(A);return this.startOf(H)<=z&&z<=this.endOf(H)},j.isAfter=function(A,H){return Y(A)<this.startOf(H)},j.isBefore=function(A,H){return this.endOf(H)<Y(A)},j.$g=function(A,H,z){return G.u(A)?this[H]:this.set(z,A)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(A,H){var z=this,$=!!G.u(H)||H,Q=G.p(A),I=function(Pt,W){var ct=G.w(z.$u?Date.UTC(z.$y,W,Pt):new Date(z.$y,W,Pt),z);return $?ct:ct.endOf(f)},it=function(Pt,W){return G.w(z.toDate()[Pt].apply(z.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(W)),z)},ut=this.$W,dt=this.$M,yt=this.$D,xt="set"+(this.$u?"UTC":"");switch(Q){case m:return $?I(1,0):I(31,11);case g:return $?I(1,dt):I(0,dt+1);case p:var Rt=this.$locale().weekStart||0,Ot=(ut<Rt?ut+7:ut)-Rt;return I($?yt-Ot:yt+(6-Ot),dt);case f:case v:return it(xt+"Hours",0);case u:return it(xt+"Minutes",1);case h:return it(xt+"Seconds",2);case c:return it(xt+"Milliseconds",3);default:return this.clone()}},j.endOf=function(A){return this.startOf(A,!1)},j.$set=function(A,H){var z,$=G.p(A),Q="set"+(this.$u?"UTC":""),I=(z={},z[f]=Q+"Date",z[v]=Q+"Date",z[g]=Q+"Month",z[m]=Q+"FullYear",z[u]=Q+"Hours",z[h]=Q+"Minutes",z[c]=Q+"Seconds",z[l]=Q+"Milliseconds",z)[$],it=$===f?this.$D+(H-this.$W):H;if($===g||$===m){var ut=this.clone().set(v,1);ut.$d[I](it),ut.init(),this.$d=ut.set(v,Math.min(this.$D,ut.daysInMonth())).$d}else I&&this.$d[I](it);return this.init(),this},j.set=function(A,H){return this.clone().$set(A,H)},j.get=function(A){return this[G.p(A)]()},j.add=function(A,H){var z,$=this;A=Number(A);var Q=G.p(H),I=function(dt){var yt=Y($);return G.w(yt.date(yt.date()+Math.round(dt*A)),$)};if(Q===g)return this.set(g,this.$M+A);if(Q===m)return this.set(m,this.$y+A);if(Q===f)return I(1);if(Q===p)return I(7);var it=(z={},z[h]=a,z[u]=s,z[c]=i,z)[Q]||1,ut=this.$d.getTime()+A*it;return G.w(ut,this)},j.subtract=function(A,H){return this.add(-1*A,H)},j.format=function(A){var H=this,z=this.$locale();if(!this.isValid())return z.invalidDate||C;var $=A||"YYYY-MM-DDTHH:mm:ssZ",Q=G.z(this),I=this.$H,it=this.$m,ut=this.$M,dt=z.weekdays,yt=z.months,xt=z.meridiem,Rt=function(W,ct,Ct,Ft){return W&&(W[ct]||W(H,$))||Ct[ct].slice(0,Ft)},Ot=function(W){return G.s(I%12||12,W,"0")},Pt=xt||function(W,ct,Ct){var Ft=W<12?"AM":"PM";return Ct?Ft.toLowerCase():Ft};return $.replace(T,(function(W,ct){return ct||(function(Ct){switch(Ct){case"YY":return String(H.$y).slice(-2);case"YYYY":return G.s(H.$y,4,"0");case"M":return ut+1;case"MM":return G.s(ut+1,2,"0");case"MMM":return Rt(z.monthsShort,ut,yt,3);case"MMMM":return Rt(yt,ut);case"D":return H.$D;case"DD":return G.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return Rt(z.weekdaysMin,H.$W,dt,2);case"ddd":return Rt(z.weekdaysShort,H.$W,dt,3);case"dddd":return dt[H.$W];case"H":return String(I);case"HH":return G.s(I,2,"0");case"h":return Ot(1);case"hh":return Ot(2);case"a":return Pt(I,it,!0);case"A":return Pt(I,it,!1);case"m":return String(it);case"mm":return G.s(it,2,"0");case"s":return String(H.$s);case"ss":return G.s(H.$s,2,"0");case"SSS":return G.s(H.$ms,3,"0");case"Z":return Q}return null})(W)||Q.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(A,H,z){var $,Q=this,I=G.p(H),it=Y(A),ut=(it.utcOffset()-this.utcOffset())*a,dt=this-it,yt=function(){return G.m(Q,it)};switch(I){case m:$=yt()/12;break;case g:$=yt();break;case x:$=yt()/3;break;case p:$=(dt-ut)/6048e5;break;case f:$=(dt-ut)/864e5;break;case u:$=dt/s;break;case h:$=dt/a;break;case c:$=dt/i;break;default:$=dt}return z?$:G.a($)},j.daysInMonth=function(){return this.endOf(g).$D},j.$locale=function(){return N[this.$L]},j.locale=function(A,H){if(!A)return this.$L;var z=this.clone(),$=V(A,H,!0);return $&&(z.$L=$),z},j.clone=function(){return G.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},q})(),J=et.prototype;return Y.prototype=J,[["$ms",l],["$s",c],["$m",h],["$H",u],["$W",f],["$M",g],["$y",m],["$D",v]].forEach((function(q){J[q[1]]=function(j){return this.$g(j,q[0],q[1])}})),Y.extend=function(q,j){return q.$i||(q(j,et,Y),q.$i=!0),Y},Y.locale=V,Y.isDayjs=R,Y.unix=function(q){return Y(1e3*q)},Y.en=N[D],Y.Ls=N,Y.p={},Y}))})(bu)),bu.exports}var ZM=VM();const QM=Fm(ZM);var E2=Object.defineProperty,S=(e,t)=>E2(e,"name",{value:t,configurable:!0}),KM=(e,t)=>{for(var i in t)E2(e,i,{get:t[i],enumerable:!0})},ba={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},mt={trace:S((...e)=>{},"trace"),debug:S((...e)=>{},"debug"),info:S((...e)=>{},"info"),warn:S((...e)=>{},"warn"),error:S((...e)=>{},"error"),fatal:S((...e)=>{},"fatal")},Km=S(function(e="fatal"){let t=ba.fatal;typeof e=="string"?e.toLowerCase()in ba&&(t=ba[e]):typeof e=="number"&&(t=e),mt.trace=()=>{},mt.debug=()=>{},mt.info=()=>{},mt.warn=()=>{},mt.error=()=>{},mt.fatal=()=>{},t<=ba.fatal&&(mt.fatal=console.error?console.error.bind(console,hr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",hr("FATAL"))),t<=ba.error&&(mt.error=console.error?console.error.bind(console,hr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",hr("ERROR"))),t<=ba.warn&&(mt.warn=console.warn?console.warn.bind(console,hr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",hr("WARN"))),t<=ba.info&&(mt.info=console.info?console.info.bind(console,hr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",hr("INFO"))),t<=ba.debug&&(mt.debug=console.debug?console.debug.bind(console,hr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hr("DEBUG"))),t<=ba.trace&&(mt.trace=console.debug?console.debug.bind(console,hr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hr("TRACE")))},"setLogLevel"),hr=S(e=>`%c${QM().format("ss.SSS")} : ${e} : `,"format");const Cu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e),hsl2rgb:({h:e,s:t,l:i},a)=>{if(!t)return i*2.55;e/=360,t/=100,i/=100;const s=i<.5?i*(1+t):i+t-i*t,l=2*i-s;switch(a){case"r":return Cu.hue2rgb(l,s,e+1/3)*255;case"g":return Cu.hue2rgb(l,s,e)*255;case"b":return Cu.hue2rgb(l,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:i},a)=>{e/=255,t/=255,i/=255;const s=Math.max(e,t,i),l=Math.min(e,t,i),c=(s+l)/2;if(a==="l")return c*100;if(s===l)return 0;const h=s-l,u=c>.5?h/(2-s-l):h/(s+l);if(a==="s")return u*100;switch(s){case e:return((t-i)/h+(t<i?6:0))*60;case t:return((i-e)/h+2)*60;case i:return((e-t)/h+4)*60;default:return-1}}},JM={clamp:(e,t,i)=>t>i?Math.min(t,Math.max(i,e)):Math.min(i,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},t5={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},It={channel:Cu,lang:JM,unit:t5},pn={};for(let e=0;e<=255;e++)pn[e]=It.unit.dec2hex(e);const fi={ALL:0,RGB:1,HSL:2};class e5{constructor(){this.type=fi.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=fi.ALL}is(t){return this.type===t}}class i5{constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new e5}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=fi.ALL,this}_ensureHSL(){const t=this.data,{h:i,s:a,l:s}=t;i===void 0&&(t.h=It.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=It.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=It.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:i,g:a,b:s}=t;i===void 0&&(t.r=It.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=It.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=It.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,i=t.r;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,i=t.g;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,i=t.b;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,i=t.h;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,i=t.s;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,i=t.l;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(fi.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(fi.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(fi.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(fi.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(fi.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(fi.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const vd=new i5({r:0,g:0,b:0,a:0},"transparent"),dl={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(dl.re);if(!t)return;const i=t[1],a=parseInt(i,16),s=i.length,l=s%4===0,c=s>4,h=c?1:17,u=c?8:4,f=l?0:-1,p=c?255:15;return vd.set({r:(a>>u*(f+3)&p)*h,g:(a>>u*(f+2)&p)*h,b:(a>>u*(f+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}${pn[Math.round(s*255)]}`:`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}`}},Xn={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Xn.hueRe);if(t){const[,i,a]=t;switch(a){case"grad":return It.channel.clamp.h(parseFloat(i)*.9);case"rad":return It.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return It.channel.clamp.h(parseFloat(i)*360)}}return It.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const i=e.match(Xn.re);if(!i)return;const[,a,s,l,c,h]=i;return vd.set({h:Xn._hue2deg(a),s:It.channel.clamp.s(parseFloat(s)),l:It.channel.clamp.l(parseFloat(l)),a:c?It.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:i,l:a,a:s}=e;return s<1?`hsla(${It.lang.round(t)}, ${It.lang.round(i)}%, ${It.lang.round(a)}%, ${s})`:`hsl(${It.lang.round(t)}, ${It.lang.round(i)}%, ${It.lang.round(a)}%)`}},oc={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=oc.colors[e];if(t)return dl.parse(t)},stringify:e=>{const t=dl.stringify(e);for(const i in oc.colors)if(oc.colors[i]===t)return i}},Jo={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const i=e.match(Jo.re);if(!i)return;const[,a,s,l,c,h,u,f,p]=i;return vd.set({r:It.channel.clamp.r(s?parseFloat(a)*2.55:parseFloat(a)),g:It.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:It.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:f?It.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`rgba(${It.lang.round(t)}, ${It.lang.round(i)}, ${It.lang.round(a)}, ${It.lang.round(s)})`:`rgb(${It.lang.round(t)}, ${It.lang.round(i)}, ${It.lang.round(a)})`}},Xr={format:{keyword:oc,hex:dl,rgb:Jo,rgba:Jo,hsl:Xn,hsla:Xn},parse:e=>{if(typeof e!="string")return e;const t=dl.parse(e)||Jo.parse(e)||Xn.parse(e)||oc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(fi.HSL)||e.data.r===void 0?Xn.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Jo.stringify(e):dl.stringify(e)},L2=(e,t)=>{const i=Xr.parse(e);for(const a in t)i[a]=It.channel.clamp[a](t[a]);return Xr.stringify(i)},xn=(e,t,i=0,a=1)=>{if(typeof e!="number")return L2(e,{a:t});const s=vd.set({r:It.channel.clamp.r(e),g:It.channel.clamp.g(t),b:It.channel.clamp.b(i),a:It.channel.clamp.a(a)});return Xr.stringify(s)},r5=e=>{const{r:t,g:i,b:a}=Xr.parse(e),s=.2126*It.channel.toLinear(t)+.7152*It.channel.toLinear(i)+.0722*It.channel.toLinear(a);return It.lang.round(s)},a5=e=>r5(e)>=.5,Fr=e=>!a5(e),A2=(e,t,i)=>{const a=Xr.parse(e),s=a[t],l=It.channel.clamp[t](s+i);return s!==l&&(a[t]=l),Xr.stringify(a)},st=(e,t)=>A2(e,"l",t),lt=(e,t)=>A2(e,"l",-t),L=(e,t)=>{const i=Xr.parse(e),a={};for(const s in t)t[s]&&(a[s]=i[s]+t[s]);return L2(e,a)},n5=(e,t,i=50)=>{const{r:a,g:s,b:l,a:c}=Xr.parse(e),{r:h,g:u,b:f,a:p}=Xr.parse(t),g=i/100,x=g*2-1,m=c-p,C=((x*m===-1?x:(x+m)/(1+x*m))+1)/2,k=1-C,T=a*C+h*k,_=s*C+u*k,E=l*C+f*k,F=c*g+p*(1-g);return xn(T,_,E,F)},K=(e,t=100)=>{const i=Xr.parse(e);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,n5(i,e,t)};/*! @license DOMPurify 3.4.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.6/LICENSE */function hC(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function s5(e){if(Array.isArray(e))return e}function l5(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a,s,l,c,h=[],u=!0,f=!1;try{if(l=(i=i.call(e)).next,t!==0)for(;!(u=(a=l.call(i)).done)&&(h.push(a.value),h.length!==t);u=!0);}catch(p){f=!0,s=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw s}}return h}}function o5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c5(e,t){return s5(e)||l5(e,t)||h5(e,t)||o5()}function h5(e,t){if(e){if(typeof e=="string")return hC(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?hC(e,t):void 0}}const M2=Object.entries,uC=Object.setPrototypeOf,u5=Object.isFrozen,d5=Object.getPrototypeOf,f5=Object.getOwnPropertyDescriptor;let Ti=Object.freeze,ur=Object.seal,sl=Object.create,R2=typeof Reflect<"u"&&Reflect,Rg=R2.apply,Fg=R2.construct;Ti||(Ti=function(t){return t});ur||(ur=function(t){return t});Rg||(Rg=function(t,i){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(i,s)});Fg||(Fg=function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return new t(...a)});const tl=We(Array.prototype.forEach),p5=We(Array.prototype.lastIndexOf),dC=We(Array.prototype.pop),el=We(Array.prototype.push),g5=We(Array.prototype.splice),vi=Array.isArray,tc=We(String.prototype.toLowerCase),rg=We(String.prototype.toString),fC=We(String.prototype.match),il=We(String.prototype.replace),pC=We(String.prototype.indexOf),m5=We(String.prototype.trim),y5=We(Number.prototype.toString),x5=We(Boolean.prototype.toString),gC=typeof BigInt>"u"?null:We(BigInt.prototype.toString),mC=typeof Symbol>"u"?null:We(Symbol.prototype.toString),Oe=We(Object.prototype.hasOwnProperty),Uo=We(Object.prototype.toString),si=We(RegExp.prototype.test),Po=b5(TypeError);function We(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return Rg(e,t,a)}}function b5(e){return function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return Fg(e,i)}}function Gt(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tc;if(uC&&uC(e,null),!vi(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=i(s);l!==s&&(u5(t)||(t[a]=l),s=l)}e[s]=!0}return e}function C5(e){for(let t=0;t<e.length;t++)Oe(e,t)||(e[t]=null);return e}function Di(e){const t=sl(null);for(const a of M2(e)){var i=c5(a,2);const s=i[0],l=i[1];Oe(e,s)&&(vi(l)?t[s]=C5(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=Di(l):t[s]=l)}return t}function v5(e){switch(typeof e){case"string":return e;case"number":return y5(e);case"boolean":return x5(e);case"bigint":return gC?gC(e):"0";case"symbol":return mC?mC(e):"Symbol()";case"undefined":return Uo(e);case"function":case"object":{if(e===null)return Uo(e);const t=e,i=Ur(t,"toString");if(typeof i=="function"){const a=i(t);return typeof a=="string"?a:Uo(a)}return Uo(e)}default:return Uo(e)}}function Ur(e,t){for(;e!==null;){const a=f5(e,t);if(a){if(a.get)return We(a.get);if(typeof a.value=="function")return We(a.value)}e=d5(e)}function i(){return null}return i}function k5(e){try{return si(e,""),!0}catch{return!1}}const yC=Ti(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ag=Ti(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ng=Ti(["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"]),S5=Ti(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),sg=Ti(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),T5=Ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xC=Ti(["#text"]),bC=Ti(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),lg=Ti(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),CC=Ti(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ru=Ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),w5=ur(/{{[\w\W]*|^[\w\W]*}}/g),_5=ur(/<%[\w\W]*|^[\w\W]*%>/g),B5=ur(/\${[\w\W]*/g),E5=ur(/^data-[\-\w.\u00B7-\uFFFF]+$/),L5=ur(/^aria-[\-\w]+$/),vC=ur(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),A5=ur(/^(?:\w+script|data):/i),M5=ur(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),R5=ur(/^html$/i),F5=ur(/^[a-z][.\w]*(-[.\w]+)+$/i),fn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},O5=function(){return typeof window>"u"?null:window},D5=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(a=i.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},kC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function F2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O5();const t=wt=>F2(wt);if(t.version="3.4.6",t.removed=[],!e||!e.document||e.document.nodeType!==fn.document||!e.Element)return t.isSupported=!1,t;let i=e.document;const a=i,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,u=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,m=Ur(x,"cloneNode"),v=Ur(x,"remove"),C=Ur(x,"nextSibling"),k=Ur(x,"childNodes"),T=Ur(x,"parentNode"),_=Ur(x,"shadowRoot"),E=Ur(x,"attributes"),F=c&&c.prototype?Ur(c.prototype,"nodeType"):null,D=c&&c.prototype?Ur(c.prototype,"nodeName"):null;if(typeof l=="function"){const wt=i.createElement("template");wt.content&&wt.content.ownerDocument&&(i=wt.content.ownerDocument)}let N,U="";const R=i,V=R.implementation,Y=R.createNodeIterator,G=R.createDocumentFragment,et=R.getElementsByTagName,J=a.importNode;let q=kC();t.isSupported=typeof M2=="function"&&typeof T=="function"&&V&&V.createHTMLDocument!==void 0;const j=w5,A=_5,H=B5,z=E5,$=L5,Q=A5,I=M5,it=F5;let ut=vC,dt=null;const yt=Gt({},[...yC,...ag,...ng,...sg,...xC]);let xt=null;const Rt=Gt({},[...bC,...lg,...CC,...ru]);let Ot=Object.seal(sl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pt=null,W=null;const ct=Object.seal(sl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ct=!0,Ft=!0,Jt=!1,me=!0,Ht=!1,Ae=!0,De=!1,Je=!1,Jr=!1,Ki=!1,pr=!1,us=!1,ci=!0,qc=!1;const Wl="user-content-";let ds=!0,Dr=!1,Ma={},qi=null;const Yl=Gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ic=null;const Ra=Gt({},["audio","video","img","source","image","track"]);let ti=null;const gr=Gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",fs="http://www.w3.org/2000/svg",Ji="http://www.w3.org/1999/xhtml";let Fa=Ji,Oa=!1,Da=null;const ps=Gt({},[Ze,fs,Ji],rg);let mr=Gt({},["mi","mo","mn","ms","mtext"]),$a=Gt({},["annotation-xml"]);const wn=Gt({},["title","style","font","a","script"]);let _n=null;const jc=["application/xhtml+xml","text/html"],Gl="text/html";let ve=null,za=null;const Hc=i.createElement("form"),Xl=function(P){return P instanceof RegExp||P instanceof Function},gs=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(za&&za===P)return;(!P||typeof P!="object")&&(P={}),P=Di(P),_n=jc.indexOf(P.PARSER_MEDIA_TYPE)===-1?Gl:P.PARSER_MEDIA_TYPE,ve=_n==="application/xhtml+xml"?rg:tc,dt=Oe(P,"ALLOWED_TAGS")&&vi(P.ALLOWED_TAGS)?Gt({},P.ALLOWED_TAGS,ve):yt,xt=Oe(P,"ALLOWED_ATTR")&&vi(P.ALLOWED_ATTR)?Gt({},P.ALLOWED_ATTR,ve):Rt,Da=Oe(P,"ALLOWED_NAMESPACES")&&vi(P.ALLOWED_NAMESPACES)?Gt({},P.ALLOWED_NAMESPACES,rg):ps,ti=Oe(P,"ADD_URI_SAFE_ATTR")&&vi(P.ADD_URI_SAFE_ATTR)?Gt(Di(gr),P.ADD_URI_SAFE_ATTR,ve):gr,Ic=Oe(P,"ADD_DATA_URI_TAGS")&&vi(P.ADD_DATA_URI_TAGS)?Gt(Di(Ra),P.ADD_DATA_URI_TAGS,ve):Ra,qi=Oe(P,"FORBID_CONTENTS")&&vi(P.FORBID_CONTENTS)?Gt({},P.FORBID_CONTENTS,ve):Yl,Pt=Oe(P,"FORBID_TAGS")&&vi(P.FORBID_TAGS)?Gt({},P.FORBID_TAGS,ve):Di({}),W=Oe(P,"FORBID_ATTR")&&vi(P.FORBID_ATTR)?Gt({},P.FORBID_ATTR,ve):Di({}),Ma=Oe(P,"USE_PROFILES")?P.USE_PROFILES&&typeof P.USE_PROFILES=="object"?Di(P.USE_PROFILES):P.USE_PROFILES:!1,Ct=P.ALLOW_ARIA_ATTR!==!1,Ft=P.ALLOW_DATA_ATTR!==!1,Jt=P.ALLOW_UNKNOWN_PROTOCOLS||!1,me=P.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ht=P.SAFE_FOR_TEMPLATES||!1,Ae=P.SAFE_FOR_XML!==!1,De=P.WHOLE_DOCUMENT||!1,Ki=P.RETURN_DOM||!1,pr=P.RETURN_DOM_FRAGMENT||!1,us=P.RETURN_TRUSTED_TYPE||!1,Jr=P.FORCE_BODY||!1,ci=P.SANITIZE_DOM!==!1,qc=P.SANITIZE_NAMED_PROPS||!1,ds=P.KEEP_CONTENT!==!1,Dr=P.IN_PLACE||!1,ut=k5(P.ALLOWED_URI_REGEXP)?P.ALLOWED_URI_REGEXP:vC,Fa=typeof P.NAMESPACE=="string"?P.NAMESPACE:Ji,mr=Oe(P,"MATHML_TEXT_INTEGRATION_POINTS")&&P.MATHML_TEXT_INTEGRATION_POINTS&&typeof P.MATHML_TEXT_INTEGRATION_POINTS=="object"?Di(P.MATHML_TEXT_INTEGRATION_POINTS):Gt({},["mi","mo","mn","ms","mtext"]),$a=Oe(P,"HTML_INTEGRATION_POINTS")&&P.HTML_INTEGRATION_POINTS&&typeof P.HTML_INTEGRATION_POINTS=="object"?Di(P.HTML_INTEGRATION_POINTS):Gt({},["annotation-xml"]);const ft=Oe(P,"CUSTOM_ELEMENT_HANDLING")&&P.CUSTOM_ELEMENT_HANDLING&&typeof P.CUSTOM_ELEMENT_HANDLING=="object"?Di(P.CUSTOM_ELEMENT_HANDLING):sl(null);if(Ot=sl(null),Oe(ft,"tagNameCheck")&&Xl(ft.tagNameCheck)&&(Ot.tagNameCheck=ft.tagNameCheck),Oe(ft,"attributeNameCheck")&&Xl(ft.attributeNameCheck)&&(Ot.attributeNameCheck=ft.attributeNameCheck),Oe(ft,"allowCustomizedBuiltInElements")&&typeof ft.allowCustomizedBuiltInElements=="boolean"&&(Ot.allowCustomizedBuiltInElements=ft.allowCustomizedBuiltInElements),Ht&&(Ft=!1),pr&&(Ki=!0),Ma&&(dt=Gt({},xC),xt=sl(null),Ma.html===!0&&(Gt(dt,yC),Gt(xt,bC)),Ma.svg===!0&&(Gt(dt,ag),Gt(xt,lg),Gt(xt,ru)),Ma.svgFilters===!0&&(Gt(dt,ng),Gt(xt,lg),Gt(xt,ru)),Ma.mathMl===!0&&(Gt(dt,sg),Gt(xt,CC),Gt(xt,ru))),ct.tagCheck=null,ct.attributeCheck=null,Oe(P,"ADD_TAGS")&&(typeof P.ADD_TAGS=="function"?ct.tagCheck=P.ADD_TAGS:vi(P.ADD_TAGS)&&(dt===yt&&(dt=Di(dt)),Gt(dt,P.ADD_TAGS,ve))),Oe(P,"ADD_ATTR")&&(typeof P.ADD_ATTR=="function"?ct.attributeCheck=P.ADD_ATTR:vi(P.ADD_ATTR)&&(xt===Rt&&(xt=Di(xt)),Gt(xt,P.ADD_ATTR,ve))),Oe(P,"ADD_URI_SAFE_ATTR")&&vi(P.ADD_URI_SAFE_ATTR)&&Gt(ti,P.ADD_URI_SAFE_ATTR,ve),Oe(P,"FORBID_CONTENTS")&&vi(P.FORBID_CONTENTS)&&(qi===Yl&&(qi=Di(qi)),Gt(qi,P.FORBID_CONTENTS,ve)),Oe(P,"ADD_FORBID_CONTENTS")&&vi(P.ADD_FORBID_CONTENTS)&&(qi===Yl&&(qi=Di(qi)),Gt(qi,P.ADD_FORBID_CONTENTS,ve)),ds&&(dt["#text"]=!0),De&&Gt(dt,["html","head","body"]),dt.table&&(Gt(dt,["tbody"]),delete Pt.tbody),P.TRUSTED_TYPES_POLICY){if(typeof P.TRUSTED_TYPES_POLICY.createHTML!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof P.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=P.TRUSTED_TYPES_POLICY,U=N.createHTML("")}else N===void 0&&(N=D5(g,s)),N!==null&&typeof U=="string"&&(U=N.createHTML(""));Ti&&Ti(P),za=P},ms=Gt({},[...ag,...ng,...S5]),ys=Gt({},[...sg,...T5]),Uc=function(P){let ft=T(P);(!ft||!ft.tagName)&&(ft={namespaceURI:Fa,tagName:"template"});const bt=tc(P.tagName),ce=tc(ft.tagName);return Da[P.namespaceURI]?P.namespaceURI===fs?ft.namespaceURI===Ji?bt==="svg":ft.namespaceURI===Ze?bt==="svg"&&(ce==="annotation-xml"||mr[ce]):!!ms[bt]:P.namespaceURI===Ze?ft.namespaceURI===Ji?bt==="math":ft.namespaceURI===fs?bt==="math"&&$a[ce]:!!ys[bt]:P.namespaceURI===Ji?ft.namespaceURI===fs&&!$a[ce]||ft.namespaceURI===Ze&&!mr[ce]?!1:!ys[bt]&&(wn[bt]||!ms[bt]):!!(_n==="application/xhtml+xml"&&Da[P.namespaceURI]):!1},_i=function(P){el(t.removed,{element:P});try{T(P).removeChild(P)}catch{v(P)}},hi=function(P,ft){try{el(t.removed,{attribute:ft.getAttributeNode(P),from:ft})}catch{el(t.removed,{attribute:null,from:ft})}if(ft.removeAttribute(P),P==="is")if(Ki||pr)try{_i(ft)}catch{}else try{ft.setAttribute(P,"")}catch{}},qe=function(P){let ft=null,bt=null;if(Jr)P="<remove></remove>"+P;else{const ke=fC(P,/^[\r\n\t ]+/);bt=ke&&ke[0]}_n==="application/xhtml+xml"&&Fa===Ji&&(P='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+P+"</body></html>");const ce=N?N.createHTML(P):P;if(Fa===Ji)try{ft=new p().parseFromString(ce,_n)}catch{}if(!ft||!ft.documentElement){ft=V.createDocument(Fa,"template",null);try{ft.documentElement.innerHTML=Oa?U:ce}catch{}}const ae=ft.body||ft.documentElement;return P&&bt&&ae.insertBefore(i.createTextNode(bt),ae.childNodes[0]||null),Fa===Ji?et.call(ft,De?"html":"body")[0]:De?ft.documentElement:ae},ei=function(P){return Y.call(P.ownerDocument||P,P,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ta=function(P){P.normalize();const ft=Y.call(P.ownerDocument||P,P,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let bt=ft.nextNode();for(;bt;){let ce=bt.data;tl([j,A,H],ae=>{ce=il(ce,ae," ")}),bt.data=ce,bt=ft.nextNode()}},Na=function(P){const ft=D?D(P):null;return typeof ft!="string"||ve(ft)!=="form"?!1:typeof P.nodeName!="string"||typeof P.textContent!="string"||typeof P.removeChild!="function"||P.attributes!==E(P)||typeof P.removeAttribute!="function"||typeof P.setAttribute!="function"||typeof P.namespaceURI!="string"||typeof P.insertBefore!="function"||typeof P.hasChildNodes!="function"||P.childNodes!==k(P)},Vl=function(P){if(!F||typeof P!="object"||P===null)return!1;try{return F(P)===fn.documentFragment}catch{return!1}},xs=function(P){if(!F||typeof P!="object"||P===null)return!1;try{return typeof F(P)=="number"}catch{return!1}};function tr(wt,P,ft){tl(wt,bt=>{bt.call(t,P,ft,za)})}const qa=function(P){let ft=null;if(tr(q.beforeSanitizeElements,P,null),Na(P))return _i(P),!0;const bt=ve(P.nodeName);if(tr(q.uponSanitizeElement,P,{tagName:bt,allowedTags:dt}),Ae&&P.hasChildNodes()&&!xs(P.firstElementChild)&&si(/<[/\w!]/g,P.innerHTML)&&si(/<[/\w!]/g,P.textContent)||Ae&&P.namespaceURI===Ji&&bt==="style"&&xs(P.firstElementChild)||P.nodeType===fn.progressingInstruction||Ae&&P.nodeType===fn.comment&&si(/<[/\w]/g,P.data))return _i(P),!0;if(Pt[bt]||!(ct.tagCheck instanceof Function&&ct.tagCheck(bt))&&!dt[bt]){if(!Pt[bt]&&ea(bt)&&(Ot.tagNameCheck instanceof RegExp&&si(Ot.tagNameCheck,bt)||Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(bt)))return!1;if(ds&&!qi[bt]){const ae=T(P)||P.parentNode,ke=k(P)||P.childNodes;if(ke&&ae){const Bi=ke.length;for(let xi=Bi-1;xi>=0;--xi){const ui=m(ke[xi],!0);ae.insertBefore(ui,C(P))}}}return _i(P),!0}return(F?F(P):P.nodeType)===fn.element&&!Uc(P)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&si(/<\/no(script|embed|frames)/i,P.innerHTML)?(_i(P),!0):(Ht&&P.nodeType===fn.text&&(ft=P.textContent,tl([j,A,H],ae=>{ft=il(ft,ae," ")}),P.textContent!==ft&&(el(t.removed,{element:P.cloneNode()}),P.textContent=ft)),tr(q.afterSanitizeElements,P,null),!1)},bs=function(P,ft,bt){if(W[ft]||ci&&(ft==="id"||ft==="name")&&(bt in i||bt in Hc))return!1;const ce=xt[ft]||ct.attributeCheck instanceof Function&&ct.attributeCheck(ft,P);if(!(Ft&&!W[ft]&&si(z,ft))){if(!(Ct&&si($,ft))){if(!ce||W[ft]){if(!(ea(P)&&(Ot.tagNameCheck instanceof RegExp&&si(Ot.tagNameCheck,P)||Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(P))&&(Ot.attributeNameCheck instanceof RegExp&&si(Ot.attributeNameCheck,ft)||Ot.attributeNameCheck instanceof Function&&Ot.attributeNameCheck(ft,P))||ft==="is"&&Ot.allowCustomizedBuiltInElements&&(Ot.tagNameCheck instanceof RegExp&&si(Ot.tagNameCheck,bt)||Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(bt))))return!1}else if(!ti[ft]){if(!si(ut,il(bt,I,""))){if(!((ft==="src"||ft==="xlink:href"||ft==="href")&&P!=="script"&&pC(bt,"data:")===0&&Ic[P])){if(!(Jt&&!si(Q,il(bt,I,"")))){if(bt)return!1}}}}}}return!0},Ia=Gt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ea=function(P){return!Ia[tc(P)]&&si(it,P)},ja=function(P){tr(q.beforeSanitizeAttributes,P,null);const ft=P.attributes;if(!ft||Na(P))return;const bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let ce=ft.length;for(;ce--;){const ae=ft[ce],ke=ae.name,Bi=ae.namespaceURI,xi=ae.value,ui=ve(ke),Ii=xi;let he=ke==="value"?Ii:m5(Ii);if(bt.attrName=ui,bt.attrValue=he,bt.keepAttr=!0,bt.forceKeepAttr=void 0,tr(q.uponSanitizeAttribute,P,bt),he=bt.attrValue,qc&&(ui==="id"||ui==="name")&&pC(he,Wl)!==0&&(hi(ke,P),he=Wl+he),Ae&&si(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,he)){hi(ke,P);continue}if(ui==="attributename"&&fC(he,"href")){hi(ke,P);continue}if(bt.forceKeepAttr)continue;if(!bt.keepAttr){hi(ke,P);continue}if(!me&&si(/\/>/i,he)){hi(ke,P);continue}Ht&&tl([j,A,H],Pc=>{he=il(he,Pc," ")});const Zl=ve(P.nodeName);if(!bs(Zl,ui,he)){hi(ke,P);continue}if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Bi)switch(g.getAttributeType(Zl,ui)){case"TrustedHTML":{he=N.createHTML(he);break}case"TrustedScriptURL":{he=N.createScriptURL(he);break}}if(he!==Ii)try{Bi?P.setAttributeNS(Bi,ke,he):P.setAttribute(ke,he),Na(P)?_i(P):dC(t.removed)}catch{hi(ke,P)}}tr(q.afterSanitizeAttributes,P,null)},$r=function(P){let ft=null;const bt=ei(P);for(tr(q.beforeSanitizeShadowDOM,P,null);ft=bt.nextNode();)tr(q.uponSanitizeShadowNode,ft,null),qa(ft),ja(ft),Vl(ft.content)&&$r(ft.content);tr(q.afterSanitizeShadowDOM,P,null)},Ee=function(P){if((F?F(P):P.nodeType)===fn.element){const ae=_?_(P):P.shadowRoot;Vl(ae)&&(Ee(ae),$r(ae))}const bt=k?k(P):P.childNodes;if(!bt)return;const ce=[];tl(bt,ae=>{el(ce,ae)});for(const ae of ce)Ee(ae)};return t.sanitize=function(wt){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=null,bt=null,ce=null,ae=null;if(Oa=!wt,Oa&&(wt="<!-->"),typeof wt!="string"&&!xs(wt)&&(wt=v5(wt),typeof wt!="string"))throw Po("dirty is not a string, aborting");if(!t.isSupported)return wt;if(Je||gs(P),t.removed=[],typeof wt=="string"&&(Dr=!1),Dr){const xi=D?D(wt):wt.nodeName;if(typeof xi=="string"){const ui=ve(xi);if(!dt[ui]||Pt[ui])throw Po("root node is forbidden and cannot be sanitized in-place")}if(Na(wt))throw Po("root node is clobbered and cannot be sanitized in-place");Ee(wt)}else if(xs(wt))ft=qe("<!---->"),bt=ft.ownerDocument.importNode(wt,!0),bt.nodeType===fn.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?ft=bt:ft.appendChild(bt),Ee(bt);else{if(!Ki&&!Ht&&!De&&wt.indexOf("<")===-1)return N&&us?N.createHTML(wt):wt;if(ft=qe(wt),!ft)return Ki?null:us?U:""}ft&&Jr&&_i(ft.firstChild);const ke=ei(Dr?wt:ft);for(;ce=ke.nextNode();)qa(ce),ja(ce),Vl(ce.content)&&$r(ce.content);if(Dr)return Ht&&ta(wt),wt;if(Ki){if(Ht&&ta(ft),pr)for(ae=G.call(ft.ownerDocument);ft.firstChild;)ae.appendChild(ft.firstChild);else ae=ft;return(xt.shadowroot||xt.shadowrootmode)&&(ae=J.call(a,ae,!0)),ae}let Bi=De?ft.outerHTML:ft.innerHTML;return De&&dt["!doctype"]&&ft.ownerDocument&&ft.ownerDocument.doctype&&ft.ownerDocument.doctype.name&&si(R5,ft.ownerDocument.doctype.name)&&(Bi="<!DOCTYPE "+ft.ownerDocument.doctype.name+`>
|
|
137
|
+
`+Bi),Ht&&tl([j,A,H],xi=>{Bi=il(Bi,xi," ")}),N&&us?N.createHTML(Bi):Bi},t.setConfig=function(){let wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gs(wt),Je=!0},t.clearConfig=function(){za=null,Je=!1},t.isValidAttribute=function(wt,P,ft){za||gs({});const bt=ve(wt),ce=ve(P);return bs(bt,ce,ft)},t.addHook=function(wt,P){typeof P=="function"&&el(q[wt],P)},t.removeHook=function(wt,P){if(P!==void 0){const ft=p5(q[wt],P);return ft===-1?void 0:g5(q[wt],ft,1)[0]}return dC(q[wt])},t.removeHooks=function(wt){q[wt]=[]},t.removeAllHooks=function(){q=kC()},t}var Ll=F2(),O2=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,cc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$5=/\s*%%.*\n/gm,gl,D2=(gl=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},S(gl,"UnknownDiagramError"),gl),es={},Jm=S(function(e,t){e=e.replace(O2,"").replace(cc,"").replace($5,`
|
|
138
|
+
`);for(const[i,{detector:a}]of Object.entries(es))if(a(e,t))return i;throw new D2(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Og=S((...e)=>{for(const{id:t,detector:i,loader:a}of e)$2(t,i,a)},"registerLazyLoadedDiagrams"),$2=S((e,t,i)=>{es[e]&&mt.warn(`Detector with key ${e} already exists. Overwriting.`),es[e]={detector:t,loader:i},mt.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),z5=S(e=>es[e].loader,"getDiagramLoader"),Dg=S((e,t,{depth:i=2,clobber:a=!1}={})=>{const s={depth:i,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Dg(e,l,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(l=>{e.includes(l)||e.push(l)}),e):e===void 0||i<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(l=>{typeof t[l]=="object"&&t[l]!==null&&(e[l]===void 0||typeof e[l]=="object")?(e[l]===void 0&&(e[l]=Array.isArray(t[l])?[]:{}),e[l]=Dg(e[l],t[l],{depth:i-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),Xe=Dg,Zr="#ffffff",Qr="#f2f2f2",qt=S((e,t)=>t?L(e,{s:-40,l:10}):L(e,{s:-40,l:-10}),"mkBorder"),ml,N5=(ml=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U,R,V,Y,G,et,J,q,j,A,H,z,$;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||lt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||lt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||st(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=lt(this["cScale"+Q],75);else for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=lt(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||K(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||st(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||lt(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||L(this.mainBkg,{h:180,s:-15,l:t*(5+Q*3)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||L(this.mainBkg,{h:180,s:-15,l:t*(8+Q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((i=this.radar)==null?void 0:i.axisColor)||this.lineColor,axisStrokeWidth:((a=this.radar)==null?void 0:a.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((l=this.radar)==null?void 0:l.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((f=this.radar)==null?void 0:f.graticuleOpacity)||.3,legendBoxSize:((p=this.radar)==null?void 0:p.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((x=this.wardley)==null?void 0:x.backgroundColor)||this.background,axisColor:((m=this.wardley)==null?void 0:m.axisColor)||this.lineColor,axisTextColor:((v=this.wardley)==null?void 0:v.axisTextColor)||this.primaryTextColor,gridColor:((C=this.wardley)==null?void 0:C.gridColor)||this.gridColor,componentFill:((k=this.wardley)==null?void 0:k.componentFill)||this.background,componentStroke:((T=this.wardley)==null?void 0:T.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((F=this.wardley)==null?void 0:F.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((D=this.wardley)==null?void 0:D.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((U=this.wardley)==null?void 0:U.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((R=this.xyChart)==null?void 0:R.backgroundColor)||this.background,titleColor:((V=this.xyChart)==null?void 0:V.titleColor)||this.primaryTextColor,dataLabelColor:((Y=this.xyChart)==null?void 0:Y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((G=this.xyChart)==null?void 0:G.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((et=this.xyChart)==null?void 0:et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((J=this.xyChart)==null?void 0:J.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((q=this.xyChart)==null?void 0:q.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((j=this.xyChart)==null?void 0:j.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((H=this.xyChart)==null?void 0:H.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(($=this.xyChart)==null?void 0:$.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(ml,"Theme"),ml),q5=S(e=>{const t=new N5;return t.calculate(e),t},"getThemeVariables"),yl,I5=(yl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=lt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=lt(this.sectionBkgColor,10),this.taskBorderColor=xn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xn(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||st(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||lt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U,R,V,Y,G,et,J,q,j,A,H,z;this.secondBkg=st(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=st(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=st(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=K(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleInv"+$]=this["cScaleInv"+$]||K(this["cScale"+$]);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScalePeer"+$]=this["cScalePeer"+$]||st(this["cScale"+$],10);for(let $=0;$<5;$++)this["surface"+$]=this["surface"+$]||L(this.mainBkg,{h:30,s:-30,l:-(-10+$*4)}),this["surfacePeer"+$]=this["surfacePeer"+$]||L(this.mainBkg,{h:30,s:-30,l:-(-7+$*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleLabel"+$]=this["cScaleLabel"+$]||this.scaleLabelColor;for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["pie"+$]=this["cScale"+$];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let $=0;$<8;$++)this["venn"+($+1)]=this["venn"+($+1)]??st(this["cScale"+$],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((U=this.wardley)==null?void 0:U.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((V=this.wardley)==null?void 0:V.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((G=this.wardley)==null?void 0:G.componentFill)||this.mainBkg,componentStroke:((et=this.wardley)==null?void 0:et.componentStroke)||this.lineColor,componentLabelColor:((J=this.wardley)==null?void 0:J.componentLabelColor)||this.primaryTextColor,linkStroke:((q=this.wardley)==null?void 0:q.linkStroke)||this.lineColor,evolutionStroke:((j=this.wardley)==null?void 0:j.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((H=this.wardley)==null?void 0:H.annotationTextColor)||this.primaryTextColor,annotationFill:((z=this.wardley)==null?void 0:z.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=st(this.secondaryColor,20),this.git1=st(this.pie2||this.secondaryColor,20),this.git2=st(this.pie3||this.tertiaryColor,20),this.git3=st(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=st(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=st(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=st(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=st(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||st("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||st("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||st("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||st("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||st(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||st(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||st(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||st(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(yl,"Theme"),yl),j5=S(e=>{const t=new I5;return t.calculate(e),t},"getThemeVariables"),xl,H5=(xl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=xn(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U,R,V,Y,G,et,J,q,j,A,H,z;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScale"+$]=lt(this["cScale"+$],10),this["cScalePeer"+$]=this["cScalePeer"+$]||lt(this["cScale"+$],25);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleInv"+$]=this["cScaleInv"+$]||L(this["cScale"+$],{h:180});for(let $=0;$<5;$++)this["surface"+$]=this["surface"+$]||L(this.mainBkg,{h:30,l:-(5+$*5)}),this["surfacePeer"+$]=this["surfacePeer"+$]||L(this.mainBkg,{h:30,l:-(7+$*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||K(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||K(this.labelTextColor);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleLabel"+$]=this["cScaleLabel"+$]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||st(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||st(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((v=this.wardley)==null?void 0:v.gridColor)||this.gridColor,componentFill:((C=this.wardley)==null?void 0:C.componentFill)||this.background,componentStroke:((k=this.wardley)==null?void 0:k.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((D=this.wardley)==null?void 0:D.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((U=this.xyChart)==null?void 0:U.backgroundColor)||this.background,titleColor:((R=this.xyChart)==null?void 0:R.titleColor)||this.primaryTextColor,dataLabelColor:((V=this.xyChart)==null?void 0:V.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((G=this.xyChart)==null?void 0:G.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((et=this.xyChart)==null?void 0:et.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((J=this.xyChart)==null?void 0:J.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((q=this.xyChart)==null?void 0:q.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((H=this.xyChart)==null?void 0:H.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||lt(K(this.git0),25),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(Object.keys(this).forEach(a=>{this[a]==="calculated"&&(this[a]=void 0)}),typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(xl,"Theme"),xl),U5=S(e=>{const t=new H5;return t.calculate(e),t},"getThemeVariables"),bl,P5=(bl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=st("#cde498",10),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.primaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U,R,V,Y,G,et,J,q,j,A,H,z;this.actorBorder=lt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScale"+$]=lt(this["cScale"+$],10),this["cScalePeer"+$]=this["cScalePeer"+$]||lt(this["cScale"+$],25);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleInv"+$]=this["cScaleInv"+$]||L(this["cScale"+$],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleLabel"+$]=this["cScaleLabel"+$]||this.scaleLabelColor;for(let $=0;$<5;$++)this["surface"+$]=this["surface"+$]||L(this.mainBkg,{h:30,s:-30,l:-(5+$*5)}),this["surfacePeer"+$]=this["surfacePeer"+$]||L(this.mainBkg,{h:30,s:-30,l:-(8+$*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||st(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((v=this.wardley)==null?void 0:v.gridColor)||this.gridColor,componentFill:((C=this.wardley)==null?void 0:C.componentFill)||this.background,componentStroke:((k=this.wardley)==null?void 0:k.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((D=this.wardley)==null?void 0:D.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((U=this.xyChart)==null?void 0:U.backgroundColor)||this.background,titleColor:((R=this.xyChart)==null?void 0:R.titleColor)||this.primaryTextColor,dataLabelColor:((V=this.xyChart)==null?void 0:V.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((G=this.xyChart)==null?void 0:G.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((et=this.xyChart)==null?void 0:et.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((J=this.xyChart)==null?void 0:J.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((q=this.xyChart)==null?void 0:q.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((H=this.xyChart)==null?void 0:H.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(bl,"Theme"),bl),W5=S(e=>{const t=new P5;return t.calculate(e),t},"getThemeVariables"),Cl,Y5=(Cl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=st(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,E,F,D,N,U,R,V,Y,G,et,J,q,j,A,H,z;this.secondBkg=st(this.contrast,55),this.border2=this.contrast,this.actorBorder=st(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleInv"+$]=this["cScaleInv"+$]||K(this["cScale"+$]);for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this.darkMode?this["cScalePeer"+$]=this["cScalePeer"+$]||st(this["cScale"+$],10):this["cScalePeer"+$]=this["cScalePeer"+$]||lt(this["cScale"+$],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["cScaleLabel"+$]=this["cScaleLabel"+$]||this.scaleLabelColor;for(let $=0;$<5;$++)this["surface"+$]=this["surface"+$]||L(this.mainBkg,{l:-(5+$*5)}),this["surfacePeer"+$]=this["surfacePeer"+$]||L(this.mainBkg,{l:-(8+$*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=st(this.contrast,30),this.sectionBkgColor2=st(this.contrast,30),this.taskBorderColor=lt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=st(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=lt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let $=0;$<this.THEME_COLOR_LIMIT;$++)this["pie"+$]=this["cScale"+$];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let $=0;$<8;$++)this["venn"+($+1)]=this["venn"+($+1)]??this["cScale"+$];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((U=this.wardley)==null?void 0:U.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((V=this.wardley)==null?void 0:V.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((G=this.wardley)==null?void 0:G.componentFill)||this.background,componentStroke:((et=this.wardley)==null?void 0:et.componentStroke)||this.lineColor,componentLabelColor:((J=this.wardley)==null?void 0:J.componentLabelColor)||this.primaryTextColor,linkStroke:((q=this.wardley)==null?void 0:q.linkStroke)||this.lineColor,evolutionStroke:((j=this.wardley)==null?void 0:j.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((H=this.wardley)==null?void 0:H.annotationTextColor)||this.primaryTextColor,annotationFill:((z=this.wardley)==null?void 0:z.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Cl,"Theme"),Cl),G5=S(e=>{const t=new Y5;return t.calculate(e),t},"getThemeVariables"),vl,X5=(vl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=L(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||a,this.cScale3=this.cScale3||L(t,{h:30}),this.cScale4=this.cScale4||L(t,{h:60}),this.cScale5=this.cScale5||L(t,{h:90}),this.cScale6=this.cScale6||L(t,{h:120}),this.cScale7=this.cScale7||L(t,{h:150}),this.cScale8=this.cScale8||L(t,{h:210,l:150}),this.cScale9=this.cScale9||L(t,{h:270}),this.cScale10=this.cScale10||L(t,{h:300}),this.cScale11=this.cScale11||L(t,{h:330}),this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(i,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(i,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(i,{l:-10}),this.pie6=this.pie6||L(a,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(vl,"Theme"),vl),V5=S(e=>{const t=new X5;return t.calculate(e),t},"getThemeVariables"),kl,Z5=(kl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var i,a,s,l,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(kl,"Theme"),kl),Q5=S(e=>{const t=new Z5;return t.calculate(e),t},"getThemeVariables"),Sl,K5=(Sl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=qt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=L(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=this.mainBkg;if(this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(i,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(i,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(i,{l:-10}),this.pie6=this.pie6||L(a,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Sl,"Theme"),Sl),J5=S(e=>{const t=new K5;return t.calculate(e),t},"getThemeVariables"),Tl,tR=(Tl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var i,a,s,l,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Tl,"Theme"),Tl),eR=S(e=>{const t=new tR;return t.calculate(e),t},"getThemeVariables"),wl,iR=(wl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=L(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(i,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(i,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(i,{l:-10}),this.pie6=this.pie6||L(a,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(wl,"Theme"),wl),rR=S(e=>{const t=new iR;return t.calculate(e),t},"getThemeVariables"),_l,aR=(_l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var i,a,s,l,c,h,u,f,p,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=lt(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||L(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fr(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(_l,"Theme"),_l),nR=S(e=>{const t=new aR;return t.calculate(e),t},"getThemeVariables"),Sa={base:{getThemeVariables:q5},dark:{getThemeVariables:j5},default:{getThemeVariables:U5},forest:{getThemeVariables:W5},neutral:{getThemeVariables:G5},neo:{getThemeVariables:V5},"neo-dark":{getThemeVariables:Q5},redux:{getThemeVariables:J5},"redux-dark":{getThemeVariables:eR},"redux-color":{getThemeVariables:rR},"redux-dark-color":{getThemeVariables:nR}},Ci={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},z2={...Ci,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Sa.default.getThemeVariables(),sequence:{...Ci.sequence,messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:S(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:S(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ci.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ci.c4,useWidth:void 0,personFont:S(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ci.flowchart,inheritDir:!1},external_personFont:S(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:S(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:S(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:S(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:S(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:S(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:S(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:S(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:S(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:S(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:S(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:S(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:S(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:S(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:S(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:S(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:S(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:S(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:S(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:S(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ci.pie,useWidth:984},xyChart:{...Ci.xyChart,useWidth:void 0},requirement:{...Ci.requirement,useWidth:void 0},packet:{...Ci.packet},eventmodeling:{...Ci.eventmodeling},treeView:{...Ci.treeView,useWidth:void 0},radar:{...Ci.radar},ishikawa:{...Ci.ishikawa},sankey:{...Ci.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ci.venn}},N2=S((e,t="")=>Object.keys(e).reduce((i,a)=>Array.isArray(e[a])?i:typeof e[a]=="object"&&e[a]!==null?[...i,t+a,...N2(e[a],"")]:[...i,t+a],[]),"keyify"),sR=new Set(N2(z2,"")),q2=z2,Nu=S(e=>{if(mt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Nu(t));return}for(const t of Object.keys(e)){if(mt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!sR.has(t)||e[t]==null){mt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const a=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!a.test(e[t][s]))&&(mt.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else mt.debug("sanitizing object",t),Nu(e[t]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const a of i)t.includes(a)&&(mt.debug("sanitizing css option",t),e[t]=I2(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const i=e.themeVariables[t];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}mt.debug("After sanitization",e)}},"sanitizeDirective"),I2=S(e=>{let t=0,i=0;for(const a of e){if(t<i)return"{ /* ERROR: Unbalanced CSS */ }";a==="{"?t++:a==="}"&&i++}return t!==i?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Al=Object.freeze(q2),Ea=S(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),$i=Xe({},Al),qu,is=[],hc=Xe({},Al),kd=S((e,t)=>{let i=Xe({},e),a={};for(const s of t)U2(s),a=Xe(a,s);if(i=Xe(i,a),a.theme&&a.theme in Sa){const s=Xe({},qu),l=Xe(s.themeVariables||{},a.themeVariables);i.theme&&i.theme in Sa&&(i.themeVariables=Sa[i.theme].getThemeVariables(l))}return hc=i,W2(hc),hc},"updateCurrentConfig"),lR=S(e=>($i=Xe({},Al),$i=Xe($i,e),e.theme&&Sa[e.theme]&&($i.themeVariables=Sa[e.theme].getThemeVariables(e.themeVariables)),kd($i,is),$i),"setSiteConfig"),oR=S(e=>{qu=Xe({},e)},"saveConfigFromInitialize"),cR=S(e=>($i=Xe($i,e),kd($i,is),$i),"updateSiteConfig"),j2=S(()=>Xe({},$i),"getSiteConfig"),H2=S(e=>(W2(e),Xe(hc,e),Le()),"setConfig"),Le=S(()=>Xe({},hc),"getConfig"),U2=S(e=>{e&&(["secure",...$i.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(mt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&U2(e[t])}))},"sanitize"),hR=S(e=>{var t;Nu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),is.push(e),kd($i,is)},"addDirective"),Iu=S((e=$i)=>{is=[],kd(e,is)},"reset"),uR={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},SC={},P2=S(e=>{SC[e]||(mt.warn(uR[e]),SC[e]=!0)},"issueWarning"),W2=S(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&P2("LAZY_LOAD_DEPRECATED")},"checkConfig"),X7=S(()=>{let e={};qu&&(e=Xe(e,qu));for(const t of is)e=Xe(e,t);return e},"getUserDefinedConfig"),wi=S(e=>{var t,i;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&P2("FLOWCHART_HTML_LABELS_DEPRECATED"),Ea(e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ac=/<br\s*\/?>/gi,dR=S(e=>e?X2(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),fR=(()=>{let e=!1;return()=>{e||(Y2(),e=!0)}})();function Y2(){const e="data-temp-href-target";Ll.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ll.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}S(Y2,"setupDompurifyHooks");var G2=S(e=>(fR(),Ll.sanitize(e)),"removeScript"),TC=S((e,t)=>{if(wi(t)){const i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?e=G2(e):i!=="loose"&&(e=X2(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=yR(e))}return e},"sanitizeMore"),Mr=S((e,t)=>e&&(t.dompurifyConfig?e=Ll.sanitize(TC(e,t),t.dompurifyConfig).toString():e=Ll.sanitize(TC(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),pR=S((e,t)=>typeof e=="string"?Mr(e,t):e.flat().map(i=>Mr(i,t)),"sanitizeTextOrArray"),gR=S(e=>Ac.test(e),"hasBreaks"),mR=S(e=>e.split(Ac),"splitBreaks"),yR=S(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),X2=S(e=>e.replace(Ac,"#br#"),"breakToPlaceholder"),xR=S(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),bR=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),CR=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),wC=S(function(e){const t=e.split(/(,)/),i=[];for(let a=0;a<t.length;a++){let s=t[a];if(s===","&&a>0&&a+1<t.length){const l=t[a-1],c=t[a+1];vR(l,c)&&(s=l+","+c,a++,i.pop())}i.push(kR(s))}return i.join("")},"parseGenericTypes"),$g=S((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),vR=S((e,t)=>{const i=$g(e,"~"),a=$g(t,"~");return i===1&&a===1},"shouldCombineSets"),kR=S(e=>{const t=$g(e,"~");let i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);const a=[...e];let s=a.indexOf("~"),l=a.lastIndexOf("~");for(;s!==-1&&l!==-1&&s!==l;)a[s]="<",a[l]=">",s=a.indexOf("~"),l=a.lastIndexOf("~");return i&&a.unshift("~"),a.join("")},"processSet"),_C=S(()=>window.MathMLElement!==void 0,"isMathMLSupported"),zg=/\$\$(.*)\$\$/g,gc=S(e=>{var t;return(((t=e.match(zg))==null?void 0:t.length)??0)>0},"hasKatex"),V7=S(async(e,t)=>{const i=document.createElement("div");i.innerHTML=await V2(e,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const a=document.querySelector("body");a==null||a.insertAdjacentElement("beforeend",i);const s={width:i.clientWidth,height:i.clientHeight};return i.remove(),s},"calculateMathMLDimensions"),SR=S(async(e,t)=>{if(!gc(e))return e;if(!(_C()||t.legacyMathML||t.forceLegacyMathML))return e.replace(zg,"MathML is unsupported in this environment.");{const{default:i}=await ie(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),a=t.forceLegacyMathML||!_C()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ac).map(s=>gc(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(zg,(s,l)=>i.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),V2=S(async(e,t)=>Mr(await SR(e,t),t),"renderKatexSanitized"),Mc={getRows:dR,sanitizeText:Mr,sanitizeTextOrArray:pR,hasBreaks:gR,splitBreaks:mR,lineBreakRegex:Ac,removeScript:G2,getUrl:xR,evaluate:Ea,getMax:bR,getMin:CR},TR=S(function(e,t){for(let i of t)e.attr(i[0],i[1])},"d3Attrs"),wR=S(function(e,t,i){let a=new Map;return i?(a.set("width","100%"),a.set("style",`max-width: ${t}px;`)):(a.set("height",e),a.set("width",t)),a},"calculateSvgSizeAttrs"),Z2=S(function(e,t,i,a){const s=wR(t,i,a);TR(e,s)},"configureSvgSize"),_R=S(function(e,t,i,a){const s=t.node().getBBox(),l=s.width,c=s.height;mt.info(`SVG bounds: ${l}x${c}`,s);let h=0,u=0;mt.info(`Graph bounds: ${h}x${u}`,e),h=l+i*2,u=c+i*2,mt.info(`Calculated bounds: ${h}x${u}`),Z2(t,u,h,a);const f=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;t.attr("viewBox",f)},"setupGraphViewbox"),vu={};function Ng(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
139
|
+
`)}S(Ng,"cssStyleSheetToString");var BR=S((e,t,i,a)=>{let s="";return e in vu&&vu[e]?s=vu[e]({...i,svgId:a}):mt.warn(`No theme found for ${e}`),` & {
|
|
140
|
+
font-family: ${i.fontFamily};
|
|
141
|
+
font-size: ${i.fontSize};
|
|
142
|
+
fill: ${i.textColor}
|
|
143
|
+
}
|
|
144
|
+
@keyframes edge-animation-frame {
|
|
145
|
+
from {
|
|
146
|
+
stroke-dashoffset: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
@keyframes dash {
|
|
150
|
+
to {
|
|
151
|
+
stroke-dashoffset: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
& .edge-animation-slow {
|
|
155
|
+
stroke-dasharray: 9,5 !important;
|
|
156
|
+
stroke-dashoffset: 900;
|
|
157
|
+
animation: dash 50s linear infinite;
|
|
158
|
+
stroke-linecap: round;
|
|
159
|
+
}
|
|
160
|
+
& .edge-animation-fast {
|
|
161
|
+
stroke-dasharray: 9,5 !important;
|
|
162
|
+
stroke-dashoffset: 900;
|
|
163
|
+
animation: dash 20s linear infinite;
|
|
164
|
+
stroke-linecap: round;
|
|
165
|
+
}
|
|
166
|
+
/* Classes common for multiple diagrams */
|
|
167
|
+
|
|
168
|
+
& .error-icon {
|
|
169
|
+
fill: ${i.errorBkgColor};
|
|
170
|
+
}
|
|
171
|
+
& .error-text {
|
|
172
|
+
fill: ${i.errorTextColor};
|
|
173
|
+
stroke: ${i.errorTextColor};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
& .edge-thickness-normal {
|
|
177
|
+
stroke-width: ${i.strokeWidth??1}px;
|
|
178
|
+
}
|
|
179
|
+
& .edge-thickness-thick {
|
|
180
|
+
stroke-width: 3.5px
|
|
181
|
+
}
|
|
182
|
+
& .edge-pattern-solid {
|
|
183
|
+
stroke-dasharray: 0;
|
|
184
|
+
}
|
|
185
|
+
& .edge-thickness-invisible {
|
|
186
|
+
stroke-width: 0;
|
|
187
|
+
fill: none;
|
|
188
|
+
}
|
|
189
|
+
& .edge-pattern-dashed{
|
|
190
|
+
stroke-dasharray: 3;
|
|
191
|
+
}
|
|
192
|
+
.edge-pattern-dotted {
|
|
193
|
+
stroke-dasharray: 2;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
& .marker {
|
|
197
|
+
fill: ${i.lineColor};
|
|
198
|
+
stroke: ${i.lineColor};
|
|
199
|
+
}
|
|
200
|
+
& .marker.cross {
|
|
201
|
+
stroke: ${i.lineColor};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
& svg {
|
|
205
|
+
font-family: ${i.fontFamily};
|
|
206
|
+
font-size: ${i.fontSize};
|
|
207
|
+
}
|
|
208
|
+
& p {
|
|
209
|
+
margin: 0
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
${s}
|
|
213
|
+
.node .neo-node {
|
|
214
|
+
stroke: ${i.nodeBorder};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
218
|
+
stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
|
|
219
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
[data-look="neo"].node path {
|
|
224
|
+
stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
|
|
225
|
+
stroke-width: ${i.strokeWidth??1}px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
[data-look="neo"].node .outer-path {
|
|
229
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[data-look="neo"].node .neo-line path {
|
|
233
|
+
stroke: ${i.nodeBorder};
|
|
234
|
+
filter: none;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-look="neo"].node circle{
|
|
238
|
+
stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
|
|
239
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[data-look="neo"].node circle .state-start{
|
|
243
|
+
fill: #000000;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[data-look="neo"].icon-shape .icon {
|
|
247
|
+
fill: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
|
|
248
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
252
|
+
stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
|
|
253
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
${t}
|
|
257
|
+
`},"getStyles"),ER=S((e,t)=>{t!==void 0&&(vu[e]=t)},"addStylesForDiagram"),LR=BR,Q2={};KM(Q2,{clear:()=>AR,getAccDescription:()=>OR,getAccTitle:()=>RR,getDiagramTitle:()=>$R,setAccDescription:()=>FR,setAccTitle:()=>MR,setDiagramTitle:()=>DR});var ty="",ey="",iy="",ry=S(e=>Mr(e,Le()),"sanitizeText"),AR=S(()=>{ty="",iy="",ey=""},"clear"),MR=S(e=>{ty=ry(e).replace(/^\s+/g,"")},"setAccTitle"),RR=S(()=>ty,"getAccTitle"),FR=S(e=>{iy=ry(e).replace(/\n\s+/g,`
|
|
258
|
+
`)},"setAccDescription"),OR=S(()=>iy,"getAccDescription"),DR=S(e=>{ey=ry(e)},"setDiagramTitle"),$R=S(()=>ey,"getDiagramTitle"),BC=mt,zR=Km,le=Le,Z7=H2,Q7=Al,ay=S(e=>Mr(e,le()),"sanitizeText"),NR=_R,qR=S(()=>Q2,"getCommonDb"),ju={},Hu=S((e,t,i)=>{var a;ju[e]&&BC.warn(`Diagram with id ${e} already registered. Overwriting.`),ju[e]=t,i&&$2(e,i),ER(e,t.styles),(a=t.injectUtils)==null||a.call(t,BC,zR,le,ay,NR,qR(),()=>{})},"registerDiagram"),qg=S(e=>{if(e in ju)return ju[e];throw new IR(e)},"getDiagram"),Bl,IR=(Bl=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},S(Bl,"DiagramNotFoundError"),Bl),jR={value:()=>{}};function K2(){for(var e=0,t=arguments.length,i={},a;e<t;++e){if(!(a=arguments[e]+"")||a in i||/[\s.]/.test(a))throw new Error("illegal type: "+a);i[a]=[]}return new ku(i)}function ku(e){this._=e}function HR(e,t){return e.trim().split(/^|\s+/).map(function(i){var a="",s=i.indexOf(".");if(s>=0&&(a=i.slice(s+1),i=i.slice(0,s)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:a}})}ku.prototype=K2.prototype={constructor:ku,on:function(e,t){var i=this._,a=HR(e+"",i),s,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((s=(e=a[l]).type)&&(s=UR(i[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<c;)if(s=(e=a[l]).type)i[s]=EC(i[s],e.name,t);else if(t==null)for(s in i)i[s]=EC(i[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new ku(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var i=new Array(s),a=0,s,l;a<s;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,s=l.length;a<s;++a)l[a].value.apply(t,i)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],s=0,l=a.length;s<l;++s)a[s].value.apply(t,i)}};function UR(e,t){for(var i=0,a=e.length,s;i<a;++i)if((s=e[i]).name===t)return s.value}function EC(e,t,i){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=jR,e=e.slice(0,a).concat(e.slice(a+1));break}return i!=null&&e.push({name:t,value:i}),e}var Ig="http://www.w3.org/1999/xhtml";const LC={svg:"http://www.w3.org/2000/svg",xhtml:Ig,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Sd(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),LC.hasOwnProperty(t)?{space:LC[t],local:e}:e}function PR(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===Ig&&t.documentElement.namespaceURI===Ig?t.createElement(e):t.createElementNS(i,e)}}function WR(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function J2(e){var t=Sd(e);return(t.local?WR:PR)(t)}function YR(){}function ny(e){return e==null?YR:function(){return this.querySelector(e)}}function GR(e){typeof e!="function"&&(e=ny(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=new Array(c),u,f,p=0;p<c;++p)(u=l[p])&&(f=e.call(u,u.__data__,p,l))&&("__data__"in u&&(f.__data__=u.__data__),h[p]=f);return new Zi(a,this._parents)}function XR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function VR(){return[]}function tk(e){return e==null?VR:function(){return this.querySelectorAll(e)}}function ZR(e){return function(){return XR(e.apply(this,arguments))}}function QR(e){typeof e=="function"?e=ZR(e):e=tk(e);for(var t=this._groups,i=t.length,a=[],s=[],l=0;l<i;++l)for(var c=t[l],h=c.length,u,f=0;f<h;++f)(u=c[f])&&(a.push(e.call(u,u.__data__,f,c)),s.push(u));return new Zi(a,s)}function ek(e){return function(){return this.matches(e)}}function ik(e){return function(t){return t.matches(e)}}var KR=Array.prototype.find;function JR(e){return function(){return KR.call(this.children,e)}}function t4(){return this.firstElementChild}function e4(e){return this.select(e==null?t4:JR(typeof e=="function"?e:ik(e)))}var i4=Array.prototype.filter;function r4(){return Array.from(this.children)}function a4(e){return function(){return i4.call(this.children,e)}}function n4(e){return this.selectAll(e==null?r4:a4(typeof e=="function"?e:ik(e)))}function s4(e){typeof e!="function"&&(e=ek(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],u,f=0;f<c;++f)(u=l[f])&&e.call(u,u.__data__,f,l)&&h.push(u);return new Zi(a,this._parents)}function rk(e){return new Array(e.length)}function l4(){return new Zi(this._enter||this._groups.map(rk),this._parents)}function Uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uu.prototype={constructor:Uu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function o4(e){return function(){return e}}function c4(e,t,i,a,s,l){for(var c=0,h,u=t.length,f=l.length;c<f;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):i[c]=new Uu(e,l[c]);for(;c<u;++c)(h=t[c])&&(s[c]=h)}function h4(e,t,i,a,s,l,c){var h,u,f=new Map,p=t.length,g=l.length,x=new Array(p),m;for(h=0;h<p;++h)(u=t[h])&&(x[h]=m=c.call(u,u.__data__,h,t)+"",f.has(m)?s[h]=u:f.set(m,u));for(h=0;h<g;++h)m=c.call(e,l[h],h,l)+"",(u=f.get(m))?(a[h]=u,u.__data__=l[h],f.delete(m)):i[h]=new Uu(e,l[h]);for(h=0;h<p;++h)(u=t[h])&&f.get(x[h])===u&&(s[h]=u)}function u4(e){return e.__data__}function d4(e,t){if(!arguments.length)return Array.from(this,u4);var i=t?h4:c4,a=this._parents,s=this._groups;typeof e!="function"&&(e=o4(e));for(var l=s.length,c=new Array(l),h=new Array(l),u=new Array(l),f=0;f<l;++f){var p=a[f],g=s[f],x=g.length,m=f4(e.call(p,p&&p.__data__,f,a)),v=m.length,C=h[f]=new Array(v),k=c[f]=new Array(v),T=u[f]=new Array(x);i(p,g,C,k,T,m,t);for(var _=0,E=0,F,D;_<v;++_)if(F=C[_]){for(_>=E&&(E=_+1);!(D=k[E])&&++E<v;);F._next=D||null}}return c=new Zi(c,a),c._enter=h,c._exit=u,c}function f4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function p4(){return new Zi(this._exit||this._groups.map(rk),this._parents)}function g4(e,t,i){var a=this.enter(),s=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),i==null?l.remove():i(l),a&&s?a.merge(s).order():s}function m4(e){for(var t=e.selection?e.selection():e,i=this._groups,a=t._groups,s=i.length,l=a.length,c=Math.min(s,l),h=new Array(s),u=0;u<c;++u)for(var f=i[u],p=a[u],g=f.length,x=h[u]=new Array(g),m,v=0;v<g;++v)(m=f[v]||p[v])&&(x[v]=m);for(;u<s;++u)h[u]=i[u];return new Zi(h,this._parents)}function y4(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var a=e[t],s=a.length-1,l=a[s],c;--s>=0;)(c=a[s])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function x4(e){e||(e=b4);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,a=i.length,s=new Array(a),l=0;l<a;++l){for(var c=i[l],h=c.length,u=s[l]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(u[p]=f);u.sort(t)}return new Zi(s,this._parents).order()}function b4(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function C4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function v4(){return Array.from(this)}function k4(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length;s<l;++s){var c=a[s];if(c)return c}return null}function S4(){let e=0;for(const t of this)++e;return e}function T4(){return!this.node()}function w4(e){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var s=t[i],l=0,c=s.length,h;l<c;++l)(h=s[l])&&e.call(h,h.__data__,l,s);return this}function _4(e){return function(){this.removeAttribute(e)}}function B4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function E4(e,t){return function(){this.setAttribute(e,t)}}function L4(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function A4(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function M4(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function R4(e,t){var i=Sd(e);if(arguments.length<2){var a=this.node();return i.local?a.getAttributeNS(i.space,i.local):a.getAttribute(i)}return this.each((t==null?i.local?B4:_4:typeof t=="function"?i.local?M4:A4:i.local?L4:E4)(i,t))}function ak(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function F4(e){return function(){this.style.removeProperty(e)}}function O4(e,t,i){return function(){this.style.setProperty(e,t,i)}}function D4(e,t,i){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,i)}}function $4(e,t,i){return arguments.length>1?this.each((t==null?F4:typeof t=="function"?D4:O4)(e,t,i??"")):Ml(this.node(),e)}function Ml(e,t){return e.style.getPropertyValue(t)||ak(e).getComputedStyle(e,null).getPropertyValue(t)}function z4(e){return function(){delete this[e]}}function N4(e,t){return function(){this[e]=t}}function q4(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function I4(e,t){return arguments.length>1?this.each((t==null?z4:typeof t=="function"?q4:N4)(e,t)):this.node()[e]}function nk(e){return e.trim().split(/^|\s+/)}function sy(e){return e.classList||new sk(e)}function sk(e){this._node=e,this._names=nk(e.getAttribute("class")||"")}sk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lk(e,t){for(var i=sy(e),a=-1,s=t.length;++a<s;)i.add(t[a])}function ok(e,t){for(var i=sy(e),a=-1,s=t.length;++a<s;)i.remove(t[a])}function j4(e){return function(){lk(this,e)}}function H4(e){return function(){ok(this,e)}}function U4(e,t){return function(){(t.apply(this,arguments)?lk:ok)(this,e)}}function P4(e,t){var i=nk(e+"");if(arguments.length<2){for(var a=sy(this.node()),s=-1,l=i.length;++s<l;)if(!a.contains(i[s]))return!1;return!0}return this.each((typeof t=="function"?U4:t?j4:H4)(i,t))}function W4(){this.textContent=""}function Y4(e){return function(){this.textContent=e}}function G4(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function X4(e){return arguments.length?this.each(e==null?W4:(typeof e=="function"?G4:Y4)(e)):this.node().textContent}function V4(){this.innerHTML=""}function Z4(e){return function(){this.innerHTML=e}}function Q4(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function K4(e){return arguments.length?this.each(e==null?V4:(typeof e=="function"?Q4:Z4)(e)):this.node().innerHTML}function J4(){this.nextSibling&&this.parentNode.appendChild(this)}function tF(){return this.each(J4)}function eF(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function iF(){return this.each(eF)}function rF(e){var t=typeof e=="function"?e:J2(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function aF(){return null}function nF(e,t){var i=typeof e=="function"?e:J2(e),a=t==null?aF:typeof t=="function"?t:ny(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),a.apply(this,arguments)||null)})}function sF(){var e=this.parentNode;e&&e.removeChild(this)}function lF(){return this.each(sF)}function oF(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cF(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hF(e){return this.select(e?cF:oF)}function uF(e){return arguments.length?this.property("__data__",e):this.node().__data__}function dF(e){return function(t){e.call(this,t,this.__data__)}}function fF(e){return e.trim().split(/^|\s+/).map(function(t){var i="",a=t.indexOf(".");return a>=0&&(i=t.slice(a+1),t=t.slice(0,a)),{type:t,name:i}})}function pF(e){return function(){var t=this.__on;if(t){for(var i=0,a=-1,s=t.length,l;i<s;++i)l=t[i],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++a]=l;++a?t.length=a:delete this.__on}}}function gF(e,t,i){return function(){var a=this.__on,s,l=dF(t);if(a){for(var c=0,h=a.length;c<h;++c)if((s=a[c]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=i),s.value=t;return}}this.addEventListener(e.type,l,i),s={type:e.type,name:e.name,value:t,listener:l,options:i},a?a.push(s):this.__on=[s]}}function mF(e,t,i){var a=fF(e+""),s,l=a.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,f=h.length,p;u<f;++u)for(s=0,p=h[u];s<l;++s)if((c=a[s]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?gF:pF,s=0;s<l;++s)this.each(h(a[s],t,i));return this}function ck(e,t,i){var a=ak(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,i):(s=a.document.createEvent("Event"),i?(s.initEvent(t,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function yF(e,t){return function(){return ck(this,e,t)}}function xF(e,t){return function(){return ck(this,e,t.apply(this,arguments))}}function bF(e,t){return this.each((typeof t=="function"?xF:yF)(e,t))}function*CF(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length,c;s<l;++s)(c=a[s])&&(yield c)}var hk=[null];function Zi(e,t){this._groups=e,this._parents=t}function Rc(){return new Zi([[document.documentElement]],hk)}function vF(){return this}Zi.prototype=Rc.prototype={constructor:Zi,select:GR,selectAll:QR,selectChild:e4,selectChildren:n4,filter:s4,data:d4,enter:l4,exit:p4,join:g4,merge:m4,selection:vF,order:y4,sort:x4,call:C4,nodes:v4,node:k4,size:S4,empty:T4,each:w4,attr:R4,style:$4,property:I4,classed:P4,text:X4,html:K4,raise:tF,lower:iF,append:rF,insert:nF,remove:lF,clone:hF,datum:uF,on:mF,dispatch:bF,[Symbol.iterator]:CF};function Xt(e){return typeof e=="string"?new Zi([[document.querySelector(e)]],[document.documentElement]):new Zi([[e]],hk)}function ly(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function uk(e,t){var i=Object.create(e.prototype);for(var a in t)i[a]=t[a];return i}function Fc(){}var mc=.7,Pu=1/mc,fl="\\s*([+-]?\\d+)\\s*",yc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kF=/^#([0-9a-f]{3,8})$/,SF=new RegExp(`^rgb\\(${fl},${fl},${fl}\\)$`),TF=new RegExp(`^rgb\\(${Gr},${Gr},${Gr}\\)$`),wF=new RegExp(`^rgba\\(${fl},${fl},${fl},${yc}\\)$`),_F=new RegExp(`^rgba\\(${Gr},${Gr},${Gr},${yc}\\)$`),BF=new RegExp(`^hsl\\(${yc},${Gr},${Gr}\\)$`),EF=new RegExp(`^hsla\\(${yc},${Gr},${Gr},${yc}\\)$`),AC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ly(Fc,xc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MC,formatHex:MC,formatHex8:LF,formatHsl:AF,formatRgb:RC,toString:RC});function MC(){return this.rgb().formatHex()}function LF(){return this.rgb().formatHex8()}function AF(){return dk(this).formatHsl()}function RC(){return this.rgb().formatRgb()}function xc(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=kF.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?FC(t):i===3?new Ni(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?au(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=SF.exec(e))?new Ni(t[1],t[2],t[3],1):(t=TF.exec(e))?new Ni(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wF.exec(e))?au(t[1],t[2],t[3],t[4]):(t=_F.exec(e))?au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=BF.exec(e))?$C(t[1],t[2]/100,t[3]/100,1):(t=EF.exec(e))?$C(t[1],t[2]/100,t[3]/100,t[4]):AC.hasOwnProperty(e)?FC(AC[e]):e==="transparent"?new Ni(NaN,NaN,NaN,0):null}function FC(e){return new Ni(e>>16&255,e>>8&255,e&255,1)}function au(e,t,i,a){return a<=0&&(e=t=i=NaN),new Ni(e,t,i,a)}function MF(e){return e instanceof Fc||(e=xc(e)),e?(e=e.rgb(),new Ni(e.r,e.g,e.b,e.opacity)):new Ni}function jg(e,t,i,a){return arguments.length===1?MF(e):new Ni(e,t,i,a??1)}function Ni(e,t,i,a){this.r=+e,this.g=+t,this.b=+i,this.opacity=+a}ly(Ni,jg,uk(Fc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ni(Kn(this.r),Kn(this.g),Kn(this.b),Wu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:OC,formatHex:OC,formatHex8:RF,formatRgb:DC,toString:DC}));function OC(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}`}function RF(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}${Vn((isNaN(this.opacity)?1:this.opacity)*255)}`}function DC(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${Kn(this.r)}, ${Kn(this.g)}, ${Kn(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vn(e){return e=Kn(e),(e<16?"0":"")+e.toString(16)}function $C(e,t,i,a){return a<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new wr(e,t,i,a)}function dk(e){if(e instanceof wr)return new wr(e.h,e.s,e.l,e.opacity);if(e instanceof Fc||(e=xc(e)),!e)return new wr;if(e instanceof wr)return e;e=e.rgb();var t=e.r/255,i=e.g/255,a=e.b/255,s=Math.min(t,i,a),l=Math.max(t,i,a),c=NaN,h=l-s,u=(l+s)/2;return h?(t===l?c=(i-a)/h+(i<a)*6:i===l?c=(a-t)/h+2:c=(t-i)/h+4,h/=u<.5?l+s:2-l-s,c*=60):h=u>0&&u<1?0:c,new wr(c,h,u,e.opacity)}function FF(e,t,i,a){return arguments.length===1?dk(e):new wr(e,t,i,a??1)}function wr(e,t,i,a){this.h=+e,this.s=+t,this.l=+i,this.opacity=+a}ly(wr,FF,uk(Fc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new wr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,a=i+(i<.5?i:1-i)*t,s=2*i-a;return new Ni(og(e>=240?e-240:e+120,s,a),og(e,s,a),og(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new wr(zC(this.h),nu(this.s),nu(this.l),Wu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${zC(this.h)}, ${nu(this.s)*100}%, ${nu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zC(e){return e=(e||0)%360,e<0?e+360:e}function nu(e){return Math.max(0,Math.min(1,e||0))}function og(e,t,i){return(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)*255}const oy=e=>()=>e;function fk(e,t){return function(i){return e+i*t}}function OF(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(a){return Math.pow(e+a*t,i)}}function K7(e,t){var i=t-e;return i?fk(e,i>180||i<-180?i-360*Math.round(i/360):i):oy(isNaN(e)?t:e)}function DF(e){return(e=+e)==1?pk:function(t,i){return i-t?OF(t,i,e):oy(isNaN(t)?i:t)}}function pk(e,t){var i=t-e;return i?fk(e,i):oy(isNaN(e)?t:e)}const NC=(function e(t){var i=DF(t);function a(s,l){var c=i((s=jg(s)).r,(l=jg(l)).r),h=i(s.g,l.g),u=i(s.b,l.b),f=pk(s.opacity,l.opacity);return function(p){return s.r=c(p),s.g=h(p),s.b=u(p),s.opacity=f(p),s+""}}return a.gamma=e,a})(1);function gn(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var Hg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cg=new RegExp(Hg.source,"g");function $F(e){return function(){return e}}function zF(e){return function(t){return e(t)+""}}function NF(e,t){var i=Hg.lastIndex=cg.lastIndex=0,a,s,l,c=-1,h=[],u=[];for(e=e+"",t=t+"";(a=Hg.exec(e))&&(s=cg.exec(t));)(l=s.index)>i&&(l=t.slice(i,l),h[c]?h[c]+=l:h[++c]=l),(a=a[0])===(s=s[0])?h[c]?h[c]+=s:h[++c]=s:(h[++c]=null,u.push({i:c,x:gn(a,s)})),i=cg.lastIndex;return i<t.length&&(l=t.slice(i),h[c]?h[c]+=l:h[++c]=l),h.length<2?u[0]?zF(u[0].x):$F(t):(t=u.length,function(f){for(var p=0,g;p<t;++p)h[(g=u[p]).i]=g.x(f);return h.join("")})}var qC=180/Math.PI,Ug={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gk(e,t,i,a,s,l){var c,h,u;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(u=e*i+t*a)&&(i-=e*u,a-=t*u),(h=Math.sqrt(i*i+a*a))&&(i/=h,a/=h,u/=h),e*a<t*i&&(e=-e,t=-t,u=-u,c=-c),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*qC,skewX:Math.atan(u)*qC,scaleX:c,scaleY:h}}var su;function qF(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ug:gk(t.a,t.b,t.c,t.d,t.e,t.f)}function IF(e){return e==null||(su||(su=document.createElementNS("http://www.w3.org/2000/svg","g")),su.setAttribute("transform",e),!(e=su.transform.baseVal.consolidate()))?Ug:(e=e.matrix,gk(e.a,e.b,e.c,e.d,e.e,e.f))}function mk(e,t,i,a){function s(f){return f.length?f.pop()+" ":""}function l(f,p,g,x,m,v){if(f!==g||p!==x){var C=m.push("translate(",null,t,null,i);v.push({i:C-4,x:gn(f,g)},{i:C-2,x:gn(p,x)})}else(g||x)&&m.push("translate("+g+t+x+i)}function c(f,p,g,x){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),x.push({i:g.push(s(g)+"rotate(",null,a)-2,x:gn(f,p)})):p&&g.push(s(g)+"rotate("+p+a)}function h(f,p,g,x){f!==p?x.push({i:g.push(s(g)+"skewX(",null,a)-2,x:gn(f,p)}):p&&g.push(s(g)+"skewX("+p+a)}function u(f,p,g,x,m,v){if(f!==g||p!==x){var C=m.push(s(m)+"scale(",null,",",null,")");v.push({i:C-4,x:gn(f,g)},{i:C-2,x:gn(p,x)})}else(g!==1||x!==1)&&m.push(s(m)+"scale("+g+","+x+")")}return function(f,p){var g=[],x=[];return f=e(f),p=e(p),l(f.translateX,f.translateY,p.translateX,p.translateY,g,x),c(f.rotate,p.rotate,g,x),h(f.skewX,p.skewX,g,x),u(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,x),f=p=null,function(m){for(var v=-1,C=x.length,k;++v<C;)g[(k=x[v]).i]=k.x(m);return g.join("")}}}var jF=mk(qF,"px, ","px)","deg)"),HF=mk(IF,", ",")",")"),Rl=0,ec=0,Wo=0,yk=1e3,Yu,ic,Gu=0,rs=0,Td=0,bc=typeof performance=="object"&&performance.now?performance:Date,xk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cy(){return rs||(xk(UF),rs=bc.now()+Td)}function UF(){rs=0}function Xu(){this._call=this._time=this._next=null}Xu.prototype=bk.prototype={constructor:Xu,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?cy():+i)+(t==null?0:+t),!this._next&&ic!==this&&(ic?ic._next=this:Yu=this,ic=this),this._call=e,this._time=i,Pg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pg())}};function bk(e,t,i){var a=new Xu;return a.restart(e,t,i),a}function PF(){cy(),++Rl;for(var e=Yu,t;e;)(t=rs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rl}function IC(){rs=(Gu=bc.now())+Td,Rl=ec=0;try{PF()}finally{Rl=0,YF(),rs=0}}function WF(){var e=bc.now(),t=e-Gu;t>yk&&(Td-=t,Gu=e)}function YF(){for(var e,t=Yu,i,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(i=t._next,t._next=null,t=e?e._next=i:Yu=i);ic=e,Pg(a)}function Pg(e){if(!Rl){ec&&(ec=clearTimeout(ec));var t=e-rs;t>24?(e<1/0&&(ec=setTimeout(IC,e-bc.now()-Td)),Wo&&(Wo=clearInterval(Wo))):(Wo||(Gu=bc.now(),Wo=setInterval(WF,yk)),Rl=1,xk(IC))}}function jC(e,t,i){var a=new Xu;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,i),a}var GF=K2("start","end","cancel","interrupt"),XF=[],Ck=0,HC=1,Wg=2,Su=3,UC=4,Yg=5,Tu=6;function wd(e,t,i,a,s,l){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;VF(e,i,{name:t,index:a,group:s,on:GF,tween:XF,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Ck})}function hy(e,t){var i=Or(e,t);if(i.state>Ck)throw new Error("too late; already scheduled");return i}function Kr(e,t){var i=Or(e,t);if(i.state>Su)throw new Error("too late; already running");return i}function Or(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function VF(e,t,i){var a=e.__transition,s;a[t]=i,i.timer=bk(l,0,i.time);function l(f){i.state=HC,i.timer.restart(c,i.delay,i.time),i.delay<=f&&c(f-i.delay)}function c(f){var p,g,x,m;if(i.state!==HC)return u();for(p in a)if(m=a[p],m.name===i.name){if(m.state===Su)return jC(c);m.state===UC?(m.state=Tu,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete a[p]):+p<t&&(m.state=Tu,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete a[p])}if(jC(function(){i.state===Su&&(i.state=UC,i.timer.restart(h,i.delay,i.time),h(f))}),i.state=Wg,i.on.call("start",e,e.__data__,i.index,i.group),i.state===Wg){for(i.state=Su,s=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(m=i.tween[p].value.call(e,e.__data__,i.index,i.group))&&(s[++g]=m);s.length=g+1}}function h(f){for(var p=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(u),i.state=Yg,1),g=-1,x=s.length;++g<x;)s[g].call(e,p);i.state===Yg&&(i.on.call("end",e,e.__data__,i.index,i.group),u())}function u(){i.state=Tu,i.timer.stop(),delete a[t];for(var f in a)return;delete e.__transition}}function ZF(e,t){var i=e.__transition,a,s,l=!0,c;if(i){t=t==null?null:t+"";for(c in i){if((a=i[c]).name!==t){l=!1;continue}s=a.state>Wg&&a.state<Yg,a.state=Tu,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete i[c]}l&&delete e.__transition}}function QF(e){return this.each(function(){ZF(this,e)})}function KF(e,t){var i,a;return function(){var s=Kr(this,e),l=s.tween;if(l!==i){a=i=l;for(var c=0,h=a.length;c<h;++c)if(a[c].name===t){a=a.slice(),a.splice(c,1);break}}s.tween=a}}function JF(e,t,i){var a,s;if(typeof i!="function")throw new Error;return function(){var l=Kr(this,e),c=l.tween;if(c!==a){s=(a=c).slice();for(var h={name:t,value:i},u=0,f=s.length;u<f;++u)if(s[u].name===t){s[u]=h;break}u===f&&s.push(h)}l.tween=s}}function t6(e,t){var i=this._id;if(e+="",arguments.length<2){for(var a=Or(this.node(),i).tween,s=0,l=a.length,c;s<l;++s)if((c=a[s]).name===e)return c.value;return null}return this.each((t==null?KF:JF)(i,e,t))}function uy(e,t,i){var a=e._id;return e.each(function(){var s=Kr(this,a);(s.value||(s.value={}))[t]=i.apply(this,arguments)}),function(s){return Or(s,a).value[t]}}function vk(e,t){var i;return(typeof t=="number"?gn:t instanceof xc?NC:(i=xc(t))?(t=i,NC):NF)(e,t)}function e6(e){return function(){this.removeAttribute(e)}}function i6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function r6(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttribute(e);return c===s?null:c===a?l:l=t(a=c,i)}}function a6(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===s?null:c===a?l:l=t(a=c,i)}}function n6(e,t,i){var a,s,l;return function(){var c,h=i(this),u;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),u=h+"",c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h)))}}function s6(e,t,i){var a,s,l;return function(){var c,h=i(this),u;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),u=h+"",c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h)))}}function l6(e,t){var i=Sd(e),a=i==="transform"?HF:vk;return this.attrTween(e,typeof t=="function"?(i.local?s6:n6)(i,a,uy(this,"attr."+e,t)):t==null?(i.local?i6:e6)(i):(i.local?a6:r6)(i,a,t))}function o6(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function c6(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function h6(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&c6(e,l)),i}return s._value=t,s}function u6(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&o6(e,l)),i}return s._value=t,s}function d6(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;var a=Sd(e);return this.tween(i,(a.local?h6:u6)(a,t))}function f6(e,t){return function(){hy(this,e).delay=+t.apply(this,arguments)}}function p6(e,t){return t=+t,function(){hy(this,e).delay=t}}function g6(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?f6:p6)(t,e)):Or(this.node(),t).delay}function m6(e,t){return function(){Kr(this,e).duration=+t.apply(this,arguments)}}function y6(e,t){return t=+t,function(){Kr(this,e).duration=t}}function x6(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?m6:y6)(t,e)):Or(this.node(),t).duration}function b6(e,t){if(typeof t!="function")throw new Error;return function(){Kr(this,e).ease=t}}function C6(e){var t=this._id;return arguments.length?this.each(b6(t,e)):Or(this.node(),t).ease}function v6(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;Kr(this,e).ease=i}}function k6(e){if(typeof e!="function")throw new Error;return this.each(v6(this._id,e))}function S6(e){typeof e!="function"&&(e=ek(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],u,f=0;f<c;++f)(u=l[f])&&e.call(u,u.__data__,f,l)&&h.push(u);return new _a(a,this._parents,this._name,this._id)}function T6(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,a=t.length,s=i.length,l=Math.min(a,s),c=new Array(a),h=0;h<l;++h)for(var u=t[h],f=i[h],p=u.length,g=c[h]=new Array(p),x,m=0;m<p;++m)(x=u[m]||f[m])&&(g[m]=x);for(;h<a;++h)c[h]=t[h];return new _a(c,this._parents,this._name,this._id)}function w6(e){return(e+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");return i>=0&&(t=t.slice(0,i)),!t||t==="start"})}function _6(e,t,i){var a,s,l=w6(t)?hy:Kr;return function(){var c=l(this,e),h=c.on;h!==a&&(s=(a=h).copy()).on(t,i),c.on=s}}function B6(e,t){var i=this._id;return arguments.length<2?Or(this.node(),i).on.on(e):this.each(_6(i,e,t))}function E6(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function L6(){return this.on("end.remove",E6(this._id))}function A6(e){var t=this._name,i=this._id;typeof e!="function"&&(e=ny(e));for(var a=this._groups,s=a.length,l=new Array(s),c=0;c<s;++c)for(var h=a[c],u=h.length,f=l[c]=new Array(u),p,g,x=0;x<u;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,wd(f[x],t,i,x,f,Or(p,i)));return new _a(l,this._parents,t,i)}function M6(e){var t=this._name,i=this._id;typeof e!="function"&&(e=tk(e));for(var a=this._groups,s=a.length,l=[],c=[],h=0;h<s;++h)for(var u=a[h],f=u.length,p,g=0;g<f;++g)if(p=u[g]){for(var x=e.call(p,p.__data__,g,u),m,v=Or(p,i),C=0,k=x.length;C<k;++C)(m=x[C])&&wd(m,t,i,C,x,v);l.push(x),c.push(p)}return new _a(l,c,t,i)}var R6=Rc.prototype.constructor;function F6(){return new R6(this._groups,this._parents)}function O6(e,t){var i,a,s;return function(){var l=Ml(this,e),c=(this.style.removeProperty(e),Ml(this,e));return l===c?null:l===i&&c===a?s:s=t(i=l,a=c)}}function kk(e){return function(){this.style.removeProperty(e)}}function D6(e,t,i){var a,s=i+"",l;return function(){var c=Ml(this,e);return c===s?null:c===a?l:l=t(a=c,i)}}function $6(e,t,i){var a,s,l;return function(){var c=Ml(this,e),h=i(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(e),Ml(this,e))),c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h))}}function z6(e,t){var i,a,s,l="style."+t,c="end."+l,h;return function(){var u=Kr(this,e),f=u.on,p=u.value[l]==null?h||(h=kk(t)):void 0;(f!==i||s!==p)&&(a=(i=f).copy()).on(c,s=p),u.on=a}}function N6(e,t,i){var a=(e+="")=="transform"?jF:vk;return t==null?this.styleTween(e,O6(e,a)).on("end.style."+e,kk(e)):typeof t=="function"?this.styleTween(e,$6(e,a,uy(this,"style."+e,t))).each(z6(this._id,e)):this.styleTween(e,D6(e,a,t),i).on("end.style."+e,null)}function q6(e,t,i){return function(a){this.style.setProperty(e,t.call(this,a),i)}}function I6(e,t,i){var a,s;function l(){var c=t.apply(this,arguments);return c!==s&&(a=(s=c)&&q6(e,c,i)),a}return l._value=t,l}function j6(e,t,i){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,I6(e,t,i??""))}function H6(e){return function(){this.textContent=e}}function U6(e){return function(){var t=e(this);this.textContent=t??""}}function P6(e){return this.tween("text",typeof e=="function"?U6(uy(this,"text",e)):H6(e==null?"":e+""))}function W6(e){return function(t){this.textContent=e.call(this,t)}}function Y6(e){var t,i;function a(){var s=e.apply(this,arguments);return s!==i&&(t=(i=s)&&W6(s)),t}return a._value=e,a}function G6(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Y6(e))}function X6(){for(var e=this._name,t=this._id,i=Sk(),a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,u,f=0;f<h;++f)if(u=c[f]){var p=Or(u,t);wd(u,e,i,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new _a(a,this._parents,e,i)}function V6(){var e,t,i=this,a=i._id,s=i.size();return new Promise(function(l,c){var h={value:c},u={value:function(){--s===0&&l()}};i.each(function(){var f=Kr(this,a),p=f.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(u)),f.on=t}),s===0&&l()})}var Z6=0;function _a(e,t,i,a){this._groups=e,this._parents=t,this._name=i,this._id=a}function Sk(){return++Z6}var Ca=Rc.prototype;_a.prototype={constructor:_a,select:A6,selectAll:M6,selectChild:Ca.selectChild,selectChildren:Ca.selectChildren,filter:S6,merge:T6,selection:F6,transition:X6,call:Ca.call,nodes:Ca.nodes,node:Ca.node,size:Ca.size,empty:Ca.empty,each:Ca.each,on:B6,attr:l6,attrTween:d6,style:N6,styleTween:j6,text:P6,textTween:G6,remove:L6,tween:t6,delay:g6,duration:x6,ease:C6,easeVarying:k6,end:V6,[Symbol.iterator]:Ca[Symbol.iterator]};function Q6(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var K6={time:null,delay:0,duration:250,ease:Q6};function J6(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}function tO(e){var t,i;e instanceof _a?(t=e._id,e=e._name):(t=Sk(),(i=K6).time=cy(),e=e==null?null:e+"");for(var a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,u,f=0;f<h;++f)(u=c[f])&&wd(u,e,t,f,c,i||J6(u,t));return new _a(a,this._parents,e,t)}Rc.prototype.interrupt=QF;Rc.prototype.transition=tO;const Gg=Math.PI,Xg=2*Gg,Wn=1e-6,eO=Xg-Wn;function Tk(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function iO(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Tk;const i=10**t;return function(a){this._+=a[0];for(let s=1,l=a.length;s<l;++s)this._+=Math.round(arguments[s]*i)/i+a[s]}}class rO{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Tk:iO(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,a,s){this._append`Q${+t},${+i},${this._x1=+a},${this._y1=+s}`}bezierCurveTo(t,i,a,s,l,c){this._append`C${+t},${+i},${+a},${+s},${this._x1=+l},${this._y1=+c}`}arcTo(t,i,a,s,l){if(t=+t,i=+i,a=+a,s=+s,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,u=a-t,f=s-i,p=c-t,g=h-i,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(x>Wn)if(!(Math.abs(g*u-f*p)>Wn)||!l)this._append`L${this._x1=t},${this._y1=i}`;else{let m=a-c,v=s-h,C=u*u+f*f,k=m*m+v*v,T=Math.sqrt(C),_=Math.sqrt(x),E=l*Math.tan((Gg-Math.acos((C+x-k)/(2*T*_)))/2),F=E/_,D=E/T;Math.abs(F-1)>Wn&&this._append`L${t+F*p},${i+F*g}`,this._append`A${l},${l},0,0,${+(g*m>p*v)},${this._x1=t+D*u},${this._y1=i+D*f}`}}arc(t,i,a,s,l,c){if(t=+t,i=+i,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(s),u=a*Math.sin(s),f=t+h,p=i+u,g=1^c,x=c?s-l:l-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Wn||Math.abs(this._y1-p)>Wn)&&this._append`L${f},${p}`,a&&(x<0&&(x=x%Xg+Xg),x>eO?this._append`A${a},${a},0,1,${g},${t-h},${i-u}A${a},${a},0,1,${g},${this._x1=f},${this._y1=p}`:x>Wn&&this._append`A${a},${a},0,${+(x>=Gg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=i+a*Math.sin(l)}`)}rect(t,i,a,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${a=+a}v${+s}h${-a}Z`}toString(){return this._}}function rl(e){return function(){return e}}const J7=Math.abs,tI=Math.atan2,eI=Math.cos,iI=Math.max,rI=Math.min,aI=Math.sin,nI=Math.sqrt,PC=1e-12,dy=Math.PI,WC=dy/2,sI=2*dy;function lI(e){return e>1?0:e<-1?dy:Math.acos(e)}function oI(e){return e>=1?WC:e<=-1?-WC:Math.asin(e)}function aO(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const a=Math.floor(i);if(!(a>=0))throw new RangeError(`invalid digits: ${i}`);t=a}return e},()=>new rO(t)}function nO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wk(e){this._context=e}wk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uc(e){return new wk(e)}function sO(e){return e[0]}function lO(e){return e[1]}function oO(e,t){var i=rl(!0),a=null,s=uc,l=null,c=aO(h);e=typeof e=="function"?e:e===void 0?sO:rl(e),t=typeof t=="function"?t:t===void 0?lO:rl(t);function h(u){var f,p=(u=nO(u)).length,g,x=!1,m;for(a==null&&(l=s(m=c())),f=0;f<=p;++f)!(f<p&&i(g=u[f],f,u))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,f,u),+t(g,f,u));if(m)return l=null,m+""||null}return h.x=function(u){return arguments.length?(e=typeof u=="function"?u:rl(+u),h):e},h.y=function(u){return arguments.length?(t=typeof u=="function"?u:rl(+u),h):t},h.defined=function(u){return arguments.length?(i=typeof u=="function"?u:rl(!!u),h):i},h.curve=function(u){return arguments.length?(s=u,a!=null&&(l=s(a)),h):s},h.context=function(u){return arguments.length?(u==null?a=l=null:l=s(a=u),h):a},h}class _k{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i);break}}this._x0=t,this._y0=i}}function Bk(e){return new _k(e,!0)}function Ek(e){return new _k(e,!1)}function Cn(){}function Vu(e,t,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+i)/6)}function _d(e){this._context=e}_d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Vu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vg(e){return new _d(e)}function Lk(e){this._context=e}Lk.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cO(e){return new Lk(e)}function Ak(e){this._context=e}Ak.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 3:this._point=4;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hO(e){return new Ak(e)}function Mk(e,t){this._basis=new _d(e),this._beta=t}Mk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,i=e.length-1;if(i>0)for(var a=e[0],s=t[0],l=e[i]-a,c=t[i]-s,h=-1,u;++h<=i;)u=h/i,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+u*l),this._beta*t[h]+(1-this._beta)*(s+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const uO=(function e(t){function i(a){return t===1?new _d(a):new Mk(a,t)}return i.beta=function(a){return e(+a)},i})(.85);function Zu(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function fy(e,t){this._context=e,this._k=(1-t)/6}fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Zu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rk=(function e(t){function i(a){return new fy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function py(e,t){this._context=e,this._k=(1-t)/6}py.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dO=(function e(t){function i(a){return new py(a,t)}return i.tension=function(a){return e(+a)},i})(0);function gy(e,t){this._context=e,this._k=(1-t)/6}gy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fO=(function e(t){function i(a){return new gy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function my(e,t,i){var a=e._x1,s=e._y1,l=e._x2,c=e._y2;if(e._l01_a>PC){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,s=(s*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>PC){var f=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,p=3*e._l23_a*(e._l23_a+e._l12_a);l=(l*f+e._x1*e._l23_2a-t*e._l12_2a)/p,c=(c*f+e._y1*e._l23_2a-i*e._l12_2a)/p}e._context.bezierCurveTo(a,s,l,c,e._x2,e._y2)}function Fk(e,t){this._context=e,this._alpha=t}Fk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:my(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ok=(function e(t){function i(a){return t?new Fk(a,t):new fy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Dk(e,t){this._context=e,this._alpha=t}Dk.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:my(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pO=(function e(t){function i(a){return t?new Dk(a,t):new py(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function $k(e,t){this._context=e,this._alpha=t}$k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:my(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gO=(function e(t){function i(a){return t?new $k(a,t):new gy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function zk(e){this._context=e}zk.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function mO(e){return new zk(e)}function YC(e){return e<0?-1:1}function GC(e,t,i){var a=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(a||s<0&&-0),c=(i-e._y1)/(s||a<0&&-0),h=(l*s+c*a)/(a+s);return(YC(l)+YC(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function XC(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function hg(e,t,i){var a=e._x0,s=e._y0,l=e._x1,c=e._y1,h=(l-a)/3;e._context.bezierCurveTo(a+h,s+h*t,l-h,c-h*i,l,c)}function Qu(e){this._context=e}Qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hg(this,this._t0,XC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hg(this,XC(this,i=GC(this,e,t)),i);break;default:hg(this,this._t0,i=GC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function Nk(e){this._context=new qk(e)}(Nk.prototype=Object.create(Qu.prototype)).point=function(e,t){Qu.prototype.point.call(this,t,e)};function qk(e){this._context=e}qk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,i,a,s,l){this._context.bezierCurveTo(t,e,a,i,l,s)}};function Ik(e){return new Qu(e)}function jk(e){return new Nk(e)}function Hk(e){this._context=e}Hk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),i===2)this._context.lineTo(e[1],t[1]);else for(var a=VC(e),s=VC(t),l=0,c=1;c<i;++l,++c)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[c],t[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function VC(e){var t,i=e.length-1,a,s=new Array(i),l=new Array(i),c=new Array(i);for(s[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<i-1;++t)s[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(s[i-1]=2,l[i-1]=7,c[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)a=s[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(s[i-1]=c[i-1]/l[i-1],t=i-2;t>=0;--t)s[t]=(c[t]-s[t+1])/l[t];for(l[i-1]=(e[i]+s[i-1])/2,t=0;t<i-1;++t)l[t]=2*e[t+1]-s[t+1];return[s,l]}function Uk(e){return new Hk(e)}function Bd(e,t){this._context=e,this._t=t}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}break}}this._x=e,this._y=t}};function Pk(e){return new Bd(e,.5)}function Wk(e){return new Bd(e,0)}function Yk(e){return new Bd(e,1)}function rc(e,t,i){this.k=e,this.x=t,this.y=i}rc.prototype={constructor:rc,scale:function(e){return e===1?this:new rc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};rc.prototype;var yO=S(e=>{var s;const{securityLevel:t}=le();let i=Xt("body");if(t==="sandbox"){const c=((s=Xt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;i=Xt(c.body)}return i.select(`#${e}`)},"selectSvgElement");function yy(e){return typeof e>"u"||e===null}S(yy,"isNothing");function Gk(e){return typeof e=="object"&&e!==null}S(Gk,"isObject");function Xk(e){return Array.isArray(e)?e:yy(e)?[]:[e]}S(Xk,"toArray");function Vk(e,t){var i,a,s,l;if(t)for(l=Object.keys(t),i=0,a=l.length;i<a;i+=1)s=l[i],e[s]=t[s];return e}S(Vk,"extend");function Zk(e,t){var i="",a;for(a=0;a<t;a+=1)i+=e;return i}S(Zk,"repeat");function Qk(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}S(Qk,"isNegativeZero");var xO=yy,bO=Gk,CO=Xk,vO=Zk,kO=Qk,SO=Vk,Ve={isNothing:xO,isObject:bO,toArray:CO,repeat:vO,isNegativeZero:kO,extend:SO};function xy(e,t){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(i+=`
|
|
259
|
+
|
|
260
|
+
`+e.mark.snippet),a+" "+i):a}S(xy,"formatError");function Fl(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=xy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}S(Fl,"YAMLException$1");Fl.prototype=Object.create(Error.prototype);Fl.prototype.constructor=Fl;Fl.prototype.toString=S(function(t){return this.name+": "+xy(this,t)},"toString");var zi=Fl;function wu(e,t,i,a,s){var l="",c="",h=Math.floor(s/2)-1;return a-t>h&&(l=" ... ",t=a-h+l.length),i-a>h&&(c=" ...",i=a+h-c.length),{str:l+e.slice(t,i).replace(/\t/g,"→")+c,pos:a-t+l.length}}S(wu,"getLine");function _u(e,t){return Ve.repeat(" ",t-e.length)+e}S(_u,"padStart");function Kk(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var i=/\r?\n|\r|\0/g,a=[0],s=[],l,c=-1;l=i.exec(e.buffer);)s.push(l.index),a.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var h="",u,f,p=Math.min(e.line+t.linesAfter,s.length).toString().length,g=t.maxLength-(t.indent+p+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)f=wu(e.buffer,a[c-u],s[c-u],e.position-(a[c]-a[c-u]),g),h=Ve.repeat(" ",t.indent)+_u((e.line-u+1).toString(),p)+" | "+f.str+`
|
|
261
|
+
`+h;for(f=wu(e.buffer,a[c],s[c],e.position,g),h+=Ve.repeat(" ",t.indent)+_u((e.line+1).toString(),p)+" | "+f.str+`
|
|
262
|
+
`,h+=Ve.repeat("-",t.indent+p+3+f.pos)+`^
|
|
263
|
+
`,u=1;u<=t.linesAfter&&!(c+u>=s.length);u++)f=wu(e.buffer,a[c+u],s[c+u],e.position-(a[c]-a[c+u]),g),h+=Ve.repeat(" ",t.indent)+_u((e.line+u+1).toString(),p)+" | "+f.str+`
|
|
264
|
+
`;return h.replace(/\n$/,"")}S(Kk,"makeSnippet");var TO=Kk,wO=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_O=["scalar","sequence","mapping"];function Jk(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){t[String(a)]=i})}),t}S(Jk,"compileStyleAliases");function tS(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(wO.indexOf(i)===-1)throw new zi('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(i){return i},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Jk(t.styleAliases||null),_O.indexOf(this.kind)===-1)throw new zi('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}S(tS,"Type$1");var mi=tS;function Zg(e,t){var i=[];return e[t].forEach(function(a){var s=i.length;i.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(s=c)}),i[s]=a}),i}S(Zg,"compileList");function eS(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function a(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(S(a,"collectType"),t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(a);return e}S(eS,"compileMap");function Ku(e){return this.extend(e)}S(Ku,"Schema$1");Ku.prototype.extend=S(function(t){var i=[],a=[];if(t instanceof mi)a.push(t);else if(Array.isArray(t))a=a.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new zi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof mi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new zi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new zi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(l){if(!(l instanceof mi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ku.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(a),s.compiledImplicit=Zg(s,"implicit"),s.compiledExplicit=Zg(s,"explicit"),s.compiledTypeMap=eS(s.compiledImplicit,s.compiledExplicit),s},"extend");var BO=Ku,EO=new mi("tag:yaml.org,2002:str",{kind:"scalar",construct:S(function(e){return e!==null?e:""},"construct")}),LO=new mi("tag:yaml.org,2002:seq",{kind:"sequence",construct:S(function(e){return e!==null?e:[]},"construct")}),AO=new mi("tag:yaml.org,2002:map",{kind:"mapping",construct:S(function(e){return e!==null?e:{}},"construct")}),MO=new BO({explicit:[EO,LO,AO]});function iS(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}S(iS,"resolveYamlNull");function rS(){return null}S(rS,"constructYamlNull");function aS(e){return e===null}S(aS,"isNull");var RO=new mi("tag:yaml.org,2002:null",{kind:"scalar",resolve:iS,construct:rS,predicate:aS,represent:{canonical:S(function(){return"~"},"canonical"),lowercase:S(function(){return"null"},"lowercase"),uppercase:S(function(){return"NULL"},"uppercase"),camelcase:S(function(){return"Null"},"camelcase"),empty:S(function(){return""},"empty")},defaultStyle:"lowercase"});function nS(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}S(nS,"resolveYamlBoolean");function sS(e){return e==="true"||e==="True"||e==="TRUE"}S(sS,"constructYamlBoolean");function lS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}S(lS,"isBoolean");var FO=new mi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:nS,construct:sS,predicate:lS,represent:{lowercase:S(function(e){return e?"true":"false"},"lowercase"),uppercase:S(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:S(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function oS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}S(oS,"isHexCode");function cS(e){return 48<=e&&e<=55}S(cS,"isOctCode");function hS(e){return 48<=e&&e<=57}S(hS,"isDecCode");function uS(e){if(e===null)return!1;var t=e.length,i=0,a=!1,s;if(!t)return!1;if(s=e[i],(s==="-"||s==="+")&&(s=e[++i]),s==="0"){if(i+1===t)return!0;if(s=e[++i],s==="b"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;a=!0}return a&&s!=="_"}if(s==="x"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!oS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}if(s==="o"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!cS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}}if(s==="_")return!1;for(;i<t;i++)if(s=e[i],s!=="_"){if(!hS(e.charCodeAt(i)))return!1;a=!0}return!(!a||s==="_")}S(uS,"resolveYamlInteger");function dS(e){var t=e,i=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return i*parseInt(t.slice(2),2);if(t[1]==="x")return i*parseInt(t.slice(2),16);if(t[1]==="o")return i*parseInt(t.slice(2),8)}return i*parseInt(t,10)}S(dS,"constructYamlInteger");function fS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ve.isNegativeZero(e)}S(fS,"isInteger");var OO=new mi("tag:yaml.org,2002:int",{kind:"scalar",resolve:uS,construct:dS,predicate:fS,represent:{binary:S(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:S(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:S(function(e){return e.toString(10)},"decimal"),hexadecimal:S(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),DO=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pS(e){return!(e===null||!DO.test(e)||e[e.length-1]==="_")}S(pS,"resolveYamlFloat");function gS(e){var t,i;return t=e.replace(/_/g,"").toLowerCase(),i=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:i*parseFloat(t,10)}S(gS,"constructYamlFloat");var $O=/^[-+]?[0-9]+e/;function mS(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ve.isNegativeZero(e))return"-0.0";return i=e.toString(10),$O.test(i)?i.replace("e",".e"):i}S(mS,"representYamlFloat");function yS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ve.isNegativeZero(e))}S(yS,"isFloat");var zO=new mi("tag:yaml.org,2002:float",{kind:"scalar",resolve:pS,construct:gS,predicate:yS,represent:mS,defaultStyle:"lowercase"}),xS=MO.extend({implicit:[RO,FO,OO,zO]}),NO=xS,bS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),CS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vS(e){return e===null?!1:bS.exec(e)!==null||CS.exec(e)!==null}S(vS,"resolveYamlTimestamp");function kS(e){var t,i,a,s,l,c,h,u=0,f=null,p,g,x;if(t=bS.exec(e),t===null&&(t=CS.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],a=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(i,a,s));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(p=+t[10],g=+(t[11]||0),f=(p*60+g)*6e4,t[9]==="-"&&(f=-f)),x=new Date(Date.UTC(i,a,s,l,c,h,u)),f&&x.setTime(x.getTime()-f),x}S(kS,"constructYamlTimestamp");function SS(e){return e.toISOString()}S(SS,"representYamlTimestamp");var qO=new mi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vS,construct:kS,instanceOf:Date,represent:SS});function TS(e){return e==="<<"||e===null}S(TS,"resolveYamlMerge");var IO=new mi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:TS}),by=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
265
|
+
\r`;function wS(e){if(e===null)return!1;var t,i,a=0,s=e.length,l=by;for(i=0;i<s;i++)if(t=l.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}S(wS,"resolveYamlBinary");function _S(e){var t,i,a=e.replace(/[\r\n=]/g,""),s=a.length,l=by,c=0,h=[];for(t=0;t<s;t++)t%4===0&&t&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|l.indexOf(a.charAt(t));return i=s%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}S(_S,"constructYamlBinary");function BS(e){var t="",i=0,a,s,l=e.length,c=by;for(a=0;a<l;a++)a%3===0&&a&&(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]),i=(i<<8)+e[a];return s=l%3,s===0?(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]):s===2?(t+=c[i>>10&63],t+=c[i>>4&63],t+=c[i<<2&63],t+=c[64]):s===1&&(t+=c[i>>2&63],t+=c[i<<4&63],t+=c[64],t+=c[64]),t}S(BS,"representYamlBinary");function ES(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}S(ES,"isBinary");var jO=new mi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wS,construct:_S,predicate:ES,represent:BS}),HO=Object.prototype.hasOwnProperty,UO=Object.prototype.toString;function LS(e){if(e===null)return!0;var t=[],i,a,s,l,c,h=e;for(i=0,a=h.length;i<a;i+=1){if(s=h[i],c=!1,UO.call(s)!=="[object Object]")return!1;for(l in s)if(HO.call(s,l))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(l)===-1)t.push(l);else return!1}return!0}S(LS,"resolveYamlOmap");function AS(e){return e!==null?e:[]}S(AS,"constructYamlOmap");var PO=new mi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:LS,construct:AS}),WO=Object.prototype.toString;function MS(e){if(e===null)return!0;var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1){if(a=c[t],WO.call(a)!=="[object Object]"||(s=Object.keys(a),s.length!==1))return!1;l[t]=[s[0],a[s[0]]]}return!0}S(MS,"resolveYamlPairs");function RS(e){if(e===null)return[];var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1)a=c[t],s=Object.keys(a),l[t]=[s[0],a[s[0]]];return l}S(RS,"constructYamlPairs");var YO=new mi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:MS,construct:RS}),GO=Object.prototype.hasOwnProperty;function FS(e){if(e===null)return!0;var t,i=e;for(t in i)if(GO.call(i,t)&&i[t]!==null)return!1;return!0}S(FS,"resolveYamlSet");function OS(e){return e!==null?e:{}}S(OS,"constructYamlSet");var XO=new mi("tag:yaml.org,2002:set",{kind:"mapping",resolve:FS,construct:OS}),DS=NO.extend({implicit:[qO,IO],explicit:[jO,PO,YO,XO]}),vn=Object.prototype.hasOwnProperty,Ju=1,$S=2,zS=3,td=4,ug=1,VO=2,ZC=3,ZO=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,QO=/[\x85\u2028\u2029]/,KO=/[,\[\]\{\}]/,NS=/^(?:!|!!|![a-z\-]+!)$/i,qS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qg(e){return Object.prototype.toString.call(e)}S(Qg,"_class");function Er(e){return e===10||e===13}S(Er,"is_EOL");function bn(e){return e===9||e===32}S(bn,"is_WHITE_SPACE");function ki(e){return e===9||e===32||e===10||e===13}S(ki,"is_WS_OR_EOL");function Zn(e){return e===44||e===91||e===93||e===123||e===125}S(Zn,"is_FLOW_INDICATOR");function IS(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}S(IS,"fromHexCode");function jS(e){return e===120?2:e===117?4:e===85?8:0}S(jS,"escapedHexLen");function HS(e){return 48<=e&&e<=57?e-48:-1}S(HS,"fromDecimalCode");function Kg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
266
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}S(Kg,"simpleEscapeSequence");function US(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}S(US,"charFromCodepoint");function Cy(e,t,i){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[t]=i}S(Cy,"setProperty");var PS=new Array(256),WS=new Array(256);for(Un=0;Un<256;Un++)PS[Un]=Kg(Un)?1:0,WS[Un]=Kg(Un);var Un;function YS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DS,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}S(YS,"State$1");function vy(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=TO(i),new zi(t,i)}S(vy,"generateError");function At(e,t){throw vy(e,t)}S(At,"throwError");function Cc(e,t){e.onWarning&&e.onWarning.call(null,vy(e,t))}S(Cc,"throwWarning");var QC={YAML:S(function(t,i,a){var s,l,c;t.version!==null&&At(t,"duplication of %YAML directive"),a.length!==1&&At(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),s===null&&At(t,"ill-formed argument of the YAML directive"),l=parseInt(s[1],10),c=parseInt(s[2],10),l!==1&&At(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&Cc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:S(function(t,i,a){var s,l;a.length!==2&&At(t,"TAG directive accepts exactly two arguments"),s=a[0],l=a[1],NS.test(s)||At(t,"ill-formed tag handle (first argument) of the TAG directive"),vn.call(t.tagMap,s)&&At(t,'there is a previously declared suffix for "'+s+'" tag handle'),qS.test(l)||At(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{At(t,"tag prefix is malformed: "+l)}t.tagMap[s]=l},"handleTagDirective")};function Ta(e,t,i,a){var s,l,c,h;if(t<i){if(h=e.input.slice(t,i),a)for(s=0,l=h.length;s<l;s+=1)c=h.charCodeAt(s),c===9||32<=c&&c<=1114111||At(e,"expected valid JSON character");else ZO.test(h)&&At(e,"the stream contains non-printable characters");e.result+=h}}S(Ta,"captureSegment");function Jg(e,t,i,a){var s,l,c,h;for(Ve.isObject(i)||At(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),c=0,h=s.length;c<h;c+=1)l=s[c],vn.call(t,l)||(Cy(t,l,i[l]),a[l]=!0)}S(Jg,"mergeMappings");function Qn(e,t,i,a,s,l,c,h,u){var f,p;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),f=0,p=s.length;f<p;f+=1)Array.isArray(s[f])&&At(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Qg(s[f])==="[object Object]"&&(s[f]="[object Object]");if(typeof s=="object"&&Qg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(f=0,p=l.length;f<p;f+=1)Jg(e,t,l[f],i);else Jg(e,t,l,i);else!e.json&&!vn.call(i,s)&&vn.call(t,s)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=u||e.position,At(e,"duplicated mapping key")),Cy(t,s,l),delete i[s];return t}S(Qn,"storeMappingPair");function Ed(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):At(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}S(Ed,"readLineBreak");function Ne(e,t,i){for(var a=0,s=e.input.charCodeAt(e.position);s!==0;){for(;bn(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Er(s))for(Ed(e),s=e.input.charCodeAt(e.position),a++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Cc(e,"deficient indentation"),a}S(Ne,"skipSeparationSpace");function Oc(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||ki(i)))}S(Oc,"testDocumentSeparator");function Ld(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ve.repeat(`
|
|
267
|
+
`,t-1))}S(Ld,"writeFoldedLines");function GS(e,t,i){var a,s,l,c,h,u,f,p,g=e.kind,x=e.result,m;if(m=e.input.charCodeAt(e.position),ki(m)||Zn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(s=e.input.charCodeAt(e.position+1),ki(s)||i&&Zn(s)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;m!==0;){if(m===58){if(s=e.input.charCodeAt(e.position+1),ki(s)||i&&Zn(s))break}else if(m===35){if(a=e.input.charCodeAt(e.position-1),ki(a))break}else{if(e.position===e.lineStart&&Oc(e)||i&&Zn(m))break;if(Er(m))if(u=e.line,f=e.lineStart,p=e.lineIndent,Ne(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=u,e.lineStart=f,e.lineIndent=p;break}}h&&(Ta(e,l,c,!1),Ld(e,e.line-u),l=c=e.position,h=!1),bn(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return Ta(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}S(GS,"readPlainScalar");function XS(e,t){var i,a,s;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=s=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Ta(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,s=e.position;else return!0;else Er(i)?(Ta(e,a,s,!0),Ld(e,Ne(e,!1,t)),a=s=e.position):e.position===e.lineStart&&Oc(e)?At(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);At(e,"unexpected end of the stream within a single quoted scalar")}S(XS,"readSingleQuotedScalar");function VS(e,t){var i,a,s,l,c,h;if(h=e.input.charCodeAt(e.position),h!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(h=e.input.charCodeAt(e.position))!==0;){if(h===34)return Ta(e,i,e.position,!0),e.position++,!0;if(h===92){if(Ta(e,i,e.position,!0),h=e.input.charCodeAt(++e.position),Er(h))Ne(e,!1,t);else if(h<256&&PS[h])e.result+=WS[h],e.position++;else if((c=jS(h))>0){for(s=c,l=0;s>0;s--)h=e.input.charCodeAt(++e.position),(c=IS(h))>=0?l=(l<<4)+c:At(e,"expected hexadecimal character");e.result+=US(l),e.position++}else At(e,"unknown escape sequence");i=a=e.position}else Er(h)?(Ta(e,i,a,!0),Ld(e,Ne(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Oc(e)?At(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}At(e,"unexpected end of the stream within a double quoted scalar")}S(VS,"readDoubleQuotedScalar");function ZS(e,t){var i=!0,a,s,l,c=e.tag,h,u=e.anchor,f,p,g,x,m,v=Object.create(null),C,k,T,_;if(_=e.input.charCodeAt(e.position),_===91)p=93,m=!1,h=[];else if(_===123)p=125,m=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),_=e.input.charCodeAt(++e.position);_!==0;){if(Ne(e,!0,t),_=e.input.charCodeAt(e.position),_===p)return e.position++,e.tag=c,e.anchor=u,e.kind=m?"mapping":"sequence",e.result=h,!0;i?_===44&&At(e,"expected the node content, but found ','"):At(e,"missed comma between flow collection entries"),k=C=T=null,g=x=!1,_===63&&(f=e.input.charCodeAt(e.position+1),ki(f)&&(g=x=!0,e.position++,Ne(e,!0,t))),a=e.line,s=e.lineStart,l=e.position,as(e,t,Ju,!1,!0),k=e.tag,C=e.result,Ne(e,!0,t),_=e.input.charCodeAt(e.position),(x||e.line===a)&&_===58&&(g=!0,_=e.input.charCodeAt(++e.position),Ne(e,!0,t),as(e,t,Ju,!1,!0),T=e.result),m?Qn(e,h,v,k,C,T,a,s,l):g?h.push(Qn(e,null,v,k,C,T,a,s,l)):h.push(C),Ne(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(i=!0,_=e.input.charCodeAt(++e.position)):i=!1}At(e,"unexpected end of the stream within a flow collection")}S(ZS,"readFlowCollection");function QS(e,t){var i,a,s=ug,l=!1,c=!1,h=t,u=0,f=!1,p,g;if(g=e.input.charCodeAt(e.position),g===124)a=!1;else if(g===62)a=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)ug===s?s=g===43?ZC:VO:At(e,"repeat of a chomping mode identifier");else if((p=HS(g))>=0)p===0?At(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?At(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(bn(g)){do g=e.input.charCodeAt(++e.position);while(bn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Er(g)&&g!==0)}for(;g!==0;){for(Ed(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!c||e.lineIndent<h)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>h&&(h=e.lineIndent),Er(g)){u++;continue}if(e.lineIndent<h){s===ZC?e.result+=Ve.repeat(`
|
|
268
|
+
`,l?1+u:u):s===ug&&l&&(e.result+=`
|
|
269
|
+
`);break}for(a?bn(g)?(f=!0,e.result+=Ve.repeat(`
|
|
270
|
+
`,l?1+u:u)):f?(f=!1,e.result+=Ve.repeat(`
|
|
271
|
+
`,u+1)):u===0?l&&(e.result+=" "):e.result+=Ve.repeat(`
|
|
272
|
+
`,u):e.result+=Ve.repeat(`
|
|
273
|
+
`,l?1+u:u),l=!0,c=!0,u=0,i=e.position;!Er(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Ta(e,i,e.position,!1)}return!0}S(QS,"readBlockScalar");function tm(e,t){var i,a=e.tag,s=e.anchor,l=[],c,h=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),!(u!==45||(c=e.input.charCodeAt(e.position+1),!ki(c))));){if(h=!0,e.position++,Ne(e,!0,-1)&&e.lineIndent<=t){l.push(null),u=e.input.charCodeAt(e.position);continue}if(i=e.line,as(e,t,zS,!1,!0),l.push(e.result),Ne(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&u!==0)At(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return h?(e.tag=a,e.anchor=s,e.kind="sequence",e.result=l,!0):!1}S(tm,"readBlockSequence");function KS(e,t,i){var a,s,l,c,h,u,f=e.tag,p=e.anchor,g={},x=Object.create(null),m=null,v=null,C=null,k=!1,T=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),_=e.input.charCodeAt(e.position);_!==0;){if(!k&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(_===63||_===58)&&ki(a))_===63?(k&&(Qn(e,g,x,m,v,null,c,h,u),m=v=C=null),T=!0,k=!0,s=!0):k?(k=!1,s=!0):At(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=a;else{if(c=e.line,h=e.lineStart,u=e.position,!as(e,i,$S,!1,!0))break;if(e.line===l){for(_=e.input.charCodeAt(e.position);bn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),ki(_)||At(e,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(Qn(e,g,x,m,v,null,c,h,u),m=v=C=null),T=!0,k=!1,s=!1,m=e.tag,v=e.result;else if(T)At(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)At(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0}if((e.line===l||e.lineIndent>t)&&(k&&(c=e.line,h=e.lineStart,u=e.position),as(e,t,td,!0,s)&&(k?v=e.result:C=e.result),k||(Qn(e,g,x,m,v,C,c,h,u),m=v=C=null),Ne(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&_!==0)At(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return k&&Qn(e,g,x,m,v,null,c,h,u),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=g),T}S(KS,"readBlockMapping");function JS(e){var t,i=!1,a=!1,s,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&At(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(i=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,s="!!",c=e.input.charCodeAt(++e.position)):s="!",t=e.position,i){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(l=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):At(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!ki(c);)c===33&&(a?At(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),NS.test(s)||At(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);l=e.input.slice(t,e.position),KO.test(l)&&At(e,"tag suffix cannot contain flow indicator characters")}l&&!qS.test(l)&&At(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{At(e,"tag name is malformed: "+l)}return i?e.tag=l:vn.call(e.tagMap,s)?e.tag=e.tagMap[s]+l:s==="!"?e.tag="!"+l:s==="!!"?e.tag="tag:yaml.org,2002:"+l:At(e,'undeclared tag handle "'+s+'"'),!0}S(JS,"readTagProperty");function tT(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&At(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ki(i)&&!Zn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}S(tT,"readAnchorProperty");function eT(e){var t,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!ki(a)&&!Zn(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),vn.call(e.anchorMap,i)||At(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],Ne(e,!0,-1),!0}S(eT,"readAlias");function as(e,t,i,a,s){var l,c,h,u=1,f=!1,p=!1,g,x,m,v,C,k;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=td===i||zS===i,a&&Ne(e,!0,-1)&&(f=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;JS(e)||tT(e);)Ne(e,!0,-1)?(f=!0,h=l,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):h=!1;if(h&&(h=f||s),(u===1||td===i)&&(Ju===i||$S===i?C=t:C=t+1,k=e.position-e.lineStart,u===1?h&&(tm(e,k)||KS(e,k,C))||ZS(e,C)?p=!0:(c&&QS(e,C)||XS(e,C)||VS(e,C)?p=!0:eT(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&At(e,"alias node should not have any properties")):GS(e,C,Ju===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(p=h&&tm(e,k))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&At(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,x=e.implicitTypes.length;g<x;g+=1)if(v=e.implicitTypes[g],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(vn.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,m=e.typeMap.multi[e.kind||"fallback"],g=0,x=m.length;g<x;g+=1)if(e.tag.slice(0,m[g].tag.length)===m[g].tag){v=m[g];break}v||At(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&At(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):At(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}S(as,"composeNode");function iT(e){var t=e.position,i,a,s,l=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(c=e.input.charCodeAt(e.position))!==0&&(Ne(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(l=!0,c=e.input.charCodeAt(++e.position),i=e.position;c!==0&&!ki(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),s=[],a.length<1&&At(e,"directive name must not be less than one character in length");c!==0;){for(;bn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!Er(c));break}if(Er(c))break;for(i=e.position;c!==0&&!ki(c);)c=e.input.charCodeAt(++e.position);s.push(e.input.slice(i,e.position))}c!==0&&Ed(e),vn.call(QC,a)?QC[a](e,a,s):Cc(e,'unknown document directive "'+a+'"')}if(Ne(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ne(e,!0,-1)):l&&At(e,"directives end mark is expected"),as(e,e.lineIndent-1,td,!1,!0),Ne(e,!0,-1),e.checkLineBreaks&&QO.test(e.input.slice(t,e.position))&&Cc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Oc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ne(e,!0,-1));return}if(e.position<e.length-1)At(e,"end of the stream or a document separator is expected");else return}S(iT,"readDocument");function ky(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
274
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new YS(e,t),a=e.indexOf("\0");for(a!==-1&&(i.position=a,At(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)iT(i);return i.documents}S(ky,"loadDocuments");function JO(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var a=ky(e,i);if(typeof t!="function")return a;for(var s=0,l=a.length;s<l;s+=1)t(a[s])}S(JO,"loadAll$1");function rT(e,t){var i=ky(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new zi("expected a single document in the stream, but found more")}}S(rT,"load$1");var tD=rT,eD={load:tD},aT=Object.prototype.toString,nT=Object.prototype.hasOwnProperty,Sy=65279,iD=9,vc=10,rD=13,aD=32,nD=33,sD=34,em=35,lD=37,oD=38,cD=39,hD=42,sT=44,uD=45,ed=58,dD=61,fD=62,pD=63,gD=64,lT=91,oT=93,mD=96,cT=123,yD=124,hT=125,yi={};yi[0]="\\0";yi[7]="\\a";yi[8]="\\b";yi[9]="\\t";yi[10]="\\n";yi[11]="\\v";yi[12]="\\f";yi[13]="\\r";yi[27]="\\e";yi[34]='\\"';yi[92]="\\\\";yi[133]="\\N";yi[160]="\\_";yi[8232]="\\L";yi[8233]="\\P";var xD=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],bD=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function uT(e,t){var i,a,s,l,c,h,u;if(t===null)return{};for(i={},a=Object.keys(t),s=0,l=a.length;s<l;s+=1)c=a[s],h=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=e.compiledTypeMap.fallback[c],u&&nT.call(u.styleAliases,h)&&(h=u.styleAliases[h]),i[c]=h;return i}S(uT,"compileStyleMap");function dT(e){var t,i,a;if(t=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new zi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Ve.repeat("0",a-t.length)+t}S(dT,"encodeHex");var CD=1,kc=2;function fT(e){this.schema=e.schema||DS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ve.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=uT(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?kc:CD,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}S(fT,"State");function im(e,t){for(var i=Ve.repeat(" ",t),a=0,s=-1,l="",c,h=e.length;a<h;)s=e.indexOf(`
|
|
275
|
+
`,a),s===-1?(c=e.slice(a),a=h):(c=e.slice(a,s+1),a=s+1),c.length&&c!==`
|
|
276
|
+
`&&(l+=i),l+=c;return l}S(im,"indentString");function id(e,t){return`
|
|
277
|
+
`+Ve.repeat(" ",e.indent*t)}S(id,"generateNextLine");function pT(e,t){var i,a,s;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(s=e.implicitTypes[i],s.resolve(t))return!0;return!1}S(pT,"testImplicitResolving");function Sc(e){return e===aD||e===iD}S(Sc,"isWhitespace");function Ol(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Sy||65536<=e&&e<=1114111}S(Ol,"isPrintable");function rm(e){return Ol(e)&&e!==Sy&&e!==rD&&e!==vc}S(rm,"isNsCharOrWhitespace");function am(e,t,i){var a=rm(e),s=a&&!Sc(e);return(i?a:a&&e!==sT&&e!==lT&&e!==oT&&e!==cT&&e!==hT)&&e!==em&&!(t===ed&&!s)||rm(t)&&!Sc(t)&&e===em||t===ed&&s}S(am,"isPlainSafe");function gT(e){return Ol(e)&&e!==Sy&&!Sc(e)&&e!==uD&&e!==pD&&e!==ed&&e!==sT&&e!==lT&&e!==oT&&e!==cT&&e!==hT&&e!==em&&e!==oD&&e!==hD&&e!==nD&&e!==yD&&e!==dD&&e!==fD&&e!==cD&&e!==sD&&e!==lD&&e!==gD&&e!==mD}S(gT,"isPlainSafeFirst");function mT(e){return!Sc(e)&&e!==ed}S(mT,"isPlainSafeLast");function hl(e,t){var i=e.charCodeAt(t),a;return i>=55296&&i<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}S(hl,"codePointAt");function Ty(e){var t=/^\n* /;return t.test(e)}S(Ty,"needIndentIndicator");var yT=1,nm=2,xT=3,bT=4,ll=5;function CT(e,t,i,a,s,l,c,h){var u,f=0,p=null,g=!1,x=!1,m=a!==-1,v=-1,C=gT(hl(e,0))&&mT(hl(e,e.length-1));if(t||c)for(u=0;u<e.length;f>=65536?u+=2:u++){if(f=hl(e,u),!Ol(f))return ll;C=C&&am(f,p,h),p=f}else{for(u=0;u<e.length;f>=65536?u+=2:u++){if(f=hl(e,u),f===vc)g=!0,m&&(x=x||u-v-1>a&&e[v+1]!==" ",v=u);else if(!Ol(f))return ll;C=C&&am(f,p,h),p=f}x=x||m&&u-v-1>a&&e[v+1]!==" "}return!g&&!x?C&&!c&&!s(e)?yT:l===kc?ll:nm:i>9&&Ty(e)?ll:c?l===kc?ll:nm:x?bT:xT}S(CT,"chooseScalarStyle");function vT(e,t,i,a,s){e.dump=(function(){if(t.length===0)return e.quotingType===kc?'""':"''";if(!e.noCompatMode&&(xD.indexOf(t)!==-1||bD.test(t)))return e.quotingType===kc?'"'+t+'"':"'"+t+"'";var l=e.indent*Math.max(1,i),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),h=a||e.flowLevel>-1&&i>=e.flowLevel;function u(f){return pT(e,f)}switch(S(u,"testAmbiguity"),CT(t,h,e.indent,c,u,e.quotingType,e.forceQuotes&&!a,s)){case yT:return t;case nm:return"'"+t.replace(/'/g,"''")+"'";case xT:return"|"+sm(t,e.indent)+lm(im(t,l));case bT:return">"+sm(t,e.indent)+lm(im(kT(t,c),l));case ll:return'"'+ST(t)+'"';default:throw new zi("impossible error: invalid scalar style")}})()}S(vT,"writeScalar");function sm(e,t){var i=Ty(e)?String(t):"",a=e[e.length-1]===`
|
|
278
|
+
`,s=a&&(e[e.length-2]===`
|
|
279
|
+
`||e===`
|
|
280
|
+
`),l=s?"+":a?"":"-";return i+l+`
|
|
281
|
+
`}S(sm,"blockHeader");function lm(e){return e[e.length-1]===`
|
|
282
|
+
`?e.slice(0,-1):e}S(lm,"dropEndingNewline");function kT(e,t){for(var i=/(\n+)([^\n]*)/g,a=(function(){var f=e.indexOf(`
|
|
283
|
+
`);return f=f!==-1?f:e.length,i.lastIndex=f,om(e.slice(0,f),t)})(),s=e[0]===`
|
|
284
|
+
`||e[0]===" ",l,c;c=i.exec(e);){var h=c[1],u=c[2];l=u[0]===" ",a+=h+(!s&&!l&&u!==""?`
|
|
285
|
+
`:"")+om(u,t),s=l}return a}S(kT,"foldString");function om(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,s=0,l,c=0,h=0,u="";a=i.exec(e);)h=a.index,h-s>t&&(l=c>s?c:h,u+=`
|
|
286
|
+
`+e.slice(s,l),s=l+1),c=h;return u+=`
|
|
287
|
+
`,e.length-s>t&&c>s?u+=e.slice(s,c)+`
|
|
288
|
+
`+e.slice(c+1):u+=e.slice(s),u.slice(1)}S(om,"foldLine");function ST(e){for(var t="",i=0,a,s=0;s<e.length;i>=65536?s+=2:s++)i=hl(e,s),a=yi[i],!a&&Ol(i)?(t+=e[s],i>=65536&&(t+=e[s+1])):t+=a||dT(i);return t}S(ST,"escapeString");function TT(e,t,i){var a="",s=e.tag,l,c,h;for(l=0,c=i.length;l<c;l+=1)h=i[l],e.replacer&&(h=e.replacer.call(i,String(l),h)),(Vr(e,t,h,!1,!1)||typeof h>"u"&&Vr(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}S(TT,"writeFlowSequence");function cm(e,t,i,a){var s="",l=e.tag,c,h,u;for(c=0,h=i.length;c<h;c+=1)u=i[c],e.replacer&&(u=e.replacer.call(i,String(c),u)),(Vr(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&Vr(e,t+1,null,!0,!0,!1,!0))&&((!a||s!=="")&&(s+=id(e,t)),e.dump&&vc===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}S(cm,"writeBlockSequence");function wT(e,t,i){var a="",s=e.tag,l=Object.keys(i),c,h,u,f,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),u=l[c],f=i[u],e.replacer&&(f=e.replacer.call(i,u,f)),Vr(e,t,u,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Vr(e,t,f,!1,!1)&&(p+=e.dump,a+=p));e.tag=s,e.dump="{"+a+"}"}S(wT,"writeFlowMapping");function _T(e,t,i,a){var s="",l=e.tag,c=Object.keys(i),h,u,f,p,g,x;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new zi("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!a||s!=="")&&(x+=id(e,t)),f=c[h],p=i[f],e.replacer&&(p=e.replacer.call(i,f,p)),Vr(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&vc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=id(e,t)),Vr(e,t+1,p,!0,g)&&(e.dump&&vc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,s+=x));e.tag=l,e.dump=s||"{}"}S(_T,"writeBlockMapping");function hm(e,t,i){var a,s,l,c,h,u;for(s=i?e.explicitTypes:e.implicitTypes,l=0,c=s.length;l<c;l+=1)if(h=s[l],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof t=="object"&&t instanceof h.instanceOf)&&(!h.predicate||h.predicate(t))){if(i?h.multi&&h.representName?e.tag=h.representName(t):e.tag=h.tag:e.tag="?",h.represent){if(u=e.styleMap[h.tag]||h.defaultStyle,aT.call(h.represent)==="[object Function]")a=h.represent(t,u);else if(nT.call(h.represent,u))a=h.represent[u](t,u);else throw new zi("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');e.dump=a}return!0}return!1}S(hm,"detectType");function Vr(e,t,i,a,s,l,c){e.tag=null,e.dump=i,hm(e,i,!1)||hm(e,i,!0);var h=aT.call(e.dump),u=a,f;a&&(a=e.flowLevel<0||e.flowLevel>t);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=e.duplicates.indexOf(i),x=g!==-1),(e.tag!==null&&e.tag!=="?"||x||e.indent!==2&&t>0)&&(s=!1),x&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(p&&x&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),h==="[object Object]")a&&Object.keys(e.dump).length!==0?(_T(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(wT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?cm(e,t-1,e.dump,s):cm(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(TT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&vT(e,e.dump,t,l,u);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zi("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}S(Vr,"writeNode");function BT(e,t){var i=[],a=[],s,l;for(rd(e,i,a),s=0,l=a.length;s<l;s+=1)t.duplicates.push(i[a[s]]);t.usedDuplicates=new Array(l)}S(BT,"getDuplicateReferences");function rd(e,t,i){var a,s,l;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)i.indexOf(s)===-1&&i.push(s);else if(t.push(e),Array.isArray(e))for(s=0,l=e.length;s<l;s+=1)rd(e[s],t,i);else for(a=Object.keys(e),s=0,l=a.length;s<l;s+=1)rd(e[a[s]],t,i)}S(rd,"inspectNode");function vD(e,t){t=t||{};var i=new fT(t);i.noRefs||BT(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),Vr(i,0,a,!0,!0)?i.dump+`
|
|
289
|
+
`:""}S(vD,"dump$1");function kD(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}S(kD,"renamed");var SD=xS,TD=eD.load;/*! Bundled license information:
|
|
290
|
+
|
|
291
|
+
js-yaml/dist/js-yaml.mjs:
|
|
292
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
293
|
+
*/var Yo=S((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const i=e.x??0,a=e.y??0;return"translate("+-(i+e.width/2)+", "+-(a+e.height/2)+")"},"computeLabelTransform"),pi={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},KC={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ac(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_e(e),t=_e(t);const[i,a]=[e.x,e.y],[s,l]=[t.x,t.y],c=s-i,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}S(ac,"calculateDeltaAndAngle");var _e=S(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wD=S(e=>({x:S(function(t,i,a){let s=0;const l=_e(a[0]).x<_e(a[a.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(pi,e.arrowTypeStart)){const{angle:m,deltaX:v}=ac(a[0],a[1]);s=pi[e.arrowTypeStart]*Math.cos(m)*(v>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(pi,e.arrowTypeEnd)){const{angle:m,deltaX:v}=ac(a[a.length-1],a[a.length-2]);s=pi[e.arrowTypeEnd]*Math.cos(m)*(v>=0?1:-1)}const c=Math.abs(_e(t).x-_e(a[a.length-1]).x),h=Math.abs(_e(t).y-_e(a[a.length-1]).y),u=Math.abs(_e(t).x-_e(a[0]).x),f=Math.abs(_e(t).y-_e(a[0]).y),p=pi[e.arrowTypeStart],g=pi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="right"?-1:1,s-=m}if(u<p&&u>0&&f<p){let m=p+x-u;m*=l==="right"?-1:1,s+=m}return _e(t).x+s},"x"),y:S(function(t,i,a){let s=0;const l=_e(a[0]).y<_e(a[a.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(pi,e.arrowTypeStart)){const{angle:m,deltaY:v}=ac(a[0],a[1]);s=pi[e.arrowTypeStart]*Math.abs(Math.sin(m))*(v>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(pi,e.arrowTypeEnd)){const{angle:m,deltaY:v}=ac(a[a.length-1],a[a.length-2]);s=pi[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(v>=0?1:-1)}const c=Math.abs(_e(t).y-_e(a[a.length-1]).y),h=Math.abs(_e(t).x-_e(a[a.length-1]).x),u=Math.abs(_e(t).y-_e(a[0]).y),f=Math.abs(_e(t).x-_e(a[0]).x),p=pi[e.arrowTypeStart],g=pi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="up"?-1:1,s-=m}if(u<p&&u>0&&f<p){let m=p+x-u;m*=l==="up"?-1:1,s+=m}return _e(t).y+s},"y")}),"getLineFunctionsWithOffset"),lu={},Ge={},JC;function _D(){return JC||(JC=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.BLANK_URL=Ge.relativeFirstCharacters=Ge.whitespaceEscapeCharsRegex=Ge.urlSchemeRegex=Ge.ctrlCharactersRegex=Ge.htmlCtrlEntityRegex=Ge.htmlEntitiesRegex=Ge.invalidProtocolRegex=void 0,Ge.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ge.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ge.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ge.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ge.urlSchemeRegex=/^.+(:|:)/gim,Ge.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ge.relativeFirstCharacters=[".","/"],Ge.BLANK_URL="about:blank"),Ge}var tv;function BD(){if(tv)return lu;tv=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.sanitizeUrl=l;var e=_D();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(e.ctrlCharactersRegex,"");return h.replace(e.htmlEntitiesRegex,function(u,f){return String.fromCharCode(f)})}function a(c){return URL.canParse(c)}function s(c){try{return decodeURIComponent(c)}catch{return c}}function l(c){if(!c)return e.BLANK_URL;var h,u=s(c.trim());do u=i(u).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),u=s(u),h=u.match(e.ctrlCharactersRegex)||u.match(e.htmlEntitiesRegex)||u.match(e.htmlCtrlEntityRegex)||u.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=u;if(!f)return e.BLANK_URL;if(t(f))return f;var p=f.trimStart(),g=p.match(e.urlSchemeRegex);if(!g)return f;var x=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var m=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return m;if(x==="http:"||x==="https:"){if(!a(m))return e.BLANK_URL;var v=new URL(m);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return m}return lu}var ED=BD();function LD(e){return Number.isSafeInteger(e)&&e>=0}function ET(e){return e!=null&&typeof e!="function"&&LD(e.length)}function AD(e){return e==="__proto__"}function wy(e){return e==null||typeof e!="object"&&typeof e!="function"}function LT(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function _y(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const MD="[object RegExp]",AT="[object String]",MT="[object Number]",RT="[object Boolean]",FT="[object Arguments]",RD="[object Symbol]",FD="[object Date]",OD="[object Map]",DD="[object Set]",$D="[object Array]",zD="[object ArrayBuffer]",OT="[object Object]",ND="[object DataView]",qD="[object Uint8Array]",ID="[object Uint8ClampedArray]",jD="[object Uint16Array]",HD="[object Uint32Array]",UD="[object Int8Array]",PD="[object Int16Array]",WD="[object Int32Array]",YD="[object Float32Array]",GD="[object Float64Array]",ev=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function By(e){return typeof ev.Buffer<"u"&&ev.Buffer.isBuffer(e)}function Ey(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function XD(e,t){return ul(e,void 0,e,new Map,t)}function ul(e,t,i,a=new Map,s=void 0){const l=s==null?void 0:s(e,t,i,a);if(l!==void 0)return l;if(wy(e))return e;if(a.has(e))return a.get(e);if(Array.isArray(e)){const c=new Array(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=ul(e[h],h,i,a,s);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;a.set(e,c);for(const[h,u]of e)c.set(h,ul(u,h,i,a,s));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(ul(h,void 0,i,a,s));return c}if(By(e))return e.subarray();if(Ey(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=ul(e[h],h,i,a,s);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof Error){const c=structuredClone(e);return a.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,Cr(c,e,i,a,s),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof e=="object"&&VD(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),Cr(c,e,i,a,s),c}return e}function Cr(e,t,i=e,a,s){const l=[...Object.keys(t),...LT(t)];for(let c=0;c<l.length;c++){const h=l[c],u=Object.getOwnPropertyDescriptor(e,h);(u==null||u.writable)&&(e[h]=ul(t[h],h,i,a,s))}}function VD(e){switch(_y(e)){case FT:case $D:case zD:case ND:case RT:case FD:case YD:case GD:case UD:case PD:case WD:case OD:case MT:case OT:case MD:case DD:case AT:case RD:case qD:case ID:case jD:case HD:return!0;default:return!1}}function ZD(e,t){return XD(e,(i,a,s,l)=>{if(typeof e=="object"){if(_y(e)===OT&&typeof e.constructor!="function"){const c={};return l.set(e,c),Cr(c,e,s,l),c}switch(Object.prototype.toString.call(e)){case MT:case AT:case RT:{const c=new e.constructor(e==null?void 0:e.valueOf());return Cr(c,e),c}case FT:{const c={};return Cr(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function iv(e){return ZD(e)}function um(e){return e!==null&&typeof e=="object"&&_y(e)==="[object Arguments]"}function dm(e){return typeof e=="object"&&e!==null}function QD(e){return dm(e)&&ET(e)}function Dc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const i=function(...s){const l=t?t.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);const h=e.apply(this,s);return i.cache=c.set(l,h)||c,h},a=Dc.Cache||Map;return i.cache=new a,i}Dc.Cache=Map;function KD(){}function JD(e){const t=e==null?void 0:e.constructor,i=typeof t=="function"?t.prototype:Object.prototype;return e===i}function Bu(e){return Ey(e)}function dg(e){var i;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const a=e[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&i.writable)?!1:e.toString()===`[object ${a}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function t$(e){if(wy(e))return e;if(Array.isArray(e)||Ey(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const a=new i(e);return a.lastIndex=e.lastIndex,a}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let a;return e instanceof AggregateError?a=new i(e.errors,e.message,{cause:e.cause}):a=new i(e.message,{cause:e.cause}),a.stack=e.stack,Object.assign(a,e),a}if(typeof File<"u"&&e instanceof File)return new i([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const a=Object.create(t);return Object.assign(a,e)}return e}function e$(e,...t){const i=t.slice(0,-1),a=t[t.length-1];let s=e;for(let l=0;l<i.length;l++){const c=i[l];s=Eu(s,c,a,new Map)}return s}function Eu(e,t,i,a){if(wy(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return t$(a.get(t));if(a.set(t,e),Array.isArray(t)){t=t.slice();for(let l=0;l<t.length;l++)t[l]=t[l]??void 0}const s=[...Object.keys(t),...LT(t)];for(let l=0;l<s.length;l++){const c=s[l];if(AD(c))continue;let h=t[c],u=e[c];if(um(h)&&(h={...h}),um(u)&&(u={...u}),By(h)&&(h=iv(h)),Array.isArray(h))if(Array.isArray(u)){const p=[],g=Reflect.ownKeys(u);for(let x=0;x<g.length;x++){const m=g[x];p[m]=u[m]}u=p}else if(QD(u)){const p=[];for(let g=0;g<u.length;g++)p[g]=u[g];u=p}else u=[];const f=i(u,h,c,e,t,a);f!==void 0?e[c]=f:Array.isArray(h)||dm(u)&&dm(h)&&(dg(u)||dg(h)||Bu(u)||Bu(h))?e[c]=Eu(u,h,i,a):u==null&&dg(h)?e[c]=Eu({},h,i,a):u==null&&Bu(h)?e[c]=iv(h):(u===void 0||h!==void 0)&&(e[c]=h)}return e}function i$(e,...t){return e$(e,...t,KD)}function rv(e){if(e==null)return!0;if(ET(e))return typeof e.splice!="function"&&typeof e!="string"&&!By(e)&&!Bu(e)&&!um(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return JD(e)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}var r$="",a$={curveBasis:Vg,curveBasisClosed:cO,curveBasisOpen:hO,curveBumpX:Bk,curveBumpY:Ek,curveBundle:uO,curveCardinalClosed:dO,curveCardinalOpen:fO,curveCardinal:Rk,curveCatmullRomClosed:pO,curveCatmullRomOpen:gO,curveCatmullRom:Ok,curveLinear:uc,curveLinearClosed:mO,curveMonotoneX:Ik,curveMonotoneY:jk,curveNatural:Uk,curveStep:Pk,curveStepAfter:Yk,curveStepBefore:Wk},n$=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,s$=S(function(e,t){const i=DT(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(i)){const c=i.map(h=>h.args);Nu(c),a=Xe(a,[...c])}else a=i.args;if(!a)return;let s=Jm(e,t);const l="config";return a[l]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),a[s]=a[l],delete a[l]),a},"detectInit"),DT=S(function(e,t=null){var i,a;try{const s=new RegExp(`[%]{2}(?![{]${n$.source})(?=[}][%]{2}).*
|
|
294
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),mt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let l;const c=[];for(;(l=cc.exec(e))!==null;)if(l.index===cc.lastIndex&&cc.lastIndex++,l&&!t||t&&((i=l[1])!=null&&i.match(t))||t&&((a=l[2])!=null&&a.match(t))){const h=l[1]?l[1]:l[2],u=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(s){return mt.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),l$=S(function(e){return e.replace(cc,"")},"removeDirectives"),o$=S(function(e,t){for(const[i,a]of t.entries())if(a.match(e))return i;return-1},"isSubstringInArray");function Ly(e,t){if(!e)return t;const i=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return a$[i]??t}S(Ly,"interpolateToCurve");function $T(e,t){const i=e.trim();if(i)return t.securityLevel!=="loose"?ED.sanitizeUrl(i):i}S($T,"formatUrl");var c$=S((e,...t)=>{const i=e.split("."),a=i.length-1,s=i[a];let l=window;for(let c=0;c<a;c++)if(l=l[i[c]],!l){mt.error(`Function name: ${e} not found in window`);return}l[s](...t)},"runFunc");function Ay(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}S(Ay,"distance");function zT(e){let t,i=0;e.forEach(s=>{i+=Ay(s,t),t=s});const a=i/2;return My(e,a)}S(zT,"traverseEdge");function NT(e){return e.length===1?e[0]:zT(e)}S(NT,"calcLabelPosition");var av=S((e,t=2)=>{const i=Math.pow(10,t);return Math.round(e*i)/i},"roundNumber"),My=S((e,t)=>{let i,a=t;for(const s of e){if(i){const l=Ay(s,i);if(l===0)return i;if(l<a)a-=l;else{const c=a/l;if(c<=0)return i;if(c>=1)return{x:s.x,y:s.y};if(c>0&&c<1)return{x:av((1-c)*i.x+c*s.x,5),y:av((1-c)*i.y+c*s.y,5)}}}i=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),h$=S((e,t,i)=>{mt.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());const s=My(t,25),l=e?10:5,c=Math.atan2(t[0].y-s.y,t[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(t[0].x+s.x)/2,h.y=-Math.cos(c)*l+(t[0].y+s.y)/2,h},"calcCardinalityPosition");function qT(e,t,i){const a=structuredClone(i);mt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const s=25+e,l=My(a,s),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,u.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(u.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,u.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(u.x=Math.sin(h)*c+(a[0].x+l.x)/2,u.y=-Math.cos(h)*c+(a[0].y+l.y)/2),u}S(qT,"calcTerminalLabelPosition");function IT(e){let t="",i="";for(const a of e)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?i=i+a+";":t=t+a+";");return{style:t,labelStyle:i}}S(IT,"getStylesFromArray");var nv=0,u$=S(()=>(nv++,"id-"+Math.random().toString(36).substr(2,12)+"-"+nv),"generateId");function jT(e){let t="";const i="0123456789abcdef",a=i.length;for(let s=0;s<e;s++)t+=i.charAt(Math.floor(Math.random()*a));return t}S(jT,"makeRandomHex");var d$=S(e=>jT(e.length),"random"),f$=S(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),p$=S(function(e,t){const i=t.text.replace(Mc.lineBreakRegex," "),[,a]=Ad(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",a),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const l=s.append("tspan");return l.attr("x",t.x+t.textMargin*2),l.attr("fill",t.fill),l.text(i),s},"drawSimpleText"),g$=Dc((e,t,i)=>{if(!e||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Mc.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),s=[];let l="";return a.forEach((c,h)=>{const u=Ba(`${c} `,i),f=Ba(l,i);if(u>t){const{hyphenatedStrings:x,remainingWord:m}=m$(c,t,"-",i);s.push(l,...x),l=m}else f+u>=t?(s.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&s.push(l)}),s.filter(c=>c!=="").join(i.joinWith)},(e,t,i)=>`${e}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),m$=Dc((e,t,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const s=[...e],l=[];let c="";return s.forEach((h,u)=>{const f=`${c}${h}`;if(Ba(f,a)>=t){const g=u+1,x=s.length===g,m=`${f}${i}`;l.push(x?f:m),c=""}else c=f}),{hyphenatedStrings:l,remainingWord:c}},(e,t,i="-",a)=>`${e}${t}${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function HT(e,t){return Ry(e,t).height}S(HT,"calculateTextHeight");function Ba(e,t){return Ry(e,t).width}S(Ba,"calculateTextWidth");var Ry=Dc((e,t)=>{const{fontSize:i=12,fontFamily:a="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,l]=Ad(i),c=["sans-serif",a],h=e.split(Mc.lineBreakRegex),u=[],f=Xt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const x of c){let m=0;const v={width:0,height:0,lineHeight:0};for(const C of h){const k=f$();k.text=C||r$;const T=p$(p,k).style("font-size",l).style("font-weight",s).style("font-family",x),_=(T._groups||T)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,_.width)),m=Math.round(_.height),v.height+=m,v.lineHeight=Math.round(Math.max(v.lineHeight,m))}u.push(v)}p.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),El,y$=(El=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}},S(El,"InitIDGenerator"),El),ou,x$=S(function(e){return ou=ou||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ou.innerHTML=e,unescape(ou.textContent)},"entityDecode");function Fy(e){return"str"in e}S(Fy,"isDetailedError");var b$=S((e,t,i,a)=>{var l;if(!a)return;const s=(l=e.node())==null?void 0:l.getBBox();s&&e.append("text").text(a).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-i).attr("class",t)},"insertTitle"),Ad=S(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Oy(e,t){return i$({},e,t)}S(Oy,"cleanAndMerge");var _r={assignWithDepth:Xe,wrapLabel:g$,calculateTextHeight:HT,calculateTextWidth:Ba,calculateTextDimensions:Ry,cleanAndMerge:Oy,detectInit:s$,detectDirective:DT,isSubstringInArray:o$,interpolateToCurve:Ly,calcLabelPosition:NT,calcCardinalityPosition:h$,calcTerminalLabelPosition:qT,formatUrl:$T,getStylesFromArray:IT,generateId:u$,random:d$,runFunc:c$,entityDecode:x$,insertTitle:b$,isLabelCoordinateInPath:UT,parseFontSize:Ad,InitIDGenerator:y$},C$=S(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/#\w+;/g,function(i){const a=i.substring(1,i.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),t},"encodeEntities"),ns=S(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),cI=S((e,t,{counter:i=0,prefix:a,suffix:s},l)=>l||`${a?`${a}_`:""}${e}_${t}_${i}${s?`_${s}`:""}`,"getEdgeId");function Ke(e){return e??null}S(Ke,"handleUndefinedAttr");function UT(e,t){const i=Math.round(e.x),a=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return s.includes(i.toString())||s.includes(a.toString())}S(UT,"isLabelCoordinateInPath");var Dy=S(({flowchart:e})=>{var s,l;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,i=((l=e==null?void 0:e.subGraphTitleMargin)==null?void 0:l.bottom)??0,a=t+i;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins");async function PT(e,t){const i=e.getElementsByTagName("img");if(!i||i.length===0)return;const a=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(s=>new Promise(l=>{function c(){if(s.style.display="flex",s.style.flexDirection="column",a){const h=le().fontSize?le().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[f=q2.fontSize]=Ad(h),p=f*u+"px";s.style.minWidth=p,s.style.maxWidth=p}else s.style.width="100%";l(s)}S(c,"setupImage"),setTimeout(()=>{s.complete&&c()}),s.addEventListener("error",c),s.addEventListener("load",c)})))}S(PT,"configureLabelImages");var v$=S(e=>{const{handDrawnSeed:t}=le();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),jl=S(e=>{const t=k$([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),k$=S(e=>{const t=new Map;return e.forEach(i=>{const[a,s]=i.split(":");t.set(a.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),WT=S(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),_t=S(e=>{const{stylesArray:t}=jl(e),i=[],a=[],s=[],l=[];return t.forEach(c=>{const h=c[0];WT(h)?i.push(c.join(":")+" !important"):(a.push(c.join(":")+" !important"),h.includes("stroke")&&s.push(c.join(":")+" !important"),h==="fill"&&l.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:l}},"styles2String"),Tt=S((e,t)=>{var u;const{themeVariables:i,handDrawnSeed:a}=le(),{nodeBorder:s,mainBkg:l}=i,{stylesMap:c}=jl(e);return Object.assign({roughness:.7,fill:c.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||s,seed:a,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:S$(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),S$=S(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const i=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[i,a]},"getStrokeDashArray");const T$=Object.freeze({left:0,top:0,width:16,height:16}),ad=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),YT=Object.freeze({...T$,...ad}),w$=Object.freeze({...YT,body:"",hidden:!1}),_$=Object.freeze({width:null,height:null}),B$=Object.freeze({..._$,...ad}),E$=(e,t,i,a="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;a=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const h=s.pop(),u=s.pop(),f={provider:s.length>0?s[0]:a,prefix:u,name:h};return fg(f)?f:null}const l=s[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return fg(h)?h:null}if(i&&a===""){const h={provider:a,prefix:"",name:l};return fg(h,i)?h:null}return null},fg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function L$(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const a=((e.rotate||0)+(t.rotate||0))%4;return a&&(i.rotate=a),i}function sv(e,t){const i=L$(e,t);for(const a in w$)a in ad?a in e&&!(a in i)&&(i[a]=ad[a]):a in t?i[a]=t[a]:a in e&&(i[a]=e[a]);return i}function A$(e,t){const i=e.icons,a=e.aliases||Object.create(null),s=Object.create(null);function l(c){if(i[c])return s[c]=[];if(!(c in s)){s[c]=null;const h=a[c]&&a[c].parent,u=h&&l(h);u&&(s[c]=[h].concat(u))}return s[c]}return(t||Object.keys(i).concat(Object.keys(a))).forEach(l),s}function lv(e,t,i){const a=e.icons,s=e.aliases||Object.create(null);let l={};function c(h){l=sv(a[h]||s[h],l)}return c(t),i.forEach(c),sv(e,l)}function M$(e,t){if(e.icons[t])return lv(e,t,[]);const i=A$(e,[t])[t];return i?lv(e,t,i):null}const R$=/(-?[0-9.]*[0-9]+[0-9.]*)/g,F$=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ov(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;const a=e.split(R$);if(a===null||!a.length)return e;const s=[];let l=a.shift(),c=F$.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?s.push(l):s.push(Math.ceil(h*t*i)/i)}else s.push(l);if(l=a.shift(),l===void 0)return s.join("");c=!c}}function O$(e,t="defs"){let i="";const a=e.indexOf("<"+t);for(;a>=0;){const s=e.indexOf(">",a),l=e.indexOf("</"+t);if(s===-1||l===-1)break;const c=e.indexOf(">",l);if(c===-1)break;i+=e.slice(s+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:i,content:e}}function D$(e,t){return e?"<defs>"+e+"</defs>"+t:t}function $$(e,t,i){const a=O$(e);return D$(a.defs,t+a.content+i)}const z$=e=>e==="unset"||e==="undefined"||e==="none";function N$(e,t){const i={...YT,...e},a={...B$,...t},s={left:i.left,top:i.top,width:i.width,height:i.height};let l=i.body;[i,a].forEach(C=>{const k=[],T=C.hFlip,_=C.vFlip;let E=C.rotate;T?_?E+=2:(k.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),k.push("scale(-1 1)"),s.top=s.left=0):_&&(k.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),k.push("scale(1 -1)"),s.top=s.left=0);let F;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:F=s.height/2+s.top,k.unshift("rotate(90 "+F.toString()+" "+F.toString()+")");break;case 2:k.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:F=s.width/2+s.left,k.unshift("rotate(-90 "+F.toString()+" "+F.toString()+")");break}E%2===1&&(s.left!==s.top&&(F=s.left,s.left=s.top,s.top=F),s.width!==s.height&&(F=s.width,s.width=s.height,s.height=F)),k.length&&(l=$$(l,'<g transform="'+k.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,u=s.width,f=s.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=ov(g,u/f)):(p=c==="auto"?u:c,g=h===null?ov(p,f/u):h==="auto"?f:h);const x={},m=(C,k)=>{z$(k)||(x[C]=k.toString())};m("width",p),m("height",g);const v=[s.left,s.top,u,f];return x.viewBox=v.join(" "),{attributes:x,viewBox:v,body:l}}const q$=/\sid="(\S+)"/g,cv=new Map;function I$(e){e=e.replace(/[0-9]+$/,"")||"a";const t=cv.get(e)||0;return cv.set(e,t+1),t?`${e}${t}`:e}function j$(e){const t=[];let i;for(;i=q$.exec(e);)t.push(i[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const l=I$(s),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function H$(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in t)i+=" "+a+'="'+t[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+e+"</svg>"}function $y(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hs=$y();function GT(e){hs=e}var dc={exec:()=>null};function oe(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Si.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var U$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Si={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},P$=/^(?:[ \t]*(?:\n|$))+/,W$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Y$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,G$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zy=/(?:[*+-]|\d{1,9}[.)])/,XT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,VT=oe(XT).replace(/bull/g,zy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),X$=oe(XT).replace(/bull/g,zy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ny=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,V$=/^[^\n]+/,qy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Z$=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Q$=oe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zy).getRegex(),Md="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Iy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,K$=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Iy).replace("tag",Md).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZT=oe(Ny).replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Md).getRegex(),J$=oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZT).getRegex(),jy={blockquote:J$,code:W$,def:Z$,fences:Y$,heading:G$,hr:$c,html:K$,lheading:VT,list:Q$,newline:P$,paragraph:ZT,table:dc,text:V$},hv=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Md).getRegex(),tz={...jy,lheading:X$,table:hv,paragraph:oe(Ny).replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Md).getRegex()},ez={...jy,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Iy).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:dc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Ny).replace("hr",$c).replace("heading",` *#{1,6} *[^
|
|
295
|
+
]`).replace("lheading",VT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},iz=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rz=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,QT=/^( {2,}|\\)\n(?!\s*$)/,az=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rd=/[\p{P}\p{S}]/u,Hy=/[\s\p{P}\p{S}]/u,KT=/[^\s\p{P}\p{S}]/u,nz=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Hy).getRegex(),JT=/(?!~)[\p{P}\p{S}]/u,sz=/(?!~)[\s\p{P}\p{S}]/u,lz=/(?:[^\s\p{P}\p{S}]|~)/u,oz=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",U$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tw=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cz=oe(tw,"u").replace(/punct/g,Rd).getRegex(),hz=oe(tw,"u").replace(/punct/g,JT).getRegex(),ew="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uz=oe(ew,"gu").replace(/notPunctSpace/g,KT).replace(/punctSpace/g,Hy).replace(/punct/g,Rd).getRegex(),dz=oe(ew,"gu").replace(/notPunctSpace/g,lz).replace(/punctSpace/g,sz).replace(/punct/g,JT).getRegex(),fz=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,KT).replace(/punctSpace/g,Hy).replace(/punct/g,Rd).getRegex(),pz=oe(/\\(punct)/,"gu").replace(/punct/g,Rd).getRegex(),gz=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),mz=oe(Iy).replace("(?:-->|$)","-->").getRegex(),yz=oe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mz).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,xz=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),iw=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",nd).replace("ref",qy).getRegex(),rw=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",qy).getRegex(),bz=oe("reflink|nolink(?!\\()","g").replace("reflink",iw).replace("nolink",rw).getRegex(),uv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Uy={_backpedal:dc,anyPunctuation:pz,autolink:gz,blockSkip:oz,br:QT,code:rz,del:dc,emStrongLDelim:cz,emStrongRDelimAst:uz,emStrongRDelimUnd:fz,escape:iz,link:xz,nolink:rw,punctuation:nz,reflink:iw,reflinkSearch:bz,tag:yz,text:az,url:dc},Cz={...Uy,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",nd).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nd).getRegex()},fm={...Uy,emStrongRDelimAst:dz,emStrongLDelim:hz,url:oe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",uv).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",uv).getRegex()},vz={...fm,br:oe(QT).replace("{2,}","*").getRegex(),text:oe(fm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},cu={normal:jy,gfm:tz,pedantic:ez},Go={normal:Uy,gfm:fm,breaks:vz,pedantic:Cz},kz={"&":"&","<":"<",">":">",'"':""","'":"'"},dv=e=>kz[e];function Pr(e,t){if(t){if(Si.escapeTest.test(e))return e.replace(Si.escapeReplace,dv)}else if(Si.escapeTestNoEncode.test(e))return e.replace(Si.escapeReplaceNoEncode,dv);return e}function fv(e){try{e=encodeURI(e).replace(Si.percentDecode,"%")}catch{return null}return e}function pv(e,t){var l;let i=e.replace(Si.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(Si.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(Si.slashPipe,"|");return a}function Xo(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function Sz(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function gv(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,u}function Tz(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
|
|
296
|
+
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
|
|
297
|
+
`)}var sd=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||hs}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Xo(a,`
|
|
298
|
+
`)}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=Tz(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=Xo(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:Xo(i[0],`
|
|
299
|
+
`)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=Xo(i[0],`
|
|
300
|
+
`).split(`
|
|
301
|
+
`),s="",l="",c=[];for(;a.length>0;){let h=!1,u=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))u.push(a[f]),h=!0;else if(!h)u.push(a[f]);else break;a=a.slice(f);let p=u.join(`
|
|
302
|
+
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
303
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
304
|
+
${p}`:p,l=l?`${l}
|
|
305
|
+
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,a.length===0)break;let m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let v=m,C=v.raw+`
|
|
306
|
+
`+a.join(`
|
|
307
|
+
`),k=this.blockquote(C);c[c.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,l=l.substring(0,l.length-v.text.length)+k.text;break}else if((m==null?void 0:m.type)==="list"){let v=m,C=v.raw+`
|
|
308
|
+
`+a.join(`
|
|
309
|
+
`),k=this.list(C);c[c.length-1]=k,s=s.substring(0,s.length-m.raw.length)+k.raw,l=l.substring(0,l.length-v.raw.length)+k.raw,a=C.substring(c.at(-1).raw.length).split(`
|
|
310
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=i[2].split(`
|
|
311
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),m=t.split(`
|
|
312
|
+
`,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=i[1].length+1:(C=i[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=i[1].length),v&&this.rules.other.blankLine.test(m)&&(p+=m+`
|
|
313
|
+
`,t=t.substring(m.length+1),f=!0),!f){let _=this.rules.other.nextBulletRegex(C),E=this.rules.other.hrRegex(C),F=this.rules.other.fencesBeginRegex(C),D=this.rules.other.headingBeginRegex(C),N=this.rules.other.htmlBeginRegex(C);for(;t;){let U=t.split(`
|
|
314
|
+
`,1)[0],R;if(m=U,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),R=m):R=m.replace(this.rules.other.tabCharGlobal," "),F.test(m)||D.test(m)||N.test(m)||_.test(m)||E.test(m))break;if(R.search(this.rules.other.nonSpaceChar)>=C||!m.trim())g+=`
|
|
315
|
+
`+R.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||F.test(x)||D.test(x)||E.test(x))break;g+=`
|
|
316
|
+
`+m}!v&&!m.trim()&&(v=!0),p+=U+`
|
|
317
|
+
`,t=t.substring(U.length+1),x=R.slice(C)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let k=null,T;this.options.gfm&&(k=this.rules.other.listIsTask.exec(g),k&&(T=k[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!k,checked:T,loose:!1,text:g,tokens:[]}),l.raw+=p}let u=l.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f=0;f<l.items.length;f++)if(this.lexer.state.top=!1,l.items[f].tokens=this.lexer.blockTokens(l.items[f].text,[]),!l.loose){let p=l.items[f].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=g}if(l.loose)for(let f=0;f<l.items.length;f++)l.items[f].loose=!0;return l}}html(t){let i=this.rules.block.html.exec(t);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:s,title:l}}}table(t){var h;let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=pv(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
318
|
+
`):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===s.length){for(let u of s)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<a.length;u++)c.header.push({text:a[u],tokens:this.lexer.inline(a[u]),header:!0,align:c.align[u]});for(let u of l)c.rows.push(pv(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
|
|
319
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=Xo(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=Sz(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),gv(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return gv(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){u+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t){let i=this.rules.inline.del.exec(t);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let s,l;if(i[2]==="@")s=i[0],l="mailto:"+s;else{let c;do c=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(c!==i[0]);s=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},Sr=class pm{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"tokenizer");Lt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hs,this.options.tokenizer=this.options.tokenizer||new sd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Si,block:cu.normal,inline:Go.normal};this.options.pedantic?(i.block=cu.pedantic,i.inline=Go.pedantic):this.options.gfm&&(i.block=cu.gfm,this.options.breaks?i.inline=Go.breaks:i.inline=Go.gfm),this.tokenizer.rules=i}static get rules(){return{block:cu,inline:Go}}static lex(t,i){return new pm(i).lex(t)}static lexInline(t,i){return new pm(i).inlineTokens(t)}lex(t){t=t.replace(Si.carriageReturn,`
|
|
320
|
+
`),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var s,l,c;for(this.options.pedantic&&(t=t.replace(Si.tabCharGlobal," ").replace(Si.spaceLine,""));t;){let h;if((l=(s=this.options.extensions)==null?void 0:s.block)!=null&&l.some(f=>(h=f.call({lexer:this},t,i))?(t=t.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(t)){t=t.substring(h.raw.length);let f=i.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
|
|
321
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
322
|
+
`)?"":`
|
|
323
|
+
`)+h.raw,f.text+=`
|
|
324
|
+
`+h.text,this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(h=this.tokenizer.fences(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
325
|
+
`)?"":`
|
|
326
|
+
`)+h.raw,f.text+=`
|
|
327
|
+
`+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},i.push(h));continue}if(h=this.tokenizer.table(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(t)){t=t.substring(h.raw.length),i.push(h);continue}let u=t;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0,p=t.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let f=i.at(-1);a&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
|
|
328
|
+
`)?"":`
|
|
329
|
+
`)+h.raw,f.text+=`
|
|
330
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h),a=u.length!==t.length,t=t.substring(h.raw.length);continue}if(h=this.tokenizer.text(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
331
|
+
`)?"":`
|
|
332
|
+
`)+h.raw,f.text+=`
|
|
333
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var u,f,p,g,x;let a=t,s=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)m.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((f=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:f.call({lexer:this},a))??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let m;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(C=>(m=C.call({lexer:this},t,i))?(t=t.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);let C=i.at(-1);m.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):i.push(m);continue}if(m=this.tokenizer.emStrong(t,a,h)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),i.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),i.push(m);continue}let v=t;if((x=this.options.extensions)!=null&&x.startInline){let C=1/0,k=t.slice(1),T;this.options.extensions.startInline.forEach(_=>{T=_.call({lexer:this},k),typeof T=="number"&&T>=0&&(C=Math.min(C,T))}),C<1/0&&C>=0&&(v=t.substring(0,C+1))}if(m=this.tokenizer.inlineText(v)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(h=m.raw.slice(-1)),c=!0;let C=i.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):i.push(m);continue}if(t){let C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return i}},ld=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||hs}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let s=(c=(i||"").match(Si.notSpaceStart))==null?void 0:c[0],l=t.replace(Si.endingNewline,"")+`
|
|
334
|
+
`;return s?'<pre><code class="language-'+Pr(s)+'">'+(a?l:Pr(l,!0))+`</code></pre>
|
|
335
|
+
`:"<pre><code>"+(a?l:Pr(l,!0))+`</code></pre>
|
|
336
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
337
|
+
${this.parser.parse(t)}</blockquote>
|
|
338
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
|
|
339
|
+
`}hr(t){return`<hr>
|
|
340
|
+
`}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let u=t.items[h];s+=this.listitem(u)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
|
|
341
|
+
`+s+"</"+l+`>
|
|
342
|
+
`}listitem(t){var a;let i="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((a=t.tokens[0])==null?void 0:a.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Pr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):i+=s+" "}return i+=this.parser.parse(t.tokens,!!t.loose),`<li>${i}</li>
|
|
343
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
344
|
+
`}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
345
|
+
<thead>
|
|
346
|
+
`+i+`</thead>
|
|
347
|
+
`+s+`</table>
|
|
348
|
+
`}tablerow({text:t}){return`<tr>
|
|
349
|
+
${t}</tr>
|
|
350
|
+
`}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
|
|
351
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Pr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=fv(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Pr(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=fv(t);if(l===null)return Pr(a);t=l;let c=`<img src="${t}" alt="${a}"`;return i&&(c+=` title="${Pr(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Pr(t.text)}},Py=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Tr=class gm{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||hs,this.options.renderer=this.options.renderer||new ld,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Py}static parse(t,i){return new gm(i).parse(t)}static parseInline(t,i){return new gm(i).parseInline(t)}parse(t,i=!0){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){a+=p||"";continue}}let u=h;switch(u.type){case"space":{a+=this.renderer.space(u);continue}case"hr":{a+=this.renderer.hr(u);continue}case"heading":{a+=this.renderer.heading(u);continue}case"code":{a+=this.renderer.code(u);continue}case"table":{a+=this.renderer.table(u);continue}case"blockquote":{a+=this.renderer.blockquote(u);continue}case"list":{a+=this.renderer.list(u);continue}case"html":{a+=this.renderer.html(u);continue}case"def":{a+=this.renderer.def(u);continue}case"paragraph":{a+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<t.length&&t[c+1].type==="text";)f=t[++c],p+=`
|
|
352
|
+
`+this.renderer.text(f);i?a+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):a+=p;continue}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}parseInline(t,i=this.renderer){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=f||"";continue}}let u=h;switch(u.type){case"escape":{a+=i.text(u);break}case"html":{a+=i.html(u);break}case"link":{a+=i.link(u);break}case"image":{a+=i.image(u);break}case"strong":{a+=i.strong(u);break}case"em":{a+=i.em(u);break}case"codespan":{a+=i.codespan(u);break}case"br":{a+=i.br(u);break}case"del":{a+=i.del(u);break}case"text":{a+=i.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},mu,nc=(mu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||hs}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Sr.lex:Sr.lexInline}provideParser(){return this.block?Tr.parse:Tr.parseInline}},Lt(mu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(mu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),mu),wz=class{constructor(...t){Lt(this,"defaults",$y());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",Tr);Lt(this,"Renderer",ld);Lt(this,"TextRenderer",Py);Lt(this,"Lexer",Sr);Lt(this,"Tokenizer",sd);Lt(this,"Hooks",nc);this.use(...t)}walkTokens(t,i){var s,l;let a=[];for(let c of t)switch(a=a.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)a=a.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let f of u)a=a.concat(this.walkTokens(f.tokens,i));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,i));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);a=a.concat(this.walkTokens(f,i))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let u=l.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new ld(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new sd(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new nc;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=a.hooks[h],f=l[h];nc.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&nc.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(l,p);return f.call(l,x)})();let g=u.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),l&&(u=u.concat(l.call(this,h))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return Sr.lex(t,i??this.defaults)}parser(t,i){return Tr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,u=await(l.hooks?await l.hooks.provideLexer():t?Sr.lex:Sr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(u):u;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?Tr.parse:Tr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer():t?Sr.lex:Sr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let u=(l.hooks?l.hooks.provideParser():t?Tr.parse:Tr.parseInline)(h,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
|
|
353
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Pr(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},ss=new wz;function fe(e,t){return ss.parse(e,t)}fe.options=fe.setOptions=function(e){return ss.setOptions(e),fe.defaults=ss.defaults,GT(fe.defaults),fe};fe.getDefaults=$y;fe.defaults=hs;fe.use=function(...e){return ss.use(...e),fe.defaults=ss.defaults,GT(fe.defaults),fe};fe.walkTokens=function(e,t){return ss.walkTokens(e,t)};fe.parseInline=ss.parseInline;fe.Parser=Tr;fe.parser=Tr.parse;fe.Renderer=ld;fe.TextRenderer=Py;fe.Lexer=Sr;fe.lexer=Sr.lex;fe.Tokenizer=sd;fe.Hooks=nc;fe.parse=fe;fe.options;fe.setOptions;fe.use;fe.walkTokens;fe.parseInline;Tr.parse;Sr.lex;function aw(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var a=Array.from(typeof e=="string"?[e]:e);a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,"");var s=a.reduce(function(h,u){var f=u.match(/\n([\t ]+|(?!\s).)/g);return f?h.concat(f.map(function(p){var g,x;return(x=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(s.length){var l=new RegExp(`
|
|
354
|
+
[ ]{`+Math.min.apply(Math,s)+"}","g");a=a.map(function(h){return h.replace(l,`
|
|
355
|
+
`)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,u){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
|
|
356
|
+
`)&&(g=String(h).split(`
|
|
357
|
+
`).map(function(x,m){return m===0?x:""+p+x}).join(`
|
|
358
|
+
`)),c+=g+a[u+1]}),c}var _z={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},mm=new Map,nw=new Map,Bz=S(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(mt.debug("Registering icon pack:",t.name),"loader"in t)nw.set(t.name,t.loader);else if("icons"in t)mm.set(t.name,t.icons);else throw mt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),sw=S(async(e,t)=>{const i=E$(e,!0,t!==void 0);if(!i)throw new Error(`Invalid icon name: ${e}`);const a=i.prefix||t;if(!a)throw new Error(`Icon name must contain a prefix: ${e}`);let s=mm.get(a);if(!s){const c=nw.get(a);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{s={...await c(),prefix:a},mm.set(a,s)}catch(h){throw mt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const l=M$(s,i.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),Ez=S(async e=>{try{return await sw(e),!0}catch{return!1}},"isIconAvailable"),zc=S(async(e,t,i)=>{let a;try{a=await sw(e,t==null?void 0:t.fallbackPrefix)}catch(c){mt.error(c),a=_z}const s=N$(a,t),l=H$(j$(s.body),{...s.attributes,...i});return Mr(l,Le())},"getIconSVG");function lw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
|
|
359
|
+
`).replace(/\n{2,}/g,`
|
|
360
|
+
`);return aw(a)}S(lw,"preprocessMarkdown");function ow(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var i;return((i=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(a=>({content:a,type:"normal"})))??[]})}S(ow,"nonMarkdownToLines");function cw(e,t={}){const i=lw(e,t),a=fe.lexer(i),s=[[]];let l=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
361
|
+
`).forEach((p,g)=>{g!==0&&(l++,s.push([])),p.split(" ").forEach(x=>{x=x.replace(/'/g,"'"),x&&s[l].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&s[l].push({content:h.text,type:"normal"})}return S(c,"processNode"),a.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(f=>{c(f)}):h.type==="html"?s[l].push({content:h.text,type:"normal"}):s[l].push({content:h.raw,type:"normal"})}),s}S(cw,"markdownToLines");function hw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}S(hw,"nonMarkdownToHTML");function uw(e,{markdownAutoWrap:t}={}){const i=fe.lexer(e);function a(s){var l,c,h;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(l=s.tokens)==null?void 0:l.map(a).join("")}</strong>`:s.type==="em"?`<em>${(c=s.tokens)==null?void 0:c.map(a).join("")}</em>`:s.type==="paragraph"?`<p>${(h=s.tokens)==null?void 0:h.map(a).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(mt.warn(`Unsupported markdown: ${s.type}`),s.raw)}return S(a,"output"),i.map(a).join("")}S(uw,"markdownToHTML");function dw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}S(dw,"splitTextToChars");function fw(e,t){const i=dw(t.content);return Wy(e,[],i,t.type)}S(fw,"splitWordToFitWidth");function Wy(e,t,i,a){if(i.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[s,...l]=i,c=[...t,s];return e([{content:c.join(""),type:a}])?Wy(e,c,l,a):(t.length===0&&s&&(t.push(s),i.shift()),[{content:t.join(""),type:a},{content:i.join(""),type:a}])}S(Wy,"splitWordToFitWidthRecursion");function pw(e,t){if(e.some(({content:i})=>i.includes(`
|
|
362
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return od(e,t)}S(pw,"splitLineToFitWidth");function od(e,t,i=[],a=[]){if(e.length===0)return a.length>0&&i.push(a),i.length>0?i:[];let s="";e[0].content===" "&&(s=" ",e.shift());const l=e.shift()??{content:" ",type:"normal"},c=[...a];if(s!==""&&c.push({content:s,type:"normal"}),c.push(l),t(c))return od(e,t,i,c);if(a.length>0)i.push(a),e.unshift(l);else if(l.content){const[h,u]=fw(t,l);i.push([h]),u.content&&e.unshift(u)}return od(e,t,i)}S(od,"splitLineToFitWidthRecursion");function ym(e,t){t&&e.attr("style",t)}S(ym,"applyStyle");var mv=16384;async function gw(e,t,i,a,s=!1,l=Le()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*i,mv)}px`),c.attr("height",`${Math.min(10*i,mv)}px`);const h=c.append("xhtml:div"),u=gc(t.label)?await V2(t.label.replace(Mc.lineBreakRegex,`
|
|
363
|
+
`),l):Mr(t.label,l),f=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(u),ym(p,t.labelStyle),p.attr("class",`${f} ${a}`),ym(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}S(gw,"addHtmlSpan");function Fd(e,t,i,a=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*i-.1+"em").attr("dy",i+"em");return a&&s.attr("text-anchor","middle"),s}S(Fd,"createTspan");function mw(e,t,i){const a=e.append("text"),s=Fd(a,1,t);Od(s,i);const l=s.node().getComputedTextLength();return a.remove(),l}S(mw,"computeWidthOfText");function Lz(e,t,i){var c;const a=e.append("text"),s=Fd(a,1,t);Od(s,[{content:i,type:"normal"}]);const l=(c=s.node())==null?void 0:c.getBoundingClientRect();return l&&a.remove(),l}S(Lz,"computeDimensionOfText");function yw(e,t,i,a=!1,s=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");s&&u.attr("text-anchor","middle");let f=0;for(const p of i){const g=S(m=>mw(c,1.1,m)<=e,"checkWidth"),x=g(p)?[p]:pw(p,g);for(const m of x){const v=Fd(u,f,1.1,s);Od(v,m),f++}}if(a){const p=u.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return u.node()}S(yw,"createFormattedText");function xm(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(i,a)=>{switch(a){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}S(xm,"decodeHTMLEntities");function Od(e,t){e.text(""),t.forEach((i,a)=>{const s=e.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");a===0?s.text(xm(i.content)):s.text(" "+xm(i.content))})}S(Od,"updateTextContentAndStyles");async function xw(e,t={}){const i=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,l,c)=>(i.push((async()=>{const h=`${l}:${c}`;return await Ez(h)?await zc(h,void 0,{class:"label-icon"}):`<i class='${Mr(s,t).replace(":"," ")}'></i>`})()),s));const a=await Promise.all(i);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}S(xw,"replaceIconSubstring");var La=S(async(e,t="",{style:i="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:f=!1}={},p)=>{if(mt.debug("XYZ createText",t,i,a,s,l,h,"addSvgBackground: ",f),l){const g=c?uw(t,p):hw(t),x=await xw(ns(g),p),m=t.replace(/\\\\/g,"\\"),v={isNode:h,label:gc(t)?m:x,labelStyle:i.replace("fill:","color:")};return await gw(e,v,u,s,f,p)}else{const g=ns(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?cw(g.replace("<br>","<br/>"),p):ow(g),m=yw(u,e,x,t?f:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).attr("style",v)}else{const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(m).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).select("text").attr("style",C)}return a?Xt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText");function pg(e,t,i){if(e&&e.length){const[a,s]=t,l=Math.PI/180*i,c=Math.cos(l),h=Math.sin(l);for(const u of e){const[f,p]=u;u[0]=(f-a)*c-(p-s)*h+a,u[1]=(f-a)*h+(p-s)*c+s}}}function Az(e,t){return e[0]===t[0]&&e[1]===t[1]}function Mz(e,t,i,a=1){const s=i,l=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,h=[0,0];if(s)for(const f of c)pg(f,h,s);const u=(function(f,p,g){const x=[];for(const _ of f){const E=[..._];Az(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}const m=[];p=Math.max(p,.1);const v=[];for(const _ of x)for(let E=0;E<_.length-1;E++){const F=_[E],D=_[E+1];if(F[1]!==D[1]){const N=Math.min(F[1],D[1]);v.push({ymin:N,ymax:Math.max(F[1],D[1]),x:N===F[1]?F[0]:D[0],islope:(D[0]-F[0])/(D[1]-F[1])})}}if(v.sort(((_,E)=>_.ymin<E.ymin?-1:_.ymin>E.ymin?1:_.x<E.x?-1:_.x>E.x?1:_.ymax===E.ymax?0:(_.ymax-E.ymax)/Math.abs(_.ymax-E.ymax))),!v.length)return m;let C=[],k=v[0].ymin,T=0;for(;C.length||v.length;){if(v.length){let _=-1;for(let E=0;E<v.length&&!(v[E].ymin>k);E++)_=E;v.splice(0,_+1).forEach((E=>{C.push({s:k,edge:E})}))}if(C=C.filter((_=>!(_.edge.ymax<=k))),C.sort(((_,E)=>_.edge.x===E.edge.x?0:(_.edge.x-E.edge.x)/Math.abs(_.edge.x-E.edge.x))),(g!==1||T%p==0)&&C.length>1)for(let _=0;_<C.length;_+=2){const E=_+1;if(E>=C.length)break;const F=C[_].edge,D=C[E].edge;m.push([[Math.round(F.x),k],[Math.round(D.x),k]])}k+=g,C.forEach((_=>{_.edge.x=_.edge.x+g*_.edge.islope})),T++}return m})(c,l,a);if(s){for(const f of c)pg(f,h,-s);(function(f,p,g){const x=[];f.forEach((m=>x.push(...m))),pg(x,p,g)})(u,h,-s)}return u}function Nc(e,t){var i;const a=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let l=1;return t.roughness>=1&&(((i=t.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(l=s),Mz(e,s,a,l||1)}class Yy{constructor(t){this.helper=t}fillPolygons(t,i){return this._fillPolygons(t,i)}_fillPolygons(t,i){const a=Nc(t,i);return{type:"fillSketch",ops:this.renderLines(a,i)}}renderLines(t,i){const a=[];for(const s of t)a.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],i));return a}}function Dd(e){const t=e[0],i=e[1];return Math.sqrt(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2))}class Rz extends Yy{fillPolygons(t,i){let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);const s=Nc(t,Object.assign({},i,{hachureGap:a})),l=Math.PI/180*i.hachureAngle,c=[],h=.5*a*Math.cos(l),u=.5*a*Math.sin(l);for(const[f,p]of s)Dd([f,p])&&c.push([[f[0]-h,f[1]+u],[...p]],[[f[0]+h,f[1]-u],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}}class Fz extends Yy{fillPolygons(t,i){const a=this._fillPolygons(t,i),s=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),l=this._fillPolygons(t,s);return a.ops=a.ops.concat(l.ops),a}}class Oz{constructor(t){this.helper=t}fillPolygons(t,i){const a=Nc(t,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(a,i)}dotsOnLines(t,i){const a=[];let s=i.hachureGap;s<0&&(s=4*i.strokeWidth),s=Math.max(s,.1);let l=i.fillWeight;l<0&&(l=i.strokeWidth/2);const c=s/4;for(const h of t){const u=Dd(h),f=u/s,p=Math.ceil(f)-1,g=u-p*s,x=(h[0][0]+h[1][0])/2-s/4,m=Math.min(h[0][1],h[1][1]);for(let v=0;v<p;v++){const C=m+g+v*s,k=x-c+2*Math.random()*c,T=C-c+2*Math.random()*c,_=this.helper.ellipse(k,T,l,l,i);a.push(..._.ops)}}return{type:"fillSketch",ops:a}}}class Dz{constructor(t){this.helper=t}fillPolygons(t,i){const a=Nc(t,i);return{type:"fillSketch",ops:this.dashedLine(a,i)}}dashedLine(t,i){const a=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,s=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,l=[];return t.forEach((c=>{const h=Dd(c),u=Math.floor(h/(a+s)),f=(h+s-u*(a+s))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let m=0;m<u;m++){const v=m*(a+s),C=v+a,k=[p[0]+v*Math.cos(x)+f*Math.cos(x),p[1]+v*Math.sin(x)+f*Math.sin(x)],T=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)];l.push(...this.helper.doubleLineOps(k[0],k[1],T[0],T[1],i))}})),l}}class $z{constructor(t){this.helper=t}fillPolygons(t,i){const a=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,s=i.zigzagOffset<0?a:i.zigzagOffset,l=Nc(t,i=Object.assign({},i,{hachureGap:a+s}));return{type:"fillSketch",ops:this.zigzagLines(l,s,i)}}zigzagLines(t,i,a){const s=[];return t.forEach((l=>{const c=Dd(l),h=Math.round(c/(2*i));let u=l[0],f=l[1];u[0]>f[0]&&(u=l[1],f=l[0]);const p=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*i,m=2*(g+1)*i,v=Math.sqrt(2*Math.pow(i,2)),C=[u[0]+x*Math.cos(p),u[1]+x*Math.sin(p)],k=[u[0]+m*Math.cos(p),u[1]+m*Math.sin(p)],T=[C[0]+v*Math.cos(p+Math.PI/4),C[1]+v*Math.sin(p+Math.PI/4)];s.push(...this.helper.doubleLineOps(C[0],C[1],T[0],T[1],a),...this.helper.doubleLineOps(T[0],T[1],k[0],k[1],a))}})),s}}const Oi={};class zz{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Nz=0,gg=1,yv=2,hu={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function mg(e,t){return e.type===t}function Gy(e){const t=[],i=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Nz,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:gg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:yv,text:""},h})(e);let a="BOD",s=0,l=i[s];for(;!mg(l,yv);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return Gy("M0,0"+e);s++,c=hu[l.text],a=l.text}else mg(l,gg)?c=hu[a]:(s++,c=hu[l.text],a=l.text);if(!(s+c<i.length))throw new Error("Path data ended short");for(let u=s;u<s+c;u++){const f=i[u];if(!mg(f,gg))throw new Error("Param not a number: "+a+","+f.text);h[h.length]=+f.text}if(typeof hu[a]!="number")throw new Error("Bad segment: "+a);{const u={key:a,data:h};t.push(u),s+=c,l=i[s],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function bw(e){let t=0,i=0,a=0,s=0;const l=[];for(const{key:c,data:h}of e)switch(c){case"M":l.push({key:"M",data:[...h]}),[t,i]=h,[a,s]=h;break;case"m":t+=h[0],i+=h[1],l.push({key:"M",data:[t,i]}),a=t,s=i;break;case"L":l.push({key:"L",data:[...h]}),[t,i]=h;break;case"l":t+=h[0],i+=h[1],l.push({key:"L",data:[t,i]});break;case"C":l.push({key:"C",data:[...h]}),t=h[4],i=h[5];break;case"c":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"C",data:u}),t=u[4],i=u[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],i=h[3];break;case"q":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"Q",data:u}),t=u[2],i=u[3];break}case"A":l.push({key:"A",data:[...h]}),t=h[5],i=h[6];break;case"a":t+=h[5],i+=h[6],l.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,i]});break;case"H":l.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],l.push({key:"H",data:[t]});break;case"V":l.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],l.push({key:"V",data:[i]});break;case"S":l.push({key:"S",data:[...h]}),t=h[2],i=h[3];break;case"s":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"S",data:u}),t=u[2],i=u[3];break}case"T":l.push({key:"T",data:[...h]}),t=h[0],i=h[1];break;case"t":t+=h[0],i+=h[1],l.push({key:"T",data:[t,i]});break;case"Z":case"z":l.push({key:"Z",data:[]}),t=a,i=s}return l}function Cw(e){const t=[];let i="",a=0,s=0,l=0,c=0,h=0,u=0;for(const{key:f,data:p}of e){switch(f){case"M":t.push({key:"M",data:[...p]}),[a,s]=p,[l,c]=p;break;case"C":t.push({key:"C",data:[...p]}),a=p[4],s=p[5],h=p[2],u=p[3];break;case"L":t.push({key:"L",data:[...p]}),[a,s]=p;break;case"H":a=p[0],t.push({key:"L",data:[a,s]});break;case"V":s=p[0],t.push({key:"L",data:[a,s]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=a+(a-h),x=s+(s-u)):(g=a,x=s),t.push({key:"C",data:[g,x,...p]}),h=p[0],u=p[1],a=p[2],s=p[3];break}case"T":{const[g,x]=p;let m=0,v=0;i==="Q"||i==="T"?(m=a+(a-h),v=s+(s-u)):(m=a,v=s);const C=a+2*(m-a)/3,k=s+2*(v-s)/3,T=g+2*(m-g)/3,_=x+2*(v-x)/3;t.push({key:"C",data:[C,k,T,_,g,x]}),h=m,u=v,a=g,s=x;break}case"Q":{const[g,x,m,v]=p,C=a+2*(g-a)/3,k=s+2*(x-s)/3,T=m+2*(g-m)/3,_=v+2*(x-v)/3;t.push({key:"C",data:[C,k,T,_,m,v]}),h=g,u=x,a=m,s=v;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),m=p[2],v=p[3],C=p[4],k=p[5],T=p[6];g===0||x===0?(t.push({key:"C",data:[a,s,k,T,k,T]}),a=k,s=T):(a!==k||s!==T)&&(vw(a,s,k,T,g,x,m,v,C).forEach((function(_){t.push({key:"C",data:_})})),a=k,s=T);break}case"Z":t.push({key:"Z",data:[]}),a=l,s=c}i=f}return t}function Vo(e,t,i){return[e*Math.cos(i)-t*Math.sin(i),e*Math.sin(i)+t*Math.cos(i)]}function vw(e,t,i,a,s,l,c,h,u,f){const p=(g=c,Math.PI*g/180);var g;let x=[],m=0,v=0,C=0,k=0;if(f)[m,v,C,k]=f;else{[e,t]=Vo(e,t,-p),[i,a]=Vo(i,a,-p);const J=(e-i)/2,q=(t-a)/2;let j=J*J/(s*s)+q*q/(l*l);j>1&&(j=Math.sqrt(j),s*=j,l*=j);const A=s*s,H=l*l,z=A*H-A*q*q-H*J*J,$=A*q*q+H*J*J,Q=(h===u?-1:1)*Math.sqrt(Math.abs(z/$));C=Q*s*q/l+(e+i)/2,k=Q*-l*J/s+(t+a)/2,m=Math.asin(parseFloat(((t-k)/l).toFixed(9))),v=Math.asin(parseFloat(((a-k)/l).toFixed(9))),e<C&&(m=Math.PI-m),i<C&&(v=Math.PI-v),m<0&&(m=2*Math.PI+m),v<0&&(v=2*Math.PI+v),u&&m>v&&(m-=2*Math.PI),!u&&v>m&&(v-=2*Math.PI)}let T=v-m;if(Math.abs(T)>120*Math.PI/180){const J=v,q=i,j=a;v=u&&v>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,x=vw(i=C+s*Math.cos(v),a=k+l*Math.sin(v),q,j,s,l,c,0,u,[v,J,C,k])}T=v-m;const _=Math.cos(m),E=Math.sin(m),F=Math.cos(v),D=Math.sin(v),N=Math.tan(T/4),U=4/3*s*N,R=4/3*l*N,V=[e,t],Y=[e+U*E,t-R*_],G=[i+U*D,a-R*F],et=[i,a];if(Y[0]=2*V[0]-Y[0],Y[1]=2*V[1]-Y[1],f)return[Y,G,et].concat(x);{x=[Y,G,et].concat(x);const J=[];for(let q=0;q<x.length;q+=3){const j=Vo(x[q][0],x[q][1],p),A=Vo(x[q+1][0],x[q+1][1],p),H=Vo(x[q+2][0],x[q+2][1],p);J.push([j[0],j[1],A[0],A[1],H[0],H[1]])}return J}}const qz={randOffset:function(e,t){return Nt(e,t)},randOffsetWithRange:function(e,t,i){return cd(e,t,i)},ellipse:function(e,t,i,a,s){const l=Sw(i,a,s);return bm(e,t,s,l).opset},doubleLineOps:function(e,t,i,a,s){return kn(e,t,i,a,s,!0)}};function kw(e,t,i,a,s){return{type:"path",ops:kn(e,t,i,a,s)}}function Lu(e,t,i){const a=(e||[]).length;if(a>2){const s=[];for(let l=0;l<a-1;l++)s.push(...kn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],i));return t&&s.push(...kn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],i)),{type:"path",ops:s}}return a===2?kw(e[0][0],e[0][1],e[1][0],e[1][1],i):{type:"path",ops:[]}}function Iz(e,t,i,a,s){return(function(l,c){return Lu(l,!0,c)})([[e,t],[e+i,t],[e+i,t+a],[e,t+a]],s)}function xv(e,t){if(e.length){const i=typeof e[0][0]=="number"?[e]:e,a=uu(i[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:uu(i[0],1.5*(1+.22*t.roughness),vv(t));for(let l=1;l<i.length;l++){const c=i[l];if(c.length){const h=uu(c,1*(1+.2*t.roughness),t),u=t.disableMultiStroke?[]:uu(c,1.5*(1+.22*t.roughness),vv(t));for(const f of h)f.op!=="move"&&a.push(f);for(const f of u)f.op!=="move"&&s.push(f)}}return{type:"path",ops:a.concat(s)}}return{type:"path",ops:[]}}function Sw(e,t,i){const a=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/s;let c=Math.abs(e/2),h=Math.abs(t/2);const u=1-i.curveFitting;return c+=Nt(c*u,i),h+=Nt(h*u,i),{increment:l,rx:c,ry:h}}function bm(e,t,i,a){const[s,l]=kv(a.increment,e,t,a.rx,a.ry,1,a.increment*cd(.1,cd(.4,1,i),i),i);let c=hd(s,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=kv(a.increment,e,t,a.rx,a.ry,1.5,0,i),u=hd(h,null,i);c=c.concat(u)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function bv(e,t,i,a,s,l,c,h,u){const f=e,p=t;let g=Math.abs(i/2),x=Math.abs(a/2);g+=Nt(.01*g,u),x+=Nt(.01*x,u);let m=s,v=l;for(;m<0;)m+=2*Math.PI,v+=2*Math.PI;v-m>2*Math.PI&&(m=0,v=2*Math.PI);const C=2*Math.PI/u.curveStepCount,k=Math.min(C/2,(v-m)/2),T=Sv(k,f,p,g,x,m,v,1,u);if(!u.disableMultiStroke){const _=Sv(k,f,p,g,x,m,v,1.5,u);T.push(..._)}return c&&(h?T.push(...kn(f,p,f+g*Math.cos(m),p+x*Math.sin(m),u),...kn(f,p,f+g*Math.cos(v),p+x*Math.sin(v),u)):T.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(m),p+x*Math.sin(m)]})),{type:"path",ops:T}}function Cv(e,t){const i=Cw(bw(Gy(e))),a=[];let s=[0,0],l=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":l=[h[0],h[1]],s=[h[0],h[1]];break;case"L":a.push(...kn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[u,f,p,g,x,m]=h;a.push(...jz(u,f,p,g,x,m,l,t)),l=[x,m];break}case"Z":a.push(...kn(l[0],l[1],s[0],s[1],t)),l=[s[0],s[1]]}return{type:"path",ops:a}}function yg(e,t){const i=[];for(const a of e)if(a.length){const s=t.maxRandomnessOffset||0,l=a.length;if(l>2){i.push({op:"move",data:[a[0][0]+Nt(s,t),a[0][1]+Nt(s,t)]});for(let c=1;c<l;c++)i.push({op:"lineTo",data:[a[c][0]+Nt(s,t),a[c][1]+Nt(s,t)]})}}return{type:"fillPath",ops:i}}function al(e,t){return(function(i,a){let s=i.fillStyle||"hachure";if(!Oi[s])switch(s){case"zigzag":Oi[s]||(Oi[s]=new Rz(a));break;case"cross-hatch":Oi[s]||(Oi[s]=new Fz(a));break;case"dots":Oi[s]||(Oi[s]=new Oz(a));break;case"dashed":Oi[s]||(Oi[s]=new Dz(a));break;case"zigzag-line":Oi[s]||(Oi[s]=new $z(a));break;default:s="hachure",Oi[s]||(Oi[s]=new Yy(a))}return Oi[s]})(t,qz).fillPolygons(e,t)}function vv(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Tw(e){return e.randomizer||(e.randomizer=new zz(e.seed||0)),e.randomizer.next()}function cd(e,t,i,a=1){return i.roughness*a*(Tw(i)*(t-e)+e)}function Nt(e,t,i=1){return cd(-e,e,t,i)}function kn(e,t,i,a,s,l=!1){const c=l?s.disableMultiStrokeFill:s.disableMultiStroke,h=Cm(e,t,i,a,s,!0,!1);if(c)return h;const u=Cm(e,t,i,a,s,!0,!0);return h.concat(u)}function Cm(e,t,i,a,s,l,c){const h=Math.pow(e-i,2)+Math.pow(t-a,2),u=Math.sqrt(h);let f=1;f=u<200?1:u>500?.4:-.0016668*u+1.233334;let p=s.maxRandomnessOffset||0;p*p*100>h&&(p=u/10);const g=p/2,x=.2+.2*Tw(s);let m=s.bowing*s.maxRandomnessOffset*(a-t)/200,v=s.bowing*s.maxRandomnessOffset*(e-i)/200;m=Nt(m,s,f),v=Nt(v,s,f);const C=[],k=()=>Nt(g,s,f),T=()=>Nt(p,s,f),_=s.preserveVertices;return c?C.push({op:"move",data:[e+(_?0:k()),t+(_?0:k())]}):C.push({op:"move",data:[e+(_?0:Nt(p,s,f)),t+(_?0:Nt(p,s,f))]}),c?C.push({op:"bcurveTo",data:[m+e+(i-e)*x+k(),v+t+(a-t)*x+k(),m+e+2*(i-e)*x+k(),v+t+2*(a-t)*x+k(),i+(_?0:k()),a+(_?0:k())]}):C.push({op:"bcurveTo",data:[m+e+(i-e)*x+T(),v+t+(a-t)*x+T(),m+e+2*(i-e)*x+T(),v+t+2*(a-t)*x+T(),i+(_?0:T()),a+(_?0:T())]}),C}function uu(e,t,i){if(!e.length)return[];const a=[];a.push([e[0][0]+Nt(t,i),e[0][1]+Nt(t,i)]),a.push([e[0][0]+Nt(t,i),e[0][1]+Nt(t,i)]);for(let s=1;s<e.length;s++)a.push([e[s][0]+Nt(t,i),e[s][1]+Nt(t,i)]),s===e.length-1&&a.push([e[s][0]+Nt(t,i),e[s][1]+Nt(t,i)]);return hd(a,null,i)}function hd(e,t,i){const a=e.length,s=[];if(a>3){const l=[],c=1-i.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const u=e[h];l[0]=[u[0],u[1]],l[1]=[u[0]+(c*e[h+1][0]-c*e[h-1][0])/6,u[1]+(c*e[h+1][1]-c*e[h-1][1])/6],l[2]=[e[h+1][0]+(c*e[h][0]-c*e[h+2][0])/6,e[h+1][1]+(c*e[h][1]-c*e[h+2][1])/6],l[3]=[e[h+1][0],e[h+1][1]],s.push({op:"bcurveTo",data:[l[1][0],l[1][1],l[2][0],l[2][1],l[3][0],l[3][1]]})}}else a===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):a===2&&s.push(...Cm(e[0][0],e[0][1],e[1][0],e[1][1],i,!0,!0));return s}function kv(e,t,i,a,s,l,c,h){const u=[],f=[];if(h.roughness===0){e/=4,f.push([t+a*Math.cos(-e),i+s*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),i+s*Math.sin(p)];u.push(g),f.push(g)}f.push([t+a*Math.cos(0),i+s*Math.sin(0)]),f.push([t+a*Math.cos(e),i+s*Math.sin(e)])}else{const p=Nt(.5,h)-Math.PI/2;f.push([Nt(l,h)+t+.9*a*Math.cos(p-e),Nt(l,h)+i+.9*s*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const m=[Nt(l,h)+t+a*Math.cos(x),Nt(l,h)+i+s*Math.sin(x)];u.push(m),f.push(m)}f.push([Nt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),Nt(l,h)+i+s*Math.sin(p+2*Math.PI+.5*c)]),f.push([Nt(l,h)+t+.98*a*Math.cos(p+c),Nt(l,h)+i+.98*s*Math.sin(p+c)]),f.push([Nt(l,h)+t+.9*a*Math.cos(p+.5*c),Nt(l,h)+i+.9*s*Math.sin(p+.5*c)])}return[f,u]}function Sv(e,t,i,a,s,l,c,h,u){const f=l+Nt(.1,u),p=[];p.push([Nt(h,u)+t+.9*a*Math.cos(f-e),Nt(h,u)+i+.9*s*Math.sin(f-e)]);for(let g=f;g<=c;g+=e)p.push([Nt(h,u)+t+a*Math.cos(g),Nt(h,u)+i+s*Math.sin(g)]);return p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),hd(p,null,u)}function jz(e,t,i,a,s,l,c,h){const u=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let m=0;m<g;m++)m===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(x?0:Nt(f[0],h)),c[1]+(x?0:Nt(f[0],h))]}),p=x?[s,l]:[s+Nt(f[m],h),l+Nt(f[m],h)],u.push({op:"bcurveTo",data:[e+Nt(f[m],h),t+Nt(f[m],h),i+Nt(f[m],h),a+Nt(f[m],h),p[0],p[1]]});return u}function Zo(e){return[...e]}function Tv(e,t=0){const i=e.length;if(i<3)throw new Error("A curve must have at least three points.");const a=[];if(i===3)a.push(Zo(e[0]),Zo(e[1]),Zo(e[2]),Zo(e[2]));else{const s=[];s.push(e[0],e[0]);for(let h=1;h<e.length;h++)s.push(e[h]),h===e.length-1&&s.push(e[h]);const l=[],c=1-t;a.push(Zo(s[0]));for(let h=1;h+2<s.length;h++){const u=s[h];l[0]=[u[0],u[1]],l[1]=[u[0]+(c*s[h+1][0]-c*s[h-1][0])/6,u[1]+(c*s[h+1][1]-c*s[h-1][1])/6],l[2]=[s[h+1][0]+(c*s[h][0]-c*s[h+2][0])/6,s[h+1][1]+(c*s[h][1]-c*s[h+2][1])/6],l[3]=[s[h+1][0],s[h+1][1]],a.push(l[1],l[2],l[3])}}return a}function Au(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Hz(e,t,i){const a=Au(t,i);if(a===0)return Au(e,t);let s=((e[0]-t[0])*(i[0]-t[0])+(e[1]-t[1])*(i[1]-t[1]))/a;return s=Math.max(0,Math.min(1,s)),Au(e,Yn(t,i,s))}function Yn(e,t,i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i]}function vm(e,t,i,a){const s=a||[];if((function(h,u){const f=h[u+0],p=h[u+1],g=h[u+2],x=h[u+3];let m=3*p[0]-2*f[0]-x[0];m*=m;let v=3*p[1]-2*f[1]-x[1];v*=v;let C=3*g[0]-2*x[0]-f[0];C*=C;let k=3*g[1]-2*x[1]-f[1];return k*=k,m<C&&(m=C),v<k&&(v=k),m+v})(e,t)<i){const h=e[t+0];s.length?(l=s[s.length-1],c=h,Math.sqrt(Au(l,c))>1&&s.push(h)):s.push(h),s.push(e[t+3])}else{const u=e[t+0],f=e[t+1],p=e[t+2],g=e[t+3],x=Yn(u,f,.5),m=Yn(f,p,.5),v=Yn(p,g,.5),C=Yn(x,m,.5),k=Yn(m,v,.5),T=Yn(C,k,.5);vm([u,x,C,T],0,i,s),vm([T,k,v,g],0,i,s)}var l,c;return s}function Uz(e,t){return ud(e,0,e.length,t)}function ud(e,t,i,a,s){const l=s||[],c=e[t],h=e[i-1];let u=0,f=1;for(let p=t+1;p<i-1;++p){const g=Hz(e[p],c,h);g>u&&(u=g,f=p)}return Math.sqrt(u)>a?(ud(e,t,f+1,a,l),ud(e,f,i,a,l)):(l.length||l.push(c),l.push(h)),l}function xg(e,t=.15,i){const a=[],s=(e.length-1)/3;for(let l=0;l<s;l++)vm(e,3*l,t,a);return i&&i>0?ud(a,0,a.length,i):a}const Xi="none";class dd{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,i,a){return{shape:t,sets:i||[],options:a||this.defaultOptions}}line(t,i,a,s,l){const c=this._o(l);return this._d("line",[kw(t,i,a,s,c)],c)}rectangle(t,i,a,s,l){const c=this._o(l),h=[],u=Iz(t,i,a,s,c);if(c.fill){const f=[[t,i],[t+a,i],[t+a,i+s],[t,i+s]];c.fillStyle==="solid"?h.push(yg([f],c)):h.push(al([f],c))}return c.stroke!==Xi&&h.push(u),this._d("rectangle",h,c)}ellipse(t,i,a,s,l){const c=this._o(l),h=[],u=Sw(a,s,c),f=bm(t,i,c,u);if(c.fill)if(c.fillStyle==="solid"){const p=bm(t,i,c,u).opset;p.type="fillPath",h.push(p)}else h.push(al([f.estimatedPoints],c));return c.stroke!==Xi&&h.push(f.opset),this._d("ellipse",h,c)}circle(t,i,a,s){const l=this.ellipse(t,i,a,a,s);return l.shape="circle",l}linearPath(t,i){const a=this._o(i);return this._d("linearPath",[Lu(t,!1,a)],a)}arc(t,i,a,s,l,c,h=!1,u){const f=this._o(u),p=[],g=bv(t,i,a,s,l,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const m=bv(t,i,a,s,l,c,!0,!1,x);m.type="fillPath",p.push(m)}else p.push((function(x,m,v,C,k,T,_){const E=x,F=m;let D=Math.abs(v/2),N=Math.abs(C/2);D+=Nt(.01*D,_),N+=Nt(.01*N,_);let U=k,R=T;for(;U<0;)U+=2*Math.PI,R+=2*Math.PI;R-U>2*Math.PI&&(U=0,R=2*Math.PI);const V=(R-U)/_.curveStepCount,Y=[];for(let G=U;G<=R;G+=V)Y.push([E+D*Math.cos(G),F+N*Math.sin(G)]);return Y.push([E+D*Math.cos(R),F+N*Math.sin(R)]),Y.push([E,F]),al([Y],_)})(t,i,a,s,l,c,f));return f.stroke!==Xi&&p.push(g),this._d("arc",p,f)}curve(t,i){const a=this._o(i),s=[],l=xv(t,a);if(a.fill&&a.fill!==Xi)if(a.fillStyle==="solid"){const c=xv(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=t;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const f of u)f.length<3?c.push(...f):f.length===3?c.push(...xg(Tv([f[0],f[0],f[1],f[2]]),10,(1+a.roughness)/2)):c.push(...xg(Tv(f),10,(1+a.roughness)/2))}c.length&&s.push(al([c],a))}return a.stroke!==Xi&&s.push(l),this._d("curve",s,a)}polygon(t,i){const a=this._o(i),s=[],l=Lu(t,!0,a);return a.fill&&(a.fillStyle==="solid"?s.push(yg([t],a)):s.push(al([t],a))),a.stroke!==Xi&&s.push(l),this._d("polygon",s,a)}path(t,i){const a=this._o(i),s=[];if(!t)return this._d("path",s,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const l=a.fill&&a.fill!=="transparent"&&a.fill!==Xi,c=a.stroke!==Xi,h=!!(a.simplification&&a.simplification<1),u=(function(p,g,x){const m=Cw(bw(Gy(p))),v=[];let C=[],k=[0,0],T=[];const _=()=>{T.length>=4&&C.push(...xg(T,g)),T=[]},E=()=>{_(),C.length&&(v.push(C),C=[])};for(const{key:D,data:N}of m)switch(D){case"M":E(),k=[N[0],N[1]],C.push(k);break;case"L":_(),C.push([N[0],N[1]]);break;case"C":if(!T.length){const U=C.length?C[C.length-1]:k;T.push([U[0],U[1]])}T.push([N[0],N[1]]),T.push([N[2],N[3]]),T.push([N[4],N[5]]);break;case"Z":_(),C.push([k[0],k[1]])}if(E(),!x)return v;const F=[];for(const D of v){const N=Uz(D,x);N.length&&F.push(N)}return F})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),f=Cv(t,a);if(l)if(a.fillStyle==="solid")if(u.length===1){const p=Cv(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else s.push(yg(u,a));else s.push(al(u,a));return c&&(h?u.forEach((p=>{s.push(Lu(p,!1,a))})):s.push(f)),this._d("path",s,a)}opsToPath(t,i){let a="";for(const s of t.ops){const l=typeof i=="number"&&i>=0?s.data.map((c=>+c.toFixed(i))):s.data;switch(s.op){case"move":a+=`M${l[0]} ${l[1]} `;break;case"bcurveTo":a+=`C${l[0]} ${l[1]}, ${l[2]} ${l[3]}, ${l[4]} ${l[5]} `;break;case"lineTo":a+=`L${l[0]} ${l[1]} `}}return a.trim()}toPaths(t){const i=t.sets||[],a=t.options||this.defaultOptions,s=[];for(const l of i){let c=null;switch(l.type){case"path":c={d:this.opsToPath(l),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:Xi};break;case"fillPath":c={d:this.opsToPath(l),stroke:Xi,strokeWidth:0,fill:a.fill||Xi};break;case"fillSketch":c=this.fillSketch(l,a)}c&&s.push(c)}return s}fillSketch(t,i){let a=i.fillWeight;return a<0&&(a=i.strokeWidth/2),{d:this.opsToPath(t),stroke:i.fill||Xi,strokeWidth:a,fill:Xi}}_mergedShape(t){return t.filter(((i,a)=>a===0||i.op!=="move"))}}class Pz{constructor(t,i){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new dd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":s.save(),s.strokeStyle=a.stroke==="none"?"transparent":a.stroke,s.lineWidth=a.strokeWidth,a.strokeLineDash&&s.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(s.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(s,c,l),s.restore();break;case"fillPath":{s.save(),s.fillStyle=a.fill||"";const h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,c,l,h),s.restore();break}case"fillSketch":this.fillSketch(s,c,a)}}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=s,this._drawToContext(t,i,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,i,a,s="nonzero"){t.beginPath();for(const l of i.ops){const c=typeof a=="number"&&a>=0?l.data.map((h=>+h.toFixed(a))):l.data;switch(l.op){case"move":t.moveTo(c[0],c[1]);break;case"bcurveTo":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":t.lineTo(c[0],c[1])}}i.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c),c}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c),c}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c),c}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l),l}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a),a}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a),a}arc(t,i,a,s,l,c,h=!1,u){const f=this.gen.arc(t,i,a,s,l,c,h,u);return this.draw(f),f}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a),a}path(t,i){const a=this.gen.path(t,i);return this.draw(a),a}}const du="http://www.w3.org/2000/svg";class Wz{constructor(t,i){this.svg=t,this.gen=new dd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,l=s.createElementNS(du,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of i){let u=null;switch(h.type){case"path":u=s.createElementNS(du,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",a.stroke),u.setAttribute("stroke-width",a.strokeWidth+""),u.setAttribute("fill","none"),a.strokeLineDash&&u.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":u=s.createElementNS(du,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(s,h,a)}u&&l.appendChild(u)}return l}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2);const l=t.createElementNS(du,"path");return l.setAttribute("d",this.opsToPath(i,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",s+""),l.setAttribute("fill","none"),a.fillLineDash&&l.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),l}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,i){return this.gen.opsToPath(t,i)}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c)}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c)}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c)}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l)}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a)}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a)}arc(t,i,a,s,l,c,h=!1,u){const f=this.gen.arc(t,i,a,s,l,c,h,u);return this.draw(f)}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a)}path(t,i){const a=this.gen.path(t,i);return this.draw(a)}}var St={canvas:(e,t)=>new Pz(e,t),svg:(e,t)=>new Wz(e,t),generator:e=>new dd(e),newSeed:()=>dd.newSeed()},zt=S(async(e,t,i)=>{var m,v;let a;const s=t.useHtmlLabels||Ea((m=le())==null?void 0:m.htmlLabels);i?a=i:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",Ke(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const u=!!t.icon||!!t.img,f=t.labelType==="markdown",p=await La(c,Mr(ns(h),le()),{useHtmlLabels:s,width:t.width||((v=le().flowchart)==null?void 0:v.wrappingWidth),classes:f?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:u,markdown:f},le());let g=p.getBBox();const x=((t==null?void 0:t.padding)??0)/2;if(s){const C=p.children[0],k=Xt(p);await PT(C,h),g=C.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height)}return s?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:g,halfPadding:x,label:c}},"labelHelper"),bg=S(async(e,t,i)=>{var u,f;const a=i.useHtmlLabels??wi(le()),s=e.insert("g").attr("class","label").attr("style",i.labelStyle||""),l=await La(s,Mr(ns(t),le()),{useHtmlLabels:a,width:i.width||((f=(u=le())==null?void 0:u.flowchart)==null?void 0:f.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=l.getBBox();const h=i.padding/2;if(wi(le())){const p=l.children[0],g=Xt(l);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:h,label:s}},"insertLabel"),Et=S((e,t)=>{const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Dt=S((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ee(e){const t=e.map((i,a)=>`${a===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}S(ee,"createPathFromPoints");function Sn(e,t,i,a,s,l){const c=[],u=i-e,f=a-t,p=u/l,g=2*Math.PI/p,x=t+f/2;for(let m=0;m<=50;m++){const v=m/50,C=e+v*u,k=x+s*Math.sin(g*(C-e));c.push({x:C,y:k})}return c}S(Sn,"generateFullSineWavePoints");function Tc(e,t,i,a,s,l){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(Tc,"generateCirclePoints");function km(e){const t=Array.from(e.childNodes).filter(u=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");i.setAttribute("d",a);const s=t.find(u=>u.getAttribute("fill")!=="none"),l=t.find(u=>u.getAttribute("stroke")!=="none"),c=S((u,f)=>(u==null?void 0:u.getAttribute(f))??void 0,"getAttr");if(s){const u={fill:c(s,"fill"),"fill-opacity":c(s,"fill-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}if(l){const u={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}S(km,"mergePaths");var Yz=S((e,t)=>{var i=e.x,a=e.y,s=t.x-i,l=t.y-a,c=e.width/2,h=e.height/2,u,f;return Math.abs(l)*c>Math.abs(s)*h?(l<0&&(h=-h),u=l===0?0:h*s/l,f=h):(s<0&&(c=-c),u=c,f=s===0?0:c*l/s),{x:i+u,y:a+f}},"intersectRect"),Hl=Yz,Gz=S(async(e,t,i,a=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=le(),h=wi(c);return await La(e,l,{style:i,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},c)},"createLabel"),mn=Gz,Tn=S((e,t,i,a,s)=>["M",e+s,t,"H",e+i-s,"A",s,s,0,0,1,e+i,t+s,"V",t+a-s,"A",s,s,0,0,1,e+i-s,t+a,"H",e+s,"A",s,s,0,0,1,e,t+a-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),ww=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(i),m=g.insert("g").attr("class","cluster-label ");let v;t.labelType==="markdown"?v=await La(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):v=await mn(m,t.label,t.labelStyle||"",!1,!0);let C=v.getBBox();if(wi(i)){const U=v.children[0],R=Xt(v);C=U.getBoundingClientRect(),R.attr("width",C.width),R.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-k/2,E=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let F;if(t.look==="handDrawn"){const U=St.svg(g),R=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:s}),V=U.path(Tn(_,E,k,T,0),R);F=g.insert(()=>(mt.debug("Rough node insert CXC",V),V),":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";")),F.select("path").attr("style",p.join(";").replace("fill","stroke"))}else F=g.insert("rect",":first-child"),F.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",k).attr("height",T);const{subGraphTitleTopMargin:D}=Dy(i);if(m.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+D})`),h){const U=m.select("span");U&&U.attr("style",h)}const N=F.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=C.height-t.padding/2,t.intersect=function(U){return Hl(t,U)},{cluster:g,labelBBox:C}},"rect"),Xz=S((e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=i.insert("rect",":first-child"),s=0*t.padding,l=s/2;a.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-l).attr("y",t.y-t.height/2-l).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const c=a.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(h){return Hl(t,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),Vz=S(async(e,t)=>{const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=a,f=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let x=f.append("rect");const m=await mn(g,t.label,t.labelStyle,void 0,!0);let v=m.getBBox();if(wi(i)){const V=m.children[0],Y=Xt(m);v=V.getBoundingClientRect(),Y.attr("width",v.width),Y.attr("height",v.height)}const C=0*t.padding,k=C/2,T=(t.width<=v.width+t.padding?v.width+t.padding:t.width)+C;t.width<=v.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+C,E=t.height+C-v.height-6,F=t.x-T/2,D=t.y-_/2;t.width=T;const N=t.y-t.height/2-k+v.height+2;let U;if(t.look==="handDrawn"){const V=t.cssClasses.includes("statediagram-cluster-alt"),Y=St.svg(f),G=t.rx||t.ry?Y.path(Tn(F,D,T,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:s}):Y.rectangle(F,D,T,_,{seed:s});U=f.insert(()=>G,":first-child");const et=Y.rectangle(F,N,T,E,{fill:V?l:c,fillStyle:V?"hachure":"solid",stroke:u,seed:s});U=f.insert(()=>G,":first-child"),x=f.insert(()=>et)}else U=p.insert("rect",":first-child"),U.attr("class","outer").attr("x",F).attr("y",D).attr("width",T).attr("height",_).attr("data-look",t.look),x.attr("class","inner").attr("x",F).attr("y",N).attr("width",T).attr("height",E);g.attr("transform",`translate(${t.x-v.width/2}, ${D+1-(wi(i)?0:3)})`);const R=U.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=v.height-t.padding/2,t.labelBBox=v,t.intersect=function(V){return Hl(t,V)},{cluster:f,labelBBox:v}},"roundedWithTitle"),Zz=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(i),m=g.insert("g").attr("class","cluster-label "),v=await La(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let C=v.getBBox();if(wi(i)){const U=v.children[0],R=Xt(v);C=U.getBoundingClientRect(),R.attr("width",C.width),R.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-k/2,E=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let F;if(t.look==="handDrawn"){const U=St.svg(g),R=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:s}),V=U.path(Tn(_,E,k,T,t.rx),R);F=g.insert(()=>(mt.debug("Rough node insert CXC",V),V),":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";")),F.select("path").attr("style",p.join(";").replace("fill","stroke"))}else F=g.insert("rect",":first-child"),F.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",k).attr("height",T);const{subGraphTitleTopMargin:D}=Dy(i);if(m.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+D})`),h){const U=m.select("span");U&&U.attr("style",h)}const N=F.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=C.height-t.padding/2,t.intersect=function(U){return Hl(t,U)},{cluster:g,labelBBox:C}},"kanbanSection"),Qz=S((e,t)=>{const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{nodeBorder:l}=a,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),h=c.insert("g",":first-child"),u=0*t.padding,f=t.width+u;t.diff=-t.padding;const p=t.height+u,g=t.x-f/2,x=t.y-p/2;t.width=f;let m;if(t.look==="handDrawn"){const k=St.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});m=c.insert(()=>k,":first-child")}else{m=h.insert("rect",":first-child");let C="outer";t.look,C="divider",m.attr("class",C).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",t.look)}const v=m.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=0,t.intersect=function(C){return Hl(t,C)},{cluster:c,labelBBox:{}}},"divider"),Kz=ww,Jz={rect:ww,squareRect:Kz,roundedWithTitle:Vz,noteGroup:Xz,divider:Qz,kanbanSection:Zz},_w=new Map,t8=S(async(e,t)=>{const i=t.shape||"rect",a=await Jz[i](e,t);return _w.set(t.id,a),a},"insertCluster"),gI=S(()=>{_w=new Map},"clear");function Bw(e,t){return e.intersect(t)}S(Bw,"intersectNode");var e8=Bw;function Ew(e,t,i,a){var s=e.x,l=e.y,c=s-a.x,h=l-a.y,u=Math.sqrt(t*t*h*h+i*i*c*c),f=Math.abs(t*i*c/u);a.x<s&&(f=-f);var p=Math.abs(t*i*h/u);return a.y<l&&(p=-p),{x:s+f,y:l+p}}S(Ew,"intersectEllipse");var Lw=Ew;function Aw(e,t,i){return Lw(e,t,t,i)}S(Aw,"intersectCircle");var i8=Aw;function Mw(e,t,i,a){{const s=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=s*i.x+l*i.y+c,u=s*a.x+l*a.y+c,f=1e-6;if(h!==0&&u!==0&&Sm(h,u))return;const p=a.y-i.y,g=i.x-a.x,x=a.x*i.y-i.x*a.y,m=p*e.x+g*e.y+x,v=p*t.x+g*t.y+x;if(Math.abs(m)<f&&Math.abs(v)<f&&Sm(m,v))return;const C=s*g-p*l;if(C===0)return;const k=Math.abs(C/2);let T=l*x-g*c;const _=T<0?(T-k)/C:(T+k)/C;T=p*c-s*x;const E=T<0?(T-k)/C:(T+k)/C;return{x:_,y:E}}}S(Mw,"intersectLine");function Sm(e,t){return e*t>0}S(Sm,"sameSign");var r8=Mw;function Rw(e,t,i){let a=e.x,s=e.y,l=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,t.x),h=Math.min(h,t.y));let u=a-e.width/2-c,f=s-e.height/2-h;for(let p=0;p<t.length;p++){let g=t[p],x=t[p<t.length-1?p+1:0],m=r8(e,i,{x:u+g.x,y:f+g.y},{x:u+x.x,y:f+x.y});m&&l.push(m)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-i.x,m=p.y-i.y,v=Math.sqrt(x*x+m*m),C=g.x-i.x,k=g.y-i.y,T=Math.sqrt(C*C+k*k);return v<T?-1:v===T?0:1}),l[0]):e}S(Rw,"intersectPolygon");var a8=Rw,vt={node:e8,circle:i8,ellipse:Lw,polygon:a8,rect:Hl};function Fw(e,t){const{labelStyles:i}=_t(t);t.labelStyle=i;const a=Dt(t);let s=a;a||(s="anchor");const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=1,{cssStyles:h}=t,u=St.svg(l),f=Tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const p=u.circle(0,0,c*2,f),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",Ke(h)),Et(t,g),t.intersect=function(x){return mt.info("Circle intersect",t,c,x),vt.circle(t,c,x)},l}S(Fw,"anchor");function Tm(e,t,i,a,s,l,c){const u=(e+i)/2,f=(t+a)/2,p=Math.atan2(a-t,i-e),g=(i-e)/2,x=(a-t)/2,m=g/s,v=x/l,C=Math.sqrt(m**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-C**2),T=u+k*l*Math.sin(p)*(c?-1:1),_=f-k*s*Math.cos(p)*(c?-1:1),E=Math.atan2((t-_)/l,(e-T)/s);let D=Math.atan2((a-_)/l,(i-T)/s)-E;c&&D<0&&(D+=2*Math.PI),!c&&D>0&&(D-=2*Math.PI);const N=[];for(let U=0;U<20;U++){const R=U/19,V=E+R*D,Y=T+s*Math.cos(V),G=_+l*Math.sin(V);N.push({x:Y,y:G})}return N}S(Tm,"generateArcPoints");function Ow(e,t,i){const[a,s]=[t,i].sort((l,c)=>c-l);return s*(1-Math.sqrt(1-(e/a/2)**2))}S(Ow,"calculateArcSagitta");async function Dw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=S(V=>V+c,"calcTotalHeight"),u=S(V=>{const Y=V/2;return[Y/(2.5+V/50),Y]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=h(t!=null&&t.height?t==null?void 0:t.height:p.height),[x,m]=u(g),v=Ow(g,x,m),k=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2+v-v,T=g,{cssStyles:_}=t,E=[{x:k/2,y:-T/2},{x:-k/2,y:-T/2},...Tm(-k/2,-T/2,-k/2,T/2,x,m,!1),{x:k/2,y:T/2},...Tm(k/2,T/2,k/2,-T/2,x,m,!0)],F=St.svg(f),D=Tt(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const N=ee(E),U=F.path(N,D),R=f.insert(()=>U,":first-child");return R.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(${x/2}, 0)`),Et(t,R),t.intersect=function(V){return vt.polygon(t,E,V)},f}S(Dw,"bowTieRect");function Aa(e,t,i,a){return e.insert("polygon",":first-child").attr("points",a.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}S(Aa,"insertPolygonShape");var fu=12;async function $w(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?28:s,c=t.look==="neo"?24:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??u.width)+(t.look==="neo"?l*2:l+fu),p=((t==null?void 0:t.height)??u.height)+(t.look==="neo"?c*2:c),g=0,x=f,m=-p,v=0,C=[{x:g+fu,y:m},{x,y:m},{x,y:v},{x:g,y:v},{x:g,y:m+fu},{x:g+fu,y:m}];let k;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(h),E=Tt(t,{}),F=ee(C),D=_.path(F,E);k=h.insert(()=>D,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),T&&k.attr("style",T)}else k=Aa(h,f,p,C);return a&&k.attr("style",a),Et(t,k),t.intersect=function(_){return vt.polygon(t,C,_)},h}S($w,"card");function zw(e,t){const{nodeStyles:i}=_t(t);t.label="";const a=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,l=Math.max(28,t.width??0),c=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h=St.svg(a),u=Tt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ee(c),p=h.path(f,u),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(x){return vt.polygon(t,c,x)},a}S(zw,"choice");async function Xy(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await zt(e,t,Dt(t)),u=16,f=(i==null?void 0:i.padding)??h,p=t.look==="neo"?c.width/2+u*2:c.width/2+f;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=St.svg(l),v=Tt(t,{}),C=m.circle(0,0,p*2,v);g=l.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",Ke(x))}else g=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return Et(t,g),t.calcIntersect=function(m,v){const C=m.width/2;return vt.circle(m,C,v)},t.intersect=function(m){return mt.info("Circle intersect",t,p,m),vt.circle(t,p,m)},l}S(Xy,"circle");function Nw(e){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),a=e*2,s={x:a/2*t,y:a/2*i},l={x:-(a/2)*t,y:a/2*i},c={x:-(a/2)*t,y:-(a/2)*i},h={x:a/2*t,y:-(a/2)*i};return`M ${l.x},${l.y} L ${h.x},${h.y}
|
|
364
|
+
M ${s.x},${s.y} L ${c.x},${c.y}`}S(Nw,"createLine");function qw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i,t.label="";const s=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),l=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,h=St.svg(s),u=Tt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,l*2,u),p=Nw(l),g=h.path(p,u),x=s.insert(()=>f,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),Et(t,x),t.intersect=function(m){return mt.info("crossedCircle intersect",t,{radius:l,point:m}),vt.circle(t,l,m)},s}S(qw,"crossedCircle");function va(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(va,"generateCirclePoints");async function Iw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+h,p=l.height+u,g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...va(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...va(f/2+g*2,-g,g,20,-180,-270),...va(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...va(f/2,p/2,g,20,0,90)],v=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...va(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...va(f/2+f*.1,-g,g,20,-180,-270),...va(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...va(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],C=St.svg(s),k=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ee(m).replace("Z",""),E=C.path(_,k),F=ee(v),D=C.path(F,{...k}),N=s.insert("g",":first-child");return N.insert(()=>D,":first-child").attr("stroke-opacity",0),N.insert(()=>E,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(U){return vt.polygon(t,v,U)},s}S(Iw,"curlyBraceLeft");function ka(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:m,y:v})}return c}S(ka,"generateCirclePoints");async function jw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...ka(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...ka(f/2+g*2,-g,g,20,-180,-270),...ka(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...ka(f/2,p/2,g,20,0,90)],v=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...ka(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...ka(f/2+g*2,-g,g,20,-180,-270),...ka(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...ka(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],C=St.svg(s),k=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ee(m).replace("Z",""),E=C.path(_,k),F=ee(v),D=C.path(F,{...k}),N=s.insert("g",":first-child");return N.insert(()=>D,":first-child").attr("stroke-opacity",0),N.insert(()=>E,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(U){return vt.polygon(t,v,U)},s}S(jw,"curlyBraceRight");function li(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(li,"generateCirclePoints");async function Hw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...li(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...li(f/2+g*2,-g,g,20,-180,-270),...li(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...li(f/2,p/2,g,20,0,90)],v=[...li(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...li(-f/2-g/2,-g,g,20,0,90),...li(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...li(-f/2+g+g/2,p/2,g,30,-180,-270)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...li(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...li(f/2+g*2,-g,g,20,-180,-270),...li(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...li(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2-g-g/2,y:p/2+g},...li(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...li(-f/2-g/2,-g,g,20,0,90),...li(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...li(-f/2+g+g/2,p/2,g,30,-180,-270)],k=St.svg(s),T=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=ee(m).replace("Z",""),F=k.path(E,T),N=ee(v).replace("Z",""),U=k.path(N,T),R=ee(C),V=k.path(R,{...T}),Y=s.insert("g",":first-child");return Y.insert(()=>V,":first-child").attr("stroke-opacity",0),Y.insert(()=>F,":first-child"),Y.insert(()=>U,":first-child"),Y.attr("class","text"),x&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",a),Y.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,Y),t.intersect=function(G){return vt.polygon(t,C,G)},s}S(Hw,"curlyBraces");async function Uw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=20,u=5,{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=Math.max(h,(p.width+l*2)*1.25,(t==null?void 0:t.width)??0),x=Math.max(u,p.height+c*2,(t==null?void 0:t.height)??0),m=x/2,{cssStyles:v}=t,C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=g,_=x,E=T-m,F=_/4,D=[{x:E,y:0},{x:F,y:0},{x:0,y:_/2},{x:F,y:_},{x:E,y:_},...Tc(-E,-_/2,m,50,270,90)],N=ee(D),U=C.path(N,k),R=f.insert(()=>U,":first-child");return R.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",a),R.attr("transform",`translate(${-g/2}, ${-x/2})`),Et(t,R),t.intersect=function(V){return vt.polygon(t,D,V)},f}S(Uw,"curvedTrapezoid");var n8=S((e,t,i,a,s,l)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),s8=S((e,t,i,a,s,l)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),l8=S((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),wv=8,_v=8;async function Pw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?24:s,c=t.look==="neo"?24:s;if(t.width||t.height){const k=t.width??0;t.width=(t.width??0)-c,t.width<_v&&(t.width=_v);const _=k/2/(2.5+k/50);t.height=(t.height??0)-l-_*3,t.height<wv&&(t.height=wv)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t.width?t.width:u.width)+c,g=p/2,x=g/(2.5+p/50),m=(t.height?t.height:u.height)+l+x;let v;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=St.svg(h),T=s8(0,0,p,m,g,x),_=l8(0,x,p,m,g,x),E=Tt(t,{}),F=k.path(T,E),D=k.path(_,Tt(t,{fill:"none"}));v=h.insert(()=>D,":first-child"),v=h.insert(()=>F,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const k=n8(0,0,p,m,g,x);v=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Ke(C)).attr("style",a)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,v),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(k){const T=vt.rect(t,k),_=T.x-(t.x??0);if(g!=0&&(Math.abs(_)<(t.width??0)/2||Math.abs(_)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-x)){let E=x*x*(1-_*_/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,k.y-(t.y??0)>0&&(E=-E),T.y+=E}return T},h}S(Pw,"cylinder");async function Ul(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await zt(e,t,Dt(t)),h=Math.max(c.width+i.labelPaddingX*2,(t==null?void 0:t.width)||0),u=Math.max(c.height+i.labelPaddingY*2,(t==null?void 0:t.height)||0),f=-h/2,p=-u/2;let g,{rx:x,ry:m}=t;const{cssStyles:v}=t;if(i!=null&&i.rx&&i.ry&&(x=i.rx,m=i.ry),t.look==="handDrawn"){const C=St.svg(l),k=Tt(t,{}),T=x||m?C.path(Tn(f,p,h,u,x||0),k):C.rectangle(f,p,h,u,k);g=l.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",Ke(v))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",s).attr("rx",Ke(x)).attr("ry",Ke(m)).attr("x",f).attr("y",p).attr("width",h).attr("height",u);return Et(t,g),t.calcIntersect=function(C,k){return vt.rect(C,k)},t.intersect=function(C){return vt.rect(t,C)},l}S(Ul,"drawRect");async function Ww(e,t){const{cssClasses:i,labelPaddingX:a,labelPaddingY:s,padding:l,width:c,height:h}=t,u={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:s??l??0},f=await Ul(e,t,u);if(t.look==="handDrawn"){const m=St.svg(f),v=Tt(t,{}),C=f.select(".basic.label-container > path:nth-child(2)"),k=C.node();if(!k)return f;let T=null;if(k instanceof SVGGraphicsElement)T=k.getBBox();else return f;return f.insert(()=>m.line(T.x,T.y,T.x+T.width,T.y,v),".basic.label-container g.label"),f.insert(()=>m.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,v),".basic.label-container g.label"),C.remove(),f}const p=f.select(".basic.label-container"),g=(Number(p.attr("width"))||c)??0,x=(Number(p.attr("height"))||h)??0;return g>0&&x>0&&p.attr("stroke-dasharray",`${g} ${x}`),f}S(Ww,"datastore");async function Yw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=h.width+s,p=h.height+l,g=p*.2,x=-f/2,m=-p/2-g/2,{cssStyles:v}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x,y:m+g},{x:-x,y:m+g},{x:-x,y:-m},{x,y:-m},{x,y:m},{x:-x,y:m},{x:-x,y:m+g}],_=C.polygon(T.map(F=>[F.x,F.y]),k),E=c.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),u.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${m+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Et(t,E),t.intersect=function(F){return vt.rect(t,F)},c}S(Yw,"dividedRectangle");async function Gw(e,t){var m,v;const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?12:5;t.labelStyle=i;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?(t==null?void 0:t.width)/2:u.width/2)+(c??0),p=f-s;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{roughness:.2,strokeWidth:2.5}),T=Tt(t,{roughness:.2,strokeWidth:1.5}),_=C.circle(0,0,f*2,k),E=C.circle(0,0,p*2,T);g=h.insert("g",":first-child"),g.attr("class",Ke(t.cssClasses)).attr("style",Ke(x)),(m=g.node())==null||m.appendChild(_),(v=g.node())==null||v.appendChild(E)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),k=g.insert("circle");g.attr("class","basic label-container").attr("style",a),C.attr("class","outer-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0),k.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Et(t,g),t.intersect=function(C){return mt.info("DoubleCircle intersect",t,f,C),vt.circle(t,f,C)},h}S(Gw,"doublecircle");function Xw(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,u=St.svg(l),{nodeBorder:f}=i,p=Tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=u.circle(0,0,c*2,p),x=l.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),Et(t,x),t.intersect=function(m){return mt.info("filledCircle intersect",t,{radius:c,point:m}),vt.circle(t,c,m)},l}S(Xw,"filledCircle");var Bv=10,Ev=10;async function Vw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Bv&&(t.height=Bv),t.width=((t==null?void 0:t.width)??0)-l-l/2,t.width<Ev&&(t.width=Ev));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(l??0),p=t!=null&&t.height?t==null?void 0:t.height:f+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:m}=t,v=St.svg(c),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ee(x),T=v.path(k,C),_=c.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),t.width=f,t.height=p,Et(t,_),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(t.padding??0)/2+(h.y-(h.top??0))})`),t.intersect=function(E){return mt.info("Triangle intersect",t,x,E),vt.polygon(t,x,E)},c}S(Vw,"flippedTriangle");function Zw(e,t,{dir:i,config:{state:a,themeVariables:s}}){const{nodeStyles:l}=_t(t);t.label="";const c=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let u=Math.max(70,(t==null?void 0:t.width)??0),f=Math.max(10,(t==null?void 0:t.height)??0);i==="LR"&&(u=Math.max(10,(t==null?void 0:t.width)??0),f=Math.max(70,(t==null?void 0:t.height)??0));const p=-1*u/2,g=-1*f/2,x=St.svg(c),m=Tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const v=x.rectangle(p,g,u,f,m),C=c.insert(()=>v,":first-child");h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),Et(t,C);const k=(a==null?void 0:a.padding)??0;return t.width&&t.height&&(t.width+=k/2||0,t.height+=k/2||0),t.intersect=function(T){return vt.rect(t,T)},c}S(Zw,"forkJoin");async function Qw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=15,l=10,c=t.look==="neo"?16:t.padding??0,h=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-h*2,t.height<l&&(t.height=l),t.width=((t==null?void 0:t.width)??0)-c*2,t.width<s&&(t.width=s));const{shapeSvg:u,bbox:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,f.width))+c*2,g=(t!=null&&t.height?t==null?void 0:t.height:Math.max(l,f.height))+h*2,x=g/2,{cssStyles:m}=t,v=St.svg(u),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...Tc(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],T=ee(k),_=v.path(T,C),E=u.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(F){return mt.info("Pill intersect",t,{radius:x,point:F}),vt.polygon(t,k,F)},u}S(Qw,"halfRoundedRectangle");var o8=S((e,t,i,a,s)=>[`M${e+s},${t}`,`L${e+i-s},${t}`,`L${e+i},${t-a/2}`,`L${e+i-s},${t-a}`,`L${e+s},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function Kw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?3.5:4;t.labelStyle=i;const l=t.padding??0,c=70,h=32,u=t.look==="neo"?c:l,f=t.look==="neo"?h:l;if(t.width||t.height){const E=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*E-f,t.height=(t.height??0)-u}const{shapeSvg:p,bbox:g}=await zt(e,t,Dt(t)),x=(t!=null&&t.height?t==null?void 0:t.height:g.height)+u,m=x/s,v=(t!=null&&t.width?t==null?void 0:t.width:g.width)+2*m+f,C=[{x:m,y:0},{x:v-m,y:0},{x:v,y:-x/2},{x:v-m,y:-x},{x:m,y:-x},{x:0,y:-x/2}];let k;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(p),E=Tt(t,{}),F=o8(0,0,v,x,m),D=_.path(F,E);k=p.insert(()=>D,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),T&&k.attr("style",T)}else k=Aa(p,v,x,C);return a&&k.attr("style",a),t.width=v,t.height=x,Et(t,k),t.intersect=function(_){return vt.polygon(t,C,_)},p}S(Kw,"hexagon");async function Jw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const{shapeSvg:s}=await zt(e,t,Dt(t)),l=Math.max(30,(t==null?void 0:t.width)??0),c=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=St.svg(s),f=Tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:l,y:0},{x:0,y:c},{x:l,y:c}],g=ee(p),x=u.path(g,f),m=s.insert(()=>x,":first-child");return m.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",a),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Et(t,m),t.intersect=function(v){return mt.info("Pill intersect",t,{points:p}),vt.polygon(t,p,v)},s}S(Jw,"hourglass");async function t_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await zt(e,t,"icon-shape default"),x=t.pos==="t",m=h,v=h,{nodeBorder:C}=i,{stylesMap:k}=jl(t),T=-v/2,_=-m/2,E=t.label?8:0,F=St.svg(f),D=Tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const N=F.rectangle(T,_,v,m,D),U=Math.max(v,p.width),R=m+p.height+E,V=F.rectangle(-U/2,-R/2,U,R,{...D,fill:"transparent",stroke:"none"}),Y=f.insert(()=>N,":first-child"),G=f.insert(()=>V);if(t.icon){const et=f.append("g");et.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const J=et.node().getBBox(),q=J.width,j=J.height,A=J.x,H=J.y;et.attr("transform",`translate(${-q/2-A},${x?p.height/2+E/2-j/2-H:-p.height/2-E/2-j/2-H})`),et.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-R/2:R/2-p.height})`),Y.attr("transform",`translate(0,${x?p.height/2+E/2:-p.height/2-E/2})`),Et(t,G),t.intersect=function(et){if(mt.info("iconSquare intersect",t,et),!t.label)return vt.rect(t,et);const J=t.x??0,q=t.y??0,j=t.height??0;let A=[];return x?A=[{x:J-p.width/2,y:q-j/2},{x:J+p.width/2,y:q-j/2},{x:J+p.width/2,y:q-j/2+p.height+E},{x:J+v/2,y:q-j/2+p.height+E},{x:J+v/2,y:q+j/2},{x:J-v/2,y:q+j/2},{x:J-v/2,y:q-j/2+p.height+E},{x:J-p.width/2,y:q-j/2+p.height+E}]:A=[{x:J-v/2,y:q-j/2},{x:J+v/2,y:q-j/2},{x:J+v/2,y:q-j/2+m},{x:J+p.width/2,y:q-j/2+m},{x:J+p.width/2/2,y:q+j/2},{x:J-p.width/2,y:q+j/2},{x:J-p.width/2,y:q-j/2+m},{x:J-v/2,y:q-j/2+m}],vt.polygon(t,A,et)},f}S(t_,"icon");async function e_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await zt(e,t,"icon-shape default"),x=20,m=t.label?8:0,v=t.pos==="t",{nodeBorder:C,mainBkg:k}=i,{stylesMap:T}=jl(t),_=St.svg(f),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=T.get("fill");E.stroke=F??k;const D=f.append("g");t.icon&&D.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const N=D.node().getBBox(),U=N.width,R=N.height,V=N.x,Y=N.y,G=Math.max(U,R)*Math.SQRT2+x*2,et=_.circle(0,0,G,E),J=Math.max(G,p.width),q=G+p.height+m,j=_.rectangle(-J/2,-q/2,J,q,{...E,fill:"transparent",stroke:"none"}),A=f.insert(()=>et,":first-child"),H=f.insert(()=>j);return D.attr("transform",`translate(${-U/2-V},${v?p.height/2+m/2-R/2-Y:-p.height/2-m/2-R/2-Y})`),D.attr("style",`color: ${T.get("stroke")??C};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${v?-q/2:q/2-p.height})`),A.attr("transform",`translate(0,${v?p.height/2+m/2:-p.height/2-m/2})`),Et(t,H),t.intersect=function(z){return mt.info("iconSquare intersect",t,z),vt.rect(t,z)},f}S(e_,"iconCircle");async function i_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await zt(e,t,"icon-shape default"),m=t.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:k,mainBkg:T}=i,{stylesMap:_}=jl(t),E=-C/2,F=-v/2,D=t.label?8:0,N=St.svg(f),U=Tt(t,{});t.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");const R=_.get("fill");U.stroke=R??T;const V=N.path(Tn(E,F,C,v,5),U),Y=Math.max(C,p.width),G=v+p.height+D,et=N.rectangle(-Y/2,-G/2,Y,G,{...U,fill:"transparent",stroke:"none"}),J=f.insert(()=>V,":first-child").attr("class","icon-shape2"),q=f.insert(()=>et);if(t.icon){const j=f.append("g");j.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),H=A.width,z=A.height,$=A.x,Q=A.y;j.attr("transform",`translate(${-H/2-$},${m?p.height/2+D/2-z/2-Q:-p.height/2-D/2-z/2-Q})`),j.attr("style",`color: ${_.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-G/2:G/2-p.height})`),J.attr("transform",`translate(0,${m?p.height/2+D/2:-p.height/2-D/2})`),Et(t,q),t.intersect=function(j){if(mt.info("iconSquare intersect",t,j),!t.label)return vt.rect(t,j);const A=t.x??0,H=t.y??0,z=t.height??0;let $=[];return m?$=[{x:A-p.width/2,y:H-z/2},{x:A+p.width/2,y:H-z/2},{x:A+p.width/2,y:H-z/2+p.height+D},{x:A+C/2,y:H-z/2+p.height+D},{x:A+C/2,y:H+z/2},{x:A-C/2,y:H+z/2},{x:A-C/2,y:H-z/2+p.height+D},{x:A-p.width/2,y:H-z/2+p.height+D}]:$=[{x:A-C/2,y:H-z/2},{x:A+C/2,y:H-z/2},{x:A+C/2,y:H-z/2+v},{x:A+p.width/2,y:H-z/2+v},{x:A+p.width/2/2,y:H+z/2},{x:A-p.width/2,y:H+z/2},{x:A-p.width/2,y:H-z/2+v},{x:A-C/2,y:H-z/2+v}],vt.polygon(t,$,j)},f}S(i_,"iconRounded");async function r_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await zt(e,t,"icon-shape default"),m=t.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:k,mainBkg:T}=i,{stylesMap:_}=jl(t),E=-C/2,F=-v/2,D=t.label?8:0,N=St.svg(f),U=Tt(t,{});t.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");const R=_.get("fill");U.stroke=R??T;const V=N.path(Tn(E,F,C,v,.1),U),Y=Math.max(C,p.width),G=v+p.height+D,et=N.rectangle(-Y/2,-G/2,Y,G,{...U,fill:"transparent",stroke:"none"}),J=f.insert(()=>V,":first-child"),q=f.insert(()=>et);if(t.icon){const j=f.append("g");j.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),H=A.width,z=A.height,$=A.x,Q=A.y;j.attr("transform",`translate(${-H/2-$},${m?p.height/2+D/2-z/2-Q:-p.height/2-D/2-z/2-Q})`),j.attr("style",`color: ${_.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-G/2:G/2-p.height})`),J.attr("transform",`translate(0,${m?p.height/2+D/2:-p.height/2-D/2})`),Et(t,q),t.intersect=function(j){if(mt.info("iconSquare intersect",t,j),!t.label)return vt.rect(t,j);const A=t.x??0,H=t.y??0,z=t.height??0;let $=[];return m?$=[{x:A-p.width/2,y:H-z/2},{x:A+p.width/2,y:H-z/2},{x:A+p.width/2,y:H-z/2+p.height+D},{x:A+C/2,y:H-z/2+p.height+D},{x:A+C/2,y:H+z/2},{x:A-C/2,y:H+z/2},{x:A-C/2,y:H-z/2+p.height+D},{x:A-p.width/2,y:H-z/2+p.height+D}]:$=[{x:A-C/2,y:H-z/2},{x:A+C/2,y:H-z/2},{x:A+C/2,y:H-z/2+v},{x:A+p.width/2,y:H-z/2+v},{x:A+p.width/2/2,y:H+z/2},{x:A-p.width/2,y:H+z/2},{x:A-p.width/2,y:H-z/2+v},{x:A-C/2,y:H-z/2+v}],vt.polygon(t,$,j)},f}S(r_,"iconSquare");async function a_(e,t,{config:{flowchart:i}}){const a=new Image;a.src=(t==null?void 0:t.img)??"",await a.decode();const s=Number(a.naturalWidth.toString().replace("px","")),l=Number(a.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/l;const{labelStyles:c}=_t(t);t.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;t.defaultWidth=i==null?void 0:i.wrappingWidth;const u=Math.max(t.label?h??0:0,(t==null?void 0:t.assetWidth)??s),f=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:u,p=t.constraint==="on"?f/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??l;t.width=Math.max(f,h??0);const{shapeSvg:g,bbox:x,label:m}=await zt(e,t,"image-shape default"),v=t.pos==="t",C=-f/2,k=-p/2,T=t.label?8:0,_=St.svg(g),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=_.rectangle(C,k,f,p,E),D=Math.max(f,x.width),N=p+x.height+T,U=_.rectangle(-D/2,-N/2,D,N,{...E,fill:"none",stroke:"none"}),R=g.insert(()=>F,":first-child"),V=g.insert(()=>U);if(t.img){const Y=g.append("image");Y.attr("href",t.img),Y.attr("width",f),Y.attr("height",p),Y.attr("preserveAspectRatio","none"),Y.attr("transform",`translate(${-f/2},${v?N/2-p:-N/2})`)}return m.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${v?-p/2-x.height/2-T/2:p/2-x.height/2+T/2})`),R.attr("transform",`translate(0,${v?x.height/2+T/2:-x.height/2-T/2})`),Et(t,V),t.intersect=function(Y){if(mt.info("iconSquare intersect",t,Y),!t.label)return vt.rect(t,Y);const G=t.x??0,et=t.y??0,J=t.height??0;let q=[];return v?q=[{x:G-x.width/2,y:et-J/2},{x:G+x.width/2,y:et-J/2},{x:G+x.width/2,y:et-J/2+x.height+T},{x:G+f/2,y:et-J/2+x.height+T},{x:G+f/2,y:et+J/2},{x:G-f/2,y:et+J/2},{x:G-f/2,y:et-J/2+x.height+T},{x:G-x.width/2,y:et-J/2+x.height+T}]:q=[{x:G-f/2,y:et-J/2},{x:G+f/2,y:et-J/2},{x:G+f/2,y:et-J/2+p},{x:G+x.width/2,y:et-J/2+p},{x:G+x.width/2/2,y:et+J/2},{x:G-x.width/2,y:et+J/2},{x:G-x.width/2,y:et-J/2+p},{x:G-f/2,y:et-J/2+p}],vt.polygon(t,q,Y)},g}S(a_,"imageSquare");async function n_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=Math.max(u.width+(c??0)*2,(t==null?void 0:t.width)??0),p=Math.max(u.height+(l??0)*2,(t==null?void 0:t.height)??0),g=[{x:0,y:0},{x:f,y:0},{x:f+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),m&&x.attr("style",m)}else x=Aa(h,f,p,g);return a&&x.attr("style",a),t.width=f,t.height=p,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(n_,"inv_trapezoid");async function s_(e,t){const{shapeSvg:i,bbox:a,label:s}=await zt(e,t,"label"),l=i.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Et(t,l),t.intersect=function(u){return vt.rect(t,u)},i}S(s_,"labelRect");async function l_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.width)??u.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(l_,"lean_left");async function o_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(o_,"lean_right");function c_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,c=Math.max(35,(t==null?void 0:t.width)??0),h=Math.max(35,(t==null?void 0:t.height)??0),u=7,f=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],p=St.svg(s),g=Tt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ee(f),m=p.path(x,g),v=s.insert(()=>m,":first-child");return v.attr("class","outer-path"),l&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",a),v.attr("transform",`translate(-${c/2},${-h})`),Et(t,v),t.intersect=function(C){return mt.info("lightningBolt intersect",t,C),vt.polygon(t,f,C)},s}S(c_,"lightningBolt");var c8=S((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),h8=S((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),u8=S((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Lv=10,Av=10;async function h_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?24:s;if(t.width||t.height){const T=t.width??0;t.width=(t.width??0)-l,t.width<Av&&(t.width=Av);const E=T/2/(2.5+T/50);t.height=(t.height??0)-c-E*3,t.height<Lv&&(t.height=Lv)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,g=p/2,x=g/(2.5+p/50),m=(t!=null&&t.height?t==null?void 0:t.height:u.height)+x+c*2,v=m*.1;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const T=St.svg(h),_=h8(0,0,p,m,g,x,v),E=u8(0,x,p,m,g,x),F=Tt(t,{}),D=T.path(_,F),N=T.path(E,F);h.insert(()=>N,":first-child").attr("class","line"),C=h.insert(()=>D,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const T=c8(0,0,p,m,g,x,v);C=h.insert("path",":first-child").attr("d",T).attr("class","basic label-container outer-path").attr("style",Ke(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,C),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),t.intersect=function(T){const _=vt.rect(t,T),E=_.x-(t.x??0);if(g!=0&&(Math.abs(E)<(t.width??0)/2||Math.abs(E)==(t.width??0)/2&&Math.abs(_.y-(t.y??0))>(t.height??0)/2-x)){let F=x*x*(1-E*E/(g*g));F>0&&(F=Math.sqrt(F)),F=x-F,T.y-(t.y??0)>0&&(F=-F),_.y+=F}return _},h}S(h_,"linedCylinder");async function u_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;if(t.width||t.height){const F=t.width;t.width=(F??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+(l??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:u.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,m=g+x,{cssStyles:v}=t,C=St.svg(h),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:-p/2-p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:m/2},...Sn(-p/2-p/2*.1,m/2,p/2+p/2*.1,m/2,x,.8),{x:p/2+p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:-m/2},{x:-p/2,y:-m/2},{x:-p/2,y:m/2*1.1},{x:-p/2,y:-m/2}],_=C.polygon(T.map(F=>[F.x,F.y]),k),E=h.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),E.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(u.x-(u.left??0))},${-g/2+(t.padding??0)-x/2-(u.y-(u.top??0))})`),Et(t,E),t.intersect=function(F){return vt.polygon(t,T,F)},h}S(u_,"linedWaveEdgedRect");async function d_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-2*h,10),t.height=Math.max(((t==null?void 0:t.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:f,label:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2+2*h,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+c*2+2*h,m=g-2*h,v=x-2*h,C=-m/2,k=-v/2,{cssStyles:T}=t,_=St.svg(u),E=Tt(t,{}),F=[{x:C-h,y:k+h},{x:C-h,y:k+v+h},{x:C+m-h,y:k+v+h},{x:C+m-h,y:k+v},{x:C+m,y:k+v},{x:C+m,y:k+v-h},{x:C+m+h,y:k+v-h},{x:C+m+h,y:k-h},{x:C+h,y:k-h},{x:C+h,y:k},{x:C,y:k},{x:C,y:k+h}],D=[{x:C,y:k+h},{x:C+m-h,y:k+h},{x:C+m-h,y:k+v},{x:C+m,y:k+v},{x:C+m,y:k},{x:C,y:k}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=ee(F);let U=_.path(N,E);const R=ee(D);let V=_.path(R,E);t.look!=="handDrawn"&&(U=km(U),V=km(V));const Y=u.insert("g",":first-child");return Y.insert(()=>U),Y.insert(()=>V),Y.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",a),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),Et(t,Y),t.intersect=function(G){return vt.polygon(t,F,G)},u}S(d_,"multiRect");async function f_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.padding??0,u=t.look==="neo"?16:h,f=t.look==="neo"?12:h;let p=!0;(t.width||t.height)&&(p=!1,t.width=((t==null?void 0:t.width)??0)-u*2,t.height=((t==null?void 0:t.height)??0)-f*3);const g=Math.max(l.width,(t==null?void 0:t.width)??0)+u*2,x=Math.max(l.height,(t==null?void 0:t.height)??0)+f*3,m=t.look==="neo"?x/4:x/8,v=x+(p?m/2:-m/2),C=-g/2,k=-v/2,T=10,{cssStyles:_}=t,E=Sn(C-T,k+v+T,C+g-T,k+v+T,m,.8),F=E==null?void 0:E[E.length-1],D=[{x:C-T,y:k+T},{x:C-T,y:k+v+T},...E,{x:C+g-T,y:F.y-T},{x:C+g,y:F.y-T},{x:C+g,y:F.y-2*T},{x:C+g+T,y:F.y-2*T},{x:C+g+T,y:k-T},{x:C+T,y:k-T},{x:C+T,y:k},{x:C,y:k},{x:C,y:k+T}],N=[{x:C,y:k+T},{x:C+g-T,y:k+T},{x:C+g-T,y:F.y-T},{x:C+g,y:F.y-T},{x:C+g,y:k},{x:C,y:k}],U=St.svg(s),R=Tt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const V=ee(D),Y=U.path(V,R),G=ee(N),et=U.path(G,R),J=s.insert(()=>Y,":first-child");return J.insert(()=>et),J.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&J.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&J.selectAll("path").attr("style",a),J.attr("transform",`translate(0,${-m/2})`),c.attr("transform",`translate(${-(l.width/2)-T-(l.x-(l.left??0))}, ${-(l.height/2)+T-m/2-(l.y-(l.top??0))})`),Et(t,J),t.intersect=function(q){return vt.polygon(t,D,q)},s}S(f_,"multiWaveEdgedRectangle");async function p_(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a,t.useHtmlLabels||wi(Le())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=Math.max(h.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),p=Math.max(h.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),g=-f/2,x=-p/2,{cssStyles:m}=t,v=St.svg(c),C=Tt(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=v.rectangle(g,x,f,p,C),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),s&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",s),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,T),t.intersect=function(_){return vt.rect(t,_)},c}S(p_,"note");var d8=S((e,t,i)=>[`M${e+i/2},${t}`,`L${e+i},${t-i/2}`,`L${e+i/2},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function g_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await zt(e,t,Dt(t)),c=l.width+(t.padding??0),h=l.height+(t.padding??0),u=c+h,f=.5,p=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=St.svg(s),v=Tt(t,{}),C=d8(0,0,u),k=m.path(C,v);g=s.insert(()=>k,":first-child").attr("transform",`translate(${-u/2+f}, ${u/2})`),x&&g.attr("style",x)}else g=Aa(s,u,u,p),g.attr("transform",`translate(${-u/2+f}, ${u/2})`);return a&&g.attr("style",a),Et(t,g),t.calcIntersect=function(m,v){const C=m.width,k=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],T=vt.polygon(m,k,v);return{x:T.x-.5,y:T.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},s}S(g_,"question");async function m_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?21:s??0,c=t.look==="neo"?12:s??0,{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=((t==null?void 0:t.width)??u.width)+(t.look==="neo"?l*2:l),g=((t==null?void 0:t.height)??u.height)+(t.look==="neo"?c*2:c),x=-p/2,m=-g/2,v=m/2,C=[{x:x+v,y:m},{x,y:0},{x:x+v,y:-m},{x:-x,y:-m},{x:-x,y:m}],{cssStyles:k}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=ee(C),F=T.path(E,_),D=h.insert(()=>F,":first-child");return D.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),D.attr("transform",`translate(${-v/2},0)`),f.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),Et(t,D),t.intersect=function(N){return vt.polygon(t,C,N)},h}S(m_,"rect_left_inv_arrow");async function y_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=l.insert("g"),h=l.insert("g").attr("class","label").attr("style",a),u=t.description,f=t.label,p=await mn(h,f,t.labelStyle,!0,!0);let g={width:0,height:0};if(wi(le())){const R=p.children[0],V=Xt(p);g=R.getBoundingClientRect(),V.attr("width",g.width),V.attr("height",g.height)}mt.info("Text 2",u);const x=u||[],m=p.getBBox(),v=await mn(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),C=v.children[0],k=Xt(v);g=C.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height);const T=(t.padding||0)/2;Xt(v).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+T+5)+")"),Xt(p).attr("transform","translate( "+(g.width<m.width?0:-(m.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-T+3)+")");const _=g.width+(t.padding||0),E=g.height+(t.padding||0),F=-g.width/2-T,D=-g.height/2-T;let N,U;if(t.look==="handDrawn"){const R=St.svg(l),V=Tt(t,{}),Y=R.path(Tn(F,D,_,E,t.rx||0),V),G=R.line(-g.width/2-T,-g.height/2-T+m.height+T,g.width/2+T,-g.height/2-T+m.height+T,V);U=l.insert(()=>(mt.debug("Rough node insert CXC",Y),G),":first-child"),N=l.insert(()=>(mt.debug("Rough node insert CXC",Y),Y),":first-child")}else N=c.insert("rect",":first-child"),U=c.insert("line"),N.attr("class","outer title-state").attr("style",a).attr("x",-g.width/2-T).attr("y",-g.height/2-T).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),U.attr("class","divider").attr("x1",-g.width/2-T).attr("x2",g.width/2+T).attr("y1",-g.height/2-T+m.height+T).attr("y2",-g.height/2-T+m.height+T);return Et(t,N),t.intersect=function(R){return vt.rect(t,R)},l}S(y_,"rectWithTitle");async function x_(e,t,{config:{themeVariables:i}}){const a=(i==null?void 0:i.radius)??5,s={rx:a,ry:a,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ul(e,t,s)}S(x_,"roundedRect");var Pn=8;async function b_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??h.width)+s*2+(t.look==="neo"?Pn:Pn*2),p=((t==null?void 0:t.height)??h.height)+l*2,g=f-Pn,x=p,m=Pn-f/2,v=-p/2,{cssStyles:C}=t,k=St.svg(c),T=Tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:m,y:v},{x:m+g,y:v},{x:m+g,y:v+x},{x:m-Pn,y:v+x},{x:m-Pn,y:v},{x:m,y:v},{x:m,y:v+x}],E=k.polygon(_.map(D=>[D.x,D.y]),T),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path").attr("style",Ke(C)),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),C&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),u.attr("transform",`translate(${Pn/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,F),t.intersect=function(D){return vt.rect(t,D)},c}S(b_,"shadedProcess");async function C_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,g=((t!=null&&t.height?t==null?void 0:t.height:u.height)+c*2)*1.5,x=p,m=g/1.5,v=-x/2,C=-m/2,{cssStyles:k}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=[{x:v,y:C},{x:v,y:C+m},{x:v+x,y:C+m},{x:v+x,y:C-m/2}],F=ee(E),D=T.path(F,_),N=h.insert(()=>D,":first-child");return N.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",k),a&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",a),N.attr("transform",`translate(0, ${m/4})`),f.attr("transform",`translate(${-x/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),Et(t,N),t.intersect=function(U){return vt.polygon(t,E,U)},h}S(C_,"slopedRect");async function v_(e,t){const i=t.padding??0,a=t.look==="neo"?16:i*2,s=t.look==="neo"?12:i,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:s};return Ul(e,t,l)}S(v_,"squareRect");async function k_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?20:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=u.height+(t.look==="neo"?c*2:c),p=u.width+f/4+(t.look==="neo"?l*2:l),g=f/2,{cssStyles:x}=t,m=St.svg(h),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...Tc(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...Tc(p/2-g,0,g,50,270,450)],k=ee(C),T=m.path(k,v),_=h.insert(()=>T,":first-child");return _.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",x),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),Et(t,_),t.intersect=function(E){return vt.polygon(t,C,E)},h}S(k_,"stadium");async function S_(e,t){const i={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ul(e,t,i)}S(S_,"state");function T_(e,t,{config:{themeVariables:i}}){var _,E;const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:f}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const p=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),g=St.svg(p),x=Tt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(t.width??0)*5/14,k=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),T=p.insert(()=>m,":first-child");if(T.insert(()=>k),t.look!=="handDrawn"&&T.attr("class","outer-path"),l&&T.selectAll("path").attr("style",l),s&&T.selectAll("path").attr("style",s),t.width<25&&f&&t.look!=="handDrawn"){const F=((E=(_=e.node())==null?void 0:_.ownerSVGElement)==null?void 0:E.id)??"",D=F?`${F}-drop-shadow-small`:"drop-shadow-small";T.attr("style",`filter:url(#${D})`)}return Et(t,T),t.intersect=function(F){return vt.circle(t,(t.width??0)/2,F)},p}S(T_,"stateEnd");function w_(e,t,{config:{themeVariables:i}}){var h,u;const{lineColor:a,nodeShadow:s}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let c;if(t.look==="handDrawn"){const p=St.svg(l).circle(0,0,t.width,v$(a));c=l.insert(()=>p),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else c=l.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const f=((u=(h=e.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",p=f?`${f}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return Et(t,c),t.intersect=function(f){return vt.circle(t,(t.width??7)/2,f)},l}S(w_,"stateStart");var nl=8;async function __(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=(t==null?void 0:t.padding)??8,l=t.look==="neo"?28:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??u.width)+2*nl+l,p=((t==null?void 0:t.height)??u.height)+c,g=f-2*nl,x=p,m=-f/2,v=-p/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(t.look==="handDrawn"){const k=St.svg(h),T=Tt(t,{}),_=k.rectangle(m,v,g+16,x,T),E=k.line(m+nl,v,m+nl,v+x,T),F=k.line(m+nl+g,v,m+nl+g,v+x,T);h.insert(()=>E,":first-child"),h.insert(()=>F,":first-child");const D=h.insert(()=>_,":first-child"),{cssStyles:N}=t;D.attr("class","basic label-container").attr("style",Ke(N)),Et(t,D)}else{const k=Aa(h,g,x,C);a&&k.attr("style",a),Et(t,k)}return t.intersect=function(k){return vt.polygon(t,C,k)},h}S(__,"subroutine");var Cg=.2;async function B_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-c*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-Cg*(t.height+c*2),10));const{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c*2,p=Cg*f,g=Cg*f,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2+p-p,v=f,C=-m/2,k=-v/2,{cssStyles:T}=t,_=St.svg(h),E=Tt(t,{}),F=[{x:C-p/2,y:k},{x:C+m+p/2,y:k},{x:C+m+p/2,y:k+v},{x:C-p/2,y:k+v}],D=[{x:C+m-p/2,y:k+v},{x:C+m+p/2,y:k+v},{x:C+m+p/2,y:k+v-g}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=ee(F),U=_.path(N,E),R=ee(D),V=_.path(R,{...E,fillStyle:"solid"}),Y=h.insert(()=>V,":first-child");return Y.insert(()=>U,":first-child"),Y.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",a),Et(t,Y),t.intersect=function(G){return vt.polygon(t,F,G)},h}S(B_,"taggedRect");async function E_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),u=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=u/8,p=.2*h,g=.2*u,x=u+f,{cssStyles:m}=t,v=St.svg(s),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-h/2-h/2*.1,y:x/2},...Sn(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,f,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],T=-h/2+h/2*.1,_=-x/2-g*.4,E=[{x:T+h-p,y:(_+u)*1.3},{x:T+h,y:_+u-g},{x:T+h,y:(_+u)*.9},...Sn(T+h,(_+u)*1.25,T+h-p,(_+u)*1.3,-u*.02,.5)],F=ee(k),D=v.path(F,C),N=ee(E),U=v.path(N,{...C,fillStyle:"solid"}),R=s.insert(()=>U,":first-child");return R.insert(()=>D,":first-child"),R.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Et(t,R),t.intersect=function(V){return vt.polygon(t,k,V)},s}S(E_,"taggedWaveEdgedRectangle");async function L_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await zt(e,t,Dt(t)),c=Math.max(l.width+(t.padding??0),(t==null?void 0:t.width)||0),h=Math.max(l.height+(t.padding??0),(t==null?void 0:t.height)||0),u=-c/2,f=-h/2,p=s.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",u).attr("y",f).attr("width",c).attr("height",h),Et(t,p),t.intersect=function(g){return vt.rect(t,g)},s}S(L_,"text");var f8=S((e,t,i,a,s,l)=>`M${e},${t}
|
|
365
|
+
a${s},${l} 0,0,1 0,${-a}
|
|
366
|
+
l${i},0
|
|
367
|
+
a${s},${l} 0,0,1 0,${a}
|
|
368
|
+
M${i},${-a}
|
|
369
|
+
a${s},${l} 0,0,0 0,${a}
|
|
370
|
+
l${-i},0`,"createCylinderPathD"),p8=S((e,t,i,a,s,l)=>[`M${e},${t}`,`M${e+i},${t}`,`a${s},${l} 0,0,0 0,${-a}`,`l${-i},0`,`a${s},${l} 0,0,0 0,${a}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),g8=S((e,t,i,a,s,l)=>[`M${e+i/2},${-a/2}`,`a${s},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),Mv=5,Rv=10;async function A_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?12:s/2;if(t.width||t.height){const C=t.height??0;t.height=(t.height??0)-l,t.height<Mv&&(t.height=Mv);const T=C/2/(2.5+C/50);t.width=(t.width??0)-l-T*3,t.width<Rv&&(t.width=Rv)}const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t.height?t.height:h.height)+l,p=f/2,g=p/(2.5+f/50),x=(t.width?t.width:h.width)+g+l,{cssStyles:m}=t;let v;if(t.look==="handDrawn"){const C=St.svg(c),k=p8(0,0,x,f,g,p),T=g8(0,0,x,f,g,p),_=C.path(k,Tt(t,{})),E=C.path(T,Tt(t,{fill:"none"}));v=c.insert(()=>E,":first-child"),v=c.insert(()=>_,":first-child"),v.attr("class","basic label-container"),m&&v.attr("style",m)}else{const C=f8(0,0,x,f,g,p);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Ke(m)).attr("style",a),v.attr("class","basic label-container outer-path"),m&&v.selectAll("path").attr("style",m),a&&v.selectAll("path").attr("style",a)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-x/2}, ${f/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,v),t.intersect=function(C){const k=vt.rect(t,C),T=k.y-(t.y??0);if(p!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(k.x-(t.x??0))>(t.width??0)/2-g)){let _=g*g*(1-T*T/(p*p));_!=0&&(_=Math.sqrt(Math.abs(_))),_=g-_,C.x-(t.x??0)>0&&(_=-_),k.x+=_}return k},c}S(A_,"tiltedCylinder");async function M_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=(t.look==="neo",s),c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(M_,"trapezoid");async function R_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<u&&(t.height=u),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2,x=(t!=null&&t.height?t==null?void 0:t.height:p.height)+c*2,{cssStyles:m}=t,v=St.svg(f),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],T=ee(k),_=v.path(T,C),E=f.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(F){return vt.polygon(t,k,F)},f}S(R_,"trapezoidalPentagon");var Fv=10,Ov=10;async function F_(e,t){var F;const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-l)/2,t.width<Ov&&(t.width=Ov),t.height=(t==null?void 0:t.height)??0,t.height<Fv&&(t.height=Fv));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=Ea((F=le().flowchart)==null?void 0:F.htmlLabels),p=(t!=null&&t.width?t==null?void 0:t.width:h.width)+l,g=t!=null&&t.height?t==null?void 0:t.height:p+h.height,x=g,m=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ee(m),_=C.path(T,k),E=c.insert(()=>_,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),t.width=p,t.height=g,Et(t,E),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(t.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),t.intersect=function(D){return mt.info("Triangle intersect",t,m,D),vt.polygon(t,m,D)},c}S(F_,"triangle");async function O_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10));const{shapeSvg:u,bbox:f,label:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+(l??0)*2,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+(c??0)*2,m=t.look==="neo"?x/4:x/8,v=x+(h?m:-m),{cssStyles:C}=t,T=14-g,_=T>0?T/2:0,E=St.svg(u),F=Tt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const D=[{x:-g/2-_,y:v/2},...Sn(-g/2-_,v/2,g/2+_,v/2,m,.8),{x:g/2+_,y:-v/2},{x:-g/2-_,y:-v/2}],N=ee(D),U=E.path(N,F),R=u.insert(()=>U,":first-child");return R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(0,${-m/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(f.x-(f.left??0))},${-x/2+(t.padding??0)-m-(f.y-(f.top??0))})`),Et(t,R),t.intersect=function(V){return vt.polygon(t,D,V)},u}S(O_,"waveEdgedRectangle");async function D_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const F=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-F*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c,g=p/8,x=p+g*2,{cssStyles:m}=t,v=St.svg(h),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-f/2,y:x/2},...Sn(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},...Sn(f/2,-x/2,-f/2,-x/2,g,-1)],T=ee(k),_=v.path(T,C),E=h.insert(()=>_,":first-child");return E.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),Et(t,E),t.intersect=function(F){return vt.polygon(t,k,F)},h}S(D_,"waveRectangle");var Fe=10;async function $_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Fe,10),t.height=Math.max(((t==null?void 0:t.height)??0)-l*2-Fe,10));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+Fe,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l*2+Fe,g=f-Fe,x=p-Fe,m=-g/2,v=-x/2,{cssStyles:C}=t,k=St.svg(c),T=Tt(t,{}),_=[{x:m-Fe,y:v-Fe},{x:m-Fe,y:v+x},{x:m+g,y:v+x},{x:m+g,y:v-Fe}],E=`M${m-Fe},${v-Fe} L${m+g},${v-Fe} L${m+g},${v+x} L${m-Fe},${v+x} L${m-Fe},${v-Fe}
|
|
371
|
+
M${m-Fe},${v} L${m+g},${v}
|
|
372
|
+
M${m},${v-Fe} L${m},${v+x}`;t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const F=k.path(E,T),D=c.insert(()=>F,":first-child");return D.attr("transform",`translate(${Fe/2}, ${Fe/2})`),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),u.attr("transform",`translate(${-(h.width/2)+Fe/2-(h.x-(h.left??0))}, ${-(h.height/2)+Fe/2-(h.y-(h.top??0))})`),Et(t,D),t.intersect=function(N){return vt.polygon(t,_,N)},c}S($_,"windowPane");var Dv=new Set(["redux-color","redux-dark-color"]),m8=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Vy(e,t){var xt,Rt,Ot,Pt;const i=t;i.alias&&(t.label=i.alias);const{theme:a,themeVariables:s}=Le(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:u}=s;if(t.look==="handDrawn"){const{themeVariables:W}=Le(),{background:ct}=W,Ct={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Vy(e,Ct)}const f=Le();t.useHtmlLabels=f.htmlLabels;let p=((xt=f.er)==null?void 0:xt.diagramPadding)??10,g=((Rt=f.er)==null?void 0:Rt.entityPadding)??6;const{cssStyles:x}=t,{labelStyles:m,nodeStyles:v}=_t(t);if(i.attributes.length===0&&t.label){const W={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};Ba(t.label,f)+W.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);const ct=await Ul(e,t,W);if(a!=null&&Dv.has(a)){const Ct=i.colorIndex??0;ct.attr("data-color-id",`color-${Ct%u.length}`)}if(!Ea(f.htmlLabels)){const Ct=ct.select("text"),Ft=(Ot=Ct.node())==null?void 0:Ot.getBBox();Ct.attr("transform",`translate(${-Ft.width/2}, 0)`)}return ct}f.htmlLabels||(p*=1.25,g*=1.25);let C=Dt(t);C||(C="node default");const k=e.insert("g").attr("class",C).attr("id",t.domId||t.id),T=await ol(k,t.label??"",f,0,0,["name"],m);T.height+=g;let _=0;const E=[],F=[];let D=0,N=0,U=0,R=0,V=!0,Y=!0;for(const W of i.attributes){const ct=await ol(k,W.type,f,0,_,["attribute-type"],m);D=Math.max(D,ct.width+p);const Ct=await ol(k,W.name,f,0,_,["attribute-name"],m);N=Math.max(N,Ct.width+p);const Ft=await ol(k,W.keys.join(),f,0,_,["attribute-keys"],m);U=Math.max(U,Ft.width+p);const Jt=await ol(k,W.comment,f,0,_,["attribute-comment"],m);R=Math.max(R,Jt.width+p);const me=Math.max(ct.height,Ct.height,Ft.height,Jt.height)+g;F.push({yOffset:_,rowHeight:me}),_+=me}let G=4;U<=p&&(V=!1,U=0,G--),R<=p&&(Y=!1,R=0,G--);const et=k.node().getBBox();if(T.width+p*2-(D+N+U+R)>0){const W=T.width+p*2-(D+N+U+R);D+=W/G,N+=W/G,U>0&&(U+=W/G),R>0&&(R+=W/G)}const J=D+N+U+R,q=St.svg(k),j=Tt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");let A=0;F.length>0&&(A=F.reduce((W,ct)=>W+((ct==null?void 0:ct.rowHeight)??0),0));const H=Math.max(et.width+p*2,(t==null?void 0:t.width)||0,J),z=Math.max((A??0)+T.height,(t==null?void 0:t.height)||0),$=-H/2,Q=-z/2;if(k.selectAll("g:not(:first-child)").each((W,ct,Ct)=>{const Ft=Xt(Ct[ct]),Jt=Ft.attr("transform");let me=0,Ht=0;if(Jt){const De=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Jt);De&&(me=parseFloat(De[1]),Ht=parseFloat(De[2]),Ft.attr("class").includes("attribute-name")?me+=D:Ft.attr("class").includes("attribute-keys")?me+=D+N:Ft.attr("class").includes("attribute-comment")&&(me+=D+N+U))}Ft.attr("transform",`translate(${$+p/2+me}, ${Ht+Q+T.height+g/2})`)}),k.select(".name").attr("transform","translate("+-T.width/2+", "+(Q+g/2)+")"),a!=null&&Dv.has(a)){const W=i.colorIndex??0;k.attr("data-color-id",`color-${W%u.length}`)}const I=q.rectangle($,Q,H,z,j),it=k.insert(()=>I,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[W,ct]of F.entries()){const Ft=(W+1)%2===0&&ct.yOffset!==0,Jt=q.rectangle($,T.height+Q+(ct==null?void 0:ct.yOffset),H,ct==null?void 0:ct.rowHeight,{...j,fill:Ft?l:c,stroke:h});k.insert(()=>Jt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ft?"even":"odd"}`)}const ut=1e-4;let dt=cl($,T.height+Q,H+$,T.height+Q,ut),yt=q.polygon(dt.map(W=>[W.x,W.y]),j);if(k.insert(()=>yt).attr("class","divider"),dt=cl(D+$,T.height+Q,D+$,z+Q,ut),yt=q.polygon(dt.map(W=>[W.x,W.y]),j),k.insert(()=>yt).attr("class","divider"),V){const W=D+N+$;dt=cl(W,T.height+Q,W,z+Q,ut),yt=q.polygon(dt.map(ct=>[ct.x,ct.y]),j),k.insert(()=>yt).attr("class","divider")}if(Y){const W=D+N+U+$;dt=cl(W,T.height+Q,W,z+Q,ut),yt=q.polygon(dt.map(ct=>[ct.x,ct.y]),j),k.insert(()=>yt).attr("class","divider")}for(const W of E){const ct=T.height+Q+W;dt=cl($,ct,H+$,ct,ut),yt=q.polygon(dt.map(Ct=>[Ct.x,Ct.y]),j),k.insert(()=>yt).attr("class","divider")}if(Et(t,it),v&&t.look!=="handDrawn")if(a!=null&&m8.has(a))k.selectAll("path").attr("style",v);else{const W=v.split(";"),ct=(Pt=W==null?void 0:W.filter(Ct=>Ct.includes("stroke")))==null?void 0:Pt.map(Ct=>`${Ct}`).join("; ");k.selectAll("path").attr("style",ct??""),k.selectAll(".row-rect-even path").attr("style",v)}return t.intersect=function(W){return vt.rect(t,W)},k}S(Vy,"erBox");async function ol(e,t,i,a=0,s=0,l=[],c=""){const h=e.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${a}, ${s})`).attr("style",c);t!==wC(t)&&(t=wC(t),t=t.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await La(h,t,{width:Ba(t,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(t.includes("<")||t.includes(">")){let p=u.children[0];for(p.textContent=p.textContent.replaceAll("<","<").replaceAll(">",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("<","<").replaceAll(">",">")}let f=u.getBBox();if(Ea(i.htmlLabels)){const p=u.children[0];p.style.textAlign="start";const g=Xt(u);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}S(ol,"addText");function cl(e,t,i,a,s){return e===i?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:i+s/2,y:a},{x:i-s/2,y:a}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:i,y:a+s/2},{x:i,y:a-s/2}]}S(cl,"lineToPolygon");async function z_(e,t,i,a,s=i.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",Dt(t)).attr("id",t.domId||t.id);let h=null,u=null,f=null,p=null,g=0,x=0,m=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const _=t.annotations[0];await sc(h,{text:`«${_}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await sc(u,t,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,f=c.insert("g").attr("class","members-group text");let C=0;for(const _ of t.members){const E=await sc(f,_,C,[_.parseClassifier()]);C+=E+l}m=f.node().getBBox().height,m<=0&&(m=s/2),p=c.insert("g").attr("class","methods-group text");let k=0;for(const _ of t.methods){const E=await sc(p,_,k,[_.parseClassifier()]);k+=E+l}let T=c.node().getBBox();if(h!==null){const _=h.node().getBBox();h.attr("transform",`translate(${-_.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),T=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+s*2})`),T=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(m?m+s*4:s*2)})`),T=c.node().getBBox(),{shapeSvg:c,bbox:T}}S(z_,"textHelper");async function sc(e,t,i,a=[]){const s=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=Le();let c="useHtmlLabels"in t?t.useHtmlLabels:Ea(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),gc(h)&&(c=!0);const u=await La(s,ay(ns(h)),{width:Ba(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);let f,p=1;if(c){const g=u.children[0],x=Xt(u);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const m=g.getElementsByTagName("img");if(m){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(C=>new Promise(k=>{function T(){var _;if(C.style.display="flex",C.style.flexDirection="column",v){const E=((_=l.fontSize)==null?void 0:_.toString())??window.getComputedStyle(document.body).fontSize,D=parseInt(E,10)*5+"px";C.style.minWidth=D,C.style.maxWidth=D}else C.style.width="100%";k(C)}S(T,"setupImage"),setTimeout(()=>{C.complete&&T()}),C.addEventListener("error",T),C.addEventListener("load",T)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{a.includes("font-weight: bolder")&&Xt(u).selectAll("tspan").attr("font-weight",""),p=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(g.textContent=h[0]+h.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),f=u.getBBox()}return s.attr("transform","translate(0,"+(-f.height/(2*p)+i)+")"),f.height}S(sc,"addText");async function N_(e,t){var q,j;const i=le(),{themeVariables:a}=i,{useGradient:s}=a,l=i.class.padding??12,c=l,h=t.useHtmlLabels??Ea(i.htmlLabels)??!0,u=t;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:f,bbox:p}=await z_(e,t,i,h,c),{labelStyles:g,nodeStyles:x}=_t(t);t.labelStyle=g,t.cssStyles=u.styles||"";const m=((q=u.styles)==null?void 0:q.join(";"))||x||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((j=i.class)!=null&&j.hideEmptyMembersBox),C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=Math.max(t.width??0,p.width);let _=Math.max(t.height??0,p.height);const E=(t.height??0)>p.height;u.members.length===0&&u.methods.length===0?_+=c:u.members.length>0&&u.methods.length===0&&(_+=c*2);const F=-T/2,D=-_/2;let N=v?l*2:u.members.length===0&&u.methods.length===0?-l:0;E&&(N=l*2);const U=C.rectangle(F-l,D-l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0),T+2*l,_+2*l+N,k),R=f.insert(()=>U,":first-child");R.attr("class","basic label-container outer-path");const V=R.node().getBBox(),Y=f.select(".annotation-group").node().getBBox().height-(v?l/2:0)||0,G=f.select(".label-group").node().getBBox().height-(v?l/2:0)||0,et=f.select(".members-group").node().getBBox().height-(v?l/2:0)||0,J=(Y+G+D+l-(D-l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((A,H,z)=>{var dt,yt;const $=Xt(z[H]),Q=$.attr("transform");let I=0;if(Q){const Rt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);Rt&&(I=parseFloat(Rt[2]))}let it=I+D+l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0);if($.attr("class").includes("methods-group")){const xt=Math.max(et,c/2);E?it=Math.max(J,Y+G+xt+D+c*2+l)+c*2:it=Y+G+xt+D+c*4+l}u.members.length===0&&u.methods.length===0&&((dt=i.class)!=null&&dt.hideEmptyMembersBox)&&(u.annotations.length>0?it=I-c:it=I),h||(it-=4);let ut=F;($.attr("class").includes("label-group")||$.attr("class").includes("annotation-group"))&&(ut=-((yt=$.node())==null?void 0:yt.getBBox().width)/2||0,f.selectAll("text").each(function(xt,Rt,Ot){window.getComputedStyle(Ot[Rt]).textAnchor==="middle"&&(ut=0)})),$.attr("transform",`translate(${ut}, ${it})`)}),u.members.length>0||u.methods.length>0||v){const A=Y+G+D+l,H=C.line(V.x,A,V.x+V.width,A+.001,k);f.insert(()=>H).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(v||u.members.length>0||u.methods.length>0){const A=Y+G+et+D+c*2+l,H=C.line(V.x,E?Math.max(J,A):A,V.x+V.width,(E?Math.max(J,A):A)+.001,k);f.insert(()=>H).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&f.selectAll("path").attr("style",m),R.select(":nth-child(2)").attr("style",m),f.selectAll(".divider").select("path").attr("style",m),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",m),!h){const A=RegExp(/color\s*:\s*([^;]*)/),H=A.exec(m);if(H){const z=H[0].replace("color","fill");f.selectAll("tspan").attr("style",z)}else if(g){const z=A.exec(g);if(z){const $=z[0].replace("color","fill");f.selectAll("tspan").attr("style",$)}}}return Et(t,R),t.intersect=function(A){return vt.rect(t,A)},f}S(N_,"classBox");async function q_(e,t){var V,Y;const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t,l=t,c=20,h=20,u="verifyMethod"in t,f=Dt(t),{themeVariables:p}=le(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,m=e.insert("g").attr("class",f).attr("id",t.domId??t.id);let v;u?v=await Wr(m,`<<${s.type}>>`,0,t.labelStyle):v=await Wr(m,"<<Element>>",0,t.labelStyle);let C=v;const k=await Wr(m,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+h,u){const G=await Wr(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle);C+=G;const et=await Wr(m,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle);C+=et;const J=await Wr(m,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle);C+=J,await Wr(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle)}else{const G=await Wr(m,`${l.type?`Type: ${l.type}`:""}`,C,t.labelStyle);C+=G,await Wr(m,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,C,t.labelStyle)}const T=(((V=m.node())==null?void 0:V.getBBox().width)??200)+c,_=(((Y=m.node())==null?void 0:Y.getBBox().height)??200)+c,E=-T/2,F=-_/2,D=St.svg(m),N=Tt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const U=D.rectangle(E,F,T,_,N),R=m.insert(()=>U,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",a),g!=null&&g.length){const G=t.colorIndex??0;m.attr("data-color-id",`color-${G%g.length}`)}if(m.selectAll(".label").each((G,et,J)=>{const q=Xt(J[et]),j=q.attr("transform");let A=0,H=0;if(j){const I=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);I&&(A=parseFloat(I[1]),H=parseFloat(I[2]))}const z=H-_/2;let $=E+c/2;(et===0||et===1)&&($=A),q.attr("transform",`translate(${$}, ${z+c})`)}),C>v+k+h){const G=F+v+k+h;let et;if(t.look==="neo"){const j=[[E,G],[E+T,G],[E+T,G+.001],[E,G+.001]];et=D.polygon(j,N)}else et=D.line(E,G,E+T,G,N);m.insert(()=>et).attr("class","divider")}return Et(t,R),t.intersect=function(G){return vt.rect(t,G)},a&&t.look!=="handDrawn"&&(x||g!=null&&g.length)&&m.selectAll("path").attr("style",a),m}S(q_,"requirementBox");async function Wr(e,t,i,a=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",a),l=le(),c=l.htmlLabels??!0,h=await La(s,ay(ns(t)),{width:Ba(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);let u;if(c){const f=h.children[0],p=Xt(h);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}else{const f=h.children[0];for(const p of f.children)a&&p.setAttribute("style",a);u=h.getBBox(),u.height+=6}return s.attr("transform",`translate(${-u.width/2},${-u.height/2+i})`),u.height}S(Wr,"addText");var y8=S(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function I_(e,t,{config:i}){var et,J;const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a||"";const l=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&((et=i==null?void 0:i.kanban)!=null&&et.ticketBaseUrl)&&(g=(J=i==null?void 0:i.kanban)==null?void 0:J.ticketBaseUrl.replace("#TICKET#",t.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let v,C;x?{label:v,bbox:C}=await bg(x,"ticket"in t&&t.ticket||"",m):{label:v,bbox:C}=await bg(h,"ticket"in t&&t.ticket||"",m);const{label:k,bbox:T}=await bg(h,"assigned"in t&&t.assigned||"",m);t.width=c;const _=10,E=(t==null?void 0:t.width)||0,F=Math.max(C.height,T.height)/2,D=Math.max(u.height+_*2,(t==null?void 0:t.height)||0)+F,N=-E/2,U=-D/2;f.attr("transform","translate("+(p-E/2)+", "+(-F-u.height/2)+")"),v.attr("transform","translate("+(p-E/2)+", "+(-F+u.height/2)+")"),k.attr("transform","translate("+(p+E/2-T.width-2*l)+", "+(-F+u.height/2)+")");let R;const{rx:V,ry:Y}=t,{cssStyles:G}=t;if(t.look==="handDrawn"){const q=St.svg(h),j=Tt(t,{}),A=V||Y?q.path(Tn(N,U,E,D,V||0),j):q.rectangle(N,U,E,D,j);R=h.insert(()=>A,":first-child"),R.attr("class","basic label-container").attr("style",G||null)}else{R=h.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",s).attr("rx",V??5).attr("ry",Y??5).attr("x",N).attr("y",U).attr("width",E).attr("height",D);const q="priority"in t&&t.priority;if(q){const j=h.append("line"),A=N+2,H=U+Math.floor((V??0)/2),z=U+D-Math.floor((V??0)/2);j.attr("x1",A).attr("y1",H).attr("x2",A).attr("y2",z).attr("stroke-width","4").attr("stroke",y8(q))}}return Et(t,R),t.height=D,t.intersect=function(q){return vt.rect(t,q)},h}S(I_,"kanbanItem");async function j_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+10*c,f=l.height+8*c,p=.15*u,{cssStyles:g}=t,x=l.width+20,m=l.height+20,v=Math.max(u,x),C=Math.max(f,m);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let k;const T=`M0 0
|
|
373
|
+
a${p},${p} 1 0,0 ${v*.25},${-1*C*.1}
|
|
374
|
+
a${p},${p} 1 0,0 ${v*.25},0
|
|
375
|
+
a${p},${p} 1 0,0 ${v*.25},0
|
|
376
|
+
a${p},${p} 1 0,0 ${v*.25},${C*.1}
|
|
377
|
+
|
|
378
|
+
a${p},${p} 1 0,0 ${v*.15},${C*.33}
|
|
379
|
+
a${p*.8},${p*.8} 1 0,0 0,${C*.34}
|
|
380
|
+
a${p},${p} 1 0,0 ${-1*v*.15},${C*.33}
|
|
381
|
+
|
|
382
|
+
a${p},${p} 1 0,0 ${-1*v*.25},${C*.15}
|
|
383
|
+
a${p},${p} 1 0,0 ${-1*v*.25},0
|
|
384
|
+
a${p},${p} 1 0,0 ${-1*v*.25},0
|
|
385
|
+
a${p},${p} 1 0,0 ${-1*v*.25},${-1*C*.15}
|
|
386
|
+
|
|
387
|
+
a${p},${p} 1 0,0 ${-1*v*.1},${-1*C*.33}
|
|
388
|
+
a${p*.8},${p*.8} 1 0,0 0,${-1*C*.34}
|
|
389
|
+
a${p},${p} 1 0,0 ${v*.1},${-1*C*.33}
|
|
390
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const _=St.svg(s),E=Tt(t,{}),F=_.path(T,E);k=s.insert(()=>F,":first-child"),k.attr("class","basic label-container").attr("style",Ke(g))}else k=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return k.attr("transform",`translate(${-v/2}, ${-C/2})`),Et(t,k),t.calcIntersect=function(_,E){return vt.rect(_,E)},t.intersect=function(_){return mt.info("Bang intersect",t,_),vt.rect(t,_)},s}S(j_,"bang");async function H_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+2*c,f=l.height+2*c,p=.15*u,g=.25*u,x=.35*u,m=.2*u,{cssStyles:v}=t;let C;const k=`M0 0
|
|
391
|
+
a${p},${p} 0 0,1 ${u*.25},${-1*u*.1}
|
|
392
|
+
a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
|
|
393
|
+
a${g},${g} 1 0,1 ${u*.35},${u*.2}
|
|
394
|
+
|
|
395
|
+
a${p},${p} 1 0,1 ${u*.15},${f*.35}
|
|
396
|
+
a${m},${m} 1 0,1 ${-1*u*.15},${f*.65}
|
|
397
|
+
|
|
398
|
+
a${g},${p} 1 0,1 ${-1*u*.25},${u*.15}
|
|
399
|
+
a${x},${x} 1 0,1 ${-1*u*.5},0
|
|
400
|
+
a${p},${p} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
401
|
+
|
|
402
|
+
a${p},${p} 1 0,1 ${-1*u*.1},${-1*f*.35}
|
|
403
|
+
a${m},${m} 1 0,1 ${u*.1},${-1*f*.65}
|
|
404
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const T=St.svg(s),_=Tt(t,{}),E=T.path(k,_);C=s.insert(()=>E,":first-child"),C.attr("class","basic label-container").attr("style",Ke(v))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",k);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),C.attr("transform",`translate(${-u/2}, ${-f/2})`),Et(t,C),t.calcIntersect=function(T,_){return vt.rect(T,_)},t.intersect=function(T){return mt.info("Cloud intersect",t,T),vt.rect(t,T)},s}S(H_,"cloud");async function U_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+8*c,f=l.height+2*c,p=5,g=t.look==="neo"?`
|
|
405
|
+
M${-u/2} ${f/2-p}
|
|
406
|
+
v${-f+2*p}
|
|
407
|
+
q0,-${p} ${p},-${p}
|
|
408
|
+
h${u-2*p}
|
|
409
|
+
q${p},0 ${p},${p}
|
|
410
|
+
v${f-p}
|
|
411
|
+
H${-u/2}
|
|
412
|
+
Z
|
|
413
|
+
`:`
|
|
414
|
+
M${-u/2} ${f/2-p}
|
|
415
|
+
v${-f+2*p}
|
|
416
|
+
q0,-${p} ${p},-${p}
|
|
417
|
+
h${u-2*p}
|
|
418
|
+
q${p},0 ${p},${p}
|
|
419
|
+
v${f-2*p}
|
|
420
|
+
q0,${p} ${-p},${p}
|
|
421
|
+
h${-(u-2*p)}
|
|
422
|
+
q${-p},0 ${-p},${-p}
|
|
423
|
+
Z
|
|
424
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",a).attr("d",g);return s.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",f/2).attr("x2",u/2).attr("y2",f/2),h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),s.append(()=>h.node()),Et(t,x),t.calcIntersect=function(m,v){return vt.rect(m,v)},t.intersect=function(m){return vt.rect(t,m)},s}S(U_,"defaultMindmapNode");async function P_(e,t){const i={padding:t.padding??0};return Xy(e,t,i)}S(P_,"mindmapCircle");var x8=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:v_},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:x_},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:k_},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:__},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Pw},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Ww},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Xy},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:j_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:H_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:g_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Kw},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:o_},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:l_},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:M_},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:n_},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Gw},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:L_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:$w},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:b_},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:w_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:T_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Zw},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Iw},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:jw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Hw},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:c_},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:O_},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Qw},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:A_},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:h_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Uw},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Yw},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:F_},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:$_},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Xw},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:R_},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Vw},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:C_},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:f_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:d_},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Dw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:qw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:E_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:B_},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:D_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:m_},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:u_}],b8=S(()=>{const t=[...Object.entries({state:S_,choice:zw,note:p_,rectWithTitle:y_,labelRect:s_,iconSquare:r_,iconCircle:e_,icon:t_,iconRounded:i_,imageSquare:a_,anchor:Fw,kanbanItem:I_,mindmapCircle:P_,defaultMindmapNode:U_,classBox:N_,erBox:Vy,requirementBox:q_}),...x8.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(s=>[s,i.handler]))];return Object.fromEntries(t)},"generateShapeMap"),W_=b8();function C8(e){return e in W_}S(C8,"isValidShape");var $d=new Map;async function Y_(e,t,i){let a,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?W_[t.shape]:void 0;if(!l)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;i.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),a=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),s=await l(a,t,i)}else s=await l(e,t,i),a=s;return a.attr("data-look",Ke(t.look)),t.tooltip&&s.attr("title",t.tooltip),$d.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}S(Y_,"insertNode");var mI=S((e,t)=>{$d.set(t.id,e)},"setNodeElem"),yI=S(()=>{$d.clear()},"clear"),xI=S(e=>{const t=$d.get(e.id);mt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const i=8,a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-i)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode"),v8=S((e,t,i,a,s,l=!1,c)=>{t.arrowTypeStart&&$v(e,"start",t.arrowTypeStart,i,a,s,l,c),t.arrowTypeEnd&&$v(e,"end",t.arrowTypeEnd,i,a,s,l,c)},"addEdgeMarkers"),k8={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},S8=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],$v=S((e,t,i,a,s,l,c=!1,h)=>{var v;const u=k8[i],f=u&&S8.includes(u.type);if(!u){mt.warn(`Unknown arrow type: ${i}`);return}const p=u.type,m=`${s}_${l}-${p}${t==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),k=`${m}_${C}`;if(!document.getElementById(k)){const T=document.getElementById(m);if(T){const _=T.cloneNode(!0);_.id=k,_.querySelectorAll("path, circle, line").forEach(F=>{F.setAttribute("stroke",h),u.fill&&F.setAttribute("fill",h)}),(v=T.parentNode)==null||v.appendChild(_)}}e.attr(`marker-${t}`,`url(${a}#${k})`)}else e.attr(`marker-${t}`,`url(${a}#${m})`)},"addEdgeMarker"),T8=S(e=>{var t,i;return typeof e=="string"?e:(i=(t=le())==null?void 0:t.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),fd=new Map,oi=new Map,bI=S(()=>{fd.clear(),oi.clear()},"clear"),Qo=S(e=>e?typeof e=="string"?e:e.reduce((t,i)=>t+";"+i,""):"","getLabelStyles"),w8=S(async(e,t)=>{const i=le();let a=wi(i);const{labelStyles:s}=_t(t);t.labelStyle=s;const l=e.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label").attr("data-id",t.id),h=t.labelType==="markdown",f=await La(e,t.label,{style:Qo(t.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(f),mt.info("abc82",t,t.labelType);let p=f.getBBox(),g=p;if(a){const m=f.children[0],v=Xt(f);p=m.getBoundingClientRect(),g=p,v.attr("width",p.width),v.attr("height",p.height)}else{const m=Xt(f).select("text").node();m&&typeof m.getBBox=="function"&&(g=m.getBBox())}c.attr("transform",Yo(g,a)),fd.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(v,t.startLabelLeft,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).startLeft=m,lc(x,t.startLabelLeft)}if(t.startLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(v,t.startLabelRight,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).startRight=m,lc(x,t.startLabelRight)}if(t.endLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(m,t.endLabelLeft,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).endLeft=m,lc(x,t.endLabelLeft)}if(t.endLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(m,t.endLabelRight,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).endRight=m,lc(x,t.endLabelRight)}return f},"insertEdgeLabel");function lc(e,t){wi(le())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}S(lc,"setTerminalWidth");var _8=S((e,t)=>{mt.debug("Moving label abc88 ",e.id,e.label,fd.get(e.id),t);let i=t.updatedPath?t.updatedPath:t.originalPath;const a=le(),{subGraphTitleTotalMargin:s}=Dy(a);if(e.label){const l=fd.get(e.id);let c=e.x,h=e.y;if(i){const u=_r.calcLabelPosition(i);mt.debug("Moving label "+e.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(c=u.x,h=u.y)}l.attr("transform",`translate(${c}, ${h+s/2})`)}if(e.startLabelLeft){const l=oi.get(e.id).startLeft;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=oi.get(e.id).startRight;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=oi.get(e.id).endLeft;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=oi.get(e.id).endRight;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),B8=S((e,t)=>{const i=e.x,a=e.y,s=Math.abs(t.x-i),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return s>=c||l>=h},"outsideNode"),E8=S((e,t,i)=>{mt.debug(`intersection calc abc89:
|
|
425
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
426
|
+
insidePoint : ${JSON.stringify(i)}
|
|
427
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,s=e.y,l=Math.abs(a-i.x),c=e.width/2;let h=i.x<t.x?c-l:c+l;const u=e.height/2,f=Math.abs(t.y-i.y),p=Math.abs(t.x-i.x);if(Math.abs(s-t.y)*c>Math.abs(a-t.x)*u){let g=i.y<t.y?t.y-u-s:s-u-t.y;h=p*g/f;const x={x:i.x<t.x?i.x+h:i.x-p+h,y:i.y<t.y?i.y+f-g:i.y-f+g};return h===0&&(x.x=t.x,x.y=t.y),p===0&&(x.x=t.x),f===0&&(x.y=t.y),mt.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,x),x}else{i.x<t.x?h=t.x-c-a:h=a-c-t.x;let g=f*h/p,x=i.x<t.x?i.x+p-h:i.x-p+h,m=i.y<t.y?i.y+g:i.y-g;return mt.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:m}),h===0&&(x=t.x,m=t.y),p===0&&(x=t.x),f===0&&(m=t.y),{x,y:m}}},"intersection"),zv=S((e,t)=>{mt.warn("abc88 cutPathAtIntersect",e,t);let i=[],a=e[0],s=!1;return e.forEach(l=>{if(mt.info("abc88 checking point",l,t),!B8(t,l)&&!s){const c=E8(t,a,l);mt.debug("abc88 inside",l,a,c),mt.debug("abc88 intersection",c,t);let h=!1;i.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),i.some(u=>u.x===c.x&&u.y===c.y)?mt.warn("abc88 no intersect",c,i):i.push(c),s=!0}else mt.warn("abc88 outside",l,a),a=l,s||i.push(l)}),mt.debug("returning points",i),i},"cutPathAtIntersect");function G_(e){const t=[],i=[];for(let a=1;a<e.length-1;a++){const s=e[a-1],l=e[a],c=e[a+1];(s.x===l.x&&l.y===c.y&&Math.abs(l.x-c.x)>5&&Math.abs(l.y-s.y)>5||s.y===l.y&&l.x===c.x&&Math.abs(l.x-s.x)>5&&Math.abs(l.y-c.y)>5)&&(t.push(l),i.push(a))}return{cornerPoints:t,cornerPointPositions:i}}S(G_,"extractCornerPoints");var Nv=S(function(e,t,i){const a=t.x-e.x,s=t.y-e.y,l=Math.sqrt(a*a+s*s),c=i/l;return{x:t.x-c*a,y:t.y-c*s}},"findAdjacentPoint"),L8=S(function(e){const{cornerPointPositions:t}=G_(e),i=[];for(let a=0;a<e.length;a++)if(t.includes(a)){const s=e[a-1],l=e[a+1],c=e[a],h=Nv(s,c,5),u=Nv(l,c,5),f=u.x-h.x,p=u.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(l.x-s.x)>10&&Math.abs(l.y-s.y)>=10){mt.debug("Corner point fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));const m=5;c.x===h.x?x={x:f<0?h.x-m+g:h.x+m-g,y:p<0?h.y-g:h.y+g}:x={x:f<0?h.x-g:h.x+g,y:p<0?h.y-m+g:h.y+m-g}}else mt.debug("Corner point skipping fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));i.push(x,u)}else i.push(e[a]);return i},"fixCorners"),A8=S((e,t,i)=>{const a=e-t-i,s=2,l=2,c=s+l,h=Math.floor(a/c),u=Array(h).fill(`${s} ${l}`).join(" ");return`0 ${t} ${u} ${i}`},"generateDashArray"),M8=S(function(e,t,i,a,s,l,c,h=!1){var H;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=le();let f=t.points,p=!1;const g=s;var x=l;const m=[];for(const z in t.cssCompiledStyles)WT(z)||m.push(t.cssCompiledStyles[z]);mt.debug("UIO intersect check",t.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(f=f.slice(1,t.points.length-1),f.unshift(g.intersect(f[0])),mt.debug("Last point UIO",t.start,"-->",t.end,f[f.length-1],x,x.intersect(f[f.length-1])),f.push(x.intersect(f[f.length-1])));const v=btoa(JSON.stringify(f));t.toCluster&&(mt.info("to cluster abc88",i.get(t.toCluster)),f=zv(t.points,i.get(t.toCluster).node),p=!0),t.fromCluster&&(mt.debug("from cluster abc88",i.get(t.fromCluster),JSON.stringify(f,null,2)),f=zv(f.reverse(),i.get(t.fromCluster).node).reverse(),p=!0);let C=f.filter(z=>!Number.isNaN(z.y));const k=T8(t.curve);k!=="rounded"&&(C=L8(C));let T=uc;switch(k){case"linear":T=uc;break;case"basis":T=Vg;break;case"cardinal":T=Rk;break;case"bumpX":T=Bk;break;case"bumpY":T=Ek;break;case"catmullRom":T=Ok;break;case"monotoneX":T=Ik;break;case"monotoneY":T=jk;break;case"natural":T=Uk;break;case"step":T=Pk;break;case"stepAfter":T=Yk;break;case"stepBefore":T=Wk;break;case"rounded":T=uc;break;default:T=Vg}const{x:_,y:E}=wD(t),F=oO().x(_).y(E).curve(T);let D;switch(t.thickness){case"normal":D="edge-thickness-normal";break;case"thick":D="edge-thickness-thick";break;case"invisible":D="edge-thickness-invisible";break;default:D="edge-thickness-normal"}switch(t.pattern){case"solid":D+=" edge-pattern-solid";break;case"dotted":D+=" edge-pattern-dotted";break;case"dashed":D+=" edge-pattern-dashed";break;default:D+=" edge-pattern-solid"}let N,U=k==="rounded"?X_(V_(C,t),5):F(C);const R=Array.isArray(t.style)?t.style:[t.style];let V=R.find(z=>z==null?void 0:z.startsWith("stroke:")),Y="";t.animate&&(Y="edge-animation-fast"),t.animation&&(Y="edge-animation-"+t.animation);let G=!1;if(t.look==="handDrawn"){const z=St.svg(e);Object.assign([],C);const $=z.path(U,{roughness:.3,seed:u});D+=" transition",N=Xt($).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+D+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",R?R.reduce((I,it)=>I+";"+it,""):"");let Q=N.attr("d");N.attr("d",Q),e.node().appendChild(N.node())}else{const z=m.join(";"),$=R?R.reduce((yt,xt)=>yt+xt+";",""):"",Q=(z?z+";"+$+";":$)+";"+(R?R.reduce((yt,xt)=>yt+";"+xt,""):"");N=e.append("path").attr("d",U).attr("id",`${c}-${t.id}`).attr("class"," "+D+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",Q),V=(H=Q.match(/stroke:([^;]+)/))==null?void 0:H[1],G=t.animate===!0||!!t.animation||z.includes("animation");const I=N.node(),it=typeof I.getTotalLength=="function"?I.getTotalLength():0,ut=KC[t.arrowTypeStart]||0,dt=KC[t.arrowTypeEnd]||0;if(t.look==="neo"&&!G){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?A8(it,ut,dt):`0 ${ut} ${it-ut-dt} ${dt}`}; stroke-dashoffset: 0;`;N.attr("style",xt+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",t.id),N.attr("data-points",v),N.attr("data-look",Ke(t.look)),t.showPoints&&C.forEach(z=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",z.x).attr("cy",z.y)});let et="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(et=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,et=et.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),mt.info("arrowTypeStart",t.arrowTypeStart),mt.info("arrowTypeEnd",t.arrowTypeEnd);const J=!G&&(t==null?void 0:t.look)==="neo";v8(N,t,et,c,a,J,V);const q=Math.floor(f.length/2),j=f[q];_r.isLabelCoordinateInPath(j,N.attr("d"))||(p=!0);let A={};return p&&(A.updatedPath=f),A.originalPath=t.points,A},"insertEdge");function X_(e,t){if(e.length<2)return"";let i="";const a=e.length,s=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],u=e[l+1];if(l===0)i+=`M${c.x},${c.y}`;else if(l===a-1)i+=`L${c.x},${c.y}`;else{const f=c.x-h.x,p=c.y-h.y,g=u.x-c.x,x=u.y-c.y,m=Math.hypot(f,p),v=Math.hypot(g,x);if(m<s||v<s){i+=`L${c.x},${c.y}`;continue}const C=f/m,k=p/m,T=g/v,_=x/v,E=C*T+k*_,F=Math.max(-1,Math.min(1,E)),D=Math.acos(F);if(D<s||Math.abs(Math.PI-D)<s){i+=`L${c.x},${c.y}`;continue}const N=Math.min(t/Math.sin(D/2),m/2,v/2),U=c.x-C*N,R=c.y-k*N,V=c.x+T*N,Y=c.y+_*N;i+=`L${U},${R}`,i+=`Q${c.x},${c.y} ${V},${Y}`}}return i}S(X_,"generateRoundedPath");function wm(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const i=t.x-e.x,a=t.y-e.y;return{angle:Math.atan2(a,i),deltaX:i,deltaY:a}}S(wm,"calculateDeltaAndAngle");function V_(e,t){const i=e.map(s=>({...s}));if(e.length>=2&&pi[t.arrowTypeStart]){const s=pi[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=wm(l,c),u=s*Math.cos(h),f=s*Math.sin(h);i[0].x=l.x+u,i[0].y=l.y+f}const a=e.length;if(a>=2&&pi[t.arrowTypeEnd]){const s=pi[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=wm(c,l),u=s*Math.cos(h),f=s*Math.sin(h);i[a-1].x=l.x-u,i[a-1].y=l.y-f}return i}S(V_,"applyMarkerOffsetsToPoints");var R8=S((e,t,i,a)=>{t.forEach(s=>{eN[s](e,i,a)})},"insertMarkers"),F8=S((e,t,i)=>{mt.trace("Making markers for ",i),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",i+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),O8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),D8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),$8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),z8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),N8=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),q8=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),I8=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",i+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),j8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),H8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{transitionColor:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${l}`)},"barbNeo"),U8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),P8=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),a.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),W8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Y8=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),G8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${l}`)},"only_one_neo"),X8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${l}`);const u=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),V8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${l}`)},"one_or_more_neo"),Z8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${l}`);const u=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),Q8=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
428
|
+
L20,10
|
|
429
|
+
M20,10
|
|
430
|
+
L0,20`)},"requirement_arrow"),K8=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${l}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
431
|
+
L20,10
|
|
432
|
+
M20,10
|
|
433
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),J8=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),tN=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s,c=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${l}`)},"requirement_contains_neo"),eN={extension:F8,composition:O8,aggregation:D8,dependency:$8,lollipop:z8,point:N8,circle:q8,cross:I8,barb:j8,barbNeo:H8,only_one:U8,zero_or_one:P8,one_or_more:W8,zero_or_more:Y8,only_one_neo:G8,zero_or_one_neo:X8,one_or_more_neo:V8,zero_or_more_neo:Z8,requirement_arrow:Q8,requirement_contains:J8,requirement_arrow_neo:K8,requirement_contains_neo:tN},iN=R8,rN={common:Mc,getConfig:Le,insertCluster:t8,insertEdge:M8,insertEdgeLabel:w8,insertMarkers:iN,insertNode:Y_,interpolateToCurve:Ly,labelHelper:zt,log:mt,positionEdgeLabel:_8},wc={},Z_=S(e=>{for(const t of e)wc[t.name]=t},"registerLayoutLoaders"),aN=S(()=>{Z_([{name:"dagre",loader:S(async()=>await ie(()=>import("./dagre-BM42HDAG-DuFehwqT.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:S(async()=>await ie(()=>import("./cose-bilkent-S5V4N54A-HgNozuI9.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");aN();var CI=S(async(e,t)=>{if(!(e.layoutAlgorithm in wc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const p of e.nodes){const g=p.domId||p.id;p.domId=`${e.diagramId}-${g}`}const i=wc[e.layoutAlgorithm],a=await i.loader(),{theme:s,themeVariables:l}=e.config,{useGradient:c,gradientStart:h,gradientStop:u}=l,f=t.attr("id");if(t.append("defs").append("filter").attr("id",`${f}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${f}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return a.render(e,t,rN,{algorithm:i.algorithm})},"render"),vI=S((e="",{fallback:t="dagre"}={})=>{if(e in wc)return e;if(t in wc)return mt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Zy="comm",Q_="rule",K_="decl",nN="@media",sN="@import",lN="@supports",oN="@namespace",_m="@keyframes",J_="@layer",cN="@scope",hN=Math.abs,fc=String.fromCharCode;function tB(e){return e.trim()}function Bm(e,t,i){return e.replace(t,i)}function pl(e,t){return e.charCodeAt(t)|0}function Dl(e,t,i){return e.slice(t,i)}function Yr(e){return e.length}function eB(e){return e.length}function pu(e,t){return t.push(e),e}var zd=1,$l=1,iB=0,dr=0,Pe=0,Pl="";function Qy(e,t,i,a,s,l,c,h){return{value:e,root:t,parent:i,type:a,props:s,children:l,line:zd,column:$l,length:c,return:"",siblings:h}}function uN(){return Pe}function dN(){return Pe=dr>0?pl(Pl,--dr):0,$l--,Pe===10&&($l=1,zd--),Pe}function Lr(){return Pe=dr<iB?pl(Pl,dr++):0,$l++,Pe===10&&($l=1,zd++),Pe}function yn(){return pl(Pl,dr)}function Mu(){return dr}function Nd(e,t){return Dl(Pl,e,t)}function _c(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function fN(e){return zd=$l=1,iB=Yr(Pl=e),dr=0,[]}function pN(e){return Pl="",e}function vg(e){return tB(Nd(dr-1,Em(e===91?e+2:e===40?e+1:e)))}function gN(e){for(;(Pe=yn())&&Pe<33;)Lr();return _c(e)>2||_c(Pe)>3?"":" "}function mN(e,t){for(;--t&&Lr()&&!(Pe<48||Pe>102||Pe>57&&Pe<65||Pe>70&&Pe<97););return Nd(e,Mu()+(t<6&&yn()==32&&Lr()==32))}function Em(e){for(;Lr();)switch(Pe){case e:return dr;case 34:case 39:e!==34&&e!==39&&Em(Pe);break;case 40:e===41&&Em(e);break;case 92:Lr();break}return dr}function yN(e,t){for(;Lr()&&e+Pe!==57;)if(e+Pe===84&&yn()===47)break;return"/*"+Nd(t,dr-1)+"*"+fc(e===47?e:Lr())}function xN(e){for(;!_c(yn());)Lr();return Nd(e,dr)}function bN(e){return pN(Ru("",null,null,null,[""],e=fN(e),0,[0],e))}function Ru(e,t,i,a,s,l,c,h,u){for(var f=0,p=0,g=c,x=0,m=0,v=0,C=1,k=1,T=1,_=0,E=0,F="",D=s,N=l,U=a,R=F;k;)switch(v=E,E=Lr()){case 40:v!=108&&pl(R,g-1)==58?(_++,R+="("):R+=vg(E);break;case 41:_--,R+=")";break;case 34:case 39:case 91:R+=vg(E);break;case 9:case 10:case 13:case 32:if(_>0){R+=fc(E);break}R+=gN(v);break;case 92:R+=mN(Mu()-1,7);continue;case 47:switch(yn()){case 42:case 47:pu(CN(yN(Lr(),Mu()),t,i,u),u),(_c(v||1)==5||_c(yn()||1)==5)&&Yr(R)&&Dl(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*C:h[f++]=Yr(R)*T;case 125*C:case 59:case 0:if(_>0&&E){R+=fc(E);break}switch(E){case 0:case 125:k=0;case 59+p:T==-1&&(R=Bm(R,/\f/g,"")),m>0&&(Yr(R)-g||C===0)&&pu(m>32?Iv(R+";",a,i,g-1,u):Iv(Bm(R," ","")+";",a,i,g-2,u),u);break;case 59:R+=";";default:if(pu(U=qv(R,t,i,f,p,s,h,F,D=[],N=[],g,l),l),E===123)if(p===0)Ru(R,t,U,U,D,l,g,h,N);else{switch(x){case 99:if(pl(R,3)===110)break;case 108:if(pl(R,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Ru(e,U,U,a&&pu(qv(e,U,U,0,0,s,h,F,s,D=[],g,N),N),s,N,g,h,a?D:N):Ru(R,U,U,U,[""],N,0,h,N)}}f=p=m=0,C=T=1,F=R="",g=c;break;case 58:g=1+Yr(R),m=v;default:if(C<1){if(E==123)--C;else if(E==125&&C++==0&&dN()==125)continue}switch(R+=fc(E),E*C){case 38:T=p>0?1:(R+="\f",-1);break;case 44:if(_>0)break;h[f++]=(Yr(R)-1)*T,T=1;break;case 64:yn()===45&&(R+=vg(Lr())),x=yn(),p=g=Yr(F=R+=xN(Mu())),E++;break;case 45:v===45&&Yr(R)==2&&(C=0)}}return l}function qv(e,t,i,a,s,l,c,h,u,f,p,g){for(var x=s-1,m=s===0?l:[""],v=eB(m),C=0,k=0,T=0;C<a;++C)for(var _=0,E=Dl(e,x+1,x=hN(k=c[C])),F=e;_<v;++_)(F=tB(k>0?m[_]+" "+E:Bm(E,/&\f/g,m[_])))&&(u[T++]=F);return Qy(e,t,i,s===0?Q_:h,u,f,p,g)}function CN(e,t,i,a){return Qy(e,t,i,Zy,fc(uN()),Dl(e,2,-2),0,a)}function Iv(e,t,i,a,s){return Qy(e,t,i,K_,Dl(e,0,a),Dl(e,a+1,-1),a,s)}function Lm(e,t){for(var i="",a=0;a<e.length;a++)i+=t(e[a],a,e,t)||"";return i}function vN(e,t,i,a){switch(e.type){case J_:if(e.children.length)break;case sN:case oN:case K_:return e.return=e.return||e.value;case Zy:return"";case _m:return e.return=e.value+"{"+Lm(e.children,a)+"}";case Q_:if(!Yr(e.value=e.props.join(",")))return""}return Yr(i=Lm(e.children,a))?e.return=e.value+"{"+i+"}":""}function kN(e){var t=eB(e);return function(i,a,s,l){for(var c="",h=0;h<t;h++)c+=e[h](i,a,s,l)||"";return c}}var rB="c4",SN=S(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),TN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-BtXR-tZb.js");return{diagram:t}},__vite__mapDeps([5,6]));return{id:rB,diagram:e}},"loader"),wN={id:rB,detector:SN,loader:TN},_N=wN,aB="flowchart",BN=S((e,t)=>{var i,a;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),EN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C4HhF__U.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:aB,diagram:e}},"loader"),LN={id:aB,detector:BN,loader:EN},AN=LN,nB="flowchart-v2",MN=S((e,t)=>{var i,a,s;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),RN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C4HhF__U.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:nB,diagram:e}},"loader"),FN={id:nB,detector:MN,loader:RN},ON=FN,sB="er",DN=S(e=>/^\s*erDiagram/.test(e),"detector"),$N=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-kB2Dv3Eg.js");return{diagram:t}},__vite__mapDeps([12,9,10,11]));return{id:sB,diagram:e}},"loader"),zN={id:sB,detector:DN,loader:$N},NN=zN,lB="gitGraph",qN=S(e=>/^\s*gitGraph/.test(e),"detector"),IN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-71rP5XPJ.js");return{diagram:t}},__vite__mapDeps([13,14,15,16]));return{id:lB,diagram:e}},"loader"),jN={id:lB,detector:qN,loader:IN},HN=jN,oB="gantt",UN=S(e=>/^\s*gantt/.test(e),"detector"),PN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DX5o7rTU.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]));return{id:oB,diagram:e}},"loader"),WN={id:oB,detector:UN,loader:PN},YN=WN,cB="info",GN=S(e=>/^\s*info/.test(e),"detector"),XN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-DBvPer2N.js");return{diagram:t}},__vite__mapDeps([21,16]));return{id:cB,diagram:e}},"loader"),VN={id:cB,detector:GN,loader:XN},hB="pie",ZN=S(e=>/^\s*pie/.test(e),"detector"),QN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-Bd4Y92PJ.js");return{diagram:t}},__vite__mapDeps([22,14,16,23,24,19]));return{id:hB,diagram:e}},"loader"),KN={id:hB,detector:ZN,loader:QN},uB="quadrantChart",JN=S(e=>/^\s*quadrantChart/.test(e),"detector"),t9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-CTcGIiQn.js");return{diagram:t}},__vite__mapDeps([25,18,19,20]));return{id:uB,diagram:e}},"loader"),e9={id:uB,detector:JN,loader:t9},i9=e9,dB="xychart",r9=S(e=>/^\s*xychart(-beta)?/.test(e),"detector"),a9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-De9GfjwK.js");return{diagram:t}},__vite__mapDeps([26,19,24,18,20]));return{id:dB,diagram:e}},"loader"),n9={id:dB,detector:r9,loader:a9},s9=n9,fB="requirement",l9=S(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),o9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-PFMmQnSB.js");return{diagram:t}},__vite__mapDeps([27,9,10]));return{id:fB,diagram:e}},"loader"),c9={id:fB,detector:l9,loader:o9},h9=c9,pB="sequence",u9=S(e=>/^\s*sequenceDiagram/.test(e),"detector"),d9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-BijNqzUr.js");return{diagram:t}},__vite__mapDeps([28,6,15]));return{id:pB,diagram:e}},"loader"),f9={id:pB,detector:u9,loader:d9},p9=f9,gB="class",g9=S((e,t)=>{var i;return((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),m9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-DSiH2rFL.js");return{diagram:t}},__vite__mapDeps([29,30,8,6,9,10]));return{id:gB,diagram:e}},"loader"),y9={id:gB,detector:g9,loader:m9},x9=y9,mB="classDiagram",b9=S((e,t)=>{var i;return/^\s*classDiagram/.test(e)&&((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),C9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-DSiH2rFL.js");return{diagram:t}},__vite__mapDeps([31,30,8,6,9,10]));return{id:mB,diagram:e}},"loader"),v9={id:mB,detector:b9,loader:C9},k9=v9,yB="state",S9=S((e,t)=>{var i;return((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),T9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-BAeQjHqE.js");return{diagram:t}},__vite__mapDeps([32,33,9,10,1,2]));return{id:yB,diagram:e}},"loader"),w9={id:yB,detector:S9,loader:T9},_9=w9,xB="stateDiagram",B9=S((e,t)=>{var i;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),E9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-UIUY7oFN.js");return{diagram:t}},__vite__mapDeps([34,33,9,10]));return{id:xB,diagram:e}},"loader"),L9={id:xB,detector:B9,loader:E9},A9=L9,bB="journey",M9=S(e=>/^\s*journey/.test(e),"detector"),R9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-_wUVQQqc.js");return{diagram:t}},__vite__mapDeps([35,8,6,23]));return{id:bB,diagram:e}},"loader"),F9={id:bB,detector:M9,loader:R9},O9=F9,D9=S((e,t,i)=>{mt.debug(`rendering svg for syntax error
|
|
434
|
+
`);const a=yO(t),s=a.append("g");a.attr("viewBox","0 0 2412 512"),Z2(a,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),CB={draw:D9},$9=CB,z9={db:{},renderer:CB,parser:{parse:S(()=>{},"parse")}},N9=z9,vB="flowchart-elk",q9=S((e,t={})=>{var i;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),I9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C4HhF__U.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:vB,diagram:e}},"loader"),j9={id:vB,detector:q9,loader:I9},H9=j9,kB="timeline",U9=S(e=>/^\s*timeline/.test(e),"detector"),P9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DZCID9hB.js");return{diagram:t}},__vite__mapDeps([36,23]));return{id:kB,diagram:e}},"loader"),W9={id:kB,detector:U9,loader:P9},Y9=W9,SB="mindmap",G9=S(e=>/^\s*mindmap/.test(e),"detector"),X9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-CdQkrn48.js");return{diagram:t}},__vite__mapDeps([37,9,10]));return{id:SB,diagram:e}},"loader"),V9={id:SB,detector:G9,loader:X9},Z9=V9,TB="kanban",Q9=S(e=>/^\s*kanban/.test(e),"detector"),K9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Dui9E6Ob.js");return{diagram:t}},__vite__mapDeps([38,8]));return{id:TB,diagram:e}},"loader"),J9={id:TB,detector:Q9,loader:K9},tq=J9,wB="sankey",eq=S(e=>/^\s*sankey(-beta)?/.test(e),"detector"),iq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-C_VXI7-f.js");return{diagram:t}},__vite__mapDeps([39,24,19]));return{id:wB,diagram:e}},"loader"),rq={id:wB,detector:eq,loader:iq},aq=rq,_B="packet",nq=S(e=>/^\s*packet(-beta)?/.test(e),"detector"),sq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-AWc_twDt.js");return{diagram:t}},__vite__mapDeps([40,14,16]));return{id:_B,diagram:e}},"loader"),lq={id:_B,detector:nq,loader:sq},BB="radar",oq=S(e=>/^\s*radar-beta/.test(e),"detector"),cq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-DDdI0uEK.js");return{diagram:t}},__vite__mapDeps([41,14,16]));return{id:BB,diagram:e}},"loader"),hq={id:BB,detector:oq,loader:cq},EB="block",uq=S(e=>/^\s*block(-beta)?/.test(e),"detector"),dq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-D0HBY6LU.js");return{diagram:t}},__vite__mapDeps([42,8,1,11]));return{id:EB,diagram:e}},"loader"),fq={id:EB,detector:uq,loader:dq},pq=fq,LB="treeView",gq=S(e=>/^\s*treeView-beta/.test(e),"detector"),mq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-DjfrsPLC.js");return{diagram:t}},__vite__mapDeps([43,14,15,16]));return{id:LB,diagram:e}},"loader"),yq={id:LB,detector:gq,loader:mq},xq=yq,AB="architecture",bq=S(e=>/^\s*architecture/.test(e),"detector"),Cq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-3hbIeNlM.js");return{diagram:t}},__vite__mapDeps([44,14,16,4]));return{id:AB,diagram:e}},"loader"),vq={id:AB,detector:bq,loader:Cq},kq=vq,MB="eventmodeling",Sq=S(e=>/^\s*eventmodeling/.test(e),"detector"),Tq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-DUlrOKY_.js");return{diagram:t}},__vite__mapDeps([45,14,16]));return{id:MB,diagram:e}},"loader"),wq={id:MB,detector:Sq,loader:Tq},_q=wq,RB="ishikawa",Bq=S(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Eq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-CgUep-i8.js");return{diagram:t}},[]);return{id:RB,diagram:e}},"loader"),Lq={id:RB,detector:Bq,loader:Eq},FB="venn",Aq=S(e=>/^\s*venn-beta/.test(e),"detector"),Mq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-QvX87x-_.js");return{diagram:t}},[]);return{id:FB,diagram:e}},"loader"),Rq={id:FB,detector:Aq,loader:Mq},Fq=Rq,OB="treemap",Oq=S(e=>/^\s*treemap/.test(e),"detector"),Dq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DczXzYze.js");return{diagram:t}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:OB,diagram:e}},"loader"),$q={id:OB,detector:Oq,loader:Dq},DB="wardley-beta",zq=S(e=>/^\s*wardley-beta/i.test(e),"detector"),Nq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-DEF9mErf.js");return{diagram:t}},__vite__mapDeps([47,14,16]));return{id:DB,diagram:e}},"loader"),qq={id:DB,detector:zq,loader:Nq},Iq=qq,jv=!1,qd=S(()=>{jv||(jv=!0,Hu("error",N9,e=>e.toLowerCase().trim()==="error"),Hu("---",{db:{clear:S(()=>{},"clear")},styles:{},renderer:{draw:S(()=>{},"draw")},parser:{parse:S(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:S(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Og(H9,Z9,kq),Og(_N,tq,k9,x9,NN,YN,VN,KN,h9,p9,ON,AN,Y9,HN,A9,_9,O9,i9,aq,lq,s9,pq,_q,xq,hq,Lq,$q,Fq,Iq))},"addDiagrams"),jq=S(async()=>{mt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(es).map(async([i,{detector:a,loader:s}])=>{if(s)try{qg(i)}catch{try{const{diagram:l,id:c}=await s();Hu(c,l,a)}catch(l){throw mt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete es[i],l}}}))).filter(i=>i.status==="rejected");if(t.length>0){mt.error(`Failed to load ${t.length} external diagrams`);for(const i of t)mt.error(i);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Hq="graphics-document document";function $B(e,t){e.attr("role",Hq),t!==""&&e.attr("aria-roledescription",t)}S($B,"setA11yDiagramInfo");function zB(e,t,i,a){if(e.insert!==void 0){if(i){const s=`chart-desc-${a}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(i)}if(t){const s=`chart-title-${a}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}S(zB,"addSVGa11yTitleDescription");var Jn,Am=(Jn=class{constructor(t,i,a,s,l){this.type=t,this.text=i,this.db=a,this.parser=s,this.renderer=l}static async fromText(t,i={}){var f,p;const a=Le(),s=Jm(t,a);t=C$(t)+`
|
|
435
|
+
`;try{qg(s)}catch{const g=z5(s);if(!g)throw new D2(`Diagram ${s} not found.`);const{id:x,diagram:m}=await g();Hu(x,m)}const{db:l,parser:c,renderer:h,init:u}=qg(s);return c.parser&&(c.parser.yy=l),(f=l.clear)==null||f.call(l),u==null||u(a),i.title&&((p=l.setDiagramTitle)==null||p.call(l,i.title)),await c.parse(t),new Jn(s,t,l,c,h)}async render(t,i){await this.renderer.draw(this.text,t,i,this)}getParser(){return this.parser}getType(){return this.type}},S(Jn,"Diagram"),Jn),Hv=[],Uq=S(()=>{Hv.forEach(e=>{e()}),Hv=[]},"attachFunctions"),Pq=S(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function NB(e){const t=e.match(O2);if(!t)return{text:e,metadata:{}};let i=TD(t[1],{schema:SD})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}S(NB,"extractFrontMatter");var Wq=S(e=>e.replace(/\r\n?/g,`
|
|
436
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,i,a)=>"<"+i+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Yq=S(e=>{const{text:t,metadata:i}=NB(e),{displayMode:a,title:s,config:l={}}=i;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:s,config:l,text:t}},"processFrontmatter"),Gq=S(e=>{const t=_r.detectInit(e)??{},i=_r.detectDirective(e,"wrap");return Array.isArray(i)?t.wrap=i.some(({type:a})=>a==="wrap"):(i==null?void 0:i.type)==="wrap"&&(t.wrap=!0),{text:l$(e),directive:t}},"processDirectives");function Ky(e){const t=Wq(e),i=Yq(t),a=Gq(i.text),s=Oy(i.config,a.directive);return e=Pq(a.text),{code:e,title:i.title,config:s}}S(Ky,"preprocessDiagram");function qB(e){const t=new TextEncoder().encode(e),i=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(i)}S(qB,"toBase64");var Xq=5e4,Vq="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Zq="sandbox",Qq="loose",Kq="http://www.w3.org/2000/svg",Jq="http://www.w3.org/1999/xlink",t7="http://www.w3.org/1999/xhtml",e7="100%",i7="100%",r7="border:0;margin:0;",a7="margin:0",n7="allow-top-navigation-by-user-activation allow-popups",s7='The "iframe" tag is not supported by your browser.',l7=["foreignobject"],o7=["dominant-baseline"];function Jy(e){const t=Ky(e);return Iu(),hR(t.config??{}),t}S(Jy,"processAndSetConfigs");async function IB(e,t){qd();try{const{code:i,config:a}=Jy(e);return{diagramType:(await HB(i)).type,config:a}}catch(i){if(t!=null&&t.suppressErrors)return!1;throw i}}S(IB,"parse");var Uv=S((e,t,i=[])=>{const a=I2(`{ ${i.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),c7=S((e,t=new Map)=>{const i=new CSSStyleSheet;if(e.fontFamily!==void 0&&i.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,i.cssRules.length),e.altFontFamily!==void 0&&i.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,i.cssRules.length),t instanceof Map){const h=wi(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(u=>{rv(u.styles)||h.forEach(f=>{i.insertRule(Uv(u.id,f,u.styles),i.cssRules.length)}),rv(u.textStyles)||i.insertRule(Uv(u.id,"tspan",((u==null?void 0:u.textStyles)||[]).map(f=>f.replace("color","fill"))),i.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof i.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),a=Ng(s)+`
|
|
437
|
+
`}else a+=`${e.themeCSS}
|
|
438
|
+
`;return a+Ng(i)},"createCssStyles"),h7=S((e,t)=>Lm(bN(`${e}{${t}}`),kN([S(function(a,s,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===_m)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[nN,lN,J_,cN,"@container","@starting-style"],_m].includes(a.type)||(mt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=Zy))},"addNamespace"),vN])),"compileCSS"),u7=S((e,t,i,a)=>{const s=c7(e,i),l=LR(t,s,{...e.themeVariables,theme:e.theme,look:e.look},a);return h7(a,l)},"createUserStyles"),d7=S((e="",t,i)=>{let a=e;return!i&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=ns(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),f7=S((e="",t)=>{var s,l;const i=(l=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&l.height?t.viewBox.baseVal.height+"px":i7,a=qB(`<body style="${a7}">${e}</body>`);return`<iframe style="width:${e7};height:${i};${r7}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${n7}">
|
|
439
|
+
${s7}
|
|
440
|
+
</iframe>`},"putIntoIFrame"),Pv=S((e,t,i,a,s)=>{const l=e.append("div");l.attr("id",i),a&&l.attr("style",a);const c=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Kq);return s&&c.attr("xmlns:xlink",s),c.append("g"),e},"appendDivSvgG");function Mm(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}S(Mm,"sandboxedIframe");var p7=S((e,t,i,a)=>{var s,l,c;(s=e.getElementById(t))==null||s.remove(),(l=e.getElementById(i))==null||l.remove(),(c=e.getElementById(a))==null||c.remove()},"removeExistingElements"),g7=S(async function(e,t,i){var et,J,q,j,A,H;qd();const a=Jy(t);t=a.code;const s=Le();mt.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Xq)&&(t=Vq);const l=`#${e}`,c="i"+e,h="#"+c,u="d"+e,f="#"+u,p=S(()=>{const $=Xt(x?h:f).node();$&&"remove"in $&&$.remove()},"removeTempElements");let g=Xt(document.body);const x=s.securityLevel===Zq,m=s.securityLevel===Qq,v=s.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const z=Mm(Xt(i),c);g=Xt(z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Xt(i);Pv(g,e,u,`font-family: ${v}`,Jq)}else{if(p7(document,e,u,c),x){const z=Mm(Xt(document.body),c);g=Xt(z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Xt("body");Pv(g,e,u)}let C,k;try{C=await Am.fromText(t,{title:a.title})}catch(z){if(s.suppressErrorRendering)throw p(),z;C=await Am.fromText("error"),k=z}const T=g.select(f).node(),_=C.type,E=T.firstChild,F=E.firstChild,D=(J=(et=C.renderer).getClasses)==null?void 0:J.call(et,t,C),N=u7(s,_,D,l),U=document.createElement("style");U.innerHTML=N,E.insertBefore(U,F);try{await C.renderer.draw(t,e,"11.15.0",C)}catch(z){throw s.suppressErrorRendering?p():$9.draw(t,e,"11.15.0"),z}const R=g.select(`${f} svg`),V=(j=(q=C.db).getAccTitle)==null?void 0:j.call(q),Y=(H=(A=C.db).getAccDescription)==null?void 0:H.call(A);UB(_,R,V,Y),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",t7);let G=g.select(f).node().innerHTML;if(mt.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),G=d7(G,x,Ea(s.arrowMarkerAbsolute)),x){const z=g.select(f+" svg").node();G=f7(G,z)}else m||(G=Ll.sanitize(G,{ADD_TAGS:l7,ADD_ATTR:o7,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Uq(),k)throw k;return p(),{diagramType:_,svg:G,bindFunctions:C.db.bindFunctions}},"render");function jB(e={}){var a;const t=Xe({},e);t!=null&&t.fontFamily&&!((a=t.themeVariables)!=null&&a.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),oR(t),t!=null&&t.theme&&t.theme in Sa?t.themeVariables=Sa[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Sa.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?lR(t):j2();Km(i.logLevel),qd()}S(jB,"initialize");var HB=S((e,t={})=>{const{code:i}=Ky(e);return Am.fromText(i,t)},"getDiagramFromText");function UB(e,t,i,a){$B(t,e),zB(t,i,a,t.attr("id"))}S(UB,"addA11yInfo");var ls=Object.freeze({render:g7,parse:IB,getDiagramFromText:HB,initialize:jB,getConfig:Le,setConfig:H2,getSiteConfig:j2,updateSiteConfig:cR,reset:S(()=>{Iu()},"reset"),globalReset:S(()=>{Iu(Al)},"globalReset"),defaultConfig:Al});Km(Le().logLevel);Iu(Le());var m7=S((e,t,i)=>{mt.warn(e),Fy(e)?(i&&i(e.str,e.hash),t.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),PB=S(async function(e={querySelector:".mermaid"}){try{await y7(e)}catch(t){if(Fy(t)&&mt.error(t.str),Vi.parseError&&Vi.parseError(t),!e.suppressErrors)throw mt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),y7=S(async function({postRenderCallback:e,querySelector:t,nodes:i}={querySelector:".mermaid"}){const a=ls.getConfig();mt.debug(`${e?"":"No "}Callback function found`);let s;if(i)s=i;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");mt.debug(`Found ${s.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(mt.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),ls.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const l=new _r.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const u of Array.from(s)){if(mt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const f=`mermaid-${l.next()}`;c=u.innerHTML,c=aw(_r.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=_r.detectInit(c);p&&mt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await XB(f,c,u);u.innerHTML=g,e&&await e(f),x&&x(u)}catch(g){m7(g,h,Vi.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),WB=S(function(e){ls.initialize(e)},"initialize"),x7=S(async function(e,t,i){mt.warn("mermaid.init is deprecated. Please use run instead."),e&&WB(e);const a={postRenderCallback:i,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await PB(a)},"init"),b7=S(async(e,{lazyLoad:t=!0}={})=>{qd(),Og(...e),t===!1&&await jq()},"registerExternalDiagrams"),YB=S(function(){if(Vi.startOnLoad){const{startOnLoad:e}=ls.getConfig();e&&Vi.run().catch(t=>mt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",YB,!1);var C7=S(function(e){Vi.parseError=e},"setParseErrorHandler"),pd=[],kg=!1,GB=S(async()=>{if(!kg){for(kg=!0;pd.length>0;){const e=pd.shift();if(e)try{await e()}catch(t){mt.error("Error executing queue",t)}}kg=!1}},"executeQueue"),v7=S(async(e,t)=>new Promise((i,a)=>{const s=S(()=>new Promise((l,c)=>{ls.parse(e,t).then(h=>{l(h),i(h)},h=>{var u;mt.error("Error parsing",h),(u=Vi.parseError)==null||u.call(Vi,h),c(h),a(h)})}),"performCall");pd.push(s),GB().catch(a)}),"parse"),XB=S((e,t,i)=>new Promise((a,s)=>{const l=S(()=>new Promise((c,h)=>{ls.render(e,t,i).then(u=>{c(u),a(u)},u=>{var f;mt.error("Error parsing",u),(f=Vi.parseError)==null||f.call(Vi,u),h(u),s(u)})}),"performCall");pd.push(l),GB().catch(s)}),"render"),k7=S(()=>Object.keys(es).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Vi={startOnLoad:!0,mermaidAPI:ls,parse:v7,render:XB,init:x7,run:PB,registerExternalDiagrams:b7,registerLayoutLoaders:Z_,initialize:WB,parseError:void 0,contentLoaded:YB,setParseErrorHandler:C7,detectType:Jm,registerIconPacks:Bz,getRegisteredDiagramsMetadata:k7},Rm=Vi;/*! Check if previously processed *//*!
|
|
441
|
+
* Wait for document loaded before starting the execution
|
|
442
|
+
*/Rm.initialize({startOnLoad:!1,theme:"dark",themeVariables:{primaryColor:"#0ea5e9",primaryTextColor:"#e2e8f0",primaryBorderColor:"#334155",lineColor:"#94a3b8",secondaryColor:"#1e293b",tertiaryColor:"#0f172a",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},securityLevel:"loose",flowchart:{htmlLabels:!0,curve:"basis"}});function Wv(e,t){const{escapeHtml:i=!1}=t??{},a=/[├└│─╠╚═╞╟╤╪]/,s=[],l=/(```|~~~)[\s\S]*?\1/g;let c=0,h;for(;(h=l.exec(e))!==null;)h.index>c&&s.push({type:"text",content:e.slice(c,h.index)}),s.push({type:"fence",content:h[0]}),c=h.index+h[0].length;c<e.length&&s.push({type:"text",content:e.slice(c)});const u=s.map(f=>{if(f.type==="fence")return f;let p=f.content;const g=p.split(`
|
|
443
|
+
`),x=[];let m=!1,v=[],C=0;const k=()=>{const T=v.join(`
|
|
444
|
+
`);try{JSON.parse(T),x.push("\n```json\n"+T+"\n```\n")}catch{x.push(...v)}m=!1,v=[],C=0};for(const T of g){const _=T.trim();!m&&_.startsWith('{"')?(m=!0,v=[T],C=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,C<=0&&k()):m?(v.push(T),C+=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,C<=0&&k()):x.push(T)}if(v.length&&x.push(...v),p=x.join(`
|
|
445
|
+
`),a.test(p)){const T=p.split(`
|
|
446
|
+
`),_=[];let E=[];const F=()=>{E.length>0&&(_.push("\n```\n"+E.join(`
|
|
447
|
+
`).replace(/^\n+/,"").replace(/\n+$/,"")+"\n```\n"),E=[])};for(const D of T)a.test(D)?E.push(D):(F(),_.push(D));F(),p=_.join(`
|
|
448
|
+
`)}return p=p.replace(/^(#{1,6})([^\s#\n])/gm,"$1 $2"),p=p.replace(/^-([^\s\-])/gm,"- $1"),p=p.replace(/([^\n])(\n?)(#{1,6}\s)/g,(T,_,E,F)=>E&&_===`
|
|
449
|
+
`||/[{(\[\\/>]$/.test(_)?T:_+`
|
|
450
|
+
|
|
451
|
+
`+F),p=p.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
|
|
452
|
+
`),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(- (?!-))/g,`$1
|
|
453
|
+
$2`),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(\d+\.\s)/g,`$1
|
|
454
|
+
$2`),p=p.replace(/([^\n])(```|~~~)/g,`$1
|
|
455
|
+
$2`),p=p.replace(/^([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gmu,`$1
|
|
456
|
+
$2`),{type:"text",content:p}});if(i){const f=[];for(const p of u){if(p.type==="fence"){f.push(p.content);continue}const g=/(```|~~~)[\s\S]*?\1/g;let x=0,m;for(;(m=g.exec(p.content))!==null;)m.index>x&&f.push(p.content.slice(x,m.index).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),f.push(m[0]),x=m.index+m[0].length;x<p.content.length&&f.push(p.content.slice(x).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"))}return f.join("")}return u.map(f=>f.content).join("")}function Yv(){const{sessionId:e}=l2(),{messages:t,isLoading:i,isHistoryLoading:a,error:s,sendMessage:l,clearMessages:c,abortChat:h,subAgents:u,thinkingStatus:f}=rM(e),{status:p}=xd(),[g,x]=O.useState(""),[m,v]=O.useState(!1),C=O.useRef(new Map),k=O.useRef(null),T=O.useRef(null),_=O.useRef(!0),E=O.useRef(null),[F,D]=O.useState(0),[N,U]=O.useState([]),[R,V]=O.useState(null),[Y,G]=O.useState(!1),[et,J]=O.useState([]),[q,j]=O.useState(null),[A,H]=O.useState(!1),z=y2();O.useEffect(()=>{if(z.isRecording){const W=z.drainFinalized();W&&x(ct=>ct?ct+W:W)}if(!z.isRecording){const W=z.drainFinalized();W&&x(ct=>ct?ct+W:W),z.clearTranscript()}},[z.isRecording,z.transcript]),O.useEffect(()=>{jt.getAudioSettings().then(W=>{var ct,Ct,Ft;z.updateSettings({ttsProvider:((ct=W.tts)==null?void 0:ct.provider)||"edge",ttsVoice:((Ct=W.tts)==null?void 0:Ct.voice)||"zh-CN-XiaoxiaoNeural",ttsRate:((Ft=W.tts)==null?void 0:Ft.rate)||"+0%"})}).catch(()=>{})},[]),O.useEffect(()=>{(async()=>{try{U(await jt.listModels())}catch{}try{const W=await jt.getStatus();V(W.model),j(W.currentAgent)}catch{}try{const W=await jt.listAgents();J(W.agents)}catch{}})()},[]);const $=async W=>{try{const ct=await jt.switchModel(W.id);ct.success&&V(ct.model)}catch{}G(!1)},Q=async W=>{try{const ct=await jt.switchAgent(W);ct.success&&j(ct.currentAgent)}catch{}H(!1)},I=O.useMemo(()=>{const W=new Map;for(const ct of N){const Ct=ct.providerDisplayName??ct.provider;W.has(Ct)||W.set(Ct,[]),W.get(Ct).push(ct)}return W},[N]),it=u.filter(W=>W.status==="running"),ut=()=>{const W=T.current;W&&(_.current=W.scrollHeight-W.scrollTop-W.clientHeight<80)};O.useEffect(()=>{var ct;if(!_.current)return;const W=T.current;W&&(i?W.scrollTop=W.scrollHeight:(ct=k.current)==null||ct.scrollIntoView({behavior:"smooth"}))},[t,it,f,i]),O.useEffect(()=>{if(!f){D(0);return}const W=setInterval(()=>{D(Math.floor((Date.now()-f.startTime)/1e3))},500);return()=>clearInterval(W)},[f]);const dt=W=>{var ct;if(W.preventDefault(),g.trim()&&!i){_.current=!0;let Ct=g.trim();for(const[Ft,Jt]of C.current)Ct=Ct.replaceAll(Ft,Jt);C.current.clear(),l(Ct),x("")}(ct=E.current)==null||ct.focus()};O.useEffect(()=>{var W;(W=E.current)==null||W.focus()},[]),O.useEffect(()=>{var W;i||(W=E.current)==null||W.focus()},[i]),O.useEffect(()=>{const W=ct=>{ct.key==="Escape"&&i&&(ct.preventDefault(),h())};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[i,h]);const yt=O.useRef(0),xt=W=>{W.preventDefault(),W.stopPropagation(),yt.current++,W.dataTransfer.types.includes("Files")&&v(!0)},Rt=W=>{W.preventDefault(),W.stopPropagation(),yt.current--,yt.current===0&&v(!1)},Ot=W=>{W.preventDefault(),W.stopPropagation()},Pt=async W=>{var me;W.preventDefault(),W.stopPropagation(),yt.current=0,v(!1);const ct=W.dataTransfer.files;if(ct.length===0)return;const Ct=[],Ft=[];for(let Ht=0;Ht<ct.length;Ht++){const Ae=ct[Ht],De=Ae.path;De?Ct.push(De):Ft.push(Ae)}if(Ft.length>0)try{const Ht=Je=>new Promise((Jr,Ki)=>{const pr=new FileReader;pr.onload=()=>Jr(pr.result),pr.onerror=Ki,pr.readAsDataURL(Je)}),Ae=await Promise.all(Ft.map(async Je=>({name:Je.name,data:(await Ht(Je)).split(",")[1]}))),De=await fetch("/api/files/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:Ae})});if(De.ok){const Je=await De.json();Ct.push(...Je.paths||[])}}catch(Ht){console.error("[aggroot] File upload failed:",Ht)}if(Ct.length===0)return;const Jt=[];for(const Ht of Ct){const Ae=Ht.includes("/")?"/":"\\",Je=`@${Ht.slice(Ht.lastIndexOf(Ae)+1)}`;C.current.set(Je,Ht),Jt.push(Je)}x(Ht=>{const Ae=Jt.join(" ");return Ht?`${Ht} ${Ae}`:Ae}),(me=E.current)==null||me.focus()};return B.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},onDragEnter:xt,onDragLeave:Rt,onDragOver:Ot,onDrop:Pt,children:[B.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,background:"linear-gradient(180deg, rgba(99,102,241,0.04) 0%, transparent 100%)"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flex:1},children:[B.jsx("h2",{style:{fontSize:16,fontWeight:600},className:"gradient-text",children:"Chat"}),B.jsxs("div",{style:{position:"relative"},children:[B.jsxs("button",{className:"btn-ghost",onClick:()=>{H(!A),G(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[q??"Agent",B.jsx("span",{style:{fontSize:10},children:"▼"})]}),A&&B.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:300,overflow:"auto",minWidth:200,marginTop:4},children:et.map(W=>B.jsxs("div",{onClick:()=>Q(W.name),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:W.name===q?"var(--accent-soft)":"transparent",color:W.name===q?"var(--accent)":"var(--text-primary)",fontWeight:W.name===q?500:400},onMouseEnter:ct=>ct.currentTarget.style.background="var(--bg-hover)",onMouseLeave:ct=>ct.currentTarget.style.background=W.name===q?"var(--accent-soft)":"transparent",children:[B.jsx("div",{children:W.name}),W.description&&B.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:W.description})]},W.name))})]}),B.jsxs("div",{style:{position:"relative"},children:[B.jsxs("button",{className:"btn-ghost",onClick:()=>{G(!Y),H(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[(R==null?void 0:R.name)??"Select Model",B.jsx("span",{style:{fontSize:10},children:"▼"})]}),Y&&B.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:400,overflow:"auto",minWidth:260,marginTop:4},children:Array.from(I.entries()).map(([W,ct])=>B.jsxs("div",{children:[B.jsx("div",{style:{padding:"6px 12px",fontSize:11,fontWeight:600,color:"var(--violet)",textTransform:"uppercase",letterSpacing:.5},children:W}),ct.map(Ct=>B.jsx("div",{onClick:()=>$(Ct),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:Ct.id===(R==null?void 0:R.id)?"var(--accent-soft)":"transparent",color:Ct.id===(R==null?void 0:R.id)?"var(--accent)":"var(--text-primary)",fontWeight:Ct.id===(R==null?void 0:R.id)?500:400},onMouseEnter:Ft=>Ft.currentTarget.style.background="var(--bg-hover)",onMouseLeave:Ft=>Ft.currentTarget.style.background=Ct.id===(R==null?void 0:R.id)?"var(--accent-soft)":"transparent",children:Ct.name},Ct.id))]},W))})]})]}),(p==null?void 0:p.workingDirectory)&&B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,color:"var(--text-muted)",background:"var(--violet-soft)",padding:"3px 8px",borderRadius:"var(--radius-sm)",maxWidth:400,overflow:"hidden"},title:p.workingDirectory,children:[B.jsx("span",{style:{flexShrink:0,fontSize:10,fontWeight:600,color:"var(--violet)"},children:"WorkDir:"}),B.jsx("span",{style:{fontFamily:"monospace",color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.workingDirectory})]}),B.jsx("button",{className:"btn-ghost",onClick:c,children:"Clear"})]}),B.jsxs("div",{ref:T,onScroll:ut,style:{flex:1,overflow:"auto",padding:"16px 20px"},children:[a?B.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:"Loading history..."}):t.length===0&&!f&&B.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[B.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"💬"}),"Start a conversation by typing a message below."]}),t.map(W=>B.jsx(_7,{message:W},W.id)),it.length>0?B.jsx(w7,{agents:it}):f?B.jsx(T7,{status:f,elapsed:F}):null,s&&B.jsx("div",{style:{padding:12,background:"var(--rose-soft)",borderRadius:"var(--radius)",color:"var(--rose)",fontSize:13,marginBottom:12,border:"1px solid rgba(244, 63, 94, 0.2)"},children:s}),B.jsx("div",{ref:k})]}),B.jsx("form",{onSubmit:dt,style:{padding:"0 20px 16px",display:"flex",alignItems:"flex-end",gap:0},children:B.jsxs("div",{style:{flex:1,display:"flex",alignItems:"flex-end",background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",overflow:"hidden",transition:"border-color 0.2s"},children:[B.jsx("textarea",{ref:E,value:g,onChange:W=>x(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),dt(W))},placeholder:"Type a message... (Shift+Enter for new line)",disabled:i,rows:6,style:{flex:1,resize:"none",border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:14,lineHeight:1.5,padding:"14px 16px",minHeight:132,fontFamily:"inherit"}}),B.jsx("button",{type:"button",onClick:()=>{z.isRecording?z.stopRecording():z.startRecording()},style:{background:z.isRecording?"var(--rose-soft)":"transparent",border:"none",color:z.isRecording?"var(--rose)":"var(--text-muted)",padding:"14px 10px",cursor:"pointer",display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},title:z.isRecording?"Stop recording":"Start voice input",children:z.isRecording?B.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"var(--rose)",stroke:"var(--rose)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),B.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),B.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),B.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}):B.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),B.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),B.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),B.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),z.isRecording&&B.jsxs("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:500,padding:"14px 4px",display:"flex",alignItems:"center",gap:4,animation:"pulse 1.5s ease-in-out infinite"},children:[B.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"var(--rose)"}}),"REC"]}),B.jsx("button",{type:"submit",disabled:i||!g.trim(),style:{background:g.trim()&&!i?"var(--accent)":"var(--bg-hover)",color:g.trim()&&!i?"white":"var(--text-muted)",border:"none",borderRadius:"0 var(--radius-lg) var(--radius-lg) 0",padding:"14px 18px",cursor:g.trim()&&!i?"pointer":"default",fontSize:16,display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},children:B.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),B.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})}),m&&B.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(14, 165, 233, 0.08)",border:"2px dashed var(--accent)",borderRadius:"var(--radius-lg)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,pointerEvents:"none"},children:B.jsx("div",{style:{color:"var(--accent)",fontSize:16,fontWeight:500,background:"var(--bg-primary)",padding:"12px 24px",borderRadius:"var(--radius)",border:"1px solid var(--accent)"},children:"Drop file here to insert path"})})]})}const Sg=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],Tg=["○","◎","●","◎"];function VB(e=80){const[t,i]=O.useState(0);return O.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%Sg.length),e);return()=>clearInterval(a)},[e]),Sg[t%Sg.length]}function S7(e=375){const[t,i]=O.useState(0);return O.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%Tg.length),e);return()=>clearInterval(a)},[e]),Tg[t%Tg.length]}function ZB(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m${e%60}s`:`${Math.floor(e/3600)}h${Math.floor(e%3600/60)}m${e%60}s`}function T7({status:e,elapsed:t}){const i=VB(),{color:a,bg:s,label:l}=e.phase==="thinking"?{color:"var(--cyan)",bg:"var(--cyan-soft)",label:"Thinking"}:e.phase==="tool_calling"?{color:"var(--amber)",bg:"var(--amber-soft)",label:"Tool"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",label:"Gen"};return B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",marginTop:8,fontSize:13,lineHeight:1.5,background:s,borderRadius:"var(--radius-sm)",border:`1px solid ${a}22`},children:[B.jsx("span",{style:{color:a,fontFamily:"monospace",fontWeight:700},children:i}),B.jsxs("span",{style:{color:a,fontWeight:500,fontSize:11,opacity:.7},children:["[",l,"]"]}),B.jsx("span",{style:{color:"var(--text-secondary)"},children:e.text}),t>0&&B.jsx("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:"auto"},children:ZB(t)}),B.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"[ESC打断]"})]})}const Gv=["#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e"];function w7({agents:e}){const t=VB(),i=S7(),[a,s]=O.useState(Date.now());O.useEffect(()=>{const h=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(h)},[]);const l=Math.min(...e.map(h=>h.startTime)),c=ZB(Math.floor((a-l)/1e3));return B.jsxs("div",{style:{marginTop:4,marginBottom:8,padding:"8px 10px",fontSize:12,lineHeight:1.8,background:"var(--amber-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(245, 158, 11, 0.15)"},children:[B.jsxs("div",{children:[B.jsx("span",{style:{color:"var(--amber)",fontFamily:"monospace",fontWeight:700},children:t})," ",B.jsx("span",{style:{color:"var(--amber)",fontWeight:600},children:"SubagentExecutor"})," ",B.jsxs("span",{style:{color:"var(--text-muted)"},children:["[",c,"]"]})]}),e.map((h,u)=>{const p=u===e.length-1?" └─ ":" ├─ ",g=h.lines.length>0?h.lines[h.lines.length-1]:"思考中...",x=h.toolCount>0?` ${h.toolCount} tools`:"",m=Gv[u%Gv.length];return B.jsxs("div",{children:[B.jsx("span",{style:{color:"var(--text-muted)"},children:p}),B.jsx("span",{style:{color:m,fontWeight:500},children:h.name})," ",B.jsx("span",{style:{color:m,opacity:.6},children:i})," ",B.jsxs("span",{style:{color:"var(--text-muted)"},children:[g,x]})]},h.id)})]})}function _7({message:e}){const t=e.role==="user",[i,a]=O.useState(!1),[s,l]=O.useState(null),c=O.useRef(null),h=O.useRef(null),u=O.useRef(""),f=O.useRef(!0);O.useEffect(()=>{e.isStreaming&&e.reasoning&&(a(!0),f.current=!0)},[e.isStreaming,e.reasoning]);const p=()=>{const C=c.current;C&&(f.current=C.scrollHeight-C.scrollTop-C.clientHeight<40)};O.useEffect(()=>{i&&f.current&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e.reasoning,i]);const g=O.useMemo(()=>{if(t)return null;try{const C=new de.Renderer,k=C.code.bind(C);let T=0;C.code=E=>E.lang==="mermaid"?(T++,`<div class="mermaid-diagram" data-mermaid="${encodeURIComponent(E.text)}"><div class="mermaid-placeholder" style="padding:16px;text-align:center;color:var(--text-muted);font-size:12px;">📊 图表</div></div>`):k(E);const _=de.parse(Wv(e.content||""),{async:!1,renderer:C});return console.log(`[mermaid-debug] useMemo htmlContent: mermaidBlocks=${T}, contentLen=${(e.content||"").length}, htmlLen=${_.length}, hasMermaidClass=${_.includes("mermaid-diagram")}`),_}catch(C){return console.error("[mermaid-debug] useMemo ERROR:",C),e.content}},[e.content,t]),[x,m]=O.useState(null);O.useEffect(()=>{if(console.log(`[mermaid-debug] useEffect trigger: htmlContent=${!!g}, isUser=${t}, isStreaming=${e.isStreaming}, contentLen=${(e.content||"").length}`),!g||t){l(null);return}if(e.isStreaming){l(g);return}const C=document.createElement("div");C.innerHTML=g;const k=C.querySelectorAll(".mermaid-diagram[data-mermaid]");if(console.log(`[mermaid-debug] Found diagrams: ${k.length}, tempDiv innerHTML length: ${C.innerHTML.length}`),k.length>0){const T=k[0];console.log(`[mermaid-debug] First diagram data-mermaid preview: ${(T.dataset.mermaid||"").slice(0,100)}`)}if(k.length===0){l(g);return}(async()=>{let T=0;for(const E of Array.from(k)){const F=E,D=decodeURIComponent(F.dataset.mermaid??""),N=T++;let U=!1;try{await Rm.parse(D),U=!0,console.log(`[mermaid-debug#${N}] Parse OK, srcLen=${D.length}`)}catch(R){console.warn(`[mermaid-debug#${N}] Parse FAILED:`,R instanceof Error?R.message:String(R).slice(0,500))}if(!U){F.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${D.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</code></pre>`;continue}try{const R=`m-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,{svg:V}=await Rm.render(R,D);console.log(`[mermaid-debug#${N}] Render OK, svgLen=${V.length}`);const Y=`cb_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;window.__mermaidCb||(window.__mermaidCb={}),window.__mermaidCb[Y]={svg:V,async save(J){try{const q=new Blob([V],{type:"image/svg+xml"}),j=URL.createObjectURL(q),A=document.createElement("a");A.href=j,A.download=`diagram-${Date.now()}.svg`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(j),J.textContent="Saved!",J.style.color="var(--emerald)",setTimeout(()=>{J.textContent="Save SVG",J.style.color="var(--text-muted)"},2e3)}catch{J.textContent="Failed!",J.style.color="var(--red)",setTimeout(()=>{J.textContent="Save SVG",J.style.color="var(--text-muted)"},2e3)}},fullscreen(){console.log("[bind-debug] Fullscreen via inline onclick!"),m(V)}};const G=`<div class="mermaid-toolbar" style="position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:5;opacity:1;pointer-events:auto;">
|
|
457
|
+
<button onclick="window.__mermaidCb['${Y}'].save(this)" title="另存为 SVG 文件" style="padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer">Save SVG</button>
|
|
458
|
+
<button onclick="event.stopPropagation();window.__mermaidCb['${Y}'].fullscreen()" title="双击或点击全屏查看" style="padding:2px 8px;font-size:14px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;line-height:1;">⛶</button>
|
|
459
|
+
</div>`;F.innerHTML=V+G,Object.assign(F.style,{display:"block",padding:"16px",borderRadius:"var(--radius-sm)",overflow:"auto",background:"rgba(15, 23, 42, 0.6)",border:"1px solid rgba(99, 102, 241, 0.2)",minHeight:"200px",cursor:"pointer",position:"relative"}),F.setAttribute("ondblclick",`event.stopPropagation();window.__mermaidCb['${Y}'].fullscreen()`);const et=F.querySelector("svg");et&&(et.style.maxWidth="100%",et.style.height="auto",et.style.color="inherit"),console.log(`[mermaid-debug#${N}] Toolbar added, final div HTML len=${F.outerHTML.length}`)}catch(R){console.error(`[mermaid-debug#${N}] Render FAILED:`,R instanceof Error?R.message:String(R).slice(0,500)),F.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${D.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</code></pre>`}}const _=C.innerHTML;console.log(`[mermaid-debug] setFinalHtml called: totalLen=${_.length}, containsToolbar=${_.includes("mermaid-toolbar")}, containsSvgTag=${_.includes("<svg")}, containsFullscreen=${_.includes("setFullscreenSvg")}`),l(_)})()},[g,e.isStreaming]),O.useEffect(()=>{const C=h.current;if(!C||t)return;const k=s??g??"";k!==u.current&&(u.current=k,C.innerHTML=k)}),O.useEffect(()=>{const C=h.current;if(!C||t)return;C.querySelectorAll("pre").forEach(T=>{var F,D;if((F=T.parentElement)!=null&&F.classList.contains("pre-copy-wrapper"))return;const _=document.createElement("button");_.className="copy-btn",_.textContent="Copy",_.style.cssText="position:absolute;bottom:6px;right:6px;padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;opacity:0.5;transition:opacity 0.15s",_.addEventListener("mouseenter",()=>{_.style.opacity="1"}),_.addEventListener("mouseleave",()=>{_.textContent!=="Copied!"&&(_.style.opacity="0.5")}),_.addEventListener("click",async()=>{const N=T.querySelector("code"),U=(N==null?void 0:N.textContent)||T.textContent||"";try{await navigator.clipboard.writeText(U),_.textContent="Copied!",_.style.color="var(--emerald)",_.style.opacity="1",setTimeout(()=>{_.textContent="Copy",_.style.color="var(--text-muted)",_.style.opacity="0.5"},2e3)}catch{}});const E=document.createElement("div");E.className="pre-copy-wrapper",E.style.position="relative",(D=T.parentNode)==null||D.insertBefore(E,T),E.appendChild(T),E.appendChild(_)})},[g,t]),O.useEffect(()=>{if(!x)return;const C=k=>{k.key==="Escape"&&m(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[x]);const v=e.reasoning?Math.max(1,Math.round(e.reasoning.length/50)):0;return B.jsxs("div",{style:{marginBottom:16,display:"flex",justifyContent:t?"flex-end":"flex-start"},children:[B.jsxs("div",{style:{maxWidth:"80%",padding:"10px 14px",borderRadius:t?"var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-lg)":"var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg)",background:t?"linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%)":"var(--bg-tertiary)",color:t?"white":"var(--text-primary)",fontSize:14,lineHeight:1.6,border:t?"none":"1px solid var(--border)",boxShadow:t?"0 2px 12px rgba(99, 102, 241, 0.2)":"0 1px 4px rgba(0,0,0,0.1)"},children:[e.reasoning&&!t&&B.jsxs("div",{style:{marginBottom:8},children:[B.jsxs("div",{onClick:()=>a(!i),style:{cursor:"pointer",display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--cyan)",userSelect:"none"},children:[B.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:i?"rotate(90deg)":"rotate(0)"},children:"▸"}),B.jsx("span",{style:{fontWeight:500},children:"💭 Thinking"}),!e.isStreaming&&v>0&&B.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:["(",v,"s)"]})]}),i&&B.jsx("div",{ref:c,onScroll:p,style:{marginTop:4,padding:8,background:"var(--cyan-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(34, 211, 238, 0.15)",maxHeight:200,overflow:"auto"},className:"markdown-body reasoning-block",dangerouslySetInnerHTML:{__html:(()=>{try{return de.parse(Wv(e.reasoning||"",{escapeHtml:!0}),{async:!1})}catch{return(e.reasoning||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}})()}})]}),t?B.jsx("div",{style:{whiteSpace:"pre-wrap"},children:e.content}):B.jsx("div",{ref:h,className:"markdown-body"}),(()=>{const C=s??g??"";return!t&&!e.isStreaming&&C&&C.includes("mermaid-diagram")&&console.log(`[mermaid-debug] RENDER: finalHtml=${!!s}, hasToolbar=${C.includes("mermaid-toolbar")}, hasSvg=${C.includes("<svg")}, htmlLen=${C.length}`),null})(),e.isStreaming&&!e.reasoning&&B.jsx("span",{className:"cursor",children:"▌"}),e.toolCalls&&e.toolCalls.length>0&&B.jsx("div",{style:{marginTop:8},children:e.toolCalls.map(C=>B.jsx(M7,{toolCall:C},C.id))})]}),(x&&console.log(`[mermaid-debug] Fullscreen modal RENDERING: svgLen=${x.length}`),null),x&&B.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.85)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>m(null),children:B.jsxs("div",{style:{maxWidth:"90vw",maxHeight:"90vh",background:"#0d1117",borderRadius:"var(--radius-lg)",padding:"24px",border:"1px solid rgba(99, 102, 241, 0.3)",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.5)",overflow:"auto",cursor:"default"},onClick:C=>C.stopPropagation(),children:[B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[B.jsx("span",{style:{fontSize:13,color:"var(--text-muted)",fontWeight:500},children:"📊 Architecture Diagram"}),B.jsx("button",{onClick:()=>{const C=new Blob([x],{type:"image/svg+xml"}),k=URL.createObjectURL(C),T=document.createElement("a");T.href=k,T.download=`diagram-${Date.now()}.svg`,document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(k)},style:{padding:"4px 14px",fontSize:12,background:"var(--accent)",color:"white",border:"none",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"Save SVG"}),B.jsx("button",{onClick:()=>m(null),style:{padding:"4px 14px",fontSize:12,background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"✕ Close (ESC)"})]}),B.jsx("div",{dangerouslySetInnerHTML:{__html:x}}),B.jsx("div",{style:{marginTop:8,textAlign:"center",fontSize:11,color:"var(--text-muted)"},children:"Click outside or press ESC to close"})]})})]})}function B7(e){const t=e.trim();if((t.startsWith("{")||t.startsWith("["))&&t.length>2)try{const i=JSON.parse(t);return{html:JSON.stringify(i,null,2),isJson:!0}}catch{}return{html:e.replace(/\n{4,}/g,`
|
|
460
|
+
|
|
461
|
+
`),isJson:!1}}function E7(e){try{const t=JSON.parse(e);if(t.command)return t.command}catch{}return""}function L7(e){return e.name==="Shell"||e.name==="Bash"}const A7=({children:e,style:t})=>B.jsx("span",{style:{fontSize:11,fontFamily:"'JetBrains Mono', 'Fira Code', Consolas, monospace",...t},children:e});function M7({toolCall:e}){const{color:t,bg:i,border:a,icon:s}=e.riskLevel==="dangerous"?{color:"var(--rose)",bg:"var(--rose-soft)",border:"rgba(244, 63, 94, 0.25)",icon:"⚠"}:e.riskLevel==="moderate"?{color:"var(--orange)",bg:"var(--orange-soft)",border:"rgba(249, 115, 22, 0.25)",icon:"⚡"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",border:"rgba(16, 185, 129, 0.2)",icon:"→"},l=e.result!==void 0,c=O.useRef(null),h=L7(e),u=O.useMemo(()=>{if(!e.argsPreview)return"";const m=e.argsPreview.trim();if((m.startsWith("{")||m.startsWith("["))&&m.length>2)try{const v=JSON.parse(m);return JSON.stringify(v,null,2)}catch{}return e.argsPreview},[e.argsPreview]),f=O.useMemo(()=>h?E7(e.argsPreview):"",[h,e.argsPreview]),p=O.useMemo(()=>e.result?B7(e.result):null,[e.result]);O.useEffect(()=>{const m=c.current;m&&m.querySelectorAll("[data-copy]").forEach(v=>{if(v.querySelector(".tc-copy-btn"))return;const C=document.createElement("button");C.className="tc-copy-btn",C.textContent="Copy",Object.assign(C.style,{position:"absolute",bottom:4,right:4,padding:"1px 6px",fontSize:10,background:"var(--bg-secondary)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",opacity:.5,transition:"opacity 0.15s",zIndex:1}),C.addEventListener("mouseenter",()=>{C.style.opacity="1"}),C.addEventListener("mouseleave",()=>{C.textContent!=="Copied!"&&(C.style.opacity="0.5")}),C.addEventListener("click",async()=>{const k=v.getAttribute("data-copy")||"";try{await navigator.clipboard.writeText(k),C.textContent="Copied!",C.style.color="var(--emerald)",C.style.opacity="1",setTimeout(()=>{C.textContent="Copy",C.style.color="var(--text-muted)",C.style.opacity="0.5"},2e3)}catch{}}),v.style.position="relative",v.appendChild(C)})},[l,h,f,e.stdout,e.stderr,e.result,e.argsPreview,p]);const g=(m,v)=>m.length>v?m.slice(0,v)+`
|
|
462
|
+
… (truncated)`:m,x=m=>m.replace(/^\[Shell:[^\]]*\]\n?/,"").replace(/^\[IMPORTANT[^\n]*\n?/,"").trim();return B.jsxs("div",{style:{background:i,borderRadius:"var(--radius)",padding:"8px 12px",marginBottom:6,borderLeft:`3px solid ${t}`,border:`1px solid ${a}`,borderLeftWidth:3,fontSize:12},children:[B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[B.jsx("span",{style:{color:t,fontSize:10},children:s}),B.jsx("span",{style:{fontWeight:600,color:t},children:e.name}),h&&f&&B.jsxs(A7,{style:{color:"var(--text-muted)",fontWeight:400,maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["$ ",f.length>60?f.slice(0,60)+"…":f]})]}),B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.duration!==void 0&&B.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11},children:[e.duration,"ms"]}),l&&(e.success!==!1?B.jsx("span",{style:{color:"var(--emerald)",fontSize:11,fontWeight:700},children:"✓"}):B.jsx("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:700},children:"✗"}))]})]}),!h&&u&&B.jsx("pre",{"data-copy":u,style:{display:"block",position:"relative",marginTop:4,color:"var(--text-secondary)",fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",background:"rgba(0,0,0,0.12)",padding:"4px 8px",borderRadius:"var(--radius-sm)",maxHeight:80,overflow:"auto"},children:g(u,300)}),B.jsx("div",{ref:c,style:{marginTop:4},children:l?h?B.jsxs("div",{children:[e.stdout&&(()=>{const m=x(e.stdout);return!m&&!e.stderr?B.jsx("div",{style:{padding:"4px 8px",borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.15)",color:"var(--text-muted)",fontSize:11,fontStyle:"italic"},children:e.success===!1?"(command produced no output)":"(completed successfully, no output)"}):m?B.jsx("div",{"data-copy":m,style:{position:"relative",padding:6,borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.18)",color:"var(--text-secondary)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:240,overflow:"auto",lineHeight:1.5},children:g(m,3e3)}):null})(),e.stderr&&B.jsxs("div",{"data-copy":e.stderr,style:{position:"relative",marginTop:4,padding:"6px 8px",borderRadius:"var(--radius-sm)",background:"rgba(244, 63, 94, 0.08)",color:"var(--rose)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:120,overflow:"auto",lineHeight:1.5,border:"1px solid rgba(244, 63, 94, 0.12)"},children:[B.jsx("span",{style:{opacity:.6,marginRight:6},children:"[stderr]"}),g(e.stderr,1500)]})]}):B.jsx("div",{"data-copy":e.result??"",style:{position:"relative",padding:6,background:p!=null&&p.isJson?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.2)",borderRadius:"var(--radius-sm)",color:e.success===!1?"var(--rose)":p!=null&&p.isJson?"var(--sky)":"var(--text-secondary)",fontSize:11,fontFamily:p!=null&&p.isJson?"'JetBrains Mono', 'Fira Code', Consolas, monospace":"inherit",whiteSpace:"pre-wrap",maxHeight:200,overflow:"auto",lineHeight:1.5},children:g(p?p.html:e.result??"",2e3)}):null})]})}function R7(){const{sessions:e,isLoading:t,fetchSessions:i,createSession:a,deleteSession:s,deleteAllSessions:l,clearSession:c}=aM(),h=os(),{setCurrentSession:u,refreshStatus:f,clearMessageCache:p}=xd(),[g,x]=O.useState(null),[m,v]=O.useState(""),[C,k]=O.useState(null),[T,_]=O.useState(!1);O.useEffect(()=>{i()},[i]);const E=async()=>{const Y=await a();u({id:Y.id,name:Y.name??"New Session",messageCount:0}),h(`/chat/${Y.id}`)},F=async Y=>{k(null);try{await s(Y),p(Y),f()}catch(G){console.error("Failed to delete session:",G),i()}},D=async()=>{_(!1);try{await l(),p("__default__"),f()}catch(Y){console.error("Failed to delete all sessions:",Y),i()}},N=async Y=>{try{await c(Y),p(Y),f()}catch(G){console.error("Failed to clear session:",G)}},U=async Y=>{if(!m.trim()){x(null);return}try{await jt.renameSession(Y,m.trim()),x(null),await i(),f()}catch{}},R=async(Y,G)=>{try{await jt.activateSession(Y),u({id:G.id,name:G.name??G.id.slice(0,8),messageCount:G.messageCount??0}),h(`/chat/${Y}`)}catch{}},V=Y=>{x(Y.id),v(Y.name??"")};return B.jsxs("div",{style:{padding:24},children:[B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[B.jsx("h2",{style:{fontSize:18,fontWeight:600},children:"Sessions"}),B.jsxs("div",{style:{display:"flex",gap:8},children:[e.length>0&&(T?B.jsxs(B.Fragment,{children:[B.jsx("button",{className:"btn-ghost",onClick:D,style:{fontSize:12,padding:"4px 10px",color:"var(--dangerous)"},children:"Confirm Delete All"}),B.jsx("button",{className:"btn-ghost",onClick:()=>_(!1),style:{fontSize:12,padding:"4px 10px"},children:"Cancel"})]}):B.jsx("button",{className:"btn-ghost",onClick:()=>_(!0),style:{fontSize:12,padding:"4px 10px"},children:"Delete All"})),B.jsx("button",{className:"btn-primary",onClick:E,children:"New Session"})]})]}),t?B.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"Loading..."}):e.length===0?B.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"No sessions yet"}):B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(Y=>B.jsxs("div",{style:{padding:"12px 16px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",cursor:"pointer",transition:"border-color 0.15s"},onClick:()=>R(Y.id,Y),onMouseEnter:G=>G.currentTarget.style.borderColor="var(--accent)",onMouseLeave:G=>G.currentTarget.style.borderColor="var(--border)",children:[B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g===Y.id?B.jsx("input",{value:m,onChange:G=>v(G.target.value),onKeyDown:G=>{G.key==="Enter"&&U(Y.id),G.key==="Escape"&&x(null)},onBlur:()=>U(Y.id),onClick:G=>G.stopPropagation(),autoFocus:!0,style:{flex:1,fontSize:14,fontWeight:500,padding:"2px 6px"}}):B.jsx("span",{style:{fontWeight:500,fontSize:14,flex:1},children:Y.name??Y.id.slice(0,8)}),B.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},onClick:G=>G.stopPropagation(),children:[B.jsx("button",{className:"btn-ghost",onClick:()=>V(Y),style:{fontSize:11,padding:"2px 6px"},title:"Rename",children:"✎"}),B.jsx("button",{className:"btn-ghost",onClick:()=>N(Y.id),style:{fontSize:11,padding:"2px 6px"},title:"Clear messages",children:"⊘"}),C===Y.id?B.jsxs(B.Fragment,{children:[B.jsx("button",{className:"btn-ghost",onClick:()=>F(Y.id),style:{fontSize:11,padding:"2px 6px",color:"var(--dangerous)"},children:"Confirm"}),B.jsx("button",{className:"btn-ghost",onClick:()=>k(null),style:{fontSize:11,padding:"2px 6px"},children:"Cancel"})]}):B.jsx("button",{className:"btn-ghost",onClick:()=>k(Y.id),style:{fontSize:11,padding:"2px 6px"},title:"Delete",children:"✕"})]})]}),B.jsxs("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:4},children:[Y.agentName??Y.agentType??"main"," · ",Y.messageCount??0," messages · ",new Date(Y.createdAt).toLocaleString()]})]},Y.id))})]})}const wg=[{name:"DeepSeek",apiKeyEnvVar:"DEEPSEEK_API_KEY",baseUrlEnvVar:"DEEPSEEK_BASE_URL",defaultBaseUrl:"https://api.deepseek.com/v1"},{name:"智谱 (Zhipu)",apiKeyEnvVar:"ZHIPU_API_KEY",baseUrlEnvVar:"ZHIPU_BASE_URL",defaultBaseUrl:"https://open.bigmodel.cn/api/paas/v4"},{name:"Kimi (Moonshot)",apiKeyEnvVar:"KIMI_API_KEY",baseUrlEnvVar:"KIMI_BASE_URL",defaultBaseUrl:"https://api.moonshot.cn/v1"},{name:"OpenAI",apiKeyEnvVar:"OPENAI_API_KEY",baseUrlEnvVar:"OPENAI_BASE_URL",defaultBaseUrl:"https://api.openai.com/v1"},{name:"Claude",apiKeyEnvVar:"CLAUDE_API_KEY",baseUrlEnvVar:"CLAUDE_BASE_URL",defaultBaseUrl:"https://api.anthropic.com/v1"},{name:"MiniMax",apiKeyEnvVar:"MINIMAX_API_KEY",baseUrlEnvVar:"MINIMAX_BASE_URL",defaultBaseUrl:"https://api.minimaxi.com/v1"},{name:"Ollama",apiKeyEnvVar:"",baseUrlEnvVar:"OLLAMA_BASE_URL",defaultBaseUrl:"http://localhost:11434"},{name:"NVIDIA NIM",apiKeyEnvVar:"NVIDIA_API_KEY",baseUrlEnvVar:"NVIDIA_BASE_URL",defaultBaseUrl:"https://integrate.api.nvidia.com/v1"},{name:"Qwen",apiKeyEnvVar:"QWEN_API_KEY",baseUrlEnvVar:"QWEN_BASE_URL",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1"},{name:"小米 MiMo",apiKeyEnvVar:"MIMO_API_KEY",baseUrlEnvVar:"MIMO_BASE_URL",defaultBaseUrl:"https://api.xiaomimimo.com/v1"},{name:"SiliconFlow",apiKeyEnvVar:"SILICONFLOW_API_KEY",baseUrlEnvVar:"SILICONFLOW_BASE_URL",defaultBaseUrl:"https://api.siliconflow.cn/v1"}];function F7(){const[e,t]=O.useState(null),[i,a]=O.useState({}),[s,l]=O.useState("safe_only"),[c,h]=O.useState(!1),[u,f]=O.useState(!1),[p,g]=O.useState(new Set),[x,m]=O.useState([]),[v,C]=O.useState(!1),[k,T]=O.useState({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),[_,E]=O.useState(""),[F,D]=O.useState(!1),[N,U]=O.useState("local"),[R,V]=O.useState("tiny"),[Y,G]=O.useState("auto"),[et,J]=O.useState(""),[q,j]=O.useState("edge"),[A,H]=O.useState("zh-CN-XiaoxiaoNeural"),[z,$]=O.useState(0),[Q,I]=O.useState(!1),[it,ut]=O.useState(!1);O.useEffect(()=>{(async()=>{var W;try{const ct=await jt.getSettings();t(ct);const Ct={};for(const Ft of wg)Ft.apiKeyEnvVar&&(Ct[Ft.apiKeyEnvVar]=ct.env[Ft.apiKeyEnvVar]??""),Ft.baseUrlEnvVar&&(Ct[Ft.baseUrlEnvVar]=ct.env[Ft.baseUrlEnvVar]??"");a(Ct),l(((W=ct.preferences)==null?void 0:W.approvalMode)??"safe_only"),ct.customModels&&m(ct.customModels)}catch{}})()},[]),O.useEffect(()=>{(async()=>{try{const W=await jt.getAudioSettings();if(W.stt&&(U(W.stt.provider??"local"),V(W.stt.model??"tiny"),G(W.stt.language??"auto"),J(W.stt.openaiApiKey??"")),W.tts){j(W.tts.provider??"edge"),H(W.tts.voice??"zh-CN-XiaoxiaoNeural");const ct=W.tts.rate??"+0%",Ct=parseInt(ct,10);$(isNaN(Ct)?0:Ct)}}catch{}})()},[]);const dt=W=>{g(ct=>{const Ct=new Set(ct);return Ct.has(W)?Ct.delete(W):Ct.add(W),Ct})},yt=async()=>{var W,ct;h(!0),f(!1);try{const Ct={};for(const[Jt,me]of Object.entries(i)){const Ht=(e==null?void 0:e.env[Jt])??"";me!==Ht&&(Ct[Jt]=me)}const Ft={};if(s!==(((W=e==null?void 0:e.preferences)==null?void 0:W.approvalMode)??"safe_only")&&(Ft.approvalMode=s),Object.keys(Ct).length>0||Object.keys(Ft).length>0){await jt.updateSettings({env:Ct,preferences:Ft});const Jt=await jt.getSettings();t(Jt);const me={};for(const Ht of wg)Ht.apiKeyEnvVar&&(me[Ht.apiKeyEnvVar]=Jt.env[Ht.apiKeyEnvVar]??""),Ht.baseUrlEnvVar&&(me[Ht.baseUrlEnvVar]=Jt.env[Ht.baseUrlEnvVar]??"");a(me),l(((ct=Jt.preferences)==null?void 0:ct.approvalMode)??"safe_only")}f(!0)}catch{}h(!1)},xt=W=>{a(ct=>({...ct,[W]:""}))},Rt=async()=>{if(!k.id||!k.name||!k.baseUrl){E("Model ID, Name, and Base URL are required");return}D(!0),E("");try{const W=await jt.addCustomModel({id:k.id,name:k.name,baseUrl:k.baseUrl,apiKey:k.apiKey||void 0,contextLength:k.contextLength??128e3,supportsTools:k.supportsTools??!1,isReasoningModel:k.isReasoningModel??!1});if(W.success){const ct=await jt.getSettings();ct.customModels&&m(ct.customModels),T({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),C(!1)}else E(W.error??"Failed to add model")}catch{E("Failed to add custom model")}D(!1)},Ot=async W=>{try{await jt.removeCustomModel(W),m(ct=>ct.filter(Ct=>Ct.id!==W))}catch{}},Pt=async()=>{I(!0),ut(!1);try{const W=z>=0?`+${z}%`:`${z}%`;await jt.updateAudioSettings({stt:{provider:N,model:R,language:Y,...N==="openai"?{openaiApiKey:et}:{}},tts:{provider:q,...q==="edge"?{voice:A}:{},rate:W}}),ut(!0)}catch{}I(!1)};return B.jsxs("div",{style:{padding:24,maxWidth:700},children:[B.jsx("h2",{style:{fontSize:18,fontWeight:600,marginBottom:20},children:"Settings"}),B.jsxs("section",{style:{marginBottom:24},children:[B.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Approval Mode"}),B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[{value:"auto",label:"Auto",desc:"Approve all tool calls automatically"},{value:"safe_only",label:"Safe Only",desc:"Auto-approve safe tools, ask for moderate/dangerous"},{value:"always_ask",label:"Always Ask",desc:"Require approval for every tool call"}].map(W=>B.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:`1px solid ${s===W.value?"var(--accent)":"var(--border)"}`,cursor:"pointer",transition:"border-color 0.15s"},children:[B.jsx("input",{type:"radio",name:"approvalMode",value:W.value,checked:s===W.value,onChange:()=>l(W.value),style:{marginTop:3}}),B.jsxs("div",{children:[B.jsx("div",{style:{fontWeight:500,fontSize:13},children:W.label}),B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:W.desc})]})]},W.value))})]}),B.jsxs("section",{style:{marginBottom:24},children:[B.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Model Provider Configuration"}),B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:wg.map(W=>{const ct=p.has(W.name),Ct=i[W.apiKeyEnvVar]??"",Ft=i[W.baseUrlEnvVar]??"",Jt=!!Ct,me=!!Ft&&Ft!==W.defaultBaseUrl;return B.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",overflow:"hidden"},children:[B.jsxs("div",{onClick:()=>dt(W.name),style:{padding:"10px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",userSelect:"none"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[B.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:ct?"rotate(90deg)":"rotate(0)"},children:"▸"}),B.jsx("span",{style:{fontWeight:500,fontSize:14},children:W.name})]}),B.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[Jt&&B.jsx("span",{style:{color:"var(--safe)",fontSize:11},children:"Key set"}),me&&B.jsx("span",{style:{color:"var(--moderate)",fontSize:11},children:"Custom URL"}),!Jt&&!me&&!ct&&B.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"Not configured"})]})]}),ct&&B.jsxs("div",{style:{padding:"4px 14px 14px",display:"flex",flexDirection:"column",gap:12},children:[W.apiKeyEnvVar&&B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key"}),B.jsxs("div",{style:{display:"flex",gap:6},children:[B.jsx("input",{type:"password",value:Ct,onChange:Ht=>a(Ae=>({...Ae,[W.apiKeyEnvVar]:Ht.target.value})),placeholder:W.apiKeyEnvVar,style:{flex:1}}),Jt&&B.jsx("button",{className:"btn-ghost",onClick:()=>xt(W.apiKeyEnvVar),style:{fontSize:11,padding:"4px 8px"},children:"Clear"})]}),B.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",W.apiKeyEnvVar]})]}),W.baseUrlEnvVar&&B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL"}),B.jsx("input",{type:"text",value:Ft,onChange:Ht=>a(Ae=>({...Ae,[W.baseUrlEnvVar]:Ht.target.value})),placeholder:W.defaultBaseUrl,style:{width:"100%"}}),B.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",W.baseUrlEnvVar]})]})]})]},W.name)})})]}),B.jsxs("section",{style:{marginBottom:24},children:[B.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Custom Models (自定义模型)"}),B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:10},children:"Add any OpenAI-compatible API endpoint as a custom model. After adding, it will appear in the model selector."}),x.length>0&&B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:10},children:x.map(W=>B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[B.jsxs("div",{children:[B.jsx("span",{style:{fontWeight:500,fontSize:13},children:W.name}),B.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:8},children:[W.id," · ",W.baseUrl]})]}),B.jsx("button",{className:"btn-ghost",onClick:()=>Ot(W.id),style:{fontSize:11,padding:"2px 8px",color:"var(--danger)"},children:"Remove"})]},W.id))}),v?B.jsxs("div",{style:{padding:16,background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[B.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:'Model ID * (unique, e.g. "my-llama-70b")'}),B.jsx("input",{type:"text",value:k.id??"",onChange:W=>T(ct=>({...ct,id:W.target.value})),placeholder:"my-llama-70b",style:{width:"100%"}})]}),B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Display Name *"}),B.jsx("input",{type:"text",value:k.name??"",onChange:W=>T(ct=>({...ct,name:W.target.value})),placeholder:"My LLaMA 70B",style:{width:"100%"}})]}),B.jsxs("div",{style:{gridColumn:"1 / -1"},children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL * (OpenAI-compatible endpoint)"}),B.jsx("input",{type:"text",value:k.baseUrl??"",onChange:W=>T(ct=>({...ct,baseUrl:W.target.value})),placeholder:"http://localhost:11434/v1",style:{width:"100%"}})]}),B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key (optional)"}),B.jsx("input",{type:"password",value:k.apiKey??"",onChange:W=>T(ct=>({...ct,apiKey:W.target.value})),placeholder:"sk-...",style:{width:"100%"}})]}),B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Context Length"}),B.jsx("input",{type:"number",value:k.contextLength??128e3,onChange:W=>T(ct=>({...ct,contextLength:Number(W.target.value)||128e3})),placeholder:"128000",style:{width:"100%"}})]})]}),B.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[B.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[B.jsx("input",{type:"checkbox",checked:k.supportsTools??!1,onChange:W=>T(ct=>({...ct,supportsTools:W.target.checked}))}),"Supports Tool Calling"]}),B.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[B.jsx("input",{type:"checkbox",checked:k.isReasoningModel??!1,onChange:W=>T(ct=>({...ct,isReasoningModel:W.target.checked}))}),"Reasoning Model"]})]}),_&&B.jsx("div",{style:{color:"var(--danger)",fontSize:12,marginTop:8},children:_}),B.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[B.jsx("button",{className:"btn-primary",onClick:Rt,disabled:F,style:{fontSize:12,padding:"4px 12px"},children:F?"Adding...":"Add Model"}),B.jsx("button",{className:"btn-ghost",onClick:()=>{C(!1),E("")},style:{fontSize:12,padding:"4px 12px"},children:"Cancel"})]})]}):B.jsx("button",{className:"btn-ghost",onClick:()=>C(!0),style:{fontSize:12},children:"+ Add Custom Model"})]}),B.jsxs("section",{style:{marginBottom:24},children:[B.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"语音设置 (Voice Settings)"}),B.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",padding:16},children:[B.jsxs("div",{style:{marginBottom:20},children:[B.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:10,color:"var(--text-primary)"},children:"STT 语音识别"}),B.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Provider"}),B.jsxs("select",{value:N,onChange:W=>U(W.target.value),style:{width:"100%",padding:"6px 8px"},children:[B.jsx("option",{value:"local",children:"本地 Whisper"}),B.jsx("option",{value:"openai",children:"OpenAI API"})]})]}),N==="local"&&B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Model"}),B.jsxs("select",{value:R,onChange:W=>V(W.target.value),style:{width:"100%",padding:"6px 8px"},children:[B.jsx("option",{value:"tiny",children:"tiny (75MB)"}),B.jsx("option",{value:"base",children:"base (142MB)"}),B.jsx("option",{value:"small",children:"small (466MB)"}),B.jsx("option",{value:"medium",children:"medium (1.5GB)"})]})]}),B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Language"}),B.jsxs("select",{value:Y,onChange:W=>G(W.target.value),style:{width:"100%",padding:"6px 8px"},children:[B.jsx("option",{value:"auto",children:"自动检测"}),B.jsx("option",{value:"zh",children:"中文"}),B.jsx("option",{value:"en",children:"English"})]})]}),N==="openai"&&B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"OpenAI API Key"}),B.jsx("input",{type:"password",value:et,onChange:W=>J(W.target.value),placeholder:"sk-...",style:{width:"100%"}})]})]})]}),B.jsx("div",{style:{height:1,background:"var(--border)",margin:"12px 0"}}),B.jsxs("div",{children:[B.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:10,color:"var(--text-primary)"},children:"TTS 语音合成"}),B.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Provider"}),B.jsxs("select",{value:q,onChange:W=>j(W.target.value),style:{width:"100%",padding:"6px 8px"},children:[B.jsx("option",{value:"edge",children:"Edge TTS (免费)"}),B.jsx("option",{value:"browser",children:"浏览器原生"})]})]}),q==="edge"&&B.jsxs("div",{children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Voice"}),B.jsxs("select",{value:A,onChange:W=>H(W.target.value),style:{width:"100%",padding:"6px 8px"},children:[B.jsx("option",{value:"zh-CN-XiaoxiaoNeural",children:"zh-CN-XiaoxiaoNeural"}),B.jsx("option",{value:"zh-CN-YunxiNeural",children:"zh-CN-YunxiNeural"}),B.jsx("option",{value:"zh-CN-XiaoyiNeural",children:"zh-CN-XiaoyiNeural"}),B.jsx("option",{value:"en-US-JennyNeural",children:"en-US-JennyNeural"}),B.jsx("option",{value:"en-US-GuyNeural",children:"en-US-GuyNeural"})]})]}),B.jsxs("div",{children:[B.jsxs("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:["Rate: ",z>=0?"+":"",z,"%"]}),B.jsx("input",{type:"range",min:-50,max:50,value:z,onChange:W=>$(Number(W.target.value)),style:{width:"100%"}})]})]})]}),B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:16},children:[B.jsx("button",{className:"btn-primary",onClick:Pt,disabled:Q,style:{fontSize:12,padding:"4px 12px"},children:Q?"Saving...":"Save Voice Settings"}),it&&B.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})]}),B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8,marginBottom:40},children:[B.jsx("button",{className:"btn-primary",onClick:yt,disabled:c,children:c?"Saving...":"Save Settings"}),u&&B.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})}function Xv(e){if(e<60)return`${e}s`;const t=Math.floor(e/60),i=e%60;return`${t}m${i.toString().padStart(2,"0")}s`}function O7(e){return new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function D7(){const e=os(),t=y2(),[i,a]=O.useState([]),[s,l]=O.useState(!0),[c,h]=O.useState(""),[u,f]=O.useState(!1),[p,g]=O.useState(null),[x,m]=O.useState(0),[v,C]=O.useState(null),k=O.useRef(null),T=O.useRef(0),_=O.useRef(""),E=O.useCallback(async()=>{try{const R=await jt.listMeetings();a(R.meetings??R??[])}catch{}finally{l(!1)}},[]);O.useEffect(()=>{E()},[E]),O.useEffect(()=>{if(!t.isRecording||!p)return;const R=t.drainFinalized();R&&R!==_.current&&(_.current=R,jt.appendMeetingTranscript(p,R).catch(()=>{}))},[t.transcript,t.isRecording,p]);const F=async()=>{try{C(null);const R=await jt.createMeeting(c||void 0),V=R.id??R.meetingId;g(V),f(!0),h(""),m(0),T.current=Date.now(),_.current="",t.startRecording(),k.current=setInterval(()=>{m(Math.floor((Date.now()-T.current)/1e3))},1e3),a(Y=>[{id:V,title:c||`会议 ${new Date().toLocaleString("zh-CN")}`,status:"recording",startTime:new Date().toISOString()},...Y])}catch{C("无法启动会议录音,请检查权限设置")}},D=async()=>{if(!p)return;const R=t.drainFinalized();if(R)try{await jt.appendMeetingTranscript(p,R)}catch{}t.stopRecording(),t.clearTranscript(),k.current&&(clearInterval(k.current),k.current=null);const V=p;f(!1),g(null);try{await jt.stopMeeting(V)}catch{}a(Y=>Y.map(G=>G.id===V?{...G,status:"completed",endTime:new Date().toISOString(),duration:Math.floor((Date.now()-T.current)/1e3)}:G)),e(`/meetings/${V}`)},N=async(R,V)=>{if(V.stopPropagation(),!!confirm("确定要删除这条会议记录吗?"))try{await jt.deleteMeeting(R),a(Y=>Y.filter(G=>G.id!==R))}catch{C("删除失败")}},U=i.filter(R=>R.status!=="recording");return B.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[B.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,background:"linear-gradient(180deg, rgba(16,185,129,0.04) 0%, transparent 100%)"},children:[B.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--emerald)"},children:"会议记录"}),!u&&B.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[B.jsx("input",{value:c,onChange:R=>h(R.target.value),placeholder:"会议标题(可选)",style:{padding:"6px 12px",background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)",fontSize:13,width:200,outline:"none"},onKeyDown:R=>{R.key==="Enter"&&F()}}),B.jsxs("button",{onClick:F,style:{padding:"6px 16px",background:"var(--emerald)",color:"white",border:"none",borderRadius:"var(--radius-sm)",fontSize:13,fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[B.jsx("span",{style:{fontSize:10},children:"●"})," New Meeting"]})]})]}),u&&B.jsxs("div",{style:{padding:"16px 20px",background:"var(--bg-secondary)",borderBottom:"1px solid var(--border)"},children:[B.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[B.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"var(--rose)",animation:"pulse 1.5s ease-in-out infinite"}}),B.jsx("span",{style:{color:"var(--rose)",fontWeight:500,fontSize:13},children:"录音中"}),B.jsx("span",{style:{color:"var(--text-muted)",fontSize:13,fontFamily:"monospace"},children:Xv(x)})]}),B.jsx("button",{onClick:D,style:{padding:"6px 16px",background:"var(--rose)",color:"white",border:"none",borderRadius:"var(--radius-sm)",fontSize:13,fontWeight:500,cursor:"pointer"},children:"停止录音"})]}),B.jsx("div",{style:{background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:12,maxHeight:200,overflow:"auto",fontSize:13,lineHeight:1.6,color:"var(--text-secondary)"},children:t.transcript||B.jsx("span",{style:{color:"var(--text-muted)"},children:"等待语音输入..."})})]}),v&&B.jsx("div",{style:{margin:"12px 20px",padding:10,background:"var(--rose-soft, rgba(244,63,94,0.1))",borderRadius:"var(--radius-sm)",color:"var(--rose)",fontSize:13,border:"1px solid rgba(244,63,94,0.2)"},children:v}),B.jsx("div",{style:{flex:1,overflow:"auto",padding:"16px 20px"},children:s?B.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:60},children:"加载中..."}):U.length===0&&!u?B.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[B.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"🎙️"}),'点击 "New Meeting" 开始录制会议']}):U.map(R=>B.jsxs("div",{onClick:()=>e(`/meetings/${R.id}`),style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s"},onMouseEnter:V=>V.currentTarget.style.borderColor="var(--accent)",onMouseLeave:V=>V.currentTarget.style.borderColor="var(--border)",children:[B.jsxs("div",{style:{flex:1,minWidth:0},children:[B.jsx("div",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R.title}),B.jsxs("div",{style:{display:"flex",gap:12,marginTop:4,fontSize:12},children:[B.jsx("span",{style:{color:"var(--text-muted)"},children:O7(R.startTime)}),R.duration!=null&&B.jsx("span",{style:{color:"var(--text-muted)"},children:Xv(R.duration)}),B.jsx("span",{style:{color:R.status==="completed"?"var(--emerald)":R.status==="error"?"var(--rose)":R.status==="summarizing"?"var(--amber, #f59e0b)":"var(--text-muted)"},children:R.status==="completed"?"已完成":R.status==="error"?"摘要失败":R.status==="summarizing"?"生成摘要...":"录音中"})]})]}),B.jsxs("div",{style:{display:"flex",gap:8,marginLeft:12},children:[B.jsx("button",{className:"btn-ghost",onClick:()=>e(`/meetings/${R.id}`),style:{fontSize:12},children:"查看"}),B.jsx("button",{className:"btn-ghost",onClick:V=>N(R.id,V),style:{fontSize:12,color:"var(--rose)"},children:"删除"})]})]},R.id))}),B.jsx("style",{children:`
|
|
463
|
+
@keyframes pulse {
|
|
464
|
+
0%, 100% { opacity: 1; }
|
|
465
|
+
50% { opacity: 0.4; }
|
|
466
|
+
}
|
|
467
|
+
`})]})}function $7(e){if(e<60)return`${e}s`;const t=Math.floor(e/60),i=e%60;return`${t}m${i.toString().padStart(2,"0")}s`}function z7(e,t){const i=new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});if(!t)return i;const a=new Date(t).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${i} — ${a}`}function N7(e){const t=[],i=e.split(`
|
|
468
|
+
`);let a="",s=[];for(const l of i){const c=l.match(/^###\s+(.+)/);c?(a&&t.push({title:a,content:s.join(`
|
|
469
|
+
`).trim()}),a=c[1],s=[]):s.push(l)}return a&&t.push({title:a,content:s.join(`
|
|
470
|
+
`).trim()}),t}const q7={recording:"录音中",summarizing:"生成摘要...",completed:"已完成",error:"处理失败"};function I7(){const{id:e}=l2(),t=os(),[i,a]=O.useState(null),[s,l]=O.useState(!0),[c,h]=O.useState(null),[u,f]=O.useState(!1),[p,g]=O.useState(null),[x,m]=O.useState(null),[v,C]=O.useState(null),[k,T]=O.useState(!1),_=O.useRef(null),E=O.useRef(null),F=async()=>{if(e)try{const V=await jt.getMeeting(e);a(V.meeting??V)}catch{h("加载会议详情失败")}finally{l(!1)}};O.useEffect(()=>{F()},[e]),O.useEffect(()=>{var Y,G;if(!i||!e||i.status!=="completed"||i.aiSummary||k||!((Y=i.transcript)!=null&&Y.trim())&&!((G=i.liveTranscript)!=null&&G.trim()))return;(async()=>{T(!0);try{const et=await jt.summarizeMeeting(e,{onStatus:()=>{}});a(J=>J&&{...J,aiSummary:et})}catch{}finally{T(!1)}})()},[i==null?void 0:i.status,i==null?void 0:i.aiSummary,e]),O.useEffect(()=>i?(["summarizing","recording"].includes(i.status)||i.status==="completed"&&!i.aiSummary?E.current=setInterval(F,3e3):E.current&&(clearInterval(E.current),E.current=null),()=>{E.current&&(clearInterval(E.current),E.current=null)}):void 0,[i==null?void 0:i.status,i==null?void 0:i.aiSummary,k]);const D=async()=>{if(!u){f(!0);return}try{await jt.deleteMeeting(e),t("/meetings")}catch{h("删除失败"),f(!1)}},N=async V=>{if(e){g(V);try{const Y=await jt.exportMeeting(e,V),G=URL.createObjectURL(Y),et=document.createElement("a");et.href=G,et.download=`${(i==null?void 0:i.title)||"meeting"}.${V}`,document.body.appendChild(et),et.click(),document.body.removeChild(et),URL.revokeObjectURL(G)}catch(Y){h(Y.message||"导出失败")}finally{g(null)}}},U=async V=>{if(!e)return;let Y=null;const G=V==="pptx"?"pptx":"docx",et=V==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":"application/vnd.openxmlformats-officedocument.wordprocessingml.document";try{"showSaveFilePicker"in window&&(Y=await window.showSaveFilePicker({suggestedName:`${(i==null?void 0:i.title)||"meeting"}-AI.${G}`,types:[{description:V==="pptx"?"PowerPoint 演示文稿":"Word 文档",accept:{[et]:[`.${G}`]}}]}))}catch(q){if(q.name==="AbortError")return;Y=null}m(V),C("正在启动AI导出...");const J=new AbortController;_.current=J;try{const q=await jt.exportMeetingAI(e,V,{signal:J.signal,onStatus:j=>{C(j.message||"处理中...")},onError:j=>{h(j)}});if(Y){const j=await Y.createWritable();await j.write(q),await j.close()}else{const j=URL.createObjectURL(q),A=document.createElement("a");A.href=j,A.download=`${(i==null?void 0:i.title)||"meeting"}-AI.${G}`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(j)}}catch(q){q.name!=="AbortError"&&h(q.message||"AI导出失败")}finally{m(null),C(null),_.current=null}};if(s)return B.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-muted)",fontSize:14},children:"加载中..."});if(c||!i)return B.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:12},children:[B.jsx("div",{style:{color:"var(--rose)",fontSize:14},children:c||"会议不存在"}),B.jsx("button",{className:"btn-ghost",onClick:()=>t("/meetings"),children:"返回会议列表"})]});const R=i.aiSummary?N7(i.aiSummary):[];return B.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[B.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",background:"linear-gradient(180deg, rgba(16,185,129,0.04) 0%, transparent 100%)"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[B.jsx("button",{className:"btn-ghost",onClick:()=>t("/meetings"),style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:"← 返回"}),B.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.title})]}),B.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i.status==="completed"&&B.jsxs(B.Fragment,{children:[B.jsx("button",{className:"btn-ghost",onClick:()=>N("docx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1},children:p==="docx"?"导出中...":"📄 Word"}),B.jsx("button",{className:"btn-ghost",onClick:()=>N("pptx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1},children:p==="pptx"?"导出中...":"📊 PPT"}),B.jsx("div",{style:{width:1,height:16,background:"var(--border)",margin:"0 4px"}}),B.jsx("button",{className:"btn-ghost",onClick:()=>U("docx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1,color:x?void 0:"#6366f1"},title:"由AI Agent设计生成精美Word文档",children:x==="docx"?v||"AI生成中...":"✨ AI Word"}),B.jsx("button",{className:"btn-ghost",onClick:()=>U("pptx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1,color:x?void 0:"#6366f1"},title:"由AI Agent设计生成精美PPT文档",children:x==="pptx"?v||"AI生成中...":"✨ AI PPT"})]}),B.jsx("button",{onClick:D,style:{padding:"6px 14px",background:u?"var(--rose)":"transparent",color:u?"white":"var(--rose)",border:u?"none":"1px solid var(--rose)",borderRadius:"var(--radius-sm)",fontSize:12,cursor:"pointer",transition:"all 0.15s"},onBlur:()=>f(!1),children:u?"确认删除":"删除"})]})]}),B.jsxs("div",{style:{flex:1,overflow:"auto",padding:"20px"},children:[x&&v&&B.jsxs("div",{style:{marginBottom:16,padding:"10px 16px",background:"linear-gradient(90deg, rgba(99,102,241,0.08) 0%, rgba(99,102,241,0.03) 100%)",border:"1px solid rgba(99,102,241,0.2)",borderRadius:"var(--radius)",fontSize:13,color:"#6366f1",display:"flex",alignItems:"center",gap:8},children:[B.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#6366f1",animation:"pulse 1.5s ease-in-out infinite"}}),v,B.jsx("style",{children:"@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }"})]}),B.jsxs("div",{style:{display:"flex",gap:16,marginBottom:20,fontSize:13,color:"var(--text-muted)"},children:[B.jsx("span",{children:z7(i.startTime,i.endTime)}),i.duration!=null&&B.jsx("span",{style:{color:"var(--emerald)"},children:$7(i.duration)}),B.jsx("span",{style:{color:i.status==="completed"?"var(--emerald)":i.status==="error"?"var(--rose)":"var(--text-muted)"},children:q7[i.status]??i.status})]}),i.summary&&B.jsxs("div",{style:{marginBottom:20},children:[B.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"AI 摘要"}),B.jsx("div",{style:{padding:16,background:"linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(99,102,241,0.06) 100%)",border:"1px solid rgba(16,185,129,0.2)",borderRadius:"var(--radius)",fontSize:14,lineHeight:1.7,color:"var(--text-primary)"},children:i.summary})]}),B.jsxs("div",{style:{marginBottom:20},children:[B.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"会议总结"}),!i.aiSummary&&(k||i.status==="completed")&&B.jsxs("div",{style:{padding:16,background:"linear-gradient(90deg, rgba(99,102,241,0.06) 0%, rgba(99,102,241,0.02) 100%)",border:"1px solid rgba(99,102,241,0.15)",borderRadius:"var(--radius)",fontSize:13,color:"#6366f1",display:"flex",alignItems:"center",gap:8},children:[B.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#6366f1",animation:"pulse 1.5s ease-in-out infinite"}}),"正在生成会议总结..."]}),R.length>0&&B.jsx("div",{style:{padding:16,background:"linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(16,185,129,0.04) 100%)",border:"1px solid rgba(99,102,241,0.15)",borderRadius:"var(--radius)"},children:R.map((V,Y)=>{const et={会议概述:"#10B981",关键要点:"#6366F1",会议决议:"#F59E0B",待办事项:"#EF4444"}[V.title]||"var(--text-secondary)";return B.jsxs("div",{style:Y>0?{marginTop:14,paddingTop:14,borderTop:"1px solid var(--border)"}:{},children:[B.jsx("div",{style:{fontSize:12,fontWeight:600,color:et,marginBottom:6},children:V.title}),B.jsx("div",{style:{fontSize:13,lineHeight:1.8,color:"var(--text-primary)",whiteSpace:"pre-wrap"},children:V.content})]},Y)})}),!i.aiSummary&&!k&&i.status!=="completed"&&B.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:"会议结束后自动生成总结"})]}),B.jsxs("div",{children:[B.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"完整转录"}),B.jsx("div",{style:{padding:16,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",fontSize:13,lineHeight:1.8,color:"var(--text-secondary)",maxHeight:"calc(100vh - 340px)",overflow:"auto",whiteSpace:"pre-wrap"},children:i.status==="summarizing"?B.jsx("span",{style:{color:"var(--text-muted)"},children:"正在生成摘要,请稍候..."}):i.status==="recording"?B.jsx("span",{style:{color:"var(--text-muted)"},children:"录音进行中..."}):i.transcript?i.transcript:B.jsx("span",{style:{color:"var(--text-muted)"},children:"暂无转录内容"})})]})]})]})}const _g={fileName:"",alwaysApply:!0,paths:"",body:""};function j7(){const[e,t]=O.useState([]),[i,a]=O.useState(!0),[s,l]=O.useState(null),[c,h]=O.useState(!1),[u,f]=O.useState(null),[p,g]=O.useState(_g),[x,m]=O.useState(""),[v,C]=O.useState(!1),[k,T]=O.useState(null),[_,E]=O.useState(!1),[F,D]=O.useState(new Set),N=O.useCallback(async()=>{a(!0),l(null);try{const q=await jt.listRules();t(q)}catch(q){l(q instanceof Error?q.message:"Failed to load rules")}finally{a(!1)}},[]);O.useEffect(()=>{N()},[N]);const U=q=>{D(j=>{const A=new Set(j);return A.has(q)?A.delete(q):A.add(q),A})},R=()=>{f(null),g(_g),m(""),h(!0)},V=q=>{f(q),g({fileName:q.name,alwaysApply:q.alwaysApply,paths:q.paths.join(", "),body:q.body}),m(""),h(!0)},Y=()=>{h(!1),f(null),g(_g),m("")},G=q=>q.split(",").map(j=>j.trim()).filter(j=>j.length>0),et=async()=>{if(m(""),!p.fileName.trim()){m("Rule name is required");return}if(!p.body.trim()){m("Rule content is required");return}const q=G(p.paths);if(!p.alwaysApply&&q.length===0){m("Conditional rules must have at least one file pattern");return}C(!0);try{if(u){const j=await jt.updateRule(u.fileName,{alwaysApply:p.alwaysApply,paths:q,body:p.body});if(!j||!j.success){m((j==null?void 0:j.error)??"Failed to update rule"),C(!1);return}}else{const j=await jt.createRule({fileName:p.fileName,alwaysApply:p.alwaysApply,paths:q,body:p.body});if(!j||!j.success){m((j==null?void 0:j.error)??"Failed to create rule"),C(!1);return}}await N(),Y()}catch(j){m(j instanceof Error?j.message:"Failed to save rule"),C(!1)}},J=async()=>{if(k){E(!0);try{const q=await jt.deleteRule(k.fileName);q.success?(await N(),T(null)):m(q.error??"Failed to delete rule")}catch(q){m(q instanceof Error?q.message:"Failed to delete rule")}E(!1)}};return B.jsxs("div",{style:{padding:24,maxWidth:800},children:[B.jsx("h2",{style:{fontSize:18,fontWeight:600,marginBottom:8},children:"Rules"}),B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:16},children:"Rules are markdown files that provide instructions to the AI agent. Always-on rules are loaded in every session; conditional rules are loaded only when editing files that match the path patterns."}),!c&&B.jsx("div",{style:{marginBottom:16},children:B.jsx("button",{className:"btn-ghost",onClick:R,style:{fontSize:12},children:"+ New Rule"})}),s&&B.jsx("div",{style:{color:"var(--danger)",fontSize:13,padding:"10px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--danger)",marginBottom:16},children:s}),i&&B.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",padding:16},children:"Loading rules..."}),!i&&e.length===0&&!c&&B.jsxs("div",{style:{padding:32,textAlign:"center",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[B.jsx("div",{style:{fontSize:14,color:"var(--text-secondary)"},children:"No rules yet"}),B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:4},children:"Create your first rule to provide instructions to the AI agent."})]}),!i&&e.length>0&&!c&&B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:e.map(q=>{const j=F.has(q.fileName);return B.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",overflow:"hidden"},children:[B.jsxs("div",{style:{padding:"10px 14px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[B.jsxs("div",{onClick:()=>U(q.fileName),style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",userSelect:"none",flex:1,minWidth:0},children:[B.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:j?"rotate(90deg)":"rotate(0)"},children:"▸"}),B.jsx("span",{style:{fontWeight:500,fontSize:14},children:q.name}),B.jsx("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:10,background:q.alwaysApply?"rgba(16,185,129,0.12)":"rgba(245,158,11,0.12)",color:q.alwaysApply?"var(--emerald)":"var(--amber)"},children:q.alwaysApply?"Always":"Conditional"}),!q.alwaysApply&&q.paths.length>0&&B.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.paths.join(", ")})]}),B.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[B.jsx("button",{className:"btn-ghost",onClick:()=>V(q),style:{fontSize:11,padding:"2px 8px"},children:"Edit"}),B.jsx("button",{className:"btn-ghost",onClick:()=>T(q),style:{fontSize:11,padding:"2px 8px",color:"var(--danger)"},children:"Delete"})]})]}),j&&B.jsxs("div",{style:{padding:"4px 14px 14px",borderTop:"1px solid var(--border)"},children:[q.paths.length>0&&B.jsxs("div",{style:{marginBottom:10,marginTop:8},children:[B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:6},children:"Applies to:"}),B.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:q.paths.map((A,H)=>B.jsx("span",{style:{fontSize:11,padding:"2px 8px",background:"var(--bg-tertiary)",borderRadius:"var(--radius)",color:"var(--text-secondary)",fontFamily:"monospace"},children:A},H))})]}),B.jsx("pre",{style:{fontSize:13,color:"var(--text-secondary)",background:"var(--bg-tertiary)",padding:12,borderRadius:"var(--radius)",maxHeight:300,overflow:"auto",whiteSpace:"pre-wrap",margin:0,fontFamily:"monospace"},children:q.body})]})]},q.fileName)})}),c&&B.jsxs("div",{style:{padding:16,background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[B.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:12,color:"var(--text-secondary)"},children:u?"Edit Rule":"Create Rule"}),B.jsxs("div",{style:{marginBottom:14},children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Rule Name *"}),B.jsx("input",{type:"text",value:p.fileName,onChange:q=>g(j=>({...j,fileName:q.target.value})),placeholder:"my-rule",disabled:!!u,style:{width:"100%",opacity:u?.6:1}}),B.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:u?`File: ${u.fileName}`:"Will be saved as <name>.md (auto-appended)"})]}),B.jsxs("div",{style:{marginBottom:14},children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:6,display:"block"},children:"Apply Type *"}),B.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[{value:!0,label:"Always Apply",desc:"Rule is always loaded in every session"},{value:!1,label:"Conditional",desc:"Rule is loaded only when editing matching files"}].map(q=>B.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 14px",background:"var(--bg-tertiary)",borderRadius:"var(--radius)",border:`1px solid ${p.alwaysApply===q.value?"var(--accent)":"var(--border)"}`,cursor:"pointer",transition:"border-color 0.15s"},children:[B.jsx("input",{type:"radio",name:"alwaysApply",checked:p.alwaysApply===q.value,onChange:()=>g(j=>({...j,alwaysApply:q.value})),style:{marginTop:3}}),B.jsxs("div",{children:[B.jsx("div",{style:{fontWeight:500,fontSize:13},children:q.label}),B.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:q.desc})]})]},String(q.value)))})]}),!p.alwaysApply&&B.jsxs("div",{style:{marginBottom:14},children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"File Patterns *"}),B.jsx("input",{type:"text",value:p.paths,onChange:q=>g(j=>({...j,paths:q.target.value})),placeholder:"src/**/*.ts, src/**/*.tsx",style:{width:"100%"}}),B.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:"Comma-separated glob patterns (e.g. src/**/*.ts, *.py)"})]}),B.jsxs("div",{style:{marginBottom:14},children:[B.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Rule Content *"}),B.jsx("textarea",{value:p.body,onChange:q=>g(j=>({...j,body:q.target.value})),placeholder:"Write the rule instructions in Markdown...",style:{width:"100%",minHeight:220,padding:10,fontFamily:"monospace",fontSize:13,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--text-primary)",resize:"vertical"}}),B.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:"Markdown content sent to the AI agent when the rule is active"})]}),x&&B.jsx("div",{style:{color:"var(--danger)",fontSize:12,marginBottom:10},children:x}),B.jsxs("div",{style:{display:"flex",gap:8},children:[B.jsx("button",{className:"btn-primary",onClick:et,disabled:v,style:{fontSize:12,padding:"4px 12px"},children:v?"Saving...":u?"Update Rule":"Create Rule"}),B.jsx("button",{className:"btn-ghost",onClick:Y,style:{fontSize:12,padding:"4px 12px"},children:"Cancel"})]})]}),k&&B.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:999,display:"flex",alignItems:"center",justifyContent:"center"},onClick:()=>!_&&T(null),children:B.jsxs("div",{onClick:q=>q.stopPropagation(),style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",padding:24,maxWidth:400,width:"90%"},children:[B.jsx("h3",{style:{fontSize:16,fontWeight:600,marginBottom:8},children:"Delete Rule?"}),B.jsxs("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:0,marginBottom:16},children:["Are you sure you want to delete “",k.name,"”? This action cannot be undone."]}),B.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[B.jsx("button",{className:"btn-ghost",onClick:()=>T(null),disabled:_,style:{fontSize:12,padding:"4px 12px"},children:"Cancel"}),B.jsx("button",{className:"btn-primary",onClick:J,disabled:_,style:{fontSize:12,padding:"4px 12px",background:"var(--danger)",borderColor:"var(--danger)"},children:_?"Deleting...":"Delete"})]})]})})]})}mA.createRoot(document.getElementById("root")).render(B.jsx(oA.StrictMode,{children:B.jsx(H3,{children:B.jsx(tM,{children:B.jsx(x3,{children:B.jsxs(jr,{path:"/",element:B.jsx(iM,{}),children:[B.jsx(jr,{index:!0,element:B.jsx(g3,{to:"/chat",replace:!0})}),B.jsx(jr,{path:"chat",element:B.jsx(Yv,{})}),B.jsx(jr,{path:"chat/:sessionId",element:B.jsx(Yv,{})}),B.jsx(jr,{path:"sessions",element:B.jsx(R7,{})}),B.jsx(jr,{path:"meetings",element:B.jsx(D7,{})}),B.jsx(jr,{path:"meetings/:id",element:B.jsx(I7,{})}),B.jsx(jr,{path:"rules",element:B.jsx(j7,{})}),B.jsx(jr,{path:"settings",element:B.jsx(F7,{})})]})})})})}));export{YD as $,Mc as A,Lz as B,Xr as C,Yo as D,PT as E,Z2 as F,rl as G,oy as H,eI as I,SD as J,La as K,Vg as L,lt as M,ND as N,FD as O,QM as P,ns as Q,Ni as R,Q7 as S,q2 as T,It as U,ly as V,ED as W,PC as X,uk as Y,r$ as Z,KM as _,Fc as a,Xt as a$,GD as a0,u$ as a1,OR as a2,RR as a3,Le as a4,le as a5,Fm as a6,$R as a7,cI as a8,wi as a9,C8 as aA,st as aB,oO as aC,Ac as aD,TD as aE,mt as aF,OD as aG,iN as aH,iI as aI,rI as aJ,pk as aK,MT as aL,OT as aM,Ad as aN,wC as aO,dy as aP,_8 as aQ,xI as aR,Ll as aS,d$ as aT,MD as aU,Bz as aV,CI as aW,V2 as aX,MF as aY,xn as aZ,Mr as a_,zc as aa,wD as ab,vI as ac,IT as ad,Dy as ae,_y as af,U5 as ag,xR as ah,X7 as ai,WC as aj,gc as ak,K7 as al,t8 as am,M8 as an,w8 as ao,Y_ as ap,PD as aq,WD as ar,UD as as,gn as at,NC as au,NF as av,Fr as aw,WT as ax,wy as ay,Bu as az,S as b,yO as b0,FR as b1,MR as b2,Z7 as b3,DR as b4,mI as b5,DD as b6,_R as b7,NR as b8,aI as b9,nI as ba,AT as bb,_t as bc,RD as bd,sI as be,jD as bf,HD as bg,qD as bh,ID as bi,_z as bj,Et as bk,_r as bl,aO as bm,g$ as bn,ie as c,J7 as d,lI as e,A2 as f,FT as g,nO as h,zD as i,$D as j,oI as k,Xe as l,St as m,tI as n,RT as o,V7 as p,Ry as q,HT as r,Ba as s,Oy as t,AR as u,bI as v,gI as w,yI as x,xc as y,Q2 as z};
|