@p4code/cli 0.9.0 → 0.9.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/dist/bin.mjs +1 -1
- package/dist/{binCli-k72_SR2Z.mjs → binCli-B8_9WRM7.mjs} +10 -3
- package/dist/client/.vite/manifest.json +1120 -1120
- package/dist/client/assets/{2NI2N5EU-DPAxyySd.js → 2NI2N5EU-Cc9Gs6p1.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-C0aflwpw.js → 4UO7MD6I--tXEX5R9.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-hhn6T1ru.js → 5B3SVYGG-CPRAqyzZ.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-BQ0OdoZ6.js → 5GK6JWQ2-OC2-LRPx.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-BR8rdHwZ.js → 5N7A7DKN-BUa1-OZ6.js} +2 -2
- package/dist/client/assets/{5OC2THR4-DVDBlcjJ.js → 5OC2THR4-DKcwc3u1.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-CjtOXys8.js → 5S6HY5KT-Dqth6iG8.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-Bpy1Geo9.js → 6IMQ5BUJ-DmEcg0r1.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-D2naWV4i.js → 6OLKWJ4F-W-G6qP3r.js} +2 -2
- package/dist/client/assets/{74OO7NKP-CceNos-7.js → 74OO7NKP-u02yiNi7.js} +2 -2
- package/dist/client/assets/{75O6YZUN-CnXm_L8w.js → 75O6YZUN-xx4y2KbP.js} +2 -2
- package/dist/client/assets/{77XECAW3-ECBcD47O.js → 77XECAW3-SIARa2Fi.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-B4F4wZam.js → ABYRPUBD-B_0r9NT4.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DR9yRrzS.js → AuthSurfaceShell-DPlJfFlL.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-Cae7rC8c.js → BB2UYUI2-CujjjZN9.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DBDboDOb.js → BUM34MOA-NuuTH6rj.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-C6UutqUy.js → CEQABKGZ-DDaGayTm.js} +2 -2
- package/dist/client/assets/{CXAC5362-BnZlf1Fg.js → CXAC5362-CB6ETtV8.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-3K5PpaVk.js → ChatGptUsageButton-DqJ-vZMe.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-EK5C8Dje.js → ChatMarkdown-C94Vrzqf.js} +5 -5
- package/dist/client/assets/{CodexSetupSection.logic-BepCZ25p.js → CodexSetupSection.logic-DOe05Yxb.js} +2 -2
- package/dist/client/assets/{CommandBlock-C967hvdK.js → CommandBlock-BUY_4yYG.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-kPs79YCA.js → ComposerPromptEditor-BXlsIVOQ.js} +4 -4
- package/dist/client/assets/{ConnectionDiagnosisDetails-B5VXf5lv.js → ConnectionDiagnosisDetails-DoemNrMF.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-Du8kYl_L.js → DRLTVNUE-D0oW6kzx.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DxjEuWNy.js → DYY6UVD2-DBOhEG0-.js} +2 -2
- package/dist/client/assets/{DevicePanel-YEBH-Vqd.js → DevicePanel-B5VTFku5.js} +2 -2
- package/dist/client/assets/{DeviceSetup-CAlj40rJ.js → DeviceSetup-C7hesHao.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-BOk2MTlv.js → DiffCommentAnnotation-DDYXWdY5.js} +2 -2
- package/dist/client/assets/{DiffFileTree-Dg3cvfi5.js → DiffFileTree-SBs4YWHB.js} +2 -2
- package/dist/client/assets/{DiffPanel-fTHMPAQJ.js → DiffPanel-Cd7uZSwI.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-CqmToECA.js → DiffWorkerPoolProvider-elvn0oLt.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-BXKBSCcw.js → EmbeddedDesign-BDMR5UJo.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-BeMBYVRF.js → FNOVOB4O-C55ATzH6.js} +2 -2
- package/dist/client/assets/{FileDiff-DW1zPAn5.js → FileDiff-DpQM5r9o.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-CTTCKfik.js → FilePreviewPanel-DWeewVws.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-ClboCRR4.js → FoldedSettingsSection-KMTLX6MR.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-DtsLNbcM.js → HDGCDEEZ-BhXkP8CI.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-Cj1_K-Mg.js → HSJLKHB7-ad9jby8d.js} +2 -2
- package/dist/client/assets/JZOYTAAL-CifPXszn.js +1 -0
- package/dist/client/assets/{K3MD6TGW-SNOidZ8r.js → K3MD6TGW-CG-BXshu.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-CpajkG5B.js → K7RP3OMA-Dvs72E71.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-CAyO0Nv9.js → LHDIQX7Q-DBbVLdBb.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-Dp60gO-M.js → LUXOKEGN-B8HcSY56.js} +2 -2
- package/dist/client/assets/{MathTypeset-DG9QDH3a.js → MathTypeset-D0cDlCZy.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-CPZZhC9o.js → N3JZAHOW-BXwh9_vP.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-Bapg3pv1.js → NUIALGQ3-ClxnUm8B.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-DunzHVd0.js → NoProjectsHero-Bn4v5ofT.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-BmLVfB2-.js → O65XPQGZ-BEEpAP2l.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-BzZlSmaP.js → O7XIQ6OM-CkSDwviv.js} +2 -2
- package/dist/client/assets/{OFQON5FD-Ciy1Dfj8.js → OFQON5FD-4EbpxjZS.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-DO-fCpTN.js → P4ConnectAccountPages-DgxvyIGG.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-7hkM7xr7.js → P4ConnectSidebarSignIn-Bn9hP_6_.js} +2 -2
- package/dist/client/assets/{PJQHF43J-CTTmTIhc.js → PJQHF43J-D_j27v4O.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-clP6N7xc.js → PanelLayoutControls-BHEJEPDp.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-wm-IkF2y.js → PierreEntryIcon-BCv2OXDn.js} +2 -2
- package/dist/client/assets/{PreviewPanel-fTwWXayK.js → PreviewPanel-D3CQGyTY.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-DABlQCRQ.js → ProjectDefaultsSettings-CqigWqDQ.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-zExdjKgc.js → ProjectFavicon-BzkwZEKX.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-D4Br81iW.js → ProjectIconPickerDialog-Bl7a1F6c.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-Gf_5AaPE.js → ProviderAuthTerminal-BxyDTl04.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-DrfK42fH.js → ProviderModelPicker-BjWN45iR.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-CXVYrIzw.js → ProviderSettingsForm-9qRf6JzH.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-DaXxo4Bs.js → PullRequestCodeTab-2fq1MIQq.js} +2 -2
- package/dist/client/assets/{RHNBAITX-DKMeuR6R.js → RHNBAITX-DaSH9fj2.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DPJWK3HJ.js → ReadOnlySourcePreview-CUL87R5C.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-BI5KBtsb.js → RenderErrorBoundary-CEX4aXRH.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-CR4aIcpx.js → SLD4V6NK-BPOaMXu1.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CTHyd4UX.js → ScheduledTasksSettings-BEw_vC1N.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-De6GoQiO.js → ScopedSwitch-DPPAQKgb.js} +2 -2
- package/dist/client/assets/{SettingsPanels-D6e2byZQ.js → SettingsPanels-wkOx3NMK.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-BSXSdFru.js → SettingsPanels.logic-BwMoKlP_.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-MbxDDMZ9.js → SettingsScopeNotice-5BIXPKKZ.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-B0F--sat.js → SidebarStageBackdrop-Cc8Os5aB.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-C0_7R2Oa.js → T3PCR2KE-DF_ihTb_.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DqJmzuhq.js → TKWO2OVW-BpYa7JbN.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-CmCl4WMk.js → TSHNXIZL-icuUBQJZ.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-IhSXPcO9.js → ThemeEditorPanel-K5Z_cKr_.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-DnOstFPr.js → ThreadTerminalDrawer-BEzEKbGr.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-U1f_Qxq0.js → UQJE5E4I-jTtBmXGD.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BFU1s0-x.js → USNYFO5S-COMhBWxE.js} +2 -2
- package/dist/client/assets/{Virtualizer-CI2uidEs.js → Virtualizer-3W_tqqHL.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-DVuH1I8D.js → WEVWDWVA-DoGSbgZU.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-DhiPjZ2I.js → X5RFHQXM-pFbOarC5.js} +2 -2
- package/dist/client/assets/{X62E3GBT-BoEmDIYA.js → X62E3GBT-CSXB08Iw.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-ACchb7zJ.js → XBNEOJTC-CvXlFTiB.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-WIW1NclZ.js → YHV2MVVZ-BxyA2-Iu.js} +2 -2
- package/dist/client/assets/{YURCZMG2-D8PyipKA.js → YURCZMG2-WkhL6rVs.js} +2 -2
- package/dist/client/assets/{YVG2LODB-BQvBC9bF.js → YVG2LODB-BlCOW5Bm.js} +2 -2
- package/dist/client/assets/{_chat-DDGjgFMR.js → _chat-B72aqP_1.js} +14 -14
- package/dist/client/assets/{_chat.design-DjIqnlVZ.js → _chat.design-BzS-6FDR.js} +2 -2
- package/dist/client/assets/{_chat.index-Dku1iZH1.js → _chat.index-DyO0DElX.js} +2 -2
- package/dist/client/assets/{_chat.new-8-cjg5K7.js → _chat.new-Dy39C0PE.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-DVfSewSZ.js → _chat.pull-requests-Bzb1CyG6.js} +2 -2
- package/dist/client/assets/{assetUrls-BOJMUK_1.js → assetUrls-DSeSTRY1.js} +2 -2
- package/dist/client/assets/{assets-6zZLBDZw.js → assets-B_r3wLhD.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-TJXTYA-V.js → browserHistoryStore-BG8TrOnZ.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-DRbX4L_9.js → browserLinkTarget-jRu1-WRM.js} +2 -2
- package/dist/client/assets/{connect-Dp9BB7ev.js → connect-a25FIa26.js} +2 -2
- package/dist/client/assets/{connect-agent-DkbIqI-8.js → connect-agent-C1UODlly.js} +2 -2
- package/dist/client/assets/{design-Dn5DzqF2.js → design-C7HRMO73.js} +2 -2
- package/dist/client/assets/{device-dylO5xoO.js → device-BNK9g-io.js} +2 -2
- package/dist/client/assets/{diffRendering-MXukhqw1.js → diffRendering-UEl_19xa.js} +2 -2
- package/dist/client/assets/{dist-ceTe_mn7.js → dist-ATiHSdUa.js} +2 -2
- package/dist/client/assets/{duoViewer-C0aL6Kyr.js → duoViewer-C7BduYuF.js} +2 -2
- package/dist/client/assets/{dynamic-DTzzXo3L.js → dynamic-CFqi-4NG.js} +2 -2
- package/dist/client/assets/{embeddedScripts-DcWCyBxX.js → embeddedScripts-BNfDELW_.js} +2 -2
- package/dist/client/assets/{entities-eRiwvW2F.js → entities-pafv-XUM.js} +2 -2
- package/dist/client/assets/{fileLinks-CYejoXPq.js → fileLinks-pJLWwULO.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-wG1G7D6R.js → fileTreeExpansion-CXgwpUPc.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-CzeweGHs.js → getDiffFileInput-eTK8du_O.js} +2 -2
- package/dist/client/assets/{guideRunStore-DAYN2Zd7.js → guideRunStore-83fw4RPw.js} +2 -2
- package/dist/client/assets/{index-DA9og9YW.js → index-C0oEvzQc.js} +3 -3
- package/dist/client/assets/{lazy-Ccs3klKO.js → lazy-B292152Q.js} +4 -4
- package/dist/client/assets/{linkedPrompt-BJh0Yqud.js → linkedPrompt-BOQDb8-o.js} +2 -2
- package/dist/client/assets/{main-DleJeMZO.js → main-Cywp3EWc.js} +7 -7
- package/dist/client/assets/{mediaReference-BbSbhpkR.js → mediaReference-onv8z3Oz.js} +2 -2
- package/dist/client/assets/{mediaSource-B_75uvyp.js → mediaSource-BhEv5iyl.js} +2 -2
- package/dist/client/assets/{onboarding-1Zg3fM0A.js → onboarding-y217_KQL.js} +2 -2
- package/dist/client/assets/{openFileInPreview-CiPuDrfB.js → openFileInPreview-DeuqxJFn.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-BVKW5TIA.js → p4ProjectFile-BuzidL5M.js} +2 -2
- package/dist/client/assets/{pair-DUv1mY4i.js → pair-BjRq2ZHP.js} +2 -2
- package/dist/client/assets/{phoneViewer-CStYy_tX.js → phoneViewer-DYOR2qAi.js} +2 -2
- package/dist/client/assets/{pierre-icons-D3vWvKqU.js → pierre-icons-BDVVO9cA.js} +2 -2
- package/dist/client/assets/{preview-ipLyyv_l.js → preview-BoTHkmVi.js} +2 -2
- package/dist/client/assets/{primary-CMBPxKMH.js → primary-DiwDV4KJ.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-CER468V5.js → primaryCloudLinkState-BgmcA0C5.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-D4FdR3Xm.js → projectFilesQueryState-C_yH-05-.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-4wQTbXvz.js → projectScriptEditor-Cu65VaAw.js} +2 -2
- package/dist/client/assets/{providerSkills-D3rxPB_g.js → providerSkills-CgtkB3rc.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-Bkh57WzV.js → pullRequestDetail.logic-FUlKz34F.js} +2 -2
- package/dist/client/assets/{pullRequests-DggtcbhA.js → pullRequests-C8-SkuQU.js} +2 -2
- package/dist/client/assets/{queries-DJfKGsHe.js → queries-BZGM6AjA.js} +2 -2
- package/dist/client/assets/{renderScheduler-BgGYA97h.js → renderScheduler-CGMZZETC.js} +2 -2
- package/dist/client/assets/{runtime-BOlBBevr.js → runtime-BBIAfWJY.js} +3 -3
- package/dist/client/assets/{runtime-CeFhsGnm.js → runtime-CABaKt1A.js} +3 -3
- package/dist/client/assets/{scheduledTasksSettings.logic-BpOBCcOk.js → scheduledTasksSettings.logic-DFlgKyt2.js} +2 -2
- package/dist/client/assets/{server-DvWrfyUO.js → server-mIR8e8Vz.js} +2 -2
- package/dist/client/assets/{session-D3gY-tOR.js → session-BlCBDyVn.js} +2 -2
- package/dist/client/assets/{session-logic-OeNFZd_V.js → session-logic-CwBN7BBv.js} +2 -2
- package/dist/client/assets/{settings-C6gUwixG.js → settings-fTPmNkCr.js} +2 -2
- package/dist/client/assets/{settings.appearance-BdGq8dkT.js → settings.appearance-D96WohbH.js} +2 -2
- package/dist/client/assets/settings.archived-CnXEwX0Z.js +2 -0
- package/dist/client/assets/{settings.computer-use-DTAvnNqQ.js → settings.computer-use-DZTx8sD-.js} +2 -2
- package/dist/client/assets/{settings.connections-CZD-0BNX.js → settings.connections-Rl7zwQ75.js} +2 -2
- package/dist/client/assets/{settings.data-controls-CTVHY8Rd.js → settings.data-controls-DuyfuMcN.js} +2 -2
- package/dist/client/assets/{settings.decisions-D3zMITNw.js → settings.decisions-eRAu1hqY.js} +2 -2
- package/dist/client/assets/{settings.designs-DWeI1d2s.js → settings.designs-C0RxEgfD.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-CqC6fhz6.js → settings.diagnostics-BDo1Ma1e.js} +2 -2
- package/dist/client/assets/{settings.general-BDEcQVI4.js → settings.general-CpbG8_Ml.js} +2 -2
- package/dist/client/assets/{settings.integrations-BmqNoylk.js → settings.integrations-CujbsXfc.js} +2 -2
- package/dist/client/assets/{settings.keybindings-Mt7J5TKC.js → settings.keybindings-CQ5xk9v3.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-Dvex7Jce.js → settings.open-source-licenses-DIBdHSDB.js} +2 -2
- package/dist/client/assets/{settings.plugins-BAFed2wY.js → settings.plugins-BbsrwhRq.js} +2 -2
- package/dist/client/assets/{settings.projects-DhuXD_vx.js → settings.projects-BeNHSNe9.js} +3 -3
- package/dist/client/assets/{settings.providers-D_-kNRqH.js → settings.providers-DQT6izvS.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-Z4aprmEO.js → settings.scheduled-tasks-vKCtN-OC.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-o0bdbS5t.js → settings.snap-shot-DgPUS-Zo.js} +2 -2
- package/dist/client/assets/{settings.source-control-CwJzBnSu.js → settings.source-control-B87geXn3.js} +2 -2
- package/dist/client/assets/{settings.storage-B4ahmlhx.js → settings.storage-BYfdzwhk.js} +2 -2
- package/dist/client/assets/{settingsLayout-DrhqvTJ8.js → settingsLayout-vgYGia0Q.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-DDt6qTcu.js → sidebarProjectGrouping-DaMfJpqc.js} +2 -2
- package/dist/client/assets/{sourceControl-Dqo9EYNC.js → sourceControl-CcPqr0UX.js} +2 -2
- package/dist/client/assets/{sourceControlClients-DGnHi6Rd.js → sourceControlClients-DtjbXUDt.js} +2 -2
- package/dist/client/assets/{terminalSessions-BykgTNwT.js → terminalSessions-0YYscaVr.js} +2 -2
- package/dist/client/assets/{toast-C61oyZY1.js → toast-D26NINYU.js} +2 -2
- package/dist/client/assets/{uiStateStore-DL8OsPjd.js → uiStateStore-CKKy2mq4.js} +2 -2
- package/dist/client/assets/{usage-DATBL2Du.js → usage-BDFFNkIV.js} +2 -2
- package/dist/client/assets/{use-atom-command-Bt7x9oO0.js → use-atom-command-C4y634Qy.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-BOKOo2wA.js → useHandleNewThread-C7ynA68A.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D63n-MFC.js → useP4ConnectAuthPrompt-5uCMQUT1.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-D53oZord.js → usePullRequestActions-cmzmOrJ-.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-CeAUx0qZ.js → useScopedModelAvailability-kczZtr1M.js} +2 -2
- package/dist/client/assets/{useSettings-VTow9ZEM.js → useSettings-CHt2_4He.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-B2f3qDSR.js → vcsRefInvalidation-CytQodoP.js} +2 -2
- package/dist/client/assets/{welcome-CQgOocvj.js → welcome-pbssrwWd.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/JZOYTAAL-BrzaFmLe.js +0 -1
- package/dist/client/assets/settings.archived-DobN7ZtC.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./6OLKWJ4F-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./6OLKWJ4F-W-G6qP3r.js";import{d as g,f as _,g as v,m as ee,r as y,s as b,t as x}from"./77XECAW3-SIARa2Fi.js";import{a as te,s as ne}from"./N3JZAHOW-BXwh9_vP.js";import{_ as S}from"./lazy-B292152Q.js";var C=class{domains=new Map;transitions=[];setDomains(e){if(e)for(let t of e){let e=t.domain;this.domains.set(e,{name:e,items:(t.items??[]).map(e=>({label:e.label}))})}}setTransitions(e){e&&(this.transitions=e.filter(e=>e.from!==e.to).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))}};function w(e,t){let n=new C;return n.setDomains(e.domains),n.setTransitions(e.transitions),{type:`cynefin`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
2
|
`):void 0,domains:n.domains,transitions:n.transitions}}var T=[{name:`cynefin-beta:`,pattern:`cynefin-beta:`},o(`cynefin-beta`),{name:`-->`,pattern:`-->`},{name:`:`,pattern:`:`},{name:`DOMAIN_NAME`,pattern:/complex|complicated|clear|chaotic|confusion/y},e,m,d,c,s,h,f,u,p];function E(e){let o=new a(l(e,T,`cynefin`),T,`cynefin`),s={$type:`Cynefin`,domains:[],transitions:[]},c=()=>{for(;o.kinds[o.i]===9;)o.i++},u=()=>{o.kind!==-1&&(o.kind!==9&&o.fail(`a line break or the end of input`),c())};for(c(),o.kind!==1&&o.kind!==0&&o.fail(`'cynefin-beta'`),o.i++;o.kind!==-1;)switch(o.kind){case 9:o.i++;break;case 5:s.accDescr=t(o.take()),u();break;case 6:s.accTitle=i(o.take()),u();break;case 7:s.title=n(o.take()),u();break;case 4:{let e=o.take();if(o.accept(2)){let t={$type:`Transition`,from:e,to:o.expect(4)};o.accept(3)&&(t.label=r(o.expect(8))),u(),s.transitions.push(t);break}let t={$type:`DomainBlock`,domain:e,items:[]};for(c();o.kinds[o.i]===8;)t.items.push({$type:`DomainItem`,label:r(o.take())}),c();s.domains.push(t);break}default:o.fail(`a domain, a transition, a title, or a line break`)}return s}function D(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function O(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}function re(e,t){return typeof e==`number`&&Number.isFinite(e)&&e!==0?e:O(t)}var ie={segments:7,vertical:!0,pointStep:17,controlStep:31,controlShift:7},k={segments:7,vertical:!1,pointStep:23,controlStep:37,controlShift:11};function A(e,t,n,r,i,a){let o=(t-e)/a.segments,s=[],c=[];for(let t=0;t<=a.segments;t++){let l=t===0&&a.pinStart||t===a.segments&&a.pinEnd;s.push(e+t*o),c.push(l?n:n+D(r+t*a.pointStep)*i*2-i)}let l=a.vertical?[c[0],s[0]]:[s[0],c[0]];for(let e=0;e<a.segments;e++){let t=(s[e]+s[e+1])/2,n=i*1.5*(e%2==0?1:-1)*D(r+e*a.controlStep+a.controlShift);a.vertical?l.push(c[e]+n,t,c[e+1]-n,t,c[e+1],s[e+1]):l.push(t,c[e]+n,t,c[e+1]-n,s[e+1],c[e+1])}return l}function j(e,t,n,r){let i=n-t;return[e,t,e+r,t+i*.2,e-r*1.5,t+i*.55,e+r*.5,t+i*.75,e-r,t+i*.85,e+r*.3,t+i*.95,e,n]}function M(e){let t=``;for(let n=2;n<e.length;n+=6)t+=`C${_(e[n])},${_(e[n+1])} ${_(e[n+2])},${_(e[n+3])} ${_(e[n+4])},${_(e[n+5])}`;return t}function N(e){let t=``;for(let n=e.length-6;n>=2;n-=6)t+=`C${_(e[n+2])},${_(e[n+3])} ${_(e[n])},${_(e[n+1])} ${_(e[n-2])},${_(e[n-1])}`;return t}function P(e){return`M${_(e[0])},${_(e[1])}${M(e)}`}function F(e,t,n,r){let i=`${_(n)},${_(r)}`;return`M${_(e-n)},${_(t)}A${i} 0 1,1 ${_(e+n)},${_(t)}A${i} 0 1,1 ${_(e-n)},${_(t)}Z`}var I=[[`complex`,0,0,0],[`complicated`,1,0,1],[`chaotic`,0,1,3],[`clear`,1,1,2]],ae=4,L=new Map([[`complex`,[`Complex`,`Probe → Sense → Respond`,`Emergent Practices`]],[`complicated`,[`Complicated`,`Sense → Analyse → Respond`,`Good Practices`]],[`clear`,[`Clear`,`Sense → Categorise → Respond`,`Best Practices`]],[`chaotic`,[`Chaotic`,`Act → Sense → Respond`,`Novel Practices`]],[`confusion`,[`Confusion`,``,`Disorder`]]]),oe=3,se=200,ce=10,le=4,R=6,ue=10,de=20,z=10;function B(e,t,n,r,i){let a=e.cynefin?.[t];return typeof a==`number`&&a>=r&&a<=i?a:n}function V(e,t,n){let r=n.fontSize??16,i=Math.round(r*.8125),a=Math.round(r*.875),o=n.measurer??S(n.fontFamily),s=n.padding??8,c=n.icons,l=t.cynefin?.showDomainDescriptions!==!1,u=B(t,`boundaryAmplitude`,8,0,50),d=re(B(t,`seed`,0,-0x38d7ea4c68000,0x38d7ea4c68000),n.idPrefix??`pele`),f=Math.round(a*1.5),p=(e,t)=>{let n=b(e,!1,o,a,se);return{text:e,label:n,w:n.width+2*ce,h:Math.max(n.height,f)+2*le,overflow:t}},m=t=>{let n=L.get(t),a=b(n[0],!1,o,r,4e3,1),s=[];if(l)for(let e of[n[1],n[2]])e&&s.push(b(e,!1,o,i,4e3,2));let c=e.domains.get(t)?.items??[],u=t===`confusion`&&c.length>oe?oe:c.length,d=[];for(let e=0;e<u;e++)d.push(p(c[e].label,!1));u<c.length&&d.push(p(`+${c.length-u} more`,!0));let f=a.width,m=a.height;for(let e of s)f=Math.max(f,e.width),m+=e.height;d.length>0&&(m+=ue-R);for(let e of d)f=Math.max(f,e.w),m+=R+e.h;return{name:t,title:a,subtitles:s,badges:d,w:f,h:m,cx:0,cy:0}},h=I.map(([e])=>m(e)),C=m(`confusion`),w=Math.max(88,C.w*.71+8),T=Math.max(64,C.h*.71+6),E=B(t,`width`,640,100,1e4)/2,D=B(t,`height`,440,100,1e4)/2;for(let e of h)E=Math.max(E,e.w+2*de),D=Math.max(D,e.h+2*de);for(let e of h){let t=(E-e.w)/2,n=(D-e.h)/2;if((t/(w+z))**2+(n/(T+z))**2>=1)continue;let r=e.w+2*(w+z),i=e.h+2*(T+z);r*D<=E*i?E=Math.max(E,r):D=Math.max(D,i)}let O=b(e.title,!1,o,r,4e3,1),V=O.height>0?O.height+12:0,H=2*E,fe=2*D,U=s,W=s+V,G=U+E,K=W+D,q=U+H,pe=W+fe,J=A(W,K,G,d,u,{...ie,segments:4,pinEnd:!0}),Y=A(U,G,K,d+100,u,{...k,segments:4,pinEnd:!0}),X=A(G,q,K,d+200,u,{...k,segments:4,pinStart:!0}),Z=j(G,K,pe,H*.03),Q=(e,t)=>t?`${_(e[e.length-2])},${_(e[e.length-1])}`:`${_(e[0])},${_(e[1])}`,me=new Map([[`complex`,`M${_(U)},${_(W)}L${Q(J,!1)}${M(J)}${N(Y)}Z`],[`complicated`,`M${Q(J,!1)}L${_(q)},${_(W)}L${Q(X,!0)}${N(X)}${N(J)}Z`],[`chaotic`,`M${Q(Y,!1)}${M(Y)}${M(Z)}L${_(U)},${_(pe)}Z`],[`clear`,`M${Q(X,!1)}${M(X)}L${_(q)},${_(pe)}L${Q(Z,!0)}${N(Z)}Z`]]),he=``;for(let[e,,,t]of I)he+=`<path class="pele-cynefin-region" data-id="${e}" d="${me.get(e)}" fill="${g(t)}" fill-opacity="0.14"/>`;let ge=`<g class="pele-cynefin-boundaries" fill="none" stroke="var(--_b)" stroke-dasharray="6 3"><path d="${P(J)}"/><path d="${P(Y)}"/><path d="${P(X)}"/><path class="pele-cynefin-cliff" d="${P(Z)}" stroke="var(--_l)" stroke-width="2" stroke-dasharray="none" stroke-linecap="round"/></g>`,_e=F(G,K,w,T),ve=`<path d="${_e}" fill="var(--_bg)"/><path class="pele-cynefin-region" data-id="confusion" d="${_e}" fill="${g(ae)}" fill-opacity="0.18" stroke="var(--_b)" stroke-dasharray="4 2"/>`,ye=e=>{let t=e.cy-e.h/2,n=x(e.title,e.cx,t+e.title.height/2,` class="pele-label" font-weight="var(--_hw)"`);t+=e.title.height;for(let r of e.subtitles)n+=x(r,e.cx,t+r.height/2,` class="pele-cynefin-subtitle" font-size="${i}" font-style="italic" fill="var(--_m)"`),t+=r.height;t+=ue-R;for(let r of e.badges)t+=R,n+=`<g class="pele-node${r.overflow?` pele-cynefin-overflow`:``}"${r.overflow?``:` data-id="${y(r.text)}"`}><rect x="${_(e.cx-r.w/2)}" y="${_(t)}" width="${_(r.w)}" height="${_(r.h)}" fill="var(--_bg)" stroke="var(--_b)"${r.overflow?` stroke-dasharray="3 2"`:``}${ee}/>`+x(r.label,e.cx,t+r.h/2,` class="pele-label" font-size="${a}"${r.overflow?` fill="var(--_m)"`:``}`,c)+`</g>`,t+=r.h;return`<g class="pele-cynefin-domain" data-id="${e.name}">${n}</g>`},$=new Map,be=``;I.forEach(([e,t,n],r)=>{let i=h[r];i.cx=U+E*(t+.5),i.cy=W+D*(n+.5),$.set(e,i),be+=ye(i)}),C.cx=G,C.cy=K,$.set(`confusion`,C),be+=ye(C);let xe=(e,t,n)=>e===C?((t-G)/(w+4))**2+((n-K)/(T+4))**2<=1:Math.abs(t-e.cx)<=e.w/2+8&&Math.abs(n-e.cy)<=e.h/2+8,Se=``,Ce=new Map;for(let t of e.transitions){let e=$.get(t.from),n=$.get(t.to);if(!e||!n||e===n)continue;let r=t.from<t.to?`${t.from} ${t.to}`:`${t.to} ${t.from}`,a=Ce.get(r)??0;Ce.set(r,a+1);let s=n.cx-e.cx,l=n.cy-e.cy,u=Math.hypot(s,l)||1,d=(e.cx+n.cx)/2,f=(e.cy+n.cy)/2,p=-l*(d-G)+s*(f-K)>=0?1:-1,m=-l/u*p,h=s/u*p,g=(e!==C&&n!==C&&Math.abs(s)>1&&Math.abs(l)>1?2*(Math.hypot(w*m,T*h)+16):u*.15)+a*56,v=d+m*g,ee=f+h*g,y=t=>{let r=1-t;return[r*r*e.cx+2*r*t*v+t*t*n.cx,r*r*e.cy+2*r*t*ee+t*t*n.cy]},S=(e,t,n,r)=>{for(let i=0;i<16;i++){let i=(t+n)/2;xe(e,...y(i))===r?t=i:n=i}return(t+n)/2},E=1;for(;E<=48&&xe(e,...y(E/48));)E++;if(E>48)continue;let D=S(e,(E-1)/48,E/48,!0);for(;E<=48&&!xe(n,...y(E/48));)E++;let O=E>48?1:S(n,(E-1)/48,E/48,!1),[re,ie]=y(D),[k,A]=y(O),j=(e,t,n)=>(1-D)*(1-O)*e+((1-D)*O+D*(1-O))*t+D*O*n,M=j(e.cx,v,n.cx),N=j(e.cy,ee,n.cy),P=Math.hypot(k-M,A-N)||1,F=(k-M)/P,I=(A-N)/P,ae=ne(`arrow_point`,k,A,F,I,`var(--_l)`);k-=F*te(`arrow_point`),A-=I*te(`arrow_point`);let L=``;if(t.label){let e=b(t.label,!1,o,i,se),[n,r]=y((D+O)/2),a=Math.abs(m)*e.width/2+Math.abs(h)*e.height/2+6,s=e.width/2+4,l=Math.min(Math.max(n+m*a,U+s),Math.max(q-s,U+s));L=x(e,l,r+h*a,` class="pele-edge-label" font-size="${i}"`,c)}Se+=`<g class="pele-edge" data-id="${t.from}-${t.to}"><path d="M${_(re)},${_(ie)}Q${_(M)},${_(N)} ${_(k)},${_(A)}" fill="none" stroke="var(--_l)"/>`+ae+L+`</g>`}let we=Math.ceil(Math.max(H,O.width)+2*s),Te=Math.ceil(fe+V+2*s),Ee=x(O,U+H/2,s+O.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g class="pele-cynefin-regions">${he}</g>`+ge+ve+be+(Se?`<g class="pele-edges">${Se}</g>`:``);return{svg:v(`cynefin`,we,Te,r,n,e,Ee),width:we,height:Te,links:[]}}var H={type:`cynefin`,parse:(e,t,n)=>w(E(e),n),render:V};export{H as cynefin};
|
|
3
|
-
//# sourceMappingURL=2NI2N5EU-
|
|
3
|
+
//# sourceMappingURL=2NI2N5EU-Cc9Gs6p1.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{f as e,g as t,m as n,r,s as i,t as a}from"./77XECAW3-
|
|
1
|
+
import{f as e,g as t,m as n,r,s as i,t as a}from"./77XECAW3-SIARa2Fi.js";import{s as o}from"./N3JZAHOW-BXwh9_vP.js";import{r as s}from"./5B3SVYGG-CPRAqyzZ.js";import{r as c,t as l}from"./DKTLEL5E-DciMwFJ1.js";import{_ as u,i as d,r as f,u as p}from"./lazy-B292152Q.js";var m=class{type=`ishikawa`;title;root;stack=[];baseLevel;addNode(e,t){let n={text:t,children:[]};if(!this.root){this.root=n,this.stack=[{level:0,node:n}];return}this.baseLevel??=e;let r=Math.max(e-this.baseLevel+1,1),i=this.stack;for(;i.length>1&&i[i.length-1].level>=r;)i.pop();i[i.length-1].node.children.push(n),i.push({level:r,node:n})}},h=[`$end`,`EOF`,`SPACELINE`,`NL`,`ISHIKAWA`,`SPACELIST`,`TEXT`];function g(e,t){let n=0;for(;n<13;){let r=e.charCodeAt(t+n),i=`ishikawa-beta`.charCodeAt(n);if(r!==i&&(r+32!==i||r<65||r>90))break;n++}return n===13&&!d(e.charCodeAt(t+13))?13:n>=8&&!d(e.charCodeAt(t+8))?8:0}function _(e){let t=[],n=[],r=[],i=e.length,a=0;for(;a<i;){let o=a,s=-1;for(;o<i&&f(e.charCodeAt(o));)e.charCodeAt(o)===10&&(s=o),o++;let c,l;if(e.charCodeAt(o)===37&&e.charCodeAt(o+1)===37)for(c=2,l=o+2;l<i;){let t=e.charCodeAt(l);if(t===10||t===13||t===8232||t===8233)break;l++}else if(o===a){let t=g(e,a);t>0?(c=4,l=a+t):(c=6,l=e.indexOf(`
|
|
2
2
|
`,a),l===-1&&(l=i))}else s>a?(c=2,l=s+1):s===a?(c=3,l=a+1):(c=5,l=o);t.push(c),n.push(a),r.push(l),a=l}return t.push(1,0),n.push(i,i),r.push(i,i),{types:t,starts:n,ends:r}}var v=`'SPACELINE', 'NL', 'EOF'`;function y(e,t){let{types:n,starts:r,ends:i}=_(e),a=0,o=t=>{throw p(`ishikawa`,e,r[a],`Expecting ${t}, got '${h[n[a]]}'`)};if(n[a]===2){for(a++;n[a]===2||n[a]===3;)a++;n[a]!==4&&o(`'SPACELINE', 'NL', 'ISHIKAWA'`)}else n[a]!==4&&o(`'SPACELINE', 'ISHIKAWA'`);for(a++,n[a]===3&&a++;;){let s=n[a];if(s===6||s===5&&n[a+1]===6){let c=s===6?a:a+1;a=c+1,n[a]!==2&&n[a]!==3&&n[a]!==1&&o(v),t.addNode(s===6?0:i[c-1]-r[c-1],e.slice(r[c],i[c]).trim())}else s===2||s===5?(a++,n[a]!==2&&n[a]!==3&&n[a]!==1&&o(s===5?`${v}, 'TEXT'`:v)):o(`'SPACELINE', 'SPACELIST', 'TEXT'`);for(a++;n[a]===3||n[a]===1;)a++;if(n[a]===0)return}}var b=.5,x=Math.hypot(b,1),S=14,C=6,w=8,T=22,E=18,D=5,O=26,k=34,A=28,j=10,M=5;function N(e,t,n,r,a){let o=i(e.text,!1,n,r,180),s=Math.round(a*1.5),c=[],l=[],u=[],d=(e,n,r)=>{let i=e.length;for(let a=i-1;a>=0;a--)u.push({node:e[t?i-1-a:a],depth:n,parent:r,slot:a,bone:-1})};for(d(e.children,2,-1);u.length>0;){let e=u.pop();if(e.bone!==-1){l.push(e.bone);continue}let t=c.length;c.push({label:i(e.node.text,!1,n,a,200),depth:e.depth,parent:e.parent,slot:e.slot,kids:e.node.children.length,rise:0,at:0,textEnd:0}),e.depth%2==0?l.push(t):(e.bone=t,u.push(e)),d(e.node.children,e.depth+1,t)}let f=S;for(let e of l){let t=Math.max(c[e].label.height,s)+C;c[e].rise=f+t/2,f+=t}let p=o.width+2*j,m=p/2;for(let e of c){let t=e.parent===-1?void 0:c[e.parent];e.depth%2==0?(e.at=t?t.at:0,e.textEnd=e.at-(e.kids>0?(e.kids+1)*T:E)-D):(e.at=t.at-(t.kids-e.slot)*T,e.textEnd=e.at-D),m=Math.max(m,e.label.width-e.textEnd)}return{node:e,label:o,boxW:p,boxH:o.height+2*M,bones:c,rise:f+w,reach:m}}function P(e,t,n){return l(n,r=>F(e,t,n,r))}function F(s,c,l,d){let f=l.fontSize??16,p=Math.round(f*.875),m=l.measurer??u(l.fontFamily),h=l.padding??8;if(d)return I(s,l);let g=s.root,_=i(s.title,!1,m,f,4e3,1),v=_.height>0?_.height+12:0,y=``,S=0,C=0,w=0,T=0;if(g){let t=i(g.text,!1,m,f,200,1),s=Math.max(t.height+24,48),c=t.width+24+s/2,l=g.children.map((e,t)=>N(e,t%2==0,m,f,p));for(let e of l)e.rise=Math.max(e.rise,s/2+14);let u=[],d=-k;for(let e=0;e<l.length;e+=2){if(e>0){let t=0;for(let n=0;n<2;n++){let r=l[e-2+n],i=l[e+n];r&&(t=Math.max(t,r.reach+(i?i.boxW/2:0)))}d-=t+O}u.push(d,d)}let h=l.length>0?d-A:-k;C=c,S=h,w=-s/2,T=s/2;let _=``;l.forEach((t,i)=>{let s=i%2==0?-1:1,c=u[i],l=(e,t)=>c+e-t*b,d=l(0,t.rise),f=s*t.rise,m=`M${e(c-b/x*7)},${e(s*7/x)}L${e(d)},${e(f)}`,h=``;for(let n of t.bones){let r=s*n.rise;if(n.depth%2==0)m+=`M${e(l(n.at,n.rise))},${e(r)}H${e(l(n.textEnd+D,n.rise))}`;else{let i=t.bones[n.parent].rise;m+=`M${e(l(n.at,i))},${e(s*i)}L${e(l(n.at,n.rise))},${e(r)}`}let i=l(n.textEnd,n.rise);h+=a(n.label,i-n.label.width/2,r,n.depth>2?` fill="var(--_m)"`:``),S=Math.min(S,i-n.label.width)}let g=f+s*(t.boxH/2);S=Math.min(S,d-t.boxW/2),C=Math.max(C,d+t.boxW/2),w=Math.min(w,g-t.boxH/2),T=Math.max(T,g+t.boxH/2),_+=`<g class="pele-ishikawa-category" data-id="${r(t.node.text)}"><path class="pele-ishikawa-bones" d="${m}" fill="none" stroke="var(--_l)"/>`+o(`arrow_point`,c,0,b/x,-s/x,`var(--_l)`)+`<rect x="${e(d-t.boxW/2)}" y="${e(g-t.boxH/2)}" width="${e(t.boxW)}" height="${e(t.boxH)}" fill="var(--_s)" stroke="var(--_b)"${n}/>`+a(t.label,d,g,` class="pele-label"`)+(h?`<g class="pele-ishikawa-causes" font-size="${p}">${h}</g>`:``)+`</g>`});let v=s/2;y=`<path class="pele-ishikawa-spine" d="M${e(h)},0H${e(-7)}" fill="none" stroke="var(--_l)"/>`+o(`arrow_point`,0,0,1,0,`var(--_l)`)+_+`<g class="pele-ishikawa-head" data-id="${r(g.text)}"><path d="M0,${e(-v)}H${e(c-v)}A${e(v)},${e(v)} 0 0 1 ${e(c-v)},${e(v)}H0Z" fill="var(--_s)" stroke="var(--_b)" stroke-linejoin="round"/>`+a(t,12+t.width/2,0,` class="pele-label" font-weight="var(--_hw)"`)+`</g>`}let E=Math.max(C-S,_.width),j=Math.ceil(E+2*h),M=Math.ceil(T-w+v+2*h),P=h+(E-(C-S))/2-S,F=h+v-w;return{svg:t(`ishikawa`,j,M,f,l,{},a(_,j/2,h+_.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(y?`<g transform="translate(${e(P)},${e(F)})">${y}</g>`:``)),width:j,height:M,links:[]}}function I(n,o){let l=o.fontSize??16,d=Math.round(l*.875),f=o.measurer??u(o.fontFamily),p=o.padding??8,m=Math.max(140,(o.maxWidth??320)-2*p),h=i(n.title,!1,f,l,c(o),1),g=[],_=n.root?[{node:n.root,depth:0,parent:-1}]:[],v=0;for(;_.length;){let e=_.pop(),t=g.length;g.push({...e,x:0,y:0,w:0,h:0}),v=Math.max(v,e.depth);for(let n=e.node.children.length-1;n>=0;n--)_.push({node:e.node.children[n],depth:e.depth+1,parent:t})}let y=Math.min(20,Math.max(2,(m-120)/Math.max(1,v))),b=p+(h.height?h.height+12:0),x=h.width,S=``,C=``;for(let t of g){t.x=p+t.depth*y;let n=Math.max(60,m-t.depth*y-20);t.label=s(i(t.node.text,!1,f,t.depth<2?l:d,n,+(t.depth<2)),f,n),t.w=t.label.width+20,t.h=t.label.height+12,t.y=b,b+=t.h+12,x=Math.max(x,t.x-p+t.w);let o=t.depth<2;if(S+=`<g class="pele-node ${t.depth===0?`pele-ishikawa-head`:t.depth===1?`pele-ishikawa-category`:`pele-ishikawa-cause`}" data-id="${r(t.node.text)}">`+(o?`<rect x="${e(t.x)}" y="${e(t.y)}" width="${e(t.w)}" height="${e(t.h)}" rx="${t.depth===0?12:4}" fill="var(--_s)" stroke="var(--_b)"/>`:``)+a(t.label,t.x+t.w/2,t.y+t.h/2,` class="pele-label"${t.depth<2?` font-weight="var(--_hw)"`:``}${t.depth>1?` font-size="${d}"`:``}`)+`</g>`,t.parent>=0){let n=g[t.parent],r=n.x+y/2;C+=`<path class="pele-edge" d="M${e(r)},${e(n.y+n.h)}V${e(t.y+t.h/2)}H${e(t.x)}" fill="none" stroke="var(--_b)"/>`}}let w=Math.ceil(x+2*p),T=Math.ceil(Math.max(p+h.height,b-12)+p),E=a(h,w/2,p+h.height/2,` class="pele-title" font-weight="var(--_tw)"`)+C+S;return{svg:t(`ishikawa`,w,T,l,o,{},E),width:w,height:T,links:[]}}var L={type:`ishikawa`,parse(e,t,n){let r=new m;return r.title=n,y(e,r),r},render:P};export{L as ishikawa};
|
|
3
|
-
//# sourceMappingURL=4UO7MD6I
|
|
3
|
+
//# sourceMappingURL=4UO7MD6I--tXEX5R9.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,f as t,i as n,p as r,t as i,v as a,y as o}from"./77XECAW3-
|
|
1
|
+
import{a as e,f as t,i as n,p as r,t as i,v as a,y as o}from"./77XECAW3-SIARa2Fi.js";var s=/\s/;function c(e,t,n,r,i=0){let a=[];for(let o of e.split(`
|
|
2
2
|
`)){let e=Array.from(o);e.length===0&&a.push(``);let c=0;for(;c<e.length;){let o=a=>t.width(e.slice(c,c+a).join(``),n,i)<=r,l=1;for(;l<e.length-c&&o(l);)l=Math.min(e.length-c,l*2);let u=1;for(;u<l;){let e=Math.ceil((u+l)/2);o(e)?u=e:l=e-1}let d=u,f=c+d<e.length;if(f&&!s.test(e[c+d])){for(let t=d-1;t>0;t--)if(s.test(e[c+t])){d=t+1;break}}let p=e.slice(c,c+d).join(``);for(a.push(f&&p.trimEnd()||p),c+=d;f&&c<e.length&&s.test(e[c]);)c++}}e===``&&(a.length=0);let o=a.map(e=>t.width(e,n,i)),c=0;for(let e of o)c=Math.max(c,e);let l=Math.round(n*1.5);return{lines:a.map((e,t)=>[{text:e,style:i,width:o[t]}]),widths:o,width:c,height:a.length*l,size:n,lineHeight:l}}function l(e,t,r){if(e.width<=r)return e;let i=[],a=[];for(let n=0;n<e.lines.length;n++){if(e.widths[n]<=r){i.push(e.lines[n]),a.push(e.widths[n]);continue}let o=[],s=0,c=()=>{i.push(o),a.push(s),o=[],s=0};for(let i of e.lines[n]){if(i.icon!==void 0||i.math){o.length&&s+i.width>r&&c(),o.push(i),s+=i.width;continue}for(let n of Array.from(i.text)){let a=o[o.length-1],l=a&&a.icon===void 0&&a.math===void 0&&a.style===i.style,u=t.width(l?a.text+n:n,e.size,i.style)-(l?a.width:0);o.length&&s+u>r&&(c(),a=void 0,u=t.width(n,e.size,i.style)),a&&a.icon===void 0&&a.math===void 0&&a.style===i.style?(a.text+=n,a.width+=u):o.push({text:n,style:i.style,width:u}),s+=u}}(o.length||!e.lines[n].length)&&c()}let o=0;for(let e of a)o=Math.max(o,e);let s={...e,lines:i,widths:a,width:o,height:i.length*e.lineHeight};return e.heights?n(s):s}function u(n,s,c,l){let u=r(n),d=`<text`+a(l,u),f=``;for(let r=0;r<n.lines.length;r++){let a=n.lines[r],p=c+(r+.5)*n.lineHeight;if(a.some(e=>e.icon!==void 0)){let e=n.widths[r];f+=i({...n,lines:[a],widths:[e],width:e,height:n.lineHeight},s+e/2,p,l);continue}let m=``;for(let t of a){let n=e(t.style&~u);m+=n?`<tspan${n}>${o(t.text)}</tspan>`:o(t.text)}m!==``&&(f+=`${d} x="${t(s)}" y="${t(p+n.size*.35)}" text-anchor="start" xml:space="preserve">${m}</text>`)}return f}export{u as n,l as r,c as t};
|
|
3
|
-
//# sourceMappingURL=5B3SVYGG-
|
|
3
|
+
//# sourceMappingURL=5B3SVYGG-CPRAqyzZ.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{s as e}from"./77XECAW3-
|
|
1
|
+
import{s as e}from"./77XECAW3-SIARa2Fi.js";var t=/<(?!br\s*\/?>)/gi,n=/:fa-/g,r=/<br\s*\/?>|fl°°?\w+¶ß|&#?\w+;|[\ud800-\udbff][\udc00-\udfff]|[\s\S]/gi;function i(r,i,a,o,s=0){let c=r;return c!==void 0&&(c.includes(`<`)&&(c=c.replace(t,`<`)),c.includes(`:fa-`)&&(c=c.replace(n,`:fa-`))),e(c,!1,i,a,o,s)}function a(e,t,n,a,o=0){let s=i(e,t,n,a,o);if(e===void 0||s.width<=a)return s;let c=``,l=0;for(let i of e.match(r)??[]){if(i.trim()===``||i.length>2&&i[0]===`<`)l=0;else{let e=t.width(i.length>2?`x`:i,n,o);l>0&&l+e>a&&(c+=`
|
|
2
2
|
`,l=0),l+=e}c+=i}return i(c,t,n,a,o)}export{i as n,a as t};
|
|
3
|
-
//# sourceMappingURL=5GK6JWQ2-
|
|
3
|
+
//# sourceMappingURL=5GK6JWQ2-OC2-LRPx.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y as e}from"./77XECAW3-
|
|
2
|
-
//# sourceMappingURL=5N7A7DKN-
|
|
1
|
+
import{y as e}from"./77XECAW3-SIARa2Fi.js";import{m as t}from"./lazy-B292152Q.js";var n=`about:blank`,r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F -]/gim,s=/^.+(:|:)/gim,c=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;function l(e){try{return decodeURIComponent(e)}catch{return e}}function u(e){if(!e)return n;let t=l(e.trim()),u,d=0;do{if(++d>32)return n;t=t.replace(o,``).replace(i,(e,t)=>String.fromCharCode(t)).replace(a,``).replace(o,``).replace(c,``).trim(),t=l(t),u=t.match(o)||t.match(i)||t.match(a)||t.match(c)}while(u&&u.length>0);if(!t)return n;if(t[0]===`.`||t[0]===`/`)return t;let f=t.trimStart(),p=f.match(s);if(!p)return t;let m=p[0].toLowerCase().trim();if(r.test(m))return n;let h=f.replace(/\\/g,`/`);if(m===`mailto:`||m.includes(`://`))return h;if(m===`http:`||m===`https:`){let e;try{e=new URL(h)}catch{return n}return e.protocol=e.protocol.toLowerCase(),e.hostname=e.hostname.toLowerCase(),e.toString()}return h}function d(e){return u(t(e))}var f=[`http`,`https`,`mailto`,`tel`],p=[`http`,`https`],m=/^([a-z][a-z0-9+.-]*):/i,h=/^[\\/]{2}/;function g(e,t){if(h.test(e))return;let n=m.exec(e);return!n||t.includes(n[1].toLowerCase())?e:void 0}function _(e,t){return t.links===!1?void 0:g(e,t.linkSchemes??f)}function v(e,t){return t.images===!1?void 0:g(e,t.imageSchemes??p)}function y(t,n,r,i,a,o=``){let s=_(n,a);return s===void 0?t:(i.push({id:r,href:s,internal:!1}),`<a href="${e(s)}"${o}${b(a)}>${t}</a>`)}function b(t){let n=t.linkRel??`noopener`;return n?` rel="${e(n)}"`:``}export{y as a,_ as i,v as n,b as o,u as r,d as t};
|
|
2
|
+
//# sourceMappingURL=5N7A7DKN-BUa1-OZ6.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,f as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,v as m,y as h}from"./77XECAW3-
|
|
1
|
+
import{_ as e,a as t,b as n,f as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,v as m,y as h}from"./77XECAW3-SIARa2Fi.js";import{i as g,l as _}from"./N3JZAHOW-BXwh9_vP.js";import{a as v,t as y}from"./DKTLEL5E-DciMwFJ1.js";import{t as b}from"./G3MDBVQH-BZmnMkFw.js";import{n as x,r as S}from"./74OO7NKP-u02yiNi7.js";import{i as C,n as w,r as T,t as E}from"./NUIALGQ3-ClxnUm8B.js";import{t as ee}from"./TSHNXIZL-icuUBQJZ.js";import{i as te,o as ne,r as re}from"./5N7A7DKN-BUa1-OZ6.js";import{_ as ie,i as D,m as ae,r as O,s as k,u as A}from"./lazy-B292152Q.js";function j(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}var oe=class{type=`er`;direction=`TB`;entities=new Map;relationships=[];classes=new Map;subgraphs=[];title;accTitle;accDescr;subgraphLookup=new Map;claimed=new Set;addEntity(e,t=``){let n=this.entities.get(e);return n===void 0?(n={id:`entity-${e}-${this.entities.size}`,label:e,alias:t,attributes:[],cssClasses:`default`,cssStyles:[]},this.entities.set(e,n)):!n.alias&&t&&(n.alias=t),n}addAttributes(e,t){let n=this.addEntity(e);for(let e=t.length-1;e>=0;e--){let r=t[e];r.keys??=[],r.comment??=``,n.attributes.push(r)}}addRelationship(e,t,n,r){let i=this.subgraphLookup.has(e)?e:this.addEntity(e).id,a=this.subgraphLookup.has(n)?n:this.addEntity(n).id;this.relationships.push({entityA:i,roleA:t,entityB:a,relSpec:r})}setDirection(e){this.direction=e}addCssStyles(e,t){if(t)for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssStyles.push(n);let r=this.subgraphLookup.get(n);if(r)for(let e of t)r.cssStyles.push(e)}}addClass(e,t){for(let n of e){let e=this.classes.get(n);if(e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t)for(let n of t)n.includes(`color`)&&e.textStyles.push(n.replace(`fill`,`bgFill`)),e.styles.push(n)}}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n;let r=this.subgraphLookup.get(n);if(r)for(let e of t)r.classes.push(e)}}addSubGraph(e,t,n){let r=e.text.trim(),i=new Set,a=[],o;for(let e of t.flat()){if(typeof e!=`string`){e?.stmt===`dir`&&(o=e.value);continue}let t=e.trim();t===``||i.has(t)||(i.add(t),this.claimed.has(e)||a.push(e))}for(let e of a)this.claimed.add(e);let s={id:r,nodes:a,title:(n.text||``).trim(),classes:[],cssStyles:[],dir:o,labelType:j(n.type)};return this.subgraphs.push(s),this.subgraphLookup.set(r,s),r}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}},M=`$end.INVALID.ER_DIAGRAM.EOF.NEWLINE.COLON.STYLE_SEPARATOR.BLOCK_START.BLOCK_STOP.SQS.SQE.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.END.SUBGRAPH.direction_tb.direction_bt.direction_rl.direction_lr.CLASSDEF.UNICODE_TEXT.STYLE_TEXT.COMMA.CLASS.STYLE.SEMI.NUM.BRKT.ENTITY_NAME.DECIMAL_NUM.ENTITY_ONE.ATTRIBUTE_WORD.ATTRIBUTE_KEY.COMMENT.ZERO_OR_ONE.ZERO_OR_MORE.ONE_OR_MORE.ONLY_ONE.MD_PARENT.NON_IDENTIFYING.IDENTIFYING.WORD.CHAR`.split(`.`),N=1,P=2,F=4,I=8,L=new Uint8Array(128);for(let e=0;e<128;e++){let t=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95,n=t&&(e<48||e>57);t&&(L[e]|=N|P|I),n&&(L[e]|=F)}for(let e of`-*`)L[e.charCodeAt(0)]|=N|P|I;L[46]|=N|I,L[42]|=F;for(let e of`[](),`)L[e.charCodeAt(0)]|=I;var R=/accTitle\s*:\s*/iy,z=/accDescr\s*:\s*/iy,B=/accDescr\s*\{\s*/iy,se=[/.*direction\s+TB[^\n]*/iy,/.*direction\s+BT[^\n]*/iy,/.*direction\s+RL[^\n]*/iy,/.*direction\s+LR[^\n]*/iy],V=/direction/gi,H=/[\n\r\u2028\u2029]/g;function U(e,t){return e<128?(L[e]&t)!==0:e>=192||e===181}function W(e){let t=e.length,n=[],r=[],i=[],a=0,o=0,s=-2,c=0,l=-1,u=-2,d=-1,f=-1,p=-1,m=(t,a,s)=>{n.push(t),r.push(e.slice(a,s)),i.push(a),o=s},h=(t,n)=>(t.lastIndex=n,t.test(e)?t.lastIndex:-1),g=t=>{for(let n=0;n<t.length;n++){let r=t.charCodeAt(n),i=e.charCodeAt(o+n);if(i!==r&&(r<97||r>122||(i|32)!==r))return!1}return!0},_=t=>g(t)&&!D(e.charCodeAt(o+t.length)),v=t=>{let n=e.charCodeAt(t);return n>=65&&n<=90?n+32:n},y=n=>(H.lastIndex=n,H.test(e)?H.lastIndex-1:t),b=t=>{for(;k(e.charCodeAt(t));)t++;return t},x=()=>{if(s===-1||s<o&&(V.lastIndex=o,s=V.test(e)?V.lastIndex-9:-1,s===-1)||o<c||(l<o&&(l=y(o)),s>=l))return!1;for(let e=0;e<4;e++){let t=h(se[e],o);if(t>=0)return m(18+e,o,t),!0}return c=l,!1},S=()=>{let t=e.indexOf(`"`,o+1);if(t===-1){m(45,o,o+1);return}let n=t>o+1;for(let r=o+1;n&&r<t;r++){let t=e.charCodeAt(r);(t===37||t===92||t===13||t===10||t===11||t===8)&&(n=!1)}m(n?31:44,o,t+1)},C=t=>{let n=e.charCodeAt(o+1);if(n===43&&(t===49||t===48)){m(t===49?39:38,o,o+2);return}let r=b(o+1);if(e.charCodeAt(r)===46&&k(e.charCodeAt(r+1))){m(32,o,b(r+2));return}if(t===49){if(O(n)){let t=o+2;for(;O(e.charCodeAt(t));)t++;let n=e.charCodeAt(t);if(D(n)||n===34||n===39){m(40,o,o+1);return}}else if(n===45||n===46){let t=e.charCodeAt(o+2);if(t===45||t===46){m(40,o,o+1);return}}if(!D(n)){m(33,o,o+1);return}}m(29,o,r)},w=t=>{let n=e.charCodeAt(o+1);switch(t){case 101:if(_(`erdiagram`))m(2,o,o+9);else if(_(`end`)){let t=o+3;for(;O(e.charCodeAt(t));)t++;m(16,o,t)}else return!1;return!0;case 115:if(_(`style`))a=6,m(27,o,o+5);else if(_(`subgraph`))m(17,o,o+8);else return!1;return!0;case 99:if(_(`classdef`))a=6,m(22,o,o+8);else if(_(`class`))m(26,o,o+5);else return!1;return!0;case 111:if(_(`one or zero`))m(37,o,o+11);else if(_(`one or more`)||_(`one or many`))m(39,o,o+11);else if(_(`one`))m(40,o,o+3);else if(_(`only one`))m(40,o,o+8);else if(n===124)m(37,o,o+2);else if(n===123)m(38,o,o+2);else if(_(`optionally to`))m(42,o,o+13);else return!1;return!0;case 122:if(_(`zero or one`))m(37,o,o+11);else if(_(`zero or more`)||_(`zero or many`))m(38,o,o+12);else return!1;return!0;case 109:if(g(`many(0)`))m(38,o,o+7);else if(g(`many(1)`))m(39,o,o+7);else if(_(`many`))m(38,o,o+4);else return!1;return!0;case 116:return _(`to`)?(m(43,o,o+2),!0):!1;case 117:return n!==46&&n!==45&&n!==124?!1:(m(41,o,o+1),!0);case 124:if(v(o+1)===111&&!D(e.charCodeAt(o+2)))m(37,o,o+2);else if(n===124)m(40,o,o+2);else if(n===123)m(39,o,o+2);else return!1;return!0;case 125:if(v(o+1)===111&&!D(e.charCodeAt(o+2)))m(38,o,o+2);else if(n===124)m(39,o,o+2);else return!1;return!0;case 46:return n!==46&&n!==45?!1:(m(42,o,o+2),!0);case 45:if(n===45)m(43,o,o+2);else if(n===46)m(42,o,o+2);else return!1;return!0}return!1},T=t=>{let n;if((t===97||t===65)&&g(`acc`)){if((n=h(R,o))>=0){a=3,m(11,o,n);return}if((n=h(z,o))>=0){a=4,m(13,o,n);return}if((n=h(B,o))>=0){a=5,o=n;return}}if(!x()){switch(t){case 32:case 9:case 13:n=o+1;for(let t=e.charCodeAt(n);t===32||t===9||t===13;t=e.charCodeAt(n))n++;o=n;return;case 10:for(n=o+1;e.charCodeAt(n)===10;)n++;m(4,o,n);return;case 34:S();return;case 123:a=1,m(7,o,o+1);return;case 35:m(30,o,o+1);return;case 44:m(25,o,o+1);return;case 58:e.charCodeAt(o+1)===58&&e.charCodeAt(o+2)===58?m(6,o,o+3):m(5,o,o+1);return;case 91:m(9,o,o+1);return;case 93:m(10,o,o+1);return}if(k(t)){C(t);return}if(!w(t>=65&&t<=90?t+32:t)){if(t>=128||(L[t]&N)!==0){n=o+1;for(let t=e.charCodeAt(n);t>=128||(L[t]&N)!==0;t=e.charCodeAt(n))n++;m(23,o,n);return}m(45,o,o+1)}}},E=()=>{if(u===-1||u<o&&(u=e.indexOf(`~`,o),u===-1))return!1;if(p<o){let n=o;for(;n<t&&!O(e.charCodeAt(n));)n++;p=n}if(u>=p||(d<o&&(d=y(o),f=e.lastIndexOf(`~`,d-1)),f<=u))return!1;let n=f+1;for(;n<t&&!O(e.charCodeAt(n));)n++;return m(34,o,n),!0},ee=n=>{if(O(n)){for(o++;O(e.charCodeAt(o));)o++;return}let r=n|32;if((r===112||r===102||r===117)&&(e.charCodeAt(o+1)|32)==107&&!D(e.charCodeAt(o+2))){m(35,o,o+2);return}if(!E()){if(U(n,F)){let n=o+1;for(;n<t&&U(e.charCodeAt(n),I);)n++;m(34,o,n);return}if(n===96){a=2,o++;return}if(n===34){let t=e.indexOf(`"`,o+1);if(t!==-1){m(36,o,t+1);return}}else if(n===125){a=0,m(8,o,o+1);return}m(45,o,o+1)}};for(;o<t;){let s=e.charCodeAt(o),c;switch(a){case 0:T(s);break;case 1:ee(s);break;case 2:s===96?(a=1,o++):(c=e.indexOf("`",o),m(34,o,c===-1?t:c));break;case 3:case 4:c=e.indexOf(`
|
|
3
3
|
`,o),m(a===3?12:14,o,c===-1?t:c),a=0;break;case 5:s===125?(a=0,o++):(c=e.indexOf(`}`,o),m(15,o,c===-1?t:c));break;case 6:if(s===10){for(c=o+1;e.charCodeAt(c)===10;)c++;a=0,m(4,o,c)}else if(O(s))for(o++;O(e.charCodeAt(o));)o++;else if(s===58)m(5,o,o+1);else if(s===44)m(25,o,o+1);else if(s===35)m(30,o,o+1);else if(s===59)m(28,o,o+1);else if(s>=128||(L[s]&P)!==0){c=o+1;for(let t=e.charCodeAt(c);t>=128||(L[t]&P)!==0;t=e.charCodeAt(c))c++;m(24,o,c)}else return n.push(1),r.push(``),i.push(o),{types:n,texts:r,starts:i}}}let te=a===0?3:a===3?12:a===4?14:a===5?15:-1;return te!==-1&&(n.push(te),r.push(``),i.push(t)),n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var G=new Map([[37,`ZERO_OR_ONE`],[38,`ZERO_OR_MORE`],[39,`ONE_OR_MORE`],[40,`ONLY_ONE`],[41,`MD_PARENT`]]),ce=[`TB`,`BT`,`RL`,`LR`],K=`'UNICODE_TEXT', 'NUM', 'ENTITY_NAME', 'DECIMAL_NUM', 'ENTITY_ONE'`,le=`'ZERO_OR_ONE', 'ZERO_OR_MORE', 'ONE_OR_MORE', 'ONLY_ONE', 'MD_PARENT'`,q=`'EOF', 'NEWLINE', 'title', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'SUBGRAPH', 'direction_tb', 'direction_bt', 'direction_rl', 'direction_lr', 'CLASSDEF', 'CLASS', 'STYLE', `+K;function J(e,t){let{types:n,texts:r,starts:i}=W(e),a=0,o=t=>{let o=n[a];throw o===1?A(`er`,e,i[a],``,!0):A(`er`,e,i[a],`Expecting ${t}, got '${o===45?r[a]:M[o]}'`)},s=e=>(n[a]!==e&&o(`'${M[e]}'`),r[a++]),c=()=>{let e=n[a];e!==4&&e!==28&&e!==3&&o(`'EOF', 'NEWLINE', 'SEMI'`),a++},l=e=>e===23||e===31||e===29||e===32||e===33,u=()=>{let e=n[a];l(e)||o(K);let t=r[a++];return e===31?t.slice(1,-1):t},d=()=>{let e=[];for(;;){let t=n[a];if(t!==23&&t!==24&&o(`'UNICODE_TEXT', 'STYLE_TEXT'`),e.push(r[a++]),n[a]!==25)return e;a++}},f=e=>e===24||e===29||e===5||e===30,p=()=>{let e=[];for(;;){f(n[a])||o(`'STYLE_TEXT', 'COLON', 'NUM', 'BRKT'`);let t=r[a++];for(;f(n[a]);)t+=r[a++];if(e.push(t),n[a]!==25)return e;a++}},m=()=>{let e=G.get(n[a++]),t=n[a];t!==43&&t!==42&&o(`'NON_IDENTIFYING', 'IDENTIFYING'`);let r=t===43?`IDENTIFYING`:`NON_IDENTIFYING`;a++;let i=G.get(n[a]);return i===void 0?o(le):(a++,{cardA:i,relType:r,cardB:e})},h=()=>{let e=n[a];e!==44&&e!==31&&e!==23&&o(`'UNICODE_TEXT', 'ENTITY_NAME', 'WORD'`);let t=r[a++];return e===23?t:t.slice(1,-1)},g=e=>n[a]===45&&r[a]===e,_=()=>{let e=[];do{let t=s(34);g(`?`)&&(t+=r[a++]),n[a]!==34&&o(t.endsWith(`?`)?`'ATTRIBUTE_WORD'`:`'ATTRIBUTE_WORD', '?'`);let i={type:t,name:r[a++]};if(n[a]===35){let e=[r[a++]];for(;g(`,`);)a++,e.push(s(35));i.keys=e}n[a]===36&&(i.comment=r[a++].slice(1,-1)),e.push(i)}while(n[a]!==8);return e.reverse()},v=()=>{if(n[a]!==7)return;if(a++,n[a]===8){a++;return}let e=_();return a++,e},y=()=>{let e=u(),r=n[a];if(r===9){a++;let r=u();s(10);let i;n[a]===6&&(a++,i=d());let o=v();return t.addEntity(e,r),o&&t.addAttributes(e,o),i&&t.setClass([e],i),[e]}let i;if(r===6&&(a++,i=d(),r=n[a]),G.has(r)){let r=m(),o=u(),c;n[a]===6&&(a++,c=d()),s(5);let l=h();return t.addEntity(e),t.addEntity(o),t.addRelationship(e,l,o,r),i&&t.setClass([e],i),c&&t.setClass([o],c),[e,o]}let o=v();return t.addEntity(e),o&&t.addAttributes(e,o),i&&t.setClass([e],i),[e]};s(2);let b=[{id:``,title:``,list:[]}],x=b[0],S=!1;for(;;){let e=n[a];switch(e){case 4:a++;break;case 3:a++,S&&o(`'END', ${q}`);return;case 16:{S||o(q),a++;let e=t.addSubGraph({text:x.id},x.list,{text:x.title});b.pop(),x=b[b.length-1],S=b.length>1,S&&x.list.push(e);break}case 17:{a++;let e=u(),t=e;if(n[a]===9){for(a++,t=u();l(n[a]);)t+=` `+u();s(10)}c(),x={id:e,title:t,list:[]},b.push(x),S=!0;break}case 11:{a++;let e=s(12).trim();t.setAccTitle(e),S&&x.list.push(e);break}case 13:{a++;let e=s(14).trim();t.setAccDescription(e),S&&x.list.push(e);break}case 15:{let e=r[a++].trim();t.setAccDescription(e),S&&x.list.push(e);break}case 18:case 19:case 20:case 21:{a++;let n=ce[e-18];S?x.list.push({stmt:`dir`,value:n}):t.setDirection(n);break}case 22:{let e=r[a++],n=d(),i=p();c(),t.addClass(n,i),S&&x.list.push(e);break}case 26:{let e=r[a++],n=d();t.setClass(n,d()),S&&x.list.push(e);break}case 27:{let e=r[a++],n=d(),i=p();c(),t.addCssStyles(n,i),S&&x.list.push(e);break}default:{l(e)||o(S?`'END', ${q}`:q);let t=y();if(S)for(let e of t)x.list.push(e)}}}}var ue=[];function de(e){let t=[],n=[],r=e.subgraphs,i=t=>{let n=[];for(let r of t){let t=e.classes.get(r);if(t!==void 0){for(let e of t.styles)n.push(e.trim());for(let e of t.textStyles)n.push(e.trim())}}return n},a=new Map,o=new Set;for(let e=r.length-1;e>=0;e--){let t=r[e];o.add(t.id);for(let e of t.nodes)a.set(e,t.id)}for(let e=r.length-1;e>=0;e--){let n=r[e];t.push({id:n.id,label:n.title,alias:``,attributes:ue,isGroup:!0,parentId:a.get(n.id),cssStyles:n.cssStyles,cssCompiledStyles:i(n.classes),cssClasses:n.classes.join(` `),dir:n.dir,labelType:n.labelType})}let s=new Map;for(let[n,r]of e.entities){if(o.has(n)){s.set(r.id,n);continue}t.push({id:r.id,label:r.label,alias:r.alias,attributes:r.attributes,isGroup:!1,parentId:a.get(n),cssStyles:r.cssStyles,cssCompiledStyles:i(r.cssClasses.split(` `)),cssClasses:r.cssClasses,dir:void 0,labelType:`markdown`})}return e.relationships.forEach((e,t)=>{n.push({id:`id_${e.entityA}_${e.entityB}_${t}`,start:s.get(e.entityA)??e.entityA,end:s.get(e.entityB)??e.entityB,label:e.roleA,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType===`IDENTIFYING`?`solid`:`dashed`})}),{nodes:t,edges:n}}var Y=18,fe=5,pe=6,me=10,he=3.5;function X(e,t,n,i,a){let o=(e,o)=>r(t-i*e-a*o)+`,`+r(n-a*e+i*o),s=e=>`M${o(e,-fe)}L${o(e,fe)}`,c=`M${o(0,-pe)}L${o(me,0)}L${o(0,pe)}`,l=e=>`<circle class="pele-marker" cx="${r(t-i*e)}" cy="${r(n-a*e)}" r="${he}" fill="var(--_bg)"/>`,u=e=>`<path class="pele-marker" d="${e}"/>`;switch(e){case`only_one`:return u(s(6)+s(10));case`zero_or_one`:return u(s(6))+l(13.5);case`one_or_more`:return u(c+s(me+3.5));case`zero_or_more`:return u(c)+l(me+he+.5);case`md_parent`:return`<path class="pele-marker" d="M${o(0,0)}L${o(6,4)}L${o(12,0)}L${o(6,-4)}Z" fill="var(--_bg)"/>`}return``}var ge=48,_e=20,ve=64,Z=20,Q=28,ye=38,be=96,xe=18,Se=12,Ce=9,we=12,Te=16,Ee=9,De=260,Oe=1e6,ke=[],Ae=18,je=14,Me=` fill="var(--_s)" stroke="var(--_b)"`;function Ne(e,t,n){let r=e.er?.[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}function $(e,i,o,s,l){let f=e.lines;if(f.length===0)return``;let g=f.length===1&&f[0].length===1?f[0][0]:void 0;if(g&&g.icon===void 0&&g.math===void 0&&g.style===0)return`<text${s} x="${r(i)}" y="${r(o)}">${h(g.text)}</text>`;let _=u(e),v=e.size*.35,y=o-v-e.lineHeight/2,b=``,x=``;for(let u=0;u<f.length;u++){let m=f[u],g=y+a(e,u);if(n(m)){x+=p(c(e,u),i+e.widths[u]/2,g,s,l);continue}o=g+v;let S=!1;for(let e of m)e.icon!==void 0&&(S=!0);let C=i,w=!1;for(let n of m){if(n.icon!==void 0){let t=e.size*1.1;x+=`<svg class="pele-icon" data-icon="${d(n.icon)}" x="${r(C)}" y="${r(o-e.size*.35-t/2)}" width="${r(t)}" height="${r(t)}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${l?.(n.icon)??``}</svg>`}else if(n.text!==``){let e=S||!w?` x="${r(C)}" y="${r(o)}"`:``;b+=`<tspan${e}${t(n.style&~_)}>${h(n.text)}</tspan>`,w=!0}C+=n.width}}return`<text${m(s,_)} xml:space="preserve">${b}</text>${x}`}function Pe(e){let t=b(e);return t===e?e:t.replace(/</g,`<`).replace(/>/g,`>`)}function Fe(e,t,n){return v(e.direction)?y(n,r=>Ie(e,t,n,r)):Ie(e,t,n,!1)}function Ie(t,n,a,c){let u=de(t),m=a.fontSize??16,v=Math.round(m*.875),y=a.measurer??ie(a.fontFamily),b=a.padding??8,D=a.icons,O=new Map,k=[],A=[];u.nodes.forEach((e,t)=>O.set(e.id,t));let j=[],oe=[],M=[],N=new Map,P=[];for(let e of u.edges){let t=O.get(e.start),n=O.get(e.end);if(t===void 0||n===void 0)continue;let r=f(e.label,!0,y,v,200),i;if(t===n){i={label:r,band:0,at:0};let e=N.get(t);e?e.push(i):N.set(t,[i])}P.push(i),M.push(e),oe.push(r),j.push({src:t,dst:n,minlen:1,labelW:r.width>0?r.width+12:0,labelH:r.height>0?r.height+4:0,route:[],labelX:0,labelY:0})}let F=e=>{let n=e;for(let e=0;e<u.nodes.length;e++){let e=u.nodes[n].parentId,t=e===void 0?void 0:O.get(e);if(t===void 0)break;let r=u.nodes[t].dir;if(r)return r===`LR`||r===`RL`;n=t}return t.direction===`LR`||t.direction===`RL`};for(let e=0;e<u.nodes.length;e++){let t=u.nodes[e],n=o(t.cssStyles.length>0?t.cssCompiledStyles.concat(t.cssStyles):t.cssCompiledStyles),r=+!!n.bold|(n.italic?2:0),i=n.fontSize??m,a=n.fontSize??v,s=n.fontSize??Math.round(m*.75),c=t.isGroup?f(t.label,!0,y,i,4e3,r):f(t.alias||t.label,!0,y,i,240,r),l=N.get(e)??ke,d=l.length>0&&!t.isGroup&&F(e),p={node:t,style:n,label:c,w:0,h:0,headH:0,rows:[],cols:[],rowSize:a,keySize:s,below:d},h=0,g=0;for(let e of l)e.band=Math.max(ye,d?e.label.width+12:e.label.height+6),g+=e.band,h=Math.max(h,d?e.label.height:e.label.width);let _=Math.max(be,d?g+8:0),b;if(t.isGroup)b=E(0,0),b.isGroup=!0,b.dir=t.dir?T(t.dir):void 0,b.padX=Z,b.padTop=p.label.height>0?p.label.height+16:Z,b.padBottom=Z,b.minW=Math.max(p.label.width+2*Z-12,be);else{let e=Math.max(c.height,Math.round(i*1.5));if(t.attributes.length===0)p.w=Math.max(c.width+2*xe,_),p.h=Math.max(e+2*Se,d?0:g+8);else{let n=Math.round(a*1.5),i=[0,0,0,0];for(let e of t.attributes){let t=[f(Pe(e.type),!0,y,a,Oe,r),f(Pe(e.name),!0,y,a,Oe,r),f(e.keys.join(`, `),!1,y,s,Oe,r),f(Pe(e.comment),!0,y,a,De,r)],o=n;for(let e=0;e<4;e++)t[e].width>i[e]&&(i[e]=t[e].width),t[e].height>o&&(o=t[e].height);p.rows.push({cells:t,h:o+Ee}),p.h+=o+Ee}let o=0,l=0;for(let e of i)e!==0&&(l+=e+(o>0?Te:0),o++);p.w=Math.max(l+2*we,c.width+2*xe,_);let u=o>0?(p.w-l-2*we)/o:0,d=we;for(let e of i)p.cols.push(d),e>0&&(d+=e+u+Te);p.headH=e+2*Ce,p.h+=p.headH}let n=l.length>0?2*(Y+Q*.75+10+h):0;b=d?E(p.w,p.h+n):E(p.w+n,p.h)}b.seq=k.length,k.push(p),A.push(b)}u.nodes.forEach((e,t)=>{A[t].parent=e.parentId===void 0?-1:O.get(e.parentId)??-1});let I=C(A,j,c?`TB`:T(t.direction),{nodeSep:Ne(n,`nodeSpacing`,ge),edgeSep:_e,rankSep:Ne(n,`rankSpacing`,ve),portSep:24});Re(j,A,k);let L=I.width;for(let[e,t]of N){let n=A[e];if(!n.isGroup)continue;let r=0;for(let e of t)r=Math.max(r,e.label.width);L=Math.max(L,n.x+n.w/2+Y+Q*.75+10+r)}let R=ee(t.title,y,m,4e3),z=R.height>0?R.height+12:0,B=Math.max(L,R.width),se=b+(B-L)/2,V=b+z;w(A,j,se,V);let H=Math.ceil(B+2*b),U=Math.ceil(I.height+z+2*b),W=[],G=new Map,ce=!1;for(let e of A)e.isGroup&&(ce=!0);if(ce)for(let e of j)S(G,e.route);let K=``,le=``;for(let t=0;t<k.length;t++){let n=k[t],i=A[t],o=n.node,c=e(o.cssClasses.replace(/^default\s?/,``));if(i.isGroup){n.w=i.w,n.h=i.h;let e=i.x-i.w/2,t=i.y-i.h/2,a=x(i,n.label.width,G,Z);K+=`<g class="pele-cluster${c}" data-id="${d(o.id)}"><rect x="${r(e)}" y="${r(t)}" width="${r(i.w)}" height="${r(i.h)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${l(n.style.shape)}/>`+p(n.label,a,t+8+n.label.height/2,` class="pele-cluster-label" fill="var(--_m)"${n.style.text}`,D)+`</g>`;continue}let u=n.w,f=n.h,m=-u/2,g=-f/2,_=n.style.text,v=`x="${r(m)}" y="${r(g)}" width="${r(u)}" height="${r(f)}"`,y=p(n.label,0,n.rows.length>0?g+n.headH/2:0,` class="pele-label"${_}`,D),b=ae(o.alias||o.label);if(/ internal-link(?: |$)/.test(c+` `)&&y!==``&&a.links!==!1){let e=te(re(b),a)!==void 0,t=h(b);y=`<a class="internal-link"${e?` href="${t}"${ne(a)}`:``} data-href="${t}">${y}</a>`,W.push({id:o.label,href:b,internal:!0})}let S;if(n.rows.length===0)S=`<rect ${v}${l(Me+n.style.shape)}/>`+y;else{let e=Math.round(n.rowSize*1.5),t=n.style.stroke?h(n.style.stroke):`var(--_b)`,i=``,a=``,o=g+n.headH;for(let t=0;t<n.rows.length;t++){let c=n.rows[t];if(t%2==0){let e=`x="${r(m)}" width="${r(u)}"`;t===n.rows.length-1?i+=`<rect ${e} y="${r(o)}" height="${r(c.h)}"${s}/><rect ${e} y="${r(o)}" height="${r(c.h/2)}"/>`:i+=`<rect ${e} y="${r(o)}" height="${r(c.h)}"/>`}let l=o+Ee/2+e/2+n.rowSize*.35,[d,f,p,h]=c.cells;a+=$(d,m+n.cols[0],l,` class="pele-er-type" fill="var(--_m)"${_}`,D)+$(f,m+n.cols[1],l,` class="pele-er-name"${_}`,D)+$(p,m+n.cols[2],l,` class="pele-er-keys" font-size="${n.keySize}" fill="var(--_m)"${_}`,D)+$(h,m+n.cols[3],l,` class="pele-er-comment" fill="var(--_m)"${_}`,D),o+=c.h}let c=r(g+n.headH);S=`<rect ${v}${l(Me+n.style.shape)}/><g class="pele-er-stripes" fill="var(--_bg)"${n.style.shape.includes(`fill:`)?` opacity="0.6"`:``}>${i}</g><path class="pele-er-divider" d="M${r(m)},${c}H${r(m+u)}" stroke="${t}"/><rect ${v} fill="none" stroke="var(--_b)"${l(n.style.line)}/>`+y+`<g class="pele-er-attributes" font-size="${n.rowSize}">${a}</g>`}le+=`<g class="pele-node pele-entity${c}" data-id="${d(o.label)}" transform="translate(${r(i.x)},${r(i.y)})">${S}</g>`}for(let[e,t]of N){let n=k[e],r=0;for(let e of t)r+=e.band;let i=Math.min(1,Math.max((n.below?n.w:n.h)-8,0)/r),a=-r*i/2;for(let e of t)e.band*=i,e.at=a+e.band/2,a+=e.band}let q=``,J=``;for(let e=0;e<j.length;e++){let t=j[e],n=M[e],i=oe[e],a,o,s,c=P[e];if(c){let e=A[t.src],l=k[t.src],u=Math.max(Math.min(c.band/2-6,13),1),d=Y+Q*.75+6;if(l.below){let f=e.x+c.at,p=e.y+l.h/2,m=r(p+Y),h=r(p+Y+Q);a=`M${r(f-u)},${r(p)}V${m}C${r(f-u)},${h} ${r(f+u)},${h} ${r(f+u)},${m}V${r(p)}`,o=X(n.arrowTypeStart,f-u,p,0,-1),s=X(n.arrowTypeEnd,f+u,p,0,-1),t.labelX=f,t.labelY=p+d+i.height/2}else{let f=e.x+l.w/2,p=e.y+c.at,m=r(f+Y),h=r(f+Y+Q);a=`M${r(f)},${r(p-u)}H${m}C${h},${r(p-u)} ${h},${r(p+u)} ${m},${r(p+u)}H${r(f)}`,o=X(n.arrowTypeStart,f,p-u,-1,0),s=X(n.arrowTypeEnd,f,p+u,-1,0),t.labelX=f+d+i.width/2,t.labelY=p}}else{let e=Le(t.route);if(e.length<6)continue;ze(e,0,k[t.src],A[t.src]),ze(e,e.length-3,k[t.dst],A[t.dst]);let i=Math.abs(e[e.length-3]-e[0]),c=Math.abs(e[e.length-2]-e[1]),l=e.length===6&&(i<.01||c<.01||Math.hypot(i,c)<=3*Y)?0:Y,u=_(e,void 0,l,l);a=l>0?`M${r(u.sx)},${r(u.sy)}L${u.d.slice(1)}L${r(u.ex)},${r(u.ey)}`:u.d,o=X(n.arrowTypeStart,u.sx,u.sy,u.sdx,u.sdy),s=X(n.arrowTypeEnd,u.ex,u.ey,u.edx,u.edy)}let l=n.pattern===`dashed`;if(q+=`<g class="pele-edge pele-er-${l?`non-identifying`:`identifying`}" data-id="${d(n.id)}"><path d="${a}"${l?` stroke-dasharray="4 3"`:``}/>`+o+s+`</g>`,i.width>0){let e=t.labelX,r=t.labelY;J+=g(n.id,i,e,r,``,D)}}return{svg:i(`er`,H,U,m,a,t,p(R,H/2,b+R.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(K?`<g class="pele-clusters">${K}</g>`:``)+(q?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${q}</g>`:``)+(J?`<g class="pele-edge-labels" font-size="${v}">${J}</g>`:``)+`<g class="pele-nodes">${le}</g>`),width:H,height:U,links:W}}function Le(e){let t=e.slice(0,3);for(let n=3;n<e.length;n+=3){let r=t.length-3,i=i=>Math.abs(t[r+i]-e[n+i])<.01&&Math.abs(e[n+i]-e[n+3+i])<.01;n+3<e.length&&(i(0)||i(1))||t.push(e[n],e[n+1],e[n+2])}return t}function Re(e,t,n){let r=new Map,i=(e,n,i,a)=>{let o=t[e],s=n[i]-o.x,c=n[i+1]-o.y,l;if(Math.abs(Math.abs(c)-o.h/2)<.5)l=c<0?0:2;else if(Math.abs(Math.abs(s)-o.w/2)<.5)l=s<0?3:1;else return;let u=e*4+l,d={route:n,at:i,toward:n[a+(l&1?1:0)]},f=r.get(u);f?f.push(d):r.set(u,[d])};for(let t of e){let e=t.route.length-3;t.src===t.dst||e<3||(i(t.src,t.route,0,3),i(t.dst,t.route,e,e-3))}for(let[e,i]of r){if(i.length<2)continue;let r=e>>2,a=(e&1)==1,o=t[r].isGroup?t[r]:n[r],s=a?o.h:o.w,c=Math.max(Math.min(Ae,(s-2*je)/(i.length-1)),0),l=a?t[r].y:t[r].x;i.sort((e,t)=>e.toward-t.toward);for(let e=0;e<i.length;e++)i[e].route[i[e].at+ +!!a]=l+(e-(i.length-1)/2)*c}}function ze(e,t,n,r){if(r.isGroup)return;let i=e[t]-r.x,a=e[t+1]-r.y;r.w!==n.w&&Math.abs(Math.abs(i)-r.w/2)<.5&&(e[t]-=Math.sign(i)*(r.w-n.w)/2),r.h!==n.h&&Math.abs(Math.abs(a)-r.h/2)<.5&&(e[t+1]-=Math.sign(a)*(r.h-n.h)/2)}var Be={type:`er`,math:!0,parse(e,t,n){let r=new oe;return n&&(r.title=n),J(e,r),r},render:Fe};export{Be as er};
|
|
4
|
-
//# sourceMappingURL=5OC2THR4-
|
|
4
|
+
//# sourceMappingURL=5OC2THR4-DKcwc3u1.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./6OLKWJ4F-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./6OLKWJ4F-W-G6qP3r.js";import{d as g,f as _,g as ee,r as v,s as y,t as b}from"./77XECAW3-SIARa2Fi.js";import{n as x,r as te}from"./DKTLEL5E-DciMwFJ1.js";import{PeleError as S,_ as ne}from"./lazy-B292152Q.js";function C(e,t){let n=new Map;for(let{label:t,value:r}of e.sections){if(r<0)throw new S(`"${t}" has invalid value: ${r}. Negative values are not allowed in pie charts. All slice values must be >= 0.`,`semantic`,{type:`pie`});n.has(t)||n.set(t,r)}return{type:`pie`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
2
|
`):void 0,showData:e.showData,sections:n}}function w(e,t){let n=t;for(let t=e.charCodeAt(n);t>=48&&t<=57;t=e.charCodeAt(n))n++;return n}function T(){let e=0,t=0,n=-1;return(r,i)=>{let a=r.charCodeAt(i)===45?i+1:i;if((a<e||a>=t)&&(e=a,t=w(r,a),n=-1,t>a&&r.charCodeAt(t)===46)){let e=w(r,t+1),i=e-t-1;i>0&&r.charCodeAt(e)!==46?n=e:i>1&&(n=e-1)}return t===a?-1:n>=0?n:r.charCodeAt(a)===48?r.charCodeAt(a+1)===46?-1:a+1:r.charCodeAt(t)===46?t-1>a?t-1:-1:t}}var E=[o(`showData`),o(`pie`),{name:`:`,pattern:`:`},{name:`NUMBER_PIE`,pattern:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/y,scanner:T,first:`-0123456789`},e,m,d,c,s,h,f,u,p];function D(e){let o=new a(l(e,E,`pie`),E,`pie`),s={$type:`Pie`,showData:!1,sections:[]},c=()=>{if(o.kind!==-1)for(o.kind!==8&&o.fail(`a line break or the end of input`);o.kind===8;)o.i++};for(;o.kind===8;)o.i++;for(o.expect(1),s.showData=o.accept(0);o.kind!==-1;)switch(o.kind){case 8:o.i++;break;case 4:s.accDescr=t(o.take()),c();break;case 5:s.accTitle=i(o.take()),c();break;case 6:s.title=n(o.take()),c();break;case 7:{let e=r(o.take());o.expect(2);let t=Number(o.expect(3));s.sections.push({$type:`PieSection`,label:e,value:t}),c();break}default:o.fail(`a section, a title, or a line break`)}return s}var O=120,k=12,A=26,j=32,M=28;function N(e,t){return e.pie?.[t]}function P(e,t){return`${_(Math.sin(e)*t)},${_(-Math.cos(e)*t)}`}function re(e,t,n,r){if(t-e>=Math.PI*2-1e-9){let e=(e,t)=>`M0,${_(-e)}A${_(e)},${_(e)} 0 1 ${t} 0,${_(e)}A${_(e)},${_(e)} 0 1 ${t} 0,${_(-e)}Z`;return e(n,1)+(r>0?e(r,0):``)}let i=+(t-e>Math.PI);return r<=0?`M0,0L${P(e,n)}A${_(n)},${_(n)} 0 ${i} 1 ${P(t,n)}Z`:`M${P(e,n)}A${_(n)},${_(n)} 0 ${i} 1 ${P(t,n)}L${P(t,r)}A${_(r)},${_(r)} 0 ${i} 0 ${P(e,r)}Z`}function F(e,t,n){return x(n,O*2,140,(r,i)=>I(e,t,n,r/2,i))}function I(e,t,n,r,i){let a=n.fontSize??16,o=Math.round(a*.875),s=n.measurer??ne(n.fontFamily),c=n.padding??8,l=N(t,`textPosition`),u=typeof l==`number`&&l>=0&&l<=1?l:.75,d=N(t,`donutHole`),f=typeof d==`number`&&d>0&&d<=.9?d*r:0,p=String(N(t,`legendPosition`)??`right`),m=i&&(p===`left`||p===`right`)?`bottom`:p,h=[...e.sections],x=0;for(let[,e]of h)x+=e;let S=h.map(([t,n])=>y(e.showData?`${t} [${n}]`:t,!1,s,o,4e3)),C=0;for(let e of S)C=Math.max(C,e.width);C+=S.length>0?k+8:0;let w=S.length*A,T=y(e.title,!1,s,a,te(n),1),E=T.height>0?T.height+16:0,D=h.map(([,e])=>{let t=x>0?e/x:0;return t*100>=1&&(t*100).toFixed(0)!==`0`?t:0}),O=D.map(e=>e===0||e>=.5?!1:2*r*u*Math.sin(e*Math.PI)<s.width((e*100).toFixed(0)+`%`,o,0)+6),P=O.includes(!0)?M:0,F=m===`left`||m===`right`||m===`center`?m:``,I=m===`top`||m===`bottom`,L=(r+P)*2,R=L,z=L;F===`left`||F===`right`?(R+=C>0?j+C:0,z=Math.max(z,w)):I&&(R=Math.max(R,C),z+=w>0?20+w:0),R=Math.max(R,T.width);let B=c+(F===`left`?C+j+L/2:F===`right`?L/2:R/2),V=c+E,H=V+(m===`top`?w+20+L/2:I?L/2:z/2),U=``,W=``,G=``,K=0,q=r+M/2,J=[],ie=(e,t,n)=>J.every(r=>Math.abs(e-r.x)>=(n+r.width)/2+2||Math.abs(t-r.y)>=o+2);h.forEach(([e],t)=>{let n=D[t];if(n===0)return;let i=K+n*Math.PI*2;U+=`<path class="pele-slice" data-id="${v(e)}" d="${re(K,i,r,f)}" fill="${g(t)}"/>`;let a=(K+i)/2,c=(n*100).toFixed(0)+`%`;if(O[t]){let e=s.width(c,o,0),t=a;for(let n=0;n<360&&!ie(Math.sin(t)*q,-Math.cos(t)*q,e);n++)t+=2/q;let n=Math.sin(t)*q,r=-Math.cos(t)*q;J.push({x:n,y:r,width:e}),G+=`<text x="${_(n)}" y="${_(r+o*.35)}">${c}</text>`}else{let e=r*u;W+=`<text x="${_(Math.sin(a)*e)}" y="${_(-Math.cos(a)*e+o*.35)}">${c}</text>`}K=i}),U===``&&(U=`<circle class="pele-slice" r="${r}" fill="none" stroke="var(--_b)"/>`);let Y=``,X,Z;F===`right`?(X=B+L/2+j,Z=V+(z-w)/2):F===`left`?(X=c,Z=V+(z-w)/2):F===`center`?(X=B-C/2,Z=H-w/2):(X=c+(R-C)/2,Z=m===`top`?V:V+L+20),S.forEach((e,t)=>{let n=Z+t*A+A/2;Y+=`<g class="pele-legend-item" data-id="${v(h[t][0])}"><rect x="${_(X)}" y="${_(n-k/2)}" width="${k}" height="${k}" rx="2" fill="${g(t)}"/>`+b(e,X+k+8+e.width/2,n,``)+`</g>`});let Q=Math.ceil(R+2*c),$=Math.ceil(z+E+2*c),ae=b(T,Q/2,c+T.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g class="pele-slices" transform="translate(${_(B)},${_(H)})" stroke="var(--_bg)" stroke-width="1" stroke-linejoin="round">${U}</g>`+(W?`<g class="pele-slice-labels" transform="translate(${_(B)},${_(H)})" font-size="${o}" text-anchor="middle" fill="var(--_bg)">${W}</g>`:``)+(G?`<g class="pele-slice-labels" transform="translate(${_(B)},${_(H)})" font-size="${o}" text-anchor="middle">${G}</g>`:``)+(Y?`<g class="pele-legend" font-size="${o}">${Y}</g>`:``);return{svg:ee(`pie`,Q,$,a,n,e,ae),width:Q,height:$,links:[]}}var L={type:`pie`,parse:(e,t,n)=>C(D(e),n),render:F};export{L as pie};
|
|
3
|
-
//# sourceMappingURL=5S6HY5KT-
|
|
3
|
+
//# sourceMappingURL=5S6HY5KT-Dqth6iG8.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,g as r,h as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./6OLKWJ4F-
|
|
1
|
+
import{a as e,c as t,d as n,g as r,h as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./6OLKWJ4F-W-G6qP3r.js";import{g as m,s as h,t as g}from"./77XECAW3-SIARa2Fi.js";import{_}from"./lazy-B292152Q.js";function v(e,t){return{type:`info`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
2
|
`):void 0}}var y=[a(`showInfo`),a(`info`),e,f,l,o,p,u,c,d];function b(e){let a=new i(s(e,y,`info`),y,`info`),o={$type:`Info`};for(;a.kind===5;)a.i++;for(a.expect(1);a.kind===5;)a.i++;if(a.accept(0))for(;a.kind===5;)a.i++;for(;a.kind!==-1;){let e=a.kind;if(e===2?o.accDescr=t(a.take()):e===3?o.accTitle=r(a.take()):e===4?o.title=n(a.take()):a.fail(`a title or the end of input`),a.kind===-1)break;for(a.kind!==5&&a.fail(`a line break or the end of input`);a.kind===5;)a.i++}return o}var x=`1.8.0`;function S(e,t,n){let r=n.fontSize??16,i=n.measurer??_(n.fontFamily),a=n.padding??8,o=h(e.title,!1,i,r,4e3,1),s=o.height>0?o.height+8:0,c=h(`Pele v${x}`,!1,i,r,4e3),l=Math.ceil(Math.max(o.width,c.width)+2*a),u=Math.ceil(s+c.height+2*a),d=g(o,l/2,a+o.height/2,` class="pele-title" font-weight="var(--_tw)"`)+g(c,l/2,a+s+c.height/2,` class="pele-version" fill="var(--_m)"`);return{svg:m(`info`,l,u,r,n,e,d),width:l,height:u,links:[]}}var C={type:`info`,parse:(e,t,n)=>v(b(e),n),render:S};export{C as info};
|
|
3
|
-
//# sourceMappingURL=6IMQ5BUJ-
|
|
3
|
+
//# sourceMappingURL=6IMQ5BUJ-DmEcg0r1.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{u as e}from"./lazy-
|
|
1
|
+
import{u as e}from"./lazy-B292152Q.js";var t=new WeakMap;function n(e){let n=e.map((e,t)=>t),r=[];for(let t=0;t<128;t++){let i=String.fromCharCode(t);r.push(n.filter(t=>{let{pattern:n,first:r}=e[t];return typeof n==`string`?n[0]===i:r===void 0||r.includes(i)}))}let i={starting:r,every:n,longer:e.map(t=>t.longer?.map(t=>e.indexOf(t)))};return t.set(e,i),i}function r(r,i,a){let o=[],s=[],c=[],l=new Uint8Array(i.length),{starting:u,every:d,longer:f}=t.get(i)??n(i),p=[],m=r.length,h=(e,t)=>{if(l[e])return-1;let n=i[e];if(n.match!==void 0)return n.match(r,t);if(n.scanner!==void 0)return(p[e]??=n.scanner())(r,t);let a=n.pattern;return typeof a==`string`?r.startsWith(a,t)?t+a.length:-1:(a.lastIndex=t,a.test(r)?a.lastIndex:(n.opener!==void 0&&(n.opener.lastIndex=t,n.opener.test(r)&&(l[e]=1)),-1))},g=0;n:for(;g<m;){let t=r.charCodeAt(g);for(let e of t<128?u[t]:d){let t=h(e,g);if(t<=g)continue;let n=e,r=f[e];if(r!==void 0)for(let e of r){let r=h(e,g);if(r>t){n=e,t=r;break}}i[n].hidden||(o.push(n),s.push(g),c.push(t)),g=t;continue n}throw e(a,r,g,``,!0)}return o.push(-1),s.push(m),c.push(m),{kinds:o,starts:s,ends:c,src:r}}var i={name:`ACC_DESCR`,pattern:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/y,first:` a`},a={name:`ACC_TITLE`,pattern:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/y,first:` a`},o={name:`TITLE`,pattern:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/y,first:` t`},s={name:`STRING`,pattern:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/y,first:`"'`},c={name:`NEWLINE`,pattern:/\r?\n/y,first:`\r
|
|
2
2
|
`},l={name:`WHITESPACE`,pattern:/[\t ]+/y,hidden:!0,first:` `},u={name:`YAML`,pattern:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/y,hidden:!0,opener:/---[\t ]*\r?\n/y,first:`-`},d={name:`DIRECTIVE`,pattern:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/y,hidden:!0,opener:/[\t ]*%%{/y,first:` %`},f={name:`SINGLE_LINE_COMMENT`,pattern:/[\t ]*%%[^\n\r]*/y,first:` %`,hidden:!0};function p(e){return{name:e,pattern:RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)+`(?:(?=%%)|(?!\\S))`,`y`),first:e[0]}}var m=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,h=/accTitle[\t ]*:([^\n\r]*)/,g=/title([\t ][^\n\r]*|)/;function _(e){return e.trim().replace(/[\t ]{2,}/gm,` `)}function v(e){return _(g.exec(e)[1])}function y(e){return _(h.exec(e)[1])}function b(e){let t=m.exec(e);return t[1]===void 0?t[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,`
|
|
3
3
|
`):_(t[1])}var x=new Map([[`b`,`\b`],[`f`,`\f`],[`n`,`
|
|
4
4
|
`],[`r`,`\r`],[`t`,` `],[`v`,`\v`],[`0`,`\0`]]);function S(e){if(!e.includes(`\\`))return e.slice(1,-1);let t=``;for(let n=1;n<e.length-1;n++){let r=e[n];if(r===`\\`){let r=e[++n];t+=x.get(r)??r}else t+=r}return t}var C=class{constructor(e,t,n){this.tokens=e,this.types=t,this.diagram=n,this.kinds=e.kinds}tokens;types;diagram;i=0;kinds;get kind(){return this.kinds[this.i]}text(e=this.i){return this.tokens.src.slice(this.tokens.starts[e],this.tokens.ends[e])}take(){return this.text(this.i++)}accept(e){return this.kinds[this.i]===e&&(this.i++,!0)}expect(e){return this.kinds[this.i]!==e&&this.fail(`token of type '${this.types[e].name}'`),this.take()}fail(t){let n=this.kind===-1?`end of input`:`\`${this.text()}\``;throw e(this.diagram,this.tokens.src,this.tokens.starts[this.i],`Expecting ${t} but found ${n}.`)}};export{i as a,b as c,v as d,S as f,y as g,C as h,p as i,c as l,s as m,r as n,d as o,o as p,u as r,f as s,a as t,l as u};
|
|
5
|
-
//# sourceMappingURL=6OLKWJ4F-
|
|
5
|
+
//# sourceMappingURL=6OLKWJ4F-W-G6qP3r.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as e,t}from"./77XECAW3-
|
|
2
|
-
//# sourceMappingURL=74OO7NKP-
|
|
1
|
+
import{f as e,t}from"./77XECAW3-SIARa2Fi.js";function n(e,t){for(let n=0;n<t.length;n+=3){let r=Math.round(t[n+1]),i=e.get(r);i?i.push(t[n]):e.set(r,[t[n]])}}function r(e,t,n,r){if(t===0)return e.x;let i=e.y-e.h/2,a=e.x-e.w/2,o=t/2,s=[a+r-6+o,e.x,a+e.w-r+6-o],c=n.get(Math.round(i));if(c===void 0)return s[0];let l=s[0],u=-1;for(let t of s){let n=1/0;for(let r of c)r>a&&r<a+e.w&&(n=Math.min(n,Math.abs(r-t)-o));if(n>=6)return t;n>u+.5&&(u=n,l=t)}return l}function i(e,t,n,r){let i=t>0?r.get(Math.round(e.y-e.h/2)):void 0;if(i===void 0)return!1;let a=e.x-e.w/2;for(let r of i)if(r>a&&r<a+e.w&&Math.abs(r-n)<t/2+4)return!0;return!1}function a(n,r,i,a,o,s,c,l){let u=1;for(let e=s[c].parent;e>=0&&u<8;e=s[e].parent)u++;let d=`color-mix(in srgb,var(--_a) ${e(100*(1-.5**u))}%,var(--_bg))`;return`<g class="pele-cluster-title" data-id="${o}">`+t(n,r,i,` fill="none" stroke="${d}" stroke-width="5" stroke-linejoin="round"`,l)+t(n,r,i,a,l)+`</g>`}export{i,r as n,n as r,a as t};
|
|
2
|
+
//# sourceMappingURL=74OO7NKP-u02yiNi7.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{_ as e,b as t,f as n,g as r,l as i,m as a,o,r as s,s as c,t as l,y as u}from"./77XECAW3-
|
|
1
|
+
import{_ as e,b as t,f as n,g as r,l as i,m as a,o,r as s,s as c,t as l,y as u}from"./77XECAW3-SIARa2Fi.js";import{a as d,i as f,l as p,s as m}from"./N3JZAHOW-BXwh9_vP.js";import{a as h,o as g,t as _}from"./DKTLEL5E-DciMwFJ1.js";import{t as v}from"./G3MDBVQH-BZmnMkFw.js";import{i as y,n as b,r as x,t as ee}from"./74OO7NKP-u02yiNi7.js";import{i as te,r as ne,t as S}from"./NUIALGQ3-ClxnUm8B.js";import{n as re}from"./TSHNXIZL-icuUBQJZ.js";import{a as ie,r as C}from"./5N7A7DKN-BUa1-OZ6.js";import{t as w}from"./7WLXJQOR-D6QVYUu9.js";import{n as ae}from"./ABYRPUBD-B_0r9NT4.js";import{_ as oe,a as se,i as T,m as E,r as D,u as O}from"./lazy-B292152Q.js";function k(e){return e===`#`||e===`+`||e===`~`||e===`-`}var A=class{id=``;memberType;visibility=``;classifier=``;parameters=``;returnType=``;constructor(e,t){this.memberType=t,(t!==`method`||!this.parseMethod(e))&&this.parseAttribute(e),this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim()}parseMethod(e){let t=e.length;for(let n=0;n<t;){let r=n;for(;r<t&&!se(e.charCodeAt(r));)r++;let i=r-1;for(;i>n&&e.charCodeAt(i)!==41;)i--;let a=i-1;for(;a>n&&e.charCodeAt(a)!==40;)a--;if(a>n){let r=e[n],o=k(r)&&a>n+1;o&&(this.visibility=r),this.id=e.slice(o?n+1:n,a),this.parameters=e.slice(a+1,i).trim();let s=i+1,c=``;if(s<t){let t=e[s];(t===`$`||t===`*`||t.trim()===``)&&(c=t.trim(),s++)}let l=s;for(;l<t&&!se(e.charCodeAt(l));)l++;if(this.returnType=e.slice(s,l).trim(),c===``){let e=this.returnType.slice(-1);(e===`$`||e===`*`)&&(c=e,this.returnType=this.returnType.slice(0,-1))}return this.classifier=c,!0}n=r+1}return this.memberType=`attribute`,!1}parseAttribute(e){let t=e.slice(0,1),n=e.slice(-1);k(t)&&(this.visibility=t),(n===`$`||n===`*`)&&(this.classifier=n),this.id=e.substring(this.visibility===``?0:1,this.classifier===``?e.length:e.length-1)}getDisplayDetails(){let e=this.visibility+v(this.id);return this.memberType===`method`&&(e+=`(${v(this.parameters.trim())})`,this.returnType&&(e+=` : `+v(this.returnType))),{displayText:e.trim(),cssStyle:this.parseClassifier()}}parseClassifier(){return this.classifier===`*`?`font-style:italic;`:this.classifier===`$`?`text-decoration:underline;`:``}},j={LINE:0,DOTTED_LINE:1},M={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},ce=`classId-`;function N(e){let t=e.indexOf(`~`);if(t<=0)return{className:e,type:``};let n=e.indexOf(`~`,t+1);return{className:e.slice(0,t),type:e.slice(t+1,n===-1?e.length:n)}}function le(e){let t=e.charCodeAt(0);return N(t>=48&&t<=57?ce+e:e).className}var ue=class{type=`class`;lineType=j;relationType=M;direction=`TB`;classes=new Map;relations=[];notes=new Map;namespaces=new Map;interfaces=[];styleClasses=new Map;title;accTitle;accDescr;namespaceStack=[];withCssClass=new Map;addClass(e){let{className:t,type:n}=N(e);if(this.classes.has(t))return;let r={id:t,type:n,label:t,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[]};this.classes.set(t,r),this.tag(r,`default`)}tag(e,t){let n=this.withCssClass.get(t);n?n.add(e):this.withCssClass.set(t,new Set([e]))}ensure(e){return this.addClass(e),this.classes.get(N(e).className)}setClassLabel(e,t){this.ensure(e).label=t}addRelation(e){let{type1:t,type2:n}=e.relation;t===M.LOLLIPOP&&n===`none`?(this.addClass(e.id2),e.id1=this.addInterface(e.id1,e.id2)):n===M.LOLLIPOP&&t===`none`?(this.addClass(e.id1),e.id2=this.addInterface(e.id2,e.id1)):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=N(e.id1).className,e.id2=N(e.id2).className,e.relationTitle1=e.relationTitle1.trim(),e.relationTitle2=e.relationTitle2.trim(),this.relations.push(e)}addInterface(e,t){let n=`interface${this.interfaces.length}`;return this.interfaces.push({id:n,label:e,classId:t}),n}addAnnotation(e,t){this.ensure(e).annotations.push(t)}addMember(e,t){let n=this.ensure(e);if(typeof t!=`string`)return;let r=t.trim();if(r.startsWith(`<<`)&&r.endsWith(`>>`))n.annotations.push(r.substring(2,r.length-2));else if(r.indexOf(`)`)>0){let e=new A(r,`method`);(e.memberType===`method`?n.methods:n.members).push(e)}else r&&n.members.push(new A(r,`attribute`))}addMembers(e,t){if(Array.isArray(t)){t.reverse();for(let n of t)this.addMember(e,n)}}addNote(e,t){let n=this.notes.size,r=`note${n}`;return this.notes.set(r,{id:r,class:t,text:e,index:n}),r}cleanupLabel(e){return(e.startsWith(`:`)?e.substring(1):e).trim()}setCssClass(e,t){for(let n of e.split(`,`)){let e=this.classes.get(le(n));if(e!==void 0){e.cssClasses+=` `+t;for(let n of t.split(` `))this.tag(e,n)}}}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);if(e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),!t)continue;for(let n of t)n.includes(`color`)&&e.textStyles.push(n.replace(`fill`,`bgFill`)),e.styles.push(n);let r=this.withCssClass.get(n);if(r===void 0)continue;let i=t.flatMap(e=>e.split(`,`));for(let e of r)for(let t of i)e.styles.push(t)}}setTooltip(e,t){if(t!==void 0)for(let n of e.split(`,`)){let e=this.classes.get(N(n).className);e&&(e.tooltip=t)}}setLink(e,t,n){let r=E(t).trim();for(let t of e.split(`,`)){let e=this.classes.get(le(t));e&&(e.link=r?C(r):void 0,e.linkTarget=typeof n==`string`?n:`_blank`)}this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){for(let t of e.split(`,`)){let e=this.classes.get(N(t).className);e&&(e.haveCallback=!0)}this.setCssClass(e,`clickable`)}setDirection(e){this.direction=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}addNamespace(e,t){let n=this.namespaceStack[this.namespaceStack.length-1],r=n?`${n}.${e}`:e;this.namespaceStack.push(r);let i=this.namespaces.get(r);if(i)return i.explicit=!0,t&&(i.label=t),r;let a=n||void 0,o=n?n.length+1:0;for(;;){let e=r.indexOf(`.`,o),n=e===-1,i=n?r:r.slice(0,e),s=this.namespaces.get(i);if(s===void 0){let c=r.slice(o,n?r.length:e);s={id:i,label:n&&t?t:c,classes:new Map,notes:new Map,children:new Map,parent:a,explicit:n},this.namespaces.set(i,s)}else n&&(s.explicit=!0);let c=a?this.namespaces.get(a):void 0;if(c&&(c.children.has(i)||c.children.set(i,s),s.parent??=a),n)return r;a=i,o=e+1}}popNamespace(){this.namespaceStack.pop()}addClassesToNamespace(e,t,n){let r=this.namespaces.get(e);if(r!==void 0){for(let n of t){let{className:t}=N(n),i=this.classes.get(t);i!==void 0&&(i.parent=e,r.classes.set(t,i))}for(let t of n){let n=this.notes.get(t);n!==void 0&&(n.parent=e,r.notes.set(t,n))}}}setCssStyle(e,t){let n=this.classes.get(e);if(t&&n)for(let e of t)for(let t of e.split(`,`))n.styles.push(t)}},P=`$end.INVALID.CLASS_DIAGRAM.NEWLINE.EOF.SQS.STR.SQE.DOT.GENERICTYPE.LABEL.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.STRUCT_START.STRUCT_STOP.NAMESPACE.STYLE_SEPARATOR.ANNOTATION_START.ANNOTATION_END.CLASS.MEMBER.NOTE_FOR.NOTE.CLASSDEF.ALPHA.COMMA.direction_tb.direction_bt.direction_rl.direction_lr.AGGREGATION.EXTENSION.COMPOSITION.DEPENDENCY.LOLLIPOP.LINE.DOTTED_LINE.CALLBACK.LINK.LINK_TARGET.CLICK.CALLBACK_NAME.CALLBACK_ARGS.HREF.STYLE.CSSCLASS.COLON.BRKT.PCT.MINUS.UNICODE_TEXT.BQUOTE_STR.EDGE_STATE.EOF_IN_STRUCT.OPEN_IN_STRUCT.PLUS.EQUALS.PUNCTUATION`.split(`.`),de=[4,6,4,9,44,45,12,14,15,4,56,4,56],fe=[/.*direction\s+TB[^\n]*/y,/.*direction\s+BT[^\n]*/y,/.*direction\s+RL[^\n]*/y,/.*direction\s+LR[^\n]*/y],F=/[\n\r\u2028\u2029]/g;function I(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=e.indexOf(`direction`),l=-1,u=0,d=(t,a,o)=>(n.push(t),r.push(e.slice(a,o)),i.push(a),s=o,!0),f=e=>{a.push(o),o=e},p=()=>{a.length>0&&(o=a.pop())},m=t=>e.startsWith(t,s)&&!T(e.charCodeAt(s+t.length)),h=n=>{for(;n<t&&D(e.charCodeAt(n));)n++;return n},g=n=>{let r=e.indexOf(n,s);return r===-1?t:r},_=n=>{let r=s,i=-1;for(let n=e.charCodeAt(r);r<t&&D(n);n=e.charCodeAt(++r))n===10&&(i=r);if(i<0){s=r;return}n&&p(),d(3,s,i+1)},v=t=>{switch(t){case 99:if(m(`cssClass`))return d(48,s,s+8);if(m(`callback`))return d(40,s,s+8);if(m(`click`))return d(43,s,s+5);break;case 108:if(m(`link`))return d(41,s,s+4);break;case 110:if(m(`note for`))return d(24,s,s+8);if(m(`note`))return d(25,s,s+4);break;case 60:if(e.charCodeAt(s+1)===60)return d(20,s,s+2);break;case 62:if(e.charCodeAt(s+1)===62)return d(21,s,s+2);break;case 104:if(m(`href`))return d(46,s,s+4)}return!1},y=n=>{if(v(n))return!0;let r=e.charCodeAt(s+1);switch(n){case 34:return f(1),s++,!0;case 126:return f(3),s++,!0;case 96:return f(2),s++,!0;case 95:if(m(`_self`))return d(42,s,s+5);if(m(`_blank`))return d(42,s,s+6);if(m(`_parent`))return d(42,s,s+7);if(m(`_top`))return d(42,s,s+4);break;case 60:return r===124?d(34,s,s+2):d(36,s,s+1);case 124:return r===62&&d(34,s,s+2);case 62:return d(36,s,s+1);case 42:return d(35,s,s+1);case 111:if(!T(r))return d(33,s,s+1);break;case 40:return r===41&&d(37,s,s+2);case 45:return r===45?d(38,s,s+2):d(52,s,s+1);case 46:return r===46?d(39,s,s+2):d(8,s,s+1);case 58:{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===58||t===10||t===59)break;n++}return n>s+1?d(10,s,n):r===58&&e.charCodeAt(s+2)===58&&d(19,s,s+3)}case 43:return d(58,s,s+1);case 37:return d(51,s,s+1);case 61:return d(59,s,s+1);case 91:return d(5,s,s+1);case 93:return d(7,s,s+1);case 33:case 35:case 36:case 38:case 39:case 44:case 63:case 92:case 47:return d(60,s,s+1)}if(T(n)){let t=s+1;for(;T(e.charCodeAt(t));)t++;return d(27,s,t)}return w(n)&&d(53,s,s+1)},b=()=>{if(c===-1||s<u||(c<s&&(c=e.indexOf(`direction`,s)),c===-1)||(l<s&&(F.lastIndex=s,l=F.test(e)?F.lastIndex-1:t),c>=l))return!1;for(let t=0;t<4;t++){let n=fe[t];if(n.lastIndex=s,n.test(e))return d(29+t,s,n.lastIndex)}return u=l,!1},x=n=>{if(b())return!0;if(D(n))return _(!1),!0;switch(n){case 37:if(e.charCodeAt(s+1)===37){let n=g(`
|
|
3
3
|
`);for(;n<t&&(e.charCodeAt(n)===10||e.charCodeAt(n)===13);)n++;return s=n,!0}break;case 97:{let t=e.startsWith(`accTitle`,s);if(!t&&!e.startsWith(`accDescr`,s))break;let n=h(s+8),r=e.charCodeAt(n);if(r===58)return d(t?11:13,s,h(n+1)),f(t?6:7),!0;if(r===123&&!t)return s=h(n+1),f(8),!0;break}case 99:if(m(`classDiagram-v2`))return d(2,s,s+15);if(m(`classDiagram`))return d(2,s,s+12);if(e.startsWith(`call`,s)&&D(e.charCodeAt(s+4)))return s=h(s+4),f(4),!0;if(m(`classDef`))return d(26,s,s+8);if(m(`class`))return f(9),d(22,s,s+5);break;case 91:if(e.startsWith(`*]`,s+1))return d(55,s,s+3);break;case 115:if(m(`style`))return d(47,s,s+5);break;case 110:if(m(`namespace`))return f(11),d(18,s,s+9);break;case 44:return d(28,s,s+1);case 35:return d(50,s,s+1)}return y(n)||n===58&&d(49,s,s+1)};for(;;){if(s>=t){n.push(de[o]),r.push(``),i.push(t);break}let a=e.charCodeAt(s),c=!0;switch(o){case 0:c=x(a);break;case 9:D(a)?_(!0):a===125?(p(),p(),d(17,s,s+1)):a===123?(f(10),d(16,s,s+1)):c=y(a);break;case 10:if(a===34)f(1),s++;else if(a===125)p(),d(17,s,s+1);else if(a===91&&e.startsWith(`*]`,s+1))d(55,s,s+3);else if(a===123)d(57,s,s+1);else if(a===10)s++;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===123||t===125||t===10)break;n++}d(23,s,n)}break;case 11:D(a)?_(!0):a===123?(f(12),d(16,s,s+1)):a===125?p():a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):c=y(a);break;case 12:D(a)?_(!1):a===125?(p(),d(17,s,s+1)):a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):a===91&&e.startsWith(`*]`,s+1)?d(55,s,s+3):a===99&&m(`class`)?(f(9),d(22,s,s+5)):c=y(a);break;case 1:a===34?(p(),s++):d(6,s,g(`"`));break;case 3:if(a===34)f(1),s++;else{if(v(a))break;a===126?(p(),s++):d(9,s,g(`~`))}break;case 2:if(a===34)f(1),s++;else{if(v(a))break;a===126?(f(3),s++):a===96?(p(),s++):d(54,s,g("`"))}break;case 4:if(a===40){let t=h(s+1);p(),e.charCodeAt(t)===41?s=t+1:(f(5),s++)}else d(44,s,g(`(`));break;case 5:a===41?(p(),s++):d(45,s,g(`)`));break;case 6:case 7:d(o===6?12:14,s,g(`
|
|
4
4
|
`)),p();break;case 8:a===125?(p(),s++):d(15,s,g(`}`))}if(!c)return n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i}}return n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var L=61,R=new Uint8Array(L);for(let e of[53,27,52])R[e]=1;var z=new Uint8Array(L);for(let e of[27,49,50,47,51,10])z[e]=1;var B=new Uint8Array(L);B[33]=1,B[34]=2,B[35]=3,B[36]=4,B[37]=5;var V=`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS', 'BQUOTE_STR'`;function H(e,t){let{types:n,texts:r,starts:i}=I(e),a=0,o=t=>{let r=n[a];throw r===1?O(`class`,e,i[a],``,!0):O(`class`,e,i[a],`Expecting ${t}, got '${P[r]}'`)},s=e=>(n[a]!==e&&o(`'${P[e]}'`),r[a++]),c=()=>(R[n[a]]===0&&o(`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS'`),r[a++]),l=e=>{let t=``;for(;;){if(n[a]===54){t+=r[a++];break}R[n[a]]===0&&o(V),t+=r[a++];let e=n[a];if(e===8)t+=`.`,a++;else if(R[e]===0&&e!==54)break}return e&&n[a]===9&&(t+=`~`+r[a++]+`~`),t},u=()=>{a++;let e=s(6);return s(7),e},d=()=>{n[a]!==23&&o(`'STRUCT_STOP', 'MEMBER'`);let e=[];for(;n[a]===23;)e.push(r[a++]);return s(17),e.reverse()},f=()=>{a++;let e=l(!0);switch(t.addClass(e),n[a]===5&&t.setClassLabel(e,u()),n[a]){case 19:{a++;let r=c();t.setCssClass(e,r),n[a]===16&&(a++,t.addMembers(e,d()));break}case 16:a++,n[a]===17?a++:t.addMembers(e,d());break;case 20:{a++;let r=c();s(21),t.addAnnotation(e,r),n[a]===16&&(a++,n[a]===17?a++:t.addMembers(e,d()));break}}return e},p=()=>{if(n[a++]===25)return t.addNote(s(6));let e=l(!0);return t.addNote(s(6),e)},m=()=>{let e=[];for(;;){a++;let r=l(!1),i=n[a]===5?t.addNamespace(r,u()):t.addNamespace(r);s(16),n[a]===3&&a++,e.push({id:i,classes:[],notes:[]});let c=!0;for(;c;){let r=e[e.length-1],i=n[a];if(i===18)break;for(i===22?r.classes.push(f()):i===25||i===24?r.notes.push(p()):o(`'NAMESPACE', 'CLASS', 'NOTE_FOR', 'NOTE'`);;){if(n[a]===3){let e=n[a+1];if(e===18||e===22||e===25||e===24){a++;break}a++}s(17);let r=e.pop();if(t.addClassesToNamespace(r.id,r.classes,r.notes),t.popNamespace(),e.length===0){c=!1;break}}}if(e.length===0)return}},h=()=>{let e=B[n[a]];return e===0?`none`:(a++,e-1)},g=()=>{let e=l(!0),i=n[a];if(i===10){t.addMember(e,t.cleanupLabel(r[a++]));return}let s=`none`;if(i===6)s=r[a++],i=n[a];else if(B[i]===0&&i!==38&&i!==39)return;let c=h();i=n[a],i!==38&&i!==39&&o(`'AGGREGATION', 'EXTENSION', 'COMPOSITION', 'DEPENDENCY', 'LOLLIPOP', 'LINE', 'DOTTED_LINE'`),a++;let u=h(),d=n[a]===6?r[a++]:`none`,f={id1:e,id2:l(!0),relation:{type1:c,type2:u,lineType:i===38?0:1},relationTitle1:s,relationTitle2:d};n[a]===10&&(f.title=t.cleanupLabel(r[a++])),t.addRelation(f)},_=()=>{let e=[];for(;;){z[n[a]]===0&&o(`'ALPHA', 'NUM', 'COLON', 'UNIT', 'SPACE', 'BRKT', 'STYLE', 'PCT', 'LABEL'`);let t=r[a++];for(;z[n[a]]===1;)t+=r[a++];if(e.push(t),n[a]!==28)return e;a++}},v=e=>{n[a]===6&&t.setTooltip(e,r[a++])},y=e=>{let i=s(6),o=n[a]===6?r[a++]:void 0;n[a]===42?t.setLink(e,i,r[a++]):t.setLink(e,i),o!==void 0&&t.setTooltip(e,o)},b=()=>{let e=n[a];switch(e){case 53:case 27:case 52:case 54:g();return;case 18:m();return;case 22:f();return;case 23:a++;return;case 20:{a++;let e=c();s(21),t.addAnnotation(l(!0),e);return}case 40:{a++;let e=l(!0);t.setClickEvent(e,s(6)),v(e);return}case 41:a++,y(l(!0));return;case 43:{a++;let e=l(!0);if(n[a]===46){a++,y(e);return}let i=s(44);n[a]===45?t.setClickEvent(e,i,r[a++]):t.setClickEvent(e,i),v(e);return}case 47:{a++;let e=s(27);t.setCssStyle(e,_());return}case 48:{a++;let e=s(6);t.setCssClass(e,s(27));return}case 25:case 24:p();return;case 26:{a++;let e=[s(27)];for(;n[a]===28;)a++,e.push(s(27));t.defineClass(e,_());return}case 29:case 30:case 31:case 32:a++,t.setDirection(e===29?`TB`:e===30?`BT`:e===31?`RL`:`LR`);return;case 11:a++,t.setAccTitle(s(12).trim());return;case 13:a++,t.setAccDescription(s(14).trim());return;case 15:t.setAccDescription(r[a++].trim());return}o(`'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'NAMESPACE', 'ANNOTATION_START', 'CLASS', 'MEMBER', 'NOTE_FOR', 'NOTE', 'CLASSDEF', 'direction_tb', 'CALLBACK', 'LINK', 'CLICK', 'STYLE', 'CSSCLASS', 'ALPHA', 'MINUS', 'BQUOTE_STR'`)},x=n[a]===2;for(x&&(a++,s(3));b(),!(n[a]!==3||(a++,n[a]===4||n[a]===0)););x&&s(4),s(0)}var pe=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`];function U(e){return typeof e==`number`&&pe[e]||`none`}function me(e,t=!0){let n=[],r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=n=>{if(t||n===void 0)return n;let r=[],i=n,a;for(;i;){if(s.has(i)){a=s.get(i);break}let t=e.namespaces.get(i);if(t===void 0)break;if(t.explicit){a=i;break}r.push(i),i=t.parent}for(let e of r)s.set(e,a);return a},l=e=>e===void 0?-1:i.get(e)??-1;for(let r of e.namespaces.values())!t&&!r.explicit||(i.set(r.id,n.length),n.push({id:r.id,label:t?r.label:r.id,isGroup:!0,shape:`rect`,parentId:t?r.parent:void 0,parent:-1}));for(let e of n)e.parent=l(e.parentId);let u=0;for(let t of e.classes.values()){let e=c(t.parent);a.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`classBox`,parentId:e,parent:l(e),classNode:t,colorIndex:u++})}for(let t of e.notes.values()){let e=c(t.parent),i=t.class===void 0?void 0:a.get(t.class);i!==void 0&&r.push({id:`edgeNote${t.index}`,start:t.id,end:n[i].id,source:n.length,target:i,label:void 0,arrowTypeStart:`none`,arrowTypeEnd:`none`,startLabelRight:``,endLabelLeft:``,pattern:`dotted`,classes:`relation`}),n.push({id:t.id,label:t.text,isGroup:!1,shape:`note`,parentId:e,parent:l(e)})}for(let t of e.interfaces){let e=a.get(t.classId);o.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`interface`,parentId:void 0,parent:e===void 0?-1:n[e].parent})}let d=0;for(let t of e.relations){d++;let{type1:e,type2:n}=t.relation,i=e===M.LOLLIPOP&&n===`none`?o:a,s=i===a&&n===M.LOLLIPOP&&e===`none`?o:a;r.push({id:`id_${t.id1}_${t.id2}_${d}`,start:t.id1,end:t.id2,source:i.get(t.id1)??-1,target:s.get(t.id2)??-1,label:t.title,arrowTypeStart:U(e),arrowTypeEnd:U(n),startLabelRight:t.relationTitle1===`none`?``:t.relationTitle1,endLabelLeft:t.relationTitle2===`none`?``:t.relationTitle2,pattern:t.relation.lineType===1?`dashed`:`solid`,classes:`relation`})}return{nodes:n,edges:r}}var W=12,G=16,K=6,q=5;function he(e){switch(e){case`extension`:return W;case`composition`:case`aggregation`:return G;case`lollipop`:return 2*q;case`dependency`:return d(`arrow_point`)}return 0}function ge(e,t,r,i,a,o){let s=-a,c=i;switch(e){case`extension`:{let e=t-i*W,o=r-a*W;return`<path class="pele-marker" d="M${n(t)},${n(r)}L${n(e+s*K)},${n(o+c*K)}L${n(e-s*K)},${n(o-c*K)}Z" stroke-linejoin="round"/>`}case`composition`:case`aggregation`:{let l=t-i*G/2,u=r-a*G/2,d=K-1;return`<path class="pele-marker" d="M${n(t)},${n(r)}L${n(l+s*d)},${n(u+c*d)}L${n(t-i*G)},${n(r-a*G)}L${n(l-s*d)},${n(u-c*d)}Z" stroke-linejoin="round"${e===`composition`?` fill="${o}"`:``}/>`}case`lollipop`:return`<circle class="pele-marker" cx="${n(t-i*q)}" cy="${n(r-a*q)}" r="${q}"/>`;case`dependency`:return m(`arrow_point`,t,r,i,a,o)}return``}var _e=40,ve=16,ye=56,J=20,be=26,xe=12,Y=8,Se=6,Ce=10,we=64,X=8,Te=`var(--_l)`,Ee=new Set([`_self`,`_blank`,`_parent`,`_top`]);function De(e,t,n){let r=e[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}var Oe=[],ke=[];function Ae(e,t,n){let r=E(e.getDisplayDetails().displayText).trim();return{text:r,width:t.width(r,n,e.classifier===`*`?2:0),classifier:e.classifier}}function je(e,t,n){let r=r=>g(n,i=>Me(e,t,n,r,i));return h(e.direction)?_(n,r):r(!1)}function Me(d,m,h,g,_){let C=m.class??{},w=me(d,C.hierarchicalNamespaces!==!1),se=C.hideEmptyMembersBox===!0,T=h.fontSize??16,D=Math.round(T*.875),O=Math.round(T*.8),k=Math.round(O*1.4),A=h.measurer??oe(h.fontFamily),j=h.padding??8,M=(e,n)=>{if(!e.includes(`$$`))return;let r=c(e,!1,A,n,4e3);return r.lines.some(t)?r:void 0},ce=e=>e?M(e,O)?.width??A.width(E(e),O,0):0,N=g?`TB`:ne(d.direction),le=new Map,ue=new Map,P=new Map,de=e=>{let t=le.get(e);if(t===void 0){let n=i([e]);t=n.shape===``&&n.text===``?``:e.slice(0,e.indexOf(`:`)).trim().toLowerCase(),le.set(e,t)}t!==``&&P.set(t,e)},fe=e=>{P.clear();let t=ue.get(e.cssClasses);if(t===void 0){for(let t of e.cssClasses.split(` `)){let e=d.styleClasses.get(t);if(e)for(let t of e.styles)for(let e of t.split(`,`))de(e)}t=[...P],ue.set(e.cssClasses,t)}else for(let[e,n]of t)P.set(e,n);for(let t of e.styles)de(t);return i(P.size===0?ke:[...P.values()])},F=new Int32Array(w.nodes.length);for(let e of w.nodes)e.parent>=0&&F[e.parent]++;let I=new Uint8Array(w.nodes.length);for(let e of w.edges){if(e.source<0||e.target<0)continue;let t=w.nodes[e.source].parent,n=w.nodes[e.target].parent;if(t!==n){for(let e=t;e>=0&&I[e]===0;e=w.nodes[e].parent)I[e]=1;for(let e=n;e>=0&&I[e]===0;e=w.nodes[e].parent)I[e]=1}}let L=[],R=[];w.nodes.forEach((e,t)=>{let n,r;if(e.isGroup){let i=c(e.label,!1,A,T,4e3);n=z(e,i,0,0,T),F[t]>0?(r=S(0,0),r.isGroup=!0,r.padX=J,r.padTop=i.height>0?i.height+16:J,r.padBottom=J,r.minW=i.width+2*J-12+(I[t]===1&&!_?Math.min(i.width+24,240):0)):(n.w=Math.max(i.width+2*J,80),n.h=i.height+2*J,r=S(n.w,n.h))}else if(e.classNode)n=B(e,e.classNode),r=S(n.w,n.h);else if(e.shape===`note`){let t=c(e.label,!0,A,D,260);n=z(e,t,Math.max(t.width+2*xe,40),t.height+2*Y,D),r=S(n.w,n.h)}else{let t=c(e.label,!1,A,D,200);n=z(e,t,Math.max(t.width,12)+4,Math.max(t.height,12),D),r=S(n.w,n.h)}r.parent=e.parent,r.seq=t,L.push(n),R.push(r)});function z(e,t,n,r,a){return{node:e,style:i(ke),label:t,w:n,h:r,loops:0,annotations:ke,attributes:Oe,methods:Oe,titleH:0,attributesH:0,fontSize:a}}function B(e,t){let n=fe(t),r=n.fontSize??T,i=Math.round(r*.875),a=Math.round(i*1.5),o=t.type?`<`+v(t.type).replace(/</g,`<`).replace(/>/g,`>`)+`>`:``,s=c(t.label+o,!1,A,r,4e3,1|(n.italic?2:0)),l=t.annotations.length>0?t.annotations.map(e=>M(`«${e.trim()}»`,O)??`«${E(e).trim()}»`):ke,u=t.members.length>0?t.members.map(e=>Ae(e,A,i)):Oe,d=t.methods.length>0?t.methods.map(e=>Ae(e,A,i)):Oe,f=s.width,p=0;for(let e of l)f=Math.max(f,typeof e==`string`?A.width(e,O,0):e.width),p+=typeof e==`string`?k:Math.max(k,e.height);for(let e of u)f=Math.max(f,e.width);for(let e of d)f=Math.max(f,e.width);let m=!(se&&u.length===0&&d.length===0),h=e=>m?e>0?2*Se+e*a:Ce:0,g=2*Y+p+Math.max(s.height,Math.round(r*1.5)),_=h(u.length);return{node:e,style:n,label:s,w:Math.max(f+2*xe,we),h:g+_+h(d.length),loops:0,annotations:l,attributes:u,methods:d,titleH:g,attributesH:_,fontSize:r}}let V=[],H=[],pe=[],U=[],W=[],G=new Float64Array(L.length*4),K=(e,t,n)=>{G[e*4+t]++,n>G[e*4+t+1]&&(G[e*4+t+1]=n)};for(let e of w.edges){if(e.source<0||e.target<0)continue;let t=c(e.label,!0,A,D,200),n=ce(e.startLabelRight),r=ce(e.endLabelLeft);e.source===e.target?(L[e.source].loops++,R[e.source].w+=2*(be+(t.width>0?t.width+12:0))):(K(e.source,0,n),K(e.target,2,r)),U.push(n),W.push(r),H.push(e),pe.push(t),V.push({src:e.source,dst:e.target,minlen:1,labelW:t.width>0?t.width+12:0,labelH:t.height>0?t.height+4:0,route:[],labelX:0,labelY:0})}if(N===`TB`||N===`BT`)for(let e=0;e<L.length;e++){if(!L[e].node.classNode)continue;let t=0;for(let n=0;n<4;n+=2){let r=G[e*4+n],i=G[e*4+n+1];r>1&&(t=Math.max(t,(r-1)*(i>0?i+24:14)+24))}t=Math.min(t,480),t>L[e].w&&(R[e].w+=t-L[e].w,L[e].w=t)}let q=!1;for(let e=0;e<H.length&&!q;e++)q=U[e]>0||W[e]>0;let je=0;if(N===`TB`||N===`BT`){let e=e=>e?Math.max(k,M(e,O)?.height??0):0;for(let t of H)je=Math.max(je,e(t.startLabelRight)+e(t.endLabelLeft)-2*k)}let Me=te(R,V,N,{nodeSep:De(C,`nodeSpacing`,_e),edgeSep:ve,rankSep:De(C,`rankSpacing`,q?ye+16:ye)+je,portSep:20,apart:!0}),Ne=new Map,Pe=[],Fe=(e,t,n,r,i)=>{let a=e.route,o=R[n],s=ae(a,t,o);if(s<0)return;let c=(o.w-L[n].w)/2;s===1?a[t]-=c:s===3&&(a[t]+=c);let l=s&1,u=a[(t===0?3:t-3)+l],d=u-a[t+l],f={route:a,at:t,toward:u,order:i,room:r,side:s,after:l?d>0:d>=0},p=n*4+s,m=Ne.get(p);return m?m.push(f):Ne.set(p,[f]),f},Ie=[],Le=[];for(let e=0;e<V.length;e++){let t=V[e],n=t.src!==t.dst&&t.route.length>=6;Ie.push(n?Fe(t,0,t.src,U[e],e):void 0),Le.push(n?Fe(t,t.route.length-3,t.dst,W[e],e):void 0)}let Re=(e,t,n)=>{for(let r=R[e].parent,i=0;r>=0&&i<1e4;r=R[r].parent,i++){let e=R[r],i=Math.abs(t-e.x),a=Math.abs(n-e.y);if(Math.abs(a-e.h/2)<.5&&i<=e.w/2+.5||Math.abs(i-e.w/2)<.5&&a<=e.h/2+.5)return!0}return!1},ze=[];for(let[e,t]of Ne){if(t.length<2)continue;let n=e>>2,r=e&1,i=r?L[n].h:L[n].w;t.sort((e,t)=>e.toward-t.toward||e.order-t.order);let a=0;for(let e=0;e+1<t.length;e++){let n=t[e],i=t[e+1],o=r?20:24;n.room>0&&n.after&&(o+=r?k+6:n.room),i.room>0&&!i.after&&(o+=r?k+6:i.room),ze[e]=o,a+=o}let o=Math.min(1,(i-24)/a);if(o<=0)continue;let s=(r?R[n].y:R[n].x)-a*o/2;for(let e=0;e<t.length;e++){let{route:i,at:a}=t[e],c=a===0?3:-3,l=a+c,u=-1;for(let e=l;e>=0&&e<i.length&&Math.abs(i[e+r]-i[l+r])<.5;e+=c)if(Re(n,i[e],i[e+1])){u=e;break}if(u>=0&&Math.abs(i[l+r]-s)<=24)for(let e=l;e!==u+c;e+=c)i[e+r]=s;i[a+r]=s,s+=ze[e]*o}}let Be=(e,t,n,r)=>{if(t===void 0||n<=0)return;let i=t.side&1,a=r?0:e.length-3,o=a+1-i,s=Math.abs(e[(r?3:a-3)+1-i]-e[o]),c=Math.min(i?n+10:k+6,s*.35);if(c<4)return;let l=[e[a],e[a+1],e[a+2]];l[1-i]+=(t.side===0||t.side===3?-1:1)*c,e.splice(r?3:a,0,l[0],l[1],l[2])};for(let e=0;e<V.length;e++)Be(V[e].route,Ie[e],U[e],!0),Be(V[e].route,Le[e],W[e],!1);let Ve=0,He=0,Ue=Me.width,We=Me.height,Ge=(e,t,n,r,i,a)=>{if(!e)return;let o=M(e,O),s=o?Math.max(k,o.height):k,c=n,l=r;i&1?(c+=(i===3?-1:1)*(5+t/2),l+=(a?1:-1)*(7+s/2)):(c+=(a?1:-1)*(9+t/2),l+=(i===0?-1:1)*(3+s/2)),Pe.push({text:E(e),math:o,x:c,y:l}),Ve=Math.min(Ve,c-t/2),Ue=Math.max(Ue,c+t/2),He=Math.min(He,l-s/2),We=Math.max(We,l+s/2)},Ke=new Map,qe=new Int32Array(V.length);for(let e=0;e<V.length;e++){let t=V[e],n=H[e],r=t.route;if(t.src===t.dst){let r=Ke.get(t.src)??0;Ke.set(t.src,r+1),qe[e]=r;let i=R[t.src],a=L[t.src],o=i.x+a.w/2,s=Math.min(a.h/2-4,8+r*6);Ge(n.startLabelRight,U[e],o,i.y-s,1,!1),Ge(n.endLabelLeft,W[e],o,i.y+s,1,!0)}else if(r.length>=6){let t=r.length-3,i=Ie[e],a=Le[e];Ge(n.startLabelRight,U[e],r[0],r[1],i?i.side:2,!i||i.after),Ge(n.endLabelLeft,W[e],r[t],r[t+1],a?a.side:0,!a||a.after)}}let Z=j-Ve,Q=j-He,Je=Math.ceil(Ue-Ve+2*j),Ye=Math.ceil(We-He+2*j),Xe=[],Ze=new Map;if(w.nodes.length>0&&w.nodes[0].isGroup)for(let e of V)x(Ze,e.route);let Qe=``,$e=``,et=``;for(let e=0;e<L.length;e++){let t=L[e],r=R[e],i=t.node,o=r.x+Z,c=r.y+Q,u=s(i.id),d=r.isGroup?r.w:t.w,f=r.isGroup?r.h:t.h;if(i.isGroup){let i=r.isGroup?b(r,t.label.width,Ze,J):r.x,s=c-f/2+8+t.label.height/2,p=` class="pele-cluster-label" fill="var(--_m)"`,m=r.isGroup&&y(r,t.label.width,i,Ze);m&&($e+=ee(t.label,i+Z,s,p,u,w.nodes,e)),Qe+=`<g class="pele-cluster pele-namespace" data-id="${u}"><rect x="${n(o-d/2)}" y="${n(c-f/2)}" width="${n(d)}" height="${n(f)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${a}/>`+(m?``:l(t.label,i+Z,s,p))+`</g>`;continue}let p=` transform="translate(${n(o)},${n(c)})"`;if(i.classNode)et+=tt(t,i.classNode,u,p);else if(i.shape===`note`){let e=d/2,r=-f/2;et+=`<g class="pele-node pele-note" data-id="${u}"${p}><path d="M${n(-e)},${n(r)}H${n(e-X)}L${n(e)},${n(r+X)}V${n(-r)}H${n(-e)}Z" fill="var(--_a)" stroke="var(--_b)" stroke-linejoin="round"/><path d="M${n(e-X)},${n(r)}V${n(r+X)}H${n(e)}" fill="none" stroke="var(--_b)" stroke-linejoin="round"/>`+l(t.label,0,0,` class="pele-label" font-size="${D}"`,h.icons)+`</g>`}else et+=`<g class="pele-node pele-interface" data-id="${u}"${p}>`+l(t.label,0,0,` class="pele-label" font-size="${D}"`,h.icons)+`</g>`}function tt(t,r,i,a){let{w:c,h:d,style:f}=t,p=-c/2,m=-d/2,g=Math.round(t.fontSize*.875),_=Math.round(g*1.5),v=`<rect x="${n(p)}" y="${n(m)}" width="${n(c)}" height="${n(d)}" fill="var(--_s)" stroke="var(--_b)"${o(f.shape)}/>`,y=m+t.titleH,b=y+t.attributesH;if(d>t.titleH){let e=f.stroke?` style="stroke:${u(f.stroke)}"`:``;v+=`<path class="pele-divider" d="M${n(p)},${n(y)}H${n(-p)}M${n(p)},${n(b)}H${n(-p)}" fill="none" stroke="var(--_b)"${e}/>`}let x=m+Y;for(let e of t.annotations)if(typeof e==`string`)v+=`<text class="pele-annotation" x="0" y="${n(x+k/2+O*.35)}" text-anchor="middle" font-size="${O}" fill="var(--_m)">${u(e)}</text>`,x+=k;else{let t=Math.max(k,e.height);v+=l(e,0,x+t/2,` class="pele-annotation" font-size="${O}" fill="var(--_m)"`,h.icons),x+=t}let ee=t.fontSize===T?``:` font-size="${n(t.fontSize)}"`;v+=l(t.label,0,(x+y-Y)/2,` class="pele-label"${ee} font-weight="var(--_hw)"${f.text}`,h.icons);let te=(e,t,r)=>{let i=``,a=r+Se+_/2+g*.35;for(let r of e){let e=r.classifier===`$`?` pele-static"${f.text?f.text.slice(0,-1)+`text-decoration:underline"`:` style="text-decoration:underline"`}`:r.classifier===`*`?` pele-abstract" font-style="italic"${f.text}`:`"${f.text}`;i+=`<text class="pele-member pele-${t}${e} x="${n(p+xe)}" y="${n(a)}">${u(r.text)}</text>`,a+=_}return i};return(t.attributes.length>0||t.methods.length>0)&&(v+=`<g class="pele-members" font-size="${g}">${te(t.attributes,`attribute`,y)}${te(t.methods,`method`,b)}</g>`),r.tooltip&&(v=`<title>${s(r.tooltip)}</title>`+v),r.link&&(v=ie(v,r.link,r.id,Xe,h,r.linkTarget&&Ee.has(r.linkTarget)?` target="${r.linkTarget}"`:``)),`<g class="pele-node pele-class${e(r.cssClasses.replace(/^default\s?/,``))}" data-id="${i}"${a}>${v}</g>`}let nt=``,rt=``;for(let e=0;e<V.length;e++){let t=V[e],r=H[e],i=pe[e],a=r.arrowTypeStart,o=r.arrowTypeEnd,c=he(a),l=he(o),u;if(t.src===t.dst){let r=R[t.src],i=L[t.src],a=qe[e],o=r.x+Z+i.w/2,s=r.y+Q,d=Math.min(i.h/2-4,8+a*6),f=be+a*8;u={d:`M${n(o+c)},${n(s-d)}C${n(o+f+c)},${n(s-d)} ${n(o+f+l)},${n(s+d)} ${n(o+l)},${n(s+d)}`,sx:o,sy:s-d,sdx:-1,sdy:0,ex:o,ey:s+d,edx:-1,edy:0},t.labelX=r.x+i.w/2+f+4+t.labelW/2,t.labelY=r.y}else{let e=t.route;for(let t=0;t<e.length;t+=3)e[t]+=Z,e[t+1]+=Q;u=p(e,void 0,c,l)}let d=r.pattern===`dashed`?` stroke-dasharray="6 4"`:r.pattern===`dotted`?` stroke-dasharray="2 4"`:``;if(nt+=`<g class="pele-edge${r.pattern===`dotted`?` pele-note-edge`:` pele-relation`}" data-id="${s(r.id)}"><path d="${u.d}"${d}/>`+ge(a,u.sx,u.sy,u.sdx,u.sdy,Te)+ge(o,u.ex,u.ey,u.edx,u.edy,Te)+`</g>`,i.width>0){let e=t.labelX+Z,n=t.labelY+Q;rt+=f(r.id,i,e,n,``,h.icons)}}let it=``;for(let e of Pe)it+=e.math?l(e.math,e.x+Z,e.y+Q,` class="pele-cardinality"`,h.icons):`<text class="pele-cardinality" x="${n(e.x+Z)}" y="${n(e.y+Q+O*.35)}" text-anchor="middle">${u(e.text)}</text>`;let $=re(d.title,A,T,j,Je,Ye,(Qe?`<g class="pele-clusters">${Qe}</g>`:``)+(nt?`<g class="pele-edges" fill="none" stroke="${Te}" stroke-linecap="round">${nt}</g>`:``)+($e?`<g class="pele-cluster-titles">${$e}</g>`:``)+(rt?`<g class="pele-edge-labels" font-size="${D}">${rt}</g>`:``)+(it?`<g class="pele-cardinalities" font-size="${O}" fill="var(--_m)">${it}</g>`:``)+`<g class="pele-nodes">${et}</g>`);return{svg:r(`class`,$.width,$.height,T,h,d,$.content),width:$.width,height:$.height,links:Xe}}var Ne={type:`class`,math:!0,parse(e,t,n){let r=new ue;return n&&(r.title=n),H(e,r),r},render:je};export{Ne as classDiagram};
|
|
5
|
-
//# sourceMappingURL=75O6YZUN-
|
|
5
|
+
//# sourceMappingURL=75O6YZUN-xx4y2KbP.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{f as e,g as t,m as n,p as r}from"./lazy-
|
|
1
|
+
import{f as e,g as t,m as n,p as r}from"./lazy-B292152Q.js";var i=/[&<>"\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/,a=/[&<>"]|[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]+/g,o={"&":`&`,"<":`<`,">":`>`,'"':`"`};function s(e){return i.test(e)?e.replace(a,e=>o[e]??``):e}function c(e){return s(n(e))}var l=[];for(let e=0;e<100;e++)l.push(e===0?``:e%10==0?`.`+e/10:`.`+(e<10?`0`+e:e));function u(e){let t=Math.round(e*100);if(t===0)return`0`;if(t>0){if(t<1e11){let e=Math.floor(t/100);return e+l[t-e*100]}}else if(t>-1e11){let e=-t,n=Math.floor(e/100);return`-`+n+l[e-n*100]}return String(t/100)}function d(e,t,n,r,i){let a=e.lines;if(a.length===0)return``;let o=e.lineHeight,l=e.heights,d=e.size*.35,f=n-e.height/2,p=a.length===1&&a[0].length===1?a[0][0]:void 0;if(p&&p.icon===void 0&&p.math===void 0&&p.style===0)return`<text${r} x="${u(t)}" y="${u(f+o/2+d)}" text-anchor="middle">${s(p.text)}</text>`;let m=S(e),h=r,g;r=C(r,m);let y=``,b=``;for(let n=0;n<a.length;n++){let r=a[n],p=l?l[n]:o,S=f+p/2,C=S+d,w=!1;for(let e of r)(e.icon!==void 0||e.math)&&(w=!0);if(w){let a=t-e.widths[n]/2;for(let t of r){if(t.math){let n=`x="${u(a)}" y="${u(S-t.math.height/2)}" width="${u(t.math.width)}" height="${u(t.math.height)}"`;g??=_(h),b+=g.halo===void 0?v(t.math,n,e.size,g.attrs):`<rect ${n} rx="2" fill="${g.halo}"/>`}else if(t.icon!==void 0){let n=e.size*1.1,r=i?.(t.icon)??``;b+=`<svg class="pele-icon" data-icon="${c(t.icon)}" x="${u(a)}" y="${u(S-n/2)}" width="${u(n)}" height="${u(n)}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${r}</svg>`}else t.text!==``&&(y+=`<tspan x="${u(a)}" y="${u(C)}" text-anchor="start"${x(t.style&~m)}>${s(t.text)}</tspan>`);a+=t.width}}else{for(let e=0;e<r.length;e++){let n=r[e],i=e===0?` x="${u(t)}" y="${u(C)}"`:``;y+=`<tspan${i}${x(n.style&~m)}>${s(n.text)}</tspan>`}r.length===0&&(y+=`<tspan x="${u(t)}" y="${u(C)}"> </tspan>`)}f+=p}return`<text${r} text-anchor="middle" xml:space="preserve">${y}</text>${b}`}var f=/ fill="([^"]*)"/,p=/ stroke="([^"]*)"/,m=/ style="([^"]*)"/,h=/(?:^|;)\s*fill:([^;]*)/,g=/(?:^|;)\s*opacity:([^;]*)/;function _(e){let t=m.exec(e)?.[1]??``,n=(h.exec(t)?.[1]??f.exec(e)?.[1]??``).trim();if(n===`none`)return{attrs:``,halo:p.exec(e)?.[1]??`none`};let r=g.exec(t)?.[1].trim();return{attrs:(n===``?``:` color="${n}"`)+(r?` opacity="${r}"`:``)}}function v(e,t,n,r){return`svg`in e?`<svg class="pele-math" ${t} overflow="visible"${r}>${e.svg}</svg>`:`<foreignObject class="pele-math" ${t} overflow="visible"${r}><div xmlns="http://www.w3.org/1999/xhtml" style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:${u(n)}px;line-height:normal;white-space:nowrap">${e.html}</div></foreignObject>`}var y=` font-weight="var(--_w)"`,b=` font-style="italic"`;function x(e){return(e&1?y:``)+(e&2?b:``)}function S(e){let t=3,n=!1;for(let r of e.lines)for(let e of r)e.icon!==void 0||e.text===``||(t&=e.style,n=!0);return n?t:0}function C(e,t){return e+(t&1&&!e.includes(` font-weight="`)?y:``)+(t&2&&!e.includes(` font-style="`)?b:``)}var w=1.5,ee=/<br\s*\/?>|\\n|\n/gi,T=/<\/?([a-zA-Z][\w-]*)(?:\s[^<>]*)?\/?>/y,E=/(fa[bklrs]?):fa-([\w-]+)/g,te=/[<\\\n*_]|fa[bklrs]?:fa-/,D=`\\u2e80-\\u9fff\\uf900-\\ufaff\\uff00-\\uff60`,O=`、。,.:;!?)]}」』】〕〉》〙〗ー…‥・ゝゞぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮ,.:;!?)\\]}`,k=`([{「『【〔〈《〘〖([{`,A=RegExp(`[${D}]`),j=RegExp(`\\s*(?:[${k}]*[${D}][${O}]*|[^\\s${D}]+[${O}]*)\\s*|\\s+`,`g`),M=57344,N=6400,ne=/\$\$(.+?)\$\$/g,P=/[\ue000-\uf8ff]/,re=/([\ue000-\uf8ff])/,F,ie={lines:[],widths:[],width:0,height:0,size:0,lineHeight:0};function ae(e){let t=e.split(`
|
|
2
2
|
`),n=1/0;for(let e of t){if(e.trim()===``)continue;let t=e.length-e.trimStart().length;t<n&&(n=t)}return n===1/0||n===0?e:t.map(e=>e.slice(Math.min(n,e.length-e.trimStart().length))).join(`
|
|
3
3
|
`)}function I(e){return e!==void 0&&e.icon===void 0&&e.math===void 0}function L(e,t,n){if(t!==``){if(F!==void 0&&P.test(t)){let r=F,i=t.split(re);for(let t=0;t<i.length;t++){if(t%2==0){i[t]!==``&&R(e,i[t],n);continue}let a=i[t].charCodeAt(0)-M,o=r.math[a];o?e.push({text:``,style:n,math:o,width:o.width}):R(e,`$$${r.tex[a]}$$`,n)}return}R(e,t,n)}}function R(e,t,r){let i=n(t),a=e[e.length-1];I(a)&&a.style===r?a.text+=i:e.push({text:i,style:r,width:0})}function z(e,n,r){if(!n.includes(`:fa-`)){L(e,n,r);return}let i=0;E.lastIndex=0;let a;for(;(a=E.exec(n))!==null;){let o=`${a[1]}:fa-${a[2]}`;if(L(e,n.slice(i,a.index),r),i=a.index+a[0].length,t(o)!==``)e.push({text:``,style:r,icon:o,width:0});else if(n[i]===` `)i++;else if(i===n.length){let t=e[e.length-1];I(t)&&(t.text=t.text.trimEnd())}}L(e,n.slice(i),r)}function B(e,t,n,r,i){let a=i,o=0,s=``,c=0,l=t.length,u=()=>{z(e,s,a),s=``};for(;c<l;){let e=t[c];if(e===`<`){T.lastIndex=c;let e=T.exec(t);if(e&&e.index===c){let n=e[1].toLowerCase(),o=t[c+1]===`/`,s=n===`b`||n===`strong`?1:n===`i`||n===`em`?2:0;s&&(u(),i=o?i&~s|r&s:i|s,a=o?a&~s|r&s:a|s),c+=e[0].length;continue}}else if(n&&(e===`*`||e===`_`)){let n=t[c+1]===e,i=n?1:2,s=n?2:1,d=(o&i)===0,f=c>0?t[c-1]:` `,p=c+s<l?t[c+s]:` `,m=d&&p.trim()!==``&&t.indexOf(n?e+e:e,c+s)!==-1,h=!d&&f.trim()!==``,g=e===`_`&&/\w/.test(f)&&/\w/.test(p);if((m||h)&&!g){u(),o=m?o|i:o&~i,a=m?a|i:a&~i|r&i,c+=s;continue}}s+=e,c++}return u(),i}function V(e,t,n){let r=0;for(let i of e)i.width=i.icon===void 0?i.math?i.math.width:t.width(i.text,n,i.style):n*1.25,r+=i.width;return r}function H(e,t,n,r,i,a){let o=[],s=0,c=()=>{let e=o[o.length-1];if(I(e)){let r=e.text.trimEnd();if(r!==e.text){e.text=r;let i=t.width(r,n,e.style);s+=i-e.width,e.width=i}}i.push(o),a.push(s),o=[],s=0};for(let i of e){if(i.icon!==void 0||i.math){let e=i.math?i.math.width:n*1.25;s>0&&s+e>r&&c(),o.push({...i,width:e}),s+=e;continue}for(let e of i.text.match(j)??[]){let a=e;s>0&&s+t.width(a.trimEnd(),n,i.style)>r&&(c(),a=a.trimStart());let l=o[o.length-1];if(I(l)&&l.style===i.style){l.text+=a,l.width=t.width(l.text,n,l.style),s=0;for(let e of o)s+=e.width}else{let e=t.width(a,n,i.style);o.push({text:a,style:i.style,width:e}),s+=e}}}(o.length>0||i.length===0)&&c()}function U(t,i,a,o,s,c=0){if(t===void 0||t===``)return ie;let l=Math.round(o*w);if(e()&&t.includes(`$$`)&&!P.test(t)){let e={tex:[],math:[]},u=t.replace(ne,(t,n)=>e.tex.length===N?t:(e.tex.push(n),String.fromCharCode(M+e.tex.length-1)));if(e.tex.length>0){for(let t of e.tex)e.math.push(r(n(t),o));return W(u,i,a,o,s,c,l,e)}}if(!te.test(t)&&!t.includes(`&`)&&!t.includes(`fl`)){let e=t.trim(),n=a.width(e,o,c);if(n<=s||!(e.includes(` `)||A.test(e)))return{lines:[[{text:e,style:c,width:n}]],widths:[n],width:n,height:l,size:o,lineHeight:l};let r=[],i=[];H([{text:e,style:c,width:n}],a,o,s,r,i);let u=0;for(let e of i)e>u&&(u=e);return{lines:r,widths:i,width:u,height:r.length*l,size:o,lineHeight:l}}return W(t,i,a,o,s,c,l)}function W(e,t,n,r,i,a,o,s){let c=F;F=s;try{let c=G(e,t,n,r,i,a,o);return s?K(c):c}finally{F=c}}function G(e,t,n,r,i,a,o){let s=t?ae(e.replace(/\r\n?/g,`
|
|
4
4
|
`)).trim():e.trim(),c=[],l=[],u=0,d=a;for(let e of s.split(ee)){let o=[];d=B(o,e.trim(),t,a,d);let s=V(o,n,r);s>i?H(o,n,r,i,c,l):(c.push(o),l.push(s))}for(let e of l)e>u&&(u=e);return{lines:c,widths:l,width:u,height:c.length*o,size:r,lineHeight:o}}function K(e){let t;for(let n=0;n<e.lines.length;n++){let r=e.lineHeight;for(let t of e.lines[n])t.math&&(r=Math.max(r,Math.ceil(t.math.height+e.size/4)));r!==e.lineHeight&&t===void 0&&(t=e.lines.map(()=>e.lineHeight)),t&&(t[n]=r)}if(t===void 0)return e.heights===void 0?e:{...e,heights:void 0,height:e.lines.length*e.lineHeight};let n=0;for(let e of t)n+=e;return{...e,heights:t,height:n}}function q(e){for(let t of e)if(t.math)return!0;return!1}function J(e,t){let n=e.heights;if(!n)return(t+.5)*e.lineHeight;let r=0;for(let e=0;e<t;e++)r+=n[e];return r+n[t]/2}function oe(e,t){let n=e.widths[t],r=e.heights?e.heights[t]:e.lineHeight,i={lines:[e.lines[t]],widths:[n],width:n,height:r,size:e.size,lineHeight:e.lineHeight};return r!==e.lineHeight&&(i.heights=[r]),i}var se=`--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg)`,ce=`var(--_fm)`,le=`var(--pele-radius,4px)`,Y=` style="rx:var(--_r)"`;function ue(e){let t=e.indexOf(` style="`);return t<0?e+Y:`${e.slice(0,t+8)}rx:var(--_r);${e.slice(t+8)}`}var de=`var(--pele-critical,#e45756)`,X=String.raw`(?:"[^"'\\\n<>{}();:@]*"|'[^"'\\\n<>{}();:@]*'|[\p{L}\p{N}_-][\p{L}\p{N}_ .-]*)`,fe=new RegExp(String.raw`^\s*${X}(?:\s*,\s*${X})*\s*$`,`u`);function Z(e,t){return e&&fe.test(e)?e:t}function pe(e,t,n){return`;--_fm:var(--pele-font-mono,${Z(n,`monospace`)});font:${e}px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,${Z(t,`sans-serif`)})`}var me=new Set([`fill`,`fill-opacity`,`stroke`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`opacity`,`rx`,`ry`]),Q=new Set([`color`,`font-size`,`font-family`,`font-weight`,`font-style`,`text-decoration`,`letter-spacing`,`word-spacing`,`opacity`]),he=/url\s*\(|expression\s*\(|javascript:|[<>{};\\]|@import|image-set|\/\*/i,$={shape:``,line:``,text:``,stroke:void 0,bold:!1,italic:!1,fontSize:void 0};function ge(e){if(e.length===0)return $;let t=new Map,n=new Map;for(let r of e){let e=r.indexOf(`:`);if(e<=0)continue;let i=r.slice(0,e).trim().toLowerCase(),a=r.slice(e+1).replace(/!important/gi,``).trim();a===``||he.test(a)||(me.has(i)&&t.set(i,a),Q.has(i)&&n.set(i===`color`?`fill`:i,a))}if(t.size===0&&n.size===0)return $;let r=``,i=``;for(let[e,n]of t)r+=`${e}:${n};`,e!==`fill`&&e!==`fill-opacity`&&(i+=`${e}:${n};`);let a=``;for(let[e,t]of n)a+=`${e}:${t};`;let o=n.get(`font-weight`),c=n.get(`font-size`),l=c&&/^[\d.]+(px)?$/.test(c)?parseFloat(c):void 0;return{shape:r?` style="${s(r)}"`:``,line:i?` style="${s(i)}"`:``,text:a?` style="${s(a)}"`:``,stroke:t.get(`stroke`),bold:o===`bold`||o===`bolder`||Number(o)>=600,italic:n.get(`font-style`)===`italic`,fontSize:l!==void 0&&l>0&&l<=200?l:void 0}}var _e=/[^\w-]+/g;function ve(e){let t=e.replace(_e,` `).trim();return t===``?``:` `+t}var ye=[`#4c78a8`,`#f58518`,`#54a24b`,`#e45756`,`#72b7b2`,`#eeca3b`,`#b279a2`,`#9d755d`];function be(e){let t=(e%8+8)%8;return`var(--pele-series-${t+1},${ye[t]})`}var xe=[[`tw`,`title`],[`hw`,`heading`],[`w`,`bold`]],Se=/var\(--_(r|tw|hw|w)\)/g;function Ce(e,t,n,r,i,a,o){let l=s(i.idPrefix??`pele`),u=``,d=``;a.accTitle&&(u+=`<title id="${l}-title">${c(a.accTitle)}</title>`,d+=` aria-labelledby="${l}-title"`),a.accDescr&&(u+=`<desc id="${l}-desc">${c(a.accDescr)}</desc>`,d+=` aria-describedby="${l}-desc"`);let f=i.responsive===!1?``:`max-width:100%;height:auto;`,p=new Set;for(let[,e]of o.matchAll(Se))if(p.add(e),p.size===4)break;let m=p.has(`r`)?`;--_r:${le}`:``;for(let[e,t]of xe)p.has(e)&&(m+=`;--_${e}:var(--pele-${t}-weight,bold)`);return`<svg xmlns="http://www.w3.org/2000/svg" class="pele pele-${e}" viewBox="0 0 ${t} ${n}" width="${t}" height="${n}" style="${f}${se}${m}${s(pe(r,i.fontFamily,i.fontFamilyMono))}" fill="var(--_fg)" role="graphics-document document" aria-roledescription="${e}"${d}>`+u+o+`</svg>`}export{ve as _,x as a,q as b,de as c,be as d,u as f,Ce as g,J as h,K as i,ge as l,Y as m,oe as n,ue as o,S as p,c as r,U as s,d as t,ce as u,C as v,s as y};
|
|
5
|
-
//# sourceMappingURL=77XECAW3-
|
|
5
|
+
//# sourceMappingURL=77XECAW3-SIARa2Fi.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as e,o as t}from"./77XECAW3-ECBcD47O.js";var n=12,r=(e,t,r)=>(r?t:e)-2*n,i=e=>(t,r,i)=>i?0:t-2*e(r)-2*n;function a(e,t,n){let r=Math.min(1,Math.abs(e)/t);return n*(1-Math.sqrt(1-r*r))}var o=(e,t,n,r)=>n&1?a(r,t/2,e/2):a(r,e/2,t/2),s=(e,t,n)=>(n?t:e)*.6,c=(e,t,n,r)=>n&1?0:a(r,e/2,Math.min(12,Math.max(6,e/14))),l=(e,t)=>()=>({w:e,h:t,dy:0});function u(e,t,n){let r=Math.max(1.6*e+40,80),i=(t+10)/(1-(e+8)/r),a=i/2-10-t/2;return{w:r,h:i,dy:n?-a:a}}function d(e,t){return`<path d="${e}"${t}/>`}var f=(e,t,n)=>n&1?t/8:0,p=(e,t)=>({w:Math.max(e+36,48),h:t+24,dy:0});function m(t,n){let r=``;for(let n=0;n<t.length;n+=2)r+=(n?` `:``)+e(t[n])+`,`+e(t[n+1]);return`<polygon points="${r}"${n}/>`}function h(t,n,r,i=``){return`<rect x="${e(-t/2)}" y="${e(-n/2)}" width="${e(t)}" height="${e(n)}"${i}${r}/>`}var g={rect:{size:p,span:r,draw:(e,n,r)=>h(e,n,t(r))},rounded:{size:p,span:r,draw:(t,n,r)=>h(t,n,r,` rx="${e(Math.min(12,n/2))}"`)},stadium:{inset:(e,t,n,r)=>n&1?a(r,t/2,t/2):0,span:(e,t,n)=>n?t*.6:e-t,size:(e,t)=>{let n=t+24;return{w:e+n*.5+36-8,h:n,dy:0}},draw:(t,n,r)=>h(t,n,r,` rx="${e(n/2)}"`)},"fr-rect":{span:r,size:(e,t)=>({w:e+36+16,h:t+24,dy:0}),draw:(n,r,i,a)=>{let o=n/2-8;return h(n,r,t(i))+`<path d="M${e(-o)},${e(-r/2)}V${e(r/2)}M${e(o)},${e(-r/2)}V${e(r/2)}" fill="none"${a}/>`}},cyl:{inset:c,span:(e,t,r)=>r?t-2*n-12:e*.6,size:(e,t)=>{let n=Math.max(e+36,56),r=Math.min(12,Math.max(6,n/14));return{w:n,h:t+24+2*r,dy:r/2}},draw:(t,n,r,i)=>{let a=t/2,o=Math.min(12,Math.max(6,t/14)),s=-n/2+o,c=n/2-o;return`<path d="M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 1 ${e(a)},${e(s)}V${e(c)}A${e(a)},${e(o)} 0 0 1 ${e(-a)},${e(c)}Z"${r}/><path d="M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 0 ${e(a)},${e(s)}" fill="none"${i}/>`}},circle:{inset:o,span:s,size:(e,t)=>{let n=Math.max(Math.sqrt(e*e+t*t)+16,44);return{w:n,h:n,dy:0}},draw:(t,n,r)=>`<circle r="${e(t/2)}"${r}/>`},"dbl-circ":{inset:o,span:s,size:(e,t)=>{let n=Math.max(Math.sqrt(e*e+t*t)+26,54);return{w:n,h:n,dy:0}},draw:(t,n,r,i)=>`<circle r="${e(t/2)}"${r}/><circle r="${e(t/2-5)}" fill="none"${i}/>`},ellipse:{inset:o,span:s,size:(e,t)=>({w:e*1.3+36,h:t*1.2+24,dy:0}),draw:(t,n,r)=>`<ellipse rx="${e(t/2)}" ry="${e(n/2)}"${r}/>`},diam:{inset:(e,t,n,r)=>n&1?Math.abs(r)*e/t:Math.abs(r)*t/e,span:(e,t,n)=>(n?t:e)*.6,size:(e,t)=>{let n=e+16,r=t+8;return{w:n+1.6*r,h:n/1.6+r,dy:0}},draw:(e,t,n)=>m([0,-t/2,e/2,0,0,t/2,-e/2,0],n)},hex:{inset:(e,t,n,r)=>n&1?Math.abs(r)/2:0,span:(e,t,r)=>r?t*.5:e-t/2-n,size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2-r,-t/2,e/2,0,e/2-r,t/2,-e/2+r,t/2,-e/2,0],n)}},odd:{inset:(e,t,n)=>n===3?t/4:0,span:i(()=>0),size:(e,t)=>{let n=t+24;return{w:e+36+n/4,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2,-t/2,e/2,t/2,-e/2,t/2,-e/2+r,0],n)}},"lean-r":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2,-t/2,e/2-r,t/2,-e/2,t/2],n)}},"lean-l":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2-r,-t/2,e/2,t/2,-e/2+r,t/2],n)}},"trap-b":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2-r,-t/2,e/2,t/2,-e/2,t/2],n)}},"trap-t":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2,-t/2,e/2-r,t/2,-e/2+r,t/2],n)}},text:{span:r,size:(e,t)=>({w:e+8,h:t+8,dy:0}),draw:(e,t)=>h(e,t,` fill="none" stroke="none"`)},"sm-circ":{noLabel:!0,inset:o,span:s,size:l(14,14),draw:(t,n,r)=>`<circle r="${e(t/2)}"${r}/>`},"f-circ":{noLabel:!0,inset:o,span:s,size:l(14,14),draw:(t,n,r,i)=>`<circle r="${e(t/2)}" fill="var(--_l)"${i}/>`},"fr-circ":{noLabel:!0,inset:o,span:s,size:l(18,18),draw:(t,n,r,i)=>`<circle r="${e(t/2)}"${r}/><circle r="${e(t/2-4)}" fill="var(--_l)"${i}/>`},fork:{noLabel:!0,span:(e,t,n)=>(n?t:e)-8,size:l(72,8),draw:(e,t,n,r)=>h(e,t,` fill="var(--_l)"${r}`,` rx="2"`)},"notch-rect":{size:p,span:r,draw:(e,t,n)=>m([-e/2+10,-t/2,e/2,-t/2,e/2,t/2,-e/2,t/2,-e/2,-t/2+10],n)},"lin-rect":{span:r,size:(e,t)=>({w:e+36+8,h:t+24,dy:0}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2+8)},${e(-r/2)}V${e(r/2)}" fill="none"${a}/>`},"div-rect":{span:r,size:(e,t)=>({w:e+36,h:t+24+8,dy:4}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+8)}H${e(n/2)}" fill="none"${a}/>`},"win-pane":{span:r,size:(e,t)=>({w:e+36+8,h:t+24+8,dy:4}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2+8)},${e(-r/2)}V${e(r/2)}M${e(-n/2)},${e(-r/2+8)}H${e(n/2)}" fill="none"${a}/>`},tri:{inset:(e,t,n)=>n&1?e/4:0,size:(e,t)=>u(e,t,!1),draw:(e,t,n)=>m([0,-t/2,e/2,t/2,-e/2,t/2],n)},"flip-tri":{inset:(e,t,n)=>n&1?e/4:0,size:(e,t)=>u(e,t,!0),draw:(e,t,n)=>m([-e/2,-t/2,e/2,-t/2,0,t/2],n)},"sl-rect":{inset:(e,t,n)=>n===0?5:0,size:(e,t)=>({w:e+36,h:t+24+10,dy:5}),draw:(e,t,n)=>m([-e/2,-t/2+10,e/2,-t/2,e/2,t/2,-e/2,t/2],n)},"notch-pent":{span:r,size:(e,t)=>({w:e+36,h:t+24,dy:0}),draw:(e,t,n)=>m([-e/2+10,-t/2,e/2-10,-t/2,e/2,-t/2+10,e/2,t/2,-e/2,t/2,-e/2,-t/2+10],n)},hourglass:{noLabel:!0,inset:(e,t,n)=>n&1?e/2:0,size:l(32,40),draw:(e,t,n)=>m([-e/2,-t/2,e/2,-t/2,-e/2,t/2,e/2,t/2],n)},delay:{size:(e,t)=>{let n=t+24;return{w:e+36+n/4,h:n,dy:0}},draw:(t,n,r)=>{let i=n/2;return`<path d="M${e(-t/2)},${e(-i)}H${e(t/2-i)}A${e(i)},${e(i)} 0 0 1 ${e(t/2-i)},${e(i)}H${e(-t/2)}Z"${r}/>`}},"h-cyl":{size:(e,t)=>{let n=t+24,r=Math.min(12,n/4);return{w:e+36+2*r,h:n,dy:0}},draw:(t,n,r,i)=>{let a=n/2,o=Math.min(12,n/4),s=-t/2+o,c=t/2-o;return`<path d="M${e(s)},${e(-a)}H${e(c)}A${e(o)},${e(a)} 0 0 1 ${e(c)},${e(a)}H${e(s)}A${e(o)},${e(a)} 0 0 1 ${e(s)},${e(-a)}Z"${r}/><path d="M${e(c)},${e(-a)}A${e(o)},${e(a)} 0 0 0 ${e(c)},${e(a)}" fill="none"${i}/>`}},"cross-circ":{noLabel:!0,inset:o,span:s,size:l(44,44),draw:(t,n,r,i)=>{let a=t/2,o=a*Math.SQRT1_2;return`<circle r="${e(a)}"${r}/><path d="M${e(-o)},${e(-o)}L${e(o)},${e(o)}M${e(o)},${e(-o)}L${e(-o)},${e(o)}" fill="none"${i}/>`}},"st-rect":{span:(e,t,r)=>(r?t:e)-2*n-8,size:(e,t)=>({w:e+36+8,h:t+24+8,dy:4}),draw:(n,r,i)=>{let a=n-8,o=r-8,s=``;for(let c=0;c<3;c++){let l=-n/2+(2-c)*4,u=-r/2+c*4;s+=`<rect x="${e(l)}" y="${e(u)}" width="${e(a)}" height="${e(o)}"${t(i)}/>`}return s}},doc:{inset:(e,t,n)=>n===2?10:0,size:(e,t)=>({w:e+36,h:t+24+10,dy:-5}),draw:(e,t,n)=>v(e,t,n)},flag:{inset:(e,t,n)=>n&1?0:8,size:(e,t)=>({w:e+36,h:t+24+16,dy:0}),draw:(t,n,r)=>{let i=t/2,a=n/2-8,o=t/4;return`<path d="M${e(-i)},${e(-a)}q${e(o)},-10 ${e(2*o)},0t${e(2*o)},0V${e(a)}q${e(-o)},10 ${e(-2*o)},0t${e(-2*o)},0Z"${r}/>`}},datastore:{size:p,span:r,draw:(t,n,r,i)=>h(t,n,r.replace(`stroke="var(--_b)"`,`stroke="none"`))+`<path d="M${e(-t/2)},${e(-n/2)}H${e(t/2)}M${e(-t/2)},${e(n/2)}H${e(t/2)}" fill="none"${i}/>`},folder:{size:(e,t)=>({w:Math.max(e+36,64),h:t+24+8,dy:4}),draw:(t,n,r)=>{let i=t/2,a=n/2,o=Math.min(t*.4,48);return d(`M${e(-i)},${e(-a)}H${e(-i+o)}L${e(-i+o+8)},${e(-a+8)}H${e(i)}V${e(a)}H${e(-i)}Z`,r)}},bucket:{size:(e,t)=>({w:e+36+20,h:t+24+10,dy:3}),inset:(e,t,n)=>n&1?t/12:0,draw:(t,n,r,i)=>{let a=t/2,o=n/2,s=n/6;return d(`M${e(-a)},${e(-o+5)}A${e(a)},${e(5)} 0 0 1 ${e(a)},${e(-o+5)}L${e(a-s)},${e(o-5)}A${e(a-s)},${e(5)} 0 0 1 ${e(-a+s)},${e(o-5)}Z`,r)+`<path d="M${e(-a)},${e(-o+5)}A${e(a)},${e(5)} 0 0 0 ${e(a)},${e(-o+5)}" fill="none"${i}/>`}},console:{span:r,size:(e,t)=>({w:Math.max(e+36,72),h:t+24+12,dy:6}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+12)}H${e(n/2)}M${e(-n/2+7)},${e(-r/2+4)}l3,2.5l-3,2.5M${e(-n/2+13)},${e(-r/2+9)}h4" fill="none"${a}/>`},browser:{span:r,size:(e,t)=>({w:Math.max(e+36,72),h:t+24+12,dy:6}),draw:(n,r,i,a)=>{let o=``;for(let t=0;t<3;t++)o+=`<circle cx="${e(-n/2+8+t*7)}" cy="${e(-r/2+6)}" r="1.5" fill="none"${a}/>`;return h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+12)}H${e(n/2)}" fill="none"${a}/>`+o}},person:{size:(e,t)=>({w:Math.max(e+36,56),h:t+24+26,dy:13}),draw:(t,n,r)=>{let i=-n/2;return`<rect x="${e(-t/2)}" y="${e(i+26)}" width="${e(t)}" height="${e(n-26)}" rx="12"${r}/><circle cy="${e(i+14)}" r="13"${r}/>`}},bang:{size:(e,t)=>({w:e+36+28,h:t+24+24,dy:0}),inset:()=>3,draw:(e,t,n)=>{let r=[];for(let n=0;n<28;n++){let i=Math.PI*n/14-Math.PI/2,a=n%2==0?1:.82;r.push(e/2*Math.cos(i)*a,t/2*Math.sin(i)*a)}return m(r,n)}},cloud:{size:(e,t)=>({w:e+36+32,h:t+24+24,dy:0}),inset:(e,t,n)=>n&1?2:1,draw:(t,n,r)=>{let i=t/2,a=n/2,o=a*.55;return d(`M${e(-i+o)},${e(a)}A${e(o)},${e(o)} 0 0 1 ${e(-i+o*.6)},${e(-a*.1)}A${e(i*.42)},${e(a*.7)} 0 0 1 ${e(-i*.1)},${e(-a*.72)}A${e(i*.4)},${e(a*.62)} 0 0 1 ${e(i*.62)},${e(-a*.42)}A${e(o*1.05)},${e(o*1.05)} 0 0 1 ${e(i-o)},${e(a)}Z`,r)}},brace:{size:(e,t)=>({w:e+36+12,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(-e/2+12,t,-1,r)},"brace-r":{size:(e,t)=>({w:e+36+12,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(e/2-12,t,1,r)},braces:{size:(e,t)=>({w:e+36+24,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(-e/2+12,t,-1,r)+_(e/2-12,t,1,r)},bolt:{noLabel:!0,size:l(36,56),inset:(e,t,n)=>n&1?e/4:0,draw:(e,t,n)=>m([e*.15,-t/2,-e/2,t*.08,-e*.05,t*.08,-e*.15,t/2,e/2,-t*.08,e*.05,-t*.08],n)},"lin-cyl":{inset:c,span:(e,t,r)=>r?t-2*n-20:e*.6,size:(e,t)=>{let n=Math.max(e+36,56),r=Math.min(12,Math.max(6,n/14));return{w:n,h:t+24+2*r+8,dy:r/2+4}},draw:(t,n,r,i)=>{let a=t/2,o=Math.min(12,Math.max(6,t/14)),s=-n/2+o,c=n/2-o,l=t=>`M${e(-a)},${e(t)}A${e(a)},${e(o)} 0 0 0 ${e(a)},${e(t)}`;return d(`M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 1 ${e(a)},${e(s)}V${e(c)}A${e(a)},${e(o)} 0 0 1 ${e(-a)},${e(c)}Z`,r)+`<path d="${l(s)}${l(s+8)}" fill="none"${i}/>`}},"curv-trap":{size:(e,t)=>{let n=t+24;return{w:e+36+n*.6,h:n,dy:0}},draw:(t,n,r)=>{let i=t/2,a=n/2,o=n*.3;return d(`M${e(-i+o)},${e(-a)}H${e(i-o)}A${e(o)},${e(a)} 0 0 1 ${e(i-o)},${e(a)}H${e(-i+o)}L${e(-i)},0Z`,r)}},docs:{size:(e,t)=>({w:e+36+8,h:t+24+18,dy:-1}),inset:(e,t,n)=>n===2?10:0,draw:(e,t,n)=>{let r=``;for(let i=0;i<3;i++)r+=`<g transform="translate(${(1-i)*4},${(i-1)*4})">${v(e-8,t-8,n)}</g>`;return r}},"bow-rect":{size:(e,t)=>{let n=t+24;return{w:e+36+n*.4,h:n,dy:0}},inset:(e,t,n)=>n===1?t*.2:0,draw:(t,n,r)=>{let i=t/2,a=n/2,o=n*.2;return d(`M${e(-i+o)},${e(-a)}H${e(i)}A${e(o)},${e(a)} 0 0 0 ${e(i)},${e(a)}H${e(-i+o)}A${e(o)},${e(a)} 0 0 1 ${e(-i+o)},${e(-a)}Z`,r)}},"tag-rect":{size:p,span:r,draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(n/2-12)},${e(r/2)}L${e(n/2)},${e(r/2-12)}" fill="none"${a}/>`},"tag-doc":{size:(e,t)=>({w:e+36,h:t+24+10,dy:-5}),inset:(e,t,n)=>n===2?10:0,draw:(t,n,r,i)=>v(t,n,r)+`<path d="M${e(t/2-12)},${e(n/2-14)}L${e(t/2)},${e(n/2-26)}" fill="none"${i}/>`},"lin-doc":{size:(e,t)=>({w:e+36+8,h:t+24+10,dy:-5}),inset:(e,t,n)=>n===2?10:0,draw:(t,n,r,i)=>v(t,n,r)+`<path d="M${e(-t/2+8)},${e(-n/2)}V${e(n/2-6)}" fill="none"${i}/>`},collapsedGroup:{size:(e,t)=>({w:e+36+8,h:t+24+8,dy:-2}),draw:(n,r,i)=>`<rect x="${e(-n/2+6)}" y="${e(-r/2+8)}" width="${e(n-12)}" height="${e(r-8)}"${t(i)}/><rect x="${e(-n/2)}" y="${e(-r/2)}" width="${e(n)}" height="${e(r-4)}"${t(i)}/>`}};function _(t,n,r,i){let a=n/2,o=6*r;return`<path d="M${e(t)},${e(-a)}q${e(o)},0 ${e(o)},6V-6q0,6 ${e(o)},6q${e(-o)},0 ${e(-o)},6V${e(a-6)}q0,6 ${e(-o)},6" fill="none"${i}/>`}function v(t,n,r){let i=t/2,a=-n/2,o=n/2-10,s=t/4;return`<path d="M${e(-i)},${e(a)}H${e(i)}V${e(o)}q${e(-s)},-12 ${e(-2*s)},0t${e(-2*s)},0Z"${r}/>`}var y=g.rect,b=new Map(Object.entries(g));function x(e,t,n){return(b.get(e)??y).size(t,n)}function S(e,t,n,r,i){return(b.get(e)??y).draw(t,n,r,i)}function C(e,t,n,r,i=0){return b.get(e)?.inset?.(t,n,r,i)??0}function w(e,t,n,r){return Math.max(0,b.get(e)?.span?.(t,n,r)??0)}function T(e){return b.get(e)?.noLabel!==!0}function E(e,t,n){let r=e[t]-n.x,i=e[t+1]-n.y;return Math.abs(Math.abs(i)-n.h/2)<.5?i<0?0:2:Math.abs(Math.abs(r)-n.w/2)<.5?r<0?3:1:-1}function D(e,t,n,r){if(r.isGroup)return;let i=E(e,t,r);if(i===0||i===2){let a=C(n.shape,n.w,n.h,i,e[t]-r.x)+(r.h-n.h)/2;e[t+1]+=i===0?a:-a}else if(i>=0){let a=C(n.shape,n.w,n.h,i,e[t+1]-r.y)+(r.w-n.w)/2;e[t]+=i===3?a:-a}}export{S as a,x as i,E as n,C as o,w as r,T as s,D as t};
|
|
2
|
-
//# sourceMappingURL=ABYRPUBD-
|
|
1
|
+
import{f as e,o as t}from"./77XECAW3-SIARa2Fi.js";var n=12,r=(e,t,r)=>(r?t:e)-2*n,i=e=>(t,r,i)=>i?0:t-2*e(r)-2*n;function a(e,t,n){let r=Math.min(1,Math.abs(e)/t);return n*(1-Math.sqrt(1-r*r))}var o=(e,t,n,r)=>n&1?a(r,t/2,e/2):a(r,e/2,t/2),s=(e,t,n)=>(n?t:e)*.6,c=(e,t,n,r)=>n&1?0:a(r,e/2,Math.min(12,Math.max(6,e/14))),l=(e,t)=>()=>({w:e,h:t,dy:0});function u(e,t,n){let r=Math.max(1.6*e+40,80),i=(t+10)/(1-(e+8)/r),a=i/2-10-t/2;return{w:r,h:i,dy:n?-a:a}}function d(e,t){return`<path d="${e}"${t}/>`}var f=(e,t,n)=>n&1?t/8:0,p=(e,t)=>({w:Math.max(e+36,48),h:t+24,dy:0});function m(t,n){let r=``;for(let n=0;n<t.length;n+=2)r+=(n?` `:``)+e(t[n])+`,`+e(t[n+1]);return`<polygon points="${r}"${n}/>`}function h(t,n,r,i=``){return`<rect x="${e(-t/2)}" y="${e(-n/2)}" width="${e(t)}" height="${e(n)}"${i}${r}/>`}var g={rect:{size:p,span:r,draw:(e,n,r)=>h(e,n,t(r))},rounded:{size:p,span:r,draw:(t,n,r)=>h(t,n,r,` rx="${e(Math.min(12,n/2))}"`)},stadium:{inset:(e,t,n,r)=>n&1?a(r,t/2,t/2):0,span:(e,t,n)=>n?t*.6:e-t,size:(e,t)=>{let n=t+24;return{w:e+n*.5+36-8,h:n,dy:0}},draw:(t,n,r)=>h(t,n,r,` rx="${e(n/2)}"`)},"fr-rect":{span:r,size:(e,t)=>({w:e+36+16,h:t+24,dy:0}),draw:(n,r,i,a)=>{let o=n/2-8;return h(n,r,t(i))+`<path d="M${e(-o)},${e(-r/2)}V${e(r/2)}M${e(o)},${e(-r/2)}V${e(r/2)}" fill="none"${a}/>`}},cyl:{inset:c,span:(e,t,r)=>r?t-2*n-12:e*.6,size:(e,t)=>{let n=Math.max(e+36,56),r=Math.min(12,Math.max(6,n/14));return{w:n,h:t+24+2*r,dy:r/2}},draw:(t,n,r,i)=>{let a=t/2,o=Math.min(12,Math.max(6,t/14)),s=-n/2+o,c=n/2-o;return`<path d="M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 1 ${e(a)},${e(s)}V${e(c)}A${e(a)},${e(o)} 0 0 1 ${e(-a)},${e(c)}Z"${r}/><path d="M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 0 ${e(a)},${e(s)}" fill="none"${i}/>`}},circle:{inset:o,span:s,size:(e,t)=>{let n=Math.max(Math.sqrt(e*e+t*t)+16,44);return{w:n,h:n,dy:0}},draw:(t,n,r)=>`<circle r="${e(t/2)}"${r}/>`},"dbl-circ":{inset:o,span:s,size:(e,t)=>{let n=Math.max(Math.sqrt(e*e+t*t)+26,54);return{w:n,h:n,dy:0}},draw:(t,n,r,i)=>`<circle r="${e(t/2)}"${r}/><circle r="${e(t/2-5)}" fill="none"${i}/>`},ellipse:{inset:o,span:s,size:(e,t)=>({w:e*1.3+36,h:t*1.2+24,dy:0}),draw:(t,n,r)=>`<ellipse rx="${e(t/2)}" ry="${e(n/2)}"${r}/>`},diam:{inset:(e,t,n,r)=>n&1?Math.abs(r)*e/t:Math.abs(r)*t/e,span:(e,t,n)=>(n?t:e)*.6,size:(e,t)=>{let n=e+16,r=t+8;return{w:n+1.6*r,h:n/1.6+r,dy:0}},draw:(e,t,n)=>m([0,-t/2,e/2,0,0,t/2,-e/2,0],n)},hex:{inset:(e,t,n,r)=>n&1?Math.abs(r)/2:0,span:(e,t,r)=>r?t*.5:e-t/2-n,size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2-r,-t/2,e/2,0,e/2-r,t/2,-e/2+r,t/2,-e/2,0],n)}},odd:{inset:(e,t,n)=>n===3?t/4:0,span:i(()=>0),size:(e,t)=>{let n=t+24;return{w:e+36+n/4,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2,-t/2,e/2,t/2,-e/2,t/2,-e/2+r,0],n)}},"lean-r":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2,-t/2,e/2-r,t/2,-e/2,t/2],n)}},"lean-l":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2-r,-t/2,e/2,t/2,-e/2+r,t/2],n)}},"trap-b":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2+r,-t/2,e/2-r,-t/2,e/2,t/2,-e/2,t/2],n)}},"trap-t":{inset:f,span:i(e=>e/4),size:(e,t)=>{let n=t+24;return{w:e+36+n/2,h:n,dy:0}},draw:(e,t,n)=>{let r=t/4;return m([-e/2,-t/2,e/2,-t/2,e/2-r,t/2,-e/2+r,t/2],n)}},text:{span:r,size:(e,t)=>({w:e+8,h:t+8,dy:0}),draw:(e,t)=>h(e,t,` fill="none" stroke="none"`)},"sm-circ":{noLabel:!0,inset:o,span:s,size:l(14,14),draw:(t,n,r)=>`<circle r="${e(t/2)}"${r}/>`},"f-circ":{noLabel:!0,inset:o,span:s,size:l(14,14),draw:(t,n,r,i)=>`<circle r="${e(t/2)}" fill="var(--_l)"${i}/>`},"fr-circ":{noLabel:!0,inset:o,span:s,size:l(18,18),draw:(t,n,r,i)=>`<circle r="${e(t/2)}"${r}/><circle r="${e(t/2-4)}" fill="var(--_l)"${i}/>`},fork:{noLabel:!0,span:(e,t,n)=>(n?t:e)-8,size:l(72,8),draw:(e,t,n,r)=>h(e,t,` fill="var(--_l)"${r}`,` rx="2"`)},"notch-rect":{size:p,span:r,draw:(e,t,n)=>m([-e/2+10,-t/2,e/2,-t/2,e/2,t/2,-e/2,t/2,-e/2,-t/2+10],n)},"lin-rect":{span:r,size:(e,t)=>({w:e+36+8,h:t+24,dy:0}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2+8)},${e(-r/2)}V${e(r/2)}" fill="none"${a}/>`},"div-rect":{span:r,size:(e,t)=>({w:e+36,h:t+24+8,dy:4}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+8)}H${e(n/2)}" fill="none"${a}/>`},"win-pane":{span:r,size:(e,t)=>({w:e+36+8,h:t+24+8,dy:4}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2+8)},${e(-r/2)}V${e(r/2)}M${e(-n/2)},${e(-r/2+8)}H${e(n/2)}" fill="none"${a}/>`},tri:{inset:(e,t,n)=>n&1?e/4:0,size:(e,t)=>u(e,t,!1),draw:(e,t,n)=>m([0,-t/2,e/2,t/2,-e/2,t/2],n)},"flip-tri":{inset:(e,t,n)=>n&1?e/4:0,size:(e,t)=>u(e,t,!0),draw:(e,t,n)=>m([-e/2,-t/2,e/2,-t/2,0,t/2],n)},"sl-rect":{inset:(e,t,n)=>n===0?5:0,size:(e,t)=>({w:e+36,h:t+24+10,dy:5}),draw:(e,t,n)=>m([-e/2,-t/2+10,e/2,-t/2,e/2,t/2,-e/2,t/2],n)},"notch-pent":{span:r,size:(e,t)=>({w:e+36,h:t+24,dy:0}),draw:(e,t,n)=>m([-e/2+10,-t/2,e/2-10,-t/2,e/2,-t/2+10,e/2,t/2,-e/2,t/2,-e/2,-t/2+10],n)},hourglass:{noLabel:!0,inset:(e,t,n)=>n&1?e/2:0,size:l(32,40),draw:(e,t,n)=>m([-e/2,-t/2,e/2,-t/2,-e/2,t/2,e/2,t/2],n)},delay:{size:(e,t)=>{let n=t+24;return{w:e+36+n/4,h:n,dy:0}},draw:(t,n,r)=>{let i=n/2;return`<path d="M${e(-t/2)},${e(-i)}H${e(t/2-i)}A${e(i)},${e(i)} 0 0 1 ${e(t/2-i)},${e(i)}H${e(-t/2)}Z"${r}/>`}},"h-cyl":{size:(e,t)=>{let n=t+24,r=Math.min(12,n/4);return{w:e+36+2*r,h:n,dy:0}},draw:(t,n,r,i)=>{let a=n/2,o=Math.min(12,n/4),s=-t/2+o,c=t/2-o;return`<path d="M${e(s)},${e(-a)}H${e(c)}A${e(o)},${e(a)} 0 0 1 ${e(c)},${e(a)}H${e(s)}A${e(o)},${e(a)} 0 0 1 ${e(s)},${e(-a)}Z"${r}/><path d="M${e(c)},${e(-a)}A${e(o)},${e(a)} 0 0 0 ${e(c)},${e(a)}" fill="none"${i}/>`}},"cross-circ":{noLabel:!0,inset:o,span:s,size:l(44,44),draw:(t,n,r,i)=>{let a=t/2,o=a*Math.SQRT1_2;return`<circle r="${e(a)}"${r}/><path d="M${e(-o)},${e(-o)}L${e(o)},${e(o)}M${e(o)},${e(-o)}L${e(-o)},${e(o)}" fill="none"${i}/>`}},"st-rect":{span:(e,t,r)=>(r?t:e)-2*n-8,size:(e,t)=>({w:e+36+8,h:t+24+8,dy:4}),draw:(n,r,i)=>{let a=n-8,o=r-8,s=``;for(let c=0;c<3;c++){let l=-n/2+(2-c)*4,u=-r/2+c*4;s+=`<rect x="${e(l)}" y="${e(u)}" width="${e(a)}" height="${e(o)}"${t(i)}/>`}return s}},doc:{inset:(e,t,n)=>n===2?10:0,size:(e,t)=>({w:e+36,h:t+24+10,dy:-5}),draw:(e,t,n)=>v(e,t,n)},flag:{inset:(e,t,n)=>n&1?0:8,size:(e,t)=>({w:e+36,h:t+24+16,dy:0}),draw:(t,n,r)=>{let i=t/2,a=n/2-8,o=t/4;return`<path d="M${e(-i)},${e(-a)}q${e(o)},-10 ${e(2*o)},0t${e(2*o)},0V${e(a)}q${e(-o)},10 ${e(-2*o)},0t${e(-2*o)},0Z"${r}/>`}},datastore:{size:p,span:r,draw:(t,n,r,i)=>h(t,n,r.replace(`stroke="var(--_b)"`,`stroke="none"`))+`<path d="M${e(-t/2)},${e(-n/2)}H${e(t/2)}M${e(-t/2)},${e(n/2)}H${e(t/2)}" fill="none"${i}/>`},folder:{size:(e,t)=>({w:Math.max(e+36,64),h:t+24+8,dy:4}),draw:(t,n,r)=>{let i=t/2,a=n/2,o=Math.min(t*.4,48);return d(`M${e(-i)},${e(-a)}H${e(-i+o)}L${e(-i+o+8)},${e(-a+8)}H${e(i)}V${e(a)}H${e(-i)}Z`,r)}},bucket:{size:(e,t)=>({w:e+36+20,h:t+24+10,dy:3}),inset:(e,t,n)=>n&1?t/12:0,draw:(t,n,r,i)=>{let a=t/2,o=n/2,s=n/6;return d(`M${e(-a)},${e(-o+5)}A${e(a)},${e(5)} 0 0 1 ${e(a)},${e(-o+5)}L${e(a-s)},${e(o-5)}A${e(a-s)},${e(5)} 0 0 1 ${e(-a+s)},${e(o-5)}Z`,r)+`<path d="M${e(-a)},${e(-o+5)}A${e(a)},${e(5)} 0 0 0 ${e(a)},${e(-o+5)}" fill="none"${i}/>`}},console:{span:r,size:(e,t)=>({w:Math.max(e+36,72),h:t+24+12,dy:6}),draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+12)}H${e(n/2)}M${e(-n/2+7)},${e(-r/2+4)}l3,2.5l-3,2.5M${e(-n/2+13)},${e(-r/2+9)}h4" fill="none"${a}/>`},browser:{span:r,size:(e,t)=>({w:Math.max(e+36,72),h:t+24+12,dy:6}),draw:(n,r,i,a)=>{let o=``;for(let t=0;t<3;t++)o+=`<circle cx="${e(-n/2+8+t*7)}" cy="${e(-r/2+6)}" r="1.5" fill="none"${a}/>`;return h(n,r,t(i))+`<path d="M${e(-n/2)},${e(-r/2+12)}H${e(n/2)}" fill="none"${a}/>`+o}},person:{size:(e,t)=>({w:Math.max(e+36,56),h:t+24+26,dy:13}),draw:(t,n,r)=>{let i=-n/2;return`<rect x="${e(-t/2)}" y="${e(i+26)}" width="${e(t)}" height="${e(n-26)}" rx="12"${r}/><circle cy="${e(i+14)}" r="13"${r}/>`}},bang:{size:(e,t)=>({w:e+36+28,h:t+24+24,dy:0}),inset:()=>3,draw:(e,t,n)=>{let r=[];for(let n=0;n<28;n++){let i=Math.PI*n/14-Math.PI/2,a=n%2==0?1:.82;r.push(e/2*Math.cos(i)*a,t/2*Math.sin(i)*a)}return m(r,n)}},cloud:{size:(e,t)=>({w:e+36+32,h:t+24+24,dy:0}),inset:(e,t,n)=>n&1?2:1,draw:(t,n,r)=>{let i=t/2,a=n/2,o=a*.55;return d(`M${e(-i+o)},${e(a)}A${e(o)},${e(o)} 0 0 1 ${e(-i+o*.6)},${e(-a*.1)}A${e(i*.42)},${e(a*.7)} 0 0 1 ${e(-i*.1)},${e(-a*.72)}A${e(i*.4)},${e(a*.62)} 0 0 1 ${e(i*.62)},${e(-a*.42)}A${e(o*1.05)},${e(o*1.05)} 0 0 1 ${e(i-o)},${e(a)}Z`,r)}},brace:{size:(e,t)=>({w:e+36+12,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(-e/2+12,t,-1,r)},"brace-r":{size:(e,t)=>({w:e+36+12,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(e/2-12,t,1,r)},braces:{size:(e,t)=>({w:e+36+24,h:t+24,dy:0}),draw:(e,t,n,r)=>h(e,t,` fill="none" stroke="none"`)+_(-e/2+12,t,-1,r)+_(e/2-12,t,1,r)},bolt:{noLabel:!0,size:l(36,56),inset:(e,t,n)=>n&1?e/4:0,draw:(e,t,n)=>m([e*.15,-t/2,-e/2,t*.08,-e*.05,t*.08,-e*.15,t/2,e/2,-t*.08,e*.05,-t*.08],n)},"lin-cyl":{inset:c,span:(e,t,r)=>r?t-2*n-20:e*.6,size:(e,t)=>{let n=Math.max(e+36,56),r=Math.min(12,Math.max(6,n/14));return{w:n,h:t+24+2*r+8,dy:r/2+4}},draw:(t,n,r,i)=>{let a=t/2,o=Math.min(12,Math.max(6,t/14)),s=-n/2+o,c=n/2-o,l=t=>`M${e(-a)},${e(t)}A${e(a)},${e(o)} 0 0 0 ${e(a)},${e(t)}`;return d(`M${e(-a)},${e(s)}A${e(a)},${e(o)} 0 0 1 ${e(a)},${e(s)}V${e(c)}A${e(a)},${e(o)} 0 0 1 ${e(-a)},${e(c)}Z`,r)+`<path d="${l(s)}${l(s+8)}" fill="none"${i}/>`}},"curv-trap":{size:(e,t)=>{let n=t+24;return{w:e+36+n*.6,h:n,dy:0}},draw:(t,n,r)=>{let i=t/2,a=n/2,o=n*.3;return d(`M${e(-i+o)},${e(-a)}H${e(i-o)}A${e(o)},${e(a)} 0 0 1 ${e(i-o)},${e(a)}H${e(-i+o)}L${e(-i)},0Z`,r)}},docs:{size:(e,t)=>({w:e+36+8,h:t+24+18,dy:-1}),inset:(e,t,n)=>n===2?10:0,draw:(e,t,n)=>{let r=``;for(let i=0;i<3;i++)r+=`<g transform="translate(${(1-i)*4},${(i-1)*4})">${v(e-8,t-8,n)}</g>`;return r}},"bow-rect":{size:(e,t)=>{let n=t+24;return{w:e+36+n*.4,h:n,dy:0}},inset:(e,t,n)=>n===1?t*.2:0,draw:(t,n,r)=>{let i=t/2,a=n/2,o=n*.2;return d(`M${e(-i+o)},${e(-a)}H${e(i)}A${e(o)},${e(a)} 0 0 0 ${e(i)},${e(a)}H${e(-i+o)}A${e(o)},${e(a)} 0 0 1 ${e(-i+o)},${e(-a)}Z`,r)}},"tag-rect":{size:p,span:r,draw:(n,r,i,a)=>h(n,r,t(i))+`<path d="M${e(n/2-12)},${e(r/2)}L${e(n/2)},${e(r/2-12)}" fill="none"${a}/>`},"tag-doc":{size:(e,t)=>({w:e+36,h:t+24+10,dy:-5}),inset:(e,t,n)=>n===2?10:0,draw:(t,n,r,i)=>v(t,n,r)+`<path d="M${e(t/2-12)},${e(n/2-14)}L${e(t/2)},${e(n/2-26)}" fill="none"${i}/>`},"lin-doc":{size:(e,t)=>({w:e+36+8,h:t+24+10,dy:-5}),inset:(e,t,n)=>n===2?10:0,draw:(t,n,r,i)=>v(t,n,r)+`<path d="M${e(-t/2+8)},${e(-n/2)}V${e(n/2-6)}" fill="none"${i}/>`},collapsedGroup:{size:(e,t)=>({w:e+36+8,h:t+24+8,dy:-2}),draw:(n,r,i)=>`<rect x="${e(-n/2+6)}" y="${e(-r/2+8)}" width="${e(n-12)}" height="${e(r-8)}"${t(i)}/><rect x="${e(-n/2)}" y="${e(-r/2)}" width="${e(n)}" height="${e(r-4)}"${t(i)}/>`}};function _(t,n,r,i){let a=n/2,o=6*r;return`<path d="M${e(t)},${e(-a)}q${e(o)},0 ${e(o)},6V-6q0,6 ${e(o)},6q${e(-o)},0 ${e(-o)},6V${e(a-6)}q0,6 ${e(-o)},6" fill="none"${i}/>`}function v(t,n,r){let i=t/2,a=-n/2,o=n/2-10,s=t/4;return`<path d="M${e(-i)},${e(a)}H${e(i)}V${e(o)}q${e(-s)},-12 ${e(-2*s)},0t${e(-2*s)},0Z"${r}/>`}var y=g.rect,b=new Map(Object.entries(g));function x(e,t,n){return(b.get(e)??y).size(t,n)}function S(e,t,n,r,i){return(b.get(e)??y).draw(t,n,r,i)}function C(e,t,n,r,i=0){return b.get(e)?.inset?.(t,n,r,i)??0}function w(e,t,n,r){return Math.max(0,b.get(e)?.span?.(t,n,r)??0)}function T(e){return b.get(e)?.noLabel!==!0}function E(e,t,n){let r=e[t]-n.x,i=e[t+1]-n.y;return Math.abs(Math.abs(i)-n.h/2)<.5?i<0?0:2:Math.abs(Math.abs(r)-n.w/2)<.5?r<0?3:1:-1}function D(e,t,n,r){if(r.isGroup)return;let i=E(e,t,r);if(i===0||i===2){let a=C(n.shape,n.w,n.h,i,e[t]-r.x)+(r.h-n.h)/2;e[t+1]+=i===0?a:-a}else if(i>=0){let a=C(n.shape,n.w,n.h,i,e[t+1]-r.y)+(r.w-n.w)/2;e[t]+=i===3?a:-a}}export{S as a,x as i,E as n,C as o,w as r,T as s,D as t};
|
|
2
|
+
//# sourceMappingURL=ABYRPUBD-B_0r9NT4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./react-DH3P2YXY.js";import{n as t,t as n}from"./jsx-runtime-BnjsACtP.js";import{N as r,P as i}from"./runtime-
|
|
2
|
-
//# sourceMappingURL=AuthSurfaceShell-
|
|
1
|
+
import{a as e}from"./react-DH3P2YXY.js";import{n as t,t as n}from"./jsx-runtime-BnjsACtP.js";import{N as r,P as i}from"./runtime-BBIAfWJY.js";import{t as a}from"./standalone-page-3TM7ZX16.js";import{r as o,t as s}from"./SidebarStageBackdrop-Cc8Os5aB.js";var c=t(),l=e(n(),1);function u(e){let t=(0,c.c)(6),{children:n}=e,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=o(i),t[0]=u):u=t[0];let d=u,f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=d?(0,l.jsx)(`div`,{className:`absolute inset-0`,"aria-hidden":!0,children:(0,l.jsx)(s,{variant:d})}):(0,l.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 bg-[radial-gradient(circle_at_75%_25%,rgba(136,204,255,0.5),transparent_38%),linear-gradient(135deg,#2468df,#172f82)]`}),p=(0,l.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_bottom,transparent_20%,rgba(7,18,55,0.46)_100%)]`}),t[1]=f,t[2]=p):(f=t[1],p=t[2]);let m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,l.jsxs)(`header`,{className:`relative h-24 overflow-hidden bg-[linear-gradient(135deg,#1e61de,#17348e)] text-white`,children:[f,p,(0,l.jsx)(`div`,{className:`relative h-full p-5 sm:p-6`,children:(0,l.jsx)(`p`,{className:`text-3xs font-semibold tracking-widest text-white/80 uppercase`,children:r})})]}),t[3]=m):m=t[3];let h;return t[4]===n?h=t[5]:(h=(0,l.jsx)(a,{tone:`brand`,masthead:m,children:n}),t[4]=n,t[5]=h),h}export{u as t};
|
|
2
|
+
//# sourceMappingURL=AuthSurfaceShell-DPlJfFlL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{_ as e,f as t,g as n,l as r,r as i,s as a,t as o,y as s}from"./77XECAW3-
|
|
1
|
+
import{_ as e,f as t,g as n,l as r,r as i,s as a,t as o,y as s}from"./77XECAW3-SIARa2Fi.js";import{a as c,d as l,i as u,l as d,s as f}from"./N3JZAHOW-BXwh9_vP.js";import{a as p,t as m}from"./DKTLEL5E-DciMwFJ1.js";import{i as h,r as g,t as _}from"./NUIALGQ3-ClxnUm8B.js";import{n as v}from"./TSHNXIZL-icuUBQJZ.js";import{a as y,t as b}from"./5N7A7DKN-BUa1-OZ6.js";import{n as x}from"./ABYRPUBD-B_0r9NT4.js";import{PeleError as S,_ as C,d as w,i as T,m as E,r as D,u as O}from"./lazy-B292152Q.js";function k(e){let t=`TB`;for(let n of e)typeof n!=`string`&&n.stmt===`dir`&&(t=n.value);return t}function A(e,t,n){let r=[],i=[],a=new Map,o=new Map,s=new Map,c=0,l=0,u=e=>{if(!e.id||e.id===`</join></fork>`||e.id===`</choice>`)return;if(e.cssClasses){let t;for(let r of e.cssClasses.split(` `)){let i=n.get(r);if(i){t??=e.cssCompiledStyles.slice();for(let e of i.styles)t.push(e)}}t&&(e.cssCompiledStyles=t)}let t=a.get(e.id);if(t){let n=e.parentId??t.parentId;Object.assign(t,e),n!==void 0&&(t.parentId=n)}else a.set(e.id,e),r.push(e)},d=(e,n,r)=>{let a=n.id;if(a===`root`)return;let d=t.get(a),f=d?.classes?.join(` `)??``,p=d?.styles??[],m=o.get(a);if(!m){let e=`rect`;n.start===!0?e=`stateStart`:n.start===!1&&(e=`stateEnd`),n.type!=="default"&&(e=n.type),m={shape:e,description:a,cssClasses:`${f} statediagram-state`,cssStyles:p,type:void 0,dir:void 0,colorIndex:void 0},o.set(a,m)}if(n.description&&(Array.isArray(m.description)?(m.shape=`rectWithTitle`,m.description=m.description.concat(n.description)):m.description.length>0?(m.shape=`rectWithTitle`,m.description=m.description===a?[n.description].flat():[m.description,n.description].flat()):(m.shape=`rect`,m.description=Array.isArray(n.description)?n.description.slice():n.description)),m.description.length===1&&m.shape===`rectWithTitle`&&(m.shape=m.type===`group`?`roundedWithTitle`:`rect`),!m.type&&n.doc){if(m.type=`group`,m.dir=k(n.doc),m.shape=n.type===`divider`?`divider`:`roundedWithTitle`,m.shape===`divider`&&e?.id!==void 0&&s.has(e.id))m.colorIndex=s.get(e.id);else{let e=l++;m.colorIndex=f.trim()!==``||p.length>0?void 0:e}s.set(a,m.colorIndex),m.cssClasses=`${m.cssClasses} statediagram-cluster ${r?`statediagram-cluster-alt`:``}`}let h=m.description,g={id:a,shape:m.shape,label:Array.isArray(h)?h[0]:h,description:Array.isArray(h)?h.slice(1):[],cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,type:m.type,isGroup:m.type===`group`,dir:m.dir,colorIndex:m.colorIndex};g.shape===`divider`&&(g.label=``),e&&e.id!==`root`&&(g.parentId=e.id);let _=n.note;if(!_){u(g);return}let v=(e,t,n,r)=>({id:e,shape:t,label:_.text,description:[],cssClasses:n,cssCompiledStyles:[],cssStyles:[],type:r?`group`:`node`,isGroup:r,dir:void 0,position:_.position}),y=v(`${a}----note-${c++}`,`note`,`statediagram-note`,!1);y.parentId=`${a}----parent`,y.noteFor=a,u(v(y.parentId,`noteGroup`,m.cssClasses,!0)),u(y),u(g);let b=_.position===`left of`,x=b?y.id:a,S=b?a:y.id;i.push({id:`${x}-${S}`,start:x,end:S,label:``,classes:`transition note-edge`,pattern:`dashed`})},f=[{item:void 0,doc:e,at:0,alt:!0}];for(;f.length>0;){let e=f[f.length-1];if(e.at>=e.doc.length){f.pop();continue}let t=e.doc[e.at++];typeof t!=`string`&&(t.stmt===`state`?(d(e.item,t,e.alt),t.doc&&f.push({item:t,doc:t.doc,at:0,alt:!e.alt})):t.stmt===`relation`&&(d(e.item,t.state1,e.alt),d(e.item,t.state2,e.alt),i.push({id:`edge${c++}`,start:t.state1.id,end:t.state2.id,label:t.description??``,classes:`transition`})))}for(let e of r)if(e.isGroup&&e.description.length>0)throw new S(`Group nodes can only have label. Remove the additional description for node [${e.id}]`,`semantic`,{type:`state`});return{nodes:r,edges:i}}var j=class{type=`state`;rootDoc=[];states=new Map;relations=[];classes=new Map;links=new Map;graph={nodes:[],edges:[]};title;accTitle;accDescr;dividerCount=0;get direction(){let e=`TB`;for(let t of this.rootDoc)typeof t!=`string`&&t.stmt===`dir`&&(e=t.value);return e}setRootDoc(e){this.rootDoc=e,this.translate(),this.extract(e)}extract(e){this.states=new Map,this.relations=[],this.classes=new Map;let t=Array.isArray(e)?e:e.doc;for(let e of t)if(typeof e!=`string`)switch(e.stmt){case`state`:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case`relation`:this.addRelation(e.state1,e.state2,e.description);break;case`classDef`:this.addStyleClass(e.id.trim(),e.classes);break;case`style`:{let t=e.styleClass.split(`,`).map(e=>e.replace(/;/g,``).trim());for(let n of this.named(e.id.trim()))n.styles=t.slice();break}case`applyClass`:this.setCssClass(e.id.trim(),e.styleClass);break;case`click`:this.addLink(typeof e.id==`string`?e.id:e.id.id,e.url,e.tooltip)}this.graph=A(t,this.states,this.classes)}translate(){let e=[[`root`,{stmt:`root`,id:`root`,doc:this.rootDoc},!0]];for(;e.length>0;){let[t,n,r]=e.pop();if(typeof n==`string`)continue;if(n.stmt===`relation`){e.push([t,n.state2,!1],[t,n.state1,!0]);continue}if(n.stmt===`state`)n.id===`[*]`?(n.id=t+(r?`_start`:`_end`),n.start=r):n.id=n.id.trim();else if(n.stmt!==`root`)continue;if(!n.doc)continue;let i=[],a=[];for(let e of n.doc)typeof e!=`string`&&e.stmt===`state`&&e.type===`divider`&&!e.doc?(i.push({...e,doc:a}),a=[]):a.push(e);i.length>0&&(a.length>0&&i.push({stmt:`state`,id:this.getDividerId(),type:`divider`,doc:a}),n.doc=i);for(let t=n.doc.length-1;t>=0;t--)e.push([n.id,n.doc[t],!0])}}addState(e,t=`default`,n,r,i,a){let o=e.trim(),s=this.states.get(o);if(s?(s.doc||(s.doc=n),s.type||(s.type=t)):(s={stmt:`state`,id:o,descriptions:[],type:t,doc:n,note:i,classes:[],styles:[],textStyles:[]},this.states.set(o,s)),r)for(let e of Array.isArray(r)?r:[r])this.addDescription(o,e.trim());if(i&&(s.note=i),a)for(let e of a)this.setCssClass(o,e.trim())}getState(e){return this.states.get(e)}addLink(e,t,n){this.links.set(e,{url:t,tooltip:n})}addRelation(e,t,n=``){for(let n of[e,t])this.addState(n.id,n.type,n.doc,n.description,n.note,n.classes);this.relations.push({id1:e.id.trim(),id2:t.id.trim(),relationTitle:n})}addDescription(e,t){this.states.get(e)?.descriptions?.push(t.startsWith(`:`)?t.replace(`:`,``).trim():t)}getDividerId(){return`divider-id-${++this.dividerCount}`}addStyleClass(e,t=``){let n=this.classes.get(e);if(n||(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t)for(let e of t.split(`,`)){let t=e.replace(`;`,``).trim();e.includes(`color`)&&n.textStyles.push(t.replace(`fill`,`bgFill`).replace(`color`,`fill`)),n.styles.push(t)}}setCssClass(e,t){for(let n of this.named(e))n.classes?.push(t)}getDirection(){for(let e of this.rootDoc)if(typeof e!=`string`&&e.stmt===`dir`)return e.value;return`TB`}setDirection(e){for(let t of this.rootDoc)if(typeof t!=`string`&&t.stmt===`dir`){t.value=e;return}this.rootDoc.unshift({stmt:`dir`,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}named(e){let t=[];for(let n of e.split(`,`)){let e=this.states.get(n);e||=(this.addState(n),this.states.get(n.trim())),e&&t.push(e)}return t}},M=`$end.INVALID.NL.SD.DESCR.-->.HIDE_EMPTY.scale.WIDTH.COMPOSIT_STATE.STRUCT_START.STRUCT_STOP.STATE_DESCR.AS.ID.FORK.JOIN.CHOICE.CONCURRENT.note.NOTE_TEXT.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.CLICK.STRING.HREF.classDef.CLASSDEF_ID.DEFAULT_CLASSDEF_ID.CLASSDEF_STYLEOPTS.DEFAULT.style.STYLE_IDS.STYLEDEF_STYLEOPTS.class.CLASSENTITY_IDS.STYLECLASS.direction_tb.direction_bt.direction_rl.direction_lr.EDGE_STATE.STYLE_SEPARATOR.left_of.right_of.INVALID`.split(`.`),ee=/direction/gi,te=/<<(?:fork|join|choice)>>|\[\[(?:fork|join|choice)\]\]/gi,N=/[\n\r\u2028\u2029]/g,P=/%%/g,F=/\{/g;function I(e,t){let n=0,r=-2;return i=>{if(r===-2||i<n||r!==-1&&i>r){e.lastIndex=i;let a=e.exec(t);r=a?a.index:-1,n=i}return r}}function L(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c,l=I(ee,e),u=I(te,e),d=I(N,e),f=I(P,e),p=I(F,e),m=-1,h=-1,g=[-1,-1,-1,-1],_=[0,0,0,0],v=-1,y=-1,b=[-1,-1,-1,-1,-1,-1],x=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},S=(e,t,a,o)=>{n.push(e),r.push(t),i.push(a),s=o},C=e=>{a.push(o),o=e},w=()=>{a.length>0&&(o=a.pop())},E=(t,n)=>{for(let r=0;r<t.length;r++){let i=t.charCodeAt(r),a=e.charCodeAt(n+r);if(a!==i&&!(i>=97&&i<=122&&a===i-32))return!1}return!0},O=n=>{let r=n;for(;r<t&&D(e.charCodeAt(r));)r++;return r},k=n=>{let r=n;for(;r<t&&T(e.charCodeAt(r));)r++;return r},A=n=>{let r=e.indexOf(`
|
|
3
3
|
`,n);return r===-1?t:r},j=e=>{let n=d(e);return n===-1?t:n},M=e=>{if(e<m||e>h){let n=l(e),r=n===-1?t:j(e);m=e,h=r,g[0]=g[1]=g[2]=g[3]=-1;for(let e=n;e!==-1&&e<r;e=l(e+1)){let t=O(e+9);if(t===e+9)continue;let n=E(`tb`,t)?0:E(`bt`,t)?1:E(`rl`,t)?2:E(`lr`,t)?3:-1;n!==-1&&(g[n]=e,_[n]=t+2)}}for(let t=0;t<4;t++)if(g[t]>=e)return t;return-1},L=n=>{if(n<v||n>y){let r=u(n),i=r===-1?t:j(n);v=n,y=i,b.fill(-1);for(let t=r;t!==-1&&t<i;t=u(t+1)){let n=e.charCodeAt(t+2)|32;b[(e.charCodeAt(t)===60?0:3)+(n===102?0:n===106?1:2)]=t}}for(let e=0;e<6;e++)if(b[e]>=n)return e;return-1},R=(e,t)=>{let n=f(e);return n===-1||n+2>t?(x(14,e,t),!0):n===e?(s=t,!1):(x(14,e,n),!0)},z=e=>(n.push(e),r.push(``),i.push(s),{types:n,texts:r,starts:i,error:c});for(;;){if(s>=t){switch(o){case 0:x(2,t,t);break;case 6:x(22,t,t);break;case 7:x(24,t,t);break;case 8:x(25,t,t);break;case 10:x(32,t,t);break;case 12:x(39,t,t);break;case 14:x(36,t,t);break;case 3:x(12,t,t);break;case 18:x(20,t,t);break;case 4:case 19:x(14,t,t)}return z(0)}let n=e.charCodeAt(s);switch(o){case 0:case 1:{let r=o===0,i=n|32;if(r){if(i===99&&E(`click`,s)&&!T(e.charCodeAt(s+5))){x(26,s,s+5);continue}if(i===104&&E(`href`,s)&&!T(e.charCodeAt(s+4))){x(28,s,s+4);continue}if(n===34){let t=e.indexOf(`"`,s+1);if(t!==-1){x(27,s,t+1);continue}}if(i===100&&E(`default`,s)&&!T(e.charCodeAt(s+7))){x(33,s,s+7);continue}let t=M(s);if(t!==-1){x(40+t,s,A(_[t]));continue}if(n===10){let t=s+1;for(;e.charCodeAt(t)===10;)t++;x(2,s,t);continue}if(D(n)){s=O(s);continue}}else if(n!==10&&D(n)){let n=s+1;for(;n<t&&e.charCodeAt(n)!==10&&D(e.charCodeAt(n));)n++;s=n;continue}if(n===35||n===37&&e.charCodeAt(s+1)===37&&e.charCodeAt(s+2)!==123){s=A(s);continue}if(i===115){if(r&&E(`scale`,s)){let e=O(s+5);if(e>s+5){x(7,s,e),C(5);continue}}if(E(`style`,s)){let e=O(s+5);if(e>s+5){x(34,s,e),C(13);continue}}if(E(`state`,s)){let e=O(s+5);if(e>s+5){s=e,C(2);continue}if(r&&E(`diagram`,s+5)){let t=E(`-v2`,s+12)?s+15:s+12;if(e=O(t),e>t){x(3,s,e);continue}}}}else if(i===99){if(E(`class`,s)){let e=E(`def`,s+5),t=e?s+8:s+5,n=O(t);if(n>t){x(e?29:37,s,n),C(e?9:11);continue}}}else if(i===97&&r&&(E(`acctitle`,s)||E(`accdescr`,s))){let t=(e.charCodeAt(s+3)|32)==116,n=O(s+8),r=e.charCodeAt(n);if(r===58){x(t?21:23,s,O(n+1)),C(t?6:7);continue}if(r===123&&!t){s=O(n+1),C(8);continue}}if(r){if(n===123){x(10,s,s+1),C(1);continue}}else{let e=M(s);if(e!==-1){x(40+e,s,A(_[e]));continue}if(n===125){x(11,s,s+1),w();continue}if(n===10){s++;continue}}if(i===110&&E(`note`,s)){let e=O(s+4);if(e>s+4){x(19,s,e),C(15);continue}}if(r&&i===104&&E(`hide empty description`,s)&&!T(e.charCodeAt(s+22))){x(6,s,s+22);continue}if(n===91&&e.charCodeAt(s+1)===42&&e.charCodeAt(s+2)===93){x(44,s,s+3);continue}let a=s;for(;a<t;){let t=e.charCodeAt(a);if(t===58||t===45||t===123||D(t))break;a++}if(a>s){R(s,a);continue}if(n===58){for(a=s+1;a<t;){let n=e.charCodeAt(a);if(n===10||n===59)break;if(n===58){let n=e.charCodeAt(a+1);if(a+1>=t||n===58||n===10||n===59)break;a++}a++}if(a>s+1){S(4,e.slice(s,a).trim(),s,a);continue}if(e.charCodeAt(s+1)===58&&e.charCodeAt(s+2)===58){x(45,s,s+3);continue}}else if(n===45&&e.charCodeAt(s+1)===45){if(e.charCodeAt(s+2)===62){x(5,s,s+3);continue}if(!r){x(18,s,s+2);continue}}if(!r)return z(1);x(48,s,s+1);continue}case 2:{if(n!==10&&D(n)){let n=s+1;for(;n<t&&e.charCodeAt(n)!==10&&D(e.charCodeAt(n));)n++;s=n;continue}if(n===35||n===37&&e.charCodeAt(s+1)===37&&e.charCodeAt(s+2)!==123){s=A(s);continue}let r=L(s);if(r!==-1){let t=b[r],n=r===2||r===5;S(n?17:r%3==0?15:16,e.slice(s,t).trim(),s,t+(n?10:8)),w();continue}if(n===34){s++,C(3);continue}let i=n===10?O(s):s;if(E(`as`,i)){let e=O(i+2);if(e>i+2){x(13,s,e),C(4);continue}}if(n===10){s++,w();continue}if(n===123){x(10,s,s+1),w(),C(1);continue}if(T(n)){let t=k(s),n=O(t);if(n>t&&T(e.charCodeAt(n))){let t=p(n+1);if(t!==-1&&t<j(n))return c=`Error: State name must be a single word. Found: "${e.slice(s,t+1).trim()}"`,z(1)}}let a=s+1;for(;a<t;){let t=e.charCodeAt(a);if(t===123||D(t))break;a++}x(9,s,a);continue}case 3:{if(n===34){s++,w();continue}let r=e.indexOf(`"`,s);x(12,s,r===-1?t:r);continue}case 4:{let n=s;for(;n<t;){let t=e.charCodeAt(n);if(t===10||t===123)break;n++}R(s,n)&&w();continue}case 5:{if(n>=48&&n<=57){let n=s+1;for(;n<t&&e.charCodeAt(n)>=48&&e.charCodeAt(n)<=57;)n++;x(8,s,n);continue}let r=O(s);if(r>s&&E(`width`,r)&&!T(e.charCodeAt(r+5))){s=r+5,w();continue}return z(1)}case 6:x(22,s,A(s)),w();continue;case 7:x(24,s,A(s)),w();continue;case 8:{if(n===125){s++,w();continue}let r=e.indexOf(`}`,s);x(25,s,r===-1?t:r);continue}case 9:{let e=E(`default`,s)&&O(s+7)>s+7,t=e?s+7:k(s),n=O(t);if(t===s||n===t)return z(1);x(e?31:30,s,n),w(),C(10);continue}case 10:x(32,s,A(s)),w();continue;case 11:{let t=k(s);if(t===s)return z(1);for(;e.charCodeAt(t)===44;){let e=O(t+1),n=k(e);if(n===e)break;t=n}x(38,s,t),w(),C(12);continue}case 12:x(39,s,A(s)),w();continue;case 13:{let n=s;for(;n<t&&(T(e.charCodeAt(n))||e.charCodeAt(n)===44);)n++;let r=O(n);if(n===s||r===n)return z(1);x(35,s,r),w(),C(14);continue}case 14:x(36,s,A(s)),w();continue;case 15:if(E(`left of`,s)&&!T(e.charCodeAt(s+7))){x(46,s,s+7),w(),C(16);continue}if(E(`right of`,s)&&!T(e.charCodeAt(s+8))){x(47,s,s+8),w(),C(16);continue}if(n===34){s++,w(),C(18);continue}return z(1);case 16:{let n=O(s),r=n;for(;r<t;){let t=e.charCodeAt(r);if(t===58||t===45||D(t))break;r++}if(r===n)return z(1);R(s,r)&&(w(),C(17));continue}case 17:{let n=O(s);if(e.charCodeAt(n)===58){let r=n+1;for(;r<t;){let t=e.charCodeAt(r);if(t===58||t===10||t===59)break;r++}if(r>n+1){S(20,e.slice(s+2,r).trim(),s,r),w();continue}}let r=e.indexOf(`
|
|
4
4
|
`,s),i=-1;for(;r!==-1&&(i=O(r),!E(`end note`,i)||T(e.charCodeAt(i+8)));)r=e.indexOf(`
|
|
5
5
|
`,i);if(r===-1)return z(1);S(20,e.slice(s,i).trim(),s,i+8),w();continue}case 18:{let r=O(s);if(E(`as`,r)){x(13,s,O(r+2)),w(),C(19);continue}if(n===34){s++;continue}let i=e.indexOf(`"`,s);x(20,s,i===-1?t:i);continue}case 19:R(s,A(s))&&w();continue}}}var R=[`TB`,`BT`,`RL`,`LR`],z=`'NL', 'ID', 'HIDE_EMPTY', 'scale', 'COMPOSIT_STATE', 'STATE_DESCR', 'FORK', 'JOIN', 'CHOICE', 'CONCURRENT', 'note', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'CLICK', 'classDef', 'style', 'class', 'direction_tb', 'direction_bt', 'direction_rl', 'direction_lr', 'EDGE_STATE'`;function B(e,t){let{types:n,texts:r,starts:i,error:a}=L(e),o=0,s=t=>{let r=n[o];throw r===1?a===void 0?O(`state`,e,i[o],``,!0):new S(a,`syntax`,{type:`state`,...w(e,i[o])}):O(`state`,e,i[o],`Expecting ${t}, got '${M[r]}'`)},c=e=>(n[o]!==e&&s(`'${M[e]}'`),r[o++]),l=()=>{let e=n[o];e!==14&&e!==44&&s(`'ID', 'EDGE_STATE'`);let t=r[o++].trim();return n[o]===45?(o++,{stmt:`state`,id:t,classes:[c(14).trim()],type:`default`,description:``}):{stmt:`state`,id:t,type:`default`,description:``}};for(;n[o]===2;)o++;n[o]!==3&&s(`'NL', 'SD'`),o++;let u=[],d=[],f=e=>{e!==`nl`&&u.push(e)},p=(e,t)=>{o++;let n=[];u.push({stmt:`state`,id:e,type:`default`,description:t,doc:n}),d.push(u),u=n};for(;;){let e=n[o];switch(e){case 2:o++;break;case 14:case 44:{let e=l();if(n[o]===4)e.description=t.trimColon(r[o++]),f(e);else if(n[o]===5){o++;let i=l();n[o]===4?f({stmt:`relation`,state1:e,state2:i,description:t.trimColon(r[o++])}):f({stmt:`relation`,state1:e,state2:i})}else f(e);break}case 6:f(r[o++]);break;case 7:o++,c(8),f(r[o-2]);break;case 9:n[o+1]===10?p(r[o++],``):f(r[o++]);break;case 12:{let e=r[o++];c(13);let t=c(14);if(n[o]===10)p(t,e);else if(t.includes(`:`)){let n=t.split(`:`);f({stmt:`state`,id:n[0],type:`default`,description:[e.trim(),n[1]]})}else f({stmt:`state`,id:t,type:`default`,description:e.trim()});break}case 15:f({stmt:`state`,id:r[o++],type:`fork`});break;case 16:f({stmt:`state`,id:r[o++],type:`join`});break;case 17:f({stmt:`state`,id:r[o++],type:`choice`});break;case 18:o++,f({stmt:`state`,id:t.getDividerId(),type:`divider`});break;case 19:{let e=r[o++];if(n[o]===46||n[o]===47){let e=r[o++].trim();f({stmt:`state`,id:c(14).trim(),note:{position:e,text:c(20).trim()}})}else n[o]!==20&&s(`'NOTE_TEXT', 'left_of', 'right_of'`),o++,c(13),c(14),f(e);break}case 40:case 41:case 42:case 43:{let n=R[e-40];o++,t.setDirection(n),f({stmt:`dir`,value:n});break}case 21:{o++;let e=c(22).trim();t.setAccTitle(e),f(e);break}case 23:{o++;let e=c(24).trim();t.setAccDescription(e),f(e);break}case 25:{let e=r[o++].trim();t.setAccDescription(e),f(e);break}case 26:{o++;let e=l(),t,i=``;n[o]===28?(o++,t=c(27)):(n[o]!==27&&s(`'STRING', 'HREF'`),t=r[o++],i=c(27)),c(2),f({stmt:`click`,id:e,url:t,tooltip:i});break}case 29:o++,f({stmt:`classDef`,id:c(30).trim(),classes:c(32).trim()});break;case 34:o++,f({stmt:`style`,id:c(35).trim(),styleClass:c(36).trim()});break;case 37:o++,f({stmt:`applyClass`,id:c(38).trim(),styleClass:c(39).trim()});break;case 11:d.length===0&&s(`'$end', ${z}`),o++,u=d.pop();break;case 0:return d.length>0&&s(`'STRUCT_STOP', ${z}`),t.setRootDoc(u),u;default:s(d.length>0?`'STRUCT_STOP', ${z}`:`'$end', ${z}`)}}}var ne=40,re=16,ie=44,V=16,ae=10,oe=16,se=10,ce=26,le=8,ue=320,de=10,fe=8,pe=` fill="var(--_s)" stroke="var(--_b)"`,H=` fill="none" stroke="var(--_b)"`,me=/(?:^| )statediagram-(?:state|cluster-alt|cluster|note)(?= |$)/g,he=new Map([[`rectWithTitle`,1],[`stateStart`,2],[`stateEnd`,3],[`choice`,4],[`fork`,5],[`join`,6],[`note`,7],[`divider`,10]]),ge=[`pele-node pele-state`,`pele-node pele-state`,`pele-node pele-state-start`,`pele-node pele-state-end`,`pele-node pele-state-choice`,`pele-node pele-state-fork`,`pele-node pele-state-join`,`pele-note`,`pele-cluster pele-state-composite`];function _e(e){return e===`TB`||e===`BT`}function ve(e,t,n){let r=e.state?.[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}function ye(e){let t=0,n=e.length;for(;t<n&&e.charCodeAt(t)===34;)t++;for(;n>t&&e.charCodeAt(n-1)===34;)n--;return e.slice(t,n)}function be(e,t,n){return e<t?t:e>n?n:e}function U(e,n,r,i,a){return`<rect x="${t(e)}" y="${t(n)}" width="${t(r)}" height="${t(i)}"${a}/>`}function W(e,t,n,r){let i=_(0,0);return i.isGroup=!0,i.dir=e,i.padX=t,i.padTop=n,i.padBottom=r,i}function G(e,t,n){return p(e.direction)?m(n,r=>K(e,t,n,r)):K(e,t,n,!1)}function K(p,m,S,w){let T=p.graph,D=S.fontSize??16,O=Math.round(D*.875),k=S.measurer??C(S.fontFamily),A=ve(m,`wrappingWidth`,200),j=S.padding??8,M=S.icons,ee=w?`TB`:g(p.direction),te=a(void 0,!1,k,D,0),N=(e,t,n,r=0)=>a(e,!0,k,t,n,r),P=new Map,F=[],I=[],L=(e,t,n)=>(F.push({node:e,kind:t,style:void 0,label:te,lines:[],w:0,h:0,titleH:0}),n&&I.push(n),F.length-1);for(let e of T.nodes){if(e.shape===`noteGroup`)continue;let t=e.isGroup?e.shape===`divider`?9:8:he.get(e.shape)??0;P.set(e.id,L(e,t,void 0))}let R=F.length,z=[];for(let e=0;e<R;e++){let t=F[e].node.parentId,n=t===void 0?void 0:P.get(t);z.push(n!==void 0&&n!==e&&F[n].node.isGroup?n:-1)}{let e=[];for(let t=0;t<R;t++)e.push([]);let t=[],n=new Uint8Array(R);for(let r=0;r<R;r++)z[r]===-1?(n[r]=1,t.push(r)):e[z[r]].push(r);let r=0,i=()=>{for(;r<t.length;r++)for(let i of e[t[r]])n[i]||(n[i]=1,t.push(i))};i();let a=new Int32Array(R).fill(-1);for(let e=0;e<R;e++){if(n[e])continue;let r=e;for(;a[r]!==e;)a[r]=e,r=z[r];z[r]=-1,n[r]=1,t.push(r),i()}}let B=new Int32Array(R).fill(-1);for(let e=0;e<R;e++){let t=F[e].node.noteFor,n=t===void 0?void 0:P.get(t);n!==void 0&&(B[e]=n,z[e]=z[n])}let G=e=>g(F[e].node.dir),K=e=>_e(z[e]===-1?ee:G(z[e])),q=new Int32Array(R),Se=new Uint8Array(R),J=Array(R).fill(1/0),Ce=0,we=new Int32Array(2*R);for(let e of T.edges){let t=P.get(e.start),n=P.get(e.end);if(t!==void 0&&n!==void 0){if(e.pattern===`dashed`){Se[F[t].kind===7?n:t]=1;continue}q[t]=Math.max(q[t],++we[2*t]),q[n]=Math.max(q[n],++we[2*n+1]),J[t]===1/0&&(J[t]=Ce++),J[n]===1/0&&(J[n]=Ce++)}}for(let e=0;e<R;e++){let t=F[e],n=t.node,i=r(n.cssStyles.length>0?n.cssCompiledStyles.concat(n.cssStyles):n.cssCompiledStyles),a=+!!i.bold|(i.italic?2:0),o=i.fontSize??D;t.style=i;let s;switch(t.kind){case 8:t.label=N(n.label,o,4e3,a),t.titleH=t.label.height>0?t.label.height+12:0,s=W(G(e),V,t.titleH+V,V),s.minW=t.label.width+2*V;break;case 9:s=W(G(e),ae,ae,ae);break;case 2:t.w=t.h=14;break;case 3:t.w=t.h=18;break;case 4:t.w=t.h=30;break;case 5:case 6:{let n=be(40*q[e]+16,72,320);t.w=K(e)?n:fe,t.h=K(e)?fe:n;break}case 10:break;case 7:t.label=N(n.label,O,Math.max(A,ue)),t.w=t.label.width+24,t.h=t.label.height+16;break;default:{t.label=N(n.label,o,A,a);let e=t.label.width,r=t.label.height+2*se;if(t.kind===1){r+=14;for(let i of n.description){let n=N(i===``?` `:i,O,A,a);t.lines.push(n),n.width>e&&(e=n.width),r+=n.height}}t.w=Math.max(e+2*oe,56),t.h=r}}s??=_(t.w,t.h),(t.kind===0||t.kind===1)&&(s.span=(K(e)?t.w:t.h)-24),I.push(s)}let Y=[],Te=[],Ee=[],X=new Int32Array(R),Z=new Float64Array(R),De=new Float64Array(R),Oe=new Map,ke=(e,t)=>{if(!I[e].isGroup)return!1;for(let n=z[t];n!==-1;n=z[n])if(n===e)return!0;return!1},Ae=(e,t)=>(Oe.set(Y.length,e),J.push(t?-1:1/0),L(void 0,10,_(0,0,e)));for(let e of T.edges){let t=P.get(e.start),n=P.get(e.end);if(t===void 0||n===void 0)continue;let r=N(e.label,O,A),i=r.width>0?r.width+12:0;t===n?(X[t]++,Z[t]=Math.max(Z[t],i),De[t]+=r.height):ke(t,n)?t=Ae(t,!0):ke(n,t)&&(n=Ae(n,!1)),Ee.push(e),Te.push(r),Y.push({src:t,dst:n,minlen:1,labelW:i,labelH:r.height>0?r.height+4:0,route:[],labelX:0,labelY:0})}for(let e=0;e<R;e++){if(B[e]!==-1)continue;let t=I[e],n=0;if(X[e]>0){let r=ce+(X[e]-1)*8;n=K(e)?r+Z[e]:r*.75+4+De[e],t.isGroup||(K(e)?(t.w+=2*n,t.h=Math.max(t.h,De[e])):(t.h+=2*n,t.w=Math.max(t.w,Z[e])),n=0)}if(!Se[e]&&n===0){t.parent=z[e];continue}let r=K(e)?W(`LR`,n,0,0):W(`TB`,0,n,n);r.parent=z[e],J.push(J[e]),I[e].parent=L(void 0,10,r)}for(let e=0;e<R;e++)B[e]!==-1&&(I[e].parent=I[B[e]].parent);{let e=[];for(let t=0;t<I.length;t++)e.push([]);let t=[];for(let n=0;n<I.length;n++){let r=I[n].parent;r>=0?e[r].push(n):t.push(n)}let n=e=>F[e].kind===2?0:1,r=(e,t)=>n(e)-n(t)||(J[e]===J[t]?0:J[e]<J[t]?-1:1)||e-t,i=0,a=t.sort(r).reverse();for(;a.length>0;){let t=a.pop();I[t].seq=i++;let n=e[t].sort(r);for(let e=n.length-1;e>=0;e--)a.push(n[e])}}let je=h(I,Y,ee,{nodeSep:ve(m,`nodeSpacing`,ne),edgeSep:re,rankSep:ve(m,`rankSpacing`,ie),portSep:20,headRoom:c(`arrow_point`)}),Me=Math.ceil(je.width+2*j),Ne=Math.ceil(je.height+2*j),Pe=[],Fe=new Map;for(let e of Y){let t=e.route;for(let e=3;e<t.length-3;e+=3){let n=Math.round(t[e+1]),r=Fe.get(n);r?r.push(t[e]):Fe.set(n,[t[e]])}}let Ie=[];for(let e=0;e<I.length;e++)Ie.push([]);let Q=[];for(let e=0;e<I.length;e++){let t=I[e].parent;t>=0?Ie[t].push(e):Q.push(e)}let Le=Q.slice();for(let e=0;e<Q.length;e++)for(let t of Ie[Q[e]])Q.push(t);let Re=``,ze=``,Be=``,Ve=``,He=(e,n,r,i,a)=>{let o=e.filter(e=>F[e].kind===9);if(o.length<2)return;let s=(e,t)=>t?I[e].x-I[e].w/2:I[e].y-I[e].h/2,c=(e,t)=>t?I[e].x+I[e].w/2:I[e].y+I[e].h/2;for(let e of[!0,!1]){let l=o.slice().sort((t,n)=>s(t,e)-s(n,e)||t-n),u=!0;for(let t=1;t<l.length;t++)c(l[t-1],e)>s(l[t],e)+.5&&(u=!1);if(u){for(let o=1;o<l.length;o++){let u=t((c(l[o-1],e)+s(l[o],e))/2+j);ze+=`<path class="pele-divider" d="M${e?`${u},${t(r)}V${t(a)}`:`${t(n)},${u}H${t(i)}`}"/>`}return}}for(let e of o){let t=I[e];ze+=U(t.x-t.w/2+j,t.y-t.h/2+j,t.w,t.h,` class="pele-divider" rx="${de}"`)}};He(Le,j/2,j/2,Me-j/2,Ne-j/2);for(let n of Q){let r=F[n],a=r.node,c=r.style;if(a===void 0||c===void 0||r.kind>=9)continue;let l=I[n],u=l.x+j,d=l.y+j,f=r.w,m=r.h,h=` class="pele-label"${c.text}`,g;switch(r.kind){case 8:{let e=u-l.w/2,i=d-l.h/2;g=U(e,i,l.w,l.h,` rx="${de}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${c.shape}`),r.titleH>0&&(g+=`<path d="M${t(e)},${t(i+r.titleH)}H${t(e+l.w)}"${H}${c.line}/>`+o(r.label,xe(l,r.label.width,Fe)+j,i+r.titleH/2,` class="pele-cluster-label"${c.text}`,M)),He(Ie[n],e,i+r.titleH,e+l.w,i+l.h);break}case 2:g=`<circle r="7" fill="var(--_l)"${c.shape}/>`;break;case 3:g=`<circle r="8.5" fill="var(--_bg)" stroke="var(--_l)"${c.line}/><circle r="5" fill="var(--_l)"${c.shape}/>`;break;case 4:g=`<polygon points="0,${t(-m/2)} ${t(f/2)},0 0,${t(m/2)} ${t(-f/2)},0"${pe}${c.shape}/>`;break;case 5:case 6:g=U(-f/2,-m/2,f,m,` rx="2" fill="var(--_l)"${c.shape}`);break;case 7:{let e=t(f/2),n=t(m/2),i=t(f/2-le),a=t(le-m/2);g=`<path d="M-${e},-${n}H${i}L${e},${a}V${n}H-${e}Z" fill="var(--_bg)" stroke="var(--_b)"/><path d="M${i},-${n}V${a}H${e}"${H}/>`+o(r.label,0,0,` class="pele-label" font-size="${O}" fill="var(--_m)"`,M);break}default:{if(g=U(-f/2,-m/2,f,m,` rx="${t(Math.min(de,m/2))}"${pe}${c.shape}`),r.kind===0){g+=o(r.label,0,0,h,M);break}let e=se-m/2+r.label.height;g+=`<path d="M${t(-f/2)},${t(e+6)}H${t(f/2)}"${H}${c.line}/>`+o(r.label,0,e-r.label.height/2,h,M),e+=14;for(let t of r.lines)g+=o(t,0,e+t.height/2,` class="pele-state-description" font-size="${O}"${c.text}`,M),e+=t.height}}let _=p.links.get(a.id);if(_){let e=E(ye(_.tooltip));e&&(g=`<title>${s(e)}</title>`+g),g=y(g,b(ye(_.url)),a.id,Pe,S,` target="_blank"`)}let v=`<g class="${ge[r.kind]}${e(a.cssClasses.replace(me,``))}" data-id="${i(a.id)}"`;r.kind===8?Re+=`${v}>${g}</g>`:r.kind===7?Ve+=`${v} transform="translate(${t(u)},${t(d)})">${g}</g>`:Be+=`${v} transform="translate(${t(u)},${t(d)})">${g}</g>`}let Ue=(e,t,n)=>{let r=I[n];if(r.isGroup)return;let i=F[n],a=i.kind===5||i.kind===6,o=t===0?3:t-3;for(let n of[1,0]){let s=n?r.h:r.w,c=n?i.h:i.w,l=n?i.w:i.h,u=(n?r.y:r.x)+j,d=(n?r.x:r.y)+j,f=e[t+n]-u;if(!(Math.abs(Math.abs(f)-s/2)>=.5)){e[t+n]-=Math.sign(f)*(s-c)/2,a&&l>c&&(e[t+1-n]=be(e[o+1-n],d-l/2+6,d+l/2-6));return}}},We=l();for(let e=0;e<Y.length;e++){let t=Y[e];t.src===t.dst||t.route.length<6||Ee[e].pattern===`dashed`||We.add(t.dst,x(t.route,t.route.length-3,I[t.dst]),`arrow_point`)}let Ge=``,Ke=``,qe=new Int32Array(R),Je=new Float64Array(R);for(let e=0;e<Y.length;e++){let n=Y[e],r=Ee[e],a=Te[e],o=r.pattern===`dashed`,s=o?`none`:`arrow_point`,l;if(n.src===n.dst){let e=I[n.src],r=F[n.src],i=qe[n.src]++,o=K(n.src),u=e.isGroup?e.w:r.w,d=e.isGroup?e.h:r.h,f=(o?u:d)/2,p=Math.max(Math.min((o?d:u)/2-4,8+i*6),2),m=ce+i*8,h=c(s)/(Math.hypot(m,p)||1),g=(t,n)=>e.x+j+(o?f+t:-n),_=(t,n)=>e.y+j+(o?n:f+t),v=(e,n)=>`${t(g(e,n))},${t(_(e,n))}`;l={d:`M${v(0,-p)}C${v(m,-2*p)} ${v(m,2*p)} ${v(m*h,p+p*h)}`,sx:0,sy:0,sdx:0,sdy:0,ex:g(0,p),ey:_(0,p),edx:g(-m,-p)-g(0,0),edy:_(-m,-p)-_(0,0)};let y=Math.hypot(l.edx,l.edy)||1;l.edx/=y,l.edy/=y;let b=ce+(X[n.src]-1)*8,x=Je[n.src]+a.height/2;Je[n.src]+=a.height,n.labelX=o?e.x+f+b+4+n.labelW/2:e.x,n.labelY=o?e.y-De[n.src]/2+x:e.y+f+b*.75+4+x}else{let t=n.route.slice(),r=We.of(n.src,x(t,0,I[n.src])),i=We.of(n.dst,x(t,t.length-3,I[n.dst]));for(let e=0;e<t.length;e+=3)t[e]+=j,t[e+1]+=j;Ue(t,0,n.src),Ue(t,t.length-3,n.dst);let a=Oe.get(e);if(a!==void 0&&t.length>=6){let e=I[a],r=F[n.src].kind===10,i=r?0:t.length-3,o=(e.dir===`TB`||e.dir===`LR`)===r,s=_e(e.dir)?[t[i],e.y+j+(o?F[a].titleH-e.h/2:e.h/2),0]:[e.x+j+(o?-e.w/2:e.w/2),t[i+1],1];t=r?s.concat(t):t.concat(s)}l=d(t,void 0,0,c(s),r,i)}if(Ge+=`<g class="pele-edge ${o?`pele-note-edge" stroke="var(--_b)" stroke-dasharray="3 4`:`pele-transition`}" data-id="${i(r.id)}"><path d="${l.d}"/>`+f(s,l.ex,l.ey,l.edx,l.edy,`var(--_l)`)+`</g>`,a.width>0){let e=n.labelX+j,t=n.labelY+j;Ke+=u(r.id,a,e,t,``,M)}}let $=v(p.title,k,D,j,Me,Ne,(Re?`<g class="pele-clusters">${Re}</g>`:``)+(ze?`<g class="pele-dividers" stroke-dasharray="4 4"${H}>${ze}</g>`:``)+(Ge?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${Ge}</g>`:``)+(Ke?`<g class="pele-edge-labels" font-size="${O}">${Ke}</g>`:``)+`<g class="pele-nodes">${Be}${Ve}</g>`);return{svg:n(`state`,$.width,$.height,D,S,p,$.content),width:$.width,height:$.height,links:Pe}}function xe(e,t,n){let r=n.get(Math.round(e.y-e.h/2));if(r===void 0||t===0)return e.x;let i=e.x-e.w/2,a=t/2,o=e.x,s=-1;for(let t of[e.x,i+V+a,i+e.w-V-a]){let n=1/0;for(let o of r)o>i&&o<i+e.w&&(n=Math.min(n,Math.abs(o-t)-a));if(n>=6)return t;n>s+.5&&(s=n,o=t)}return o}var q={type:`state`,math:!0,parse(e,t,n){let r=new j;return n&&(r.title=n),B(e,r),r},render:G};export{q as state};
|
|
6
|
-
//# sourceMappingURL=BB2UYUI2-
|
|
6
|
+
//# sourceMappingURL=BB2UYUI2-CujjjZN9.js.map
|