@inkeep/open-knowledge 0.46.0-beta.21 → 0.46.0-beta.22
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/{abnfDiagram-VRR7QNED-CyIW4oQ8.mjs → abnfDiagram-VRR7QNED-C01LwnLj.mjs} +2 -2
- package/dist/{acp-harness-probe--uGaXex0.mjs → acp-harness-probe-CRn8eK5E.mjs} +2 -2
- package/dist/{architectureDiagram-ZJ3FMSHR-CLPPzKEe.mjs → architectureDiagram-ZJ3FMSHR-54tD72To.mjs} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-C-y19CxU.mjs → blockDiagram-677ZJIJ3-BFWl-x5e.mjs} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-o2jsbHiN.mjs → c4Diagram-LMCZKHZV-BkY5gq8X.mjs} +2 -2
- package/dist/channel-DppMxZyL.mjs +2 -0
- package/dist/{chunk-32BRIVSS-DYHXEarP.mjs → chunk-32BRIVSS-Bsc-9o_O.mjs} +2 -2
- package/dist/{chunk-52WLFC77-DH1KQBRY.mjs → chunk-52WLFC77-D0ICJuoG.mjs} +2 -2
- package/dist/{chunk-C7G6YPKG-Bd7km2QU.mjs → chunk-C7G6YPKG-6PzAyV0E.mjs} +2 -2
- package/dist/{chunk-EX3LRPZG-BMWHPlJp.mjs → chunk-EX3LRPZG-Bk8s0J-D.mjs} +2 -2
- package/dist/{chunk-FWX5IMBZ-BAa0doOI.mjs → chunk-FWX5IMBZ-BKxaTzwN.mjs} +2 -2
- package/dist/{chunk-HKLCLINH-C_zL5CHv.mjs → chunk-HKLCLINH-DkU4By68.mjs} +2 -2
- package/dist/{chunk-HOUHSVGY-DEVfwHxJ.mjs → chunk-HOUHSVGY-CM96kWHC.mjs} +2 -2
- package/dist/{chunk-ICXQ74PX-BVMOo_rh.mjs → chunk-ICXQ74PX-a_OoZV-J.mjs} +2 -2
- package/dist/{chunk-MOJQB5TN-BlrHhlHB.mjs → chunk-MOJQB5TN-a3t5NDdo.mjs} +2 -2
- package/dist/{chunk-OGEWGWER-Diyk7J65.mjs → chunk-OGEWGWER-BE748IwJ.mjs} +2 -2
- package/dist/{chunk-PUDLZKDR-BIqiwjP2.mjs → chunk-PUDLZKDR-CgH8fCPb.mjs} +2 -2
- package/dist/{chunk-Q4XR5HBZ-CQiRMQNx.mjs → chunk-Q4XR5HBZ-Dj_gUljr.mjs} +2 -2
- package/dist/{chunk-V7JOEXUC-31UT4kI9.mjs → chunk-V7JOEXUC-Ca3kqXAx.mjs} +2 -2
- package/dist/{chunk-VAUOI2AC-Irj_jrJs.mjs → chunk-VAUOI2AC-CLylHljB.mjs} +2 -2
- package/dist/{chunk-VR4S4FIN-ClMSUBWQ.mjs → chunk-VR4S4FIN-DFCLUzSW.mjs} +2 -2
- package/dist/{chunk-WYO6CB5R-Bu0g7bu2.mjs → chunk-WYO6CB5R-CkxB2qiV.mjs} +2 -2
- package/dist/{chunk-XKWWSDBF-CY0zm_d3.mjs → chunk-XKWWSDBF-BTq_A_8q.mjs} +3 -3
- package/dist/{chunk-ZGVPDNZ5-DSVV_BiI.mjs → chunk-ZGVPDNZ5-DExn7OfJ.mjs} +2 -2
- package/dist/classDiagram-OUVF2IWQ-c5qgwZAE.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-D9ilZPqi.mjs +2 -0
- package/dist/cli.mjs +64 -64
- package/dist/constants-BtN4Fp1d.mjs +2 -0
- package/dist/{cynefinDiagram-TSTJHNR4-Dp6ZCni9.mjs → cynefinDiagram-TSTJHNR4-CT6-xML3.mjs} +2 -2
- package/dist/{dagre-VKFMJZFB-FTWgT7HO.mjs → dagre-VKFMJZFB-BGysx5vx.mjs} +2 -2
- package/dist/{diagram-FQU43EPY-BgUehmaO.mjs → diagram-FQU43EPY-ZqRG6Q5e.mjs} +2 -2
- package/dist/{diagram-G47NLZAW-gH-Ih94q.mjs → diagram-G47NLZAW-DI7dcuHy.mjs} +2 -2
- package/dist/{diagram-NH7WQ7WH-DYr1RvMm.mjs → diagram-NH7WQ7WH-D1oPk0UR.mjs} +2 -2
- package/dist/{diagram-OA4YK3LP-BRb4Y3EQ.mjs → diagram-OA4YK3LP-Bm3vioHL.mjs} +2 -2
- package/dist/{diagram-WEI45ONY-Bcifi75m.mjs → diagram-WEI45ONY-Dn8oUVjW.mjs} +2 -2
- package/dist/{ebnfDiagram-CCIWWBDH-BlBla8lv.mjs → ebnfDiagram-CCIWWBDH-Cv_KK2i9.mjs} +2 -2
- package/dist/{erDiagram-Q63AITRT-BxKcPLGX.mjs → erDiagram-Q63AITRT-Bt6lGD8v.mjs} +2 -2
- package/dist/{esm-CItKw7Y6.mjs → esm-DxvI2ZVA.mjs} +1 -1
- package/dist/{flag-coverage-6JEX67RU-D1byxsyF.mjs → flag-coverage-6JEX67RU-C21BAvUp.mjs} +2 -2
- package/dist/flowDiagram-23GEKE2U-BHZRRZtz.mjs +1 -0
- package/dist/fs-traced-DbSNN5G0.mjs +1 -0
- package/dist/fs-traced-S0kTDDbJ.mjs +12 -0
- package/dist/{ganttDiagram-NO4QXBWP-DGpVzTxp.mjs → ganttDiagram-NO4QXBWP-DbUuL83g.mjs} +2 -2
- package/dist/{getMachineId-bsd-BZEr0yHg.mjs → getMachineId-bsd-Ba_eiHKT.mjs} +2 -2
- package/dist/{getMachineId-bsd-BN-aHS3V.mjs → getMachineId-bsd-MpjjBCnQ.mjs} +2 -2
- package/dist/{getMachineId-darwin-BWLy_Kik.mjs → getMachineId-darwin-CCowcQE1.mjs} +2 -2
- package/dist/{getMachineId-darwin-CRdUTcMc.mjs → getMachineId-darwin-CCtDS2VI.mjs} +2 -2
- package/dist/{getMachineId-linux-CVE8Y0Fo.mjs → getMachineId-linux-DMjXicei.mjs} +2 -2
- package/dist/{getMachineId-linux-DX2JAnAv.mjs → getMachineId-linux-DdmiwElW.mjs} +2 -2
- package/dist/{getMachineId-unsupported-CA6ETHmi.mjs → getMachineId-unsupported-x9lk4Rw9.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DmJiNggJ.mjs → getMachineId-unsupported-xN2oDqpO.mjs} +2 -2
- package/dist/{getMachineId-win-nbjd9hhL.mjs → getMachineId-win-DuQfpi_A.mjs} +2 -2
- package/dist/{getMachineId-win-B_OXaWuM.mjs → getMachineId-win-mbAJtBuz.mjs} +2 -2
- package/dist/{git-handle-C-4njDy4.mjs → git-handle-B4sZCaOF.mjs} +2 -2
- package/dist/git-handle-uBCwtyAf.mjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-BHxhlO7y.mjs → gitGraphDiagram-IHSO6WYX-C-Kq9SCM.mjs} +2 -2
- package/dist/index.d.mts +94 -4
- package/dist/index.mjs +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-Be13xP1j.mjs → infoDiagram-FWYZ7A6U-BcXqPzyL.mjs} +2 -2
- package/dist/init-Cx94zXdb.mjs +1 -0
- package/dist/{init-ClZIjoyZ.mjs → init-DB7V_L0g.mjs} +35 -35
- package/dist/{ishikawaDiagram-FXEZZL3T-DTVMpa-_.mjs → ishikawaDiagram-FXEZZL3T-tlTxPgv8.mjs} +2 -2
- package/dist/{journeyDiagram-5HDEW3XC-BTWVlxLh.mjs → journeyDiagram-5HDEW3XC-NczxLuUX.mjs} +2 -2
- package/dist/{kanban-definition-HUTT4EX6-g-tXrd8p.mjs → kanban-definition-HUTT4EX6-CJ2cty8a.mjs} +2 -2
- package/dist/{katex-Bi5vgbZh.mjs → katex-BCblvTb9.mjs} +1 -1
- package/dist/{launch-json-removal-A4pVH8BU.mjs → launch-json-removal-D3Fmd63b.mjs} +2 -2
- package/dist/{line-Bq-Bigdz.mjs → line-CyR2aPKZ.mjs} +2 -2
- package/dist/loader-C3960z78.mjs +2 -0
- package/dist/loader-CRQzxtMB.mjs +1 -0
- package/dist/{logger-B7Z8XO-z.mjs → logger-5LePyO3n.mjs} +3 -3
- package/dist/{lzma-66I-DF3D.mjs → lzma-yp9l_vMN.mjs} +2 -2
- package/dist/markdownit-7GRZNS8U.mjs +1 -0
- package/dist/{markdownit-BX7TxUEO.mjs → markdownit-BNz2xGu4.mjs} +1 -1
- package/dist/md-manager-DZuZjzrd.mjs +2 -0
- package/dist/{mermaid.core-BeGj3DLy.mjs → mermaid.core-CZm3qvuv.mjs} +3 -3
- package/dist/{mindmap-definition-LN4V7U3C-BMIyW_lX.mjs → mindmap-definition-LN4V7U3C-DYytxufy.mjs} +2 -2
- package/dist/{open-browser-ht7iEqMu.mjs → open-browser-C7gapRCk.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{pegDiagram-2B236MQR-j5NleAHq.mjs → pegDiagram-2B236MQR-tT5pVAwT.mjs} +2 -2
- package/dist/{pieDiagram-ENE6RG2P-BGffNz0y.mjs → pieDiagram-ENE6RG2P-kD_93j1i.mjs} +2 -2
- package/dist/{preview-BLLXZhXK.mjs → preview-BptdoKu1.mjs} +2 -2
- package/dist/preview-CLNTLfvK.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-FNrTftul.js → ActivityModeContent-DSMkdCKH.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-Fn4gJpWE.js → AgentDiffPane-C4Ff6cFp.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-C6qMoZ6y.js → AgentThreadClientBinder-BGP2cYbn.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-hZYC6kff.js → ChangedOutsideBadge-5cWobd6L.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-7jlwH38H.js → CodeMirrorPropInput-BFenJemA.js} +1 -1
- package/dist/public/assets/{DocumentContext-D2Zxk1ro.js → DocumentContext-CKMhLy2N.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-EtEqcZm6.js → EditorModeToggle-BYt93vnW.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CqlZIrfh.js → EnableSyncConfirmDialog-V141T2QR.js} +1 -1
- package/dist/public/assets/FeedbackForm-BFPoJkdK.js +1 -0
- package/dist/public/assets/{GraphPanel-C1iICOOC.js → GraphPanel-BHhs9d_j.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CcnnPQWH.js → ImportSkillDialog-BBOb5ucQ.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BBNyuz2O.js → LintConfigEditor-BQrh8rjg.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-CoGLUHSS.js → ManagedArtifactProperties-C2RUr9ul.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-C4CnV_IS.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-Bzy77Gzw.js → McpConsentDialogBody-CnzWhv5d.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-zpY_4dgz.js → MermaidDocEditor-CNK3K4lC.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CoM6D3VY.js → ReportBugDialogBody-cxc30WKp.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DvpY4XyG.js → SchemaConfigEditor-BpQBtTyY.js} +1 -1
- package/dist/public/assets/{SessionsHost-C4hHsdu0.js → SessionsHost-CbagO4xN.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-L8vKdOyj.js → SettingsDialogBody-hWpwDgnT.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-M8nEIk2w.js → ShareBranchSwitchDialog-ChLbTjJf.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BJ8uKULf.js → ShareReceiveDialog-BV36sHT2.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Ch00HDAB.js → ShareReceiveMissDialog-BuwUGCen.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-cQP3OGlb.js → SkillEditBanner-CTLg7M8S.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DH6wq8QJ.js → SkillOriginInline-BC5LfTxy.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-s_AZBCXM.js → SkillToolbarControls-B2lqqSNx.js} +1 -1
- package/dist/public/assets/{SourceEditor-CsUfQH2a.js → SourceEditor-hADslP9Q.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DYpr3gZa.js → TerminalPanel-BPqwq8Q7.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-YDhaoZtO.js → TerminalWindowApp-DXkoU-Wq.js} +1 -1
- package/dist/public/assets/{TextDocEditor-eezsdRDa.js → TextDocEditor-D07aFI4B.js} +1 -1
- package/dist/public/assets/{ThreadView-B3krQ2Z2.js → ThreadView-De8W8Sau.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Dt3MCe5V.js → TimelineDiffPane-BgqJsURk.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D9lLLqBv.js → agent-diff-store-D3wCGBNo.js} +1 -1
- package/dist/public/assets/{agent-visibility-CTpE4Fld.js → agent-visibility-jMXG7qfn.js} +1 -1
- package/dist/public/assets/{auth-state-cache-39oyxDcu.js → auth-state-cache-cFen_h-t.js} +1 -1
- package/dist/public/assets/{client-version-_i4MI4fL.js → client-version-BBVOjYrp.js} +1 -1
- package/dist/public/assets/{comment-chips-BovIyLpD.js → comment-chips-Dyvy03mN.js} +1 -1
- package/dist/public/assets/{config-provider-BwmrVQtw.js → config-provider-D2FBTvIx.js} +1 -1
- package/dist/public/assets/{dist-DZN2z2Ue2.js → dist-Bs8DNjRh2.js} +173 -173
- package/dist/public/assets/{doc-paths-CR2slzEF.js → doc-paths-BbWRFVgi.js} +1 -1
- package/dist/public/assets/{documents-events-BhxlQGXQ.js → documents-events-BajItHup.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-DLG2-zm9.js → file-tree-adapter-J6QKEfhJ.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BWXvrWAR.js → file-tree-utils-BbhSDaTW.js} +1 -1
- package/dist/public/assets/{folder-config-api-CZeUrq2G.js → folder-config-api-4IXvDZej.js} +1 -1
- package/dist/public/assets/{index-23dRVBsm.js → index-HKhe_5r9.js} +8 -8
- package/dist/public/assets/{lint-config-client-B-vQycwW.js → lint-config-client-DxXOFrgQ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CfejazL_.js → markdownlint-rule-browser-C30SWnqC.js} +1 -1
- package/dist/public/assets/{navigation-targets-MirHYTh2.js → navigation-targets-CnIm35UZ.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DfPczkie.js → open-managed-artifact-tab-JgSQJhTn.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-Bxm3O-w-.js → pending-receive-nav-store-DsrtuI8M.js} +1 -1
- package/dist/public/assets/{prop-types-BWDJYVli.js → prop-types-CiBsNxle.js} +1 -1
- package/dist/public/assets/{receive-store-BISeFaHm.js → receive-store-CV99IXkf.js} +1 -1
- package/dist/public/assets/{selection-context-I5uwZblj.js → selection-context-DEAlV4hy.js} +1 -1
- package/dist/public/assets/{skill-actions-Diq5Ajd4.js → skill-actions-Du0nfl4o.js} +1 -1
- package/dist/public/assets/{skill-scope-DHskNAp8.js → skill-scope-p6Dsw7Bl.js} +1 -1
- package/dist/public/assets/{skills-api-DhbM0zp_.js → skills-api-ctJhutDo.js} +1 -1
- package/dist/public/assets/{src-BYvjpH1r.js → src-DvGM96LY.js} +1 -1
- package/dist/public/assets/{tag-pill-input-Bz9pQv5K.js → tag-pill-input-BR6KfEym.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DBjtrY9M.js → target-navigation-intent-CbnILhIU.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-U2hE6Ms1.js → terminal-launch-events-BO-PD_eo.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-D-x2ahmt.js → terminal-telemetry-D8M0Ozm1.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DKA4UU69.js → typing-burst-detector-J49yrfso.js} +1 -1
- package/dist/public/assets/{uninstall-Ds-POoIZ.js → uninstall-CFuBiQfI.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DPG6akAo.js → use-activity-panel-BkkZ0ANm.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-Cm_U612q.js → use-apply-config-color-theme-C7h1V38B.js} +1 -1
- package/dist/public/assets/{use-collab-url-26Kxxrga.js → use-collab-url-DZPhaKCl.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-PP95E3RH.js → use-live-xterm-theme-CbDRpOKw.js} +1 -1
- package/dist/public/assets/{use-open-skill-BKzqH_Ko.js → use-open-skill-DLwXz8W_.js} +1 -1
- package/dist/public/assets/{use-settings-route-b9ICe6ju.js → use-settings-route-CS1B3HfO.js} +1 -1
- package/dist/public/assets/{use-skill-directory-BhzSr2An.js → use-skill-directory-jOoyjAPU.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CYFatjkw.js → use-skill-origin-DDWTwjBX.js} +1 -1
- package/dist/public/assets/{use-skills-CQ22zxZh.js → use-skills-udAv99z6.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DD-6dEVX.js → use-terminal-enabled-87atXgw4.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-ktIa370y.js → use-timeline-entry-diff-BN4My22X.js} +1 -1
- package/dist/public/assets/{use-workspace-B7bQ2SZR.js → use-workspace-DGXA9Dn3.js} +1 -1
- package/dist/public/index.html +42 -42
- package/dist/public/uninstall.html +2 -2
- package/dist/{quadrantDiagram-ABIIQ3AL-RE3ttQBG.mjs → quadrantDiagram-ABIIQ3AL-CyuIUsL6.mjs} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-Co0UHOis.mjs → railroadDiagram-RFXS5EU6-CHD_Jape.mjs} +2 -2
- package/dist/{repair-launch-json-D2-N9umw.mjs → repair-launch-json-KmYO_2FG.mjs} +2 -2
- package/dist/{repair-mcp-configs-8xnoWKwL.mjs → repair-mcp-configs-CsIGV5-7.mjs} +2 -2
- package/dist/repair-skills-C0rCwW3E.mjs +1 -0
- package/dist/{repair-skills-Cp0zxj36.mjs → repair-skills-Cie1nS2r.mjs} +2 -2
- package/dist/{requirementDiagram-TGXJPOKE-CkQZFeMs.mjs → requirementDiagram-TGXJPOKE-CGQTVdQl.mjs} +2 -2
- package/dist/{sankeyDiagram-HTMAVEWB-CDausn8Y.mjs → sankeyDiagram-HTMAVEWB-B1AFQN8q.mjs} +2 -2
- package/dist/{sequenceDiagram-DBY2YBRQ-B6TuF3qe.mjs → sequenceDiagram-DBY2YBRQ-JQ2Wynkh.mjs} +2 -2
- package/dist/{server-lock-CWyGkpt0.mjs → server-lock-DW5T6J_m.mjs} +2 -2
- package/dist/server-lock-GGE1_Y5o.mjs +1 -0
- package/dist/{sleep-CKdHmS4J.mjs → sleep-CJdjw5UD.mjs} +6 -6
- package/dist/{sqlite3-TE5AIOTF-BKiscy5E.mjs → sqlite3-TE5AIOTF-DV5JBdcO.mjs} +1 -1
- package/dist/{src-B9eLNT3o.mjs → src-0sJ50HI5.mjs} +125 -125
- package/dist/src-BKLIxQOr.mjs +2030 -0
- package/dist/src-CpgLre_H.mjs +20 -0
- package/dist/{src-R13rZ762.mjs → src-D0P0SFti.mjs} +1 -1
- package/dist/start-DdGn_P_U.mjs +1 -0
- package/dist/{start-eVNrd_nb.mjs → start-DhBxzdcm.mjs} +3 -3
- package/dist/{stateDiagram-2N3HPSRC-C_tdGYXg.mjs → stateDiagram-2N3HPSRC-BzNiMGRR.mjs} +2 -2
- package/dist/stateDiagram-v2-6OUMAXLB-8Ywz0Hzd.mjs +2 -0
- package/dist/{swimlanes-5IMT3BWC-DLXpBxPB.mjs → swimlanes-5IMT3BWC-BrdJ_D0k.mjs} +2 -2
- package/dist/swimlanesDiagram-G3AALYLV-Df_BjTMR.mjs +9 -0
- package/dist/{tar-MZQD7NO4-COEqG_IX.mjs → tar-MZQD7NO4-B2cyr2d4.mjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BtGgJVSL.mjs → timeline-definition-FHXFAJF6-ByhSkc7M.mjs} +2 -2
- package/dist/{vennDiagram-L72KCM5P-DYDKnnjp.mjs → vennDiagram-L72KCM5P-CosAdslh.mjs} +2 -2
- package/dist/{wardleyDiagram-EHGQE667-M2W4S8Ng.mjs → wardleyDiagram-EHGQE667-Bdo1uN9O.mjs} +2 -2
- package/dist/{write-project-skill-Dwv4krCb.mjs → write-project-skill-CKuq5itB.mjs} +4 -4
- package/dist/{xychartDiagram-FW5EYKEG-DX0dJSsD.mjs → xychartDiagram-FW5EYKEG-CBeluzNN.mjs} +2 -2
- package/package.json +5 -5
- package/dist/channel-DhqoAJoQ.mjs +0 -2
- package/dist/classDiagram-OUVF2IWQ-CWObDbTU.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-CUMl48K_.mjs +0 -2
- package/dist/constants-Bb2Znuq1.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-CD0oxQCp.mjs +0 -1
- package/dist/fs-traced-BxDcwVzG.mjs +0 -14
- package/dist/fs-traced-C4vgso5m.mjs +0 -1
- package/dist/git-handle-DBNV29KD.mjs +0 -1
- package/dist/init-CoZdNwPt.mjs +0 -1
- package/dist/loader-BuPU3_5V.mjs +0 -1
- package/dist/loader-DfLacIT6.mjs +0 -4
- package/dist/markdownit-C8k7jh2Z.mjs +0 -1
- package/dist/md-manager-BfHofc4f.mjs +0 -2
- package/dist/preview-CqWoyN0f.mjs +0 -1
- package/dist/public/assets/FeedbackForm-C3WLSH7D.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-YYdD8hua.js +0 -1
- package/dist/repair-skills-BKWnC8s9.mjs +0 -1
- package/dist/server-lock-Cd8tGKJ7.mjs +0 -1
- package/dist/src-CPkwD6c_.mjs +0 -2030
- package/dist/src-DP7egWy_.mjs +0 -20
- package/dist/start-uiE1Xi2-.mjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-B9_dtBI0.mjs +0 -2
- package/dist/swimlanesDiagram-G3AALYLV-DnknHegw.mjs +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{t as r}from"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-C27iG4wY.mjs";import{n as o}from"./chunk-24IMIIXA-BQtWA2ag.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-DcPtGCSm.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-D5a5lNJR.mjs";import{dirname as d,join as f,sep as p}from"node:path";import{existsSync as m}from"node:fs";import{fileURLToPath as h}from"node:url";import{randomBytes as g}from"node:crypto";import{Worker as _}from"node:worker_threads";var v=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:pe(e,+!!t);break;case`number`:de(e,t);break;case`string`:A(e,t,-1,-1);break;case`object`:if(t===null)fe(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),j(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:fe(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=M(t+4*r,`i32`),a=oe(i);if(a===1||a===2)i=ue(i);else if(a===3)i=ce(i);else if(a===4){a=i,i=se(a),a=le(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Le(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=M(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),v=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),b=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),x=o(`sqlite3_step`,`number`,[`number`]),ee=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),ie=o(`sqlite3_finalize`,`number`,[`number`]),ae=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),oe=o(`sqlite3_value_type`,`number`,[`number`]),se=o(`sqlite3_value_bytes`,`number`,[`number`]),ce=o(`sqlite3_value_text`,`string`,[`number`]),le=o(`sqlite3_value_blob`,`number`,[`number`]),ue=o(`sqlite3_value_double`,`number`,[`number`]),de=o(`sqlite3_result_double`,``,[`number`,`number`]),fe=o(`sqlite3_result_null`,``,[`number`]),A=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),j=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),pe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=x(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?y:v)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=b(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=ie(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);N(a),N(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=M(t,`i32`);var r=M(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];M(s,`i8`)!==0;){N(a),N(c),this.handleError(h(this.db,s,-1,a,c));var l=M(a,`i32`);if(s=M(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(N(a),this.handleError(f(this.db,e,-1,a,0)),e=M(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=M(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=ee(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ae(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ae(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var v=console.log.bind(console),y=console.error.bind(console),b,x=!1,ee,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,y(e),x=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var ie;async function ae(e){if(!b)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==ie&&b)e=new Uint8Array(b);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function oe(e,t){try{var n=await ae(e);return await WebAssembly.instantiate(n,t)}catch(e){y(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function se(e){var t=ie;if(!b&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){y(`wasm streaming compile failed: ${e}`),y(`falling back to ArrayBuffer instantiation`)}return oe(t,e)}class ce{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var le=e=>{for(;0<e.length;)e.shift()(s)},ue=[],de=[],fe=()=>{var e=s.preRun.shift();de.push(e)},A=0,j=null;function M(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var pe=!0;function N(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new V(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new V(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new V(29)}if(o===void 0&&i===0)throw new V(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new V(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new V(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{t as r}from"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-C27iG4wY.mjs";import{n as o}from"./chunk-24IMIIXA-BQtWA2ag.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-DcPtGCSm.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-D5a5lNJR.mjs";import{dirname as d,join as f,sep as p}from"node:path";import{fileURLToPath as m}from"node:url";import{existsSync as h}from"node:fs";import{randomBytes as g}from"node:crypto";import{Worker as _}from"node:worker_threads";var v=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:pe(e,+!!t);break;case`number`:de(e,t);break;case`string`:A(e,t,-1,-1);break;case`object`:if(t===null)fe(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),j(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:fe(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=M(t+4*r,`i32`),a=oe(i);if(a===1||a===2)i=ue(i);else if(a===3)i=ce(i);else if(a===4){a=i,i=se(a),a=le(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Le(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=M(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),v=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),b=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),x=o(`sqlite3_step`,`number`,[`number`]),ee=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),ie=o(`sqlite3_finalize`,`number`,[`number`]),ae=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),oe=o(`sqlite3_value_type`,`number`,[`number`]),se=o(`sqlite3_value_bytes`,`number`,[`number`]),ce=o(`sqlite3_value_text`,`string`,[`number`]),le=o(`sqlite3_value_blob`,`number`,[`number`]),ue=o(`sqlite3_value_double`,`number`,[`number`]),de=o(`sqlite3_result_double`,``,[`number`,`number`]),fe=o(`sqlite3_result_null`,``,[`number`]),A=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),j=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),pe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=x(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?y:v)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=b(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=ie(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);N(a),N(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=M(t,`i32`);var r=M(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];M(s,`i8`)!==0;){N(a),N(c),this.handleError(h(this.db,s,-1,a,c));var l=M(a,`i32`);if(s=M(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(N(a),this.handleError(f(this.db,e,-1,a,0)),e=M(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=M(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=ee(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ae(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ae(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var v=console.log.bind(console),y=console.error.bind(console),b,x=!1,ee,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,y(e),x=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var ie;async function ae(e){if(!b)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==ie&&b)e=new Uint8Array(b);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function oe(e,t){try{var n=await ae(e);return await WebAssembly.instantiate(n,t)}catch(e){y(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function se(e){var t=ie;if(!b&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){y(`wasm streaming compile failed: ${e}`),y(`falling back to ArrayBuffer instantiation`)}return oe(t,e)}class ce{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var le=e=>{for(;0<e.length;)e.shift()(s)},ue=[],de=[],fe=()=>{var e=s.preRun.shift();de.push(e)},A=0,j=null;function M(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var pe=!0;function N(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new V(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new V(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new V(29)}if(o===void 0&&i===0)throw new V(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new V(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new V(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
2
2
|
`));if(!e){e=null;break a}t=Array(I(e)+1),e=L(e,t,0,t.length),t.length=e,Ce=t}e=Ce.shift()}return e},ub(e,t){t===null||t===10?(v(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(v(Se(e.output)),e.output=[])},hc(){return{bc:25856,dc:5,ac:191,cc:35387,$b:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ic(){return 0},jc(){return[24,80]}},Oe={ub(e,t){t===null||t===10?(y(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(y(Se(e.output)),e.output=[])}},R={Wa:null,Xa(){return R.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if((n&61440)==24576||(n&61440)==4096)throw new V(63);return R.Wa||={dir:{node:{Ta:R.La.Ta,Ua:R.La.Ua,lookup:R.La.lookup,ib:R.La.ib,rename:R.La.rename,unlink:R.La.unlink,rmdir:R.La.rmdir,readdir:R.La.readdir,symlink:R.La.symlink},stream:{Va:R.Ma.Va}},file:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:{Va:R.Ma.Va,read:R.Ma.read,write:R.Ma.write,jb:R.Ma.jb,kb:R.Ma.kb}},link:{node:{Ta:R.La.Ta,Ua:R.La.Ua,readlink:R.La.readlink},stream:{}},yb:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:Je}},n=Be(e,t,n,r),W(n.mode)?(n.La=R.Wa.dir.node,n.Ma=R.Wa.dir.stream,n.Na={}):(n.mode&61440)==32768?(n.La=R.Wa.file.node,n.Ma=R.Wa.file.stream,n.Ra=0,n.Na=null):(n.mode&61440)==40960?(n.La=R.Wa.link.node,n.Ma=R.Wa.link.stream):(n.mode&61440)==8192&&(n.La=R.Wa.yb.node,n.Ma=R.Wa.yb.stream),n.atime=n.mtime=n.ctime=Date.now(),e&&(e.Na[t]=n,e.atime=e.mtime=e.ctime=n.atime),n},fc(e){return e.Na?e.Na.subarray?e.Na.subarray(0,e.Ra):new Uint8Array(e.Na):new Uint8Array},La:{Ta(e){var t={};return t.dev=(e.mode&61440)==8192?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,W(e.mode)?t.size=4096:(e.mode&61440)==32768?t.size=e.Ra:(e.mode&61440)==40960?t.size=e.link.length:t.size=0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},Ua(e,t){for(var n of[`mode`,`atime`,`mtime`,`ctime`])t[n]!=null&&(e[n]=t[n]);t.size!==void 0&&(t=t.size,e.Ra!=t&&(t==0?(e.Na=null,e.Ra=0):(n=e.Na,e.Na=new Uint8Array(t),n&&e.Na.set(n.subarray(0,Math.min(t,e.Ra))),e.Ra=t)))},lookup(){throw R.nb||(R.nb=new V(44),R.nb.stack=`<generic error, no stack>`),R.nb},ib(e,t,n,r){return R.createNode(e,t,n,r)},rename(e,t,n){try{var r=U(t,n)}catch{}if(r){if(W(e.mode))for(var i in r.Na)throw new V(55);ze(r)}delete e.parent.Na[e.name],t.Na[n]=e,e.name=n,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.Na[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var n=U(e,t),r;for(r in n.Na)throw new V(55);delete e.Na[t],e.ctime=e.mtime=Date.now()},readdir(e){return[`.`,`..`,...Object.keys(e.Na)]},symlink(e,t,n){return e=R.createNode(e,t,41471,0),e.link=n,e},readlink(e){if((e.mode&61440)!=40960)throw new V(28);return e.link}},Ma:{read(e,t,n,r,i){var a=e.node.Na;if(i>=e.node.Ra)return 0;if(e=Math.min(e.node.Ra-i,r),8<e&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if(e=e.node,e.mtime=e.ctime=Date.now(),t.subarray&&(!e.Na||e.Na.subarray)){if(a)return e.Na=t.subarray(n,n+r),e.Ra=r;if(e.Ra===0&&i===0)return e.Na=t.slice(n,n+r),e.Ra=r;if(i+r<=e.Ra)return e.Na.set(t.subarray(n,n+r),i),r}a=i+r;var o=e.Na?e.Na.length:0;if(o>=a||(a=Math.max(a,o*(1048576>o?2:1.125)>>>0),o!=0&&(a=Math.max(a,256)),o=e.Na,e.Na=new Uint8Array(a),0<e.Ra&&e.Na.set(o.subarray(0,e.Ra),0)),e.Na.subarray&&t.subarray)e.Na.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.Na[i+a]=t[n+a];return e.Ra=Math.max(e.Ra,i+r),r},Va(e,t,n){if(n===1?t+=e.position:n===2&&(e.node.mode&61440)==32768&&(t+=e.node.Ra),0>t)throw new V(28);return t},jb(e,t,n,r,i){if((e.node.mode&61440)!=32768)throw new V(43);if(e=e.node.Na,i&2||!e||e.buffer!==C.buffer){i=!0,r=65536*Math.ceil(t/65536);var a=Pt(65536,r);if(a&&w.fill(0,a,a+r),r=a,!r)throw new V(48);e&&((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),C.set(e,r))}else i=!1,r=e.byteOffset;return{Xb:r,Eb:i}},kb(e,t,n,r){return R.Ma.write(e,t,0,r,n,!1),0}}},ke=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Ae=null,je={},z=[],Me=1,B=null,Ne=!1,Pe=!0,V=class{name=`ErrnoError`;constructor(e){this.Pa=e}},Fe=class{hb={};node=null;get flags(){return this.hb.flags}set flags(e){this.hb.flags=e}get position(){return this.hb.position}set position(e){this.hb.position=e}},Ie=class{La={};Ma={};bb=null;constructor(e,t,n,r){e||=this,this.parent=e,this.Xa=e.Xa,this.id=Me++,this.name=t,this.mode=n,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)==365}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)==146}set write(e){e?this.mode|=146:this.mode&=-147}};function H(e,t={}){if(!e)throw new V(44);t.pb??=!0,e.charAt(0)===`/`||(e=`//`+e);var n=0;a:for(;40>n;n++){e=e.split(`/`).filter(e=>!!e);for(var r=Ae,i=`/`,a=0;a<e.length;a++){var o=a===e.length-1;if(o&&t.parent)break;if(e[a]!==`.`)if(e[a]===`..`)if(i=_e(i),r===r.parent){e=i+`/`+e.slice(a+1).join(`/`),n--;continue a}else r=r.parent;else{i=ge(i+`/`+e[a]);try{r=U(r,e[a])}catch(e){if(e?.Pa===44&&o&&t.Wb)return{path:i};throw e}if(!r.bb||o&&!t.pb||(r=r.bb.root),(r.mode&61440)==40960&&(!o||t.ab)){if(!r.La.readlink)throw new V(52);r=r.La.readlink(r),r.charAt(0)===`/`||(r=_e(i)+`/`+r),e=r+`/`+e.slice(a+1).join(`/`);continue a}}}return{path:i,node:r}}throw new V(32)}function Le(e){for(var t;;){if(e===e.parent)return e=e.Xa.Db,t?e[e.length-1]===`/`?e+t:`${e}/${t}`:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Re(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%B.length}function ze(e){var t=Re(e.parent.id,e.name);if(B[t]===e)B[t]=e.cb;else for(t=B[t];t;){if(t.cb===e){t.cb=e.cb;break}t=t.cb}}function U(e,t){var n=W(e.mode)?(n=Ve(e,`x`))?n:e.La.lookup?0:2:54;if(n)throw new V(n);for(n=B[Re(e.id,t)];n;n=n.cb){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.La.lookup(e,t)}function Be(e,t,n,r){return e=new Ie(e,t,n,r),t=Re(e.parent.id,e.name),e.cb=B[t],B[t]=e}function W(e){return(e&61440)==16384}function Ve(e,t){return Pe?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0}function He(e,t){if(!W(e.mode))return 54;try{return U(e,t),20}catch{}return Ve(e,`wx`)}function Ue(e,t,n){try{var r=U(e,t)}catch(e){return e.Pa}if(e=Ve(e,`wx`))return e;if(n){if(!W(r.mode))return 54;if(r===r.parent||Le(r)===`/`)return 10}else if(W(r.mode))return 31;return 0}function We(e){if(!e)throw new V(63);return e}function G(e){if(e=z[e],!e)throw new V(8);return e}function Ge(e,t=-1){if(e=Object.assign(new Fe,e),t==-1)a:{for(t=0;4096>=t;t++)if(!z[t])break a;throw new V(33)}return e.fd=t,z[t]=e}function Ke(e,t=-1){return e=Ge(e,t),e.Ma?.ec?.(e),e}function qe(e,t,n){var r=e?.Ma.Ua;e=r?e:t,r??=t.La.Ua,We(r),r(e,n)}var Je={open(e){e.Ma=je[e.node.rdev].Ma,e.Ma.open?.(e)},Va(){throw new V(70)}};function Ye(e,t){je[e]={Ma:t}}function Xe(e,t){var n=t===`/`;if(n&&Ae)throw new V(10);if(!n&&t){var r=H(t,{pb:!1});if(t=r.path,r=r.node,r.bb)throw new V(10);if(!W(r.mode))throw new V(54)}t={type:e,kc:{},Db:t,Vb:[]},e=e.Xa(t),e.Xa=t,t.root=e,n?Ae=e:r&&(r.bb=t,r.Xa&&r.Xa.Vb.push(t))}function Ze(e,t,n){var r=H(e,{parent:!0}).node;if(e=ve(e),!e)throw new V(28);if(e===`.`||e===`..`)throw new V(20);var i=He(r,e);if(i)throw new V(i);if(!r.La.ib)throw new V(63);return r.La.ib(r,e,t,n)}function Qe(e,t=438){return Ze(e,t&4095|32768,0)}function K(e,t=511){return Ze(e,t&1023|16384,0)}function $e(e,t,n){n===void 0&&(n=t,t=438),Ze(e,t|8192,n)}function et(e,t){if(!xe(e))throw new V(44);var n=H(t,{parent:!0}).node;if(!n)throw new V(44);t=ve(t);var r=He(n,t);if(r)throw new V(r);if(!n.La.symlink)throw new V(63);n.La.symlink(n,t,e)}function tt(e){var t=H(e,{parent:!0}).node;e=ve(e);var n=U(t,e),r=Ue(t,e,!0);if(r)throw new V(r);if(!t.La.rmdir)throw new V(63);if(n.bb)throw new V(10);t.La.rmdir(t,e),ze(n)}function nt(e){var t=H(e,{parent:!0}).node;if(!t)throw new V(44);e=ve(e);var n=U(t,e),r=Ue(t,e,!1);if(r)throw new V(r);if(!t.La.unlink)throw new V(63);if(n.bb)throw new V(10);t.La.unlink(t,e),ze(n)}function rt(e,t){return e=H(e,{ab:!t}).node,We(e.La.Ta)(e)}function it(e,t,n,r){qe(e,t,{mode:n&4095|t.mode&-4096,ctime:Date.now(),Lb:r})}function at(e,t){e=typeof e==`string`?H(e,{ab:!0}).node:e,it(null,e,t)}function ot(e,t,n){if(W(t.mode))throw new V(31);if((t.mode&61440)!=32768)throw new V(28);var r=Ve(t,`w`);if(r)throw new V(r);qe(e,t,{size:n,timestamp:Date.now()})}function st(e,t,n=438){if(e===``)throw new V(44);if(typeof t==`string`){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(r===void 0)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=t&64?n&4095|32768:0,typeof e==`object`)r=e;else{var i=e.endsWith(`/`),a=H(e,{ab:!(t&131072),Wb:!0});r=a.node,e=a.path}if(a=!1,t&64)if(r){if(t&128)throw new V(20)}else{if(i)throw new V(31);r=Ze(e,n|511,0),a=!0}if(!r)throw new V(44);if((r.mode&61440)==8192&&(t&=-513),t&65536&&!W(r.mode))throw new V(54);if(!a&&(r?(r.mode&61440)==40960?i=32:(i=[`r`,`w`,`rw`][t&3],t&512&&(i+=`w`),i=W(r.mode)&&(i!==`r`||t&576)?31:Ve(r,i)):i=44,i))throw new V(i);return t&512&&!a&&(i=r,i=typeof i==`string`?H(i,{ab:!0}).node:i,ot(null,i,0)),t=Ge({node:r,path:Le(r),flags:t&-131713,seekable:!0,position:0,Ma:r.Ma,Yb:[],error:!1}),t.Ma.open&&t.Ma.open(t),a&&at(r,n&511),t}function ct(e){if(e.fd===null)throw new V(8);e.rb&&=null;try{e.Ma.close&&e.Ma.close(e)}catch(e){throw e}finally{z[e.fd]=null}e.fd=null}function lt(e,t,n){if(e.fd===null)throw new V(8);if(!e.seekable||!e.Ma.Va)throw new V(70);if(n!=0&&n!=1&&n!=2)throw new V(28);e.position=e.Ma.Va(e,t,n),e.Yb=[]}function ut(e,t,n,r,i){if(0>r||0>i)throw new V(28);if(e.fd===null||(e.flags&2097155)==1)throw new V(8);if(W(e.node.mode))throw new V(31);if(!e.Ma.read)throw new V(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new V(70);return t=e.Ma.read(e,t,n,r,i),a||(e.position+=t),t}function dt(e,t,n,r,i){if(0>r||0>i)throw new V(28);if(e.fd===null||!(e.flags&2097155))throw new V(8);if(W(e.node.mode))throw new V(31);if(!e.Ma.write)throw new V(28);e.seekable&&e.flags&1024&<(e,0,2);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new V(70);return t=e.Ma.write(e,t,n,r,i,void 0),a||(e.position+=t),t}function ft(e){var t=t||0,n=`binary`;n!==`utf8`&&n!==`binary`&&k(`Invalid encoding type "${n}"`),t=st(e,t),e=rt(e).size;var r=new Uint8Array(e);return ut(t,r,0,e,0),n===`utf8`&&(r=Se(r)),ct(t),r}function q(e,t,n){e=ge(`/dev/`+e);var r=ke(!!t,!!n);q.Cb??=64;var i=q.Cb++<<8|0;Ye(i,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch{throw new V(29)}if(s===void 0&&a===0)throw new V(6);if(s==null)break;a++,n[r+o]=s}return a&&(e.node.atime=Date.now()),a},write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch{throw new V(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),a}}),$e(e,r,i)}var J={};function Y(e,t,n){if(t.charAt(0)===`/`)return t;if(e=e===-100?`/`:G(e).path,t.length==0){if(!n)throw new V(44);return e}return e+`/`+t}function pt(e,t){D[e>>2]=t.dev,D[e+4>>2]=t.mode,D[e+8>>2]=t.nlink,D[e+12>>2]=t.uid,D[e+16>>2]=t.gid,D[e+20>>2]=t.rdev,O[e+24>>3]=BigInt(t.size),E[e+32>>2]=4096,E[e+36>>2]=t.blocks;var n=t.atime.getTime(),r=t.mtime.getTime(),i=t.ctime.getTime();return O[e+40>>3]=BigInt(Math.floor(n/1e3)),D[e+48>>2]=n%1e3*1e6,O[e+56>>3]=BigInt(Math.floor(r/1e3)),D[e+64>>2]=r%1e3*1e6,O[e+72>>3]=BigInt(Math.floor(i/1e3)),D[e+80>>2]=i%1e3*1e6,O[e+88>>3]=BigInt(t.ino),0}var mt=void 0,ht=()=>{var e=E[mt>>2];return mt+=4,e},gt=0,_t=[0,31,60,91,121,152,182,213,244,274,305,335],vt=[0,31,59,90,120,151,181,212,243,273,304,334],yt={},bt=e=>{ee=e,pe||0<gt||(s.onExit?.(e),x=!0),f(e,new ce(e))},xt=e=>{if(!x)try{e()}catch(e){e instanceof ce||e==`unwind`||f(1,e)}finally{if(!(pe||0<gt))try{ee=e=ee,bt(e)}catch(e){e instanceof ce||e==`unwind`||f(1,e)}}},St={},Ct=()=>{if(!wt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:d||`./this.program`},t;for(t in St)St[t]===void 0?delete e[t]:e[t]=St[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);wt=n}return wt},wt,Tt=(e,t,n,r)=>{var i={string:e=>{var t=0;if(e!=null&&e!==0){t=I(e)+1;var n=Q(t);L(e,w,n,t),t=n}return t},array:e=>{var t=Q(e.length);return C.set(e,t),t}};e=s[`_`+e];var a=[],o=0;if(r)for(var c=0;c<r.length;c++){var l=i[n[c]];l?(o===0&&(o=Lt()),a[c]=l(r[c])):a[c]=r[c]}return n=e(...a),n=function(e){return o!==0&&It(o),t===`string`?F(e):t===`boolean`?!!e:e}(n)},Et=e=>{var t=I(e)+1,n=Mt(t);return n&&L(e,w,n,t),n},X,Dt=[],Z=e=>{X.delete($.get(e)),$.set(e,null),Dt.push(e)},Ot=e=>{let t=e.length;return[t%128|128,t>>7,...e]},kt={i:127,p:127,j:126,f:125,d:124,e:111},At=e=>Ot(Array.from(e,e=>kt[e])),jt=(e,t)=>{if(!X){X=new WeakMap;var n=$.length;if(X)for(var r=0;r<0+n;r++){var i=$.get(r);i&&X.set(i,r)}}if(n=X.get(e)||0)return n;n=Dt.length?Dt.pop():$.grow(1);try{$.set(n,e)}catch(r){if(!(r instanceof TypeError))throw r;t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Ot([1,96,...At(t.slice(1)),...At(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),t=new WebAssembly.Module(t),t=new WebAssembly.Instance(t,{e:{f:e}}).exports.f,$.set(n,t)}return X.set(e,n),n};if(B=Array(4096),Xe(R,`/`),K(`/tmp`),K(`/home`),K(`/home/web_user`),(function(){K(`/dev`),Ye(259,{read:()=>0,write:(e,t,n,r)=>r,Va:()=>0}),$e(`/dev/null`,259),Te(1280,De),Te(1536,Oe),$e(`/dev/tty`,1280),$e(`/dev/tty1`,1536);var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(be(e),t=e.byteLength),e[--t]);q(`random`,n),q(`urandom`,n),K(`/dev/shm`),K(`/dev/shm/tmp`)})(),(function(){K(`/proc`);var e=K(`/proc/self`);K(`/proc/self/fd`),Xe({Xa(){var t=Be(e,`fd`,16895,73);return t.Ma={Va:R.Ma.Va},t.La={lookup(e,t){e=+t;var n=G(e);return e={parent:null,Xa:{Db:`fake`},La:{readlink:()=>n.path},id:e+1},e.parent=e},readdir(){return Array.from(z.entries()).filter(([,e])=>e).map(([e])=>e.toString())}},t}},`/proc/self/fd`)})(),s.noExitRuntime&&(pe=s.noExitRuntime),s.print&&(v=s.print),s.printErr&&(y=s.printErr),s.wasmBinary&&(b=s.wasmBinary),s.thisProgram&&(d=s.thisProgram),s.preInit)for(typeof s.preInit==`function`&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.shift()();s.stackSave=()=>Lt(),s.stackRestore=e=>It(e),s.stackAlloc=e=>Q(e),s.cwrap=(e,t,n,r)=>{var i=!n||n.every(e=>e===`number`||e===`boolean`);return t!==`string`&&i&&!r?s[`_`+e]:(...r)=>Tt(e,t,n,r)},s.addFunction=jt,s.removeFunction=Z,s.UTF8ToString=F,s.stringToNewUTF8=Et,s.writeArrayToMemory=(e,t)=>{C.set(e,t)};var Mt,Nt,Pt,Ft,It,Q,Lt,Rt,$,zt={a:(e,t,n,r)=>k(`Assertion failed: ${F(e)}, at: `+[t?F(t):`unknown filename`,n,r?F(r):`unknown function`]),i:function(e,t){try{return e=F(e),at(e,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},L:function(e,t,n){try{if(t=F(t),t=Y(e,t),n&-8)return-28;var r=H(t,{ab:!0}).node;return r?(e=``,n&4&&(e+=`r`),n&2&&(e+=`w`),n&1&&(e+=`x`),e&&Ve(r,e)?-2:0):-44}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},j:function(e,t){try{var n=G(e);return it(n,n.node,t,!1),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},h:function(e){try{var t=G(e);return qe(t,t.node,{timestamp:Date.now(),Lb:!1}),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},b:function(e,t,n){mt=n;try{var r=G(e);switch(t){case 0:var i=ht();if(0>i)break;for(;z[i];)i++;return Ke(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=ht(),r.flags|=i,0;case 12:return i=ht(),T[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},g:function(e,t){try{var n=G(e),r=n.node,i=n.Ma.Ta;return e=i?n:r,i??=r.La.Ta,We(i),pt(t,i(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},H:function(e,t){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return-61;var n=G(e);if(0>t||!(n.flags&2097155))throw new V(28);return ot(n,n.node,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},G:function(e,t){try{if(t===0)return-28;var n=I(`/`)+1;return t<n?-68:(L(`/`,w,e,t),n)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},K:function(e,t){try{return e=F(e),pt(t,rt(e,!0))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},C:function(e,t,n){try{return t=F(t),t=Y(e,t),K(t,n),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},J:function(e,t,n,r){try{t=F(t);var i=r&256;return t=Y(e,t,r&4096),pt(n,i?rt(t,!0):rt(t))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},x:function(e,t,n,r){mt=r;try{t=F(t),t=Y(e,t);var i=r?ht():0;return st(t,n,i).fd}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},v:function(e,t,n,r){try{if(t=F(t),t=Y(e,t),0>=r)return-28;var i=H(t).node;if(!i)throw new V(44);if(!i.La.readlink)throw new V(28);var a=i.La.readlink(i),o=Math.min(r,I(a)),s=C[n+o];return L(a,w,n,r+1),C[n+o]=s,o}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},u:function(e){try{return e=F(e),tt(e),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},f:function(e,t){try{return e=F(e),pt(t,rt(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},r:function(e,t,n){try{if(t=F(t),t=Y(e,t),n)if(n===512)tt(t);else return-28;else nt(t);return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},q:function(e,t,n){try{t=F(t),t=Y(e,t,!0);var r=Date.now(),i,a;if(n){var o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2];i=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6,n+=16,o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2],a=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6}else a=i=r;if((a??i)!==null){e=i;var c=H(t,{ab:!0}).node;We(c.La.Ua)(c,{atime:e,mtime:a})}return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},m:()=>k(``),l:()=>{pe=!1,gt=0},A:function(e,t){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e),e=new Date(1e3*e),E[t>>2]=e.getSeconds(),E[t+4>>2]=e.getMinutes(),E[t+8>>2]=e.getHours(),E[t+12>>2]=e.getDate(),E[t+16>>2]=e.getMonth(),E[t+20>>2]=e.getFullYear()-1900,E[t+24>>2]=e.getDay();var n=e.getFullYear();E[t+28>>2]=(n%4!=0||n%100==0&&n%400!=0?vt:_t)[e.getMonth()]+e.getDate()-1|0,E[t+36>>2]=-(60*e.getTimezoneOffset()),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();E[t+32>>2]=(n!=r&&e.getTimezoneOffset()==Math.min(r,n))|0},y:function(e,t,n,r,i,a,o){i=-9007199254740992>i||9007199254740992<i?NaN:Number(i);try{var s=G(r);if(t&2&&!(n&2)&&(s.flags&2097155)!=2||(s.flags&2097155)==1)throw new V(2);if(!s.Ma.jb)throw new V(43);if(!e)throw new V(28);var c=s.Ma.jb(s,e,i,t,n),l=c.Xb;return E[a>>2]=c.Eb,D[o>>2]=l,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},z:function(e,t,n,r,i,a){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);try{var o=G(i);if(n&2){if(n=a,(o.node.mode&61440)!=32768)throw new V(43);if(!(r&2)){var s=w.slice(e,e+t);o.Ma.kb&&o.Ma.kb(o,s,n,t,r)}}}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},n:(e,t)=>(yt[e]&&(clearTimeout(yt[e].id),delete yt[e]),t&&(yt[e]={id:setTimeout(()=>{delete yt[e],xt(()=>Ft(e,performance.now()))},t),lc:t}),0),B:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),D[e>>2]=60*Math.max(a,i),E[t>>2]=Number(a!=i),t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`},e=t(a),t=t(i),i<a?(L(e,w,n,17),L(t,w,r,17)):(L(e,w,r,17),L(t,w,n,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:e=>{var t=w.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);a:{r=(Math.min(2147483648,65536*Math.ceil(Math.max(e,r)/65536))-Rt.buffer.byteLength+65535)/65536|0;try{Rt.grow(r),re();var i=1;break a}catch{}i=void 0}if(i)return!0}return!1},E:(e,t)=>{var n=0,r=0,i;for(i of Ct()){var a=t+n;D[e+r>>2]=a,n+=L(i,w,a,1/0)+1,r+=4}return 0},F:(e,t)=>{var n=Ct();D[e>>2]=n.length,e=0;for(var r of n)e+=I(r)+1;return D[t>>2]=e,0},e:function(e){try{return ct(G(e)),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},p:function(e,t){try{var n=G(e);return C[t]=n.tty?2:W(n.mode)?3:(n.mode&61440)==40960?7:4,T[t+2>>1]=0,O[t+8>>3]=BigInt(0),O[t+16>>3]=BigInt(0),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},w:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=ut(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},D:function(e,t,n,r){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return 61;var i=G(e);return lt(i,t,n),O[r>>3]=BigInt(i.position),i.rb&&t===0&&n===0&&(i.rb=null),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},I:function(e){try{var t=G(e);return t.Ma?.fsync?.(t)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},t:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=dt(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},k:bt};function Bt(){function e(){if(s.calledRun=!0,!x){if(!s.noFSInit&&!Ne){var e,t;Ne=!0,e??=s.stdin,t??=s.stdout,n??=s.stderr,e?q(`stdin`,e):et(`/dev/tty`,`/dev/stdin`),t?q(`stdout`,null,t):et(`/dev/tty`,`/dev/stdout`),n?q(`stderr`,null,n):et(`/dev/tty1`,`/dev/stderr`),st(`/dev/stdin`,0),st(`/dev/stdout`,1),st(`/dev/stderr`,1)}if(Vt.N(),Pe=!1,s.onRuntimeInitialized?.(),s.postRun)for(typeof s.postRun==`function`&&(s.postRun=[s.postRun]);s.postRun.length;){var n=s.postRun.shift();ue.push(n)}le(ue)}}if(0<A)j=Bt;else{if(s.preRun)for(typeof s.preRun==`function`&&(s.preRun=[s.preRun]);s.preRun.length;)fe();le(de),0<A?j=Bt:s.setStatus?(s.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>s.setStatus(``),1),e()},1)):e()}}var Vt;return(async function(){function e(e){return e=Vt=e.exports,s._sqlite3_free=e.P,s._sqlite3_value_text=e.Q,s._sqlite3_prepare_v2=e.R,s._sqlite3_step=e.S,s._sqlite3_reset=e.T,s._sqlite3_exec=e.U,s._sqlite3_finalize=e.V,s._sqlite3_column_name=e.W,s._sqlite3_column_text=e.X,s._sqlite3_column_type=e.Y,s._sqlite3_errmsg=e.Z,s._sqlite3_clear_bindings=e._,s._sqlite3_value_blob=e.$,s._sqlite3_value_bytes=e.aa,s._sqlite3_value_double=e.ba,s._sqlite3_value_int=e.ca,s._sqlite3_value_type=e.da,s._sqlite3_result_blob=e.ea,s._sqlite3_result_double=e.fa,s._sqlite3_result_error=e.ga,s._sqlite3_result_int=e.ha,s._sqlite3_result_int64=e.ia,s._sqlite3_result_null=e.ja,s._sqlite3_result_text=e.ka,s._sqlite3_aggregate_context=e.la,s._sqlite3_column_count=e.ma,s._sqlite3_data_count=e.na,s._sqlite3_column_blob=e.oa,s._sqlite3_column_bytes=e.pa,s._sqlite3_column_double=e.qa,s._sqlite3_bind_blob=e.ra,s._sqlite3_bind_double=e.sa,s._sqlite3_bind_int=e.ta,s._sqlite3_bind_text=e.ua,s._sqlite3_bind_parameter_index=e.va,s._sqlite3_sql=e.wa,s._sqlite3_normalized_sql=e.xa,s._sqlite3_changes=e.ya,s._sqlite3_close_v2=e.za,s._sqlite3_create_function_v2=e.Aa,s._sqlite3_update_hook=e.Ba,s._sqlite3_open=e.Ca,Mt=s._malloc=e.Da,Nt=s._free=e.Ea,s._RegisterExtensionFunctions=e.Fa,Pt=e.Ga,Ft=e.Ha,It=e.Ia,Q=e.Ja,Lt=e.Ka,Rt=e.M,$=e.O,re(),A--,s.monitorRunDependencies?.(A),A==0&&j&&(e=j,j=null,e()),Vt}A++,s.monitorRunDependencies?.(A);var t={a:zt};return s.instantiateWasm?new Promise(n=>{s.instantiateWasm(t,(t,r)=>{n(e(t,r))})}):(ie??=s.locateFile?s.locateFile(`sql-wasm.wasm`,m):m+`sql-wasm.wasm`,e((await se(t)).instance))})(),Bt(),a}),r)};typeof t==`object`&&typeof n==`object`?(n.exports=i,n.exports.default=i):typeof define==`function`&&define.amd?define([],function(){return i}):typeof t==`object`&&(t.Module=i)}))(),1);function y(e,t,n){switch(n.mode){case`list`:return x(e,t,n);case`csv`:return ee(e,t,n);case`json`:return T(e,t);case`line`:return E(e,t,n);case`column`:return D(e,t,n);case`table`:return te(e,t,n);case`markdown`:return ne(e,t,n);case`tabs`:return O(e,t,n);case`box`:return re(e,t,n);case`quote`:return k(e,t,n);case`html`:return ie(e,t,n);case`ascii`:return oe(e,t,n)}}function b(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString(`utf8`):typeof e==`number`&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,``):String(e)}function x(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.join(n.separator));for(let e of t)r.push(e.map(e=>b(e,n.nullValue)).join(n.separator));return r.length>0?`${r.join(n.newline)}${n.newline}`:``}function ee(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.map(S).join(`,`));for(let e of t)r.push(e.map(e=>S(b(e,n.nullValue))).join(`,`));return r.length>0?`${r.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`:``}function S(e){return e.includes(`,`)||e.includes(`"`)||e.includes(`'`)||e.includes(`
|
|
@@ -23,7 +23,7 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{t as r}from"./chun
|
|
|
23
23
|
`,exitCode:1};t.nullValue=e[++o]}else if(s===`-cmd`){if(o+1>=e.length)return{stdout:``,stderr:`sqlite3: Error: missing argument to -cmd
|
|
24
24
|
`,exitCode:1};t.cmd=e[++o]}else{if(s.startsWith(`-`))return{stdout:``,stderr:`sqlite3: Error: unknown option: ${s.startsWith(`--`)?s.slice(1):s}
|
|
25
25
|
Use -help for a list of options.
|
|
26
|
-
`,exitCode:1};n===null?n=s:r===null&&(r=s)}}return{options:t,database:n,sql:r,showVersion:i}}async function ue(){let e=new(await(r.runTrustedAsync(()=>(0,v.default)()))).Database;try{let t=e.exec(`SELECT sqlite_version()`);return t.length>0&&t[0].values.length>0?String(t[0].values[0][0]):`unknown`}finally{e.close()}}function de(e=d(
|
|
26
|
+
`,exitCode:1};n===null?n=s:r===null&&(r=s)}}return{options:t,database:n,sql:r,showVersion:i}}async function ue(){let e=new(await(r.runTrustedAsync(()=>(0,v.default)()))).Database;try{let t=e.exec(`SELECT sqlite_version()`);return t.length>0&&t[0].values.length>0?String(t[0].values[0][0]):`unknown`}finally{e.close()}}function de(e=d(m(import.meta.url))){let t=[f(e,`sqlite3-worker.js`),f(e,`../../commands/sqlite3/worker.js`)];(e.endsWith(`${p}commands${p}sqlite3`)||e.endsWith(`/commands/sqlite3`))&&t.push(f(e,`worker.js`)),t.push(f(e,`../../../dist/commands/sqlite3/worker.js`));for(let e of t)if(h(e))return e;throw Error(`sqlite3 worker not found. Run 'pnpm build' to compile the worker.`)}var fe={createWorker(e,t){return new _(e,{workerData:t})},findWorkerPath:de};function A(){return g(16).toString(`hex`)}function j(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?Array.isArray(n.results)?typeof n.hasModifications==`boolean`?n.dbBuffer!==null&&n.dbBuffer!==void 0&&!(n.dbBuffer instanceof Uint8Array)?{success:!1,error:`Malformed worker response: invalid dbBuffer`}:{success:!0,results:n.results,hasModifications:n.hasModifications,dbBuffer:n.dbBuffer===void 0?null:n.dbBuffer,defenseStats:n.defenseStats}:{success:!1,error:`Malformed worker response: missing hasModifications flag`}:{success:!1,error:`Malformed worker response: missing results array`}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}async function M(e,t,n){try{let s=de();return await new Promise((l,u)=>{let d=r.runTrusted(()=>fe.createWorker(s,e)),f=o(n,`sqlite3`,`worker timeout callback`,()=>{d.terminate(),l({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),p=a(()=>{try{f()}catch(e){l({success:!1,error:c(e instanceof Error?e.message:String(e))})}},t),m=o(n,`sqlite3`,`worker message callback`,t=>{i(p),l(j(t,e.protocolToken))}),h=o(n,`sqlite3`,`worker error callback`,e=>{i(p),u(e)}),g=o(n,`sqlite3`,`worker exit callback`,e=>{i(p),e!==0&&l({success:!1,error:`Worker exited with code ${e}`})});d.on(`message`,e=>{try{m(e)}catch(e){i(p),l({success:!1,error:c(e instanceof Error?e.message:String(e))})}}),d.on(`error`,e=>{try{h(e)}catch(e){i(p);let t=e instanceof Error?e.message:String(e);u(Error(c(t)))}}),d.on(`exit`,e=>{try{g(e)}catch(e){i(p),l({success:!1,error:c(e instanceof Error?e.message:String(e))})}})})}catch(e){let t=c(e.message);throw Error(`sqlite3 worker failed to load: ${t}`)}}var pe={name:`sqlite3`,async execute(e,t){if(u(e)||e.includes(`-help`))return l(ce);let n=le(e);if(`exitCode`in n)return n;let{options:r,database:i,sql:a,showVersion:o}=n;if(o)return{stdout:`${await ue()}
|
|
27
27
|
`,stderr:``,exitCode:0};if(!i)return{stdout:``,stderr:`sqlite3: missing database argument
|
|
28
28
|
`,exitCode:1};let d=a||t.stdin.trim();if(r.cmd&&(d=r.cmd+(d?`; ${d}`:``)),!d)return{stdout:``,stderr:`sqlite3: no SQL provided
|
|
29
29
|
`,exitCode:1};let f=i===`:memory:`,p=``,m=null;try{f||(p=t.fs.resolvePath(t.cwd,i),await t.fs.exists(p)&&(m=await t.fs.readFileBuffer(p)))}catch(e){return{stdout:``,stderr:`sqlite3: unable to open database "${i}": ${s(e.message)}
|
|
@@ -34,4 +34,4 @@ Use -help for a list of options.
|
|
|
34
34
|
`,exitCode:1};b+=`Error: ${e.error}
|
|
35
35
|
`,x=!0}else e.columns&&e.rows&&(e.rows.length>0||r.header)&&(b+=y(e.columns,e.rows,v));if(_.hasModifications&&!r.readonly&&!f&&p&&_.dbBuffer)try{await t.fs.writeFile(p,_.dbBuffer)}catch(e){let t=s(e.message);return{stdout:b,stderr:`sqlite3: failed to write database: ${t}
|
|
36
36
|
`,exitCode:1}}return{stdout:b,stderr:``,exitCode:x&&r.bail?1:0}}},N={name:`sqlite3`,flags:[],needsArgs:!0};export{fe as n,N as r,pe as t};
|
|
37
|
-
//# sourceMappingURL=chunk-XKWWSDBF-
|
|
37
|
+
//# sourceMappingURL=chunk-XKWWSDBF-BTq_A_8q.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import{m as n,p as r}from"./src-nvx4LAFk.mjs";import{A as i,B as a,M as o,T as s,b as c,g as l,x as u,z as d}from"./chunk-WYO6CB5R-Bu0g7bu2.mjs";import{a as f,r as p,u as m}from"./chunk-ICXQ74PX-BVMOo_rh.mjs";import{t as h}from"./chunk-HOUHSVGY-DEVfwHxJ.mjs";import{n as g}from"./chunk-Q4XR5HBZ-CQiRMQNx.mjs";import{n as _,t as v}from"./chunk-OGEWGWER-Diyk7J65.mjs";import{a as y,i as b,r as x,t as S}from"./chunk-C7G6YPKG-Bd7km2QU.mjs";import{t as C}from"./rough.cjs-s8-IvpYn.mjs";var w=e(C(),1),T=t(async(e,t,n)=>{let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=n||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,m(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,h=t.labelType===`markdown`,_=await g(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||u().flowchart?.wrappingWidth,classes:h?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:h},u()),y=_.getBBox(),b=(t?.padding??0)/2;if(a){let e=_.children[0],t=r(_);await v(e,c),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return a?s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):s.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:y,halfPadding:b,label:s}},`labelHelper`),E=t(async(e,t,n)=>{let i=n.useHtmlLabels??s(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await g(a,d(f(t),u()),{useHtmlLabels:i,width:n.width||u()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),c=o.getBBox(),l=n.padding/2;if(s(u())){let e=o.children[0],t=r(o);c=e.getBoundingClientRect(),t.attr(`width`,c.width),t.attr(`height`,c.height)}return i?a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`):a.attr(`transform`,`translate(0, `+-c.height/2+`)`),n.centerLabel&&a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:c,halfPadding:l,label:a}},`insertLabel`),D=t((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),O=t((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function k(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}t(k,`createPathFromPoints`);function A(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}t(A,`generateFullSineWavePoints`);function j(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}t(j,`generateCirclePoints`);function M(e){let n=Array.from(e.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=t((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}t(M,`mergePaths`);var N=t((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),P=t(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=u(),c=s(o);return await g(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),F=t((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),I=t(async(e,t)=>{let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,d=c,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:h}=b(t),_=e.insert(`g`).attr(`class`,`cluster swimlane `+(t.cssClasses||``)).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-et`,`cluster`).attr(`data-look`,t.look),v=l(i.flowchart.htmlLabels),x=t.direction===`LR`,S=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),C=await g(S,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}),T=C.getBBox();if(v){let e=C.children[0],t=r(C);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=t.padding??0,D=t.width<=T.width+E?T.width+E:t.width;t.width<=T.width+E?t.diff=(D-t.width)/2-E:t.diff=-E;let O=t.height,k=t.y-O/2,A=t.y+O/2,j=t.x-D/2,M=t.swimlaneContentTop===void 0?k+O/3:t.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),n=j+e,r=Math.max(0,D-e);if(t.look===`handDrawn`){let i=w.default.svg(_),a=y(t,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),c=y(t,{roughness:.7,fill:`none`,stroke:d,seed:o}),l=i.rectangle(j,k,e,O,a);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(n,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,j).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,n).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=j+e/2,a=t.y;S.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,M-k),n=Math.min(F,e),r=k+n,i=Math.max(0,A-r),a=t.x-D/2;if(t.look===`handDrawn`){let e=w.default.svg(_),c=y(t,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),l=y(t,{roughness:.7,fill:`none`,stroke:d,seed:o}),u=e.rectangle(a,k,D,n,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(a,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,a).attr(`y`,k).attr(`width`,D).attr(`height`,n).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,a).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=t.x-T.width/2,l=k+(n-T.height)/2;S.attr(`transform`,`translate(${c}, ${l})`)}if(n.trace(`Swimlane data `,t,JSON.stringify(t)),f){let e=S.select(`span`);e&&e.attr(`style`,f)}return t.offsetX=0,t.width=D,t.height=O,t.offsetY=T.height-E/2,t.intersect=function(e){return N(t,e)},{cluster:_,labelBBox:T}},`swimlane`),L=t(async(e,t)=>{n.info(`Creating subgraph rect for `,t.id,t);let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(t),h=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),v=s(i),x=h.insert(`g`).attr(`class`,`cluster-label `),S;S=t.labelType===`markdown`?await g(x,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}):await P(x,t.label,t.labelStyle||``,!1,!0);let C=S.getBBox();if(s(i)){let e=S.children[0],t=r(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;n.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=w.default.svg(h),r=y(t,{roughness:.7,fill:c,stroke:l,fillWeight:3,seed:o}),i=e.path(F(D,O,T,E,0),r);k=h.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=h.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return t.offsetX=0,t.width=j.width,t.height=j.height,t.offsetY=C.height-t.padding/2,t.intersect=function(e){return N(t,e)},{cluster:h,labelBBox:C}},`rect`),ee={rect:L,squareRect:L,roundedWithTitle:t(async(e,t)=>{let n=u(),{themeVariables:i,handDrawnSeed:a}=n,{altBackground:o,compositeBackground:c,compositeTitleBackground:l,nodeBorder:d}=i,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await P(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(s(n)){let e=g.children[0],t=r(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,S=t.height+v-_.height-6,C=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=w.default.svg(f),r=t.rx||t.ry?n.path(F(C,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:a}):n.rectangle(C,T,b,x,{seed:a});D=f.insert(()=>r,`:first-child`);let i=n.rectangle(C,E,b,S,{fill:e?o:c,fillStyle:e?`hachure`:`solid`,stroke:d,seed:a});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,C).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,C).attr(`y`,E).attr(`width`,b).attr(`height`,S);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(s(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return N(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:t((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return N(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:t((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=u(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,d=t.x-c/2,f=t.y-l/2;t.width=c;let p;if(t.look===`handDrawn`){let e=w.default.svg(a).rectangle(d,f,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return N(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:t(async(e,t)=>{n.info(`Creating subgraph rect for `,t.id,t);let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(t),h=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),v=s(i),x=h.insert(`g`).attr(`class`,`cluster-label `),S=await g(x,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}),C=S.getBBox();if(s(i)){let e=S.children[0],t=r(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;n.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=w.default.svg(h),r=y(t,{roughness:.7,fill:c,stroke:l,fillWeight:4,seed:o}),i=e.path(F(D,O,T,E,t.rx),r);k=h.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=h.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return t.offsetX=0,t.width=j.width,t.height=j.height,t.offsetY=C.height-t.padding/2,t.intersect=function(e){return N(t,e)},{cluster:h,labelBBox:C}},`kanbanSection`),swimlane:I},R=new Map,z=t(async(e,t)=>{let n=await ee[t.shape||`rect`](e,t);return R.set(t.id,n),n},`insertCluster`),te=t(()=>{R=new Map},`clear`);function B(e,t){return e.intersect(t)}t(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}t(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}t(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}t(U,`intersectLine`);function W(e,t){return e*t>0}t(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}t(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:N};function oe(e,t){let{labelStyles:r}=b(t);t.labelStyle=r;let i=O(t),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),{cssStyles:s}=t,c=w.default.svg(o),l=y(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,m(s)),D(t,d),t.intersect=function(e){return n.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},o}t(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}t(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}t(ce,`calculateArcSagitta`);async function le(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=t(e=>e+s,`calcTotalHeight`),l=t(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await T(e,n,O(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=w.default.svg(u),C=y(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=k(x),A=S.path(E,C),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),D(n,j),n.intersect=function(e){return K.polygon(n,x,e)},u}t(le,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}t(q,`insertPolygonShape`);var ue=12;async function de(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ue),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ue,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ue},{x:0+ue,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}t(de,`card`);function fe(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=w.default.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=k(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}t(fe,`choice`);async function pe(e,t,r){let{labelStyles:i,nodeStyles:a}=b(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await T(e,t,O(t)),l=r?.padding??c,u=t.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=w.default.svg(o),n=y(t,{}),r=e.circle(0,0,u*2,n);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,m(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return D(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return n.info(`Circle intersect`,t,u,e),K.circle(t,u,e)},o}t(pe,`circle`);function me(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import{m as n,p as r}from"./src-nvx4LAFk.mjs";import{A as i,B as a,M as o,T as s,b as c,g as l,x as u,z as d}from"./chunk-WYO6CB5R-CkxB2qiV.mjs";import{a as f,r as p,u as m}from"./chunk-ICXQ74PX-a_OoZV-J.mjs";import{t as h}from"./chunk-HOUHSVGY-CM96kWHC.mjs";import{n as g}from"./chunk-Q4XR5HBZ-Dj_gUljr.mjs";import{n as _,t as v}from"./chunk-OGEWGWER-BE748IwJ.mjs";import{a as y,i as b,r as x,t as S}from"./chunk-C7G6YPKG-6PzAyV0E.mjs";import{t as C}from"./rough.cjs-s8-IvpYn.mjs";var w=e(C(),1),T=t(async(e,t,n)=>{let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=n||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,m(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,h=t.labelType===`markdown`,_=await g(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||u().flowchart?.wrappingWidth,classes:h?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:h},u()),y=_.getBBox(),b=(t?.padding??0)/2;if(a){let e=_.children[0],t=r(_);await v(e,c),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return a?s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):s.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:y,halfPadding:b,label:s}},`labelHelper`),E=t(async(e,t,n)=>{let i=n.useHtmlLabels??s(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await g(a,d(f(t),u()),{useHtmlLabels:i,width:n.width||u()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),c=o.getBBox(),l=n.padding/2;if(s(u())){let e=o.children[0],t=r(o);c=e.getBoundingClientRect(),t.attr(`width`,c.width),t.attr(`height`,c.height)}return i?a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`):a.attr(`transform`,`translate(0, `+-c.height/2+`)`),n.centerLabel&&a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:c,halfPadding:l,label:a}},`insertLabel`),D=t((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),O=t((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function k(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}t(k,`createPathFromPoints`);function A(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}t(A,`generateFullSineWavePoints`);function j(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}t(j,`generateCirclePoints`);function M(e){let n=Array.from(e.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=t((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}t(M,`mergePaths`);var N=t((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),P=t(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=u(),c=s(o);return await g(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),F=t((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),I=t(async(e,t)=>{let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,d=c,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:h}=b(t),_=e.insert(`g`).attr(`class`,`cluster swimlane `+(t.cssClasses||``)).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-et`,`cluster`).attr(`data-look`,t.look),v=l(i.flowchart.htmlLabels),x=t.direction===`LR`,S=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),C=await g(S,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}),T=C.getBBox();if(v){let e=C.children[0],t=r(C);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=t.padding??0,D=t.width<=T.width+E?T.width+E:t.width;t.width<=T.width+E?t.diff=(D-t.width)/2-E:t.diff=-E;let O=t.height,k=t.y-O/2,A=t.y+O/2,j=t.x-D/2,M=t.swimlaneContentTop===void 0?k+O/3:t.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),n=j+e,r=Math.max(0,D-e);if(t.look===`handDrawn`){let i=w.default.svg(_),a=y(t,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),c=y(t,{roughness:.7,fill:`none`,stroke:d,seed:o}),l=i.rectangle(j,k,e,O,a);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(n,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,j).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,n).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=j+e/2,a=t.y;S.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,M-k),n=Math.min(F,e),r=k+n,i=Math.max(0,A-r),a=t.x-D/2;if(t.look===`handDrawn`){let e=w.default.svg(_),c=y(t,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),l=y(t,{roughness:.7,fill:`none`,stroke:d,seed:o}),u=e.rectangle(a,k,D,n,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(a,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,a).attr(`y`,k).attr(`width`,D).attr(`height`,n).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,a).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=t.x-T.width/2,l=k+(n-T.height)/2;S.attr(`transform`,`translate(${c}, ${l})`)}if(n.trace(`Swimlane data `,t,JSON.stringify(t)),f){let e=S.select(`span`);e&&e.attr(`style`,f)}return t.offsetX=0,t.width=D,t.height=O,t.offsetY=T.height-E/2,t.intersect=function(e){return N(t,e)},{cluster:_,labelBBox:T}},`swimlane`),L=t(async(e,t)=>{n.info(`Creating subgraph rect for `,t.id,t);let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(t),h=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),v=s(i),x=h.insert(`g`).attr(`class`,`cluster-label `),S;S=t.labelType===`markdown`?await g(x,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}):await P(x,t.label,t.labelStyle||``,!1,!0);let C=S.getBBox();if(s(i)){let e=S.children[0],t=r(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;n.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=w.default.svg(h),r=y(t,{roughness:.7,fill:c,stroke:l,fillWeight:3,seed:o}),i=e.path(F(D,O,T,E,0),r);k=h.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=h.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return t.offsetX=0,t.width=j.width,t.height=j.height,t.offsetY=C.height-t.padding/2,t.intersect=function(e){return N(t,e)},{cluster:h,labelBBox:C}},`rect`),ee={rect:L,squareRect:L,roundedWithTitle:t(async(e,t)=>{let n=u(),{themeVariables:i,handDrawnSeed:a}=n,{altBackground:o,compositeBackground:c,compositeTitleBackground:l,nodeBorder:d}=i,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await P(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(s(n)){let e=g.children[0],t=r(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,S=t.height+v-_.height-6,C=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=w.default.svg(f),r=t.rx||t.ry?n.path(F(C,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:a}):n.rectangle(C,T,b,x,{seed:a});D=f.insert(()=>r,`:first-child`);let i=n.rectangle(C,E,b,S,{fill:e?o:c,fillStyle:e?`hachure`:`solid`,stroke:d,seed:a});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,C).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,C).attr(`y`,E).attr(`width`,b).attr(`height`,S);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(s(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return N(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:t((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return N(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:t((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=u(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,d=t.x-c/2,f=t.y-l/2;t.width=c;let p;if(t.look===`handDrawn`){let e=w.default.svg(a).rectangle(d,f,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return N(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:t(async(e,t)=>{n.info(`Creating subgraph rect for `,t.id,t);let i=u(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(t),h=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),v=s(i),x=h.insert(`g`).attr(`class`,`cluster-label `),S=await g(x,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}),C=S.getBBox();if(s(i)){let e=S.children[0],t=r(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;n.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=w.default.svg(h),r=y(t,{roughness:.7,fill:c,stroke:l,fillWeight:4,seed:o}),i=e.path(F(D,O,T,E,t.rx),r);k=h.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=h.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return t.offsetX=0,t.width=j.width,t.height=j.height,t.offsetY=C.height-t.padding/2,t.intersect=function(e){return N(t,e)},{cluster:h,labelBBox:C}},`kanbanSection`),swimlane:I},R=new Map,z=t(async(e,t)=>{let n=await ee[t.shape||`rect`](e,t);return R.set(t.id,n),n},`insertCluster`),te=t(()=>{R=new Map},`clear`);function B(e,t){return e.intersect(t)}t(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}t(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}t(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}t(U,`intersectLine`);function W(e,t){return e*t>0}t(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}t(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:N};function oe(e,t){let{labelStyles:r}=b(t);t.labelStyle=r;let i=O(t),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),{cssStyles:s}=t,c=w.default.svg(o),l=y(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,m(s)),D(t,d),t.intersect=function(e){return n.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},o}t(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}t(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}t(ce,`calculateArcSagitta`);async function le(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=t(e=>e+s,`calcTotalHeight`),l=t(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await T(e,n,O(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=w.default.svg(u),C=y(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=k(x),A=S.path(E,C),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),D(n,j),n.intersect=function(e){return K.polygon(n,x,e)},u}t(le,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}t(q,`insertPolygonShape`);var ue=12;async function de(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ue),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ue,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ue},{x:0+ue,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}t(de,`card`);function fe(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=w.default.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=k(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}t(fe,`choice`);async function pe(e,t,r){let{labelStyles:i,nodeStyles:a}=b(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await T(e,t,O(t)),l=r?.padding??c,u=t.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=w.default.svg(o),n=y(t,{}),r=e.circle(0,0,u*2,n);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,m(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return D(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return n.info(`Circle intersect`,t,u,e),K.circle(t,u,e)},o}t(pe,`circle`);function me(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
2
2
|
M ${i.x},${i.y} L ${o.x},${o.y}`}t(me,`createLine`);function he(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.label=``;let a=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=w.default.svg(a),l=y(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=me(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),D(t,p),t.intersect=function(e){return n.info(`crossedCircle intersect`,t,{radius:o,point:e}),K.circle(t,o,e)},a}t(he,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}t(J,`generateCirclePoints`);async function ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=w.default.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p).replace(`Z`,``),v=h.path(_,g),x=k(m),S=h.path(x,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}t(ge,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}t(Y,`generateCirclePoints`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=w.default.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p).replace(`Z`,``),v=h.path(_,g),x=k(m),S=h.path(x,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}t(_e,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}t(X,`generateCirclePoints`);async function ve(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],g=w.default.svg(i),_=y(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=k(p).replace(`Z`,``),x=g.path(v,_),S=k(m).replace(`Z`,``),C=g.path(S,_),E=k(h),A=g.path(E,{..._}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>x,`:first-child`),j.insert(()=>C,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,j),t.intersect=function(e){return K.polygon(t,h,e)},i}t(ve,`curlyBraces`);async function ye(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=w.default.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,x=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...j(-_,-g/2,d,50,270,90)],S=k(x),C=p.path(S,m),E=s.insert(()=>C,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,r),E.attr(`transform`,`translate(${-l/2}, ${-u/2})`),D(t,E),t.intersect=function(e){return K.polygon(t,x,e)},s}t(ye,`curvedTrapezoid`);var be=t((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),xe=t((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Se=t((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Ce=8,we=8;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<we&&(t.width=we);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<Ce&&(t.height=Ce)}let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),p=(t.height?t.height:c.height)+a+f,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=xe(0,0,u,p,d,f),r=Se(0,f,u,p,d,f),i=y(t,{}),a=e.path(n,i),o=e.path(r,y(t,{fill:`none`}));h=s.insert(()=>o,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=be(0,0,u,p,d,f);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,m(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),D(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}t(Te,`cylinder`);async function Ee(e,t,n){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await T(e,t,O(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=w.default.svg(a),n=y(t,{}),r=f||p?e.path(F(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,m(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,m(f)).attr(`ry`,m(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return D(t,d),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}t(Ee,`drawRect`);async function De(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ee(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=w.default.svg(c),n=y(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}t(De,`datastore`);async function Oe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await T(e,t,O(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=w.default.svg(o),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),D(t,x),t.intersect=function(e){return K.rect(t,e)},o}t(Oe,`dividedRectangle`);async function ke(e,t){let{labelStyles:r,nodeStyles:i}=b(t),a=t.look===`neo`?12:5;t.labelStyle=r;let o=t.padding??0,s=t.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await T(e,t,O(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(c),n=y(t,{roughness:.2,strokeWidth:2.5}),r=y(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,m(t.cssClasses)).attr(`style`,m(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return D(t,f),t.intersect=function(e){return n.info(`DoubleCircle intersect`,t,u,e),K.circle(t,u,e)},c}t(ke,`doublecircle`);function Ae(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(t);t.label=``,t.labelStyle=i;let o=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=w.default.svg(o),{nodeBorder:l}=r,u=y(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),D(t,f),t.intersect=function(e){return n.info(`filledCircle intersect`,t,{radius:7,point:e}),K.circle(t,7,e)},o}t(Ae,`filledCircle`);var je=10,Me=10;async function Ne(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.height<je&&(t.height=je),t.width=(t?.width??0)-o-o/2,t.width<Me&&(t.width=Me));let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+(o??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=w.default.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p),v=h.path(_,g),x=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),t.width=u,t.height=d,D(t,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return n.info(`Triangle intersect`,t,p,e),K.polygon(t,p,e)},s}t(Ne,`flippedTriangle`);function Pe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=w.default.svg(o),p=y(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),D(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}t(Pe,`forkJoin`);async function Fe(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width?t?.width:Math.max(15,c.width))+a*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=t,p=w.default.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...j(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=k(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,i),D(t,v),t.intersect=function(e){return n.info(`Pill intersect`,t,{radius:d,point:e}),K.polygon(t,h,e)},s}t(Fe,`halfRoundedRectangle`);var Ie=t((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Le(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await T(e,t,O(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(c),n=y(t,{}),r=Ie(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}t(Le,`hexagon`);async function Re(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.label=``,t.labelStyle=r;let{shapeSvg:a}=await T(e,t,O(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=w.default.svg(a),u=y(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=k(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),D(t,m),t.intersect=function(e){return n.info(`Pill intersect`,t,{points:d}),K.polygon(t,d,e)},a}t(Re,`hourglass`);async function ze(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await T(e,t,`icon-shape default`),p=t.pos===`t`,m=c,g=c,{nodeBorder:_}=r,{stylesMap:v}=S(t),x=-g/2,C=-m/2,E=t.label?8:0,O=w.default.svg(u),k=y(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(x,C,g,m,k),j=Math.max(g,d.width),M=m+d.height+E,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+E/2-i/2-o:-d.height/2-E/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+E/2:-d.height/2-E/2})`),D(t,F),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+E},{x:r+g/2,y:i-a/2+d.height+E},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+E},{x:r-d.width/2,y:i-a/2+d.height+E}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-g/2,y:i-a/2+m}],K.polygon(t,o,e)},u}t(ze,`icon`);async function Be(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await T(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:v}=S(t),x=w.default.svg(u),C=y(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`),C.stroke=v.get(`fill`)??_;let E=u.append(`g`);t.icon&&E.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=E.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=x.circle(0,0,N,C),F=Math.max(N,d.width),I=N+d.height+p,L=x.rectangle(-F/2,-I/2,F,I,{...C,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return E.attr(`transform`,`translate(${-k/2-j},${m?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),E.attr(`style`,`color: ${v.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),D(t,R),t.intersect=function(e){return n.info(`iconSquare intersect`,t,e),K.rect(t,e)},u}t(Be,`iconCircle`);async function Ve(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await T(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:C}=S(t),E=-_/2,O=-g/2,k=t.label?8:0,A=w.default.svg(u),j=y(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=C.get(`fill`)??x;let M=A.path(F(E,O,_,g,5),j),N=Math.max(_,d.width),P=g+d.height+k,I=A.rectangle(-N/2,-P/2,N,P,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),ee=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),L.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),D(t,ee),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],K.polygon(t,o,e)},u}t(Ve,`iconRounded`);async function He(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await T(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:C}=S(t),E=-_/2,O=-g/2,k=t.label?8:0,A=w.default.svg(u),j=y(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=C.get(`fill`)??x;let M=A.path(F(E,O,_,g,.1),j),N=Math.max(_,d.width),P=g+d.height+k,I=A.rectangle(-N/2,-P/2,N,P,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`),ee=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),L.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),D(t,ee),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],K.polygon(t,o,e)},u}t(He,`iconSquare`);async function Ue(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=b(t);t.labelStyle=s;let c=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await T(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,x=w.default.svg(f),S=y(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(g,_,u,d,S),E=Math.max(u,p.width),O=d+p.height+v,k=x.rectangle(-E/2,-O/2,E,O,{...S,fill:`none`,stroke:`none`}),A=f.insert(()=>C,`:first-child`),j=f.insert(()=>k);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),D(t,j),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(t,o,e)},f}t(Ue,`imageSquare`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=q(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}t(We,`inv_trapezoid`);async function Ge(e,t){let{shapeSvg:n,bbox:r,label:i}=await T(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),D(t,a),t.intersect=function(e){return K.rect(t,e)},n}t(Ge,`labelRect`);async function Ke(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}t(Ke,`lean_left`);async function qe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}t(qe,`lean_right`);function Je(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=w.default.svg(a),d=y(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=k(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),D(t,m),t.intersect=function(e){return n.info(`lightningBolt intersect`,t,e),K.polygon(t,l,e)},a}t(Je,`lightningBolt`);var Ye=t((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Xe=t((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ze=t((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Qe=10,$e=10;async function et(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<$e&&(t.width=$e);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Qe&&(t.height=Qe)}let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,h=p*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=Xe(0,0,u,p,d,f,h),r=Ze(0,f,u,p,d,f),i=y(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Ye(0,0,u,p,d,f,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,m(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),D(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}t(et,`linedCylinder`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=w.default.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...A(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),D(t,x),t.intersect=function(e){return K.polygon(t,_,e)},s}t(tt,`linedWaveEdgedRect`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await T(e,t,O(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=w.default.svg(c),x=y(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],C=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let E=k(S),A=v.path(E,x),j=k(C),N=v.path(j,x);t.look!==`handDrawn`&&(A=M(A),N=M(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>A),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),D(t,P),t.intersect=function(e){return K.polygon(t,S,e)},c}t(nt,`multiRect`);async function rt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=A(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],C=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],E=w.default.svg(i),j=y(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=k(S),N=E.path(M,j),P=k(C),F=E.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),D(t,I),t.intersect=function(e){return K.polygon(t,S,e)},i}t(rt,`multiWaveEdgedRectangle`);async function it(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.useHtmlLabels||s(c())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:l}=await T(e,t,O(t)),u=Math.max(o.width+(t.padding??0)*2,t?.width??0),d=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=w.default.svg(a),g=y(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),D(t,v),t.intersect=function(e){return K.rect(t,e)},a}t(it,`note`);var at=t((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function ot(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await T(e,t,O(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=w.default.svg(i),n=y(t,{}),r=at(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),D(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}t(ot,`question`);async function st(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=k(h),S=_.path(x,v),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,h,e)},s}t(st,`rect_left_inv_arrow`);async function ct(e,t){let{labelStyles:i,nodeStyles:a}=b(t);t.labelStyle=i;let o;o=t.cssClasses?`node `+t.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=t.description,p=t.label,m=await P(d,p,t.labelStyle,!0,!0),h={width:0,height:0};if(s(u())){let e=m.children[0],t=r(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}n.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await P(d,Array.isArray(g)?g.join(`<br/>`):g,t.labelStyle,!0,!0),x=v.children[0],S=r(v);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let C=(t.padding||0)/2;r(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+C+5)+`)`),r(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-C+3)+`)`);let T=h.width+(t.padding||0),E=h.height+(t.padding||0),O=-h.width/2-C,k=-h.height/2-C,A,j;if(t.look===`handDrawn`){let e=w.default.svg(c),r=y(t,{}),i=e.path(F(O,k,T,E,t.rx||0),r),a=e.line(-h.width/2-C,-h.height/2-C+_.height+C,h.width/2+C,-h.height/2-C+_.height+C,r);j=c.insert(()=>(n.debug(`Rough node insert CXC`,i),a),`:first-child`),A=c.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=l.insert(`rect`,`:first-child`),j=l.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-C).attr(`y`,-h.height/2-C).attr(`width`,h.width+(t.padding||0)).attr(`height`,h.height+(t.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-C).attr(`x2`,h.width/2+C).attr(`y1`,-h.height/2-C+_.height+C).attr(`y2`,-h.height/2-C+_.height+C);return D(t,A),t.intersect=function(e){return K.rect(t,e)},c}t(ct,`rectWithTitle`);async function lt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ee(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}t(lt,`roundedRect`);var Z=8;async function ut(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await T(e,t,O(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,p=Z-l/2,h=-u/2,{cssStyles:g}=t,_=w.default.svg(o),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:p,y:h},{x:p+d,y:h},{x:p+d,y:h+f},{x:p-Z,y:h+f},{x:p-Z,y:h},{x:p,y:h},{x:p,y:h+f}],S=_.polygon(x.map(e=>[e.x,e.y]),v),C=o.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`).attr(`style`,m(g)),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),D(t,C),t.intersect=function(e){return K.rect(t,e)},o}t(ut,`shadedProcess`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=k(x),C=_.path(S,v),E=s.insert(()=>C,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,r),E.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),D(t,E),t.intersect=function(e){return K.polygon(t,x,e)},s}t(dt,`slopedRect`);async function ft(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ee(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}t(ft,`squareRect`);async function pt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=w.default.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...j(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...j(u/2-d,0,d,50,270,450)],g=k(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),D(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}t(pt,`stadium`);async function mt(e,t){return Ee(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}t(mt,`state`);function ht(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=w.default.svg(u),f=y(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return D(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}t(ht,`stateEnd`);function gt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=w.default.svg(a).circle(0,0,t.width,x(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return D(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}t(gt,`stateStart`);var _t=8;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+2*_t+a,u=(t?.height??c.height)+o,d=l-2*_t,f=u,p=-l/2,h=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=e.rectangle(p,h,d+16,f,n),i=e.line(p+_t,h,p+_t,h+f,n),a=e.line(p+_t+d,h,p+_t+d,h+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,m(c)),D(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),D(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}t(vt,`subroutine`);var yt=.2;async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-yt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height?t?.height:c.height)+o*2,u=yt*l,d=yt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let C=k(x),E=_.path(C,v),A=k(S),j=_.path(A,{...v,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>E,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),D(t,M),t.intersect=function(e){return K.polygon(t,x,e)},s}t(bt,`taggedRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=w.default.svg(i),h=y(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...A(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,x=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...A(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=k(g),C=m.path(S,h),E=k(x),j=m.path(E,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>C,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),D(t,M),t.intersect=function(e){return K.polygon(t,g,e)},i}t(xt,`taggedWaveEdgedRectangle`);async function St(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await T(e,t,O(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),D(t,u),t.intersect=function(e){return K.rect(t,e)},i}t(St,`text`);var Ct=t((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
3
|
a${i},${a} 0,0,1 0,${-r}
|
|
4
4
|
l${n},0
|
|
@@ -60,4 +60,4 @@ import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-D-A
|
|
|
60
60
|
q-5,0 -5,-5
|
|
61
61
|
Z
|
|
62
62
|
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),D(t,d),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},i}t(Xt,`defaultMindmapNode`);async function Zt(e,t){return pe(e,t,{padding:t.padding??0})}t(Zt,`mindmapCircle`);var Qt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ft},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:lt},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:pt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:vt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Te},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:De},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:pe},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Jt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Yt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:ot},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Le},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:qe},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Ke},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:kt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:We},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:ke},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:St},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:de},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ut},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:gt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:ht},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Pe},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Re},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:ge},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:_e},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:ve},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Je},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Pt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Fe},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Ot},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:et},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:ye},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Oe},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:Nt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:It},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Ae},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:At},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Ne},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:dt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:rt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:nt},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:le},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:he},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:xt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:bt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Ft},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:st},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:tt}],$t=t(()=>{let e=[...Object.entries({state:mt,choice:fe,note:it,rectWithTitle:ct,labelRect:Ge,iconSquare:He,iconCircle:Be,icon:ze,iconRounded:Ve,imageSquare:Ue,anchor:oe,kanbanItem:qt,mindmapCircle:Zt,defaultMindmapNode:Xt,classBox:Wt,erBox:zt,requirementBox:Gt}),...Qt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function en(e){return e in $t}t(en,`isValidShape`);var tn=new Map;async function nn(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?$t[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,m(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),tn.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}t(nn,`insertNode`);var rn=t((e,t)=>{tn.set(t.id,e)},`setNodeElem`),an=t(()=>{tn.clear()},`clear`),on=t(e=>{let t=tn.get(e.id);n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{nn as a,on as c,z as i,rn as l,an as n,en as o,P as r,T as s,te as t,D as u};
|
|
63
|
-
//# sourceMappingURL=chunk-ZGVPDNZ5-
|
|
63
|
+
//# sourceMappingURL=chunk-ZGVPDNZ5-DExn7OfJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import"./src-nvx4LAFk.mjs";import"./chunk-WYO6CB5R-CkxB2qiV.mjs";import"./chunk-ICXQ74PX-a_OoZV-J.mjs";import"./chunk-HOUHSVGY-CM96kWHC.mjs";import"./chunk-Q4XR5HBZ-Dj_gUljr.mjs";import"./chunk-7BUUIJ7U-CKtuqKC6.mjs";import"./chunk-OGEWGWER-BE748IwJ.mjs";import"./chunk-32BRIVSS-Bsc-9o_O.mjs";import"./chunk-XXDRQBXY-ClPfCVft.mjs";import"./chunk-VR4S4FIN-DFCLUzSW.mjs";import"./chunk-C7G6YPKG-6PzAyV0E.mjs";import"./chunk-ZGVPDNZ5-DExn7OfJ.mjs";import"./chunk-52WLFC77-D0ICJuoG.mjs";import"./chunk-FWX5IMBZ-BKxaTzwN.mjs";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Ca3kqXAx.mjs";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
+
//# sourceMappingURL=classDiagram-OUVF2IWQ-c5qgwZAE.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import"./src-nvx4LAFk.mjs";import"./chunk-WYO6CB5R-CkxB2qiV.mjs";import"./chunk-ICXQ74PX-a_OoZV-J.mjs";import"./chunk-HOUHSVGY-CM96kWHC.mjs";import"./chunk-Q4XR5HBZ-Dj_gUljr.mjs";import"./chunk-7BUUIJ7U-CKtuqKC6.mjs";import"./chunk-OGEWGWER-BE748IwJ.mjs";import"./chunk-32BRIVSS-Bsc-9o_O.mjs";import"./chunk-XXDRQBXY-ClPfCVft.mjs";import"./chunk-VR4S4FIN-DFCLUzSW.mjs";import"./chunk-C7G6YPKG-6PzAyV0E.mjs";import"./chunk-ZGVPDNZ5-DExn7OfJ.mjs";import"./chunk-52WLFC77-D0ICJuoG.mjs";import"./chunk-FWX5IMBZ-BKxaTzwN.mjs";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Ca3kqXAx.mjs";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
+
//# sourceMappingURL=classDiagram-v2-EOCWNBFH-D9ilZPqi.mjs.map
|