@fudanda/admin-antd 0.0.0-stage → 2.20261024.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +58 -3
- package/THIRD_PARTY_NOTICES.md +55 -0
- package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
- package/dist/assets/pdfium-BJ2Yip8Q.wasm +0 -0
- package/dist/assets/ppt-font-cjk-DxgKpThH.otf +0 -0
- package/dist/assets/ppt-native-Cz5DBbag.wasm +0 -0
- package/dist/assets/pptx.worker-CtaL8LO_.js +30 -0
- package/dist/assets/worker-C5LZNsKY.mjs +1650 -0
- package/dist/assets/worker-CDeo9jS-.js +40 -0
- package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
- package/dist/automation.d.ts +3 -0
- package/dist/automation.js +15 -0
- package/dist/chunks/App-DNjXLysb.js +79 -0
- package/dist/chunks/AppModal-DJzQA6FR.js +1 -0
- package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
- package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
- package/dist/chunks/DashboardPage-BohGodSl.js +22 -0
- package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
- package/dist/chunks/DateTimeText-CIt0Qy45.js +1 -0
- package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
- package/dist/chunks/DictTag-2-adKbYg.js +1 -0
- package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
- package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
- package/dist/chunks/EmptyIllustration-DUC3RZmF.js +1 -0
- package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
- package/dist/chunks/EntityContextRuntime-sslBZqYD.js +1 -0
- package/dist/chunks/EntityRelationButton-DWn1rC2J.js +8 -0
- package/dist/chunks/ExportButton-AzH4D0oW.js +1 -0
- package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
- package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
- package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
- package/dist/chunks/FileViewerPreviewPanel-CMqVtGCr.js +41 -0
- package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
- package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
- package/dist/chunks/JsonPreviewPanel-Dhbza-Uu.js +1 -0
- package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
- package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
- package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
- package/dist/chunks/MarkdownPreviewPanel-DoiaAeRv.js +51 -0
- package/dist/chunks/MasterDetailLayout-sjPWw8BI.js +8 -0
- package/dist/chunks/MemberAssignmentSheet-Czbt6_zv.js +1 -0
- package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
- package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
- package/dist/chunks/ModalFooter-RMlvqrO9.js +1 -0
- package/dist/chunks/MonacoPreviewPanel-Dnz7xpWP.js +1 -0
- package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
- package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
- package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
- package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
- package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
- package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
- package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
- package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
- package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
- package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
- package/dist/chunks/ResponsiveTableActions-y54aSdhs.js +1 -0
- package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
- package/dist/chunks/ScrollArea-DqjJmHDN.js +11 -0
- package/dist/chunks/SearchToolbar-CvgYKUjr.js +1 -0
- package/dist/chunks/SessionClientTag-DIwnYodW.js +22 -0
- package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
- package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
- package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
- package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
- package/dist/chunks/UTIF-QUtClmQd.js +1 -0
- package/dist/chunks/UserAvatar-B8CFnTCn.js +1 -0
- package/dist/chunks/UserDisplay-J0Re8z-7.js +1 -0
- package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
- package/dist/chunks/UserLogsPanels-BHeSxWrk.js +36 -0
- package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
- package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
- package/dist/chunks/abnfDiagram-VCTEODGH-Z6OhNjoW.js +1 -0
- package/dist/chunks/activity-DBu4axwF.js +8 -0
- package/dist/chunks/arc-B3K1fDeF.js +1 -0
- package/dist/chunks/architecture-7GRP2DOG-CMtoOwin.js +1 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7-V5A7S5fY.js +36 -0
- package/dist/chunks/archive-B_IKvysI.js +72 -0
- package/dist/chunks/array-BrHhzP_A.js +1 -0
- package/dist/chunks/arrow-left-CsxBMzKY.js +8 -0
- package/dist/chunks/avsc-C0VoJRmm.js +160 -0
- package/dist/chunks/blockDiagram-I7D4REHJ-CFKGJkc_.js +129 -0
- package/dist/chunks/browser-BKLM0ThC-mnGPrtB_.js +1 -0
- package/dist/chunks/browser-index-JqxD-45S.js +1 -0
- package/dist/chunks/builtin_esm-external-require-react-BsBndGeN.js +1 -0
- package/dist/chunks/bundle-DbfUnEV1.js +29 -0
- package/dist/chunks/c4Diagram-7LVT6UL2-BqYYoXPe.js +38 -0
- package/dist/chunks/channel-C9Dr7Z-W.js +1 -0
- package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
- package/dist/chunks/chart-renderer-k-Rd8vdL.js +7 -0
- package/dist/chunks/chevron-down-mn2tSKQd.js +8 -0
- package/dist/chunks/chevron-right-EBApfX6q.js +15 -0
- package/dist/chunks/chevrons-up-down-2M6hY6wt.js +15 -0
- package/dist/chunks/chunk-2E4U76K2-DNbbdpCx.js +1 -0
- package/dist/chunks/chunk-2Q5K7J3B-CmAE3Vs0.js +1 -0
- package/dist/chunks/chunk-2ZTRR5NV-BjsSRgBv.js +2 -0
- package/dist/chunks/chunk-3Z5EZCMW-uYiqz-6y.js +1 -0
- package/dist/chunks/chunk-4HAMMTFA-Aw59LwS3.js +62 -0
- package/dist/chunks/chunk-5V3GS4D5-B_CVcJic.js +1 -0
- package/dist/chunks/chunk-5VM5RSS4-DMlsEAcl.js +15 -0
- package/dist/chunks/chunk-6AZGARVD-CgAiC5mV.js +1 -0
- package/dist/chunks/chunk-6EIED4P4-CXz5D9B0.js +1 -0
- package/dist/chunks/chunk-6K3QC6MW-DtaQ52mY.js +1 -0
- package/dist/chunks/chunk-6TQVIW2G-D0YDxefI.js +1 -0
- package/dist/chunks/chunk-747NJXEK-DGoElbDa.js +2 -0
- package/dist/chunks/chunk-75Z2AOVW-IO9R6faP.js +2 -0
- package/dist/chunks/chunk-CLGD4ZFX-tRS89bnq.js +1 -0
- package/dist/chunks/chunk-DU6HZSFF-Bx48E1rg.js +125 -0
- package/dist/chunks/chunk-F27PBJKO-DtLva7y0.js +1 -0
- package/dist/chunks/chunk-FOHPRMQF-B8MMrnxV.js +255 -0
- package/dist/chunks/chunk-GMAD6QVW-D41KnniX.js +72 -0
- package/dist/chunks/chunk-GVQU2GXP-CVzgM_ui.js +1 -0
- package/dist/chunks/chunk-I5DQTOEV-CoecQT42.js +1 -0
- package/dist/chunks/chunk-ICYGCRZG-lH3opfCY.js +1 -0
- package/dist/chunks/chunk-IH6LHLGP-tD-j3Rsy.js +1 -0
- package/dist/chunks/chunk-IMKFNOWR-CL9pLQhV.js +231 -0
- package/dist/chunks/chunk-JWPE2WC7-Wk0BVLn5.js +1 -0
- package/dist/chunks/chunk-KI3K4JFJ-C-3Y_9er.js +1 -0
- package/dist/chunks/chunk-L3NEJ4N5-CmvrS7Dt.js +1 -0
- package/dist/chunks/chunk-LNGE3PJU-BP1fsJRz.js +34 -0
- package/dist/chunks/chunk-OSK3NFVY-C9uWOXTC.js +10 -0
- package/dist/chunks/chunk-OUJLGHUK-Cm55l9bx.js +2 -0
- package/dist/chunks/chunk-P2QGCYS3-C9bc1yiM.js +1 -0
- package/dist/chunks/chunk-POPQ4Y6H-P1s5xaxM.js +1 -0
- package/dist/chunks/chunk-PWAF6VOD-IORmPx9D.js +1 -0
- package/dist/chunks/chunk-SHT3W25Y-Bip4melZ.js +168 -0
- package/dist/chunks/chunk-SVP7TREG-BKCgUOuy.js +88 -0
- package/dist/chunks/chunk-TICWLB2K-12W2EmSx.js +206 -0
- package/dist/chunks/chunk-TLUHSLCS-DsqF476v.js +1 -0
- package/dist/chunks/chunk-UY3FDG6J-71d_M6t3.js +1 -0
- package/dist/chunks/chunk-XHIXRSVI-C2X1-xC6.js +1 -0
- package/dist/chunks/chunk-XXDRQBXY-Bl6AoSZF.js +1 -0
- package/dist/chunks/chunk-Y2CYZVJY-DjEHBC-3.js +1 -0
- package/dist/chunks/circle-check-RKAno__V.js +8 -0
- package/dist/chunks/circle-x-BB5x-D-8.js +8 -0
- package/dist/chunks/classDiagram-ZZMXUADV-CZrpYcfK.js +1 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY-CZrpYcfK.js +1 -0
- package/dist/chunks/clipboard-ERcMSMRH.js +1 -0
- package/dist/chunks/clock-CniP1gZS.js +8 -0
- package/dist/chunks/confirm-BtBBEqk8.js +1 -0
- package/dist/chunks/controls-C5dPckUT.js +1 -0
- package/dist/chunks/copy-ofLPH1I0.js +8 -0
- package/dist/chunks/cose-bilkent-JH36ORCC-D9OUqkk5.js +1 -0
- package/dist/chunks/createLucideIcon-BtwfYE6A.js +83 -0
- package/dist/chunks/cynefin-OW5HDTMX-B8_kUynj.js +1 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ-DhQChnCg.js +62 -0
- package/dist/chunks/cytoscape.esm-wDUnleWx.js +339 -0
- package/dist/chunks/dagre-GXQ25YYZ-CfbwC_a5.js +4 -0
- package/dist/chunks/dagre-ZVAWSfFw.js +1 -0
- package/dist/chunks/data-B05HzECj.js +28 -0
- package/dist/chunks/date-picker-CPUxgHVv.js +1 -0
- package/dist/chunks/defaultLocale-BvxIcb9Y.js +1 -0
- package/dist/chunks/deleteAction-CCocr5uV.js +1 -0
- package/dist/chunks/diagram-D9cwc7QH.js +5 -0
- package/dist/chunks/diagram-S7CK7UJ4-DVPbdtMm.js +30 -0
- package/dist/chunks/diagram-UQ7AKVKN-D_ZBhGLL.js +41 -0
- package/dist/chunks/diagram-VSXAHHWV-Dqypp-OX.js +3 -0
- package/dist/chunks/diagram-VX7I27RA-CbWJVJ_L.js +24 -0
- package/dist/chunks/diagram-Z3DM3KII-CUyP4-RY.js +24 -0
- package/dist/chunks/direct-engine-thps0u7R.js +5 -0
- package/dist/chunks/dist-Bauqz5on.js +1 -0
- package/dist/chunks/dist-CWj_XYki.js +1 -0
- package/dist/chunks/dist-D_KGQS7-.js +11 -0
- package/dist/chunks/dist-DdW4yNBK.js +1 -0
- package/dist/chunks/docx-preview-CPN81HCr.js +11 -0
- package/dist/chunks/download--5IybXxz.js +8 -0
- package/dist/chunks/drawing-D2Qrun-P.js +48 -0
- package/dist/chunks/ebnfDiagram-PWID7BFC-C5NMigjm.js +1 -0
- package/dist/chunks/ellipsis-Dux1Nxa5.js +8 -0
- package/dist/chunks/email-ByshRsFv.js +61 -0
- package/dist/chunks/emailHtml-BAKcRhSm.js +1 -0
- package/dist/chunks/erDiagram-RLTQ6QDP-B5rUHJPJ.js +99 -0
- package/dist/chunks/eventmodeling-NTZA5JFV-C74no5BH.js +1 -0
- package/dist/chunks/export-BkwewH6Q.js +1 -0
- package/dist/chunks/export-DlTz5dc2.js +341 -0
- package/dist/chunks/eye-off-BtJoIT5n.js +8 -0
- package/dist/chunks/feedback-BnjMKZpz.js +1 -0
- package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
- package/dist/chunks/fit-CsnhEncA.js +1 -0
- package/dist/chunks/flowDiagram-HODETNUW-BuMvaSeo.js +1 -0
- package/dist/chunks/form-CQutQFiD.js +1 -0
- package/dist/chunks/funnel-BwQjQI4Y.js +8 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY-DIAlbvVg.js +292 -0
- package/dist/chunks/geo-DR0fL7r2.js +38 -0
- package/dist/chunks/gitGraph-4MIJSDKK-Ce5mOfp1.js +1 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX-DN3G9xiQ.js +106 -0
- package/dist/chunks/graphlib-CYBMTUbW.js +1 -0
- package/dist/chunks/icons-CbRx5Om7.js +1 -0
- package/dist/chunks/illustrations-DT1eq6jI.js +1 -0
- package/dist/chunks/image-ez9hvzKT.js +17 -0
- package/dist/chunks/index.es-OAWlVkoK.js +16 -0
- package/dist/chunks/info-A6RAGUB7-BP6lMBIR.js +1 -0
- package/dist/chunks/info-BQa8C31Y.js +8 -0
- package/dist/chunks/infoDiagram-27XIBGKW-BhQtr_Ti.js +2 -0
- package/dist/chunks/init-Ca_Ibf4y.js +1 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U-CLR6CAi4.js +70 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE-_-Q7sjsP.js +139 -0
- package/dist/chunks/json-viewer-DHYRjY8I.js +1 -0
- package/dist/chunks/jszip.min-hNOoGCeG.js +14 -0
- package/dist/chunks/kanban-definition-UXKFOSKX-D97mHeUZ.js +89 -0
- package/dist/chunks/katex-D5qu7EYh.js +257 -0
- package/dist/chunks/layout-grid-Bp9bwiQZ.js +8 -0
- package/dist/chunks/lib-BlRm3nk1.js +15 -0
- package/dist/chunks/lib-C1nFUu19.js +4 -0
- package/dist/chunks/lib-CqYXBtHb.js +1 -0
- package/dist/chunks/libarchive-DRzzJvQl.js +7 -0
- package/dist/chunks/line-BV7qVRkM.js +1 -0
- package/dist/chunks/line-qVHaOdPp.js +1 -0
- package/dist/chunks/linear-DXABSWHW.js +1 -0
- package/dist/chunks/list-0CbyOlT9.js +1 -0
- package/dist/chunks/list-DCcWnjUg.js +8 -0
- package/dist/chunks/listTableProps-DDynsnLF.js +1 -0
- package/dist/chunks/log-in-OzbNes8i.js +8 -0
- package/dist/chunks/lucide-react-VfAPsQQ5.js +8 -0
- package/dist/chunks/maplibre-gl-Bxi83GUP.js +819 -0
- package/dist/chunks/maplibre-shared-Oo0L8Lll.js +6 -0
- package/dist/chunks/maximize-CnmQ11E7.js +8 -0
- package/dist/chunks/media-DoGe_p4O.js +1 -0
- package/dist/chunks/menu-mQgsexFx.js +15 -0
- package/dist/chunks/mermaid-parser.core-DvCAQkzY.js +3 -0
- package/dist/chunks/mermaid.core-CxOC6yPr.js +15 -0
- package/dist/chunks/messages-CFyOVxEM.js +1 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX-A2UgnMwx.js +96 -0
- package/dist/chunks/minimize-Bpau_zCe.js +8 -0
- package/dist/chunks/msg-BzZbudMm.js +7 -0
- package/dist/chunks/ofd-C7DKqJ6Z.js +33 -0
- package/dist/chunks/ofd-DrJyXIpS.js +14 -0
- package/dist/chunks/openDocument-DGzqlyJg.js +12 -0
- package/dist/chunks/options-B65xkxOY.js +1 -0
- package/dist/chunks/ordinal-NuFkISw7.js +1 -0
- package/dist/chunks/packet-AYTQ26CC-DS6h3a5l.js +1 -0
- package/dist/chunks/panzoom.es-DnuzxUQi.js +1 -0
- package/dist/chunks/parse-6ZQGx714.js +1 -0
- package/dist/chunks/parser-DC3PvpL4.js +72 -0
- package/dist/chunks/path-VUNELGFR.js +1 -0
- package/dist/chunks/pegDiagram-XKGWAZYB-DxQqpKfh.js +1 -0
- package/dist/chunks/pie-WAS4IAKB-BsaegmNA.js +1 -0
- package/dist/chunks/pieDiagram-E7YTZNPT-BUsnkTkJ.js +39 -0
- package/dist/chunks/postal-mime-DMcA5b7k.js +28 -0
- package/dist/chunks/ppt-B0WY5Gks.js +30 -0
- package/dist/chunks/ppt-BIiNnCyj.js +1 -0
- package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
- package/dist/chunks/preload-helper-C-73SErw.js +1 -0
- package/dist/chunks/print-mask-Dguzv0rv.js +17 -0
- package/dist/chunks/printLayout-oeudvFkr.js +34 -0
- package/dist/chunks/printMask-LefOTJqk.js +8 -0
- package/dist/chunks/psd-hjeNFQZ-.js +36 -0
- package/dist/chunks/purify.es-BsWMI_aG.js +5 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC-BmQNSzhY.js +7 -0
- package/dist/chunks/radar-RG4KPBEZ-BoHdw2h7.js +1 -0
- package/dist/chunks/railroad-74A4TZTK-BifJffb4.js +1 -0
- package/dist/chunks/railroad-abnf-HS5TGJTU-CMEPumRO.js +1 -0
- package/dist/chunks/railroad-ebnf-LZEXJU2U-B06BgAeN.js +1 -0
- package/dist/chunks/railroad-peg-WCYAUIDC-CMjriUEs.js +1 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU-B2t5KY26.js +1 -0
- package/dist/chunks/react-runtime-x2lFbSKq.js +11 -0
- package/dist/chunks/refresh-cw-Dz8O9-Hp.js +8 -0
- package/dist/chunks/rendered-slot-YhfmcMJr.js +1 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE-CBBfNOAp.js +84 -0
- package/dist/chunks/rolldown-runtime-BKuNeK48.js +1 -0
- package/dist/chunks/rotate-ccw-D2__Zisi.js +8 -0
- package/dist/chunks/rotate-cw-BSTVLlWY.js +8 -0
- package/dist/chunks/rough.esm-CVrpq1dW.js +1 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB-Cp8SrFyb.js +40 -0
- package/dist/chunks/save-w-NwiMMY.js +8 -0
- package/dist/chunks/search-DYZU68h1.js +8 -0
- package/dist/chunks/search-filters-CRIhZ0gL.js +1 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4-PDtVfEoj.js +162 -0
- package/dist/chunks/shield-alert-De_Hx56I.js +8 -0
- package/dist/chunks/sizeCapture-INFHLROL-DA-kAaXB.js +1 -0
- package/dist/chunks/skeleton-CrjMjJNr.js +1 -0
- package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
- package/dist/chunks/spreadsheet-LR3SOG-x.js +58 -0
- package/dist/chunks/sql-wasm-browser-CFddXd9f.js +2 -0
- package/dist/chunks/src-C1iDJpBK.js +1 -0
- package/dist/chunks/src-vLpLkuQx.js +1 -0
- package/dist/chunks/stateDiagram-D77RDMKH-C1Sx8KUD.js +1 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH-7wYLSzBX.js +1 -0
- package/dist/chunks/swimlanes-42K2YHIH-BmybX9eL.js +1 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N-DxhXklfm.js +8 -0
- package/dist/chunks/tabs-BobA_IcO.js +1 -0
- package/dist/chunks/theme-controller-D-ATwFal.js +1 -0
- package/dist/chunks/timeline-definition-24CTP7MA-QS9QNm2i.js +120 -0
- package/dist/chunks/tinycolor-CG1wnM-U.js +1 -0
- package/dist/chunks/togeojson.es-BE8iM7U6.js +1 -0
- package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
- package/dist/chunks/trash-tHBT8Mpw.js +8 -0
- package/dist/chunks/treeView-Q6P3EWNA-CN0l7whJ.js +1 -0
- package/dist/chunks/treemap-WGGIJYW6-C4P1fQxS.js +1 -0
- package/dist/chunks/typography-DKK_iHcj.js +1 -0
- package/dist/chunks/ui-BFsHoY7a.js +1 -0
- package/dist/chunks/ui-utils-ClxYogUQ.js +1 -0
- package/dist/chunks/upload-M-n6woFv.js +8 -0
- package/dist/chunks/useCrudOperationColumn-D935tixd.js +1 -0
- package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
- package/dist/chunks/useModalViewport-HF7te75S.js +1 -0
- package/dist/chunks/useRowSelection-4GOMFmjG.js +1 -0
- package/dist/chunks/useStatusToggle-B2qZaoc-.js +1 -0
- package/dist/chunks/user-round-kYfBkPNu.js +15 -0
- package/dist/chunks/users-BXZLb4TY.js +8 -0
- package/dist/chunks/vennDiagram-4TSXK5OY-CVd73ycc.js +34 -0
- package/dist/chunks/view-B8ZvC8z3.js +1 -0
- package/dist/chunks/viewer-Ct88ypIL.js +24 -0
- package/dist/chunks/wardley-WFR3VGLG-cG9pRFwD.js +1 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4-B42d0Gqz.js +78 -0
- package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
- package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
- package/dist/chunks/wordMl-Y_ghyTZ8.js +1 -0
- package/dist/chunks/worker-engine-B4e92GsN.js +17369 -0
- package/dist/chunks/x-Ak9hw1R9.js +8 -0
- package/dist/chunks/xmind-CF9YwkOD.js +58 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z-B_Owv9Ho.js +7 -0
- package/dist/file-viewer/flyfish-viewer-assets.json +46 -0
- package/dist/file-viewer/vendor/docx/docx.worker.js +5 -0
- package/dist/file-viewer/vendor/docx/jszip.min.js +13 -0
- package/dist/file-viewer/vendor/xlsx/sheet.worker.js +107 -0
- package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/public/avatars/avatar-01.svg +1 -0
- package/dist/public/avatars/avatar-02.svg +1 -0
- package/dist/public/avatars/avatar-03.svg +1 -0
- package/dist/public/avatars/avatar-04.svg +1 -0
- package/dist/public/avatars/avatar-05.svg +1 -0
- package/dist/public/avatars/avatar-06.svg +1 -0
- package/dist/public/avatars/avatar-07.svg +1 -0
- package/dist/public/avatars/avatar-08.svg +1 -0
- package/dist/public/avatars/avatar-09.svg +1 -0
- package/dist/public/avatars/avatar-10.svg +1 -0
- package/dist/public/avatars/avatar-11.svg +1 -0
- package/dist/public/avatars/avatar-12.svg +1 -0
- package/dist/public/monaco/vs/abap-D-t0cyap.js +1 -0
- package/dist/public/monaco/vs/apex-CcIm7xu6.js +1 -0
- package/dist/public/monaco/vs/assets/css.worker-URu8fCFR.js +97 -0
- package/dist/public/monaco/vs/assets/editor.worker-lj3bdIIn.js +30 -0
- package/dist/public/monaco/vs/assets/editorWebWorkerMain-CA_vMoUU.js +30 -0
- package/dist/public/monaco/vs/assets/html.worker-D1SL3iM8.js +474 -0
- package/dist/public/monaco/vs/assets/json.worker-CoJx_OPf.js +62 -0
- package/dist/public/monaco/vs/assets/ts.worker-BWKtMYOk.js +67722 -0
- package/dist/public/monaco/vs/azcli-BA0tQDCg.js +1 -0
- package/dist/public/monaco/vs/basic-languages/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/bat-C397hTD6.js +1 -0
- package/dist/public/monaco/vs/bicep-DF5aW17k.js +2 -0
- package/dist/public/monaco/vs/cameligo-plsz8qhj.js +1 -0
- package/dist/public/monaco/vs/clojure-Y2auQMzK.js +1 -0
- package/dist/public/monaco/vs/coffee-Bu45yuWE.js +1 -0
- package/dist/public/monaco/vs/cpp-CkKPQIni.js +1 -0
- package/dist/public/monaco/vs/csharp-CX28MZyh.js +1 -0
- package/dist/public/monaco/vs/csp-D8uWnyxW.js +1 -0
- package/dist/public/monaco/vs/css-CaeNmE3S.js +3 -0
- package/dist/public/monaco/vs/css.worker-CyhWkhHo.js +1 -0
- package/dist/public/monaco/vs/cssMode-CV6Ay48H.js +1 -0
- package/dist/public/monaco/vs/cypher-DVThT8BS.js +1 -0
- package/dist/public/monaco/vs/dart-CmGfCvrO.js +1 -0
- package/dist/public/monaco/vs/dockerfile-CZqqYdch.js +1 -0
- package/dist/public/monaco/vs/ecl-30fUercY.js +1 -0
- package/dist/public/monaco/vs/editor/editor.main.css +1 -0
- package/dist/public/monaco/vs/editor/editor.main.js +1 -0
- package/dist/public/monaco/vs/editor-KLE6jdfb.js +831 -0
- package/dist/public/monaco/vs/editor.js +1 -0
- package/dist/public/monaco/vs/editorWorkerHost-fVE1cjcC.js +35 -0
- package/dist/public/monaco/vs/elixir-xjPaIfzF.js +1 -0
- package/dist/public/monaco/vs/flow9-DqtmStfK.js +1 -0
- package/dist/public/monaco/vs/freemarker2-FWreY7v7.js +3 -0
- package/dist/public/monaco/vs/fsharp-BOMdg4U1.js +1 -0
- package/dist/public/monaco/vs/go-D_hbi-Jt.js +1 -0
- package/dist/public/monaco/vs/graphql-CKUU4kLG.js +1 -0
- package/dist/public/monaco/vs/handlebars-CZi4pHCH.js +1 -0
- package/dist/public/monaco/vs/hcl-DTaboeZW.js +1 -0
- package/dist/public/monaco/vs/html-j_7ZTNRU.js +1 -0
- package/dist/public/monaco/vs/html.worker-CA3iAimZ.js +1 -0
- package/dist/public/monaco/vs/htmlMode-27by_KM4.js +1 -0
- package/dist/public/monaco/vs/index-049xrXrp.js +1 -0
- package/dist/public/monaco/vs/index-CBVt3dzv.js +5 -0
- package/dist/public/monaco/vs/index.js +1 -0
- package/dist/public/monaco/vs/ini-CsNwO04R.js +1 -0
- package/dist/public/monaco/vs/initialize-DL0l1TGY.js +1 -0
- package/dist/public/monaco/vs/java-CI4ZMsH9.js +1 -0
- package/dist/public/monaco/vs/javascript-DTJl4Jn1.js +1 -0
- package/dist/public/monaco/vs/json.worker-BizpAl9O.js +1 -0
- package/dist/public/monaco/vs/jsonMode-DLUiMUrI.js +1 -0
- package/dist/public/monaco/vs/julia-BwzEvaQw.js +1 -0
- package/dist/public/monaco/vs/kotlin-IUYPiTV8.js +1 -0
- package/dist/public/monaco/vs/language/css/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/html/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/json/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/language/typescript/monaco.contribution.js +1 -0
- package/dist/public/monaco/vs/less-C0eDYdqa.js +2 -0
- package/dist/public/monaco/vs/lexon-iON-Kj97.js +1 -0
- package/dist/public/monaco/vs/liquid-CLJYelW6.js +1 -0
- package/dist/public/monaco/vs/loader.js +1368 -0
- package/dist/public/monaco/vs/lspLanguageFeatures-BIkJOWLw.js +2 -0
- package/dist/public/monaco/vs/lua-DtygF91M.js +1 -0
- package/dist/public/monaco/vs/m3-CsR4AuFi.js +1 -0
- package/dist/public/monaco/vs/main-BEx-Fmlo.js +15 -0
- package/dist/public/monaco/vs/main-DsK8pnKg.js +3 -0
- package/dist/public/monaco/vs/markdown-C_rD0bIw.js +1 -0
- package/dist/public/monaco/vs/mdx-CpzZIPHF.js +1 -0
- package/dist/public/monaco/vs/mips-CiYP61RB.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-9cKT3C7t.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BE88ZNGY.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BPhsneLd.js +1 -0
- package/dist/public/monaco/vs/monaco.contribution-BgRy6xDf.js +1 -0
- package/dist/public/monaco/vs/msdax-C38-sJlp.js +1 -0
- package/dist/public/monaco/vs/mysql-CdtbpvbG.js +1 -0
- package/dist/public/monaco/vs/nls/lang/cs.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/cs.js +9 -0
- package/dist/public/monaco/vs/nls/lang/de.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/de.js +9 -0
- package/dist/public/monaco/vs/nls/lang/es.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/es.js +9 -0
- package/dist/public/monaco/vs/nls/lang/fr.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/fr.js +9 -0
- package/dist/public/monaco/vs/nls/lang/it.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/it.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ja.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ja.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ko.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ko.js +9 -0
- package/dist/public/monaco/vs/nls/lang/pl.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/pl.js +9 -0
- package/dist/public/monaco/vs/nls/lang/pt-br.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/pt-br.js +9 -0
- package/dist/public/monaco/vs/nls/lang/ru.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/ru.js +9 -0
- package/dist/public/monaco/vs/nls/lang/tr.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/tr.js +9 -0
- package/dist/public/monaco/vs/nls/lang/zh-cn.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/zh-cn.js +9 -0
- package/dist/public/monaco/vs/nls/lang/zh-tw.d.ts +1 -0
- package/dist/public/monaco/vs/nls/lang/zh-tw.js +9 -0
- package/dist/public/monaco/vs/nls.messages-loader.js +1 -0
- package/dist/public/monaco/vs/objective-c-CntZFaHX.js +1 -0
- package/dist/public/monaco/vs/pascal-r6kuqfl_.js +1 -0
- package/dist/public/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
- package/dist/public/monaco/vs/perl-DABw_TcH.js +1 -0
- package/dist/public/monaco/vs/pgsql-me_jFXeX.js +1 -0
- package/dist/public/monaco/vs/php-D_kh-9LK.js +1 -0
- package/dist/public/monaco/vs/pla-VfZjczW0.js +1 -0
- package/dist/public/monaco/vs/postiats-BBSzz8Pk.js +1 -0
- package/dist/public/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
- package/dist/public/monaco/vs/powershell-B-7ap1zc.js +1 -0
- package/dist/public/monaco/vs/protobuf-BmtuEB1A.js +2 -0
- package/dist/public/monaco/vs/pug-BRpRNeEb.js +1 -0
- package/dist/public/monaco/vs/python-CqWUUgfu.js +1 -0
- package/dist/public/monaco/vs/qsharp-BzsFaUU9.js +1 -0
- package/dist/public/monaco/vs/r-f8dDdrp4.js +1 -0
- package/dist/public/monaco/vs/razor-hok5y9Km.js +1 -0
- package/dist/public/monaco/vs/redis-fvZQY4PI.js +1 -0
- package/dist/public/monaco/vs/redshift-45Et0LQi.js +1 -0
- package/dist/public/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
- package/dist/public/monaco/vs/ruby-CZO8zYTz.js +1 -0
- package/dist/public/monaco/vs/rust-Bfetafyc.js +1 -0
- package/dist/public/monaco/vs/sb-3GYllVck.js +1 -0
- package/dist/public/monaco/vs/scala-foMgrKo1.js +1 -0
- package/dist/public/monaco/vs/scheme-CHdMtr7p.js +1 -0
- package/dist/public/monaco/vs/scss-C1cmLt9V.js +3 -0
- package/dist/public/monaco/vs/shell-ClXCKCEW.js +1 -0
- package/dist/public/monaco/vs/solidity-MZ6ExpPy.js +1 -0
- package/dist/public/monaco/vs/sophia-DWkuSsPQ.js +1 -0
- package/dist/public/monaco/vs/sparql-AUGFYSyk.js +1 -0
- package/dist/public/monaco/vs/sql-32GpJSV2.js +1 -0
- package/dist/public/monaco/vs/st-CuDFIVZ_.js +1 -0
- package/dist/public/monaco/vs/swift-t-PfMj7W.js +1 -0
- package/dist/public/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
- package/dist/public/monaco/vs/tcl-D74tq1nH.js +1 -0
- package/dist/public/monaco/vs/toggleHighContrast-qGX7E9o7.js +61 -0
- package/dist/public/monaco/vs/ts.worker-2QLmBukE.js +1 -0
- package/dist/public/monaco/vs/tsMode-B0S_kp2q.js +11 -0
- package/dist/public/monaco/vs/twig-C6taOxMV.js +1 -0
- package/dist/public/monaco/vs/typescript-_2t_511t.js +1 -0
- package/dist/public/monaco/vs/typespec-8OfoLt6R.js +1 -0
- package/dist/public/monaco/vs/vb-Dyb2648j.js +1 -0
- package/dist/public/monaco/vs/wgsl-BhLXMOR0.js +298 -0
- package/dist/public/monaco/vs/workers-BBttULjf.js +1 -0
- package/dist/public/monaco/vs/xml-cZjNDqDT.js +1 -0
- package/dist/public/monaco/vs/yaml-A1fOIdH6.js +1 -0
- package/dist/src-LbWcrSWe.js +3 -0
- package/dist/styles.css +2 -0
- package/dist/styles.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +113 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,w as i}from"./src-C1iDJpBK.js";import{j as a,x as o}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{d as s}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as c}from"./chunk-PWAF6VOD-IORmPx9D.js";import{i as l}from"./chunk-GMAD6QVW-D41KnniX.js";import{n as u}from"./chunk-P2QGCYS3-C9bc1yiM.js";import{c as d,r as f}from"./chunk-4HAMMTFA-Aw59LwS3.js";import{a as p,n as m,o as ee,r as h}from"./chunk-GVQU2GXP-CVzgM_ui.js";import{a as g,i as _,l as v,o as y}from"./chunk-OSK3NFVY-C9uWOXTC.js";import{n as b,t as x}from"./graphlib-CYBMTUbW.js";import{r as S,t as C}from"./dagre-ZVAWSfFw.js";import{n as w,r as T}from"./chunk-L3NEJ4N5-CmvrS7Dt.js";import{a as E,c as te,d as D,i as O,l as k,r as A,s as j,t as M}from"./chunk-2E4U76K2-DNbbdpCx.js";var N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q;function $(){return($=e((()=>{te(),w(),_(),h(),f(),u(),l(),c(),s(),a(),r(),n(),C(),x(),N=/* @__PURE__ */ t((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),P=/* @__PURE__ */ t((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),F=/* @__PURE__ */ t(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),I=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],L=/* @__PURE__ */ t((e,t,n,r,i)=>{let a=[],o=/* @__PURE__ */ new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return P(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:P(i)},`getSelfLoopSide`),R=/* @__PURE__ */ t((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=N(Math.max(r,e.width*.35),36,c),u=N(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),z=/* @__PURE__ */ t((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),B=/* @__PURE__ */ t((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=/* @__PURE__ */ new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=L(e,l,n,c.start,a),f=R(l,d,t,u.width??0),p=z(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),V=/* @__PURE__ */ t(async({element:e,graph:n,diagramType:r,id:a,parentCluster:o,siteConfig:s})=>{let c=n.graph().rankdir;i.trace(`Dir in recursive render - dir:`,c);let{clusters:l,edgePaths:u,edgeLabels:f,nodes:p,rootGroups:h}=E(e,{edgePathsClass:`edgePaths`});n.nodes()?i.info(`Recursive render XXX`,n.nodes()):i.info(`No nodes found for`,n),n.edges().length>0&&i.info(`Recursive edges`,n.edge(n.edges()[0]));let g=F(r);await Promise.all(n.nodes().map(async function(e){let t=n.node(e);if(o!==void 0){let t=JSON.parse(JSON.stringify(o.clusterData));i.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,e,`
|
|
3
|
+
data=`,t.height,`
|
|
4
|
+
Parent cluster`,o.height),n.setNode(o.id,t),n.parent(e)||(i.trace(`Setting parent`,e,o.id),n.setParent(e,o.id,t))}if(i.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(n.node(e))),t?.clusterNode){i.info(`Cluster identified XBX`,e,t.width,n.node(e));let{ranksep:o,nodesep:c}=n.graph();t.graph.setGraph({...t.graph.graph(),ranksep:o+25,nodesep:c});let l=await J({element:p,graph:t.graph,diagramType:r,id:a,parentCluster:n.node(e),siteConfig:s}),u=l.elem;d(t,u),t.diff=l.diff||0,i.info(`New compound node after recursive render XAX`,e,`width`,t.width,`height`,t.height),ee(u,t)}else n.children(e).length>0?(i.trace(`Cluster - the non recursive path XBX`,e,t.id,t,t.width,`Graph:`,n),i.trace(j(t.id,n)),A.set(t.id,{id:j(t.id,n),node:t})):(i.trace(`Node - the non recursive path XAX`,e,p,n.node(e),c),await k(p,n.node(e),{config:s,dir:c}))})),await(/* @__PURE__ */ t(async()=>{let e=n.edges().map(async function(e){let t=n.edge(e.v,e.w,e.name);if(i.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),i.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(n.edge(e))),i.info(`Fix`,A,`ids:`,e.v,e.w,`Translating: `,A.get(e.v),A.get(e.w)),g&&t.selfLoop){if(t.selfLoop.order!==1)return;let e={...t.originalEdge,...t,id:t.selfLoop.id,startLabelLeft:t.originalEdge?.startLabelLeft??t.startLabelLeft,startLabelRight:t.originalEdge?.startLabelRight??t.startLabelRight,endLabelLeft:t.originalEdge?.endLabelLeft??t.endLabelLeft,endLabelRight:t.originalEdge?.endLabelRight??t.endLabelRight};await y(f,e),t.width=e.width,t.height=e.height,t.labelStyle=e.labelStyle}else await y(f,t)});await Promise.all(e)},`processEdges`))();let{subGraphTitleTotalMargin:_}=m(s);return{elem:h,graph:n,groups:{clusters:l,edgePaths:u,edgeLabels:f,nodes:p,rootGroups:h},diagramType:r,id:a,mergeSelfLoops:g,subGraphTitleTotalMargin:_}},`measureDagreGraph`),H=/* @__PURE__ */ t(e=>{i.info(`############################################# XXX`),i.info(`### Layout ### XXX`),i.info(`############################################# XXX`),S(e)},`runDagreGraphLayout`),U=/* @__PURE__ */ t((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r?.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),W=/* @__PURE__ */ t((e,t)=>{I.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),G=/* @__PURE__ */ t((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),K=/* @__PURE__ */ t((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));D(n).forEach(e=>{let t=U(n,e,i);if(!t)return;W(n.node(e),t);let r=a.get(e);r&&W(r,t)});let o=i/2;return e.edges=B(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>G(e,t,n,o)),e},`applyDagreLayoutResult`),q=/* @__PURE__ */ t(async({elem:e,graph:t,groups:{clusters:n,edgePaths:r},diagramType:a,id:o,mergeSelfLoops:s,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(D(t).map(async function(e){let r=t.node(e);if(i.info(`Position XBX => `+e+`: (`+r.x,`,`+r.y,`) width: `,r.width,` height: `,r.height),r?.clusterNode)r.y+=c,i.info(`A tainted cluster node XBX1`,e,r.id,r.width,r.height,r.x,r.y,t.parent(e)),A.get(r.id).node=r,p(r);else if(t.children(e).length>0){i.info(`A pure cluster node XBX1`,e,r.id,r.x,r.y,r.width,r.height,t.parent(e)),r.height+=c,t.node(r.parentId);let a=r?.padding/2||0,o=r?.labelBBox?.height||0,s=o-a||0;i.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,a),await T(n,r),A.get(r.id).node=r}else{let e=t.node(r.parentId);r.y+=c/2,i.info(`A regular node XBX1 - using the padding`,r.id,`parent`,r.parentId,r.width,r.height,r.x,r.y,`offsetY`,r.offsetY,`parent`,e,e?.offsetY,r),p(r)}}));let u=c/2;return B(t,u,{mergeSelfLoops:s}).forEach(function({edge:e,start:n,end:s}){i.info(`Edge `+n+` -> `+s+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=u);let c=t.node(n),l=t.node(s),d=g(r,e,A,a,c,l,o);v(e,d)}),t.nodes().forEach(function(e){let n=t.node(e);i.info(e,n.type,n.diff),n.isGroup&&(l=n.diff)}),i.warn(`Returning from recursive render XAX`,e,l),{elem:e,diff:l}},`paintDagreLayoutCore`),J=/* @__PURE__ */ t(async e=>{let t=await V(e);return H(t.graph),await q(t)},`renderDagreSubgraph`),Y=/* @__PURE__ */ t(e=>{let t=new b({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),i.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let n=e.start,r=n+`---`+n+`---1`,i=n+`---`+n+`---2`,a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),t.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=n+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=n+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=n,l.toCluster=n),l.id=n+`-cyclic-special-2`,l.arrowTypeStart=`none`,t.setEdge(n,r,s,n+`-cyclic-special-0`),t.setEdge(r,i,c,n+`-cyclic-special-1`),t.setEdge(i,n,l,n+`-cyclic-special-2`)}else t.setEdge(e.start,e.end,{...e},e.id)}),M(t),{graph:t}},`prepareLayoutForDagre`),X=/* @__PURE__ */ t(async(e,{element:t,preparedLayout:n})=>{let r=n??Y(e),i=o(),a=await V({element:t,graph:r.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return r.measuredLayout=a,a},`measureDagreLayout`),Z=/* @__PURE__ */ t((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return H(n.graph),K(e,n),n},`runDagreLayoutCore`),Q=O({prepareLayout:Y,measureLayout:X,runLayoutCore:Z,paintOptions:{clusterDb:A,getNodes:/* @__PURE__ */ t((e,{measure:t})=>D(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:/* @__PURE__ */ t((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:/* @__PURE__ */ t((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:/* @__PURE__ */ t((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}})})))()}$();export{K as applyDagreLayoutResult,B as getEdgesToRender,X as measureDagreLayout,Y as prepareLayoutForDagre,Q as render,Z as runDagreLayoutCore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{$ as t,$t as n,A as r,At as i,B as a,Bt as o,C as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as ee,Gt as te,H as ne,Ht as re,I as ie,It as ae,J as oe,Jt as h,K as se,Kt as ce,L as le,Lt as ue,M as de,Mt as fe,N as pe,Nt as me,O as he,Ot as ge,P as _e,Pt as ve,Q as ye,Qt as be,R as xe,Rt as Se,S as Ce,St as we,T as g,Tt as Te,U as Ee,Ut as De,V as Oe,Vt as ke,W as Ae,Wt as je,X as Me,Xt as _,Y as Ne,Yt as v,Z as Pe,Zt as y,_ as Fe,_t as Ie,a as Le,an as Re,at as ze,b as Be,bt as Ve,c as He,cn as Ue,ct as We,d as Ge,dt as Ke,en as qe,et as Je,f as b,ft as Ye,g as Xe,gt as Ze,h as Qe,ht as $e,i as et,in as tt,it as nt,j as rt,jt as it,k as at,kt as ot,l as x,ln as st,lt as ct,m as lt,mt as ut,n as S,nn as dt,nt as ft,o as pt,on as mt,p as C,pt as ht,q as gt,qt as _t,r as vt,rn as yt,rt as bt,s as w,sn as xt,st as St,t as T,tn as Ct,tt as wt,u as E,ut as Tt,v as Et,vt as Dt,w as D,wt as O,x as Ot,xt as kt,y as At,yt as jt,z as Mt,zt as Nt}from"./graphlib-CYBMTUbW.js";function Pt(e){for(var t=e.length;t--&&Ft.test(e.charAt(t)););return t}var Ft;function It(){return(It=e((()=>{Ft=/\s/})))()}function Lt(e){return e&&e.slice(0,Pt(e)+1).replace(Rt,``)}var Rt;function zt(){return(zt=e((()=>{It(),Rt=/^\s+/})))()}function Bt(e){if(typeof e==`number`)return e;if(Ct(e))return Vt;if(v(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Lt(e);var n=Ut.test(e);return n||Wt.test(e)?Gt(e.slice(2),n?2:8):Ht.test(e)?Vt:+e}var Vt,Ht,Ut,Wt,Gt;function Kt(){return(Kt=e((()=>{zt(),h(),qe(),Vt=NaN,Ht=/^[-+]0x[0-9a-f]+$/i,Ut=/^0b[01]+$/i,Wt=/^0o[0-7]+$/i,Gt=parseInt})))()}function qt(e){return e?(e=Bt(e),e===Jt||e===-Jt?(e<0?-1:1)*Yt:e===e?e:0):e===0?e:0}var Jt,Yt;function Xt(){return(Xt=e((()=>{Kt(),Jt=1/0,Yt=17976931348623157e292})))()}function Zt(e){var t=qt(e),n=t%1;return t===t?n?t-n:t:0}function Qt(){return(Qt=e((()=>{Xt()})))()}var $t,en;function tn(){return(tn=e((()=>{h(),$t=Object.create,en=function(){function e(){}return function(t){if(!v(t))return{};if($t)return $t(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()})))()}function nn(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function rn(){return(rn=e((()=>{})))()}function an(e,t,n){t==`__proto__`&&o?o(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function k(){return(k=e((()=>{ke()})))()}function on(e,t,n){var r=e[t];(!(sn.call(e,t)&&i(r,n))||n===void 0&&!(t in e))&&an(e,t,n)}var sn;function A(){return(A=e((()=>{k(),it(),sn=Object.prototype.hasOwnProperty})))()}function j(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?an(n,s,c):on(n,s,c)}return n}function M(){return(M=e((()=>{A(),k()})))()}function N(e,t,n){if(!v(n))return!1;var r=typeof t;return(r==`number`?Te(n)&&me(t,n.length):r==`string`&&t in n)?i(n[t],e):!1}function P(){return(P=e((()=>{it(),O(),fe(),h()})))()}function cn(e){return f(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&N(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function ln(){return(ln=e((()=>{u(),P()})))()}function un(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function dn(){return(dn=e((()=>{})))()}function fn(e){if(!v(e))return un(e);var t=c(e),n=[];for(var r in e)(r!=`constructor`||!t&&pn.call(e,r))&&n.push(r);return n}var pn;function mn(){return(mn=e((()=>{h(),we(),dn(),pn=Object.prototype.hasOwnProperty})))()}function F(e){return Te(e)?Tt(e,!0):fn(e)}function I(){return(I=e((()=>{Ke(),mn(),O()})))()}function L(e){return e!=null&&e.length?se(e,1):[]}function R(){return(R=e((()=>{gt()})))()}function hn(e){return Nt(ot(e,void 0,L),e+``)}function gn(){return(gn=e((()=>{R(),ge(),Se()})))()}var _n;function vn(){return(vn=e((()=>{We(),_n=ct(Object.getPrototypeOf,Object)})))()}function yn(e){if(!yt(e)||tt(e)!=bn)return!1;var t=_n(e);if(t===null)return!0;var n=wn.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Cn.call(n)==Tn}var bn,xn,Sn,Cn,wn,Tn;function En(){return(En=e((()=>{Re(),vn(),dt(),bn=`[object Object]`,xn=Function.prototype,Sn=Object.prototype,Cn=xn.toString,wn=Sn.hasOwnProperty,Tn=Cn.call(Object)})))()}function Dn(){return(Dn=e((()=>{})))()}function On(e,t){return e&&j(t,ze(t),e)}function kn(){return(kn=e((()=>{M(),nt()})))()}function An(e,t){return e&&j(t,F(t),e)}function jn(){return(jn=e((()=>{M(),I()})))()}function Mn(e,t){if(t)return e.slice();var n=e.length,r=In?In(n):new e.constructor(n);return e.copy(r),r}var Nn,Pn,Fn,In;function Ln(){return(Ln=e((()=>{Ue(),Nn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Pn=Nn&&typeof module==`object`&&module&&!module.nodeType&&module,Fn=Pn&&Pn.exports===Nn?st.Buffer:void 0,In=Fn?Fn.allocUnsafe:void 0})))()}function Rn(e,t){return j(e,a(e),t)}function zn(){return(zn=e((()=>{M(),Oe()})))()}var Bn;function Vn(){return(Vn=e((()=>{Ne(),vn(),Oe(),ne(),Bn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)oe(t,a(e)),e=_n(e);return t}:Ee})))()}function Hn(e,t){return j(e,Bn(e),t)}function Un(){return(Un=e((()=>{M(),Vn()})))()}function Wn(e){return xe(e,F,Bn)}function Gn(){return(Gn=e((()=>{Mt(),Vn(),I()})))()}function Kn(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&qn.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var qn;function Jn(){return(Jn=e((()=>{qn=Object.prototype.hasOwnProperty})))()}function Yn(e){var t=new e.constructor(e.byteLength);return new de(t).set(new de(e)),t}function Xn(){return(Xn=e((()=>{pe()})))()}function Zn(e,t){var n=t?Yn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Qn(){return(Qn=e((()=>{Xn()})))()}function $n(e){var t=new e.constructor(e.source,er.exec(e));return t.lastIndex=e.lastIndex,t}var er;function tr(){return(tr=e((()=>{er=/\w*$/})))()}function nr(e){return ir?Object(ir.call(e)):{}}var rr,ir;function ar(){return(ar=e((()=>{xt(),rr=mt?mt.prototype:void 0,ir=rr?rr.valueOf:void 0})))()}function or(e,t){var n=t?Yn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function sr(){return(sr=e((()=>{Xn()})))()}function cr(e,t,n){var r=e.constructor;switch(t){case _r:return Yn(e);case lr:case ur:return new r(+e);case vr:return Zn(e,n);case yr:case br:case xr:case Sr:case Cr:case wr:case Tr:case Er:case Dr:return or(e,n);case dr:return new r;case fr:case hr:return new r(e);case pr:return $n(e);case mr:return new r;case gr:return nr(e)}}var lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr;function Or(){return(Or=e((()=>{Xn(),Qn(),tr(),ar(),sr(),lr=`[object Boolean]`,ur=`[object Date]`,dr=`[object Map]`,fr=`[object Number]`,pr=`[object RegExp]`,mr=`[object Set]`,hr=`[object String]`,gr=`[object Symbol]`,_r=`[object ArrayBuffer]`,vr=`[object DataView]`,yr=`[object Float32Array]`,br=`[object Float64Array]`,xr=`[object Int8Array]`,Sr=`[object Int16Array]`,Cr=`[object Int32Array]`,wr=`[object Uint8Array]`,Tr=`[object Uint8ClampedArray]`,Er=`[object Uint16Array]`,Dr=`[object Uint32Array]`})))()}function kr(e){return typeof e.constructor==`function`&&!c(e)?en(_n(e)):{}}function Ar(){return(Ar=e((()=>{tn(),vn(),we()})))()}function jr(e){return yt(e)&&_e(e)==Mr}var Mr;function Nr(){return(Nr=e((()=>{p(),dt(),Mr=`[object Map]`})))()}var Pr,Fr;function Ir(){return(Ir=e((()=>{Nr(),Ie(),ut(),Pr=$e&&$e.isMap,Fr=Pr?Ze(Pr):jr})))()}function Lr(e){return yt(e)&&_e(e)==Rr}var Rr;function zr(){return(zr=e((()=>{p(),dt(),Rr=`[object Set]`})))()}var Br,Vr;function Hr(){return(Hr=e((()=>{zr(),Ie(),ut(),Br=$e&&$e.isSet,Vr=Br?Ze(Br):Lr})))()}function Ur(e,t,n,r,i,a){var o,s=t&Wr,c=t&Gr,l=t&Kr;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!v(e))return e;var u=y(e);if(u){if(o=Kn(e),!s)return nn(e,o)}else{var d=_e(e),f=d==Qr||d==$r;if(jt(e))return Mn(e,s);if(d==ni||d==qr||f&&!i){if(o=c||f?{}:kr(e),!s)return c?Hn(e,An(o,e)):Rn(e,On(o,e))}else{if(!z[d])return i?e:{};o=cr(e,d,s)}}a||=new Ae;var p=a.get(e);if(p)return p;a.set(e,o),Vr(e)?e.forEach(function(r){o.add(Ur(r,t,n,r,e,a))}):Fr(e)&&e.forEach(function(r,i){o.set(i,Ur(r,t,n,i,e,a))});var m=u?void 0:(l?c?Wn:ie:c?F:ze)(e);return ae(m||e,function(r,i){m&&(i=r,r=e[i]),on(o,i,Ur(r,t,n,i,e,a))}),o}var Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,z;function yi(){return(yi=e((()=>{ee(),ue(),A(),kn(),jn(),Ln(),rn(),zn(),Un(),le(),Gn(),p(),Jn(),Or(),Ar(),_(),Dt(),Ir(),h(),Hr(),nt(),I(),Wr=1,Gr=2,Kr=4,qr=`[object Arguments]`,Jr=`[object Array]`,Yr=`[object Boolean]`,Xr=`[object Date]`,Zr=`[object Error]`,Qr=`[object Function]`,$r=`[object GeneratorFunction]`,ei=`[object Map]`,ti=`[object Number]`,ni=`[object Object]`,ri=`[object RegExp]`,ii=`[object Set]`,ai=`[object String]`,oi=`[object Symbol]`,si=`[object WeakMap]`,ci=`[object ArrayBuffer]`,li=`[object DataView]`,ui=`[object Float32Array]`,di=`[object Float64Array]`,fi=`[object Int8Array]`,pi=`[object Int16Array]`,mi=`[object Int32Array]`,hi=`[object Uint8Array]`,gi=`[object Uint8ClampedArray]`,_i=`[object Uint16Array]`,vi=`[object Uint32Array]`,z={},z[qr]=z[Jr]=z[ci]=z[li]=z[Yr]=z[Xr]=z[ui]=z[di]=z[fi]=z[pi]=z[mi]=z[ei]=z[ti]=z[ni]=z[ri]=z[ii]=z[ai]=z[oi]=z[hi]=z[gi]=z[_i]=z[vi]=!0,z[Zr]=z[Qr]=z[si]=!1})))()}function bi(e){return Ur(e,xi|Si)}var xi,Si;function Ci(){return(Ci=e((()=>{yi(),xi=1,Si=4})))()}var wi;function Ti(){return(Ti=e((()=>{Ue(),wi=function(){return st.Date.now()}})))()}var Ei,Di,Oi;function ki(){return(ki=e((()=>{u(),it(),P(),I(),Ei=Object.prototype,Di=Ei.hasOwnProperty,Oi=f(function(e,t){e=Object(e);var n=-1,r=t.length,a=r>2?t[2]:void 0;for(a&&N(t[0],t[1],a)&&(r=1);++n<r;)for(var o=t[n],s=F(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===void 0||i(d,Ei[u])&&!Di.call(e,u))&&(e[u]=o[u])}return e})})))()}function Ai(e,t,n){(n!==void 0&&!i(e[t],n)||n===void 0&&!(t in e))&&an(e,t,n)}function ji(){return(ji=e((()=>{k(),it()})))()}function Mi(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}function Ni(){return(Ni=e((()=>{})))()}function Pi(e){return j(e,F(e))}function Fi(){return(Fi=e((()=>{M(),I()})))()}function Ii(e,t,n,r,i,a,o){var s=Mi(e,n),c=Mi(t,n),l=o.get(c);if(l)Ai(e,n,l);else{var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=y(c),p=!f&&jt(c),m=!f&&!p&&ht(c);u=c,f||p||m?y(s)?u=s:Fe(s)?u=nn(s):p?(d=!1,u=Mn(c,!0)):m?(d=!1,u=or(c,!0)):u=[]:yn(c)||kt(c)?(u=s,kt(s)?u=Pi(s):(!v(s)||te(s))&&(u=kr(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ai(e,n,u)}}function Li(){return(Li=e((()=>{ji(),Ln(),sr(),rn(),Ar(),Ve(),_(),Xe(),Dt(),je(),h(),En(),Ye(),Ni(),Fi()})))()}function Ri(e,t,n,r,i){e!==t&&Ce(t,function(a,o){if(i||=new Ae,v(a))Ii(e,t,o,n,Ri,r,i);else{var s=r?r(Mi(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Ai(e,o,s)}},F)}function zi(){return(zi=e((()=>{ee(),ji(),s(),Li(),h(),I(),Ni()})))()}function Bi(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Vi(){return(Vi=e((()=>{})))()}function Hi(e){return function(t,n,r){var i=Object(t);if(!Te(t)){var a=D(n,3);t=ze(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}function Ui(){return(Ui=e((()=>{g(),O(),nt()})))()}function Wi(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Zt(n);return i<0&&(i=Gi(r+i,0)),ve(e,D(t,3),i)}var Gi;function Ki(){return(Ki=e((()=>{m(),g(),Qt(),Gi=Math.max})))()}var qi;function Ji(){return(Ji=e((()=>{Ui(),Ki(),qi=Hi(Wi)})))()}function Yi(e,t){var n=-1,r=Te(e)?Array(e.length):[];return Et(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Xi(){return(Xi=e((()=>{At(),O()})))()}function B(e,t){return(y(e)?be:Yi)(e,D(t,3))}function V(){return(V=e((()=>{n(),g(),Xi(),_()})))()}function Zi(e,t){return e==null?e:Ce(e,lt(t),F)}function Qi(){return(Qi=e((()=>{s(),Qe(),I()})))()}function $i(e,t){return e&&Be(e,lt(t))}function ea(){return(ea=e((()=>{Ot(),Qe()})))()}function ta(e,t){return e>t}function na(){return(na=e((()=>{})))()}function ra(e,t){return e!=null&&ia.call(e,t)}var ia;function aa(){return(aa=e((()=>{ia=Object.prototype.hasOwnProperty})))()}function oa(e,t){return e!=null&&r(e,t,ra)}function sa(){return(sa=e((()=>{aa(),rt()})))()}function ca(){return(ca=e((()=>{Re(),_(),dt()})))()}function la(e,t){return e<t}function ua(){return(ua=e((()=>{})))()}function da(e,t){var n={};return t=D(t,3),Be(e,function(e,r,i){an(n,r,t(e,r,i))}),n}function fa(){return(fa=e((()=>{k(),Ot(),g()})))()}function pa(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!Ct(o):n(o,s)))var s=o,c=a}return c}function ma(){return(ma=e((()=>{qe()})))()}function H(e){return e&&e.length?pa(e,ce,ta):void 0}function U(){return(U=e((()=>{ma(),na(),_t()})))()}var ha;function ga(){return(ga=e((()=>{zi(),ln(),ha=cn(function(e,t,n){Ri(e,t,n)})})))()}function W(e){return e&&e.length?pa(e,ce,la):void 0}function _a(){return(_a=e((()=>{ma(),ua(),_t()})))()}function va(e,t){return e&&e.length?pa(e,D(t,2),la):void 0}function ya(){return(ya=e((()=>{ma(),g(),ua()})))()}function ba(e,n,r,i){if(!v(e))return e;n=Je(n,e);for(var a=-1,o=n.length,s=o-1,c=e;c!=null&&++a<o;){var l=t(n[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=v(d)?d:me(n[a+1])?[]:{})}on(c,l,u),c=c[l]}return e}function xa(){return(xa=e((()=>{A(),wt(),fe(),h(),ye()})))()}function Sa(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Me(e,o);n(s,o)&&ba(a,Je(o,e),s)}return a}function Ca(){return(Ca=e((()=>{Pe(),xa(),wt()})))()}function wa(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Ta(){return(Ta=e((()=>{})))()}function Ea(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=Ct(e),o=t!==void 0,s=t===null,c=t===t,l=Ct(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function Da(){return(Da=e((()=>{qe()})))()}function Oa(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Ea(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function ka(){return(ka=e((()=>{Da()})))()}function Aa(e,t,n){t=t.length?be(t,function(e){return y(e)?function(t){return Me(t,e.length===1?e[0]:e)}:e}):[ce];var r=-1;return t=be(t,Ze(D)),wa(Yi(e,function(e,n,i){return{criteria:be(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Oa(e,t,n)})}function ja(){return(ja=e((()=>{n(),Pe(),g(),Xi(),Ta(),Ie(),ka(),_t(),_()})))()}function Ma(){return(Ma=e((()=>{l(),d(`length`)})))()}var Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja;function Ya(){return(Ya=e((()=>{Na=`\\ud800-\\udfff`,Pa=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Fa=`\\ufe0e\\ufe0f`,Ia=`[`+Na+`]`,La=`[`+Pa+`]`,Ra=`\\ud83c[\\udffb-\\udfff]`,za=`(?:`+La+`|`+Ra+`)`,Ba=`[^`+Na+`]`,Va=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Ha=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Ua=`\\u200d`,Wa=za+`?`,Ga=`[`+Fa+`]?`,Ka=`(?:`+Ua+`(?:`+[Ba,Va,Ha].join(`|`)+`)`+Ga+Wa+`)*`,qa=Ga+Wa+Ka,Ja=`(?:`+[Ba+La+`?`,La,Va,Ha,Ia].join(`|`)+`)`,RegExp(Ra+`(?=`+Ra+`)|`+Ja+qa,`g`)})))()}function Xa(){return(Xa=e((()=>{Ma(),Dn(),Ya()})))()}function Za(e,t){return Sa(e,t,function(t,n){return he(e,n)})}function Qa(){return(Qa=e((()=>{Ca(),at()})))()}var G;function $a(){return($a=e((()=>{Qa(),gn(),G=hn(function(e,t){return e==null?{}:Za(e,t)})})))()}function eo(e,t,n,r){for(var i=-1,a=no(to((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var to,no;function ro(){return(ro=e((()=>{to=Math.ceil,no=Math.max})))()}function io(e){return function(t,n,r){return r&&typeof r!=`number`&&N(t,n,r)&&(n=r=void 0),t=qt(t),n===void 0?(n=t,t=0):n=qt(n),r=r===void 0?t<n?1:-1:qt(r),eo(t,n,r,e)}}function ao(){return(ao=e((()=>{ro(),P(),Xt()})))()}var K;function q(){return(q=e((()=>{ao(),K=io()})))()}function oo(){return(oo=e((()=>{St(),p(),O(),ca(),Xa()})))()}var J;function Y(){return(Y=e((()=>{gt(),ja(),u(),P(),J=f(function(e,t){if(e==null)return[];var n=t.length;return n>1&&N(e,t[0],t[1])?t=[]:n>2&&N(t[0],t[1],t[2])&&(t=[t[0]]),Aa(e,se(t,1),[])})})))()}function so(e){var t=++co;return bt(e)+t}var co;function lo(){return(lo=e((()=>{ft(),co=0})))()}function uo(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function fo(){return(fo=e((()=>{})))()}function po(e,t){return uo(e||[],t||[],on)}function mo(){return(mo=e((()=>{A(),fo()})))()}function ho(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function go(e,t){if(e!==`_next`&&e!==`_prev`)return t}var _o;function vo(){return(vo=e((()=>{_o=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return ho(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&ho(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,go)),n=n._prev;return`[`+e.join(`, `)+`]`}}})))()}function yo(e,t){if(e.nodeCount()<=1)return[];var n=So(e,t||wo);return L(B(bo(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function bo(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)xo(e,t,n,o);for(;o=i.dequeue();)xo(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(xo(e,t,n,o,!0));break}}}return r}function xo(e,t,n,r,i){var a=i?[]:void 0;return b(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,Co(t,n,s)}),b(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,Co(t,n,o)}),e.removeNode(r.v),a}function So(e,t){var n=new S,r=0,i=0;b(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),b(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=K(i+r+3).map(function(){return new _o}),o=r+1;return b(n.nodes(),function(e){Co(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function Co(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var wo;function To(){return(To=e((()=>{De(),R(),V(),C(),q(),T(),vo(),wo=re(1)})))()}function Eo(e){var t=e.graph().acyclicer===`greedy`?yo(e,n(e)):Do(e);b(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,so(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function Do(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,b(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return b(e.nodes(),i),t}function Oo(e){b(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function ko(){return(ko=e((()=>{C(),lo(),To()})))()}function X(e,t,n,r){var i;do i=so(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function Ao(e){var t=new S().setGraph(e.graph());return b(e.nodes(),function(n){t.setNode(n,e.node(n))}),b(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function jo(e){var t=new S({multigraph:e.isMultigraph()}).setGraph(e.graph());return b(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),b(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function Mo(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function No(e){var t=B(K(Lo(e)+1),function(){return[]});return b(e.nodes(),function(n){var r=e.node(n),i=r.rank;w(i)||(t[i][r.order]=n)}),t}function Po(e){var t=W(B(e.nodes(),function(t){return e.node(t).rank}));b(e.nodes(),function(n){var r=e.node(n);oa(r,`rank`)&&(r.rank-=t)})}function Fo(e){var t=W(B(e.nodes(),function(t){return e.node(t).rank})),n=[];b(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;b(n,function(t,n){w(t)&&n%i!==0?--r:r&&b(t,function(t){e.node(t).rank+=r})})}function Io(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),X(e,`border`,i,t)}function Lo(e){return H(B(e.nodes(),function(t){var n=e.node(t).rank;if(!w(n))return n}))}function Ro(e,t){var n={lhs:[],rhs:[]};return b(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function zo(e,t){var n=wi();try{return t()}finally{console.log(e+` time: `+(wi()-n)+`ms`)}}function Bo(e,t){return t()}function Z(){return(Z=e((()=>{lo(),C(),V(),q(),pt(),_a(),sa(),U(),Ti(),T()})))()}function Vo(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&b(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)Ho(e,`borderLeft`,`_bl`,n,i,a),Ho(e,`borderRight`,`_br`,n,i,a)}}b(e.children(),t)}function Ho(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=X(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Uo(){return(Uo=e((()=>{C(),Z()})))()}function Wo(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&Ko(e)}function Go(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Jo(e),(t===`lr`||t===`rl`)&&(Xo(e),Ko(e))}function Ko(e){b(e.nodes(),function(t){qo(e.node(t))}),b(e.edges(),function(t){qo(e.edge(t))})}function qo(e){var t=e.width;e.width=e.height,e.height=t}function Jo(e){b(e.nodes(),function(t){Yo(e.node(t))}),b(e.edges(),function(t){var n=e.edge(t);b(n.points,Yo),Object.prototype.hasOwnProperty.call(n,`y`)&&Yo(n)})}function Yo(e){e.y=-e.y}function Xo(e){b(e.nodes(),function(t){Zo(e.node(t))}),b(e.edges(),function(t){var n=e.edge(t);b(n.points,Zo),Object.prototype.hasOwnProperty.call(n,`x`)&&Zo(n)})}function Zo(e){var t=e.x;e.x=e.y,e.y=t}function Qo(){return(Qo=e((()=>{C()})))()}function $o(e){e.graph().dummyChains=[],b(e.edges(),function(t){es(e,t)})}function es(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d=0;for(++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=X(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function ts(e){b(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function ns(){return(ns=e((()=>{C(),Z()})))()}function rs(e){var t={};function n(r){var i=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return i.rank;t[r]=!0;var a=W(B(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}b(e.sources(),n)}function Q(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function is(){return(is=e((()=>{_a(),V(),C()})))()}function as(e){var t=new S({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;os(t,e)<r;)i=ss(t,e),a=t.hasNode(i.v)?Q(e,i):-Q(e,i),cs(t,e,a);return t}function os(e,t){function n(r){b(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!Q(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return b(e.nodes(),n),e.nodeCount()}function ss(e,t){return va(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Q(t,n)})}function cs(e,t,n){b(e.nodes(),function(e){t.node(e).rank+=n})}function ls(){return(ls=e((()=>{C(),ya(),T(),is()})))()}function us(){return(us=e((()=>{De(),re(1)})))()}function ds(){return(ds=e((()=>{us()})))()}function fs(){return(fs=e((()=>{De(),re(1)})))()}function ps(){return(ps=e((()=>{C(),oo()})))()}function ms(){return(ms=e((()=>{ps()})))()}function hs(e,t,n){y(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return b(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);gs(e,t,n===`post`,a,r,i)}),i}function gs(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),b(i(t),function(t){gs(e,t,n,r,i,a)}),n&&a.push(t))}function _s(){return(_s=e((()=>{_(),C()})))()}function vs(e,t){return hs(e,t,`post`)}function ys(){return(ys=e((()=>{_s()})))()}function bs(e,t){return hs(e,t,`pre`)}function xs(){return(xs=e((()=>{_s()})))()}function Ss(){return(Ss=e((()=>{vt()})))()}function Cs(){return(Cs=e((()=>{us(),ds(),fs(),ms(),ys(),xs(),Ss(),ps()})))()}function $(e){e=Ao(e),rs(e);var t=as(e);Ds(t),ws(t,e);for(var n,r;n=ks(t);)r=As(t,e,n),js(t,e,n,r)}function ws(e,t){var n=vs(e,e.nodes());n=n.slice(0,n.length-1),b(n,function(n){Ts(e,t,n)})}function Ts(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Es(e,t,n)}function Es(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,b(t.nodeEdges(n),function(a){var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,Ns(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function Ds(e,t){arguments.length<2&&(t=e.nodes()[0]),Os(e,{},1,t)}function Os(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,b(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=Os(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function ks(e){return qi(e.edges(),function(t){return e.edge(t).cutvalue<0})}function As(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),va(E(t.edges(),function(t){return c===Ps(e,e.node(t.v),s)&&c!==Ps(e,e.node(t.w),s)}),function(e){return Q(t,e)})}function js(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Ds(e),ws(e,t),Ms(e,t)}function Ms(e,t){var n=bs(e,qi(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),b(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Ns(e,t,n){return e.hasEdge(t,n)}function Ps(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Fs(){return(Fs=e((()=>{C(),Ji(),Ge(),ya(),Cs(),Z(),ls(),is(),$.initLowLimValues=Ds,$.initCutValues=ws,$.calcCutValue=Es,$.leaveEdge=ks,$.enterEdge=As,$.exchangeEdges=js})))()}function Is(e){switch(e.graph().ranker){case`network-simplex`:Rs(e);break;case`tight-tree`:Ls(e);break;case`longest-path`:zs(e);break;default:Rs(e)}}function Ls(e){rs(e),as(e)}function Rs(e){$(e)}var zs;function Bs(){return(Bs=e((()=>{ls(),Fs(),is(),zs=rs})))()}function Vs(e){var t=X(e,`root`,{},`_root`),n=Us(e),r=H(x(n))-1,i=2*r+1;e.graph().nestingRoot=t,b(e.edges(),function(t){e.edge(t).minlen*=i});var a=Ws(e)+1;b(e.children(),function(o){Hs(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function Hs(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length)o!==t&&e.setEdge(t,o,{weight:0,minlen:n});else{var c=Io(e,`_bt`),l=Io(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,b(s,function(s){Hs(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}}function Us(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&b(a,function(e){n(e,i+1)}),t[r]=i}return b(e.children(),function(e){n(e,1)}),t}function Ws(e){return Le(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function Gs(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,b(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function Ks(){return(Ks=e((()=>{U(),He(),C(),et(),Z()})))()}function qs(e,t,n){var r={},i;b(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Js(){return(Js=e((()=>{C()})))()}function Ys(e,t,n){var r=Xs(e),i=new S({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return b(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),b(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=w(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function Xs(e){for(var t;e.hasNode(t=so(`_root`)););return t}function Zs(){return(Zs=e((()=>{C(),pt(),lo(),T()})))()}function Qs(e,t){for(var n=0,r=1;r<t.length;++r)n+=$s(e,t[r-1],t[r]);return n}function $s(e,t,n){for(var r=po(n,B(n,function(e,t){return t})),i=L(B(t,function(t){return J(B(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var o=2*a-1;--a;var s=B(Array(o),function(){return 0}),c=0;return b(i.forEach(function(e){var t=e.pos+a;s[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function ec(){return(ec=e((()=>{mo(),V(),R(),Y(),C()})))()}function tc(e){var t={},n=E(e.nodes(),function(t){return!e.children(t).length}),r=H(B(n,function(t){return e.node(t).rank})),i=B(K(r+1),function(){return[]});function a(n){oa(t,n)||(t[n]=!0,i[e.node(n).rank].push(n),b(e.successors(n),a))}var o=J(n,function(t){return e.node(t).rank});return b(o,a),i}function nc(){return(nc=e((()=>{Ge(),U(),V(),q(),sa(),C(),Y()})))()}function rc(e,t){return B(t,function(t){var n=e.inEdges(t);if(n.length){var r=Le(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}function ic(){return(ic=e((()=>{V(),et()})))()}function ac(e,t){var n={};return b(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};w(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),b(t.edges(),function(e){var t=n[e.v],r=n[e.w];!w(t)&&!w(r)&&(r.indegree++,t.out.push(n[e.w]))}),oc(E(n,function(e){return!e.indegree}))}function oc(e){var t=[];function n(e){return function(t){t.merged||(w(t.barycenter)||w(e.barycenter)||t.barycenter>=e.barycenter)&&sc(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),b(i.in.reverse(),n(i)),b(i.out,r(i))}return B(E(t,function(e){return!e.merged}),function(e){return G(e,[`vs`,`i`,`barycenter`,`weight`])})}function sc(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function cc(){return(cc=e((()=>{C(),pt(),Ge(),V(),$a()})))()}function lc(e,t){var n=Ro(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=J(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(dc(!!t)),c=uc(a,i,c),b(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=uc(a,i,c)});var l={vs:L(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function uc(e,t,n){for(var r;t.length&&(r=Bi(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function dc(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function fc(){return(fc=e((()=>{Y(),C(),R(),Vi(),Z()})))()}function pc(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=E(i,function(e){return e!==o&&e!==s}));var l=rc(e,i);b(l,function(t){if(e.children(t.v).length){var i=pc(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&hc(t,i)}});var u=ac(l,n);mc(u,c);var d=lc(u,r);if(o&&(d.vs=L([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function mc(e,t){b(e,function(e){e.vs=L(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function hc(e,t){w(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function gc(){return(gc=e((()=>{Ge(),C(),R(),pt(),ic(),cc(),fc()})))()}function _c(e){var t=Lo(e),n=vc(e,K(1,t+1),`inEdges`),r=vc(e,K(t-1,-1,-1),`outEdges`),i=tc(e);bc(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){yc(s%2?n:r,s%4>=2),i=No(e);var l=Qs(e,i);l<a&&(c=0,o=bi(i),a=l)}bc(e,o)}function vc(e,t,n){return B(t,function(t){return Ys(e,t,n)})}function yc(e,t){var n=new S;b(e,function(e){var r=e.graph().root,i=pc(e,r,n,t);b(i.vs,function(t,n){e.node(t).order=n}),qs(e,n,i.vs)})}function bc(e,t){b(t,function(t){b(t,function(t,n){e.node(t).order=n})})}function xc(){return(xc=e((()=>{q(),Ci(),V(),C(),T(),Z(),Js(),Zs(),ec(),nc(),gc()})))()}function Sc(e){var t=wc(e);b(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=Cc(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function Cc(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function wc(e){var t={},n=0;function r(i){var a=n;b(e.children(i),r),t[i]={low:a,lim:n++}}return b(e.children(),r),t}function Tc(){return(Tc=e((()=>{C()})))()}function Ec(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=Bi(r);return b(r,function(t,c){var l=Oc(e,t),u=l?e.node(l).order:o;(l||t===s)&&(b(r.slice(a,c+1),function(t){b(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&kc(n,r,t)})}),a=c+1,i=u)}),r}return Le(t,r),n}function Dc(e,t){var n={};function r(t,r,i,a,o){var s;b(K(r,i),function(r){s=t[r],e.node(s).dummy&&b(e.predecessors(s),function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&kc(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return b(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return Le(t,i),n}function Oc(e,t){if(e.node(t).dummy)return qi(e.predecessors(t),function(t){return e.node(t).dummy})}function kc(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ac(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function jc(e,t,n,r){var i={},a={},o={};return b(t,function(e){b(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),b(t,function(e){var t=-1;b(e,function(e){var s=r(e);if(s.length){s=J(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t<o[d]&&!Ac(n,e,d)&&(a[d]=e,a[e]=i[e]=i[d],t=o[d])}}})}),{root:i,align:a}}function Mc(e,t,n,r,i){var a={},o=Nc(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+o.edge(t))},0)}function u(t){var n=o.outEdges(t).reduce(function(e,t){return Math.min(e,a[t.w]-o.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),b(r,function(e){a[e]=a[n[e]]}),a}function Nc(e,t,n,r){var i=new S,a=e.graph(),o=Rc(a.nodesep,a.edgesep,r);return b(t,function(t){var r;b(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}function Pc(e,t){return va(x(t),function(t){var n=-1/0,r=1/0;return Zi(t,function(t,i){var a=zc(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function Fc(e,t){var n=x(t),r=W(n),i=H(n);b([`u`,`d`],function(n){b([`l`,`r`],function(a){var o=n+a,s=e[o],c;if(s!==t){var l=x(s);c=a===`l`?r-W(l):i-H(l),c&&(e[o]=da(s,function(e){return e+c}))}})})}function Ic(e,t){return da(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=J(B(e,r));return(i[1]+i[2])/2})}function Lc(e){var t=No(e),n=ha(Ec(e,t),Dc(e,t)),r={},i;return b([`u`,`d`],function(a){i=a===`u`?t:x(t).reverse(),b([`l`,`r`],function(t){t===`r`&&(i=B(i,function(e){return x(e).reverse()}));var o=(a===`u`?e.predecessors:e.successors).bind(e),s=jc(e,i,n,o),c=Mc(e,i,s.root,s.align,t===`r`);t===`r`&&(c=da(c,function(e){return-e})),r[a+t]=c})}),Fc(r,Pc(e,r)),Ic(r,e.graph().align)}function Rc(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function zc(e,t){return e.node(t).width}function Bc(){return(Bc=e((()=>{Vi(),C(),et(),q(),Ji(),Y(),ya(),He(),Qi(),_a(),U(),fa(),V(),ga(),T(),Z()})))()}function Vc(e){e=jo(e),Hc(e),$i(Lc(e),function(t,n){e.node(n).x=t})}function Hc(e){var t=No(e),n=e.graph().ranksep,r=0;b(t,function(t){var i=H(B(t,function(t){return e.node(t).height}));b(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}function Uc(){return(Uc=e((()=>{ea(),C(),U(),V(),Z(),Bc()})))()}function Wc(e,t){var n=t&&t.debugTiming?zo:Bo;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>qc(e));n(` runLayout`,()=>Gc(t,n)),n(` updateInputGraph`,()=>Kc(e,t))})}function Gc(e,t){t(` makeSpaceForEdgeLabels`,()=>Jc(e)),t(` removeSelfEdges`,()=>rl(e)),t(` acyclic`,()=>Eo(e)),t(` nestingGraph.run`,()=>Vs(e)),t(` rank`,()=>Is(jo(e))),t(` injectEdgeLabelProxies`,()=>Yc(e)),t(` removeEmptyRanks`,()=>Fo(e)),t(` nestingGraph.cleanup`,()=>Gs(e)),t(` normalizeRanks`,()=>Po(e)),t(` assignRankMinMax`,()=>Xc(e)),t(` removeEdgeLabelProxies`,()=>Zc(e)),t(` normalize.run`,()=>$o(e)),t(` parentDummyChains`,()=>Sc(e)),t(` addBorderSegments`,()=>Vo(e)),t(` order`,()=>_c(e)),t(` insertSelfEdges`,()=>il(e)),t(` adjustCoordinateSystem`,()=>Wo(e)),t(` position`,()=>Vc(e)),t(` positionSelfEdges`,()=>al(e)),t(` removeBorderNodes`,()=>nl(e)),t(` normalize.undo`,()=>ts(e)),t(` fixupEdgeLabelCoords`,()=>el(e)),t(` undoCoordinateSystem`,()=>Go(e)),t(` translateGraph`,()=>Qc(e)),t(` assignNodeIntersects`,()=>$c(e)),t(` reversePoints`,()=>tl(e)),t(` acyclic.undo`,()=>Oo(e))}function Kc(e,t){b(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),b(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function qc(e){var t=new S({multigraph:!0,compound:!0}),n=sl(e.graph());return t.setGraph(ha({},ll,ol(n,cl),G(n,ul))),b(e.nodes(),function(n){var r=sl(e.node(n));t.setNode(n,Oi(ol(r,dl),fl)),t.setParent(n,e.parent(n))}),b(e.edges(),function(n){var r=sl(e.edge(n));t.setEdge(n,ha({},ml,ol(r,pl),G(r,hl)))}),t}function Jc(e){var t=e.graph();t.ranksep/=2,b(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Yc(e){b(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);X(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function Xc(e){var t=0;b(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=H(t,r.maxRank))}),e.graph().maxRank=t}function Zc(e){b(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function Qc(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}b(e.nodes(),function(t){c(e.node(t))}),b(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,b(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),b(e.edges(),function(n){var i=e.edge(n);b(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function $c(e){b(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(Mo(r,a)),n.points.push(Mo(i,o))})}function el(e){b(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function tl(e){b(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function nl(e){b(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(Bi(n.borderLeft)),o=e.node(Bi(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),b(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function rl(e){b(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function il(e){var t=No(e);b(t,function(t){var n=0;b(t,function(t,r){var i=e.node(t);i.order=r+n,b(i.selfEdges,function(t){X(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function al(e){b(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function ol(e,t){return da(G(e,t),Number)}function sl(e){var t={};return b(e,function(e,n){t[n.toLowerCase()]=e}),t}var cl,ll,ul,dl,fl,pl,ml,hl;function gl(){return(gl=e((()=>{C(),ga(),$a(),ki(),U(),Vi(),fa(),T(),Uo(),Qo(),ko(),ns(),Bs(),Ks(),xc(),Tc(),Uc(),Z(),cl=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],ll={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},ul=[`acyclicer`,`ranker`,`rankdir`,`align`],dl=[`width`,`height`],fl={width:0,height:0},pl=[`minlen`,`weight`,`width`,`height`,`labeloffset`],ml={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},hl=[`labelpos`]})))()}function _l(){return(_l=e((()=>{ko(),gl(),ns(),Bs()})))()}export{gl as n,Wc as r,_l as t};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-BKuNeK48.js";import{n,t as r}from"./preload-helper-C-73SErw.js";import{et as i,ft as a,st as o,t as s}from"./dist-Bauqz5on.js";import{t as c}from"./messages-CFyOVxEM.js";async function l(e,t,n=`bin`,i){let a=t.ownerDocument||document,o=n.toLowerCase(),s=c(i?.options);if(o===`ai`&&_(e,5)===`%PDF-`&&i?.renderNestedBuffer){let n=await i.renderNestedBuffer(e,`pdf`,t,i);if(n)return n}if(o===`psd`){let{default:n}=await r(async()=>{let{default:e}=await import(`./psd-hjeNFQZ-.js`);return{default:e}},[],import.meta.url);return n(e,t,i)}let l=await E(a,e,o,i,s),u=k(a,l,o,s);return t.replaceChildren(f(a),u),{$el:u,unmount(){t.replaceChildren()}}}var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;function A(){return(A=e((()=>{i(),s(),n(),u=`
|
|
2
|
+
.data-viewer{min-height:100%;padding:28px;background:#eef1f4;color:#132235}
|
|
3
|
+
.data-card{max-width:1080px;margin:0 auto;overflow:hidden;border:1px solid rgba(15,23,42,.08);border-radius:8px;background:#fff;box-shadow:0 18px 48px rgba(15,23,42,.12)}
|
|
4
|
+
.data-header{padding:20px 24px;border-bottom:1px solid rgba(15,23,42,.08)}
|
|
5
|
+
.data-header span{color:#0f766e;font-size:12px;font-weight:800}
|
|
6
|
+
.data-header h2{margin:6px 0 0;font-size:24px}
|
|
7
|
+
.data-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1px;background:rgba(15,23,42,.08)}
|
|
8
|
+
.data-summary div{min-width:0;padding:15px 18px;background:#f8fafc}
|
|
9
|
+
.data-summary span{display:block;color:#64748b;font-size:12px}
|
|
10
|
+
.data-summary strong{display:block;margin-top:5px;overflow:hidden;color:#132235;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
|
|
11
|
+
.font-preview{padding:34px 28px;border-top:1px solid rgba(15,23,42,.08);font-size:42px;line-height:1.45;word-break:break-word}
|
|
12
|
+
.asset-image{padding:24px;border-top:1px solid rgba(15,23,42,.08);background:#f8fafc;text-align:center}
|
|
13
|
+
.asset-image img{max-width:100%;max-height:70vh;box-shadow:0 10px 30px rgba(15,23,42,.16)}
|
|
14
|
+
.asset-text{margin:0;padding:18px 24px;overflow:auto;border-top:1px solid rgba(15,23,42,.08);background:#111827;color:#e5e7eb;font-size:13px;line-height:1.7}
|
|
15
|
+
.data-table-wrap{max-height:520px;overflow:auto;border-top:1px solid rgba(15,23,42,.08)}
|
|
16
|
+
.data-table{width:100%;border-collapse:collapse;font-size:13px}
|
|
17
|
+
.data-table th,.data-table td{max-width:260px;padding:10px 12px;border-bottom:1px solid rgba(15,23,42,.08);overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}
|
|
18
|
+
.data-table th{position:sticky;top:0;background:#f8fafc;color:#64748b;z-index:1}
|
|
19
|
+
[data-viewer-theme='dark'] .data-viewer{background:#101820;color:#e5eef8}
|
|
20
|
+
[data-viewer-theme='dark'] .data-card{border-color:rgba(148,163,184,.18);background:#111827;box-shadow:0 22px 56px rgba(0,0,0,.32)}
|
|
21
|
+
[data-viewer-theme='dark'] .data-header,[data-viewer-theme='dark'] .font-preview,[data-viewer-theme='dark'] .asset-image,[data-viewer-theme='dark'] .data-table-wrap{border-color:rgba(148,163,184,.18)}
|
|
22
|
+
[data-viewer-theme='dark'] .data-header h2,[data-viewer-theme='dark'] .data-summary strong,[data-viewer-theme='dark'] .data-table{color:#f8fafc}
|
|
23
|
+
[data-viewer-theme='dark'] .data-summary,[data-viewer-theme='dark'] .data-table th,[data-viewer-theme='dark'] .data-table td{border-color:rgba(148,163,184,.18)}
|
|
24
|
+
[data-viewer-theme='dark'] .data-summary div,[data-viewer-theme='dark'] .data-table th{background:#151f2b}
|
|
25
|
+
[data-viewer-theme='dark'] .data-summary span,[data-viewer-theme='dark'] .data-table th{color:#94a3b8}
|
|
26
|
+
[data-viewer-theme='dark'] .asset-image{background:#151f2b}
|
|
27
|
+
@media (prefers-color-scheme:dark){[data-viewer-theme='system'] .data-viewer{background:#101820;color:#e5eef8}[data-viewer-theme='system'] .data-card{border-color:rgba(148,163,184,.18);background:#111827;box-shadow:0 22px 56px rgba(0,0,0,.32)}[data-viewer-theme='system'] .data-header,[data-viewer-theme='system'] .font-preview,[data-viewer-theme='system'] .asset-image,[data-viewer-theme='system'] .data-table-wrap{border-color:rgba(148,163,184,.18)}[data-viewer-theme='system'] .data-header h2,[data-viewer-theme='system'] .data-summary strong,[data-viewer-theme='system'] .data-table{color:#f8fafc}[data-viewer-theme='system'] .data-summary,[data-viewer-theme='system'] .data-table th,[data-viewer-theme='system'] .data-table td{border-color:rgba(148,163,184,.18)}[data-viewer-theme='system'] .data-summary div,[data-viewer-theme='system'] .data-table th{background:#151f2b}[data-viewer-theme='system'] .data-summary span,[data-viewer-theme='system'] .data-table th{color:#94a3b8}[data-viewer-theme='system'] .asset-image{background:#151f2b}}
|
|
28
|
+
`,d={otf:`font/otf`,ttf:`font/ttf`,woff:`font/woff`,woff2:`font/woff2`},f=e=>{let t=e.createElement(`style`);return t.textContent=u,t},p=(e,t,n,r)=>{let i=e.createElement(t);return n&&(i.className=n),r!==void 0&&(i.textContent=r),i},m=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`,h=e=>e.slice(0,30).map(e=>{let t={};return Object.entries(e).slice(0,24).forEach(([e,n])=>{typeof n==`bigint`?t[e]=n.toString():n instanceof Uint8Array?t[e]=`[bytes:${n.byteLength}]`:n&&typeof n==`object`?t[e]=JSON.stringify(n).slice(0,180):t[e]=n}),t}),g=(e,t=8e3)=>{let n=new Uint8Array(e);return Array.from(n.slice(0,Math.min(n.length,t))).map(e=>e>=32&&e<=126||e===10||e===13||e===9?String.fromCharCode(e):` `).join(``).replace(/[ \t]{3,}/g,` `).trim().slice(0,t)},_=(e,t=12)=>String.fromCharCode(...new Uint8Array(e.slice(0,t))),v=e=>e.defaultView?.__FLYFISH_DATA_SQL_WASM_URL__||(typeof window<`u`?window.__FLYFISH_DATA_SQL_WASM_URL__:void 0),y=async(e,t,n,r)=>{let i=`FlyfishPreviewFont-${Date.now()}-${Math.random().toString(36).slice(2)}`,a=(e.defaultView||(typeof window<`u`?window:void 0))?.FontFace||(typeof FontFace<`u`?FontFace:void 0);if(!a)throw Error(r(`data.error.fontFaceUnsupported`));let o=new a(i,t);return await o.load(),e.fonts?.add(o),{title:r(`data.title.font`),fontFamily:i,summary:[{label:r(`data.label.format`),value:n.toUpperCase()},{label:r(`data.label.size`),value:m(t.byteLength)},{label:r(`data.label.rendering`),value:`Browser FontFace API`}]}},b=async(e,n,i,s)=>{let{default:c}=await r(async()=>{let{default:e}=await import(`./sql-wasm-browser-CFddXd9f.js`).then(e=>/* @__PURE__ */ t(e.default,1));return{default:e}},[],import.meta.url),l=o(i?.options?.data,[v(e)],a(e)),u=new(await(c({locateFile:()=>l}))).Database(new Uint8Array(n));try{let e=u.exec(`select name, type from sqlite_master where type in ('table','view') and name not like 'sqlite_%' order by type, name`)[0]?.values||[],t=String(e[0]?.[0]||``),n=t?u.exec(`select * from "${t.replace(/"/g,`""`)}" limit 30`)[0]:null;return{title:s(`data.title.sqlite`),summary:[{label:s(`data.label.objects`),value:String(e.length)},{label:s(`data.label.sampleTable`),value:t||`-`},{label:s(`data.label.rendering`),value:`sql.js WASM`}],rows:h(n?n.values.map(e=>Object.fromEntries(n.columns.map((t,n)=>[t,e[n]]))):e.map(e=>({name:e[0],type:e[1]})))}}finally{u.close()}},x=async(e,t)=>{let{parquetMetadataAsync:n,parquetReadObjects:i}=await r(async()=>{let{parquetMetadataAsync:e,parquetReadObjects:t}=await import(`./src-vLpLkuQx.js`);return{parquetMetadataAsync:e,parquetReadObjects:t}},[],import.meta.url),a={byteLength:e.byteLength,slice:(t,n)=>e.slice(t,n)},o=await n(a),s=await i({file:a,rowFormat:`object`,rowEnd:30});return{title:t(`data.title.parquet`),summary:[{label:t(`data.label.rows`),value:o.num_rows?.toString?.()||`-`},{label:t(`data.label.columns`),value:String(o.schema?.filter(e=>e.name).length||0)},{label:t(`data.label.rendering`),value:`hyparquet`}],rows:h(s)}},S=async(e,n)=>{let i=await r(()=>import(`./avsc-C0VoJRmm.js`).then(e=>/* @__PURE__ */ t(e.default,1)),[],import.meta.url),a=(i.default||i).createBlobDecoder(new Blob([e])),o=[],s=``;return await new Promise((e,t)=>{a.on(`metadata`,e=>{s=e?.toString?.()||``}),a.on(`data`,e=>{o.length<30&&o.push(e)}),a.on(`end`,e),a.on(`error`,t)}),{title:n(`data.title.avro`),summary:[{label:n(`data.label.sampleRows`),value:String(o.length)},{label:`Schema`,value:n(s?`data.value.schemaRead`:`data.value.schemaUnread`)},{label:n(`data.label.rendering`),value:`avsc`}],rows:h(o),text:s.slice(0,6e3)}},C=async(e,t)=>{let n=await WebAssembly.compile(e.slice(0)),r=WebAssembly.Module.imports(n),i=WebAssembly.Module.exports(n);return{title:t(`data.title.wasm`),summary:[{label:t(`data.label.imports`),value:String(r.length)},{label:t(`data.label.exports`),value:String(i.length)},{label:t(`data.label.rendering`),value:`WebAssembly.Module`}],rows:h([...r.map(e=>({kind:`import`,module:e.module,name:e.name,type:e.kind})),...i.map(e=>({kind:`export`,module:`-`,name:e.name,type:e.kind}))])}},w=async(e,t,n)=>({title:n(t===`eps`?`data.title.eps`:`data.title.ai`),summary:[{label:n(`data.label.magic`),value:_(e).replace(/\s/g,` `)},{label:n(`data.label.size`),value:m(e.byteLength)},{label:n(`data.label.note`),value:n(t===`ai`?`data.note.aiSummary`:`data.note.postscriptSummary`)}],text:g(e)}),T=async(e,t)=>({title:t(`data.title.webarchive`),summary:[{label:t(`data.label.container`),value:_(e).startsWith(`bplist`)?`Binary plist`:`WebArchive`},{label:t(`data.label.size`),value:m(e.byteLength)},{label:t(`data.label.note`),value:t(`data.note.webarchive`)}],text:g(e)}),E=async(e,t,n,r,i)=>n in d?y(e,t,n,i):n===`sqlite`?b(e,t,r,i):n===`parquet`?x(t,i):n===`avro`?S(t,i):n===`wasm`?C(t,i):n===`ai`||n===`eps`?w(t,n,i):n===`webarchive`?T(t,i):{title:i(`data.title.summary`),summary:[{label:i(`data.label.format`),value:n.toUpperCase()},{label:i(`data.label.size`),value:m(t.byteLength)}],text:g(t)},D=(e,t,n)=>{let r=p(e,`div`,`data-summary`);n.forEach(t=>{let n=p(e,`div`);n.append(p(e,`span`,void 0,t.label),p(e,`strong`,void 0,t.value)),r.appendChild(n)}),t.appendChild(r)},O=(e,t,n)=>{if(!n?.length)return;let r=Object.keys(n[0]),i=p(e,`div`,`data-table-wrap`),a=p(e,`table`,`data-table`),o=p(e,`thead`),s=p(e,`tr`);r.forEach(t=>{s.appendChild(p(e,`th`,void 0,t))}),o.appendChild(s);let c=p(e,`tbody`);n.forEach(t=>{let n=p(e,`tr`);r.forEach(r=>{n.appendChild(p(e,`td`,void 0,String(t[r]??``)))}),c.appendChild(n)}),a.append(o,c),i.appendChild(a),t.appendChild(i)},k=(e,t,n,r)=>{let i=p(e,`div`,`data-viewer`),a=p(e,`section`,`data-card`),o=p(e,`header`,`data-header`);if(o.append(p(e,`span`,void 0,n.toUpperCase()),p(e,`h2`,void 0,t.title)),a.appendChild(o),D(e,a,t.summary),t.fontFamily){let n=p(e,`div`,`font-preview`,r(`data.font.sample`));n.style.fontFamily=t.fontFamily,a.appendChild(n)}if(t.image){let n=p(e,`div`,`asset-image`),i=p(e,`img`);i.src=t.image,i.alt=r(`data.image.alt`),n.appendChild(i),a.appendChild(n)}return t.text&&a.appendChild(p(e,`pre`,`asset-text`,t.text)),O(e,a,t.rows),i.appendChild(a),i}})))()}A();export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{jsx as t}from"react/jsx-runtime";import{DatePicker as n}from"antd";import r from"dayjs";function i({value:e,onChange:i,type:a,showClear:o,placeholder:s,disabledDate:c,...l}){let u=c?e=>c(e.toDate()):void 0;if(a===`dateRange`||a===`dateTimeRange`){let c=Array.isArray(e)&&e.length===2?[r(e[0]),r(e[1])]:null;return/* @__PURE__ */ t(n.RangePicker,{id:l.id?{start:l.id,end:`${l.id}-end`}:void 0,"aria-label":l[`aria-label`],style:l.style,disabled:l.disabled,format:l.format,placeholder:Array.isArray(s)?s:void 0,value:c,disabledDate:u,showTime:a===`dateTimeRange`,allowClear:o!==!1,onChange:e=>i?.(e?.every(Boolean)?e.map(e=>e.toDate()):void 0)})}return/* @__PURE__ */ t(n,{...l,defaultValue:void 0,placeholder:typeof s==`string`?s:void 0,disabledDate:u,allowClear:o!==!1,showTime:a===`dateTime`,value:e&&!Array.isArray(e)?r(e):null,multiple:!1,onChange:e=>i?.(Array.isArray(e)?void 0:e?.toDate())})}function a(){return(a=e((()=>{})))()}export{a as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";function t(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function n(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function r(e){return e=n(Math.abs(e)),e?e[1]:NaN}function i(){return(i=e((()=>{})))()}function a(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function o(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}function s(e){if(!(t=l.exec(e)))throw Error(`invalid format: `+e);var t;return new c({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function c(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}var l;function u(){return(u=e((()=>{l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,s.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type}})))()}function d(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}function f(e,t){var r=n(e,t);if(!r)return p=void 0,e.toPrecision(t);var i=r[0],a=r[1],o=a-(p=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return o===s?i:o>s?i+Array(o-s+1).join(`0`):o>0?i.slice(0,o)+`.`+i.slice(o):`0.`+Array(1-o).join(`0`)+n(e,Math.max(0,t+o-1))[0]}var p;function m(){return(m=e((()=>{})))()}function h(e,t){var r=n(e,t);if(!r)return e+``;var i=r[0],a=r[1];return a<0?`0.`+Array(-a).join(`0`)+i:i.length>a+1?i.slice(0,a+1)+`.`+i.slice(a+1):i+Array(a-i.length+2).join(`0`)}function g(){return(g=e((()=>{})))()}var _;function v(){return(v=e((()=>{m(),g(),_={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:t,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h(e*100,t),r:h,s:f,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}})))()}function y(e){return e}function b(e){var t=e.grouping===void 0||e.thousands===void 0?y:a(x.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,i=e.currency===void 0?``:e.currency[1]+``,c=e.decimal===void 0?`.`:e.decimal+``,l=e.numerals===void 0?y:o(x.call(e.numerals,String)),u=e.percent===void 0?`%`:e.percent+``,f=e.minus===void 0?`−`:e.minus+``,m=e.nan===void 0?`NaN`:e.nan+``;function h(e,r){e=s(e);var a=e.fill,o=e.align,h=e.sign,g=e.symbol,v=e.zero,y=e.width,b=e.comma,x=e.precision,C=e.trim,w=e.type;w===`n`?(b=!0,w=`g`):_[w]||(x===void 0&&(x=12),C=!0,w=`g`),(v||a===`0`&&o===`=`)&&(v=!0,a=`0`,o=`=`);var T=(r&&r.prefix!==void 0?r.prefix:``)+(g===`$`?n:g===`#`&&/[boxX]/.test(w)?`0`+w.toLowerCase():``),E=(g===`$`?i:/[%p]/.test(w)?u:``)+(r&&r.suffix!==void 0?r.suffix:``),D=_[w],O=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function k(e){var n=T,r=E,i,s,u;if(w===`c`)r=D(e)+r,e=``;else{e=+e;var g=e<0||1/e<0;if(e=isNaN(e)?m:D(Math.abs(e),x),C&&(e=d(e)),g&&+e==0&&h!==`+`&&(g=!1),n=(g?h===`(`?h:f:h===`-`||h===`(`?``:h)+n,r=(w===`s`&&!isNaN(e)&&p!==void 0?S[8+p/3]:``)+r+(g&&h===`(`?`)`:``),O){for(i=-1,s=e.length;++i<s;)if(u=e.charCodeAt(i),48>u||u>57){r=(u===46?c+e.slice(i+1):e.slice(i))+r,e=e.slice(0,i);break}}}b&&!v&&(e=t(e,1/0));var _=n.length+e.length+r.length,k=_<y?Array(y-_+1).join(a):``;switch(b&&v&&(e=t(k+e,k.length?y-r.length:1/0),k=``),o){case`<`:e=n+e+r+k;break;case`=`:e=n+k+e+r;break;case`^`:e=k.slice(0,_=k.length>>1)+n+e+r+k.slice(_);break;default:e=k+n+e+r}return l(e)}return k.toString=function(){return e+``},k}function g(e,t){var n=Math.max(-8,Math.min(8,Math.floor(r(t)/3)))*3,i=10**-n,a=h((e=s(e),e.type=`f`,e),{suffix:S[8+n/3]});return function(e){return a(i*e)}}return{format:h,formatPrefix:g}}var x,S;function C(){return(C=e((()=>{i(),u(),v(),m(),x=Array.prototype.map,S=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`]})))()}function w(e){return T=b(e),E=T.format,D=T.formatPrefix,T}var T,E,D;function O(){return(O=e((()=>{C(),w({thousands:`,`,grouping:[3],currency:[`$`,``]})})))()}export{u as a,s as i,D as n,r as o,O as r,i as s,E as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{i as t}from"./feedback-BnjMKZpz.js";import{C as n}from"./ui-BFsHoY7a.js";import{i as r,r as i}from"./confirm-BtBBEqk8.js";function a({title:e,content:n,okText:r,run:a,successMessage:o,onDeleted:s}){i({title:e,content:n,...r?{okText:r}:{},onOk:async()=>{let e=await a();o!==null&&t.success(typeof o==`function`?o(e):o??`删除成功`),s?.(e)}})}function o({hidden:e,disabled:t,disabledReason:n,key:r,label:i,...o}){return{key:r??`delete`,label:i??`删除`,danger:!0,hidden:e,disabled:t,disabledReason:n,onClick:()=>a(o)}}function s(){return(s=e((()=>{n(),r()})))()}export{o as n,s as r,a as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e,o as t,r as n}from"./rolldown-runtime-BKuNeK48.js";import{n as r,t as i}from"./preload-helper-C-73SErw.js";import{t as a}from"./dist-Bauqz5on.js";import{t as o}from"./messages-CFyOVxEM.js";import{n as s,t as c}from"./purify.es-BsWMI_aG.js";import{n as l,t as u}from"./panzoom.es-DnuzxUQi.js";var d,f,p,m,h,g,_,v,y,b,x;function S(){return(S=e((()=>{d=/* @__PURE__ */ new Set([`href`,`xlink:href`,`src`,`poster`]),f=/^data:image\/(?:avif|bmp|gif|jpeg|png|webp|x-icon);base64,[A-Za-z0-9+/=\s]+$/i,p=e=>{let t=``;for(let n of e){let e=n.charCodeAt(0);e<=32||e>=127&&e<=159||(t+=n)}return t.trim()},m=e=>{let t=p(e);return t?/^#[A-Za-z0-9_.:-]+$/.test(t)||/^(?:https?|mailto|tel):/i.test(t)?!0:!t.includes(`:`)&&!t.startsWith(`//`)&&!t.startsWith(`\\`):!1},h=(e,t)=>{let n=p(e);return t&&/^#[A-Za-z0-9_.:-]+$/.test(n)||/^blob:/i.test(n)?!0:f.test(n)},g=e=>{let t=e.trim(),n=t[0];return(n===`"`||n===`'`)&&t[t.length-1]===n&&(t=t.slice(1,-1).trim()),p(t)},_=e=>{let t=g(e);return/^#[A-Za-z0-9_.:-]+$/.test(t)||/^blob:/i.test(t)||f.test(t)},v=e=>{let t=[];for(let n of e){let e=n.charCodeAt(0);e<=8||e===11||e===12||e>=14&&e<=31||e>=127&&e<=159||t.push(n)}let n=t.join(``);if(n.includes(`\\`)||n.includes(`/*`)||/@import\b/i.test(n))return``;let r=[],i=0,a=0;for(;a<n.length;){if((n.charCodeAt(a)|32)!=117||(n.charCodeAt(a+1)|32)!=114||(n.charCodeAt(a+2)|32)!=108){a+=1;continue}let e=a+3;for(;e<n.length&&n[e].trim()===``;)e+=1;if(n[e]!==`(`){a+=1;continue}let t=e+1;for(;t<n.length&&n[t]!==`)`;)t+=1;if(t>=n.length)return``;let o=n.slice(e+1,t);r.push(n.slice(i,a)),r.push(_(o)?`url(${o})`:`none`),a=t+1,i=a}return r.push(n.slice(i)),r.join(``)},y=e=>{e.querySelectorAll(`*`).forEach(e=>{for(let t of Array.from(e.attributes)){let n=t.name.toLowerCase();if(n.startsWith(`on`)||n===`srcdoc`)e.removeAttribute(t.name);else if(n===`style`){let n=v(t.value);n?e.setAttribute(t.name,n):e.removeAttribute(t.name)}else if(d.has(n)){let r=e.localName.toLowerCase(),i=r===`a`&&n===`href`,a=r===`use`||r===`mpath`;(i?m(t.value):h(t.value,a))?t.value=p(t.value):e.removeAttribute(t.name)}else if(/url\s*\(/i.test(t.value)){let n=v(t.value);n?e.setAttribute(t.name,n):e.removeAttribute(t.name)}}}),e.querySelectorAll(`style`).forEach(e=>{let t=v(e.textContent||``);t?e.textContent=t:e.remove()})},b=e=>{let t=``;for(let n of e){let e=n.charCodeAt(0);e===0||e>=127&&e<=159||(t+=e<32&&n!==`
|
|
2
|
+
`&&n!==`\r`&&n!==` `?` `:n)}return t},x=e=>{let t=b(String(e||``)),n=t.replace(/[\t\r\n ]+/g,``),r=/(?:^|[,{])\s*(?:img|["']img["'])\s*:/im.test(t),i=/(?:https?|ftp):\/\//i.test(n)||/(?:^|[\s"'(=:,])(?:\/\/|\\\\)[A-Za-z0-9]/m.test(t);if(r||i)throw Error(`Mermaid diagrams may not load external image resources.`)}})))()}var C,w,T;function E(){return(E=e((()=>{c(),a(),C=/* @__PURE__ */ new WeakMap,w=e=>{let t=C.get(e);if(t)return t;let n=e.defaultView;if(!n)return null;let r=s(n);return r.isSupported?(C.set(e,r),r):null},T=(e,t,n=`Unable to parse SVG safely.`)=>{let r=w(e);if(!r)throw Error(n);let i=r.sanitize(t,{RETURN_DOM_FRAGMENT:!0,USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:[`script`,`iframe`,`object`,`embed`,`form`,`foreignObject`],FORBID_ATTR:[`srcdoc`]});y(i);let a=i.querySelector(`svg`);if(!a)throw Error(n);return e.importNode(a,!0)}})))()}var D=/* @__PURE__ */ n({renderDiagram:()=>L}),O,k,A,j,M,N,P,F,I,L;function R(){return(R=e((()=>{a(),l(),E(),r(),O=e=>e.defaultView||(typeof window<`u`?window:void 0),k=(e,t)=>t===`dark`||t!==`light`&&!!O(e)?.matchMedia?.(`(prefers-color-scheme: dark)`).matches,A=(e,t,n)=>{let r=e.createElement(t);return n&&(r.className=n),r},j=(e,t)=>{let n=t,r=n.endsWith(`/`)?n:`${n}/`;try{return new URL(r,e.baseURI).href}catch{return r}},M=async(e,t,n,r)=>{x(t);let a=(await i(()=>import(`./mermaid.core-CxOC6yPr.js`),[],import.meta.url)).default,o=`file-viewer-mermaid-${Date.now()}-${Math.random().toString(36).slice(2)}`;a.initialize({startOnLoad:!1,securityLevel:`strict`,htmlLabels:!1,theme:k(e,n)?`dark`:`default`});let s=await a.render(o,t);return T(e,s.svg,r(`drawing.error.svgParseFailed`))},N=(e,t,n,r,i,a=`500`)=>{let o=e.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);o.setAttribute(`x`,String(r)),o.setAttribute(`dy`,i),o.setAttribute(`font-weight`,a),o.textContent=n,t.appendChild(o)},P=(e,t,n)=>{let r=e.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.setAttribute(`viewBox`,`0 0 1100 720`),r.setAttribute(`width`,`1100`),r.setAttribute(`height`,`720`);let i=e.createElementNS(`http://www.w3.org/2000/svg`,`rect`);i.setAttribute(`width`,`100%`),i.setAttribute(`height`,`100%`),i.setAttribute(`rx`,`28`),i.setAttribute(`fill`,`#f8fbff`),r.appendChild(i);let a=e.createElementNS(`http://www.w3.org/2000/svg`,`rect`);a.setAttribute(`x`,`42`),a.setAttribute(`y`,`42`),a.setAttribute(`width`,`1016`),a.setAttribute(`height`,`636`),a.setAttribute(`rx`,`22`),a.setAttribute(`fill`,`#ffffff`),a.setAttribute(`stroke`,`#cbd5e1`),r.appendChild(a);let o=e.createElementNS(`http://www.w3.org/2000/svg`,`text`);o.setAttribute(`x`,`74`),o.setAttribute(`y`,`92`),o.setAttribute(`fill`,`#0f766e`),o.setAttribute(`font-family`,`Inter, Arial, sans-serif`),o.setAttribute(`font-size`,`24`),o.setAttribute(`font-weight`,`800`),o.textContent=`PlantUML source preview`,r.appendChild(o);let s=e.createElementNS(`http://www.w3.org/2000/svg`,`text`);s.setAttribute(`x`,`74`),s.setAttribute(`y`,`128`),s.setAttribute(`fill`,`#64748b`),s.setAttribute(`font-family`,`Inter, Arial, sans-serif`),s.setAttribute(`font-size`,`15`),s.textContent=n,r.appendChild(s);let c=e.createElementNS(`http://www.w3.org/2000/svg`,`text`);c.setAttribute(`x`,`74`),c.setAttribute(`y`,`172`),c.setAttribute(`fill`,`#172033`),c.setAttribute(`font-family`,`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`),c.setAttribute(`font-size`,`16`),c.setAttribute(`xml:space`,`preserve`);let l=t.replace(/\r\n?/g,`
|
|
3
|
+
`).split(`
|
|
4
|
+
`).slice(0,26);return l.forEach((t,n)=>{N(e,c,t.slice(0,110),74,n===0?`0`:`24`,/^\s*@/.test(t)?`800`:`500`)}),l.length<t.split(`
|
|
5
|
+
`).length&&N(e,c,`... truncated for preview ...`,74,`24`,`700`),r.appendChild(c),r},F=async(e,n,r,a)=>{if(!r?.plantumlServerUrl)return P(e,n,`Offline mode is active. Configure options.drawing.plantumlServerUrl for server-rendered PlantUML SVG.`);let{encode:o}=await i(async()=>{let{encode:e}=await import(`./browser-index-JqxD-45S.js`).then(e=>/* @__PURE__ */ t(e.default,1));return{encode:e}},[],import.meta.url),s=`${j(e,r.plantumlServerUrl)}${o(n)}`,c=O(e),l=new AbortController,u=c?.setTimeout(()=>l.abort(),Math.max(1e3,r?.plantumlTimeoutMs||8e3));try{let t=await fetch(s,{signal:l.signal});if(!t.ok)throw Error(a(`drawing.error.plantumlRenderFailed`,{status:t.status}));return T(e,await t.text(),a(`drawing.error.svgParseFailed`))}catch(t){if(t instanceof DOMException&&t.name===`AbortError`)throw t;return P(e,n,`Configure options.drawing.plantumlServerUrl for full PlantUML SVG rendering.`)}finally{u!==void 0&&c?.clearTimeout(u)}},I=(e,t)=>{e.classList.add(`drawing-svg`,`drawing-diagram-svg`),e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,`${t} diagram preview`),!e.getAttribute(`width`)&&e.viewBox.baseVal.width&&e.setAttribute(`width`,String(Math.ceil(e.viewBox.baseVal.width))),!e.getAttribute(`height`)&&e.viewBox.baseVal.height&&e.setAttribute(`height`,String(Math.ceil(e.viewBox.baseVal.height)))},L=async({documentRef:e,text:t,target:n,kind:r,options:i,theme:a,viewerOptions:s})=>{let c=o(s),l=A(e,`div`,`drawing-diagram-shell`),d=A(e,`div`,`drawing-diagram-pan`);l.appendChild(d),n.replaceChildren(l);let f=r===`mermaid`?await M(e,t,a,c):await F(e,t,i,c);I(f,r),d.replaceChildren(f);let p=u(d,{minScale:.4,maxScale:4,contain:`outside`,canvas:!0}),m=l.parentElement||l,h=e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),p.zoomWithWheel(e))};return m.addEventListener(`wheel`,h,{passive:!1}),{setZoom(e){p.zoom(e,{animate:!0})},reset(){p.reset({animate:!0})},getScale(){return p.getScale()},destroy(){m.removeEventListener(`wheel`,h),p.destroy()}}}})))()}export{R as n,S as r,D as t};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,w as i}from"./src-C1iDJpBK.js";import{B as a,U as o,W as s,a as c,b as l,c as u,f as d,j as f,q as p,v as m,w as h,y as g}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{d as ee,i as _}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as te,t as ne}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{n as re,t as ie}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as ae,r as oe}from"./mermaid-parser.core-DvCAQkzY.js";import{i as v,n as y,t as se}from"./chunk-PWAF6VOD-IORmPx9D.js";import{n as ce,t as le}from"./chunk-2Q5K7J3B-CmAE3Vs0.js";function b(e){return e.some(e=>D.test(e))}function x(e){for(let t of e){let e=O.exec(t);if(e?.index&&e.index>0)return e.index}return 4}function S(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}function C(e){let t=e.split(`
|
|
2
|
+
`),n=/* @__PURE__ */ new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e<t.length;e++){let n=t[e];n.trim()===``||M.test(n)||j.test(n)||A.test(n)||i.push(n.replace(/\t/g,` `))}if(!b(i))return{text:e,lineMap:n};let a=x(i),o=[],s=0;for(let e=0;e<=r;e++)o.push(t[e]),s++,n.set(s,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],i=r.trim(),c=e+1;if(i===``||M.test(r)||j.test(r)){o.push(r),s++,n.set(s,c);continue}if(A.test(r))continue;let l=r.replace(/\t/g,` `),u=O.exec(l);if(u?.index!==void 0){let e=u.index,t=Math.round(e/a)+1,r=e+1;for(;r<l.length&&k.test(l[r]);)r++;for(;r<l.length&&l[r]===` `;)r++;let i=l.slice(r).trimEnd();if(!i)throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let d=N.repeat(t);o.push(d+i),s++,n.set(s,c)}else if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;else if(D.test(l))o.push(r),s++,n.set(s,c);else if(/^\s+/.test(l))throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);else o.push(r),s++,n.set(s,c)}return{text:o.join(`
|
|
3
|
+
`),lineMap:n}}function w(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}function T(e,t){return e.includes(`:`)?e:e in H.icons||!t?`${H.prefix}:${e}`:`${t}:${e}`}function E(e,t){if(e.icon!==`none`){if(e.icon)return T(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=w(e.name,t);if(n===`none`)return;if(n)return T(n,t.defaultIconPack)}return`${H.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}var D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q;function $(){return($=e((()=>{ce(),ie(),ne(),y(),ee(),f(),r(),n(),ae(),D=/[─━│┃└┗├┣]/,O=/[└┗├┣]/,k=/[─━]/,A=/^[\s│┃]+$/,j=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,M=/^\s*%%/,N=` `,t(b,`isBoxDrawingFormat`),t(x,`inferSegmentWidth`),t(S,`remapErrorLines`),t(C,`preprocessBoxDrawing`),P=new le(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),F=/* @__PURE__ */ t(()=>{P.reset(),c()},`clear`),I=/* @__PURE__ */ t(()=>P.records.stack[0],`getRoot`),L=/* @__PURE__ */ t(()=>P.records.cnt,`getCount`),R=d.treeView,z={clear:F,addNode:/* @__PURE__ */ t((e,t,n,r,i,a)=>{for(;e<=P.records.stack[P.records.stack.length-1].level;)P.records.stack.pop();let o={id:P.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};P.records.stack[P.records.stack.length-1].children.push(o),P.records.stack.push(o)},`addNode`),getRoot:I,getCount:L,getConfig:/* @__PURE__ */ t(()=>_(R,l().treeView),`getConfig`),getAccTitle:g,getAccDescription:m,getDiagramTitle:h,setAccDescription:o,setAccTitle:s,setDiagramTitle:p},B=/* @__PURE__ */ t(e=>{re(e,z);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,o=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,u=t.descAnnotation||void 0,d=u?a(u,l()):void 0;z.addNode(e,n,i,o,c,d)}},`populate`),V={parse:/* @__PURE__ */ t(async e=>{let{text:t,lineMap:n}=C(e);try{let e=await oe(`treeView`,t);i.debug(e),B(e)}catch(e){throw n.size>0&&e instanceof Error&&(e.message=S(e.message,n)),e}},`parse`)},H={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:`<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>`},file:{body:`<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>`}}},t(w,`detectIcon`),t(T,`qualifyIcon`),t(E,`getNodeIcon`),v([{name:H.prefix,icons:H}]),U=14,W=4,G=16,K=/* @__PURE__ */ t(async(e,n)=>{let r=[],i=/* @__PURE__ */ t(e=>{let t=E(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(e);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await se(e,{height:U,width:U})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),q=/* @__PURE__ */ t((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=E(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),J=/* @__PURE__ */ t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),Y=/* @__PURE__ */ t((e,n,r,i)=>{let a=0,o=0,s=[],c=/* @__PURE__ */ t((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=q(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;J(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=/* @__PURE__ */ t((t,n=0)=>{c(e,t,r,n),t.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:n,height:s}=t.children[t.children.length-1].BBox;J(e,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),X={draw:/* @__PURE__ */ t(async(e,t,n,r)=>{i.debug(`Rendering treeView diagram
|
|
4
|
+
`+e);let a=r.db,o=a.getRoot(),s=a.getConfig(),c=te(t),l=c.append(`g`);l.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=Y(l,o,s,await K(o,s));c.attr(`viewBox`,`-${s.lineThickness/2} 0 ${f} ${d}`),u(c,d,f,s.useMaxWidth)},`draw`)},Z={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},Q={db:z,renderer:X,parser:V,styles:/* @__PURE__ */ t(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=_(Z,e);return`
|
|
5
|
+
.treeView-node-label {
|
|
6
|
+
font-size: ${t};
|
|
7
|
+
fill: ${n};
|
|
8
|
+
white-space: pre;
|
|
9
|
+
}
|
|
10
|
+
.treeView-node-dir {
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
.treeView-node-line {
|
|
14
|
+
stroke: ${r};
|
|
15
|
+
}
|
|
16
|
+
.treeView-node-icon {
|
|
17
|
+
color: ${i};
|
|
18
|
+
}
|
|
19
|
+
.treeView-node-description {
|
|
20
|
+
font-size: ${t};
|
|
21
|
+
fill: ${a};
|
|
22
|
+
font-style: italic;
|
|
23
|
+
white-space: pre;
|
|
24
|
+
}
|
|
25
|
+
.treeView-highlight-bg {
|
|
26
|
+
fill: ${o};
|
|
27
|
+
stroke: ${s};
|
|
28
|
+
stroke-width: 1;
|
|
29
|
+
}
|
|
30
|
+
`},`styles`)}})))()}$();export{Q as diagram};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,w as i}from"./src-C1iDJpBK.js";import{D as a,U as o,W as s,a as c,b as l,c as u,f as d,j as f,q as p,v as m,w as h,y as g}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{d as _,i as v}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as y,t as b}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{n as x,t as S}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as C,r as w}from"./mermaid-parser.core-DvCAQkzY.js";function T(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=E(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,D(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}function E(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}function D(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}function O(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}var k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z;function Q(){return(Q=e((()=>{S(),b(),_(),f(),r(),n(),C(),k={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},A=32,j={axes:[],curves:[],options:k},M=structuredClone(j),N=d.radar,P=/* @__PURE__ */ t(()=>v({...N,...l().radar}),`getConfig`),F=/* @__PURE__ */ t(()=>M.axes,`getAxes`),I=/* @__PURE__ */ t(()=>M.curves,`getCurves`),L=/* @__PURE__ */ t(()=>M.options,`getOptions`),R=/* @__PURE__ */ t(e=>{M.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),z=/* @__PURE__ */ t(e=>{M.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:B(e.entries)}))},`setCurves`),B=/* @__PURE__ */ t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=F();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),V={getAxes:F,getCurves:I,getOptions:L,setAxes:R,setCurves:z,setOptions:/* @__PURE__ */ t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});M.options={showLegend:t.showLegend?.value??k.showLegend,ticks:t.ticks?.value??k.ticks,max:t.max?.value??k.max,min:t.min?.value??k.min,graticule:t.graticule?.value??k.graticule},M.options.ticks>A&&(i.warn(`Radar diagram ticks (${M.options.ticks}) exceeds maximum allowed (${A}). Using ${A} instead.`),M.options.ticks=A)},`setOptions`),getConfig:P,clear:/* @__PURE__ */ t(()=>{c(),M=structuredClone(j)},`clear`),setAccTitle:s,getAccTitle:g,setDiagramTitle:p,getDiagramTitle:h,getAccDescription:m,setAccDescription:o},H=/* @__PURE__ */ t(e=>{x(e,V);let{axes:t,curves:n,options:r}=e;V.setAxes(t),V.setCurves(n),V.setOptions(r)},`populate`),U={parse:/* @__PURE__ */ t(async e=>{let t=await w(`radar`,e);i.debug(t),H(t)},`parse`)},W=/* @__PURE__ */ t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=G(y(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;K(u,a,p,s.ticks,s.graticule),q(u,a,p,c),T(u,a,o,f,d,s.graticule,c),O(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),G=/* @__PURE__ */ t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return u(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),K=/* @__PURE__ */ t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),q=/* @__PURE__ */ t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`),t(T,`drawCurves`),t(E,`relativeRadius`),t(D,`closedRoundCurve`),t(O,`drawLegend`),J={draw:W},Y=/* @__PURE__ */ t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
|
+
.radarCurve-${r} {
|
|
3
|
+
color: ${i};
|
|
4
|
+
fill: ${i};
|
|
5
|
+
fill-opacity: ${t.curveOpacity};
|
|
6
|
+
stroke: ${i};
|
|
7
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
8
|
+
}
|
|
9
|
+
.radarLegendBox-${r} {
|
|
10
|
+
fill: ${i};
|
|
11
|
+
fill-opacity: ${t.curveOpacity};
|
|
12
|
+
stroke: ${i};
|
|
13
|
+
}
|
|
14
|
+
`}return n},`genIndexStyles`),X=/* @__PURE__ */ t(e=>{let t=a(),n=l(),r=v(t,n.themeVariables);return{themeVariables:r,radarOptions:v(r.radar,e)}},`buildRadarStyleOptions`),Z={parser:U,db:V,renderer:J,styles:/* @__PURE__ */ t(({radar:e}={})=>{let{themeVariables:t,radarOptions:n}=X(e);return`
|
|
15
|
+
.radarTitle {
|
|
16
|
+
font-size: ${t.fontSize};
|
|
17
|
+
color: ${t.titleColor};
|
|
18
|
+
dominant-baseline: hanging;
|
|
19
|
+
text-anchor: middle;
|
|
20
|
+
}
|
|
21
|
+
.radarAxisLine {
|
|
22
|
+
stroke: ${n.axisColor};
|
|
23
|
+
stroke-width: ${n.axisStrokeWidth};
|
|
24
|
+
}
|
|
25
|
+
.radarAxisLabel {
|
|
26
|
+
font-size: ${n.axisLabelFontSize}px;
|
|
27
|
+
color: ${n.axisColor};
|
|
28
|
+
}
|
|
29
|
+
.radarGraticule {
|
|
30
|
+
fill: ${n.graticuleColor};
|
|
31
|
+
fill-opacity: ${n.graticuleOpacity};
|
|
32
|
+
stroke: ${n.graticuleColor};
|
|
33
|
+
stroke-width: ${n.graticuleStrokeWidth};
|
|
34
|
+
}
|
|
35
|
+
.radarLegendText {
|
|
36
|
+
text-anchor: start;
|
|
37
|
+
font-size: ${n.legendFontSize}px;
|
|
38
|
+
dominant-baseline: hanging;
|
|
39
|
+
}
|
|
40
|
+
${Y(t,n)}
|
|
41
|
+
`},`styles`)}})))()}Q();export{Z as diagram};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{E as t}from"./chunk-FOHPRMQF-B8MMrnxV.js";import{n,r}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as i,S as a,t as o,w as s}from"./src-C1iDJpBK.js";import{B as c,U as l,W as u,X as d,a as f,b as p,f as m,j as h,q as ee,v as te,w as ne,x as re,y as ie}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{d as ae,i as oe,t as se,v as g}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as ce,t as le}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as ue,r as de}from"./mermaid-parser.core-DvCAQkzY.js";function _(){Z={}}function v(){let e=ge,{ast:t}=Z,n=b();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((r,i)=>{let a=D(r,t.dataEntities,n);e=B(e,{$kind:G,index:i,frame:r,textProps:a});let o;P(r)?(s.debug(`source frame`,r.sourceFrames),o=t.frames.filter(e=>r.sourceFrames.some(t=>t.$refText===e.name)),o.forEach(t=>{e=B(e,{$kind:q,index:i,frame:r,sourceFrame:t})})):e=B(e,{$kind:q,index:i,frame:r})}),e={...e,sortedSwimlanesArray:j(e.swimlanes)},e}function y(e){Z.ast=e}function b(){return Q}function x(e){let t=e.split(`.`);if(t.length===2)return t[0]}function S(e){let t=e.split(`.`);return t.length===2?t[1]:e}function C(e,t){if(t&&t.length!==0)return Object.values(e).find(e=>e.namespace===t)}function w(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}function T(e,t){let n=x(e.entityIdentifier),r=C(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||Q.labelUiAutomation}:n?{index:w(t,0,100),label:Q.labelUiAutomationPrefix+n}:{index:0,label:Q.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||Q.labelCommandReadModel}:n?{index:w(t,100,200),label:Q.labelCommandReadModelPrefix+n}:{index:100,label:Q.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||Q.labelEvents}:n?{index:w(t,200,300),label:Q.labelEventsPrefix+n}:{index:200,label:Q.labelEvents}}}function E(e){let{themeVariables:t}=p();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}function D(e,t,n){let r=p(),i=c(S(e.entityIdentifier)??``,r),a,o={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},l=`<b>${g(i,n.textMaxWidth,o)}</b>`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf(`{`)+1),a=a.substring(0,a.lastIndexOf(`}`)-1),a=c(a,r),a=g(a,n.textMaxWidth,o),a=a.replaceAll(` `,` `)),e.dataReference){let i=t.find(t=>t.name===e.dataReference?.$refText);i&&(a=i.dataBlockValue,a=a.substring(a.indexOf(`{
|
|
2
|
+
`)+2),a=a.substring(0,a.lastIndexOf(`}`)-1),a=c(a,r),a=g(a,n.textMaxWidth,o),a=a.replaceAll(` `,` `),a+=`<br/>`)}let u=a!==void 0;u&&(l+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${a}</code>`);let d={fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily},f=se(l,d),m=u?f.width/3:f.width,h={content:l,width:m,height:f.height};return s.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}function O(e,t){let n=t,r=E(n.frame),i={width:n.textProps.width+2*Q.boxTextPadding,height:n.textProps.height+2*Q.boxTextPadding};return[{$kind:K,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}function k(e,t,n){return t===void 0?Q.contentStartX:t.index===e.index&&e.r?e.r+Q.boxPadding:n===void 0?Q.contentStartX:n.r-Q.boxOverlap+Q.boxPadding}function A(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}function j(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function M(e,t){let n=t,r=T(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*Q.swimlaneMinHeight+Q.swimlaneGap,height:Q.swimlaneMinHeight,maxHeight:Q.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(Q.boxMinWidth,Math.min(Q.boxMaxWidth,n.dimension.width))+2*Q.boxPadding,height:Math.max(Q.boxMinHeight,Math.min(Q.boxMaxHeight,n.dimension.height))+2*Q.boxPadding},c=k(i,o,a),l=c+s.width+Q.boxPadding,u=A(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(Q.swimlaneMinHeight,i.maxHeight)+2*Q.swimlanePadding;let d={x:c,y:Q.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=j(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+Q.swimlaneGap}return f}function N(e,t){return e===0&&t.sourceFrames.length===0}function P(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}function F(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}function I(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}function L(e,n){let r=n;if(t(r.frame)||N(r.index,r.frame))return[];let i=F(e.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?F(e.boxes,r.sourceFrame):I(e.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:J,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}function fe(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}function R(e,t){let n=_e[t.$kind];if(n==null)return[];let r=n(e,t);return s.debug(`decided events`,r),r}function z(e,t){let n=t.reduce((e,t)=>{let n=ve[t.$kind];return n==null?e:n(e,t)},e);return s.debug(`evolve events`,{state:e,newState:n,events:t}),n}function B(e,t){return z(e,R(e,t))}function V(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}function H(e,t){return e>t}function U(e,t,n,r){return i=>{let a=i.sourceBox.swimlane.y+t.swimlanePadding,o=i.targetBox.swimlane.y+t.swimlanePadding,c=H(a,o),l=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3,d,f;s.debug(`rendering relation up=${c} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),c?(d=a,f=o+i.targetBox.dimension.height):(d=a+i.sourceBox.dimension.height,f=o);let p=r.emRelationStroke??i.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,i.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${n})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}function W(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}var G,K,q,J,Y,X,pe,me,he,Z,Q,ge,_e,ve,$,ye,be,xe;function Se(){return(Se=e((()=>{le(),ae(),h(),i(),r(),ue(),o(),G=`position frame`,K=`frame positioned`,q=`position relation`,J=`relation positioned`,Y=/* @__PURE__ */ n(function(e){s.debug(`options str`,e)},`setOptions`),X=/* @__PURE__ */ n(function(){return{}},`getOptions`),pe=/* @__PURE__ */ n(function(){_(),f()},`clear`),n(_,`reset`),me=m.eventmodeling,he=/* @__PURE__ */ n(()=>oe({...me,...p().eventmodeling}),`getConfig`),Z={},n(v,`getState`),n(y,`setAst`),Q={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `},n(b,`getDiagramProps`),ge={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]},n(x,`extractNamespace`),n(S,`extractName`),n(C,`findSwimlaneByNamespace`),n(w,`findNextAvailableIndex`),n(T,`calculateSwimlaneProps`),n(E,`calculateEntityVisualProps`),n(D,`calculateTextProps`),n(O,`decidePositionFrame`),n(k,`calculateX`),n(A,`calculateMaxRight`),n(j,`sortedSwimlanesArray`),n(M,`evolveFramePositioned`),n(N,`isFirstFrame`),n(P,`hasSourceFrame`),n(F,`findBoxByFrame`),n(I,`findBoxByLineIndex`),n(L,`decidePositionRelation`),n(fe,`evolveRelationPositioned`),_e={[G]:O,[q]:L},ve={[K]:M,[J]:fe},n(R,`decide`),n(z,`evolve`),n(B,`dispatch`),$={getConfig:he,setOptions:Y,getOptions:X,clear:pe,setAccTitle:u,getAccTitle:ie,getAccDescription:te,setAccDescription:l,setDiagramTitle:ee,getDiagramTitle:ne,setAst:y,getDiagramProps:b,getState:v},ye={parse:/* @__PURE__ */ n(async e=>{let t=await de(`eventmodeling`,e);s.debug(t),$.setAst(t),ce(t,$)},`parse`)},be=re()?.eventmodeling,n(V,`renderD3Box`),n(H,`dirUpwards`),n(U,`renderD3Relation`),n(W,`renderD3Swimlane`),xe={parser:ye,db:$,renderer:{draw:/* @__PURE__ */ n(function(e,t,n,r){if(s.debug(`in eventmodeling renderer`,e+`
|
|
3
|
+
`,`id:`,t,n),!be)throw Error(`EventModeling config not found`);let i=r.db,{themeVariables:o,eventmodeling:c}=re(),l=a(`[id="${t}"]`),u=i.getDiagramProps(),f=i.getState(),p=`em-arrowhead-${t}`,m=o.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach(W(l,f.maxR,u,o)),f.boxes.forEach(V(l,u)),f.relations.forEach(U(l,u,p,o)),l.append(`defs`).append(`marker`).attr(`id`,p).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,m),d(void 0,l,c?.padding??30,c?.useMaxWidth)},`draw`)},styles:/* @__PURE__ */ n(e=>``,`getStyles`)}})))()}Se();export{xe as diagram};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-BKuNeK48.js";import{n,r}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as i,S as a,t as o,w as s}from"./src-C1iDJpBK.js";import{D as c,U as l,W as u,a as d,b as f,c as p,f as m,j as h,q as g,v as _,w as v,y}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{n as b}from"./ordinal-NuFkISw7.js";import{t as x}from"./defaultLocale-BvxIcb9Y.js";import{d as S,i as C}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as ee,t as w}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{n as te,t as T}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as E,r as D}from"./mermaid-parser.core-DvCAQkzY.js";import{a as O,n as k,r as A}from"./chunk-P2QGCYS3-C9bc1yiM.js";import{n as ne,t as j}from"./chunk-POPQ4Y6H-P1s5xaxM.js";function M(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function N(){return this.eachAfter(M)}function P(){return(P=e((()=>{})))()}function F(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function I(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function L(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function R(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function z(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function B(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function V(e){for(var t=this,n=re(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function re(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function ie(){return(ie=e((()=>{})))()}function ae(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function oe(){return Array.from(this)}function se(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ce(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*le(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function H(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=fe)):t===void 0&&(t=de);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(me)}function ue(){return H(this).eachBefore(pe)}function de(e){return e.children}function fe(e){return Array.isArray(e)?e[1]:null}function pe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function me(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}function he(){return(he=e((()=>{P(),ie(),U.prototype=H.prototype={constructor:U,count:N,each:F,eachAfter:L,eachBefore:I,find:R,sum:z,sort:B,path:V,ancestors:ae,descendants:oe,leaves:se,links:ce,copy:ue,[Symbol.iterator]:le}})))()}function ge(e){if(typeof e!=`function`)throw Error();return e}function W(){return 0}function G(e){return function(){return e}}function _e(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ve(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ye(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}function be(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?ve(c,n,r,i,h?r+=m*g/h:a):ye(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var K,q;function J(){return(J=e((()=>{K=(1+Math.sqrt(5))/2,q=(function e(t){function n(e,n,r,i,a){be(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(K)})))()}function xe(){var e=q,t=!1,n=1,r=1,i=[0],a=W,o=W,s=W,c=W,l=W;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(_e),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=ge(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:G(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:G(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:G(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:G(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:G(+e),u):l},u}function Y(){return(Y=e((()=>{J()})))()}var Se=/* @__PURE__ */ t({diagram:()=>ke});function Ce(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}var X,we,Te,Z,Ee,Q,$,De,Oe,ke;function Ae(){return(Ae=e((()=>{T(),w(),j(),k(),S(),h(),i(),r(),E(),o(),X=class{constructor(){this.nodes=[],this.levels=/* @__PURE__ */ new Map,this.outerNodes=[],this.classes=/* @__PURE__ */ new Map,this.setAccTitle=u,this.getAccTitle=y,this.setDiagramTitle=g,this.getDiagramTitle=v,this.getAccDescription=_,this.setAccDescription=l}static{n(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=m,t=f();return C({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{A(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){d(),this.nodes=[],this.levels=/* @__PURE__ */ new Map,this.outerNodes=[],this.classes=/* @__PURE__ */ new Map,this.root=void 0}},n(Ce,`buildHierarchy`),we=/* @__PURE__ */ n((e,t)=>{te(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=Te(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=Ce(r),a=/* @__PURE__ */ n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),Te=/* @__PURE__ */ n(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:/* @__PURE__ */ n(async e=>{try{let t=await D(`treemap`,e);s.debug(`Treemap AST:`,t);let n=Z.parser?.yy;if(!(n instanceof X))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);we(t,n)}catch(e){throw s.error(`Error parsing treemap:`,e),e}},`parse`)},Ee=10,Q=10,$=25,De={draw:/* @__PURE__ */ n((e,t,r,i)=>{let o=i.db,c=o.getConfig(),l=c.padding??Ee,u=o.getDiagramTitle(),d=o.getRoot(),{themeVariables:m}=f();if(!d)return;let h=u?30:0,g=ee(t),_=c.nodeWidth?c.nodeWidth*Q:960,v=c.nodeHeight?c.nodeHeight*Q:500,y=_,S=v+h;g.attr(`viewBox`,`0 0 ${y} ${S}`),p(g,S,y,c.useMaxWidth);let C;try{let e=c.valueFormat||`,`;if(e===`$0,0`)C=/* @__PURE__ */ n(e=>`$`+x(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;C=/* @__PURE__ */ n(e=>`$`+x(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);C=/* @__PURE__ */ n(e=>`$`+x(t||``)(e),`valueFormat`)}else C=x(e)}catch(e){s.error(`Error creating format function:`,e),C=x(`,`)}let w=b().range([`transparent`,m.cScale0,m.cScale1,m.cScale2,m.cScale3,m.cScale4,m.cScale5,m.cScale6,m.cScale7,m.cScale8,m.cScale9,m.cScale10,m.cScale11]),te=b().range([`transparent`,m.cScalePeer0,m.cScalePeer1,m.cScalePeer2,m.cScalePeer3,m.cScalePeer4,m.cScalePeer5,m.cScalePeer6,m.cScalePeer7,m.cScalePeer8,m.cScalePeer9,m.cScalePeer10,m.cScalePeer11]),T=b().range([m.cScaleLabel0,m.cScaleLabel1,m.cScaleLabel2,m.cScaleLabel3,m.cScaleLabel4,m.cScaleLabel5,m.cScaleLabel6,m.cScaleLabel7,m.cScaleLabel8,m.cScaleLabel9,m.cScaleLabel10,m.cScaleLabel11]);u&&g.append(`text`).attr(`x`,y/2).attr(`y`,h/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(u);let E=g.append(`g`).attr(`transform`,`translate(0, ${h})`).attr(`class`,`treemapContainer`),D=H(d).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),k=xe().size([_,v]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(l).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(D),A=k.descendants().filter(e=>e.children&&e.children.length>0),j=E.selectAll(`.treemapSection`).data(A).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);j.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),j.append(`clipPath`).attr(`id`,(e,n)=>`clip-section-${t}-${n}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),j.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>w(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>te(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=O({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),j.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,n)=>`url(#clip-section-${t}-${n})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+T(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+O({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=a(this),n=e.data.name;t.text(n);let r=e.x1-e.x0,i;i=c.showValues!==!1&&e.value?r-10-30-10-6:r-6-6;let o=Math.max(15,i),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&j.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?C(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+T(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+O({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let M=k.leaves(),N=M.length>20,P=N?16:38,F=N?14:28,I=N?4:8,L=N?4:6,R=N?2:4,z=N?8:10,B=N?1:2,V=E.selectAll(`.treemapLeafGroup`).data(M).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);V.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`style`,e=>O({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`stroke-width`,3),V.append(`clipPath`).attr(`id`,(e,n)=>`clip-${t}-${n}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),V.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${P}px;fill:`+T(e.data.name)+`;`+O({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,n)=>`url(#clip-${t}-${n})`).text(e=>e.data.name).each(function(e){let t=a(this),n=e.x1-e.x0,r=e.y1-e.y0,i=t.node(),o=n-2*R,s=r-2*R;if(o<z||s<z){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;i.getComputedTextLength()>o&&c>I;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(L,Math.min(F,Math.round(c*l))),d=c+B+u;for(;d>s&&c>I&&(c--,u=Math.max(L,Math.min(F,Math.round(c*l))),!(u<L&&c===I));)t.style(`font-size`,`${c}px`),d=c+B+u;t.style(`font-size`,`${c}px`),N?(c<I||s<I)&&t.style(`display`,`none`):(i.getComputedTextLength()>o||c<I||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&V.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${F}px;fill:`+T(e.data.name)+`;`+O({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,n)=>`url(#clip-${t}-${n})`).text(e=>e.value?C(e.value):``).each(function(e){let t=a(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let r=a(n).select(`.treemapLabel`);if(r.empty()||r.style(`display`)===`none`){t.style(`display`,`none`);return}let i=parseFloat(r.style(`font-size`)),o=Math.max(L,Math.min(F,Math.round(i*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+i/2+B;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*R;t.node().getComputedTextLength()>u||s+o>l||o<L?t.style(`display`,`none`):t.style(`display`,null)});let re=c.diagramPadding??8;ne(g,re,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:/* @__PURE__ */ n(function(e,t){return t.db.getClasses()},`getClasses`)},Oe={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},ke={parser:Z,get db(){return new X},renderer:De,styles:/* @__PURE__ */ n(({treemap:e}={})=>{let t=c(),n=f(),r=C(t,n.themeVariables),i=C(Oe,e),a=i.titleColor??r.titleColor,o=i.labelColor??r.textColor,s=i.valueColor??r.textColor;return`
|
|
2
|
+
.treemapNode.section {
|
|
3
|
+
stroke: ${i.sectionStrokeColor};
|
|
4
|
+
stroke-width: ${i.sectionStrokeWidth};
|
|
5
|
+
fill: ${i.sectionFillColor};
|
|
6
|
+
}
|
|
7
|
+
.treemapNode.leaf {
|
|
8
|
+
stroke: ${i.leafStrokeColor};
|
|
9
|
+
stroke-width: ${i.leafStrokeWidth};
|
|
10
|
+
fill: ${i.leafFillColor};
|
|
11
|
+
}
|
|
12
|
+
.treemapLabel {
|
|
13
|
+
fill: ${o};
|
|
14
|
+
font-size: ${i.labelFontSize};
|
|
15
|
+
}
|
|
16
|
+
.treemapValue {
|
|
17
|
+
fill: ${s};
|
|
18
|
+
font-size: ${i.valueFontSize};
|
|
19
|
+
}
|
|
20
|
+
.treemapTitle {
|
|
21
|
+
fill: ${a};
|
|
22
|
+
font-size: ${i.titleFontSize};
|
|
23
|
+
}
|
|
24
|
+
`},`getStyles`)}})))()}export{he as i,Ae as n,Y as r,Se as t};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,w as i}from"./src-C1iDJpBK.js";import{U as a,W as o,a as s,b as c,c as l,f as u,j as d,q as f,v as p,w as m,y as h}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{d as g,i as _}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as v,t as y}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{n as b,t as x}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as S,r as C}from"./mermaid-parser.core-DvCAQkzY.js";var w,T,E,D,O,k,A,j,M,N,P;function F(){return(F=e((()=>{x(),y(),g(),d(),r(),n(),S(),w=u.packet,T=class{constructor(){this.packet=[],this.setAccTitle=o,this.getAccTitle=h,this.setDiagramTitle=f,this.getDiagramTitle=m,this.getAccDescription=p,this.setAccDescription=a}static{t(this,`PacketDB`)}getConfig(){let e=_({...w,...c().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){s(),this.packet=[]}},E=1e4,D=/* @__PURE__ */ t((e,t)=>{b(e,t);let n=-1,r=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=n+1,s!==n+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${n+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,n=c,i.debug(`Packet block ${s} - ${n} with label ${u}`);r.length<=o+1&&t.getPacket().length<E;){let[e,n]=O({start:s,end:c,bits:l,label:u},a,o);if(r.push(e),e.end+1===a*o&&(t.pushWord(r),r=[],a++),!n)break;({start:s,end:c,bits:l,label:u}=n)}}t.pushWord(r)},`populate`),O=/* @__PURE__ */ t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),k={parser:{yy:void 0},parse:/* @__PURE__ */ t(async e=>{let t=await C(`packet`,e),n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);i.debug(t),D(t,n)},`parse`)},A=/* @__PURE__ */ t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:c,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,m=p*(d.length+1)-(f?0:o),h=c*u+2,g=v(t);g.attr(`viewBox`,`0 0 ${h} ${m}`),l(g,m,h,a.useMaxWidth);for(let[e,t]of d.entries())j(g,t,e,a);g.append(`text`).text(f).attr(`x`,h/2).attr(`y`,m-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),j=/* @__PURE__ */ t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),M={draw:A},N={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},P={parser:k,get db(){return new T},renderer:M,styles:/* @__PURE__ */ t(({packet:e}={})=>{let t=_(N,e);return`
|
|
2
|
+
.packetByte {
|
|
3
|
+
font-size: ${t.byteFontSize};
|
|
4
|
+
}
|
|
5
|
+
.packetByte.start {
|
|
6
|
+
fill: ${t.startByteColor};
|
|
7
|
+
}
|
|
8
|
+
.packetByte.end {
|
|
9
|
+
fill: ${t.endByteColor};
|
|
10
|
+
}
|
|
11
|
+
.packetLabel {
|
|
12
|
+
fill: ${t.labelColor};
|
|
13
|
+
font-size: ${t.labelFontSize};
|
|
14
|
+
}
|
|
15
|
+
.packetTitle {
|
|
16
|
+
fill: ${t.titleColor};
|
|
17
|
+
font-size: ${t.titleFontSize};
|
|
18
|
+
}
|
|
19
|
+
.packetBlock {
|
|
20
|
+
stroke: ${t.blockStrokeColor};
|
|
21
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
22
|
+
fill: ${t.blockFillColor};
|
|
23
|
+
}
|
|
24
|
+
`},`styles`)}})))()}F();export{P as diagram};
|