@chaibuilder/pages 0.16.9 → 0.16.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2AITGKQY-BGZjtYdS.cjs → 2AITGKQY-C0A7leVc.cjs} +1 -1
- package/dist/{2AITGKQY-BmDJ4ubt.js → 2AITGKQY-LtoYzpXb.js} +2 -2
- package/dist/{NCMVHL6D-CRT9RlLF.cjs → NCMVHL6D-BbCiXTDR.cjs} +1 -1
- package/dist/{NCMVHL6D-Dk4_u4LD.js → NCMVHL6D-BqKNTZhH.js} +2 -2
- package/dist/{ZDWCUMSJ-Ktzz_Tsg.js → ZDWCUMSJ-CudD-G3A.js} +1 -1
- package/dist/{ZDWCUMSJ-DEHPTCDq.cjs → ZDWCUMSJ-DEjMuvHw.cjs} +1 -1
- package/dist/{_arrayEach-CvixaZ6g.cjs → _arrayEach-7nw56Qes.cjs} +1 -1
- package/dist/{_arrayEach-BoWUuJyH.js → _arrayEach-CBNlJl8q.js} +1 -1
- package/dist/{add-new-language-page-BLNVUYeo.js → add-new-language-page-C3R8vwOA.js} +2 -2
- package/dist/{add-new-language-page-jU1kF1AN.cjs → add-new-language-page-CTZglguY.cjs} +1 -1
- package/dist/{add-new-page-DKyY5ZY7.cjs → add-new-page-ByCsABU-.cjs} +1 -1
- package/dist/{add-new-page-X9ytZJiO.js → add-new-page-Dn-jphFf.js} +1 -1
- package/dist/{ai-panel-content-ChDHNrKg.js → ai-panel-content-CF7-wrq0.js} +17 -17
- package/dist/ai-panel-content-VYS5Bn3a.cjs +1 -0
- package/dist/{ai-panel-default-lang-CxmSDvNu.js → ai-panel-default-lang-C_zJzkZ4.js} +110 -104
- package/dist/ai-panel-default-lang-D5vpT3cL.cjs +3 -0
- package/dist/{ai-panel-other-lang-CicrT1I-.js → ai-panel-other-lang-5Hdkr4eJ.js} +19 -19
- package/dist/ai-panel-other-lang-BFnghH5Z.cjs +1 -0
- package/dist/{ai-prompt-input-L_bHFj7w.cjs → ai-prompt-input-BXp7SxcJ.cjs} +1 -1
- package/dist/{ai-prompt-input-BOAqFpAN.js → ai-prompt-input-CrBweB8X.js} +1 -1
- package/dist/{ai-translation-prompt-23g3VfWP.cjs → ai-translation-prompt-BYubvAxO.cjs} +1 -1
- package/dist/{ai-translation-prompt-DoeWqKDZ.js → ai-translation-prompt-E3TEDobP.js} +1 -1
- package/dist/{arc-CEYgkAY6.js → arc-CuYV2Z4i.js} +1 -1
- package/dist/{arc-DQcgp6fe.cjs → arc-Dzs-yn9V.cjs} +1 -1
- package/dist/{architecture-U656AL7Q-D9ThnYW7.js → architecture-U656AL7Q-BFW69Rn1.js} +1 -1
- package/dist/{architecture-U656AL7Q-DXHyXosc.cjs → architecture-U656AL7Q-C1RBosC-.cjs} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-xhCIZb18.js → architectureDiagram-VXUJARFQ-C7E-J7qp.js} +4 -4
- package/dist/{architectureDiagram-VXUJARFQ-DJkKSCT6.cjs → architectureDiagram-VXUJARFQ-i1olysFf.cjs} +1 -1
- package/dist/{blockDiagram-VD42YOAC-zvZU2M01.js → blockDiagram-VD42YOAC-8bGFphRU.js} +4 -4
- package/dist/{blockDiagram-VD42YOAC-DqXdnG8y.cjs → blockDiagram-VD42YOAC-DG8nN7FI.cjs} +1 -1
- package/dist/{c4Diagram-YG6GDRKO-BpDWqFJi.js → c4Diagram-YG6GDRKO-C5vTWKII.js} +2 -2
- package/dist/{c4Diagram-YG6GDRKO-COF9vwh9.cjs → c4Diagram-YG6GDRKO-ojLwrHAZ.cjs} +1 -1
- package/dist/{channel-DMpDH8Tt.js → channel-Cdlcq82Q.js} +1 -1
- package/dist/{channel-DshxF_w-.cjs → channel-D8SQrHOQ.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-DOrHz66s.cjs → chunk-4BX2VUAB-D0Nkkvke.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-DcXzX0k2.js → chunk-4BX2VUAB-kRXCJxGQ.js} +1 -1
- package/dist/{chunk-55IACEB6-MgFQOjd_.cjs → chunk-55IACEB6-Ya_-e5Gj.cjs} +1 -1
- package/dist/{chunk-55IACEB6-yEIZuruo.js → chunk-55IACEB6-xzVewFKl.js} +1 -1
- package/dist/{chunk-B4BG7PRW-Dw8okTHN.cjs → chunk-B4BG7PRW-C8Sj4Rta.cjs} +1 -1
- package/dist/{chunk-B4BG7PRW-Bm0X0FwP.js → chunk-B4BG7PRW-DG5qX3ch.js} +4 -4
- package/dist/{chunk-DI55MBZ5-CY8rQYfB.cjs → chunk-DI55MBZ5-C9He0Rku.cjs} +1 -1
- package/dist/{chunk-DI55MBZ5-Dzl4K5YZ.js → chunk-DI55MBZ5-CI_Ti_F2.js} +3 -3
- package/dist/{chunk-FMBD7UC4-DsnO3YB7.js → chunk-FMBD7UC4-9Wx_99-Q.js} +1 -1
- package/dist/{chunk-FMBD7UC4-DeDzgDPq.cjs → chunk-FMBD7UC4-Be12B01Q.cjs} +1 -1
- package/dist/{chunk-QN33PNHL-D0hZD6ce.cjs → chunk-QN33PNHL-B65aZfT8.cjs} +1 -1
- package/dist/{chunk-QN33PNHL-eCpJSQLd.js → chunk-QN33PNHL-qSV2Zj2E.js} +1 -1
- package/dist/{chunk-QZHKN3VN-0xh2Brzo.js → chunk-QZHKN3VN-Dcw61eWf.js} +1 -1
- package/dist/{chunk-QZHKN3VN-DPT45Qxb.cjs → chunk-QZHKN3VN-V8GIXVhC.cjs} +1 -1
- package/dist/{chunk-TZMSLE5B-B0DNnH2K.cjs → chunk-TZMSLE5B-BUsuXR8P.cjs} +1 -1
- package/dist/{chunk-TZMSLE5B-v44khzET.js → chunk-TZMSLE5B-De8BBIp6.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-DZwYP3Mp.cjs → classDiagram-2ON5EDUG-DD8PWOat.cjs} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CatlwrWr.js → classDiagram-2ON5EDUG-DYXMSnp5.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-DZwYP3Mp.cjs → classDiagram-v2-WZHVMYZB-DD8PWOat.cjs} +1 -1
- package/dist/{classDiagram-2ON5EDUG-CatlwrWr.js → classDiagram-v2-WZHVMYZB-DYXMSnp5.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-oJ7CCCne.cjs → cose-bilkent-S5V4N54A-BzynRFve.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-CdqaV_In.js → cose-bilkent-S5V4N54A-C0LrMYq9.js} +2 -2
- package/dist/{dagre-6UL2VRFP-DwJsczXN.cjs → dagre-6UL2VRFP-CJe6baLS.cjs} +1 -1
- package/dist/{dagre-6UL2VRFP-ylnuUwh7.js → dagre-6UL2VRFP-DK7rwVEg.js} +1 -1
- package/dist/{delete-page-D8gUlElz.js → delete-page-BtWRzpTh.js} +1 -1
- package/dist/{delete-page-CSuwBSa6.cjs → delete-page-CecAr8Ev.cjs} +1 -1
- package/dist/{diagram-PSM6KHXK-me6JcFi2.js → diagram-PSM6KHXK-C_A00ng9.js} +4 -4
- package/dist/{diagram-PSM6KHXK-DPPOo04u.cjs → diagram-PSM6KHXK-X4v5dsQ4.cjs} +1 -1
- package/dist/{diagram-QEK2KX5R-atRnaXRv.cjs → diagram-QEK2KX5R-rhfU6qwd.cjs} +1 -1
- package/dist/{diagram-QEK2KX5R-CfDWc-r0.js → diagram-QEK2KX5R-tTChUtDg.js} +3 -3
- package/dist/{diagram-S2PKOQOG-DvQBNtA7.js → diagram-S2PKOQOG-CJixlBq7.js} +3 -3
- package/dist/{diagram-S2PKOQOG-BzM_Yydz.cjs → diagram-S2PKOQOG-XyZUZk_b.cjs} +1 -1
- package/dist/{digital-asset-manager-C-tiZy6C.js → digital-asset-manager-CyBlpHrq.js} +1 -1
- package/dist/{digital-asset-manager-B1NMros3.cjs → digital-asset-manager-Y8YMABE1.cjs} +1 -1
- package/dist/{duplicate-page-BgR_Z5mB.js → duplicate-page-3Dv56tPR.js} +2 -2
- package/dist/{duplicate-page-DfsShaR3.cjs → duplicate-page-nGQAYVQc.cjs} +1 -1
- package/dist/{dynamic-page-selector-B9LvdmAM.cjs → dynamic-page-selector-B9XaZMxt.cjs} +1 -1
- package/dist/{dynamic-page-selector-B_Il05Tb.js → dynamic-page-selector-BapENUmp.js} +1 -1
- package/dist/{erDiagram-Q2GNP2WA-BvcqZzam.js → erDiagram-Q2GNP2WA-B1QcX93p.js} +4 -4
- package/dist/{erDiagram-Q2GNP2WA-CIz-zXL5.cjs → erDiagram-Q2GNP2WA-Up8_IT91.cjs} +1 -1
- package/dist/{flowDiagram-NV44I4VS-H3UO6GU6.cjs → flowDiagram-NV44I4VS-BJffdKk6.cjs} +1 -1
- package/dist/{flowDiagram-NV44I4VS-DNDFiS4P.js → flowDiagram-NV44I4VS-Dq0-N_i3.js} +5 -5
- package/dist/{ganttDiagram-LVOFAZNH-3uLir5Ok.cjs → ganttDiagram-LVOFAZNH-CndRZUwp.cjs} +1 -1
- package/dist/{ganttDiagram-LVOFAZNH-CuEk_EPv.js → ganttDiagram-LVOFAZNH-DCuouHg6.js} +3 -3
- package/dist/{gitGraph-F6HP7TQM-DnzvXoTf.cjs → gitGraph-F6HP7TQM-1lOuaCHS.cjs} +1 -1
- package/dist/{gitGraph-F6HP7TQM-BNgutOCt.js → gitGraph-F6HP7TQM-Bwgh2Tgj.js} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-DJ--wipu.js → gitGraphDiagram-NY62KEGX-BFpRv9B4.js} +4 -4
- package/dist/{gitGraphDiagram-NY62KEGX-CpjW-tAs.cjs → gitGraphDiagram-NY62KEGX-Cc8RVspd.cjs} +1 -1
- package/dist/{index-D_4YaLhN.cjs → index-C1bimRWu.cjs} +2 -2
- package/dist/{index-CSOKPmkj.js → index-C_34q9jG.js} +17 -17
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{info-NVLQJR56-nlYJye66.cjs → info-NVLQJR56-C3piIB8L.cjs} +1 -1
- package/dist/info-NVLQJR56-DxpWS9Ek.js +5 -0
- package/dist/{infoDiagram-ER5ION4S-BYBSnMk9.cjs → infoDiagram-ER5ION4S-DqXS6eRb.cjs} +1 -1
- package/dist/{infoDiagram-ER5ION4S-D1ovR6Sb.js → infoDiagram-ER5ION4S-iBX13SKY.js} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-aab6wkCY.js → journeyDiagram-XKPGCS4Q-CIELmZlO.js} +4 -4
- package/dist/{journeyDiagram-XKPGCS4Q-D-YRkdmZ.cjs → journeyDiagram-XKPGCS4Q-CJX0XVNj.cjs} +1 -1
- package/dist/{json-diff-viewer-BafhQd3C.cjs → json-diff-viewer-B9kQEwcr.cjs} +1 -1
- package/dist/{json-diff-viewer-eh2Twply.js → json-diff-viewer-D2tCblUU.js} +1 -1
- package/dist/{kanban-definition-3W4ZIXB7-D_bnY8Es.cjs → kanban-definition-3W4ZIXB7-DnhdFt_Y.cjs} +1 -1
- package/dist/{kanban-definition-3W4ZIXB7-BDK6FtYy.js → kanban-definition-3W4ZIXB7-WK7l1gdb.js} +2 -2
- package/dist/{lang-panel-koRXBdpN.cjs → lang-panel-ClCAoE4L.cjs} +1 -1
- package/dist/{lang-panel-Dha1mI9s.js → lang-panel-CsA6jzez.js} +2 -2
- package/dist/{linear-CBvDLesx.cjs → linear-CdbmJ0kA.cjs} +1 -1
- package/dist/{linear-DmFX6iHR.js → linear-CebAae2s.js} +1 -1
- package/dist/{mark-as-template-DojgcJFD.js → mark-as-template-BsOhlLYx.js} +1 -1
- package/dist/{mark-as-template-BHkftF1C.cjs → mark-as-template-DUeGBAgn.cjs} +1 -1
- package/dist/{mermaid-parser.core-Df9eyFSv.cjs → mermaid-parser.core-DKJdj2_U.cjs} +2 -2
- package/dist/{mermaid-parser.core-Crve7Cv1.js → mermaid-parser.core-GitSl6co.js} +9 -9
- package/dist/{mermaid.core-e6RNUZK7.js → mermaid.core-3NhAXOzj.js} +31 -31
- package/dist/{mermaid.core-DY8gIrXk.cjs → mermaid.core-Cop_RRH4.cjs} +4 -4
- package/dist/{mindmap-definition-VGOIOE7T-BqZKJ_7z.js → mindmap-definition-VGOIOE7T-BOk1rAbB.js} +3 -3
- package/dist/{mindmap-definition-VGOIOE7T-CFYCEGsR.cjs → mindmap-definition-VGOIOE7T-cJsasSc0.cjs} +1 -1
- package/dist/{no-language-page-content-ZlibO6-a.js → no-language-page-content-DveHrqZF.js} +1 -1
- package/dist/{no-language-page-content-BjlCydsa.cjs → no-language-page-content-KLiCVKWw.cjs} +1 -1
- package/dist/{packet-BFZMPI3H-CmnL1d8H.cjs → packet-BFZMPI3H-B0uDu6gg.cjs} +1 -1
- package/dist/{packet-BFZMPI3H-BNOgRfy4.js → packet-BFZMPI3H-tS-CKRal.js} +1 -1
- package/dist/{page-creator-CYxW-uMk.js → page-creator-Du1tv5PL.js} +2 -2
- package/dist/{page-creator-D-HTXuwL.cjs → page-creator-I5z6OA-y.cjs} +1 -1
- package/dist/{page-lock-request-DIqND4Zp.js → page-lock-request-C_FjXr4-.js} +1 -1
- package/dist/{page-lock-request-ggTN32LL.cjs → page-lock-request-DSCZ2b9Y.cjs} +1 -1
- package/dist/{page-locked-by-dialog-Dv1QMUs2.js → page-locked-by-dialog-DAJlxcUt.js} +1 -1
- package/dist/{page-locked-by-dialog-DF_r3NKB.cjs → page-locked-by-dialog-Daefw0-2.cjs} +1 -1
- package/dist/{page-manager-new-iuNdn54Y.js → page-manager-new-BNk_0XVK.js} +2 -2
- package/dist/{page-manager-new-B7nEY5DJ.cjs → page-manager-new-DmA0Ka0c.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-BuQLf3EG.cjs → page-manager-search-and-filter-DkR8sFPh.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-Dvt-nBOL.js → page-manager-search-and-filter-heV_U9x0.js} +1 -1
- package/dist/{page-revisions-content-CR_65Pri.cjs → page-revisions-content-BIhjzS21.cjs} +1 -1
- package/dist/{page-revisions-content-DH30uwKy.js → page-revisions-content-BVg59skx.js} +2 -2
- package/dist/pie-7BOR55EZ-CcDzfu0_.js +5 -0
- package/dist/{pie-7BOR55EZ-CM2pRchz.cjs → pie-7BOR55EZ-CqYqIXXG.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-DhRe-2Yk.js → pieDiagram-ADFJNKIX-CFfE-HG7.js} +4 -4
- package/dist/{pieDiagram-ADFJNKIX-C_B1s9Ov.cjs → pieDiagram-ADFJNKIX-DWVdC3zW.cjs} +1 -1
- package/dist/{publish-pages-content-fwqyxl_3.js → publish-pages-content-BhJ_uRxQ.js} +2 -2
- package/dist/{publish-pages-content-DOniOjSV.cjs → publish-pages-content-CKydxoZ_.cjs} +1 -1
- package/dist/{quadrantDiagram-AYHSOK5B-DSaDCScU.js → quadrantDiagram-AYHSOK5B-6xSOcCxL.js} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-CrS56DWV.cjs → quadrantDiagram-AYHSOK5B-J0R9fpox.cjs} +1 -1
- package/dist/radar-NHE76QYJ-C4G7hzu6.js +5 -0
- package/dist/{radar-NHE76QYJ-CPX8AaYO.cjs → radar-NHE76QYJ-EznHmPEg.cjs} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-D60OatrS.cjs → requirementDiagram-UZGBJVZJ-DXq0f3Op.cjs} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-CbpHc5TO.js → requirementDiagram-UZGBJVZJ-p2d3AnQ8.js} +3 -3
- package/dist/{sankeyDiagram-TZEHDZUN-DklD-Q91.cjs → sankeyDiagram-TZEHDZUN-CLBuuob-.cjs} +1 -1
- package/dist/{sankeyDiagram-TZEHDZUN-AFuyaZMZ.js → sankeyDiagram-TZEHDZUN-CbASga1e.js} +1 -1
- package/dist/{save-to-lib-DKP-iiLU.js → save-to-lib-Byfa7tCG.js} +1 -1
- package/dist/{save-to-lib-DmZbKkm9.cjs → save-to-lib-C3mx8iXu.cjs} +1 -1
- package/dist/{selected-block-display-BPkRbRtv.js → selected-block-display-CZ3zwgqL.js} +2 -2
- package/dist/{selected-block-display-CMhOKq0c.cjs → selected-block-display-GwQBADhp.cjs} +2 -2
- package/dist/{seo-panel-D1FyS42r.js → seo-panel-CrpYigIp.js} +1 -1
- package/dist/{seo-panel-l-VdkTzp.cjs → seo-panel-DxaEiunO.cjs} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-p_o77zn1.js → sequenceDiagram-WL72ISMW-3T2mzAhA.js} +3 -3
- package/dist/{sequenceDiagram-WL72ISMW-CotOH2Xj.cjs → sequenceDiagram-WL72ISMW-DmS_WEPR.cjs} +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/{shared-json-ld-0VORoKPu.cjs → shared-json-ld-CcUhox6j.cjs} +1 -1
- package/dist/{shared-json-ld-jn36kQ1J.js → shared-json-ld-DczSLaqw.js} +1 -1
- package/dist/{slug-input-DPMG1pMZ.js → slug-input-CjagPxIn.js} +1 -1
- package/dist/{slug-input-CPHwulQv.cjs → slug-input-CsniBgYf.cjs} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-B1pfSzZB.cjs → stateDiagram-FKZM4ZOC-BmMX9umD.cjs} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-Ch8gd7OX.js → stateDiagram-FKZM4ZOC-D9lkyJcL.js} +2 -2
- package/dist/{stateDiagram-v2-4FDKWEC3-DCj4svbU.cjs → stateDiagram-v2-4FDKWEC3-BwQkMtRv.cjs} +1 -1
- package/dist/{stateDiagram-v2-4FDKWEC3-BDxmTUgh.js → stateDiagram-v2-4FDKWEC3-D0yq-_gB.js} +2 -2
- package/dist/{theme-panel-footer-DsZ67xQ8.cjs → theme-panel-footer-BYI0_a19.cjs} +1 -1
- package/dist/{theme-panel-footer-XREndTvO.js → theme-panel-footer-C-uSbeOf.js} +1 -1
- package/dist/{timeline-definition-IT6M3QCI-CK1EW7lG.cjs → timeline-definition-IT6M3QCI-Bi9IiYMF.cjs} +1 -1
- package/dist/{timeline-definition-IT6M3QCI-CmX-2kfr.js → timeline-definition-IT6M3QCI-LtkAohDp.js} +2 -2
- package/dist/{treemap-KMMF4GRG-D5Rm845j.cjs → treemap-KMMF4GRG-DAuFMsAI.cjs} +1 -1
- package/dist/{treemap-KMMF4GRG-B51FyMCU.js → treemap-KMMF4GRG-vy1iI8-N.js} +1 -1
- package/dist/{unmark-as-template-VHopisw3.js → unmark-as-template-CGKkAZPZ.js} +1 -1
- package/dist/{unmark-as-template-BB_2lvTh.cjs → unmark-as-template-GuUssCYI.cjs} +1 -1
- package/dist/{unpublish-page-DJKgb2OG.cjs → unpublish-page-D67IrGmd.cjs} +1 -1
- package/dist/{unpublish-page-Cq5OwCf-.js → unpublish-page-ow8e1CXO.js} +1 -1
- package/dist/{web-preview-CGX6_m7_.cjs → web-preview-Dm8A9E8S.cjs} +1 -1
- package/dist/{web-preview-BEYsnCo4.js → web-preview-NCfHy3pB.js} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-BXSS1azt.cjs → xychartDiagram-PRI3JC2R-d5V8_6ka.cjs} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-vt3IdmK_.js → xychartDiagram-PRI3JC2R-ggiHJXU7.js} +2 -2
- package/package.json +12 -12
- package/dist/ai-panel-content-Bi18WMi2.cjs +0 -1
- package/dist/ai-panel-default-lang-B6tYYmxI.cjs +0 -3
- package/dist/ai-panel-other-lang-B0umwiEm.cjs +0 -1
- package/dist/info-NVLQJR56-cQ8VboSE.js +0 -5
- package/dist/pie-7BOR55EZ-B4yrare5.js +0 -5
- package/dist/radar-NHE76QYJ-CN3oBECV.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var E3=Object.defineProperty;var v3=Object.getPrototypeOf;var T3=Reflect.get;var Hc=e=>{throw TypeError(e)};var w3=(e,t,r)=>t in e?E3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var q=(e,t,r)=>w3(e,typeof t!="symbol"?t+"":t,r),Yo=(e,t,r)=>t.has(e)||Hc("Cannot "+r);var Et=(e,t,r)=>(Yo(e,t,"read from private field"),r?r.call(e):t.get(e)),Rn=(e,t,r)=>t.has(e)?Hc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),rr=(e,t,r,n)=>(Yo(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Xo=(e,t,r)=>(Yo(e,t,"access private method"),r);var zc=(e,t,r)=>T3(v3(e),r,t);const D=require("react/jsx-runtime"),qt=require("lucide-react"),j=require("react"),k3=require("react-dom"),am=require("tailwind-merge"),S3=require("framer-motion"),el=require("./index-
|
|
1
|
+
"use strict";var E3=Object.defineProperty;var v3=Object.getPrototypeOf;var T3=Reflect.get;var Hc=e=>{throw TypeError(e)};var w3=(e,t,r)=>t in e?E3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var q=(e,t,r)=>w3(e,typeof t!="symbol"?t+"":t,r),Yo=(e,t,r)=>t.has(e)||Hc("Cannot "+r);var Et=(e,t,r)=>(Yo(e,t,"read from private field"),r?r.call(e):t.get(e)),Rn=(e,t,r)=>t.has(e)?Hc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),rr=(e,t,r,n)=>(Yo(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Xo=(e,t,r)=>(Yo(e,t,"access private method"),r);var zc=(e,t,r)=>T3(v3(e),r,t);const D=require("react/jsx-runtime"),qt=require("lucide-react"),j=require("react"),k3=require("react-dom"),am=require("tailwind-merge"),S3=require("framer-motion"),el=require("./index-C1bimRWu.cjs"),Uc=require("@chaibuilder/sdk"),A3=require("@chaibuilder/sdk/ui");function sm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const U=sm(j),om=sm(k3);function e0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1;const n=e.map(i=>{const a=qc(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():qc(e[i],null)}}}}function Jr(...e){return U.useCallback(uo(...e),e)}var C3=Symbol.for("react.lazy"),Cs=U[" use ".trim().toString()];function _3(e){return typeof e=="object"&&e!==null&&"then"in e}function um(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===C3&&"_payload"in e&&_3(e._payload)}function lm(e){const t=I3(e),r=U.forwardRef((n,i)=>{let{children:a,...s}=n;um(a)&&typeof Cs=="function"&&(a=Cs(a._payload));const o=U.Children.toArray(a),u=o.find(P3);if(u){const l=u.props.children,h=o.map(c=>c===u?U.Children.count(l)>1?U.Children.only(null):U.isValidElement(l)?l.props.children:null:c);return D.jsx(t,{...s,ref:i,children:U.isValidElement(l)?U.cloneElement(l,void 0,h):null})}return D.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var N3=lm("Slot");function I3(e){const t=U.forwardRef((r,n)=>{let{children:i,...a}=r;if(um(i)&&typeof Cs=="function"&&(i=Cs(i._payload)),U.isValidElement(i)){const s=D3(i),o=L3(a,i.props);return i.type!==U.Fragment&&(o.ref=n?uo(n,s):s),U.cloneElement(i,o)}return U.Children.count(i)>1?U.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var R3=Symbol("radix.slottable");function P3(e){return U.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R3}function L3(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...o)=>{const u=a(...o);return i(...o),u}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function D3(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=cm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function t0(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=cm(e))&&(n&&(n+=" "),n+=t);return n}const $c=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jc=t0,hm=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return jc(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(l=>{const h=r==null?void 0:r[l],c=a==null?void 0:a[l];if(h===null)return null;const d=$c(h)||$c(c);return i[l][d]}),o=r&&Object.entries(r).reduce((l,h)=>{let[c,d]=h;return d===void 0||(l[c]=d),l},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,h)=>{let{class:c,className:d,...f}=h;return Object.entries(f).every(g=>{let[y,T]=g;return Array.isArray(T)?T.includes({...a,...o}[y]):{...a,...o}[y]===T})?[...l,c,d]:l},[]);return jc(e,s,u,r==null?void 0:r.class,r==null?void 0:r.className)};function dt(...e){return am.twMerge(t0(e))}const M3=hm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),r0=U.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const s=n?N3:"button";return D.jsx(s,{className:dt(M3({variant:t,size:r,className:e})),ref:a,...i})});r0.displayName="Button";/*!---------------------------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) StackBlitz. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/const O3={damping:.7,stiffness:.05,mass:1.25},B3=70,F3=1e3/60,H3=350;let lo=!1;var rm;(rm=globalThis.document)==null||rm.addEventListener("mousedown",()=>{lo=!0});var nm;(nm=globalThis.document)==null||nm.addEventListener("mouseup",()=>{lo=!1});var im;(im=globalThis.document)==null||im.addEventListener("click",()=>{lo=!1});const z3=(e={})=>{const[t,r]=j.useState(!1),[n,i]=j.useState(e.initial!==!1),[a,s]=j.useState(!1),o=j.useRef(null);o.current=e;const u=j.useCallback(()=>{var R;if(!lo)return!1;const v=window.getSelection();if(!v||!v.rangeCount)return!1;const k=v.getRangeAt(0);return k.commonAncestorContainer.contains(T.current)||((R=T.current)==null?void 0:R.contains(k.commonAncestorContainer))},[]),l=j.useCallback(v=>{c.isAtBottom=v,i(v)},[]),h=j.useCallback(v=>{c.escapedFromLock=v,r(v)},[]),c=j.useMemo(()=>{let v;return{escapedFromLock:t,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var k;return((k=T.current)==null?void 0:k.scrollTop)??0},set scrollTop(k){T.current&&(T.current.scrollTop=k,c.ignoreScrollToTop=T.current.scrollTop)},get targetScrollTop(){return!T.current||!x.current?0:T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!x.current)return 0;const{targetScrollTop:k}=this;if(!e.targetScrollTop)return k;if((v==null?void 0:v.targetScrollTop)===k)return v.calculatedScrollTop;const R=Math.max(Math.min(e.targetScrollTop(k,{scrollElement:T.current,contentElement:x.current}),k),0);return v={targetScrollTop:k,calculatedScrollTop:R},requestAnimationFrame(()=>{v=void 0}),R},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=B3}}},[]),d=j.useCallback((v={})=>{var Y;typeof v=="string"&&(v={animation:v}),v.preserveScrollPosition||l(!0);const k=Date.now()+(Number(v.wait)||0),R=Ko(o.current,v.animation),{ignoreEscapes:O=!1}=v;let I,F=c.calculatedTargetScrollTop;v.duration instanceof Promise?v.duration.finally(()=>{I=Date.now()}):I=k+(v.duration??0);const G=async()=>{const B=new Promise(requestAnimationFrame).then(()=>{var Q;if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:X}=c,V=performance.now(),ue=(V-(c.lastTick??V))/F3;if(c.animation||(c.animation={behavior:R,promise:B,ignoreEscapes:O}),c.animation.behavior===R&&(c.lastTick=V),u()||k>Date.now())return G();if(X<Math.min(F,c.calculatedTargetScrollTop)){if(((Q=c.animation)==null?void 0:Q.behavior)===R){if(R==="instant")return c.scrollTop=c.calculatedTargetScrollTop,G();c.velocity=(R.damping*c.velocity+R.stiffness*c.scrollDifference)/R.mass,c.accumulated+=c.velocity*ue,c.scrollTop+=c.accumulated,c.scrollTop!==X&&(c.accumulated=0)}return G()}return I>Date.now()?(F=c.calculatedTargetScrollTop,G()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?d({animation:Ko(o.current,o.current.resize),ignoreEscapes:O,duration:Math.max(0,I-Date.now())||void 0}):c.isAtBottom)});return B.then(X=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),X))};return v.wait!==!0&&(c.animation=void 0),((Y=c.animation)==null?void 0:Y.behavior)===R?c.animation.promise:G()},[l,u,c]),f=j.useCallback(()=>{h(!0),l(!1)},[h,l]),g=j.useCallback(({target:v})=>{if(v!==T.current)return;const{scrollTop:k,ignoreScrollToTop:R}=c;let{lastScrollTop:O=k}=c;c.lastScrollTop=k,c.ignoreScrollToTop=void 0,R&&R>k&&(O=R),s(c.isNearBottom),setTimeout(()=>{var G;if(c.resizeDifference||k===R)return;if(u()){h(!0),l(!1);return}const I=k>O,F=k<O;if((G=c.animation)!=null&&G.ignoreEscapes){c.scrollTop=O;return}F&&(h(!0),l(!1)),I&&h(!1),!c.escapedFromLock&&c.isNearBottom&&l(!0)},1)},[h,l,u,c]),y=j.useCallback(({target:v,deltaY:k})=>{var O;let R=v;for(;!["scroll","auto"].includes(getComputedStyle(R).overflow);){if(!R.parentElement)return;R=R.parentElement}R===T.current&&k<0&&T.current.scrollHeight>T.current.clientHeight&&!((O=c.animation)!=null&&O.ignoreEscapes)&&(h(!0),l(!1))},[h,l,c]),T=Gc(v=>{var k,R;(k=T.current)==null||k.removeEventListener("scroll",g),(R=T.current)==null||R.removeEventListener("wheel",y),v==null||v.addEventListener("scroll",g,{passive:!0}),v==null||v.addEventListener("wheel",y,{passive:!0})},[]),x=Gc(v=>{var R,O;if((R=c.resizeObserver)==null||R.disconnect(),!v)return;let k;c.resizeObserver=new ResizeObserver(([I])=>{const{height:F}=I.contentRect,G=F-(k??F);if(c.resizeDifference=G,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),s(c.isNearBottom),G>=0){const Y=Ko(o.current,k?o.current.resize:o.current.initial);d({animation:Y,wait:!0,preserveScrollPosition:!0,duration:Y==="instant"?void 0:H3})}else c.isNearBottom&&(h(!1),l(!0));k=F,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===G&&(c.resizeDifference=0)},1)})}),(O=c.resizeObserver)==null||O.observe(v)},[]);return{contentRef:x,scrollRef:T,scrollToBottom:d,stopScroll:f,isAtBottom:n||a,isNearBottom:a,escapedFromLock:t,state:c}};function Gc(e,t){const r=j.useCallback(n=>(r.current=n,e(n)),t);return r}const Qo=new Map;function Ko(...e){const t={...O3};let r=!1;for(const i of e){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const n=JSON.stringify(t);return Qo.has(n)||Qo.set(n,Object.freeze(t)),r?"instant":Qo.get(n)}const dm=j.createContext(null),U3=typeof window<"u"?j.useLayoutEffect:j.useEffect;function n0({instance:e,children:t,resize:r,initial:n,mass:i,damping:a,stiffness:s,targetScrollTop:o,contextRef:u,...l}){const h=j.useRef(null),c=U.useCallback((O,I)=>{const F=(R==null?void 0:R.targetScrollTop)??o;return(F==null?void 0:F(O,I))??O},[o]),d=z3({mass:i,damping:a,stiffness:s,resize:r,initial:n,targetScrollTop:c}),{scrollRef:f,contentRef:g,scrollToBottom:y,stopScroll:T,isAtBottom:x,escapedFromLock:v,state:k}=e??d,R=j.useMemo(()=>({scrollToBottom:y,stopScroll:T,scrollRef:f,isAtBottom:x,escapedFromLock:v,contentRef:g,state:k,get targetScrollTop(){return h.current},set targetScrollTop(O){h.current=O}}),[y,x,g,f,T,v,k]);return j.useImperativeHandle(u,()=>R,[R]),U3(()=>{f.current&&getComputedStyle(f.current).overflow==="visible"&&(f.current.style.overflow="auto")},[]),D.jsx(dm.Provider,{value:R,children:D.jsx("div",{...l,children:typeof t=="function"?t(R):t})})}(function(e){function t({children:r,...n}){const i=fm();return D.jsx("div",{ref:i.scrollRef,style:{height:"100%",width:"100%"},children:D.jsx("div",{...n,ref:i.contentRef,children:typeof r=="function"?r(i):r})})}e.Content=t})(n0);function fm(){const e=j.useContext(dm);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const q3=({className:e,...t})=>D.jsx(n0,{className:dt("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),$3=({className:e,...t})=>D.jsx(n0.Content,{className:dt("flex flex-col gap-8 p-4",e),...t}),j3=({className:e,title:t="No messages yet",description:r="Start a conversation to see messages here",icon:n,children:i,...a})=>D.jsx("div",{className:dt("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",e),...a,children:i??D.jsxs(D.Fragment,{children:[n&&D.jsx("div",{className:"text-muted-foreground",children:n}),D.jsxs("div",{className:"space-y-1",children:[D.jsx("h3",{className:"font-medium text-sm",children:t}),r&&D.jsx("p",{className:"text-muted-foreground text-sm",children:r})]})]})}),G3=({className:e,...t})=>{const{isAtBottom:r,scrollToBottom:n}=fm(),i=j.useCallback(()=>{n()},[n]);return!r&&D.jsx(r0,{className:dt("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:D.jsx(qt.ArrowDownIcon,{className:"size-4"})})};var V3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W3=V3.reduce((e,t)=>{const r=lm(`Primitive.${t}`),n=U.forwardRef((i,a)=>{const{asChild:s,...o}=i,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(u,{...o,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Y3="Separator",Vc="horizontal",X3=["horizontal","vertical"],mm=U.forwardRef((e,t)=>{const{decorative:r,orientation:n=Vc,...i}=e,a=Q3(n)?n:Vc,o=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return D.jsx(W3.div,{"data-orientation":a,...o,...i,ref:t})});mm.displayName=Y3;function Q3(e){return X3.includes(e)}var pm=mm;const K3=U.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>D.jsx(pm,{ref:i,decorative:r,orientation:t,className:dt("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));K3.displayName=pm.displayName;function ir(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Z3(e,t){const r=U.createContext(t),n=a=>{const{children:s,...o}=a,u=U.useMemo(()=>o,Object.values(o));return D.jsx(r.Provider,{value:u,children:s})};n.displayName=e+"Provider";function i(a){const s=U.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function co(e,t=[]){let r=[];function n(a,s){const o=U.createContext(s),u=r.length;r=[...r,s];const l=c=>{var x;const{scope:d,children:f,...g}=c,y=((x=d==null?void 0:d[e])==null?void 0:x[u])||o,T=U.useMemo(()=>g,Object.values(g));return D.jsx(y.Provider,{value:T,children:f})};l.displayName=a+"Provider";function h(c,d){var y;const f=((y=d==null?void 0:d[e])==null?void 0:y[u])||o,g=U.useContext(f);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[l,h]}const i=()=>{const a=r.map(s=>U.createContext(s));return function(o){const u=(o==null?void 0:o[e])||a;return U.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[n,J3(i,...t)]}function J3(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((o,{useScope:u,scopeName:l})=>{const c=u(a)[`__scope${l}`];return{...o,...c}},{});return U.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function gm(e){const t=e6(e),r=U.forwardRef((n,i)=>{const{children:a,...s}=n,o=U.Children.toArray(a),u=o.find(r6);if(u){const l=u.props.children,h=o.map(c=>c===u?U.Children.count(l)>1?U.Children.only(null):U.isValidElement(l)?l.props.children:null:c);return D.jsx(t,{...s,ref:i,children:U.isValidElement(l)?U.cloneElement(l,void 0,h):null})}return D.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function e6(e){const t=U.forwardRef((r,n)=>{const{children:i,...a}=r;if(U.isValidElement(i)){const s=i6(i),o=n6(a,i.props);return i.type!==U.Fragment&&(o.ref=n?uo(n,s):s),U.cloneElement(i,o)}return U.Children.count(i)>1?U.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bm=Symbol("radix.slottable");function t6(e){const t=({children:r})=>D.jsx(D.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=bm,t}function r6(e){return U.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bm}function n6(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...o)=>{const u=a(...o);return i(...o),u}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function i6(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var a6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cr=a6.reduce((e,t)=>{const r=gm(`Primitive.${t}`),n=U.forwardRef((i,a)=>{const{asChild:s,...o}=i,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(u,{...o,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ym(e,t){e&&om.flushSync(()=>e.dispatchEvent(t))}function Pa(e){const t=U.useRef(e);return U.useEffect(()=>{t.current=e}),U.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function s6(e,t=globalThis==null?void 0:globalThis.document){const r=Pa(e);U.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var o6="DismissableLayer",tl="dismissableLayer.update",u6="dismissableLayer.pointerDownOutside",l6="dismissableLayer.focusOutside",Wc,xm=U.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),i0=U.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...u}=e,l=U.useContext(xm),[h,c]=U.useState(null),d=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=U.useState({}),g=Jr(t,F=>c(F)),y=Array.from(l.layers),[T]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(T),v=h?y.indexOf(h):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,R=v>=x,O=d6(F=>{const G=F.target,Y=[...l.branches].some(B=>B.contains(G));!R||Y||(i==null||i(F),s==null||s(F),F.defaultPrevented||o==null||o())},d),I=f6(F=>{const G=F.target;[...l.branches].some(B=>B.contains(G))||(a==null||a(F),s==null||s(F),F.defaultPrevented||o==null||o())},d);return s6(F=>{v===l.layers.size-1&&(n==null||n(F),!F.defaultPrevented&&o&&(F.preventDefault(),o()))},d),U.useEffect(()=>{if(h)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wc=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),Yc(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Wc)}},[h,d,r,l]),U.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),Yc())},[h,l]),U.useEffect(()=>{const F=()=>f({});return document.addEventListener(tl,F),()=>document.removeEventListener(tl,F)},[]),D.jsx(cr.div,{...u,ref:g,style:{pointerEvents:k?R?"auto":"none":void 0,...e.style},onFocusCapture:ir(e.onFocusCapture,I.onFocusCapture),onBlurCapture:ir(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:ir(e.onPointerDownCapture,O.onPointerDownCapture)})});i0.displayName=o6;var c6="DismissableLayerBranch",h6=U.forwardRef((e,t)=>{const r=U.useContext(xm),n=U.useRef(null),i=Jr(t,n);return U.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),D.jsx(cr.div,{...e,ref:i})});h6.displayName=c6;function d6(e,t=globalThis==null?void 0:globalThis.document){const r=Pa(e),n=U.useRef(!1),i=U.useRef(()=>{});return U.useEffect(()=>{const a=o=>{if(o.target&&!n.current){let u=function(){Em(u6,r,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function f6(e,t=globalThis==null?void 0:globalThis.document){const r=Pa(e),n=U.useRef(!1);return U.useEffect(()=>{const i=a=>{a.target&&!n.current&&Em(l6,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Yc(){const e=new CustomEvent(tl);document.dispatchEvent(e)}function Em(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ym(i,a):i.dispatchEvent(a)}var Wr=globalThis!=null&&globalThis.document?U.useLayoutEffect:()=>{},m6=U[" useId ".trim().toString()]||(()=>{}),p6=0;function vm(e){const[t,r]=U.useState(m6());return Wr(()=>{r(n=>n??String(p6++))},[e]),t?`radix-${t}`:""}const g6=["top","right","bottom","left"],xn=Math.min,Bt=Math.max,_s=Math.round,Ya=Math.floor,wr=e=>({x:e,y:e}),b6={left:"right",right:"left",bottom:"top",top:"bottom"},y6={start:"end",end:"start"};function rl(e,t,r){return Bt(e,xn(t,r))}function Yr(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function Si(e){return e.split("-")[1]}function a0(e){return e==="x"?"y":"x"}function s0(e){return e==="y"?"height":"width"}const x6=new Set(["top","bottom"]);function xr(e){return x6.has(Xr(e))?"y":"x"}function o0(e){return a0(xr(e))}function E6(e,t,r){r===void 0&&(r=!1);const n=Si(e),i=o0(e),a=s0(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Ns(s)),[s,Ns(s)]}function v6(e){const t=Ns(e);return[nl(e),t,nl(t)]}function nl(e){return e.replace(/start|end/g,t=>y6[t])}const Xc=["left","right"],Qc=["right","left"],T6=["top","bottom"],w6=["bottom","top"];function k6(e,t,r){switch(e){case"top":case"bottom":return r?t?Qc:Xc:t?Xc:Qc;case"left":case"right":return t?T6:w6;default:return[]}}function S6(e,t,r,n){const i=Si(e);let a=k6(Xr(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(nl)))),a}function Ns(e){return e.replace(/left|right|bottom|top/g,t=>b6[t])}function A6(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tm(e){return typeof e!="number"?A6(e):{top:e,right:e,bottom:e,left:e}}function Is(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Kc(e,t,r){let{reference:n,floating:i}=e;const a=xr(t),s=o0(t),o=s0(s),u=Xr(t),l=a==="y",h=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2,d=n[o]/2-i[o]/2;let f;switch(u){case"top":f={x:h,y:n.y-i.height};break;case"bottom":f={x:h,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:c};break;case"left":f={x:n.x-i.width,y:c};break;default:f={x:n.x,y:n.y}}switch(Si(t)){case"start":f[s]-=d*(r&&l?-1:1);break;case"end":f[s]+=d*(r&&l?-1:1);break}return f}const C6=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:c}=Kc(l,n,u),d=n,f={},g=0;for(let y=0;y<o.length;y++){const{name:T,fn:x}=o[y],{x:v,y:k,data:R,reset:O}=await x({x:h,y:c,initialPlacement:n,placement:d,strategy:i,middlewareData:f,rects:l,platform:s,elements:{reference:e,floating:t}});h=v??h,c=k??c,f={...f,[T]:{...f[T],...R}},O&&g<=50&&(g++,typeof O=="object"&&(O.placement&&(d=O.placement),O.rects&&(l=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:h,y:c}=Kc(l,d,u)),y=-1)}return{x:h,y:c,placement:d,strategy:i,middlewareData:f}};async function ba(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:o,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:d=!1,padding:f=0}=Yr(t,e),g=Tm(f),T=o[d?c==="floating"?"reference":"floating":c],x=Is(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(T)))==null||r?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:l,rootBoundary:h,strategy:u})),v=c==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),R=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},O=Is(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:k,strategy:u}):v);return{top:(x.top-O.top+g.top)/R.y,bottom:(O.bottom-x.bottom+g.bottom)/R.y,left:(x.left-O.left+g.left)/R.x,right:(O.right-x.right+g.right)/R.x}}const _6=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:u}=t,{element:l,padding:h=0}=Yr(e,t)||{};if(l==null)return{};const c=Tm(h),d={x:r,y:n},f=o0(i),g=s0(f),y=await s.getDimensions(l),T=f==="y",x=T?"top":"left",v=T?"bottom":"right",k=T?"clientHeight":"clientWidth",R=a.reference[g]+a.reference[f]-d[f]-a.floating[g],O=d[f]-a.reference[f],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let F=I?I[k]:0;(!F||!await(s.isElement==null?void 0:s.isElement(I)))&&(F=o.floating[k]||a.floating[g]);const G=R/2-O/2,Y=F/2-y[g]/2-1,B=xn(c[x],Y),X=xn(c[v],Y),V=B,ue=F-y[g]-X,Q=F/2-y[g]/2+G,K=rl(V,Q,ue),ce=!u.arrow&&Si(i)!=null&&Q!==K&&a.reference[g]/2-(Q<V?B:X)-y[g]/2<0,ge=ce?Q<V?Q-V:Q-ue:0;return{[f]:d[f]+ge,data:{[f]:K,centerOffset:Q-K-ge,...ce&&{alignmentOffset:ge}},reset:ce}}}),N6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:u,elements:l}=t,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...T}=Yr(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const x=Xr(i),v=xr(o),k=Xr(o)===o,R=await(u.isRTL==null?void 0:u.isRTL(l.floating)),O=d||(k||!y?[Ns(o)]:v6(o)),I=g!=="none";!d&&I&&O.push(...S6(o,y,g,R));const F=[o,...O],G=await ba(t,T),Y=[];let B=((n=a.flip)==null?void 0:n.overflows)||[];if(h&&Y.push(G[x]),c){const Q=E6(i,s,R);Y.push(G[Q[0]],G[Q[1]])}if(B=[...B,{placement:i,overflows:Y}],!Y.every(Q=>Q<=0)){var X,V;const Q=(((X=a.flip)==null?void 0:X.index)||0)+1,K=F[Q];if(K&&(!(c==="alignment"?v!==xr(K):!1)||B.every(de=>xr(de.placement)===v?de.overflows[0]>0:!0)))return{data:{index:Q,overflows:B},reset:{placement:K}};let ce=(V=B.filter(ge=>ge.overflows[0]<=0).sort((ge,de)=>ge.overflows[1]-de.overflows[1])[0])==null?void 0:V.placement;if(!ce)switch(f){case"bestFit":{var ue;const ge=(ue=B.filter(de=>{if(I){const Ie=xr(de.placement);return Ie===v||Ie==="y"}return!0}).map(de=>[de.placement,de.overflows.filter(Ie=>Ie>0).reduce((Ie,P)=>Ie+P,0)]).sort((de,Ie)=>de[1]-Ie[1])[0])==null?void 0:ue[0];ge&&(ce=ge);break}case"initialPlacement":ce=o;break}if(i!==ce)return{reset:{placement:ce}}}return{}}}};function Zc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jc(e){return g6.some(t=>e[t]>=0)}const I6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=Yr(e,t);switch(n){case"referenceHidden":{const a=await ba(t,{...i,elementContext:"reference"}),s=Zc(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Jc(s)}}}case"escaped":{const a=await ba(t,{...i,altBoundary:!0}),s=Zc(a,r.floating);return{data:{escapedOffsets:s,escaped:Jc(s)}}}default:return{}}}}},wm=new Set(["left","top"]);async function R6(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=Xr(r),o=Si(r),u=xr(r)==="y",l=wm.has(s)?-1:1,h=a&&u?-1:1,c=Yr(t,e);let{mainAxis:d,crossAxis:f,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof g=="number"&&(f=o==="end"?g*-1:g),u?{x:f*h,y:d*l}:{x:d*l,y:f*h}}const P6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:o}=t,u=await R6(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},L6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:T=>{let{x,y:v}=T;return{x,y:v}}},...u}=Yr(e,t),l={x:r,y:n},h=await ba(t,u),c=xr(Xr(i)),d=a0(c);let f=l[d],g=l[c];if(a){const T=d==="y"?"top":"left",x=d==="y"?"bottom":"right",v=f+h[T],k=f-h[x];f=rl(v,f,k)}if(s){const T=c==="y"?"top":"left",x=c==="y"?"bottom":"right",v=g+h[T],k=g-h[x];g=rl(v,g,k)}const y=o.fn({...t,[d]:f,[c]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[d]:a,[c]:s}}}}}},D6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:u=!0,crossAxis:l=!0}=Yr(e,t),h={x:r,y:n},c=xr(i),d=a0(c);let f=h[d],g=h[c];const y=Yr(o,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const k=d==="y"?"height":"width",R=a.reference[d]-a.floating[k]+T.mainAxis,O=a.reference[d]+a.reference[k]-T.mainAxis;f<R?f=R:f>O&&(f=O)}if(l){var x,v;const k=d==="y"?"width":"height",R=wm.has(Xr(i)),O=a.reference[c]-a.floating[k]+(R&&((x=s.offset)==null?void 0:x[c])||0)+(R?0:T.crossAxis),I=a.reference[c]+a.reference[k]+(R?0:((v=s.offset)==null?void 0:v[c])||0)-(R?T.crossAxis:0);g<O?g=O:g>I&&(g=I)}return{[d]:f,[c]:g}}}},M6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:u=()=>{},...l}=Yr(e,t),h=await ba(t,l),c=Xr(i),d=Si(i),f=xr(i)==="y",{width:g,height:y}=a.floating;let T,x;c==="top"||c==="bottom"?(T=c,x=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(x=c,T=d==="end"?"top":"bottom");const v=y-h.top-h.bottom,k=g-h.left-h.right,R=xn(y-h[T],v),O=xn(g-h[x],k),I=!t.middlewareData.shift;let F=R,G=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(G=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(F=v),I&&!d){const B=Bt(h.left,0),X=Bt(h.right,0),V=Bt(h.top,0),ue=Bt(h.bottom,0);f?G=g-2*(B!==0||X!==0?B+X:Bt(h.left,h.right)):F=y-2*(V!==0||ue!==0?V+ue:Bt(h.top,h.bottom))}await u({...t,availableWidth:G,availableHeight:F});const Y=await s.getDimensions(o.floating);return g!==Y.width||y!==Y.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function Ai(e){return km(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sr(e){var t;return(t=(km(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function km(e){return ho()?e instanceof Node||e instanceof Ht(e).Node:!1}function ur(e){return ho()?e instanceof Element||e instanceof Ht(e).Element:!1}function kr(e){return ho()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function eh(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}const O6=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!O6.has(i)}const B6=new Set(["table","td","th"]);function F6(e){return B6.has(Ai(e))}const H6=[":popover-open",":modal"];function fo(e){return H6.some(t=>{try{return e.matches(t)}catch{return!1}})}const z6=["transform","translate","scale","rotate","perspective"],U6=["transform","translate","scale","rotate","perspective","filter"],q6=["paint","layout","strict","content"];function u0(e){const t=l0(),r=ur(e)?lr(e):e;return z6.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||U6.some(n=>(r.willChange||"").includes(n))||q6.some(n=>(r.contain||"").includes(n))}function $6(e){let t=En(e);for(;kr(t)&&!bi(t);){if(u0(t))return t;if(fo(t))return null;t=En(t)}return null}function l0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j6=new Set(["html","body","#document"]);function bi(e){return j6.has(Ai(e))}function lr(e){return Ht(e).getComputedStyle(e)}function mo(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function En(e){if(Ai(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eh(e)&&e.host||Sr(e);return eh(t)?t.host:t}function Sm(e){const t=En(e);return bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:kr(t)&&La(t)?t:Sm(t)}function ya(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Sm(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=Ht(i);if(a){const o=il(s);return t.concat(s,s.visualViewport||[],La(i)?i:[],o&&r?ya(o):[])}return t.concat(i,ya(i,[],r))}function il(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Am(e){const t=lr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=kr(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=_s(r)!==a||_s(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function c0(e){return ur(e)?e:e.contextElement}function hi(e){const t=c0(e);if(!kr(t))return wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=Am(t);let s=(a?_s(r.width):r.width)/n,o=(a?_s(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const G6=wr(0);function Cm(e){const t=Ht(e);return!l0()||!t.visualViewport?G6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V6(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ht(e)?!1:t}function qn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=c0(e);let s=wr(1);t&&(n?ur(n)&&(s=hi(n)):s=hi(e));const o=V6(a,r,n)?Cm(a):wr(0);let u=(i.left+o.x)/s.x,l=(i.top+o.y)/s.y,h=i.width/s.x,c=i.height/s.y;if(a){const d=Ht(a),f=n&&ur(n)?Ht(n):n;let g=d,y=il(g);for(;y&&n&&f!==g;){const T=hi(y),x=y.getBoundingClientRect(),v=lr(y),k=x.left+(y.clientLeft+parseFloat(v.paddingLeft))*T.x,R=x.top+(y.clientTop+parseFloat(v.paddingTop))*T.y;u*=T.x,l*=T.y,h*=T.x,c*=T.y,u+=k,l+=R,g=Ht(y),y=il(g)}}return Is({width:h,height:c,x:u,y:l})}function po(e,t){const r=mo(e).scrollLeft;return t?t.left+r:qn(Sr(e)).left+r}function _m(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-po(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function W6(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Sr(n),o=t?fo(t.floating):!1;if(n===s||o&&a)return r;let u={scrollLeft:0,scrollTop:0},l=wr(1);const h=wr(0),c=kr(n);if((c||!c&&!a)&&((Ai(n)!=="body"||La(s))&&(u=mo(n)),kr(n))){const f=qn(n);l=hi(n),h.x=f.x+n.clientLeft,h.y=f.y+n.clientTop}const d=s&&!c&&!a?_m(s,u):wr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-u.scrollLeft*l.x+h.x+d.x,y:r.y*l.y-u.scrollTop*l.y+h.y+d.y}}function Y6(e){return Array.from(e.getClientRects())}function X6(e){const t=Sr(e),r=mo(e),n=e.ownerDocument.body,i=Bt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Bt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+po(e);const o=-r.scrollTop;return lr(n).direction==="rtl"&&(s+=Bt(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}const th=25;function Q6(e,t){const r=Ht(e),n=Sr(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,o=0,u=0;if(i){a=i.width,s=i.height;const h=l0();(!h||h&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}const l=po(n);if(l<=0){const h=n.ownerDocument,c=h.body,d=getComputedStyle(c),f=h.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(n.clientWidth-c.clientWidth-f);g<=th&&(a-=g)}else l<=th&&(a+=l);return{width:a,height:s,x:o,y:u}}const K6=new Set(["absolute","fixed"]);function Z6(e,t){const r=qn(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=kr(e)?hi(e):wr(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,u=i*a.x,l=n*a.y;return{width:s,height:o,x:u,y:l}}function rh(e,t,r){let n;if(t==="viewport")n=Q6(e,r);else if(t==="document")n=X6(Sr(e));else if(ur(t))n=Z6(t,r);else{const i=Cm(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Is(n)}function Nm(e,t){const r=En(e);return r===t||!ur(r)||bi(r)?!1:lr(r).position==="fixed"||Nm(r,t)}function J6(e,t){const r=t.get(e);if(r)return r;let n=ya(e,[],!1).filter(o=>ur(o)&&Ai(o)!=="body"),i=null;const a=lr(e).position==="fixed";let s=a?En(e):e;for(;ur(s)&&!bi(s);){const o=lr(s),u=u0(s);!u&&o.position==="fixed"&&(i=null),(a?!u&&!i:!u&&o.position==="static"&&!!i&&K6.has(i.position)||La(s)&&!u&&Nm(e,s))?n=n.filter(h=>h!==s):i=o,s=En(s)}return t.set(e,n),n}function eb(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?fo(t)?[]:J6(t,this._c):[].concat(r),n],o=s[0],u=s.reduce((l,h)=>{const c=rh(t,h,i);return l.top=Bt(c.top,l.top),l.right=xn(c.right,l.right),l.bottom=xn(c.bottom,l.bottom),l.left=Bt(c.left,l.left),l},rh(t,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function tb(e){const{width:t,height:r}=Am(e);return{width:t,height:r}}function rb(e,t,r){const n=kr(t),i=Sr(t),a=r==="fixed",s=qn(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const u=wr(0);function l(){u.x=po(i)}if(n||!n&&!a)if((Ai(t)!=="body"||La(i))&&(o=mo(t)),n){const f=qn(t,!0,a,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&l();a&&!n&&i&&l();const h=i&&!n&&!a?_m(i,o):wr(0),c=s.left+o.scrollLeft-u.x-h.x,d=s.top+o.scrollTop-u.y-h.y;return{x:c,y:d,width:s.width,height:s.height}}function Zo(e){return lr(e).position==="static"}function nh(e,t){if(!kr(e)||lr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Sr(e)===r&&(r=r.ownerDocument.body),r}function Im(e,t){const r=Ht(e);if(fo(e))return r;if(!kr(e)){let i=En(e);for(;i&&!bi(i);){if(ur(i)&&!Zo(i))return i;i=En(i)}return r}let n=nh(e,t);for(;n&&F6(n)&&Zo(n);)n=nh(n,t);return n&&bi(n)&&Zo(n)&&!u0(n)?r:n||$6(e)||r}const nb=async function(e){const t=this.getOffsetParent||Im,r=this.getDimensions,n=await r(e.floating);return{reference:rb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ib(e){return lr(e).direction==="rtl"}const ab={convertOffsetParentRelativeRectToViewportRelativeRect:W6,getDocumentElement:Sr,getClippingRect:eb,getOffsetParent:Im,getElementRects:nb,getClientRects:Y6,getDimensions:tb,getScale:hi,isElement:ur,isRTL:ib};function Rm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sb(e,t){let r=null,n;const i=Sr(e);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,u){o===void 0&&(o=!1),u===void 0&&(u=1),a();const l=e.getBoundingClientRect(),{left:h,top:c,width:d,height:f}=l;if(o||t(),!d||!f)return;const g=Ya(c),y=Ya(i.clientWidth-(h+d)),T=Ya(i.clientHeight-(c+f)),x=Ya(h),k={rootMargin:-g+"px "+-y+"px "+-T+"px "+-x+"px",threshold:Bt(0,xn(1,u))||1};let R=!0;function O(I){const F=I[0].intersectionRatio;if(F!==u){if(!R)return s();F?s(!1,F):n=setTimeout(()=>{s(!1,1e-7)},1e3)}F===1&&!Rm(l,e.getBoundingClientRect())&&s(),R=!1}try{r=new IntersectionObserver(O,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,k)}r.observe(e)}return s(!0),a}function ob(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,l=c0(e),h=i||a?[...l?ya(l):[],...ya(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const c=l&&o?sb(l,r):null;let d=-1,f=null;s&&(f=new ResizeObserver(x=>{let[v]=x;v&&v.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),r()}),l&&!u&&f.observe(l),f.observe(t));let g,y=u?qn(e):null;u&&T();function T(){const x=qn(e);y&&!Rm(y,x)&&r(),y=x,g=requestAnimationFrame(T)}return r(),()=>{var x;h.forEach(v=>{i&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),c==null||c(),(x=f)==null||x.disconnect(),f=null,u&&cancelAnimationFrame(g)}}const ub=P6,lb=L6,cb=N6,hb=M6,db=I6,ih=_6,fb=D6,mb=(e,t,r)=>{const n=new Map,i={platform:ab,...r},a={...i.platform,_c:n};return C6(e,t,{...i,platform:a})};var pb=typeof document<"u",gb=function(){},xs=pb?j.useLayoutEffect:gb;function Rs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Rs(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Rs(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Pm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ah(e,t){const r=Pm(e);return Math.round(t*r)/r}function Jo(e){const t=U.useRef(e);return xs(()=>{t.current=e}),t}function bb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:u,open:l}=e,[h,c]=U.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=U.useState(n);Rs(d,n)||f(n);const[g,y]=U.useState(null),[T,x]=U.useState(null),v=U.useCallback(de=>{de!==I.current&&(I.current=de,y(de))},[]),k=U.useCallback(de=>{de!==F.current&&(F.current=de,x(de))},[]),R=a||g,O=s||T,I=U.useRef(null),F=U.useRef(null),G=U.useRef(h),Y=u!=null,B=Jo(u),X=Jo(i),V=Jo(l),ue=U.useCallback(()=>{if(!I.current||!F.current)return;const de={placement:t,strategy:r,middleware:d};X.current&&(de.platform=X.current),mb(I.current,F.current,de).then(Ie=>{const P={...Ie,isPositioned:V.current!==!1};Q.current&&!Rs(G.current,P)&&(G.current=P,om.flushSync(()=>{c(P)}))})},[d,t,r,X,V]);xs(()=>{l===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,c(de=>({...de,isPositioned:!1})))},[l]);const Q=U.useRef(!1);xs(()=>(Q.current=!0,()=>{Q.current=!1}),[]),xs(()=>{if(R&&(I.current=R),O&&(F.current=O),R&&O){if(B.current)return B.current(R,O,ue);ue()}},[R,O,ue,B,Y]);const K=U.useMemo(()=>({reference:I,floating:F,setReference:v,setFloating:k}),[v,k]),ce=U.useMemo(()=>({reference:R,floating:O}),[R,O]),ge=U.useMemo(()=>{const de={position:r,left:0,top:0};if(!ce.floating)return de;const Ie=ah(ce.floating,h.x),P=ah(ce.floating,h.y);return o?{...de,transform:"translate("+Ie+"px, "+P+"px)",...Pm(ce.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Ie,top:P}},[r,o,ce.floating,h.x,h.y]);return U.useMemo(()=>({...h,update:ue,refs:K,elements:ce,floatingStyles:ge}),[h,ue,K,ce,ge])}const yb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ih({element:n.current,padding:i}).fn(r):{}:n?ih({element:n,padding:i}).fn(r):{}}}},xb=(e,t)=>({...ub(e),options:[e,t]}),Eb=(e,t)=>({...lb(e),options:[e,t]}),vb=(e,t)=>({...fb(e),options:[e,t]}),Tb=(e,t)=>({...cb(e),options:[e,t]}),wb=(e,t)=>({...hb(e),options:[e,t]}),kb=(e,t)=>({...db(e),options:[e,t]}),Sb=(e,t)=>({...yb(e),options:[e,t]});var Ab="Arrow",Lm=U.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return D.jsx(cr.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:D.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lm.displayName=Ab;var Cb=Lm;function _b(e){const[t,r]=U.useState(void 0);return Wr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const u=a.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,o=l.blockSize}else s=e.offsetWidth,o=e.offsetHeight;r({width:s,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var h0="Popper",[Dm,d0]=co(h0),[Nb,Mm]=Dm(h0),Om=e=>{const{__scopePopper:t,children:r}=e,[n,i]=U.useState(null);return D.jsx(Nb,{scope:t,anchor:n,onAnchorChange:i,children:r})};Om.displayName=h0;var Bm="PopperAnchor",Fm=U.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=Mm(Bm,r),s=U.useRef(null),o=Jr(t,s),u=U.useRef(null);return U.useEffect(()=>{const l=u.current;u.current=(n==null?void 0:n.current)||s.current,l!==u.current&&a.onAnchorChange(u.current)}),n?null:D.jsx(cr.div,{...i,ref:o})});Fm.displayName=Bm;var f0="PopperContent",[Ib,Rb]=Dm(f0),Hm=U.forwardRef((e,t)=>{var xt,it,At,Ct,Rr,ei;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:c="partial",hideWhenDetached:d=!1,updatePositionStrategy:f="optimized",onPlaced:g,...y}=e,T=Mm(f0,r),[x,v]=U.useState(null),k=Jr(t,Pr=>v(Pr)),[R,O]=U.useState(null),I=_b(R),F=(I==null?void 0:I.width)??0,G=(I==null?void 0:I.height)??0,Y=n+(a!=="center"?"-"+a:""),B=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},X=Array.isArray(l)?l:[l],V=X.length>0,ue={padding:B,boundary:X.filter(Lb),altBoundary:V},{refs:Q,floatingStyles:K,placement:ce,isPositioned:ge,middlewareData:de}=bb({strategy:"fixed",placement:Y,whileElementsMounted:(...Pr)=>ob(...Pr,{animationFrame:f==="always"}),elements:{reference:T.anchor},middleware:[xb({mainAxis:i+G,alignmentAxis:s}),u&&Eb({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?vb():void 0,...ue}),u&&Tb({...ue}),wb({...ue,apply:({elements:Pr,rects:rn,availableWidth:_n,availableHeight:Nn})=>{const{width:nn,height:an}=rn.reference,jt=Pr.floating.style;jt.setProperty("--radix-popper-available-width",`${_n}px`),jt.setProperty("--radix-popper-available-height",`${Nn}px`),jt.setProperty("--radix-popper-anchor-width",`${nn}px`),jt.setProperty("--radix-popper-anchor-height",`${an}px`)}}),R&&Sb({element:R,padding:o}),Db({arrowWidth:F,arrowHeight:G}),d&&kb({strategy:"referenceHidden",...ue})]}),[Ie,P]=qm(ce),Fe=Pa(g);Wr(()=>{ge&&(Fe==null||Fe())},[ge,Fe]);const He=(xt=de.arrow)==null?void 0:xt.x,L=(it=de.arrow)==null?void 0:it.y,lt=((At=de.arrow)==null?void 0:At.centerOffset)!==0,[ft,je]=U.useState();return Wr(()=>{x&&je(window.getComputedStyle(x).zIndex)},[x]),D.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:ge?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ft,"--radix-popper-transform-origin":[(Ct=de.transformOrigin)==null?void 0:Ct.x,(Rr=de.transformOrigin)==null?void 0:Rr.y].join(" "),...((ei=de.hide)==null?void 0:ei.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:D.jsx(Ib,{scope:r,placedSide:Ie,onArrowChange:O,arrowX:He,arrowY:L,shouldHideArrow:lt,children:D.jsx(cr.div,{"data-side":Ie,"data-align":P,...y,ref:k,style:{...y.style,animation:ge?void 0:"none"}})})})});Hm.displayName=f0;var zm="PopperArrow",Pb={top:"bottom",right:"left",bottom:"top",left:"right"},Um=U.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Rb(zm,n),s=Pb[a.placedSide];return D.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:D.jsx(Cb,{...i,ref:r,style:{...i.style,display:"block"}})})});Um.displayName=zm;function Lb(e){return e!==null}var Db=e=>({name:"transformOrigin",options:e,fn(t){var T,x,v;const{placement:r,rects:n,middlewareData:i}=t,s=((T=i.arrow)==null?void 0:T.centerOffset)!==0,o=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,h]=qm(r),c={start:"0%",center:"50%",end:"100%"}[h],d=(((x=i.arrow)==null?void 0:x.x)??0)+o/2,f=(((v=i.arrow)==null?void 0:v.y)??0)+u/2;let g="",y="";return l==="bottom"?(g=s?c:`${d}px`,y=`${-u}px`):l==="top"?(g=s?c:`${d}px`,y=`${n.floating.height+u}px`):l==="right"?(g=`${-u}px`,y=s?c:`${f}px`):l==="left"&&(g=`${n.floating.width+u}px`,y=s?c:`${f}px`),{data:{x:g,y}}}});function qm(e){const[t,r="center"]=e.split("-");return[t,r]}var Mb=Om,$m=Fm,jm=Hm,Gm=Um;function Ob(e,t){return U.useReducer((r,n)=>t[r][n]??r,e)}var go=e=>{const{present:t,children:r}=e,n=Bb(t),i=typeof r=="function"?r({present:n.isPresent}):U.Children.only(r),a=Jr(n.ref,Fb(i));return typeof r=="function"||n.isPresent?U.cloneElement(i,{ref:a}):null};go.displayName="Presence";function Bb(e){const[t,r]=U.useState(),n=U.useRef(null),i=U.useRef(e),a=U.useRef("none"),s=e?"mounted":"unmounted",[o,u]=Ob(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return U.useEffect(()=>{const l=Xa(n.current);a.current=o==="mounted"?l:"none"},[o]),Wr(()=>{const l=n.current,h=i.current;if(h!==e){const d=a.current,f=Xa(l);e?u("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(h&&d!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Wr(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,c=f=>{const y=Xa(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&y&&(u("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",l=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},d=f=>{f.target===t&&(a.current=Xa(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{h.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:U.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Xa(e){return(e==null?void 0:e.animationName)||"none"}function Fb(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hb=U[" useInsertionEffect ".trim().toString()]||Wr;function Ps({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=zb({defaultProp:t,onChange:r}),o=e!==void 0,u=o?e:i;{const h=U.useRef(e!==void 0);U.useEffect(()=>{const c=h.current;c!==o&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,n])}const l=U.useCallback(h=>{var c;if(o){const d=Ub(h)?h(e):h;d!==e&&((c=s.current)==null||c.call(s,d))}else a(h)},[o,e,a,s]);return[u,l]}function zb({defaultProp:e,onChange:t}){const[r,n]=U.useState(e),i=U.useRef(r),a=U.useRef(t);return Hb(()=>{a.current=t},[t]),U.useEffect(()=>{var s;i.current!==r&&((s=a.current)==null||s.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Ub(e){return typeof e=="function"}var Vm=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qb="VisuallyHidden",Wm=U.forwardRef((e,t)=>D.jsx(cr.span,{...e,ref:t,style:{...Vm,...e.style}}));Wm.displayName=qb;var $b=Wm,[bo,NL]=co("Tooltip",[d0]),m0=d0(),jb="TooltipProvider",sh="tooltip.open",[IL,Ym]=bo(jb),Xm="Tooltip",[RL,yo]=bo(Xm),al="TooltipTrigger",Gb=U.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=yo(al,r),a=Ym(al,r),s=m0(r),o=U.useRef(null),u=Jr(t,o,i.onTriggerChange),l=U.useRef(!1),h=U.useRef(!1),c=U.useCallback(()=>l.current=!1,[]);return U.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),D.jsx($m,{asChild:!0,...s,children:D.jsx(cr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:u,onPointerMove:ir(e.onPointerMove,d=>{d.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:ir(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:ir(e.onPointerDown,()=>{i.open&&i.onClose(),l.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:ir(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:ir(e.onBlur,i.onClose),onClick:ir(e.onClick,i.onClose)})})});Gb.displayName=al;var Vb="TooltipPortal",[PL,Wb]=bo(Vb,{forceMount:void 0}),yi="TooltipContent",Qm=U.forwardRef((e,t)=>{const r=Wb(yi,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,s=yo(yi,e.__scopeTooltip);return D.jsx(go,{present:n||s.open,children:s.disableHoverableContent?D.jsx(Km,{side:i,...a,ref:t}):D.jsx(Yb,{side:i,...a,ref:t})})}),Yb=U.forwardRef((e,t)=>{const r=yo(yi,e.__scopeTooltip),n=Ym(yi,e.__scopeTooltip),i=U.useRef(null),a=Jr(t,i),[s,o]=U.useState(null),{trigger:u,onClose:l}=r,h=i.current,{onPointerInTransitChange:c}=n,d=U.useCallback(()=>{o(null),c(!1)},[c]),f=U.useCallback((g,y)=>{const T=g.currentTarget,x={x:g.clientX,y:g.clientY},v=Jb(x,T.getBoundingClientRect()),k=e5(x,v),R=t5(y.getBoundingClientRect()),O=n5([...k,...R]);o(O),c(!0)},[c]);return U.useEffect(()=>()=>d(),[d]),U.useEffect(()=>{if(u&&h){const g=T=>f(T,h),y=T=>f(T,u);return u.addEventListener("pointerleave",g),h.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",g),h.removeEventListener("pointerleave",y)}}},[u,h,f,d]),U.useEffect(()=>{if(s){const g=y=>{const T=y.target,x={x:y.clientX,y:y.clientY},v=(u==null?void 0:u.contains(T))||(h==null?void 0:h.contains(T)),k=!r5(x,s);v?d():k&&(d(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,h,s,l,d]),D.jsx(Km,{...e,ref:a})}),[Xb,Qb]=bo(Xm,{isInside:!1}),Kb=t6("TooltipContent"),Km=U.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...o}=e,u=yo(yi,r),l=m0(r),{onClose:h}=u;return U.useEffect(()=>(document.addEventListener(sh,h),()=>document.removeEventListener(sh,h)),[h]),U.useEffect(()=>{if(u.trigger){const c=d=>{const f=d.target;f!=null&&f.contains(u.trigger)&&h()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[u.trigger,h]),D.jsx(i0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:h,children:D.jsxs(jm,{"data-state":u.stateAttribute,...l,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[D.jsx(Kb,{children:n}),D.jsx(Xb,{scope:r,isInside:!0,children:D.jsx($b,{id:u.contentId,role:"tooltip",children:i||n})})]})})});Qm.displayName=yi;var Zm="TooltipArrow",Zb=U.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=m0(r);return Qb(Zm,r).isInside?null:D.jsx(Gm,{...i,...n,ref:t})});Zb.displayName=Zm;function Jb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function e5(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function t5(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function r5(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const o=t[a],u=t[s],l=o.x,h=o.y,c=u.x,d=u.y;h>n!=d>n&&r<(c-l)*(n-h)/(d-h)+l&&(i=!i)}return i}function n5(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),i5(t)}function i5(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Jm=Qm;const a5=U.forwardRef(({className:e,sideOffset:t=4,...r},n)=>D.jsx(Jm,{ref:n,sideOffset:t,className:dt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r}));a5.displayName=Jm.displayName;function oh(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function p0(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const s5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u5={};function uh(e,t){return(u5.jsx?o5:s5).test(e)}const l5=/[ \t\n\f\r]/g;function xo(e){return typeof e=="object"?e.type==="text"?lh(e.value):!1:lh(e)}function lh(e){return e.replace(l5,"")===""}let Da=class{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}};Da.prototype.normal={};Da.prototype.property={};Da.prototype.space=void 0;function e1(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Da(r,n,t)}function xa(e){return e.toLowerCase()}let Pt=class{constructor(t,r){this.attribute=r,this.property=t}};Pt.prototype.attribute="";Pt.prototype.booleanish=!1;Pt.prototype.boolean=!1;Pt.prototype.commaOrSpaceSeparated=!1;Pt.prototype.commaSeparated=!1;Pt.prototype.defined=!1;Pt.prototype.mustUseProperty=!1;Pt.prototype.number=!1;Pt.prototype.overloadedBoolean=!1;Pt.prototype.property="";Pt.prototype.spaceSeparated=!1;Pt.prototype.space=void 0;let c5=0;const Ee=Wn(),Qe=Wn(),sl=Wn(),ne=Wn(),Me=Wn(),di=Wn(),Mt=Wn();function Wn(){return 2**++c5}const ol=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:Qe,commaOrSpaceSeparated:Mt,commaSeparated:di,number:ne,overloadedBoolean:sl,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),eu=Object.keys(ol);let g0=class extends Pt{constructor(t,r,n,i){let a=-1;if(super(t,r),ch(this,"space",i),typeof n=="number")for(;++a<eu.length;){const s=eu[a];ch(this,eu[a],(n&ol[s])===ol[s])}}};g0.prototype.defined=!0;function ch(e,t,r){r&&(e[t]=r)}function Ci(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new g0(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[xa(n)]=n,r[xa(a.attribute)]=n}return new Da(t,r,e.space)}const t1=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:Me,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:ne,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:Me,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:Qe,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function r1(e,t){return t in e?e[t]:t}function n1(e,t){return r1(e,t.toLowerCase())}const h5=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:di,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Me,autoFocus:Ee,autoPlay:Ee,blocking:Me,capture:null,charSet:null,checked:Ee,cite:null,className:Me,cols:ne,colSpan:null,content:null,contentEditable:Qe,controls:Ee,controlsList:Me,coords:ne|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:sl,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Me,height:ne,hidden:sl,high:ne,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Me,itemRef:Me,itemScope:Ee,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:ne,pattern:null,ping:Me,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Me,required:Ee,reversed:Ee,rows:ne,rowSpan:ne,sandbox:Me,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:Qe,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:n1}),d5=Ci({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Mt,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:di,g2:di,glyphName:di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r1}),i1=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),a1=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:n1}),s1=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),f5={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},m5=/[A-Z]/g,hh=/-[a-z]/g,p5=/^data[-\w.:]+$/i;function Eo(e,t){const r=xa(t);let n=t,i=Pt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&p5.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(hh,b5);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!hh.test(a)){let s=a.replace(m5,g5);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=g0}return new i(n,t)}function g5(e){return"-"+e.toLowerCase()}function b5(e){return e.charAt(1).toUpperCase()}const Ma=e1([t1,h5,i1,a1,s1],"html"),Sn=e1([t1,d5,i1,a1,s1],"svg");function dh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function b0(e){return e.join(" ").trim()}var qi={},tu,fh;function y5(){if(fh)return tu;fh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
@@ -508,7 +508,7 @@ ${e}</tr>
|
|
|
508
508
|
`+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):n+=h;continue}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,r=this.renderer){var i,a;let n="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=l||"";continue}}let u=o;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},ys,ra=(ys=class{constructor(t){q(this,"options");q(this,"block");this.options=t||Zn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Wt.lex:Wt.lexInline}provideParser(){return this.block?ar.parse:ar.parseInline}},q(ys,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),q(ys,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ys),uP=class{constructor(...e){q(this,"defaults",vc());q(this,"options",this.setOptions);q(this,"parse",this.parseMarkdown(!0));q(this,"parseInline",this.parseMarkdown(!1));q(this,"Parser",ar);q(this,"Renderer",oo);q(this,"TextRenderer",Nc);q(this,"Lexer",Wt);q(this,"Tokenizer",so);q(this,"Hooks",ra);this.use(...e)}walkTokens(e,t){var n,i;let r=[];for(let a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)r=r.concat(this.walkTokens(o.tokens,t));for(let o of s.rows)for(let u of o)r=r.concat(this.walkTokens(u.tokens,t));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,t));break}default:{let s=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let u=s[o].flat(1/0);r=r.concat(this.walkTokens(u,t))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new oo(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=r.renderer[s],u=i[s];i[s]=(...l)=>{let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new so(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=r.tokenizer[s],u=i[s];i[s]=(...l)=>{let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new ra;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=r.hooks[s],u=i[s];ra.passThroughHooks.has(a)?i[s]=l=>{if(this.defaults.async&&ra.passThroughHooksRespectAsync.has(a))return(async()=>{let c=await o.call(i,l);return u.call(i,c)})();let h=o.call(i,l);return u.call(i,h)}:i[s]=(...l)=>{if(this.defaults.async)return(async()=>{let c=await o.apply(i,l);return c===!1&&(c=await u.apply(i,l)),c})();let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Wt.lex(e,t??this.defaults)}parser(e,t){return ar.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(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 t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?Wt.lex:Wt.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?ar.parse:ar.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?Wt.lex:Wt.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?ar.parse:ar.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=`
|
|
509
509
|
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+mr(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Vn=new uP;function Re(e,t){return Vn.parse(e,t)}Re.options=Re.setOptions=function(e){return Vn.setOptions(e),Re.defaults=Vn.defaults,g4(Re.defaults),Re};Re.getDefaults=vc;Re.defaults=Zn;Re.use=function(...e){return Vn.use(...e),Re.defaults=Vn.defaults,g4(Re.defaults),Re};Re.walkTokens=function(e,t){return Vn.walkTokens(e,t)};Re.parseInline=Vn.parseInline;Re.Parser=ar;Re.parser=ar.parse;Re.Renderer=oo;Re.TextRenderer=Nc;Re.Lexer=Wt;Re.lexer=Wt.lex;Re.Tokenizer=so;Re.Hooks=ra;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;ar.parse;Wt.lex;var Se=(...e)=>am.twMerge(t0(e)),Ic=(e,t,r)=>{let n=typeof t=="string"?new Blob([t],{type:r}):t,i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Rc=j.createContext({code:""});function lP(e,t=200,r=50){let[n,i]=j.useState(e),a=j.useRef(0),s=j.useRef(null);return j.useEffect(()=>{let o=Date.now(),u=o-a.current;return s.current&&window.clearTimeout(s.current),u>=t?(i(e),a.current=o):s.current=window.setTimeout(()=>{i(e),a.current=Date.now()},r),()=>{s.current&&window.clearTimeout(s.current)}},[e,t,r]),n}var cP=e=>e<50?{minHighlightInterval:100,debounceMs:500}:e<150?{minHighlightInterval:500,debounceMs:800}:e<300?{minHighlightInterval:1500,debounceMs:1200}:{minHighlightInterval:Number.POSITIVE_INFINITY,debounceMs:1500},hP=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),dP=e=>{let t=e.lastIndexOf(`
|
|
510
510
|
`),r=t>=0?e.slice(0,t+1):"",n=t>=0?e.slice(t+1):e;return[r,n]},fP=e=>e?[{pre(t){return this.addClassToHast(t,e),t}}]:[],mP=class{constructor(){this.lightHighlighter=null,this.darkHighlighter=null,this.lightTheme=null,this.darkTheme=null,this.loadedLanguages=new Set,this.initializationPromise=null,this.loadLanguagePromise=null,this.cache=new Map,this.cacheKeys=[],this.MAX_CACHE_SIZE=50,this.highlightQueue=new Map}isLanguageSupported(e){return Object.hasOwn(j2,e)}getFallbackLanguage(){return"text"}getCacheKey(e,t,r){return`${t}::${r||""}::${e}`}addToCache(e,t){if(this.cache.size>=this.MAX_CACHE_SIZE){let r=this.cacheKeys.shift();r&&this.cache.delete(r)}this.cache.set(e,t),this.cacheKeys.push(e)}needsHighlightersInitialization(e){let[t,r]=e,n=!this.lightHighlighter||this.lightTheme!==t,i=!this.darkHighlighter||this.darkTheme!==r;return[n,i]}async ensureHighlightersInitialized(e,t){let[r,n]=t,[i,a]=e,s=SR({forgiving:!0});this.loadedLanguages.clear(),this.cache.clear(),this.cacheKeys=[],this.highlightQueue.clear(),r&&(this.lightHighlighter=await Af({themes:[i],langs:[],engine:s}),this.lightTheme=i),n&&(this.darkHighlighter=await Af({themes:[a],langs:[],engine:s}),this.darkTheme=a)}async loadLanguage(e){var t,r;await((t=this.darkHighlighter)==null?void 0:t.loadLanguage(e)),await((r=this.lightHighlighter)==null?void 0:r.loadLanguage(e)),this.loadedLanguages.add(e)}async initializeHighlighters(e){this.initializationPromise&&await this.initializationPromise;let t=this.needsHighlightersInitialization(e),[r,n]=t;(r||n)&&(this.initializationPromise=this.ensureHighlightersInitialized(e,t),await this.initializationPromise,this.initializationPromise=null)}performHighlights(e,t,r){let n=this.isLanguageSupported(t)?t:this.getFallbackLanguage();if(this.lightHighlighter===null||this.darkHighlighter===null||this.lightTheme===null||this.darkTheme===null)throw new Error("highlightCode must be called after initializeHighlighters.");let i=fP(r),a=this.lightHighlighter.codeToHtml(e,{lang:n,theme:this.lightTheme,transformers:i}),s=this.darkHighlighter.codeToHtml(e,{lang:n,theme:this.darkTheme,transformers:i});return[a,s]}async highlightCode(e,t,r,n){let i=this.getCacheKey(e,t,r),a=this.cache.get(i);if(a)return this.cacheKeys=this.cacheKeys.filter(l=>l!==i),this.cacheKeys.push(i),a;let s=this.highlightQueue.get(i);if(s)return s;let o=()=>{if(n!=null&&n.aborted)throw new DOMException("Aborted","AbortError")},u=(async()=>{try{await new Promise(h=>setTimeout(h,0)),o(),this.initializationPromise&&await this.initializationPromise,o(),this.loadLanguagePromise&&await this.loadLanguagePromise,o(),!this.loadedLanguages.has(t)&&this.isLanguageSupported(t)&&(this.loadLanguagePromise=this.loadLanguage(t),await this.loadLanguagePromise,this.loadLanguagePromise=null),o();let l=this.performHighlights(e,t,r);return this.addToCache(i,l),l}finally{this.highlightQueue.delete(i)}})();return this.highlightQueue.set(i,u),u}},Zu=new mP,pP=({code:e,language:t,className:r,children:n,preClassName:i,...a})=>{let[s,o]=j.useState(""),[u,l]=j.useState(""),[h,c]=j.useState(""),[d,f]=j.useState(""),g=lP(e),y=j.useRef(0),T=j.useRef(!1),x=j.useRef(null),v=j.useRef(0),[k,R]=j.useContext(r3);j.useEffect(()=>{Zu.initializeHighlighters([k,R])},[k,R]),j.useEffect(()=>{T.current=!0,x.current&&x.current.abort(),x.current=new AbortController;let I=x.current.signal;y.current&&clearTimeout(y.current);let[F,G]=dP(g),Y=g.split(`
|
|
511
|
-
`).length,{minHighlightInterval:B,debounceMs:X}=cP(Y);if(F&&F!==h){let V=Date.now();V-v.current>B||!G?(v.current=V,Zu.highlightCode(F,t,i,I).then(([ue,Q])=>{T.current&&!I.aborted&&j.startTransition(()=>{o(ue),l(Q),c(F),f(G)})}).catch(ue=>{if(ue.name!=="AbortError")throw ue})):f(G)}else f(G);return y.current=window.setTimeout(()=>{G&&g!==h&&!I.aborted&&Zu.highlightCode(g,t,i,I).then(([V,ue])=>{T.current&&!I.aborted&&j.startTransition(()=>{o(V),l(ue),c(g),f("")})}).catch(V=>{if(V.name!=="AbortError")throw V})},X),()=>{var V;T.current=!1,(V=x.current)==null||V.abort()}},[g,t,i]);let O=d?`<span class="line"><span>${hP(d)}</span></span>`:"";return D.jsx(Rc.Provider,{value:{code:e},children:D.jsxs("div",{className:"my-4 w-full overflow-hidden rounded-xl border border-border","data-code-block-container":!0,"data-language":t,children:[D.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-code-block-header":!0,"data-language":t,children:[D.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),D.jsx("div",{className:"flex items-center gap-2",children:n})]}),D.jsx("div",{className:"w-full",children:D.jsxs("div",{className:"min-w-full",children:[D.jsx("div",{className:Se("overflow-x-auto dark:hidden",r),dangerouslySetInnerHTML:{__html:O?s+O:s},"data-code-block":!0,"data-language":t,...a}),D.jsx("div",{className:Se("hidden overflow-x-auto dark:block",r),dangerouslySetInnerHTML:{__html:O?u+O:u},"data-code-block":!0,"data-language":t,...a})]})})]})})},Jf={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},em=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let{code:o}=j.useContext(Rc),{isAnimating:u}=j.useContext(Hi),l=a??o,h=`file.${r&&r in Jf?Jf[r]:"txt"}`,c="text/plain",d=()=>{try{Ic(h,l,c),e==null||e()}catch(f){t==null||t(f)}};return D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"Download file",type:"button",...s,children:n??D.jsx(qt.DownloadIcon,{size:14})})},tm=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let[o,u]=j.useState(!1),l=j.useRef(0),{code:h}=j.useContext(Rc),{isAnimating:c}=j.useContext(Hi),d=a??h,f=async()=>{var y;if(typeof window>"u"||!((y=navigator==null?void 0:navigator.clipboard)!=null&&y.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(d),u(!0),e==null||e(),l.current=window.setTimeout(()=>u(!1),r))}catch(T){t==null||t(T)}};j.useEffect(()=>()=>{window.clearTimeout(l.current)},[]);let g=o?qt.CheckIcon:qt.CopyIcon;return D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:c,onClick:f,type:"button",...s,children:n??D.jsx(g,{size:14})})},gP=/\.[^/.]+$/,bP=({node:e,className:t,src:r,alt:n,...i})=>{let a=async()=>{if(r)try{let s=await(await fetch(r)).blob(),o=new URL(r,window.location.origin).pathname.split("/").pop()||"",u=o.split(".").pop(),l=o.includes(".")&&u!==void 0&&u.length<=4,h="";if(l)h=o;else{let c=s.type,d="png";c.includes("jpeg")||c.includes("jpg")?d="jpg":c.includes("png")?d="png":c.includes("svg")?d="svg":c.includes("gif")?d="gif":c.includes("webp")&&(d="webp"),h=`${(n||o||"image").replace(gP,"")}.${d}`}Ic(h,s,s.type)}catch(s){console.error("Failed to download image:",s)}};return r?D.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[D.jsx("img",{alt:n,className:Se("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...i}),D.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),D.jsx("button",{className:Se("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:D.jsx(qt.DownloadIcon,{size:14})})]}):null},ga=0,yP=()=>{ga+=1,ga===1&&(document.body.style.overflow="hidden")},xP=()=>{ga=Math.max(0,ga-1),ga===0&&(document.body.style.overflow="")},EP=async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},r=(await Promise.resolve().then(()=>require("./mermaid.core-DY8gIrXk.cjs")).then(n=>n.mermaid_core)).default;return r.initialize(t),r},vP=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let[s,o]=j.useState(!1),{isAnimating:u}=j.useContext(Hi),l=()=>{o(!s)};return j.useEffect(()=>{if(s){yP();let h=c=>{c.key==="Escape"&&o(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),xP()}}},[s]),j.useEffect(()=>{s?r==null||r():n&&n()},[s,r,n]),D.jsxs(D.Fragment,{children:[D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:l,title:"View fullscreen",type:"button",...a,children:D.jsx(qt.Maximize2Icon,{size:14})}),s&&D.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:l,onKeyDown:h=>{h.key==="Escape"&&l()},role:"button",tabIndex:0,children:[D.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:l,title:"Exit fullscreen",type:"button",children:D.jsx(qt.XIcon,{size:20})}),D.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:D.jsx("div",{className:"max-h-full max-w-full",children:D.jsx(C4,{chart:e,className:"[&>div]:my-0 [&_svg]:h-auto [&_svg]:min-h-[60vh] [&_svg]:w-auto [&_svg]:min-w-[60vw]",config:t})})})]})]})},C4=({chart:e,className:t,config:r})=>{let[n,i]=j.useState(null),[a,s]=j.useState(!0),[o,u]=j.useState(""),[l,h]=j.useState("");if(j.useEffect(()=>{(async()=>{try{i(null),s(!0);let d=await EP(r),f=e.split("").reduce((T,x)=>(T<<5)-T+x.charCodeAt(0)|0,0),g=`mermaid-${Math.abs(f)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:y}=await d.render(g,e);u(y),h(y)}catch(d){if(!(l||o)){let f=d instanceof Error?d.message:"Failed to render Mermaid chart";i(f)}}finally{s(!1)}})()},[e,r]),a&&!o&&!l)return D.jsx("div",{className:Se("my-4 flex justify-center p-4",t),children:D.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[D.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),D.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(n&&!o&&!l)return D.jsxs("div",{className:Se("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[D.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",n]}),D.jsxs("details",{className:"mt-2",children:[D.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),D.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let c=o||l;return D.jsx("div",{"aria-label":"Mermaid chart",className:Se("my-4 flex justify-center",t),dangerouslySetInnerHTML:{__html:c},role:"img"})};function _4(e){var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)n.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],l=o.querySelectorAll("td");for(let h of l)u.push(((r=h.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}}function N4(e){let{headers:t,rows:r}=e,n=a=>a.includes(",")||a.includes('"')||a.includes(`
|
|
511
|
+
`).length,{minHighlightInterval:B,debounceMs:X}=cP(Y);if(F&&F!==h){let V=Date.now();V-v.current>B||!G?(v.current=V,Zu.highlightCode(F,t,i,I).then(([ue,Q])=>{T.current&&!I.aborted&&j.startTransition(()=>{o(ue),l(Q),c(F),f(G)})}).catch(ue=>{if(ue.name!=="AbortError")throw ue})):f(G)}else f(G);return y.current=window.setTimeout(()=>{G&&g!==h&&!I.aborted&&Zu.highlightCode(g,t,i,I).then(([V,ue])=>{T.current&&!I.aborted&&j.startTransition(()=>{o(V),l(ue),c(g),f("")})}).catch(V=>{if(V.name!=="AbortError")throw V})},X),()=>{var V;T.current=!1,(V=x.current)==null||V.abort()}},[g,t,i]);let O=d?`<span class="line"><span>${hP(d)}</span></span>`:"";return D.jsx(Rc.Provider,{value:{code:e},children:D.jsxs("div",{className:"my-4 w-full overflow-hidden rounded-xl border border-border","data-code-block-container":!0,"data-language":t,children:[D.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-code-block-header":!0,"data-language":t,children:[D.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),D.jsx("div",{className:"flex items-center gap-2",children:n})]}),D.jsx("div",{className:"w-full",children:D.jsxs("div",{className:"min-w-full",children:[D.jsx("div",{className:Se("overflow-x-auto dark:hidden",r),dangerouslySetInnerHTML:{__html:O?s+O:s},"data-code-block":!0,"data-language":t,...a}),D.jsx("div",{className:Se("hidden overflow-x-auto dark:block",r),dangerouslySetInnerHTML:{__html:O?u+O:u},"data-code-block":!0,"data-language":t,...a})]})})]})})},Jf={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},em=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let{code:o}=j.useContext(Rc),{isAnimating:u}=j.useContext(Hi),l=a??o,h=`file.${r&&r in Jf?Jf[r]:"txt"}`,c="text/plain",d=()=>{try{Ic(h,l,c),e==null||e()}catch(f){t==null||t(f)}};return D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"Download file",type:"button",...s,children:n??D.jsx(qt.DownloadIcon,{size:14})})},tm=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let[o,u]=j.useState(!1),l=j.useRef(0),{code:h}=j.useContext(Rc),{isAnimating:c}=j.useContext(Hi),d=a??h,f=async()=>{var y;if(typeof window>"u"||!((y=navigator==null?void 0:navigator.clipboard)!=null&&y.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(d),u(!0),e==null||e(),l.current=window.setTimeout(()=>u(!1),r))}catch(T){t==null||t(T)}};j.useEffect(()=>()=>{window.clearTimeout(l.current)},[]);let g=o?qt.CheckIcon:qt.CopyIcon;return D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:c,onClick:f,type:"button",...s,children:n??D.jsx(g,{size:14})})},gP=/\.[^/.]+$/,bP=({node:e,className:t,src:r,alt:n,...i})=>{let a=async()=>{if(r)try{let s=await(await fetch(r)).blob(),o=new URL(r,window.location.origin).pathname.split("/").pop()||"",u=o.split(".").pop(),l=o.includes(".")&&u!==void 0&&u.length<=4,h="";if(l)h=o;else{let c=s.type,d="png";c.includes("jpeg")||c.includes("jpg")?d="jpg":c.includes("png")?d="png":c.includes("svg")?d="svg":c.includes("gif")?d="gif":c.includes("webp")&&(d="webp"),h=`${(n||o||"image").replace(gP,"")}.${d}`}Ic(h,s,s.type)}catch(s){console.error("Failed to download image:",s)}};return r?D.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[D.jsx("img",{alt:n,className:Se("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...i}),D.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),D.jsx("button",{className:Se("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:D.jsx(qt.DownloadIcon,{size:14})})]}):null},ga=0,yP=()=>{ga+=1,ga===1&&(document.body.style.overflow="hidden")},xP=()=>{ga=Math.max(0,ga-1),ga===0&&(document.body.style.overflow="")},EP=async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},r=(await Promise.resolve().then(()=>require("./mermaid.core-Cop_RRH4.cjs")).then(n=>n.mermaid_core)).default;return r.initialize(t),r},vP=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let[s,o]=j.useState(!1),{isAnimating:u}=j.useContext(Hi),l=()=>{o(!s)};return j.useEffect(()=>{if(s){yP();let h=c=>{c.key==="Escape"&&o(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),xP()}}},[s]),j.useEffect(()=>{s?r==null||r():n&&n()},[s,r,n]),D.jsxs(D.Fragment,{children:[D.jsx("button",{className:Se("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:l,title:"View fullscreen",type:"button",...a,children:D.jsx(qt.Maximize2Icon,{size:14})}),s&&D.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:l,onKeyDown:h=>{h.key==="Escape"&&l()},role:"button",tabIndex:0,children:[D.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:l,title:"Exit fullscreen",type:"button",children:D.jsx(qt.XIcon,{size:20})}),D.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:D.jsx("div",{className:"max-h-full max-w-full",children:D.jsx(C4,{chart:e,className:"[&>div]:my-0 [&_svg]:h-auto [&_svg]:min-h-[60vh] [&_svg]:w-auto [&_svg]:min-w-[60vw]",config:t})})})]})]})},C4=({chart:e,className:t,config:r})=>{let[n,i]=j.useState(null),[a,s]=j.useState(!0),[o,u]=j.useState(""),[l,h]=j.useState("");if(j.useEffect(()=>{(async()=>{try{i(null),s(!0);let d=await EP(r),f=e.split("").reduce((T,x)=>(T<<5)-T+x.charCodeAt(0)|0,0),g=`mermaid-${Math.abs(f)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:y}=await d.render(g,e);u(y),h(y)}catch(d){if(!(l||o)){let f=d instanceof Error?d.message:"Failed to render Mermaid chart";i(f)}}finally{s(!1)}})()},[e,r]),a&&!o&&!l)return D.jsx("div",{className:Se("my-4 flex justify-center p-4",t),children:D.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[D.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),D.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(n&&!o&&!l)return D.jsxs("div",{className:Se("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[D.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",n]}),D.jsxs("details",{className:"mt-2",children:[D.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),D.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let c=o||l;return D.jsx("div",{"aria-label":"Mermaid chart",className:Se("my-4 flex justify-center",t),dangerouslySetInnerHTML:{__html:c},role:"img"})};function _4(e){var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)n.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],l=o.querySelectorAll("td");for(let h of l)u.push(((r=h.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}}function N4(e){let{headers:t,rows:r}=e,n=a=>a.includes(",")||a.includes('"')||a.includes(`
|
|
512
512
|
`)?`"${a.replace(/"/g,'""')}"`:a,i=[];t.length>0&&i.push(t.map(n).join(","));for(let a of r)i.push(a.map(n).join(","));return i.join(`
|
|
513
513
|
`)}function TP(e){let{headers:t,rows:r}=e,n=a=>a.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),i=[];t.length>0&&i.push(t.map(n).join(" "));for(let a of r)i.push(a.map(n).join(" "));return i.join(`
|
|
514
514
|
`)}function wP(e){let{headers:t,rows:r}=e;if(t.length===0)return"";let n=[],i=t.map(a=>a.replace(/\|/g,"\\|"));n.push(`| ${i.join(" | ")} |`),n.push(`| ${t.map(()=>"---").join(" | ")} |`);for(let a of r){let s=[...a];for(;s.length<t.length;)s.push("");let o=s.map(u=>u.replace(/\|/g,"\\|"));n.push(`| ${o.join(" | ")} |`)}return n.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { g as ye, am as xe, al as ve, A as Ne, L as Z, aq as we, aG as Se, aH as De, d as be, as as Oe, aI as Le, aJ as Ie, aK as T, aL as Ce, ax as ee } from "./index-
|
|
2
|
+
import { g as ye, am as xe, al as ve, A as Ne, L as Z, aq as we, aG as Se, aH as De, d as be, as as Oe, aI as Le, aJ as Ie, aK as T, aL as Ce, ax as ee } from "./index-C_34q9jG.js";
|
|
3
3
|
import { useLanguages as z, useTranslation as ke, useSidebarActivePanel as Te, usePermissions as Ee } from "@chaibuilder/sdk";
|
|
4
4
|
import { find as Fe, get as h, isEqual as te, isEmpty as je } from "lodash-es";
|
|
5
5
|
import { useMemo as Re, useRef as ae, useState as j, useEffect as se } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./index-D_4YaLhN.cjs"),P=require("@chaibuilder/sdk"),d=require("lodash-es"),v=require("react"),a=require("@chaibuilder/sdk/ui"),L=require("sonner"),ce=require("@tanstack/react-query"),K=require("lucide-react"),M=require("./get-seo-defaults-Cw7vFt-B.cjs"),de=()=>{const{selectedLang:t}=P.useLanguages(),{data:x,isFetching:u}=i.useLanguagePages();return{data:v.useMemo(()=>d.find(x,{lang:t||""})||{},[x,t]),isFetching:u}},ue=()=>{var p;const x=(p=document.getElementById("canvas-iframe").contentDocument)==null?void 0:p.body.innerHTML;if(!x)return null;const c=new DOMParser().parseFromString(x,"text/html");c.querySelectorAll("style, script, link, svg, [data-block-type='PartialBlock']").forEach(g=>g.remove()),c.querySelectorAll("*").forEach(g=>{Array.from(g.attributes).forEach(m=>g.removeAttribute(m.name))});const r=c.querySelectorAll("h1, h2, h3, h4, h5, h6, p");return Array.from(r).map(g=>`<${g.tagName.toLowerCase()}>${g.innerHTML}</${g.tagName.toLowerCase()}>`).join(" ").replace(/<p>Partial block. Double click to edit.<\/p>/,"")},F=({keyword:t,onComplete:x,field:u})=>{const c=i.useFetch(),r=i.useApiUrl(),{selectedLang:N,fallbackLang:p}=P.useLanguages(),{mutate:g,isPending:m}=ce.useMutation({mutationFn:async()=>{const D=ue();return await c(r,{action:i.ACTIONS.GENERATE_SEO_FIELD,data:{pageContext:"",dynamic:!1,field:u,lang:N||p,pageContent:D,keyword:t}})},onSuccess:D=>{x({fieldValue:D.field})},onError:D=>{x({fieldValue:null,error:D.message})}});return e.jsx(a.Button,{disabled:m,type:"button",className:"h-5 w-5",variant:"ghost",size:"sm",onClick:()=>g(),children:m?e.jsx(K.Loader,{className:"h-3 w-3 animate-spin text-yellow-500"}):e.jsx(K.Wand2Icon,{className:"text-yellow-500"})})},ge=({isOpen:t,onClose:x,onSave:u,onDiscard:c,isSaving:r=!1,fromLanguage:N,toLanguage:p})=>{const g=i.LANGUAGES[N]||N,m=i.LANGUAGES[p]||p;return e.jsx(a.Dialog,{open:t,onOpenChange:x,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Unsaved SEO Changes"}),e.jsxs(a.DialogDescription,{children:['You have unsaved changes in the SEO for "',g,'" version. Do you want to save these changes before switching to "',m,'" version?']})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(a.Button,{variant:"outline",onClick:c,disabled:r,children:"Discard Changes"}),e.jsx(a.Button,{onClick:u,disabled:r,children:r?"Saving...":"Save & Switch"})]})]})})},me=t=>{if(!t)return!0;try{return JSON.parse(t),!0}catch{return!1}},he=(t,x)=>{const u=t.selectionStart||0,c=t.selectionEnd||0,r=t.value,N=r.substring(0,u),p=r.substring(c),g=`{{${x}}}`,m=N+""+g+p,D=u+0+g.length;return{value:m,newCursorPos:D}},Q=()=>{const{t}=P.useTranslation(),[,x]=P.useSidebarActivePanel(),{data:u}=i.useCurrentPage(),{data:c}=i.useBuilderPageData(),{data:r,isFetching:N}=de(),p=r==null?void 0:r.seo,g=v.useRef(null),[m,D]=v.useState("seo"),R=u==null?void 0:u.id,W=u==null?void 0:u.pageType,I=i.usePageType(W),{selectedLang:$,fallbackLang:X}=P.useLanguages(),h=$||X,[H,J]=v.useState(!1),[Z,_]=v.useState(!1),[ee,V]=v.useState(!1),[S,U]=v.useState(null),[n,w]=v.useState({keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"{}",metaOther:"{}",...p}),k=v.useRef({}),{mutate:se,isPending:q}=i.useUpdatePage(),f=q||H||Z,{hasPermission:te}=P.usePermissions(),o=te(i.PAGES_PERMISSIONS.EDIT_SEO),[ae]=i.usePagesProps(),ne=d.get(ae,"features.canResetSeoToDefault",!1),z=!$||n.jsonLD!=="{}";v.useEffect(()=>{if(!N&&p&&R){const s={keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"",metaOther:"",...p};w(s),k.current[h]=s}},[N,p,h,R]),v.useEffect(()=>{const s=l=>{const{fromLang:b,toLang:A,switchHandler:y}=l.detail,G=k.current[h];(G?!d.isEqual(G,n):!1)?(U({fromLang:b,toLang:A,switchHandler:y}),V(!0)):y()};return window.addEventListener("seo-language-switch-check",s),()=>{window.removeEventListener("seo-language-switch-check",s)}},[R,n,h]);const oe=async()=>{if(!(!I||!h))try{J(!0);const s=M.getSeoDefaults(I,h),l={...n,keyword:d.get(s,"seo.keyword",""),title:d.get(s,"seo.title",""),description:d.get(s,"seo.description",""),cononicalUrl:d.get(s,"seo.canonicalUrl",""),noIndex:d.get(s,"seo.noIndex",!1),noFollow:d.get(s,"seo.noFollow",!1),ogTitle:d.get(s,"seo.ogTitle",""),ogDescription:d.get(s,"seo.ogDescription","")};w(l),L.toast.success(t("SEO fields reset to defaults"))}catch(s){L.toast.error(t("Failed to reset SEO fields")),console.error("Reset SEO error:",s)}finally{J(!1)}},le=async()=>{if(!(!I||!h))try{_(!0);const s=M.getSeoDefaults(I,h),l={...n,jsonLD:d.get(s,"seo.jsonLD","")};w(l),L.toast.success(t("JSON-LD reset to default"))}catch(s){L.toast.error(t("Failed to reset JSON-LD")),console.error("Reset JSON-LD error:",s)}finally{_(!1)}},re=async()=>{if(!(!I||!h))try{J(!0);const s=M.getSeoDefaults(I,h),l={...n,ogTitle:d.get(s,"seo.ogTitle",""),ogDescription:d.get(s,"seo.ogDescription",""),ogImage:d.get(s,"seo.ogImage",""),ogImageId:d.get(s,"seo.ogImageId",""),metaOther:d.get(s,"seo.metaOther","{}")};w(l),L.toast.success(t("Meta Tag fields reset to defaults"))}catch(s){L.toast.error(t("Failed to reset Meta Tag fields")),console.error("Reset Meta Tag error:",s)}finally{J(!1)}},Y=async()=>{se({id:r==null?void 0:r.id,seo:n,primaryPage:R},{onSuccess:()=>{console.log("SEO & JSON-LD updated successfully",n),k.current[h]=n,L.toast.success("SEO & JSON-LD updated successfully")}})},O=(s,l)=>{const b=document.getElementById(l);if(b){const{value:A,newCursorPos:y}=he(b,s);g.current={id:l,position:y},b.tagName.toLowerCase()==="input"?(b.value=A,w(C=>({...C,[b.name]:A})),b.focus(),b.setSelectionRange(y,y),[0,10,50,100,200].forEach(C=>{setTimeout(()=>{const B=document.getElementById(l);B&&(B.focus(),B.setSelectionRange(y,y))},C)})):(w(T=>({...T,[b.name]:A})),requestAnimationFrame(()=>{const T=document.getElementById(l);T&&(T.focus(),T.setSelectionRange(y,y),setTimeout(()=>{const C=document.getElementById(l);C&&(C.focus(),C.setSelectionRange(y,y))},50))}))}},j=s=>{const l={...n,[s.target.name]:s.target.name==="noIndex"||s.target.name==="noFollow"?s.target.checked:s.target.value};w(l)},E=s=>l=>{d.isEmpty(l.fieldValue)||j({target:{name:s,value:typeof l.fieldValue=="string"?l.fieldValue.replace(/^"(.*)"$/,"$1"):l.fieldValue}}),l.error&&L.toast.error(e.jsxs("div",{children:[e.jsx("h2",{children:"Failed to generate:"}),e.jsx("p",{children:l.error})]}))},ie=()=>{const s=d.get(u,"seo.jsonLD","{}");if((s==null?void 0:s.trim())==="{}"){L.toast.error("Default page JSON-LD is empty");return}j({target:{name:"jsonLD",value:s}})};return e.jsxs("div",{className:"relative flex h-full flex-col","data-panel-id":"seo",children:[!o&&e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",children:e.jsx(a.Alert,{variant:"default",className:"w-[80%] max-w-md text-xs",children:e.jsx(a.AlertDescription,{children:t("You don't have permission to edit SEO settings. Contact your administrator for access.")})})}),e.jsxs("div",{className:"no-scrollbar flex-grow overflow-y-auto px-2 pb-20",children:[e.jsxs("div",{className:"mb-4 flex w-full items-center justify-between rounded-md bg-gray-100 px-2 py-1 text-left text-sm",children:[e.jsxs("span",{children:[e.jsx("div",{className:"font-medium",children:r==null?void 0:r.name}),e.jsx("span",{className:"font-mono text-xs leading-tight text-gray-500",children:r==null?void 0:r.slug})]}),e.jsx(i.LanguageSwitcher,{variant:"outline",showAdd:!1})]}),e.jsx("form",{className:"space-y-8",children:e.jsxs(a.Tabs,{value:m,onValueChange:D,className:"w-full",children:[e.jsxs(a.TabsList,{className:"mb-4 grid w-full grid-cols-3",children:[e.jsx(a.TabsTrigger,{value:"seo",children:t("SEO")}),e.jsx(a.TabsTrigger,{value:"opengraph",children:t("Meta Tags")}),e.jsx(a.TabsTrigger,{value:"jsonld",children:t("JSON-LD")})]}),e.jsx("div",{className:m==="seo"?"":"sr-only",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"keyword",children:t("Keyword")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"keyword")})]}),e.jsx(a.Input,{type:"text",id:"keyword",name:"keyword",value:n.keyword,onChange:j,disabled:f||!o,placeholder:t("Enter keyword"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"title",children:t("SEO Title")}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("title"),field:"title"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"title")})]})]}),e.jsx(a.Input,{type:"text",id:"title",name:"title",value:n.title,onChange:j,disabled:f||!o,placeholder:t("Enter SEO title"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"description",children:t("SEO Description")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("description"),field:"description"}),o&&e.jsx(i.NestedPathSelector,{data:c??{},onSelect:s=>O(s,"description")})]})]}),e.jsx(a.Textarea,{id:"description",name:"description",rows:5,value:n.description,onChange:j,disabled:f||!o,placeholder:t("Enter SEO description"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"title",children:t("Canonical URL")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"canonicalUrl")})]}),e.jsx(a.Input,{type:"text",id:"canonicalUrl",name:"canonicalUrl",value:n.canonicalUrl,onChange:j,disabled:f||!o,placeholder:t("Enter Canonical URL"),readOnly:!o})]}),e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(a.Input,{type:"checkbox",id:"noIndex",name:"noIndex",checked:n.noIndex,onChange:j,disabled:f||!o,className:"h-4 w-4"}),e.jsx(a.Label,{className:"pb-1 text-xs",htmlFor:"noIndex",children:t("No Index")})]}),e.jsx("p",{className:"mt-0 text-[10px] font-light leading-4 text-gray-400",children:t("Check this if you don't want search engines to index this page.")})]}),e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(a.Input,{type:"checkbox",id:"noFollow",name:"noFollow",checked:n.noFollow,onChange:j,disabled:f||!o,className:"h-4 w-4"}),e.jsx(a.Label,{className:"pb-1 text-xs",htmlFor:"noIndex",children:t("No Follow")})]}),e.jsx("p",{className:"text-[10px] font-light leading-4 text-gray-400",children:t("Check this if you don't want search engines to follow links on this page.")})]})]})}),e.jsx("div",{className:m==="opengraph"?"":"sr-only",children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"mb-4 font-semibold text-slate-700",children:t("Open Graph")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogTitle",children:t("OG Title")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("ogTitle"),field:"ogTitle"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"ogTitle")})]})]}),e.jsx(a.Input,{type:"text",id:"ogTitle",name:"ogTitle",value:n.ogTitle,onChange:j,disabled:f||!o,placeholder:t("Enter OG title"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogDescription",children:t("OG Description")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("ogDescription"),field:"ogDescription"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"ogDescription")})]})]}),e.jsx(a.Textarea,{id:"ogDescription",name:"ogDescription",rows:5,value:n.ogDescription,onChange:j,disabled:f||!o,placeholder:t("Enter OG description"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogImage",children:t("OG Image")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>{w({...n,ogImage:`{{${s}}}`,ogImageId:""})}})]}),e.jsx(i.ImagePicker,{assetId:n.ogImageId,assetUrl:n.ogImage,onChange:s=>{w({...n,ogImage:s.url,ogImageId:s.id})},disabled:f||!o,placeholder:t("Select OG image"),className:"mb-2"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"metaOther",children:t("Meta Tags")}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(F,{keyword:n.keyword,onComplete:E("metaOther"),field:"metaOther"})})]}),e.jsx(i.SmartJsonInput,{id:"metaOther",value:n.metaOther,onChange:s=>{j({target:{name:"metaOther",value:s}})},placeholder:t("Enter Meta Tags JSON"),disabled:f||!o,readOnly:!o,pageData:c||{},rows:8,handleFieldInsert:O})]})]})]})})}),e.jsx("div",{className:m==="jsonld"?"":"sr-only",children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"jsonLD",children:t("JSON-LD")}),z&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(F,{keyword:n.keyword,onComplete:E("jsonLD"),field:"jsonLD"})})]}),e.jsx("div",{className:"hidden",children:JSON.stringify(c)}),e.jsx(i.SmartJsonInput,{id:"jsonLD",value:n.jsonLD,onChange:s=>{j({target:{name:"jsonLD",value:s}})},placeholder:t("Enter JSON-LD"),disabled:f||!o,readOnly:!o,pageData:c||{},rows:12,handleFieldInsert:O,hasJsonLdForSelectedLang:z,copyJsonLDFromDefaultPage:ie})]})})})]})})]}),o&&e.jsxs("div",{className:"fixed bottom-0 left-0 right-0 flex w-full flex-shrink-0 items-center justify-between border-t bg-background p-4",children:[ne?e.jsx(a.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>{m==="jsonld"?le():m==="opengraph"?re():oe()},disabled:f||!o||!I,children:t(H?"Resetting...":`Reset to ${m==="jsonld"?"Default JSON-LD":m==="opengraph"?"Default Open Graph":"Default SEO"}`)}):e.jsx("div",{}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(a.Button,{onClick:Y,disabled:!me(n==null?void 0:n.jsonLD)||(k.current[h]?d.isEqual(k.current[h],n):!1)||f||!o,children:t(q?"Saving...":"Save")}),e.jsx(a.Button,{variant:"link",className:"text-gray-500 hover:text-gray-700",onClick:()=>x("outline"),children:t("Cancel")})]})]}),e.jsx(ge,{isOpen:ee,onClose:()=>{V(!1),U(null)},onSave:async()=>{S&&(await Y(),S.switchHandler(),V(!1),U(null))},onDiscard:()=>{if(S){const s=k.current[h];s&&w(s),S.switchHandler(),V(!1),U(null)}},isSaving:q,fromLanguage:(S==null?void 0:S.fromLang)||h,toLanguage:(S==null?void 0:S.toLang)||""})]})};Q.displayName="SeoPanel";exports.default=Q;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./index-C1bimRWu.cjs"),P=require("@chaibuilder/sdk"),d=require("lodash-es"),v=require("react"),a=require("@chaibuilder/sdk/ui"),L=require("sonner"),ce=require("@tanstack/react-query"),K=require("lucide-react"),M=require("./get-seo-defaults-Cw7vFt-B.cjs"),de=()=>{const{selectedLang:t}=P.useLanguages(),{data:x,isFetching:u}=i.useLanguagePages();return{data:v.useMemo(()=>d.find(x,{lang:t||""})||{},[x,t]),isFetching:u}},ue=()=>{var p;const x=(p=document.getElementById("canvas-iframe").contentDocument)==null?void 0:p.body.innerHTML;if(!x)return null;const c=new DOMParser().parseFromString(x,"text/html");c.querySelectorAll("style, script, link, svg, [data-block-type='PartialBlock']").forEach(g=>g.remove()),c.querySelectorAll("*").forEach(g=>{Array.from(g.attributes).forEach(m=>g.removeAttribute(m.name))});const r=c.querySelectorAll("h1, h2, h3, h4, h5, h6, p");return Array.from(r).map(g=>`<${g.tagName.toLowerCase()}>${g.innerHTML}</${g.tagName.toLowerCase()}>`).join(" ").replace(/<p>Partial block. Double click to edit.<\/p>/,"")},F=({keyword:t,onComplete:x,field:u})=>{const c=i.useFetch(),r=i.useApiUrl(),{selectedLang:N,fallbackLang:p}=P.useLanguages(),{mutate:g,isPending:m}=ce.useMutation({mutationFn:async()=>{const D=ue();return await c(r,{action:i.ACTIONS.GENERATE_SEO_FIELD,data:{pageContext:"",dynamic:!1,field:u,lang:N||p,pageContent:D,keyword:t}})},onSuccess:D=>{x({fieldValue:D.field})},onError:D=>{x({fieldValue:null,error:D.message})}});return e.jsx(a.Button,{disabled:m,type:"button",className:"h-5 w-5",variant:"ghost",size:"sm",onClick:()=>g(),children:m?e.jsx(K.Loader,{className:"h-3 w-3 animate-spin text-yellow-500"}):e.jsx(K.Wand2Icon,{className:"text-yellow-500"})})},ge=({isOpen:t,onClose:x,onSave:u,onDiscard:c,isSaving:r=!1,fromLanguage:N,toLanguage:p})=>{const g=i.LANGUAGES[N]||N,m=i.LANGUAGES[p]||p;return e.jsx(a.Dialog,{open:t,onOpenChange:x,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Unsaved SEO Changes"}),e.jsxs(a.DialogDescription,{children:['You have unsaved changes in the SEO for "',g,'" version. Do you want to save these changes before switching to "',m,'" version?']})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(a.Button,{variant:"outline",onClick:c,disabled:r,children:"Discard Changes"}),e.jsx(a.Button,{onClick:u,disabled:r,children:r?"Saving...":"Save & Switch"})]})]})})},me=t=>{if(!t)return!0;try{return JSON.parse(t),!0}catch{return!1}},he=(t,x)=>{const u=t.selectionStart||0,c=t.selectionEnd||0,r=t.value,N=r.substring(0,u),p=r.substring(c),g=`{{${x}}}`,m=N+""+g+p,D=u+0+g.length;return{value:m,newCursorPos:D}},Q=()=>{const{t}=P.useTranslation(),[,x]=P.useSidebarActivePanel(),{data:u}=i.useCurrentPage(),{data:c}=i.useBuilderPageData(),{data:r,isFetching:N}=de(),p=r==null?void 0:r.seo,g=v.useRef(null),[m,D]=v.useState("seo"),R=u==null?void 0:u.id,W=u==null?void 0:u.pageType,I=i.usePageType(W),{selectedLang:$,fallbackLang:X}=P.useLanguages(),h=$||X,[H,J]=v.useState(!1),[Z,_]=v.useState(!1),[ee,V]=v.useState(!1),[S,U]=v.useState(null),[n,w]=v.useState({keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"{}",metaOther:"{}",...p}),k=v.useRef({}),{mutate:se,isPending:q}=i.useUpdatePage(),f=q||H||Z,{hasPermission:te}=P.usePermissions(),o=te(i.PAGES_PERMISSIONS.EDIT_SEO),[ae]=i.usePagesProps(),ne=d.get(ae,"features.canResetSeoToDefault",!1),z=!$||n.jsonLD!=="{}";v.useEffect(()=>{if(!N&&p&&R){const s={keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"",metaOther:"",...p};w(s),k.current[h]=s}},[N,p,h,R]),v.useEffect(()=>{const s=l=>{const{fromLang:b,toLang:A,switchHandler:y}=l.detail,G=k.current[h];(G?!d.isEqual(G,n):!1)?(U({fromLang:b,toLang:A,switchHandler:y}),V(!0)):y()};return window.addEventListener("seo-language-switch-check",s),()=>{window.removeEventListener("seo-language-switch-check",s)}},[R,n,h]);const oe=async()=>{if(!(!I||!h))try{J(!0);const s=M.getSeoDefaults(I,h),l={...n,keyword:d.get(s,"seo.keyword",""),title:d.get(s,"seo.title",""),description:d.get(s,"seo.description",""),cononicalUrl:d.get(s,"seo.canonicalUrl",""),noIndex:d.get(s,"seo.noIndex",!1),noFollow:d.get(s,"seo.noFollow",!1),ogTitle:d.get(s,"seo.ogTitle",""),ogDescription:d.get(s,"seo.ogDescription","")};w(l),L.toast.success(t("SEO fields reset to defaults"))}catch(s){L.toast.error(t("Failed to reset SEO fields")),console.error("Reset SEO error:",s)}finally{J(!1)}},le=async()=>{if(!(!I||!h))try{_(!0);const s=M.getSeoDefaults(I,h),l={...n,jsonLD:d.get(s,"seo.jsonLD","")};w(l),L.toast.success(t("JSON-LD reset to default"))}catch(s){L.toast.error(t("Failed to reset JSON-LD")),console.error("Reset JSON-LD error:",s)}finally{_(!1)}},re=async()=>{if(!(!I||!h))try{J(!0);const s=M.getSeoDefaults(I,h),l={...n,ogTitle:d.get(s,"seo.ogTitle",""),ogDescription:d.get(s,"seo.ogDescription",""),ogImage:d.get(s,"seo.ogImage",""),ogImageId:d.get(s,"seo.ogImageId",""),metaOther:d.get(s,"seo.metaOther","{}")};w(l),L.toast.success(t("Meta Tag fields reset to defaults"))}catch(s){L.toast.error(t("Failed to reset Meta Tag fields")),console.error("Reset Meta Tag error:",s)}finally{J(!1)}},Y=async()=>{se({id:r==null?void 0:r.id,seo:n,primaryPage:R},{onSuccess:()=>{console.log("SEO & JSON-LD updated successfully",n),k.current[h]=n,L.toast.success("SEO & JSON-LD updated successfully")}})},O=(s,l)=>{const b=document.getElementById(l);if(b){const{value:A,newCursorPos:y}=he(b,s);g.current={id:l,position:y},b.tagName.toLowerCase()==="input"?(b.value=A,w(C=>({...C,[b.name]:A})),b.focus(),b.setSelectionRange(y,y),[0,10,50,100,200].forEach(C=>{setTimeout(()=>{const B=document.getElementById(l);B&&(B.focus(),B.setSelectionRange(y,y))},C)})):(w(T=>({...T,[b.name]:A})),requestAnimationFrame(()=>{const T=document.getElementById(l);T&&(T.focus(),T.setSelectionRange(y,y),setTimeout(()=>{const C=document.getElementById(l);C&&(C.focus(),C.setSelectionRange(y,y))},50))}))}},j=s=>{const l={...n,[s.target.name]:s.target.name==="noIndex"||s.target.name==="noFollow"?s.target.checked:s.target.value};w(l)},E=s=>l=>{d.isEmpty(l.fieldValue)||j({target:{name:s,value:typeof l.fieldValue=="string"?l.fieldValue.replace(/^"(.*)"$/,"$1"):l.fieldValue}}),l.error&&L.toast.error(e.jsxs("div",{children:[e.jsx("h2",{children:"Failed to generate:"}),e.jsx("p",{children:l.error})]}))},ie=()=>{const s=d.get(u,"seo.jsonLD","{}");if((s==null?void 0:s.trim())==="{}"){L.toast.error("Default page JSON-LD is empty");return}j({target:{name:"jsonLD",value:s}})};return e.jsxs("div",{className:"relative flex h-full flex-col","data-panel-id":"seo",children:[!o&&e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",children:e.jsx(a.Alert,{variant:"default",className:"w-[80%] max-w-md text-xs",children:e.jsx(a.AlertDescription,{children:t("You don't have permission to edit SEO settings. Contact your administrator for access.")})})}),e.jsxs("div",{className:"no-scrollbar flex-grow overflow-y-auto px-2 pb-20",children:[e.jsxs("div",{className:"mb-4 flex w-full items-center justify-between rounded-md bg-gray-100 px-2 py-1 text-left text-sm",children:[e.jsxs("span",{children:[e.jsx("div",{className:"font-medium",children:r==null?void 0:r.name}),e.jsx("span",{className:"font-mono text-xs leading-tight text-gray-500",children:r==null?void 0:r.slug})]}),e.jsx(i.LanguageSwitcher,{variant:"outline",showAdd:!1})]}),e.jsx("form",{className:"space-y-8",children:e.jsxs(a.Tabs,{value:m,onValueChange:D,className:"w-full",children:[e.jsxs(a.TabsList,{className:"mb-4 grid w-full grid-cols-3",children:[e.jsx(a.TabsTrigger,{value:"seo",children:t("SEO")}),e.jsx(a.TabsTrigger,{value:"opengraph",children:t("Meta Tags")}),e.jsx(a.TabsTrigger,{value:"jsonld",children:t("JSON-LD")})]}),e.jsx("div",{className:m==="seo"?"":"sr-only",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"keyword",children:t("Keyword")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"keyword")})]}),e.jsx(a.Input,{type:"text",id:"keyword",name:"keyword",value:n.keyword,onChange:j,disabled:f||!o,placeholder:t("Enter keyword"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"title",children:t("SEO Title")}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("title"),field:"title"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"title")})]})]}),e.jsx(a.Input,{type:"text",id:"title",name:"title",value:n.title,onChange:j,disabled:f||!o,placeholder:t("Enter SEO title"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"description",children:t("SEO Description")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("description"),field:"description"}),o&&e.jsx(i.NestedPathSelector,{data:c??{},onSelect:s=>O(s,"description")})]})]}),e.jsx(a.Textarea,{id:"description",name:"description",rows:5,value:n.description,onChange:j,disabled:f||!o,placeholder:t("Enter SEO description"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"title",children:t("Canonical URL")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"canonicalUrl")})]}),e.jsx(a.Input,{type:"text",id:"canonicalUrl",name:"canonicalUrl",value:n.canonicalUrl,onChange:j,disabled:f||!o,placeholder:t("Enter Canonical URL"),readOnly:!o})]}),e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(a.Input,{type:"checkbox",id:"noIndex",name:"noIndex",checked:n.noIndex,onChange:j,disabled:f||!o,className:"h-4 w-4"}),e.jsx(a.Label,{className:"pb-1 text-xs",htmlFor:"noIndex",children:t("No Index")})]}),e.jsx("p",{className:"mt-0 text-[10px] font-light leading-4 text-gray-400",children:t("Check this if you don't want search engines to index this page.")})]}),e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(a.Input,{type:"checkbox",id:"noFollow",name:"noFollow",checked:n.noFollow,onChange:j,disabled:f||!o,className:"h-4 w-4"}),e.jsx(a.Label,{className:"pb-1 text-xs",htmlFor:"noIndex",children:t("No Follow")})]}),e.jsx("p",{className:"text-[10px] font-light leading-4 text-gray-400",children:t("Check this if you don't want search engines to follow links on this page.")})]})]})}),e.jsx("div",{className:m==="opengraph"?"":"sr-only",children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"mb-4 font-semibold text-slate-700",children:t("Open Graph")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogTitle",children:t("OG Title")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("ogTitle"),field:"ogTitle"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"ogTitle")})]})]}),e.jsx(a.Input,{type:"text",id:"ogTitle",name:"ogTitle",value:n.ogTitle,onChange:j,disabled:f||!o,placeholder:t("Enter OG title"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogDescription",children:t("OG Description")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{keyword:n.keyword,onComplete:E("ogDescription"),field:"ogDescription"}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>O(s,"ogDescription")})]})]}),e.jsx(a.Textarea,{id:"ogDescription",name:"ogDescription",rows:5,value:n.ogDescription,onChange:j,disabled:f||!o,placeholder:t("Enter OG description"),readOnly:!o})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"ogImage",children:t("OG Image")}),o&&e.jsx(i.NestedPathSelector,{dataType:"value",data:c??{},onSelect:s=>{w({...n,ogImage:`{{${s}}}`,ogImageId:""})}})]}),e.jsx(i.ImagePicker,{assetId:n.ogImageId,assetUrl:n.ogImage,onChange:s=>{w({...n,ogImage:s.url,ogImageId:s.id})},disabled:f||!o,placeholder:t("Select OG image"),className:"mb-2"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"metaOther",children:t("Meta Tags")}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(F,{keyword:n.keyword,onComplete:E("metaOther"),field:"metaOther"})})]}),e.jsx(i.SmartJsonInput,{id:"metaOther",value:n.metaOther,onChange:s=>{j({target:{name:"metaOther",value:s}})},placeholder:t("Enter Meta Tags JSON"),disabled:f||!o,readOnly:!o,pageData:c||{},rows:8,handleFieldInsert:O})]})]})]})})}),e.jsx("div",{className:m==="jsonld"?"":"sr-only",children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{className:"text-xs",htmlFor:"jsonLD",children:t("JSON-LD")}),z&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(F,{keyword:n.keyword,onComplete:E("jsonLD"),field:"jsonLD"})})]}),e.jsx("div",{className:"hidden",children:JSON.stringify(c)}),e.jsx(i.SmartJsonInput,{id:"jsonLD",value:n.jsonLD,onChange:s=>{j({target:{name:"jsonLD",value:s}})},placeholder:t("Enter JSON-LD"),disabled:f||!o,readOnly:!o,pageData:c||{},rows:12,handleFieldInsert:O,hasJsonLdForSelectedLang:z,copyJsonLDFromDefaultPage:ie})]})})})]})})]}),o&&e.jsxs("div",{className:"fixed bottom-0 left-0 right-0 flex w-full flex-shrink-0 items-center justify-between border-t bg-background p-4",children:[ne?e.jsx(a.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>{m==="jsonld"?le():m==="opengraph"?re():oe()},disabled:f||!o||!I,children:t(H?"Resetting...":`Reset to ${m==="jsonld"?"Default JSON-LD":m==="opengraph"?"Default Open Graph":"Default SEO"}`)}):e.jsx("div",{}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(a.Button,{onClick:Y,disabled:!me(n==null?void 0:n.jsonLD)||(k.current[h]?d.isEqual(k.current[h],n):!1)||f||!o,children:t(q?"Saving...":"Save")}),e.jsx(a.Button,{variant:"link",className:"text-gray-500 hover:text-gray-700",onClick:()=>x("outline"),children:t("Cancel")})]})]}),e.jsx(ge,{isOpen:ee,onClose:()=>{V(!1),U(null)},onSave:async()=>{S&&(await Y(),S.switchHandler(),V(!1),U(null))},onDiscard:()=>{if(S){const s=k.current[h];s&&w(s),S.switchHandler(),V(!1),U(null)}},isSaving:q,fromLanguage:(S==null?void 0:S.fromLang)||h,toLanguage:(S==null?void 0:S.toLang)||""})]})};Q.displayName="SeoPanel";exports.default=Q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as ct, a as Xt, d as we, b as ve, c as Jt, e as Qt } from "./chunk-TZMSLE5B-
|
|
2
|
-
import { _ as f, s as se, c as Ie, o as Le, g as Ae, b as _e, p as ke, d as st, q as Pe, J as Ne, v as Se, l as Q, i as St, y as Me, e as I, a2 as z, a3 as At, u as F, a as Re, j as Mt, k as De, m as re, a4 as Ce, a5 as ie, G as Ht, a6 as ne, a7 as Oe } from "./mermaid.core-
|
|
3
|
-
import { I as Be } from "./chunk-QZHKN3VN-
|
|
1
|
+
import { g as ct, a as Xt, d as we, b as ve, c as Jt, e as Qt } from "./chunk-TZMSLE5B-De8BBIp6.js";
|
|
2
|
+
import { _ as f, s as se, c as Ie, o as Le, g as Ae, b as _e, p as ke, d as st, q as Pe, J as Ne, v as Se, l as Q, i as St, y as Me, e as I, a2 as z, a3 as At, u as F, a as Re, j as Mt, k as De, m as re, a4 as Ce, a5 as ie, G as Ht, a6 as ne, a7 as Oe } from "./mermaid.core-3NhAXOzj.js";
|
|
3
|
+
import { I as Be } from "./chunk-QZHKN3VN-Dcw61eWf.js";
|
|
4
4
|
var Ut = function() {
|
|
5
5
|
var e = /* @__PURE__ */ f(function(pt, v, _, L) {
|
|
6
6
|
for (_ = _ || {}, L = pt.length; L--; _[pt[L]] = v) ;
|
package/dist/{sequenceDiagram-WL72ISMW-CotOH2Xj.cjs → sequenceDiagram-WL72ISMW-DmS_WEPR.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./chunk-TZMSLE5B-B0DNnH2K.cjs"),i=require("./mermaid.core-DY8gIrXk.cjs"),ne=require("./chunk-QZHKN3VN-DPT45Qxb.cjs");var Ot=function(){var e=i.__name(function(ot,w,L,v){for(L=L||{},v=ot.length;v--;L[ot[v]]=w);return L},"o"),t=[1,2],o=[1,3],a=[1,4],r=[2,4],n=[1,9],l=[1,11],d=[1,13],c=[1,14],s=[1,16],u=[1,17],f=[1,18],x=[1,24],m=[1,25],y=[1,26],b=[1,27],A=[1,28],P=[1,29],N=[1,30],S=[1,31],C=[1,32],Y=[1,33],F=[1,34],X=[1,35],j=[1,36],z=[1,37],H=[1,38],q=[1,39],D=[1,41],Q=[1,42],K=[1,43],Z=[1,44],tt=[1,45],R=[1,46],T=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],I=[2,71],U=[4,5,16,50,52,53],J=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],M=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Nt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Yt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],st=[69,70,71],it=[1,127],St={trace:i.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:i.__name(function(w,L,v,E,O,p,Tt){var g=p.length-1;switch(O){case 3:return E.apply(p[g]),p[g];case 4:case 9:this.$=[];break;case 5:case 10:p[g-1].push(p[g]),this.$=p[g-1];break;case 6:case 7:case 11:case 12:this.$=p[g];break;case 8:case 13:this.$=[];break;case 15:p[g].type="createParticipant",this.$=p[g];break;case 16:p[g-1].unshift({type:"boxStart",boxData:E.parseBoxData(p[g-2])}),p[g-1].push({type:"boxEnd",boxText:p[g-2]}),this.$=p[g-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-2]),sequenceIndexStep:Number(p[g-1]),sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:E.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor};break;case 23:this.$={type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-1].actor};break;case 29:E.setDiagramTitle(p[g].substring(6)),this.$=p[g].substring(6);break;case 30:E.setDiagramTitle(p[g].substring(7)),this.$=p[g].substring(7);break;case 31:this.$=p[g].trim(),E.setAccTitle(this.$);break;case 32:case 33:this.$=p[g].trim(),E.setAccDescription(this.$);break;case 34:p[g-1].unshift({type:"loopStart",loopText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.LOOP_START}),p[g-1].push({type:"loopEnd",loopText:p[g-2],signalType:E.LINETYPE.LOOP_END}),this.$=p[g-1];break;case 35:p[g-1].unshift({type:"rectStart",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_START}),p[g-1].push({type:"rectEnd",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_END}),this.$=p[g-1];break;case 36:p[g-1].unshift({type:"optStart",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_START}),p[g-1].push({type:"optEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_END}),this.$=p[g-1];break;case 37:p[g-1].unshift({type:"altStart",altText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.ALT_START}),p[g-1].push({type:"altEnd",signalType:E.LINETYPE.ALT_END}),this.$=p[g-1];break;case 38:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 39:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_OVER_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 40:p[g-1].unshift({type:"criticalStart",criticalText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.CRITICAL_START}),p[g-1].push({type:"criticalEnd",signalType:E.LINETYPE.CRITICAL_END}),this.$=p[g-1];break;case 41:p[g-1].unshift({type:"breakStart",breakText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_START}),p[g-1].push({type:"breakEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_END}),this.$=p[g-1];break;case 43:this.$=p[g-3].concat([{type:"option",optionText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.CRITICAL_OPTION},p[g]]);break;case 45:this.$=p[g-3].concat([{type:"and",parText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.PAR_AND},p[g]]);break;case 47:this.$=p[g-3].concat([{type:"else",altText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.ALT_ELSE},p[g]]);break;case 48:p[g-3].draw="participant",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 49:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 50:p[g-3].draw="actor",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 51:p[g-1].draw="actor",p[g-1].type="addParticipant",this.$=p[g-1];break;case 52:p[g-1].type="destroyParticipant",this.$=p[g-1];break;case 53:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 54:this.$=[p[g-1],{type:"addNote",placement:p[g-2],actor:p[g-1].actor,text:p[g]}];break;case 55:p[g-2]=[].concat(p[g-1],p[g-1]).slice(0,2),p[g-2][0]=p[g-2][0].actor,p[g-2][1]=p[g-2][1].actor,this.$=[p[g-1],{type:"addNote",placement:E.PLACEMENT.OVER,actor:p[g-2].slice(0,2),text:p[g]}];break;case 56:this.$=[p[g-1],{type:"addLinks",actor:p[g-1].actor,text:p[g]}];break;case 57:this.$=[p[g-1],{type:"addALink",actor:p[g-1].actor,text:p[g]}];break;case 58:this.$=[p[g-1],{type:"addProperties",actor:p[g-1].actor,text:p[g]}];break;case 59:this.$=[p[g-1],{type:"addDetails",actor:p[g-1].actor,text:p[g]}];break;case 62:this.$=[p[g-2],p[g]];break;case 63:this.$=p[g];break;case 64:this.$=E.PLACEMENT.LEFTOF;break;case 65:this.$=E.PLACEMENT.RIGHTOF;break;case 66:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g],activate:!0},{type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor}];break;case 67:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g]},{type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-4].actor}];break;case 68:this.$=[p[g-3],p[g-1],{type:"addMessage",from:p[g-3].actor,to:p[g-1].actor,signalType:p[g-2],msg:p[g]}];break;case 69:this.$={type:"addParticipant",actor:p[g-1],config:p[g]};break;case 70:this.$=p[g-1].trim();break;case 71:this.$={type:"addParticipant",actor:p[g]};break;case 72:this.$=E.LINETYPE.SOLID_OPEN;break;case 73:this.$=E.LINETYPE.DOTTED_OPEN;break;case 74:this.$=E.LINETYPE.SOLID;break;case 75:this.$=E.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=E.LINETYPE.DOTTED;break;case 77:this.$=E.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=E.LINETYPE.SOLID_CROSS;break;case 79:this.$=E.LINETYPE.DOTTED_CROSS;break;case 80:this.$=E.LINETYPE.SOLID_POINT;break;case 81:this.$=E.LINETYPE.DOTTED_POINT;break;case 82:this.$=E.parseMessage(p[g].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:o,6:a},{1:[3]},{3:5,4:t,5:o,6:a},{3:6,4:t,5:o,6:a},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:l,8:8,9:10,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,5]),{9:47,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,7]),e(T,[2,8]),e(T,[2,14]),{12:48,50:z,52:H,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(T,[2,29]),e(T,[2,30]),{32:[1,61]},{34:[1,62]},e(T,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:R},{22:75,71:R},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(T,[2,6]),e(T,[2,15]),e(U,[2,9],{10:95}),e(T,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(T,[2,21]),{5:[1,99]},{5:[1,100]},e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,27]),e(T,[2,28]),e(T,[2,31]),e(T,[2,32]),e(J,r,{7:101}),e(J,r,{7:102}),e(J,r,{7:103}),e(M,r,{40:104,7:105}),e(Nt,r,{42:106,7:107}),e(Nt,r,{7:107,42:108}),e(Yt,r,{45:109,7:110}),e(J,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(st,[2,72]),e(st,[2,73]),e(st,[2,74]),e(st,[2,75]),e(st,[2,76]),e(st,[2,77]),e(st,[2,78]),e(st,[2,79]),e(st,[2,80]),e(st,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:it},{57:128,86:it},{57:129,86:it},{57:130,86:it},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:z,52:H,53:q},{5:[1,136]},e(T,[2,19]),e(T,[2,20]),e(T,[2,22]),e(T,[2,23]),{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,137],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,138],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,139],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,140]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,46],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,49:[1,141],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,142]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,44],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,48:[1,143],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,144]},{16:[1,145]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,42],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,47:[1,146],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,147],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{15:[1,148]},e(T,[2,49]),e(T,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(T,[2,51]),e(T,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:it},{57:154,86:it},{57:155,86:it},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(T,[2,16]),e(U,[2,10]),{12:157,50:z,52:H,53:q},e(U,[2,12]),e(U,[2,13]),e(T,[2,18]),e(T,[2,34]),e(T,[2,35]),e(T,[2,36]),e(T,[2,37]),{15:[1,158]},e(T,[2,38]),{15:[1,159]},e(T,[2,39]),e(T,[2,40]),{15:[1,160]},e(T,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:it},{57:165,86:it},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(U,[2,11]),e(M,r,{7:105,40:167}),e(Nt,r,{7:107,42:168}),e(Yt,r,{7:110,45:169}),e(T,[2,48]),{5:[2,70]},e(T,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:i.__name(function(w,L){if(L.recoverable)this.trace(w);else{var v=new Error(w);throw v.hash=L,v}},"parseError"),parse:i.__name(function(w){var L=this,v=[0],E=[],O=[null],p=[],Tt=this.table,g="",bt=0,Wt=0,ae=2,qt=1,se=p.slice.call(arguments,1),W=Object.create(this.lexer),dt={yy:{}};for(var Mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mt)&&(dt.yy[Mt]=this.yy[Mt]);W.setInput(w,dt.yy),dt.yy.lexer=W,dt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Rt=W.yylloc;p.push(Rt);var ie=W.options&&W.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re($){v.length=v.length-2*$,O.length=O.length-$,p.length=p.length-$}i.__name(re,"popStack");function Ft(){var $;return $=E.pop()||W.lex()||qt,typeof $!="number"&&($ instanceof Array&&(E=$,$=E.pop()),$=L.symbols_[$]||$),$}i.__name(Ft,"lex");for(var G,pt,et,Ct,ft={},wt,rt,zt,vt;;){if(pt=v[v.length-1],this.defaultActions[pt]?et=this.defaultActions[pt]:((G===null||typeof G>"u")&&(G=Ft()),et=Tt[pt]&&Tt[pt][G]),typeof et>"u"||!et.length||!et[0]){var Dt="";vt=[];for(wt in Tt[pt])this.terminals_[wt]&&wt>ae&&vt.push("'"+this.terminals_[wt]+"'");W.showPosition?Dt="Parse error on line "+(bt+1)+`:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./chunk-TZMSLE5B-BUsuXR8P.cjs"),i=require("./mermaid.core-Cop_RRH4.cjs"),ne=require("./chunk-QZHKN3VN-V8GIXVhC.cjs");var Ot=function(){var e=i.__name(function(ot,w,L,v){for(L=L||{},v=ot.length;v--;L[ot[v]]=w);return L},"o"),t=[1,2],o=[1,3],a=[1,4],r=[2,4],n=[1,9],l=[1,11],d=[1,13],c=[1,14],s=[1,16],u=[1,17],f=[1,18],x=[1,24],m=[1,25],y=[1,26],b=[1,27],A=[1,28],P=[1,29],N=[1,30],S=[1,31],C=[1,32],Y=[1,33],F=[1,34],X=[1,35],j=[1,36],z=[1,37],H=[1,38],q=[1,39],D=[1,41],Q=[1,42],K=[1,43],Z=[1,44],tt=[1,45],R=[1,46],T=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],I=[2,71],U=[4,5,16,50,52,53],J=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],M=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Nt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Yt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],st=[69,70,71],it=[1,127],St={trace:i.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:i.__name(function(w,L,v,E,O,p,Tt){var g=p.length-1;switch(O){case 3:return E.apply(p[g]),p[g];case 4:case 9:this.$=[];break;case 5:case 10:p[g-1].push(p[g]),this.$=p[g-1];break;case 6:case 7:case 11:case 12:this.$=p[g];break;case 8:case 13:this.$=[];break;case 15:p[g].type="createParticipant",this.$=p[g];break;case 16:p[g-1].unshift({type:"boxStart",boxData:E.parseBoxData(p[g-2])}),p[g-1].push({type:"boxEnd",boxText:p[g-2]}),this.$=p[g-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-2]),sequenceIndexStep:Number(p[g-1]),sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:E.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor};break;case 23:this.$={type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-1].actor};break;case 29:E.setDiagramTitle(p[g].substring(6)),this.$=p[g].substring(6);break;case 30:E.setDiagramTitle(p[g].substring(7)),this.$=p[g].substring(7);break;case 31:this.$=p[g].trim(),E.setAccTitle(this.$);break;case 32:case 33:this.$=p[g].trim(),E.setAccDescription(this.$);break;case 34:p[g-1].unshift({type:"loopStart",loopText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.LOOP_START}),p[g-1].push({type:"loopEnd",loopText:p[g-2],signalType:E.LINETYPE.LOOP_END}),this.$=p[g-1];break;case 35:p[g-1].unshift({type:"rectStart",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_START}),p[g-1].push({type:"rectEnd",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_END}),this.$=p[g-1];break;case 36:p[g-1].unshift({type:"optStart",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_START}),p[g-1].push({type:"optEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_END}),this.$=p[g-1];break;case 37:p[g-1].unshift({type:"altStart",altText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.ALT_START}),p[g-1].push({type:"altEnd",signalType:E.LINETYPE.ALT_END}),this.$=p[g-1];break;case 38:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 39:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_OVER_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 40:p[g-1].unshift({type:"criticalStart",criticalText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.CRITICAL_START}),p[g-1].push({type:"criticalEnd",signalType:E.LINETYPE.CRITICAL_END}),this.$=p[g-1];break;case 41:p[g-1].unshift({type:"breakStart",breakText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_START}),p[g-1].push({type:"breakEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_END}),this.$=p[g-1];break;case 43:this.$=p[g-3].concat([{type:"option",optionText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.CRITICAL_OPTION},p[g]]);break;case 45:this.$=p[g-3].concat([{type:"and",parText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.PAR_AND},p[g]]);break;case 47:this.$=p[g-3].concat([{type:"else",altText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.ALT_ELSE},p[g]]);break;case 48:p[g-3].draw="participant",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 49:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 50:p[g-3].draw="actor",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 51:p[g-1].draw="actor",p[g-1].type="addParticipant",this.$=p[g-1];break;case 52:p[g-1].type="destroyParticipant",this.$=p[g-1];break;case 53:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 54:this.$=[p[g-1],{type:"addNote",placement:p[g-2],actor:p[g-1].actor,text:p[g]}];break;case 55:p[g-2]=[].concat(p[g-1],p[g-1]).slice(0,2),p[g-2][0]=p[g-2][0].actor,p[g-2][1]=p[g-2][1].actor,this.$=[p[g-1],{type:"addNote",placement:E.PLACEMENT.OVER,actor:p[g-2].slice(0,2),text:p[g]}];break;case 56:this.$=[p[g-1],{type:"addLinks",actor:p[g-1].actor,text:p[g]}];break;case 57:this.$=[p[g-1],{type:"addALink",actor:p[g-1].actor,text:p[g]}];break;case 58:this.$=[p[g-1],{type:"addProperties",actor:p[g-1].actor,text:p[g]}];break;case 59:this.$=[p[g-1],{type:"addDetails",actor:p[g-1].actor,text:p[g]}];break;case 62:this.$=[p[g-2],p[g]];break;case 63:this.$=p[g];break;case 64:this.$=E.PLACEMENT.LEFTOF;break;case 65:this.$=E.PLACEMENT.RIGHTOF;break;case 66:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g],activate:!0},{type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor}];break;case 67:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g]},{type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-4].actor}];break;case 68:this.$=[p[g-3],p[g-1],{type:"addMessage",from:p[g-3].actor,to:p[g-1].actor,signalType:p[g-2],msg:p[g]}];break;case 69:this.$={type:"addParticipant",actor:p[g-1],config:p[g]};break;case 70:this.$=p[g-1].trim();break;case 71:this.$={type:"addParticipant",actor:p[g]};break;case 72:this.$=E.LINETYPE.SOLID_OPEN;break;case 73:this.$=E.LINETYPE.DOTTED_OPEN;break;case 74:this.$=E.LINETYPE.SOLID;break;case 75:this.$=E.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=E.LINETYPE.DOTTED;break;case 77:this.$=E.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=E.LINETYPE.SOLID_CROSS;break;case 79:this.$=E.LINETYPE.DOTTED_CROSS;break;case 80:this.$=E.LINETYPE.SOLID_POINT;break;case 81:this.$=E.LINETYPE.DOTTED_POINT;break;case 82:this.$=E.parseMessage(p[g].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:o,6:a},{1:[3]},{3:5,4:t,5:o,6:a},{3:6,4:t,5:o,6:a},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:l,8:8,9:10,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,5]),{9:47,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,7]),e(T,[2,8]),e(T,[2,14]),{12:48,50:z,52:H,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(T,[2,29]),e(T,[2,30]),{32:[1,61]},{34:[1,62]},e(T,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:R},{22:75,71:R},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(T,[2,6]),e(T,[2,15]),e(U,[2,9],{10:95}),e(T,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(T,[2,21]),{5:[1,99]},{5:[1,100]},e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,27]),e(T,[2,28]),e(T,[2,31]),e(T,[2,32]),e(J,r,{7:101}),e(J,r,{7:102}),e(J,r,{7:103}),e(M,r,{40:104,7:105}),e(Nt,r,{42:106,7:107}),e(Nt,r,{7:107,42:108}),e(Yt,r,{45:109,7:110}),e(J,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(st,[2,72]),e(st,[2,73]),e(st,[2,74]),e(st,[2,75]),e(st,[2,76]),e(st,[2,77]),e(st,[2,78]),e(st,[2,79]),e(st,[2,80]),e(st,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:it},{57:128,86:it},{57:129,86:it},{57:130,86:it},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:z,52:H,53:q},{5:[1,136]},e(T,[2,19]),e(T,[2,20]),e(T,[2,22]),e(T,[2,23]),{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,137],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,138],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,139],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,140]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,46],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,49:[1,141],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,142]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,44],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,48:[1,143],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,144]},{16:[1,145]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,42],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,47:[1,146],50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,147],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:C,41:Y,43:F,44:X,46:j,50:z,52:H,53:q,55:D,60:Q,61:K,62:Z,63:tt,71:R},{15:[1,148]},e(T,[2,49]),e(T,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(T,[2,51]),e(T,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:it},{57:154,86:it},{57:155,86:it},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(T,[2,16]),e(U,[2,10]),{12:157,50:z,52:H,53:q},e(U,[2,12]),e(U,[2,13]),e(T,[2,18]),e(T,[2,34]),e(T,[2,35]),e(T,[2,36]),e(T,[2,37]),{15:[1,158]},e(T,[2,38]),{15:[1,159]},e(T,[2,39]),e(T,[2,40]),{15:[1,160]},e(T,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:it},{57:165,86:it},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(U,[2,11]),e(M,r,{7:105,40:167}),e(Nt,r,{7:107,42:168}),e(Yt,r,{7:110,45:169}),e(T,[2,48]),{5:[2,70]},e(T,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:i.__name(function(w,L){if(L.recoverable)this.trace(w);else{var v=new Error(w);throw v.hash=L,v}},"parseError"),parse:i.__name(function(w){var L=this,v=[0],E=[],O=[null],p=[],Tt=this.table,g="",bt=0,Wt=0,ae=2,qt=1,se=p.slice.call(arguments,1),W=Object.create(this.lexer),dt={yy:{}};for(var Mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mt)&&(dt.yy[Mt]=this.yy[Mt]);W.setInput(w,dt.yy),dt.yy.lexer=W,dt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Rt=W.yylloc;p.push(Rt);var ie=W.options&&W.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re($){v.length=v.length-2*$,O.length=O.length-$,p.length=p.length-$}i.__name(re,"popStack");function Ft(){var $;return $=E.pop()||W.lex()||qt,typeof $!="number"&&($ instanceof Array&&(E=$,$=E.pop()),$=L.symbols_[$]||$),$}i.__name(Ft,"lex");for(var G,pt,et,Ct,ft={},wt,rt,zt,vt;;){if(pt=v[v.length-1],this.defaultActions[pt]?et=this.defaultActions[pt]:((G===null||typeof G>"u")&&(G=Ft()),et=Tt[pt]&&Tt[pt][G]),typeof et>"u"||!et.length||!et[0]){var Dt="";vt=[];for(wt in Tt[pt])this.terminals_[wt]&&wt>ae&&vt.push("'"+this.terminals_[wt]+"'");W.showPosition?Dt="Parse error on line "+(bt+1)+`:
|
|
2
2
|
`+W.showPosition()+`
|
|
3
3
|
Expecting `+vt.join(", ")+", got '"+(this.terminals_[G]||G)+"'":Dt="Parse error on line "+(bt+1)+": Unexpected "+(G==qt?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(Dt,{text:W.match,token:this.terminals_[G]||G,line:W.yylineno,loc:Rt,expected:vt})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+G);switch(et[0]){case 1:v.push(G),O.push(W.yytext),p.push(W.yylloc),v.push(et[1]),G=null,Wt=W.yyleng,g=W.yytext,bt=W.yylineno,Rt=W.yylloc;break;case 2:if(rt=this.productions_[et[1]][1],ft.$=O[O.length-rt],ft._$={first_line:p[p.length-(rt||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(rt||1)].first_column,last_column:p[p.length-1].last_column},ie&&(ft._$.range=[p[p.length-(rt||1)].range[0],p[p.length-1].range[1]]),Ct=this.performAction.apply(ft,[g,Wt,bt,dt.yy,et[1],O,p].concat(se)),typeof Ct<"u")return Ct;rt&&(v=v.slice(0,-1*rt*2),O=O.slice(0,-1*rt),p=p.slice(0,-1*rt)),v.push(this.productions_[et[1]][0]),O.push(ft.$),p.push(ft._$),zt=Tt[v[v.length-2]][v[v.length-1]],v.push(zt);break;case 3:return!0}}return!0},"parse")},ee=function(){var ot={EOF:1,parseError:i.__name(function(L,v){if(this.yy.parser)this.yy.parser.parseError(L,v);else throw new Error(L)},"parseError"),setInput:i.__name(function(w,L){return this.yy=L||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i.__name(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var L=w.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:i.__name(function(w){var L=w.length,v=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var O=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===E.length?this.yylloc.first_column:0)+E[E.length-v.length].length-v[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:i.__name(function(){return this._more=!0,this},"more"),reject:i.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i.__name(function(w){this.unput(this.match.slice(w))},"less"),pastInput:i.__name(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i.__name(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i.__name(function(){var w=this.pastInput(),L=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|