@kern0x1b/penstock-cli 26.11.0 → 26.11.2
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/THIRD-PARTY-NOTICES.md +16 -16
- package/dist/chunk-account-BaYNvO18.js +1 -0
- package/dist/{chunk-agentLaunch-D21uPuMr.js → chunk-agentLaunch-BnrpVME4.js} +1 -1
- package/dist/chunk-agentServe-BeOh1rjE.js +10 -0
- package/dist/chunk-agents-CZJoU2u2.js +1 -0
- package/dist/chunk-agentsMigrate-DnrqoXNz.js +2 -0
- package/dist/{chunk-analyze-BG-rlggA.js → chunk-analyze-ClE2LBCj.js} +1 -1
- package/dist/chunk-analyze-DgQqzEgb.js +1 -0
- package/dist/{chunk-analyzeFlow-2cYPgjh-.js → chunk-analyzeFlow-F2ZFmJhv.js} +1 -1
- package/dist/chunk-apiTemplates-Cl_z63FA.js +1 -0
- package/dist/{chunk-bot-DlhStBoG.js → chunk-bot-C2k8yaXA.js} +5 -5
- package/dist/chunk-cmmnFindings-DKpYqUZN.js +1 -0
- package/dist/{chunk-codeFactSet-LxSnQy8K.js → chunk-codeFactSet-DiAYqvbb.js} +1 -1
- package/dist/{chunk-codeIndex-N1gnP_sW.js → chunk-codeIndex-vStNh6Bm.js} +1 -1
- package/dist/chunk-codeLinks-BVpn4_Sr.js +1 -0
- package/dist/chunk-codeLinks-BrGduhsm.js +1 -0
- package/dist/chunk-command-8s6m3ZUw.js +5 -0
- package/dist/chunk-command-aMxPQdiV.js +1 -0
- package/dist/chunk-command-vH1_y5F0.js +1 -0
- package/dist/chunk-commands-B8YVT41b.js +5 -0
- package/dist/{chunk-commands-DcjlDt7B.js → chunk-commands-CJCSznbv.js} +1 -1
- package/dist/chunk-compose-BUJTvoFX.js +4 -0
- package/dist/chunk-connections-Drr67X9U.js +1 -0
- package/dist/chunk-connectors-DcMqy0u8.js +1 -0
- package/dist/chunk-convert-Ce1MZmsE.js +3 -0
- package/dist/chunk-convert-FkMnlxyi.js +1 -0
- package/dist/chunk-deploy-BHg8pB9x.js +1 -0
- package/dist/chunk-deploy-DZgCTgaY.js +6 -0
- package/dist/{chunk-diagrams-BukAOL0g.js → chunk-diagrams-CtGMGTa8.js} +1 -1
- package/dist/chunk-diff-9hjavV6V.js +1 -0
- package/dist/chunk-diff-Dp3fUALc.js +1 -0
- package/dist/chunk-dispatch-o-eqJb9Y.js +7 -0
- package/dist/chunk-dmnTests-BOxutoRs.js +1 -0
- package/dist/{chunk-dmnTests-ChwX1YVo.js → chunk-dmnTests-BzNA-u2k.js} +1 -1
- package/dist/{chunk-docs-D7yEDpa4.js → chunk-docs-B3C3pZpY.js} +17 -17
- package/dist/chunk-doctor-CRxbsAm7.js +1 -0
- package/dist/{chunk-editPreview-CC2vwhIW.js → chunk-editPreview-DCUnMkTU.js} +1 -1
- package/dist/chunk-evidence-ny_2ltVe.js +23 -0
- package/dist/{chunk-examples-0HkF-frb.js → chunk-examples-BG0lGXcZ.js} +9 -9
- package/dist/chunk-export-Blwjf23H.js +1 -0
- package/dist/chunk-export-kt3sBTZu.js +20 -0
- package/dist/{chunk-facts-DSVaURw5.js → chunk-facts-Dl5lLriU.js} +1 -1
- package/dist/chunk-failure-BRyRvObj.js +1 -0
- package/dist/{chunk-file-BswMa3FN.js → chunk-file-1YhfNmPn.js} +1 -1
- package/dist/chunk-import-Dh3az4BC.js +6 -0
- package/dist/chunk-importCommand-Dhikkmo0.js +1 -0
- package/dist/chunk-incident-LJe2-ohi.js +1 -0
- package/dist/chunk-init-D34Q4YA8.js +227 -0
- package/dist/chunk-lint-CnEhoYRB.js +1 -0
- package/dist/{chunk-lsp-7vA_mIt1.js → chunk-lsp-BzeJkpmf.js} +1 -1
- package/dist/chunk-main-BZF-ErAx.js +1 -0
- package/dist/chunk-mcp-B_B9bet5.js +95 -0
- package/dist/{chunk-mcpLaunch-LyfmIF_Z.js → chunk-mcpLaunch-BS709697.js} +1 -1
- package/dist/chunk-migrate-DVfXC-iJ.js +1 -0
- package/dist/chunk-migrate-DwWg0k5_.js +16 -0
- package/dist/{chunk-migrateApply-CzOkgKhB.js → chunk-migrateApply-e8O9oZXP.js} +3 -3
- package/dist/chunk-migrateVerify-oIBf-PM3.js +1 -0
- package/dist/{chunk-model-f8AzYUK7.js → chunk-model-BulEKnY1.js} +2 -2
- package/dist/{chunk-parse-B-uKGDy-.js → chunk-parse-DiOcpdOU.js} +1 -1
- package/dist/{chunk-penstockCli-CKMvaZ0O.js → chunk-penstockCli-C41P_G7i.js} +1 -1
- package/dist/chunk-policy-BVb7c7G_.js +1 -0
- package/dist/chunk-policyGate-BOgKsqLq.js +2 -0
- package/dist/chunk-pr-1jKcTNnP.js +1 -0
- package/dist/{chunk-project-DBYOlYRi.js → chunk-project-COaBZhMt.js} +1 -1
- package/dist/chunk-project-lO_6DX8G.js +1 -0
- package/dist/chunk-promotion-CTMPjXjZ.js +2 -0
- package/dist/chunk-promotion-DDLrgBqZ.js +1 -0
- package/dist/{chunk-promotion-DchO6xoC.js → chunk-promotion-NeRj4uTP.js} +1 -1
- package/dist/chunk-receipt-C4NqnSkH.js +1 -0
- package/dist/chunk-receiptDeps-B7MehyHT.js +1 -0
- package/dist/chunk-receiptGate-BZCKCMTV.js +1 -0
- package/dist/chunk-receiptGate-DRcw327y.js +1 -0
- package/dist/{chunk-receiptSnapshot-B6ruXw8z.js → chunk-receiptSnapshot-CHSk3_4N.js} +1 -1
- package/dist/{chunk-receiptStore-Cy-L0H1u.js → chunk-receiptStore-DhROtI2h.js} +1 -1
- package/dist/chunk-refactor-CO3qyIEv.js +17 -0
- package/dist/chunk-refactor-CWeCOl7w.js +1 -0
- package/dist/{chunk-render-Ci5d6mg4.js → chunk-render-DZd5hScS.js} +1 -1
- package/dist/chunk-report-w7YZwhyg.js +1 -0
- package/dist/chunk-review-DYMgFDSy.js +1 -0
- package/dist/chunk-say-CP1IyOSv.js +1 -0
- package/dist/{chunk-security-VgKwtohm.js → chunk-security-pgip-kdY.js} +2 -2
- package/dist/chunk-serve-CKt2rO05.js +10 -0
- package/dist/{chunk-share-CBV2FuKq.js → chunk-share-rsL0itIM.js} +18 -18
- package/dist/chunk-stages-B2sBBxUc.js +3 -0
- package/dist/chunk-systemError-O3vQ8hLb.js +1 -0
- package/dist/chunk-systemError-n2E6isvg.js +1 -0
- package/dist/chunk-taskTest-DWoME1mY.js +2 -0
- package/dist/chunk-taskTest-JErgWO6t.js +1 -0
- package/dist/{chunk-templateDiagnostics-BwH7RNkz.js → chunk-templateDiagnostics-6txfKwas.js} +2 -2
- package/dist/chunk-templates-Y3xfCO_3.js +1 -0
- package/dist/chunk-testCases-BwimUfDC.js +4 -0
- package/dist/chunk-testCases-DO2Rkyvd.js +1 -0
- package/dist/chunk-tests-Cy325OGw.js +1 -0
- package/dist/chunk-tests-DNkORsqB.js +23 -0
- package/dist/{chunk-trust-DXcsUJaK.js → chunk-trust-DSX-k3by.js} +1 -1
- package/dist/{chunk-trust-DubjEjlN.js → chunk-trust-Di4EYPah.js} +1 -1
- package/dist/{chunk-variableChecks-KnECGMR3.js → chunk-variableChecks-CBDpmI4d.js} +1 -1
- package/dist/{chunk-workerVariables-CajAcbwl.js → chunk-workerVariables-CNnCRijJ.js} +1 -1
- package/dist/{chunk-workerVariables-DIDoUpHF.js → chunk-workerVariables-CulLc3YH.js} +1 -1
- package/dist/chunk-wrapper-CGYED7G2.js +1 -0
- package/dist/chunk-wrapper-CK7Xtes6.js +3 -0
- package/dist/grammars/web-tree-sitter.wasm +0 -0
- package/dist/penstock.js +1 -1
- package/dist/web/assets/{AgentSettings-Cn5Vcph3.js → AgentSettings-D24jOuht.js} +1 -1
- package/dist/web/assets/{AgentsDialog-C6WqzlxZ.js → AgentsDialog-BMWv3Gyk.js} +1 -1
- package/dist/web/assets/{AgentsDialog-dpbwVSxk.js → AgentsDialog-DbY2O6O5.js} +1 -1
- package/dist/web/assets/{AgentsTab-C34OhVkw.js → AgentsTab-D6LbK6sG.js} +2 -2
- package/dist/web/assets/{BpmnCanvas-yur9daZa.js → BpmnCanvas-BcQRQ2Br.js} +27 -27
- package/dist/web/assets/BpmnDocument-Ce5F4K1e.js +27 -0
- package/dist/web/assets/CmmnDocument-C_UlPowC.js +17 -0
- package/dist/web/assets/{ConflictDialog-Bb5kduaR.js → ConflictDialog-DfFp8F7n.js} +1 -1
- package/dist/web/assets/{ConnectionsDialog-qtF7yDFw.js → ConnectionsDialog-BaYtHD5h.js} +1 -1
- package/dist/web/assets/{DiffDocument-LHOif5Ac.js → DiffDocument-BOPdBEN3.js} +1 -1
- package/dist/web/assets/{DmnDocument-0f5uS67x.css → DmnDocument-DZ9u2uk2.css} +1 -1
- package/dist/web/assets/DmnDocument-vtnARy7Q.js +41 -0
- package/dist/web/assets/{DriftDialog-Chl6BX6k.js → DriftDialog-dIbCbSK2.js} +1 -1
- package/dist/web/assets/FormDocument-B0q8DF9v.css +1 -0
- package/dist/web/assets/FormDocument-DHBUBUzO.js +32 -0
- package/dist/web/assets/FormStepView-CbHb32_8.js +1 -0
- package/dist/web/assets/{GraphAwareLayoutService-wsos3yPD.js → GraphAwareLayoutService-C5N8K9dm.js} +1 -1
- package/dist/web/assets/{MigrationDialog-CBJU7Oe3.js → MigrationDialog-DA3Vrzgw.js} +1 -1
- package/dist/web/assets/{NewFileDialog-B7075LWG.js → NewFileDialog-Dev41oA1.js} +1 -1
- package/dist/web/assets/PolicyDialog-qR19Csji.js +1 -0
- package/dist/web/assets/{QuickOpen-DJQrI7Od.js → QuickOpen-ps-rMjiS.js} +1 -1
- package/dist/web/assets/ScriptPane-BQLMNYzc.js +2 -0
- package/dist/web/assets/{ScriptRunDialog-BwE4cXnp.js → ScriptRunDialog-YivjHB6j.js} +1 -1
- package/dist/web/assets/{SettingsDialog-c307wPsg.js → SettingsDialog-DI0vZ6Ay.js} +1 -1
- package/dist/web/assets/ShortcutsDialog-DLXnv4Vm.js +1 -0
- package/dist/web/assets/SourceDocument-Cj8cGsoS.js +1 -0
- package/dist/web/assets/TemplateDocument-BRyFsofH.js +7 -0
- package/dist/web/assets/TextDocument-DB2hEuMA.js +1 -0
- package/dist/web/assets/{UnreadableFileLayer-CUP_30X8.js → UnreadableFileLayer-CRW3MM7w.js} +1 -1
- package/dist/web/assets/{UploadDialog-CaVBOxUL.js → UploadDialog-D-X6GG98.js} +1 -1
- package/dist/web/assets/Viewer-BcpDlvg_.js +4 -0
- package/dist/web/assets/apply-Nsj6ek02.js +1 -0
- package/dist/web/assets/{bpmnTheme-CZ7xp4R5.js → bpmnTheme-pKgl9Mrn.js} +2 -2
- package/dist/web/assets/{data-ZauKnQ2Z.js → data-CdiToGOq.js} +2 -2
- package/dist/web/assets/{data-Da5Nxzev.js → data-wU6sw6RY.js} +1 -1
- package/dist/web/assets/{dialog-DSLu1Bbo.js → dialog-BDJ5dDiU.js} +1 -1
- package/dist/web/assets/{diff-C4hitkRR.js → diff-BhYqTg4l.js} +1 -1
- package/dist/web/assets/dist-27z6Phtg.js +23 -0
- package/dist/web/assets/{dist-CofBTWz1.js → dist-B7TL-7R3.js} +4 -4
- package/dist/web/assets/dist-BEpeEbIu.js +1 -0
- package/dist/web/assets/{dist-CYCbBoYQ.js → dist-BTf7NfeQ.js} +1 -1
- package/dist/web/assets/{dist-CJKVV2_S.js → dist-BqGv7f4M.js} +10 -10
- package/dist/web/assets/dist-C-q1IWjr.js +6 -0
- package/dist/web/assets/{dist-Blylfrak.js → dist-CJx_2eBF.js} +2 -2
- package/dist/web/assets/dist-COUY_jv5.js +1 -0
- package/dist/web/assets/{dist-DpDu6Wz_.js → dist-CWjAtsKe.js} +1 -1
- package/dist/web/assets/{dist-gb3IfUZi.js → dist-Cv8_A_95.js} +2 -2
- package/dist/web/assets/dist-DDE6BjgI.js +5 -0
- package/dist/web/assets/{dist-7VC_hKpw.js → dist-DDNYYQtV.js} +1 -1
- package/dist/web/assets/dist-DW-S9iZN.js +1 -0
- package/dist/web/assets/dist-OnU5n5o1.js +1 -0
- package/dist/web/assets/dmn-Cgoh6wXm.js +3 -0
- package/dist/web/assets/{documentBridge-1Eg7H9yI.js → documentBridge-CHw4XsZH.js} +3 -3
- package/dist/web/assets/{documents-LG-7CTrn.js → documents-CEtohzAC.js} +1 -1
- package/dist/web/assets/duplicate-D_ic-m62.js +342 -0
- package/dist/web/assets/{engines-DhO6OW1S.js → engines-lyEvb0pH.js} +1 -1
- package/dist/web/assets/{executable-BTarDLry.js → executable--4381_Lf.js} +1 -1
- package/dist/web/assets/{file-CIeVSOHy.js → file-BbVBUuIH.js} +1 -1
- package/dist/web/assets/formChecks-CSClH9sH.js +1 -0
- package/dist/web/assets/frontend-uXAWaalt.js +1 -0
- package/dist/web/assets/{httpHost-DBSjdVth.js → httpHost-C973OTRe.js} +1 -1
- package/dist/web/assets/{index.es-pigASDxC.js → index.es-CMvq8Bhe.js} +3 -3
- package/dist/web/assets/index.es-GbdJvMnO.js +78 -0
- package/dist/web/assets/{index.esm-CTLpq4ik.js → index.esm-Ba6q0zSu.js} +1 -1
- package/dist/web/assets/{intelligence-_1C71hkQ.js → intelligence-DNqJNmdB.js} +3 -3
- package/dist/web/assets/{jspdf.es.min-PgZzOmkT.js → jspdf.es.min-C0L4zezU.js} +6 -6
- package/dist/web/assets/{kind-X3_nabTt.js → kind-DDHnk6dW.js} +1 -1
- package/dist/web/assets/{lib-BmLAen_d.js → lib-DrkEMJ65.js} +1 -1
- package/dist/web/assets/{list-DovB9lWV.js → list-TmXvCwja.js} +1 -1
- package/dist/web/assets/{migrationHost-BcguK4K5.js → migrationHost-DCWBb3L6.js} +1 -1
- package/dist/web/assets/moddle-f0Q4Guwd.js +1 -0
- package/dist/web/assets/{model--Bj28IOj.js → model-afHgSxJs.js} +1 -1
- package/dist/web/assets/{nudges-UF9_cBuO.js → nudges-DPG3WpyV.js} +1 -1
- package/dist/web/assets/{open-C9Kt9JLw.js → open-Vkx72dYx.js} +1 -1
- package/dist/web/assets/platform-G53Cenyw.js +2 -0
- package/dist/web/assets/{preload-helper-VRuDKI9K.js → preload-helper-DExCAR_V.js} +1 -1
- package/dist/web/assets/{run-BZgz1U9U.js → run-BMfRBe5O.js} +1 -1
- package/dist/web/assets/samples-BL3jA_Vd.js +1 -0
- package/dist/web/assets/{say-WvEHqIbO.js → say-BkdZMivA.js} +1 -1
- package/dist/web/assets/{say-ChFGKK2E.js → say-C7KqKcFr.js} +1 -1
- package/dist/web/assets/{sections-N6WYk7b8.js → sections-LJKSRDTS.js} +1 -1
- package/dist/web/assets/sharedReader-BsXfiBT8.js +1 -0
- package/dist/web/assets/{source-frame-DcptKpVq.js → source-frame-DC4W0A5-.js} +2 -2
- package/dist/web/assets/{syntax-DW10Wzg4.js → syntax-00Hk6Xv7.js} +4 -4
- package/dist/web/assets/{template-CMl68jPp.js → template-BQP7ZXdK.js} +1 -1
- package/dist/web/assets/testCaseRuns-liAhWMg7.js +1 -0
- package/dist/web/assets/{trace-DLziNpe2.js → trace-DXQU2N_l.js} +1 -1
- package/dist/web/assets/{translator-DLDFsUlE.js → translator-BLCeE6UY.js} +1 -1
- package/dist/web/assets/ui-BLtm3Y1J.js +1 -0
- package/dist/web/assets/{useTrace-UYBskc2k.js → useTrace-dZdQ805W.js} +1 -1
- package/dist/web/assets/web-C4k0NLZ9.js +982 -0
- package/dist/web/assets/web-CnDpD6qy.css +1 -0
- package/dist/web/assets/{workerVariables-DURgyUbG.js → workerVariables-O6VqwDzr.js} +1 -1
- package/dist/web/assets/xml-DIWt4von.js +1 -0
- package/dist/web/index.html +39 -40
- package/package.json +5 -5
- package/dist/chunk-account-CpZu-RTg.js +0 -1
- package/dist/chunk-agentServe-BYRtgGGD.js +0 -10
- package/dist/chunk-agents-B9oxdPTA.js +0 -1
- package/dist/chunk-agentsMigrate-BV8TeRXq.js +0 -2
- package/dist/chunk-analyze-pgzR-Cx-.js +0 -1
- package/dist/chunk-apiTemplates-cU7C8vap.js +0 -1
- package/dist/chunk-cmmnFindings-S2TGSnEp.js +0 -1
- package/dist/chunk-codeLinks-C8N6e8k3.js +0 -1
- package/dist/chunk-codeLinks-o0a8tBGk.js +0 -1
- package/dist/chunk-command-Bqlbgo-2.js +0 -1
- package/dist/chunk-command-DT84ioJb.js +0 -5
- package/dist/chunk-command-DrGP2kg8.js +0 -1
- package/dist/chunk-commands-B4PoZbpX.js +0 -5
- package/dist/chunk-compose-CWKKVtN5.js +0 -4
- package/dist/chunk-connections-DQpKbIGD.js +0 -1
- package/dist/chunk-connectors-PtAvE91B.js +0 -1
- package/dist/chunk-convert-CpgtOlZk.js +0 -1
- package/dist/chunk-convert-HbFpg8ab.js +0 -3
- package/dist/chunk-deploy-l4MdFfn8.js +0 -6
- package/dist/chunk-deploy-qRaaKGZb.js +0 -1
- package/dist/chunk-diff-BhTFlCE3.js +0 -1
- package/dist/chunk-diff-kBF83vzM.js +0 -1
- package/dist/chunk-dispatch-BnO-QhMh.js +0 -7
- package/dist/chunk-dmnTests-0x_yUH6S.js +0 -1
- package/dist/chunk-doctor-BuHK1dTm.js +0 -1
- package/dist/chunk-evidence-oLw_C6j8.js +0 -23
- package/dist/chunk-export-cIFHDXug.js +0 -1
- package/dist/chunk-export-jBVxtmCH.js +0 -20
- package/dist/chunk-failure-D5brrYW2.js +0 -1
- package/dist/chunk-import-BBOe-5RZ.js +0 -6
- package/dist/chunk-importCommand-DRjYoljA.js +0 -1
- package/dist/chunk-incident-BK1h37CD.js +0 -1
- package/dist/chunk-init-_OALJuKm.js +0 -227
- package/dist/chunk-lint-7KJFxyCN.js +0 -1
- package/dist/chunk-main-Cw2JXCil.js +0 -1
- package/dist/chunk-mcp-K63bhqnF.js +0 -95
- package/dist/chunk-migrate-BMwBV5sc.js +0 -16
- package/dist/chunk-migrate-CxfVmKt0.js +0 -1
- package/dist/chunk-migrateVerify-DSEXSpfR.js +0 -1
- package/dist/chunk-policy-BX0Ftdws.js +0 -1
- package/dist/chunk-policyGate-dmcufnwB.js +0 -2
- package/dist/chunk-pr-ByrGcfam.js +0 -1
- package/dist/chunk-project-DA3KnAZH.js +0 -1
- package/dist/chunk-promotion-Boedyq43.js +0 -1
- package/dist/chunk-promotion-D8Ti-vxp.js +0 -2
- package/dist/chunk-receipt-CusJaqNn.js +0 -1
- package/dist/chunk-receiptDeps-oVbX156d.js +0 -1
- package/dist/chunk-receiptGate-DrGChj7i.js +0 -1
- package/dist/chunk-receiptGate-xldHKMyJ.js +0 -1
- package/dist/chunk-refactor-B1W_MGTp.js +0 -1
- package/dist/chunk-refactor-BJXxEtVs.js +0 -17
- package/dist/chunk-report-D9pM09Nu.js +0 -1
- package/dist/chunk-review-UcqS5AAi.js +0 -1
- package/dist/chunk-say-CYb4HeJD.js +0 -1
- package/dist/chunk-serve-Dmqen1yd.js +0 -10
- package/dist/chunk-stages-BTQJrAMF.js +0 -3
- package/dist/chunk-systemError-BYrMzp2o.js +0 -1
- package/dist/chunk-systemError-CXvnhNPK.js +0 -1
- package/dist/chunk-taskTest-9gMsx0zu.js +0 -2
- package/dist/chunk-taskTest-BjXYpG5p.js +0 -1
- package/dist/chunk-templates-D3ouIwHD.js +0 -1
- package/dist/chunk-testCases-9jwT_Y7z.js +0 -4
- package/dist/chunk-testCases-BcpBPg9L.js +0 -1
- package/dist/chunk-tests-CEEXnWOp.js +0 -23
- package/dist/chunk-tests-CRVosdWp.js +0 -1
- package/dist/chunk-wrapper-B2WnOIoB.js +0 -3
- package/dist/chunk-wrapper-DiKCKZti.js +0 -1
- package/dist/web/assets/BpmnDocument-C247Rqim.js +0 -27
- package/dist/web/assets/CmmnDocument-Dj48bsUd.js +0 -17
- package/dist/web/assets/DmnDocument-Cb9Zi9fS.js +0 -41
- package/dist/web/assets/FormDocument-DoZaxWd-.js +0 -32
- package/dist/web/assets/FormDocument-URLcKn84.css +0 -1
- package/dist/web/assets/FormStepView-D8MFcpeI.js +0 -1
- package/dist/web/assets/PolicyDialog-CGdglmDn.js +0 -1
- package/dist/web/assets/ScriptPane-T6M5f6fc.js +0 -2
- package/dist/web/assets/ShortcutsDialog-BAoL9EHu.js +0 -1
- package/dist/web/assets/SourceDocument-C9KIzBA5.js +0 -1
- package/dist/web/assets/TemplateDocument-CNt2turg.js +0 -7
- package/dist/web/assets/TextDocument-CtkHoEqN.js +0 -1
- package/dist/web/assets/Viewer-DZske1C5.js +0 -4
- package/dist/web/assets/apply-nnKP9HIM.js +0 -1
- package/dist/web/assets/dist--PmHUHDp.js +0 -1
- package/dist/web/assets/dist-BoPrKCf2.js +0 -5
- package/dist/web/assets/dist-C1m02xAO.js +0 -1
- package/dist/web/assets/dist-CLqJMzT-.js +0 -1
- package/dist/web/assets/dist-D3jqq0XS.js +0 -1
- package/dist/web/assets/dist-DA-9F0U9.js +0 -1
- package/dist/web/assets/dist-DojzF5q2.js +0 -6
- package/dist/web/assets/dist-yvjzrXXf.js +0 -23
- package/dist/web/assets/dmn-DwdcYXGr.js +0 -3
- package/dist/web/assets/duplicate-D-ilQqKz.js +0 -342
- package/dist/web/assets/formChecks-CGox1z7R.js +0 -1
- package/dist/web/assets/frontend-Qq5hBH0U.js +0 -1
- package/dist/web/assets/index.es-CcNNw3VB.js +0 -78
- package/dist/web/assets/moddle-DJxj0oEU.js +0 -1
- package/dist/web/assets/platform-BLPhsye9.js +0 -2
- package/dist/web/assets/samples-oeXBsJ9Y.js +0 -1
- package/dist/web/assets/sharedReader-Bopy7Uk9.js +0 -1
- package/dist/web/assets/testCaseRuns-B_XdqGFh.js +0 -1
- package/dist/web/assets/ui-BTKMbWYG.js +0 -1
- package/dist/web/assets/web-FzNBw1kZ.css +0 -1
- package/dist/web/assets/web-jPMZVwbQ.js +0 -982
- package/dist/web/assets/xml-DTgZ-B-l.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-B8BYMn-z.js";import{m as e,t,x as n}from"./dist-CRJyslwo.js";import{a as r,i,r as a,t as o}from"./dist-CofBTWz1.js";import{n as s}from"./descriptors-B5VIyY5g.js";e();var c=`camunda:`,l=`operaton:`;function operatonName(e){return typeof e==`string`&&e.startsWith(c)?`${l}${e.slice(8)}`:null}function OperatonCompat(e){if(e.__operatonCompat)return;e.__operatonCompat=!0;let t=e.properties,n=t.get,r=t.set,known=(e,t)=>t!==null&&!!e?.$descriptor?.propertiesByName?.[t];t.get=(e,r)=>{let i=operatonName(r);return known(e,i)?n.call(t,e,i)??n.call(t,e,r):n.call(t,e,r)},t.set=(e,n,i)=>{let a=operatonName(n);return known(e,a)?(r.call(t,e,n,void 0),r.call(t,e,a,i)):r.call(t,e,n,i)};let typeOf=t=>{let n=operatonName(t);return n!==null&&n in e.registry.typeMap?n:t},i=e.getType,a=e.getTypeDescriptor,o=e.hasType;e.getType=t=>i.call(e,typeOf(t)),e.getTypeDescriptor=t=>a.call(e,typeOf(t)),e.hasType=function(e,t){return t===void 0?o.call(this,typeOf(e)):o.call(this,e,typeOf(t))}}OperatonCompat.$inject=[`moddle`];var u={name:`Operaton`,uri:`http://operaton.org/schema/1.0/bpmn`,prefix:`operaton`,xml:{tagAlias:`lowerCase`},associations:[],types:[{name:`Definitions`,isAbstract:!0,extends:[`bpmn:Definitions`],properties:[{name:`diagramRelationId`,isAttr:!0,type:`String`}]},{name:`InOutBinding`,superClass:[`Element`],isAbstract:!0,properties:[{name:`source`,isAttr:!0,type:`String`},{name:`sourceExpression`,isAttr:!0,type:`String`},{name:`target`,isAttr:!0,type:`String`},{name:`businessKey`,isAttr:!0,type:`String`},{name:`local`,isAttr:!0,type:`Boolean`,default:!1},{name:`variables`,isAttr:!0,type:`String`}]},{name:`In`,superClass:[`InOutBinding`],meta:{allowedIn:[`bpmn:CallActivity`,`bpmn:SignalEventDefinition`]}},{name:`Out`,superClass:[`InOutBinding`],meta:{allowedIn:[`bpmn:CallActivity`]}},{name:`AsyncCapable`,isAbstract:!0,extends:[`bpmn:Activity`,`bpmn:Gateway`,`bpmn:Event`],properties:[{name:`async`,isAttr:!0,type:`Boolean`,default:!1},{name:`asyncBefore`,isAttr:!0,type:`Boolean`,default:!1},{name:`asyncAfter`,isAttr:!0,type:`Boolean`,default:!1},{name:`exclusive`,isAttr:!0,type:`Boolean`,default:!0}]},{name:`JobPriorized`,isAbstract:!0,extends:[`bpmn:Process`,`operaton:AsyncCapable`],properties:[{name:`jobPriority`,isAttr:!0,type:`String`}]},{name:`SignalEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:SignalEventDefinition`],properties:[{name:`async`,isAttr:!0,type:`Boolean`,default:!1}]},{name:`ErrorEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:ErrorEventDefinition`],properties:[{name:`errorCodeVariable`,isAttr:!0,type:`String`},{name:`errorMessageVariable`,isAttr:!0,type:`String`}]},{name:`ErrorEventDefinition`,superClass:[`bpmn:ErrorEventDefinition`,`Element`],properties:[{name:`expression`,isAttr:!0,type:`String`}],meta:{allowedIn:[`bpmn:ServiceTask`]}},{name:`Error`,isAbstract:!0,extends:[`bpmn:Error`],properties:[{name:`operaton:errorMessage`,isAttr:!0,type:`String`}]},{name:`PotentialStarter`,superClass:[`Element`],properties:[{name:`resourceAssignmentExpression`,type:`bpmn:ResourceAssignmentExpression`}]},{name:`FormSupported`,isAbstract:!0,extends:[`bpmn:StartEvent`,`bpmn:UserTask`],properties:[{name:`formHandlerClass`,isAttr:!0,type:`String`},{name:`formKey`,isAttr:!0,type:`String`},{name:`formRef`,isAttr:!0,type:`String`},{name:`formRefBinding`,isAttr:!0,type:`String`},{name:`formRefVersion`,isAttr:!0,type:`String`}]},{name:`TemplateSupported`,isAbstract:!0,extends:[`bpmn:Collaboration`,`bpmn:Process`,`bpmn:FlowElement`],properties:[{name:`modelerTemplate`,isAttr:!0,type:`String`},{name:`modelerTemplateVersion`,isAttr:!0,type:`Integer`}]},{name:`Initiator`,isAbstract:!0,extends:[`bpmn:StartEvent`],properties:[{name:`initiator`,isAttr:!0,type:`String`}]},{name:`ScriptTask`,isAbstract:!0,extends:[`bpmn:ScriptTask`],properties:[{name:`resultVariable`,isAttr:!0,type:`String`},{name:`resource`,isAttr:!0,type:`String`}]},{name:`Process`,isAbstract:!0,extends:[`bpmn:Process`],properties:[{name:`candidateStarterGroups`,isAttr:!0,type:`String`},{name:`candidateStarterUsers`,isAttr:!0,type:`String`},{name:`versionTag`,isAttr:!0,type:`String`},{name:`historyTimeToLive`,isAttr:!0,type:`String`},{name:`isStartableInTasklist`,isAttr:!0,type:`Boolean`,default:!0}]},{name:`EscalationEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:EscalationEventDefinition`],properties:[{name:`escalationCodeVariable`,isAttr:!0,type:`String`}]},{name:`FormalExpression`,isAbstract:!0,extends:[`bpmn:FormalExpression`],properties:[{name:`resource`,isAttr:!0,type:`String`}]},{name:`Assignable`,extends:[`bpmn:UserTask`],properties:[{name:`assignee`,isAttr:!0,type:`String`},{name:`candidateUsers`,isAttr:!0,type:`String`},{name:`candidateGroups`,isAttr:!0,type:`String`},{name:`dueDate`,isAttr:!0,type:`String`},{name:`followUpDate`,isAttr:!0,type:`String`},{name:`priority`,isAttr:!0,type:`String`}]},{name:`CallActivity`,extends:[`bpmn:CallActivity`],properties:[{name:`calledElementBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`calledElementVersion`,isAttr:!0,type:`String`},{name:`calledElementVersionTag`,isAttr:!0,type:`String`},{name:`calledElementTenantId`,isAttr:!0,type:`String`},{name:`caseRef`,isAttr:!0,type:`String`},{name:`caseBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`caseVersion`,isAttr:!0,type:`String`},{name:`caseTenantId`,isAttr:!0,type:`String`},{name:`variableMappingClass`,isAttr:!0,type:`String`},{name:`variableMappingDelegateExpression`,isAttr:!0,type:`String`}]},{name:`ServiceTaskLike`,extends:[`bpmn:ServiceTask`,`bpmn:BusinessRuleTask`,`bpmn:SendTask`,`bpmn:MessageEventDefinition`],properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`resultVariable`,isAttr:!0,type:`String`}]},{name:`DmnCapable`,extends:[`bpmn:BusinessRuleTask`],properties:[{name:`decisionRef`,isAttr:!0,type:`String`},{name:`decisionRefBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`decisionRefVersion`,isAttr:!0,type:`String`},{name:`mapDecisionResult`,isAttr:!0,type:`String`,default:`resultList`},{name:`decisionRefTenantId`,isAttr:!0,type:`String`}]},{name:`ExternalCapable`,extends:[`operaton:ServiceTaskLike`],properties:[{name:`type`,isAttr:!0,type:`String`},{name:`topic`,isAttr:!0,type:`String`}]},{name:`TaskPriorized`,extends:[`bpmn:Process`,`operaton:ExternalCapable`],properties:[{name:`taskPriority`,isAttr:!0,type:`String`}]},{name:`Properties`,superClass:[`Element`],meta:{allowedIn:[`*`]},properties:[{name:`values`,type:`Property`,isMany:!0}]},{name:`Property`,superClass:[`Element`],properties:[{name:`id`,type:`String`,isAttr:!0},{name:`name`,type:`String`,isAttr:!0},{name:`value`,type:`String`,isAttr:!0}]},{name:`Connector`,superClass:[`Element`],meta:{allowedIn:[`operaton:ServiceTaskLike`]},properties:[{name:`inputOutput`,type:`InputOutput`},{name:`connectorId`,type:`String`}]},{name:`InputOutput`,superClass:[`Element`],meta:{allowedIn:[`bpmn:FlowNode`,`operaton:Connector`]},properties:[{name:`inputOutput`,type:`InputOutput`},{name:`connectorId`,type:`String`},{name:`inputParameters`,isMany:!0,type:`InputParameter`},{name:`outputParameters`,isMany:!0,type:`OutputParameter`}]},{name:`InputOutputParameter`,properties:[{name:`name`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`},{name:`definition`,type:`InputOutputParameterDefinition`}]},{name:`InputOutputParameterDefinition`,isAbstract:!0},{name:`List`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`items`,isMany:!0,type:`InputOutputParameterDefinition`}]},{name:`Map`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`entries`,isMany:!0,type:`Entry`}]},{name:`Entry`,properties:[{name:`key`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`},{name:`definition`,type:`InputOutputParameterDefinition`}]},{name:`Value`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`id`,isAttr:!0,type:`String`},{name:`name`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`}]},{name:`Script`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`scriptFormat`,isAttr:!0,type:`String`},{name:`resource`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`}]},{name:`Field`,superClass:[`Element`],meta:{allowedIn:[`operaton:ServiceTaskLike`,`operaton:ExecutionListener`,`operaton:TaskListener`]},properties:[{name:`name`,isAttr:!0,type:`String`},{name:`expression`,type:`String`},{name:`stringValue`,isAttr:!0,type:`String`},{name:`string`,type:`String`}]},{name:`InputParameter`,superClass:[`InputOutputParameter`]},{name:`OutputParameter`,superClass:[`InputOutputParameter`]},{name:`Collectable`,isAbstract:!0,extends:[`bpmn:MultiInstanceLoopCharacteristics`],superClass:[`operaton:AsyncCapable`],properties:[{name:`collection`,isAttr:!0,type:`String`},{name:`elementVariable`,isAttr:!0,type:`String`}]},{name:`FailedJobRetryTimeCycle`,superClass:[`Element`],meta:{allowedIn:[`operaton:AsyncCapable`,`bpmn:MultiInstanceLoopCharacteristics`]},properties:[{name:`body`,isBody:!0,type:`String`}]},{name:`ExecutionListener`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Task`,`bpmn:ServiceTask`,`bpmn:UserTask`,`bpmn:BusinessRuleTask`,`bpmn:ScriptTask`,`bpmn:ReceiveTask`,`bpmn:ManualTask`,`bpmn:ExclusiveGateway`,`bpmn:SequenceFlow`,`bpmn:ParallelGateway`,`bpmn:InclusiveGateway`,`bpmn:EventBasedGateway`,`bpmn:StartEvent`,`bpmn:IntermediateCatchEvent`,`bpmn:IntermediateThrowEvent`,`bpmn:EndEvent`,`bpmn:BoundaryEvent`,`bpmn:CallActivity`,`bpmn:SubProcess`,`bpmn:Process`]},properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`event`,isAttr:!0,type:`String`},{name:`script`,type:`Script`},{name:`fields`,type:`Field`,isMany:!0}]},{name:`TaskListener`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`event`,isAttr:!0,type:`String`},{name:`script`,type:`Script`},{name:`fields`,type:`Field`,isMany:!0},{name:`id`,type:`String`,isAttr:!0},{name:`eventDefinitions`,type:`bpmn:TimerEventDefinition`,isMany:!0}]},{name:`FormProperty`,superClass:[`Element`],meta:{allowedIn:[`bpmn:StartEvent`,`bpmn:UserTask`]},properties:[{name:`id`,type:`String`,isAttr:!0},{name:`name`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0},{name:`required`,type:`String`,isAttr:!0},{name:`readable`,type:`String`,isAttr:!0},{name:`writable`,type:`String`,isAttr:!0},{name:`variable`,type:`String`,isAttr:!0},{name:`expression`,type:`String`,isAttr:!0},{name:`datePattern`,type:`String`,isAttr:!0},{name:`default`,type:`String`,isAttr:!0},{name:`values`,type:`Value`,isMany:!0}]},{name:`FormData`,superClass:[`Element`],meta:{allowedIn:[`bpmn:StartEvent`,`bpmn:UserTask`]},properties:[{name:`fields`,type:`FormField`,isMany:!0},{name:`businessKey`,type:`String`,isAttr:!0}]},{name:`FormField`,superClass:[`Element`],properties:[{name:`id`,type:`String`,isAttr:!0},{name:`label`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0},{name:`datePattern`,type:`String`,isAttr:!0},{name:`defaultValue`,type:`String`,isAttr:!0},{name:`properties`,type:`Properties`},{name:`validation`,type:`Validation`},{name:`values`,type:`Value`,isMany:!0}]},{name:`Validation`,superClass:[`Element`],properties:[{name:`constraints`,type:`Constraint`,isMany:!0}]},{name:`Constraint`,superClass:[`Element`],properties:[{name:`name`,type:`String`,isAttr:!0},{name:`config`,type:`String`,isAttr:!0}]},{name:`ConditionalEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:ConditionalEventDefinition`],properties:[{name:`variableName`,isAttr:!0,type:`String`},{name:`variableEvents`,isAttr:!0,type:`String`}]}],emumerations:[]},d={name:`Camunda`,uri:`http://camunda.org/schema/1.0/bpmn`,prefix:`camunda`,xml:{tagAlias:`lowerCase`},associations:[],types:[{name:`Definitions`,isAbstract:!0,extends:[`bpmn:Definitions`],properties:[{name:`diagramRelationId`,isAttr:!0,type:`String`}]},{name:`InOutBinding`,superClass:[`Element`],isAbstract:!0,properties:[{name:`source`,isAttr:!0,type:`String`},{name:`sourceExpression`,isAttr:!0,type:`String`},{name:`target`,isAttr:!0,type:`String`},{name:`businessKey`,isAttr:!0,type:`String`},{name:`local`,isAttr:!0,type:`Boolean`,default:!1},{name:`variables`,isAttr:!0,type:`String`}]},{name:`In`,superClass:[`InOutBinding`],meta:{allowedIn:[`bpmn:CallActivity`,`bpmn:SignalEventDefinition`]}},{name:`Out`,superClass:[`InOutBinding`],meta:{allowedIn:[`bpmn:CallActivity`]}},{name:`AsyncCapable`,isAbstract:!0,extends:[`bpmn:Activity`,`bpmn:Gateway`,`bpmn:Event`],properties:[{name:`async`,isAttr:!0,type:`Boolean`,default:!1},{name:`asyncBefore`,isAttr:!0,type:`Boolean`,default:!1},{name:`asyncAfter`,isAttr:!0,type:`Boolean`,default:!1},{name:`exclusive`,isAttr:!0,type:`Boolean`,default:!0}]},{name:`JobPriorized`,isAbstract:!0,extends:[`bpmn:Process`,`camunda:AsyncCapable`],properties:[{name:`jobPriority`,isAttr:!0,type:`String`}]},{name:`SignalEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:SignalEventDefinition`],properties:[{name:`async`,isAttr:!0,type:`Boolean`,default:!1}]},{name:`ErrorEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:ErrorEventDefinition`],properties:[{name:`errorCodeVariable`,isAttr:!0,type:`String`},{name:`errorMessageVariable`,isAttr:!0,type:`String`}]},{name:`ErrorEventDefinition`,superClass:[`bpmn:ErrorEventDefinition`,`Element`],properties:[{name:`expression`,isAttr:!0,type:`String`}],meta:{allowedIn:[`bpmn:ServiceTask`]}},{name:`Error`,isAbstract:!0,extends:[`bpmn:Error`],properties:[{name:`camunda:errorMessage`,isAttr:!0,type:`String`}]},{name:`PotentialStarter`,superClass:[`Element`],properties:[{name:`resourceAssignmentExpression`,type:`bpmn:ResourceAssignmentExpression`}]},{name:`FormSupported`,isAbstract:!0,extends:[`bpmn:StartEvent`,`bpmn:UserTask`],properties:[{name:`formHandlerClass`,isAttr:!0,type:`String`},{name:`formKey`,isAttr:!0,type:`String`},{name:`formRef`,isAttr:!0,type:`String`},{name:`formRefBinding`,isAttr:!0,type:`String`},{name:`formRefVersion`,isAttr:!0,type:`String`}]},{name:`TemplateSupported`,isAbstract:!0,extends:[`bpmn:Collaboration`,`bpmn:Process`,`bpmn:FlowElement`],properties:[{name:`modelerTemplate`,isAttr:!0,type:`String`},{name:`modelerTemplateVersion`,isAttr:!0,type:`Integer`}]},{name:`Initiator`,isAbstract:!0,extends:[`bpmn:StartEvent`],properties:[{name:`initiator`,isAttr:!0,type:`String`}]},{name:`ScriptTask`,isAbstract:!0,extends:[`bpmn:ScriptTask`],properties:[{name:`resultVariable`,isAttr:!0,type:`String`},{name:`resource`,isAttr:!0,type:`String`}]},{name:`Process`,isAbstract:!0,extends:[`bpmn:Process`],properties:[{name:`candidateStarterGroups`,isAttr:!0,type:`String`},{name:`candidateStarterUsers`,isAttr:!0,type:`String`},{name:`versionTag`,isAttr:!0,type:`String`},{name:`historyTimeToLive`,isAttr:!0,type:`String`},{name:`isStartableInTasklist`,isAttr:!0,type:`Boolean`,default:!0}]},{name:`EscalationEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:EscalationEventDefinition`],properties:[{name:`escalationCodeVariable`,isAttr:!0,type:`String`}]},{name:`FormalExpression`,isAbstract:!0,extends:[`bpmn:FormalExpression`],properties:[{name:`resource`,isAttr:!0,type:`String`}]},{name:`Assignable`,extends:[`bpmn:UserTask`],properties:[{name:`assignee`,isAttr:!0,type:`String`},{name:`candidateUsers`,isAttr:!0,type:`String`},{name:`candidateGroups`,isAttr:!0,type:`String`},{name:`dueDate`,isAttr:!0,type:`String`},{name:`followUpDate`,isAttr:!0,type:`String`},{name:`priority`,isAttr:!0,type:`String`}]},{name:`CallActivity`,extends:[`bpmn:CallActivity`],properties:[{name:`calledElementBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`calledElementVersion`,isAttr:!0,type:`String`},{name:`calledElementVersionTag`,isAttr:!0,type:`String`},{name:`calledElementTenantId`,isAttr:!0,type:`String`},{name:`caseRef`,isAttr:!0,type:`String`},{name:`caseBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`caseVersion`,isAttr:!0,type:`String`},{name:`caseTenantId`,isAttr:!0,type:`String`},{name:`variableMappingClass`,isAttr:!0,type:`String`},{name:`variableMappingDelegateExpression`,isAttr:!0,type:`String`}]},{name:`ServiceTaskLike`,extends:[`bpmn:ServiceTask`,`bpmn:BusinessRuleTask`,`bpmn:SendTask`,`bpmn:MessageEventDefinition`],properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`resultVariable`,isAttr:!0,type:`String`}]},{name:`DmnCapable`,extends:[`bpmn:BusinessRuleTask`],properties:[{name:`decisionRef`,isAttr:!0,type:`String`},{name:`decisionRefBinding`,isAttr:!0,type:`String`,default:`latest`},{name:`decisionRefVersion`,isAttr:!0,type:`String`},{name:`mapDecisionResult`,isAttr:!0,type:`String`,default:`resultList`},{name:`decisionRefTenantId`,isAttr:!0,type:`String`}]},{name:`ExternalCapable`,extends:[`camunda:ServiceTaskLike`],properties:[{name:`type`,isAttr:!0,type:`String`},{name:`topic`,isAttr:!0,type:`String`}]},{name:`TaskPriorized`,extends:[`bpmn:Process`,`camunda:ExternalCapable`],properties:[{name:`taskPriority`,isAttr:!0,type:`String`}]},{name:`Properties`,superClass:[`Element`],meta:{allowedIn:[`*`]},properties:[{name:`values`,type:`Property`,isMany:!0}]},{name:`Property`,superClass:[`Element`],properties:[{name:`id`,type:`String`,isAttr:!0},{name:`name`,type:`String`,isAttr:!0},{name:`value`,type:`String`,isAttr:!0}]},{name:`Connector`,superClass:[`Element`],meta:{allowedIn:[`camunda:ServiceTaskLike`]},properties:[{name:`inputOutput`,type:`InputOutput`},{name:`connectorId`,type:`String`}]},{name:`InputOutput`,superClass:[`Element`],meta:{allowedIn:[`bpmn:FlowNode`,`camunda:Connector`]},properties:[{name:`inputOutput`,type:`InputOutput`},{name:`connectorId`,type:`String`},{name:`inputParameters`,isMany:!0,type:`InputParameter`},{name:`outputParameters`,isMany:!0,type:`OutputParameter`}]},{name:`InputOutputParameter`,properties:[{name:`name`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`},{name:`definition`,type:`InputOutputParameterDefinition`}]},{name:`InputOutputParameterDefinition`,isAbstract:!0},{name:`List`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`items`,isMany:!0,type:`InputOutputParameterDefinition`}]},{name:`Map`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`entries`,isMany:!0,type:`Entry`}]},{name:`Entry`,properties:[{name:`key`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`},{name:`definition`,type:`InputOutputParameterDefinition`}]},{name:`Value`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`id`,isAttr:!0,type:`String`},{name:`name`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`}]},{name:`Script`,superClass:[`InputOutputParameterDefinition`],properties:[{name:`scriptFormat`,isAttr:!0,type:`String`},{name:`resource`,isAttr:!0,type:`String`},{name:`value`,isBody:!0,type:`String`}]},{name:`Field`,superClass:[`Element`],meta:{allowedIn:[`camunda:ServiceTaskLike`,`camunda:ExecutionListener`,`camunda:TaskListener`]},properties:[{name:`name`,isAttr:!0,type:`String`},{name:`expression`,type:`String`},{name:`stringValue`,isAttr:!0,type:`String`},{name:`string`,type:`String`}]},{name:`InputParameter`,superClass:[`InputOutputParameter`]},{name:`OutputParameter`,superClass:[`InputOutputParameter`]},{name:`Collectable`,isAbstract:!0,extends:[`bpmn:MultiInstanceLoopCharacteristics`],superClass:[`camunda:AsyncCapable`],properties:[{name:`collection`,isAttr:!0,type:`String`},{name:`elementVariable`,isAttr:!0,type:`String`}]},{name:`FailedJobRetryTimeCycle`,superClass:[`Element`],meta:{allowedIn:[`camunda:AsyncCapable`,`bpmn:MultiInstanceLoopCharacteristics`]},properties:[{name:`body`,isBody:!0,type:`String`}]},{name:`ExecutionListener`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Task`,`bpmn:ServiceTask`,`bpmn:UserTask`,`bpmn:BusinessRuleTask`,`bpmn:ScriptTask`,`bpmn:ReceiveTask`,`bpmn:ManualTask`,`bpmn:ExclusiveGateway`,`bpmn:SequenceFlow`,`bpmn:ParallelGateway`,`bpmn:InclusiveGateway`,`bpmn:EventBasedGateway`,`bpmn:StartEvent`,`bpmn:IntermediateCatchEvent`,`bpmn:IntermediateThrowEvent`,`bpmn:EndEvent`,`bpmn:BoundaryEvent`,`bpmn:CallActivity`,`bpmn:SubProcess`,`bpmn:Process`]},properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`event`,isAttr:!0,type:`String`},{name:`script`,type:`Script`},{name:`fields`,type:`Field`,isMany:!0}]},{name:`TaskListener`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`expression`,isAttr:!0,type:`String`},{name:`class`,isAttr:!0,type:`String`},{name:`delegateExpression`,isAttr:!0,type:`String`},{name:`event`,isAttr:!0,type:`String`},{name:`script`,type:`Script`},{name:`fields`,type:`Field`,isMany:!0},{name:`id`,type:`String`,isAttr:!0},{name:`eventDefinitions`,type:`bpmn:TimerEventDefinition`,isMany:!0}]},{name:`FormProperty`,superClass:[`Element`],meta:{allowedIn:[`bpmn:StartEvent`,`bpmn:UserTask`]},properties:[{name:`id`,type:`String`,isAttr:!0},{name:`name`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0},{name:`required`,type:`String`,isAttr:!0},{name:`readable`,type:`String`,isAttr:!0},{name:`writable`,type:`String`,isAttr:!0},{name:`variable`,type:`String`,isAttr:!0},{name:`expression`,type:`String`,isAttr:!0},{name:`datePattern`,type:`String`,isAttr:!0},{name:`default`,type:`String`,isAttr:!0},{name:`values`,type:`Value`,isMany:!0}]},{name:`FormData`,superClass:[`Element`],meta:{allowedIn:[`bpmn:StartEvent`,`bpmn:UserTask`]},properties:[{name:`fields`,type:`FormField`,isMany:!0},{name:`businessKey`,type:`String`,isAttr:!0}]},{name:`FormField`,superClass:[`Element`],properties:[{name:`id`,type:`String`,isAttr:!0},{name:`label`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0},{name:`datePattern`,type:`String`,isAttr:!0},{name:`defaultValue`,type:`String`,isAttr:!0},{name:`properties`,type:`Properties`},{name:`validation`,type:`Validation`},{name:`values`,type:`Value`,isMany:!0}]},{name:`Validation`,superClass:[`Element`],properties:[{name:`constraints`,type:`Constraint`,isMany:!0}]},{name:`Constraint`,superClass:[`Element`],properties:[{name:`name`,type:`String`,isAttr:!0},{name:`config`,type:`String`,isAttr:!0}]},{name:`ConditionalEventDefinitionExtension`,isAbstract:!0,extends:[`bpmn:ConditionalEventDefinition`],properties:[{name:`variableName`,isAttr:!0,type:`String`},{name:`variableEvents`,isAttr:!0,type:`String`}]}],emumerations:[]},f={name:`zeebe`,prefix:`zeebe`,uri:`http://camunda.org/schema/zeebe/1.0`,xml:{tagAlias:`lowerCase`},associations:[],types:[{name:`ZeebeServiceTask`,extends:[`bpmn:ServiceTask`,`bpmn:BusinessRuleTask`,`bpmn:ScriptTask`,`bpmn:SendTask`,`bpmn:EndEvent`,`bpmn:IntermediateThrowEvent`,`bpmn:AdHocSubProcess`],properties:[{name:`retryCounter`,type:`String`,isAttr:!0}]},{name:`IoMapping`,superClass:[`Element`],properties:[{name:`ioMapping`,type:`IoMapping`},{name:`inputParameters`,isMany:!0,type:`Input`},{name:`outputParameters`,isMany:!0,type:`Output`}],meta:{allowedIn:[`bpmn:CallActivity`,`bpmn:Event`,`bpmn:ReceiveTask`,`zeebe:ZeebeServiceTask`,`bpmn:SubProcess`,`bpmn:UserTask`]}},{name:`InputOutputParameter`,properties:[{name:`source`,isAttr:!0,type:`String`},{name:`target`,isAttr:!0,type:`String`}]},{name:`Subscription`,superClass:[`Element`],properties:[{name:`correlationKey`,isAttr:!0,type:`String`}]},{name:`Input`,superClass:[`InputOutputParameter`],meta:{allowedIn:[`bpmn:CallActivity`,`zeebe:ZeebeServiceTask`,`bpmn:SubProcess`,`bpmn:UserTask`]}},{name:`Output`,superClass:[`InputOutputParameter`],meta:{allowedIn:[`bpmn:CallActivity`,`bpmn:Event`,`bpmn:ReceiveTask`,`zeebe:ZeebeServiceTask`,`bpmn:SubProcess`,`bpmn:UserTask`]}},{name:`TaskHeaders`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`,`zeebe:ExecutionListener`,`zeebe:ZeebeServiceTask`]},properties:[{name:`values`,type:`Header`,isMany:!0}]},{name:`Header`,superClass:[`Element`],properties:[{name:`id`,type:`String`,isAttr:!0},{name:`key`,type:`String`,isAttr:!0},{name:`value`,type:`String`,isAttr:!0}]},{name:`TaskDefinition`,superClass:[`Element`],meta:{allowedIn:[`zeebe:ZeebeServiceTask`]},properties:[{name:`type`,type:`String`,isAttr:!0},{name:`retries`,type:`String`,isAttr:!0}]},{name:`LoopCharacteristics`,superClass:[`Element`],meta:{allowedIn:[`bpmn:MultiInstanceLoopCharacteristics`]},properties:[{name:`inputCollection`,type:`String`,isAttr:!0},{name:`inputElement`,type:`String`,isAttr:!0},{name:`outputCollection`,type:`String`,isAttr:!0},{name:`outputElement`,type:`String`,isAttr:!0}]},{name:`CalledElement`,superClass:[`Element`],meta:{allowedIn:[`bpmn:CallActivity`]},properties:[{name:`processId`,type:`String`,isAttr:!0},{name:`processIdExpression`,type:`String`,isAttr:!0},{name:`propagateAllChildVariables`,isAttr:!0,type:`Boolean`},{name:`propagateAllParentVariables`,isAttr:!0,type:`Boolean`,default:!0},{name:`businessId`,isAttr:!0,type:`String`}]},{name:`UserTaskForm`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Process`]},properties:[{name:`id`,type:`String`,isAttr:!0},{name:`body`,type:`String`,isBody:!0}]},{name:`FormDefinition`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`,`bpmn:StartEvent`]},properties:[{name:`formKey`,type:`String`,isAttr:!0},{name:`formId`,type:`String`,isAttr:!0},{name:`externalReference`,type:`String`,isAttr:!0}]},{name:`LinkedResource`,superClass:[`Element`],meta:{allowedIn:[`bpmn:ServiceTask`]},properties:[{name:`resourceId`,type:`String`,isAttr:!0},{name:`resourceType`,type:`String`,isAttr:!0},{name:`linkName`,type:`String`,isAttr:!0}]},{name:`LinkedResources`,superClass:[`Element`],meta:{allowedIn:[`bpmn:ServiceTask`]},properties:[{name:`values`,type:`LinkedResource`,isMany:!0}]},{name:`UserTask`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[]},{name:`CalledDecision`,superClass:[`Element`],meta:{allowedIn:[`bpmn:BusinessRuleTask`]},properties:[{name:`decisionId`,type:`String`,isAttr:!0},{name:`resultVariable`,type:`String`,isAttr:!0}]},{name:`AssignmentDefinition`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`assignee`,type:`String`,isAttr:!0},{name:`candidateGroups`,type:`String`,isAttr:!0},{name:`candidateUsers`,type:`String`,isAttr:!0}]},{name:`PriorityDefinition`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`priority`,type:`String`,isAttr:!0}]},{name:`JobPriorityDefinition`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Process`,`zeebe:ZeebeServiceTask`]},properties:[{name:`priority`,type:`String`,isAttr:!0}]},{name:`TaskSchedule`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`dueDate`,type:`String`,isAttr:!0},{name:`followUpDate`,type:`String`,isAttr:!0}]},{name:`Properties`,superClass:[`Element`],properties:[{name:`properties`,type:`Property`,isMany:!0}]},{name:`Property`,properties:[{name:`name`,type:`String`,isAttr:!0},{name:`value`,type:`String`,isAttr:!0}]},{name:`TemplateSupported`,isAbstract:!0,extends:[`bpmn:Collaboration`,`bpmn:Process`,`bpmn:FlowElement`],properties:[{name:`modelerTemplate`,isAttr:!0,type:`String`},{name:`modelerTemplateVersion`,isAttr:!0,type:`Integer`},{name:`modelerTemplateIcon`,isAttr:!0,type:`String`}]},{name:`ConfigurationSupported`,isAbstract:!0,extends:[`zeebe:Input`,`zeebe:Property`],properties:[{name:`modelerConfigurationTemplate`,isAttr:!0,type:`String`},{name:`modelerConfigurationName`,isAttr:!0,type:`String`}]},{name:`TemplatedRootElement`,isAbstract:!0,extends:[`bpmn:Error`,`bpmn:Escalation`,`bpmn:Message`,`bpmn:Signal`],properties:[{name:`modelerTemplate`,isAttr:!0,type:`String`}]},{name:`Script`,superClass:[`Element`],meta:{allowedIn:[`bpmn:ScriptTask`]},properties:[{name:`expression`,type:`String`,isAttr:!0},{name:`resultVariable`,type:`String`,isAttr:!0}]},{name:`ExecutionListeners`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Event`,`bpmn:Activity`,`bpmn:Process`,`bpmn:ExclusiveGateway`,`bpmn:InclusiveGateway`,`bpmn:ParallelGateway`,`bpmn:EventBasedGateway`]},properties:[{name:`listeners`,type:`ExecutionListener`,isMany:!0}]},{name:`ExecutionListener`,superClass:[`Element`],meta:{allowedIn:[`zeebe:ExecutionListeners`]},properties:[{name:`eventType`,type:`String`,isAttr:!0},{name:`retries`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0},{name:`headers`,type:`TaskHeaders`}]},{name:`TaskListeners`,superClass:[`Element`],meta:{allowedIn:[`bpmn:UserTask`]},properties:[{name:`listeners`,type:`TaskListener`,isMany:!0}]},{name:`TaskListener`,superClass:[`Element`],meta:{allowedIn:[`zeebe:TaskListeners`]},properties:[{name:`eventType`,type:`String`,isAttr:!0},{name:`retries`,type:`String`,isAttr:!0},{name:`type`,type:`String`,isAttr:!0}]},{name:`VersionTag`,superClass:[`Element`],meta:{allowedIn:[`bpmn:Process`]},properties:[{name:`value`,type:`String`,isAttr:!0}]},{name:`BindingTypeSupported`,isAbstract:!0,extends:[`zeebe:CalledDecision`,`zeebe:CalledElement`,`zeebe:FormDefinition`,`zeebe:LinkedResource`],properties:[{name:`bindingType`,isAttr:!0,type:`String`,default:`latest`},{name:`versionTag`,isAttr:!0,type:`String`}]},{name:`AdHoc`,superClass:[`Element`],meta:{allowedIn:[`bpmn:AdHocSubProcess`]},properties:[{name:`activeElementsCollection`,isAttr:!0,type:`String`},{name:`outputCollection`,isAttr:!0,type:`String`},{name:`outputElement`,isAttr:!0,type:`String`}]},{name:`ConditionalFilter`,superClass:[`Element`],meta:{allowedIn:[`bpmn:ConditionalEventDefinition`]},properties:[{name:`variableNames`,isAttr:!0,type:`String`},{name:`variableEvents`,isAttr:!0,type:`String`}]},{name:`AgentDefinition`,superClass:[`Element`],meta:{allowedIn:[`bpmn:ServiceTask`,`bpmn:AdHocSubProcess`]},properties:[{name:`agentType`,type:`String`,isAttr:!0}]}]};function DmnModdle(e,t){r.call(this,e,t)}DmnModdle.prototype=Object.create(r.prototype),DmnModdle.prototype.fromXML=function(e,r,i){n(r)||(i=r,r=`dmn:Definitions`);var o=new a(t({model:this,lax:!0},i)),s=o.handler(r);return o.fromXML(e,s)},DmnModdle.prototype.toXML=function(e,t){var n=new i(t);return new Promise(function(t,r){try{return t({xml:n.toXML(e)})}catch(e){return r(e)}})};var p={dc:{name:`DC`,prefix:`dc`,uri:`http://www.omg.org/spec/DMN/20180521/DC/`,types:[{name:`Dimension`,properties:[{name:`width`,isAttr:!0,type:`Real`},{name:`height`,isAttr:!0,type:`Real`}]},{name:`Bounds`,properties:[{name:`height`,isAttr:!0,type:`Real`},{name:`width`,isAttr:!0,type:`Real`},{name:`x`,isAttr:!0,type:`Real`},{name:`y`,isAttr:!0,type:`Real`}]},{name:`Point`,properties:[{name:`x`,isAttr:!0,type:`Real`},{name:`y`,isAttr:!0,type:`Real`}]},{name:`Color`,properties:[{name:`red`,type:`UML_Standard_Profile.mdzip:eee_1045467100323_917313_65`},{name:`green`,type:`UML_Standard_Profile.mdzip:eee_1045467100323_917313_65`},{name:`blue`,type:`UML_Standard_Profile.mdzip:eee_1045467100323_917313_65`}]}],associations:[],enumerations:[{name:`AlignmentKind`,literalValues:[{name:`start`},{name:`center`},{name:`end`}]}]},di:{name:`DI`,prefix:`di`,uri:`http://www.omg.org/spec/DMN/20180521/DI/`,types:[{name:`DiagramElement`,isAbstract:!0,properties:[{name:`extension`,type:`Extension`},{name:`id`,isAttr:!0,isId:!0,type:`String`},{name:`style`,isReference:!0,type:`Style`,xml:{serialize:`property`}},{name:`sharedStyle`,isReference:!0,isVirtual:!0,type:`Style`}]},{name:`Diagram`,superClass:[`DiagramElement`],properties:[{name:`name`,isAttr:!0,type:`String`},{name:`documentation`,isAttr:!0,type:`String`},{name:`resolution`,isAttr:!0,type:`Real`}]},{name:`Shape`,isAbstract:!0,properties:[{name:`bounds`,type:`dc:Bounds`}],superClass:[`DiagramElement`]},{name:`Edge`,isAbstract:!0,properties:[{name:`waypoint`,type:`dc:Point`,isMany:!0,xml:{serialize:`property`}}],superClass:[`DiagramElement`]},{name:`Style`,isAbstract:!0,properties:[{name:`id`,isAttr:!0,isId:!0,type:`String`}]},{name:`Extension`,properties:[{name:`values`,isMany:!0,type:`Element`}]}],associations:[],enumerations:[],xml:{tagAlias:`lowerCase`}},dmn:{name:`DMN`,prefix:`dmn`,uri:`https://www.omg.org/spec/DMN/20191111/MODEL/`,types:[{name:`AuthorityRequirement`,superClass:[`DMNElement`],properties:[{name:`requiredAuthority`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`requiredDecision`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`requiredInput`,type:`DMNElementReference`,xml:{serialize:`property`}}]},{name:`ItemDefinition`,superClass:[`NamedElement`],properties:[{name:`typeRef`,type:`String`},{name:`allowedValues`,type:`UnaryTests`,xml:{serialize:`property`}},{name:`typeLanguage`,type:`String`,isAttr:!0},{name:`itemComponent`,type:`ItemDefinition`,isMany:!0,xml:{serialize:`property`}},{name:`functionItem`,type:`FunctionItem`},{name:`isCollection`,isAttr:!0,type:`Boolean`}]},{name:`Definitions`,superClass:[`NamedElement`],properties:[{name:`import`,type:`Import`,isMany:!0},{name:`itemDefinition`,type:`ItemDefinition`,isMany:!0},{name:`drgElement`,type:`DRGElement`,isMany:!0},{name:`artifact`,type:`Artifact`,isMany:!0},{name:`elementCollection`,type:`ElementCollection`,isMany:!0},{name:`businessContextElement`,type:`BusinessContextElement`,isMany:!0},{name:`namespace`,type:`String`,isAttr:!0},{name:`expressionLanguage`,type:`String`,isAttr:!0},{name:`typeLanguage`,type:`String`,isAttr:!0},{name:`exporter`,isAttr:!0,type:`String`},{name:`exporterVersion`,isAttr:!0,type:`String`},{name:`dmnDI`,type:`dmndi:DMNDI`}]},{name:`KnowledgeSource`,superClass:[`DRGElement`],properties:[{name:`authorityRequirement`,type:`AuthorityRequirement`,isMany:!0},{name:`type`,type:`String`},{name:`owner`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`locationURI`,type:`String`,isAttr:!0}]},{name:`DecisionRule`,superClass:[`DMNElement`],properties:[{name:`inputEntry`,type:`UnaryTests`,isMany:!0,xml:{serialize:`property`}},{name:`outputEntry`,type:`LiteralExpression`,isMany:!0,xml:{serialize:`property`}},{name:`annotationEntry`,type:`RuleAnnotation`,isMany:!0,xml:{serialize:`property`}}]},{name:`Expression`,isAbstract:!0,superClass:[`DMNElement`],properties:[{name:`typeRef`,isAttr:!0,type:`String`}]},{name:`InformationItem`,superClass:[`NamedElement`],properties:[{name:`typeRef`,isAttr:!0,type:`String`}]},{name:`Decision`,superClass:[`DRGElement`],properties:[{name:`question`,type:`String`,xml:{serialize:`property`}},{name:`allowedAnswers`,type:`String`,xml:{serialize:`property`}},{name:`variable`,type:`InformationItem`,xml:{serialize:`property`}},{name:`informationRequirement`,type:`InformationRequirement`,isMany:!0},{name:`knowledgeRequirement`,type:`KnowledgeRequirement`,isMany:!0},{name:`authorityRequirement`,type:`AuthorityRequirement`,isMany:!0},{name:`supportedObjective`,isMany:!0,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`impactedPerformanceIndicator`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`decisionMaker`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`decisionOwner`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`usingProcess`,isMany:!0,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`usingTask`,isMany:!0,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`decisionLogic`,type:`Expression`}]},{name:`Invocation`,superClass:[`Expression`],properties:[{name:`calledFunction`,type:`Expression`},{name:`binding`,type:`Binding`,isMany:!0}]},{name:`OrganisationalUnit`,superClass:[`BusinessContextElement`],properties:[{name:`decisionMade`,type:`Decision`,isReference:!0,isMany:!0},{name:`decisionOwned`,type:`Decision`,isReference:!0,isMany:!0}]},{name:`Import`,superClass:[`NamedElement`],properties:[{name:`importType`,type:`String`,isAttr:!0},{name:`locationURI`,type:`String`,isAttr:!0},{name:`namespace`,type:`String`,isAttr:!0}]},{name:`InformationRequirement`,superClass:[`DMNElement`],properties:[{name:`requiredDecision`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`requiredInput`,type:`DMNElementReference`,xml:{serialize:`property`}}]},{name:`ElementCollection`,superClass:[`NamedElement`],properties:[{name:`drgElement`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}}]},{name:`DRGElement`,isAbstract:!0,superClass:[`NamedElement`],properties:[]},{name:`InputData`,superClass:[`DRGElement`],properties:[{name:`variable`,type:`InformationItem`,xml:{serialize:`property`}}]},{name:`DMNElement`,isAbstract:!0,properties:[{name:`description`,type:`String`},{name:`extensionElements`,type:`ExtensionElements`},{name:`id`,type:`String`,isAttr:!0,isId:!0},{name:`extensionAttribute`,type:`ExtensionAttribute`,isMany:!0},{name:`label`,isAttr:!0,type:`String`}]},{name:`InputClause`,superClass:[`DMNElement`],properties:[{name:`inputExpression`,type:`LiteralExpression`,xml:{serialize:`property`}},{name:`inputValues`,type:`UnaryTests`,xml:{serialize:`property`}}]},{name:`DecisionTable`,superClass:[`Expression`],properties:[{name:`input`,type:`InputClause`,isMany:!0,xml:{serialize:`property`}},{name:`output`,type:`OutputClause`,isMany:!0,xml:{serialize:`property`}},{name:`annotation`,type:`RuleAnnotationClause`,isMany:!0,xml:{serialize:`property`}},{name:`rule`,type:`DecisionRule`,isMany:!0,xml:{serialize:`property`}},{name:`hitPolicy`,type:`HitPolicy`,isAttr:!0,default:`UNIQUE`},{name:`aggregation`,type:`BuiltinAggregator`,isAttr:!0},{name:`preferredOrientation`,type:`DecisionTableOrientation`,isAttr:!0},{name:`outputLabel`,isAttr:!0,type:`String`}]},{name:`LiteralExpression`,superClass:[`Expression`],properties:[{name:`expressionLanguage`,type:`String`,isAttr:!0},{name:`text`,type:`String`},{name:`importedValues`,type:`ImportedValues`}]},{name:`Binding`,properties:[{name:`parameter`,type:`InformationItem`,xml:{serialize:`property`}},{name:`bindingFormula`,type:`Expression`}]},{name:`KnowledgeRequirement`,superClass:[`DMNElement`],properties:[{name:`requiredKnowledge`,type:`DMNElementReference`,xml:{serialize:`property`}}]},{name:`BusinessKnowledgeModel`,superClass:[`Invocable`],properties:[{name:`encapsulatedLogic`,type:`FunctionDefinition`,xml:{serialize:`property`}},{name:`knowledgeRequirement`,type:`KnowledgeRequirement`,isMany:!0},{name:`authorityRequirement`,type:`AuthorityRequirement`,isMany:!0}]},{name:`BusinessContextElement`,isAbstract:!0,superClass:[`NamedElement`],properties:[{name:`URI`,type:`String`,isAttr:!0}]},{name:`PerformanceIndicator`,superClass:[`BusinessContextElement`],properties:[{name:`impactingDecision`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}}]},{name:`FunctionDefinition`,superClass:[`Expression`],properties:[{name:`formalParameter`,type:`InformationItem`,isMany:!0,xml:{serialize:`property`}},{name:`body`,type:`Expression`},{name:`kind`,type:`FunctionKind`,isAttr:!0}]},{name:`Context`,superClass:[`Expression`],properties:[{name:`contextEntry`,type:`ContextEntry`,isMany:!0}]},{name:`ContextEntry`,superClass:[`DMNElement`],properties:[{name:`variable`,type:`InformationItem`,xml:{serialize:`property`}},{name:`value`,type:`Expression`}]},{name:`List`,superClass:[`Expression`],properties:[{name:`elements`,isMany:!0,type:`Expression`}]},{name:`Relation`,superClass:[`Expression`],properties:[{name:`column`,type:`InformationItem`,isMany:!0,xml:{serialize:`property`}},{name:`row`,type:`List`,isMany:!0,xml:{serialize:`property`}}]},{name:`OutputClause`,superClass:[`DMNElement`],properties:[{name:`outputValues`,type:`UnaryTests`,xml:{serialize:`property`}},{name:`defaultOutputEntry`,type:`LiteralExpression`,xml:{serialize:`property`}},{name:`name`,isAttr:!0,type:`String`},{name:`typeRef`,isAttr:!0,type:`String`}]},{name:`UnaryTests`,superClass:[`Expression`],properties:[{name:`text`,type:`String`},{name:`expressionLanguage`,type:`String`,isAttr:!0}]},{name:`NamedElement`,isAbstract:!0,superClass:[`DMNElement`],properties:[{name:`name`,isAttr:!0,type:`String`}]},{name:`ImportedValues`,superClass:[`Import`],properties:[{name:`importedElement`,type:`String`},{name:`expressionLanguage`,type:`String`,isAttr:!0}]},{name:`DecisionService`,superClass:[`Invocable`],properties:[{name:`outputDecision`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`encapsulatedDecision`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`inputDecision`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}},{name:`inputData`,type:`DMNElementReference`,isMany:!0,xml:{serialize:`property`}}]},{name:`ExtensionElements`,properties:[{name:`values`,type:`Element`,isMany:!0}]},{name:`ExtensionAttribute`,properties:[{name:`value`,type:`Element`},{name:`valueRef`,type:`Element`,isAttr:!0,isReference:!0},{name:`name`,isAttr:!0,type:`String`}]},{name:`Element`,isAbstract:!0,properties:[{name:`extensionAttribute`,type:`ExtensionAttribute`,isAttr:!0,isReference:!0},{name:`elements`,type:`ExtensionElements`,isAttr:!0,isReference:!0}]},{name:`Artifact`,isAbstract:!0,superClass:[`DMNElement`],properties:[]},{name:`Association`,superClass:[`Artifact`],properties:[{name:`sourceRef`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`targetRef`,type:`DMNElementReference`,xml:{serialize:`property`}},{name:`associationDirection`,type:`AssociationDirection`,isAttr:!0}]},{name:`TextAnnotation`,superClass:[`Artifact`],properties:[{name:`text`,type:`String`},{name:`textFormat`,isAttr:!0,type:`String`,default:`text/plain`}]},{name:`RuleAnnotationClause`,properties:[{name:`name`,isAttr:!0,type:`String`}]},{name:`RuleAnnotation`,properties:[{name:`text`,type:`String`}]},{name:`Invocable`,isAbstract:!0,superClass:[`DRGElement`],properties:[{name:`variable`,type:`InformationItem`,xml:{serialize:`property`}}]},{name:`Group`,superClass:[`Artifact`],properties:[{name:`name`,isAttr:!0,type:`String`}]},{name:`FunctionItem`,superClass:[`DMNElement`],properties:[{name:`parameters`,isMany:!0,type:`InformationItem`,xml:{serialize:`property`}},{name:`outputTypeRef`,isAttr:!0,type:`String`}]},{name:`DMNElementReference`,properties:[{isAttr:!0,name:`href`,type:`String`}]}],enumerations:[{name:`HitPolicy`,literalValues:[{name:`UNIQUE`},{name:`FIRST`},{name:`PRIORITY`},{name:`ANY`},{name:`COLLECT`},{name:`RULE ORDER`},{name:`OUTPUT ORDER`}]},{name:`BuiltinAggregator`,literalValues:[{name:`SUM`},{name:`COUNT`},{name:`MIN`},{name:`MAX`}]},{name:`DecisionTableOrientation`,literalValues:[{name:`Rule-as-Row`},{name:`Rule-as-Column`},{name:`CrossTable`}]},{name:`AssociationDirection`,literalValues:[{name:`None`},{name:`One`},{name:`Both`}]},{name:`FunctionKind`,literalValues:[{name:`FEEL`},{name:`Java`},{name:`PMML`}]}],associations:[],xml:{tagAlias:`lowerCase`}},dmndi:{name:`DMNDI`,prefix:`dmndi`,uri:`https://www.omg.org/spec/DMN/20191111/DMNDI/`,types:[{name:`DMNDI`,properties:[{name:`diagrams`,type:`DMNDiagram`,isMany:!0},{name:`styles`,type:`DMNStyle`,isMany:!0}]},{name:`DMNStyle`,superClass:[`di:Style`],properties:[{name:`fillColor`,type:`dc:Color`,isAttr:!0},{name:`strokeColor`,type:`dc:Color`,isAttr:!0},{name:`fontColor`,type:`dc:Color`,isAttr:!0},{name:`fontSize`,isAttr:!0,type:`Real`},{name:`fontFamily`,isAttr:!0,type:`String`},{name:`fontItalic`,isAttr:!0,type:`Boolean`},{name:`fontBold`,isAttr:!0,type:`Boolean`},{name:`fontUnderline`,isAttr:!0,type:`Boolean`},{name:`fontStrikeThrough`,isAttr:!0,type:`Boolean`},{name:`labelHorizontalAlignment`,type:`dc:AlignmentKind`,isAttr:!0},{name:`labelVerticalAlignment`,type:`dc:AlignmentKind`,isAttr:!0}]},{name:`DMNDiagram`,superClass:[`di:Diagram`],properties:[{name:`dmnElementRef`,type:`dmn:DMNElement`,isAttr:!0,isReference:!0},{name:`size`,type:`Size`},{name:`localStyle`,type:`DMNStyle`,isVirtual:!0},{name:`sharedStyle`,type:`DMNStyle`,isVirtual:!0,isReference:!0,redefines:`di:DiagramElement#sharedStyle`},{name:`diagramElements`,type:`DMNDiagramElement`,isMany:!0}]},{name:`DMNDiagramElement`,isAbstract:!0,superClass:[`di:DiagramElement`],properties:[{name:`dmnElementRef`,type:`dmn:DMNElement`,isAttr:!0,isReference:!0},{name:`sharedStyle`,type:`DMNStyle`,isVirtual:!0,isReference:!0,redefines:`di:DiagramElement#sharedStyle`},{name:`localStyle`,type:`DMNStyle`,isVirtual:!0},{name:`label`,type:`DMNLabel`}]},{name:`DMNLabel`,superClass:[`di:Shape`],properties:[{name:`text`,type:`Text`}]},{name:`DMNShape`,superClass:[`di:Shape`,`DMNDiagramElement`],properties:[{name:`isListedInputData`,isAttr:!0,type:`Boolean`},{name:`decisionServiceDividerLine`,type:`DMNDecisionServiceDividerLine`},{name:`isCollapsed`,isAttr:!0,type:`Boolean`}]},{name:`DMNEdge`,superClass:[`di:Edge`,`DMNDiagramElement`],properties:[{name:`sourceElement`,type:`DMNDiagramElement`,isAttr:!0,isReference:!0},{name:`targetElement`,type:`DMNDiagramElement`,isAttr:!0,isReference:!0}]},{name:`DMNDecisionServiceDividerLine`,superClass:[`di:Edge`]},{name:`Text`,properties:[{name:`text`,isBody:!0,type:`String`}]},{name:`Size`,superClass:[`dc:Dimension`]}],associations:[],enumerations:[]},biodi:{name:`bpmn.io DI for DMN`,uri:`http://bpmn.io/schema/dmn/biodi/2.0`,prefix:`biodi`,xml:{tagAlias:`lowerCase`},types:[{name:`DecisionTable`,isAbstract:!0,extends:[`dmn:DecisionTable`],properties:[{name:`annotationsWidth`,isAttr:!0,type:`Integer`}]},{name:`OutputClause`,isAbstract:!0,extends:[`dmn:OutputClause`],properties:[{name:`width`,isAttr:!0,type:`Integer`}]},{name:`InputClause`,isAbstract:!0,extends:[`dmn:InputClause`],properties:[{name:`width`,isAttr:!0,type:`Integer`}]}]}};function simple(e,n){return new DmnModdle(t({},p,e),n)}var m={name:`Camunda`,uri:`http://camunda.org/schema/1.0/dmn`,prefix:`camunda`,xml:{tagAlias:`lowerCase`},associations:[],types:[{name:`Definitions`,isAbstract:!0,extends:[`dmn:Definitions`],properties:[{name:`diagramRelationId`,isAttr:!0,type:`String`}]},{name:`Decision`,isAbstract:!0,extends:[`dmn:Decision`],properties:[{name:`versionTag`,isAttr:!0,type:`String`},{name:`historyTimeToLive`,isAttr:!0,type:`String`}]},{name:`InputClause`,extends:[`dmn:InputClause`],properties:[{name:`inputVariable`,isAttr:!0,type:`String`}]}],emumerations:[]},h=`http://camunda.org/schema/1.0/bpmn`,g=`http://camunda.org/schema/zeebe/1.0`,_=`http://operaton.org/schema/1.0/bpmn`,v={...f,types:f.types.filter(e=>e.name!==`TemplateSupported`)},y=1e3,b=/<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<(\/?)[^\s>\/!?][^>]*?(\/?)>/g;function nestingExceeds(e,t=y){let n=0;for(let r of e.matchAll(b))if(r[1]!==void 0){if(r[1]===`/`)--n;else if(r[2]!==`/`&&(n+=1,n>t))return!0}return!1}function guarded(e){let t=e.fromXML.bind(e);return e.fromXML=(e,...n)=>typeof e==`string`&&nestingExceeds(e)?Promise.reject(Error(`unparsable content: the document is nested more than ${y} levels deep`)):t(e,...n),e}var x=new Map,S=new WeakMap,C=new Map;function dmnModdleByFlavour(e){return C.has(e)||C.set(e,guarded(new simple(e===`migration`?{camunda:m}:void 0))),C.get(e)}function moddleByFlavour(e){if(!x.has(e)){let t=e===`flowable`?{flowable:s(`flowable`)}:e===`activiti`?{activiti:s(`activiti`)}:e===`zeebe`?{zeebe:f}:e===`operaton`?{operaton:u}:e===`camunda`?{camunda:d}:e===`migration`?{camunda:d,zeebe:v}:{},n=guarded(new o(t));e===`operaton`&&OperatonCompat(n),x.set(e,n)}return x.get(e)}function moddleFor(e,t){return moddleByFlavour(t??(e.includes(g)?`zeebe`:e.includes(`http://flowable.org/bpmn`)?`flowable`:e.includes(`http://activiti.org/bpmn`)?`activiti`:e.includes(_)?`operaton`:e.includes(h)?`camunda`:`plain`))}async function readDefinitionsWithWarnings(e,t){try{let n=moddleFor(e,t),{rootElement:r,warnings:i}=await n.fromXML(e);return r?(S.set(r,n),{definitions:r,warnings:Array.isArray(i)?i:[]}):null}catch{return null}}async function readDefinitions(e,t){return(await readDefinitionsWithWarnings(e,t))?.definitions??null}function moddleOf(e){let t=S.get(e);if(!t)throw Error(`these definitions were not read with readDefinitions`);return t}async function writeDefinitions(e){let{xml:t}=await moddleOf(e).toXML(e,{format:!0});return t}export{writeDefinitions as a,f as c,OperatonCompat as d,readDefinitionsWithWarnings as i,d as l,moddleOf as n,m as o,readDefinitions as r,simple as s,dmnModdleByFlavour as t,u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ed25519-DTYhEcYX.js","./rolldown-runtime-B8BYMn-z.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import"./rolldown-runtime-B8BYMn-z.js";import{_ as e,d as t,m as n,r,u as i}from"./vendor-NJP34MHU.js";import{i as a}from"./translator-DLDFsUlE.js";import{t as o}from"./preload-helper-VRuDKI9K.js";import{A as s,B as c,D as l,E as u,H as d,I as f,L as p,M as m,N as h,O as g,P as _,U as v,V as y,_ as b,a as x,b as ee,c as te,d as ne,f as S,g as C,i as w,j as T,k as E,l as D,m as O,o as k,p as A,s as j,v as M,w as N,x as P,z as F}from"./frontend-Qq5hBH0U.js";import{n as I}from"./dialog-DSLu1Bbo.js";import{i as L}from"./xml-DTgZ-B-l.js";import{a as R,i as z,t as B}from"./httpHost-DBSjdVth.js";import{n as V}from"./bridgeInstance-qzSInqLW.js";function codeNamesOf(e){let t={};for(let{kind:n,value:r}of e)t[n]=[...t[n]??[],r];return t}var re=`Penstock`,H=/<([a-zA-Z0-9_.-]+:)?definitions\b(?:[^>"']|"[^"]*"|'[^']*')*>/;function setAttribute(e,t,n){let r=e.replace(RegExp(`\\s${t}\\s*=\\s*(?:"[^"]*"|'[^']*')`),``);return n===null?r:r.replace(/(\/?)>$/,(e,r)=>` ${t}="${L(n)}"${r}>`)}function stampExporter(e,t){let n=H.exec(e);if(!n)return e;let r=n[0],i=setAttribute(setAttribute(r,`exporterVersion`,t||null),`exporter`,re);return e.slice(0,n.index)+i+e.slice(n.index+r.length)}function claimsOf(e){if(!e||typeof e!=`object`||e.v!==1||e.tier!==`pro`&&e.tier!==`team`||e.source!==`activation`&&e.source!==`trial`&&e.source!==`pipeline`||typeof e.machine!=`string`||!Number.isFinite(e.iat)||!Number.isFinite(e.exp))return null;for(let t of[`keyId`,`activationId`])if(e[t]!==void 0&&typeof e[t]!=`string`)return null;return e.trialStart!==void 0&&!Number.isFinite(e.trialStart)?null:e}var U=[{id:`k-2026-10`,key:`oyaZ47qT9fgTkP_iQDb-rscHvyUIY4BwAWAbNwmZnIc`}],W=864e5,G=/^[A-Za-z0-9_-]+$/,K=32,q=64;function decode(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(Math.ceil(e.length/4)*4,`=`);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}async function nativeVerify(e,t,n){try{let r=await crypto.subtle.importKey(`raw`,e,`Ed25519`,!1,[`verify`]);return await crypto.subtle.verify(`Ed25519`,r,n,t)}catch(e){return e instanceof DOMException&&e.name===`NotSupportedError`&&null}}async function scriptVerify(e,t,n){try{let{verifyAsync:r}=await o(async()=>{let{verifyAsync:e}=await import(`./ed25519-DTYhEcYX.js`);return{verifyAsync:e}},__vite__mapDeps([0,1]),import.meta.url);return await r(n,t,e)}catch{return!1}}async function verifyEd25519(e,t,n,r=`native`){if(e.length!==K||n.length!==q)return!1;if(r===`native`){let r=await nativeVerify(new Uint8Array(e),new Uint8Array(t),new Uint8Array(n));if(r!==null)return r}return scriptVerify(e,t,n)}async function verifyLicenseToken(e,t){if(typeof e!=`string`)return{status:`invalid`,reason:`malformed`};let n=e.split(`.`);if(n.length!==2||!G.test(n[0])||!G.test(n[1]))return{status:`invalid`,reason:`malformed`};let r;try{r=decode(n[1])}catch{return{status:`invalid`,reason:`malformed`}}let i=new TextEncoder().encode(n[0]),a=!1;for(let e of t.keys??U){let n;try{n=decode(e.key)}catch{continue}if(await verifyEd25519(n,i,r,t.engine)){a=!0;break}}if(!a)return{status:`invalid`,reason:`signature`};let o;try{o=claimsOf(JSON.parse(new TextDecoder().decode(decode(n[0]))))}catch{o=null}return o?o.machine===t.machine?o.iat*1e3>t.now+W?{status:`invalid`,reason:`future`}:!Number.isFinite(t.now)||t.now>=o.exp*1e3?{status:`expired`,claims:o}:{status:`valid`,claims:o}:{status:`invalid`,reason:`machine`}:{status:`invalid`,reason:`malformed`}}async function tokenTier(e,t,n={}){if(!e||!t)return`FREE`;let r=await verifyLicenseToken(e,{machine:t,now:n.now??Date.now(),keys:n.keys});return r.status!==`valid`||r.claims.source===`pipeline`?`FREE`:r.claims.tier===`team`?`TEAM`:`PRO`}async function verifiedLicense(e,t={}){return e?{tier:await tokenTier(e.token,e.machine,t),detail:e.detail,trialDaysLeft:e.trialDaysLeft}:null}var AgentsFailure=class extends Error{status;constructor(e,t){super(e),this.status=t}};function statusOf(e){return e?.response?.status??null}async function answered(e){try{return await e}catch(e){throw new AgentsFailure(await R(e),statusOf(e))}}function reasonOf(e){return e?{key:e.key,params:e.params??{},detail:e.detail}:null}function entryOf(e){return{id:e.id,name:e.name,version:e.version??null,description:e.description,website:e.website??null,repository:e.repository??null,license:e.license??null,icon:e.icon??null,source:e.source,installed:e.installed,installedVia:e.installedVia??null,installedVersion:e.installedVersion??null,updateAvailable:e.updateAvailable,enabled:e.enabled,how:e.how,blocked:e.blocked??null,install:e.install??null,job:e.job?{kind:e.job.kind,state:e.job.state,percent:e.job.percent??null,error:reasonOf(e.job.error)}:null,options:e.options?{readAt:e.options.readAt,options:e.options.options.map(e=>({id:e.id,name:e.name,category:e.category??null,current:e.current,values:e.values.map(e=>({id:e.id,name:e.name}))}))}:null,chosen:e.chosen??{}}}function catalogOf(e){return{agents:e.agents.map(entryOf),updated:e.updated??null,source:e.source,stale:e.stale,node:e.node,uv:e.uv,busy:e.busy,refreshError:reasonOf(e.refreshError)}}function httpAgentsHost(e){return{catalog:async()=>catalogOf(await answered(e.getAgentCatalog())),refresh:async()=>catalogOf(await answered(e.refreshAgentCatalog())),install:async t=>entryOf(await answered(e.installAgent({agentId:t}))),uninstall:async t=>entryOf(await answered(e.uninstallAgent({agentId:t}))),turn:async(t,n)=>entryOf(await answered(e.turnAgent({agentId:t,turnAgentRequest:{enabled:n}}))),refreshModels:async t=>entryOf(await answered(e.refreshAgentModels({agentId:t}))),choose:async(t,n,r)=>entryOf(await answered(e.chooseAgentOption({agentId:t,chooseAgentOptionRequest:{category:n,value:r}}))),openSettings:async()=>{try{return await e.openAgentSettings(),!0}catch(e){if(statusOf(e)===501)return!1;throw new AgentsFailure(await R(e),statusOf(e))}}}}function coreTypesOf(e){return(e??[]).map(e=>{let t=e.kind===S.ENUM?`enum`:`class`;return{name:e.name,kind:t,fields:e.fields.map(e=>({name:e.name,type:e.type??null,serialised:e.serialised})),constants:e.constants,extends:e._extends??null,open:e.open}})}function inputOf(e){return{name:e.name,type:e.type,...e.choices?{choices:e.choices}:{}}}function workerOf(e){return{binding:e.binding,value:e.value,engine:e.engine,source:e.source,name:e.name,className:e.className??null,packageName:e.packageName??null,inputs:e.inputs.map(inputOf),outputs:e.outputs.map(inputOf),errors:e.errors,file:e.file,line:e.line,offset:e.offset,end:e.end}}function classOf(e){return{path:e.path,offset:e.offset,end:e.end,line:e.line,className:e.className,packageName:e.packageName??null,shape:e.shape,reads:e.reads,writes:e.writes,errors:e.errors.map(e=>({code:e.code,...e.message===void 0?{}:{message:e.message}})),usesBusinessKey:e.usesBusinessKey,usesEngineServices:e.usesEngineServices,readsAllVariables:e.readsAllVariables}}function codeStructureOf(e){return{workers:e.workers.map(workerOf),classes:e.classes.map(classOf),camunda7Imports:e.camunda7Imports.map(e=>({path:e.path,names:e.names}))}}var SaveRefused=class extends Error{name=`SaveRefused`};function isSaveRefused(e){return e instanceof Error&&e.name===`SaveRefused`}var J=250,Y=18e5/J;function waitFor(e,t){return new Promise(n=>{if(t?.aborted){n();return}let finish=()=>{clearTimeout(r),t?.removeEventListener(`abort`,finish),n()},r=setTimeout(finish,e);t?.addEventListener(`abort`,finish,{once:!0})})}async function awaitChoice(e,t,n=e=>waitFor(J,e),r){let i=e??{answer:`CANCEL`};for(let e=0;i?.answer===`PENDING`&&e<7200&&(await n(r),!r?.aborted);e+=1)i=await t()??{answer:`CANCEL`};return i?.answer===`PENDING`&&console.error(r?.aborted?a(`app.platform.theConversionPreviewWasGiven`):a(`app.platform.theConversionPreviewStayedUnanswered`,{seconds:Math.round(Y*J/1e3)})),i?.answer===`CONVERT`&&i.folder?{choice:`CONVERT`,folder:i.folder,replace:i.replace===!0}:{choice:`CANCEL`,folder:``,replace:!1}}var X=/\.(bpmn(\.xml|20\.xml)?|dmn|form)$/i;function baseOf(e){return((e??``).split(/[\\/]/).pop()??``).replace(X,``)}function exportFileName(e,t,n){let r=(t??``).replace(/^\.+/,``),i=baseOf(e)||n||`untitled`;return r?`${i}.${r}`:i}var Z={ERROR:`error`,INFO:`info`},ie=15e3;function Notification({id:e,message:n,type:o,action:s,onClose:c}){i(()=>{let t=setTimeout(()=>{c(e)},ie);return()=>clearTimeout(t)},[e,c]);let l=t(t=>{t?.preventDefault?.(),c(e)},[e,c]);return r(`div`,{className:`notification ${o}`,role:o===Z.ERROR?`alert`:`status`,"aria-live":o===Z.ERROR?`assertive`:`polite`,children:[r(`span`,{className:`notification-message`,children:n}),s&&r(`button`,{className:`notification-action`,onClick:()=>{try{s.run()}catch(e){console.error(e)}c(e)},children:s.label}),r(`button`,{className:`notification-close`,onClick:l,"aria-label":a(`app.notifications.closeNotification`),title:a(`app.common.close`),children:r(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:r(`path`,{d:`M4 4l8 8M12 4l-8 8`})})})]})}function NotificationContainer({notifications:e,onClose:t}){return r(`div`,{className:`notification-container`,children:(Array.isArray(e)?e:[]).map(e=>r(Notification,{id:e.id,message:e.message,action:e.action,type:e.type,onClose:t},e.id))})}var ae=5,NotificationManager=class{container=null;notifications=[];constructor(){this.initContainer()}initContainer(){if(typeof document>`u`)return;let e=document.getElementById(`notification-root`);e?this.container=e:document.body&&(this.container=document.createElement(`div`),this.container.id=`notification-root`,document.body.appendChild(this.container))}show(e,t=Z.INFO,n){let r=typeof e==`string`?e:String(e??``),i=`notification-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,a={id:i,message:r,type:t,timestamp:Date.now(),action:n};return this.notifications.length>=ae&&this.notifications.shift(),this.notifications=[...this.notifications,a],this.renderNotifications(),i}success(e){return this.show(e,Z.INFO)}error(e,t){return this.show(e,Z.ERROR,t)}info(e,t){return this.show(e,Z.INFO,t)}hide=e=>{this.notifications=this.notifications.filter(t=>t.id!==e),this.renderNotifications()};clear(){this.notifications=[],this.renderNotifications()}renderNotifications(){if(this.container||this.initContainer(),this.container)try{n(e(NotificationContainer,{notifications:this.notifications,onClose:this.hide}),this.container)}catch{}}},Q=new NotificationManager,oe={preDeploy:l.PRE_DEPLOY,postDeploy:l.POST_DEPLOY},$=400,HttpPlatformBridge=class{configApi;scriptApi;clipboardApi;fileChooserApi;fileSaverApi;fileReaderApi;previewApi;diffApi;deploymentApi;navigationApi;projectApi;viewApi;hostApi;licenseApi;themeApi;preferencesApi;connectorsApi;actionsApi;agentApi;actionsRefused=!1;config;constructor(e,t){let n=new d({basePath:e??void 0??`http://localhost:8080`,headers:{"Content-Type":`application/json`},fetchApi:t});this.config=n,this.configApi=new p(n),this.scriptApi=new D(n),this.clipboardApi=new F(n),this.fileChooserApi=new T(n),this.fileSaverApi=new E(n),this.fileReaderApi=new s(n),this.previewApi=new b(n),this.diffApi=new h(n),this.deploymentApi=new _(n),this.navigationApi=new ee(n),this.projectApi=new ne(n),this.viewApi=new x(n),this.hostApi=new N(n),this.licenseApi=new P(n),this.themeApi=new te(n),this.preferencesApi=new M(n),this.connectorsApi=new f(n),this.actionsApi=new y(n),this.agentApi=new c(n)}async openDiff(e){await this.diffApi.openDiff({openDiffRequest:{title:e.title,path:e.path,before:e.before??``,after:e.after}})}agentHost(){return B(this.agentApi)}agentsHost(){return httpAgentsHost(this.agentApi)}async getConfig(){try{return await this.configApi.getConfig()}catch(e){return console.error(`Failed to get config:`,e),null}}async getPolicy(e){try{return await this.configApi.getPolicy({resource:e})}catch(e){return console.error(`Failed to get the policy:`,e),null}}async getDrift(e,t){return this.configApi.getDrift({environment:e,against:t})}async getPreviewDiff(){return this.previewApi.getPreviewDiff()}async getDeployTargets(e){try{let t=await this.deploymentApi.getDeployTargets({resource:e});return{active:t?.active??null,targets:Array.isArray(t?.targets)?t.targets:[]}}catch{return{active:null,targets:[]}}}async getDeploymentSettings(e){return this.deploymentApi.getDeploymentSettings({profile:e??void 0})}async saveDeploymentSettings(e){return this.deploymentApi.saveDeploymentSettings({deploymentSettings:e})}async saveConfig(e){let t={engine:e.engine,scriptType:e.scriptType,elementTemplates:e.elementTemplates??[]};await this.configApi.saveConfig({configSaveRequest:t})}getBpmnXml(){return window.appConfig?.bpmnXml??null}getBpmnFilePath(){return window.appConfig?.bpmnFilePath??null}async saveBpmnXml(e){let t=window.appConfig?.bpmnFilePath;if(!t)throw Error(`BPMN file path not configured`);let n=window.appConfig?.pluginVersion;try{await this.fileSaverApi.saveFile({fileSaveRequest:{path:t,content:stampExporter(e,n??``),isBase64:!1}})}catch(e){throw await refusalOf(e)??e}}async getClipboard(){try{return(await this.clipboardApi.getClipboard())?.text??null}catch(e){return console.error(`Failed to get clipboard:`,e),null}}async readClipboardNow(){return(await this.clipboardApi.getClipboard())?.text||null}async saveClipboard(e){if(e)try{await this.clipboardApi.saveClipboard({clipboardDto:{text:e}})}catch(e){console.error(`Failed to save clipboard:`,e)}}async saveClipboardImage(e){if(!e)return!1;try{return await this.clipboardApi.saveClipboardImage({clipboardImageDto:{png:e}}),!0}catch(e){return console.error(`Failed to save the image to the clipboard:`,e),!1}}async navigateToClass(e,t=`JAVA_CLASS`){if(!e)return!1;try{return await this.navigationApi.navigateToClass({classNavigationRequest:{reference:e,kind:t}}),!0}catch(e){return console.error(`Failed to open the class:`,e),!1}}async getProjectFiles(){try{let e=await this.projectApi.getProjectFiles();return{root:e?.root??``,files:e?.files??[],reports:e?.reports??[],sources:e?.sources,testCases:e?.testCases,templates:e?.templates,connections:e?.connections}}catch{return{root:``,files:[],reports:[]}}}async findWorkerVariables(){try{let e=await this.projectApi.findWorkerVariables(),t=e?.variableChecks;return{variables:e?.variables??[],fetches:e?.fetches??[],implicitJobTypes:e?.implicitJobTypes??[],types:coreTypesOf(e?.types),variableChecks:t&&{check:t.check,inputs:t.inputs,entitled:t.entitled},clientFacts:e?.clientFacts}}catch(e){return console.error(`Penstock could not read the variables the code writes:`,e),{variables:[],fetches:[],implicitJobTypes:[]}}}async findCode(e,t=!1,n=!1){try{let r=await this.projectApi.findCode({codeQuery:{subjects:e.map(e=>({kind:C[e.kind],value:e.value})),names:t,facts:n}}),i=new Map,a=new Map;return(r?.results??[]).forEach(e=>{let t=`${e.kind}:${e.value}`;i.set(t,(e?.links??[]).map(e=>({handle:e.handle,label:e.label,icon:e.icon,implements:e.implementation,test:e.test,declaration:e.declaration}))),a.set(t,(e.places??[]).map(e=>({file:e.path,line:e.line,offset:e.offset})))}),{precise:r?.precise??!1,links:i,places:a,names:t?codeNamesOf(r?.names??[]):void 0,structure:r?.facts?codeStructureOf(r.facts):void 0,clientFacts:r?.clientFacts}}catch(e){return console.error(`Penstock could not find the code:`,e),{precise:!1,links:new Map}}}async publishCodeLenses(e){try{let t=(e.workers??[]).map(e=>({...e,kind:C[e.kind]}));await this.viewApi.publishCodeLenses({codeLenses:{workers:t,processes:e.processes??[]}})}catch(e){console.warn(`Failed to publish code lenses:`,e)}}async publishToolWindow(e,t){try{let action=e=>({...e,keys:e.keys&&j[e.keys]}),node=e=>({...e,expand:e.expand&&k[e.expand],actions:e.actions?.map(action),children:e.children?.map(node)});await this.viewApi.publishToolWindow({toolWindowModel:{roots:(e??[]).map(node),toolbar:(t??[]).map(action)}})}catch(e){console.warn(`Failed to publish tool window:`,e)}}async publishActions(e){try{await this.actionsApi.publishActions({publishedActions:{actions:e}})}catch(e){this.actionsRefused||console.warn(`The host did not take the list of actions:`,e),this.actionsRefused=!0}}onRunAction(e){let t=window;return t.penstockRunAction=e,()=>{t.penstockRunAction===e&&delete t.penstockRunAction}}async getDebugState(){try{return(await this.hostApi.getDebugState())?.positions??[]}catch{return[]}}async revealElement(e,t){try{await this.hostApi.revealElement({revealRequest:{path:e,elementId:t}})}catch(e){console.warn(`Failed to reveal element:`,e)}}async openAsText(e,t){try{await this.hostApi.revealElement({revealRequest:{path:e,text:!0,line:t}})}catch(e){console.warn(`Failed to open as text:`,e)}}async openCode(e,t,n){try{await this.hostApi.openCode({codeHandles:{handles:e,title:t,usages:n}})}catch(e){console.warn(`Failed to open code:`,e)}}async runTestHandles(e,t,n){try{await this.hostApi.runTestHandles({testHandles:{handles:e,title:t,debug:n}})}catch(e){console.warn(`Failed to run test handles:`,e)}}async askEngine(e,t,n,r){try{let i=await this.hostApi.askEngine({engineRequest:{profile:e,resource:n,method:g[t.method],path:t.path,body:t.body,parts:t.parts,testRun:r}});return{status:i.status,body:i.body}}catch(e){return{status:0,body:await R(e)}}}hookRunsInBackground=!0;async runHook(e,t,n,r,i){try{let a=await this.hostApi.runHook({hookRequest:{stage:oe[e],resources:t,profile:n,resource:r}});return await this.untilHookEnds(e,a.run,i)}catch(t){return{ok:!1,lines:[`hook ${e}: ${await R(t)}`]}}}async untilHookEnds(e,t,n){for(;;){if(n?.signal?.aborted)return await this.hostApi.cancelHook({run:t}).catch(()=>void 0),{ok:!1,lines:[a(`app.deploy.hookCancelled`,{stage:e})]};let r=await this.hostApi.hookState({run:t});if(r.status===u.RUNNING)n?.onLines?.(r.lines),await new Promise(e=>setTimeout(e,$));else return{ok:r.ok,lines:r.lines}}}async recordDeployment(e,t){await this.hostApi.recordDeployment({deploymentRecord:{profile:e,resources:t}})}async confirmWithUser(e){try{return(await this.hostApi.confirmWithUser({hostQuestion:e})).accepted}catch(e){return console.error(`Penstock could not ask the host to confirm:`,e),!1}}async getDialogButtonOrder(){try{return I((await this.hostApi.getDialogButtonOrder()).primary)}catch(e){return z(e)||console.error(`Failed to read the dialog button order:`,e),I(null)}}async previewMigration(e,t){return awaitChoice(await this.hostApi.previewMigration({migrationPreview:e}),async()=>this.hostApi.getMigrationAnswer(),void 0,t)}async sendTestOutput(e,t,n){try{await this.hostApi.sendTestOutput({testOutput:{run:e,lines:t,finished:n}})}catch(e){console.warn(`Failed to send test output:`,e)}}async saveRunTrace(e,t,n){try{return(await this.hostApi.saveRunTrace({runTrace:{runId:e,name:t,content:n}}))?.path??``}catch(e){throw console.warn(`Failed to save run trace:`,e),e}}async openExternalLink(e){try{await this.hostApi.openExternalLink({externalLink:{url:e}})}catch(e){console.warn(`Failed to open external link:`,e)}}async notifyUser(e,t){try{await this.hostApi.notifyUser({hostMessage:{text:e,error:t}})}catch(n){console.warn(`Failed to notify user:`,n),t?Q.error(e):Q.info(e)}}async offerLinkedRename(e){try{let t=await this.hostApi.offerLinkedRename({linkedRenameOffer:e});return{places:t?.places??0,offered:t?.offered??!1,summary:t?.summary,detail:t?.detail}}catch{return{places:0,offered:!1}}}async reportSnapshot(e){try{let t=(e??[]).map(e=>({...e,kind:C[e.kind]}));await this.projectApi.reportSnapshot({projectSnapshot:{targets:t}})}catch(e){console.warn(`Failed to report snapshot:`,e)}}async reportFindings(e){try{await this.projectApi.reportFindings({projectFindings:{checked:(e??[]).map(e=>({path:e.path,stamp:e.stamp,findings:(e.findings??[]).map(e=>({...e,family:se[e.family],severity:e.severity===`error`?O.ERROR:O.WARNING}))}))}})}catch(e){console.warn(`Failed to report findings:`,e)}}async getLicense(){try{let e=await this.licenseApi.getLicense(),t=await verifiedLicense(e);return t&&{...e,tier:t.tier,token:null}}catch(e){return console.error(`Failed to read the licence:`,e),null}}async getTheme(){try{return await this.themeApi.getTheme()}catch(e){return console.error(`Failed to read the look and feel's colours:`,e),null}}async getPreferences(){try{return await this.preferencesApi.getPreferences()}catch(e){return console.error(`Failed to read the preferences:`,e),null}}async savePreferences(e){try{await this.preferencesApi.savePreferences({preferences:e})}catch(e){console.error(`Failed to save the preferences:`,e)}}async requestFeature(e){try{let t=await this.licenseApi.requestFeature({featureRequest:{feature:e}});if(t.allowed!==!0)return!1;let n=await this.licenseApi.getLicense();return await tokenTier(t.token,n.machine)!==`FREE`}catch(e){return console.error(`Failed to ask for a feature:`,e),!1}}async showLicenceOffer(e,t){try{return(await this.licenseApi.showLicenceOffer({licenceOfferRequest:{reason:e,surface:t}})).opened===!0}catch(e){return console.error(`Failed to open the licence screen:`,e),!1}}async openScriptFile(e,t,n,r,i,a){try{let o={scriptFormat:e,scriptValue:t,slot:n,title:r,variables:i,diagramPath:a};await this.scriptApi.createScript({scriptCreateRequest:o})}catch(e){console.error(`Failed to open script file:`,e)}}async reportScriptSlot(e,t){try{await this.scriptApi.reportScriptSlot({scriptSlotValue:{slot:e,value:t}})}catch(e){console.error(`Failed to report the script to its tab:`,e)}}async readFile(e){return(await this.fileReaderApi.readFile({fileReadRequest:{path:e}})).content}async readFileBytes(e){return base64ToUint8((await this.fileReaderApi.readFile({fileReadRequest:{path:e,asBase64:!0}})).content)}async readFileIfPresent(e){try{return await this.readFile(e)}catch(e){if(e instanceof v&&e.response.status===404)return null;throw e}}async createProjectFiles(e,t){await this.fileSaverApi.createProjectFiles({createProjectFilesRequest:{root:e,files:t}})}async saveFile(e,t,n){try{await this.fileSaverApi.saveFile({fileSaveRequest:{path:e,content:t,isBase64:n?.isBase64??!1}})}catch(e){throw Error(await R(e))}}async chooseFile(e,t){try{let n={title:t?.title??a(`app.files.saveTitle`,{extension:e.toUpperCase()}),description:t?.description,extension:e,mode:t?.mode===`open`?m.OPEN:m.SAVE,defaultFileName:t?.defaultFileName??exportFileName(this.getBpmnFilePath(),e,a(`app.export.untitledFile`)),defaultDirectory:t?.defaultDirectory,selectFiles:t?.selectFiles,selectFolders:t?.selectFolders,multiSelect:t?.multiSelect,recursive:t?.recursive},r=await this.fileChooserApi.chooseFile({fileChooserRequest:n});return r?.success&&r.paths?.length?r.paths[0]:null}catch(e){return console.error(`Failed to choose file:`,e),null}}async exportSvg(e){try{let t=await this.chooseFile(`svg`,{title:a(`app.files.exportAs`,{format:`SVG`}),mode:`save`});t&&await this.saveFile(t,e)}catch(e){throw console.error(`Failed to export SVG:`,e),e}}async exportPng(e){try{let t=await this.chooseFile(`png`,{title:a(`app.files.exportAs`,{format:`PNG`}),mode:`save`});if(t){let n=await blobToBase64(e);await this.saveFile(t,n,{isBase64:!0})}}catch(e){throw console.error(`Failed to export PNG:`,e),e}}async exportPdf(e){try{let t=await this.chooseFile(`pdf`,{title:a(`app.files.exportAs`,{format:`PDF`}),mode:`save`});if(t){let n=await blobToBase64(e);await this.saveFile(t,n,{isBase64:!0})}}catch(e){throw console.error(`Failed to export PDF:`,e),e}}async fetchConnectorUrl(e){try{let t=await this.connectorsApi.fetchConnectorUrl({connectorFetchRequest:{url:e}});return{status:t?.status??500,body:base64ToUint8(t?.body),failure:t?.failure??null}}catch(e){return{status:500,body:new Uint8Array,failure:await R(e)}}}async connectorFile(e,t,n,r){try{let i=await this.connectorsApi.connectorFile({connectorFileRequest:{op:e,path:t,content:n==null?void 0:uint8ToBase64(n),dest:r}});return{content:i?.content==null?null:base64ToUint8(i.content),entries:i?.entries??null,pathExists:i?.pathExists??null}}catch(e){throw Error(await connectorFailure(e))}}dispose(){}};function uint8ToBase64(e){if(!e||e.length===0)return``;let t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode(...e.subarray(n,n+32768)));return btoa(t.join(``))}function base64ToUint8(e){if(!e)return new Uint8Array;try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch{return new Uint8Array}}async function refusalOf(e){if(!(e instanceof v)||e.response.status!==400)return null;let t=await e.response.json().catch(()=>null);return typeof t?.message==`string`&&t.message!==``?new SaveRefused(t.message):null}async function connectorFailure(e){if(e instanceof v){let t=await e.response.json().catch(()=>null);return typeof t?.message==`string`?t.message:a(`app.files.connectorsFailed`,{status:e.response.status})}return e instanceof Error?e.message:String(e)}function blobToBase64(e){return new Promise((t,n)=>{if(!e){n(Error(`Nothing to save`));return}let r=new FileReader;r.onerror=()=>n(r.error??Error(`Could not read the picture`)),r.onloadend=()=>{if(r.error||typeof r.result!=`string`)return;let e=r.result.split(`,`);t(e.length>1?e[1]:e[0])};try{r.readAsDataURL(e)}catch(e){n(e)}})}var se={drawing:A.DRAWING,bpmnlint:A.BPMNLINT,compat:A.COMPAT,engine:A.ENGINE,table:A.TABLE,form:A.FORM,file:A.FILE},ce=new Set([`compare`,`codeBridge`]);function offeredByDefault(e){return!ce.has(e)}function hostSupports(e,t){return e?.supports?e.supports(t):offeredByDefault(t)}function isHostResponse(e){let t=e;return typeof t?.id==`number`&&typeof t.status==`number`}function hostFetch(e,t){let n=new Map,r=0,i=!1,listener=e=>{isHostResponse(e.data)&&n.get(e.data.id)?.answer(e.data)};return t.addEventListener(`message`,listener),{fetch:(t,o)=>new Promise((s,c)=>{if(i){c(Error(a(`app.platform.theHostConnectionIsClosed`)));return}let l=++r,u=o?.signal??void 0;if(u?.aborted){c(new DOMException(a(`app.platform.theRequestWasCancelled`),`AbortError`));return}let d;try{d=new URL(t,`http://host`)}catch{c(Error(a(`app.platform.theRequestWasCancelled`)));return}let onAbort=()=>{n.delete(l);try{e.postMessage({cancel:l})}catch{}c(new DOMException(a(`app.platform.theRequestWasCancelled`),`AbortError`))};u?.addEventListener(`abort`,onAbort,{once:!0}),n.set(l,{answer:e=>{n.delete(l),u?.removeEventListener(`abort`,onAbort),s(new Response(e.body,{status:e.status}))},close:()=>{u?.removeEventListener(`abort`,onAbort),c(Error(a(`app.platform.theHostConnectionIsClosed`)))}});let f={};try{f=Object.fromEntries(new Headers(o?.headers).entries())}catch{}try{e.postMessage({id:l,method:o?.method??`GET`,path:d.pathname,query:d.search,headers:f,body:typeof o?.body==`string`?o.body:null})}catch(e){n.delete(l),c(e instanceof Error?e:Error(String(e)))}}),dispose:()=>{i=!0,t.removeEventListener(`message`,listener);let e=[...n.values()];n.clear(),e.forEach(e=>e.close())}}}var le=new Set([`vscode-light`,`vscode-high-contrast-light`]);function themeOf(e){if(!e)return`dark`;let t=e.dataset?.vscodeThemeKind;return t?le.has(t)?`light`:`dark`:e.classList.contains(`vscode-light`)||e.classList.contains(`vscode-high-contrast-light`)?`light`:`dark`}function signatureOf(e){let t=e.documentElement.style;return[e.body?.dataset?.vscodeThemeKind??``,e.body?.dataset?.vscodeThemeId??``,t.getPropertyValue(`--vscode-editor-background`),t.getPropertyValue(`--vscode-editor-foreground`),t.getPropertyValue(`--vscode-focusBorder`)].join(`|`)}function watchHostTheme(e,t,n,r=50){let i=signatureOf(e),a,settle=()=>{a=void 0;let t=signatureOf(e);t!==i&&(i=t,n(themeOf(e.body)))},o=new t(()=>{a!==void 0&&clearTimeout(a),a=setTimeout(settle,r)});return e.body&&o.observe(e.body,{attributes:!0,attributeFilter:[`class`,`data-vscode-theme-kind`,`data-vscode-theme-id`]}),o.observe(e.documentElement,{attributes:!0,attributeFilter:[`style`]}),()=>{a!==void 0&&clearTimeout(a),o.disconnect()}}function resolveVsCodeApi(){let e=typeof window<`u`?window:globalThis;return e.__vscodeApi?e.__vscodeApi:typeof e.acquireVsCodeApi==`function`?(e.__vscodeApi=e.acquireVsCodeApi(),e.__vscodeApi):typeof acquireVsCodeApi==`function`?(e.__vscodeApi=acquireVsCodeApi(),e.__vscodeApi):{postMessage:()=>{},getState:()=>void 0,setState:()=>{}}}var ue=1e3,de=new Set([`editorTheme`]),VscodePlatformBridge=class extends HttpPlatformBridge{transport;vscodeApi;stopController=new AbortController;stopWatchingTheme=null;documentListeners=new Set;actionHandlers=new Set;runTraceListeners=new Set;lastSent=null;constructor(e,t){let n=hostFetch(e??resolveVsCodeApi(),t??(typeof window<`u`?window:globalThis));super(`http://host`,n.fetch),this.transport=n,this.vscodeApi=new w(this.config),typeof document<`u`&&typeof MutationObserver<`u`&&(this.stopWatchingTheme=watchHostTheme(document,MutationObserver,e=>{window.setTheme?.(e)})),this.pumpEvents()}async pumpEvents(){let e=this.stopController.signal;for(;!e.aborted;)try{this.handleEvent(await this.vscodeApi.nextHostEvent({signal:e}))}catch{if(e.aborted)return;await new Promise(e=>setTimeout(e,ue))}}supports(e){return!de.has(e)&&offeredByDefault(e)}async saveClipboardImage(e){if(!e)return!1;let t=typeof navigator<`u`?navigator.clipboard:void 0;if(!t||typeof ClipboardItem>`u`)return!1;try{let n=Uint8Array.from(atob(e),e=>e.charCodeAt(0));return await t.write([new ClipboardItem({"image/png":new Blob([n],{type:`image/png`})})]),!0}catch(e){return console.error(`Failed to put the image on the clipboard:`,e),!1}}handleEvent(e){if(!e||!e.type)return;let t=typeof window<`u`?window:globalThis;switch(e.type){case`revealElement`:typeof t.revealElement==`function`?t.revealElement(e.elementId):t.pendingReveal=e.elementId;return;case`documentReload`:if(e.xml===this.lastSent)return;this.lastSent=null,t.appConfig&&(t.appConfig.bpmnXml=e.xml),this.documentListeners.forEach(t=>{try{t(e.xml)}catch(e){console.error(`Document listener error:`,e)}});return;case`scriptSlotChanged`:try{t.scriptSlotChanged?.(e.slot,e.value)}catch{}return;case`scriptTabsChanged`:try{t.scriptTabsChanged?.(e.slots)}catch{}return;case`debugPosition`:typeof t.showDebugPosition==`function`?t.showDebugPosition(e):t.pendingDebug=e;return;case`debugCleared`:t.pendingDebug=void 0,typeof t.clearDebugPosition==`function`&&t.clearDebugPosition();return;case`codeChanged`:try{typeof t.codeChanged==`function`&&t.codeChanged()}catch{}return;case`runAction`:this.actionHandlers.forEach(t=>{try{t(e.id)}catch(e){console.error(`Action handler error:`,e)}});return;case`openRunTrace`:this.runTraceListeners.forEach(t=>{try{t(e.path)}catch(e){console.error(`Run trace listener error:`,e)}});return;case`projectChanged`:try{t.coverageChanged?.()}catch{}return;case`openChat`:typeof t.penstockOpenChat==`function`?t.penstockOpenChat(e.chatId):t.pendingOpenChat=e.chatId;return}}onDocumentChanged(e){return this.documentListeners.add(e),()=>this.documentListeners.delete(e)}onRunTrace(e){return this.runTraceListeners.add(e),()=>this.runTraceListeners.delete(e)}onRunAction(e){return this.actionHandlers.add(e),()=>this.actionHandlers.delete(e)}async undo(){await this.vscodeApi.undo()}async redo(){await this.vscodeApi.redo()}async saveBpmnXml(e){let t=typeof window<`u`?window:globalThis;t.appConfig&&(t.appConfig.bpmnXml=e),this.lastSent=e,await this.vscodeApi.saveDocumentText({documentText:{xml:e}})}async getTheme(){return null}async reportFindings(){}dispose(){try{this.stopController.abort()}catch{}try{this.stopWatchingTheme?.()}catch{}this.stopWatchingTheme=null;try{this.transport.dispose()}catch{}this.documentListeners.clear(),this.actionHandlers.clear(),this.runTraceListeners.clear()}};function runsInVsCode(){if(typeof window>`u`)return!1;let e=window;return typeof e.acquireVsCodeApi==`function`||!!e.__vscodeApi}V(()=>runsInVsCode()?new VscodePlatformBridge:new HttpPlatformBridge);export{isSaveRefused as a,exportFileName as i,HttpPlatformBridge as n,verifiedLicense as o,Q as r,stampExporter as s,hostSupports as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-B8BYMn-z.js";import{i as e}from"./translator-DLDFsUlE.js";import{n as t}from"./engines-DhO6OW1S.js";import{n,t as r}from"./dist-DojzF5q2.js";import{n as i,r as a,t as o}from"./syntax-DW10Wzg4.js";var s=50,c=100,l=200,Refused=class extends Error{status;constructor(e,t){super(e),this.status=t}};function parsed(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function detailOf(e){let t=parsed(e.body),n=[t?.detail,t?.title,t?.message].find(e=>typeof e==`string`&&e.trim());return typeof n==`string`?n:null}function reasonOf(t,n){return detailOf(t)||(t.status===401||t.status===403?`${n}: ${e(`app.evaluate.credentialsMayNotAllow`)}`:t.status===0?`${n}: ${t.body}`:e(`app.evaluate.engineAnswered`,{what:n,status:t.status}))}async function call(t,n,r,i){let a=await t(n);if(a.status===404&&i)throw new Refused(e(`app.evaluate.needsThatVersion`,{what:r,version:i}),404);if(!succeeded(a))throw new Refused(reasonOf(a,r),a.status);return parsed(a.body)}function post(e,t){return{method:`POST`,path:e,body:JSON.stringify(t)}}function listOf(e){return Array.isArray(e)?e:[]}function recordOf(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function succeeded(e){return e.status>=200&&e.status<300}function key(e){return e==null?``:String(e)}function text(e){return typeof e==`string`&&e.trim()?e:null}function isEight(e){return e===`CAMUNDA_8`}function evaluationSupport(e){return isEight(e)?{evaluation:!0,names:!0}:{evaluation:!1,names:!1}}async function definitionId(t,n){let r=await n({method:`GET`,path:`/process-definition/key/${encodeURIComponent(t)}`});if(r.status===404)return null;if(!succeeded(r))throw new Refused(reasonOf(r,e(`app.evaluate.processDefinitionNotReadable`,{process:t})),r.status);return text(parsed(r.body)?.id)??(typeof parsed(r.body)?.id==`number`?key(parsed(r.body).id):null)}async function listInstances(t,n,r){if(isEight(t))return listOf((await call(r,post(`/process-instances/search`,{filter:{processDefinitionKey:n,state:`ACTIVE`},page:{limit:s}}),e(`app.evaluate.instancesNotReadable`,{process:n})))?.items).filter(e=>e?.processInstanceKey).map(e=>({key:key(e.processInstanceKey),state:key(e.state)||`ACTIVE`,started:text(e.startDate),businessKey:text(e.businessId)??text(e.businessKey)}));let i=await definitionId(n,r);if(!i)return[];let a=await r({method:`GET`,path:`/process-instance?processDefinitionId=${encodeURIComponent(i)}&active=true&maxResults=${s}`});if(!succeeded(a))throw new Refused(reasonOf(a,e(`app.evaluate.instancesNotReadable`,{process:n})),a.status);return listOf(parsed(a.body)).filter(e=>e?.id).map(e=>({key:key(e.id),state:`ACTIVE`,started:text(e.startTime),businessKey:text(e.businessKey)}))}function parsedValue(e){if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}}async function instanceVariables(n,r,i){if(!isEight(n)){let n=await i({method:`GET`,path:`/process-instance/${encodeURIComponent(r)}/variables`});if(!succeeded(n))throw new Refused(reasonOf(n,e(`app.evaluate.variablesNotReadable`,{instance:r})),n.status);return t(recordOf(parsed(n.body)))}let a=await call(i,post(`/variables/search`,{filter:{processInstanceKey:r},page:{limit:c}}),e(`app.evaluate.variablesNotReadable`,{instance:r})),o={};for(let t of listOf(a?.items)){let n=recordOf(t);if(key(n.scopeKey)!==r)continue;let a=n.isTruncated?(await call(i,{method:`GET`,path:`/variables/${encodeURIComponent(key(n.variableKey))}`},e(`app.evaluate.variableNotReadable`,{name:key(n.name)})))?.value:n.value;Object.defineProperty(o,String(n.name),{value:parsedValue(a),enumerable:!0,writable:!0,configurable:!0})}return o}async function evaluateExpression(t,n,r,i){let a={result:null,warnings:[],secret:!1,secrets:[],problem:null,why:null};if(!isEight(t))return{...a,problem:e(`app.evaluate.camunda7Cannot`),why:e(`app.evaluate.needs89`)};try{let t=await call(i,post(`/expression/evaluation`,{expression:n,variables:r}),e(`app.evaluate.expressionNotEvaluated`),`8.9`),a=listOf(t?.referencedSecrets).map(e=>typeof e?.secretName==`string`?e.secretName:``).filter(Boolean);return{result:t?.result??null,warnings:listOf(t?.warnings).map(e=>typeof e?.message==`string`?e.message:``).filter(Boolean),secret:a.length>0,secrets:a,problem:null,why:null}}catch(t){if(!(t instanceof Refused))throw t;return{...a,problem:t.message,why:t.status===404?e(`app.evaluate.needs89`):null}}}async function engineVariableNames(t,n,r){if(!isEight(t))return{names:[],problem:null,why:null};try{let t=listOf((await call(r,post(`/process-definitions/${encodeURIComponent(n)}/variable-names/search`,{page:{limit:l}}),e(`app.evaluate.variableNamesNotReadable`),`8.10`))?.items).map(e=>typeof e?.name==`string`?e.name.trim():``).filter(Boolean);return{names:[...new Set(t)].sort(),problem:null,why:null}}catch(t){if(!(t instanceof Refused))throw t;return{names:[],problem:t.message,why:t.status===404?e(`app.evaluate.needs810`):null}}}function warningOf(e){return t=>({type:t.type,from:t.position.from,to:t.position.to,text:e.slice(t.position.from,t.position.to)})}function feelinPreview(e,t){try{let r=n(e,t);return{status:`value`,source:`preview`,value:r.value,warnings:r.warnings.map(warningOf(e))}}catch(e){if(!(e instanceof r))throw e;return{status:`rejected`,finding:{problem:`NOT_FEEL`,start:e.position.from,end:e.position.to,text:e.input.slice(e.position.from,e.position.to)}}}}function engineEvaluation(e){return e.problem===null?{status:`value`,source:`engine`,value:e.result,warnings:e.warnings}:{status:`failed`,source:`engine`,problem:e.problem,why:e.why}}function previewFeel(e,t){let n=o(e);return n?{status:`rejected`,finding:n}:feelinPreview(e,t)}async function evaluateFeel(e,t,n){let r=o(e);return r?{status:`rejected`,finding:r}:n?engineEvaluation(await evaluateExpression(n.kind,e,t,n.ask)):feelinPreview(e,t)}function valueOf(e){return e.mode===`json`?jsonValueOf(e.text):expressionValueOf(e.text)}function jsonValueOf(e){try{return{ok:!0,value:JSON.parse(e)}}catch{return{ok:!1,failure:{reason:`invalid-json`}}}}function expressionValueOf(e){let t=previewFeel(e,{});return t.status===`rejected`?{ok:!1,failure:{reason:`rejected`,finding:t.finding}}:t.warnings.length>0?{ok:!1,failure:{reason:`warned`,warnings:t.warnings}}:{ok:!0,value:t.value}}function resolveSamples(e){let t={};for(let[n,r]of Object.entries(e)){let e=valueOf(r);if(!e.ok)return{status:`failed`,name:n,...e.failure};t[n]=e.value}return{status:`ready`,variables:t}}function isName(e){return e.kind===`name`||e.kind===`backtick_name`}function nameOf(e){return e.kind===`backtick_name`?e.text.slice(1,-1):e.text}function isKeyword(e,t){return e!==void 0&&e.kind===`keyword`&&t.includes(e.text)}function isPunctuation(e,t){return e!==void 0&&e.kind===`punctuation`&&e.text===t}function bindingNames(e){let t=new Set;return e.forEach((n,r)=>{let i=r>0?e[r-1]:void 0,o=e[r+1],s=isKeyword(i,a)||isPunctuation(i,`,`);isName(n)&&s&&isKeyword(o,[`in`])&&t.add(nameOf(n))}),t}function parameterNames(e){let t=new Set;return e.forEach((n,r)=>{if(n.kind===`keyword`&&n.text===`function`&&e[r+1]?.kind===`open_parenthesis`)for(let n of e.slice(r+2)){if(n.kind===`close_parenthesis`)break;isName(n)&&t.add(nameOf(n))}}),t}function feelReadNames(e){let t=i(e),n=new Set([...bindingNames(t),...parameterNames(t)]),r=t.filter(e=>isName(e)&&!n.has(nameOf(e))).map(nameOf);return[...new Set(r)]}export{engineVariableNames as a,instanceVariables as c,previewFeel as i,listInstances as l,resolveSamples as n,evaluateExpression as o,evaluateFeel as r,evaluationSupport as s,feelReadNames as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-B8BYMn-z.js";import{i as e}from"./translator-DLDFsUlE.js";import{t}from"./bridgeInstance-qzSInqLW.js";import{c as n,i as r,s as i}from"./workerVariables-DURgyUbG.js";var a=/[\\/]/,o=/[\\/]+$/,s=/\.(bpmn\.xml|bpmn|dmn|form)$/i;function fileName(e){return e.split(a).pop()??e}function baseName(e){return fileName(e).replace(s,``)}function relative(e,t){let n=e.replace(o,``);return n!==``&&t.slice(0,n.length)!==n||!a.test(t[n.length]??``)?t:t.slice(n.length+1).replace(/\\/g,`/`)}function targetKindOf(e){switch(e){case`JOB_TYPE`:return`JOB_TYPE`;case`TOPIC`:return`TOPIC`;case`JAVA_CLASS`:return`CLASS`;case`BEAN`:return`BEAN`}}function targetsOf(t){let n=new Map;return t.forEach(({model:e})=>{e.formId&&n.set(e.formId,e.formKeys)}),t.flatMap(({path:t,model:r})=>{let i=new Map(r.elements.map(e=>[e.id,e])),element=e=>i.get(e),at=(e,n,r,i={})=>({kind:e,value:n,path:t,label:element(r)?.label??r,elementId:r,elementType:element(r)?.type,...i});return[...r.processes.map(e=>({kind:`PROCESS`,value:e.id,path:t,label:e.label,elementId:e.id,elementType:`process`})),...r.elements.map(e=>at(`ELEMENT`,e.id,e.id)),...r.workers.map(e=>at(targetKindOf(e.kind),e.value,e.elementId)),...r.messages.filter(e=>e.name).map(e=>({kind:`MESSAGE`,value:e.name,path:t,label:e.name,elementType:`message`})),...r.decisions.map(e=>({kind:`DECISION`,value:e.id,path:t,label:e.label,elementId:e.id,elementType:`decision`})),...r.formId?[{kind:`FORM`,value:r.formId,path:t,label:baseName(t),elementType:`form`}]:[],...r.variables.map(e=>at(`VARIABLE`,e.name,e.elementId,{writes:e.writes,where:e.where})),...r.errors.filter(e=>e.catches).map(e=>at(`ERROR`,e.code??``,e.elementId)),...r.variableForms.flatMap(t=>(n.get(t.formId)??[]).map(n=>at(`VARIABLE`,n,t.elementId,{writes:!0,where:e(`app.targets.onForm`,{form:t.formId})})))]})}var ProjectCore=class{parsed=new Map;async snapshot(e,t=null){let n=new Set(e.map(e=>e.path));[...this.parsed.keys()].filter(e=>!n.has(e)).forEach(e=>this.parsed.delete(e));let i=await Promise.all(e.map(async e=>({path:e.path,model:r(await this.parse(e),t)})));return{files:i,targets:targetsOf(i)}}async variables(e){let{targets:t}=await this.snapshot(e),n=new Map;return t.filter(e=>e.kind===`VARIABLE`).forEach(e=>{let t=n.get(e.path)??[];t.push({name:e.value,writes:e.writes===!0,elementId:e.elementId??``,where:e.where??``}),n.set(e.path,t)}),e.filter(e=>i(e.path)===`bpmn`).map(e=>({path:e.path,uses:n.get(e.path)??[]}))}async parse(e){let t=this.parsed.get(e.path);if(t?.text===e.text)return t.model;let r=await n(e.path,e.text);return this.parsed.set(e.path,{text:e.text,model:r}),r}},ProjectReader=class{core=new ProjectCore;texts=new Map;async read(){try{let e=await t().getProjectFiles(),n=Array.isArray(e?.files)?e.files:[],r=Array.isArray(e?.reports)?e.reports:[],i=Array.isArray(e?.sources)?e.sources:[],a=Array.isArray(e?.templates)?e.templates:[],o=Array.isArray(e?.connections)?e.connections:[],s=new Set([...n,...r,...a,...o].map(e=>e.path));[...this.texts.keys()].filter(e=>!s.has(e)).forEach(e=>this.texts.delete(e));let[c,l,u,d]=await Promise.all([this.load(n),this.load(r),this.load(a),this.load(o)]);return{root:e?.root??``,diagrams:c,reports:l,sources:i.map(e=>({path:e.path,stamp:e.stamp})),templates:u,connections:d}}catch{return{root:``,diagrams:[],reports:[],sources:[],templates:[],connections:[]}}}snapshot(e,t=null){return this.core.snapshot(e,t)}async workerVariables(){return t().findWorkerVariables().catch(()=>null)}async code(e){return t().findCode(e,!0,!0).catch(()=>null)}async contracts(){return(await t().findCode([],!1,!0).catch(()=>null))?.structure?.workers??[]}async load(e){try{let n=t();await Promise.all(e.filter(e=>this.texts.get(e.path)?.stamp!==e.stamp).map(async e=>{let t=await n.readFile(e.path).catch(()=>``);this.texts.set(e.path,{stamp:e.stamp,text:t})}))}catch{}return e.map(e=>({path:e.path,stamp:e.stamp,text:this.texts.get(e.path)?.text??``}))}},c=new ProjectReader;export{relative as i,targetKindOf as n,fileName as r,c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./rolldown-runtime-B8BYMn-z.js";import{i as n}from"./translator-DLDFsUlE.js";import{C as r}from"./frontend-Qq5hBH0U.js";import{a as i,o as a}from"./xml-DTgZ-B-l.js";import{t as o}from"./bridgeInstance-qzSInqLW.js";import{r as s}from"./moddle-DJxj0oEU.js";import{_ as c}from"./descriptors-B5VIyY5g.js";import{t as l}from"./steps-BB_6M1MU.js";import{o as u,u as d}from"./file-CIeVSOHy.js";import{t as f}from"./list-DovB9lWV.js";import{i as p,t as m}from"./engines-DhO6OW1S.js";import{r as h,t as g}from"./say-ChFGKK2E.js";function declaredIds(e,t){try{if(e===`form`){let e=JSON.parse(t).id;return typeof e==`string`?[e]:[]}return i(a(t),e).map(e=>e.attrs.id).filter(e=>typeof e==`string`&&e!==``)}catch{return[]}}var _=new Set(`and.or.not.true.false.null.if.then.else.for.in.return.some.every.satisfies.instance.of.between.function.execution.task.string.number.date.time.duration.count.sum.min.max.contains.is.defined.now.today.list.context.get.value.length.size.substring.upper.lower.case.matches.replace.split.append.concatenate.flatten.distinct.values.entries.abs.floor.ceiling.round.decimal.odd.even.mean.median.all.any`.split(`.`)),words=e=>e.replace(`bpmn:`,``).replace(/([a-z])([A-Z])/g,`$1 $2`).toLowerCase();function label$1(e){let t=e.name?.replace(/\s+/g,` `).trim();return t?`"${t}"`:n(`app.rules.flow.theNode`,{node:words(e.$type)})}e(label$1,`label`);function bodyOf(e){let t=(e?.body??e?.$body??``).trim();if(!t)return null;if(t.startsWith(`=`))return t.slice(1).trim();let n=/^[$#]\{([\s\S]*)\}$/.exec(t);return n?n[1].trim():t}function splitTop(e,t){let n=[],r=0,i=null,a=0;for(let o=0;o<e.length;o+=1){let s=e[o];if(i)s===i&&(i=null);else if(s===`"`||s===`'`)i=s;else if(s===`(`)r+=1;else if(s===`)`)--r;else if(r===0){let r=e.slice(o),i=t.exec(r);i&&i.index===0&&(n.push(e.slice(a,o)),o+=i[0].length-1,a=o+1)}}return n.push(e.slice(a)),n.map(e=>e.trim()).filter(Boolean)}function unwrap(e){let t=e.trim();for(;t.startsWith(`(`)&&t.endsWith(`)`);){let e=0,n=-1;for(let r=0;r<t.length;r+=1)if(t[r]===`(`&&(e+=1),t[r]===`)`&&--e,e===0){n=r;break}if(n!==t.length-1)break;t=t.slice(1,-1).trim()}return t}var v=e(e=>e&&e[0].toUpperCase()+e.slice(1),`capitalize`),y={lo:null,hi:null};function intersect(e,t){let n=e.lo?t.lo?e.lo.value>t.lo.value||e.lo.value===t.lo.value&&e.lo.open?e.lo:t.lo:e.lo:t.lo,r=e.hi?t.hi?e.hi.value<t.hi.value||e.hi.value===t.hi.value&&e.hi.open?e.hi:t.hi:e.hi:t.hi;return n&&r&&(n.value>r.value||n.value===r.value&&(n.open||r.open))?null:{lo:n,hi:r}}function complement(e){let t=[...e].sort((e,t)=>!e.lo||!t.lo?e.lo?1:t.lo?-1:0:e.lo.value-t.lo.value||Number(e.lo.open)-Number(t.lo.open)),n=[],r=null,i=!1;for(let e of t){if(!i){if(e.lo&&n.push({lo:null,hi:{value:e.lo.value,open:!e.lo.open}}),i=!0,!e.hi)return n;r=e.hi;continue}let t=r,a=e.lo;if((a.value>t.value||a.value===t.value&&t.open&&a.open)&&n.push({lo:{value:t.value,open:!t.open},hi:{value:a.value,open:!a.open}}),!e.hi)return n;(e.hi.value>t.value||e.hi.value===t.value&&t.open&&!e.hi.open)&&(r=e.hi)}if(!i)return[y];let a=r;return n.push({lo:{value:a.value,open:!a.open},hi:null}),n}function comparison(e){let t=/^([A-Za-z_][\w.]*)\s*(<=|>=|!=|==|=|<|>)\s*(-?\d+(?:\.\d+)?|"[^"]*"|'[^']*'|true|false)$/.exec(e)??/^(-?\d+(?:\.\d+)?|"[^"]*"|'[^']*')\s*(<=|>=|!=|==|=|<|>)\s*([A-Za-z_][\w.]*)$/.exec(e);if(!t)return null;let n=/^-?\d|^["']/.test(t[1]),r=n?t[3]:t[1],i=n?t[1]:t[3],a=n?{"<":`>`,">":`<`,"<=":`>=`,">=":`<=`}[t[2]]??t[2]:t[2];if(i===`true`||i===`false`){let e=i===`true`;return a===`=`||a===`==`?{kind:`boolean`,variable:r,values:new Set([e])}:a===`!=`?{kind:`boolean`,variable:r,values:new Set([!e])}:null}if(/^["']/.test(i)){let e=i.slice(1,-1);return a===`=`||a===`==`?{kind:`string`,variable:r,values:new Set([e]),others:!1}:a===`!=`?{kind:`string`,variable:r,values:new Set([e]),others:!0}:null}let o=Number(i);return{kind:`number`,variable:r,intervals:{"<":[{lo:null,hi:{value:o,open:!0}}],"<=":[{lo:null,hi:{value:o,open:!1}}],">":[{lo:{value:o,open:!0},hi:null}],">=":[{lo:{value:o,open:!1},hi:null}],"=":[{lo:{value:o,open:!1},hi:{value:o,open:!1}}],"==":[{lo:{value:o,open:!1},hi:{value:o,open:!1}}],"!=":[{lo:null,hi:{value:o,open:!0}},{lo:{value:o,open:!0},hi:null}]}[a]}}function parseCondition(e){let t=unwrap(e),n=splitTop(t,/^(\s+or\s+|\s*\|\|\s*)/);if(n.length>1){let e=n.map(parseCondition);return e.some(e=>!e)||new Set(e.map(e=>`${e?.kind}:${e?.variable}`)).size!==1?null:e.reduce((e,t)=>union(e,t))}let r=splitTop(t,/^(\s+and\s+|\s*&&\s*)/);if(r.length>1){let e=r.map(parseCondition);return e.some(e=>!e)||new Set(e.map(e=>`${e?.kind}:${e?.variable}`)).size!==1?null:e.reduce((e,t)=>both(e,t))}let i=/^(?:not\s*\(([\s\S]*)\)|!\s*([A-Za-z_][\w.]*))$/.exec(t);if(i){let e=parseCondition(i[1]??i[2]);return e?invert(e):null}return/^[A-Za-z_][\w.]*$/.test(t)&&!_.has(t)?{kind:`boolean`,variable:t,values:new Set([!0])}:comparison(t)}function union(e,t){if(e.kind===`number`&&t.kind===`number`)return{...e,intervals:[...e.intervals,...t.intervals]};if(e.kind===`boolean`&&t.kind===`boolean`)return{...e,values:new Set([...e.values,...t.values])};let n=e,r=t;if(n.others&&r.others)return{...n,values:new Set([...n.values].filter(e=>r.values.has(e))),others:!0};if(n.others||r.others){let[e,t]=n.others?[n,r]:[r,n];return{...e,values:new Set([...e.values].filter(e=>!t.values.has(e))),others:!0}}return{...n,values:new Set([...n.values,...r.values]),others:!1}}function both(e,t){if(e.kind===`number`&&t.kind===`number`){let n=e.intervals.flatMap(e=>t.intervals.map(t=>intersect(e,t)).filter(e=>!!e));return{...e,intervals:n}}return e.kind===`boolean`&&t.kind===`boolean`?{...e,values:new Set([...e.values].filter(e=>t.values.has(e)))}:invert(union(invert(e),invert(t)))}function invert(e){return e.kind===`number`?{...e,intervals:complement(e.intervals)}:e.kind===`boolean`?{...e,values:new Set([!0,!1].filter(t=>!e.values.has(t)))}:{...e,others:!e.others}}function bound(e){return String(e.value)}function describeInterval(e,t){let{lo:r,hi:i}=t;return r&&i&&r.value===i.value?n(`app.rules.flow.isValue`,{variable:e,bound:bound(r)}):!r&&i?n(`app.rules.flow.isBound`,{variable:e,side:i.open?n(`app.rules.flow.below`):n(`app.rules.flow.atMost`),bound:bound(i)}):r&&!i?n(`app.rules.flow.isBound`,{variable:e,side:r.open?n(`app.rules.flow.above`):n(`app.rules.flow.atLeast`),bound:bound(r)}):r&&i?n(`app.rules.flow.isBetween`,{variable:e,lo:bound(r),hi:bound(i),exclusive:r.open||i.open?n(`app.rules.flow.exclusive`):``}):n(`app.rules.flow.hasAnyValue`,{variable:e})}function gapsOf(e){let t=e[0];if(t.kind===`number`)return complement(e.flatMap(e=>e.intervals)).map(e=>describeInterval(t.variable,e));if(t.kind===`boolean`){let r=new Set(e.flatMap(e=>[...e.values]));return[!0,!1].filter(e=>!r.has(e)).map(e=>n(`app.rules.flow.isValue`,{variable:t.variable,bound:e}))}let r=e.reduce((e,t)=>union(e,t));return r.kind===`string`?r.others?[...r.values].map(e=>n(`app.rules.flow.isValue`,{variable:t.variable,bound:`"${e}"`})):[n(`app.rules.flow.isAnythingBut`,{variable:t.variable,values:[...r.values].map(e=>`"${e}"`).join(n(`app.rules.flow.comma`))})]:[]}function overlapOf(e,t){let r=both(e,t);return r.kind===`number`?r.intervals[0]?describeInterval(e.variable,r.intervals[0]):null:r.kind===`boolean`?r.values.size>0?n(`app.rules.flow.isValue`,{variable:e.variable,bound:[...r.values][0]}):null:r.others?n(`app.rules.flow.isSomeOtherValue`,{variable:e.variable}):r.values.size>0?n(`app.rules.flow.isValue`,{variable:e.variable,bound:`"${[...r.values][0]}"`}):null}function*elementsOf(e){let t=new Set,n=[];for(let t of e.rootElements??[])t.$type===`bpmn:Process`&&n.push(t),t.$type===`bpmn:Collaboration`&&t.participants?.forEach(e=>e.processRef&&n.push(e.processRef));for(;n.length>0;){let e=n.pop();if(!t.has(e)){t.add(e);for(let t of e.flowElements??[])yield t,t.flowElements&&n.push(t)}}}function checkGateway(e,t){if(t.length<2||e.default)return[];let r=t.map(e=>({flow:e,body:bodyOf(e.conditionExpression)}));if(r.some(e=>e.body===null))return[];let i=e.$type===`bpmn:ExclusiveGateway`,a=r.map(e=>parseCondition(e.body)),o=a.every(e=>e&&e.kind===a[0]?.kind&&e.variable===a[0]?.variable),s=e.id??``;if(!o)return[{kind:`NO-DEFAULT`,title:h(`flow`,`NO-DEFAULT`),detail:n(`app.rules.flow.noDefaultFlow`,{gateway:v(label$1(e))}),elements:[s],trace:[]}];let c=a,l=[],u=gapsOf(c);if(u.length>0&&l.push({kind:`NO-WAY-OUT`,title:h(`flow`,`NO-WAY-OUT`),detail:n(`app.rules.flow.noWayOut`,{gateway:v(label$1(e)),gaps:u.join(n(`app.rules.flow.orWhen`))}),elements:[s],trace:[]}),i)for(let r=0;r<c.length;r+=1)for(let i=r+1;i<c.length;i+=1){let a=overlapOf(c[r],c[i]);if(!a)continue;let flowName=e=>e.name?.trim()?`"${e.name.trim()}"`:n(`app.rules.flow.theFlowTo`,{target:e.targetRef?label$1(e.targetRef):n(`app.rules.flow.theNextStep`)});l.push({kind:`OVERLAP`,title:h(`flow`,`OVERLAP`),detail:n(`app.rules.flow.bothConditionsHold`,{shared:a,first:flowName(t[r]),second:flowName(t[i]),gateway:label$1(e)}),elements:[s,t[r].id??``,t[i].id??``],trace:[]})}return l}function identifiers(e){return[...e.replace(/"[^"]*"|'[^']*'/g,` `).matchAll(/[A-Za-z_][\w]*/g)].map(e=>e[0]).filter(e=>!_.has(e))}function variablesOf(e){let t=[],n=bodyOf(e.conditionExpression);n&&t.push(...identifiers(n));let r=e.$attrs??{},i=e.resultVariable??r[`camunda:resultVariable`];typeof i==`string`&&t.push(i);let visit=e=>{if(!e)return;let n=e.$type??``;if(/zeebe:(input|output)$/.test(n)&&(typeof e.target==`string`&&t.push(e.target),typeof e.source==`string`&&e.source.trim().startsWith(`=`)&&t.push(...identifiers(e.source.trim().slice(1)))),/camunda:(inputParameter|outputParameter)$/.test(n)){typeof e.name==`string`&&t.push(e.name);let n=e.$body??e.value;if(typeof n==`string`)for(let e of n.matchAll(/[$#]\{([^}]*)\}/g))t.push(...identifiers(e[1]))}for(let t of[`$children`,`values`,`inputParameters`,`outputParameters`,`inputParameter`,`outputParameter`]){let n=e[t];Array.isArray(n)&&n.forEach(e=>visit(e))}};return(e.extensionElements?.values??[]).forEach(visit),t.map(t=>({name:t.split(`.`)[0],element:e.id??``}))}function oneEditApart(e,t){if(e===t||Math.abs(e.length-t.length)>1)return!1;let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n+=1;let rest=(e,t)=>e.slice(t);return e.length===t.length?rest(e,n+1)===rest(t,n+1)||e[n]===t[n+1]&&e[n+1]===t[n]&&rest(e,n+2)===rest(t,n+2):e.length>t.length?rest(e,n+1)===rest(t,n):rest(e,n)===rest(t,n+1)}function lookalikes(e){let t=new Map;e.forEach(e=>t.set(e.name,new Set([...t.get(e.name)??[],e.element])));let r=[...t.keys()].sort(),i=[];for(let e=0;e<r.length;e+=1)for(let a=e+1;a<r.length;a+=1){let[o,s]=[r[e],r[a]];if(/\d$/.test(o)&&/\d$/.test(s))continue;let c=o.toLowerCase()===s.toLowerCase(),l=Math.min(o.length,s.length)>=5&&oneEditApart(o,s);(c||l)&&i.push({kind:`LOOKALIKE`,title:h(`flow`,`LOOKALIKE`),detail:n(`app.rules.flow.lookalikeNames`,{first:o,second:s,difference:n(c?`app.rules.flow.letterCaseOnly`:`app.rules.flow.oneCharacter`)}),elements:[...new Set([...t.get(o)??[],...t.get(s)??[]])].filter(Boolean),trace:[]})}return i}function analyzeDecisions(e){let t=e,n=[],r=[],i=[...elementsOf(t)],a=new Map;for(let e of i)e.$type===`bpmn:SequenceFlow`&&e.sourceRef&&a.set(e.sourceRef,[...a.get(e.sourceRef)??[],e]);for(let e of i)(e.$type===`bpmn:ExclusiveGateway`||e.$type===`bpmn:InclusiveGateway`)&&n.push(...checkGateway(e,a.get(e)??[])),r.push(...variablesOf(e));return n.push(...lookalikes(r)),n}function conditionBody(e){let t=e.trim();if(t.startsWith(`=`))return t.slice(1).trim();let n=/^[$#]\{([\s\S]*)\}$/.exec(t);return n?n[1].trim():t}function inside(e,t){let n=!e.lo||(e.lo.open?t>e.lo.value:t>=e.lo.value),r=!e.hi||(e.hi.open?t<e.hi.value:t<=e.hi.value);return n&&r}function pick(e){if(e.kind===`boolean`)return[...e.values][0];if(e.kind===`string`){if(!e.others)return[...e.values][0];let t=`other`;for(let n=2;e.values.has(t);n+=1)t=`other${n}`;return t}for(let t of e.intervals){let e=[t.lo?t.lo.open?Math.floor(t.lo.value)+1:t.lo.value:null,t.hi?t.hi.open?Math.ceil(t.hi.value)-1:t.hi.value:null,t.lo&&t.hi?(t.lo.value+t.hi.value)/2:null,0].find(e=>e!==null&&inside(t,e));if(e!==void 0)return e}}function empty(e){return e.kind===`number`?e.intervals.length===0:(e.kind===`boolean`||!e.others)&&e.values.size===0}function valuesFor(e){let t=new Map,n=[],r=[],narrow=(e,r,i,a=n)=>{let o=t.get(e.variable);if(o&&o.kind!==e.kind){i&&a.push(r);return}let s=o?both(o,e):e;empty(s)?i&&a.push(r):t.set(e.variable,s)};for(let t of e)for(let e of t.takes){let t=parseCondition(conditionBody(e));t?narrow(t,e,!0):n.push(e)}for(let t of e)for(let e of t.avoids){let n=parseCondition(conditionBody(e));n?narrow(invert(n),e,t.takes.length===0,r):t.takes.length===0&&r.push(e)}let i={};for(let[e,r]of t){let t=pick(r);t===void 0?n.push(e):i[e]=t}return{values:i,unresolved:n,avoided:r}}var b=2e4,x=4,title=e=>h(`flow`,e),capitalize=e=>e&&e[0].toUpperCase()+e.slice(1);function kindOf$1(e){switch(e.$type){case`bpmn:StartEvent`:return`start`;case`bpmn:EndEvent`:return`end`;case`bpmn:ExclusiveGateway`:case`bpmn:EventBasedGateway`:case`bpmn:ComplexGateway`:return`xor`;case`bpmn:ParallelGateway`:return`and`;case`bpmn:InclusiveGateway`:return`or`;case`bpmn:BoundaryEvent`:return`boundary`;default:return`activity`}}e(kindOf$1,`kindOf`);var S=new Set([`bpmn:SequenceFlow`,`bpmn:DataObject`,`bpmn:DataObjectReference`,`bpmn:DataStoreReference`]);function scopesOf(e){let t=[],n=[],r=new Set,add=e=>{e&&!r.has(e)&&(r.add(e),n.push(e))};for(let t of e.rootElements??[])t.$type===`bpmn:Process`&&add(t),t.$type===`bpmn:Collaboration`&&t.participants?.forEach(e=>add(e.processRef));for(let e=0;e<n.length;e+=1){let r=n[e],i=r.flowElements??[],a=new Map;for(let e of i){if(S.has(e.$type)||!e.id||(e.$type===`bpmn:SubProcess`||e.$type===`bpmn:Transaction`||e.$type===`bpmn:AdHocSubProcess`)&&(add(e),e.triggeredByEvent))continue;let t=kindOf$1(e);a.set(e,{id:e.id,named:!!e.name?.trim(),name:e.name?.replace(/\s+/g,` `).trim()||g(e.$type),kind:t,incoming:[],outgoing:[],defaultFlow:null,terminate:(e.eventDefinitions??[]).some(e=>e.$type===`bpmn:TerminateEventDefinition`),boundaries:[],interrupting:e.cancelActivity!==!1,outgoingNodes:[],host:null,plain:(e.eventDefinitions??[]).length===0})}let o=[];for(let e of i){if(e.$type!==`bpmn:SequenceFlow`)continue;let t=e.sourceRef&&a.get(e.sourceRef),n=e.targetRef&&a.get(e.targetRef);if(!t||!n||!e.id)continue;let r=o.length;o.push({id:e.id,name:e.name?.replace(/\s+/g,` `).trim()??``,source:t,target:n,conditional:!!e.conditionExpression,condition:e.conditionExpression?.body?.trim()??``}),t.outgoing.push(r),t.outgoingNodes.push(n),n.incoming.push(r)}for(let[e,t]of a){e.default&&(t.defaultFlow=o.findIndex(t=>t.id===e.default?.id)),t.defaultFlow===-1&&(t.defaultFlow=null);let n=t.kind===`boundary`&&e.attachedToRef?a.get(e.attachedToRef):void 0;n&&(n.boundaries.push(t),t.host=n)}a.size>0&&t.push({id:r.id??`scope-${e}`,nodes:[...a.values()],flows:o})}return t}function subsets(e){if(e.length===0)return[];if(e.length>x)return[...e.map(e=>[e]),e];let t=[];for(let n=1;n<1<<e.length;n+=1)t.push(e.filter((e,t)=>n&1<<t));return t}function choices(e,t){let n=e.outgoing;if(n.length===0)return[[]];if(e.kind===`xor`)return n.map(e=>[e]);if(e.kind===`and`)return[n];let r=n.filter(n=>n!==e.defaultFlow&&(e.kind===`or`||t[n].conditional)),i=e.kind===`or`?[]:n.filter(t=>!r.includes(t)&&t!==e.defaultFlow),a=subsets(r).map(e=>[...i,...e]);return e.defaultFlow!==null&&a.push([...i,e.defaultFlow]),r.length===0&&e.defaultFlow===null?[i]:a.length>0?a:[i]}function reachability(e){let t=e.flows.length,n=e.flows.map(()=>Array(t).fill(!1));return e.flows.forEach((t,r)=>{let i=[...t.target.outgoing];for(;i.length>0;){let t=i.pop();n[r][t]||(n[r][t]=!0,i.push(...e.flows[t].target.outgoing))}}),n}function label(e){if(e.named)return`"${e.name}"`;let t=e.outgoingNodes.find(e=>e.named);return t?n(`app.rules.flow.nodeBefore`,{node:e.name,next:t.name}):n(`app.rules.flow.theNode`,{node:e.name})}function sourceLabel(e){return e.source.named?`"${e.source.name}"`:n(`app.rules.flow.theBranchThrough`,{node:e.source.name})}function downstream(e){let t=new Set,n=[...e];for(;n.length>0;){let e=n.pop();if(!t.has(e.id)){t.add(e.id);for(let t of e.boundaries)n.push(t);n.push(...e.outgoingNodes)}}return t}function explore(e,t){let r=reachability(e),i=new Set(t.fired),a=[],key=e=>e.join(`,`),o=new Map([[key(t.tokens),0]]),s=[t.tokens],c=[{from:-1,fired:t.fired}],l=[],u=[],d=!1,f=new Set,p=new Set,m=new Set,doubledAt=t=>p.has(t.id)||m.has(t.id)?!0:(p.add(t.id),m=downstream([...p].map(t=>e.nodes.find(e=>e.id===t))),!1),traceTo=e=>{let t=[];for(let n=e;n>=0;n=c[n].from)t.unshift(...c[n].fired);return t};for(let t=0;t<s.length;t+=1){let p=s[t],m=[],h=[],push=(r,l,u,g=!1,_=null)=>{let v=g?p.map(()=>0):[...p];g||(r.forEach(e=>--v[e]),l.forEach(e=>v[e]+=1)),u.forEach(e=>i.add(e));let y=v.findIndex(e=>e>1);if(y>=0){let r=e.flows[y].target;if(doubledAt(r))return;a.push({kind:`NO-SYNCHRONIZATION`,title:title(`NO-SYNCHRONIZATION`),detail:n(`app.rules.flow.twoTokensAtOnce`,{node:label(r)}),elements:[r.id],trace:[...traceTo(t),...u,r.id]});return}let x=key(v),S=o.get(x);if(S===void 0){if(s.length>=b){d=!0,f.add(t);return}S=s.length,o.set(x,S),s.push(v),c.push({from:t,fired:u})}m.push(S),h.push({to:S,fired:u,choice:_,produced:g?[]:l.map(t=>e.flows[t].id)})};for(let i of e.nodes){if(i.kind===`boundary`||i.kind===`start`)continue;let o=i.incoming.filter(e=>p[e]>0);if(o.length!==0){if(i.kind===`and`)o.length===i.incoming.length&&push(i.incoming,i.outgoing,[i.id]);else if((i.kind===`activity`||i.kind===`xor`)&&o.length>1&&!doubledAt(i)&&a.push({kind:`NO-SYNCHRONIZATION`,title:title(`NO-SYNCHRONIZATION`),detail:n(`app.rules.flow.twoBranchesAtOnce`,{node:label(i)}),elements:[i.id],trace:traceTo(t)}),i.kind===`or`){if(i.incoming.filter(e=>p[e]===0).some(e=>p.some((t,n)=>t>0&&!i.incoming.includes(n)&&r[n][e])))continue;let t=choices(i,e.flows);for(let e of t)push(o,e,[i.id],!1,t.length>1?{node:i.id,ways:e,boundary:null}:null)}else for(let t of o){if(i.kind===`end`){push([t],[],[i.id],i.terminate);continue}let n=choices(i,e.flows);for(let e of n){push([t],e,[i.id],!1,n.length>1?{node:i.id,ways:e,boundary:null}:null);for(let n of i.boundaries){let r=n.interrupting?n.outgoing:[...e,...n.outgoing];push([t],r,[i.id,n.id],!1,{node:i.id,ways:e,boundary:n.id})}}}}}l.push(m),u.push(h)}let h=s.map(()=>[]);l.forEach((e,t)=>e.forEach(e=>h[e].push(t)));let backwards=e=>{let t=Array(s.length).fill(!1),n=[...e];for(n.forEach(e=>t[e]=!0);n.length>0;){let e=n.pop();for(let r of h[e])t[r]||(t[r]=!0,n.push(r))}return t},explored=e=>l[e]!==void 0,busy=e=>s[e].some(e=>e>0),g=s.map((e,t)=>t).filter(e=>!busy(e)),_=s.map((e,t)=>t).filter(e=>busy(e)&&explored(e)&&l[e].length===0&&!f.has(e)),v=backwards([...g,...f]),y=backwards(_),waitingAt=t=>[...new Set(t.flatMap((t,n)=>t>0?[e.flows[n].target]:[]))],x=_.find(e=>!v[e]);if(x!==void 0){let t=s[x],r=waitingAt(t),i=traceTo(x),o=new Map(e.nodes.map(e=>[e.id,e])),c=[...i].reverse().map(e=>o.get(e)).find(e=>e&&(e.kind===`xor`||e.kind===`or`||e.kind===`boundary`)),l=c?c.kind===`boundary`?n(`app.rules.flow.leftThroughBoundary`,{host:c.host?label(c.host):n(`app.rules.flow.anActivity`),event:c.named?` ${label(c)}`:``}):n(`app.rules.flow.sentDownAnotherBranch`,{turn:capitalize(label(c))}):``,u=r.map(r=>{let i=r.incoming.filter(e=>t[e]===0).map(t=>sourceLabel(e.flows[t])),a=label(r);return i.length>0?n(`app.rules.flow.waitsFor`,{who:capitalize(a),missing:i.join(n(`app.rules.flow.and`)),arrives:i.length===1?n(`app.rules.flow.arrives`):n(`app.rules.flow.arrive`)}):n(`app.rules.flow.waitsAndCannotContinue`,{who:capitalize(a)})}).join(` `)+l;a.push({kind:`DEADLOCK`,title:title(`DEADLOCK`),detail:u,elements:r.map(e=>e.id),trace:i})}let S=s.findIndex((e,t)=>busy(t)&&explored(t)&&!v[t]&&!y[t]);if(S>=0&&!d){let e=waitingAt(s[S]);a.push({kind:`NEVER-FINISHES`,title:title(`NEVER-FINISHES`),detail:n(`app.rules.flow.noPathToAnEnd`,{nodes:e.map(label).join(n(`app.rules.flow.and`))}),elements:e.map(e=>e.id),trace:traceTo(S)})}d&&a.push({kind:`TOO-COMPLEX`,title:title(`TOO-COMPLEX`),detail:n(`app.rules.flow.tooManyStates`,{states:b}),elements:[],trace:[]});let C=a.filter(e=>e.kind===`DEADLOCK`).flatMap(e=>e.elements),w=downstream(e.nodes.filter(e=>C.includes(e.id)));return m.forEach(e=>w.add(e)),{problems:a,fired:i,states:s.length,consequences:w,graph:{tokens:s,edges:u}}}function initialsOf(e){let t=e.nodes.filter(e=>e.kind===`start`),n=e.nodes.filter(e=>e.kind===`activity`&&e.incoming.length===0);return t.length>0?t.map(t=>{let n=e.flows.map(()=>0);return t.outgoing.forEach(e=>n[e]+=1),{fired:[t.id],tokens:n,flows:t.outgoing.map(t=>e.flows[t].id)}}):[{fired:n.map(e=>e.id),tokens:e.flows.map((e,t)=>+!!n.some(e=>e.outgoing.includes(t))),flows:e.flows.filter((e,t)=>n.some(e=>e.outgoing.includes(t))).map(e=>e.id)}]}function analyzeScope(e){let t=initialsOf(e),r=new Set,i=new Set,a=[],o=0;for(let n of t){let t=explore(e,n);t.fired.forEach(e=>r.add(e)),t.consequences.forEach(e=>i.add(e)),a.push(...t.problems),o+=t.states}for(let t of e.nodes){if(r.has(t.id)||t.kind===`start`||i.has(t.id))continue;let e=t.incoming.length===0&&t.kind!==`boundary`?n(`app.rules.flow.nothingLeadsToIt`):n(`app.rules.flow.noPathReachesIt`);a.push({kind:`DEAD-ELEMENT`,title:title(`DEAD-ELEMENT`),detail:n(`app.rules.flow.neverRuns`,{node:capitalize(label(t)),cause:e}),elements:[t.id],trace:[]})}return{problems:a,fired:r,states:o,consequences:i}}function analyzeFlow(e){let t=scopesOf(e),n=[...analyzeDecisions(e)],r=0;for(let e of t){let t=analyzeScope(e);r+=t.states;for(let e of t.problems)n.some(t=>t.kind===e.kind&&t.elements.join()===e.elements.join())||n.push(e)}return{problems:n,scopes:t.length,states:r}}var C=2e5;function decisionOf(e,t,n){let nameOf=e=>t.get(e)?.name??e;return{decision:nameOf(n.node),way:f(n.ways.map(t=>e.flows[t].name||`to "${e.flows[t].target.name}"`)),condition:f(n.ways.map(t=>e.flows[t].condition).filter(Boolean)),boundary:n.boundary?nameOf(n.boundary):null,decisionId:n.node,flowIds:n.ways.map(t=>e.flows[t].id),takes:n.ways.map(t=>e.flows[t].condition).filter(Boolean),avoids:(t.get(n.node)?.outgoing??[]).filter(e=>!n.ways.includes(e)).map(t=>e.flows[t].condition).filter(Boolean),boundaryId:n.boundary}}function scenarioOf(e,t,n,r,i,a){let nameOf=e=>t.get(e)?.name??e,o=r.filter((e,t)=>r.indexOf(e)===t);return{process:e.id,start:nameOf(n.fired[0]),decisions:a.map(n=>decisionOf(e,t,n)),steps:o.filter(e=>t.get(e)?.kind===`activity`||t.get(e)?.kind===`boundary`).map(nameOf),ends:o.filter(e=>t.get(e)?.kind===`end`).map(nameOf),startId:n.fired[0],stepIds:o.filter(e=>t.get(e)?.kind===`activity`||t.get(e)?.kind===`boundary`),endIds:o.filter(e=>t.get(e)?.kind===`end`),firedIds:r,flowIds:i}}function enumerate(e,t,n,r,i){let a=[],o=new Set,s=new Set,c=C,l=!1,walk=(u,d,f,p,m)=>{if(a.length>=i||c--<=0){l=!0;return}let h=m.map(e=>`${e.node}:${e.ways.join(`+`)}:${e.boundary??``}`).join(`|`),g=`${u}#${h}`;if(!o.has(g)){if(o.add(g),r.tokens[u].every(e=>e===0)){if(s.has(h))return;s.add(h),a.push(scenarioOf(e,t,n,f,p,m))}else for(let e of r.edges[u]??[])d.has(e.to)||(d.add(e.to),walk(e.to,d,[...f,...e.fired],[...p,...e.produced],e.choice?[...m,e.choice]:m),d.delete(e.to))}};return walk(0,new Set([0]),[...n.fired],[...n.flows],[]),{list:a,capped:l}}function cover(e,t,n,r){let{tokens:i,edges:a}=r,finished=e=>i[e].every(e=>e===0),o=i.map(()=>[]);a.forEach((e,t)=>e.forEach(e=>o[e.to].push({from:t,edge:e})));let s=i.map(()=>null),c=i.map((e,t)=>finished(t)),l=c.flatMap((e,t)=>e?[t]:[]);for(let e=0;e<l.length;e+=1)for(let{from:t,edge:n}of o[l[e]])c[t]||(c[t]=!0,s[t]=n,l.push(t));let u=i.map(()=>null),d=[0],f=new Set([0]);for(let e=0;e<d.length;e+=1)for(let t of a[d[e]]??[])f.has(t.to)||(f.add(t.to),u[t.to]={from:d[e],edge:t},d.push(t.to));let p=new Set([...n.fired,...n.flows]),m=new Set,h=[];for(let r of d)for(let i of a[r]??[]){if(!c[i.to]||[...i.fired,...i.produced].every(e=>p.has(e)))continue;let a=[];for(let e=r;u[e];e=u[e].from)a.unshift(u[e].edge);a.push(i);for(let e=i.to;!finished(e)&&s[e];e=s[e].to)a.push(s[e]);let o=a.filter(e=>e.choice).map(e=>`${e.choice?.node}:${e.choice?.ways.join(`+`)}:${e.choice?.boundary??``}`).join(`|`);a.forEach(e=>[...e.fired,...e.produced].forEach(e=>p.add(e))),!m.has(o)&&(m.add(o),h.push(scenarioOf(e,t,n,[...n.fired,...a.flatMap(e=>e.fired)],[...n.flows,...a.flatMap(e=>e.produced)],a.flatMap(e=>e.choice?[e.choice]:[]))))}return h}function scenarioSet(e,t=64){let n=[],r=!1;for(let i of scopesOf(e)){let e=new Map(i.nodes.map(e=>[e.id,e]));for(let a of initialsOf(i)){let{graph:o}=explore(i,a),s=enumerate(i,e,a,o,t);s.capped?(r=!0,n.push(...cover(i,e,a,o))):n.push(...s.list)}}return{scenarios:n,capped:r}}function rootProcesses(e){let t=[];for(let n of e?.rootElements??[])if(n.$type===`bpmn:Process`&&t.push(n),n.$type===`bpmn:Collaboration`)for(let e of n.participants??[])e.processRef&&t.push(e.processRef);return[...new Set(t)]}function executableProcessIds(e){return rootProcesses(e).filter(e=>e.isExecutable!==!1&&e.id).map(e=>e.id)}function startEventsOf(e,t){return(scopesOf(e).find(e=>e.id===t)?.nodes??[]).filter(e=>e.kind===`start`).map(e=>({id:e.id,name:e.named?e.name:``,plain:e.plain}))}var w=5e3;function walkScenario(e,t,n={}){let r=scopesOf(e),i=executableProcessIds(e),a=n.process?r.find(e=>e.id===n.process):r.filter(e=>i.includes(e.id)).length===1?r.find(e=>i.includes(e.id)):void 0;if(!a)return null;let o=initialsOf(a),plainStart=e=>a.nodes.find(t=>t.id===e.fired[0])?.plain!==!1,s=o.find(e=>e.fired[0]===n.startId)??(n.startId?void 0:o.find(plainStart)??o[0]);if(!s||s.fired.length===0)return null;let c=new Map(a.nodes.map(e=>[e.id,e])),{graph:l}=explore(a,s),u=[...s.fired],d=[...s.flows],f=[],p=new Set([0]),m=0,h=!1,g;for(let e=0;e<w;e+=1){if(l.tokens[m].every(e=>e===0)){h=!0;break}let e=l.edges[m]??[];if(e.length===0)break;let n=e[0].fired[0],r=e.filter(e=>e.fired[0]===n),i=r.length===1?0:t(r.map(e=>({nodeId:n,flowIds:e.produced,boundaryId:e.choice?.boundary??null})),u);if(i<0){g=n,u.push(n);break}let a=r[Math.min(i,r.length-1)];if(p.has(a.to))break;p.add(a.to),u.push(...a.fired),d.push(...a.produced),a.choice&&f.push(a.choice),m=a.to}return{scenario:scenarioOf(a,c,s,u,d,f),complete:h,...g?{blockedAt:g}:{}}}var T=new Set([`localhost`,`127.0.0.1`,`[::1]`,`::1`]);function hostOf(e){if(!e)return null;try{return new URL(e).hostname.toLowerCase()}catch{return null}}function mockPermission(e){if(e.forTests)return`allowed`;let t=hostOf(e.url);return t&&(T.has(t)||/^127(?:\.\d{1,3}){3}$/.test(t)||t.endsWith(`.localhost`))?`confirm`:`refused`}function refusalText(e){let t=hostOf(e)??n(`app.testCases.safety.thisEngine`);return n(`app.testCases.safety.refusal`,{where:t})}async function sweepLeftovers(e,t,n){let r=[],i=[];for(let a of await t.list())if(!(n-a.at<=9e5)){a.instance&&await e.cancel(a.instance).catch(()=>void 0);try{await e.remove(a.deployment)}catch(e){if(!(e instanceof m&&e.status===404)){i.push(a.deployment);continue}}await t.drop(a.deployment),r.push(a.deployment)}return{removed:r,kept:i}}function storageLedger(e,t,n){let read=()=>{try{let n=JSON.parse(e.getItem(t)??`{}`);return n&&typeof n==`object`&&!Array.isArray(n)?n:{}}catch{return{}}},list=()=>{let e=read()[n];return Array.isArray(e)?e:[]},write=r=>{let i=read();r.length?i[n]=r:delete i[n],e.setItem(t,JSON.stringify(i))};return{list:async()=>list(),add:async e=>write([...list().filter(t=>t.deployment!==e.deployment),e]),drop:async e=>write(list().filter(t=>t.deployment!==e))}}function builds(e){return n(`app.testCases.count.testBuilds`,{count:e})}function leftoverLines(e){return[...e.removed.length?[n(`app.testCases.leftovers.removed`,{builds:builds(e.removed.length)})]:[],...e.kept.length?[n(`app.testCases.leftovers.kept`,{builds:builds(e.kept.length)})]:[]]}var E=/\.(bpmn20\.xml|bpmn\.xml|bpmn)$/i,D=[`process`,`decision`,`form`];function normal(e){return e.replace(/\\/g,`/`)}function nameOf(e){return normal(e).split(`/`).pop()??e}function kindOf(e){return E.test(e)?`process`:/\.dmn$/i.test(e)?`decision`:/\.form$/i.test(e)?`form`:null}function nearness(e,t){let n=normal(e).split(`/`).slice(0,-1),r=normal(t).split(`/`).slice(0,-1),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i+=1;return i}async function usedBy(e){let t=[...l(await s(e)).values()],ids=e=>[...new Set(t.map(e).filter(e=>!!e))];return{process:ids(e=>e.calledProcess),decision:ids(e=>e.decision),form:ids(e=>e.form)}}async function testBuildResources(e,t){let n=[{path:e.path,name:nameOf(e.path),content:e.content}],r=new Set([normal(e.path)]),i={process:new Set,decision:new Set,form:new Set},a=await usedBy(e.content);declaredIds(`process`,e.content).forEach(e=>i.process.add(e));let o=new Map,scan=async e=>{let n=[];for(let i of t){if(kindOf(i.path)!==e||r.has(normal(i.path)))continue;let t=o.get(i.path);if(!t){let n=await i.read().catch(()=>``);t={content:n,ids:declaredIds(e,n)},o.set(i.path,t)}n.push({path:i.path,...t})}return n};for(;D.some(e=>a[e].some(t=>!i[e].has(t)));)for(let t of D){let o=a[t].filter(e=>!i[t].has(e));if(a[t]=[],o.length===0)continue;let s=await scan(t);for(let c of o){i[t].add(c);let o=s.filter(e=>e.ids.includes(c)&&!r.has(normal(e.path))).sort((t,n)=>nearness(e.path,n.path)-nearness(e.path,t.path))[0];if(o&&(r.add(normal(o.path)),n.push({path:o.path,name:nameOf(o.path),content:o.content}),o.ids.forEach(e=>i[t].add(e)),t===`process`)){let e=await usedBy(o.content);D.forEach(t=>a[t].push(...e[t]))}}}return n}function testCaseFileByProcessId(e,t){if(e.length===0)return null;let n=new Set(e),starts=e=>Array.isArray(e?.instructions)&&e.instructions.some(e=>e?.type===`CREATE_PROCESS_INSTANCE`&&n.has(e.processDefinitionSelector?.processDefinitionId??``));return t.find(e=>(u(e.content).file?.testCases??[]).some(starts))?.path??null}async function withLinkedResources(e,t){let n=[],r=new Set,take=e=>{let t=normal(e.path);r.has(t)||(r.add(t),n.push(e))};for(let n of e)E.test(n.path)?(await testBuildResources(n,t)).forEach(take):take({path:n.path,name:nameOf(n.path),content:n.content});return n}function noEngine(){return n(`app.scenarios.needsAnEngine`)}function missingTarget(e){return e?.url&&e.ready===!1?n(`app.scenarios.targetNeedsSignIn`,{url:e.url}):noEngine()}var O=new Set([`FetchError`,`ResponseError`,`RequiredError`]);function describeFailure(e){return typeof e==`string`?e:e instanceof TypeError?noEngine():e instanceof Error?O.has(e.name)||/Response returned an error code|The request failed/.test(e.message)?noEngine():e.message:String(e)}var k=t({autoRunAllowed:()=>autoRunAllowed,buildsOn:()=>buildsOn,hostEngine:()=>hostEngine,keepTrace:()=>keepTrace,mayRunOn:()=>mayRunOn,mayRunTests:()=>mayRunTests,readScenarioFile:()=>readScenarioFile,readTestCases:()=>readTestCases,resourcesOf:()=>resourcesOf,runTargetOf:()=>runTargetOf,runTargetProblem:()=>runTargetProblem,targetKey:()=>targetKey});function targetKey(e){return`${e.profile??``}|${e.url??``}`}var A=`penstock.testRuns.confirmed`,j=`penstock.testRuns.builds`;function buildsOn(e){return storageLedger(localStorage,j,targetKey(e))}async function runTargetOf(e,t,n){try{let r=await(n??o()).getDeployTargets(e??void 0),i=t??r?.active??null,a=(r?.targets??[]).find(e=>(e?.profile??null)===i);return!a?.ready||!c(String(a.engine))?null:{profile:a.profile??null,url:a.url??null,engine:a.engine,forTests:a.deployment?.forTests===!0,tenantId:a.deployment?.tenantId??null}}catch{return null}}async function runTargetProblem(e,t,n){try{let r=await(n??o()).getDeployTargets(e??void 0),i=t??r?.active??null;return missingTarget((r?.targets??[]).find(e=>(e?.profile??null)===i))}catch{return``}}function hostEngine(e,t,n=o()){return p(e.engine,r=>n.askEngine(e.profile,r,t??void 0,!0),e.tenantId??null)}function confirmedTargets(){try{return new Set(JSON.parse(localStorage.getItem(A)??`[]`))}catch{return new Set}}function autoRunAllowed(e){let t=mockPermission({url:e.url,forTests:e.forTests});return t===`allowed`||t===`confirm`&&confirmedTargets().has(targetKey(e))}async function mayRunOn(e,t,r=o()){let i=mockPermission({url:e.url,forTests:e.forTests});if(i===`allowed`)return null;if(i===`refused`)return refusalText(e.url);let a=targetKey(e),s=confirmedTargets();if(s.has(a))return null;if(!await r.confirmWithUser({title:t?.title??n(`app.project.runScenariosOnThisEngine`),text:t?.text??n(`app.project.penstockWillDeployATest`,{url:e.url})+n(`app.project.theBuildAndItsInstances`),accept:t?.accept??n(`app.runs.run`),decline:n(`app.common.cancel`)}))return n(`app.project.notRunTheEngineWas`);s.add(a);try{localStorage.setItem(A,JSON.stringify([...s]))}catch{}return null}async function mayRunTests(){try{return await o().requestFeature(r.TEST_RUNS)}catch{return!1}}async function resourcesOf(e,t,n){try{let r=n??o(),i=await r.getProjectFiles(),a=(Array.isArray(i?.files)?i.files:[]).map(e=>({path:e.path,read:()=>r.readFile(e.path)}));return testBuildResources({path:e,content:t},a)}catch{return[]}}async function byProcessId(e,t){let n;try{n=executableProcessIds(await s(e))}catch{return null}if(n.length===0)return null;try{let e=o(),r=[];for(let n of t){let t=await e.readFile(n).catch(()=>null);t!==null&&r.push({path:n,content:t})}let i=testCaseFileByProcessId(n,r),a=i?r.find(e=>e.path===i):void 0;return a?{file:a.path,parsed:u(a.content)}:null}catch{return null}}async function listedTestCases(){return((await o().getProjectFiles())?.testCases??[]).map(e=>e.path)}async function readScenarioFile(e){return(await listedTestCases()).some(t=>t.replace(/\\/g,`/`)===e.replace(/\\/g,`/`))?o().readFileIfPresent(e):null}async function readTestCases(e,t){try{if(e.endsWith(`.json`)){let t=await o().readFile(e).catch(()=>null);return{file:e,parsed:t===null?{file:null,problems:[]}:u(t)}}let n=d(e),r=await listedTestCases(),i=r.find(e=>e.replace(/\\/g,`/`)===n);if(i!==void 0){let e=await o().readFile(i).catch(()=>null);if(e!==null)return{file:i,parsed:u(e)}}if(t){let e=await byProcessId(t,r);if(e)return e}return{file:n,parsed:{file:null,problems:[]}}}catch{return{file:e,parsed:{file:null,problems:[]}}}}async function keepTrace(e,t){try{return await o().saveRunTrace(e.runId,t,`${JSON.stringify(e,null,2)}\n`)}catch(e){return console.error(e),null}}export{executableProcessIds as C,conditionBody as D,walkScenario as E,valuesFor as O,analyzeFlow as S,startEventsOf as T,leftoverLines as _,mayRunOn as a,mockPermission as b,readTestCases as c,runTargetProblem as d,targetKey as f,withLinkedResources as g,testBuildResources as h,keepTrace as i,declaredIds as k,resourcesOf as l,describeFailure as m,buildsOn as n,mayRunTests as o,k as p,hostEngine as r,readScenarioFile as s,autoRunAllowed as t,runTargetOf as u,storageLedger as v,scenarioSet as w,refusalText as x,sweepLeftovers as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-B8BYMn-z.js";import{_ as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,o as c,p as l,r as u,s as d,u as f}from"./vendor-NJP34MHU.js";import{i as p,t as m}from"./translator-DLDFsUlE.js";import{a as h,c as g,l as _,n as v,o as y,r as b,t as x,u as S}from"./dialog-DSLu1Bbo.js";import{t as C}from"./bridgeInstance-qzSInqLW.js";import{t as w}from"./docs-B2ZDPeJU.js";var T=v(null);function buttonOrder(){return T}async function loadButtonOrder(){try{let e=await C().getDialogButtonOrder();e&&(T=e)}catch(e){console.error(e)}}var E=i({locale:`en`,t:m(`en`)});function useI18n(){return r(E)}function useTranslate(){return useI18n().t}function I18nProvider({locale:e,children:t}){let n=c(()=>({locale:e,t:m(e)}),[e]);return u(E.Provider,{value:n,children:t})}var D=`data-modal-open`,O=i(`top`);function useLabelLayout(){return r(O)}var k=`a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])`;function focusables(e){return Array.from(e.querySelectorAll(k)).filter(e=>!e.closest(`[hidden]`))}function focusInside(e,t,n){n===`title`?t?.focus():((n===`safe`?e.querySelector(`[data-safe]`):focusables(e.querySelector(`.ui-dialog__body`)??e)[0])??focusables(e)[0]??e).focus()}function Dialog({title:e,subtitle:n,size:r,onClose:i,onSubmit:a,destructive:c,initialFocus:l,backdrop:d=`keep`,body:p=`form`,labels:m,footer:h,class:g,children:_}){let v=useTranslate(),y=s(),x=o(null),C=o(null),w=o(i);w.current=i;let T=m??(r===`small`?`top`:`left`),[E,k]=t(!1);f(()=>{let t=x.current?.closest(`.ui-dialog-overlay`);if(t){if(document.querySelector(`.ui-dialog-overlay[${D}]`))console.error(`A modal never opens another modal:`,e),k(!0),w.current();else return t.setAttribute(D,``),()=>t.removeAttribute(D)}},[]),f(()=>{let e=x.current;if(E||!e)return;let t=document.activeElement;focusInside(e,C.current,l??(c?`safe`:`first`));let onKeyDown=t=>{if(t.key===`Escape`){if(document.querySelector(`.ui-popover, .cm-tooltip-autocomplete`))return;t.stopPropagation(),t.preventDefault(),w.current();return}if(t.key!==`Tab`)return;let n=focusables(e),r=b(n.length,n.indexOf(document.activeElement),t.shiftKey);r!==null&&(t.preventDefault(),n[r].focus())};return document.addEventListener(`keydown`,onKeyDown,!0),()=>{document.removeEventListener(`keydown`,onKeyDown,!0);try{t?.focus?.()}catch{}}},[E]);let onEnter=e=>{if(e.defaultPrevented||!a||!(e.target instanceof HTMLElement))return;let t=e.target;if(S({key:e.key,tag:t.tagName,type:t.type,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,destructive:c})){e.preventDefault();try{a()}catch(e){console.error(`Dialog onSubmit error:`,e)}}};return E?null:u(`div`,{class:`ui-dialog-overlay`,onMouseDown:e=>d===`close`&&e.target===e.currentTarget&&w.current(),children:u(`div`,{ref:x,class:`ui-dialog ui-dialog--${r}${g?` ${g}`:``}`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":y,tabIndex:-1,onKeyDown:onEnter,children:[u(`header`,{class:`ui-dialog__header`,children:[u(`div`,{class:`ui-dialog__heading`,children:[u(`h2`,{id:y,ref:C,class:`ui-dialog__title type-dialog-title`,tabIndex:-1,children:e}),n&&u(`p`,{class:`ui-dialog__subtitle`,children:n})]}),u(`button`,{type:`button`,class:`ui-dialog__close`,"aria-label":v(`app.common.close`),title:v(`app.common.close`),onClick:()=>w.current(),children:u(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:u(`path`,{d:`M4 4l8 8M12 4l-8 8`})})})]}),u(O.Provider,{value:T,children:u(`div`,{class:`ui-dialog__body ui-dialog__body--${p}`,children:_})}),h]})})}function ActionButtons({actions:e}){return u(a,{children:h(e,buttonOrder()).map(e=>u(`button`,{type:`button`,class:`ui-button type-button${e.role===`primary`?` ui-button--primary`:``}`,disabled:e.disabled||e.busy||x(e),title:e.title,"aria-busy":e.busy||void 0,"data-safe":e.role===`cancel`?``:void 0,onClick:()=>{try{e.onClick()}catch(e){console.error(e)}},children:e.label},e.id))})}function DialogFooter({actions:e,help:t}){return u(`footer`,{class:`ui-dialog__footer`,children:[t&&u(`div`,{class:`ui-dialog__help type-help`,children:t}),u(ActionButtons,{actions:e})]})}function FieldError({id:e,children:t}){return u(`p`,{id:e,class:`ui-field__error`,children:[u(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:[u(`circle`,{cx:`8`,cy:`8`,r:`6.5`}),u(`path`,{d:`M8 4.5v4M8 11v.5`})]}),u(`span`,{children:t})]})}function Field({label:t,hint:n,error:r,optional:i,required:a,layout:o,group:c,class:l,children:d}){let f=s(),p=useTranslate(),m=useLabelLayout(),h=o??m,g=[n?`${f}-hint`:null,r?`${f}-error`:null].filter(Boolean).join(` `);return u(`div`,{class:`ui-field ui-field--${h}${r?` has-error`:``}${l?` ${l}`:``}`,children:[e(c?`span`:`label`,{class:`ui-field__label`,id:c?`${f}-label`:void 0,for:c?void 0:f},a&&u(`span`,{class:`ui-field__required`,"aria-hidden":`true`,children:`* `}),t,i&&u(`span`,{class:`ui-field__optional`,children:p(`app.common.optional`)})),u(`div`,{class:`ui-field__control`,children:[d({id:f,class:`ui-input`,"aria-describedby":g||void 0,"aria-invalid":r?!0:void 0,...c?{role:c,"aria-labelledby":`${f}-label`}:{}}),n&&u(`p`,{id:`${f}-hint`,class:`ui-field__hint type-help`,children:n}),r&&u(FieldError,{id:`${f}-error`,children:r})]})]})}var A=`a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])`,j=i(!1);function Popover({anchor:e,label:n,onClose:i,onEscape:a,width:s=320,class:c,children:l}){let p=o(null),m=o(i);m.current=i;let h=o(a);h.current=a;let[g,_]=t(null),v=r(j);d(()=>{let place=()=>{let t=p.current;if(e&&t)try{let n=e.getBoundingClientRect(),r={width:s,height:t.offsetHeight},i=typeof window<`u`&&Number.isFinite(window.innerWidth)&&window.innerWidth>0?window.innerWidth:1024,a=typeof window<`u`&&Number.isFinite(window.innerHeight)&&window.innerHeight>0?window.innerHeight:768,o=y({left:n.left,top:n.top,width:n.width,height:n.height},r,{width:i,height:a});_({top:o.top,left:o.left})}catch{}};place(),window.addEventListener(`resize`,place);let t=typeof ResizeObserver>`u`||!p.current?null:new ResizeObserver(place);return t&&p.current&&t.observe(p.current),()=>{window.removeEventListener(`resize`,place),t?.disconnect()}},[e,s]);let b=g!==null;return f(()=>{if(b)try{p.current?.querySelector(A)?.focus()}catch{}},[b]),f(()=>{let t=p.current;if(!t)return;let n=document.activeElement,away=n=>{n instanceof Node&&!t.contains(n)&&!e?.contains(n)&&m.current()},press=e=>away(e.target),keys=e=>{e.key===`Escape`&&(e.stopPropagation(),!h.current?.()&&m.current())};return document.addEventListener(`pointerdown`,press,!0),document.addEventListener(`mousedown`,press),document.addEventListener(`keydown`,keys,!0),()=>{if(document.removeEventListener(`pointerdown`,press,!0),document.removeEventListener(`mousedown`,press),document.removeEventListener(`keydown`,keys,!0),t.contains(document.activeElement)||document.activeElement===document.body)try{(e??n)?.focus?.()}catch{}}},[e]),v?(console.error(`A popover never nests:`,n),null):u(j.Provider,{value:!0,children:u(`div`,{ref:p,class:`ui-popover${c?` ${c}`:``}`,role:`dialog`,"aria-label":n,style:{width:`${s}px`,top:`${g?.top??0}px`,left:`${g?.left??0}px`,visibility:g?`visible`:`hidden`},children:l})})}var M={properties:`guide/properties-panel`,scenarios:`guide/scenarios`,problems:`guide/diagram-check`,comments:`guide/comments`,monitor:`guide/monitor`,code:`guide/code-links`,try:`guide/dmn-editor#try`,preview:`guide/form-editor#preview`,sidebar:`guide/sidebar`};Object.keys(M);function guideUrl(e){return e?`${w}${M[e]}`:w}var N=null;function openDocumentation(e){N?.(guideUrl(e))}function onOpenDocumentation(e){return N=e,()=>{N===e&&(N=null)}}function EmptyState({title:e,hint:t,actions:n=[],guide:r}){return u(`div`,{class:`ui-empty`,children:[u(`p`,{class:`ui-empty__title`,children:e}),t&&u(`p`,{class:`ui-empty__hint`,children:[t,r&&u(a,{children:[` `,u(`a`,{class:`ui-empty__link`,href:guideUrl(r),target:`_blank`,rel:`noopener noreferrer`,onClick:e=>{e.preventDefault(),openDocumentation(r)},children:p(`app.common.learnMore`)})]})]}),n.length>0&&u(`div`,{class:`ui-empty__actions`,children:n.slice(0,2).map(e=>u(`button`,{type:`button`,class:`ui-button`,onClick:e.run,children:e.label},e.label))})]})}function useTouched(){let[e,r]=t(new Set),[i,a]=t(new Set),[o,s]=t(!1);return{submitted:o,touch:n(e=>{r(t=>t.has(e)?t:new Set(t).add(e)),a(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),reveal:n(e=>a(t=>{let n=new Set(t);return Array.isArray(e)&&e.forEach(e=>n.add(e)),n}),[]),submit:n(()=>{a(new Set),s(!0)},[]),errorOf:n((t,n)=>g({error:n,revealed:i.has(t),shown:_({error:n,touched:e.has(t),submitted:o})}),[i,e,o])}}var ErrorBoundary=class extends l{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(e,t)}handleReload=()=>{try{this.props.onReload?this.props.onReload():typeof window<`u`&&typeof window.location?.reload==`function`&&window.location.reload()}catch{}};render(){if(this.state.hasError){let e=``;try{e=this.state.error?.message||(this.state.error?String(this.state.error):``)}catch{e=``}return u(`div`,{class:`startup-failure`,role:`alert`,children:u(`div`,{class:`startup-failure__inner`,children:[u(EmptyState,{title:p(`app.startup.theEditorCouldNotStart`),hint:p(`app.startup.retryingReloadsTheEditorAnd`),actions:[{label:p(`app.common.reload`),run:this.handleReload}]}),e&&u(`pre`,{class:`startup-failure__message`,children:e})]})})}return this.props.children}},P=8;function nextEnabled(e,t,n){for(let r=1;r<=e.length;r+=1){let i=(t+n*r+e.length*r)%e.length;if(!e[i].disabled)return i}return t}function ContextMenu({label:e,at:n,items:r,onClose:i,returnFocusTo:a}){let s=o(null),[c,l]=t(null),[p,m]=t(()=>r.findIndex(e=>!e.disabled)),h=o(i);h.current=i,d(()=>{let e=s.current;if(!e)return;let t=e.offsetWidth,r=e.offsetHeight,i=Math.max(P,Math.min(n.x,window.innerWidth-t-P)),a=Math.max(P,Math.min(n.y,window.innerHeight-r-P));l({left:i,top:a})},[n.x,n.y]),f(()=>{let e=s.current,t=document.activeElement,n=a?.isConnected?a:t,away=t=>{t.target instanceof Node&&e&&!e.contains(t.target)&&h.current()},leave=()=>h.current();return document.addEventListener(`pointerdown`,away,!0),window.addEventListener(`blur`,leave),window.addEventListener(`resize`,leave),()=>{document.removeEventListener(`pointerdown`,away,!0),window.removeEventListener(`blur`,leave),window.removeEventListener(`resize`,leave);try{n?.focus?.({preventScroll:!0})}catch{}}},[]),f(()=>{c&&s.current?.focus({preventScroll:!0})},[c!==null]);let choose=e=>{e.disabled||(h.current(),e.run())},onKeyDown=e=>{if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),h.current();else if(e.key===`ArrowDown`)e.preventDefault(),m(e=>nextEnabled(r,e,1));else if(e.key===`ArrowUp`)e.preventDefault(),m(e=>nextEnabled(r,e,-1));else if(e.key===`Home`)e.preventDefault(),m(nextEnabled(r,r.length-1,1));else if(e.key===`End`)e.preventDefault(),m(nextEnabled(r,0,-1));else if(e.key===`Enter`||e.key===` `){e.preventDefault(),e.stopPropagation();let t=r[p];t&&choose(t)}else e.key===`Tab`&&(e.preventDefault(),h.current())};return u(`div`,{ref:s,class:`web-menu`,role:`menu`,"aria-label":e,tabIndex:-1,"aria-activedescendant":p>=0?`web-menu-${r[p]?.id}`:void 0,style:{left:`${c?.left??n.x}px`,top:`${c?.top??n.y}px`,visibility:c?`visible`:`hidden`},onKeyDown,onContextMenu:e=>e.preventDefault(),children:r.map((e,t)=>u(`div`,{id:`web-menu-${e.id}`,role:e.checked===void 0?`menuitem`:`menuitemcheckbox`,"aria-checked":e.checked===void 0?void 0:e.checked,"aria-disabled":e.disabled||void 0,class:`web-menu__item type-body${t===p?` is-cursor`:``}${e.danger?` is-danger`:``}${e.disabled?` is-disabled`:``}${e.separated?` is-separated`:``}`,onPointerEnter:()=>!e.disabled&&m(t),onClick:()=>choose(e),children:[u(`span`,{class:`web-menu__label`,children:e.label}),e.shortcut&&u(`span`,{class:`web-menu__shortcut type-help`,children:e.shortcut})]},e.id))})}var F={chat:`<path d="M2.5 2.5h11a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H8.5L5 13.5v-3H2.5a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1z"/><path d="M5 6.5h.01M8 6.5h.01M11 6.5h.01"/>`,expand:`<path d="M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9"/>`,collapse:`<path d="M13.5 6.5h-4v-4M9.5 6.5 14 2M2.5 9.5h4v4M6.5 9.5 2 14"/>`,chevronDown:`<path d="M4 6l4 4 4-4"/>`,chevronLeft:`<path d="M10 4 6 8l4 4"/>`,chevronUp:`<path d="M4 10l4-4 4 4"/>`,close:`<path d="M4 4l8 8M12 4l-8 8"/>`,plus:`<path d="M8 3v10M3 8h10"/>`,check:`<path d="M3 8.5 6.5 12 13 4.5"/>`,send:`<path d="M8 13V3.5M4 7.5l4-4 4 4"/>`,stop:`<rect x="4.5" y="4.5" width="7" height="7" rx="1"/>`,alert:`<path d="M8 2l6.5 11.5h-13z"/><path d="M8 6.5v3M8 11.5v.01"/>`,failed:`<circle cx="8" cy="8" r="6"/><path d="M5.5 5.5l5 5M10.5 5.5l-5 5"/>`,hand:`<path d="M5.5 8V3.5a1 1 0 0 1 2 0V7M7.5 7V2.5a1 1 0 0 1 2 0V7M9.5 7V3.5a1 1 0 0 1 2 0V9.5c0 2.5-1.5 4-3.5 4-1.5 0-2.5-.7-3.5-2L2.7 9a1 1 0 0 1 1.6-1.2z"/>`,copy:`<rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5v-2a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2"/>`,queue:`<path d="M2 4h9M2 8h9M2 12h5M12.5 10.5 14.5 12.5 12.5 14.5"/>`,file:`<path d="M4 1.5h5.5l3 3v10H4z"/><path d="M9.5 1.5v3h3"/>`,element:`<rect x="1.5" y="4" width="13" height="8" rx="2"/>`,pending:`<circle cx="8" cy="8" r="2.5"/>`,settings:`<path d="M6.62 3.19 6.94 1.33h2.12l.32 1.86 1.04.44 1.55-1.09 1.49 1.49-1.09 1.55.44 1.04 1.86.32v2.12l-1.86.32-.44 1.04 1.09 1.55-1.49 1.49-1.55-1.09-1.04.44-.32 1.86H6.94l-.32-1.86-1.04-.44-1.55 1.09-1.49-1.49 1.09-1.55-.44-1.04-1.86-.32V6.94l1.86-.32.44-1.04-1.09-1.55 1.49-1.49 1.55 1.09z"/><circle cx="8" cy="8" r="2"/>`};function AssistantIcon({name:e,class:t}){return u(`svg`,{class:t,viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:F[e]}})}function Spinner(){return u(`span`,{class:`assistant-spinner`,"aria-hidden":`true`})}function InstallCommand({command:e}){let[n,r]=t(!1),copy=()=>{navigator.clipboard?.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return u(`div`,{class:`ui-install-command type-code`,children:[u(`span`,{class:`ui-install-command__prompt`,"aria-hidden":`true`,children:`$`}),u(`code`,{class:`ui-install-command__code`,children:e}),u(`button`,{type:`button`,class:`ui-install-command__copy`,"aria-label":p(`app.common.copyCommand`),title:p(n?`app.common.commandCopied`:`app.common.copyCommand`),onClick:copy,children:u(AssistantIcon,{name:n?`check`:`copy`})})]})}export{useTranslate as _,ErrorBoundary as a,onOpenDocumentation as c,Field as d,FieldError as f,I18nProvider as g,DialogFooter as h,ContextMenu as i,openDocumentation as l,Dialog as m,AssistantIcon as n,useTouched as o,ActionButtons as p,Spinner as r,EmptyState as s,InstallCommand as t,Popover as u,loadButtonOrder as v};
|