@epic-web/workshop-app 5.22.5 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_-CHaVBRQw.js → _-BaHOmd8F.js} +2 -2
- package/build/client/assets/{_-CHaVBRQw.js.map → _-BaHOmd8F.js.map} +1 -1
- package/build/client/assets/_basePickBy-B3Ji82Lk.js +2 -0
- package/build/client/assets/_basePickBy-B3Ji82Lk.js.map +1 -0
- package/build/client/assets/_baseUniq-BoGoqSUm.js +2 -0
- package/build/client/assets/_baseUniq-BoGoqSUm.js.map +1 -0
- package/build/client/assets/{_exerciseNumber-CoBfhQjJ.js → _exerciseNumber-DtILU6SM.js} +2 -2
- package/build/client/assets/{_exerciseNumber-CoBfhQjJ.js.map → _exerciseNumber-DtILU6SM.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-D5VDI7vZ.js → _exerciseNumber_._stepNumber-DoOFEk-P.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-D5VDI7vZ.js.map → _exerciseNumber_._stepNumber-DoOFEk-P.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-Y4uCc3KH.js → _exerciseNumber_.finished-CEK9anWX.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-Y4uCc3KH.js.map → _exerciseNumber_.finished-CEK9anWX.js.map} +1 -1
- package/build/client/assets/{_layout-DV29dlKr.js → _layout-B_BIIcpM.js} +2 -2
- package/build/client/assets/{_layout-DV29dlKr.js.map → _layout-B_BIIcpM.js.map} +1 -1
- package/build/client/assets/_layout-D1r_62oj.js +6 -0
- package/build/client/assets/_layout-D1r_62oj.js.map +1 -0
- package/build/client/assets/{_layout-CwTidn3v.js → _layout-D7_F6t3x.js} +2 -2
- package/build/client/assets/{_layout-CwTidn3v.js.map → _layout-D7_F6t3x.js.map} +1 -1
- package/build/client/assets/_layout-DzlTTMQ0.js +2 -0
- package/build/client/assets/_layout-DzlTTMQ0.js.map +1 -0
- package/build/client/assets/accordion-CpiLc1m2.js +2 -0
- package/build/client/assets/accordion-CpiLc1m2.js.map +1 -0
- package/build/client/assets/{account-CN4B8rm4.js → account-CbFDiVNd.js} +2 -2
- package/build/client/assets/{account-CN4B8rm4.js.map → account-CbFDiVNd.js.map} +1 -1
- package/build/client/assets/app-CQvK51s0.js +2 -0
- package/build/client/assets/{app-lUkT_xku.js.map → app-CQvK51s0.js.map} +1 -1
- package/build/client/assets/{app-DGPT3Jy6.css → app-DSmkkXO5.css} +1 -1
- package/build/client/assets/arc-rF8TbXNV.js +2 -0
- package/build/client/assets/arc-rF8TbXNV.js.map +1 -0
- package/build/client/assets/architectureDiagram-IEHRJDOE-D7gCCmY9.js +37 -0
- package/build/client/assets/architectureDiagram-IEHRJDOE-D7gCCmY9.js.map +1 -0
- package/build/client/assets/blockDiagram-JOT3LUYC-yGQOzhkw.js +122 -0
- package/build/client/assets/blockDiagram-JOT3LUYC-yGQOzhkw.js.map +1 -0
- package/build/client/assets/{button-ChOzbirS.js → button-Dt4EcDfR.js} +2 -2
- package/build/client/assets/{button-ChOzbirS.js.map → button-Dt4EcDfR.js.map} +1 -1
- package/build/client/assets/c4Diagram-VJAJSXHY-CTFjYF37.js +11 -0
- package/build/client/assets/c4Diagram-VJAJSXHY-CTFjYF37.js.map +1 -0
- package/build/client/assets/channel-5s71-OE9.js +2 -0
- package/build/client/assets/channel-5s71-OE9.js.map +1 -0
- package/build/client/assets/chunk-4BMEZGHF-BIe0IUDz.js +2 -0
- package/build/client/assets/chunk-4BMEZGHF-BIe0IUDz.js.map +1 -0
- package/build/client/assets/chunk-A2AXSNBT-B-nCbUBj.js +165 -0
- package/build/client/assets/chunk-A2AXSNBT-B-nCbUBj.js.map +1 -0
- package/build/client/assets/chunk-AEK57VVT-B-cCHPs2.js +221 -0
- package/build/client/assets/chunk-AEK57VVT-B-cCHPs2.js.map +1 -0
- package/build/client/assets/chunk-D6G4REZN-EQ3R8OZx.js +2 -0
- package/build/client/assets/chunk-D6G4REZN-EQ3R8OZx.js.map +1 -0
- package/build/client/assets/chunk-RZ5BOZE2-h6svq8Xk.js +2 -0
- package/build/client/assets/chunk-RZ5BOZE2-h6svq8Xk.js.map +1 -0
- package/build/client/assets/chunk-XZIHB7SX-74-HFRcU.js +2 -0
- package/build/client/assets/chunk-XZIHB7SX-74-HFRcU.js.map +1 -0
- package/build/client/assets/classDiagram-GIVACNV2-CWogZCzR.js +2 -0
- package/build/client/assets/classDiagram-GIVACNV2-CWogZCzR.js.map +1 -0
- package/build/client/assets/classDiagram-v2-COTLJTTW-CWogZCzR.js +2 -0
- package/build/client/assets/classDiagram-v2-COTLJTTW-CWogZCzR.js.map +1 -0
- package/build/client/assets/clone-nHZ14b_E.js +2 -0
- package/build/client/assets/clone-nHZ14b_E.js.map +1 -0
- package/build/client/assets/{components-DrvY4pal.js → components-5arJTWsS.js} +5 -5
- package/build/client/assets/{components-DrvY4pal.js.map → components-5arJTWsS.js.map} +1 -1
- package/build/client/assets/cytoscape.esm-BY7v1xhs.js +332 -0
- package/build/client/assets/cytoscape.esm-BY7v1xhs.js.map +1 -0
- package/build/client/assets/dagre-OKDRZEBW-Bq-HgVN8.js +5 -0
- package/build/client/assets/dagre-OKDRZEBW-Bq-HgVN8.js.map +1 -0
- package/build/client/assets/diagram-SSKATNLV-Cls675Lh.js +44 -0
- package/build/client/assets/diagram-SSKATNLV-Cls675Lh.js.map +1 -0
- package/build/client/assets/diagram-VNBRO52H-CJDqBhLa.js +25 -0
- package/build/client/assets/diagram-VNBRO52H-CJDqBhLa.js.map +1 -0
- package/build/client/assets/diff-8N5KyD7o.js +2 -0
- package/build/client/assets/{diff-KLlexrTJ.js.map → diff-8N5KyD7o.js.map} +1 -1
- package/build/client/assets/{diff-DX_Noxwr.js → diff-Bu4t2NGL.js} +2 -2
- package/build/client/assets/{diff-DX_Noxwr.js.map → diff-Bu4t2NGL.js.map} +1 -1
- package/build/client/assets/{discord-gROK6Zn6.js → discord-BU7RzE6-.js} +2 -2
- package/build/client/assets/{discord-gROK6Zn6.js.map → discord-BU7RzE6-.js.map} +1 -1
- package/build/client/assets/discord-ut4t-aMQ.js +2 -0
- package/build/client/assets/discord-ut4t-aMQ.js.map +1 -0
- package/build/client/assets/entry.client-BLUlgPHE.js +44 -0
- package/build/client/assets/{entry.client-CQusg5Iz.js.map → entry.client-BLUlgPHE.js.map} +1 -1
- package/build/client/assets/epic-video-DN9DRRHf.js +3206 -0
- package/build/client/assets/epic-video-DN9DRRHf.js.map +1 -0
- package/build/client/assets/erDiagram-Q7BY3M3F-DdKn4jVQ.js +61 -0
- package/build/client/assets/erDiagram-Q7BY3M3F-DdKn4jVQ.js.map +1 -0
- package/build/client/assets/{error-boundary-CAu3AmhN.js → error-boundary-B07cWiEy.js} +2 -2
- package/build/client/assets/{error-boundary-CAu3AmhN.js.map → error-boundary-B07cWiEy.js.map} +1 -1
- package/build/client/assets/{finished-B4dkglFg.js → finished-B3G1RUDO.js} +2 -2
- package/build/client/assets/{finished-B4dkglFg.js.map → finished-B3G1RUDO.js.map} +1 -1
- package/build/client/assets/flowDiagram-4HSFHLVR-5Mg796nh.js +162 -0
- package/build/client/assets/flowDiagram-4HSFHLVR-5Mg796nh.js.map +1 -0
- package/build/client/assets/ganttDiagram-APWFNJXF-YO2fxWzG.js +258 -0
- package/build/client/assets/ganttDiagram-APWFNJXF-YO2fxWzG.js.map +1 -0
- package/build/client/assets/gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js +66 -0
- package/build/client/assets/gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js.map +1 -0
- package/build/client/assets/graph-BFAO9Sgp.js +2 -0
- package/build/client/assets/graph-BFAO9Sgp.js.map +1 -0
- package/build/client/assets/{index-egcHQOpF.js → index-B8yUFowV.js} +2 -2
- package/build/client/assets/{index-egcHQOpF.js.map → index-B8yUFowV.js.map} +1 -1
- package/build/client/assets/{index-BmmH8jFA.js → index-BfCSiT_X.js} +2 -2
- package/build/client/assets/{index-BmmH8jFA.js.map → index-BfCSiT_X.js.map} +1 -1
- package/build/client/assets/index-BmMpCvYx.js +2 -0
- package/build/client/assets/index-BmMpCvYx.js.map +1 -0
- package/build/client/assets/index-CEP3Xxa0.js +36 -0
- package/build/client/assets/index-CEP3Xxa0.js.map +1 -0
- package/build/client/assets/index-Dkt2MSig.js +2 -0
- package/build/client/assets/index-Dkt2MSig.js.map +1 -0
- package/build/client/assets/index-Do-KWT0a.js +42 -0
- package/build/client/assets/index-Do-KWT0a.js.map +1 -0
- package/build/client/assets/index-Dsusf_Av.js +38 -0
- package/build/client/assets/{index-CGzylDPY.js.map → index-Dsusf_Av.js.map} +1 -1
- package/build/client/assets/index-DvQyydjU.js +3 -0
- package/build/client/assets/index-DvQyydjU.js.map +1 -0
- package/build/client/assets/{index-CYZfnGWa.js → index-Fw2eA3AF.js} +2 -2
- package/build/client/assets/{index-CYZfnGWa.js.map → index-Fw2eA3AF.js.map} +1 -1
- package/build/client/assets/infoDiagram-PH2N3AL5-x87RxSs8.js +3 -0
- package/build/client/assets/infoDiagram-PH2N3AL5-x87RxSs8.js.map +1 -0
- package/build/client/assets/init-Gi6I4Gst.js +2 -0
- package/build/client/assets/init-Gi6I4Gst.js.map +1 -0
- package/build/client/assets/journeyDiagram-U35MCT3I-D5yGbOLJ.js +139 -0
- package/build/client/assets/journeyDiagram-U35MCT3I-D5yGbOLJ.js.map +1 -0
- package/build/client/assets/kanban-definition-NDS4AKOZ-BM6KyRww.js +89 -0
- package/build/client/assets/kanban-definition-NDS4AKOZ-BM6KyRww.js.map +1 -0
- package/build/client/assets/katex-ChWnQ-fc.js +262 -0
- package/build/client/assets/katex-ChWnQ-fc.js.map +1 -0
- package/build/client/assets/layout-qCiM2Jgn.js +2 -0
- package/build/client/assets/layout-qCiM2Jgn.js.map +1 -0
- package/build/client/assets/linear-B3zp51yW.js +2 -0
- package/build/client/assets/linear-B3zp51yW.js.map +1 -0
- package/build/client/assets/{loading-CPEkK5hO.js → loading-BPTYJOXN.js} +2 -2
- package/build/client/assets/{loading-CPEkK5hO.js.map → loading-BPTYJOXN.js.map} +1 -1
- package/build/client/assets/login-CfyUfm-m.js +2 -0
- package/build/client/assets/{login-C9JmYc0v.js.map → login-CfyUfm-m.js.map} +1 -1
- package/build/client/assets/{manifest-a707abb0.js → manifest-fe4b7228.js} +1 -1
- package/build/client/assets/mdx-Dfsh6Vjk.js +3 -0
- package/build/client/assets/mdx-Dfsh6Vjk.js.map +1 -0
- package/build/client/assets/mermaid.core-ZaxoMXOj.js +214 -0
- package/build/client/assets/mermaid.core-ZaxoMXOj.js.map +1 -0
- package/build/client/assets/mindmap-definition-ALO5MXBD-CF3siXp6.js +96 -0
- package/build/client/assets/mindmap-definition-ALO5MXBD-CF3siXp6.js.map +1 -0
- package/build/client/assets/misc-2sBiisF5.js +2 -0
- package/build/client/assets/misc-2sBiisF5.js.map +1 -0
- package/build/client/assets/{nav-chevrons-DCuva9-Q.js → nav-chevrons-CV-dpXNR.js} +2 -2
- package/build/client/assets/{nav-chevrons-DCuva9-Q.js.map → nav-chevrons-CV-dpXNR.js.map} +1 -1
- package/build/client/assets/{onboarding-Cr6zRXFc.js → onboarding-5LC4kIVW.js} +2 -2
- package/build/client/assets/{onboarding-Cr6zRXFc.js.map → onboarding-5LC4kIVW.js.map} +1 -1
- package/build/client/assets/{online-BsTX44az.js → online-IWqRB9zP.js} +2 -2
- package/build/client/assets/{online-BsTX44az.js.map → online-IWqRB9zP.js.map} +1 -1
- package/build/client/assets/ordinal-Cboi1Yqb.js +2 -0
- package/build/client/assets/ordinal-Cboi1Yqb.js.map +1 -0
- package/build/client/assets/{pe-DXT2FOp1.js → pe-BShc2dvc.js} +2 -2
- package/build/client/assets/{pe-DXT2FOp1.js.map → pe-BShc2dvc.js.map} +1 -1
- package/build/client/assets/pieDiagram-IB7DONF6-B-gWQIHI.js +31 -0
- package/build/client/assets/pieDiagram-IB7DONF6-B-gWQIHI.js.map +1 -0
- package/build/client/assets/{preferences-BYBJKp8k.js → preferences-BkWQyRCq.js} +2 -2
- package/build/client/assets/{preferences-BYBJKp8k.js.map → preferences-BkWQyRCq.js.map} +1 -1
- package/build/client/assets/presence-BAL3jDku.js +28 -0
- package/build/client/assets/presence-BAL3jDku.js.map +1 -0
- package/build/client/assets/preview-D4amucCL.js +2 -0
- package/build/client/assets/{preview-DaTpH6lj.js.map → preview-D4amucCL.js.map} +1 -1
- package/build/client/assets/{product-BKhLQKd7.js → product-Cyum2biy.js} +2 -2
- package/build/client/assets/{product-BKhLQKd7.js.map → product-Cyum2biy.js.map} +1 -1
- package/build/client/assets/progress-BJ4ADF-s.js +2 -0
- package/build/client/assets/progress-BJ4ADF-s.js.map +1 -0
- package/build/client/assets/{progress-bar-ZCHf2Y4W.js → progress-bar-DgnkQxQw.js} +2 -2
- package/build/client/assets/{progress-bar-ZCHf2Y4W.js.map → progress-bar-DgnkQxQw.js.map} +1 -1
- package/build/client/assets/quadrantDiagram-7GDLP6J5-BQzo7p61.js +8 -0
- package/build/client/assets/quadrantDiagram-7GDLP6J5-BQzo7p61.js.map +1 -0
- package/build/client/assets/radar-MK3ICKWK-CM-Iz9PA.js +129 -0
- package/build/client/assets/radar-MK3ICKWK-CM-Iz9PA.js.map +1 -0
- package/build/client/assets/requirementDiagram-KVF5MWMF-DzaHc66R.js +65 -0
- package/build/client/assets/requirementDiagram-KVF5MWMF-DzaHc66R.js.map +1 -0
- package/build/client/assets/revalidation-ws-ho-umDqd.js +2 -0
- package/build/client/assets/{revalidation-ws-BoJZTvOQ.js.map → revalidation-ws-ho-umDqd.js.map} +1 -1
- package/build/client/assets/{root-4MvCzrFd.js → root-tJmOmO9T.js} +3 -3
- package/build/client/assets/{root-4MvCzrFd.js.map → root-tJmOmO9T.js.map} +1 -1
- package/build/client/assets/sankeyDiagram-QLVOVGJD-DfAVeZCk.js +11 -0
- package/build/client/assets/sankeyDiagram-QLVOVGJD-DfAVeZCk.js.map +1 -0
- package/build/client/assets/sequenceDiagram-X6HHIX6F-CljZRLoS.js +123 -0
- package/build/client/assets/sequenceDiagram-X6HHIX6F-CljZRLoS.js.map +1 -0
- package/build/client/assets/{set-playground-IUJCGVu2.js → set-playground-DW2Ys-rV.js} +2 -2
- package/build/client/assets/{set-playground-IUJCGVu2.js.map → set-playground-DW2Ys-rV.js.map} +1 -1
- package/build/client/assets/stateDiagram-DGXRK772-BzVfGv3W.js +2 -0
- package/build/client/assets/stateDiagram-DGXRK772-BzVfGv3W.js.map +1 -0
- package/build/client/assets/stateDiagram-v2-YXO3MK2T-8oX001yq.js +2 -0
- package/build/client/assets/stateDiagram-v2-YXO3MK2T-8oX001yq.js.map +1 -0
- package/build/client/assets/{support-CW3-Iilk.js → support-Bg0iSyle.js} +2 -2
- package/build/client/assets/{support-CW3-Iilk.js.map → support-Bg0iSyle.js.map} +1 -1
- package/build/client/assets/tailwind-DtnE_2an.css +1 -0
- package/build/client/assets/test-C14D-N72.js +2 -0
- package/build/client/assets/{test-BLgbkpIE.js.map → test-C14D-N72.js.map} +1 -1
- package/build/client/assets/tests-6__AtHpI.js +4 -0
- package/build/client/assets/{tests-CtkPy7b6.js.map → tests-6__AtHpI.js.map} +1 -1
- package/build/client/assets/timeline-definition-BDJGKUSR-2TO9MtLY.js +62 -0
- package/build/client/assets/timeline-definition-BDJGKUSR-2TO9MtLY.js.map +1 -0
- package/build/client/assets/tooltip-Bzd6O8vq.js +2 -0
- package/build/client/assets/tooltip-Bzd6O8vq.js.map +1 -0
- package/build/client/assets/{use-event-source-AZJtQsFX.js → use-event-source-Dar8h_B8.js} +2 -2
- package/build/client/assets/{use-event-source-AZJtQsFX.js.map → use-event-source-Dar8h_B8.js.map} +1 -1
- package/build/client/assets/{user-C0j04V55.js → user-DNSnhqGn.js} +2 -2
- package/build/client/assets/{user-C0j04V55.js.map → user-DNSnhqGn.js.map} +1 -1
- package/build/client/assets/{version-D61Qvt0X.js → version-DriSvNMy.js} +2 -2
- package/build/client/assets/{version-D61Qvt0X.js.map → version-DriSvNMy.js.map} +1 -1
- package/build/client/assets/{workshop-config-oL_FWDKq.js → workshop-config-DchzGYJM.js} +2 -2
- package/build/client/assets/{workshop-config-oL_FWDKq.js.map → workshop-config-DchzGYJM.js.map} +1 -1
- package/build/client/assets/xychartDiagram-VJFVF3MP-Dh4nsbBT.js +8 -0
- package/build/client/assets/xychartDiagram-VJFVF3MP-Dh4nsbBT.js.map +1 -0
- package/build/server/index.js +44 -56
- package/build/server/index.js.map +1 -1
- package/dist/server/index.js +6 -0
- package/package.json +6 -5
- package/build/client/assets/_layout-CkabS-6c.js +0 -9
- package/build/client/assets/_layout-CkabS-6c.js.map +0 -1
- package/build/client/assets/_layout-D25fx677.js +0 -5
- package/build/client/assets/_layout-D25fx677.js.map +0 -1
- package/build/client/assets/accordion-BjQ-5Z44.js +0 -2
- package/build/client/assets/accordion-BjQ-5Z44.js.map +0 -1
- package/build/client/assets/app-lUkT_xku.js +0 -2
- package/build/client/assets/diff-KLlexrTJ.js +0 -2
- package/build/client/assets/discord-Cl4hiMqz.js +0 -2
- package/build/client/assets/discord-Cl4hiMqz.js.map +0 -1
- package/build/client/assets/entry.client-CQusg5Iz.js +0 -44
- package/build/client/assets/epic-video-CqPr1EqP.js +0 -3053
- package/build/client/assets/epic-video-CqPr1EqP.js.map +0 -1
- package/build/client/assets/index-BZ4hC2RQ.js +0 -2
- package/build/client/assets/index-BZ4hC2RQ.js.map +0 -1
- package/build/client/assets/index-BncqUVfr.js +0 -39
- package/build/client/assets/index-BncqUVfr.js.map +0 -1
- package/build/client/assets/index-CB8bjE90.js +0 -3
- package/build/client/assets/index-CB8bjE90.js.map +0 -1
- package/build/client/assets/index-CGzylDPY.js +0 -38
- package/build/client/assets/index-CMYl882D.js +0 -36
- package/build/client/assets/index-CMYl882D.js.map +0 -1
- package/build/client/assets/index-CSGHuBiw.js +0 -5
- package/build/client/assets/index-CSGHuBiw.js.map +0 -1
- package/build/client/assets/login-C9JmYc0v.js +0 -2
- package/build/client/assets/mdx-6d6l1jm2.js +0 -2
- package/build/client/assets/mdx-6d6l1jm2.js.map +0 -1
- package/build/client/assets/misc-CQmANiHr.js +0 -2
- package/build/client/assets/misc-CQmANiHr.js.map +0 -1
- package/build/client/assets/presence-D5UF-NOM.js +0 -28
- package/build/client/assets/presence-D5UF-NOM.js.map +0 -1
- package/build/client/assets/preview-DaTpH6lj.js +0 -2
- package/build/client/assets/progress-DwE8EkAa.js +0 -2
- package/build/client/assets/progress-DwE8EkAa.js.map +0 -1
- package/build/client/assets/revalidation-ws-BoJZTvOQ.js +0 -2
- package/build/client/assets/tailwind-O9k3JIDs.css +0 -1
- package/build/client/assets/test-BLgbkpIE.js +0 -2
- package/build/client/assets/tests-CtkPy7b6.js +0 -4
- package/build/client/assets/tooltip-Cd0yJoQb.js +0 -2
- package/build/client/assets/tooltip-Cd0yJoQb.js.map +0 -1
- /package/build/client/assets/{epic-video-DUnRvy1A.css → epic-video-D2Xftn6t.css} +0 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-OKDRZEBW-Bq-HgVN8.js","assets/graph-BFAO9Sgp.js","assets/_baseUniq-BoGoqSUm.js","assets/layout-qCiM2Jgn.js","assets/_basePickBy-B3Ji82Lk.js","assets/clone-nHZ14b_E.js","assets/mdx-Dfsh6Vjk.js","assets/index-Dsusf_Av.js","assets/misc-2sBiisF5.js","assets/components-5arJTWsS.js","assets/epic-video-DN9DRRHf.js","assets/index-CEP3Xxa0.js","assets/tooltip-Bzd6O8vq.js","assets/pe-BShc2dvc.js","assets/online-IWqRB9zP.js","assets/loading-BPTYJOXN.js","assets/user-DNSnhqGn.js","assets/workshop-config-DchzGYJM.js","assets/epic-video-D2Xftn6t.css","assets/progress-bar-DgnkQxQw.js","assets/c4Diagram-VJAJSXHY-CTFjYF37.js","assets/chunk-D6G4REZN-EQ3R8OZx.js","assets/flowDiagram-4HSFHLVR-5Mg796nh.js","assets/chunk-RZ5BOZE2-h6svq8Xk.js","assets/channel-5s71-OE9.js","assets/erDiagram-Q7BY3M3F-DdKn4jVQ.js","assets/gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js","assets/chunk-4BMEZGHF-BIe0IUDz.js","assets/chunk-XZIHB7SX-74-HFRcU.js","assets/radar-MK3ICKWK-CM-Iz9PA.js","assets/ganttDiagram-APWFNJXF-YO2fxWzG.js","assets/linear-B3zp51yW.js","assets/init-Gi6I4Gst.js","assets/infoDiagram-PH2N3AL5-x87RxSs8.js","assets/pieDiagram-IB7DONF6-B-gWQIHI.js","assets/arc-rF8TbXNV.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-7GDLP6J5-BQzo7p61.js","assets/xychartDiagram-VJFVF3MP-Dh4nsbBT.js","assets/requirementDiagram-KVF5MWMF-DzaHc66R.js","assets/sequenceDiagram-X6HHIX6F-CljZRLoS.js","assets/classDiagram-GIVACNV2-CWogZCzR.js","assets/chunk-A2AXSNBT-B-nCbUBj.js","assets/classDiagram-v2-COTLJTTW-CWogZCzR.js","assets/stateDiagram-DGXRK772-BzVfGv3W.js","assets/chunk-AEK57VVT-B-cCHPs2.js","assets/stateDiagram-v2-YXO3MK2T-8oX001yq.js","assets/journeyDiagram-U35MCT3I-D5yGbOLJ.js","assets/timeline-definition-BDJGKUSR-2TO9MtLY.js","assets/mindmap-definition-ALO5MXBD-CF3siXp6.js","assets/cytoscape.esm-BY7v1xhs.js","assets/kanban-definition-NDS4AKOZ-BM6KyRww.js","assets/sankeyDiagram-QLVOVGJD-DfAVeZCk.js","assets/diagram-VNBRO52H-CJDqBhLa.js","assets/diagram-SSKATNLV-Cls675Lh.js","assets/blockDiagram-JOT3LUYC-yGQOzhkw.js","assets/architectureDiagram-IEHRJDOE-D7gCCmY9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Nm=Object.defineProperty;var zm=(e,t,r)=>t in e?Nm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>zm(e,typeof t!="symbol"?t+"":t,r);import{_ as dt}from"./mdx-Dfsh6Vjk.js";import{g as Wm,f as qm}from"./index-Dsusf_Av.js";var gh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(qm,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",c="hour",l="day",h="week",u="month",f="quarter",p="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,b={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(E){var M=["th","st","nd","rd"],B=E%100;return"["+E+(M[(B-20)%10]||M[B]||M[0])+"]"}},C=function(E,M,B){var F=String(E);return!F||F.length>=M?E:""+Array(M+1-F.length).join(B)+E},k={s:C,z:function(E){var M=-E.utcOffset(),B=Math.abs(M),F=Math.floor(B/60),L=B%60;return(M<=0?"+":"-")+C(F,2,"0")+":"+C(L,2,"0")},m:function E(M,B){if(M.date()<B.date())return-E(B,M);var F=12*(B.year()-M.year())+(B.month()-M.month()),L=M.clone().add(F,u),W=B-L<0,Y=M.clone().add(F+(W?-1:1),u);return+(-(F+(B-L)/(W?L-Y:Y-L))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:p,w:h,d:l,D:g,h:c,m:s,s:o,ms:a,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},S="en",_={};_[S]=b;var v="$isDayjsObject",D=function(E){return E instanceof z||!(!E||!E[v])},P=function E(M,B,F){var L;if(!M)return S;if(typeof M=="string"){var W=M.toLowerCase();_[W]&&(L=W),B&&(_[W]=B,L=W);var Y=M.split("-");if(!L&&Y.length>1)return E(Y[0])}else{var J=M.name;_[J]=M,L=J}return!F&&L&&(S=L),L||!F&&S},$=function(E,M){if(D(E))return E.clone();var B=typeof M=="object"?M:{};return B.date=E,B.args=arguments,new z(B)},A=k;A.l=P,A.i=D,A.w=function(E,M){return $(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var z=function(){function E(B){this.$L=P(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[v]=!0}var M=E.prototype;return M.parse=function(B){this.$d=function(F){var L=F.date,W=F.utc;if(L===null)return new Date(NaN);if(A.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var Y=L.match(y);if(Y){var J=Y[2]-1||0,tt=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],J,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,tt)):new Date(Y[1],J,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,tt)}}return new Date(L)}(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return A},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(B,F){var L=$(B);return this.startOf(F)<=L&&L<=this.endOf(F)},M.isAfter=function(B,F){return $(B)<this.startOf(F)},M.isBefore=function(B,F){return this.endOf(F)<$(B)},M.$g=function(B,F,L){return A.u(B)?this[F]:this.set(L,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,F){var L=this,W=!!A.u(F)||F,Y=A.p(B),J=function(te,bt){var oe=A.w(L.$u?Date.UTC(L.$y,bt,te):new Date(L.$y,bt,te),L);return W?oe:oe.endOf(l)},tt=function(te,bt){return A.w(L.toDate()[te].apply(L.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(bt)),L)},et=this.$W,ht=this.$M,nt=this.$D,St="set"+(this.$u?"UTC":"");switch(Y){case p:return W?J(1,0):J(31,11);case u:return W?J(1,ht):J(0,ht+1);case h:var Lt=this.$locale().weekStart||0,se=(et<Lt?et+7:et)-Lt;return J(W?nt-se:nt+(6-se),ht);case l:case g:return tt(St+"Hours",0);case c:return tt(St+"Minutes",1);case s:return tt(St+"Seconds",2);case o:return tt(St+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,F){var L,W=A.p(B),Y="set"+(this.$u?"UTC":""),J=(L={},L[l]=Y+"Date",L[g]=Y+"Date",L[u]=Y+"Month",L[p]=Y+"FullYear",L[c]=Y+"Hours",L[s]=Y+"Minutes",L[o]=Y+"Seconds",L[a]=Y+"Milliseconds",L)[W],tt=W===l?this.$D+(F-this.$W):F;if(W===u||W===p){var et=this.clone().set(g,1);et.$d[J](tt),et.init(),this.$d=et.set(g,Math.min(this.$D,et.daysInMonth())).$d}else J&&this.$d[J](tt);return this.init(),this},M.set=function(B,F){return this.clone().$set(B,F)},M.get=function(B){return this[A.p(B)]()},M.add=function(B,F){var L,W=this;B=Number(B);var Y=A.p(F),J=function(ht){var nt=$(W);return A.w(nt.date(nt.date()+Math.round(ht*B)),W)};if(Y===u)return this.set(u,this.$M+B);if(Y===p)return this.set(p,this.$y+B);if(Y===l)return J(1);if(Y===h)return J(7);var tt=(L={},L[s]=i,L[c]=n,L[o]=r,L)[Y]||1,et=this.$d.getTime()+B*tt;return A.w(et,this)},M.subtract=function(B,F){return this.add(-1*B,F)},M.format=function(B){var F=this,L=this.$locale();if(!this.isValid())return L.invalidDate||m;var W=B||"YYYY-MM-DDTHH:mm:ssZ",Y=A.z(this),J=this.$H,tt=this.$m,et=this.$M,ht=L.weekdays,nt=L.months,St=L.meridiem,Lt=function(bt,oe,ee,ve){return bt&&(bt[oe]||bt(F,W))||ee[oe].slice(0,ve)},se=function(bt){return A.s(J%12||12,bt,"0")},te=St||function(bt,oe,ee){var ve=bt<12?"AM":"PM";return ee?ve.toLowerCase():ve};return W.replace(x,function(bt,oe){return oe||function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return A.s(F.$y,4,"0");case"M":return et+1;case"MM":return A.s(et+1,2,"0");case"MMM":return Lt(L.monthsShort,et,nt,3);case"MMMM":return Lt(nt,et);case"D":return F.$D;case"DD":return A.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Lt(L.weekdaysMin,F.$W,ht,2);case"ddd":return Lt(L.weekdaysShort,F.$W,ht,3);case"dddd":return ht[F.$W];case"H":return String(J);case"HH":return A.s(J,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return te(J,tt,!0);case"A":return te(J,tt,!1);case"m":return String(tt);case"mm":return A.s(tt,2,"0");case"s":return String(F.$s);case"ss":return A.s(F.$s,2,"0");case"SSS":return A.s(F.$ms,3,"0");case"Z":return Y}return null}(bt)||Y.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,F,L){var W,Y=this,J=A.p(F),tt=$(B),et=(tt.utcOffset()-this.utcOffset())*i,ht=this-tt,nt=function(){return A.m(Y,tt)};switch(J){case p:W=nt()/12;break;case u:W=nt();break;case f:W=nt()/3;break;case h:W=(ht-et)/6048e5;break;case l:W=(ht-et)/864e5;break;case c:W=ht/n;break;case s:W=ht/i;break;case o:W=ht/r;break;default:W=ht}return L?W:A.a(W)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return _[this.$L]},M.locale=function(B,F){if(!B)return this.$L;var L=this.clone(),W=P(B,F,!0);return W&&(L.$L=W),L},M.clone=function(){return A.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E}(),R=z.prototype;return $.prototype=R,[["$ms",a],["$s",o],["$m",s],["$H",c],["$W",l],["$M",u],["$y",p],["$D",g]].forEach(function(E){R[E[1]]=function(M){return this.$g(M,E[0],E[1])}}),$.extend=function(E,M){return E.$i||(E(M,z,$),E.$i=!0),$},$.locale=P,$.isDayjs=D,$.unix=function(E){return $(1e3*E)},$.en=_[S],$.Ls=_,$.p={},$})})(gh);var Hm=gh.exports;const jm=Wm(Hm),_n={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,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return _n.hue2rgb(a,n,e+1/3)*255;case"g":return _n.hue2rgb(a,n,e)*255;case"b":return _n.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,c=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return c*100;switch(n){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Ym={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Um={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:_n,lang:Ym,unit:Um},qe={};for(let e=0;e<=255;e++)qe[e]=at.unit.dec2hex(e);const Ot={ALL:0,RGB:1,HSL:2};class Gm{constructor(){this.type=Ot.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=Ot.ALL}is(t){return this.type===t}}class Vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ot.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ot.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ot.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ot.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ot.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ot.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ot.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ma=new Vm({r:0,g:0,b:0,a:0},"transparent"),Fr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Fr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,c=o?8:4,l=a?0:-1,h=o?255:15;return ma.set({r:(i>>c*(l+3)&h)*s,g:(i>>c*(l+2)&h)*s,b:(i>>c*(l+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${qe[Math.round(t)]}${qe[Math.round(r)]}${qe[Math.round(i)]}${qe[Math.round(n*255)]}`:`#${qe[Math.round(t)]}${qe[Math.round(r)]}${qe[Math.round(i)]}`}},ir={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(ir.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ir.re);if(!r)return;const[,i,n,a,o,s]=r;return ma.set({h:ir._hue2deg(i),s:at.channel.clamp.s(parseFloat(n)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${n})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Li={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=Li.colors[e];if(t)return Fr.parse(t)},stringify:e=>{const t=Fr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},Ci={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 r=e.match(Ci.re);if(!r)return;const[,i,n,a,o,s,c,l,h]=r;return ma.set({r:at.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?at.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(n)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},be={format:{keyword:Li,hex:Fr,rgb:Ci,rgba:Ci,hsl:ir,hsla:ir},parse:e=>{if(typeof e!="string")return e;const t=Fr.parse(e)||Ci.parse(e)||ir.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ot.HSL)||e.data.r===void 0?ir.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Fr.stringify(e)},mh=(e,t)=>{const r=be.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return be.stringify(r)},Ai=(e,t,r=0,i=1)=>{if(typeof e!="number")return mh(e,{a:t});const n=ma.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return be.stringify(n)},Xm=e=>{const{r:t,g:r,b:i}=be.parse(e),n=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(n)},Zm=e=>Xm(e)>=.5,Ui=e=>!Zm(e),yh=(e,t,r)=>{const i=be.parse(e),n=i[t],a=at.channel.clamp[t](n+r);return n!==a&&(i[t]=a),be.stringify(i)},q=(e,t)=>yh(e,"l",t),Q=(e,t)=>yh(e,"l",-t),T=(e,t)=>{const r=be.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return mh(e,i)},Km=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=be.parse(e),{r:s,g:c,b:l,a:h}=be.parse(t),u=r/100,f=u*2-1,p=o-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+s*y,b=n*m+c*y,C=a*m+l*y,k=o*u+h*(1-u);return Ai(x,b,C,k)},N=(e,t=100)=>{const r=be.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Km(r,e,t)};/*! @license DOMPurify 3.2.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.2.6/LICENSE */const{entries:xh,setPrototypeOf:Il,isFrozen:Qm,getPrototypeOf:Jm,getOwnPropertyDescriptor:t0}=Object;let{freeze:Ht,seal:ne,create:bh}=Object,{apply:bs,construct:_s}=typeof Reflect<"u"&&Reflect;Ht||(Ht=function(t){return t});ne||(ne=function(t){return t});bs||(bs=function(t,r,i){return t.apply(r,i)});_s||(_s=function(t,r){return new t(...r)});const cn=jt(Array.prototype.forEach),e0=jt(Array.prototype.lastIndexOf),Pl=jt(Array.prototype.pop),ci=jt(Array.prototype.push),r0=jt(Array.prototype.splice),Cn=jt(String.prototype.toLowerCase),Qa=jt(String.prototype.toString),Nl=jt(String.prototype.match),hi=jt(String.prototype.replace),i0=jt(String.prototype.indexOf),n0=jt(String.prototype.trim),le=jt(Object.prototype.hasOwnProperty),Pt=jt(RegExp.prototype.test),ui=a0(TypeError);function jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return bs(e,t,i)}}function a0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return _s(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cn;Il&&Il(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Qm(t)||(t[i]=a),n=a)}e[n]=!0}return e}function s0(e){for(let t=0;t<e.length;t++)le(e,t)||(e[t]=null);return e}function Me(e){const t=bh(null);for(const[r,i]of xh(e))le(e,r)&&(Array.isArray(i)?t[r]=s0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Me(i):t[r]=i);return t}function fi(e,t){for(;e!==null;){const i=t0(e,t);if(i){if(i.get)return jt(i.get);if(typeof i.value=="function")return jt(i.value)}e=Jm(e)}function r(){return null}return r}const zl=Ht(["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","section","select","shadow","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"]),Ja=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ts=Ht(["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"]),o0=Ht(["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"]),es=Ht(["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"]),l0=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Wl=Ht(["#text"]),ql=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),rs=Ht(["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","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"]),Hl=Ht(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),hn=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),c0=ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),h0=ne(/<%[\w\W]*|[\w\W]*%>/gm),u0=ne(/\$\{[\w\W]*/gm),f0=ne(/^data-[\-\w.\u00B7-\uFFFF]+$/),p0=ne(/^aria-[\-\w]+$/),_h=ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),d0=ne(/^(?:\w+script|data):/i),g0=ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ch=ne(/^html$/i),m0=ne(/^[a-z][.\w]*(-[.\w]+)+$/i);var jl=Object.freeze({__proto__:null,ARIA_ATTR:p0,ATTR_WHITESPACE:g0,CUSTOM_ELEMENT:m0,DATA_ATTR:f0,DOCTYPE_NAME:Ch,ERB_EXPR:h0,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:d0,MUSTACHE_EXPR:c0,TMPLIT_EXPR:u0});const pi={element:1,text:3,progressingInstruction:7,comment:8,document:9},y0=function(){return typeof window>"u"?null:window},x0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Yl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y0();const t=K=>wh(K);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==pi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=e,g=c.prototype,m=fi(g,"cloneNode"),y=fi(g,"remove"),x=fi(g,"nextSibling"),b=fi(g,"childNodes"),C=fi(g,"parentNode");if(typeof o=="function"){const K=r.createElement("template");K.content&&K.content.ownerDocument&&(r=K.content.ownerDocument)}let k,S="";const{implementation:_,createNodeIterator:v,createDocumentFragment:D,getElementsByTagName:P}=r,{importNode:$}=i;let A=Yl();t.isSupported=typeof xh=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:R,TMPLIT_EXPR:E,DATA_ATTR:M,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:W}=jl;let{IS_ALLOWED_URI:Y}=jl,J=null;const tt=ot({},[...zl,...Ja,...ts,...es,...Wl]);let et=null;const ht=ot({},[...ql,...rs,...Hl,...hn]);let nt=Object.seal(bh(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}})),St=null,Lt=null,se=!0,te=!0,bt=!1,oe=!0,ee=!1,ve=!0,Qe=!1,Ha=!1,ja=!1,Cr=!1,rn=!1,nn=!1,bl=!0,_l=!1;const Em="user-content-";let Ya=!0,si=!1,wr={},vr=null;const Cl=ot({},["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 wl=null;const vl=ot({},["audio","video","img","source","image","track"]);let Ua=null;const kl=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),an="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let kr=ke,Ga=!1,Va=null;const Fm=ot({},[an,sn,ke],Qa);let on=ot({},["mi","mo","mn","ms","mtext"]),ln=ot({},["annotation-xml"]);const $m=ot({},["title","style","font","a","script"]);let oi=null;const Om=["application/xhtml+xml","text/html"],Dm="text/html";let Tt=null,Sr=null;const Rm=r.createElement("form"),Sl=function(w){return w instanceof RegExp||w instanceof Function},Xa=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sr&&Sr===w)){if((!w||typeof w!="object")&&(w={}),w=Me(w),oi=Om.indexOf(w.PARSER_MEDIA_TYPE)===-1?Dm:w.PARSER_MEDIA_TYPE,Tt=oi==="application/xhtml+xml"?Qa:Cn,J=le(w,"ALLOWED_TAGS")?ot({},w.ALLOWED_TAGS,Tt):tt,et=le(w,"ALLOWED_ATTR")?ot({},w.ALLOWED_ATTR,Tt):ht,Va=le(w,"ALLOWED_NAMESPACES")?ot({},w.ALLOWED_NAMESPACES,Qa):Fm,Ua=le(w,"ADD_URI_SAFE_ATTR")?ot(Me(kl),w.ADD_URI_SAFE_ATTR,Tt):kl,wl=le(w,"ADD_DATA_URI_TAGS")?ot(Me(vl),w.ADD_DATA_URI_TAGS,Tt):vl,vr=le(w,"FORBID_CONTENTS")?ot({},w.FORBID_CONTENTS,Tt):Cl,St=le(w,"FORBID_TAGS")?ot({},w.FORBID_TAGS,Tt):Me({}),Lt=le(w,"FORBID_ATTR")?ot({},w.FORBID_ATTR,Tt):Me({}),wr=le(w,"USE_PROFILES")?w.USE_PROFILES:!1,se=w.ALLOW_ARIA_ATTR!==!1,te=w.ALLOW_DATA_ATTR!==!1,bt=w.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=w.SAFE_FOR_TEMPLATES||!1,ve=w.SAFE_FOR_XML!==!1,Qe=w.WHOLE_DOCUMENT||!1,Cr=w.RETURN_DOM||!1,rn=w.RETURN_DOM_FRAGMENT||!1,nn=w.RETURN_TRUSTED_TYPE||!1,ja=w.FORCE_BODY||!1,bl=w.SANITIZE_DOM!==!1,_l=w.SANITIZE_NAMED_PROPS||!1,Ya=w.KEEP_CONTENT!==!1,si=w.IN_PLACE||!1,Y=w.ALLOWED_URI_REGEXP||_h,kr=w.NAMESPACE||ke,on=w.MATHML_TEXT_INTEGRATION_POINTS||on,ln=w.HTML_INTEGRATION_POINTS||ln,nt=w.CUSTOM_ELEMENT_HANDLING||{},w.CUSTOM_ELEMENT_HANDLING&&Sl(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&Sl(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(te=!1),rn&&(Cr=!0),wr&&(J=ot({},Wl),et=[],wr.html===!0&&(ot(J,zl),ot(et,ql)),wr.svg===!0&&(ot(J,Ja),ot(et,rs),ot(et,hn)),wr.svgFilters===!0&&(ot(J,ts),ot(et,rs),ot(et,hn)),wr.mathMl===!0&&(ot(J,es),ot(et,Hl),ot(et,hn))),w.ADD_TAGS&&(J===tt&&(J=Me(J)),ot(J,w.ADD_TAGS,Tt)),w.ADD_ATTR&&(et===ht&&(et=Me(et)),ot(et,w.ADD_ATTR,Tt)),w.ADD_URI_SAFE_ATTR&&ot(Ua,w.ADD_URI_SAFE_ATTR,Tt),w.FORBID_CONTENTS&&(vr===Cl&&(vr=Me(vr)),ot(vr,w.FORBID_CONTENTS,Tt)),Ya&&(J["#text"]=!0),Qe&&ot(J,["html","head","body"]),J.table&&(ot(J,["tbody"]),delete St.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw ui('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ui('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=w.TRUSTED_TYPES_POLICY,S=k.createHTML("")}else k===void 0&&(k=x0(p,n)),k!==null&&typeof S=="string"&&(S=k.createHTML(""));Ht&&Ht(w),Sr=w}},Tl=ot({},[...Ja,...ts,...o0]),Bl=ot({},[...es,...l0]),Im=function(w){let I=C(w);(!I||!I.tagName)&&(I={namespaceURI:kr,tagName:"template"});const U=Cn(w.tagName),yt=Cn(I.tagName);return Va[w.namespaceURI]?w.namespaceURI===sn?I.namespaceURI===ke?U==="svg":I.namespaceURI===an?U==="svg"&&(yt==="annotation-xml"||on[yt]):!!Tl[U]:w.namespaceURI===an?I.namespaceURI===ke?U==="math":I.namespaceURI===sn?U==="math"&&ln[yt]:!!Bl[U]:w.namespaceURI===ke?I.namespaceURI===sn&&!ln[yt]||I.namespaceURI===an&&!on[yt]?!1:!Bl[U]&&($m[U]||!Tl[U]):!!(oi==="application/xhtml+xml"&&Va[w.namespaceURI]):!1},pe=function(w){ci(t.removed,{element:w});try{C(w).removeChild(w)}catch{y(w)}},Tr=function(w,I){try{ci(t.removed,{attribute:I.getAttributeNode(w),from:I})}catch{ci(t.removed,{attribute:null,from:I})}if(I.removeAttribute(w),w==="is")if(Cr||rn)try{pe(I)}catch{}else try{I.setAttribute(w,"")}catch{}},Ll=function(w){let I=null,U=null;if(ja)w="<remove></remove>"+w;else{const wt=Nl(w,/^[\r\n\t ]+/);U=wt&&wt[0]}oi==="application/xhtml+xml"&&kr===ke&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const yt=k?k.createHTML(w):w;if(kr===ke)try{I=new f().parseFromString(yt,oi)}catch{}if(!I||!I.documentElement){I=_.createDocument(kr,"template",null);try{I.documentElement.innerHTML=Ga?S:yt}catch{}}const Ft=I.body||I.documentElement;return w&&U&&Ft.insertBefore(r.createTextNode(U),Ft.childNodes[0]||null),kr===ke?P.call(I,Qe?"html":"body")[0]:Qe?I.documentElement:Ft},Al=function(w){return v.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Za=function(w){return w instanceof u&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof h)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},Ml=function(w){return typeof s=="function"&&w instanceof s};function Se(K,w,I){cn(K,U=>{U.call(t,w,I,Sr)})}const El=function(w){let I=null;if(Se(A.beforeSanitizeElements,w,null),Za(w))return pe(w),!0;const U=Tt(w.nodeName);if(Se(A.uponSanitizeElement,w,{tagName:U,allowedTags:J}),ve&&w.hasChildNodes()&&!Ml(w.firstElementChild)&&Pt(/<[/\w!]/g,w.innerHTML)&&Pt(/<[/\w!]/g,w.textContent)||w.nodeType===pi.progressingInstruction||ve&&w.nodeType===pi.comment&&Pt(/<[/\w]/g,w.data))return pe(w),!0;if(!J[U]||St[U]){if(!St[U]&&$l(U)&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,U)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(U)))return!1;if(Ya&&!vr[U]){const yt=C(w)||w.parentNode,Ft=b(w)||w.childNodes;if(Ft&&yt){const wt=Ft.length;for(let Yt=wt-1;Yt>=0;--Yt){const Te=m(Ft[Yt],!0);Te.__removalCount=(w.__removalCount||0)+1,yt.insertBefore(Te,x(w))}}}return pe(w),!0}return w instanceof c&&!Im(w)||(U==="noscript"||U==="noembed"||U==="noframes")&&Pt(/<\/no(script|embed|frames)/i,w.innerHTML)?(pe(w),!0):(ee&&w.nodeType===pi.text&&(I=w.textContent,cn([z,R,E],yt=>{I=hi(I,yt," ")}),w.textContent!==I&&(ci(t.removed,{element:w.cloneNode()}),w.textContent=I)),Se(A.afterSanitizeElements,w,null),!1)},Fl=function(w,I,U){if(bl&&(I==="id"||I==="name")&&(U in r||U in Rm))return!1;if(!(te&&!Lt[I]&&Pt(M,I))){if(!(se&&Pt(B,I))){if(!et[I]||Lt[I]){if(!($l(w)&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,w)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(w))&&(nt.attributeNameCheck instanceof RegExp&&Pt(nt.attributeNameCheck,I)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(I))||I==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,U)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(U))))return!1}else if(!Ua[I]){if(!Pt(Y,hi(U,L,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&w!=="script"&&i0(U,"data:")===0&&wl[w])){if(!(bt&&!Pt(F,hi(U,L,"")))){if(U)return!1}}}}}}return!0},$l=function(w){return w!=="annotation-xml"&&Nl(w,W)},Ol=function(w){Se(A.beforeSanitizeAttributes,w,null);const{attributes:I}=w;if(!I||Za(w))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let yt=I.length;for(;yt--;){const Ft=I[yt],{name:wt,namespaceURI:Yt,value:Te}=Ft,li=Tt(wt),Ka=Te;let $t=wt==="value"?Ka:n0(Ka);if(U.attrName=li,U.attrValue=$t,U.keepAttr=!0,U.forceKeepAttr=void 0,Se(A.uponSanitizeAttribute,w,U),$t=U.attrValue,_l&&(li==="id"||li==="name")&&(Tr(wt,w),$t=Em+$t),ve&&Pt(/((--!?|])>)|<\/(style|title)/i,$t)){Tr(wt,w);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){Tr(wt,w);continue}if(!oe&&Pt(/\/>/i,$t)){Tr(wt,w);continue}ee&&cn([z,R,E],Rl=>{$t=hi($t,Rl," ")});const Dl=Tt(w.nodeName);if(!Fl(Dl,li,$t)){Tr(wt,w);continue}if(k&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Yt)switch(p.getAttributeType(Dl,li)){case"TrustedHTML":{$t=k.createHTML($t);break}case"TrustedScriptURL":{$t=k.createScriptURL($t);break}}if($t!==Ka)try{Yt?w.setAttributeNS(Yt,wt,$t):w.setAttribute(wt,$t),Za(w)?pe(w):Pl(t.removed)}catch{Tr(wt,w)}}Se(A.afterSanitizeAttributes,w,null)},Pm=function K(w){let I=null;const U=Al(w);for(Se(A.beforeSanitizeShadowDOM,w,null);I=U.nextNode();)Se(A.uponSanitizeShadowNode,I,null),El(I),Ol(I),I.content instanceof a&&K(I.content);Se(A.afterSanitizeShadowDOM,w,null)};return t.sanitize=function(K){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,U=null,yt=null,Ft=null;if(Ga=!K,Ga&&(K="<!-->"),typeof K!="string"&&!Ml(K))if(typeof K.toString=="function"){if(K=K.toString(),typeof K!="string")throw ui("dirty is not a string, aborting")}else throw ui("toString is not a function");if(!t.isSupported)return K;if(Ha||Xa(w),t.removed=[],typeof K=="string"&&(si=!1),si){if(K.nodeName){const Te=Tt(K.nodeName);if(!J[Te]||St[Te])throw ui("root node is forbidden and cannot be sanitized in-place")}}else if(K instanceof s)I=Ll("<!---->"),U=I.ownerDocument.importNode(K,!0),U.nodeType===pi.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?I=U:I.appendChild(U);else{if(!Cr&&!ee&&!Qe&&K.indexOf("<")===-1)return k&&nn?k.createHTML(K):K;if(I=Ll(K),!I)return Cr?null:nn?S:""}I&&ja&&pe(I.firstChild);const wt=Al(si?K:I);for(;yt=wt.nextNode();)El(yt),Ol(yt),yt.content instanceof a&&Pm(yt.content);if(si)return K;if(Cr){if(rn)for(Ft=D.call(I.ownerDocument);I.firstChild;)Ft.appendChild(I.firstChild);else Ft=I;return(et.shadowroot||et.shadowrootmode)&&(Ft=$.call(i,Ft,!0)),Ft}let Yt=Qe?I.outerHTML:I.innerHTML;return Qe&&J["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Pt(Ch,I.ownerDocument.doctype.name)&&(Yt="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Yt),ee&&cn([z,R,E],Te=>{Yt=hi(Yt,Te," ")}),k&&nn?k.createHTML(Yt):Yt},t.setConfig=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xa(K),Ha=!0},t.clearConfig=function(){Sr=null,Ha=!1},t.isValidAttribute=function(K,w,I){Sr||Xa({});const U=Tt(K),yt=Tt(w);return Fl(U,yt,I)},t.addHook=function(K,w){typeof w=="function"&&ci(A[K],w)},t.removeHook=function(K,w){if(w!==void 0){const I=e0(A[K],w);return I===-1?void 0:r0(A[K],I,1)[0]}return Pl(A[K])},t.removeHooks=function(K){A[K]=[]},t.removeAllHooks=function(){A=Yl()},t}var Hr=wh(),vh=Object.defineProperty,d=(e,t)=>vh(e,"name",{value:t,configurable:!0}),b0=(e,t)=>{for(var r in t)vh(e,r,{get:t[r],enumerable:!0})},Be={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},mo=d(function(e="fatal"){let t=Be.fatal;typeof e=="string"?e.toLowerCase()in Be&&(t=Be[e]):typeof e=="number"&&(t=e),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},t<=Be.fatal&&(O.fatal=console.error?console.error.bind(console,re("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",re("FATAL"))),t<=Be.error&&(O.error=console.error?console.error.bind(console,re("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",re("ERROR"))),t<=Be.warn&&(O.warn=console.warn?console.warn.bind(console,re("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",re("WARN"))),t<=Be.info&&(O.info=console.info?console.info.bind(console,re("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",re("INFO"))),t<=Be.debug&&(O.debug=console.debug?console.debug.bind(console,re("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",re("DEBUG"))),t<=Be.trace&&(O.trace=console.debug?console.debug.bind(console,re("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",re("TRACE")))},"setLogLevel"),re=d(e=>`%c${jm().format("ss.SSS")} : ${e} : `,"format"),kh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_0=/\s*%%.*\n/gm,Dr,Sh=(Dr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},d(Dr,"UnknownDiagramError"),Dr),jr={},yo=d(function(e,t){e=e.replace(kh,"").replace(Mi,"").replace(_0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(jr))if(i(e,t))return r;throw new Sh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Th=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)Bh(t,r,i)},"registerLazyLoadedDiagrams"),Bh=d((e,t,r)=>{jr[e]&&O.warn(`Detector with key ${e} already exists. Overwriting.`),jr[e]={detector:t,loader:r},O.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),C0=d(e=>jr[e].loader,"getDiagramLoader"),Cs=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Cs(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=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(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Cs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Et=Cs,ya="#ffffff",xa="#f2f2f2",Nt=d((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),Rr,w0=(Rr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,n,a,o,s,c,l,h,u,f,p,g,m,y,x,b,C,k,S,_;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?Q(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||Q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||q(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=Q(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=Q(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||N(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||q(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||Q(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||T(this.mainBkg,{h:180,s:-15,l:t*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||T(this.mainBkg,{h:180,s:-15,l:t*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(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||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(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.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ui(this.quadrant1Fill)?q(this.quadrant1Fill):Q(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:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((k=this.xyChart)==null?void 0:k.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.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?Q(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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Q(this.git0,25),this.git1=Q(this.git1,25),this.git2=Q(this.git2,25),this.git3=Q(this.git3,25),this.git4=Q(this.git4,25),this.git5=Q(this.git5,25),this.git6=Q(this.git6,25),this.git7=Q(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Rr,"Theme"),Rr),v0=d(e=>{const t=new w0;return t.calculate(e),t},"getThemeVariables"),Ir,k0=(Ir=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ai(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.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.sectionBkgColor=Q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Q(this.sectionBkgColor,10),this.taskBorderColor=Ai(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ai(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.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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Q(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,n,a,o,s,c,l,h,u,f,p,g,m,y,x,b,C,k,S;this.secondBkg=q(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=q(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=q(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=this.darkTextColor,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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||N(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(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.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ui(this.quadrant1Fill)?q(this.quadrant1Fill):Q(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:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((k=this.radar)==null?void 0:k.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.legendFontSize)||12},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?Q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.secondaryColor,20),this.git1=q(this.pie2||this.secondaryColor,20),this.git2=q(this.pie3||this.tertiaryColor,20),this.git3=q(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=q(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=q(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=q(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=q(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||q(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||q(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Ir,"Theme"),Ir),S0=d(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),Pr,T0=(Pr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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.sectionBkgColor=Ai(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.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.updateColors()}updateColors(){var t,r,i,n,a,o,s,c,l,h,u,f,p,g,m,y,x,b,C,k,S;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Q(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Q(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||Q(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||T(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(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||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(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=q(this.border1,23),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||q(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||q(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ui(this.quadrant1Fill)?q(this.quadrant1Fill):Q(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:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((k=this.xyChart)==null?void 0:k.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Q(this.git0,25),this.git1=Q(this.git1,25),this.git2=Q(this.git2,25),this.git3=Q(this.git3,25),this.git4=Q(this.git4,25),this.git5=Q(this.git5,25),this.git6=Q(this.git6,25),this.git7=Q(this.git7,25)),this.gitInv0=this.gitInv0||Q(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Pr,"Theme"),Pr),B0=d(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),Nr,L0=(Nr=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=q("#cde498",10),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,c,l,h,u,f,p,g,m,y,x,b,C,k,S;this.actorBorder=Q(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Q(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Q(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||Q(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||T(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"+_]||T(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ui(this.quadrant1Fill)?q(this.quadrant1Fill):Q(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:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((k=this.xyChart)==null?void 0:k.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Q(this.git0,25),this.git1=Q(this.git1,25),this.git2=Q(this.git2,25),this.git3=Q(this.git3,25),this.git4=Q(this.git4,25),this.git5=Q(this.git5,25),this.git6=Q(this.git6,25),this.git7=Q(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Nr,"Theme"),Nr),A0=d(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),zr,M0=(zr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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.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.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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,c,l,h,u,f,p,g,m,y,x,b,C,k,S;this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(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"+_]||N(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||Q(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"+_]||T(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(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=q(this.contrast,30),this.sectionBkgColor2=q(this.contrast,30),this.taskBorderColor=Q(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=q(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Q(this.critBkgColor,10),this.todayLineColor=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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ui(this.quadrant1Fill)?q(this.quadrant1Fill):Q(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:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((k=this.radar)==null?void 0:k.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.legendFontSize)||12},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=Q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(zr,"Theme"),zr),E0=d(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),De={base:{getThemeVariables:v0},dark:{getThemeVariables:S0},default:{getThemeVariables:B0},forest:{getThemeVariables:A0},neutral:{getThemeVariables:E0}},Le={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},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,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},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,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},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},Lh={...Le,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:De.default.getThemeVariables(),sequence:{...Le.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Le.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Le.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Le.pie,useWidth:984},xyChart:{...Le.xyChart,useWidth:void 0},requirement:{...Le.requirement,useWidth:void 0},packet:{...Le.packet},radar:{...Le.radar}},Ah=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ah(e[i],"")]:[...r,t+i],[]),"keyify"),F0=new Set(Ah(Lh,"")),Mh=Lh,Dn=d(e=>{if(O.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Dn(t));return}for(const t of Object.keys(e)){if(O.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!F0.has(t)||e[t]==null){O.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){O.debug("sanitizing object",t),Dn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(O.debug("sanitizing css option",t),e[t]=$0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}O.debug("After sanitization",e)}},"sanitizeDirective"),$0=d(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Yr=Object.freeze(Mh),Gt=Et({},Yr),Eh,Ur=[],Ei=Et({},Yr),ba=d((e,t)=>{let r=Et({},e),i={};for(const n of t)Oh(n),i=Et(i,n);if(r=Et(r,i),i.theme&&i.theme in De){const n=Et({},Eh),a=Et(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in De&&(r.themeVariables=De[r.theme].getThemeVariables(a))}return Ei=r,Dh(Ei),Ei},"updateCurrentConfig"),O0=d(e=>(Gt=Et({},Yr),Gt=Et(Gt,e),e.theme&&De[e.theme]&&(Gt.themeVariables=De[e.theme].getThemeVariables(e.themeVariables)),ba(Gt,Ur),Gt),"setSiteConfig"),D0=d(e=>{Eh=Et({},e)},"saveConfigFromInitialize"),R0=d(e=>(Gt=Et(Gt,e),ba(Gt,Ur),Gt),"updateSiteConfig"),Fh=d(()=>Et({},Gt),"getSiteConfig"),$h=d(e=>(Dh(e),Et(Ei,e),Zt()),"setConfig"),Zt=d(()=>Et({},Ei),"getConfig"),Oh=d(e=>{e&&(["secure",...Gt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(O.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"&&Oh(e[t])}))},"sanitize"),I0=d(e=>{var t;Dn(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ur.push(e),ba(Gt,Ur)},"addDirective"),Rn=d((e=Gt)=>{Ur=[],ba(e,Ur)},"reset"),P0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ul={},N0=d(e=>{Ul[e]||(O.warn(P0[e]),Ul[e]=!0)},"issueWarning"),Dh=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&N0("LAZY_LOAD_DEPRECATED")},"checkConfig"),Gi=/<br\s*\/?>/gi,z0=d(e=>e?Ph(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),W0=(()=>{let e=!1;return()=>{e||(Rh(),e=!0)}})();function Rh(){const e="data-temp-href-target";Hr.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Hr.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d(Rh,"setupDompurifyHooks");var Ih=d(e=>(W0(),Hr.sanitize(e)),"removeScript"),Gl=d((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Ih(e):i!=="loose"&&(e=Ph(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Y0(e))}return e},"sanitizeMore"),hr=d((e,t)=>e&&(t.dompurifyConfig?e=Hr.sanitize(Gl(e,t),t.dompurifyConfig).toString():e=Hr.sanitize(Gl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),q0=d((e,t)=>typeof e=="string"?hr(e,t):e.flat().map(r=>hr(r,t)),"sanitizeTextOrArray"),H0=d(e=>Gi.test(e),"hasBreaks"),j0=d(e=>e.split(Gi),"splitBreaks"),Y0=d(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ph=d(e=>e.replace(Gi,"#br#"),"breakToPlaceholder"),U0=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),kt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),G0=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),V0=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Vl=d(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];X0(a,o)&&(n=a+","+o,i++,r.pop())}r.push(Z0(n))}return r.join("")},"parseGenericTypes"),ws=d((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),X0=d((e,t)=>{const r=ws(e,"~"),i=ws(t,"~");return r===1&&i===1},"shouldCombineSets"),Z0=d(e=>{const t=ws(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Xl=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),vs=/\$\$(.*)\$\$/g,Gr=d(e=>{var t;return(((t=e.match(vs))==null?void 0:t.length)??0)>0},"hasKatex"),FL=d(async(e,t)=>{e=await xo(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),xo=d(async(e,t)=>{if(!Gr(e))return e;if(!(Xl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(vs,"MathML is unsupported in this environment.");const{default:r}=await dt(async()=>{const{default:n}=await import("./katex-ChWnQ-fc.js");return{default:n}},[]),i=t.forceLegacyMathML||!Xl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Gi).map(n=>Gr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(vs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),ti={getRows:z0,sanitizeText:hr,sanitizeTextOrArray:q0,hasBreaks:H0,splitBreaks:j0,lineBreakRegex:Gi,removeScript:Ih,getUrl:U0,evaluate:kt,getMax:G0,getMin:V0},K0=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Q0=d(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Nh=d(function(e,t,r,i){const n=Q0(t,r,i);K0(e,n)},"configureSvgSize"),J0=d(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;O.info(`SVG bounds: ${a}x${o}`,n);let s=0,c=0;O.info(`Graph bounds: ${s}x${c}`,e),s=a+r*2,c=o+r*2,O.info(`Calculated bounds: ${s}x${c}`),Nh(t,c,s,i);const l=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),wn={},ty=d((e,t,r)=>{let i="";return e in wn&&wn[e]?i=wn[e](r):O.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${i}
|
|
78
|
+
|
|
79
|
+
${t}
|
|
80
|
+
`},"getStyles"),ey=d((e,t)=>{t!==void 0&&(wn[e]=t)},"addStylesForDiagram"),ry=ty,zh={};b0(zh,{clear:()=>iy,getAccDescription:()=>oy,getAccTitle:()=>ay,getDiagramTitle:()=>cy,setAccDescription:()=>sy,setAccTitle:()=>ny,setDiagramTitle:()=>ly});var bo="",_o="",Co="",wo=d(e=>hr(e,Zt()),"sanitizeText"),iy=d(()=>{bo="",Co="",_o=""},"clear"),ny=d(e=>{bo=wo(e).replace(/^\s+/g,"")},"setAccTitle"),ay=d(()=>bo,"getAccTitle"),sy=d(e=>{Co=wo(e).replace(/\n\s+/g,`
|
|
81
|
+
`)},"setAccDescription"),oy=d(()=>Co,"getAccDescription"),ly=d(e=>{_o=wo(e)},"setDiagramTitle"),cy=d(()=>_o,"getDiagramTitle"),Zl=O,hy=mo,ut=Zt,$L=$h,OL=Yr,vo=d(e=>hr(e,ut()),"sanitizeText"),uy=J0,fy=d(()=>zh,"getCommonDb"),In={},Pn=d((e,t,r)=>{var i;In[e]&&Zl.warn(`Diagram with id ${e} already registered. Overwriting.`),In[e]=t,r&&Bh(e,r),ey(e,t.styles),(i=t.injectUtils)==null||i.call(t,Zl,hy,ut,vo,uy,fy(),()=>{})},"registerDiagram"),ks=d(e=>{if(e in In)return In[e];throw new py(e)},"getDiagram"),Wr,py=(Wr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},d(Wr,"DiagramNotFoundError"),Wr);function ko(e){return typeof e>"u"||e===null}d(ko,"isNothing");function Wh(e){return typeof e=="object"&&e!==null}d(Wh,"isObject");function qh(e){return Array.isArray(e)?e:ko(e)?[]:[e]}d(qh,"toArray");function Hh(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}d(Hh,"extend");function jh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}d(jh,"repeat");function Yh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}d(Yh,"isNegativeZero");var dy=ko,gy=Wh,my=qh,yy=jh,xy=Yh,by=Hh,vt={isNothing:dy,isObject:gy,toArray:my,repeat:yy,isNegativeZero:xy,extend:by};function So(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
82
|
+
|
|
83
|
+
`+e.mark.snippet),i+" "+r):i}d(So,"formatError");function Vr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=So(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}d(Vr,"YAMLException$1");Vr.prototype=Object.create(Error.prototype);Vr.prototype.constructor=Vr;Vr.prototype.toString=d(function(t){return this.name+": "+So(this,t)},"toString");var Vt=Vr;function vn(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}d(vn,"getLine");function kn(e,t){return vt.repeat(" ",t-e.length)+e}d(kn,"padStart");function Uh(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 r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",c,l,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=vn(e.buffer,i[o-c],n[o-c],e.position-(i[o]-i[o-c]),u),s=vt.repeat(" ",t.indent)+kn((e.line-c+1).toString(),h)+" | "+l.str+`
|
|
84
|
+
`+s;for(l=vn(e.buffer,i[o],n[o],e.position,u),s+=vt.repeat(" ",t.indent)+kn((e.line+1).toString(),h)+" | "+l.str+`
|
|
85
|
+
`,s+=vt.repeat("-",t.indent+h+3+l.pos)+`^
|
|
86
|
+
`,c=1;c<=t.linesAfter&&!(o+c>=n.length);c++)l=vn(e.buffer,i[o+c],n[o+c],e.position-(i[o]-i[o+c]),u),s+=vt.repeat(" ",t.indent)+kn((e.line+c+1).toString(),h)+" | "+l.str+`
|
|
87
|
+
`;return s.replace(/\n$/,"")}d(Uh,"makeSnippet");var _y=Uh,Cy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],wy=["scalar","sequence","mapping"];function Gh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Gh,"compileStyleAliases");function Vh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Cy.indexOf(r)===-1)throw new Vt('Unknown option "'+r+'" 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(r){return r},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=Gh(t.styleAliases||null),wy.indexOf(this.kind)===-1)throw new Vt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(Vh,"Type$1");var Rt=Vh;function Ss(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}d(Ss,"compileList");function Xh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(d(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}d(Xh,"compileMap");function Nn(e){return this.extend(e)}d(Nn,"Schema$1");Nn.prototype.extend=d(function(t){var r=[],i=[];if(t instanceof Rt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Vt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Rt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Vt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Vt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Rt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Nn.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ss(n,"implicit"),n.compiledExplicit=Ss(n,"explicit"),n.compiledTypeMap=Xh(n.compiledImplicit,n.compiledExplicit),n},"extend");var vy=Nn,ky=new Rt("tag:yaml.org,2002:str",{kind:"scalar",construct:d(function(e){return e!==null?e:""},"construct")}),Sy=new Rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:d(function(e){return e!==null?e:[]},"construct")}),Ty=new Rt("tag:yaml.org,2002:map",{kind:"mapping",construct:d(function(e){return e!==null?e:{}},"construct")}),By=new vy({explicit:[ky,Sy,Ty]});function Zh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}d(Zh,"resolveYamlNull");function Kh(){return null}d(Kh,"constructYamlNull");function Qh(e){return e===null}d(Qh,"isNull");var Ly=new Rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zh,construct:Kh,predicate:Qh,represent:{canonical:d(function(){return"~"},"canonical"),lowercase:d(function(){return"null"},"lowercase"),uppercase:d(function(){return"NULL"},"uppercase"),camelcase:d(function(){return"Null"},"camelcase"),empty:d(function(){return""},"empty")},defaultStyle:"lowercase"});function Jh(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")}d(Jh,"resolveYamlBoolean");function tu(e){return e==="true"||e==="True"||e==="TRUE"}d(tu,"constructYamlBoolean");function eu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}d(eu,"isBoolean");var Ay=new Rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Jh,construct:tu,predicate:eu,represent:{lowercase:d(function(e){return e?"true":"false"},"lowercase"),uppercase:d(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:d(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ru(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}d(ru,"isHexCode");function iu(e){return 48<=e&&e<=55}d(iu,"isOctCode");function nu(e){return 48<=e&&e<=57}d(nu,"isDecCode");function au(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!ru(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!iu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!nu(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}d(au,"resolveYamlInteger");function su(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}d(su,"constructYamlInteger");function ou(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!vt.isNegativeZero(e)}d(ou,"isInteger");var My=new Rt("tag:yaml.org,2002:int",{kind:"scalar",resolve:au,construct:su,predicate:ou,represent:{binary:d(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(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"]}}),Ey=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lu(e){return!(e===null||!Ey.test(e)||e[e.length-1]==="_")}d(lu,"resolveYamlFloat");function cu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}d(cu,"constructYamlFloat");var Fy=/^[-+]?[0-9]+e/;function hu(e,t){var r;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(vt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Fy.test(r)?r.replace("e",".e"):r}d(hu,"representYamlFloat");function uu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||vt.isNegativeZero(e))}d(uu,"isFloat");var $y=new Rt("tag:yaml.org,2002:float",{kind:"scalar",resolve:lu,construct:cu,predicate:uu,represent:hu,defaultStyle:"lowercase"}),fu=By.extend({implicit:[Ly,Ay,My,$y]}),Oy=fu,pu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),du=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 gu(e){return e===null?!1:pu.exec(e)!==null||du.exec(e)!==null}d(gu,"resolveYamlTimestamp");function mu(e){var t,r,i,n,a,o,s,c=0,l=null,h,u,f;if(t=pu.exec(e),t===null&&(t=du.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,n,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}d(mu,"constructYamlTimestamp");function yu(e){return e.toISOString()}d(yu,"representYamlTimestamp");var Dy=new Rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gu,construct:mu,instanceOf:Date,represent:yu});function xu(e){return e==="<<"||e===null}d(xu,"resolveYamlMerge");var Ry=new Rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xu}),To=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
88
|
+
\r`;function bu(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=To;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}d(bu,"resolveYamlBinary");function _u(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=To,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}d(_u,"constructYamlBinary");function Cu(e){var t="",r=0,i,n,a=e.length,o=To;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}d(Cu,"representYamlBinary");function wu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(wu,"isBinary");var Iy=new Rt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:bu,construct:_u,predicate:wu,represent:Cu}),Py=Object.prototype.hasOwnProperty,Ny=Object.prototype.toString;function vu(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Ny.call(n)!=="[object Object]")return!1;for(a in n)if(Py.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}d(vu,"resolveYamlOmap");function ku(e){return e!==null?e:[]}d(ku,"constructYamlOmap");var zy=new Rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vu,construct:ku}),Wy=Object.prototype.toString;function Su(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Wy.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}d(Su,"resolveYamlPairs");function Tu(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}d(Tu,"constructYamlPairs");var qy=new Rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Su,construct:Tu}),Hy=Object.prototype.hasOwnProperty;function Bu(e){if(e===null)return!0;var t,r=e;for(t in r)if(Hy.call(r,t)&&r[t]!==null)return!1;return!0}d(Bu,"resolveYamlSet");function Lu(e){return e!==null?e:{}}d(Lu,"constructYamlSet");var jy=new Rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bu,construct:Lu}),Au=Oy.extend({implicit:[Dy,Ry],explicit:[Iy,zy,qy,jy]}),Ue=Object.prototype.hasOwnProperty,zn=1,Mu=2,Eu=3,Wn=4,is=1,Yy=2,Kl=3,Uy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Gy=/[\x85\u2028\u2029]/,Vy=/[,\[\]\{\}]/,Fu=/^(?:!|!!|![a-z\-]+!)$/i,$u=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ts(e){return Object.prototype.toString.call(e)}d(Ts,"_class");function he(e){return e===10||e===13}d(he,"is_EOL");function Ye(e){return e===9||e===32}d(Ye,"is_WHITE_SPACE");function zt(e){return e===9||e===32||e===10||e===13}d(zt,"is_WS_OR_EOL");function nr(e){return e===44||e===91||e===93||e===123||e===125}d(nr,"is_FLOW_INDICATOR");function Ou(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}d(Ou,"fromHexCode");function Du(e){return e===120?2:e===117?4:e===85?8:0}d(Du,"escapedHexLen");function Ru(e){return 48<=e&&e<=57?e-48:-1}d(Ru,"fromDecimalCode");function Bs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
89
|
+
`: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":""}d(Bs,"simpleEscapeSequence");function Iu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}d(Iu,"charFromCodepoint");var Pu=new Array(256),Nu=new Array(256);for(Je=0;Je<256;Je++)Pu[Je]=Bs(Je)?1:0,Nu[Je]=Bs(Je);var Je;function zu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Au,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=[]}d(zu,"State$1");function Bo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=_y(r),new Vt(t,r)}d(Bo,"generateError");function Z(e,t){throw Bo(e,t)}d(Z,"throwError");function Oi(e,t){e.onWarning&&e.onWarning.call(null,Bo(e,t))}d(Oi,"throwWarning");var Ql={YAML:d(function(t,r,i){var n,a,o;t.version!==null&&Z(t,"duplication of %YAML directive"),i.length!==1&&Z(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Z(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&Z(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Oi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var n,a;i.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Fu.test(n)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Ue.call(t.tagMap,n)&&Z(t,'there is a previously declared suffix for "'+n+'" tag handle'),$u.test(a)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Z(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Re(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else Uy.test(s)&&Z(e,"the stream contains non-printable characters");e.result+=s}}d(Re,"captureSegment");function Ls(e,t,r,i){var n,a,o,s;for(vt.isObject(r)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],Ue.call(t,a)||(t[a]=r[a],i[a]=!0)}d(Ls,"mergeMappings");function ar(e,t,r,i,n,a,o,s,c){var l,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,h=n.length;l<h;l+=1)Array.isArray(n[l])&&Z(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Ts(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Ts(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(l=0,h=a.length;l<h;l+=1)Ls(e,t,a[l],r);else Ls(e,t,a,r);else!e.json&&!Ue.call(r,n)&&Ue.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,Z(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}d(ar,"storeMappingPair");function _a(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++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}d(_a,"readLineBreak");function _t(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ye(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(he(n))for(_a(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Oi(e,"deficient indentation"),i}d(_t,"skipSeparationSpace");function Vi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||zt(r)))}d(Vi,"testDocumentSeparator");function Ca(e,t){t===1?e.result+=" ":t>1&&(e.result+=vt.repeat(`
|
|
90
|
+
`,t-1))}d(Ca,"writeFoldedLines");function Wu(e,t,r){var i,n,a,o,s,c,l,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),zt(p)||nr(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),zt(n)||r&&nr(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),zt(n)||r&&nr(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),zt(i))break}else{if(e.position===e.lineStart&&Vi(e)||r&&nr(p))break;if(he(p))if(c=e.line,l=e.lineStart,h=e.lineIndent,_t(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}s&&(Re(e,a,o,!1),Ca(e,e.line-c),a=o=e.position,s=!1),Ye(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Re(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(Wu,"readPlainScalar");function qu(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Re(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else he(r)?(Re(e,i,n,!0),Ca(e,_t(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Vi(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}d(qu,"readSingleQuotedScalar");function Hu(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Re(e,r,e.position,!0),e.position++,!0;if(s===92){if(Re(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),he(s))_t(e,!1,t);else if(s<256&&Pu[s])e.result+=Nu[s],e.position++;else if((o=Du(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Ou(s))>=0?a=(a<<4)+o:Z(e,"expected hexadecimal character");e.result+=Iu(a),e.position++}else Z(e,"unknown escape sequence");r=i=e.position}else he(s)?(Re(e,r,i,!0),Ca(e,_t(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Vi(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}d(Hu,"readDoubleQuotedScalar");function ju(e,t){var r=!0,i,n,a,o=e.tag,s,c=e.anchor,l,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,s=[];else if(b===123)h=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(_t(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=s,!0;r?b===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),zt(l)&&(u=f=!0,e.position++,_t(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,ur(e,t,zn,!1,!0),y=e.tag,m=e.result,_t(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),_t(e,!0,t),ur(e,t,zn,!1,!0),x=e.result),p?ar(e,s,g,y,m,x,i,n,a):u?s.push(ar(e,null,g,y,m,x,i,n,a)):s.push(m),_t(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Z(e,"unexpected end of the stream within a flow collection")}d(ju,"readFlowCollection");function Yu(e,t){var r,i,n=is,a=!1,o=!1,s=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)is===n?n=u===43?Kl:Yy:Z(e,"repeat of a chomping mode identifier");else if((h=Ru(u))>=0)h===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Ye(u)){do u=e.input.charCodeAt(++e.position);while(Ye(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!he(u)&&u!==0)}for(;u!==0;){for(_a(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),he(u)){c++;continue}if(e.lineIndent<s){n===Kl?e.result+=vt.repeat(`
|
|
91
|
+
`,a?1+c:c):n===is&&a&&(e.result+=`
|
|
92
|
+
`);break}for(i?Ye(u)?(l=!0,e.result+=vt.repeat(`
|
|
93
|
+
`,a?1+c:c)):l?(l=!1,e.result+=vt.repeat(`
|
|
94
|
+
`,c+1)):c===0?a&&(e.result+=" "):e.result+=vt.repeat(`
|
|
95
|
+
`,c):e.result+=vt.repeat(`
|
|
96
|
+
`,a?1+c:c),a=!0,o=!0,c=0,r=e.position;!he(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Re(e,r,e.position,!1)}return!0}d(Yu,"readBlockScalar");function As(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!zt(o))));){if(s=!0,e.position++,_t(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,ur(e,t,Eu,!1,!0),a.push(e.result),_t(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}d(As,"readBlockSequence");function Uu(e,t,r){var i,n,a,o,s,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),p=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&zt(i))b===63?(y&&(ar(e,u,f,p,g,null,o,s,c),p=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,c=e.position,!ur(e,r,Mu,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Ye(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),zt(b)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ar(e,u,f,p,g,null,o,s,c),p=g=m=null),x=!0,y=!1,n=!1,p=e.tag,g=e.result;else if(x)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,c=e.position),ur(e,t,Wn,!0,n)&&(y?g=e.result:m=e.result),y||(ar(e,u,f,p,g,m,o,s,c),p=g=m=null),_t(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ar(e,u,f,p,g,null,o,s,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}d(Uu,"readBlockMapping");function Gu(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!zt(o);)o===33&&(i?Z(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Fu.test(n)||Z(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Vy.test(a)&&Z(e,"tag suffix cannot contain flow indicator characters")}a&&!$u.test(a)&&Z(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Z(e,"tag name is malformed: "+a)}return r?e.tag=a:Ue.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:Z(e,'undeclared tag handle "'+n+'"'),!0}d(Gu,"readTagProperty");function Vu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!zt(r)&&!nr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}d(Vu,"readAnchorProperty");function Xu(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!zt(i)&&!nr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ue.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],_t(e,!0,-1),!0}d(Xu,"readAlias");function ur(e,t,r,i,n){var a,o,s,c=1,l=!1,h=!1,u,f,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=Wn===r||Eu===r,i&&_t(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Gu(e)||Vu(e);)_t(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Wn===r)&&(zn===r||Mu===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?s&&(As(e,y)||Uu(e,y,m))||ju(e,m)?h=!0:(o&&Yu(e,m)||qu(e,m)||Hu(e,m)?h=!0:Xu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):Wu(e,m,zn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=s&&As(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ue.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,f=p.length;u<f;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}d(ur,"composeNode");function Zu(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_t(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;Ye(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!he(o));break}if(he(o))break;for(r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&_a(e),Ue.call(Ql,i)?Ql[i](e,i,n):Oi(e,'unknown document directive "'+i+'"')}if(_t(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,_t(e,!0,-1)):a&&Z(e,"directives end mark is expected"),ur(e,e.lineIndent-1,Wn,!1,!0),_t(e,!0,-1),e.checkLineBreaks&&Gy.test(e.input.slice(t,e.position))&&Oi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Vi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_t(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}d(Zu,"readDocument");function Lo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new zu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Zu(r);return r.documents}d(Lo,"loadDocuments");function Xy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Lo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}d(Xy,"loadAll$1");function Ku(e,t){var r=Lo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Vt("expected a single document in the stream, but found more")}}d(Ku,"load$1");var Zy=Ku,Ky={load:Zy},Qu=Object.prototype.toString,Ju=Object.prototype.hasOwnProperty,Ao=65279,Qy=9,Di=10,Jy=13,tx=32,ex=33,rx=34,Ms=35,ix=37,nx=38,ax=39,sx=42,tf=44,ox=45,qn=58,lx=61,cx=62,hx=63,ux=64,ef=91,rf=93,fx=96,nf=123,px=124,af=125,It={};It[0]="\\0";It[7]="\\a";It[8]="\\b";It[9]="\\t";It[10]="\\n";It[11]="\\v";It[12]="\\f";It[13]="\\r";It[27]="\\e";It[34]='\\"';It[92]="\\\\";It[133]="\\N";It[160]="\\_";It[8232]="\\L";It[8233]="\\P";var dx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],gx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function sf(e,t){var r,i,n,a,o,s,c;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&Ju.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}d(sf,"compileStyleMap");function of(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Vt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+vt.repeat("0",i-t.length)+t}d(of,"encodeHex");var mx=1,Ri=2;function lf(e){this.schema=e.schema||Au,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=vt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=sf(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==='"'?Ri:mx,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}d(lf,"State");function Es(e,t){for(var r=vt.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
|
|
98
|
+
`,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
|
|
99
|
+
`&&(a+=r),a+=o;return a}d(Es,"indentString");function Hn(e,t){return`
|
|
100
|
+
`+vt.repeat(" ",e.indent*t)}d(Hn,"generateNextLine");function cf(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}d(cf,"testImplicitResolving");function Ii(e){return e===tx||e===Qy}d(Ii,"isWhitespace");function Xr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ao||65536<=e&&e<=1114111}d(Xr,"isPrintable");function Fs(e){return Xr(e)&&e!==Ao&&e!==Jy&&e!==Di}d(Fs,"isNsCharOrWhitespace");function $s(e,t,r){var i=Fs(e),n=i&&!Ii(e);return(r?i:i&&e!==tf&&e!==ef&&e!==rf&&e!==nf&&e!==af)&&e!==Ms&&!(t===qn&&!n)||Fs(t)&&!Ii(t)&&e===Ms||t===qn&&n}d($s,"isPlainSafe");function hf(e){return Xr(e)&&e!==Ao&&!Ii(e)&&e!==ox&&e!==hx&&e!==qn&&e!==tf&&e!==ef&&e!==rf&&e!==nf&&e!==af&&e!==Ms&&e!==nx&&e!==sx&&e!==ex&&e!==px&&e!==lx&&e!==cx&&e!==ax&&e!==rx&&e!==ix&&e!==ux&&e!==fx}d(hf,"isPlainSafeFirst");function uf(e){return!Ii(e)&&e!==qn}d(uf,"isPlainSafeLast");function Er(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}d(Er,"codePointAt");function Mo(e){var t=/^\n* /;return t.test(e)}d(Mo,"needIndentIndicator");var ff=1,Os=2,pf=3,df=4,Ar=5;function gf(e,t,r,i,n,a,o,s){var c,l=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=hf(Er(e,0))&&uf(Er(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Er(e,c),!Xr(l))return Ar;m=m&&$s(l,h,s),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Er(e,c),l===Di)u=!0,p&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!Xr(l))return Ar;m=m&&$s(l,h,s),h=l}f=f||p&&c-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!n(e)?ff:a===Ri?Ar:Os:r>9&&Mo(e)?Ar:o?a===Ri?Ar:Os:f?df:pf}d(gf,"chooseScalarStyle");function mf(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Ri?'""':"''";if(!e.noCompatMode&&(dx.indexOf(t)!==-1||gx.test(t)))return e.quotingType===Ri?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return cf(e,l)}switch(d(c,"testAmbiguity"),gf(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,n)){case ff:return t;case Os:return"'"+t.replace(/'/g,"''")+"'";case pf:return"|"+Ds(t,e.indent)+Rs(Es(t,a));case df:return">"+Ds(t,e.indent)+Rs(Es(yf(t,o),a));case Ar:return'"'+xf(t)+'"';default:throw new Vt("impossible error: invalid scalar style")}}()}d(mf,"writeScalar");function Ds(e,t){var r=Mo(e)?String(t):"",i=e[e.length-1]===`
|
|
101
|
+
`,n=i&&(e[e.length-2]===`
|
|
102
|
+
`||e===`
|
|
103
|
+
`),a=n?"+":i?"":"-";return r+a+`
|
|
104
|
+
`}d(Ds,"blockHeader");function Rs(e){return e[e.length-1]===`
|
|
105
|
+
`?e.slice(0,-1):e}d(Rs,"dropEndingNewline");function yf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=e.indexOf(`
|
|
106
|
+
`);return l=l!==-1?l:e.length,r.lastIndex=l,Is(e.slice(0,l),t)}(),n=e[0]===`
|
|
107
|
+
`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],c=o[2];a=c[0]===" ",i+=s+(!n&&!a&&c!==""?`
|
|
108
|
+
`:"")+Is(c,t),n=a}return i}d(yf,"foldString");function Is(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,c="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,c+=`
|
|
109
|
+
`+e.slice(n,a),n=a+1),o=s;return c+=`
|
|
110
|
+
`,e.length-n>t&&o>n?c+=e.slice(n,o)+`
|
|
111
|
+
`+e.slice(o+1):c+=e.slice(n),c.slice(1)}d(Is,"foldLine");function xf(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Er(e,n),i=It[r],!i&&Xr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||of(r);return t}d(xf,"escapeString");function bf(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(_e(e,t,s,!1,!1)||typeof s>"u"&&_e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}d(bf,"writeFlowSequence");function Ps(e,t,r,i){var n="",a=e.tag,o,s,c;for(o=0,s=r.length;o<s;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(_e(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&_e(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Hn(e,t)),e.dump&&Di===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}d(Ps,"writeBlockSequence");function _f(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,c,l,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=a[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),_e(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),_e(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}d(_f,"writeFlowMapping");function Cf(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Vt("sortKeys must be a boolean or a function");for(s=0,c=o.length;s<c;s+=1)f="",(!i||n!=="")&&(f+=Hn(e,t)),l=o[s],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),_e(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Di===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Hn(e,t)),_e(e,t+1,h,!0,u)&&(e.dump&&Di===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}d(Cf,"writeBlockMapping");function Ns(e,t,r){var i,n,a,o,s,c;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Qu.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(Ju.call(s.represent,c))i=s.represent[c](t,c);else throw new Vt("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}d(Ns,"detectType");function _e(e,t,r,i,n,a,o){e.tag=null,e.dump=r,Ns(e,r,!1)||Ns(e,r,!0);var s=Qu.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(Cf(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(_f(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Ps(e,t-1,e.dump,n):Ps(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(bf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&mf(e,e.dump,t,a,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Vt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}d(_e,"writeNode");function wf(e,t){var r=[],i=[],n,a;for(jn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}d(wf,"getDuplicateReferences");function jn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)jn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)jn(e[i[n]],t,r)}d(jn,"inspectNode");function yx(e,t){t=t||{};var r=new lf(t);r.noRefs||wf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),_e(r,0,i,!0,!0)?r.dump+`
|
|
112
|
+
`:""}d(yx,"dump$1");function xx(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.")}}d(xx,"renamed");var bx=fu,_x=Ky.load;/*! Bundled license information:
|
|
113
|
+
|
|
114
|
+
js-yaml/dist/js-yaml.mjs:
|
|
115
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
116
|
+
*/var ie={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}d(wi,"calculateDeltaAndAngle");var xt=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Cx=d(e=>({x:d(function(t,r,i){let n=0;const a=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ie,e.arrowTypeStart)){const{angle:p,deltaX:g}=wi(i[0],i[1]);n=ie[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ie,e.arrowTypeEnd)){const{angle:p,deltaX:g}=wi(i[i.length-1],i[i.length-2]);n=ie[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(xt(t).x-xt(i[i.length-1]).x),s=Math.abs(xt(t).y-xt(i[i.length-1]).y),c=Math.abs(xt(t).x-xt(i[0]).x),l=Math.abs(xt(t).y-xt(i[0]).y),h=ie[e.arrowTypeStart],u=ie[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let p=u+f-o;p*=a==="right"?-1:1,n-=p}if(c<h&&c>0&&l<h){let p=h+f-c;p*=a==="right"?-1:1,n+=p}return xt(t).x+n},"x"),y:d(function(t,r,i){let n=0;const a=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ie,e.arrowTypeStart)){const{angle:p,deltaY:g}=wi(i[0],i[1]);n=ie[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ie,e.arrowTypeEnd)){const{angle:p,deltaY:g}=wi(i[i.length-1],i[i.length-2]);n=ie[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(xt(t).y-xt(i[i.length-1]).y),s=Math.abs(xt(t).x-xt(i[i.length-1]).x),c=Math.abs(xt(t).y-xt(i[0]).y),l=Math.abs(xt(t).x-xt(i[0]).x),h=ie[e.arrowTypeStart],u=ie[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let p=u+f-o;p*=a==="up"?-1:1,n-=p}if(c<h&&c>0&&l<h){let p=h+f-c;p*=a==="up"?-1:1,n+=p}return xt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Eo=d(({flowchart:e})=>{var n,a;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");const wx=Object.freeze({left:0,top:0,width:16,height:16}),Yn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),vf=Object.freeze({...wx,...Yn}),vx=Object.freeze({...vf,body:"",hidden:!1}),kx=Object.freeze({width:null,height:null}),Sx=Object.freeze({...kx,...Yn}),Tx=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),c=n.pop(),l={provider:n.length>0?n[0]:i,prefix:c,name:s};return ns(l)?l:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return ns(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return ns(s,r)?s:null}return null},ns=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Bx(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Jl(e,t){const r=Bx(e,t);for(const i in vx)i in Yn?i in e&&!(i in r)&&(r[i]=Yn[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Lx(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,c=s&&a(s);c&&(n[o]=[s].concat(c))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function tc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Jl(i[s]||n[s],a)}return o(t),r.forEach(o),Jl(e,a)}function Ax(e,t){if(e.icons[t])return tc(e,t,[]);const r=Lx(e,[t])[t];return r?tc(e,t,r):null}const Mx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ex=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ec(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Mx);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=Ex.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function Fx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function $x(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Ox(e,t,r){const i=Fx(e);return $x(i.defs,t+i.content+r)}const Dx=e=>e==="unset"||e==="undefined"||e==="none";function Rx(e,t){const r={...vf,...e},i={...Sx,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let k;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}C%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=Ox(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,c=n.width,l=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?l:s,h=ec(u,c/l)):(h=o==="auto"?c:o,u=s===null?ec(h,l/c):s==="auto"?l:s);const f={},p=(m,y)=>{Dx(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[n.left,n.top,c,l];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const Ix=/\sid="(\S+)"/g,Px="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Nx=0;function zx(e,t=Px){const r=[];let i;for(;i=Ix.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(Nx++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function Wx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var qx={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},zs=new Map,kf=new Map,Hx=d(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(O.debug("Registering icon pack:",t.name),"loader"in t)kf.set(t.name,t.loader);else if("icons"in t)zs.set(t.name,t.icons);else throw O.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),jx=d(async(e,t)=>{const r=Tx(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=zs.get(i);if(!n){const o=kf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},zs.set(i,n)}catch(s){throw O.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Ax(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),wa=d(async(e,t)=>{let r;try{r=await jx(e,t==null?void 0:t.fallbackPrefix)}catch(a){O.error(a),r=qx}const i=Rx(r,t);return Wx(zx(i.body),i.attributes)},"getIconSVG"),Fo={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.BLANK_URL=Bt.relativeFirstCharacters=Bt.whitespaceEscapeCharsRegex=Bt.urlSchemeRegex=Bt.ctrlCharactersRegex=Bt.htmlCtrlEntityRegex=Bt.htmlEntitiesRegex=Bt.invalidProtocolRegex=void 0;Bt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Bt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Bt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Bt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Bt.urlSchemeRegex=/^.+(:|:)/gim;Bt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Bt.relativeFirstCharacters=[".","/"];Bt.BLANK_URL="about:blank";Object.defineProperty(Fo,"__esModule",{value:!0});var Sf=Fo.sanitizeUrl=void 0,Dt=Bt;function Yx(e){return Dt.relativeFirstCharacters.indexOf(e[0])>-1}function Ux(e){var t=e.replace(Dt.ctrlCharactersRegex,"");return t.replace(Dt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Gx(e){return URL.canParse(e)}function rc(e){try{return decodeURIComponent(e)}catch{return e}}function Vx(e){if(!e)return Dt.BLANK_URL;var t,r=rc(e.trim());do r=Ux(r).replace(Dt.htmlCtrlEntityRegex,"").replace(Dt.ctrlCharactersRegex,"").replace(Dt.whitespaceEscapeCharsRegex,"").trim(),r=rc(r),t=r.match(Dt.ctrlCharactersRegex)||r.match(Dt.htmlEntitiesRegex)||r.match(Dt.htmlCtrlEntityRegex)||r.match(Dt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Dt.BLANK_URL;if(Yx(i))return i;var n=i.trimStart(),a=n.match(Dt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Dt.invalidProtocolRegex.test(o))return Dt.BLANK_URL;var s=n.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!Gx(s))return Dt.BLANK_URL;var c=new URL(s);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return s}Sf=Fo.sanitizeUrl=Vx;var Xx={value:()=>{}};function Tf(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Sn(r)}function Sn(e){this._=e}function Zx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Sn.prototype=Tf.prototype={constructor:Sn,on:function(e,t){var r=this._,i=Zx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=Kx(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=ic(r[n],e.name,t);else if(t==null)for(n in r)r[n]=ic(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Sn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Kx(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function ic(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Xx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ws="http://www.w3.org/1999/xhtml";const nc={svg:"http://www.w3.org/2000/svg",xhtml:Ws,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function va(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),nc.hasOwnProperty(t)?{space:nc[t],local:e}:e}function Qx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ws&&t.documentElement.namespaceURI===Ws?t.createElement(e):t.createElementNS(r,e)}}function Jx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bf(e){var t=va(e);return(t.local?Jx:Qx)(t)}function tb(){}function $o(e){return e==null?tb:function(){return this.querySelector(e)}}function eb(e){typeof e!="function"&&(e=$o(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),c,l,h=0;h<o;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new Jt(i,this._parents)}function rb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ib(){return[]}function Lf(e){return e==null?ib:function(){return this.querySelectorAll(e)}}function nb(e){return function(){return rb(e.apply(this,arguments))}}function ab(e){typeof e=="function"?e=nb(e):e=Lf(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(i.push(e.call(c,c.__data__,l,o)),n.push(c));return new Jt(i,n)}function Af(e){return function(){return this.matches(e)}}function Mf(e){return function(t){return t.matches(e)}}var sb=Array.prototype.find;function ob(e){return function(){return sb.call(this.children,e)}}function lb(){return this.firstElementChild}function cb(e){return this.select(e==null?lb:ob(typeof e=="function"?e:Mf(e)))}var hb=Array.prototype.filter;function ub(){return Array.from(this.children)}function fb(e){return function(){return hb.call(this.children,e)}}function pb(e){return this.selectAll(e==null?ub:fb(typeof e=="function"?e:Mf(e)))}function db(e){typeof e!="function"&&(e=Af(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Jt(i,this._parents)}function Ef(e){return new Array(e.length)}function gb(){return new Jt(this._enter||this._groups.map(Ef),this._parents)}function Un(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Un.prototype={constructor:Un,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 mb(e){return function(){return e}}function yb(e,t,r,i,n,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new Un(e,a[o]);for(;o<c;++o)(s=t[o])&&(n[o]=s)}function xb(e,t,r,i,n,a,o){var s,c,l=new Map,h=t.length,u=a.length,f=new Array(h),p;for(s=0;s<h;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+"",l.has(p)?n[s]=c:l.set(p,c));for(s=0;s<u;++s)p=o.call(e,a[s],s,a)+"",(c=l.get(p))?(i[s]=c,c.__data__=a[s],l.delete(p)):r[s]=new Un(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(f[s])===c&&(n[s]=c)}function bb(e){return e.__data__}function _b(e,t){if(!arguments.length)return Array.from(this,bb);var r=t?xb:yb,i=this._parents,n=this._groups;typeof e!="function"&&(e=mb(e));for(var a=n.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=i[l],u=n[l],f=u.length,p=Cb(e.call(h,h&&h.__data__,l,i)),g=p.length,m=s[l]=new Array(g),y=o[l]=new Array(g),x=c[l]=new Array(f);r(h,u,m,y,x,p,t);for(var b=0,C=0,k,S;b<g;++b)if(k=m[b]){for(b>=C&&(C=b+1);!(S=y[C])&&++C<g;);k._next=S||null}}return o=new Jt(o,i),o._enter=s,o._exit=c,o}function Cb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wb(){return new Jt(this._exit||this._groups.map(Ef),this._parents)}function vb(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function kb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),c=0;c<o;++c)for(var l=r[c],h=i[c],u=l.length,f=s[c]=new Array(u),p,g=0;g<u;++g)(p=l[g]||h[g])&&(f[g]=p);for(;c<n;++c)s[c]=r[c];return new Jt(s,this._parents)}function Sb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Tb(e){e||(e=Bb);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,c=n[a]=new Array(s),l,h=0;h<s;++h)(l=o[h])&&(c[h]=l);c.sort(t)}return new Jt(n,this._parents).order()}function Bb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Lb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ab(){return Array.from(this)}function Mb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function Eb(){let e=0;for(const t of this)++e;return e}function Fb(){return!this.node()}function $b(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function Ob(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rb(e,t){return function(){this.setAttribute(e,t)}}function Ib(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Pb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Nb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function zb(e,t){var r=va(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Db:Ob:typeof t=="function"?r.local?Nb:Pb:r.local?Ib:Rb)(r,t))}function Ff(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wb(e){return function(){this.style.removeProperty(e)}}function qb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Hb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function jb(e,t,r){return arguments.length>1?this.each((t==null?Wb:typeof t=="function"?Hb:qb)(e,t,r??"")):Zr(this.node(),e)}function Zr(e,t){return e.style.getPropertyValue(t)||Ff(e).getComputedStyle(e,null).getPropertyValue(t)}function Yb(e){return function(){delete this[e]}}function Ub(e,t){return function(){this[e]=t}}function Gb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Vb(e,t){return arguments.length>1?this.each((t==null?Yb:typeof t=="function"?Gb:Ub)(e,t)):this.node()[e]}function $f(e){return e.trim().split(/^|\s+/)}function Oo(e){return e.classList||new Of(e)}function Of(e){this._node=e,this._names=$f(e.getAttribute("class")||"")}Of.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 Df(e,t){for(var r=Oo(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Rf(e,t){for(var r=Oo(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function Xb(e){return function(){Df(this,e)}}function Zb(e){return function(){Rf(this,e)}}function Kb(e,t){return function(){(t.apply(this,arguments)?Df:Rf)(this,e)}}function Qb(e,t){var r=$f(e+"");if(arguments.length<2){for(var i=Oo(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Kb:t?Xb:Zb)(r,t))}function Jb(){this.textContent=""}function t1(e){return function(){this.textContent=e}}function e1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function r1(e){return arguments.length?this.each(e==null?Jb:(typeof e=="function"?e1:t1)(e)):this.node().textContent}function i1(){this.innerHTML=""}function n1(e){return function(){this.innerHTML=e}}function a1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function s1(e){return arguments.length?this.each(e==null?i1:(typeof e=="function"?a1:n1)(e)):this.node().innerHTML}function o1(){this.nextSibling&&this.parentNode.appendChild(this)}function l1(){return this.each(o1)}function c1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function h1(){return this.each(c1)}function u1(e){var t=typeof e=="function"?e:Bf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function f1(){return null}function p1(e,t){var r=typeof e=="function"?e:Bf(e),i=t==null?f1:typeof t=="function"?t:$o(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function d1(){var e=this.parentNode;e&&e.removeChild(this)}function g1(){return this.each(d1)}function m1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function y1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function x1(e){return this.select(e?y1:m1)}function b1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _1(e){return function(t){e.call(this,t,this.__data__)}}function C1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function w1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function v1(e,t,r){return function(){var i=this.__on,n,a=_1(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function k1(e,t,r){var i=C1(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(n=0,h=s[c];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?v1:w1,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function If(e,t,r){var i=Ff(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function S1(e,t){return function(){return If(this,e,t)}}function T1(e,t){return function(){return If(this,e,t.apply(this,arguments))}}function B1(e,t){return this.each((typeof t=="function"?T1:S1)(e,t))}function*L1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Pf=[null];function Jt(e,t){this._groups=e,this._parents=t}function Xi(){return new Jt([[document.documentElement]],Pf)}function A1(){return this}Jt.prototype=Xi.prototype={constructor:Jt,select:eb,selectAll:ab,selectChild:cb,selectChildren:pb,filter:db,data:_b,enter:gb,exit:wb,join:vb,merge:kb,selection:A1,order:Sb,sort:Tb,call:Lb,nodes:Ab,node:Mb,size:Eb,empty:Fb,each:$b,attr:zb,style:jb,property:Vb,classed:Qb,text:r1,html:s1,raise:l1,lower:h1,append:u1,insert:p1,remove:g1,clone:x1,datum:b1,on:k1,dispatch:B1,[Symbol.iterator]:L1};function lt(e){return typeof e=="string"?new Jt([[document.querySelector(e)]],[document.documentElement]):new Jt([[e]],Pf)}function Do(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Nf(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Zi(){}var Pi=.7,Gn=1/Pi,$r="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",M1=/^#([0-9a-f]{3,8})$/,E1=new RegExp(`^rgb\\(${$r},${$r},${$r}\\)$`),F1=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),$1=new RegExp(`^rgba\\(${$r},${$r},${$r},${Ni}\\)$`),O1=new RegExp(`^rgba\\(${xe},${xe},${xe},${Ni}\\)$`),D1=new RegExp(`^hsl\\(${Ni},${xe},${xe}\\)$`),R1=new RegExp(`^hsla\\(${Ni},${xe},${xe},${Ni}\\)$`),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};Do(Zi,zi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sc,formatHex:sc,formatHex8:I1,formatHsl:P1,formatRgb:oc,toString:oc});function sc(){return this.rgb().formatHex()}function I1(){return this.rgb().formatHex8()}function P1(){return zf(this).formatHsl()}function oc(){return this.rgb().formatRgb()}function zi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=M1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?lc(t):r===3?new Xt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?un(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?un(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=E1.exec(e))?new Xt(t[1],t[2],t[3],1):(t=F1.exec(e))?new Xt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$1.exec(e))?un(t[1],t[2],t[3],t[4]):(t=O1.exec(e))?un(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=D1.exec(e))?uc(t[1],t[2]/100,t[3]/100,1):(t=R1.exec(e))?uc(t[1],t[2]/100,t[3]/100,t[4]):ac.hasOwnProperty(e)?lc(ac[e]):e==="transparent"?new Xt(NaN,NaN,NaN,0):null}function lc(e){return new Xt(e>>16&255,e>>8&255,e&255,1)}function un(e,t,r,i){return i<=0&&(e=t=r=NaN),new Xt(e,t,r,i)}function N1(e){return e instanceof Zi||(e=zi(e)),e?(e=e.rgb(),new Xt(e.r,e.g,e.b,e.opacity)):new Xt}function qs(e,t,r,i){return arguments.length===1?N1(e):new Xt(e,t,r,i??1)}function Xt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Do(Xt,qs,Nf(Zi,{brighter(e){return e=e==null?Gn:Math.pow(Gn,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xt(lr(this.r),lr(this.g),lr(this.b),Vn(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:cc,formatHex:cc,formatHex8:z1,formatRgb:hc,toString:hc}));function cc(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function z1(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function hc(){const e=Vn(this.opacity);return`${e===1?"rgb(":"rgba("}${lr(this.r)}, ${lr(this.g)}, ${lr(this.b)}${e===1?")":`, ${e})`}`}function Vn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sr(e){return e=lr(e),(e<16?"0":"")+e.toString(16)}function uc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function zf(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof Zi||(e=zi(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,c=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=c<.5?a+n:2-a-n,o*=60):s=c>0&&c<1?0:o,new ce(o,s,c,e.opacity)}function W1(e,t,r,i){return arguments.length===1?zf(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Do(ce,W1,Nf(Zi,{brighter(e){return e=e==null?Gn:Math.pow(Gn,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new ce(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,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Xt(as(e>=240?e-240:e+120,n,i),as(e,n,i),as(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(fc(this.h),fn(this.s),fn(this.l),Vn(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=Vn(this.opacity);return`${e===1?"hsl(":"hsla("}${fc(this.h)}, ${fn(this.s)*100}%, ${fn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fc(e){return e=(e||0)%360,e<0?e+360:e}function fn(e){return Math.max(0,Math.min(1,e||0))}function as(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ro=e=>()=>e;function Wf(e,t){return function(r){return e+r*t}}function q1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function DL(e,t){var r=t-e;return r?Wf(e,r>180||r<-180?r-360*Math.round(r/360):r):Ro(isNaN(e)?t:e)}function H1(e){return(e=+e)==1?qf:function(t,r){return r-t?q1(t,r,e):Ro(isNaN(t)?r:t)}}function qf(e,t){var r=t-e;return r?Wf(e,r):Ro(isNaN(e)?t:e)}const pc=function e(t){var r=H1(t);function i(n,a){var o=r((n=qs(n)).r,(a=qs(a)).r),s=r(n.g,a.g),c=r(n.b,a.b),l=qf(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=c(h),n.opacity=l(h),n+""}}return i.gamma=e,i}(1);function He(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Hs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ss=new RegExp(Hs.source,"g");function j1(e){return function(){return e}}function Y1(e){return function(t){return e(t)+""}}function U1(e,t){var r=Hs.lastIndex=ss.lastIndex=0,i,n,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(i=Hs.exec(e))&&(n=ss.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,c.push({i:o,x:He(i,n)})),r=ss.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Y1(c[0].x):j1(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}var dc=180/Math.PI,js={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hf(e,t,r,i,n,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),e*i<t*r&&(e=-e,t=-t,c=-c,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*dc,skewX:Math.atan(c)*dc,scaleX:o,scaleY:s}}var pn;function G1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?js:Hf(t.a,t.b,t.c,t.d,t.e,t.f)}function V1(e){return e==null||(pn||(pn=document.createElementNS("http://www.w3.org/2000/svg","g")),pn.setAttribute("transform",e),!(e=pn.transform.baseVal.consolidate()))?js:(e=e.matrix,Hf(e.a,e.b,e.c,e.d,e.e,e.f))}function jf(e,t,r,i){function n(l){return l.length?l.pop()+" ":""}function a(l,h,u,f,p,g){if(l!==u||h!==f){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:He(l,u)},{i:m-2,x:He(h,f)})}else(u||f)&&p.push("translate("+u+t+f+r)}function o(l,h,u,f){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:He(l,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(l,h,u,f){l!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:He(l,h)}):h&&u.push(n(u)+"skewX("+h+i)}function c(l,h,u,f,p,g){if(l!==u||h!==f){var m=p.push(n(p)+"scale(",null,",",null,")");g.push({i:m-4,x:He(l,u)},{i:m-2,x:He(h,f)})}else(u!==1||f!==1)&&p.push(n(p)+"scale("+u+","+f+")")}return function(l,h){var u=[],f=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,u,f),o(l.rotate,h.rotate,u,f),s(l.skewX,h.skewX,u,f),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,f),l=h=null,function(p){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(p);return u.join("")}}}var X1=jf(G1,"px, ","px)","deg)"),Z1=jf(V1,", ",")",")"),Kr=0,vi=0,di=0,Yf=1e3,Xn,ki,Zn=0,fr=0,ka=0,Wi=typeof performance=="object"&&performance.now?performance:Date,Uf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Io(){return fr||(Uf(K1),fr=Wi.now()+ka)}function K1(){fr=0}function Kn(){this._call=this._time=this._next=null}Kn.prototype=Gf.prototype={constructor:Kn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Io():+r)+(t==null?0:+t),!this._next&&ki!==this&&(ki?ki._next=this:Xn=this,ki=this),this._call=e,this._time=r,Ys()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ys())}};function Gf(e,t,r){var i=new Kn;return i.restart(e,t,r),i}function Q1(){Io(),++Kr;for(var e=Xn,t;e;)(t=fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kr}function gc(){fr=(Zn=Wi.now())+ka,Kr=vi=0;try{Q1()}finally{Kr=0,t2(),fr=0}}function J1(){var e=Wi.now(),t=e-Zn;t>Yf&&(ka-=t,Zn=e)}function t2(){for(var e,t=Xn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Xn=r);ki=e,Ys(i)}function Ys(e){if(!Kr){vi&&(vi=clearTimeout(vi));var t=e-fr;t>24?(e<1/0&&(vi=setTimeout(gc,e-Wi.now()-ka)),di&&(di=clearInterval(di))):(di||(Zn=Wi.now(),di=setInterval(J1,Yf)),Kr=1,Uf(gc))}}function mc(e,t,r){var i=new Kn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var e2=Tf("start","end","cancel","interrupt"),r2=[],Vf=0,yc=1,Us=2,Tn=3,xc=4,Gs=5,Bn=6;function Sa(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;i2(e,r,{name:t,index:i,group:n,on:e2,tween:r2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Vf})}function Po(e,t){var r=fe(e,t);if(r.state>Vf)throw new Error("too late; already scheduled");return r}function Ce(e,t){var r=fe(e,t);if(r.state>Tn)throw new Error("too late; already running");return r}function fe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function i2(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Gf(a,0,r.time);function a(l){r.state=yc,r.timer.restart(o,r.delay,r.time),r.delay<=l&&o(l-r.delay)}function o(l){var h,u,f,p;if(r.state!==yc)return c();for(h in i)if(p=i[h],p.name===r.name){if(p.state===Tn)return mc(o);p.state===xc?(p.state=Bn,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<t&&(p.state=Bn,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(mc(function(){r.state===Tn&&(r.state=xc,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=Us,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Us){for(r.state=Tn,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=p);n.length=u+1}}function s(l){for(var h=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=Gs,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===Gs&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Bn,r.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function n2(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>Us&&i.state<Gs,i.state=Bn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function a2(e){return this.each(function(){n2(this,e)})}function s2(e,t){var r,i;return function(){var n=Ce(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function o2(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Ce(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},c=0,l=n.length;c<l;++c)if(n[c].name===t){n[c]=s;break}c===l&&n.push(s)}a.tween=n}}function l2(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=fe(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?s2:o2)(r,e,t))}function No(e,t,r){var i=e._id;return e.each(function(){var n=Ce(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return fe(n,i).value[t]}}function Xf(e,t){var r;return(typeof t=="number"?He:t instanceof zi?pc:(r=zi(t))?(t=r,pc):U1)(e,t)}function c2(e){return function(){this.removeAttribute(e)}}function h2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function u2(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function f2(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function p2(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function d2(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function g2(e,t){var r=va(e),i=r==="transform"?Z1:Xf;return this.attrTween(e,typeof t=="function"?(r.local?d2:p2)(r,i,No(this,"attr."+e,t)):t==null?(r.local?h2:c2)(r):(r.local?f2:u2)(r,i,t))}function m2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function y2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function x2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&y2(e,a)),r}return n._value=t,n}function b2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&m2(e,a)),r}return n._value=t,n}function _2(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=va(e);return this.tween(r,(i.local?x2:b2)(i,t))}function C2(e,t){return function(){Po(this,e).delay=+t.apply(this,arguments)}}function w2(e,t){return t=+t,function(){Po(this,e).delay=t}}function v2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?C2:w2)(t,e)):fe(this.node(),t).delay}function k2(e,t){return function(){Ce(this,e).duration=+t.apply(this,arguments)}}function S2(e,t){return t=+t,function(){Ce(this,e).duration=t}}function T2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?k2:S2)(t,e)):fe(this.node(),t).duration}function B2(e,t){if(typeof t!="function")throw new Error;return function(){Ce(this,e).ease=t}}function L2(e){var t=this._id;return arguments.length?this.each(B2(t,e)):fe(this.node(),t).ease}function A2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ce(this,e).ease=r}}function M2(e){if(typeof e!="function")throw new Error;return this.each(A2(this._id,e))}function E2(e){typeof e!="function"&&(e=Af(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Ie(i,this._parents,this._name,this._id)}function F2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var c=t[s],l=r[s],h=c.length,u=o[s]=new Array(h),f,p=0;p<h;++p)(f=c[p]||l[p])&&(u[p]=f);for(;s<i;++s)o[s]=t[s];return new Ie(o,this._parents,this._name,this._id)}function $2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function O2(e,t,r){var i,n,a=$2(t)?Po:Ce;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function D2(e,t){var r=this._id;return arguments.length<2?fe(this.node(),r).on.on(e):this.each(O2(r,e,t))}function R2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function I2(){return this.on("end.remove",R2(this._id))}function P2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=$o(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],c=s.length,l=a[o]=new Array(c),h,u,f=0;f<c;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,Sa(l[f],t,r,f,l,fe(h,r)));return new Ie(a,this._parents,t,r)}function N2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Lf(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var c=i[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var f=e.call(h,h.__data__,u,c),p,g=fe(h,r),m=0,y=f.length;m<y;++m)(p=f[m])&&Sa(p,t,r,m,f,g);a.push(f),o.push(h)}return new Ie(a,o,t,r)}var z2=Xi.prototype.constructor;function W2(){return new z2(this._groups,this._parents)}function q2(e,t){var r,i,n;return function(){var a=Zr(this,e),o=(this.style.removeProperty(e),Zr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function Zf(e){return function(){this.style.removeProperty(e)}}function H2(e,t,r){var i,n=r+"",a;return function(){var o=Zr(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function j2(e,t,r){var i,n,a;return function(){var o=Zr(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Zr(this,e))),o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s))}}function Y2(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var c=Ce(this,e),l=c.on,h=c.value[a]==null?s||(s=Zf(t)):void 0;(l!==r||n!==h)&&(i=(r=l).copy()).on(o,n=h),c.on=i}}function U2(e,t,r){var i=(e+="")=="transform"?X1:Xf;return t==null?this.styleTween(e,q2(e,i)).on("end.style."+e,Zf(e)):typeof t=="function"?this.styleTween(e,j2(e,i,No(this,"style."+e,t))).each(Y2(this._id,e)):this.styleTween(e,H2(e,i,t),r).on("end.style."+e,null)}function G2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function V2(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&G2(e,o,r)),i}return a._value=t,a}function X2(e,t,r){var i="style."+(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;return this.tween(i,V2(e,t,r??""))}function Z2(e){return function(){this.textContent=e}}function K2(e){return function(){var t=e(this);this.textContent=t??""}}function Q2(e){return this.tween("text",typeof e=="function"?K2(No(this,"text",e)):Z2(e==null?"":e+""))}function J2(e){return function(t){this.textContent=e.call(this,t)}}function t_(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&J2(n)),t}return i._value=e,i}function e_(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,t_(e))}function r_(){for(var e=this._name,t=this._id,r=Kf(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var h=fe(c,t);Sa(c,e,r,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ie(i,this._parents,e,r)}function i_(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--n===0&&a()}};r.each(function(){var l=Ce(this,i),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),n===0&&a()})}var n_=0;function Ie(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Kf(){return++n_}var Ae=Xi.prototype;Ie.prototype={constructor:Ie,select:P2,selectAll:N2,selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:E2,merge:F2,selection:W2,transition:r_,call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:D2,attr:g2,attrTween:_2,style:U2,styleTween:X2,text:Q2,textTween:e_,remove:I2,tween:l2,delay:v2,duration:T2,ease:L2,easeVarying:M2,end:i_,[Symbol.iterator]:Ae[Symbol.iterator]};function a_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var s_={time:null,delay:0,duration:250,ease:a_};function o_(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function l_(e){var t,r;e instanceof Ie?(t=e._id,e=e._name):(t=Kf(),(r=s_).time=Io(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Sa(c,e,t,l,o,r||o_(c,t));return new Ie(i,this._parents,e,t)}Xi.prototype.interrupt=a2;Xi.prototype.transition=l_;const Vs=Math.PI,Xs=2*Vs,tr=1e-6,c_=Xs-tr;function Qf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function h_(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Qf;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class u_{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Qf:h_(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=i-t,l=n-r,h=o-t,u=s-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>tr)if(!(Math.abs(u*c-l*h)>tr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=n-s,m=c*c+l*l,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(f),C=a*Math.tan((Vs-Math.acos((m+f-y)/(2*x*b)))/2),k=C/b,S=C/x;Math.abs(k-1)>tr&&this._append`L${t+k*h},${r+k*u}`,this._append`A${a},${a},0,0,${+(u*p>h*g)},${this._x1=t+S*c},${this._y1=r+S*l}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),c=i*Math.sin(n),l=t+s,h=r+c,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>tr||Math.abs(this._y1-h)>tr)&&this._append`L${l},${h}`,i&&(f<0&&(f=f%Xs+Xs),f>c_?this._append`A${i},${i},0,1,${u},${t-s},${r-c}A${i},${i},0,1,${u},${this._x1=l},${this._y1=h}`:f>tr&&this._append`A${i},${i},0,${+(f>=Vs)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Br(e){return function(){return e}}const RL=Math.abs,IL=Math.atan2,PL=Math.cos,NL=Math.max,zL=Math.min,WL=Math.sin,qL=Math.sqrt,bc=1e-12,zo=Math.PI,_c=zo/2,HL=2*zo;function jL(e){return e>1?0:e<-1?zo:Math.acos(e)}function YL(e){return e>=1?_c:e<=-1?-_c:Math.asin(e)}function f_(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new u_(t)}function p_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jf(e){this._context=e}Jf.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 Qn(e){return new Jf(e)}function d_(e){return e[0]}function g_(e){return e[1]}function m_(e,t){var r=Br(!0),i=null,n=Qn,a=null,o=f_(s);e=typeof e=="function"?e:e===void 0?d_:Br(e),t=typeof t=="function"?t:t===void 0?g_:Br(t);function s(c){var l,h=(c=p_(c)).length,u,f=!1,p;for(i==null&&(a=n(p=o())),l=0;l<=h;++l)!(l<h&&r(u=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,l,c),+t(u,l,c));if(p)return a=null,p+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Br(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Br(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Br(!!c),s):r},s.curve=function(c){return arguments.length?(n=c,i!=null&&(a=n(i)),s):n},s.context=function(c){return arguments.length?(c==null?i=a=null:a=n(i=c),s):i},s}class tp{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ep(e){return new tp(e,!0)}function rp(e){return new tp(e,!1)}function Ge(){}function Jn(e,t,r){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+r)/6)}function Ta(e){this._context=e}Ta.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:Jn(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:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ln(e){return new Ta(e)}function ip(e){this._context=e}ip.prototype={areaStart:Ge,areaEnd:Ge,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:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function y_(e){return new ip(e)}function np(e){this._context=e}np.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 r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x_(e){return new np(e)}function ap(e,t){this._basis=new Ta(e),this._beta=t}ap.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+c*a),this._beta*t[s]+(1-this._beta)*(n+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const b_=function e(t){function r(i){return t===1?new Ta(i):new ap(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ta(e,t,r){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-r),e._x2,e._y2)}function Wo(e,t){this._context=e,this._k=(1-t)/6}Wo.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:ta(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:ta(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 sp=function e(t){function r(i){return new Wo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function qo(e,t){this._context=e,this._k=(1-t)/6}qo.prototype={areaStart:Ge,areaEnd:Ge,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:ta(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 __=function e(t){function r(i){return new qo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Ho(e,t){this._context=e,this._k=(1-t)/6}Ho.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:ta(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 C_=function e(t){function r(i){return new Ho(i,t)}return r.tension=function(i){return e(+i)},r}(0);function jo(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>bc){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>bc){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function op(e,t){this._context=e,this._alpha=t}op.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 r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:jo(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 lp=function e(t){function r(i){return t?new op(i,t):new Wo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function cp(e,t){this._context=e,this._alpha=t}cp.prototype={areaStart:Ge,areaEnd:Ge,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 r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:jo(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 w_=function e(t){function r(i){return t?new cp(i,t):new qo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function hp(e,t){this._context=e,this._alpha=t}hp.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 r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:jo(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 v_=function e(t){function r(i){return t?new hp(i,t):new Ho(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function up(e){this._context=e}up.prototype={areaStart:Ge,areaEnd:Ge,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 k_(e){return new up(e)}function Cc(e){return e<0?-1:1}function wc(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Cc(a)+Cc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function vc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function os(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ea(e){this._context=e}ea.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:os(this,this._t0,vc(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 r=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,os(this,vc(this,r=wc(this,e,t)),r);break;default:os(this,this._t0,r=wc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fp(e){this._context=new pp(e)}(fp.prototype=Object.create(ea.prototype)).point=function(e,t){ea.prototype.point.call(this,t,e)};function pp(e){this._context=e}pp.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,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function dp(e){return new ea(e)}function gp(e){return new fp(e)}function mp(e){this._context=e}mp.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=kc(e),n=kc(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===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 kc(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function yp(e){return new mp(e)}function Ba(e,t){this._context=e,this._t=t}Ba.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function xp(e){return new Ba(e,.5)}function bp(e){return new Ba(e,0)}function _p(e){return new Ba(e,1)}function Si(e,t,r){this.k=e,this.x=t,this.y=r}Si.prototype={constructor:Si,scale:function(e){return e===1?this:new Si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Si(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+")"}};Si.prototype;var Cp=typeof global=="object"&&global&&global.Object===Object&&global,S_=typeof self=="object"&&self&&self.Object===Object&&self,we=Cp||S_||Function("return this")(),ra=we.Symbol,wp=Object.prototype,T_=wp.hasOwnProperty,B_=wp.toString,gi=ra?ra.toStringTag:void 0;function L_(e){var t=T_.call(e,gi),r=e[gi];try{e[gi]=void 0;var i=!0}catch{}var n=B_.call(e);return i&&(t?e[gi]=r:delete e[gi]),n}var A_=Object.prototype,M_=A_.toString;function E_(e){return M_.call(e)}var F_="[object Null]",$_="[object Undefined]",Sc=ra?ra.toStringTag:void 0;function ei(e){return e==null?e===void 0?$_:F_:Sc&&Sc in Object(e)?L_(e):E_(e)}function mr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var O_="[object AsyncFunction]",D_="[object Function]",R_="[object GeneratorFunction]",I_="[object Proxy]";function Yo(e){if(!mr(e))return!1;var t=ei(e);return t==D_||t==R_||t==O_||t==I_}var ls=we["__core-js_shared__"],Tc=function(){var e=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function P_(e){return!!Tc&&Tc in e}var N_=Function.prototype,z_=N_.toString;function yr(e){if(e!=null){try{return z_.call(e)}catch{}try{return e+""}catch{}}return""}var W_=/[\\^$.*+?()[\]{}|]/g,q_=/^\[object .+?Constructor\]$/,H_=Function.prototype,j_=Object.prototype,Y_=H_.toString,U_=j_.hasOwnProperty,G_=RegExp("^"+Y_.call(U_).replace(W_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V_(e){if(!mr(e)||P_(e))return!1;var t=Yo(e)?G_:q_;return t.test(yr(e))}function X_(e,t){return e==null?void 0:e[t]}function xr(e,t){var r=X_(e,t);return V_(r)?r:void 0}var qi=xr(Object,"create");function Z_(){this.__data__=qi?qi(null):{},this.size=0}function K_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Q_="__lodash_hash_undefined__",J_=Object.prototype,tC=J_.hasOwnProperty;function eC(e){var t=this.__data__;if(qi){var r=t[e];return r===Q_?void 0:r}return tC.call(t,e)?t[e]:void 0}var rC=Object.prototype,iC=rC.hasOwnProperty;function nC(e){var t=this.__data__;return qi?t[e]!==void 0:iC.call(t,e)}var aC="__lodash_hash_undefined__";function sC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qi&&t===void 0?aC:t,this}function pr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}pr.prototype.clear=Z_;pr.prototype.delete=K_;pr.prototype.get=eC;pr.prototype.has=nC;pr.prototype.set=sC;function oC(){this.__data__=[],this.size=0}function La(e,t){return e===t||e!==e&&t!==t}function Aa(e,t){for(var r=e.length;r--;)if(La(e[r][0],t))return r;return-1}var lC=Array.prototype,cC=lC.splice;function hC(e){var t=this.__data__,r=Aa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():cC.call(t,r,1),--this.size,!0}function uC(e){var t=this.__data__,r=Aa(t,e);return r<0?void 0:t[r][1]}function fC(e){return Aa(this.__data__,e)>-1}function pC(e,t){var r=this.__data__,i=Aa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ne.prototype.clear=oC;Ne.prototype.delete=hC;Ne.prototype.get=uC;Ne.prototype.has=fC;Ne.prototype.set=pC;var Hi=xr(we,"Map");function dC(){this.size=0,this.__data__={hash:new pr,map:new(Hi||Ne),string:new pr}}function gC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ma(e,t){var r=e.__data__;return gC(t)?r[typeof t=="string"?"string":"hash"]:r.map}function mC(e){var t=Ma(this,e).delete(e);return this.size-=t?1:0,t}function yC(e){return Ma(this,e).get(e)}function xC(e){return Ma(this,e).has(e)}function bC(e,t){var r=Ma(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ze(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ze.prototype.clear=dC;Ze.prototype.delete=mC;Ze.prototype.get=yC;Ze.prototype.has=xC;Ze.prototype.set=bC;var _C="Expected a function";function Ki(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_C);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Ki.Cache||Ze),r}Ki.Cache=Ze;function CC(){this.__data__=new Ne,this.size=0}function wC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function vC(e){return this.__data__.get(e)}function kC(e){return this.__data__.has(e)}var SC=200;function TC(e,t){var r=this.__data__;if(r instanceof Ne){var i=r.__data__;if(!Hi||i.length<SC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ze(i)}return r.set(e,t),this.size=r.size,this}function ri(e){var t=this.__data__=new Ne(e);this.size=t.size}ri.prototype.clear=CC;ri.prototype.delete=wC;ri.prototype.get=vC;ri.prototype.has=kC;ri.prototype.set=TC;var ia=function(){try{var e=xr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Uo(e,t,r){t=="__proto__"&&ia?ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Zs(e,t,r){(r!==void 0&&!La(e[t],r)||r===void 0&&!(t in e))&&Uo(e,t,r)}function BC(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var c=o[++n];if(r(a[c],c,a)===!1)break}return t}}var LC=BC(),vp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bc=vp&&typeof module=="object"&&module&&!module.nodeType&&module,AC=Bc&&Bc.exports===vp,Lc=AC?we.Buffer:void 0,Ac=Lc?Lc.allocUnsafe:void 0;function MC(e,t){if(t)return e.slice();var r=e.length,i=Ac?Ac(r):new e.constructor(r);return e.copy(i),i}var Mc=we.Uint8Array;function EC(e){var t=new e.constructor(e.byteLength);return new Mc(t).set(new Mc(e)),t}function FC(e,t){var r=t?EC(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function $C(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Ec=Object.create,OC=function(){function e(){}return function(t){if(!mr(t))return{};if(Ec)return Ec(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function kp(e,t){return function(r){return e(t(r))}}var Sp=kp(Object.getPrototypeOf,Object),DC=Object.prototype;function Ea(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||DC;return e===r}function RC(e){return typeof e.constructor=="function"&&!Ea(e)?OC(Sp(e)):{}}function Qi(e){return e!=null&&typeof e=="object"}var IC="[object Arguments]";function Fc(e){return Qi(e)&&ei(e)==IC}var Tp=Object.prototype,PC=Tp.hasOwnProperty,NC=Tp.propertyIsEnumerable,na=Fc(function(){return arguments}())?Fc:function(e){return Qi(e)&&PC.call(e,"callee")&&!NC.call(e,"callee")},aa=Array.isArray,zC=9007199254740991;function Bp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zC}function Fa(e){return e!=null&&Bp(e.length)&&!Yo(e)}function WC(e){return Qi(e)&&Fa(e)}function qC(){return!1}var Lp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$c=Lp&&typeof module=="object"&&module&&!module.nodeType&&module,HC=$c&&$c.exports===Lp,Oc=HC?we.Buffer:void 0,jC=Oc?Oc.isBuffer:void 0,Go=jC||qC,YC="[object Object]",UC=Function.prototype,GC=Object.prototype,Ap=UC.toString,VC=GC.hasOwnProperty,XC=Ap.call(Object);function ZC(e){if(!Qi(e)||ei(e)!=YC)return!1;var t=Sp(e);if(t===null)return!0;var r=VC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ap.call(r)==XC}var KC="[object Arguments]",QC="[object Array]",JC="[object Boolean]",tw="[object Date]",ew="[object Error]",rw="[object Function]",iw="[object Map]",nw="[object Number]",aw="[object Object]",sw="[object RegExp]",ow="[object Set]",lw="[object String]",cw="[object WeakMap]",hw="[object ArrayBuffer]",uw="[object DataView]",fw="[object Float32Array]",pw="[object Float64Array]",dw="[object Int8Array]",gw="[object Int16Array]",mw="[object Int32Array]",yw="[object Uint8Array]",xw="[object Uint8ClampedArray]",bw="[object Uint16Array]",_w="[object Uint32Array]",mt={};mt[fw]=mt[pw]=mt[dw]=mt[gw]=mt[mw]=mt[yw]=mt[xw]=mt[bw]=mt[_w]=!0;mt[KC]=mt[QC]=mt[hw]=mt[JC]=mt[uw]=mt[tw]=mt[ew]=mt[rw]=mt[iw]=mt[nw]=mt[aw]=mt[sw]=mt[ow]=mt[lw]=mt[cw]=!1;function Cw(e){return Qi(e)&&Bp(e.length)&&!!mt[ei(e)]}function ww(e){return function(t){return e(t)}}var Mp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fi=Mp&&typeof module=="object"&&module&&!module.nodeType&&module,vw=Fi&&Fi.exports===Mp,cs=vw&&Cp.process,Dc=function(){try{var e=Fi&&Fi.require&&Fi.require("util").types;return e||cs&&cs.binding&&cs.binding("util")}catch{}}(),Rc=Dc&&Dc.isTypedArray,Vo=Rc?ww(Rc):Cw;function Ks(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var kw=Object.prototype,Sw=kw.hasOwnProperty;function Tw(e,t,r){var i=e[t];(!(Sw.call(e,t)&&La(i,r))||r===void 0&&!(t in e))&&Uo(e,t,r)}function Bw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),n?Uo(r,s,c):Tw(r,s,c)}return r}function Lw(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Aw=9007199254740991,Mw=/^(?:0|[1-9]\d*)$/;function Ep(e,t){var r=typeof e;return t=t??Aw,!!t&&(r=="number"||r!="symbol"&&Mw.test(e))&&e>-1&&e%1==0&&e<t}var Ew=Object.prototype,Fw=Ew.hasOwnProperty;function $w(e,t){var r=aa(e),i=!r&&na(e),n=!r&&!i&&Go(e),a=!r&&!i&&!n&&Vo(e),o=r||i||n||a,s=o?Lw(e.length,String):[],c=s.length;for(var l in e)(t||Fw.call(e,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ep(l,c)))&&s.push(l);return s}function Ow(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Dw=Object.prototype,Rw=Dw.hasOwnProperty;function Iw(e){if(!mr(e))return Ow(e);var t=Ea(e),r=[];for(var i in e)i=="constructor"&&(t||!Rw.call(e,i))||r.push(i);return r}function Fp(e){return Fa(e)?$w(e,!0):Iw(e)}function Pw(e){return Bw(e,Fp(e))}function Nw(e,t,r,i,n,a,o){var s=Ks(e,r),c=Ks(t,r),l=o.get(c);if(l){Zs(e,r,l);return}var h=a?a(s,c,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=aa(c),p=!f&&Go(c),g=!f&&!p&&Vo(c);h=c,f||p||g?aa(s)?h=s:WC(s)?h=$C(s):p?(u=!1,h=MC(c,!0)):g?(u=!1,h=FC(c,!0)):h=[]:ZC(c)||na(c)?(h=s,na(s)?h=Pw(s):(!mr(s)||Yo(s))&&(h=RC(c))):u=!1}u&&(o.set(c,h),n(h,c,i,a,o),o.delete(c)),Zs(e,r,h)}function $p(e,t,r,i,n){e!==t&&LC(t,function(a,o){if(n||(n=new ri),mr(a))Nw(e,t,o,r,$p,i,n);else{var s=i?i(Ks(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),Zs(e,o,s)}},Fp)}function Op(e){return e}function zw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Ic=Math.max;function Ww(e,t,r){return t=Ic(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Ic(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),zw(e,this,s)}}function qw(e){return function(){return e}}var Hw=ia?function(e,t){return ia(e,"toString",{configurable:!0,enumerable:!1,value:qw(t),writable:!0})}:Op,jw=800,Yw=16,Uw=Date.now;function Gw(e){var t=0,r=0;return function(){var i=Uw(),n=Yw-(i-r);if(r=i,n>0){if(++t>=jw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Vw=Gw(Hw);function Xw(e,t){return Vw(Ww(e,t,Op),e+"")}function Zw(e,t,r){if(!mr(r))return!1;var i=typeof t;return(i=="number"?Fa(r)&&Ep(t,r.length):i=="string"&&t in r)?La(r[t],e):!1}function Kw(e){return Xw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Zw(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var Qw=Kw(function(e,t,r){$p(e,t,r)}),Jw="",tv={curveBasis:Ln,curveBasisClosed:y_,curveBasisOpen:x_,curveBumpX:ep,curveBumpY:rp,curveBundle:b_,curveCardinalClosed:__,curveCardinalOpen:C_,curveCardinal:sp,curveCatmullRomClosed:w_,curveCatmullRomOpen:v_,curveCatmullRom:lp,curveLinear:Qn,curveLinearClosed:k_,curveMonotoneX:dp,curveMonotoneY:gp,curveNatural:yp,curveStep:xp,curveStepAfter:_p,curveStepBefore:bp},ev=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rv=d(function(e,t){const r=Dp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Dn(o),i=Et(i,[...o])}else i=r.args;if(!i)return;let n=yo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Dp=d(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${ev.source})(?=[}][%]{2}).*
|
|
117
|
+
`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),O.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Mi.exec(e))!==null;)if(a.index===Mi.lastIndex&&Mi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const s=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:s,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(n){return O.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),iv=d(function(e){return e.replace(Mi,"")},"removeDirectives"),nv=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Xo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return tv[r]??t}d(Xo,"interpolateToCurve");function Rp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Sf(r):r}d(Rp,"formatUrl");var av=d((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){O.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Zo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}d(Zo,"distance");function Ip(e){let t,r=0;e.forEach(n=>{r+=Zo(n,t),t=n});const i=r/2;return Ko(e,i)}d(Ip,"traverseEdge");function Pp(e){return e.length===1?e[0]:Ip(e)}d(Pp,"calcLabelPosition");var Pc=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ko=d((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Zo(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Pc((1-o)*r.x+o*n.x,5),y:Pc((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sv=d((e,t,r)=>{O.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Ko(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Np(e,t,r){const i=structuredClone(r);O.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Ko(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}d(Np,"calcTerminalLabelPosition");function zp(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}d(zp,"getStylesFromArray");var Nc=0,ov=d(()=>(Nc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Nc),"generateId");function Wp(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}d(Wp,"makeRandomHex");var lv=d(e=>Wp(e.length),"random"),cv=d(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"),hv=d(function(e,t){const r=t.text.replace(ti.lineBreakRegex," "),[,i]=$a(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),uv=Ki((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ti.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const c=Pe(`${o} `,r),l=Pe(a,r);if(c>t){const{hyphenatedStrings:f,remainingWord:p}=fv(o,t,"-",r);n.push(a,...f),a=p}else l+c>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),fv=Ki((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,c)=>{const l=`${o}${s}`;if(Pe(l,i)>=t){const u=c+1,f=n.length===u,p=`${l}${r}`;a.push(f?l:p),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function qp(e,t){return Qo(e,t).height}d(qp,"calculateTextHeight");function Pe(e,t){return Qo(e,t).width}d(Pe,"calculateTextWidth");var Qo=Ki((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=$a(r),o=["sans-serif",i],s=e.split(ti.lineBreakRegex),c=[],l=lt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=cv();y.text=m||Jw;const x=hv(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}c.push(g)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),qr,pv=(qr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},d(qr,"InitIDGenerator"),qr),dn,dv=d(function(e){return dn=dn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),dn.innerHTML=e,unescape(dn.textContent)},"entityDecode");function Jo(e){return"str"in e}d(Jo,"isDetailedError");var gv=d((e,t,r,i)=>{var a;if(!i)return;const n=(a=e.node())==null?void 0:a.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),$a=d(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 tl(e,t){return Qw({},e,t)}d(tl,"cleanAndMerge");var ye={assignWithDepth:Et,wrapLabel:uv,calculateTextHeight:qp,calculateTextWidth:Pe,calculateTextDimensions:Qo,cleanAndMerge:tl,detectInit:rv,detectDirective:Dp,isSubstringInArray:nv,interpolateToCurve:Xo,calcLabelPosition:Pp,calcCardinalityPosition:sv,calcTerminalLabelPosition:Np,formatUrl:Rp,getStylesFromArray:zp,generateId:ov,random:lv,runFunc:av,entityDecode:dv,insertTitle:gv,parseFontSize:$a,InitIDGenerator:pv},mv=d(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),br=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),UL=d((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function qt(e){return e??null}d(qt,"handleUndefinedAttr");function el(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _r=el();function Hp(e){_r=e}var $i={exec:()=>null};function pt(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Wt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Wt={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")},yv=/^(?:[ \t]*(?:\n|$))+/,xv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_v=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rl=/(?:[*+-]|\d{1,9}[.)])/,jp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yp=pt(jp).replace(/bull/g,rl).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(),Cv=pt(jp).replace(/bull/g,rl).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(),il=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wv=/^[^\n]+/,nl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,vv=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kv=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rl).getRegex(),Oa="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",al=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sv=pt("^ {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",al).replace("tag",Oa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Up=pt(il).replace("hr",Ji).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",Oa).getRegex(),Tv=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Up).getRegex(),sl={blockquote:Tv,code:xv,def:vv,fences:bv,heading:_v,hr:Ji,html:Sv,lheading:Yp,list:kv,newline:yv,paragraph:Up,table:$i,text:wv},zc=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ji).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",Oa).getRegex(),Bv={...sl,lheading:Cv,table:zc,paragraph:pt(il).replace("hr",Ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zc).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",Oa).getRegex()},Lv={...sl,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",al).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:$i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(il).replace("hr",Ji).replace("heading",` *#{1,6} *[^
|
|
118
|
+
]`).replace("lheading",Yp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Av=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gp=/^( {2,}|\\)\n(?!\s*$)/,Ev=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Da=/[\p{P}\p{S}]/u,ol=/[\s\p{P}\p{S}]/u,Vp=/[^\s\p{P}\p{S}]/u,Fv=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ol).getRegex(),Xp=/(?!~)[\p{P}\p{S}]/u,$v=/(?!~)[\s\p{P}\p{S}]/u,Ov=/(?:[^\s\p{P}\p{S}]|~)/u,Dv=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Zp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Rv=pt(Zp,"u").replace(/punct/g,Da).getRegex(),Iv=pt(Zp,"u").replace(/punct/g,Xp).getRegex(),Kp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Pv=pt(Kp,"gu").replace(/notPunctSpace/g,Vp).replace(/punctSpace/g,ol).replace(/punct/g,Da).getRegex(),Nv=pt(Kp,"gu").replace(/notPunctSpace/g,Ov).replace(/punctSpace/g,$v).replace(/punct/g,Xp).getRegex(),zv=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vp).replace(/punctSpace/g,ol).replace(/punct/g,Da).getRegex(),Wv=pt(/\\(punct)/,"gu").replace(/punct/g,Da).getRegex(),qv=pt(/^<(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(),Hv=pt(al).replace("(?:-->|$)","-->").getRegex(),jv=pt("^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",Hv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yv=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qp=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",sa).replace("ref",nl).getRegex(),Jp=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",nl).getRegex(),Uv=pt("reflink|nolink(?!\\()","g").replace("reflink",Qp).replace("nolink",Jp).getRegex(),ll={_backpedal:$i,anyPunctuation:Wv,autolink:qv,blockSkip:Dv,br:Gp,code:Mv,del:$i,emStrongLDelim:Rv,emStrongRDelimAst:Pv,emStrongRDelimUnd:zv,escape:Av,link:Yv,nolink:Jp,punctuation:Fv,reflink:Qp,reflinkSearch:Uv,tag:jv,text:Ev,url:$i},Gv={...ll,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",sa).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sa).getRegex()},Qs={...ll,emStrongRDelimAst:Nv,emStrongLDelim:Iv,url:pt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Vv={...Qs,br:pt(Gp).replace("{2,}","*").getRegex(),text:pt(Qs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gn={normal:sl,gfm:Bv,pedantic:Lv},mi={normal:ll,gfm:Qs,breaks:Vv,pedantic:Gv},Xv={"&":"&","<":"<",">":">",'"':""","'":"'"},Wc=e=>Xv[e];function de(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,Wc)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,Wc);return e}function qc(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch{return null}return e}function Hc(e,t){var a;const r=e.replace(Wt.findPipe,(o,s,c)=>{let l=!1,h=s;for(;--h>=0&&c[h]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Wt.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Wt.slashPipe,"|");return i}function yi(e,t,r){const i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Zv(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function jc(e,t,r,i,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function Kv(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(`
|
|
119
|
+
`).map(a=>{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
|
120
|
+
`)}var oa=class{constructor(e){gt(this,"options");gt(this,"rules");gt(this,"lexer");this.options=e||_r}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:yi(r,`
|
|
121
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],i=Kv(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const i=yi(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:yi(t[0],`
|
|
122
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=yi(t[0],`
|
|
123
|
+
`).split(`
|
|
124
|
+
`),i="",n="";const a=[];for(;r.length>0;){let o=!1;const s=[];let c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))s.push(r[c]),o=!0;else if(!o)s.push(r[c]);else break;r=r.slice(c);const l=s.join(`
|
|
125
|
+
`),h=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
126
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
127
|
+
${l}`:l,n=n?`${n}
|
|
128
|
+
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=u,r.length===0)break;const f=a.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const p=f,g=p.raw+`
|
|
129
|
+
`+r.join(`
|
|
130
|
+
`),m=this.blockquote(g);a[a.length-1]=m,i=i.substring(0,i.length-p.raw.length)+m.raw,n=n.substring(0,n.length-p.text.length)+m.text;break}else if((f==null?void 0:f.type)==="list"){const p=f,g=p.raw+`
|
|
131
|
+
`+r.join(`
|
|
132
|
+
`),m=this.list(g);a[a.length-1]=m,i=i.substring(0,i.length-f.raw.length)+m.raw,n=n.substring(0,n.length-p.raw.length)+m.raw,r=g.substring(a.at(-1).raw.length).split(`
|
|
133
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let o=!1;for(;e;){let c=!1,l="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let u=t[2].split(`
|
|
134
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),f=e.split(`
|
|
135
|
+
`,1)[0],p=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):p?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=u.slice(g),g+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(l+=f+`
|
|
136
|
+
`,e=e.substring(f.length+1),c=!0),!c){const x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),k=this.rules.other.headingBeginRegex(g),S=this.rules.other.htmlBeginRegex(g);for(;e;){const _=e.split(`
|
|
137
|
+
`,1)[0];let v;if(f=_,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),v=f):v=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||k.test(f)||S.test(f)||x.test(f)||b.test(f))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!f.trim())h+=`
|
|
138
|
+
`+v.slice(g);else{if(p||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(u)||k.test(u)||b.test(u))break;h+=`
|
|
139
|
+
`+f}!p&&!f.trim()&&(p=!0),l+=_+`
|
|
140
|
+
`,e=e.substring(_.length+1),u=v.slice(g)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:l,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=l}const s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){const l=n.items[c].tokens.filter(u=>u.type==="space"),h=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){var o;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=Hc(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
141
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const s of i)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<r.length;s++)a.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:a.align[s]});for(const s of n)a.rows.push(Hc(s,a.header.length).map((c,l)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[l]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
142
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=yi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Zv(t[2],"()");if(a===-2)return;if(a>-1){const s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),jc(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return jc(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,s,c=a,l=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){c+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+l);const u=[...i[0]][0].length,f=e.slice(0,a+i.index+u+s);if(Math.min(a,s)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=t[0],n="mailto:"+i;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);i=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},$e=class Js{constructor(t){gt(this,"tokens");gt(this,"options");gt(this,"state");gt(this,"tokenizer");gt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||_r,this.options.tokenizer=this.options.tokenizer||new oa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Wt,block:gn.normal,inline:mi.normal};this.options.pedantic?(r.block=gn.pedantic,r.inline=mi.pedantic):this.options.gfm&&(r.block=gn.gfm,this.options.breaks?r.inline=mi.breaks:r.inline=mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:gn,inline:mi}}static lex(t,r){return new Js(r).lex(t)}static lexInline(t,r){return new Js(r).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
|
|
143
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,a,o;for(this.options.pedantic&&(t=t.replace(Wt.tabCharGlobal," ").replace(Wt.spaceLine,""));t;){let s;if((a=(n=this.options.extensions)==null?void 0:n.block)!=null&&a.some(l=>(s=l.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);const l=r.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
|
|
144
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
|
145
|
+
`+s.raw,l.text+=`
|
|
146
|
+
`+s.text,this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
|
147
|
+
`+s.raw,l.text+=`
|
|
148
|
+
`+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let c=t;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0;const h=t.slice(1);let u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){const l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=`
|
|
149
|
+
`+s.raw,l.text+=`
|
|
150
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s),i=c.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=`
|
|
151
|
+
`+s.raw,l.text+=`
|
|
152
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var s,c,l;let i=t,n=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;t;){a||(o=""),a=!1;let h;if((c=(s=this.options.extensions)==null?void 0:s.inline)!=null&&c.some(f=>(h=f.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);const f=r.at(-1);h.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,o)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let u=t;if((l=this.options.extensions)!=null&&l.startInline){let f=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(m=>{g=m.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(h=this.tokenizer.inlineText(u)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),a=!0;const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},la=class{constructor(e){gt(this,"options");gt(this,"parser");this.options=e||_r}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const i=(a=(t||"").match(Wt.notSpaceStart))==null?void 0:a[0],n=e.replace(Wt.endingNewline,"")+`
|
|
153
|
+
`;return i?'<pre><code class="language-'+de(i)+'">'+(r?n:de(n,!0))+`</code></pre>
|
|
154
|
+
`:"<pre><code>"+(r?n:de(n,!0))+`</code></pre>
|
|
155
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
156
|
+
${this.parser.parse(e)}</blockquote>
|
|
157
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
158
|
+
`}hr(e){return`<hr>
|
|
159
|
+
`}list(e){const t=e.ordered,r=e.start;let i="";for(let o=0;o<e.items.length;o++){const s=e.items[o];i+=this.listitem(s)}const n=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+n+a+`>
|
|
160
|
+
`+i+"</"+n+`>
|
|
161
|
+
`}listitem(e){var r;let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+de(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
162
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
163
|
+
`}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){const a=e.rows[n];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
164
|
+
<thead>
|
|
165
|
+
`+t+`</thead>
|
|
166
|
+
`+i+`</table>
|
|
167
|
+
`}tablerow({text:e}){return`<tr>
|
|
168
|
+
${e}</tr>
|
|
169
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
170
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${de(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),n=qc(e);if(n===null)return i;e=n;let a='<a href="'+e+'"';return t&&(a+=' title="'+de(t)+'"'),a+=">"+i+"</a>",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=qc(e);if(n===null)return de(r);e=n;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${de(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:de(e.text)}},cl=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Oe=class to{constructor(t){gt(this,"options");gt(this,"renderer");gt(this,"textRenderer");this.options=t||_r,this.options.renderer=this.options.renderer||new la,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cl}static parse(t,r){return new to(r).parse(t)}static parseInline(t,r){return new to(r).parseInline(t)}parse(t,r=!0){var n,a;let i="";for(let o=0;o<t.length;o++){const s=t[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){const l=s,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){i+=h||"";continue}}const c=s;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let l=c,h=this.renderer.text(l);for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],h+=`
|
|
171
|
+
`+this.renderer.text(l);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(t,r=this.renderer){var n,a;let i="";for(let o=0;o<t.length;o++){const s=t[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}const c=s;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},xs,An=(xs=class{constructor(e){gt(this,"options");gt(this,"block");this.options=e||_r}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?$e.lex:$e.lexInline}provideParser(){return this.block?Oe.parse:Oe.parseInline}},gt(xs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),xs),Qv=class{constructor(...e){gt(this,"defaults",el());gt(this,"options",this.setOptions);gt(this,"parse",this.parseMarkdown(!0));gt(this,"parseInline",this.parseMarkdown(!1));gt(this,"Parser",Oe);gt(this,"Renderer",la);gt(this,"TextRenderer",cl);gt(this,"Lexer",$e);gt(this,"Tokenizer",oa);gt(this,"Hooks",An);this.use(...e)}walkTokens(e,t){var i,n;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const o=a;for(const s of o.header)r=r.concat(this.walkTokens(s.tokens,t));for(const s of o.rows)for(const c of s)r=r.concat(this.walkTokens(c.tokens,t));break}case"list":{const o=a;r=r.concat(this.walkTokens(o.items,t));break}default:{const o=a;(n=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&n[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{const c=o[s].flat(1/0);r=r.concat(this.walkTokens(c,t))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const a=t.renderers[n.name];a?t.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){const n=this.defaults.renderer||new la(this.defaults);for(const a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a,s=r.renderer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new oa(this.defaults);for(const a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,s=r.tokenizer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new An;for(const a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const o=a,s=r.hooks[o],c=n[o];An.passThroughHooks.has(a)?n[o]=l=>{if(this.defaults.async)return Promise.resolve(s.call(n,l)).then(u=>c.call(n,u));const h=s.call(n,l);return c.call(n,h)}:n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return $e.lex(e,t??this.defaults)}parser(e,t){return Oe.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return o(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 r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?$e.lex:$e.lexInline,c=a.hooks?a.hooks.provideParser():e?Oe.parse:Oe.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(l=>s(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>c(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let l=s(r,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let h=c(l,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(l){return o(l)}}}onError(e,t){return r=>{if(r.message+=`
|
|
172
|
+
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+de(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},dr=new Qv;function ft(e,t){return dr.parse(e,t)}ft.options=ft.setOptions=function(e){return dr.setOptions(e),ft.defaults=dr.defaults,Hp(ft.defaults),ft};ft.getDefaults=el;ft.defaults=_r;ft.use=function(...e){return dr.use(...e),ft.defaults=dr.defaults,Hp(ft.defaults),ft};ft.walkTokens=function(e,t){return dr.walkTokens(e,t)};ft.parseInline=dr.parseInline;ft.Parser=Oe;ft.parser=Oe.parse;ft.Renderer=la;ft.TextRenderer=cl;ft.Lexer=$e;ft.lexer=$e.lex;ft.Tokenizer=oa;ft.Hooks=An;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;Oe.parse;$e.lex;function td(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var a=new RegExp(`
|
|
173
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
|
|
174
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=s;typeof s=="string"&&s.includes(`
|
|
175
|
+
`)&&(u=String(s).split(`
|
|
176
|
+
`).map(function(f,p){return p===0?f:""+h+f}).join(`
|
|
177
|
+
`)),o+=u+i[c+1]}),o}function ed(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
178
|
+
`).replace(/\n{2,}/g,`
|
|
179
|
+
`),n=td(i);return t===!1?n.replace(/ /g," "):n}d(ed,"preprocessMarkdown");function rd(e,t={}){const r=ed(e,t),i=ft.lexer(r),n=[[]];let a=0;function o(s,c="normal"){s.type==="text"?s.text.split(`
|
|
180
|
+
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(l=>{o(l,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return d(o,"processNode"),i.forEach(s=>{var c;s.type==="paragraph"?(c=s.tokens)==null||c.forEach(l=>{o(l)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}d(rd,"markdownToLines");function id(e,{markdownAutoWrap:t}={}){const r=ft.lexer(e);function i(n){var a,o,s;return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(a=n.tokens)==null?void 0:a.map(i).join("")}</strong>`:n.type==="em"?`<em>${(o=n.tokens)==null?void 0:o.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(s=n.tokens)==null?void 0:s.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return d(i,"output"),r.map(i).join("")}d(id,"markdownToHTML");function nd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(nd,"splitTextToChars");function ad(e,t){const r=nd(t.content);return hl(e,[],r,t.type)}d(ad,"splitWordToFitWidth");function hl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?hl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(hl,"splitWordToFitWidthRecursion");function sd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
181
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ca(e,t)}d(sd,"splitLineToFitWidth");function ca(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return ca(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,c]=ad(t,a);r.push([s]),c.content&&e.unshift(c)}return ca(e,t,r)}d(ca,"splitLineToFitWidthRecursion");function eo(e,t){t&&e.attr("style",t)}d(eo,"applyStyle");async function od(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&Gr(t.label)&&(s=await xo(t.label.replace(ti.lineBreakRegex,`
|
|
182
|
+
`),ut()));const c=t.isNode?"nodeLabel":"edgeLabel",l=o.append("span");l.html(s),eo(l,t.labelStyle),l.attr("class",`${c} ${i}`),eo(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}d(od,"addHtmlSpan");function Ra(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}d(Ra,"createTspan");function ld(e,t,r){const i=e.append("text"),n=Ra(i,1,t);Ia(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}d(ld,"computeWidthOfText");function Jv(e,t,r){var o;const i=e.append("text"),n=Ra(i,1,t);Ia(n,[{content:r,type:"normal"}]);const a=(o=n.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}d(Jv,"computeDimensionOfText");function cd(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let c=0;for(const l of r){const h=d(f=>ld(a,1.1,f)<=e,"checkWidth"),u=h(l)?[l]:sd(l,h);for(const f of u){const p=Ra(s,c,1.1);Ia(p,f),c++}}if(i){const l=s.node().getBBox(),h=2;return o.attr("x",l.x-h).attr("y",l.y-h).attr("width",l.width+2*h).attr("height",l.height+2*h),a.node()}else return s.node()}d(cd,"createFormattedText");function Ia(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}d(Ia,"updateTextContentAndStyles");function hd(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)}d(hd,"replaceIconSubstring");var Ke=d(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:c=!1}={},l)=>{if(O.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a){const h=id(t,l),u=hd(br(h)),f=t.replace(/\\\\/g,"\\"),p={isNode:o,label:Gr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await od(e,p,s,n,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=rd(h.replace("<br>","<br/>"),l),f=cd(s,e,u,t?c:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).select("text").attr("style",g)}return f}},"createText");function hs(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-n)*s+i,c[1]=(l-i)*s+(h-n)*o+n}}}function tk(e,t){return e[0]===t[0]&&e[1]===t[1]}function ek(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const l of o)hs(l,s,n);const c=function(l,h,u){const f=[];for(const b of l){const C=[...b];tk(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&f.push(C)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let C=0;C<b.length-1;C++){const k=b[C],S=b[C+1];if(k[1]!==S[1]){const _=Math.min(k[1],S[1]);g.push({ymin:_,ymax:Math.max(k[1],S[1]),x:_===k[1]?k[0]:S[0],islope:(S[0]-k[0])/(S[1]-k[1])})}}if(g.sort((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax)),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let C=0;C<g.length&&!(g[C].ymin>y);C++)b=C;g.splice(0,b+1).forEach(C=>{m.push({s:y,edge:C})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const k=m[b].edge,S=m[C].edge;p.push([[Math.round(k.x),y],[Math.round(S.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return p}(o,a,i);if(n){for(const l of o)hs(l,s,-n);(function(l,h,u){const f=[];l.forEach(p=>f.push(...p)),hs(f,h,u)})(c,s,-n)}return c}function tn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),ek(e,n,i,a||1)}class ul{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=tn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Pa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class rk extends ul{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=tn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[l,h]of n)Pa([l,h])&&o.push([[l[0]-s,l[1]+c],[...h]],[[l[0]+s,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class ik extends ul{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class nk{constructor(t){this.helper=t}fillPolygons(t,r){const i=tn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const c=Pa(s),l=c/n,h=Math.ceil(l)-1,u=c-h*n,f=(s[0][0]+s[1][0])/2-n/4,p=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=p+u+g*n,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class ak{constructor(t){this.helper=t}fillPolygons(t,r){const i=tn(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const s=Pa(o),c=Math.floor(s/(i+n)),l=(s+n-c*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<c;p++){const g=p*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+l*Math.cos(f),h[1]+g*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),a}}class sk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=tn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach(a=>{const o=Pa(a),s=Math.round(o/(2*r));let c=a[0],l=a[1];c[0]>l[0]&&(c=a[1],l=a[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<s;u++){const f=2*u*r,p=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+p*Math.cos(h),c[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),n}}const Ut={};class ok{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const lk=0,us=1,Yc=2,mn={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 fs(e,t){return e.type===t}function fl(e){const t=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:lk,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:us,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Yc,text:""},s}(e);let i="BOD",n=0,a=r[n];for(;!fs(a,Yc);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return fl("M0,0"+e);n++,o=mn[a.text],i=a.text}else fs(a,us)?o=mn[i]:(n++,o=mn[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let c=n;c<n+o;c++){const l=r[c];if(!fs(l,us))throw new Error("Param not a number: "+i+","+l.text);s[s.length]=+l.text}if(typeof mn[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:s};t.push(c),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ud(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function fd(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-c)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),s=h[0],c=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-s),g=n+(n-c)):(p=i,g=n);const m=i+2*(p-i)/3,y=n+2*(g-n)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=p,c=g,i=u,n=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),s=u,c=f,i=p,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(pd(i,n,y,x,u,f,p,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=l}return t}function xi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function pd(e,t,r,i,n,a,o,s,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(l)[p,g,m,y]=l;else{[e,t]=xi(e,t,-h),[r,i]=xi(r,i,-h);const R=(e-r)/2,E=(t-i)/2;let M=R*R/(n*n)+E*E/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const B=n*n,F=a*a,L=B*F-B*E*E-F*R*R,W=B*E*E+F*R*R,Y=(s===c?-1:1)*Math.sqrt(Math.abs(L/W));m=Y*n*E/a+(e+r)/2,y=Y*-a*R/n+(t+i)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),c&&p>g&&(p-=2*Math.PI),!c&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const R=g,E=r,M=i;g=c&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=pd(r=m+n*Math.cos(g),i=y+a*Math.sin(g),E,M,n,a,o,0,c,[g,R,m,y])}x=g-p;const b=Math.cos(p),C=Math.sin(p),k=Math.cos(g),S=Math.sin(g),_=Math.tan(x/4),v=4/3*n*_,D=4/3*a*_,P=[e,t],$=[e+v*C,t-D*b],A=[r+v*S,i-D*k],z=[r,i];if($[0]=2*P[0]-$[0],$[1]=2*P[1]-$[1],l)return[$,A,z].concat(f);{f=[$,A,z].concat(f);const R=[];for(let E=0;E<f.length;E+=3){const M=xi(f[E][0],f[E][1],h),B=xi(f[E+1][0],f[E+1][1],h),F=xi(f[E+2][0],f[E+2][1],h);R.push([M[0],M[1],B[0],B[1],F[0],F[1]])}return R}}const ck={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,n){const a=gd(r,i,n);return ro(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Ve(e,t,r,i,n,!0)}};function dd(e,t,r,i,n){return{type:"path",ops:Ve(e,t,r,i,n)}}function Mn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Ve(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Ve(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?dd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function hk(e,t,r,i,n){return function(a,o){return Mn(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Uc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=yn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:yn(r[0],1.5*(1+.22*t.roughness),Xc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=yn(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:yn(o,1.5*(1+.22*t.roughness),Xc(t));for(const l of s)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&n.push(l)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function gd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const c=1-r.curveFitting;return o+=rt(o*c,r),s+=rt(s*c,r),{increment:a,rx:o,ry:s}}function ro(e,t,r,i){const[n,a]=Zc(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let o=ua(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Zc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=ua(s,null,r);o=o.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Gc(e,t,r,i,n,a,o,s,c){const l=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=rt(.01*u,c),f+=rt(.01*f,c);let p=n,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(g-p)/2),x=Kc(y,l,h,u,f,p,g,1,c);if(!c.disableMultiStroke){const b=Kc(y,l,h,u,f,p,g,1.5,c);x.push(...b)}return o&&(s?x.push(...Ve(l,h,l+u*Math.cos(p),h+f*Math.sin(p),c),...Ve(l,h,l+u*Math.cos(g),h+f*Math.sin(g),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function Vc(e,t){const r=fd(ud(fl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Ve(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[c,l,h,u,f,p]=s;i.push(...uk(c,l,h,u,f,p,a,t)),a=[f,p];break}case"Z":i.push(...Ve(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function ps(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+rt(n,t),i[0][1]+rt(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+rt(n,t),i[o][1]+rt(n,t)]})}}return{type:"fillPath",ops:r}}function Lr(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!Ut[n])switch(n){case"zigzag":Ut[n]||(Ut[n]=new rk(i));break;case"cross-hatch":Ut[n]||(Ut[n]=new ik(i));break;case"dots":Ut[n]||(Ut[n]=new nk(i));break;case"dashed":Ut[n]||(Ut[n]=new ak(i));break;case"zigzag-line":Ut[n]||(Ut[n]=new sk(i));break;default:n="hachure",Ut[n]||(Ut[n]=new ul(i))}return Ut[n]}(t,ck).fillPolygons(e,t)}function Xc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function md(e){return e.randomizer||(e.randomizer=new ok(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(md(r)*(t-e)+e)}function rt(e,t,r=1){return ha(-e,e,t,r)}function Ve(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=io(e,t,r,i,n,!0,!1);if(o)return s;const c=io(e,t,r,i,n,!0,!0);return s.concat(c)}function io(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(s);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=c/10);const u=h/2,f=.2+.2*md(n);let p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=rt(p,n,l),g=rt(g,n,l);const m=[],y=()=>rt(u,n,l),x=()=>rt(h,n,l),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,n,l)),t+(b?0:rt(h,n,l))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function yn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+rt(t,r),e[n][1]+rt(t,r)]),n===e.length-1&&i.push([e[n][0]+rt(t,r),e[n][1]+rt(t,r)]);return ua(i,null,r)}function ua(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const c=e[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*e[s+1][0]-o*e[s-1][0])/6,c[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...io(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Zc(e,t,r,i,n,a,o,s){const c=[],l=[];if(s.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];c.push(u),l.push(u)}l.push([t+i*Math.cos(0),r+n*Math.sin(0)]),l.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=rt(.5,s)-Math.PI/2;l.push([rt(a,s)+t+.9*i*Math.cos(h-e),rt(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const p=[rt(a,s)+t+i*Math.cos(f),rt(a,s)+r+n*Math.sin(f)];c.push(p),l.push(p)}l.push([rt(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),l.push([rt(a,s)+t+.98*i*Math.cos(h+o),rt(a,s)+r+.98*n*Math.sin(h+o)]),l.push([rt(a,s)+t+.9*i*Math.cos(h+.5*o),rt(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[l,c]}function Kc(e,t,r,i,n,a,o,s,c){const l=a+rt(.1,c),h=[];h.push([rt(s,c)+t+.9*i*Math.cos(l-e),rt(s,c)+r+.9*n*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([rt(s,c)+t+i*Math.cos(u),rt(s,c)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),ua(h,null,c)}function uk(e,t,r,i,n,a,o,s){const c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<u;p++)p===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:rt(l[0],s)),o[1]+(f?0:rt(l[0],s))]}),h=f?[n,a]:[n+rt(l[p],s),a+rt(l[p],s)],c.push({op:"bcurveTo",data:[e+rt(l[p],s),t+rt(l[p],s),r+rt(l[p],s),i+rt(l[p],s),h[0],h[1]]});return c}function bi(e){return[...e]}function Qc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(bi(e[0]),bi(e[1]),bi(e[2]),bi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(bi(n[0]));for(let s=1;s+2<n.length;s++){const c=n[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*n[s+1][0]-o*n[s-1][0])/6,c[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function En(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fk(e,t,r){const i=En(t,r);if(i===0)return En(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),En(e,er(t,r,n))}function er(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function no(e,t,r,i){const n=i||[];if(function(s,c){const l=s[c+0],h=s[c+1],u=s[c+2],f=s[c+3];let p=3*h[0]-2*l[0]-f[0];p*=p;let g=3*h[1]-2*l[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,p<m&&(p=m),g<y&&(g=y),p+g}(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(En(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+3],f=er(c,l,.5),p=er(l,h,.5),g=er(h,u,.5),m=er(f,p,.5),y=er(p,g,.5),x=er(m,y,.5);no([c,f,m,x],0,r,n),no([x,y,g,u],0,r,n)}var a,o;return n}function pk(e,t){return fa(e,0,e.length,t)}function fa(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=fk(e[h],o,s);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(fa(e,t,l+1,i,a),fa(e,l,r,i,a)):(a.length||a.push(o),a.push(s)),a}function ds(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)no(e,3*a,t,i);return r&&r>0?fa(i,0,i.length,r):i}const Kt="none";class pa{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,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[dd(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],c=hk(t,r,i,n,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(ps([l],o)):s.push(Lr([l],o))}return o.stroke!==Kt&&s.push(c),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],c=gd(i,n,o),l=ro(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=ro(t,r,o,c).opset;h.type="fillPath",s.push(h)}else s.push(Lr([l.estimatedPoints],o));return o.stroke!==Kt&&s.push(l.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Mn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,c){const l=this._o(c),h=[],u=Gc(t,r,i,n,a,o,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const p=Gc(t,r,i,n,a,o,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,g,m,y,x,b){const C=f,k=p;let S=Math.abs(g/2),_=Math.abs(m/2);S+=rt(.01*S,b),_+=rt(.01*_,b);let v=y,D=x;for(;v<0;)v+=2*Math.PI,D+=2*Math.PI;D-v>2*Math.PI&&(v=0,D=2*Math.PI);const P=(D-v)/b.curveStepCount,$=[];for(let A=v;A<=D;A+=P)$.push([C+S*Math.cos(A),k+_*Math.sin(A)]);return $.push([C+S*Math.cos(D),k+_*Math.sin(D)]),$.push([C,k]),Lr([$],b)}(t,r,i,n,a,o,l));return l.stroke!==Kt&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),n=[],a=Uc(t,i);if(i.fill&&i.fill!==Kt)if(i.fillStyle==="solid"){const o=Uc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const c=typeof s[0][0]=="number"?[s]:s;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...ds(Qc([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...ds(Qc(l),10,(1+i.roughness)/2))}o.length&&n.push(Lr([o],i))}return i.stroke!==Kt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Mn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ps([t],i)):n.push(Lr([t],i))),i.stroke!==Kt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Kt,o=i.stroke!==Kt,s=!!(i.simplification&&i.simplification<1),c=function(h,u,f){const p=fd(ud(fl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...ds(x,u)),x=[]},C=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:_}of p)switch(S){case"M":C(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const v=m.length?m[m.length-1]:y;x.push([v[0],v[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!f)return g;const k=[];for(const S of g){const _=pk(S,f);_.length&&k.push(_)}return k}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),l=Vc(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const h=Vc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ps(c,i));else n.push(Lr(c,i));return o&&(s?c.forEach(h=>{n.push(Mn(h,!1,i))}):n.push(l)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Kt};break;case"fillPath":o={d:this.opsToPath(a),stroke:Kt,strokeWidth:0,fill:i.fill||Kt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Kt,strokeWidth:i,fill:Kt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class dk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l),l}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const xn="http://www.w3.org/2000/svg";class gk{constructor(t,r){this.svg=t,this.gen=new pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(xn,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let c=null;switch(s.type){case"path":c=n.createElementNS(xn,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=n.createElementNS(xn,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(n,s,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(xn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new dk(e,t),svg:(e,t)=>new gk(e,t),generator:e=>new pa(e),newSeed:()=>pa.newSeed()},st=d(async(e,t,r)=>{var u,f;let i;const n=t.useHtmlLabels||kt((u=ut())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const c=await Ke(o,hr(br(s),ut()),{useHtmlLabels:n,width:t.width||((f=ut().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(n){const p=c.children[0],g=lt(c),m=p.getElementsByTagName("img");if(m){const y=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function C(){if(x.style.display="flex",x.style.flexDirection="column",y){const k=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,S=5,[_=Mh.fontSize]=$a(k),v=_*S+"px";x.style.minWidth=v,x.style.maxWidth=v}else x.style.width="100%";b(x)}d(C,"setupImage"),setTimeout(()=>{x.complete&&C()}),x.addEventListener("error",C),x.addEventListener("load",C)})))}l=p.getBoundingClientRect(),g.attr("width",l.width),g.attr("height",l.height)}return n?o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):o.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:l,halfPadding:h,label:o}},"labelHelper"),gs=d(async(e,t,r)=>{var c,l,h,u,f,p;const i=r.useHtmlLabels||kt((l=(c=ut())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ke(n,hr(br(t),ut()),{useHtmlLabels:i,width:r.width||((u=(h=ut())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(kt((p=(f=ut())==null?void 0:f.flowchart)==null?void 0:p.htmlLabels)){const g=a.children[0],m=lt(a);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),V=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=d((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ct(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}d(ct,"createPathFromPoints");function Xe(e,t,r,i,n,a){const o=[],c=r-e,l=i-t,h=c/a,u=2*Math.PI/h,f=t+l/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*c,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}d(Xe,"generateFullSineWavePoints");function pl(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(pl,"generateCirclePoints");var mk=d((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),c=a===0?0:s*n/a,l=s):(n<0&&(o=-o),c=o,l=n===0?0:o*a/n),{x:r+c,y:i+l}},"intersectRect"),ii=mk;function yd(e,t){t&&e.attr("style",t)}d(yd,"applyStyle");async function xd(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Gr(e.label)&&(i=await xo(e.label.replace(ti.lineBreakRegex,`
|
|
183
|
+
`),ut()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),yd(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(xd,"addHtmlLabel");var yk=d(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),kt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),O.info("vertexText"+n);const a={isNode:i,label:br(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await xd(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=s.trim(),a.appendChild(c)}return a}},"createLabel"),or=yk,ze=d((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),xk=d(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ni=d(e=>{const t=bk([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),bk=d(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),bd=d(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"),X=d(e=>{const{stylesArray:t}=ni(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];bd(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),G=d((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=ni(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),_d=d(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=kt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ke(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(kt(r.flowchart.htmlLabels)){const v=g.children[0],D=lt(g);m=v.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const v=j.svg(u),D=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),P=v.path(ze(b,C,y,x,0),D);k=u.insert(()=>(O.debug("Rough node insert CXC",P),P),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Eo(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),s){const v=p.select("span");v&&v.attr("style",s)}const _=k.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return ii(t,v)},{cluster:u,labelBBox:m}},"rect"),_k=d((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return ii(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Ck=d(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const p=u.node().appendChild(await or(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(kt(r.flowchart.htmlLabels)){const P=p.children[0],$=lt(p);g=P.getBoundingClientRect(),$.attr("width",g.width),$.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,C=t.height+m-g.height-6,k=t.x-x/2,S=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+g.height+2;let v;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),$=j.svg(l),A=t.rx||t.ry?$.path(ze(k,S,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:c,seed:n}):$.rectangle(k,S,x,b,{seed:n});v=l.insert(()=>A,":first-child");const z=$.rectangle(k,_,x,C,{fill:P?a:o,fillStyle:P?"hachure":"solid",stroke:c,seed:n});v=l.insert(()=>A,":first-child"),f=l.insert(()=>z)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",k).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",_).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(kt(r.flowchart.htmlLabels)?0:3)})`);const D=v.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return ii(t,P)},{cluster:l,labelBBox:g}},"roundedWithTitle"),wk=d(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=kt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ke(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(kt(r.flowchart.htmlLabels)){const v=g.children[0],D=lt(g);m=v.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const v=j.svg(u),D=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),P=v.path(ze(b,C,y,x,t.rx),D);k=u.insert(()=>(O.debug("Rough node insert CXC",P),P),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Eo(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),s){const v=p.select("span");v&&v.attr("style",s)}const _=k.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return ii(t,v)},{cluster:u,labelBBox:m}},"kanbanSection"),vk=d((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let p;if(t.look==="handDrawn"){const y=j.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});p=o.insert(()=>y,":first-child")}else p=s.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ii(t,m)},{cluster:o,labelBBox:{}}},"divider"),kk=_d,Sk={rect:_d,squareRect:kk,roundedWithTitle:Ck,noteGroup:_k,divider:vk,kanbanSection:wk},Cd=new Map,Tk=d(async(e,t)=>{const r=t.shape||"rect",i=await Sk[r](e,t);return Cd.set(t.id,i),i},"insertCluster"),GL=d(()=>{Cd=new Map},"clear");function wd(e,t){return e.intersect(t)}d(wd,"intersectNode");var Bk=wd;function vd(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,c=Math.sqrt(t*t*s*s+r*r*o*o),l=Math.abs(t*r*o/c);i.x<n&&(l=-l);var h=Math.abs(t*r*s/c);return i.y<a&&(h=-h),{x:n+l,y:a+h}}d(vd,"intersectEllipse");var kd=vd;function Sd(e,t,r){return kd(e,t,t,r)}d(Sd,"intersectCircle");var Lk=Sd;function Td(e,t,r,i){var n,a,o,s,c,l,h,u,f,p,g,m,y,x,b;if(n=t.y-e.y,o=e.x-t.x,c=t.x*e.y-e.x*t.y,f=n*r.x+o*r.y+c,p=n*i.x+o*i.y+c,!(f!==0&&p!==0&&ao(f,p))&&(a=i.y-r.y,s=r.x-i.x,l=i.x*r.y-r.x*i.y,h=a*e.x+s*e.y+l,u=a*t.x+s*t.y+l,!(h!==0&&u!==0&&ao(h,u))&&(g=n*s-a*o,g!==0)))return m=Math.abs(g/2),y=o*l-s*c,x=y<0?(y-m)/g:(y+m)/g,y=a*c-n*l,b=y<0?(y-m)/g:(y+m)/g,{x,y:b}}d(Td,"intersectLine");function ao(e,t){return e*t>0}d(ao,"sameSign");var Ak=Td;function Bd(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=i-e.width/2-o,l=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],p=Ak(e,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}d(Bd,"intersectPolygon");var Mk=Bd,H={node:Bk,circle:Lk,ellipse:kd,polygon:Mk,rect:ii};function Ld(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=it(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,c=j.svg(a),l=G(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",qt(s)),V(t,u),t.intersect=function(f){return O.info("Circle intersect",t,o,f),H.circle(t,o,f)},a}d(Ld,"anchor");function so(e,t,r,i,n,a,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/n,g=f/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*a*Math.sin(h)*(o?-1:1),b=l-y*n*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/a,(e-x)/n);let S=Math.atan2((i-b)/a,(r-x)/n)-C;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const _=[];for(let v=0;v<20;v++){const D=v/19,P=C+D*S,$=x+n*Math.cos(P),A=b+a*Math.sin(P);_.push({x:$,y:A})}return _}d(so,"generateArcPoints");async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding+20,s=a.height+t.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...so(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...so(o/2,s/2,o/2,-s/2,l,c,!0)],f=j.svg(n),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ct(u),m=f.path(g,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),V(t,y),t.intersect=function(x){return H.polygon(t,u,x)},n}d(Ad,"bowTieRect");function We(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(We,"insertPolygonShape");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.height+t.padding,s=12,c=a.width+t.padding+s,l=0,h=c,u=-o,f=0,p=[{x:l+s,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+s},{x:l+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(n),x=G(t,{}),b=ct(p),C=y.path(b,x);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=We(n,c,o,p);return i&&g.attr("style",i),V(t,g),t.intersect=function(y){return H.polygon(t,p,y)},n}d(Md,"card");function Ed(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=j.svg(i),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=ct(o),h=s.path(l,c),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return H.polygon(t,o,f)},i}d(Ed,"choice");async function Fd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await st(e,t,it(t)),s=a.width/2+o;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=G(t,{}),f=h.circle(0,0,s*2,u);c=n.insert(()=>f,":first-child"),c.attr("class","basic label-container").attr("style",qt(l))}else c=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return V(t,c),t.intersect=function(h){return O.info("Circle intersect",t,s,h),H.circle(t,s,h)},n}d(Fd,"circle");function $d(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
184
|
+
M ${n.x},${n.y} L ${o.x},${o.y}`}d($d,"createLine");function Od(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=j.svg(n),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=s.circle(0,0,a*2,c),h=$d(a),u=s.path(h,c),f=n.insert(()=>l,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),V(t,f),t.intersect=function(p){return O.info("crossedCircle intersect",t,{radius:a,point:p}),H.circle(t,a,p)},n}d(Od,"crossedCircle");function Ee(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(Ee,"generateCirclePoints");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Ee(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...Ee(s/2+l*2,-l,l,20,-180,-270),...Ee(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...Ee(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...Ee(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...Ee(s/2+s*.1,-l,l,20,-180,-270),...Ee(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...Ee(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2,y:c/2+l}],p=j.svg(n),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ct(u).replace("Z",""),x=p.path(y,g),b=ct(f),C=p.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-s/2+l-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(S){return H.polygon(t,f,S)},n}d(Dd,"curlyBraceLeft");function Fe(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:p,y:g})}return o}d(Fe,"generateCirclePoints");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Fe(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...Fe(s/2+l*2,-l,l,20,-180,-270),...Fe(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...Fe(s/2,c/2,l,20,0,90)],f=[{x:-s/2,y:-c/2-l},{x:s/2,y:-c/2-l},...Fe(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...Fe(s/2+l*2,-l,l,20,-180,-270),...Fe(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...Fe(s/2,c/2,l,20,0,90),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],p=j.svg(n),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ct(u).replace("Z",""),x=p.path(y,g),b=ct(f),C=p.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(S){return H.polygon(t,f,S)},n}d(Rd,"curlyBraceRight");function At(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(At,"generateCirclePoints");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...At(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...At(s/2+l*2,-l,l,20,-180,-270),...At(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...At(s/2,c/2,l,20,0,90)],f=[...At(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...At(-s/2-l/2,-l,l,20,0,90),...At(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...At(-s/2+l+l/2,c/2,l,30,-180,-270)],p=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...At(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...At(s/2+l*2,-l,l,20,-180,-270),...At(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...At(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2-l-l/2,y:c/2+l},...At(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...At(-s/2-l/2,-l,l,20,0,90),...At(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...At(-s/2+l+l/2,c/2,l,30,-180,-270)],g=j.svg(n),m=G(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ct(u).replace("Z",""),b=g.path(x,m),k=ct(f).replace("Z",""),S=g.path(k,m),_=ct(p),v=g.path(_,{...m}),D=n.insert("g",":first-child");return D.insert(()=>v,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>S,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,D),t.intersect=function(P){return H.polygon(t,p,P)},n}d(Id,"curlyBraces");async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=80,s=20,c=Math.max(o,(a.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),l=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=j.svg(n),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=c,m=l,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...pl(-y,-m/2,h,50,270,90)],C=ct(b),k=f.path(C,p),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(${-c/2}, ${-l/2})`),V(t,S),t.intersect=function(_){return H.polygon(t,b,_)},n}d(Pd,"curvedTrapezoid");var Ek=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Fk=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),$k=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+t.padding,t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=j.svg(n),g=Fk(0,0,s,h,c,l),m=$k(0,l,s,h,c,l),y=p.path(g,G(t,{})),x=p.path(m,G(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=Ek(0,0,s,h,c,l);u=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",qt(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),V(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(p){const g=H.rect(t,p),m=g.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}d(Nd,"cylinder");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+t.padding,c=a.height+t.padding,l=c*.2,h=-s/2,u=-c/2-l/2,{cssStyles:f}=t,p=j.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+l+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return H.rect(t,b)},n}d(zd,"dividedRectangle");async function Wd(e,t){var f,p;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await st(e,t,it(t)),c=a.width/2+o+5,l=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=G(t,{roughness:.2,strokeWidth:2.5}),y=G(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,c*2,m),b=g.circle(0,0,l*2,y);h=n.insert("g",":first-child"),h.attr("class",qt(t.cssClasses)).attr("style",qt(u)),(f=h.node())==null||f.appendChild(x),(p=h.node())==null||p.appendChild(b)}else{h=n.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return V(t,h),t.intersect=function(g){return O.info("DoubleCircle intersect",t,c,g),H.circle(t,c,g)},n}d(Wd,"doublecircle");function qd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,c=j.svg(a),{nodeBorder:l}=r,h=G(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),V(t,f),t.intersect=function(p){return O.info("filledCircle intersect",t,{radius:o,point:p}),H.circle(t,o,p)},a}d(qd,"filledCircle");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),c=s+a.height,l=s+a.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=t,f=j.svg(n),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ct(h),m=f.path(g,p),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=c,V(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-c/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return O.info("Triangle intersect",t,h,x),H.polygon(t,h,x)},n}d(Hd,"flippedTriangle");function jd(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=X(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,u=-1*l/2,f=j.svg(o),p=G(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,c,l,p),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),V(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return H.rect(t,x)},o}d(jd,"forkJoin");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await st(e,t,it(t)),c=Math.max(n,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=j.svg(o),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...pl(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=ct(g),y=f.path(m,p),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),V(t,x),t.intersect=function(b){return O.info("Pill intersect",t,{radius:h,point:b}),H.polygon(t,g,b)},o}d(Yd,"halfRoundedRectangle");var Ok=d((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=4,s=a.height+t.padding,c=s/o,l=a.width+2*c+t.padding,h=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-s/2},{x:l-c,y:-s},{x:c,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=j.svg(n),g=G(t,{}),m=Ok(0,0,l,s,c),y=p.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),f&&u.attr("style",f)}else u=We(n,l,s,h);return i&&u.attr("style",i),t.width=l,t.height=s,V(t,u),t.intersect=function(p){return H.polygon(t,h,p)},n}d(Ud,"hexagon");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await st(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,c=j.svg(n),l=G(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ct(h),f=c.path(u,l),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-o/2})`),V(t,p),t.intersect=function(g){return O.info("Pill intersect",t,{points:h}),H.polygon(t,h,g)},n}d(Gd,"hourglass");async function Vd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await st(e,t,"icon-shape default"),f=t.pos==="t",p=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=ni(t),x=-g/2,b=-p/2,C=t.label?8:0,k=j.svg(l),S=G(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=k.rectangle(x,b,g,p,S),v=Math.max(g,h.width),D=p+h.height+C,P=k.rectangle(-v/2,-D/2,v,D,{...S,fill:"transparent",stroke:"none"}),$=l.insert(()=>_,":first-child"),A=l.insert(()=>P);if(t.icon){const z=l.append("g");z.html(`<g>${await wa(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const R=z.node().getBBox(),E=R.width,M=R.height,B=R.x,F=R.y;z.attr("transform",`translate(${-E/2-B},${f?h.height/2+C/2-M/2-F:-h.height/2-C/2-M/2-F})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),$.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),V(t,A),t.intersect=function(z){if(O.info("iconSquare intersect",t,z),!t.label)return H.rect(t,z);const R=t.x??0,E=t.y??0,M=t.height??0;let B=[];return f?B=[{x:R-h.width/2,y:E-M/2},{x:R+h.width/2,y:E-M/2},{x:R+h.width/2,y:E-M/2+h.height+C},{x:R+g/2,y:E-M/2+h.height+C},{x:R+g/2,y:E+M/2},{x:R-g/2,y:E+M/2},{x:R-g/2,y:E-M/2+h.height+C},{x:R-h.width/2,y:E-M/2+h.height+C}]:B=[{x:R-g/2,y:E-M/2},{x:R+g/2,y:E-M/2},{x:R+g/2,y:E-M/2+p},{x:R+h.width/2,y:E-M/2+p},{x:R+h.width/2/2,y:E+M/2},{x:R-h.width/2,y:E+M/2},{x:R-h.width/2,y:E-M/2+p},{x:R-g/2,y:E-M/2+p}],H.polygon(t,B,z)},l}d(Vd,"icon");async function Xd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await st(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=ni(t),b=j.svg(l),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=x.get("fill");C.stroke=k??y;const S=l.append("g");t.icon&&S.html(`<g>${await wa(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),v=_.width,D=_.height,P=_.x,$=_.y,A=Math.max(v,D)*Math.SQRT2+f*2,z=b.circle(0,0,A,C),R=Math.max(A,h.width),E=A+h.height+p,M=b.rectangle(-R/2,-E/2,R,E,{...C,fill:"transparent",stroke:"none"}),B=l.insert(()=>z,":first-child"),F=l.insert(()=>M);return S.attr("transform",`translate(${-v/2-P},${g?h.height/2+p/2-D/2-$:-h.height/2-p/2-D/2-$})`),S.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-E/2:E/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),V(t,F),t.intersect=function(L){return O.info("iconSquare intersect",t,L),H.rect(t,L)},l}d(Xd,"iconCircle");async function Zd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await st(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ni(t),C=-m/2,k=-g/2,S=t.label?8:0,_=j.svg(l),v=G(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const P=_.path(ze(C,k,m,g,5),v),$=Math.max(m,h.width),A=g+h.height+S,z=_.rectangle(-$/2,-A/2,$,A,{...v,fill:"transparent",stroke:"none"}),R=l.insert(()=>P,":first-child").attr("class","icon-shape2"),E=l.insert(()=>z);if(t.icon){const M=l.append("g");M.html(`<g>${await wa(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),F=B.width,L=B.height,W=B.x,Y=B.y;M.attr("transform",`translate(${-F/2-W},${p?h.height/2+S/2-L/2-Y:-h.height/2-S/2-L/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),V(t,E),t.intersect=function(M){if(O.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const B=t.x??0,F=t.y??0,L=t.height??0;let W=[];return p?W=[{x:B-h.width/2,y:F-L/2},{x:B+h.width/2,y:F-L/2},{x:B+h.width/2,y:F-L/2+h.height+S},{x:B+m/2,y:F-L/2+h.height+S},{x:B+m/2,y:F+L/2},{x:B-m/2,y:F+L/2},{x:B-m/2,y:F-L/2+h.height+S},{x:B-h.width/2,y:F-L/2+h.height+S}]:W=[{x:B-m/2,y:F-L/2},{x:B+m/2,y:F-L/2},{x:B+m/2,y:F-L/2+g},{x:B+h.width/2,y:F-L/2+g},{x:B+h.width/2/2,y:F+L/2},{x:B-h.width/2,y:F+L/2},{x:B-h.width/2,y:F-L/2+g},{x:B-m/2,y:F-L/2+g}],H.polygon(t,W,M)},l}d(Zd,"iconRounded");async function Kd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await st(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ni(t),C=-m/2,k=-g/2,S=t.label?8:0,_=j.svg(l),v=G(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const P=_.path(ze(C,k,m,g,.1),v),$=Math.max(m,h.width),A=g+h.height+S,z=_.rectangle(-$/2,-A/2,$,A,{...v,fill:"transparent",stroke:"none"}),R=l.insert(()=>P,":first-child"),E=l.insert(()=>z);if(t.icon){const M=l.append("g");M.html(`<g>${await wa(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),F=B.width,L=B.height,W=B.x,Y=B.y;M.attr("transform",`translate(${-F/2-W},${p?h.height/2+S/2-L/2-Y:-h.height/2-S/2-L/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),V(t,E),t.intersect=function(M){if(O.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const B=t.x??0,F=t.y??0,L=t.height??0;let W=[];return p?W=[{x:B-h.width/2,y:F-L/2},{x:B+h.width/2,y:F-L/2},{x:B+h.width/2,y:F-L/2+h.height+S},{x:B+m/2,y:F-L/2+h.height+S},{x:B+m/2,y:F+L/2},{x:B-m/2,y:F+L/2},{x:B-m/2,y:F-L/2+h.height+S},{x:B-h.width/2,y:F-L/2+h.height+S}]:W=[{x:B-m/2,y:F-L/2},{x:B+m/2,y:F-L/2},{x:B+m/2,y:F-L/2+g},{x:B+h.width/2,y:F-L/2+g},{x:B+h.width/2/2,y:F+L/2},{x:B-h.width/2,y:F+L/2},{x:B-h.width/2,y:F-L/2+g},{x:B-m/2,y:F-L/2+g}],H.polygon(t,W,M)},l}d(Kd,"iconSquare");async function Qd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=X(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??n),l=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(l,s??0);const{shapeSvg:u,bbox:f,label:p}=await st(e,t,"image-shape default"),g=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=j.svg(u),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(m,y,l,h,C),S=Math.max(l,f.width),_=h+f.height+x,v=b.rectangle(-S/2,-_/2,S,_,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>k,":first-child"),P=u.insert(()=>v);if(t.img){const $=u.append("image");$.attr("href",t.img),$.attr("width",l),$.attr("height",h),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-l/2},${g?_/2-h:-_/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),V(t,P),t.intersect=function($){if(O.info("iconSquare intersect",t,$),!t.label)return H.rect(t,$);const A=t.x??0,z=t.y??0,R=t.height??0;let E=[];return g?E=[{x:A-f.width/2,y:z-R/2},{x:A+f.width/2,y:z-R/2},{x:A+f.width/2,y:z-R/2+f.height+x},{x:A+l/2,y:z-R/2+f.height+x},{x:A+l/2,y:z+R/2},{x:A-l/2,y:z+R/2},{x:A-l/2,y:z-R/2+f.height+x},{x:A-f.width/2,y:z-R/2+f.height+x}]:E=[{x:A-l/2,y:z-R/2},{x:A+l/2,y:z-R/2},{x:A+l/2,y:z-R/2+h},{x:A+f.width/2,y:z-R/2+h},{x:A+f.width/2/2,y:z+R/2},{x:A-f.width/2,y:z+R/2},{x:A-f.width/2,y:z-R/2+h},{x:A-l/2,y:z-R/2+h}],H.polygon(t,E,$)},u}d(Qd,"imageSquare");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=G(t,{}),p=ct(c),g=u.path(p,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=We(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return H.polygon(t,c,u)},n}d(Jd,"inv_trapezoid");async function en(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),l=-s/2,h=-c/2;let u,{rx:f,ry:p}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=j.svg(a),y=G(t,{}),x=f||p?m.path(ze(l,h,s,c,f||0),y):m.rectangle(l,h,s,c,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",qt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",qt(f)).attr("ry",qt(p)).attr("x",l).attr("y",h).attr("width",s).attr("height",c);return V(t,u),t.intersect=function(m){return H.rect(t,m)},a}d(en,"drawRect");async function tg(e,t){const{shapeSvg:r,bbox:i,label:n}=await st(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),V(t,a),t.intersect=function(c){return H.rect(t,c)},r}d(tg,"labelRect");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=G(t,{}),p=ct(c),g=u.path(p,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=We(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return H.polygon(t,c,u)},n}d(eg,"lean_left");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=G(t,{}),p=ct(c),g=u.path(p,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=We(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return H.polygon(t,c,u)},n}d(rg,"lean_right");function ig(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),c=7,l=[{x:o,y:0},{x:0,y:s+c/2},{x:o-2*c,y:s+c/2},{x:0,y:2*s},{x:o,y:s-c/2},{x:2*c,y:s-c/2}],h=j.svg(n),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ct(l),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),V(t,g),t.intersect=function(m){return O.info("lightningBolt intersect",t,m),H.polygon(t,l,m)},n}d(ig,"lightningBolt");var Dk=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Rk=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ik=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0),t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=Rk(0,0,s,h,c,l,u),y=Ik(0,l,s,h,c,l),x=G(t,{}),b=g.path(m,x),C=g.path(y,x);n.insert(()=>C,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=Dk(0,0,s,h,c,l,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qt(p)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),V(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),t.intersect=function(g){const m=H.rect(t,g),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}d(ng,"linedCylinder");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:u}=t,f=j.svg(n),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Xe(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,l,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),V(t,y),t.intersect=function(x){return H.polygon(t,g,x)},n}d(ag,"linedWaveEdgedRect");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,p=j.svg(n),g=G(t,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+s-l,y:u+c+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u+c-l},{x:h+s+l,y:u+c-l},{x:h+s+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+s-l,y:u+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(m),b=p.path(x,g),C=ct(y),k=p.path(C,{...g,fill:"none"}),S=n.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-l-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),V(t,S),t.intersect=function(_){return H.polygon(t,m,_)},n}d(sg,"multiRect");async function og(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,u=-s/2,f=-h/2,p=5,{cssStyles:g}=t,m=Xe(u-p,f+h+p,u+s-p,f+h+p,l,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:y.y-2*p},{x:u+s+p,y:y.y-2*p},{x:u+s+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+s-p,y:f+p},{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:f},{x:u,y:f}],C=j.svg(n),k=G(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=ct(x),_=C.path(S,k),v=ct(b),D=C.path(v,k),P=n.insert(()=>_,":first-child");return P.insert(()=>D),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-l/2-(a.y-(a.top??0))})`),V(t,P),t.intersect=function($){return H.polygon(t,x,$)},n}d(og,"multiWaveEdgedRectangle");async function lg(e,t,{config:{themeVariables:r}}){var x;const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i,t.useHtmlLabels||((x=Zt().flowchart)==null?void 0:x.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await st(e,t,it(t)),c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-c/2,u=-l/2,{cssStyles:f}=t,p=j.svg(o),g=G(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=p.rectangle(h,u,c,l,g),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),V(t,y),t.intersect=function(b){return H.rect(t,b)},o}d(lg,"note");var Pk=d((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,c=o+s,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(n),p=G(t,{}),g=Pk(0,0,c),m=f.path(g,p);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`),u&&h.attr("style",u)}else h=We(n,c,c,l);return i&&h.attr("style",i),V(t,h),t.intersect=function(f){return O.debug(`APA12 Intersect called SPLIT
|
|
185
|
+
point:`,f,`
|
|
186
|
+
node:
|
|
187
|
+
`,t,`
|
|
188
|
+
res:`,H.polygon(t,l,f)),H.polygon(t,l,f)},n}d(cg,"question");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),l=-s/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:p}=t,g=j.svg(n),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ct(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),V(t,b),t.intersect=function(C){return H.polygon(t,f,C)},n}d(hg,"rect_left_inv_arrow");async function ug(e,t){var D,P;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=s.node().appendChild(await or(l,t.labelStyle,!0,!0));let u={width:0,height:0};if(kt((P=(D=ut())==null?void 0:D.flowchart)==null?void 0:P.htmlLabels)){const $=h.children[0],A=lt(h);u=$.getBoundingClientRect(),A.attr("width",u.width),A.attr("height",u.height)}O.info("Text 2",c);const f=c||[],p=h.getBBox(),g=s.node().appendChild(await or(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),C=u.height+(t.padding||0),k=-u.width/2-x,S=-u.height/2-x;let _,v;if(t.look==="handDrawn"){const $=j.svg(a),A=G(t,{}),z=$.path(ze(k,S,b,C,t.rx||0),A),R=$.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,A);v=a.insert(()=>(O.debug("Rough node insert CXC",z),R),":first-child"),_=a.insert(()=>(O.debug("Rough node insert CXC",z),z),":first-child")}else _=o.insert("rect",":first-child"),v=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return V(t,_),t.intersect=function($){return H.rect(t,$)},a}d(ug,"rectWithTitle");async function fg(e,t){const r={rx:5,ry:5,labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return en(e,t,r)}d(fg,"roundedRect");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=(t==null?void 0:t.padding)??0,c=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,p=j.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",qt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return H.rect(t,b)},n}d(pg,"shadedProcess");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-s/2,h=-c/2,{cssStyles:u}=t,f=j.svg(n),p=G(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:l,y:h},{x:l,y:h+c},{x:l+s,y:h+c},{x:l+s,y:h-c/2}],m=ct(g),y=f.path(m,p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-c/4+(t.padding??0)-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return H.polygon(t,g,b)},n}d(dg,"slopedRect");async function gg(e,t){const r={rx:0,ry:0,labelPaddingX:((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return en(e,t,r)}d(gg,"squareRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=G(t,{}),f=ze(-s/2,-o/2,s,o,o/2),p=h.path(f,u);c=n.insert(()=>p,":first-child"),c.attr("class","basic label-container").attr("style",qt(l))}else c=n.insert("rect",":first-child"),c.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return V(t,c),t.intersect=function(h){return H.rect(t,h)},n}d(mg,"stadium");async function yg(e,t){return en(e,t,{rx:5,ry:5})}d(yg,"state");function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(l),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=s??c,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),V(t,m),t.intersect=function(y){return H.circle(t,7,y)},l}d(xg,"stateEnd");function bg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=j.svg(n).circle(0,0,14,xk(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return V(t,a),t.intersect=function(o){return H.circle(t,7,o)},n}d(bg,"stateStart");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=((t==null?void 0:t.padding)||0)/2,s=a.width+t.padding,c=a.height+t.padding,l=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const f=j.svg(n),p=G(t,{}),g=f.rectangle(l-8,h,s+16,c,p),m=f.line(l,h,l,h+c,p),y=f.line(l+s,h,l+s,h+c,p);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",qt(b)),V(t,x)}else{const f=We(n,s,c,u);i&&f.attr("style",i),V(t,f)}return t.intersect=function(f){return H.polygon(t,u,f)},n}d(_g,"subroutine");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-o/2,l=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,p=j.svg(n),g=G(t,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+s},{x:c-h/2,y:l+s}],y=[{x:c+o-h/2,y:l+s},{x:c+o+h/2,y:l+s},{x:c+o+h/2,y:l+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(m),b=p.path(x,g),C=ct(y),k=p.path(C,{...g,fillStyle:"solid"}),S=n.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),V(t,S),t.intersect=function(_){return H.polygon(t,m,_)},n}d(Cg,"taggedRect");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=.2*s,u=.2*c,f=c+l,{cssStyles:p}=t,g=j.svg(n),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...Xe(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,C=[{x:x+s-h,y:(b+c)*1.4},{x:x+s,y:b+c-u},{x:x+s,y:(b+c)*.9},...Xe(x+s,(b+c)*1.3,x+s-h,(b+c)*1.5,-c*.03,.5)],k=ct(y),S=g.path(k,m),_=ct(C),v=g.path(_,{...m,fillStyle:"solid"}),D=n.insert(()=>v,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),V(t,D),t.intersect=function(P){return H.polygon(t,y,P)},n}d(wg,"taggedWaveEdgedRectangle");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(a.height+t.padding,(t==null?void 0:t.height)||0),c=-o/2,l=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",s),V(t,h),t.intersect=function(u){return H.rect(t,u)},n}d(vg,"text");var Nk=d((e,t,r,i,n,a)=>`M${e},${t}
|
|
189
|
+
a${n},${a} 0,0,1 0,${-i}
|
|
190
|
+
l${r},0
|
|
191
|
+
a${n},${a} 0,0,1 0,${i}
|
|
192
|
+
M${r},${-i}
|
|
193
|
+
a${n},${a} 0,0,0 0,${i}
|
|
194
|
+
l${-r},0`,"createCylinderPathD"),zk=d((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Wk=d((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await st(e,t,it(t)),c=t.look==="neo"?s*2:s,l=a.height+c,h=l/2,u=h/(2.5+l/50),f=a.width+u+c,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=j.svg(n),y=zk(0,0,f,l,u,h),x=Wk(0,0,f,l,u,h),b=m.path(y,G(t,{})),C=m.path(x,G(t,{fill:"none"}));g=n.insert(()=>C,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=Nk(0,0,f,l,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qt(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),V(t,g),t.intersect=function(m){const y=H.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}d(kg,"tiltedCylinder");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=G(t,{}),p=ct(c),g=u.path(p,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=We(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return H.polygon(t,c,u)},n}d(Sg,"trapezoid");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=60,s=20,c=Math.max(o,a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=j.svg(n),f=G(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],g=ct(p),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),V(t,y),t.intersect=function(x){return H.polygon(t,p,x)},n}d(Tg,"trapezoidalPentagon");async function Bg(e,t){var b;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=kt((b=ut().flowchart)==null?void 0:b.htmlLabels),c=a.width+(t.padding??0),l=c+a.height,h=c+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=t,p=j.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ct(u),y=p.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,V(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${l/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(C){return O.info("Triangle intersect",t,u,C),H.polygon(t,u,C)},n}d(Bg,"triangle");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:u}=t,p=70-s,g=p>0?p/2:0,m=j.svg(n),y=G(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Xe(-s/2-g,h/2,s/2+g,h/2,l,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ct(x),C=m.path(b,y),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(S){return H.polygon(t,x,S)},n}d(Lg,"waveEdgedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=100,s=50,c=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=j.svg(n),x=G(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Xe(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Xe(u/2,-g/2,-u/2,-g/2,p,-1)],C=ct(b),k=y.path(C,x),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),V(t,S),t.intersect=function(_){return H.polygon(t,b,_)},n}d(Ag,"waveRectangle");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,p=j.svg(n),g=G(t,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u-l}],y=`M${h-l},${u-l} L${h+s},${u-l} L${h+s},${u+c} L${h-l},${u+c} L${h-l},${u-l}
|
|
195
|
+
M${h-l},${u} L${h+s},${u}
|
|
196
|
+
M${h},${u-l} L${h},${u+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+l/2-(a.x-(a.left??0))}, ${-(a.height/2)+l/2-(a.y-(a.top??0))})`),V(t,b),t.intersect=function(C){return H.polygon(t,m,C)},n}d(Mg,"windowPane");async function dl(e,t){var W,Y,J;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:tt}=Zt(),{background:et}=tt,ht={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${et}`]};await dl(e,ht)}const i=Zt();t.useHtmlLabels=i.htmlLabels;let n=((W=i.er)==null?void 0:W.diagramPadding)??10,a=((Y=i.er)==null?void 0:Y.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:s}=X(t);if(r.attributes.length===0&&t.label){const tt={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Pe(t.label,i)+tt.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const et=await en(e,t,tt);if(!kt(i.htmlLabels)){const ht=et.select("text"),nt=(J=ht.node())==null?void 0:J.getBBox();ht.attr("transform",`translate(${-nt.width/2}, 0)`)}return et}i.htmlLabels||(n*=1.25,a*=1.25);let c=it(t);c||(c="node default");const l=e.insert("g").attr("class",c).attr("id",t.domId||t.id),h=await Mr(l,t.label??"",i,0,0,["name"],s);h.height+=a;let u=0;const f=[];let p=0,g=0,m=0,y=0,x=!0,b=!0;for(const tt of r.attributes){const et=await Mr(l,tt.type,i,0,u,["attribute-type"],s);p=Math.max(p,et.width+n);const ht=await Mr(l,tt.name,i,0,u,["attribute-name"],s);g=Math.max(g,ht.width+n);const nt=await Mr(l,tt.keys.join(),i,0,u,["attribute-keys"],s);m=Math.max(m,nt.width+n);const St=await Mr(l,tt.comment,i,0,u,["attribute-comment"],s);y=Math.max(y,St.width+n),u+=Math.max(et.height,ht.height,nt.height,St.height)+a,f.push(u)}f.pop();let C=4;m<=n&&(x=!1,m=0,C--),y<=n&&(b=!1,y=0,C--);const k=l.node().getBBox();if(h.width+n*2-(p+g+m+y)>0){const tt=h.width+n*2-(p+g+m+y);p+=tt/C,g+=tt/C,m>0&&(m+=tt/C),y>0&&(y+=tt/C)}const S=p+g+m+y,_=j.svg(l),v=G(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=Math.max(k.width+n*2,(t==null?void 0:t.width)||0,S),P=Math.max(k.height+(f[0]||u)+a,(t==null?void 0:t.height)||0),$=-D/2,A=-P/2;l.selectAll("g:not(:first-child)").each((tt,et,ht)=>{const nt=lt(ht[et]),St=nt.attr("transform");let Lt=0,se=0;if(St){const bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(St);bt&&(Lt=parseFloat(bt[1]),se=parseFloat(bt[2]),nt.attr("class").includes("attribute-name")?Lt+=p:nt.attr("class").includes("attribute-keys")?Lt+=p+g:nt.attr("class").includes("attribute-comment")&&(Lt+=p+g+m))}nt.attr("transform",`translate(${$+n/2+Lt}, ${se+A+h.height+a/2})`)}),l.select(".name").attr("transform","translate("+-h.width/2+", "+(A+a/2)+")");const z=_.rectangle($,A,D,P,v),R=l.insert(()=>z,":first-child").attr("style",o.join("")),{themeVariables:E}=Zt(),{rowEven:M,rowOdd:B,nodeBorder:F}=E;f.push(0);for(const[tt,et]of f.entries()){if(tt===0&&f.length>1)continue;const ht=tt%2===0&&et!==0,nt=_.rectangle($,h.height+A+et,D,h.height,{...v,fill:ht?M:B,stroke:F});l.insert(()=>nt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${tt%2===0?"even":"odd"}`)}let L=_.line($,h.height+A,D+$,h.height+A,v);l.insert(()=>L).attr("class","divider"),L=_.line(p+$,h.height+A,p+$,P+A,v),l.insert(()=>L).attr("class","divider"),x&&(L=_.line(p+g+$,h.height+A,p+g+$,P+A,v),l.insert(()=>L).attr("class","divider")),b&&(L=_.line(p+g+m+$,h.height+A,p+g+m+$,P+A,v),l.insert(()=>L).attr("class","divider"));for(const tt of f)L=_.line($,h.height+A+tt,D+$,h.height+A+tt,v),l.insert(()=>L).attr("class","divider");return V(t,R),t.intersect=function(tt){return H.rect(t,tt)},l}d(dl,"erBox");async function Mr(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Vl(t)&&(t=Vl(t),t=t.replaceAll("<","<").replaceAll(">",">"));const c=s.node().appendChild(await Ke(s,t,{width:Pe(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let l=c.getBBox();if(kt(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=lt(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}d(Mr,"addText");async function Eg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let s=null,c=null,l=null,h=null,u=0,f=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ti(s,{text:`«${b}»`},0),u=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await Ti(c,t,0,["font-weight: bolder"]);const g=c.node().getBBox();f=g.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const C=await Ti(l,b,m,[b.parseClassifier()]);m+=C+a}p=l.node().getBBox().height,p<=0&&(p=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const C=await Ti(h,b,y,[b.parseClassifier()]);y+=C+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}d(Eg,"textHelper");async function Ti(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Zt();let o="useHtmlLabels"in t?t.useHtmlLabels:kt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Gr(s)&&(o=!0);const c=await Ke(n,vo(br(s)),{width:Pe(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let l,h=1;if(o){const u=c.children[0],f=lt(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const C=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(C,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&<(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),l=c.getBBox()}return n.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}d(Ti,"addText");async function Fg(e,t){var P,$;const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??kt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:c}=await Eg(e,t,r,a,n),{labelStyles:l,nodeStyles:h}=X(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=((P=o.styles)==null?void 0:P.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!(($=r.class)!=null&&$.hideEmptyMembersBox),p=j.svg(s),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,C=p.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),k=s.insert(()=>C,":first-child");k.attr("class","basic label-container");const S=k.node().getBBox();s.selectAll(".text").each((A,z,R)=>{var W;const E=lt(R[z]),M=E.attr("transform");let B=0;if(M){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);J&&(B=parseFloat(J[2]))}let F=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(F-=4);let L=x;(E.attr("class").includes("label-group")||E.attr("class").includes("annotation-group"))&&(L=-((W=E.node())==null?void 0:W.getBBox().width)/2||0,s.selectAll("text").each(function(Y,J,tt){window.getComputedStyle(tt[J]).textAnchor==="middle"&&(L=0)})),E.attr("transform",`translate(${L}, ${F})`)});const _=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,v=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const A=p.line(S.x,_+v+b+i,S.x+S.width,_+v+b+i,g);s.insert(()=>A).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const A=p.line(S.x,_+v+D+b+n*2+i,S.x+S.width,_+v+D+b+i+n*2,g);s.insert(()=>A).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),k.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!a){const A=RegExp(/color\s*:\s*([^;]*)/),z=A.exec(u);if(z){const R=z[0].replace("color","fill");s.selectAll("tspan").attr("style",R)}else if(l){const R=A.exec(l);if(R){const E=R[0].replace("color","fill");s.selectAll("tspan").attr("style",E)}}}return V(t,k),t.intersect=function(A){return H.rect(t,A)},s}d(Fg,"classBox");async function $g(e,t){var _,v;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,c="verifyMethod"in t,l=it(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await ge(h,`<<${n.type}>>`,0,t.labelStyle):u=await ge(h,"<<Element>>",0,t.labelStyle);let f=u;const p=await ge(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=p+s,c){const D=await ge(h,`${n.requirementId?`Id: ${n.requirementId}`:""}`,f,t.labelStyle);f+=D;const P=await ge(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=P;const $=await ge(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=$,await ge(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const D=await ge(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=D,await ge(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(((_=h.node())==null?void 0:_.getBBox().width)??200)+o,m=(((v=h.node())==null?void 0:v.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=j.svg(h),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(y,x,g,m,C),S=h.insert(()=>k,":first-child");if(S.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((D,P,$)=>{const A=lt($[P]),z=A.attr("transform");let R=0,E=0;if(z){const L=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);L&&(R=parseFloat(L[1]),E=parseFloat(L[2]))}const M=E-m/2;let B=y+o/2;(P===0||P===1)&&(B=R),A.attr("transform",`translate(${B}, ${M+o})`)}),f>u+p+s){const D=b.line(y,x+u+p+s,y+g,x+u+p+s,C);h.insert(()=>D).attr("style",i)}return V(t,S),t.intersect=function(D){return H.rect(t,D)},h}d($g,"requirementBox");async function ge(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),o=a.htmlLabels??!0,s=await Ke(n,vo(br(t)),{width:Pe(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let c;if(o){const l=s.children[0],h=lt(s);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=s.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);c=s.getBBox(),c.height+=6}return n.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}d(ge,"addText");var qk=d(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 Og(e,t,{config:r}){var z,R;const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:c,label:l}=await st(e,t,it(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(u=(R=r==null?void 0:r.kanban)==null?void 0:R.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await gs(f,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await gs(s,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await gs(s,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,C=(t==null?void 0:t.width)||0,k=Math.max(m.height,x.height)/2,S=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+k,_=-C/2,v=-S/2;l.attr("transform","translate("+(h-C/2)+", "+(-k-c.height/2)+")"),g.attr("transform","translate("+(h-C/2)+", "+(-k+c.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*a)+", "+(-k+c.height/2)+")");let D;const{rx:P,ry:$}=t,{cssStyles:A}=t;if(t.look==="handDrawn"){const E=j.svg(s),M=G(t,{}),B=P||$?E.path(ze(_,v,C,S,P||0),M):E.rectangle(_,v,C,S,M);D=s.insert(()=>B,":first-child"),D.attr("class","basic label-container").attr("style",A||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",P??5).attr("ry",$??5).attr("x",_).attr("y",v).attr("width",C).attr("height",S);const E="priority"in t&&t.priority;if(E){const M=s.append("line"),B=_+2,F=v+Math.floor((P??0)/2),L=v+S-Math.floor((P??0)/2);M.attr("x1",B).attr("y1",F).attr("x2",B).attr("y2",L).attr("stroke-width","4").attr("stroke",qk(E))}}return V(t,D),t.height=S,t.intersect=function(E){return H.rect(t,E)},s}d(Og,"kanbanItem");var Hk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:gg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:fg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:mg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:_g},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Nd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Fd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:cg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ud},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Sg},{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:Jd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Wd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:vg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Md},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:pg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:jd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Gd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Dd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Rd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Id},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ig},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Lg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Yd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:kg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ng},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Pd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:zd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Bg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Mg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:qd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Tg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Hd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:dg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:og},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:sg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ad},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Od},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:wg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Cg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ag},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:hg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ag}],jk=d(()=>{const t=[...Object.entries({state:yg,choice:Ed,note:lg,rectWithTitle:ug,labelRect:tg,iconSquare:Kd,iconCircle:Xd,icon:Vd,iconRounded:Zd,imageSquare:Qd,anchor:Ld,kanbanItem:Og,classBox:Fg,erBox:dl,requirementBox:$g}),...Hk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Dg=jk();function Yk(e){return e in Dg}d(Yk,"isValidShape");var Na=new Map;async function Rg(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Dg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Na.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}d(Rg,"insertNode");var VL=d((e,t)=>{Na.set(t.id,e)},"setNodeElem"),XL=d(()=>{Na.clear()},"clear"),ZL=d(e=>{const t=Na.get(e.id);O.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Uk=d((e,t,r,i,n,a)=>{t.arrowTypeStart&&Jc(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Jc(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),Gk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},Jc=d((e,t,r,i,n,a,o)=>{var u;const s=Gk[r];if(!s){O.warn(`Unknown arrow type: ${r}`);return}const c=s.type,h=`${n}_${a}-${c}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),p=`${h}_${f}`;if(!document.getElementById(p)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=p,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),s.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${p})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),da=new Map,Mt=new Map,KL=d(()=>{da.clear(),Mt.clear()},"clear"),_i=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Vk=d(async(e,t)=>{let r=kt(ut().flowchart.htmlLabels);const i=await Ke(e,t.label,{style:_i(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});O.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const c=i.children[0],l=lt(i);o=c.getBoundingClientRect(),l.attr("width",o.width),l.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),da.set(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const c=await or(t.startLabelLeft,_i(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startLeft=l,Bi(s,t.startLabelLeft)}if(t.startLabelRight){const c=await or(t.startLabelRight,_i(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startRight=l,Bi(s,t.startLabelRight)}if(t.endLabelLeft){const c=await or(t.endLabelLeft,_i(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endLeft=l,Bi(s,t.endLabelLeft)}if(t.endLabelRight){const c=await or(t.endLabelRight,_i(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endRight=l,Bi(s,t.endLabelRight)}return i},"insertEdgeLabel");function Bi(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(Bi,"setTerminalWidth");var Xk=d((e,t)=>{O.debug("Moving label abc88 ",e.id,e.label,da.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=Eo(i);if(e.label){const a=da.get(e.id);let o=e.x,s=e.y;if(r){const c=ye.calcLabelPosition(r);O.debug("Moving label "+e.label+" from (",o,",",s,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,s=c.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Mt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const c=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Mt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const c=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Mt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const c=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Mt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const c=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Zk=d((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),Kk=d((e,t,r)=>{O.debug(`intersection calc abc89:
|
|
197
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
198
|
+
insidePoint : ${JSON.stringify(r)}
|
|
199
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-n:n-c-t.y;s=h*u/l;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+l-u:r.y-l+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),O.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=l*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,p=r.y<t.y?r.y+u:r.y-u;return O.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:p}),s===0&&(f=t.x,p=t.y),h===0&&(f=t.x),l===0&&(p=t.y),{x:f,y:p}}},"intersection"),th=d((e,t)=>{O.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(O.info("abc88 checking point",a,t),!Zk(t,a)&&!n){const o=Kk(t,i,a);O.debug("abc88 inside",a,i,o),O.debug("abc88 intersection",o,t);let s=!1;r.forEach(c=>{s=s||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?O.warn("abc88 no intersect",o,r):r.push(o),n=!0}else O.warn("abc88 outside",a,i),i=a,n||r.push(a)}),O.debug("returning points",r),r},"cutPathAtIntersect");function Ig(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(Ig,"extractCornerPoints");var eh=d(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),Qk=d(function(e){const{cornerPointPositions:t}=Ig(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=eh(n,o,5),c=eh(a,o,5),l=c.x-s.x,h=c.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){O.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const p=5;o.x===s.x?f={x:l<0?s.x-p+u:s.x+p-u,y:h<0?s.y-u:s.y+u}:f={x:l<0?s.x-u:s.x+u,y:h<0?s.y-p+u:s.y+p-u}}else O.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),Jk=d(function(e,t,r,i,n,a,o){var P;const{handDrawnSeed:s}=ut();let c=t.points,l=!1;const h=n;var u=a;const f=[];for(const $ in t.cssCompiledStyles)bd($)||f.push(t.cssCompiledStyles[$]);u.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),O.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],u,u.intersect(c[c.length-1])),c.push(u.intersect(c[c.length-1]))),t.toCluster&&(O.info("to cluster abc88",r.get(t.toCluster)),c=th(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&(O.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=th(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let p=c.filter($=>!Number.isNaN($.y));p=Qk(p);let g=Ln;switch(g=Qn,t.curve){case"linear":g=Qn;break;case"basis":g=Ln;break;case"cardinal":g=sp;break;case"bumpX":g=ep;break;case"bumpY":g=rp;break;case"catmullRom":g=lp;break;case"monotoneX":g=dp;break;case"monotoneY":g=gp;break;case"natural":g=yp;break;case"step":g=xp;break;case"stepAfter":g=_p;break;case"stepBefore":g=bp;break;default:g=Ln}const{x:m,y}=Cx(t),x=m_().x(m).y(y).curve(g);let b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let C,k=x(p);const S=Array.isArray(t.style)?t.style:[t.style];let _=S.find($=>$==null?void 0:$.startsWith("stroke:"));if(t.look==="handDrawn"){const $=j.svg(e);Object.assign([],p);const A=$.path(k,{roughness:.3,seed:s});b+=" transition",C=lt(A).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((R,E)=>R+";"+E,""):"");let z=C.attr("d");C.attr("d",z),e.node().appendChild(C.node())}else{const $=f.join(";"),A=S?S.reduce((E,M)=>E+M+";",""):"";let z="";t.animate&&(z=" edge-animation-fast"),t.animation&&(z=" edge-animation-"+t.animation);const R=$?$+";"+A+";":A;C=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(z??"")).attr("style",R),_=(P=R.match(/stroke:([^;]+)/))==null?void 0:P[1]}let v="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,v=v.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),O.info("arrowTypeStart",t.arrowTypeStart),O.info("arrowTypeEnd",t.arrowTypeEnd),Uk(C,t,v,o,i,_);let D={};return l&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge"),tS=d((e,t,r,i)=>{t.forEach(n=>{mS[n](e,r,i)})},"insertMarkers"),eS=d((e,t,r)=>{O.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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")},"extension"),rS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"composition"),iS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"aggregation"),nS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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")},"dependency"),aS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),sS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"point"),oS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"circle"),lS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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")},"cross"),cS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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"),hS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),uS=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),fS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),pS=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),dS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
200
|
+
L20,10
|
|
201
|
+
M20,10
|
|
202
|
+
L0,20`)},"requirement_arrow"),gS=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),mS={extension:eS,composition:rS,aggregation:iS,dependency:nS,lollipop:aS,point:sS,circle:oS,cross:lS,barb:cS,only_one:hS,zero_or_one:uS,one_or_more:fS,zero_or_more:pS,requirement_arrow:dS,requirement_contains:gS},yS=tS,xS={common:ti,getConfig:Zt,insertCluster:Tk,insertEdge:Jk,insertEdgeLabel:Vk,insertMarkers:yS,insertNode:Rg,interpolateToCurve:Xo,labelHelper:st,log:O,positionEdgeLabel:Xk},ji={},Pg=d(e=>{for(const t of e)ji[t.name]=t},"registerLayoutLoaders"),bS=d(()=>{Pg([{name:"dagre",loader:d(async()=>await dt(()=>import("./dagre-OKDRZEBW-Bq-HgVN8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),"loader")}])},"registerDefaultLayoutLoaders");bS();var QL=d(async(e,t)=>{if(!(e.layoutAlgorithm in ji))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=ji[e.layoutAlgorithm];return(await r.loader()).render(e,t,xS,{algorithm:r.algorithm})},"render"),JL=d((e="",{fallback:t="dagre"}={})=>{if(e in ji)return e;if(t in ji)return O.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"),rh={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},_S=d(e=>{var n;const{securityLevel:t}=ut();let r=lt("body");if(t==="sandbox"){const o=((n=lt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=lt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),Ng="comm",zg="rule",Wg="decl",CS="@import",wS="@namespace",vS="@keyframes",kS="@layer",qg=Math.abs,gl=String.fromCharCode;function Hg(e){return e.trim()}function Fn(e,t,r){return e.replace(t,r)}function SS(e,t,r){return e.indexOf(t,r)}function Or(e,t){return e.charCodeAt(t)|0}function Qr(e,t,r){return e.slice(t,r)}function me(e){return e.length}function TS(e){return e.length}function bn(e,t){return t.push(e),e}var za=1,Jr=1,jg=0,ae=0,Ct=0,ai="";function ml(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:za,column:Jr,length:o,return:"",siblings:s}}function BS(){return Ct}function LS(){return Ct=ae>0?Or(ai,--ae):0,Jr--,Ct===10&&(Jr=1,za--),Ct}function ue(){return Ct=ae<jg?Or(ai,ae++):0,Jr++,Ct===10&&(Jr=1,za++),Ct}function je(){return Or(ai,ae)}function $n(){return ae}function Wa(e,t){return Qr(ai,e,t)}function Yi(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 AS(e){return za=Jr=1,jg=me(ai=e),ae=0,[]}function MS(e){return ai="",e}function ms(e){return Hg(Wa(ae-1,oo(e===91?e+2:e===40?e+1:e)))}function ES(e){for(;(Ct=je())&&Ct<33;)ue();return Yi(e)>2||Yi(Ct)>3?"":" "}function FS(e,t){for(;--t&&ue()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return Wa(e,$n()+(t<6&&je()==32&&ue()==32))}function oo(e){for(;ue();)switch(Ct){case e:return ae;case 34:case 39:e!==34&&e!==39&&oo(Ct);break;case 40:e===41&&oo(e);break;case 92:ue();break}return ae}function $S(e,t){for(;ue()&&e+Ct!==57;)if(e+Ct===84&&je()===47)break;return"/*"+Wa(t,ae-1)+"*"+gl(e===47?e:ue())}function OS(e){for(;!Yi(je());)ue();return Wa(e,ae)}function DS(e){return MS(On("",null,null,null,[""],e=AS(e),0,[0],e))}function On(e,t,r,i,n,a,o,s,c){for(var l=0,h=0,u=o,f=0,p=0,g=0,m=1,y=1,x=1,b=0,C="",k=n,S=a,_=i,v=C;y;)switch(g=b,b=ue()){case 40:if(g!=108&&Or(v,u-1)==58){SS(v+=Fn(ms(b),"&","&\f"),"&\f",qg(l?s[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=ms(b);break;case 9:case 10:case 13:case 32:v+=ES(g);break;case 92:v+=FS($n()-1,7);continue;case 47:switch(je()){case 42:case 47:bn(RS($S(ue(),$n()),t,r,c),c),(Yi(g||1)==5||Yi(je()||1)==5)&&me(v)&&Qr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:s[l++]=me(v)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(v=Fn(v,/\f/g,"")),p>0&&(me(v)-u||m===0&&g===47)&&bn(p>32?nh(v+";",i,r,u-1,c):nh(Fn(v," ","")+";",i,r,u-2,c),c);break;case 59:v+=";";default:if(bn(_=ih(v,t,r,l,h,n,s,C,k=[],S=[],u,a),a),b===123)if(h===0)On(v,t,_,_,k,a,u,s,S);else{switch(f){case 99:if(Or(v,3)===110)break;case 108:if(Or(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?On(e,_,_,i&&bn(ih(e,_,_,0,0,n,s,C,n,k=[],u,S),S),n,S,u,s,i?k:S):On(v,_,_,_,[""],S,0,s,S)}}l=h=p=0,m=x=1,C=v="",u=o;break;case 58:u=1+me(v),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&LS()==125)continue}switch(v+=gl(b),b*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:s[l++]=(me(v)-1)*x,x=1;break;case 64:je()===45&&(v+=ms(ue())),f=je(),h=u=me(C=v+=OS($n())),b++;break;case 45:g===45&&me(v)==2&&(m=0)}}return a}function ih(e,t,r,i,n,a,o,s,c,l,h,u){for(var f=n-1,p=n===0?a:[""],g=TS(p),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Qr(e,f+1,f=qg(y=o[m])),k=e;b<g;++b)(k=Hg(y>0?p[b]+" "+C:Fn(C,/&\f/g,p[b])))&&(c[x++]=k);return ml(e,t,r,n===0?zg:s,c,l,h,u)}function RS(e,t,r,i){return ml(e,t,r,Ng,gl(BS()),Qr(e,2,-2),0,i)}function nh(e,t,r,i,n){return ml(e,t,r,Wg,Qr(e,0,i),Qr(e,i+1,-1),i,n)}function lo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function IS(e,t,r,i){switch(e.type){case kS:if(e.children.length)break;case CS:case wS:case Wg:return e.return=e.return||e.value;case Ng:return"";case vS:return e.return=e.value+"{"+lo(e.children,i)+"}";case zg:if(!me(e.value=e.props.join(",")))return""}return me(r=lo(e.children,i))?e.return=e.value+"{"+r+"}":""}var PS=kp(Object.keys,Object),NS=Object.prototype,zS=NS.hasOwnProperty;function WS(e){if(!Ea(e))return PS(e);var t=[];for(var r in Object(e))zS.call(e,r)&&r!="constructor"&&t.push(r);return t}var co=xr(we,"DataView"),ho=xr(we,"Promise"),uo=xr(we,"Set"),fo=xr(we,"WeakMap"),ah="[object Map]",qS="[object Object]",sh="[object Promise]",oh="[object Set]",lh="[object WeakMap]",ch="[object DataView]",HS=yr(co),jS=yr(Hi),YS=yr(ho),US=yr(uo),GS=yr(fo),rr=ei;(co&&rr(new co(new ArrayBuffer(1)))!=ch||Hi&&rr(new Hi)!=ah||ho&&rr(ho.resolve())!=sh||uo&&rr(new uo)!=oh||fo&&rr(new fo)!=lh)&&(rr=function(e){var t=ei(e),r=t==qS?e.constructor:void 0,i=r?yr(r):"";if(i)switch(i){case HS:return ch;case jS:return ah;case YS:return sh;case US:return oh;case GS:return lh}return t});var VS="[object Map]",XS="[object Set]",ZS=Object.prototype,KS=ZS.hasOwnProperty;function hh(e){if(e==null)return!0;if(Fa(e)&&(aa(e)||typeof e=="string"||typeof e.splice=="function"||Go(e)||Vo(e)||na(e)))return!e.length;var t=rr(e);if(t==VS||t==XS)return!e.size;if(Ea(e))return!WS(e).length;for(var r in e)if(KS.call(e,r))return!1;return!0}var Yg="c4",QS=d(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),JS=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./c4Diagram-VJAJSXHY-CTFjYF37.js");return{diagram:t}},__vite__mapDeps([20,21,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Yg,diagram:e}},"loader"),tT={id:Yg,detector:QS,loader:JS},eT=tT,Ug="flowchart",rT=d((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),iT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-5Mg796nh.js");return{diagram:t}},__vite__mapDeps([22,23,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Ug,diagram:e}},"loader"),nT={id:Ug,detector:rT,loader:iT},aT=nT,Gg="flowchart-v2",sT=d((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),oT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-5Mg796nh.js");return{diagram:t}},__vite__mapDeps([22,23,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Gg,diagram:e}},"loader"),lT={id:Gg,detector:sT,loader:oT},cT=lT,Vg="er",hT=d(e=>/^\s*erDiagram/.test(e),"detector"),uT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./erDiagram-Q7BY3M3F-DdKn4jVQ.js");return{diagram:t}},__vite__mapDeps([25,23,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Vg,diagram:e}},"loader"),fT={id:Vg,detector:hT,loader:uT},pT=fT,Xg="gitGraph",dT=d(e=>/^\s*gitGraph/.test(e),"detector"),gT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js");return{diagram:t}},__vite__mapDeps([26,27,28,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5]));return{id:Xg,diagram:e}},"loader"),mT={id:Xg,detector:dT,loader:gT},yT=mT,Zg="gantt",xT=d(e=>/^\s*gantt/.test(e),"detector"),bT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./ganttDiagram-APWFNJXF-YO2fxWzG.js");return{diagram:t}},__vite__mapDeps([30,7,31,32,6,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Zg,diagram:e}},"loader"),_T={id:Zg,detector:xT,loader:bT},CT=_T,Kg="info",wT=d(e=>/^\s*info/.test(e),"detector"),vT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./infoDiagram-PH2N3AL5-x87RxSs8.js");return{diagram:t}},__vite__mapDeps([33,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5]));return{id:Kg,diagram:e}},"loader"),kT={id:Kg,detector:wT,loader:vT},Qg="pie",ST=d(e=>/^\s*pie/.test(e),"detector"),TT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./pieDiagram-IB7DONF6-B-gWQIHI.js");return{diagram:t}},__vite__mapDeps([34,27,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5,35,36,32]));return{id:Qg,diagram:e}},"loader"),BT={id:Qg,detector:ST,loader:TT},Jg="quadrantChart",LT=d(e=>/^\s*quadrantChart/.test(e),"detector"),AT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./quadrantDiagram-7GDLP6J5-BQzo7p61.js");return{diagram:t}},__vite__mapDeps([37,31,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:Jg,diagram:e}},"loader"),MT={id:Jg,detector:LT,loader:AT},ET=MT,tm="xychart",FT=d(e=>/^\s*xychart-beta/.test(e),"detector"),$T=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./xychartDiagram-VJFVF3MP-Dh4nsbBT.js");return{diagram:t}},__vite__mapDeps([38,32,36,31,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:tm,diagram:e}},"loader"),OT={id:tm,detector:FT,loader:$T},DT=OT,em="requirement",RT=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),IT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./requirementDiagram-KVF5MWMF-DzaHc66R.js");return{diagram:t}},__vite__mapDeps([39,23,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:em,diagram:e}},"loader"),PT={id:em,detector:RT,loader:IT},NT=PT,rm="sequence",zT=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),WT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sequenceDiagram-X6HHIX6F-CljZRLoS.js");return{diagram:t}},__vite__mapDeps([40,21,28,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:rm,diagram:e}},"loader"),qT={id:rm,detector:zT,loader:WT},HT=qT,im="class",jT=d((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),YT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-GIVACNV2-CWogZCzR.js");return{diagram:t}},__vite__mapDeps([41,42,23,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:im,diagram:e}},"loader"),UT={id:im,detector:jT,loader:YT},GT=UT,nm="classDiagram",VT=d((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),XT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-v2-COTLJTTW-CWogZCzR.js");return{diagram:t}},__vite__mapDeps([43,42,23,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:nm,diagram:e}},"loader"),ZT={id:nm,detector:VT,loader:XT},KT=ZT,am="state",QT=d((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),JT=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-DGXRK772-BzVfGv3W.js");return{diagram:t}},__vite__mapDeps([44,45,23,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:am,diagram:e}},"loader"),tB={id:am,detector:QT,loader:JT},eB=tB,sm="stateDiagram",rB=d((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),iB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-YXO3MK2T-8oX001yq.js");return{diagram:t}},__vite__mapDeps([46,45,23,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:sm,diagram:e}},"loader"),nB={id:sm,detector:rB,loader:iB},aB=nB,om="journey",sB=d(e=>/^\s*journey/.test(e),"detector"),oB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./journeyDiagram-U35MCT3I-D5yGbOLJ.js");return{diagram:t}},__vite__mapDeps([47,21,35,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:om,diagram:e}},"loader"),lB={id:om,detector:sB,loader:oB},cB=lB,hB=d((e,t,r)=>{O.debug(`rendering svg for syntax error
|
|
203
|
+
`);const i=_S(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Nh(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),lm={draw:hB},uB=lm,fB={db:{},renderer:lm,parser:{parse:d(()=>{},"parse")}},pB=fB,cm="flowchart-elk",dB=d((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),gB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-5Mg796nh.js");return{diagram:t}},__vite__mapDeps([22,23,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:cm,diagram:e}},"loader"),mB={id:cm,detector:dB,loader:gB},yB=mB,hm="timeline",xB=d(e=>/^\s*timeline/.test(e),"detector"),bB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./timeline-definition-BDJGKUSR-2TO9MtLY.js");return{diagram:t}},__vite__mapDeps([48,35,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:hm,diagram:e}},"loader"),_B={id:hm,detector:xB,loader:bB},CB=_B,um="mindmap",wB=d(e=>/^\s*mindmap/.test(e),"detector"),vB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./mindmap-definition-ALO5MXBD-CF3siXp6.js");return{diagram:t}},__vite__mapDeps([49,50,7,6,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:um,diagram:e}},"loader"),kB={id:um,detector:wB,loader:vB},SB=kB,fm="kanban",TB=d(e=>/^\s*kanban/.test(e),"detector"),BB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./kanban-definition-NDS4AKOZ-BM6KyRww.js");return{diagram:t}},__vite__mapDeps([51,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:fm,diagram:e}},"loader"),LB={id:fm,detector:TB,loader:BB},AB=LB,pm="sankey",MB=d(e=>/^\s*sankey-beta/.test(e),"detector"),EB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sankeyDiagram-QLVOVGJD-DfAVeZCk.js");return{diagram:t}},__vite__mapDeps([52,36,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:pm,diagram:e}},"loader"),FB={id:pm,detector:MB,loader:EB},$B=FB,dm="packet",OB=d(e=>/^\s*packet-beta/.test(e),"detector"),DB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-VNBRO52H-CJDqBhLa.js");return{diagram:t}},__vite__mapDeps([53,27,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5]));return{id:dm,diagram:e}},"loader"),RB={id:dm,detector:OB,loader:DB},gm="radar",IB=d(e=>/^\s*radar-beta/.test(e),"detector"),PB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-SSKATNLV-Cls675Lh.js");return{diagram:t}},__vite__mapDeps([54,27,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5]));return{id:gm,diagram:e}},"loader"),NB={id:gm,detector:IB,loader:PB},mm="block",zB=d(e=>/^\s*block-beta/.test(e),"detector"),WB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./blockDiagram-JOT3LUYC-yGQOzhkw.js");return{diagram:t}},__vite__mapDeps([55,5,2,1,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return{id:mm,diagram:e}},"loader"),qB={id:mm,detector:zB,loader:WB},HB=qB,ym="architecture",jB=d(e=>/^\s*architecture/.test(e),"detector"),YB=d(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./architectureDiagram-IEHRJDOE-D7gCCmY9.js");return{diagram:t}},__vite__mapDeps([56,27,28,29,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,4,5,50]));return{id:ym,diagram:e}},"loader"),UB={id:ym,detector:jB,loader:YB},GB=UB,uh=!1,qa=d(()=>{uh||(uh=!0,Pn("error",pB,e=>e.toLowerCase().trim()==="error"),Pn("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{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:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Th(eT,AB,KT,GT,pT,CT,kT,BT,NT,HT,yB,cT,aT,SB,CB,yT,aB,eB,cB,ET,$B,RB,DT,HB,GB,NB))},"addDiagrams"),VB=d(async()=>{O.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(jr).map(async([r,{detector:i,loader:n}])=>{if(n)try{ks(r)}catch{try{const{diagram:a,id:o}=await n();Pn(o,a,i)}catch(a){throw O.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete jr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){O.error(`Failed to load ${t.length} external diagrams`);for(const r of t)O.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),XB="graphics-document document";function xm(e,t){e.attr("role",XB),t!==""&&e.attr("aria-roledescription",t)}d(xm,"setA11yDiagramInfo");function bm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}d(bm,"addSVGa11yTitleDescription");var cr,po=(cr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){var l,h;const i=Zt(),n=yo(t,i);t=mv(t)+`
|
|
204
|
+
`;try{ks(n)}catch{const u=C0(n);if(!u)throw new Sh(`Diagram ${n} not found.`);const{id:f,diagram:p}=await u();Pn(f,p)}const{db:a,parser:o,renderer:s,init:c}=ks(n);return o.parser&&(o.parser.yy=a),(l=a.clear)==null||l.call(a),c==null||c(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new cr(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},d(cr,"Diagram"),cr),fh=[],ZB=d(()=>{fh.forEach(e=>{e()}),fh=[]},"attachFunctions"),KB=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function _m(e){const t=e.match(kh);if(!t)return{text:e,metadata:{}};let r=_x(t[1],{schema:bx})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}d(_m,"extractFrontMatter");var QB=d(e=>e.replace(/\r\n?/g,`
|
|
205
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),JB=d(e=>{const{text:t,metadata:r}=_m(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),tL=d(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:iv(e),directive:t}},"processDirectives");function yl(e){const t=QB(e),r=JB(t),i=tL(r.text),n=tl(r.config,i.directive);return e=KB(i.text),{code:e,title:r.title,config:n}}d(yl,"preprocessDiagram");function Cm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(Cm,"toBase64");var eL=5e4,rL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",iL="sandbox",nL="loose",aL="http://www.w3.org/2000/svg",sL="http://www.w3.org/1999/xlink",oL="http://www.w3.org/1999/xhtml",lL="100%",cL="100%",hL="border:0;margin:0;",uL="margin:0",fL="allow-top-navigation-by-user-activation allow-popups",pL='The "iframe" tag is not supported by your browser.',dL=["foreignobject"],gL=["dominant-baseline"];function xl(e){const t=yl(e);return Rn(),I0(t.config??{}),t}d(xl,"processAndSetConfigs");async function wm(e,t){qa();try{const{code:r,config:i}=xl(e);return{diagramType:(await km(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}d(wm,"parse");var ph=d((e,t,r=[])=>`
|
|
206
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),mL=d((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
207
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
208
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
209
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{hh(c.styles)||s.forEach(l=>{r+=ph(c.id,l,c.styles)}),hh(c.textStyles)||(r+=ph(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),yL=d((e,t,r,i)=>{const n=mL(e,r),a=ry(t,n,e.themeVariables);return lo(DS(`${i}{${a}}`),IS)},"createUserStyles"),xL=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=br(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),bL=d((e="",t)=>{var n,a;const r=(a=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":cL,i=Cm(`<body style="${uL}">${e}</body>`);return`<iframe style="width:${lL};height:${r};${hL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${fL}">
|
|
210
|
+
${pL}
|
|
211
|
+
</iframe>`},"putIntoIFrame"),dh=d((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",aL);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function go(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(go,"sandboxedIframe");var _L=d((e,t,r,i)=>{var n,a,o;(n=e.getElementById(t))==null||n.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),CL=d(async function(e,t,r){var z,R,E,M,B,F;qa();const i=xl(t);t=i.code;const n=Zt();O.debug(n),t.length>((n==null?void 0:n.maxTextSize)??eL)&&(t=rL);const a="#"+e,o="i"+e,s="#"+o,c="d"+e,l="#"+c,h=d(()=>{const W=lt(f?s:l).node();W&&"remove"in W&&W.remove()},"removeTempElements");let u=lt("body");const f=n.securityLevel===iL,p=n.securityLevel===nL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=go(lt(r),o);u=lt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);dh(u,e,c,`font-family: ${g}`,sL)}else{if(_L(document,e,c,o),f){const L=go(lt("body"),o);u=lt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");dh(u,e,c)}let m,y;try{m=await po.fromText(t,{title:i.title})}catch(L){if(n.suppressErrorRendering)throw h(),L;m=await po.fromText("error"),y=L}const x=u.select(l).node(),b=m.type,C=x.firstChild,k=C.firstChild,S=(R=(z=m.renderer).getClasses)==null?void 0:R.call(z,t,m),_=yL(n,b,S,a),v=document.createElement("style");v.innerHTML=_,C.insertBefore(v,k);try{await m.renderer.draw(t,e,rh.version,m)}catch(L){throw n.suppressErrorRendering?h():uB.draw(t,e,rh.version),L}const D=u.select(`${l} svg`),P=(M=(E=m.db).getAccTitle)==null?void 0:M.call(E),$=(F=(B=m.db).getAccDescription)==null?void 0:F.call(B);Sm(b,D,P,$),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",oL);let A=u.select(l).node().innerHTML;if(O.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),A=xL(A,f,kt(n.arrowMarkerAbsolute)),f){const L=u.select(l+" svg").node();A=bL(A,L)}else p||(A=Hr.sanitize(A,{ADD_TAGS:dL,ADD_ATTR:gL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ZB(),y)throw y;return h(),{diagramType:b,svg:A,bindFunctions:m.db.bindFunctions}},"render");function vm(e={}){var i;const t=Et({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),D0(t),t!=null&&t.theme&&t.theme in De?t.themeVariables=De[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=De.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?O0(t):Fh();mo(r.logLevel),qa()}d(vm,"initialize");var km=d((e,t={})=>{const{code:r}=yl(e);return po.fromText(r,t)},"getDiagramFromText");function Sm(e,t,r,i){xm(t,e),bm(t,r,i,t.attr("id"))}d(Sm,"addA11yInfo");var gr=Object.freeze({render:CL,parse:wm,getDiagramFromText:km,initialize:vm,getConfig:Zt,setConfig:$h,getSiteConfig:Fh,updateSiteConfig:R0,reset:d(()=>{Rn()},"reset"),globalReset:d(()=>{Rn(Yr)},"globalReset"),defaultConfig:Yr});mo(Zt().logLevel);Rn(Zt());var wL=d((e,t,r)=>{O.warn(e),Jo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Tm=d(async function(e={querySelector:".mermaid"}){try{await vL(e)}catch(t){if(Jo(t)&&O.error(t.str),Qt.parseError&&Qt.parseError(t),!e.suppressErrors)throw O.error("Use the suppressErrors option to suppress these errors"),t}},"run"),vL=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=gr.getConfig();O.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");O.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(O.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),gr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const c of Array.from(n)){if(O.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${a.next()}`;o=c.innerHTML,o=td(ye.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ye.detectInit(o);h&&O.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Mm(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){wL(u,s,Qt.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Bm=d(function(e){gr.initialize(e)},"initialize"),kL=d(async function(e,t,r){O.warn("mermaid.init is deprecated. Please use run instead."),e&&Bm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Tm(i)},"init"),SL=d(async(e,{lazyLoad:t=!0}={})=>{qa(),Th(...e),t===!1&&await VB()},"registerExternalDiagrams"),Lm=d(function(){if(Qt.startOnLoad){const{startOnLoad:e}=gr.getConfig();e&&Qt.run().catch(t=>O.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Lm,!1);var TL=d(function(e){Qt.parseError=e},"setParseErrorHandler"),ga=[],ys=!1,Am=d(async()=>{if(!ys){for(ys=!0;ga.length>0;){const e=ga.shift();if(e)try{await e()}catch(t){O.error("Error executing queue",t)}}ys=!1}},"executeQueue"),BL=d(async(e,t)=>new Promise((r,i)=>{const n=d(()=>new Promise((a,o)=>{gr.parse(e,t).then(s=>{a(s),r(s)},s=>{var c;O.error("Error parsing",s),(c=Qt.parseError)==null||c.call(Qt,s),o(s),i(s)})}),"performCall");ga.push(n),Am().catch(i)}),"parse"),Mm=d((e,t,r)=>new Promise((i,n)=>{const a=d(()=>new Promise((o,s)=>{gr.render(e,t,r).then(c=>{o(c),i(c)},c=>{var l;O.error("Error parsing",c),(l=Qt.parseError)==null||l.call(Qt,c),s(c),n(c)})}),"performCall");ga.push(a),Am().catch(n)}),"render"),Qt={startOnLoad:!0,mermaidAPI:gr,parse:BL,render:Mm,init:kL,run:Tm,registerExternalDiagrams:SL,registerLayoutLoaders:Pg,initialize:Bm,parseError:void 0,contentLoaded:Lm,setParseErrorHandler:TL,detectType:yo,registerIconPacks:Hx},LL=Qt;/*! Check if previously processed *//*!
|
|
212
|
+
* Wait for document loaded before starting the execution
|
|
213
|
+
*/const tA=Object.freeze(Object.defineProperty({__proto__:null,default:LL},Symbol.toStringTag,{value:"Module"}));export{NL as $,OL as A,Ai as B,be as C,b0 as D,uy as E,tl as F,Zt as G,Mh as H,lv as I,bx as J,_S as K,rh as L,f_ as M,zo as N,PL as O,WL as P,Br as Q,_c as R,bc as S,HL as T,at as U,qL as V,zL as W,RL as X,IL as Y,YL as Z,d as _,ay as a,He as a$,jL as a0,B0 as a1,Gr as a2,FL as a3,$a as a4,Jw as a5,xo as a6,Vl as a7,m_ as a8,Ln as a9,VL as aA,Jk as aB,Xk as aC,Vk as aD,Jv as aE,p_ as aF,wa as aG,Hx as aH,qx as aI,mr as aJ,Zw as aK,Fp as aL,La as aM,Fa as aN,aa as aO,Op as aP,Ep as aQ,Tw as aR,Xt as aS,N1 as aT,Do as aU,Nf as aV,Zi as aW,qf as aX,DL as aY,jm as aZ,Ro as a_,ov as aa,J0 as ab,Ui as ac,q as ad,Q as ae,zh as af,Tk as ag,Rg as ah,ZL as ai,Cx as aj,kt as ak,Ke as al,Eo as am,hd as an,br as ao,zp as ap,Xw as aq,WC as ar,qw as as,Yo as at,hh as au,yS as av,XL as aw,KL as ax,GL as ay,V as az,ny as b,pc as b0,U1 as b1,zi as b2,Vw as b3,Ww as b4,LC as b5,Uo as b6,ww as b7,Qw as b8,Qi as b9,ei as ba,ra as bb,$w as bc,WS as bd,Ki as be,na as bf,Bw as bg,Sp as bh,EC as bi,FC as bj,rr as bk,Dc as bl,$C as bm,Go as bn,MC as bo,RC as bp,ri as bq,Ze as br,Mc as bs,Vo as bt,Bp as bu,uo as bv,Kw as bw,Ea as bx,tA as by,ut as c,lt as d,Nh as e,Et as f,oy as g,Pe as h,hr as i,Sf as j,ti as k,O as l,qp as m,Gi as n,$L as o,JL as p,ly as q,QL as r,sy as s,cy as t,ye as u,_x as v,uv as w,Yk as x,UL as y,iy as z};
|
|
214
|
+
//# sourceMappingURL=mermaid.core-ZaxoMXOj.js.map
|