allyhub 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/export.js +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/run.js +2 -0
- package/dist/commands.json +1 -1
- package/dist/main.js +4 -4
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/blocks/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/migrate.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +2 -1
- package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +3 -3
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +151 -151
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +173 -173
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +1 -2
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +2 -0
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +106 -101
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +26 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +6 -6
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +15 -15
- package/dist/run-register.js +2 -0
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-B4tvwU6C.js → abnfDiagram-WEYOIA3C-D6qI3rai.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-V2fA0vY2.js → architecture-WOLXFQ4H-B3V6ggq8.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-B6B7XN0M.js → architectureDiagram-ZHVYKT53-IauNyxXn.js} +1 -1
- package/editor-web/assets/{article-DW4eD_8K.js → article-BHjKp5We.js} +1 -1
- package/editor-web/assets/{article-Dm2dIEwc.js → article-BlNKv1Cn.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-BizcUGOM.js → blockDiagram-RJAE7QA3-yXhlfxbH.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-CBHS0dQ0.js → c4Diagram-XDPPPE54-B-anrhvt.js} +1 -1
- package/editor-web/assets/{calc-worker-Cr4a0xmt.js → calc-worker-BpAgQE9E.js} +3 -3
- package/editor-web/assets/channel-Bhb-_8v6.js +1 -0
- package/editor-web/assets/{chip-BdQRH3FL.js → chip-pNQlYa2W.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-CMPBck_Q.js → chunk-2E7WHVMD-QPOni4XB.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-Df22Adpt.js → chunk-4EMNKR2T-DG1FCRRI.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-CYrZ6_Q7.js → chunk-55XCU76K-mKuMXpnC.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-BfdG9NNW.js → chunk-7S6XSTFO-CgZAazgt.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BCzZMoTJ.js → chunk-AQDTSKZB-BRU84phF.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-DT0xT8Wf.js → chunk-DSNLSHJZ-zku9oeG3.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-Bg3-EotU.js → chunk-HAGFOTED-CaUkBv_0.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-BrSym24V.js → chunk-HNE4Q36P-BQz4ZCJf.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CMxgkJWF.js → chunk-NQOKRVIF-CHVBEDkg.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-DWEwoyPy.js → chunk-UHW7PFBP-DrYeJo1e.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-eTFh5_T9.js → chunk-VQ5W62QI-D8ToVCUe.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-4PTupr9T.js → chunk-WQQL4CDK-DZ0tyi9F.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-D5XAAFWm.js → chunk-YZO67HFG-BLe7PXER.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CPsdaisO.js → chunk-ZAUX2LTX-ByaeSIre.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-ClnuUyfy.js → chunk-ZCHMQSOR-DdMJr_t5.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-CM21waNF.js → classDiagram-v2-4MYWR3UA-DDpq7fFC.js} +1 -1
- package/editor-web/assets/{color-picker-BmKFn2ww.js → color-picker-CDeICDN5.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-CJUHTgee.js → cynefin-EF2NZ3EQ-CMivy2fr.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-C9RIfuIV.js → cynefinDiagram-WF24UDRP-GtxT_9wW.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-g-01KdpO.js → dagre-NK4GIZVX-Bn1O2Hjl.js} +1 -1
- package/editor-web/assets/deck-Cohd-G5m.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-CbOjWUu-.js → diagram-CBK3MWTC-W715PWZw.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-C6psNS8J.js → diagram-I5XIIV2D-BKObZPn2.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-C9PUE46P.js → diagram-ODIL2UCW-UtQxEPoW.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-vJ_pnB33.js → diagram-PFBEJUXE-CpLGEK-k.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-FwYlEfJ-.js → diagram-RJA3I4VV-DGyMXoHb.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-FKpIxeUc.js → diagram-TYUNFSNR-Dy_Ewr8V.js} +1 -1
- package/editor-web/assets/{dist-H0z_DXDz.js → dist-0I0Obj60.js} +14 -14
- package/editor-web/assets/{dist-DCI21ljp.js → dist-6ugUm4dS.js} +1 -1
- package/editor-web/assets/{dist-D2rGVz9C.js → dist-B0rUvCi2.js} +1 -1
- package/editor-web/assets/{dist-D07Kj8GR.js → dist-CKD_paj_.js} +1 -1
- package/editor-web/assets/{dist-BgKyM9U6.js → dist-CKUW5NzS.js} +1 -1
- package/editor-web/assets/{dist-DJvfQvM7.js → dist-Ca9Gsuu0.js} +1 -1
- package/editor-web/assets/{dist-BqijryYd.js → dist-Cc8v9lfc.js} +1 -1
- package/editor-web/assets/{dist-BaWFMuvr.js → dist-CynBNzYv.js} +1 -1
- package/editor-web/assets/{dist-CB-_0-X4.js → dist-D7M5YTq2.js} +1 -1
- package/editor-web/assets/{dist-ByguWp3a.js → dist-D9tsFc2N.js} +1 -1
- package/editor-web/assets/{dist-DH8oJJw9.js → dist-DNMKDcLg.js} +3 -3
- package/editor-web/assets/{dist-D3DwRF1k.js → dist-Doj7_HUI.js} +17 -17
- package/editor-web/assets/{dist-CtYjYJdv.js → dist-DptBQzJR.js} +1 -1
- package/editor-web/assets/{dist-BdmMT8fP.js → dist-DzKB210A.js} +1 -1
- package/editor-web/assets/{dist-Cg0Z26Kv.js → dist-H9rTuNhb.js} +4 -4
- package/editor-web/assets/{dist-DmCDcb2_.js → dist-RyGsFHE0.js} +1 -1
- package/editor-web/assets/{dist-BI_BaYhO.js → dist-oeSWr2LE.js} +4 -4
- package/editor-web/assets/dist-wD_hHJ8_.js +19 -0
- package/editor-web/assets/{docx-draw-Dxb67W2d.js → docx-draw-B5cM77hc.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-DBymUM-F.js → ebnfDiagram-V4P3TTPT-GPYcx6dU.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-BNYR3OlS.js → elk-QONTBCTQ-Bi0r4UFM.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-cTNyOqW6.js → erDiagram-KYQIGQAA-DrOSrnci.js} +1 -1
- package/editor-web/assets/esm-jIPnpbBD.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-C6FUZeXP.js → eventmodeling-K75KTNOO-Dw-MjgUb.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-DbZTfPEP.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-LD9mqQ1x.js → ganttDiagram-R7GPNTJY-Bwe8cQqi.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-CtCBcQFl.js → gitGraph-VSP46ZUC-DsAcAKP0.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DYQpOozz.js → gitGraphDiagram-PDYL7XHY-aObRwdru.js} +1 -1
- package/editor-web/assets/index-D-MNVykg.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-IXInKPRO.js → info-OHQRW6UA-DBPN8JFr.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-Ds7Cei7T.js → infoDiagram-MVDRKAX5-Bx26Hq7M.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-DWs3qtAX.js → ishikawaDiagram-HPEHV2GE-BJ_MCDwA.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BkNKVYBA.js → journeyDiagram-BOSHW7O7-B5g4W2Dx.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-D3dMswnI.js → kanban-definition-FNSA4HC5-U8YNlxN7.js} +1 -1
- package/editor-web/assets/layout-CuWN7_3k.js +1 -0
- package/editor-web/assets/{mermaid-parser.core-D_W_0X0N.js → mermaid-parser.core-DYLQlYDo.js} +3 -3
- package/editor-web/assets/{mermaid.core-Bkirj-s5.js → mermaid.core-qNJmZ0b4.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-CMKkAAvI.js → mindmap-definition-6OY57UG3-CI5aBWbK.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-CzCkgCfg.js → packet-JDAUHWVQ-BBclMGlJ.js} +1 -1
- package/editor-web/assets/{panes-BexRuZd2.js → panes-BShVq38A.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-C8qHkx7M.js → pegDiagram-ECIUJNBX-B3pljPTu.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BJqgxMrD.js → pie-XZMESJXO-B7WzimHm.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-DyNntV5y.js → pieDiagram-GNMPY74T-tM1Da50-.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-BHa-69ir.js → quadrantDiagram-D57K4MC3-BEq_Shj9.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-BeRPjBBR.js → radar-ABXABTNO-v2jJSW5T.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BaRQqRsK.js → railroad-I3PHUGI6-6W3Z4F8Y.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BZfwomxZ.js → railroad-abnf-LNEFI6M7-DxIN7Zrt.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DbgqpEF5.js → railroad-ebnf-DWYD2UWJ-Bb5O7tAx.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-BYOf3PsQ.js → railroad-peg-JR7BVNR7-i2LjEP5t.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-B5OAzOsD.js → railroadDiagram-Y72NRBL7-DhsyVKbG.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-wqYNoqO0.js → requirementDiagram-EQYSW5RA-Du2k7i1E.js} +1 -1
- package/editor-web/assets/{ribbon-tabs-B3IC9WOt.js → ribbon-tabs-Bxuj_hct.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Crf6GRsa.js → sankeyDiagram-SY24JHO5-CDnRMu7J.js} +1 -1
- package/editor-web/assets/schemas-CnlOL0u4.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DUcHz4_d.js → sequenceDiagram-BLEHNHQU-BUXBhWYW.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DbeLdnpS.js → stateDiagram-v2-A6IESKWZ-Enb8LZUA.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-BDi6AeJI.js → swimlanes-B3ENRKFQ-pnpjgTrl.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B-B2Eoc8.js +8 -0
- package/editor-web/assets/themes-D_ISkWVz.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-B0awa2hh.js → timeline-definition-JXYKGLGB-C4pR18kd.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-C91G0IGm.js → treeView-D4JQ5SDB-kzNGeAv6.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-CiOWiwl2.js → treemap-SAJKECNS-Buhb5wzt.js} +1 -1
- package/editor-web/assets/{updating-D0GEtwnJ.js → updating-Cbxw83_O.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DMYM1MRe.js → usecaseDiagram-WPOLBNNX-CL-xLQWl.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DQIJ5vvN.js → vennDiagram-Q3Y3IDCW-bwsyCcdK.js} +1 -1
- package/editor-web/assets/{video-mMOFXHYK.js → video-8MxWX9f5.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-C3H9HG8r.js → wardley-7MLQ67FV-DXsLgedI.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DgsjqY1Y.js → wardleyDiagram-IVAIDKWA-Cn0ph953.js} +1 -1
- package/editor-web/assets/{workbook-NtMEyLgf.js → workbook-BDWkQ149.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DzsGI527.js → xychartDiagram-4URNHDU4-CfXnqGWZ.js} +1 -1
- package/editor-web/index.html +2 -1
- package/package.json +2 -2
- package/editor-web/assets/channel-dyUtlVPg.js +0 -1
- package/editor-web/assets/deck-C0VxrlzX.js +0 -1
- package/editor-web/assets/dist-CCP24Lel.js +0 -19
- package/editor-web/assets/esm-Cl3GKSDd.js +0 -21
- package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +0 -1
- package/editor-web/assets/index-omhSywJb.js +0 -28
- package/editor-web/assets/schemas-C21MyseF.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +0 -8
- package/editor-web/assets/tolerant-DM9s0Mt1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{b as t,c as n,d as r,f as i,m as a,o,s,u as c}from"./react-Byupo4pA.js";import{Dt as ee,Et as l,bt as u,ht as d,n as f,yt as p}from"./x-BAJilkKD.js";import{C as m,S as h,_ as g,s as _}from"./schemas-DlRAoVtq.js";import{F as v,j as y,o as te,x as b}from"./snapshots-DYooVfOx.js";import{t as x}from"./jsx-runtime-DePvh3-m.js";import{t as ne}from"./bar-button-CJmpgNg4.js";import{C as re,S as ie,b as ae,i as oe,v as se,y as ce}from"./dist-DCI21ljp.js";import{i as le,n as ue,r as S,t as de}from"./hint-F4fIBnVU.js";import{n as C,r as w,t as T}from"./tablet-C6oePHEW.js";import{t as fe}from"./palette-DchDLJj6.js";import{F as pe}from"./index-omhSywJb.js";import{t as me}from"./swatch-DCmD1gZl.js";var E=e(t(),1),D=x(),O=/^(#[0-9a-f]{3,8}|(?:rgb|rgba|hsl|hsla|oklch|oklab|lab|lch)\([^)]*\))$/iu;function k(e){let t=new Map;for(let n of e.matchAll(/\[data-theme="([\w-]+)"\]\s*\{([^}]*)\}/gu)){let e=n[1]??``;if(e===``||t.has(e))continue;let r=[];for(let e of(n[2]??``).split(`;`)){let t=e.slice(e.indexOf(`:`)+1).trim();e.includes(`:`)&&O.test(t)&&r.push(t)}t.set(e,{name:e,colors:r})}return[...t.values()]}function A(e,t){let n=RegExp(`\\s${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s"'=<>\`]+))`,`iu`).exec(e);if(n)return{value:n[1]??n[2]??n[3]??``,at:n.index,length:n[0].length}}function j(e){let t=[];for(let n of e.matchAll(/<link\b[^>]*>/giu)){let e=n[0],r=A(e,`rel`)?.value.toLowerCase().split(/\s+/u)??[],i=A(e,`href`)?.value;r.includes(`stylesheet`)&&i&&t.push(i)}return t}var M=e=>/<html\b[^>]*>/iu.exec(e);function N(e){let t=M(e),n=t?A(t[0],`data-theme`)?.value:void 0;return n===void 0||n===``?void 0:n}function he(e,t){let n=M(e);if(!n)return;let r=n.index,i=A(n[0],`data-theme`),a=i?`${n[0].slice(0,i.at)} data-theme="${t}"${n[0].slice(i.at+i.length)}`:`<html data-theme="${t}"${n[0].slice(5)}`;return`${e.slice(0,r)}${a}${e.slice(r+n[0].length)}`}function P(e,t){if(/^[a-z][a-z0-9+.-]*:|^\/\//iu.test(t))return;let n=new URL(t,`file:///${e}`),r=decodeURIComponent(n.pathname).replace(/^\/+/u,``);return r===``?void 0:r}var F=h({item:y}),I={width:g().int().positive().max(4096),height:g().int().positive().max(4096)},L={scroll:h({x:g().min(0),y:g().min(0)}).optional()},R=h({selector:m(),tag:m(),text:m()}),z={"report/still":v(F.extend({...I,...L,scale:g().positive().max(4).default(1),hold:m().optional()}),h({image:h({mime:m(),data:m()})}),`A report's page drawn as the render draws it, at a frame's size, where its frame's page is scrolled: what Mark up lays over a report's frame, which the window cannot read.`),"report/hold":v(F.extend({...I,scale:g().positive().max(4).default(1)}),h({hold:m()}),`A report's page opened at a frame's size and kept as it is while a person marks it: report/still and report/at draw and read it as it was, until report/release.`),"report/release":v(h({hold:m()}),h({}),`Lets a page held for notes go.`),"report/at":v(F.extend({...I,...L,points:_(h({x:g(),y:g()})).min(1).max(24),hold:m().optional()}),h({elements:_(R)}),`What is at places of a report's page drawn at a frame's size, where its frame's page is scrolled (as report/still draws it): what a person's mark on its frame is on.`),"report/pick":v(F.extend({...I,...L,x:g(),y:g(),hold:m().optional()}),h({element:R.extend({box:h({x:g(),y:g(),width:g().positive(),height:g().positive()})}).optional()}),`The one element in front at a place of a report's page drawn at a frame's size, where its frame's page is scrolled (as report/still draws it), with its box: what Mark up's Select picks there.`)},B=b(z),V=p({en:{starting:`Opening the report…`,failed:`The report could not be shown`,copy:`Copy details`,retry:`Retry`,asleep:`A report's preview needs the agent awake.`,edit:`Edit`,width:`Width`,fit:`Fit the window`,tablet:`Tablet`,phone:`Phone`,theme:`Theme`,wide:(e,t)=>`${e}, ${String(t)} px`},"zh-cn":{starting:`正在打开报告…`,failed:`报告没能显示出来`,copy:`复制详情`,retry:`重试`,asleep:`报告预览需要 Agent 处于唤醒状态。`,edit:`编辑`,width:`宽度`,fit:`适应窗口`,tablet:`平板`,phone:`手机`,theme:`主题`,wide:(e,t)=>`${e}, ${String(t)} px`},"zh-tw":{starting:`正在開啟報告…`,failed:`報告沒能顯示出來`,copy:`複製詳情`,retry:`重試`,asleep:`報告預覽需要 Agent 處於喚醒狀態。`,edit:`編輯`,width:`寬度`,fit:`符合視窗`,tablet:`平板`,phone:`手機`,theme:`主題`,wide:(e,t)=>`${e}, ${String(t)} px`},ja:{starting:`レポートを開いています…`,failed:`レポートを表示できませんでした`,copy:`詳細をコピー`,retry:`再試行`,asleep:`レポートのプレビューにはエージェントの起動が必要です。`,edit:`編集`,width:`幅`,fit:`ウィンドウに合わせる`,tablet:`タブレット`,phone:`スマートフォン`,theme:`テーマ`,wide:(e,t)=>`${e}, ${String(t)} px`},ko:{starting:`리포트를 여는 중…`,failed:`리포트를 표시하지 못했습니다`,copy:`세부 정보 복사`,retry:`다시 시도`,asleep:`리포트 미리 보기는 에이전트가 깨어 있어야 합니다.`,edit:`편집`,width:`너비`,fit:`창에 맞추기`,tablet:`태블릿`,phone:`휴대폰`,theme:`테마`,wide:(e,t)=>`${e}, ${String(t)} px`},es:{starting:`Abriendo el informe…`,failed:`No se pudo mostrar el informe`,copy:`Copiar detalles`,retry:`Reintentar`,asleep:`La vista previa de un informe necesita al agente activo.`,edit:`Editar`,width:`Ancho`,fit:`Ajustar a la ventana`,tablet:`Tableta`,phone:`Teléfono`,theme:`Tema`,wide:(e,t)=>`${e}, ${String(t)} px`},fr:{starting:`Ouverture du rapport…`,failed:`Le rapport n’a pas pu s’afficher`,copy:`Copier les détails`,retry:`Réessayer`,asleep:`L’aperçu d’un rapport a besoin de l’agent éveillé.`,edit:`Modifier`,width:`Largeur`,fit:`Ajuster à la fenêtre`,tablet:`Tablette`,phone:`Téléphone`,theme:`Thème`,wide:(e,t)=>`${e}, ${String(t)} px`},de:{starting:`Bericht wird geöffnet…`,failed:`Der Bericht konnte nicht angezeigt werden`,copy:`Details kopieren`,retry:`Erneut versuchen`,asleep:`Die Vorschau eines Berichts braucht den wachen Agenten.`,edit:`Bearbeiten`,width:`Breite`,fit:`An Fenster anpassen`,tablet:`Tablet`,phone:`Smartphone`,theme:`Farbschema`,wide:(e,t)=>`${e}, ${String(t)} px`},pt:{starting:`Abrindo o relatório…`,failed:`Não foi possível mostrar o relatório`,copy:`Copiar detalhes`,retry:`Tentar novamente`,asleep:`A prévia de um relatório precisa do agente ativo.`,edit:`Editar`,width:`Largura`,fit:`Ajustar à janela`,tablet:`Tablet`,phone:`Celular`,theme:`Tema`,wide:(e,t)=>`${e}, ${String(t)} px`}}),H={tablet:768,phone:375},ge={fit:w,tablet:T,phone:C};function U({className:e}){let t=n();if(t===void 0)return null;let{id:r,entry:i}=t.item;return(0,D.jsx)(W,{id:r,entry:i,w:V.of(u(t.locale)),className:e},r)}function _e(e,t){let n=s(),[r,i]=(0,E.useState)({themes:[],current:void 0});return(0,E.useEffect)(()=>{let t=new AbortController;return(async()=>{let{text:r}=await n[`files/read`]({path:e}),a=new Map;for(let t of j(r)){let r=P(e,t);if(r===void 0)continue;let i=await n[`files/read`]({path:r}).then(e=>e.text,()=>``);for(let e of k(i))a.has(e.name)||a.set(e.name,e)}t.signal.aborted||i({themes:[...a.values()],current:N(r)})})().catch(()=>void 0),()=>{t.abort()}},[n,e,t]),r}var ve=e=>{let t=e.at(0)??`transparent`;return`linear-gradient(135deg, ${t} 50%, ${e.at(-1)??t} 50%)`};function ye(e){let[t,n]=(0,E.useState)({width:0,height:0});return(0,E.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let r=new ResizeObserver(([e])=>{e&&n({width:e.contentRect.width,height:e.contentRect.height})});return r.observe(t),()=>{r.disconnect()}},[e]),t}function W({id:e,entry:t,w:n,className:u}){let p=s(),m=e.slice(e.lastIndexOf(`/`)+1),[h,g]=(0,E.useState)({at:`starting`}),[_,v]=(0,E.useState)(0),[y,b]=(0,E.useState)(`fit`),[x,C]=(0,E.useState)(0);c(e,()=>{C(e=>e+1)});let[w,T]=(0,E.useState)(0),{themes:O,current:k}=_e(t,x),A=a(),j=!A&&O.length>0,[M,N]=(0,E.useState)(),P=M!==void 0&&M.over===k?M.name:k,F=async e=>{N({name:e,over:k});for(let n=0;n<2;n++){let{text:r,version:i}=await p[`files/read`]({path:t}),a=he(r,e);if(a===void 0||a===r)return;try{await p[`files/write`]({path:t,text:a,over:i});return}catch(e){if(n===1)throw e}}},I=(0,E.useRef)(null),L=ye(I),R=(0,E.useRef)(null),z=o(R),V=h.at===`asleep`?A:void 0;(0,E.useEffect)(()=>{let t=!0;return pe(p,`items/page`,{item:e}).then(({url:e})=>{t&&g({at:`ready`,url:e})},e=>{t&&g(te(e)?{at:`asleep`}:{at:`failed`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!1}},[p,e,_,V]);let U=y!==`fit`,W=U?16:0,G=y===`fit`?Math.max(1,Math.round(L.width)):H[y],be=Math.max(1,L.width-2*W),K=L.width>0?Math.min(1,be/G):1,q=Math.max(1,Math.round((L.height-W)/K));i({hold:()=>Promise.resolve({key:`report@${e}@${crypto.randomUUID()}`,what:m,source:{path:t}}),locate:()=>Promise.resolve({elements:[]})});let J=()=>{let e=R.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0},Y=e=>({name:`the element ${e.selector} of the report`,source:{path:t},...e.text===``?{}:{text:e.text}}),X=()=>{let{y:e}=z.at();return`on the report ${m}, ${String(G)} px wide, ${e>0?`scrolled ${String(Math.round(e))} px down`:`from its top`}`},Z=(0,E.useRef)(void 0),Q=()=>Z.current??Promise.resolve(void 0),$=()=>Math.min(4,Math.max(1,window.devicePixelRatio*K));return r({element:()=>R.current,hold:()=>(Z.current=B(p,`report/hold`,{item:e,width:G,height:q,scale:$()}).then(e=>e.hold,()=>void 0),Z.current.then(()=>void 0)),release:()=>{let e=Z.current;Z.current=void 0,e?.then(e=>e===void 0?void 0:B(p,`report/release`,{hold:e}).catch(()=>void 0))},pictures:async()=>{let t=J();if(!t)return[];let n=await Q(),{image:r}=await B(p,`report/still`,{item:e,width:G,height:q,scale:$(),scroll:z.at(),...n===void 0?{}:{hold:n}});return[{...r,rect:t}]},locate:async n=>{let r=J(),i=r?l(n).map(e=>({x:(e.x-r.x)/K,y:(e.y-r.y)/K})).filter(e=>e.x>=0&&e.y>=0&&e.x<=G&&e.y<=q):[],a=await Q(),o=i.length>0?await B(p,`report/at`,{item:e,width:G,height:q,points:i,scroll:z.at(),...a===void 0?{}:{hold:a}}).catch(()=>void 0):void 0;return{elements:o&&o.elements.length>0?o.elements.map(Y):[{name:`the report ${m}`,source:{path:t}}],where:X()}},pick:async t=>{let n=J();if(!n)return;let r=(t.x-n.x)/K,i=(t.y-n.y)/K;if(r<0||i<0||r>G||i>q)return;let a=await Q(),{element:o}=await B(p,`report/pick`,{item:e,width:G,height:q,x:r,y:i,scroll:z.at(),...a===void 0?{}:{hold:a}});if(!o)return;let s=o.box,c=Math.max(0,s.x),l=Math.max(0,s.y),u=Math.min(G,s.x+s.width),d=Math.min(q,s.y+s.height);if(!(u<=c||d<=l))return{element:Y(o),outline:ee({x:n.x+c*K,y:n.y+l*K,width:(u-c)*K,height:(d-l)*K}),where:X()}}}),h.at===`asleep`?(0,D.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,u),children:[(0,D.jsx)(`p`,{className:`text-sm text-lead`,children:n.asleep}),(0,D.jsx)(f,{size:`xs`,onClick:()=>{p[`edit/request`]({}).catch(()=>void 0)},children:n.edit})]}):(0,D.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col`,u),children:[(0,D.jsx)(oe,{start:(0,D.jsxs)(de,{children:[j&&(0,D.jsxs)(ae,{children:[(0,D.jsx)(re,{asChild:!0,children:(0,D.jsxs)(ne,{"data-testid":`report-theme`,children:[(0,D.jsx)(fe,{}),n.theme]})}),(0,D.jsx)(ie,{align:`start`,className:`w-auto p-3`,children:(0,D.jsx)(`div`,{role:`radiogroup`,"aria-label":n.theme,className:`flex flex-wrap gap-1.5`,children:O.map(e=>(0,D.jsx)(me,{color:ve(e.colors),label:e.name,checked:e.name===P,onClick:()=>{F(e.name).catch(()=>{N(void 0)})}},e.name))})})]}),(0,D.jsx)(se,{type:`single`,size:`sm`,"aria-label":n.width,value:y,onValueChange:e=>{(e===`fit`||e in H)&&b(e)},children:[`fit`,`tablet`,`phone`].map(e=>{let t=ge[e],r=e===`fit`?n.fit:n.wide(n[e],H[e]);return(0,D.jsxs)(S,{children:[(0,D.jsx)(ue,{asChild:!0,children:(0,D.jsx)(ce,{value:e,"aria-label":r,children:(0,D.jsx)(t,{className:`size-4`})})}),(0,D.jsx)(le,{children:r})]},e)})})]})}),(0,D.jsxs)(`div`,{ref:I,className:`relative min-h-0 flex-1 overflow-hidden bg-stone`,children:[h.at===`ready`&&L.width>0&&(w===x?[x]:[w,x]).map(e=>{let t=e===w;return(0,D.jsx)(`iframe`,{ref:t?R:void 0,title:m,src:h.url,"data-testid":t?`report`:void 0,"aria-hidden":!t||void 0,tabIndex:t?void 0:-1,sandbox:`allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox`,className:d(`absolute border-0 bg-page`,U&&`shadow-[0_0_0_1px_rgb(0_0_0/0.06),0_1px_3px_rgb(0_0_0/0.12)]`),onLoad:t?void 0:t=>{z.to(t.currentTarget,z.at()),setTimeout(()=>{T(t=>e>t?e:t)},250)},style:{width:G,height:q,top:W,left:Math.max(0,(L.width-G*K)/2),transform:`scale(${String(K)})`,transformOrigin:`top left`,zIndex:+!!t}},e)}),h.at===`starting`&&(0,D.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm text-lead`,children:(0,D.jsx)(`span`,{className:`motion-safe:animate-pulse`,children:n.starting})}),h.at===`failed`&&(0,D.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,children:[(0,D.jsx)(`p`,{className:`text-sm text-ink`,children:n.failed}),(0,D.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,D.jsx)(f,{size:`xs`,variant:`ghost`,className:`text-lead`,onClick:()=>{navigator.clipboard.writeText(h.message).catch(()=>void 0)},children:n.copy}),(0,D.jsx)(f,{size:`xs`,onClick:()=>{g({at:`starting`}),v(e=>e+1)},children:n.retry})]})]})]})]})}export{V as WORDS,U as default};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{b as t,c as n,d as r,f as i,m as a,o,s,u as c}from"./react-Byupo4pA.js";import{Dt as ee,Et as l,bt as u,ht as d,n as f,yt as p}from"./x-BAJilkKD.js";import{C as m,S as h,_ as g,s as _}from"./schemas-DlRAoVtq.js";import{F as v,j as y,o as te,x as b}from"./snapshots-DYooVfOx.js";import{t as x}from"./jsx-runtime-DePvh3-m.js";import{t as ne}from"./bar-button-CJmpgNg4.js";import{C as re,S as ie,b as ae,i as oe,v as se,y as ce}from"./dist-6ugUm4dS.js";import{i as le,n as ue,r as S,t as de}from"./hint-F4fIBnVU.js";import{n as C,r as w,t as T}from"./tablet-C6oePHEW.js";import{t as fe}from"./palette-DchDLJj6.js";import{P as pe}from"./index-D-MNVykg.js";import{t as me}from"./swatch-DCmD1gZl.js";var E=e(t(),1),D=x(),O=/^(#[0-9a-f]{3,8}|(?:rgb|rgba|hsl|hsla|oklch|oklab|lab|lch)\([^)]*\))$/iu;function k(e){let t=new Map;for(let n of e.matchAll(/\[data-theme="([\w-]+)"\]\s*\{([^}]*)\}/gu)){let e=n[1]??``;if(e===``||t.has(e))continue;let r=[];for(let e of(n[2]??``).split(`;`)){let t=e.slice(e.indexOf(`:`)+1).trim();e.includes(`:`)&&O.test(t)&&r.push(t)}t.set(e,{name:e,colors:r})}return[...t.values()]}function A(e,t){let n=RegExp(`\\s${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s"'=<>\`]+))`,`iu`).exec(e);if(n)return{value:n[1]??n[2]??n[3]??``,at:n.index,length:n[0].length}}function j(e){let t=[];for(let n of e.matchAll(/<link\b[^>]*>/giu)){let e=n[0],r=A(e,`rel`)?.value.toLowerCase().split(/\s+/u)??[],i=A(e,`href`)?.value;r.includes(`stylesheet`)&&i&&t.push(i)}return t}var M=e=>/<html\b[^>]*>/iu.exec(e);function N(e){let t=M(e),n=t?A(t[0],`data-theme`)?.value:void 0;return n===void 0||n===``?void 0:n}function he(e,t){let n=M(e);if(!n)return;let r=n.index,i=A(n[0],`data-theme`),a=i?`${n[0].slice(0,i.at)} data-theme="${t}"${n[0].slice(i.at+i.length)}`:`<html data-theme="${t}"${n[0].slice(5)}`;return`${e.slice(0,r)}${a}${e.slice(r+n[0].length)}`}function P(e,t){if(/^[a-z][a-z0-9+.-]*:|^\/\//iu.test(t))return;let n=new URL(t,`file:///${e}`),r=decodeURIComponent(n.pathname).replace(/^\/+/u,``);return r===``?void 0:r}var F=h({item:y}),I={width:g().int().positive().max(4096),height:g().int().positive().max(4096)},L={scroll:h({x:g().min(0),y:g().min(0)}).optional()},R=h({selector:m(),tag:m(),text:m()}),z={"report/still":v(F.extend({...I,...L,scale:g().positive().max(4).default(1),hold:m().optional()}),h({image:h({mime:m(),data:m()})}),`A report's page drawn as the render draws it, at a frame's size, where its frame's page is scrolled: what Mark up lays over a report's frame, which the window cannot read.`),"report/hold":v(F.extend({...I,scale:g().positive().max(4).default(1)}),h({hold:m()}),`A report's page opened at a frame's size and kept as it is while a person marks it: report/still and report/at draw and read it as it was, until report/release.`),"report/release":v(h({hold:m()}),h({}),`Lets a page held for notes go.`),"report/at":v(F.extend({...I,...L,points:_(h({x:g(),y:g()})).min(1).max(24),hold:m().optional()}),h({elements:_(R)}),`What is at places of a report's page drawn at a frame's size, where its frame's page is scrolled (as report/still draws it): what a person's mark on its frame is on.`),"report/pick":v(F.extend({...I,...L,x:g(),y:g(),hold:m().optional()}),h({element:R.extend({box:h({x:g(),y:g(),width:g().positive(),height:g().positive()})}).optional()}),`The one element in front at a place of a report's page drawn at a frame's size, where its frame's page is scrolled (as report/still draws it), with its box: what Mark up's Select picks there.`)},B=b(z),V=p({en:{starting:`Opening the report…`,failed:`The report could not be shown`,copy:`Copy details`,retry:`Retry`,asleep:`A report's preview needs the agent awake.`,edit:`Edit`,width:`Width`,fit:`Fit the window`,tablet:`Tablet`,phone:`Phone`,theme:`Theme`,wide:(e,t)=>`${e}, ${String(t)} px`},"zh-cn":{starting:`正在打开报告…`,failed:`报告没能显示出来`,copy:`复制详情`,retry:`重试`,asleep:`报告预览需要 Agent 处于唤醒状态。`,edit:`编辑`,width:`宽度`,fit:`适应窗口`,tablet:`平板`,phone:`手机`,theme:`主题`,wide:(e,t)=>`${e}, ${String(t)} px`},"zh-tw":{starting:`正在開啟報告…`,failed:`報告沒能顯示出來`,copy:`複製詳情`,retry:`重試`,asleep:`報告預覽需要 Agent 處於喚醒狀態。`,edit:`編輯`,width:`寬度`,fit:`符合視窗`,tablet:`平板`,phone:`手機`,theme:`主題`,wide:(e,t)=>`${e}, ${String(t)} px`},ja:{starting:`レポートを開いています…`,failed:`レポートを表示できませんでした`,copy:`詳細をコピー`,retry:`再試行`,asleep:`レポートのプレビューにはエージェントの起動が必要です。`,edit:`編集`,width:`幅`,fit:`ウィンドウに合わせる`,tablet:`タブレット`,phone:`スマートフォン`,theme:`テーマ`,wide:(e,t)=>`${e}, ${String(t)} px`},ko:{starting:`리포트를 여는 중…`,failed:`리포트를 표시하지 못했습니다`,copy:`세부 정보 복사`,retry:`다시 시도`,asleep:`리포트 미리 보기는 에이전트가 깨어 있어야 합니다.`,edit:`편집`,width:`너비`,fit:`창에 맞추기`,tablet:`태블릿`,phone:`휴대폰`,theme:`테마`,wide:(e,t)=>`${e}, ${String(t)} px`},es:{starting:`Abriendo el informe…`,failed:`No se pudo mostrar el informe`,copy:`Copiar detalles`,retry:`Reintentar`,asleep:`La vista previa de un informe necesita al agente activo.`,edit:`Editar`,width:`Ancho`,fit:`Ajustar a la ventana`,tablet:`Tableta`,phone:`Teléfono`,theme:`Tema`,wide:(e,t)=>`${e}, ${String(t)} px`},fr:{starting:`Ouverture du rapport…`,failed:`Le rapport n’a pas pu s’afficher`,copy:`Copier les détails`,retry:`Réessayer`,asleep:`L’aperçu d’un rapport a besoin de l’agent éveillé.`,edit:`Modifier`,width:`Largeur`,fit:`Ajuster à la fenêtre`,tablet:`Tablette`,phone:`Téléphone`,theme:`Thème`,wide:(e,t)=>`${e}, ${String(t)} px`},de:{starting:`Bericht wird geöffnet…`,failed:`Der Bericht konnte nicht angezeigt werden`,copy:`Details kopieren`,retry:`Erneut versuchen`,asleep:`Die Vorschau eines Berichts braucht den wachen Agenten.`,edit:`Bearbeiten`,width:`Breite`,fit:`An Fenster anpassen`,tablet:`Tablet`,phone:`Smartphone`,theme:`Farbschema`,wide:(e,t)=>`${e}, ${String(t)} px`},pt:{starting:`Abrindo o relatório…`,failed:`Não foi possível mostrar o relatório`,copy:`Copiar detalhes`,retry:`Tentar novamente`,asleep:`A prévia de um relatório precisa do agente ativo.`,edit:`Editar`,width:`Largura`,fit:`Ajustar à janela`,tablet:`Tablet`,phone:`Celular`,theme:`Tema`,wide:(e,t)=>`${e}, ${String(t)} px`}}),H={tablet:768,phone:375},ge={fit:w,tablet:T,phone:C};function U({className:e}){let t=n();if(t===void 0)return null;let{id:r,entry:i}=t.item;return(0,D.jsx)(W,{id:r,entry:i,w:V.of(u(t.locale)),className:e},r)}function _e(e,t){let n=s(),[r,i]=(0,E.useState)({themes:[],current:void 0});return(0,E.useEffect)(()=>{let t=new AbortController;return(async()=>{let{text:r}=await n[`files/read`]({path:e}),a=new Map;for(let t of j(r)){let r=P(e,t);if(r===void 0)continue;let i=await n[`files/read`]({path:r}).then(e=>e.text,()=>``);for(let e of k(i))a.has(e.name)||a.set(e.name,e)}t.signal.aborted||i({themes:[...a.values()],current:N(r)})})().catch(()=>void 0),()=>{t.abort()}},[n,e,t]),r}var ve=e=>{let t=e.at(0)??`transparent`;return`linear-gradient(135deg, ${t} 50%, ${e.at(-1)??t} 50%)`};function ye(e){let[t,n]=(0,E.useState)({width:0,height:0});return(0,E.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let r=new ResizeObserver(([e])=>{e&&n({width:e.contentRect.width,height:e.contentRect.height})});return r.observe(t),()=>{r.disconnect()}},[e]),t}function W({id:e,entry:t,w:n,className:u}){let p=s(),m=e.slice(e.lastIndexOf(`/`)+1),[h,g]=(0,E.useState)({at:`starting`}),[_,v]=(0,E.useState)(0),[y,b]=(0,E.useState)(`fit`),[x,C]=(0,E.useState)(0);c(e,()=>{C(e=>e+1)});let[w,T]=(0,E.useState)(0),{themes:O,current:k}=_e(t,x),A=a(),j=!A&&O.length>0,[M,N]=(0,E.useState)(),P=M!==void 0&&M.over===k?M.name:k,F=async e=>{N({name:e,over:k});for(let n=0;n<2;n++){let{text:r,version:i}=await p[`files/read`]({path:t}),a=he(r,e);if(a===void 0||a===r)return;try{await p[`files/write`]({path:t,text:a,over:i});return}catch(e){if(n===1)throw e}}},I=(0,E.useRef)(null),L=ye(I),R=(0,E.useRef)(null),z=o(R),V=h.at===`asleep`?A:void 0;(0,E.useEffect)(()=>{let t=!0;return pe(p,`items/page`,{item:e}).then(({url:e})=>{t&&g({at:`ready`,url:e})},e=>{t&&g(te(e)?{at:`asleep`}:{at:`failed`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!1}},[p,e,_,V]);let U=y!==`fit`,W=U?16:0,G=y===`fit`?Math.max(1,Math.round(L.width)):H[y],be=Math.max(1,L.width-2*W),K=L.width>0?Math.min(1,be/G):1,q=Math.max(1,Math.round((L.height-W)/K));i({hold:()=>Promise.resolve({key:`report@${e}@${crypto.randomUUID()}`,what:m,source:{path:t}}),locate:()=>Promise.resolve({elements:[]})});let J=()=>{let e=R.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0},Y=e=>({name:`the element ${e.selector} of the report`,source:{path:t},...e.text===``?{}:{text:e.text}}),X=()=>{let{y:e}=z.at();return`on the report ${m}, ${String(G)} px wide, ${e>0?`scrolled ${String(Math.round(e))} px down`:`from its top`}`},Z=(0,E.useRef)(void 0),Q=()=>Z.current??Promise.resolve(void 0),$=()=>Math.min(4,Math.max(1,window.devicePixelRatio*K));return r({element:()=>R.current,hold:()=>(Z.current=B(p,`report/hold`,{item:e,width:G,height:q,scale:$()}).then(e=>e.hold,()=>void 0),Z.current.then(()=>void 0)),release:()=>{let e=Z.current;Z.current=void 0,e?.then(e=>e===void 0?void 0:B(p,`report/release`,{hold:e}).catch(()=>void 0))},pictures:async()=>{let t=J();if(!t)return[];let n=await Q(),{image:r}=await B(p,`report/still`,{item:e,width:G,height:q,scale:$(),scroll:z.at(),...n===void 0?{}:{hold:n}});return[{...r,rect:t}]},locate:async n=>{let r=J(),i=r?l(n).map(e=>({x:(e.x-r.x)/K,y:(e.y-r.y)/K})).filter(e=>e.x>=0&&e.y>=0&&e.x<=G&&e.y<=q):[],a=await Q(),o=i.length>0?await B(p,`report/at`,{item:e,width:G,height:q,points:i,scroll:z.at(),...a===void 0?{}:{hold:a}}).catch(()=>void 0):void 0;return{elements:o&&o.elements.length>0?o.elements.map(Y):[{name:`the report ${m}`,source:{path:t}}],where:X()}},pick:async t=>{let n=J();if(!n)return;let r=(t.x-n.x)/K,i=(t.y-n.y)/K;if(r<0||i<0||r>G||i>q)return;let a=await Q(),{element:o}=await B(p,`report/pick`,{item:e,width:G,height:q,x:r,y:i,scroll:z.at(),...a===void 0?{}:{hold:a}});if(!o)return;let s=o.box,c=Math.max(0,s.x),l=Math.max(0,s.y),u=Math.min(G,s.x+s.width),d=Math.min(q,s.y+s.height);if(!(u<=c||d<=l))return{element:Y(o),outline:ee({x:n.x+c*K,y:n.y+l*K,width:(u-c)*K,height:(d-l)*K}),where:X()}}}),h.at===`asleep`?(0,D.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,u),children:[(0,D.jsx)(`p`,{className:`text-sm text-lead`,children:n.asleep}),(0,D.jsx)(f,{size:`xs`,onClick:()=>{p[`edit/request`]({}).catch(()=>void 0)},children:n.edit})]}):(0,D.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col`,u),children:[(0,D.jsx)(oe,{start:(0,D.jsxs)(de,{children:[j&&(0,D.jsxs)(ae,{children:[(0,D.jsx)(re,{asChild:!0,children:(0,D.jsxs)(ne,{"data-testid":`report-theme`,children:[(0,D.jsx)(fe,{}),n.theme]})}),(0,D.jsx)(ie,{align:`start`,className:`w-auto p-3`,children:(0,D.jsx)(`div`,{role:`radiogroup`,"aria-label":n.theme,className:`flex flex-wrap gap-1.5`,children:O.map(e=>(0,D.jsx)(me,{color:ve(e.colors),label:e.name,checked:e.name===P,onClick:()=>{F(e.name).catch(()=>{N(void 0)})}},e.name))})})]}),(0,D.jsx)(se,{type:`single`,size:`sm`,"aria-label":n.width,value:y,onValueChange:e=>{(e===`fit`||e in H)&&b(e)},children:[`fit`,`tablet`,`phone`].map(e=>{let t=ge[e],r=e===`fit`?n.fit:n.wide(n[e],H[e]);return(0,D.jsxs)(S,{children:[(0,D.jsx)(ue,{asChild:!0,children:(0,D.jsx)(ce,{value:e,"aria-label":r,children:(0,D.jsx)(t,{className:`size-4`})})}),(0,D.jsx)(le,{children:r})]},e)})})]})}),(0,D.jsxs)(`div`,{ref:I,className:`relative min-h-0 flex-1 overflow-hidden bg-stone`,children:[h.at===`ready`&&L.width>0&&(w===x?[x]:[w,x]).map(e=>{let t=e===w;return(0,D.jsx)(`iframe`,{ref:t?R:void 0,title:m,src:h.url,"data-testid":t?`report`:void 0,"aria-hidden":!t||void 0,tabIndex:t?void 0:-1,sandbox:`allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox`,className:d(`absolute border-0 bg-page`,U&&`shadow-[0_0_0_1px_rgb(0_0_0/0.06),0_1px_3px_rgb(0_0_0/0.12)]`),onLoad:t?void 0:t=>{z.to(t.currentTarget,z.at()),setTimeout(()=>{T(t=>e>t?e:t)},250)},style:{width:G,height:q,top:W,left:Math.max(0,(L.width-G*K)/2),transform:`scale(${String(K)})`,transformOrigin:`top left`,zIndex:+!!t}},e)}),h.at===`starting`&&(0,D.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm text-lead`,children:(0,D.jsx)(`span`,{className:`motion-safe:animate-pulse`,children:n.starting})}),h.at===`failed`&&(0,D.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,children:[(0,D.jsx)(`p`,{className:`text-sm text-ink`,children:n.failed}),(0,D.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,D.jsx)(f,{size:`xs`,variant:`ghost`,className:`text-lead`,onClick:()=>{navigator.clipboard.writeText(h.message).catch(()=>void 0)},children:n.copy}),(0,D.jsx)(f,{size:`xs`,onClick:()=>{g({at:`starting`}),v(e=>e+1)},children:n.retry})]})]})]})]})}export{V as WORDS,U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{b as t,c as n,d as r,f as i,l as a,m as o,s,u as c}from"./react-Byupo4pA.js";import{Et as l,bt as u,ht as d,n as f,vt as p,yt as m}from"./x-BAJilkKD.js";import{C as h,D as g,S as _,T as v,_ as y,a as b,b as x,h as S,l as C,s as w,v as T}from"./schemas-DlRAoVtq.js";import{t as E}from"./iso-UwGLGD3F.js";import{F as D,M as O,f as k,h as A,j,m as M,o as ee,p as N,x as te}from"./snapshots-DYooVfOx.js";import{t as ne}from"./jsx-runtime-DePvh3-m.js";import{n as re,t as ie}from"./progress-D1Uv3d1b.js";import{t as ae}from"./switch-b6GCy_ix.js";import{i as oe,n as se,r as ce,t as le}from"./hint-F4fIBnVU.js";import{t as ue}from"./createLucideIcon-euu7Wcd9.js";import{a as de,b as fe,c as P,l as F,o as I,s as L,u as R}from"./index-omhSywJb.js";import{t as pe}from"./updating-D0GEtwnJ.js";import{t as me}from"./surface-BUoi7cmR.js";var z={files:2e4,bytes:5368709120,redirects:2e3,headers:100},B={min:3,max:40},he=new Set(`abuse.account.accounts.admin.administrator.allyhub.api.app.assets.auth.autoconfig.autodiscover.billing.blog.cdn.dashboard.dev.dns.docs.download.downloads.ftp.help.hostmaster.imap.login.mail.mta-sts.ns1.ns2.ops.pop.postmaster.preview.root.security.signin.smtp.staging.static.status.studio.support.test.webmaster.wpad.www`.split(`.`));function V(e){if(e.length<B.min||e.length>B.max)return`length`;if(!/^[a-z0-9-]+$/u.test(e))return`characters`;if(e.startsWith(`-`)||e.endsWith(`-`))return`hyphenEnds`;if(e.includes(`--`))return`doubleHyphen`;if(he.has(e))return`reserved`}var ge={length:`An address is ${String(B.min)} to ${String(B.max)} characters.`,characters:`An address is lowercase letters, digits and hyphens.`,hyphenEnds:`An address neither starts nor ends with a hyphen.`,doubleHyphen:`An address does not have two hyphens in a row.`,reserved:`That address is reserved.`};function _e(e){let t=V(e);return t===void 0?void 0:ge[t]}var ve=h().superRefine((e,t)=>{let n=_e(e);n!==void 0&&t.addIssue({code:`custom`,message:n})}),ye=[200,301,302,303,307,308,404,410],H=h().min(1).max(1024).regex(/^\/[^\s]*$/u,`A rule's path starts with /.`),be=_({from:H,to:h().min(1).max(2048).regex(/^(\/[^\s]*|https?:\/\/[^\s]+)$/u,`A rule goes to a path or an http(s) address.`),status:v(ye.map(e=>S(e))),force:C()}),xe=new Set([`accept-ranges`,`connection`,`content-encoding`,`content-length`,`content-range`,`date`,`keep-alive`,`set-cookie`,`strict-transport-security`,`trailer`,`transfer-encoding`,`upgrade`,`x-content-type-options`]),Se=h().regex(/^[A-Za-z0-9-]+$/u).max(128).refine(e=>!xe.has(e.toLowerCase()),`That header is the platform's.`),Ce=_({for:H,set:x(Se,h().max(2048))});_({format:S(1),files:x(M,N),redirects:w(be).max(z.redirects),headers:w(Ce).max(z.headers)});var U=[`upload`,`git`],W=_({kind:b(U),commit:h().min(1).max(64).optional(),digest:k.optional()}),we=T({id:h(),siteId:h(),source:T({...W.shape,kind:A(U)}),note:h().nullable(),files:y(),bytes:y(),createdBy:h(),createdAt:E(),live:C()}),G=T({id:h(),slug:h(),name:h(),url:g(),liveDeployment:h().nullable(),approved:C(),autoPublish:C(),indexing:C(),createdAt:E()});_({slug:ve,name:h().min(1).max(255)}),T({sites:w(G),domain:h(),hosting:C()});var Te=T({site:G,deployments:w(we)});_({manifest:k,source:W,note:h().max(500).optional()}),T({site:G,deployment:we}),T({site:G,live:C(),confirm:g().optional()}),_({autoPublish:C().optional(),indexing:C().optional()});var Ee=ue(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),De=e=>e.state===`running`||e.state===`queued`;function Oe(e){if(e.state===`done`)return 1;if(!(e.total===void 0||e.total<=0))return Math.min(1,Math.max(0,e.completed/e.total))}var K=e(t(),1),q=ne(),J=_({item:j}),ke=_({hosting:C(),detail:Te.optional(),elsewhere:C().optional(),changed:C().optional(),slug:h().optional(),domain:h().optional()}),Ae={confirm:h().optional()},je={"website/preview":D(J,_({url:h()}),`A website's address as its own dev server serves it, for a frame: its dependencies installed if it has none, then its website.json's dev command on a free port; it answers once the page does.`),"website/still":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),scale:y().positive().max(4).default(1),hold:h().optional()}),_({image:_({mime:h(),data:h()})}),`A website's page as its own dev server serves it, drawn at a frame's size from its top: what Mark up lays over a website's frame where the window cannot read another origin's pixels.`),"website/hold":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),scale:y().positive().max(4).default(1)}),_({hold:h()}),`A website's page opened at a frame's size and kept as it is while a person marks it: website/still and website/at draw and read it as it was, until website/release.`),"website/release":D(_({hold:h()}),_({}),`Lets a page held for notes go.`),"website/at":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),points:w(_({x:y(),y:y()})).min(1).max(24),hold:h().optional()}),_({page:h(),elements:w(_({selector:h(),tag:h(),text:h()}))}),`What is at places of a website's page as its own dev server serves it, drawn at a frame's size from its top (as website/still draws it): what a person's mark on its frame is on.`),"website/status":D(J,ke,`A website's hosted site, its versions, and whether what is here differs from what is live; where the server has no person's sign-in, not hosted.`),"website/publish":D(J.extend({slug:h().optional(),note:h().optional(),anew:C().optional()}),_({live:C(),url:h(),...Ae}),"Builds a website, uploads it as a version and makes it live, for the person who pressed Publish. The first time, it waits for their yes in a browser (`confirm`, a page to open there)."),"website/live":D(J.extend({version:h().min(1)}),_({live:C(),...Ae}),`Makes a version what the site serves, as the person asked.`),"website/settings":D(J.extend({autoPublish:C().optional(),indexing:C().optional()}),_({}),`Changes what the person controls of a site.`),"website/unpublish":D(J,_({}),`Takes a site offline; it keeps its address and versions.`),"website/remove":D(J,_({}),`Takes a site offline for good. Its address is never given to anyone else.`)},Y=te(je);function X({className:e,...t}){return(0,q.jsx)(me,{className:d(`divide-y divide-rule`,e),...t})}function Z({icon:e,label:t,detail:n,children:r,className:i}){return(0,q.jsxs)(`div`,{"data-slot":`setting-row`,className:d(`flex items-center gap-4 px-4.5 py-4`,i),children:[e!==void 0&&(0,q.jsx)(`span`,{className:`-mr-1 flex-none`,children:e}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`div`,{className:`text-sm`,children:t}),n!==void 0&&(0,q.jsx)(`div`,{className:`mt-0.5 text-xs text-lead`,children:n})]}),r]})}function Me({label:e,detail:t,children:n}){return(0,q.jsxs)(`label`,{"data-slot":`setting-row`,className:`flex items-center gap-4 px-4.5 py-4 transition-colors has-[[role=checkbox]:not(:disabled),[role=switch]:not(:disabled)]:hover:bg-hover`,children:[(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block text-sm`,children:e}),t!==void 0&&(0,q.jsx)(`span`,{className:`mt-0.5 block text-xs text-lead`,children:t})]}),n]})}function Ne(e){let[t,n]=(0,K.useState)([]);return a(`jobs/changed`,({job:t,item:r})=>{r===e&&n(e=>[...e.filter(e=>e.id!==t.id),t])}),t}var Pe=(e,t)=>e.findLast(e=>(t===void 0||e.what===t)&&De(e)),Fe=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function Ie(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e-n;for(let[e,t]of Fe)if(Math.abs(i)>=t)return r.format(Math.round(i/t),e);return r.format(0,`minute`)}var Q={content:`max-w-[min(28rem,calc(100%-2rem))]`,header:`text-left`,footer:`flex-row justify-end`},Le=e=>e instanceof Error?e.message:String(e),Re=(e,t)=>({message:Le(e),...t!==void 0&&typeof e==`object`&&e&&e.code===O.conflict?{refused:t}:{}});function ze(e,t,n){let r=s(),[i,a]=(0,K.useState)(),[o,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(),[d,f]=(0,K.useState)(),p=(0,K.useCallback)(()=>Y(r,`website/status`,{item:e}).then(e=>{a(e),e.detail?.site.liveDeployment!=null&&f(void 0)}),[r,e]);(0,K.useEffect)(()=>{let e=()=>{p().catch(()=>void 0)};e();let t=()=>{document.visibilityState===`visible`&&e()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,t)}},[r,p,t]);let m=(0,K.useCallback)((e,t)=>{c(!0),u(void 0),e().then(p).catch(e=>{u(Re(e,t))}).finally(()=>{c(!1)})},[p]),h=(0,K.useCallback)(e=>{r[`items/open`]({target:{type:`browser`,url:e}}).catch(()=>void 0)},[r]),g=(0,K.useCallback)(e=>{e.confirm!==void 0&&(f(e.confirm),h(e.confirm))},[h]),_={item:e};return{status:i,publishing:Pe(n,`publish`),busy:o,failure:l,confirm:d,stopWaiting:()=>{f(void 0)},openAgain:()=>{d!==void 0&&h(d)},publish:(e={})=>{m(()=>Y(r,`website/publish`,{..._,...e}).then(g),e.slug)},goLive:e=>{m(()=>Y(r,`website/live`,{..._,version:e}).then(g))},settings:e=>{m(()=>Y(r,`website/settings`,{..._,...e}))},unpublish:()=>{m(()=>Y(r,`website/unpublish`,_))},remove:()=>{m(()=>Y(r,`website/remove`,_))}}}function Be({words:e,from:t=`center`,children:n}){return(0,q.jsx)(le,{disableHoverableContent:!0,children:(0,q.jsxs)(ce,{children:[(0,q.jsx)(se,{asChild:!0,children:(0,q.jsx)(`span`,{className:`flex min-w-0`,children:n})}),(0,q.jsx)(oe,{side:`top`,align:t,sideOffset:6,collisionPadding:8,children:e})]})})}var Ve=e=>new URL(e).host;function He({hosting:e,said:t,settings:n,onSettings:r}){let i=t.w.hosting,{status:a,busy:o,failure:s,confirm:c,publishing:l}=e,[u,d]=(0,K.useState)(!1),[p,m]=(0,K.useState)(),h=a?.detail?.site,g=h?.liveDeployment!=null,_=p??a?.slug??``,v=_===``?void 0:V(_),y=!o&&_!==``&&v===void 0,b=v===`length`?i.slug.length(B.min,B.max):v===void 0?s?.refused===_?i.unavailable(`${_}.${a?.domain??``}`):void 0:i.slug[v];return a?.hosting===!0?(0,q.jsxs)(`div`,{className:`flex h-10 flex-none items-center gap-2 border-b border-rule bg-sheet px-3`,children:[g&&(0,q.jsxs)(`a`,{href:h.url,target:`_blank`,rel:`noreferrer`,className:`flex min-w-0 items-center gap-1.5 truncate font-mono text-xs text-lead hover:text-ink`,children:[(0,q.jsx)(fe,{"aria-hidden":!0,className:`size-3.5 flex-none`}),Ve(h.url)]}),(0,q.jsx)(`span`,{className:`flex-1`}),s!==void 0&&s.refused===void 0&&!u&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-problem-text`,children:i.notPublished}),a.elsewhere===!0&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-lead`,children:i.elsewhere}),g&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-lead`,children:a.changed===!0?i.unpublished:i.live}),(0,q.jsx)(Be,{words:n?i.preview:i.settings,from:`end`,children:(0,q.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":n?i.preview:i.settings,"aria-pressed":n,disabled:h===void 0,onClick:r,children:(0,q.jsx)(Ee,{"aria-hidden":!0})})}),(0,q.jsxs)(f,{size:`xs`,disabled:o,onClick:()=>{h===void 0?d(!0):e.publish()},children:[l!==void 0&&(0,q.jsx)(re,{value:Oe(l)}),o?i.publishing:g?i.update:i.publish]}),(0,q.jsx)(I,{open:u&&c===void 0&&h===void 0,onOpenChange:d,children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:i.first})}),(0,q.jsxs)(`form`,{className:`contents`,onSubmit:t=>{t.preventDefault(),y&&e.publish({slug:_,...a.elsewhere===!0?{anew:!0}:{}})},children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(de,{"aria-label":i.address,"aria-invalid":b!==void 0,"aria-describedby":`site-address-why`,value:_,onChange:e=>{m(e.target.value.toLowerCase())},className:`font-mono`}),(0,q.jsxs)(`span`,{className:`font-mono text-sm text-lead`,children:[`.`,a.domain]})]}),(0,q.jsx)(`p`,{id:`site-address-why`,role:`status`,className:`min-h-5 text-sm text-problem-text`,children:b})]}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:a.elsewhere===!0?i.elsewhereNote:i.firstNote}),s!==void 0&&s.refused===void 0&&(0,q.jsx)(`p`,{className:`text-sm text-problem-text`,children:i.notPublished}),(0,q.jsx)(P,{className:Q.footer,children:(0,q.jsx)(f,{type:`submit`,disabled:!y,children:o?i.publishing:i.publish})})]})]})}),(0,q.jsx)(I,{open:c!==void 0&&!g,onOpenChange:t=>{t||e.stopWaiting()},children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:i.askTitle})}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:i.ask}),(0,q.jsxs)(P,{className:Q.footer,children:[(0,q.jsx)(f,{variant:`outline`,onClick:e.stopWaiting,children:t.w.cancel}),(0,q.jsx)(f,{autoFocus:!0,onClick:e.openAgain,children:i.openAgain})]})]})})]}):null}function Ue({hosting:e,said:t}){let n=t.w.hosting,{tag:r}=t,[i,a]=(0,K.useState)(!1),{status:o,busy:s}=e,c=o?.detail;if(c===void 0)return null;let{site:l,deployments:u}=c,d=Ve(l.url),p=u.find(e=>e.live)?.createdAt,m=e=>p!==void 0&&Date.parse(e)<Date.parse(p);return(0,q.jsxs)(`div`,{className:`absolute inset-0 overflow-y-auto bg-sheet`,children:[(0,q.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col gap-6 px-6 py-8`,children:[(0,q.jsxs)(X,{children:[(0,q.jsx)(Z,{label:n.address,children:(0,q.jsx)(`a`,{href:l.url,target:`_blank`,rel:`noreferrer`,className:`font-mono text-sm hover:underline`,children:d})}),(0,q.jsx)(Me,{label:n.agent,children:(0,q.jsx)(ae,{checked:l.autoPublish,disabled:s,onCheckedChange:t=>{e.settings({autoPublish:t})}})}),(0,q.jsx)(Me,{label:n.search,children:(0,q.jsx)(ae,{checked:l.indexing,disabled:s,onCheckedChange:t=>{e.settings({indexing:t})}})})]}),(0,q.jsxs)(`section`,{children:[(0,q.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:n.versions}),(0,q.jsx)(X,{children:u.map(t=>(0,q.jsx)(Z,{label:t.note??Ie(Date.parse(t.createdAt),r),detail:t.note===null?void 0:Ie(Date.parse(t.createdAt),r),children:t.live?(0,q.jsx)(`span`,{className:`text-xs text-lead`,children:n.live}):(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:()=>{e.goLive(t.id)},children:m(t.createdAt)?n.rollBack:n.makeLive})},t.id))})]}),(0,q.jsxs)(X,{children:[l.liveDeployment!==null&&(0,q.jsx)(Z,{label:n.unpublishNote,children:(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:e.unpublish,children:n.unpublish})}),(0,q.jsx)(Z,{label:n.removeNote(d),children:(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:()=>{a(!0)},children:n.remove})})]})]}),(0,q.jsx)(I,{open:i,onOpenChange:a,children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:n.remove})}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:n.removeNote(d)}),(0,q.jsxs)(P,{className:Q.footer,children:[(0,q.jsx)(f,{variant:`outline`,onClick:()=>{a(!1)},children:t.w.cancel}),(0,q.jsx)(f,{variant:`destructive`,onClick:()=>{a(!1),e.remove()},children:n.remove})]})]})})]})}var $=m({en:{starting:`Starting the website…`,startingJob:e=>`Starting ${e}`,cancel:`Cancel`,asleep:`A website's preview needs the agent awake.`,edit:`Edit`,hosting:{publish:`Publish`,update:`Update`,settings:`Website settings`,preview:`Preview`,unpublished:`Unpublished changes`,address:`Address`,first:`Publish this website`,firstNote:`Anyone with the address can see it.`,publishing:`Publishing…`,notPublished:`It was not published. Try again.`,askTitle:`Confirm in your browser`,ask:`A site's first publish is confirmed in your browser.`,openAgain:`Open again`,versions:`Versions`,live:`Live`,rollBack:`Roll back`,makeLive:`Make live`,elsewhere:`Published by another team`,elsewhereNote:`This folder names another team’s site. Publishing makes a new one of yours; theirs stays as it is. Anyone with the address can see it.`,slug:{length:(e,t)=>`An address is ${String(e)} to ${String(t)} characters.`,characters:`Use lowercase letters, digits and hyphens.`,hyphenEnds:`An address can’t start or end with a hyphen.`,doubleHyphen:`An address can’t have two hyphens in a row.`,reserved:`That address is reserved.`},unavailable:e=>`${e} is not available.`,agent:`Let the agent update the live site`,search:`Show in search engines`,unpublish:`Unpublish`,unpublishNote:`Takes the site offline within a minute. It keeps its address and versions.`,remove:`Delete site`,removeNote:e=>`${e} goes offline for good, and its address can never be used again.`}},"zh-cn":{starting:`正在启动网站…`,startingJob:e=>`正在启动 ${e}`,cancel:`取消`,asleep:`网站预览需要 Agent 处于唤醒状态。`,edit:`编辑`,hosting:{publish:`发布`,update:`更新`,settings:`网站设置`,preview:`预览`,unpublished:`有未发布的更改`,address:`地址`,first:`发布这个网站`,firstNote:`知道地址的人都能看到。`,publishing:`正在发布…`,notPublished:`没有发布成功,请再试一次。`,askTitle:`请在浏览器中确认`,ask:`网站第一次发布需要在浏览器中确认。`,openAgain:`再次打开`,versions:`版本`,live:`线上`,rollBack:`回滚`,makeLive:`设为上线`,elsewhere:`由其他团队发布`,elsewhereNote:`这个文件夹指向另一个团队的网站。发布会为你新建一个网站,他们的保持不变。知道地址的人都能看到。`,slug:{length:(e,t)=>`地址为 ${String(e)} 到 ${String(t)} 个字符。`,characters:`只能用小写字母、数字和连字符。`,hyphenEnds:`地址不能以连字符开头或结尾。`,doubleHyphen:`地址里不能有两个连续的连字符。`,reserved:`这个地址是保留的。`},unavailable:e=>`${e} 不可用。`,agent:`允许 agent 更新线上网站`,search:`在搜索引擎中显示`,unpublish:`取消发布`,unpublishNote:`一分钟内让网站下线,地址和版本都会保留。`,remove:`删除网站`,removeNote:e=>`${e} 将永久下线,这个地址也不能再使用。`}},"zh-tw":{starting:`正在啟動網站…`,startingJob:e=>`正在啟動 ${e}`,cancel:`取消`,asleep:`網站預覽需要 Agent 處於喚醒狀態。`,edit:`編輯`,hosting:{publish:`發布`,update:`更新`,settings:`網站設定`,preview:`預覽`,unpublished:`有未發布的變更`,address:`網址`,first:`發布這個網站`,firstNote:`知道網址的人都能看到。`,publishing:`正在發布…`,notPublished:`沒有發布成功,請再試一次。`,askTitle:`請在瀏覽器中確認`,ask:`網站第一次發布需要在瀏覽器中確認。`,openAgain:`再次開啟`,versions:`版本`,live:`線上`,rollBack:`復原`,makeLive:`設為上線`,elsewhere:`由其他團隊發布`,elsewhereNote:`這個資料夾指向另一個團隊的網站。發布會為你新建一個網站,他們的保持不變。知道網址的人都能看到。`,slug:{length:(e,t)=>`網址為 ${String(e)} 到 ${String(t)} 個字元。`,characters:`只能用小寫字母、數字和連字號。`,hyphenEnds:`網址不能以連字號開頭或結尾。`,doubleHyphen:`網址裡不能有兩個連續的連字號。`,reserved:`這個網址是保留的。`},unavailable:e=>`${e} 無法使用。`,agent:`允許 agent 更新線上網站`,search:`在搜尋引擎中顯示`,unpublish:`取消發布`,unpublishNote:`一分鐘內讓網站下線,網址和版本都會保留。`,remove:`刪除網站`,removeNote:e=>`${e} 將永久下線,這個網址也不能再使用。`}},ja:{starting:`ウェブサイトを起動しています…`,startingJob:e=>`${e} を起動しています`,cancel:`キャンセル`,asleep:`ウェブサイトのプレビューにはエージェントが起きている必要があります。`,edit:`編集`,hosting:{publish:`公開`,update:`更新`,settings:`ウェブサイトの設定`,preview:`プレビュー`,unpublished:`未公開の変更`,address:`アドレス`,first:`このウェブサイトを公開`,firstNote:`アドレスを知っている人は誰でも見られます。`,publishing:`公開しています…`,notPublished:`公開できませんでした。もう一度お試しください。`,askTitle:`ブラウザで確認してください`,ask:`サイトの最初の公開はブラウザで確認します。`,openAgain:`もう一度開く`,versions:`バージョン`,live:`公開中`,rollBack:`戻す`,makeLive:`公開する`,elsewhere:`別のチームが公開`,elsewhereNote:`このフォルダーは別のチームのサイトを指しています。公開するとあなたの新しいサイトができ、相手のサイトはそのままです。アドレスを知っている人は誰でも見られます。`,slug:{length:(e,t)=>`アドレスは ${String(e)}〜${String(t)} 文字です。`,characters:`小文字、数字、ハイフンだけが使えます。`,hyphenEnds:`アドレスの最初と最後にハイフンは使えません。`,doubleHyphen:`ハイフンを2つ続けては使えません。`,reserved:`このアドレスは予約されています。`},unavailable:e=>`${e} は使えません。`,agent:`公開中のサイトをエージェントに更新させる`,search:`検索エンジンに表示`,unpublish:`非公開にする`,unpublishNote:`1 分以内にサイトを非公開にします。アドレスとバージョンは残ります。`,remove:`サイトを削除`,removeNote:e=>`${e} は完全にオフラインになり、このアドレスは二度と使えません。`}},ko:{starting:`웹사이트를 시작하는 중…`,startingJob:e=>`${e} 시작하는 중`,cancel:`취소`,asleep:`웹사이트 미리보기는 에이전트가 깨어 있어야 합니다.`,edit:`편집`,hosting:{publish:`게시`,update:`업데이트`,settings:`웹사이트 설정`,preview:`미리 보기`,unpublished:`게시되지 않은 변경 사항`,address:`주소`,first:`이 웹사이트 게시`,firstNote:`주소를 아는 사람은 누구나 볼 수 있습니다.`,publishing:`게시 중…`,notPublished:`게시되지 않았습니다. 다시 시도해 주세요.`,askTitle:`브라우저에서 확인하세요`,ask:`사이트의 첫 게시는 브라우저에서 확인합니다.`,openAgain:`다시 열기`,versions:`버전`,live:`게시 중`,rollBack:`되돌리기`,makeLive:`게시하기`,elsewhere:`다른 팀이 게시함`,elsewhereNote:`이 폴더는 다른 팀의 사이트를 가리킵니다. 게시하면 내 사이트가 새로 만들어지고, 그 팀의 사이트는 그대로 남습니다. 주소를 아는 사람은 누구나 볼 수 있습니다.`,slug:{length:(e,t)=>`주소는 ${String(e)}~${String(t)}자입니다.`,characters:`소문자, 숫자, 하이픈만 쓸 수 있습니다.`,hyphenEnds:`주소는 하이픈으로 시작하거나 끝날 수 없습니다.`,doubleHyphen:`하이픈을 두 개 연달아 쓸 수 없습니다.`,reserved:`예약된 주소입니다.`},unavailable:e=>`${e}은(는) 사용할 수 없습니다.`,agent:`에이전트가 게시된 사이트를 업데이트하도록 허용`,search:`검색 엔진에 표시`,unpublish:`게시 취소`,unpublishNote:`1분 안에 사이트를 내립니다. 주소와 버전은 그대로 남습니다.`,remove:`사이트 삭제`,removeNote:e=>`${e} 영구히 오프라인이 되며, 이 주소는 다시 사용할 수 없습니다.`}},es:{starting:`Iniciando el sitio web…`,startingJob:e=>`Iniciando ${e}`,cancel:`Cancelar`,asleep:`La vista previa de un sitio web necesita al agente despierto.`,edit:`Editar`,hosting:{publish:`Publicar`,update:`Actualizar`,settings:`Ajustes del sitio web`,preview:`Vista previa`,unpublished:`Cambios sin publicar`,address:`Dirección`,first:`Publicar este sitio web`,firstNote:`Cualquiera con la dirección puede verlo.`,publishing:`Publicando…`,notPublished:`No se publicó. Inténtalo de nuevo.`,askTitle:`Confirma en tu navegador`,ask:`La primera publicación de un sitio se confirma en tu navegador.`,openAgain:`Abrir de nuevo`,versions:`Versiones`,live:`En línea`,rollBack:`Restaurar`,makeLive:`Poner en línea`,elsewhere:`Publicado por otro equipo`,elsewhereNote:`Esta carpeta es del sitio de otro equipo. Al publicar se crea uno nuevo tuyo; el suyo queda como está. Cualquiera con la dirección puede verlo.`,slug:{length:(e,t)=>`Una dirección tiene de ${String(e)} a ${String(t)} caracteres.`,characters:`Usa minúsculas, números y guiones.`,hyphenEnds:`Una dirección no empieza ni termina con guion.`,doubleHyphen:`Una dirección no lleva dos guiones seguidos.`,reserved:`Esa dirección está reservada.`},unavailable:e=>`${e} no está disponible.`,agent:`Dejar que el agente actualice el sitio publicado`,search:`Mostrar en buscadores`,unpublish:`Retirar`,unpublishNote:`Desconecta el sitio en menos de un minuto. Conserva su dirección y sus versiones.`,remove:`Eliminar sitio`,removeNote:e=>`${e} deja de estar en línea para siempre, y la dirección no podrá volver a usarse.`}},fr:{starting:`Démarrage du site web…`,startingJob:e=>`Démarrage de ${e}`,cancel:`Annuler`,asleep:`L'aperçu d'un site web nécessite que l'agent soit éveillé.`,edit:`Modifier`,hosting:{publish:`Publier`,update:`Mettre à jour`,settings:`Réglages du site web`,preview:`Aperçu`,unpublished:`Modifications non publiées`,address:`Adresse`,first:`Publier ce site web`,firstNote:`Toute personne ayant l'adresse peut le voir.`,publishing:`Publication…`,notPublished:`Ce n’a pas été publié. Réessayez.`,askTitle:`Confirmez dans votre navigateur`,ask:`La première publication d'un site se confirme dans votre navigateur.`,openAgain:`Rouvrir`,versions:`Versions`,live:`En ligne`,rollBack:`Restaurer`,makeLive:`Mettre en ligne`,elsewhere:`Publié par une autre équipe`,elsewhereNote:`Ce dossier désigne le site d’une autre équipe. Publier en crée un nouveau à vous ; le leur reste tel quel. Toute personne ayant l’adresse peut le voir.`,slug:{length:(e,t)=>`Une adresse compte de ${String(e)} à ${String(t)} caractères.`,characters:`Utilisez des minuscules, des chiffres et des tirets.`,hyphenEnds:`Une adresse ne commence ni ne finit par un tiret.`,doubleHyphen:`Une adresse n’a pas deux tirets d’affilée.`,reserved:`Cette adresse est réservée.`},unavailable:e=>`${e} n’est pas disponible.`,agent:`Laisser l'agent mettre à jour le site en ligne`,search:`Afficher dans les moteurs de recherche`,unpublish:`Dépublier`,unpublishNote:`Met le site hors ligne en moins d’une minute. Il garde son adresse et ses versions.`,remove:`Supprimer le site`,removeNote:e=>`${e} est mis hors ligne définitivement, et l'adresse ne pourra plus jamais servir.`}},de:{starting:`Website wird gestartet…`,startingJob:e=>`${e} wird gestartet`,cancel:`Abbrechen`,asleep:`Die Vorschau einer Website braucht einen wachen Agenten.`,edit:`Bearbeiten`,hosting:{publish:`Veröffentlichen`,update:`Aktualisieren`,settings:`Website-Einstellungen`,preview:`Vorschau`,unpublished:`Unveröffentlichte Änderungen`,address:`Adresse`,first:`Diese Website veröffentlichen`,firstNote:`Jeder mit der Adresse kann sie sehen.`,publishing:`Wird veröffentlicht…`,notPublished:`Es wurde nicht veröffentlicht. Versuche es noch einmal.`,askTitle:`Im Browser bestätigen`,ask:`Die erste Veröffentlichung einer Website wird im Browser bestätigt.`,openAgain:`Erneut öffnen`,versions:`Versionen`,live:`Live`,rollBack:`Zurücksetzen`,makeLive:`Live schalten`,elsewhere:`Von einem anderen Team veröffentlicht`,elsewhereNote:`Dieser Ordner gehört zur Website eines anderen Teams. Beim Veröffentlichen entsteht eine neue von dir; ihre bleibt, wie sie ist. Jeder mit der Adresse kann sie sehen.`,slug:{length:(e,t)=>`Eine Adresse hat ${String(e)} bis ${String(t)} Zeichen.`,characters:`Nur Kleinbuchstaben, Ziffern und Bindestriche.`,hyphenEnds:`Eine Adresse beginnt und endet nicht mit einem Bindestrich.`,doubleHyphen:`Eine Adresse hat keine zwei Bindestriche hintereinander.`,reserved:`Diese Adresse ist reserviert.`},unavailable:e=>`${e} ist nicht verfügbar.`,agent:`Den Agenten die Live-Website aktualisieren lassen`,search:`In Suchmaschinen anzeigen`,unpublish:`Offline nehmen`,unpublishNote:`Nimmt die Website innerhalb einer Minute offline. Adresse und Versionen bleiben.`,remove:`Website löschen`,removeNote:e=>`${e} geht endgültig offline, und die Adresse kann nie wieder verwendet werden.`}},pt:{starting:`Iniciando o site…`,startingJob:e=>`Iniciando ${e}`,cancel:`Cancelar`,asleep:`A prévia de um site precisa do agente acordado.`,edit:`Editar`,hosting:{publish:`Publicar`,update:`Atualizar`,settings:`Configurações do site`,preview:`Pré-visualização`,unpublished:`Alterações não publicadas`,address:`Endereço`,first:`Publicar este site`,firstNote:`Qualquer pessoa com o endereço pode vê-lo.`,publishing:`Publicando…`,notPublished:`Não foi publicado. Tente de novo.`,askTitle:`Confirme no navegador`,ask:`A primeira publicação de um site é confirmada no navegador.`,openAgain:`Abrir de novo`,versions:`Versões`,live:`No ar`,rollBack:`Restaurar`,makeLive:`Pôr no ar`,elsewhere:`Publicado por outra equipe`,elsewhereNote:`Esta pasta aponta para o site de outra equipe. Publicar cria um novo seu; o deles continua como está. Qualquer pessoa com o endereço pode vê-lo.`,slug:{length:(e,t)=>`Um endereço tem de ${String(e)} a ${String(t)} caracteres.`,characters:`Use letras minúsculas, números e hifens.`,hyphenEnds:`Um endereço não começa nem termina com hífen.`,doubleHyphen:`Um endereço não tem dois hifens seguidos.`,reserved:`Esse endereço é reservado.`},unavailable:e=>`${e} não está disponível.`,agent:`Deixar o agente atualizar o site no ar`,search:`Mostrar em buscadores`,unpublish:`Tirar do ar`,unpublishNote:`Deixa o site offline em até um minuto. Ele mantém o endereço e as versões.`,remove:`Excluir site`,removeNote:e=>`${e} sai do ar para sempre, e o endereço nunca mais poderá ser usado.`}}});function We({className:e}){let t=n();if(t===void 0)return null;let r=u(t.locale),{id:i,entry:a}=t.item;return(0,q.jsx)(qe,{id:i,entry:a,said:{w:$.of(r),tag:p[r]},className:e},i)}function Ge(e){let[t,n]=(0,K.useState)(0);return c(e,()=>{n(e=>e+1)}),t}function Ke(e){try{let t=JSON.parse(e).dev;return typeof t!=`string`||t.trim()===``}catch{return!1}}function qe({id:e,entry:t,said:n,className:c}){let u=s(),{w:p}=n,m=e.slice(e.lastIndexOf(`/`)+1),[h,g]=(0,K.useState)({at:`starting`}),[_,v]=(0,K.useState)(0),[y,b]=(0,K.useState)(!1),x=Ge(e),S=Ne(t),C=ze(e,x,S),w=h.at===`failed`?x:void 0,T=o(),E=h.at===`asleep`?T:void 0;(0,K.useEffect)(()=>{let t=!0;return Y(u,`website/preview`,{item:e}).then(({url:e})=>{t&&g({at:`ready`,url:e})},e=>{t&&g(ee(e)?{at:`asleep`}:{at:`failed`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!1}},[u,e,_,w,E]);let[D,O]=(0,K.useState)(!1);(0,K.useEffect)(()=>{let e=!0;return u[`files/read`]({path:t}).then(({text:t})=>{e&&O(Ke(t))},()=>void 0),()=>{e=!1}},[u,t,x]);let k=h.at===`failed`;a(`jobs/changed`,({job:e,item:n})=>{k&&n===t&&e.what===`start`&&e.state===`running`&&(g({at:`starting`}),v(e=>e+1))});let A=(0,K.useRef)(null);i({hold:()=>Promise.resolve({key:`website@${e}@${crypto.randomUUID()}`,what:m,source:{path:t}}),locate:()=>Promise.resolve({elements:[]})});let j=()=>{let e=A.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0},M=(0,K.useRef)(void 0),N=()=>M.current??Promise.resolve(void 0);return r({element:()=>A.current,hold:()=>{let t=j();return M.current=t?Y(u,`website/hold`,{item:e,width:Math.round(t.width),height:Math.round(t.height),scale:Math.min(4,Math.max(1,window.devicePixelRatio))}).then(e=>e.hold,()=>void 0):Promise.resolve(void 0),M.current.then(()=>void 0)},release:()=>{let e=M.current;M.current=void 0,e?.then(e=>e===void 0?void 0:Y(u,`website/release`,{hold:e}).catch(()=>void 0))},pictures:async()=>{let t=j();if(!t)return[];let n=await N(),{image:r}=await Y(u,`website/still`,{item:e,width:Math.round(t.width),height:Math.round(t.height),scale:Math.min(4,Math.max(1,window.devicePixelRatio)),...n===void 0?{}:{hold:n}});return[{...r,rect:t}]},locate:async n=>{let r=j(),i=r?l(n).map(e=>({x:e.x-r.x,y:e.y-r.y})).filter(e=>e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height):[],a=await N(),o=r&&i.length>0?await Y(u,`website/at`,{item:e,width:Math.round(r.width),height:Math.round(r.height),points:i,...a===void 0?{}:{hold:a}}).catch(()=>void 0):void 0,s=o?.page??``;return{elements:o&&o.elements.length>0?o.elements.map(e=>({name:`the element ${e.selector} of the page ${s}`,source:{path:t},...e.text===``?{}:{text:e.text}})):[{name:`the page of the website ${m}`,source:{path:t}}],where:`on the website ${m}${s===``?``:` at ${s}`}, as its dev server serves it`}}}),h.at===`asleep`?(0,q.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,c),children:[(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:p.asleep}),(0,q.jsx)(f,{size:`xs`,onClick:()=>{u[`edit/request`]({}).catch(()=>void 0)},children:p.edit})]}):(0,q.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col`,c),children:[(0,q.jsx)(He,{hosting:C,said:n,settings:y,onSettings:()=>{b(e=>!e)}}),(0,q.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[h.at===`ready`&&(0,q.jsx)(`iframe`,{ref:A,title:m,src:h.url,"data-testid":`site`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,className:`absolute inset-0 size-full border-0 bg-page`},D?x:void 0),h.at===`starting`&&(0,q.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm text-lead`,children:(0,q.jsx)(Je,{job:Pe(S,`start`),name:m,w:p})}),h.at===`failed`&&(0,q.jsx)(pe,{className:`absolute inset-0 flex items-center justify-center`}),y&&C.status?.detail!==void 0&&(0,q.jsx)(Ue,{hosting:C,said:n})]})]})}function Je({job:e,name:t,w:n}){if(e===void 0)return(0,q.jsx)(`span`,{className:`animate-pulse`,children:n.starting});let r=Oe(e);return(0,q.jsxs)(`span`,{role:`status`,className:`flex flex-col items-center gap-2`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[r===void 0&&(0,q.jsx)(re,{className:`text-ink`}),n.startingJob(e.name??t)]}),r!==void 0&&(0,q.jsx)(ie,{value:r*100,className:`h-1 w-48`})]})}export{$ as WORDS,We as default};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{b as t,c as n,d as r,f as i,l as a,m as o,s,u as c}from"./react-Byupo4pA.js";import{Et as l,bt as u,ht as d,n as f,vt as p,yt as m}from"./x-BAJilkKD.js";import{C as h,D as g,S as _,T as v,_ as y,a as b,b as x,h as S,l as C,s as w,v as T}from"./schemas-DlRAoVtq.js";import{t as E}from"./iso-UwGLGD3F.js";import{F as D,M as O,f as k,h as A,j,m as M,o as ee,p as N,x as te}from"./snapshots-DYooVfOx.js";import{t as ne}from"./jsx-runtime-DePvh3-m.js";import{n as re,t as ie}from"./progress-D1Uv3d1b.js";import{t as ae}from"./switch-b6GCy_ix.js";import{i as oe,n as se,r as ce,t as le}from"./hint-F4fIBnVU.js";import{t as ue}from"./createLucideIcon-euu7Wcd9.js";import{a as de,b as fe,c as P,l as F,o as I,s as L,u as R}from"./index-D-MNVykg.js";import{t as pe}from"./updating-Cbxw83_O.js";import{t as me}from"./surface-BUoi7cmR.js";var z={files:2e4,bytes:5368709120,redirects:2e3,headers:100},B={min:3,max:40},he=new Set(`abuse.account.accounts.admin.administrator.allyhub.api.app.assets.auth.autoconfig.autodiscover.billing.blog.cdn.dashboard.dev.dns.docs.download.downloads.ftp.help.hostmaster.imap.login.mail.mta-sts.ns1.ns2.ops.pop.postmaster.preview.root.security.signin.smtp.staging.static.status.studio.support.test.webmaster.wpad.www`.split(`.`));function V(e){if(e.length<B.min||e.length>B.max)return`length`;if(!/^[a-z0-9-]+$/u.test(e))return`characters`;if(e.startsWith(`-`)||e.endsWith(`-`))return`hyphenEnds`;if(e.includes(`--`))return`doubleHyphen`;if(he.has(e))return`reserved`}var ge={length:`An address is ${String(B.min)} to ${String(B.max)} characters.`,characters:`An address is lowercase letters, digits and hyphens.`,hyphenEnds:`An address neither starts nor ends with a hyphen.`,doubleHyphen:`An address does not have two hyphens in a row.`,reserved:`That address is reserved.`};function _e(e){let t=V(e);return t===void 0?void 0:ge[t]}var ve=h().superRefine((e,t)=>{let n=_e(e);n!==void 0&&t.addIssue({code:`custom`,message:n})}),ye=[200,301,302,303,307,308,404,410],H=h().min(1).max(1024).regex(/^\/[^\s]*$/u,`A rule's path starts with /.`),be=_({from:H,to:h().min(1).max(2048).regex(/^(\/[^\s]*|https?:\/\/[^\s]+)$/u,`A rule goes to a path or an http(s) address.`),status:v(ye.map(e=>S(e))),force:C()}),xe=new Set([`accept-ranges`,`connection`,`content-encoding`,`content-length`,`content-range`,`date`,`keep-alive`,`set-cookie`,`strict-transport-security`,`trailer`,`transfer-encoding`,`upgrade`,`x-content-type-options`]),Se=h().regex(/^[A-Za-z0-9-]+$/u).max(128).refine(e=>!xe.has(e.toLowerCase()),`That header is the platform's.`),Ce=_({for:H,set:x(Se,h().max(2048))});_({format:S(1),files:x(M,N),redirects:w(be).max(z.redirects),headers:w(Ce).max(z.headers)});var U=[`upload`,`git`],W=_({kind:b(U),commit:h().min(1).max(64).optional(),digest:k.optional()}),we=T({id:h(),siteId:h(),source:T({...W.shape,kind:A(U)}),note:h().nullable(),files:y(),bytes:y(),createdBy:h(),createdAt:E(),live:C()}),G=T({id:h(),slug:h(),name:h(),url:g(),liveDeployment:h().nullable(),approved:C(),autoPublish:C(),indexing:C(),createdAt:E()});_({slug:ve,name:h().min(1).max(255)}),T({sites:w(G),domain:h(),hosting:C()});var Te=T({site:G,deployments:w(we)});_({manifest:k,source:W,note:h().max(500).optional()}),T({site:G,deployment:we}),T({site:G,live:C(),confirm:g().optional()}),_({autoPublish:C().optional(),indexing:C().optional()});var Ee=ue(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),De=e=>e.state===`running`||e.state===`queued`;function Oe(e){if(e.state===`done`)return 1;if(!(e.total===void 0||e.total<=0))return Math.min(1,Math.max(0,e.completed/e.total))}var K=e(t(),1),q=ne(),J=_({item:j}),ke=_({hosting:C(),detail:Te.optional(),elsewhere:C().optional(),changed:C().optional(),slug:h().optional(),domain:h().optional()}),Ae={confirm:h().optional()},je={"website/preview":D(J,_({url:h()}),`A website's address as its own dev server serves it, for a frame: its dependencies installed if it has none, then its website.json's dev command on a free port; it answers once the page does.`),"website/still":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),scale:y().positive().max(4).default(1),hold:h().optional()}),_({image:_({mime:h(),data:h()})}),`A website's page as its own dev server serves it, drawn at a frame's size from its top: what Mark up lays over a website's frame where the window cannot read another origin's pixels.`),"website/hold":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),scale:y().positive().max(4).default(1)}),_({hold:h()}),`A website's page opened at a frame's size and kept as it is while a person marks it: website/still and website/at draw and read it as it was, until website/release.`),"website/release":D(_({hold:h()}),_({}),`Lets a page held for notes go.`),"website/at":D(J.extend({width:y().int().positive().max(4096),height:y().int().positive().max(4096),points:w(_({x:y(),y:y()})).min(1).max(24),hold:h().optional()}),_({page:h(),elements:w(_({selector:h(),tag:h(),text:h()}))}),`What is at places of a website's page as its own dev server serves it, drawn at a frame's size from its top (as website/still draws it): what a person's mark on its frame is on.`),"website/status":D(J,ke,`A website's hosted site, its versions, and whether what is here differs from what is live; where the server has no person's sign-in, not hosted.`),"website/publish":D(J.extend({slug:h().optional(),note:h().optional(),anew:C().optional()}),_({live:C(),url:h(),...Ae}),"Builds a website, uploads it as a version and makes it live, for the person who pressed Publish. The first time, it waits for their yes in a browser (`confirm`, a page to open there)."),"website/live":D(J.extend({version:h().min(1)}),_({live:C(),...Ae}),`Makes a version what the site serves, as the person asked.`),"website/settings":D(J.extend({autoPublish:C().optional(),indexing:C().optional()}),_({}),`Changes what the person controls of a site.`),"website/unpublish":D(J,_({}),`Takes a site offline; it keeps its address and versions.`),"website/remove":D(J,_({}),`Takes a site offline for good. Its address is never given to anyone else.`)},Y=te(je);function X({className:e,...t}){return(0,q.jsx)(me,{className:d(`divide-y divide-rule`,e),...t})}function Z({icon:e,label:t,detail:n,children:r,className:i}){return(0,q.jsxs)(`div`,{"data-slot":`setting-row`,className:d(`flex items-center gap-4 px-4.5 py-4`,i),children:[e!==void 0&&(0,q.jsx)(`span`,{className:`-mr-1 flex-none`,children:e}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`div`,{className:`text-sm`,children:t}),n!==void 0&&(0,q.jsx)(`div`,{className:`mt-0.5 text-xs text-lead`,children:n})]}),r]})}function Me({label:e,detail:t,children:n}){return(0,q.jsxs)(`label`,{"data-slot":`setting-row`,className:`flex items-center gap-4 px-4.5 py-4 transition-colors has-[[role=checkbox]:not(:disabled),[role=switch]:not(:disabled)]:hover:bg-hover`,children:[(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block text-sm`,children:e}),t!==void 0&&(0,q.jsx)(`span`,{className:`mt-0.5 block text-xs text-lead`,children:t})]}),n]})}function Ne(e){let[t,n]=(0,K.useState)([]);return a(`jobs/changed`,({job:t,item:r})=>{r===e&&n(e=>[...e.filter(e=>e.id!==t.id),t])}),t}var Pe=(e,t)=>e.findLast(e=>(t===void 0||e.what===t)&&De(e)),Fe=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function Ie(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e-n;for(let[e,t]of Fe)if(Math.abs(i)>=t)return r.format(Math.round(i/t),e);return r.format(0,`minute`)}var Q={content:`max-w-[min(28rem,calc(100%-2rem))]`,header:`text-left`,footer:`flex-row justify-end`},Le=e=>e instanceof Error?e.message:String(e),Re=(e,t)=>({message:Le(e),...t!==void 0&&typeof e==`object`&&e&&e.code===O.conflict?{refused:t}:{}});function ze(e,t,n){let r=s(),[i,a]=(0,K.useState)(),[o,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(),[d,f]=(0,K.useState)(),p=(0,K.useCallback)(()=>Y(r,`website/status`,{item:e}).then(e=>{a(e),e.detail?.site.liveDeployment!=null&&f(void 0)}),[r,e]);(0,K.useEffect)(()=>{let e=()=>{p().catch(()=>void 0)};e();let t=()=>{document.visibilityState===`visible`&&e()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,t)}},[r,p,t]);let m=(0,K.useCallback)((e,t)=>{c(!0),u(void 0),e().then(p).catch(e=>{u(Re(e,t))}).finally(()=>{c(!1)})},[p]),h=(0,K.useCallback)(e=>{r[`items/open`]({target:{type:`browser`,url:e}}).catch(()=>void 0)},[r]),g=(0,K.useCallback)(e=>{e.confirm!==void 0&&(f(e.confirm),h(e.confirm))},[h]),_={item:e};return{status:i,publishing:Pe(n,`publish`),busy:o,failure:l,confirm:d,stopWaiting:()=>{f(void 0)},openAgain:()=>{d!==void 0&&h(d)},publish:(e={})=>{m(()=>Y(r,`website/publish`,{..._,...e}).then(g),e.slug)},goLive:e=>{m(()=>Y(r,`website/live`,{..._,version:e}).then(g))},settings:e=>{m(()=>Y(r,`website/settings`,{..._,...e}))},unpublish:()=>{m(()=>Y(r,`website/unpublish`,_))},remove:()=>{m(()=>Y(r,`website/remove`,_))}}}function Be({words:e,from:t=`center`,children:n}){return(0,q.jsx)(le,{disableHoverableContent:!0,children:(0,q.jsxs)(ce,{children:[(0,q.jsx)(se,{asChild:!0,children:(0,q.jsx)(`span`,{className:`flex min-w-0`,children:n})}),(0,q.jsx)(oe,{side:`top`,align:t,sideOffset:6,collisionPadding:8,children:e})]})})}var Ve=e=>new URL(e).host;function He({hosting:e,said:t,settings:n,onSettings:r}){let i=t.w.hosting,{status:a,busy:o,failure:s,confirm:c,publishing:l}=e,[u,d]=(0,K.useState)(!1),[p,m]=(0,K.useState)(),h=a?.detail?.site,g=h?.liveDeployment!=null,_=p??a?.slug??``,v=_===``?void 0:V(_),y=!o&&_!==``&&v===void 0,b=v===`length`?i.slug.length(B.min,B.max):v===void 0?s?.refused===_?i.unavailable(`${_}.${a?.domain??``}`):void 0:i.slug[v];return a?.hosting===!0?(0,q.jsxs)(`div`,{className:`flex h-10 flex-none items-center gap-2 border-b border-rule bg-sheet px-3`,children:[g&&(0,q.jsxs)(`a`,{href:h.url,target:`_blank`,rel:`noreferrer`,className:`flex min-w-0 items-center gap-1.5 truncate font-mono text-xs text-lead hover:text-ink`,children:[(0,q.jsx)(fe,{"aria-hidden":!0,className:`size-3.5 flex-none`}),Ve(h.url)]}),(0,q.jsx)(`span`,{className:`flex-1`}),s!==void 0&&s.refused===void 0&&!u&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-problem-text`,children:i.notPublished}),a.elsewhere===!0&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-lead`,children:i.elsewhere}),g&&(0,q.jsx)(`span`,{className:`text-xs whitespace-nowrap text-lead`,children:a.changed===!0?i.unpublished:i.live}),(0,q.jsx)(Be,{words:n?i.preview:i.settings,from:`end`,children:(0,q.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":n?i.preview:i.settings,"aria-pressed":n,disabled:h===void 0,onClick:r,children:(0,q.jsx)(Ee,{"aria-hidden":!0})})}),(0,q.jsxs)(f,{size:`xs`,disabled:o,onClick:()=>{h===void 0?d(!0):e.publish()},children:[l!==void 0&&(0,q.jsx)(re,{value:Oe(l)}),o?i.publishing:g?i.update:i.publish]}),(0,q.jsx)(I,{open:u&&c===void 0&&h===void 0,onOpenChange:d,children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:i.first})}),(0,q.jsxs)(`form`,{className:`contents`,onSubmit:t=>{t.preventDefault(),y&&e.publish({slug:_,...a.elsewhere===!0?{anew:!0}:{}})},children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(de,{"aria-label":i.address,"aria-invalid":b!==void 0,"aria-describedby":`site-address-why`,value:_,onChange:e=>{m(e.target.value.toLowerCase())},className:`font-mono`}),(0,q.jsxs)(`span`,{className:`font-mono text-sm text-lead`,children:[`.`,a.domain]})]}),(0,q.jsx)(`p`,{id:`site-address-why`,role:`status`,className:`min-h-5 text-sm text-problem-text`,children:b})]}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:a.elsewhere===!0?i.elsewhereNote:i.firstNote}),s!==void 0&&s.refused===void 0&&(0,q.jsx)(`p`,{className:`text-sm text-problem-text`,children:i.notPublished}),(0,q.jsx)(P,{className:Q.footer,children:(0,q.jsx)(f,{type:`submit`,disabled:!y,children:o?i.publishing:i.publish})})]})]})}),(0,q.jsx)(I,{open:c!==void 0&&!g,onOpenChange:t=>{t||e.stopWaiting()},children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:i.askTitle})}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:i.ask}),(0,q.jsxs)(P,{className:Q.footer,children:[(0,q.jsx)(f,{variant:`outline`,onClick:e.stopWaiting,children:t.w.cancel}),(0,q.jsx)(f,{autoFocus:!0,onClick:e.openAgain,children:i.openAgain})]})]})})]}):null}function Ue({hosting:e,said:t}){let n=t.w.hosting,{tag:r}=t,[i,a]=(0,K.useState)(!1),{status:o,busy:s}=e,c=o?.detail;if(c===void 0)return null;let{site:l,deployments:u}=c,d=Ve(l.url),p=u.find(e=>e.live)?.createdAt,m=e=>p!==void 0&&Date.parse(e)<Date.parse(p);return(0,q.jsxs)(`div`,{className:`absolute inset-0 overflow-y-auto bg-sheet`,children:[(0,q.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col gap-6 px-6 py-8`,children:[(0,q.jsxs)(X,{children:[(0,q.jsx)(Z,{label:n.address,children:(0,q.jsx)(`a`,{href:l.url,target:`_blank`,rel:`noreferrer`,className:`font-mono text-sm hover:underline`,children:d})}),(0,q.jsx)(Me,{label:n.agent,children:(0,q.jsx)(ae,{checked:l.autoPublish,disabled:s,onCheckedChange:t=>{e.settings({autoPublish:t})}})}),(0,q.jsx)(Me,{label:n.search,children:(0,q.jsx)(ae,{checked:l.indexing,disabled:s,onCheckedChange:t=>{e.settings({indexing:t})}})})]}),(0,q.jsxs)(`section`,{children:[(0,q.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:n.versions}),(0,q.jsx)(X,{children:u.map(t=>(0,q.jsx)(Z,{label:t.note??Ie(Date.parse(t.createdAt),r),detail:t.note===null?void 0:Ie(Date.parse(t.createdAt),r),children:t.live?(0,q.jsx)(`span`,{className:`text-xs text-lead`,children:n.live}):(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:()=>{e.goLive(t.id)},children:m(t.createdAt)?n.rollBack:n.makeLive})},t.id))})]}),(0,q.jsxs)(X,{children:[l.liveDeployment!==null&&(0,q.jsx)(Z,{label:n.unpublishNote,children:(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:e.unpublish,children:n.unpublish})}),(0,q.jsx)(Z,{label:n.removeNote(d),children:(0,q.jsx)(f,{variant:`outline`,size:`xs`,disabled:s,onClick:()=>{a(!0)},children:n.remove})})]})]}),(0,q.jsx)(I,{open:i,onOpenChange:a,children:(0,q.jsxs)(L,{className:Q.content,children:[(0,q.jsx)(F,{className:Q.header,children:(0,q.jsx)(R,{className:`font-serif`,children:n.remove})}),(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:n.removeNote(d)}),(0,q.jsxs)(P,{className:Q.footer,children:[(0,q.jsx)(f,{variant:`outline`,onClick:()=>{a(!1)},children:t.w.cancel}),(0,q.jsx)(f,{variant:`destructive`,onClick:()=>{a(!1),e.remove()},children:n.remove})]})]})})]})}var $=m({en:{starting:`Starting the website…`,startingJob:e=>`Starting ${e}`,cancel:`Cancel`,asleep:`A website's preview needs the agent awake.`,edit:`Edit`,hosting:{publish:`Publish`,update:`Update`,settings:`Website settings`,preview:`Preview`,unpublished:`Unpublished changes`,address:`Address`,first:`Publish this website`,firstNote:`Anyone with the address can see it.`,publishing:`Publishing…`,notPublished:`It was not published. Try again.`,askTitle:`Confirm in your browser`,ask:`A site's first publish is confirmed in your browser.`,openAgain:`Open again`,versions:`Versions`,live:`Live`,rollBack:`Roll back`,makeLive:`Make live`,elsewhere:`Published by another team`,elsewhereNote:`This folder names another team’s site. Publishing makes a new one of yours; theirs stays as it is. Anyone with the address can see it.`,slug:{length:(e,t)=>`An address is ${String(e)} to ${String(t)} characters.`,characters:`Use lowercase letters, digits and hyphens.`,hyphenEnds:`An address can’t start or end with a hyphen.`,doubleHyphen:`An address can’t have two hyphens in a row.`,reserved:`That address is reserved.`},unavailable:e=>`${e} is not available.`,agent:`Let the agent update the live site`,search:`Show in search engines`,unpublish:`Unpublish`,unpublishNote:`Takes the site offline within a minute. It keeps its address and versions.`,remove:`Delete site`,removeNote:e=>`${e} goes offline for good, and its address can never be used again.`}},"zh-cn":{starting:`正在启动网站…`,startingJob:e=>`正在启动 ${e}`,cancel:`取消`,asleep:`网站预览需要 Agent 处于唤醒状态。`,edit:`编辑`,hosting:{publish:`发布`,update:`更新`,settings:`网站设置`,preview:`预览`,unpublished:`有未发布的更改`,address:`地址`,first:`发布这个网站`,firstNote:`知道地址的人都能看到。`,publishing:`正在发布…`,notPublished:`没有发布成功,请再试一次。`,askTitle:`请在浏览器中确认`,ask:`网站第一次发布需要在浏览器中确认。`,openAgain:`再次打开`,versions:`版本`,live:`线上`,rollBack:`回滚`,makeLive:`设为上线`,elsewhere:`由其他团队发布`,elsewhereNote:`这个文件夹指向另一个团队的网站。发布会为你新建一个网站,他们的保持不变。知道地址的人都能看到。`,slug:{length:(e,t)=>`地址为 ${String(e)} 到 ${String(t)} 个字符。`,characters:`只能用小写字母、数字和连字符。`,hyphenEnds:`地址不能以连字符开头或结尾。`,doubleHyphen:`地址里不能有两个连续的连字符。`,reserved:`这个地址是保留的。`},unavailable:e=>`${e} 不可用。`,agent:`允许 agent 更新线上网站`,search:`在搜索引擎中显示`,unpublish:`取消发布`,unpublishNote:`一分钟内让网站下线,地址和版本都会保留。`,remove:`删除网站`,removeNote:e=>`${e} 将永久下线,这个地址也不能再使用。`}},"zh-tw":{starting:`正在啟動網站…`,startingJob:e=>`正在啟動 ${e}`,cancel:`取消`,asleep:`網站預覽需要 Agent 處於喚醒狀態。`,edit:`編輯`,hosting:{publish:`發布`,update:`更新`,settings:`網站設定`,preview:`預覽`,unpublished:`有未發布的變更`,address:`網址`,first:`發布這個網站`,firstNote:`知道網址的人都能看到。`,publishing:`正在發布…`,notPublished:`沒有發布成功,請再試一次。`,askTitle:`請在瀏覽器中確認`,ask:`網站第一次發布需要在瀏覽器中確認。`,openAgain:`再次開啟`,versions:`版本`,live:`線上`,rollBack:`復原`,makeLive:`設為上線`,elsewhere:`由其他團隊發布`,elsewhereNote:`這個資料夾指向另一個團隊的網站。發布會為你新建一個網站,他們的保持不變。知道網址的人都能看到。`,slug:{length:(e,t)=>`網址為 ${String(e)} 到 ${String(t)} 個字元。`,characters:`只能用小寫字母、數字和連字號。`,hyphenEnds:`網址不能以連字號開頭或結尾。`,doubleHyphen:`網址裡不能有兩個連續的連字號。`,reserved:`這個網址是保留的。`},unavailable:e=>`${e} 無法使用。`,agent:`允許 agent 更新線上網站`,search:`在搜尋引擎中顯示`,unpublish:`取消發布`,unpublishNote:`一分鐘內讓網站下線,網址和版本都會保留。`,remove:`刪除網站`,removeNote:e=>`${e} 將永久下線,這個網址也不能再使用。`}},ja:{starting:`ウェブサイトを起動しています…`,startingJob:e=>`${e} を起動しています`,cancel:`キャンセル`,asleep:`ウェブサイトのプレビューにはエージェントが起きている必要があります。`,edit:`編集`,hosting:{publish:`公開`,update:`更新`,settings:`ウェブサイトの設定`,preview:`プレビュー`,unpublished:`未公開の変更`,address:`アドレス`,first:`このウェブサイトを公開`,firstNote:`アドレスを知っている人は誰でも見られます。`,publishing:`公開しています…`,notPublished:`公開できませんでした。もう一度お試しください。`,askTitle:`ブラウザで確認してください`,ask:`サイトの最初の公開はブラウザで確認します。`,openAgain:`もう一度開く`,versions:`バージョン`,live:`公開中`,rollBack:`戻す`,makeLive:`公開する`,elsewhere:`別のチームが公開`,elsewhereNote:`このフォルダーは別のチームのサイトを指しています。公開するとあなたの新しいサイトができ、相手のサイトはそのままです。アドレスを知っている人は誰でも見られます。`,slug:{length:(e,t)=>`アドレスは ${String(e)}〜${String(t)} 文字です。`,characters:`小文字、数字、ハイフンだけが使えます。`,hyphenEnds:`アドレスの最初と最後にハイフンは使えません。`,doubleHyphen:`ハイフンを2つ続けては使えません。`,reserved:`このアドレスは予約されています。`},unavailable:e=>`${e} は使えません。`,agent:`公開中のサイトをエージェントに更新させる`,search:`検索エンジンに表示`,unpublish:`非公開にする`,unpublishNote:`1 分以内にサイトを非公開にします。アドレスとバージョンは残ります。`,remove:`サイトを削除`,removeNote:e=>`${e} は完全にオフラインになり、このアドレスは二度と使えません。`}},ko:{starting:`웹사이트를 시작하는 중…`,startingJob:e=>`${e} 시작하는 중`,cancel:`취소`,asleep:`웹사이트 미리보기는 에이전트가 깨어 있어야 합니다.`,edit:`편집`,hosting:{publish:`게시`,update:`업데이트`,settings:`웹사이트 설정`,preview:`미리 보기`,unpublished:`게시되지 않은 변경 사항`,address:`주소`,first:`이 웹사이트 게시`,firstNote:`주소를 아는 사람은 누구나 볼 수 있습니다.`,publishing:`게시 중…`,notPublished:`게시되지 않았습니다. 다시 시도해 주세요.`,askTitle:`브라우저에서 확인하세요`,ask:`사이트의 첫 게시는 브라우저에서 확인합니다.`,openAgain:`다시 열기`,versions:`버전`,live:`게시 중`,rollBack:`되돌리기`,makeLive:`게시하기`,elsewhere:`다른 팀이 게시함`,elsewhereNote:`이 폴더는 다른 팀의 사이트를 가리킵니다. 게시하면 내 사이트가 새로 만들어지고, 그 팀의 사이트는 그대로 남습니다. 주소를 아는 사람은 누구나 볼 수 있습니다.`,slug:{length:(e,t)=>`주소는 ${String(e)}~${String(t)}자입니다.`,characters:`소문자, 숫자, 하이픈만 쓸 수 있습니다.`,hyphenEnds:`주소는 하이픈으로 시작하거나 끝날 수 없습니다.`,doubleHyphen:`하이픈을 두 개 연달아 쓸 수 없습니다.`,reserved:`예약된 주소입니다.`},unavailable:e=>`${e}은(는) 사용할 수 없습니다.`,agent:`에이전트가 게시된 사이트를 업데이트하도록 허용`,search:`검색 엔진에 표시`,unpublish:`게시 취소`,unpublishNote:`1분 안에 사이트를 내립니다. 주소와 버전은 그대로 남습니다.`,remove:`사이트 삭제`,removeNote:e=>`${e} 영구히 오프라인이 되며, 이 주소는 다시 사용할 수 없습니다.`}},es:{starting:`Iniciando el sitio web…`,startingJob:e=>`Iniciando ${e}`,cancel:`Cancelar`,asleep:`La vista previa de un sitio web necesita al agente despierto.`,edit:`Editar`,hosting:{publish:`Publicar`,update:`Actualizar`,settings:`Ajustes del sitio web`,preview:`Vista previa`,unpublished:`Cambios sin publicar`,address:`Dirección`,first:`Publicar este sitio web`,firstNote:`Cualquiera con la dirección puede verlo.`,publishing:`Publicando…`,notPublished:`No se publicó. Inténtalo de nuevo.`,askTitle:`Confirma en tu navegador`,ask:`La primera publicación de un sitio se confirma en tu navegador.`,openAgain:`Abrir de nuevo`,versions:`Versiones`,live:`En línea`,rollBack:`Restaurar`,makeLive:`Poner en línea`,elsewhere:`Publicado por otro equipo`,elsewhereNote:`Esta carpeta es del sitio de otro equipo. Al publicar se crea uno nuevo tuyo; el suyo queda como está. Cualquiera con la dirección puede verlo.`,slug:{length:(e,t)=>`Una dirección tiene de ${String(e)} a ${String(t)} caracteres.`,characters:`Usa minúsculas, números y guiones.`,hyphenEnds:`Una dirección no empieza ni termina con guion.`,doubleHyphen:`Una dirección no lleva dos guiones seguidos.`,reserved:`Esa dirección está reservada.`},unavailable:e=>`${e} no está disponible.`,agent:`Dejar que el agente actualice el sitio publicado`,search:`Mostrar en buscadores`,unpublish:`Retirar`,unpublishNote:`Desconecta el sitio en menos de un minuto. Conserva su dirección y sus versiones.`,remove:`Eliminar sitio`,removeNote:e=>`${e} deja de estar en línea para siempre, y la dirección no podrá volver a usarse.`}},fr:{starting:`Démarrage du site web…`,startingJob:e=>`Démarrage de ${e}`,cancel:`Annuler`,asleep:`L'aperçu d'un site web nécessite que l'agent soit éveillé.`,edit:`Modifier`,hosting:{publish:`Publier`,update:`Mettre à jour`,settings:`Réglages du site web`,preview:`Aperçu`,unpublished:`Modifications non publiées`,address:`Adresse`,first:`Publier ce site web`,firstNote:`Toute personne ayant l'adresse peut le voir.`,publishing:`Publication…`,notPublished:`Ce n’a pas été publié. Réessayez.`,askTitle:`Confirmez dans votre navigateur`,ask:`La première publication d'un site se confirme dans votre navigateur.`,openAgain:`Rouvrir`,versions:`Versions`,live:`En ligne`,rollBack:`Restaurer`,makeLive:`Mettre en ligne`,elsewhere:`Publié par une autre équipe`,elsewhereNote:`Ce dossier désigne le site d’une autre équipe. Publier en crée un nouveau à vous ; le leur reste tel quel. Toute personne ayant l’adresse peut le voir.`,slug:{length:(e,t)=>`Une adresse compte de ${String(e)} à ${String(t)} caractères.`,characters:`Utilisez des minuscules, des chiffres et des tirets.`,hyphenEnds:`Une adresse ne commence ni ne finit par un tiret.`,doubleHyphen:`Une adresse n’a pas deux tirets d’affilée.`,reserved:`Cette adresse est réservée.`},unavailable:e=>`${e} n’est pas disponible.`,agent:`Laisser l'agent mettre à jour le site en ligne`,search:`Afficher dans les moteurs de recherche`,unpublish:`Dépublier`,unpublishNote:`Met le site hors ligne en moins d’une minute. Il garde son adresse et ses versions.`,remove:`Supprimer le site`,removeNote:e=>`${e} est mis hors ligne définitivement, et l'adresse ne pourra plus jamais servir.`}},de:{starting:`Website wird gestartet…`,startingJob:e=>`${e} wird gestartet`,cancel:`Abbrechen`,asleep:`Die Vorschau einer Website braucht einen wachen Agenten.`,edit:`Bearbeiten`,hosting:{publish:`Veröffentlichen`,update:`Aktualisieren`,settings:`Website-Einstellungen`,preview:`Vorschau`,unpublished:`Unveröffentlichte Änderungen`,address:`Adresse`,first:`Diese Website veröffentlichen`,firstNote:`Jeder mit der Adresse kann sie sehen.`,publishing:`Wird veröffentlicht…`,notPublished:`Es wurde nicht veröffentlicht. Versuche es noch einmal.`,askTitle:`Im Browser bestätigen`,ask:`Die erste Veröffentlichung einer Website wird im Browser bestätigt.`,openAgain:`Erneut öffnen`,versions:`Versionen`,live:`Live`,rollBack:`Zurücksetzen`,makeLive:`Live schalten`,elsewhere:`Von einem anderen Team veröffentlicht`,elsewhereNote:`Dieser Ordner gehört zur Website eines anderen Teams. Beim Veröffentlichen entsteht eine neue von dir; ihre bleibt, wie sie ist. Jeder mit der Adresse kann sie sehen.`,slug:{length:(e,t)=>`Eine Adresse hat ${String(e)} bis ${String(t)} Zeichen.`,characters:`Nur Kleinbuchstaben, Ziffern und Bindestriche.`,hyphenEnds:`Eine Adresse beginnt und endet nicht mit einem Bindestrich.`,doubleHyphen:`Eine Adresse hat keine zwei Bindestriche hintereinander.`,reserved:`Diese Adresse ist reserviert.`},unavailable:e=>`${e} ist nicht verfügbar.`,agent:`Den Agenten die Live-Website aktualisieren lassen`,search:`In Suchmaschinen anzeigen`,unpublish:`Offline nehmen`,unpublishNote:`Nimmt die Website innerhalb einer Minute offline. Adresse und Versionen bleiben.`,remove:`Website löschen`,removeNote:e=>`${e} geht endgültig offline, und die Adresse kann nie wieder verwendet werden.`}},pt:{starting:`Iniciando o site…`,startingJob:e=>`Iniciando ${e}`,cancel:`Cancelar`,asleep:`A prévia de um site precisa do agente acordado.`,edit:`Editar`,hosting:{publish:`Publicar`,update:`Atualizar`,settings:`Configurações do site`,preview:`Pré-visualização`,unpublished:`Alterações não publicadas`,address:`Endereço`,first:`Publicar este site`,firstNote:`Qualquer pessoa com o endereço pode vê-lo.`,publishing:`Publicando…`,notPublished:`Não foi publicado. Tente de novo.`,askTitle:`Confirme no navegador`,ask:`A primeira publicação de um site é confirmada no navegador.`,openAgain:`Abrir de novo`,versions:`Versões`,live:`No ar`,rollBack:`Restaurar`,makeLive:`Pôr no ar`,elsewhere:`Publicado por outra equipe`,elsewhereNote:`Esta pasta aponta para o site de outra equipe. Publicar cria um novo seu; o deles continua como está. Qualquer pessoa com o endereço pode vê-lo.`,slug:{length:(e,t)=>`Um endereço tem de ${String(e)} a ${String(t)} caracteres.`,characters:`Use letras minúsculas, números e hifens.`,hyphenEnds:`Um endereço não começa nem termina com hífen.`,doubleHyphen:`Um endereço não tem dois hifens seguidos.`,reserved:`Esse endereço é reservado.`},unavailable:e=>`${e} não está disponível.`,agent:`Deixar o agente atualizar o site no ar`,search:`Mostrar em buscadores`,unpublish:`Tirar do ar`,unpublishNote:`Deixa o site offline em até um minuto. Ele mantém o endereço e as versões.`,remove:`Excluir site`,removeNote:e=>`${e} sai do ar para sempre, e o endereço nunca mais poderá ser usado.`}}});function We({className:e}){let t=n();if(t===void 0)return null;let r=u(t.locale),{id:i,entry:a}=t.item;return(0,q.jsx)(qe,{id:i,entry:a,said:{w:$.of(r),tag:p[r]},className:e},i)}function Ge(e){let[t,n]=(0,K.useState)(0);return c(e,()=>{n(e=>e+1)}),t}function Ke(e){try{let t=JSON.parse(e).dev;return typeof t!=`string`||t.trim()===``}catch{return!1}}function qe({id:e,entry:t,said:n,className:c}){let u=s(),{w:p}=n,m=e.slice(e.lastIndexOf(`/`)+1),[h,g]=(0,K.useState)({at:`starting`}),[_,v]=(0,K.useState)(0),[y,b]=(0,K.useState)(!1),x=Ge(e),S=Ne(t),C=ze(e,x,S),w=h.at===`failed`?x:void 0,T=o(),E=h.at===`asleep`?T:void 0;(0,K.useEffect)(()=>{let t=!0;return Y(u,`website/preview`,{item:e}).then(({url:e})=>{t&&g({at:`ready`,url:e})},e=>{t&&g(ee(e)?{at:`asleep`}:{at:`failed`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!1}},[u,e,_,w,E]);let[D,O]=(0,K.useState)(!1);(0,K.useEffect)(()=>{let e=!0;return u[`files/read`]({path:t}).then(({text:t})=>{e&&O(Ke(t))},()=>void 0),()=>{e=!1}},[u,t,x]);let k=h.at===`failed`;a(`jobs/changed`,({job:e,item:n})=>{k&&n===t&&e.what===`start`&&e.state===`running`&&(g({at:`starting`}),v(e=>e+1))});let A=(0,K.useRef)(null);i({hold:()=>Promise.resolve({key:`website@${e}@${crypto.randomUUID()}`,what:m,source:{path:t}}),locate:()=>Promise.resolve({elements:[]})});let j=()=>{let e=A.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0},M=(0,K.useRef)(void 0),N=()=>M.current??Promise.resolve(void 0);return r({element:()=>A.current,hold:()=>{let t=j();return M.current=t?Y(u,`website/hold`,{item:e,width:Math.round(t.width),height:Math.round(t.height),scale:Math.min(4,Math.max(1,window.devicePixelRatio))}).then(e=>e.hold,()=>void 0):Promise.resolve(void 0),M.current.then(()=>void 0)},release:()=>{let e=M.current;M.current=void 0,e?.then(e=>e===void 0?void 0:Y(u,`website/release`,{hold:e}).catch(()=>void 0))},pictures:async()=>{let t=j();if(!t)return[];let n=await N(),{image:r}=await Y(u,`website/still`,{item:e,width:Math.round(t.width),height:Math.round(t.height),scale:Math.min(4,Math.max(1,window.devicePixelRatio)),...n===void 0?{}:{hold:n}});return[{...r,rect:t}]},locate:async n=>{let r=j(),i=r?l(n).map(e=>({x:e.x-r.x,y:e.y-r.y})).filter(e=>e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height):[],a=await N(),o=r&&i.length>0?await Y(u,`website/at`,{item:e,width:Math.round(r.width),height:Math.round(r.height),points:i,...a===void 0?{}:{hold:a}}).catch(()=>void 0):void 0,s=o?.page??``;return{elements:o&&o.elements.length>0?o.elements.map(e=>({name:`the element ${e.selector} of the page ${s}`,source:{path:t},...e.text===``?{}:{text:e.text}})):[{name:`the page of the website ${m}`,source:{path:t}}],where:`on the website ${m}${s===``?``:` at ${s}`}, as its dev server serves it`}}}),h.at===`asleep`?(0,q.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col items-center justify-center gap-3 p-6`,c),children:[(0,q.jsx)(`p`,{className:`text-sm text-lead`,children:p.asleep}),(0,q.jsx)(f,{size:`xs`,onClick:()=>{u[`edit/request`]({}).catch(()=>void 0)},children:p.edit})]}):(0,q.jsxs)(`div`,{className:d(`absolute inset-0 flex flex-col`,c),children:[(0,q.jsx)(He,{hosting:C,said:n,settings:y,onSettings:()=>{b(e=>!e)}}),(0,q.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[h.at===`ready`&&(0,q.jsx)(`iframe`,{ref:A,title:m,src:h.url,"data-testid":`site`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,className:`absolute inset-0 size-full border-0 bg-page`},D?x:void 0),h.at===`starting`&&(0,q.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm text-lead`,children:(0,q.jsx)(Je,{job:Pe(S,`start`),name:m,w:p})}),h.at===`failed`&&(0,q.jsx)(pe,{className:`absolute inset-0 flex items-center justify-center`}),y&&C.status?.detail!==void 0&&(0,q.jsx)(Ue,{hosting:C,said:n})]})]})}function Je({job:e,name:t,w:n}){if(e===void 0)return(0,q.jsx)(`span`,{className:`animate-pulse`,children:n.starting});let r=Oe(e);return(0,q.jsxs)(`span`,{role:`status`,className:`flex flex-col items-center gap-2`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[r===void 0&&(0,q.jsx)(re,{className:`text-ink`}),n.startingJob(e.name??t)]}),r!==void 0&&(0,q.jsx)(ie,{value:r*100,className:`h-1 w-48`})]})}export{$ as WORDS,We as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,s as a}from"./react-Byupo4pA.js";import{Ct as o,Dt as s,Et as c,ht as l,jt as u,kt as d,yt as f}from"./x-BAJilkKD.js";import{t as p}from"./session--OJYv_B7.js";import{t as m}from"./jsx-runtime-DePvh3-m.js";import{A as h,D as g,O as _,t as v}from"./bar-button-CJmpgNg4.js";import{E as ee,_ as te,d as ne,f as re,i as ie,l as ae,o as oe,p as se,u as ce}from"./dist-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,s as a}from"./react-Byupo4pA.js";import{Ct as o,Dt as s,Et as c,ht as l,jt as u,kt as d,yt as f}from"./x-BAJilkKD.js";import{t as p}from"./session--OJYv_B7.js";import{t as m}from"./jsx-runtime-DePvh3-m.js";import{A as h,D as g,O as _,t as v}from"./bar-button-CJmpgNg4.js";import{E as ee,_ as te,d as ne,f as re,i as ie,l as ae,o as oe,p as se,u as ce}from"./dist-6ugUm4dS.js";import{i as le,n as ue,r as de,t as fe}from"./hint-F4fIBnVU.js";import{t as pe}from"./createLucideIcon-euu7Wcd9.js";import{n as me,t as he}from"./whole-word-C9TkGBCY.js";import{n as ge,t as _e}from"./search-D75Bi2GU.js";import{t as ve}from"./copy-SoaMYqsN.js";import{t as ye}from"./file-question-mark-PeZgyqkK.js";import{t as be}from"./replace-CLLMtF4e.js";import{t as xe}from"./scissors-m6QcoEf2.js";import{j as Se}from"./index-D-MNVykg.js";import{t as Ce}from"./updating-Cbxw83_O.js";import{n as we,r as Te,t as Ee}from"./w3c-keyname-BOAvb0qz.js";var De=pe(`regex`,[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]),Oe=pe(`text-select`,[[`path`,{d:`M14 21h1`,key:`v9vybs`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M21 14v1`,key:`169vum`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`,key:`1j7049`}],[`path`,{d:`M21 9v1`,key:`mxsmne`}],[`path`,{d:`M3 14v1`,key:`vnatye`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}],[`path`,{d:`M7 16h6`,key:`1vyc9m`}],[`path`,{d:`M7 8h8`,key:`1jbsf9`}],[`path`,{d:`M9 21h1`,key:`15o7lz`}],[`path`,{d:`M9 3h1`,key:`1yesri`}]]),y=e(n(),1),b=m(),ke=[],Ae=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?Ae:ke).push(n+=e[t])})();function je(e){if(e<768)return!1;for(let t=0,n=ke.length;;){let r=t+n>>1;if(e<ke[r])n=r;else if(e>=Ae[r])t=r+1;else return!0;if(t==n)return!1}}function Me(e){return e>=127462&&e<=127487}var Ne=8205;function Pe(e,t,n=!0,r=!0){return(n?Fe:Ie)(e,t,r)}function Fe(e,t,n){if(t==e.length)return t;t&&Re(e.charCodeAt(t))&&ze(e.charCodeAt(t-1))&&t--;let r=Le(e,t);for(t+=Be(r);t<e.length;){let i=Le(e,t);if(r==Ne||i==Ne||n&&je(i))t+=Be(i),r=i;else if(Me(i)){let n=0,r=t-2;for(;r>=0&&Me(Le(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function Ie(e,t,n){for(;t>1;){let r=Fe(e,t-2,n);if(r<t)return r;t--}return 0}function Le(e,t){let n=e.charCodeAt(t);if(!ze(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Re(r)?(n-55296<<10)+(r-56320)+65536:n}function Re(e){return e>=56320&&e<57344}function ze(e){return e>=55296&&e<56320}function Be(e){return e<65536?1:2}var x=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Xe(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),He.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xe(this,e,t);let n=[];return this.decompose(e,t,n,0),He.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Ke(this),i=new Ke(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new Ke(this,e)}iterRange(e,t=this.length){return new qe(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Je(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Ve(t):He.from(Ve.split(t,[]))}},Ve=class e extends x{constructor(e,t=Ue(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Ye(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Ge(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=We(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Xe(this,t,n);let i=We(this.text,We(r.text,Ge(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):He.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
2
2
|
`){[e,t]=Xe(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},He=class e extends x{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=Xe(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
3
3
|
`){[e,t]=Xe(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Ve(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Ve&&c&&(n=u[u.length-1])instanceof Ve&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Ve(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};x.empty=new Ve([``],0);function Ue(e){let t=-1;for(let n of e)t+=n.length+1;return t}function We(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function Ge(e,t,n){return We(e,[``],t,n)}var Ke=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Ve?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Ve?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(r instanceof Ve){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Ve?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},qe=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new Ke(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Je=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(x.prototype[Symbol.iterator]=function(){return this.iter()},Ke.prototype[Symbol.iterator]=qe.prototype[Symbol.iterator]=Je.prototype[Symbol.iterator]=function(){return this});var Ye=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Xe(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function S(e,t,n=!0,r=!0){return Pe(e,t,n,r)}function Ze(e){return e>=56320&&e<57344}function Qe(e){return e>=55296&&e<56320}function $e(e,t){let n=e.charCodeAt(t);if(!Qe(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Ze(r)?(n-55296<<10)+(r-56320)+65536:n}function et(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function tt(e){return e<65536?1:2}var nt=/\r\n?|\n/,rt=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(rt||={}),it=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){st(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:lt(this,e)}mapDesc(e,t=!1){return e.empty?this:ct(this,e,t)}mapPos(e,t=-1,n=rt.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=rt.Simple&&c>=e&&(n==rt.TrackDel&&r<e&&c>e||n==rt.TrackBefore&&r<e||n==rt.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},at=class e extends it{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return st(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return ct(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(x.empty);r.push(a?t.slice(i,i+a):x.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:lt(this,e,!0)}map(e,t=!1){return e.empty?this:ct(this,e,t,!0)}iterChanges(e,t=!1){st(this,e,t)}get desc(){return it.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new ut(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);C(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;C(n,e,t),t>0&&ot(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);C(n,e,-1),C(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:it.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&C(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?x.of(l.split(r||nt)):l:x.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&C(i,e-o,-1),C(i,s-e,d),ot(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(x.empty);r[e]=x.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function C(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function ot(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(x.empty);e.push(n)}}function st(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=x.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function ct(e,t,n,r=!1){let i=[],a=r?[]:null,o=new ut(e),s=new ut(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);C(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(C(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(C(i,0,o.ins),a&&ot(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;C(i,t,e<o.i?o.ins:0),a&&e<o.i&&ot(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?at.createSet(i,a):it.create(i);else throw Error(`Mismatched change set lengths`)}function lt(e,t,n=!1){let r=[],i=n?[]:null,a=new ut(e),o=new ut(t);for(let e=!1;;)if(a.done&&o.done)return i?at.createSet(r,i):it.create(r);else if(a.ins==0)C(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)C(r,0,o.ins,e),i&&ot(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;C(r,t,n,e),i&&n&&ot(i,r,o.text)}else o.ins==-1?(C(r,a.off?0:a.len,t,e),i&&ot(i,r,a.textBit(t))):(C(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&ot(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var ut=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?x.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?x.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},dt=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return w.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return w.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return w.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},w=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>dt.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return dt.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?dt.create(t,e,a|32,n):dt.create(e,t,a,n)}static undirectionalRange(e,t){return dt.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function ft(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var pt=0,T=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=pt++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:mt),!!t.static,t.enables)}of(e){return new ht([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ht(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ht(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function mt(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var ht=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=pt++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||_t(e,c)){let r=t(e);if(a?!gt(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=At(o,c);if(this.dependencies.every(t=>t instanceof T?o.facet(t)===e.facet(t):t instanceof bt?o.field(t,!1)==e.field(t,!1):!0)||(a?gt(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function gt(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function _t(e,t){let n=!1;for(let r of t)kt(e,r)&1&&(n=!0);return n}function vt(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=At(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)kt(e,t);return e.values[o]=s(e),1},update(e,n){if(!_t(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=_t(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&mt(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var yt=T.define({static:!0}),bt=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(pt++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(yt).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(yt),i=n.facet(yt),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,yt.of({field:this,create:e})]}get extension(){return this}},xt={lowest:4,low:3,default:2,high:1,highest:0};function St(e){return t=>new wt(t,e)}var Ct={highest:St(xt.highest),high:St(xt.high),default:St(xt.default),low:St(xt.low),lowest:St(xt.lowest)},wt=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Tt=class e{of(e){return new Et(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Et=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},Dt=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Ot(t,n,o))e instanceof bt?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,mt(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>vt(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Ot(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Et&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Et){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof wt)a(e.inner,e.prec);else if(e instanceof bt)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof ht)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,xt.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,xt.default),r.reduce((e,t)=>e.concat(t))}function kt(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function At(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var jt=T.define(),Mt=T.define({combine:e=>e.some(e=>e),static:!0}),Nt=T.define({combine:e=>e.length?e[0]:void 0,static:!0}),Pt=T.define(),Ft=T.define(),It=T.define(),Lt=T.define({combine:e=>e.length?e[0]:!1}),Rt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new zt}},zt=class{of(e){return new Rt(this,e)}},Bt=class{constructor(e){this.map=e}of(e){return new E(this,e)}},E=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Bt(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};E.reconfigure=E.define(),E.appendConfig=E.define();var D=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&ft(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};D.time=Rt.define(),D.userEvent=Rt.define(),D.addToHistory=Rt.define(),D.remote=Rt.define();function Vt(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Ht(e,t,n){let r,i,a;return n?(r=t.changes,i=at.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:E.mapEffects(e.effects,r).concat(E.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Ut(e,t,n){let r=t.selection,i=Jt(t.annotations);return t.userEvent&&(i=i.concat(D.userEvent.of(t.userEvent))),{changes:t.changes instanceof at?t.changes:at.of(t.changes||[],n,e.facet(Nt)),selection:r&&(r instanceof w?r:w.single(r.anchor,r.head)),effects:Jt(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Wt(e,t,n){let r=Ut(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Ht(r,Ut(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=D.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Kt(n?Gt(i):i)}function Gt(e){let t=e.startState,n=!0;for(let r of t.facet(Pt)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Vt(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=at.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=D.create(t,r,e.selection&&e.selection.map(i),E.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Ft);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof D?i:Array.isArray(i)&&i.length==1&&i[0]instanceof D?i[0]:Wt(t,Jt(i),!1)}return e}function Kt(e){let t=e.startState,n=t.facet(It),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Ht(r,Ut(t,a,e.changes.newLength),!0))}return r==e?e:D.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var qt=[];function Jt(e){return e==null?qt:Array.isArray(e)?e:[e]}var O=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(O||={}),Yt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Xt;try{Xt=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function Zt(e){if(Xt)return Xt.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||Yt.test(n)))return!0}return!1}function Qt(e){return t=>{if(!/\S/.test(t))return O.Space;if(Zt(t))return O.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return O.Word;return O.Other}}var k=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)kt(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`)}else return kt(this,n),At(this,n)}update(...e){return Wt(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Tt.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(E.reconfigure)?(n=null,r=e.value):e.is(E.appendConfig)&&(n=null,r=Jt(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Dt.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Mt)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:w.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Jt(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=E.mapEffects(a,c).concat(E.mapEffects(Jt(o.effects),l))}return{changes:r,selection:w.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof at?t:at.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return x.of(t.split(this.facet(e.lineSeparator)||nt))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(kt(this,t),At(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof bt&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:w.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Dt.resolve(t.extensions||[],new Map),r=t.doc instanceof x?t.doc:x.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||nt)),i=t.selection?t.selection instanceof w?t.selection:w.single(t.selection.anchor,t.selection.head):w.single(0);return ft(i,r.length),n.staticFacet(Mt)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{a as r,b as i,c as a,f as o,p as s,s as c}from"./react-Byupo4pA.js";import{Dt as l,Et as u,ht as d,kt as f,yt as p}from"./x-BAJilkKD.js";import{E as m}from"./snapshots-DYooVfOx.js";import{t as h}from"./session--OJYv_B7.js";import{t as g}from"./jsx-runtime-DePvh3-m.js";import{t as _}from"./bar-button-CJmpgNg4.js";import{C as v,E as ee,O as y,S as b,_ as te,b as ne,c as re,d as ie,f as ae,i as oe,l as se,o as ce,p as le,u as ue}from"./dist-
|
|
1
|
+
import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{a as r,b as i,c as a,f as o,p as s,s as c}from"./react-Byupo4pA.js";import{Dt as l,Et as u,ht as d,kt as f,yt as p}from"./x-BAJilkKD.js";import{E as m}from"./snapshots-DYooVfOx.js";import{t as h}from"./session--OJYv_B7.js";import{t as g}from"./jsx-runtime-DePvh3-m.js";import{t as _}from"./bar-button-CJmpgNg4.js";import{C as v,E as ee,O as y,S as b,_ as te,b as ne,c as re,d as ie,f as ae,i as oe,l as se,o as ce,p as le,u as ue}from"./dist-6ugUm4dS.js";import{t as de}from"./createLucideIcon-euu7Wcd9.js";import{t as fe}from"./audio-lines-BFoW_IeO.js";import{t as pe}from"./group-DwM2yqU8.js";import{c as me,i as x,n as he,o as S,r as ge,t as _e}from"./syntax-Bqyhj0dw.js";import{t as ve}from"./minus-ngE8owxs.js";import{t as ye}from"./palette-DchDLJj6.js";import{n as be,t as xe}from"./undo-2-DCbMWoug.js";import{t as Se}from"./square-arrow-out-up-right-1NqFsNDe.js";import{t as Ce}from"./sticky-note-s4QfzaBB.js";import{t as we}from"./trash-2-SFReAxVM.js";import{P as Te,a as C,b as Ee,d as De,h as w,x as Oe,y as ke}from"./index-D-MNVykg.js";import{n as Ae,r as je,t as T}from"./updating-Cbxw83_O.js";import{c as Me,l as Ne,n as Pe,o as Fe,r as Ie,t as Le}from"./dist-D2a_y4AE.js";import{t as Re}from"./collaborator-CbTacvkB.js";import{t as E}from"./row-DqS4-5b1.js";import{t as D}from"./swatch-DCmD1gZl.js";import{A as O,F as k,L as ze,M as Be,R as A,S as Ve,_ as j,a as He,b as M,g as Ue,h as We,i as Ge,j as Ke,m as qe,n as Je,p as Ye,r as Xe,t as Ze,v as Qe,x as $e,y as et,z as tt}from"./syntax-C0iPON60.js";var nt={".html":`text/html; charset=utf-8`,".js":`text/javascript; charset=utf-8`,".mjs":`text/javascript; charset=utf-8`,".css":`text/css; charset=utf-8`,".json":`application/json; charset=utf-8`,".txt":`text/plain; charset=utf-8`,".md":`text/plain; charset=utf-8`,".mdx":`text/plain; charset=utf-8`,".csv":`text/plain; charset=utf-8`,".yaml":`text/plain; charset=utf-8`,".svg":`image/svg+xml`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".webp":`image/webp`,".gif":`image/gif`,".avif":`image/avif`,".woff2":`font/woff2`,".woff":`font/woff`,".ttf":`font/ttf`,".otf":`font/otf`,".mp3":`audio/mpeg`,".wav":`audio/wav`,".m4a":`audio/mp4`,".ogg":`audio/ogg`,".aac":`audio/aac`,".flac":`audio/flac`,".mp4":`video/mp4`,".webm":`video/webm`,".mov":`video/quicktime`,".pdf":`application/pdf`,".wasm":`application/wasm`,".glb":`model/gltf-binary`,".gltf":`model/gltf+json`,".bin":`application/octet-stream`,".ktx2":`image/ktx2`,".hdr":`image/vnd.radiance`,".exr":`image/x-exr`,".htm":`text/html; charset=utf-8`,".map":`application/json; charset=utf-8`,".webmanifest":`application/manifest+json`,".xml":`application/xml`,".rss":`application/rss+xml`,".atom":`application/atom+xml`,".ico":`image/x-icon`,".vtt":`text/vtt; charset=utf-8`,".zip":`application/zip`},rt=e=>nt[/\.[^./]+$/u.exec(e)?.[0].toLowerCase()??``]??`application/octet-stream`,it=de(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),at=de(`focus`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),ot=de(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),st=de(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),ct=[`1`,`2`,`3`,`4`,`5`,`6`],lt=[`top`,`right`,`bottom`,`left`],N=[`none`,`arrow`],P={nodes:[],edges:[],top:{}},F=e=>typeof e==`object`&&!!e&&!Array.isArray(e),I=e=>typeof e==`string`?e:void 0,ut=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,dt=(e,t)=>typeof t==`string`&&e.includes(t)?t:void 0;function ft(e){let t=I(e.id),n=I(e.type),r=ut(e.x),i=ut(e.y),a=ut(e.width),o=ut(e.height);if(t!==void 0&&t!==``&&n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0&&o!==void 0)return{id:t,type:n,x:r,y:i,width:a,height:o,color:I(e.color),text:I(e.text),file:I(e.file),subpath:I(e.subpath),url:I(e.url),label:I(e.label),background:I(e.background),backgroundStyle:I(e.backgroundStyle),raw:e}}function pt(e){let t=I(e.id),n=I(e.fromNode),r=I(e.toNode);if(t&&n&&r)return{id:t,fromNode:n,fromSide:dt(lt,e.fromSide),fromEnd:dt(N,e.fromEnd)??`none`,toNode:r,toSide:dt(lt,e.toSide),toEnd:dt(N,e.toEnd)??`arrow`,color:I(e.color),label:I(e.label),raw:e}}var L=e=>{let t=e.id;return typeof t==`string`&&t!==``?t:void 0};function mt(e){if(e.trim()===``)return{canvas:P,problems:[],readable:!0};let t;try{t=JSON.parse(e)}catch(e){return{canvas:P,readable:!1,problems:[{at:`file`,message:`It is not JSON: ${e instanceof Error?e.message:String(e)}`}]}}if(!F(t))return{canvas:P,readable:!1,problems:[{at:`file`,message:`It is not a JSON object.`}]};let n=[],r=e=>{let r=t[e];return r===void 0?[]:Array.isArray(r)?r.flatMap((t,r)=>F(t)?[t]:(n.push({at:e===`nodes`?`node`:`edge`,index:r,message:`Its ${e} entry ${String(r)} is not an object.`}),[])):(n.push({at:e,message:`Its "${e}" is not a list.`}),[])},i=r(`nodes`),a=r(`edges`);return i.forEach((e,t)=>{if(ft(e))return;let r=L(e);n.push({at:`node`,index:t,...r===void 0?{}:{id:r},message:`Its node ${r??String(t)} is not drawn: a node has an id, a type, and x, y, width and height as numbers.`})}),a.forEach((e,t)=>{if(pt(e))return;let r=L(e);n.push({at:`edge`,index:t,...r===void 0?{}:{id:r},message:`Its edge ${r??String(t)} is not drawn: an edge has an id, a fromNode and a toNode.`})}),{canvas:{nodes:i,edges:a,top:t},problems:n,readable:!0}}var ht=e=>e.nodes.flatMap(e=>{let t=ft(e);return t?[t]:[]}),gt=e=>e.edges.flatMap(e=>{let t=pt(e);return t?[t]:[]});function _t(e){let t=e=>e.length===0?`[]`:`[\n${e.map(e=>`\t\t${JSON.stringify(e)}`).join(`,
|
|
2
2
|
`)}\n\t]`;return`{\n${[`\t"nodes":${t(e.nodes)}`,`\t"edges":${t(e.edges)}`,...Object.entries(e.top).filter(([e])=>e!==`nodes`&&e!==`edges`).map(([e,t])=>`\t${JSON.stringify(e)}:${JSON.stringify(t)}`)].join(`,
|
|
3
3
|
`)}\n}`}function vt(e,t=Math.random){let n=new Set([...e.nodes,...e.edges].flatMap(e=>L(e)??[]));for(;;){let e=``;for(let n=0;n<16;n++)e+=Math.floor(t()*16).toString(16);if(!n.has(e))return e}}var R=e=>Math.round(e);function z(e,t){let n=new Set(Object.entries(t).filter(([,e])=>e===void 0).map(([e])=>e)),r=Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)));for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);return r}var yt=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function bt(e,t,n){if(yt(t,e))return n;if(yt(n,e))return t;if(t===void 0||n===void 0)return t??n;if(e===void 0)return t;let r=[...new Set([...Object.keys(t),...Object.keys(e)])].filter(n=>!yt(t[n],e[n]));return z(n,Object.fromEntries(r.map(e=>[e,t[e]])))}function xt(e,t,n){let r=e=>{let t=new Map;for(let n of e){let e=L(n);e!==void 0&&!t.has(e)&&t.set(e,n)}return t},i=r(e),a=r(t),o=r(n),s=[],c=new Set;for(let e of n){let t=L(e);if(t===void 0){s.push(e);continue}if(c.has(t))continue;c.add(t);let n=bt(i.get(t),a.get(t),e);n&&s.push(n)}let l;for(let e of t){let t=L(e);if(t!==void 0){if(!c.has(t)){c.add(t);let n=bt(i.get(t),e,o.get(t));if(n){let e=l===void 0?-1:s.findIndex(e=>L(e)===l);s.splice(e+1,0,n)}}s.some(e=>L(e)===t)&&(l=t)}}return s}function St(e,t,n){let r=bt(e.top,t.top,n.top)??{};return{nodes:xt(e.nodes,t.nodes,n.nodes),edges:xt(e.edges,t.edges,n.edges),top:r}}function B(e,t,n){let r=[...e];for(let e of n===`after`?t:[...t].reverse()){let t=n===`after`?e.after:e.before,i=r.findIndex(t=>L(t)===e.id);t===void 0?i>=0&&r.splice(i,1):i>=0?r[i]=t:r.splice(Math.min(e.index,r.length),0,t)}return r}function Ct(e,t,n){return{...e,nodes:B(e.nodes,t.nodes,n),edges:B(e.edges,t.edges,n)}}function wt(e,t){let n=(e,t)=>{let n=[],r=new Map;e.forEach((e,t)=>{let n=L(e);n!==void 0&&r.set(n,{raw:e,index:t})});let i=new Set;t.forEach((e,t)=>{let a=L(e);if(a===void 0)return;i.add(a);let o=r.get(a);o?JSON.stringify(o.raw)!==JSON.stringify(e)&&n.push({id:a,before:o.raw,after:e,index:t}):n.push({id:a,after:e,index:t})});for(let[e,t]of r)i.has(e)||n.push({id:e,before:t.raw,index:t.index});return n};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}var Tt=e=>e.nodes.length===0&&e.edges.length===0;function Et(e,t){let n=`"id":${JSON.stringify(t)}`,r=`"id": ${JSON.stringify(t)}`,i=e.split(`
|
|
4
4
|
`).findIndex(e=>e.includes(n)||e.includes(r));return i<0?void 0:i+1}function Dt(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ot=/[ \t\n\f\r]/g;function kt(e){return typeof e==`object`?e.type===`text`&&At(e.value):At(e)}function At(e){return e.replace(Ot,``)===``}var jt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};jt.prototype.normal={},jt.prototype.property={},jt.prototype.space=void 0;function Mt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new jt(n,r,t)}function Nt(e){return e.toLowerCase()}var V=class{constructor(e,t){this.attribute=t,this.property=e}};V.prototype.attribute=``,V.prototype.booleanish=!1,V.prototype.boolean=!1,V.prototype.commaOrSpaceSeparated=!1,V.prototype.commaSeparated=!1,V.prototype.defined=!1,V.prototype.mustUseProperty=!1,V.prototype.number=!1,V.prototype.overloadedBoolean=!1,V.prototype.property=``,V.prototype.spaceSeparated=!1,V.prototype.space=void 0;var Pt=t({boolean:()=>H,booleanish:()=>U,commaOrSpaceSeparated:()=>K,commaSeparated:()=>Lt,number:()=>W,overloadedBoolean:()=>It,spaceSeparated:()=>G}),Ft=0,H=Rt(),U=Rt(),It=Rt(),W=Rt(),G=Rt(),Lt=Rt(),K=Rt();function Rt(){return 2**++Ft}var zt=Object.keys(Pt),Bt=class extends V{constructor(e,t,n,r){let i=-1;if(super(e,t),Vt(this,`space`,r),typeof n==`number`)for(;++i<zt.length;){let e=zt[i];Vt(this,zt[i],(n&Pt[e])===Pt[e])}}};Bt.prototype.defined=!0;function Vt(e,t,n){n&&(e[t]=n)}function Ht(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Bt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Nt(r)]=r,n[Nt(a.attribute)]=r}return new jt(t,n,e.space)}var Ut=Ht({properties:{ariaActiveDescendant:null,ariaAtomic:U,ariaAutoComplete:null,ariaBusy:U,ariaChecked:U,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:U,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:U,ariaFlowTo:G,ariaGrabbed:U,ariaHasPopup:null,ariaHidden:U,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:U,ariaMultiLine:U,ariaMultiSelectable:U,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:U,ariaReadOnly:U,ariaRelevant:null,ariaRequired:U,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:U,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Wt(e,t){return t in e?e[t]:t}function Gt(e,t){return Wt(e,t.toLowerCase())}var Kt=Ht({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Lt,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:G,autoFocus:H,autoPlay:H,blocking:G,capture:null,charSet:null,checked:H,cite:null,className:G,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:U,controls:H,controlsList:G,coords:W|Lt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:It,draggable:U,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:G,height:W,hidden:It,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:G,itemRef:G,itemScope:H,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:G,required:H,reversed:H,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:U,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:U,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:U,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:Lt,part:G,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:Gt}),qt=Ht({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`,maskType:`mask-type`,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:K,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:Lt,g2:Lt,glyphName:Lt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:K,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:K,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:K,rev:K,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:K,requiredFeatures:K,requiredFonts:K,requiredFormats:K,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:K,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:K,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:K,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Wt}),Jt=Ht({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()}}),Yt=Ht({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Gt}),Xt=Ht({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Zt={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`},Qt=/[A-Z]/g,$t=/-[a-z]/g,en=/^data[-\w.:]+$/i;function tn(e,t){let n=Nt(t),r=t,i=V;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&en.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace($t,rn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!$t.test(e)){let n=e.replace(Qt,nn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Bt}return new i(r,t)}function nn(e){return`-`+e.toLowerCase()}function rn(e){return e.charAt(1).toUpperCase()}var an=Mt([Ut,Kt,Jt,Yt,Xt],`html`),on=Mt([Ut,qt,Jt,Yt,Xt],`svg`);function sn(e){return e.join(` `).trim()}var cn=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|