@lovrabet/rabetbase-cli 2.5.4-beta.4 → 2.5.4
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/README.md +8 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +15 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +21 -12
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1e5445,_0x23616e){const _0x13b9a2=a276_0x3e9f,_0x49a63d=_0x1e5445();while(!![]){try{const _0x1f6204=parseInt(_0x13b9a2(0xd8))/0x1*(-parseInt(_0x13b9a2(0xb3))/0x2)+-parseInt(_0x13b9a2(0xd6))/0x3*(parseInt(_0x13b9a2(0xb7))/0x4)+-parseInt(_0x13b9a2(0xaf))/0x5+parseInt(_0x13b9a2(0xca))/0x6+parseInt(_0x13b9a2(0xde))/0x7*(-parseInt(_0x13b9a2(0xac))/0x8)+-parseInt(_0x13b9a2(0xbd))/0x9+parseInt(_0x13b9a2(0xc9))/0xa;if(_0x1f6204===_0x23616e)break;else _0x49a63d['push'](_0x49a63d['shift']());}catch(_0x27223){_0x49a63d['push'](_0x49a63d['shift']());}}}(a276_0x24e4,0xb2f21));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x2999c7){const _0xd5f6b6=a276_0x3e9f,_0x367e3c=[];for(const [_0x6d0bb3,_0x116ad0]of Object[_0xd5f6b6(0xcf)](_0x2999c7[_0xd5f6b6(0xad)])){const [_0x21f8df,_0x5957aa]=_0x6d0bb3[_0xd5f6b6(0xc3)]('/');if(_0x21f8df!=='HOOK'||!_0x5957aa||!_0x116ad0[_0xd5f6b6(0xc5)])continue;_0x367e3c[_0xd5f6b6(0xcc)]({'alias':_0x5957aa,'datasetCode':_0x116ad0[_0xd5f6b6(0xc5)]});}return _0x367e3c;}export function uniqueTrackedHookDirectoryByDataset(_0x38551b){const _0x5331fc=a276_0x3e9f,_0x3e368c=new Map();for(const _0x1b630c of trackedHookDirectoryMappings(_0x38551b)){const _0x9f39c=directoryIdentity(_0x1b630c[_0x5331fc(0xc5)]),_0x1cde31=_0x3e368c[_0x5331fc(0xb8)](_0x9f39c)??new Map();_0x1cde31['set'](directoryIdentity(_0x1b630c['alias']),_0x1b630c[_0x5331fc(0xe1)]),_0x3e368c[_0x5331fc(0xc6)](_0x9f39c,_0x1cde31);}const _0x32b5e9=new Map();for(const [_0x4e7c80,_0x14a4de]of _0x3e368c){if(_0x14a4de[_0x5331fc(0xcd)]>0x1)throw hookDirectoryError(_0x5331fc(0xab),_0x5331fc(0xdc)+_0x4e7c80+_0x5331fc(0xae)+[..._0x14a4de[_0x5331fc(0xb6)]()][_0x5331fc(0xd5)](',\x20')+'.',{'datasetCode':_0x4e7c80,'directories':[..._0x14a4de[_0x5331fc(0xb6)]()]});_0x32b5e9[_0x5331fc(0xc6)](_0x4e7c80,[..._0x14a4de[_0x5331fc(0xb6)]()][0x0]);}return _0x32b5e9;}export function assertUnambiguousHookDirectoryMappings(_0x52042b){const _0x1c7a8f=a276_0x3e9f,_0x18da33=new Map();for(const {alias:_0x457d41,datasetCode:_0x644d3d}of _0x52042b){const _0x1998d3=directoryIdentity(_0x457d41),_0x10f165=_0x18da33['get'](_0x1998d3)??new Set();_0x10f165['add'](_0x644d3d),_0x18da33['set'](_0x1998d3,_0x10f165);}for(const [_0x4fbff0,_0x45a2af]of _0x18da33){if(_0x45a2af[_0x1c7a8f(0xcd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x1c7a8f(0xb1)+_0x4fbff0+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x4fbff0,'datasetCodes':[..._0x45a2af]});}}export function assertUnambiguousHookAliases(_0x3e9cca){const _0x33816a=a276_0x3e9f,_0x1c0712=[..._0x3e9cca],_0x4fc8cb=new Map(),_0x2c4c67=new Map();for(const {alias:_0x59e63f,datasetCode:_0x32c699}of _0x1c0712){const _0x3dc1ed=directoryIdentity(_0x59e63f),_0x34389d=directoryIdentity(_0x32c699),_0x4540cf=_0x4fc8cb['get'](_0x3dc1ed)??new Set();_0x4540cf[_0x33816a(0xda)](_0x32c699),_0x4fc8cb['set'](_0x3dc1ed,_0x4540cf);const _0x4fbfc5=_0x2c4c67[_0x33816a(0xb8)](_0x34389d)??new Set();_0x4fbfc5['add'](_0x59e63f),_0x2c4c67[_0x33816a(0xc6)](_0x34389d,_0x4fbfc5);}for(const [_0x5f3847,_0x230a6b]of _0x4fc8cb){if(_0x230a6b[_0x33816a(0xcd)]>0x1)throw hookDirectoryError(_0x33816a(0xd0),_0x33816a(0xd4)+_0x5f3847+_0x33816a(0xb2),{'alias':_0x5f3847,'datasetCodes':[..._0x230a6b]});}for(const [_0x3d4e29,_0x39cde5]of _0x2c4c67){if(_0x39cde5[_0x33816a(0xcd)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x33816a(0xdc)+_0x3d4e29+_0x33816a(0xc1),{'datasetCode':_0x3d4e29,'aliases':[..._0x39cde5]});}}export function buildHookDirectoryIndexes(_0x4a6f67,_0xa1649c=[]){const _0x2f7843=a276_0x3e9f,_0x48d39e=[..._0xa1649c];assertUnambiguousHookDirectoryMappings(_0x48d39e[_0x2f7843(0xd3)](([_0x3f1375,_0x2f7427])=>({'alias':_0x3f1375,'datasetCode':_0x2f7427})));const _0x2bf4cf=new Map(),_0x562a00=new Map();for(const _0x36b30a of _0x4a6f67){appendUnique(_0x2bf4cf,directoryIdentity(_0x36b30a[_0x2f7843(0xdd)]),_0x36b30a,_0x2e3f7c=>_0x2e3f7c[_0x2f7843(0xdd)]);}for(const [_0x2c2467,_0x1a5ba3]of _0x48d39e){appendUnique(_0x562a00,directoryIdentity(_0x2c2467),_0x1a5ba3,_0xa94595=>_0xa94595);}return{'datasetCodeToDatasets':_0x2bf4cf,'aliasToDatasetCodes':_0x562a00};}export function resolvePushHookDirectory(_0x30f85b,_0x406c16,_0x1ce10f){const _0x2cbf78=a276_0x3e9f,_0x175561=directoryIdentity(_0x30f85b),_0x4b5991=_0x1ce10f[_0x2cbf78(0xd7)][_0x2cbf78(0xb8)](_0x175561)??[],_0x346dbf=_0x1ce10f[_0x2cbf78(0xd9)][_0x2cbf78(0xb8)](_0x175561)??[],_0x160f67=new Set([..._0x4b5991[_0x2cbf78(0xd3)](_0x185a1=>_0x185a1[_0x2cbf78(0xdd)]),..._0x346dbf]);if(_0x160f67[_0x2cbf78(0xcd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x2cbf78(0xb1)+_0x30f85b+_0x2cbf78(0xc2),{'directoryName':_0x30f85b,'datasetCodes':[..._0x160f67]});const _0x54d396=[..._0x160f67][0x0];if(_0x54d396&&_0x406c16?.[_0x2cbf78(0xc5)]&&_0x54d396!==_0x406c16[_0x2cbf78(0xc5)])throw hookDirectoryError('HOOK_MAPPING_DRIFT',_0x2cbf78(0xb1)+_0x30f85b+_0x2cbf78(0xaa)+_0x406c16[_0x2cbf78(0xc5)]+_0x2cbf78(0xbc)+_0x54d396+'\x22.',{'directoryName':_0x30f85b,'datasetCode':_0x54d396,'lockedDatasetCode':_0x406c16[_0x2cbf78(0xc5)]});const _0x1d1211=_0x54d396?findDatasetByCode(_0x1ce10f,_0x54d396):undefined,_0x14b410=!!_0x54d396&&_0x346dbf[_0x2cbf78(0xba)](_0x54d396);if(_0x1d1211)return{'dataset':_0x1d1211,'datasetCode':_0x1d1211[_0x2cbf78(0xdd)],..._0x14b410?{'alias':_0x30f85b}:{},'directoryProtocol':_0x14b410?_0x2cbf78(0xe1):_0x2cbf78(0xc5),'warnings':[]};const _0x30593e=_0x406c16?.[_0x2cbf78(0xc5)];if(_0x30593e){const _0x2d2f10=findDatasetByCode(_0x1ce10f,_0x30593e);if(_0x2d2f10)return{'dataset':_0x2d2f10,'datasetCode':_0x2d2f10['code'],..._0x406c16['alias']?{'alias':_0x406c16[_0x2cbf78(0xe1)]}:{},'directoryProtocol':_0x406c16['alias']?_0x2cbf78(0xe1):_0x2cbf78(0xc5),'warnings':[]};}if(_0x54d396||_0x30593e){const _0x492971=_0x54d396??_0x30593e;throw hookDirectoryError(_0x2cbf78(0xb9),_0x2cbf78(0xb1)+_0x30f85b+_0x2cbf78(0xbb),{'directoryName':_0x30f85b,'datasetCode':_0x492971});}throw hookDirectoryError(_0x2cbf78(0xb4),'Cannot\x20resolve\x20HOOK\x20directory\x20\x22'+_0x30f85b+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0x30f85b});}export function preflightPushHookDirectories(_0x36d3fd,_0x2cb0d3,_0x52f445,_0x3251d6){const _0x143f7b=a276_0x3e9f,_0x294696=new Map(),_0x3a6ff0=new Map();for(const _0xdb614d of _0x36d3fd){if(_0xdb614d[_0x143f7b(0xbe)]!==_0x143f7b(0xe0))continue;const _0x44c9e2=_0xdb614d['alias'];if(!_0x44c9e2)throw hookDirectoryError(_0x143f7b(0xb4),_0x143f7b(0xc4)+_0xdb614d[_0x143f7b(0xc0)],{'lockKey':_0xdb614d['lockKey']});let _0x215325;try{_0x215325=resolvePushHookDirectory(_0x44c9e2,_0x2cb0d3['functions'][_0xdb614d[_0x143f7b(0xc0)]],_0x52f445);}catch(_0x5e53f7){if(_0x3251d6&&_0x5e53f7 instanceof CliError&&[_0x143f7b(0xb9),_0x143f7b(0xb4)][_0x143f7b(0xba)](_0x5e53f7[_0x143f7b(0xdd)])){_0x3251d6[_0x143f7b(0xc6)](_0xdb614d[_0x143f7b(0xc0)],_0x5e53f7[_0x143f7b(0xb0)]);continue;}throw _0x5e53f7;}_0x294696[_0x143f7b(0xc6)](_0xdb614d[_0x143f7b(0xc0)],_0x215325);const _0x3fe183=_0x3a6ff0[_0x143f7b(0xb8)](_0x215325['datasetCode'])??new Set();_0x3fe183['add'](_0x44c9e2),_0x3a6ff0[_0x143f7b(0xc6)](_0x215325[_0x143f7b(0xc5)],_0x3fe183);}for(const [_0x57a869,_0x550a56]of _0x3a6ff0){if(_0x550a56[_0x143f7b(0xcd)]>0x1)throw hookDirectoryError(_0x143f7b(0xab),_0x143f7b(0xdc)+_0x57a869+_0x143f7b(0xdb)+[..._0x550a56][_0x143f7b(0xd5)](',\x20')+'.',{'datasetCode':_0x57a869,'directories':[..._0x550a56]});}return _0x294696;}function a276_0x24e4(){const _0x4dd4ec=['HOOK_DATASET_CODE_AMBIGUOUS','lockKey','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','split','Incomplete\x20HOOK\x20path:\x20','datasetCode','set','NFC','toLowerCase','49138580ADXqwd','6371262JGaDlv','details','push','size','length','entries','HOOK_ALIAS_AMBIGUOUS','name','some','map','SDK\x20alias\x20\x22','join','48ybPzwr','datasetCodeToDatasets','408RiqWqG','aliasToDatasetCodes','add','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','Dataset\x20\x22','code','2751pTaZPN','Dataset\x20code\x20\x22','HOOK','alias','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','HOOK_DUPLICATE_DIRECTORIES','24096QKJXuX','functions','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','6202630svUVsQ','message','HOOK\x20directory\x20\x22','\x22\x20resolves\x20to\x20multiple\x20Datasets.','5678HTuaDd','HOOK_DIRECTORY_UNRESOLVED','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','values','325232FUMugR','get','HOOK_DATASET_NOT_FOUND','includes','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','\x22\x20to\x20\x22','3233628uFflDb','type'];a276_0x24e4=function(){return _0x4dd4ec;};return a276_0x24e4();}export function hookDirectoryError(_0x3eb164,_0x414de1,_0x344bd1){const _0x1a34b0=a276_0x3e9f,_0x11edac=new CliError(_0x3eb164,0x2,_0x3eb164+':\x20'+_0x414de1);return _0x11edac[_0x1a34b0(0xcb)]=_0x344bd1,_0x11edac;}function a276_0x3e9f(_0x293416,_0x680ab2){_0x293416=_0x293416-0xaa;const _0x24e4f3=a276_0x24e4();let _0x3e9f64=_0x24e4f3[_0x293416];return _0x3e9f64;}function findDatasetByCode(_0x3282a9,_0x56869a){const _0x208d75=a276_0x3e9f,_0x4f6d42=_0x3282a9[_0x208d75(0xd7)][_0x208d75(0xb8)](directoryIdentity(_0x56869a))??[];if(_0x4f6d42[_0x208d75(0xce)]>0x1)throw hookDirectoryError(_0x208d75(0xbf),_0x208d75(0xdf)+_0x56869a+_0x208d75(0xb5),{'datasetCode':_0x56869a,'candidates':_0x4f6d42[_0x208d75(0xd3)](datasetFact)});return _0x4f6d42[0x0];}function directoryIdentity(_0x1547b3){const _0x20744a=a276_0x3e9f;return _0x1547b3['normalize'](_0x20744a(0xc7))[_0x20744a(0xc8)]();}function appendUnique(_0x48a026,_0xeef9f1,_0x3525d0,_0x466f19){const _0x2059d0=a276_0x3e9f,_0x55b70b=_0x48a026[_0x2059d0(0xb8)](_0xeef9f1)??[];!_0x55b70b[_0x2059d0(0xd2)](_0x55f656=>_0x466f19(_0x55f656)===_0x466f19(_0x3525d0))&&_0x55b70b['push'](_0x3525d0),_0x48a026[_0x2059d0(0xc6)](_0xeef9f1,_0x55b70b);}function datasetFact(_0x47df4f){const _0x564924=a276_0x3e9f;return{'id':_0x47df4f['id'],'name':_0x47df4f[_0x564924(0xd1)],'datasetCode':_0x47df4f[_0x564924(0xdd)]};}
|
|
1
|
+
(function(_0x3ec328,_0x38c47c){const _0x430972=a281_0x3254,_0x52f2bc=_0x3ec328();while(!![]){try{const _0x4a1f84=-parseInt(_0x430972(0xe8))/0x1*(-parseInt(_0x430972(0xde))/0x2)+-parseInt(_0x430972(0xf5))/0x3+parseInt(_0x430972(0xc3))/0x4+parseInt(_0x430972(0xda))/0x5+parseInt(_0x430972(0xef))/0x6+-parseInt(_0x430972(0xdc))/0x7+-parseInt(_0x430972(0xd4))/0x8;if(_0x4a1f84===_0x38c47c)break;else _0x52f2bc['push'](_0x52f2bc['shift']());}catch(_0x3714cd){_0x52f2bc['push'](_0x52f2bc['shift']());}}}(a281_0x1798,0x5f40d));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x512280){const _0x739556=a281_0x3254,_0x2ebd00=[];for(const [_0x35b2d1,_0x9d174]of Object[_0x739556(0xd5)](_0x512280[_0x739556(0xd2)])){const [_0x5d56dd,_0x323a58]=_0x35b2d1[_0x739556(0xce)]('/');if(_0x5d56dd!=='HOOK'||!_0x323a58||!_0x9d174[_0x739556(0xcf)])continue;_0x2ebd00[_0x739556(0xe0)]({'alias':_0x323a58,'datasetCode':_0x9d174[_0x739556(0xcf)]});}return _0x2ebd00;}export function uniqueTrackedHookDirectoryByDataset(_0x5d7eba){const _0x49d464=a281_0x3254,_0x50a1de=new Map();for(const _0x38ae9d of trackedHookDirectoryMappings(_0x5d7eba)){const _0x2718a0=directoryIdentity(_0x38ae9d[_0x49d464(0xcf)]),_0x45b229=_0x50a1de['get'](_0x2718a0)??new Map();_0x45b229[_0x49d464(0xe7)](directoryIdentity(_0x38ae9d[_0x49d464(0xf1)]),_0x38ae9d[_0x49d464(0xf1)]),_0x50a1de[_0x49d464(0xe7)](_0x2718a0,_0x45b229);}const _0x565bb1=new Map();for(const [_0x275fb9,_0x78af73]of _0x50a1de){if(_0x78af73[_0x49d464(0xdd)]>0x1)throw hookDirectoryError(_0x49d464(0xd9),_0x49d464(0xea)+_0x275fb9+_0x49d464(0xeb)+[..._0x78af73['values']()][_0x49d464(0xcb)](',\x20')+'.',{'datasetCode':_0x275fb9,'directories':[..._0x78af73[_0x49d464(0xc8)]()]});_0x565bb1[_0x49d464(0xe7)](_0x275fb9,[..._0x78af73[_0x49d464(0xc8)]()][0x0]);}return _0x565bb1;}export function assertUnambiguousHookDirectoryMappings(_0x311def){const _0x5c97a9=a281_0x3254,_0x14dcdc=new Map();for(const {alias:_0x4c4187,datasetCode:_0x4caedc}of _0x311def){const _0x2489cf=directoryIdentity(_0x4c4187),_0x105c87=_0x14dcdc[_0x5c97a9(0xd0)](_0x2489cf)??new Set();_0x105c87['add'](_0x4caedc),_0x14dcdc[_0x5c97a9(0xe7)](_0x2489cf,_0x105c87);}for(const [_0x529434,_0x4f16fe]of _0x14dcdc){if(_0x4f16fe['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x5c97a9(0xe1)+_0x529434+_0x5c97a9(0xca),{'directoryName':_0x529434,'datasetCodes':[..._0x4f16fe]});}}export function assertUnambiguousHookAliases(_0x455827){const _0x196ea7=a281_0x3254,_0x4eecba=[..._0x455827],_0x45dbb1=new Map(),_0x97c539=new Map();for(const {alias:_0x22111e,datasetCode:_0x4ed6b7}of _0x4eecba){const _0x18f960=directoryIdentity(_0x22111e),_0x3c70c0=directoryIdentity(_0x4ed6b7),_0x4db20c=_0x45dbb1['get'](_0x18f960)??new Set();_0x4db20c[_0x196ea7(0xcd)](_0x4ed6b7),_0x45dbb1['set'](_0x18f960,_0x4db20c);const _0xf33447=_0x97c539['get'](_0x3c70c0)??new Set();_0xf33447[_0x196ea7(0xcd)](_0x22111e),_0x97c539['set'](_0x3c70c0,_0xf33447);}for(const [_0x36419e,_0x557a13]of _0x45dbb1){if(_0x557a13[_0x196ea7(0xdd)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x196ea7(0xed)+_0x36419e+_0x196ea7(0xca),{'alias':_0x36419e,'datasetCodes':[..._0x557a13]});}for(const [_0x30a228,_0x489dcc]of _0x97c539){if(_0x489dcc[_0x196ea7(0xdd)]>0x1)throw hookDirectoryError(_0x196ea7(0xf2),_0x196ea7(0xea)+_0x30a228+'\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.',{'datasetCode':_0x30a228,'aliases':[..._0x489dcc]});}}export function buildHookDirectoryIndexes(_0x46528c,_0x8efbb3=[]){const _0x4fd9e7=a281_0x3254,_0x57c013=[..._0x8efbb3];assertUnambiguousHookDirectoryMappings(_0x57c013['map'](([_0x1b03b0,_0x5de580])=>({'alias':_0x1b03b0,'datasetCode':_0x5de580})));const _0x854a7d=new Map(),_0x4ddaf4=new Map();for(const _0x4b1418 of _0x46528c){appendUnique(_0x854a7d,directoryIdentity(_0x4b1418[_0x4fd9e7(0xd7)]),_0x4b1418,_0x107904=>_0x107904[_0x4fd9e7(0xd7)]);}for(const [_0x267c65,_0x528a30]of _0x57c013){appendUnique(_0x4ddaf4,directoryIdentity(_0x267c65),_0x528a30,_0x25336e=>_0x25336e);}return{'datasetCodeToDatasets':_0x854a7d,'aliasToDatasetCodes':_0x4ddaf4};}export function resolvePushHookDirectory(_0xce70c9,_0x7053c4,_0x358c49){const _0x195b1e=a281_0x3254,_0x1fb9cb=directoryIdentity(_0xce70c9),_0x393b01=_0x358c49[_0x195b1e(0xc9)][_0x195b1e(0xd0)](_0x1fb9cb)??[],_0x2f70d1=_0x358c49['aliasToDatasetCodes'][_0x195b1e(0xd0)](_0x1fb9cb)??[],_0x1241ad=new Set([..._0x393b01[_0x195b1e(0xe9)](_0x1ab7fb=>_0x1ab7fb[_0x195b1e(0xd7)]),..._0x2f70d1]);if(_0x1241ad[_0x195b1e(0xdd)]>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x195b1e(0xe1)+_0xce70c9+_0x195b1e(0xe2),{'directoryName':_0xce70c9,'datasetCodes':[..._0x1241ad]});const _0x2be483=[..._0x1241ad][0x0];if(_0x2be483&&_0x7053c4?.['datasetCode']&&_0x2be483!==_0x7053c4[_0x195b1e(0xcf)])throw hookDirectoryError(_0x195b1e(0xd8),_0x195b1e(0xe1)+_0xce70c9+'\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22'+_0x7053c4['datasetCode']+_0x195b1e(0xdf)+_0x2be483+'\x22.',{'directoryName':_0xce70c9,'datasetCode':_0x2be483,'lockedDatasetCode':_0x7053c4[_0x195b1e(0xcf)]});const _0xaea957=_0x2be483?findDatasetByCode(_0x358c49,_0x2be483):undefined,_0x53be19=!!_0x2be483&&_0x2f70d1[_0x195b1e(0xe5)](_0x2be483);if(_0xaea957)return{'dataset':_0xaea957,'datasetCode':_0xaea957[_0x195b1e(0xd7)],..._0x53be19?{'alias':_0xce70c9}:{},'directoryProtocol':_0x53be19?_0x195b1e(0xf1):_0x195b1e(0xcf),'warnings':[]};const _0x888a0f=_0x7053c4?.[_0x195b1e(0xcf)];if(_0x888a0f){const _0x2754c7=findDatasetByCode(_0x358c49,_0x888a0f);if(_0x2754c7)return{'dataset':_0x2754c7,'datasetCode':_0x2754c7[_0x195b1e(0xd7)],..._0x7053c4['alias']?{'alias':_0x7053c4[_0x195b1e(0xf1)]}:{},'directoryProtocol':_0x7053c4[_0x195b1e(0xf1)]?_0x195b1e(0xf1):_0x195b1e(0xcf),'warnings':[]};}if(_0x2be483||_0x888a0f){const _0x746d79=_0x2be483??_0x888a0f;throw hookDirectoryError(_0x195b1e(0xe3),'HOOK\x20directory\x20\x22'+_0xce70c9+_0x195b1e(0xd6),{'directoryName':_0xce70c9,'datasetCode':_0x746d79});}throw hookDirectoryError(_0x195b1e(0xd1),_0x195b1e(0xc7)+_0xce70c9+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0xce70c9});}function a281_0x1798(){const _0x7e7fd9=['code','HOOK_MAPPING_DRIFT','HOOK_DUPLICATE_DIRECTORIES','3706700TAGULE','Incomplete\x20HOOK\x20path:\x20','5202897NgXiJp','size','12ymSClK','\x22\x20to\x20\x22','push','HOOK\x20directory\x20\x22','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DATASET_NOT_FOUND','lockKey','includes','toLowerCase','set','67697GBSjZS','map','Dataset\x20\x22','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','message','SDK\x20alias\x20\x22','HOOK','1035666Tnmtht','Dataset\x20code\x20\x22','alias','HOOK_ALIAS_AMBIGUOUS','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','type','169335zNRALu','NFC','2988584izFItu','name','HOOK_DATASET_CODE_AMBIGUOUS','normalize','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','values','datasetCodeToDatasets','\x22\x20resolves\x20to\x20multiple\x20Datasets.','join','some','add','split','datasetCode','get','HOOK_DIRECTORY_UNRESOLVED','functions','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','7019248JmSUxd','entries','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.'];a281_0x1798=function(){return _0x7e7fd9;};return a281_0x1798();}export function preflightPushHookDirectories(_0x4b01a4,_0x2f22bb,_0x4205b0,_0x50d5fb){const _0x57bc9f=a281_0x3254,_0xf6e6d7=new Map(),_0x181548=new Map();for(const _0x3a4eae of _0x4b01a4){if(_0x3a4eae[_0x57bc9f(0xf4)]!==_0x57bc9f(0xee))continue;const _0x44492b=_0x3a4eae[_0x57bc9f(0xf1)];if(!_0x44492b)throw hookDirectoryError(_0x57bc9f(0xd1),_0x57bc9f(0xdb)+_0x3a4eae[_0x57bc9f(0xe4)],{'lockKey':_0x3a4eae[_0x57bc9f(0xe4)]});let _0x5b8b0e;try{_0x5b8b0e=resolvePushHookDirectory(_0x44492b,_0x2f22bb[_0x57bc9f(0xd2)][_0x3a4eae[_0x57bc9f(0xe4)]],_0x4205b0);}catch(_0x1ae17b){if(_0x50d5fb&&_0x1ae17b instanceof CliError&&[_0x57bc9f(0xe3),_0x57bc9f(0xd1)][_0x57bc9f(0xe5)](_0x1ae17b[_0x57bc9f(0xd7)])){_0x50d5fb[_0x57bc9f(0xe7)](_0x3a4eae[_0x57bc9f(0xe4)],_0x1ae17b[_0x57bc9f(0xec)]);continue;}throw _0x1ae17b;}_0xf6e6d7['set'](_0x3a4eae[_0x57bc9f(0xe4)],_0x5b8b0e);const _0x482f25=_0x181548[_0x57bc9f(0xd0)](_0x5b8b0e[_0x57bc9f(0xcf)])??new Set();_0x482f25[_0x57bc9f(0xcd)](_0x44492b),_0x181548[_0x57bc9f(0xe7)](_0x5b8b0e[_0x57bc9f(0xcf)],_0x482f25);}for(const [_0x3054d1,_0x1e0634]of _0x181548){if(_0x1e0634['size']>0x1)throw hookDirectoryError(_0x57bc9f(0xd9),_0x57bc9f(0xea)+_0x3054d1+_0x57bc9f(0xf3)+[..._0x1e0634][_0x57bc9f(0xcb)](',\x20')+'.',{'datasetCode':_0x3054d1,'directories':[..._0x1e0634]});}return _0xf6e6d7;}export function hookDirectoryError(_0x3f067f,_0x12e0ea,_0x317842){const _0x1a69c0=new CliError(_0x3f067f,0x2,_0x3f067f+':\x20'+_0x12e0ea);return _0x1a69c0['details']=_0x317842,_0x1a69c0;}function findDatasetByCode(_0x1cc408,_0x20f49f){const _0xd6b3cb=a281_0x3254,_0x9df8ed=_0x1cc408[_0xd6b3cb(0xc9)][_0xd6b3cb(0xd0)](directoryIdentity(_0x20f49f))??[];if(_0x9df8ed['length']>0x1)throw hookDirectoryError(_0xd6b3cb(0xc5),_0xd6b3cb(0xf0)+_0x20f49f+_0xd6b3cb(0xd3),{'datasetCode':_0x20f49f,'candidates':_0x9df8ed[_0xd6b3cb(0xe9)](datasetFact)});return _0x9df8ed[0x0];}function a281_0x3254(_0xb85f85,_0x3701ea){_0xb85f85=_0xb85f85-0xc3;const _0x17986f=a281_0x1798();let _0x3254ad=_0x17986f[_0xb85f85];return _0x3254ad;}function directoryIdentity(_0x529445){const _0x22bb4e=a281_0x3254;return _0x529445[_0x22bb4e(0xc6)](_0x22bb4e(0xf6))[_0x22bb4e(0xe6)]();}function appendUnique(_0x173887,_0x1b1071,_0x4aa76d,_0x26b77d){const _0x41ac62=a281_0x3254,_0x10f7d4=_0x173887[_0x41ac62(0xd0)](_0x1b1071)??[];!_0x10f7d4[_0x41ac62(0xcc)](_0x4c1372=>_0x26b77d(_0x4c1372)===_0x26b77d(_0x4aa76d))&&_0x10f7d4[_0x41ac62(0xe0)](_0x4aa76d),_0x173887[_0x41ac62(0xe7)](_0x1b1071,_0x10f7d4);}function datasetFact(_0x4549d1){const _0x4a3b07=a281_0x3254;return{'id':_0x4549d1['id'],'name':_0x4549d1[_0x4a3b07(0xc4)],'datasetCode':_0x4549d1[_0x4a3b07(0xd7)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a282_0x431b(){const _0x3a3786=['4003173tnvTev','\x22.\x20','772436DkmWXg','50RxBYwn',':\x20scriptsRoot\x20mismatch\x20—\x20','11trsxiN','lastSync','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','840537BHaQKL','8UsONqs','159756EqiNea','functions','scriptsRoot','stringify','13743670MPCUnY','2dlJvDc','apps','ENOENT','code','2660203BNDJAN','116257PixNbo','utf8','object','current\x20\x22'];a282_0x431b=function(){return _0x3a3786;};return a282_0x431b();}(function(_0x1e508d,_0x59ec12){const _0x272d5b=a282_0xa5bf,_0x4d99ef=_0x1e508d();while(!![]){try{const _0x1fba50=-parseInt(_0x272d5b(0x145))/0x1*(parseInt(_0x272d5b(0x158))/0x2)+parseInt(_0x272d5b(0x151))/0x3+-parseInt(_0x272d5b(0x14b))/0x4+parseInt(_0x272d5b(0x14c))/0x5*(-parseInt(_0x272d5b(0x153))/0x6)+-parseInt(_0x272d5b(0x144))/0x7+-parseInt(_0x272d5b(0x152))/0x8*(parseInt(_0x272d5b(0x149))/0x9)+-parseInt(_0x272d5b(0x157))/0xa*(-parseInt(_0x272d5b(0x14e))/0xb);if(_0x1fba50===_0x59ec12)break;else _0x4d99ef['push'](_0x4d99ef['shift']());}catch(_0x1a1ca8){_0x4d99ef['push'](_0x4d99ef['shift']());}}}(a282_0x431b,0x3e08e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x5321a6,_0x14b747,_0x5218d5,_0x1c2aaf){const _0xc82af1=a282_0xa5bf,_0x1e62ed={'apps':_0x5321a6[_0xc82af1(0x141)]&&typeof _0x5321a6[_0xc82af1(0x141)]===_0xc82af1(0x147)?_0x5321a6[_0xc82af1(0x141)]:{}};let _0x482ed2=_0x1e62ed[_0xc82af1(0x141)][_0x14b747];if(!_0x482ed2)return _0x482ed2={'scriptsRoot':_0x5218d5,'lastSync':'','functions':{}},_0x1e62ed[_0xc82af1(0x141)][_0x14b747]=_0x482ed2,{'lockData':_0x1e62ed,'appLock':_0x482ed2};if(!_0x482ed2[_0xc82af1(0x155)])_0x482ed2[_0xc82af1(0x155)]=_0x5218d5;else{if(_0x482ed2[_0xc82af1(0x155)]!==_0x5218d5)throw new Error(_0x1c2aaf+_0xc82af1(0x14d)+(_0xc82af1(0x148)+_0x5218d5+'\x22\x20vs\x20lock\x20\x22'+_0x482ed2['scriptsRoot']+_0xc82af1(0x14a))+_0xc82af1(0x150));}return!_0x482ed2[_0xc82af1(0x154)]&&(_0x482ed2[_0xc82af1(0x154)]={}),!_0x482ed2[_0xc82af1(0x14f)]&&(_0x482ed2[_0xc82af1(0x14f)]=''),{'lockData':_0x1e62ed,'appLock':_0x482ed2};}export async function readBffLockFile(_0x415a19){const _0x5502b3=a282_0xa5bf;try{const _0x45d51c=await readFile(_0x415a19,'utf8'),_0x8df084=JSON['parse'](_0x45d51c);return{'apps':_0x8df084['apps']&&typeof _0x8df084[_0x5502b3(0x141)]==='object'?_0x8df084[_0x5502b3(0x141)]:{}};}catch(_0x567bbc){if(_0x567bbc[_0x5502b3(0x143)]===_0x5502b3(0x142))return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0x567bbc));}}function a282_0xa5bf(_0x39e985,_0x43acde){_0x39e985=_0x39e985-0x141;const _0x431bf6=a282_0x431b();let _0xa5bf43=_0x431bf6[_0x39e985];return _0xa5bf43;}export async function writeBffLockFile(_0x3f3888,_0x226d0a){const _0x2e446d=a282_0xa5bf;await mkdir(dirname(_0x3f3888),{'recursive':!![]}),await writeFile(_0x3f3888,JSON[_0x2e446d(0x156)](_0x226d0a,null,0x2),_0x2e446d(0x146));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x511b04=a284_0x3382;(function(_0x5169dc,_0x50fed4){const _0x200b2a=a284_0x3382,_0x3cbaec=_0x5169dc();while(!![]){try{const _0x17a376=parseInt(_0x200b2a(0x158))/0x1+-parseInt(_0x200b2a(0x162))/0x2*(parseInt(_0x200b2a(0x156))/0x3)+parseInt(_0x200b2a(0x161))/0x4+-parseInt(_0x200b2a(0x160))/0x5+parseInt(_0x200b2a(0x154))/0x6+parseInt(_0x200b2a(0x159))/0x7*(-parseInt(_0x200b2a(0x151))/0x8)+parseInt(_0x200b2a(0x14f))/0x9;if(_0x17a376===_0x50fed4)break;else _0x3cbaec['push'](_0x3cbaec['shift']());}catch(_0x14e18b){_0x3cbaec['push'](_0x3cbaec['shift']());}}}(a284_0x177b,0x3e58e));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a284_0x511b04(0x163);export function snakeToCamel(_0x3f8b49){const _0x59617b=a284_0x511b04;return _0x3f8b49['toLowerCase']()[_0x59617b(0x15e)](/_([a-z])/g,(_0x59b9df,_0x1b296e)=>_0x1b296e['toUpperCase']());}export function findHookLocationByRemoteId(_0x198483,_0x4d66d7){const _0x1c12dc=a284_0x511b04;if(!_0x4d66d7)return undefined;for(const [_0x30f90d,_0x55eafa]of Object[_0x1c12dc(0x15c)](_0x198483)){if(_0x55eafa['remoteId']===_0x4d66d7&&_0x55eafa['datasetCode']&&_0x55eafa[_0x1c12dc(0x153)]&&_0x55eafa[_0x1c12dc(0x15d)]){const _0x2ffe85=_0x30f90d[_0x1c12dc(0x15f)]('/')[0x1];return{'alias':_0x2ffe85||_0x55eafa['alias'],'datasetCode':_0x55eafa['datasetCode'],'operationType':_0x55eafa['operationType'],'functionNode':_0x55eafa['functionNode']};}}return undefined;}function a284_0x177b(){const _0x1160cc=['functionNode','replace','split','2199350TXAHJA','45516LOuyql','170BUfqXy','TODO:\x20add\x20script\x20description','after','9215334fhgdRU','before','667832wPstmY','startsWith','operationType','2377818AQbfwu','trim','17211UskBpS','toLowerCase','1718DKujtn','21tVbqKv','some','test','entries'];a284_0x177b=function(){return _0x1160cc;};return a284_0x177b();}function a284_0x3382(_0x4297a3,_0x53d7a7){_0x4297a3=_0x4297a3-0x14f;const _0x177bd3=a284_0x177b();let _0x3382ee=_0x177bd3[_0x4297a3];return _0x3382ee;}export function extractScriptDescription(_0x5ad072){const _0x4c635b=a284_0x511b04,_0x4e3549=_0x5ad072['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x4e3549?.[0x1])return undefined;const _0x19abb8=_0x4e3549[0x1],_0x56e79b=_0x260108=>{const _0x17fba8=a284_0x3382,_0xc58e4d=_0x260108?.[_0x17fba8(0x155)]();if(!_0xc58e4d||_0xc58e4d===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0xc58e4d===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0xc58e4d;},_0xc7e01f=_0x19abb8['match'](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0xc7e01f)return _0x56e79b(_0xc7e01f[0x1]);const _0x3e3012=_0x19abb8[_0x4c635b(0x15f)](/\r?\n/)['map'](_0x30a588=>_0x30a588['replace'](/^\s*\*\s?/,'')[_0x4c635b(0x155)]()),_0x37bf98=_0x3e3012[_0x4c635b(0x15a)](_0x2cfbb0=>/^\[\s*脚本类型\s*]\s*\S+/[_0x4c635b(0x15b)](_0x2cfbb0))&&_0x3e3012['some'](_0x53e347=>/^\[\s*脚本名称\s*]\s*\S+/[_0x4c635b(0x15b)](_0x53e347));if(!_0x37bf98)return undefined;for(const _0x3b6e76 of _0x3e3012){if(!_0x3b6e76||_0x3b6e76[_0x4c635b(0x152)]('@')||/^\[[^\]]+]\s*/[_0x4c635b(0x15b)](_0x3b6e76))continue;return _0x56e79b(_0x3b6e76);}return undefined;}export function isValidBffFunctionName(_0x3718bd){const _0x2f8c69=a284_0x511b04;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x2f8c69(0x15b)](_0x3718bd);}export function normalizeHookFunctionNode(_0x20fe7e){const _0x1856bd=a284_0x511b04;if(!_0x20fe7e)return undefined;const _0x33793c=_0x20fe7e[_0x1856bd(0x155)]()[_0x1856bd(0x157)]();if(_0x33793c===_0x1856bd(0x150)||_0x33793c===_0x1856bd(0x164))return _0x33793c;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a285_0x1df8dc=a285_0x1415;(function(_0x1fe1ad,_0x7b10cd){const _0x41bb30=a285_0x1415,_0xaadb4f=_0x1fe1ad();while(!![]){try{const _0x59f9fe=-parseInt(_0x41bb30(0x1bf))/0x1+parseInt(_0x41bb30(0x1c3))/0x2+parseInt(_0x41bb30(0x1c8))/0x3+-parseInt(_0x41bb30(0x1c4))/0x4+parseInt(_0x41bb30(0x1c2))/0x5*(parseInt(_0x41bb30(0x1c1))/0x6)+-parseInt(_0x41bb30(0x1c5))/0x7*(parseInt(_0x41bb30(0x1c7))/0x8)+parseInt(_0x41bb30(0x1c6))/0x9;if(_0x59f9fe===_0x7b10cd)break;else _0xaadb4f['push'](_0xaadb4f['shift']());}catch(_0x36775e){_0xaadb4f['push'](_0xaadb4f['shift']());}}}(a285_0x4001,0x8e163));function a285_0x1415(_0x3456d1,_0x213856){_0x3456d1=_0x3456d1-0x1bf;const _0x40013b=a285_0x4001();let _0x141542=_0x40013b[_0x3456d1];return _0x141542;}export const CROSS_DB_RELATION_PATHS={'list':a285_0x1df8dc(0x1c9),'create':'/smartapi/cross-db-relation/create','update':'/smartapi/cross-db-relation/update','delete':a285_0x1df8dc(0x1c0)};function a285_0x4001(){const _0x2fc3e3=['513501BPjWDr','/smartapi/cross-db-relation/query','733527gKqAWI','/smartapi/cross-db-relation/delete','6KUhsyO','529195qHOhvz','952826qljkMw','334212pGsvul','1666IxprRc','16013178GddwKo','38104nhhqxB'];a285_0x4001=function(){return _0x2fc3e3;};return a285_0x4001();}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d7088,_0x2b88f9){const _0x51eace=a286_0x167d,_0x3a5796=_0x5d7088();while(!![]){try{const _0x3e2c34=-parseInt(_0x51eace(0xab))/0x1*(parseInt(_0x51eace(0x9c))/0x2)+-parseInt(_0x51eace(0x9d))/0x3*(parseInt(_0x51eace(0xb0))/0x4)+parseInt(_0x51eace(0xa3))/0x5+parseInt(_0x51eace(0xa7))/0x6*(parseInt(_0x51eace(0x9a))/0x7)+parseInt(_0x51eace(0xa8))/0x8+-parseInt(_0x51eace(0xaf))/0x9+parseInt(_0x51eace(0x99))/0xa*(parseInt(_0x51eace(0xa1))/0xb);if(_0x3e2c34===_0x2b88f9)break;else _0x3a5796['push'](_0x3a5796['shift']());}catch(_0x2de0ec){_0x3a5796['push'](_0x3a5796['shift']());}}}(a286_0x4a1c,0xd1545));import{listDatasets}from'../core/api-client.js';function a286_0x167d(_0x6794c6,_0x4d3c0c){_0x6794c6=_0x6794c6-0x99;const _0x4a1ce6=a286_0x4a1c();let _0x167df0=_0x4a1ce6[_0x6794c6];return _0x167df0;}const cache=new Map();export async function listDatabases(_0x8f989b){const _0x213461=a286_0x167d;if(cache[_0x213461(0x9e)](_0x8f989b))return cache['get'](_0x8f989b);const _0x59baab=await listDatasets(_0x8f989b),_0xd649bd=new Map();for(const _0x2e2481 of _0x59baab){const _0x1586f5=_0x2e2481[_0x213461(0xa2)];_0x1586f5?.[_0x213461(0x9f)]!=null&&_0xd649bd[_0x213461(0xb2)](_0x1586f5[_0x213461(0x9f)],_0x1586f5[_0x213461(0xa5)]??'db-'+_0x1586f5[_0x213461(0x9f)]);}const _0x3ba6f3=[..._0xd649bd[_0x213461(0xa6)]()][_0x213461(0xad)](([_0x2a8922,_0x263da6])=>({'dbId':_0x2a8922,'dbName':_0x263da6}));return cache[_0x213461(0xb2)](_0x8f989b,_0x3ba6f3),_0x3ba6f3;}export async function resolveDb(_0x4742ee,_0x3e3acd){const _0x408869=a286_0x167d,_0x39ce2c=await listDatabases(_0x4742ee);if(_0x39ce2c[_0x408869(0xb1)]===0x0)return{'resolved':[],'error':_0x408869(0xa4)+_0x4742ee+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x3e3acd)return{'resolved':_0x39ce2c};const _0x487336=Number(_0x3e3acd);if(!Number['isNaN'](_0x487336)){const _0x432419=_0x39ce2c['find'](_0x6d42b1=>_0x6d42b1[_0x408869(0x9f)]===_0x487336);if(_0x432419)return{'resolved':[_0x432419]};}const _0x3c671b=_0x3e3acd[_0x408869(0xb4)](),_0x5401b8=_0x39ce2c['filter'](_0x1433e6=>_0x1433e6[_0x408869(0xa5)][_0x408869(0xb4)]()[_0x408869(0xaa)](_0x3c671b));if(_0x5401b8[_0x408869(0xb1)]>0x0)return{'resolved':_0x5401b8};const _0x32893a=_0x39ce2c[_0x408869(0xad)](_0x55d7d3=>_0x55d7d3[_0x408869(0xa5)]+'\x20('+_0x55d7d3['dbId']+')')[_0x408869(0xa0)](',\x20');return{'resolved':[],'error':_0x408869(0x9b)+_0x3e3acd+'\x22\x20under\x20app\x20\x22'+_0x4742ee+'\x22.\x20Available:\x20'+_0x32893a+_0x408869(0xae)};}function a286_0x4a1c(){const _0x5cfbb2=['dbtableConfig','6629905XSWoUJ','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','dbName','entries','4777524cEBEwb','2209880ScLZbL','\x22\x20matches\x20multiple\x20databases:\x20','includes','639qwNDFo','find','map','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','3505140glKXhd','731144mIMfka','length','set','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','603580cZNOlD','7vcmDSJ','No\x20database\x20matching\x20\x22','2838XwvisT','6pgkggF','has','dbId','join','22dJObkq'];a286_0x4a1c=function(){return _0x5cfbb2;};return a286_0x4a1c();}export async function resolveOneDb(_0x3f9b30,_0x3dfa4d){const _0x3eeaa4=a286_0x167d,{resolved:_0x506d2b,error:_0x25d5b7}=await resolveDb(_0x3f9b30,_0x3dfa4d);if(_0x25d5b7)return{'db':null,'error':_0x25d5b7};if(_0x506d2b[_0x3eeaa4(0xb1)]===0x1)return{'db':_0x506d2b[0x0]};if(!_0x3dfa4d){const _0x1970aa=_0x506d2b['map'](_0x328f5f=>_0x328f5f[_0x3eeaa4(0xa5)]+'\x20('+_0x328f5f[_0x3eeaa4(0x9f)]+')')['join'](',\x20');return{'db':null,'error':_0x3eeaa4(0xb3)+_0x1970aa};}const _0x20b028=_0x506d2b[_0x3eeaa4(0xad)](_0x37a2e9=>_0x37a2e9[_0x3eeaa4(0xa5)]+'\x20('+_0x37a2e9[_0x3eeaa4(0x9f)]+')')[_0x3eeaa4(0xa0)](',\x20');return{'db':null,'error':'\x22'+_0x3dfa4d+_0x3eeaa4(0xa9)+_0x20b028+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x29f78e,_0x44e7c2){const _0x33f96a=a286_0x167d,_0x191118=await listDatabases(_0x29f78e);return _0x191118[_0x33f96a(0xac)](_0x432121=>_0x432121[_0x33f96a(0x9f)]===_0x44e7c2)?.['dbName'];}
|
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a282_0x2222(){const _0x38777f=['INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.failurePolicy','flowName','9reNkSh','FIXED\x20assignee\x20requires\x20userIds.','.expression','NOTIFICATION\x20node\x20requires\x20config.','get','conditionType','message','cc.recipientUserIds\x20supports\x20at\x20most\x20','.async','replace','.configCode','.scriptName','approval_sys_initiatorUserId','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','.timeout.resultVariable','INDEPENDENT_FLOW','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','CONDITION','Duplicate\x20BPMN\x20element\x20id:\x20','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','result','approval_sys_processInstanceId','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','.value','parse','.recipients','.cc.recipientUserIds[','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','approvalMode','nodes\x20must\x20be\x20an\x20array.','template','value\x20must\x20be\x20a\x20non-empty\x20string.','edges','\x20facts.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20approval\x20mode:\x20','EXECUTE_BFF','name','detailMarkdown','.approvalMode','defaultFlow','^[A-Za-z_][A-Za-z0-9_]*$','delete','recipientUserIds','pageMode','array','scriptName','FIXED','variables','Notification\x20recipients\x20must\x20be\x20an\x20array.','approval.simple-flow.v1','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','Notification\x20recipient\x20must\x20be\x20an\x20object.','flowJson\x20must\x20be\x20an\x20object.','mode','bindDatasetCode','version','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','metadata','failurePolicy','value','.url','Edge\x20target\x20node\x20not\x20found:\x20','schemaVersion','Node\x20has\x20no\x20outgoing\x20edge.','2435870eEeZXE','AUTO_APPROVE','recipients','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.assignee.userIds[',',\x20but\x20node\x20','Notification\x20template.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','1469615pBHkls','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.assignee.roleId','edge\x20target\x20is\x20required.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','6efGqov','#/$defs/position','formDefinitions','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20action.url\x20is\x20required.','templateName','.text','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.assignee.strategy','number','flowJson.nodes','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','\x20was\x20empty\x20and\x20was\x20removed.','edge\x20source\x20is\x20required.','defaultFlow\x20must\x20be\x20a\x20boolean.','AUTO_REJECT','appCode','.timeout','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','indexOf','.template','type','585957HLNoMT','Unsupported\x20schemaVersion:\x20','assignee','timeout\x20must\x20be\x20an\x20object.','.version','keys','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','flowJson.startPageId','utf8','add','size','START','.cc.visible','\x20->\x20','MINUTES','.timeout.duration','Notification\x20fact.','isSafeInteger','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','call','Duplicate\x20value:\x20','length','every','.cc.recipientUserIds','position.','.resultVariable','overwrite','forEach','PLATFORM_FORM','boolean','unit','text','sourceNodeId','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','has','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','includes','timeout.interrupting\x20must\x20be\x20a\x20boolean.','END','map','.target','NaN','edges\x20must\x20be\x20an\x20array.','startsWith','NOTIFICATION\x20node\x20requires\x20template.','.cc','transferCandidates','.source','toUpperCase','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','target','.tmp','flowJson.','.timeout.action','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','roleId','interrupting','.timeout.scriptName','approval_sys_operationType','flowDesc','context','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','flowJson.startPath','pid','slice','approval_sys_datasetCode','200RqLqLm','APPROVAL','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','.id','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','Unsupported\x20pageMode:\x20','DAYS','Duplicate\x20cc\x20recipient\x20userId:\x20','Duplicate\x20resultVariable:\x20','131540JyQQIu','approval_sys_pageId','.conditionType','.facts','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','14765RCEHjU','flowType','filter','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','Notification\x20template\x20supports\x20at\x20most\x20','FAIL','Every\x20node\x20requires\x20a\x20non-empty\x20name.','SCRIPT','HANDLE','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','cc\x20must\x20be\x20an\x20object.','USER','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','role','].taskMode','expression','url','integer','FORM_FLOW','configCode','.transferCandidates.userIds','waypoint.','SECONDS','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','targetNodeId','.cc.readSources','https://json-schema.org/draft/2020-12/schema','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','retryInterval','failurePolicy\x20must\x20be\x20a\x20string.','Unsupported\x20notification\x20version:\x20','flowKey','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','value\x20must\x20be\x20an\x20array.','timeout.enabled\x20must\x20be\x20a\x20boolean.','warnings','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','retryCount','flowJson.nodes.','async\x20must\x20be\x20an\x20object.','config','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','catch','object','#/$defs/userId','isInteger','SINGLE','Duplicate\x20edge\x20route:\x20','readSources','some','REJECTED','approval_sys_','ROLE','.waypoints','.role','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','isArray','https://lovrabet.com/schema/rabetbase-flow-config.json','transferCandidates\x20must\x20be\x20an\x20object.','empty_metadata_removed','strategy','flowName\x20is\x20required.','legacy_field_removed','datasetCode\x20must\x20be\x20a\x20string.','Node\x20has\x20no\x20incoming\x20edge.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','nodes','approval_sys_dataId','pageId','ANY','path','APPROVED','NOTIFICATION','Notification\x20action.text\x20is\x20required.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','action','Notification\x20fact\x20must\x20be\x20an\x20object.','actions','.async.retryInterval','stringify','timeout','prototype','userIds','Notification\x20template.facts\x20must\x20be\x20an\x20array.','test','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','470352ejWJvq','#/$defs/timeAmount','.path','.assignee.userIds','flowJson.schemaVersion','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','.type','1998096qZIBpz','taskMode','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.edges','event','.taskMode','.transferCandidates.userIds[','flowDesc\x20must\x20be\x20a\x20string.','formSchema','formPermission','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Notification\x20action\x20must\x20be\x20an\x20object.','string','flowJson.pageMode','.actions','CUSTOM_PAGE','.unit','Node\x20is\x20not\x20reachable\x20from\x20START.','^[1-9][0-9]*$','.pageId','Notification\x20recipient.type\x20is\x20required.','.name','sequential','trim','\x20must\x20be\x20a\x20finite\x20number.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.defaultFlow','startPageId','async','ALWAYS','enabled','label','.transferCandidates.strategy','push','resultVariable','hasOwnProperty','HOURS','scriptResult','startPath','edge\x20must\x20be\x20an\x20object.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','findIndex','Notification\x20template.actions\x20must\x20be\x20an\x20array.','.timeout.interrupting','position','.position.','.\x20This\x20CLI\x20supports\x20only\x20','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','waypoints','flowJson','.async.enabled','datasetCode','\x20actions.','isFinite','.detailMarkdown','source','ALL','EXPRESSION','Unsupported\x20condition\x20type:\x20','flowJson.nodes[','set','.waypoints[','entries'];a282_0x2222=function(){return _0x38777f;};return a282_0x2222();}const a282_0x44ca9e=a282_0x58dc;(function(_0x1fbedd,_0x328008){const _0x54e919=a282_0x58dc,_0x57b1c2=_0x1fbedd();while(!![]){try{const _0x402ad2=-parseInt(_0x54e919(0x1b5))/0x1+parseInt(_0x54e919(0xb3))/0x2+parseInt(_0x54e919(0x164))/0x3+parseInt(_0x54e919(0x1aa))/0x4*(parseInt(_0x54e919(0x1ba))/0x5)+-parseInt(_0x54e919(0x14d))/0x6*(-parseInt(_0x54e919(0x148))/0x7)+-parseInt(_0x54e919(0xba))/0x8*(parseInt(_0x54e919(0xff))/0x9)+-parseInt(_0x54e919(0x140))/0xa;if(_0x402ad2===_0x328008)break;else _0x57b1c2['push'](_0x57b1c2['shift']());}catch(_0x19acf4){_0x57b1c2['push'](_0x57b1c2['shift']());}}}(a282_0x2222,0x27d81));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a282_0x44ca9e(0x1d5),'$id':a282_0x44ca9e(0x1f8),'title':'Rabetbase\x20FlowConfig','type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xfe),a282_0x44ca9e(0x1bb),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a282_0x44ca9e(0xc7),'minLength':0x1},{'type':a282_0x44ca9e(0x1cb),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a282_0x44ca9e(0x157),'minimum':0x0},'y':{'type':a282_0x44ca9e(0x157),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a282_0x44ca9e(0x13b),'unit'],'properties':{'value':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},'unit':{'enum':[a282_0x44ca9e(0x1d0),a282_0x44ca9e(0x173),a282_0x44ca9e(0xe0),a282_0x44ca9e(0x1b2)]}},'additionalProperties':!![]},'flowNode':{'type':a282_0x44ca9e(0x1ea),'required':['id',a282_0x44ca9e(0x163),'name',a282_0x44ca9e(0xe9)],'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'type':{'enum':[a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),'APPROVAL',a282_0x44ca9e(0x110),a282_0x44ca9e(0x1c1),'NOTIFICATION']},'name':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':a282_0x44ca9e(0x14e)},'approvalMode':{'enum':[a282_0x44ca9e(0x1ed),a282_0x44ca9e(0xf5),a282_0x44ca9e(0xa2)]},'taskMode':{'enum':[a282_0x44ca9e(0x1ab),a282_0x44ca9e(0x1c2)]},'assignee':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x1fb)],'properties':{'strategy':{'enum':[a282_0x44ca9e(0x12e),a282_0x44ca9e(0x1f3)]},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}},'roleId':{'anyOf':[{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0xcd)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a282_0x44ca9e(0x1fb),a282_0x44ca9e(0xaf)],'properties':{'strategy':{'const':a282_0x44ca9e(0x12e)},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1)]},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'retryCount':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a282_0x44ca9e(0xb4)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'duration':{'$ref':a282_0x44ca9e(0xb4)},'action':{'enum':[a282_0x44ca9e(0x141),a282_0x44ca9e(0x15d),'EXECUTE_BFF']},'interrupting':{'type':a282_0x44ca9e(0x183)},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x12a)],'properties':{'recipientUserIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'visible':{'type':a282_0x44ca9e(0x12c),'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':['configCode','template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a282_0x44ca9e(0x1bf)]},'template':{'type':a282_0x44ca9e(0x1ea),'required':['title','summary'],'properties':{'title':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'summary':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'detailMarkdown':{'type':a282_0x44ca9e(0xc7)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xdb),a282_0x44ca9e(0x13b)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a282_0x44ca9e(0x12c),'maxItems':0x2,'items':{'type':'object','required':[a282_0x44ca9e(0x185),a282_0x44ca9e(0x1ca)],'properties':{'text':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'url':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a282_0x44ca9e(0x12c),'items':{'type':'object','required':[a282_0x44ca9e(0x163),a282_0x44ca9e(0x13b)],'properties':{'type':{'enum':['USER',a282_0x44ca9e(0x1f3),'EMAIL']},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a282_0x44ca9e(0x1ea),'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'source':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a282_0x44ca9e(0xd9),a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]},'expression':{'type':a282_0x44ca9e(0xc7)},'defaultFlow':{'type':'boolean'},'name':{'type':a282_0x44ca9e(0xc7)},'waypoints':{'type':a282_0x44ca9e(0x12c),'items':{'$ref':a282_0x44ca9e(0x14e)}}},'allOf':[{'anyOf':[{'required':[a282_0x44ca9e(0xf4)]},{'required':[a282_0x44ca9e(0x186)]}]},{'anyOf':[{'required':['target']},{'required':[a282_0x44ca9e(0x1d3)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'flowDesc':{'type':a282_0x44ca9e(0xc7)},'flowType':{'enum':[a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]},'datasetCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'pageId':{'type':a282_0x44ca9e(0x1cb)},'templateName':![],'flowJson':{'type':'object','required':['nodes','edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a282_0x44ca9e(0xc7),'const':'approval.simple-flow.v1','description':a282_0x44ca9e(0x16a)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a282_0x44ca9e(0xca)},'startPageId':![],'startPath':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'nodes':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a282_0x44ca9e(0xfe),a282_0x44ca9e(0x136),a282_0x44ca9e(0xf0),a282_0x44ca9e(0x15e),'pageId','templateName'],REMOVED_ROOT_FIELDS=['id',a282_0x44ca9e(0x15e),a282_0x44ca9e(0x152)],DEFAULT_FLOW_SCHEMA_VERSION=a282_0x44ca9e(0x131),NODE_TYPES=new Set([a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),a282_0x44ca9e(0x1ab),'CONDITION',a282_0x44ca9e(0x1c1),a282_0x44ca9e(0xa5)]),CONDITION_TYPES=new Set(['ALWAYS',a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]),APPROVAL_MODES=new Set([a282_0x44ca9e(0x1ed),'ALL',a282_0x44ca9e(0xa2)]),APPROVAL_TASK_MODES=new Set([a282_0x44ca9e(0x1ab),'HANDLE']),FLOW_TIME_UNITS=new Set(['SECONDS',a282_0x44ca9e(0x173),'HOURS',a282_0x44ca9e(0x1b2)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a282_0x44ca9e(0x141),'AUTO_REJECT',a282_0x44ca9e(0x123)]),FLOW_TYPES=new Set([a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]),FLOW_PAGE_MODES=new Set([a282_0x44ca9e(0xca),a282_0x44ca9e(0x182)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set(['CONTINUE',a282_0x44ca9e(0x1bf)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a282_0x44ca9e(0x1c5),a282_0x44ca9e(0x1f3),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a282_0x44ca9e(0xe1),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a282_0x44ca9e(0x198),RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a282_0x44ca9e(0x114),a282_0x44ca9e(0x10b),'approval_sys_initiatorUsername',a282_0x44ca9e(0x1a9),a282_0x44ca9e(0x1b6),a282_0x44ca9e(0x1a1),a282_0x44ca9e(0xa0)]);export function normalizeFlowConfig(_0x1a6b2b){const _0x32dd02=a282_0x44ca9e;if(!isRecord(_0x1a6b2b))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0xa83fea=cloneJsonValue(_0x1a6b2b),_0x5b0cb0=_0xa83fea[_0x32dd02(0xee)],_0x546436=isRecord(_0x5b0cb0)?cloneJsonValue(_0x5b0cb0):{},_0x350418=[],_0x8afb47=[];for(const _0x47ff01 of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x32dd02(0xdf)][_0x32dd02(0x179)](_0xa83fea,_0x47ff01))continue;delete _0xa83fea[_0x47ff01],_0x8afb47[_0x32dd02(0xdd)](_0x47ff01),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x47ff01,'message':_0x47ff01+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x299d14 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype']['hasOwnProperty']['call'](_0x546436,_0x299d14))continue;const _0x4aa000=_0x32dd02(0x19b)+_0x299d14;delete _0x546436[_0x299d14],_0x8afb47[_0x32dd02(0xdd)](_0x4aa000),_0x350418[_0x32dd02(0xdd)]({'code':'legacy_field_removed','path':_0x4aa000,'message':_0x4aa000+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x32dd02(0xae)]['hasOwnProperty']['call'](_0x546436,'schemaVersion')){const _0x41d63a=_0x546436['schemaVersion'],_0x3b943b=typeof _0x41d63a===_0x32dd02(0xc7)?_0x41d63a[_0x32dd02(0xd2)]():_0x41d63a;if(isEmptyJsonValue(_0x41d63a)||_0x3b943b===DEFAULT_FLOW_SCHEMA_VERSION){const _0x448990=_0x32dd02(0xb7);delete _0x546436[_0x32dd02(0x13e)],_0x8afb47['push'](_0x448990),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x448990,'message':_0x448990+_0x32dd02(0x160)+DEFAULT_FLOW_SCHEMA_VERSION+_0x32dd02(0x1c6)});}}removeEmptyMetadata(_0x546436,_0x32dd02(0xee),_0x350418,_0x8afb47);_0xa83fea['flowType']===_0x32dd02(0x10e)&&!Object['prototype'][_0x32dd02(0xdf)]['call'](_0x546436,'pageMode')&&(_0x546436[_0x32dd02(0x12b)]=_0x32dd02(0xca));_0xa83fea[_0x32dd02(0xee)]=_0x546436;if(typeof _0xa83fea[_0x32dd02(0xfe)]==='string')_0xa83fea[_0x32dd02(0xfe)]=_0xa83fea[_0x32dd02(0xfe)][_0x32dd02(0xd2)]();return{'config':_0xa83fea,'warnings':_0x350418,'removedPaths':_0x8afb47};}export function validateFlowConfig(_0x34c344){const _0x204d9c=a282_0x44ca9e;let _0x27d439;try{_0x27d439=normalizeFlowConfig(_0x34c344);}catch(_0x36a913){const _0x5d0cd0=_0x36a913 instanceof Error?_0x36a913[_0x204d9c(0x105)]:String(_0x36a913),_0x1ed424={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5d0cd0}],'warnings':[],'normalized':_0x1ed424,'validationConfig':_0x1ed424};}const _0x12fbbb=_0x27d439[_0x204d9c(0x1e7)],_0x162cd3=cloneJsonValue(_0x12fbbb),_0x481a46=_0x162cd3[_0x204d9c(0xee)];_0x481a46[_0x204d9c(0x1da)]='__rabetbase_local_validation__',_0x481a46['flowName']=_0x12fbbb[_0x204d9c(0xfe)];typeof _0x12fbbb[_0x204d9c(0xf0)]===_0x204d9c(0xc7)&&_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]()&&(_0x481a46[_0x204d9c(0x136)]=_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]());const _0x2a1f3c=[];return validateOuterMetadata(_0x12fbbb,_0x2a1f3c),validateFlowClassification(_0x12fbbb,_0x2a1f3c),validateGraph(_0x12fbbb[_0x204d9c(0xee)],_0x2a1f3c),{'valid':_0x2a1f3c[_0x204d9c(0x17b)]===0x0,'errors':_0x2a1f3c,'warnings':_0x27d439[_0x204d9c(0x1e1)],'normalized':_0x12fbbb,'validationConfig':_0x162cd3};}function validateFlowClassification(_0x46f08b,_0x1e4372){const _0x19d50c=a282_0x44ca9e;if(!isRecord(_0x46f08b[_0x19d50c(0xee)]))return;const _0x514561=_0x46f08b[_0x19d50c(0x1bb)],_0x2b04f2=_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x12b)];_0x2b04f2!==undefined&&(typeof _0x2b04f2!==_0x19d50c(0xc7)||!FLOW_PAGE_MODES[_0x19d50c(0x188)](_0x2b04f2))&&_0x1e4372[_0x19d50c(0xdd)]({'path':_0x19d50c(0xc8),'message':_0x19d50c(0x1b1)+String(_0x2b04f2)+'.'});_0x514561===_0x19d50c(0x1cc)&&_0x2b04f2!==undefined&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':_0x19d50c(0xc4)});_0x514561===_0x19d50c(0x10e)&&_0x2b04f2===_0x19d50c(0x182)&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x514561===_0x19d50c(0x1cc)||_0x514561===_0x19d50c(0x10e))&&validateCustomPageNavigation(_0x46f08b,_0x514561,_0x2b04f2,_0x1e4372);if(_0x514561!==_0x19d50c(0x1cc)||!Array['isArray'](_0x46f08b['flowJson']['nodes']))return;_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x9f)][_0x19d50c(0x181)]((_0xcfa2c9,_0x48dac0)=>{const _0x3b537b=_0x19d50c;isRecord(_0xcfa2c9)&&_0xcfa2c9['type']===_0x3b537b(0x1ab)&&_0xcfa2c9[_0x3b537b(0xbb)]===_0x3b537b(0x1c2)&&_0x1e4372[_0x3b537b(0xdd)]({'path':'flowJson.nodes['+_0x48dac0+_0x3b537b(0x1c8),'message':_0x3b537b(0xa7)});});}function validateCustomPageNavigation(_0x344448,_0x391fb4,_0x32c1a8,_0x1e418c){const _0x3b02ea=a282_0x44ca9e,_0xf4117=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xd7)];_0xf4117!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x16c),'message':_0x3b02ea(0x9e)});const _0x47dabe=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xe2)];_0x47dabe!==undefined&&(typeof _0x47dabe!==_0x3b02ea(0xc7)||_0x47dabe[_0x3b02ea(0xd2)]()==='')&&_0x1e418c['push']({'path':'flowJson.startPath','message':_0x3b02ea(0x1de)});const _0x32fcea=Array[_0x3b02ea(0x1f7)](_0x344448['flowJson'][_0x3b02ea(0x9f)])?_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0x9f)][_0x3b02ea(0x18d)]((_0xb0bc1a,_0x9fd931)=>({'node':_0xb0bc1a,'index':_0x9fd931}))[_0x3b02ea(0x1bc)](({node:_0x11b98b})=>isRecord(_0x11b98b)&&_0x11b98b[_0x3b02ea(0xa3)]!==undefined):[],_0x48cae3=_0x47dabe!==undefined||_0x32fcea[_0x3b02ea(0x17b)]>0x0,_0x6c29d8=_0x32c1a8===undefined&&_0x391fb4===_0x3b02ea(0x10e)?'CUSTOM_PAGE':_0x32c1a8;_0x48cae3&&(_0x391fb4!==_0x3b02ea(0x10e)||_0x6c29d8!==_0x3b02ea(0xca))&&(_0x47dabe!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x1a6),'message':_0x3b02ea(0xec)}),_0x32fcea['forEach'](({index:_0x5f0851})=>{const _0x550511=_0x3b02ea;_0x1e418c['push']({'path':_0x550511(0xf8)+_0x5f0851+'].path','message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x4efa75,_0x50a932,_0x43ff06={}){const _0x240f0b=a282_0x44ca9e,_0x32ee04=resolve(_0x4efa75),_0x2c0a11=_0x32ee04+'.'+process[_0x240f0b(0x1a7)]+'.'+randomUUID()+_0x240f0b(0x19a),_0x300b5d=JSON[_0x240f0b(0xac)](_0x50a932,null,0x2)+'\x0a';let _0x5b1f90;try{try{_0x5b1f90=(await stat(_0x32ee04))[_0x240f0b(0x135)]&0x1ff;}catch{_0x5b1f90=undefined;}await writeFile(_0x2c0a11,_0x300b5d,{'encoding':_0x240f0b(0x16d),'flag':'wx','mode':_0x5b1f90??0x1a4});if(_0x5b1f90!==undefined)await chmod(_0x2c0a11,_0x5b1f90);_0x43ff06[_0x240f0b(0x180)]===![]?(await link(_0x2c0a11,_0x32ee04),await unlink(_0x2c0a11)):await rename(_0x2c0a11,_0x32ee04);}finally{await unlink(_0x2c0a11)[_0x240f0b(0x1e9)](()=>undefined);}}function validateOuterMetadata(_0x183a88,_0x23b78f){const _0x4d360f=a282_0x44ca9e;(typeof _0x183a88[_0x4d360f(0xfe)]!==_0x4d360f(0xc7)||_0x183a88[_0x4d360f(0xfe)][_0x4d360f(0xd2)]()==='')&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xfe),'message':_0x4d360f(0x1fc)});_0x183a88[_0x4d360f(0x1a2)]!==undefined&&typeof _0x183a88['flowDesc']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1a2),'message':_0x4d360f(0xc1)});if(_0x183a88['flowType']===undefined||_0x183a88[_0x4d360f(0x1bb)]===null)_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'flowType\x20is\x20required.'});else(typeof _0x183a88[_0x4d360f(0x1bb)]!==_0x4d360f(0xc7)||!FLOW_TYPES[_0x4d360f(0x188)](_0x183a88[_0x4d360f(0x1bb)]))&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'Unsupported\x20flowType:\x20'+String(_0x183a88[_0x4d360f(0x1bb)])+'.'});_0x183a88[_0x4d360f(0xf0)]!==undefined&&typeof _0x183a88['datasetCode']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xf0),'message':_0x4d360f(0x9c)}),_0x183a88[_0x4d360f(0xa1)]!==undefined&&(!Number[_0x4d360f(0x1ec)](_0x183a88[_0x4d360f(0xa1)])||_0x183a88['pageId']<0x0)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x10c)}),_0x183a88[_0x4d360f(0x1bb)]==='INDEPENDENT_FLOW'&&_0x183a88[_0x4d360f(0xf0)]!==undefined&&_0x23b78f['push']({'path':_0x4d360f(0xf0),'message':_0x4d360f(0xfc)}),_0x183a88[_0x4d360f(0x1bb)]===_0x4d360f(0x10e)&&_0x183a88[_0x4d360f(0xa1)]!==undefined&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x16b)});}function validateGraph(_0x39ff9b,_0x6d3cbb){const _0x2f0cfd=a282_0x44ca9e;if(!isRecord(_0x39ff9b)){_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xee),'message':_0x2f0cfd(0x134)});return;}!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x9f)])&&_0x6d3cbb['push']({'path':_0x2f0cfd(0x158),'message':_0x2f0cfd(0x11c)});!Array['isArray'](_0x39ff9b[_0x2f0cfd(0x11f)])&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xbd),'message':_0x2f0cfd(0x190)});Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x2f0cfd(0x13e))&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xb7),'message':_0x2f0cfd(0x165)+String(_0x39ff9b[_0x2f0cfd(0x13e)])+_0x2f0cfd(0xeb)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x594c13 of[_0x2f0cfd(0xc2),_0x2f0cfd(0x14f),'formPermissions']){Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x594c13)&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.'+_0x594c13,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2f0cfd(0x1f7)](_0x39ff9b['nodes'])||!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x11f)]))return;const _0xe9542a=new Map(),_0x1a4671=[],_0xd48d93=[],_0x44d2f9=new Map(),_0x25b2c1=new Map(),_0x4a7eae=new Set();let _0x3476b5=0x0;_0x39ff9b[_0x2f0cfd(0x9f)][_0x2f0cfd(0x181)]((_0x190fd4,_0xbfb73a)=>{const _0xf472da=_0x2f0cfd,_0x3c9e14=_0xf472da(0xf8)+_0xbfb73a+']';if(!isRecord(_0x190fd4)){_0x6d3cbb['push']({'path':_0x3c9e14,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x3d82a7=_0x190fd4;if(typeof _0x3d82a7['id']!=='string'||!BPMN_ID_PATTERN[_0xf472da(0xb1)](_0x3d82a7['id']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':_0xf472da(0x143)});else _0xe9542a[_0xf472da(0x188)](_0x3d82a7['id'])?_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':'Duplicate\x20node\x20id:\x20'+_0x3d82a7['id']+'.'}):(_0xe9542a[_0xf472da(0xf9)](_0x3d82a7['id'],_0x3d82a7),_0x4a7eae['add'](_0x3d82a7['id']));if(!NODE_TYPES['has'](_0x3d82a7['type']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x3d82a7[_0xf472da(0x163)])+'.'});else{if(_0x3d82a7[_0xf472da(0x163)]==='START')_0x1a4671[_0xf472da(0xdd)](_0x3d82a7['id']);else _0x3d82a7['type']===_0xf472da(0x18c)&&_0xd48d93[_0xf472da(0xdd)](_0x3d82a7['id']);}_0x3d82a7[_0xf472da(0x163)]===_0xf472da(0x1ab)&&(_0x3d82a7['taskMode']===undefined||_0x3d82a7[_0xf472da(0xbb)]==='APPROVAL')&&(_0x3476b5+=0x1);validateNode(_0x3d82a7,_0x3c9e14,_0x6d3cbb);if(_0x3d82a7[_0xf472da(0x163)]==='SCRIPT'){const _0x36d259=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xde)],![]);_0x36d259&&(registerResultVariableOwner(_0x25b2c1,_0x36d259,_0x3d82a7['id'],_0x6d3cbb),!_0x44d2f9[_0xf472da(0x188)](_0x36d259)&&_0x44d2f9[_0xf472da(0xf9)](_0x36d259,_0x3d82a7['id']));}if(_0x3d82a7[_0xf472da(0x163)]==='APPROVAL'&&isRecord(_0x3d82a7[_0xf472da(0xad)])&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xda)]===!![]&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xa8)]===_0xf472da(0x123)){const _0x5e0d94=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xad)]['resultVariable'],!![]);_0x5e0d94&®isterResultVariableOwner(_0x25b2c1,_0x5e0d94,_0x3d82a7['id']+_0xf472da(0x15f),_0x6d3cbb);}});_0x1a4671[_0x2f0cfd(0x17b)]!==0x1&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0x158),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0xd48d93[_0x2f0cfd(0x17b)]===0x0&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.nodes','message':_0x2f0cfd(0xd4)});const _0x226ddb=new Map(),_0xb5e6dc=new Map(),_0x5cfebb=new Map(),_0x111bf1=new Set();_0x39ff9b[_0x2f0cfd(0x11f)]['forEach']((_0x57211f,_0xfe5934)=>{const _0x154c03=_0x2f0cfd,_0x249c61='flowJson.edges['+_0xfe5934+']';if(!isRecord(_0x57211f)){_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0xe3)});return;}const _0xc34e99=_0x57211f;_0x5cfebb[_0x154c03(0xf9)](_0xc34e99,_0x249c61);const _0x509e11=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0xf4)],_0xc34e99[_0x154c03(0x186)]),_0x234a2a=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0x199)],_0xc34e99[_0x154c03(0x1d3)]);if(!_0x509e11)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x15b)});if(!_0x234a2a)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+'.target','message':_0x154c03(0x14b)});_0x509e11&&!_0xe9542a[_0x154c03(0x188)](_0x509e11)&&_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x1a4)+_0x509e11+'.'});_0x234a2a&&!_0xe9542a[_0x154c03(0x188)](_0x234a2a)&&_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x18e),'message':_0x154c03(0x13d)+_0x234a2a+'.'});if(_0xc34e99['id']!==undefined){if(typeof _0xc34e99['id']!==_0x154c03(0xc7)||!BPMN_ID_PATTERN[_0x154c03(0xb1)](_0xc34e99['id']))_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x1ad)});else{if(_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id']))_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x111)+_0xc34e99['id']+'.'});else!_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id'])&&_0x4a7eae[_0x154c03(0x16e)](_0xc34e99['id']);}}if(_0x509e11&&_0x234a2a){const _0x1e0dca=_0x509e11+'\x00'+_0x234a2a+'\x00'+(_0xc34e99[_0x154c03(0x104)]??_0x154c03(0xd9));_0x111bf1[_0x154c03(0x188)](_0x1e0dca)?_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0x1ee)+_0x509e11+_0x154c03(0x172)+_0x234a2a+'\x20('+(_0xc34e99['conditionType']??'ALWAYS')+').'}):_0x111bf1['add'](_0x1e0dca);}validateEdge(_0xc34e99,_0x249c61,_0x6d3cbb),_0x509e11&&_0x234a2a&&(_0x226ddb['get'](_0x509e11)?.[_0x154c03(0xdd)](_0xc34e99)??_0x226ddb[_0x154c03(0xf9)](_0x509e11,[_0xc34e99]),_0xb5e6dc[_0x154c03(0x103)](_0x234a2a)?.['push'](_0xc34e99)??_0xb5e6dc[_0x154c03(0xf9)](_0x234a2a,[_0xc34e99]));});if(_0x1a4671[_0x2f0cfd(0x17b)]!==0x1)return;validateGraphShape(_0xe9542a,_0x1a4671[0x0],_0xd48d93,_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x6d3cbb),validateScriptResultReferences(_0xe9542a,_0x1a4671[0x0],_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x44d2f9,_0x6d3cbb),validateApprovalResults(_0xe9542a,_0x3476b5,_0xd48d93,_0x6d3cbb);}function validateNode(_0x639431,_0xc67069,_0xc908b7){const _0x4ce6e1=a282_0x44ca9e;for(const _0x1869e8 of['form',_0x4ce6e1(0xc3)]){Object[_0x4ce6e1(0xae)][_0x4ce6e1(0xdf)][_0x4ce6e1(0x179)](_0x639431,_0x1869e8)&&_0xc908b7['push']({'path':_0xc67069+'.'+_0x1869e8,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x4ce6e1(0x188)](_0x639431[_0x4ce6e1(0x163)]))return;(typeof _0x639431[_0x4ce6e1(0x124)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0x124)][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xd0),'message':_0x4ce6e1(0x1c0)});_0x639431['pageId']!==undefined&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xce),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x639431[_0x4ce6e1(0xa3)]!==undefined){if(typeof _0x639431[_0x4ce6e1(0xa3)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0xa3)][_0x4ce6e1(0xd2)]()==='')_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb5),'message':_0x4ce6e1(0x1d2)});else _0x639431['type']!==_0x4ce6e1(0x1ab)&&_0x639431[_0x4ce6e1(0x163)]!=='END'&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x35eed3=_0x639431['position'];if(!isRecord(_0x35eed3))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.position','message':_0x4ce6e1(0x1e2)});else for(const _0x9540f0 of['x','y']){const _0x1fc672=_0x35eed3[_0x9540f0];(typeof _0x1fc672!==_0x4ce6e1(0x157)||!Number['isFinite'](_0x1fc672)||_0x1fc672<0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xea)+_0x9540f0,'message':_0x4ce6e1(0x17e)+_0x9540f0+_0x4ce6e1(0x1d6)});}if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1ab)){const _0x3cf992=_0x639431[_0x4ce6e1(0x11b)]??_0x4ce6e1(0x1ed),_0x2d36c0=_0x639431['taskMode']??_0x4ce6e1(0x1ab);!APPROVAL_TASK_MODES['has'](_0x2d36c0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xbf),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x2d36c0)+'.'});!APPROVAL_MODES['has'](_0x3cf992)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x126),'message':_0x4ce6e1(0x122)+String(_0x3cf992)+'.'});if(!isRecord(_0x639431[_0x4ce6e1(0x166)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee','message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x4bcba5=_0x639431['assignee'][_0x4ce6e1(0x1fb)];_0x4bcba5!==_0x4ce6e1(0x12e)&&_0x4bcba5!==_0x4ce6e1(0x1f3)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x156),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x4bcba5===_0x4ce6e1(0x12e)){const _0x16d844=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x16d844)||_0x16d844['length']===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee.userIds','message':_0x4ce6e1(0x100)});else{const _0x1d5206=_0x16d844[_0x4ce6e1(0xe6)](_0x2f4735=>!isValidUserId(_0x2f4735));_0x1d5206>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x144)+_0x1d5206+']','message':_0x4ce6e1(0x147)});const _0x5f2892=new Set(_0x16d844[_0x4ce6e1(0x1bc)](isValidUserId)[_0x4ce6e1(0x18d)](_0x333595=>String(_0x333595)[_0x4ce6e1(0xd2)]()));_0x3cf992===_0x4ce6e1(0x1ed)&&_0x5f2892[_0x4ce6e1(0x16f)]>0x1&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb6),'message':_0x4ce6e1(0x1ae)});}}if(_0x4bcba5===_0x4ce6e1(0x1f3)){const _0x199595=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0x19e)],_0x270eca=typeof _0x199595==='number'||typeof _0x199595===_0x4ce6e1(0xc7)?Number(String(_0x199595)[_0x4ce6e1(0xd2)]()):Number[_0x4ce6e1(0x18f)];(!Number[_0x4ce6e1(0x176)](_0x270eca)||_0x270eca<=0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x14a),'message':_0x4ce6e1(0x112)});}}if(_0x639431[_0x4ce6e1(0x194)]!==undefined){if(!isRecord(_0x639431['transferCandidates']))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.transferCandidates','message':_0x4ce6e1(0x1f9)});else{if(_0x639431[_0x4ce6e1(0x194)]['strategy']!=='FIXED')_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0xdc),'message':_0x4ce6e1(0x149)});else{const _0x9d3fdc=_0x639431['transferCandidates'][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x9d3fdc)||_0x9d3fdc[_0x4ce6e1(0x17b)]===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x1ce),'message':_0x4ce6e1(0x1dc)});else{const _0x4bd278=_0x9d3fdc[_0x4ce6e1(0xe6)](_0x4e3054=>!isValidUserId(_0x4e3054));_0x4bd278>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xc0)+_0x4bd278+']','message':_0x4ce6e1(0x155)});}}}}}_0x639431[_0x4ce6e1(0xd1)]!==undefined&&typeof _0x639431[_0x4ce6e1(0xd1)]!==_0x4ce6e1(0x183)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.sequential','message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1c1)){(typeof _0x639431[_0x4ce6e1(0x12d)]!=='string'||_0x639431['scriptName'][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0x10a),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x639431[_0x4ce6e1(0xde)]!==undefined){if(typeof _0x639431['resultVariable']!==_0x4ce6e1(0xc7)||!VARIABLE_PATTERN[_0x4ce6e1(0xb1)](_0x639431[_0x4ce6e1(0xde)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x4ce6e1(0x188)](_0x639431['resultVariable'])||_0x639431[_0x4ce6e1(0xde)][_0x4ce6e1(0x191)](_0x4ce6e1(0x1f2)))&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'Reserved\x20resultVariable:\x20'+_0x639431[_0x4ce6e1(0xde)]+'.'});}}validateAsyncExecution(_0x639431,_0xc67069,_0xc908b7),validateApprovalTimeout(_0x639431,_0xc67069,_0xc908b7),validateCcConfig(_0x639431,_0xc67069,_0xc908b7),_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0xa5)&&validateNotificationConfig(_0x639431['config'],_0xc67069+'.config',_0xc908b7);}function validateAsyncExecution(_0x5f0bd3,_0xb8d003,_0x2e65bc){const _0x1aac89=a282_0x44ca9e;if(_0x5f0bd3['async']===undefined)return;if(!isRecord(_0x5f0bd3['async'])){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0x107),'message':_0x1aac89(0x1e6)});return;}if(_0x5f0bd3['async'][_0x1aac89(0xda)]!==undefined&&typeof _0x5f0bd3[_0x1aac89(0xd8)]['enabled']!=='boolean'){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0xef),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0xda)]!==!![])return;_0x5f0bd3['type']!==_0x1aac89(0x1c1)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async','message':_0x1aac89(0x10f)});const _0x13848d=_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1e4)]??0x3;(!Number[_0x1aac89(0x1ec)](_0x13848d)||_0x13848d<0x1||_0x13848d>MAX_ASYNC_RETRY_COUNT)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async.retryCount','message':_0x1aac89(0x150)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)]!==undefined&&validateTimeAmount(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)],_0xb8d003+_0x1aac89(0xab),_0x2e65bc);}function validateApprovalTimeout(_0x958645,_0x4ba496,_0x1566c1){const _0xb3b0e2=a282_0x44ca9e;if(_0x958645['timeout']===undefined)return;if(!isRecord(_0x958645[_0xb3b0e2(0xad)])){_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x167)});return;}if(_0x958645[_0xb3b0e2(0xad)]['enabled']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)]['enabled']!==_0xb3b0e2(0x183)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.enabled','message':_0xb3b0e2(0x1e0)});return;}if(_0x958645['timeout']['enabled']!==!![])return;if(_0x958645[_0xb3b0e2(0xad)]['interrupting']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]!=='boolean'){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0xb3b0e2(0x18b)});return;}_0x958645['type']!=='APPROVAL'&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x1b9)});validateTimeAmount(_0x958645[_0xb3b0e2(0xad)]['duration'],_0x4ba496+_0xb3b0e2(0x174),_0x1566c1);const _0x3645d2=_0x958645[_0xb3b0e2(0xad)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0xb3b0e2(0x188)](_0x3645d2)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x14c)});return;}(_0x958645[_0xb3b0e2(0xbb)]??_0xb3b0e2(0x1ab))===_0xb3b0e2(0x1c2)&&_0x3645d2!==_0xb3b0e2(0x123)&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x177)});const _0x217eab=_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]??_0x3645d2!==_0xb3b0e2(0x123);if(_0x3645d2===_0xb3b0e2(0x123))_0x217eab&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.interrupting','message':_0xb3b0e2(0x121)}),(typeof _0x958645[_0xb3b0e2(0xad)]['scriptName']!=='string'||_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x12d)][_0xb3b0e2(0xd2)]()==='')&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x1a0),'message':_0xb3b0e2(0x1c3)}),validateOptionalResultVariable(_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0xde)],_0x4ba496+_0xb3b0e2(0x10d),_0x1566c1);else!_0x217eab&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0x3645d2+_0xb3b0e2(0x1e3)});}function validateTimeAmount(_0x5a15c2,_0x8205be,_0x31b775){const _0x599ce9=a282_0x44ca9e;if(!isRecord(_0x5a15c2)){_0x31b775['push']({'path':_0x8205be,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x599ce9(0x1ec)](_0x5a15c2['value'])||Number(_0x5a15c2[_0x599ce9(0x13b)])<=0x0)&&_0x31b775[_0x599ce9(0xdd)]({'path':_0x8205be+'.value','message':_0x599ce9(0x1bd)}),!FLOW_TIME_UNITS[_0x599ce9(0x188)](_0x5a15c2[_0x599ce9(0x184)])&&_0x31b775['push']({'path':_0x8205be+_0x599ce9(0xcb),'message':_0x599ce9(0x1dd)});}function validateOptionalResultVariable(_0x1f620a,_0x319809,_0xbdcc52){const _0x59a2ca=a282_0x44ca9e;if(_0x1f620a===undefined||_0x1f620a===null||_0x1f620a==='')return;if(typeof _0x1f620a!==_0x59a2ca(0xc7)||!VARIABLE_PATTERN[_0x59a2ca(0xb1)](_0x1f620a))_0xbdcc52[_0x59a2ca(0xdd)]({'path':_0x319809,'message':_0x59a2ca(0xb2)});else(RESERVED_RESULT_VARIABLES[_0x59a2ca(0x188)](_0x1f620a)||_0x1f620a[_0x59a2ca(0x191)](_0x59a2ca(0x1f2)))&&_0xbdcc52['push']({'path':_0x319809,'message':'Reserved\x20resultVariable:\x20'+_0x1f620a+'.'});}function validateCcConfig(_0x22f5b2,_0x537b3e,_0x32808c){const _0x2a8001=a282_0x44ca9e;if(_0x22f5b2['cc']===undefined)return;if(!isRecord(_0x22f5b2['cc'])){_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0x1c4)});return;}_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x18c)&&_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x1ab)&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0xd5)});Object[_0x2a8001(0xae)][_0x2a8001(0xdf)][_0x2a8001(0x179)](_0x22f5b2['cc'],_0x2a8001(0x1ef))&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x1d4),'message':UNSUPPORTED_FORM_MESSAGE});const _0x48f2a6=_0x22f5b2['cc'][_0x2a8001(0x12a)];if(!Array['isArray'](_0x48f2a6)||_0x48f2a6[_0x2a8001(0x17b)]===0x0)_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x1ac)});else{_0x48f2a6[_0x2a8001(0x17b)]>MAX_CC_RECIPIENTS&&_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x106)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x6ffab=new Set();_0x48f2a6[_0x2a8001(0x181)]((_0x600924,_0x3a4ea1)=>{const _0xd8c4d8=_0x2a8001;if(typeof _0x600924!=='string'||_0x600924['trim']()==='')_0x32808c[_0xd8c4d8(0xdd)]({'path':_0x537b3e+_0xd8c4d8(0x119)+_0x3a4ea1+']','message':_0xd8c4d8(0x1b0)});else _0x6ffab[_0xd8c4d8(0x188)](_0x600924[_0xd8c4d8(0xd2)]())?_0x32808c['push']({'path':_0x537b3e+'.cc.recipientUserIds['+_0x3a4ea1+']','message':_0xd8c4d8(0x1b3)+_0x600924['trim']()+'.'}):_0x6ffab[_0xd8c4d8(0x16e)](_0x600924[_0xd8c4d8(0xd2)]());});}validateStringArray(_0x22f5b2['cc']['visible'],_0x537b3e+_0x2a8001(0x171),_0x32808c);}function validateStringArray(_0x2e5122,_0x1349e4,_0x1022f0){const _0xaea9b7=a282_0x44ca9e;if(_0x2e5122===undefined)return;if(!Array[_0xaea9b7(0x1f7)](_0x2e5122)){_0x1022f0[_0xaea9b7(0xdd)]({'path':_0x1349e4,'message':_0xaea9b7(0x1df)});return;}const _0x1ca7f5=new Set();_0x2e5122[_0xaea9b7(0x181)]((_0x4e4513,_0x429b61)=>{const _0x4f1a55=_0xaea9b7;if(typeof _0x4e4513!=='string'||_0x4e4513[_0x4f1a55(0xd2)]()==='')_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x11e)});else _0x1ca7f5[_0x4f1a55(0x188)](_0x4e4513[_0x4f1a55(0xd2)]())?_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x17a)+_0x4e4513[_0x4f1a55(0xd2)]()+'.'}):_0x1ca7f5[_0x4f1a55(0x16e)](_0x4e4513[_0x4f1a55(0xd2)]());});}function validateNotificationConfig(_0x515411,_0x33c19d,_0x4a6805){const _0x1cb913=a282_0x44ca9e;if(!isRecord(_0x515411)){_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d,'message':_0x1cb913(0x102)});return;}if(_0x515411['version']!==undefined&&_0x515411[_0x1cb913(0x137)]!==null){if(typeof _0x515411['version']!==_0x1cb913(0xc7))_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()&&_0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()!=='v1'&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0x168),'message':_0x1cb913(0x1d9)+_0x515411[_0x1cb913(0x137)]+'.'});}const _0xa3243d=requireNotificationString(_0x515411[_0x1cb913(0x1cd)],_0x33c19d+_0x1cb913(0x109),'Notification\x20configCode\x20is\x20required.',_0x4a6805);_0xa3243d?.[_0x1cb913(0x18a)]('${')&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.configCode','message':_0x1cb913(0x178)});if(_0x515411[_0x1cb913(0x13a)]!==undefined&&_0x515411[_0x1cb913(0x13a)]!==null){if(typeof _0x515411[_0x1cb913(0x13a)]!=='string')_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.failurePolicy','message':_0x1cb913(0x1d8)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x515411[_0x1cb913(0x13a)]['trim']()[_0x1cb913(0x196)]())&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0xfd),'message':_0x1cb913(0x159)});}!isRecord(_0x515411[_0x1cb913(0x11d)])?_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.template','message':_0x1cb913(0x192)}):validateNotificationTemplate(_0x515411['template'],_0x33c19d+_0x1cb913(0x162),_0x4a6805),validateNotificationRecipients(_0x515411[_0x1cb913(0x142)],_0x33c19d+_0x1cb913(0x118),_0x4a6805);}function validateNotificationTemplate(_0x2359a2,_0x26d9c7,_0x185ddf){const _0x50a9cb=a282_0x44ca9e;for(const _0x10bd4f of['title','summary']){const _0x5ecd79=requireNotificationString(_0x2359a2[_0x10bd4f],_0x26d9c7+'.'+_0x10bd4f,_0x50a9cb(0x146)+_0x10bd4f+'\x20is\x20required.',_0x185ddf);if(_0x5ecd79)validateNotificationPlaceholders(_0x5ecd79,_0x26d9c7+'.'+_0x10bd4f,_0x185ddf);}_0x2359a2['detailMarkdown']!==undefined&&_0x2359a2[_0x50a9cb(0x125)]!==null&&(typeof _0x2359a2[_0x50a9cb(0x125)]!==_0x50a9cb(0xc7)?_0x185ddf['push']({'path':_0x26d9c7+_0x50a9cb(0xf3),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x2359a2[_0x50a9cb(0x125)],_0x26d9c7+_0x50a9cb(0xf3),_0x185ddf)),validateNotificationFacts(_0x2359a2['facts'],_0x26d9c7+_0x50a9cb(0x1b8),_0x185ddf),validateNotificationActions(_0x2359a2[_0x50a9cb(0xaa)],_0x26d9c7+_0x50a9cb(0xc9),_0x185ddf);}function validateNotificationFacts(_0xe051ac,_0x1c36e5,_0x5754f4){const _0x31ac3c=a282_0x44ca9e;if(_0xe051ac===undefined||_0xe051ac===null)return;if(!Array[_0x31ac3c(0x1f7)](_0xe051ac)){_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0xb0)});return;}_0xe051ac[_0x31ac3c(0x17b)]>MAX_NOTIFICATION_FACTS&&_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0x1be)+MAX_NOTIFICATION_FACTS+_0x31ac3c(0x120)}),_0xe051ac[_0x31ac3c(0x181)]((_0x22f3f4,_0x39d9b3)=>{const _0x4fecbf=_0x31ac3c,_0x53a908=_0x1c36e5+'['+_0x39d9b3+']';if(!isRecord(_0x22f3f4)){_0x5754f4['push']({'path':_0x53a908,'message':_0x4fecbf(0xa9)});return;}for(const _0x1ae849 of[_0x4fecbf(0xdb),'value']){const _0x72ef69=requireNotificationString(_0x22f3f4[_0x1ae849],_0x53a908+'.'+_0x1ae849,_0x4fecbf(0x175)+_0x1ae849+'\x20is\x20required.',_0x5754f4);_0x72ef69&&validateNotificationPlaceholders(_0x72ef69,_0x53a908+'.'+_0x1ae849,_0x5754f4);}});}function validateNotificationActions(_0x3799d3,_0x13d61b,_0x3b2200){const _0x4b4e6c=a282_0x44ca9e;if(_0x3799d3===undefined||_0x3799d3===null)return;if(!Array['isArray'](_0x3799d3)){_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':_0x4b4e6c(0xe7)});return;}_0x3799d3[_0x4b4e6c(0x17b)]>MAX_NOTIFICATION_ACTIONS&&_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x4b4e6c(0xf1)}),_0x3799d3[_0x4b4e6c(0x181)]((_0x587369,_0x2e8e76)=>{const _0x767aad=_0x4b4e6c,_0x2c9ac3=_0x13d61b+'['+_0x2e8e76+']';if(!isRecord(_0x587369)){_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3,'message':_0x767aad(0xc6)});return;}const _0x512f5f=requireNotificationString(_0x587369[_0x767aad(0x185)],_0x2c9ac3+_0x767aad(0x153),_0x767aad(0xa6),_0x3b2200);if(_0x512f5f)validateNotificationPlaceholders(_0x512f5f,_0x2c9ac3+_0x767aad(0x153),_0x3b2200);const _0x9ec75e=requireNotificationString(_0x587369[_0x767aad(0x1ca)],_0x2c9ac3+_0x767aad(0x13c),_0x767aad(0x151),_0x3b2200);if(!_0x9ec75e)return;validateNotificationPlaceholders(_0x9ec75e,_0x2c9ac3+_0x767aad(0x13c),_0x3b2200),!/^https?:\/\//i[_0x767aad(0xb1)](_0x9ec75e)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x9ec75e)&&_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3+_0x767aad(0x13c),'message':_0x767aad(0x19d)});});}function validateNotificationRecipients(_0xa608a1,_0x3a777d,_0x20bdb6){const _0x1003f3=a282_0x44ca9e;if(_0xa608a1===undefined||_0xa608a1===null)return;if(!Array['isArray'](_0xa608a1)){_0x20bdb6[_0x1003f3(0xdd)]({'path':_0x3a777d,'message':_0x1003f3(0x130)});return;}let _0x1eac07=![];_0xa608a1[_0x1003f3(0x181)]((_0x25b419,_0x42d603)=>{const _0x31c582=_0x1003f3,_0x35c0b1=_0x3a777d+'['+_0x42d603+']';if(!isRecord(_0x25b419)){_0x20bdb6['push']({'path':_0x35c0b1,'message':_0x31c582(0x133)});return;}const _0x276525=requireNotificationString(_0x25b419[_0x31c582(0x163)],_0x35c0b1+_0x31c582(0xb9),_0x31c582(0xcf),_0x20bdb6);_0x276525&&!NOTIFICATION_RECIPIENT_TYPES[_0x31c582(0x188)](_0x276525[_0x31c582(0x196)]())&&_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0xb9),'message':_0x31c582(0x154)});let _0x58cdab='TO';_0x25b419['role']!==undefined&&_0x25b419[_0x31c582(0x1c7)]!==null&&(typeof _0x25b419[_0x31c582(0x1c7)]!==_0x31c582(0xc7)?(_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1db)}),_0x58cdab=''):(_0x58cdab=_0x25b419[_0x31c582(0x1c7)]['trim']()[_0x31c582(0x196)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x58cdab)&&_0x20bdb6['push']({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1e8)})));if(_0x58cdab==='TO')_0x1eac07=!![];const _0x13b3aa=requireNotificationString(_0x25b419[_0x31c582(0x13b)],_0x35c0b1+'.value','Notification\x20recipient.value\x20is\x20required.',_0x20bdb6);_0x13b3aa&&validateNotificationPlaceholders(_0x13b3aa,_0x35c0b1+_0x31c582(0x116),_0x20bdb6);}),_0xa608a1[_0x1003f3(0x17b)]>0x0&&!_0x1eac07&&_0x20bdb6['push']({'path':_0x3a777d,'message':_0x1003f3(0x11a)});}function requireNotificationString(_0x5767a2,_0x1529f5,_0x1443b5,_0x2bc8e2){const _0x33df3d=a282_0x44ca9e;if(typeof _0x5767a2!==_0x33df3d(0xc7)||_0x5767a2[_0x33df3d(0xd2)]()==='')return _0x2bc8e2['push']({'path':_0x1529f5,'message':_0x1443b5}),undefined;return _0x5767a2[_0x33df3d(0xd2)]();}function validateNotificationPlaceholders(_0x3db46c,_0x4fca05,_0x440be0){const _0x4f5040=a282_0x44ca9e;for(const _0x285f4f of _0x3db46c['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x250e8f=_0x285f4f[0x1]?.[_0x4f5040(0xd2)]()??'',_0x283d4d=_0x250e8f[_0x4f5040(0x161)]('.'),_0x224b40=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](0x0,_0x283d4d):_0x250e8f,_0x2e1d4b=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](_0x283d4d+0x1)[_0x4f5040(0xd2)]():'';(![_0x4f5040(0xbe),_0x4f5040(0x1a3),_0x4f5040(0x12f)][_0x4f5040(0x18a)](_0x224b40)||_0x2e1d4b==='')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x285f4f[0x0]+'.'});}_0x3db46c[_0x4f5040(0x108)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x1c96cc,_0x267a4e,_0x40c8db){const _0x47458=a282_0x44ca9e;_0x1c96cc['name']!==undefined&&typeof _0x1c96cc['name']!=='string'&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd0),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x1c96cc[_0x47458(0x127)]!==undefined&&typeof _0x1c96cc[_0x47458(0x127)]!==_0x47458(0x183)&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0x15c)}),_0x1c96cc[_0x47458(0xed)]!==undefined&&(!Array[_0x47458(0x1f7)](_0x1c96cc[_0x47458(0xed)])?_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x1f4),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x1c96cc[_0x47458(0xed)][_0x47458(0x181)]((_0x111de2,_0x191000)=>{const _0xd29851=_0x47458;if(!isRecord(_0x111de2)){_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x9c9f8e of['x','y']){const _0x21dc87=_0x111de2[_0x9c9f8e];(typeof _0x21dc87!==_0xd29851(0x157)||!Number[_0xd29851(0xf2)](_0x21dc87))&&_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+'].'+_0x9c9f8e,'message':_0xd29851(0x1cf)+_0x9c9f8e+_0xd29851(0xd3)});}})),_0x1c96cc['conditionType']!==undefined&&!CONDITION_TYPES[_0x47458(0x188)](_0x1c96cc[_0x47458(0x104)])&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0x1b7),'message':_0x47458(0xf7)+String(_0x1c96cc[_0x47458(0x104)])+'.'}),_0x1c96cc[_0x47458(0x104)]===_0x47458(0xf6)&&(typeof _0x1c96cc[_0x47458(0x1c9)]!==_0x47458(0xc7)||_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()==='')&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x101),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x1c96cc[_0x47458(0x127)]===!![]&&_0x1c96cc[_0x47458(0x104)]!==_0x47458(0xd9)&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0xb8)}),_0x1c96cc[_0x47458(0x127)]===!![]&&typeof _0x1c96cc['expression']===_0x47458(0xc7)&&_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()!==''&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+'.expression','message':_0x47458(0x115)});}function validateGraphShape(_0x2273f9,_0xd59304,_0x434c71,_0x4d921d,_0x2ee086,_0x14576a,_0x5d5206){const _0x10ff0c=a282_0x44ca9e;for(const [_0x4507b2,_0x1f955e]of _0x2273f9){const _0x273838=_0x2ee086[_0x10ff0c(0x103)](_0x4507b2)??[],_0xb7a3bd=_0x4d921d[_0x10ff0c(0x103)](_0x4507b2)??[];_0x1f955e[_0x10ff0c(0x163)]!==_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x9d)});_0x1f955e[_0x10ff0c(0x163)]!=='END'&&_0xb7a3bd[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x13f)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]>0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x132)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x18c)&&_0xb7a3bd['length']>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x1f955e['type']===_0x10ff0c(0x110)){_0xb7a3bd['length']<0x2&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xe5)});const _0x12347d=_0xb7a3bd['filter'](_0x53b50d=>_0x53b50d[_0x10ff0c(0x127)]===!![]);_0x12347d[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x1d1)});if(_0x12347d[_0x10ff0c(0x17b)]===0x1){const _0x2fdb26=_0x12347d[0x0],_0x2da5bd=_0x14576a[_0x10ff0c(0x103)](_0x2fdb26)??'flowJson.edges';_0x2fdb26[_0x10ff0c(0x104)]!==_0x10ff0c(0xd9)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x1f6)});_0x2fdb26[_0x10ff0c(0x1c9)]!==undefined&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x101),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2cf26e of _0xb7a3bd){if(_0x2cf26e===_0x2fdb26)continue;const _0x3d1bbc=_0x14576a[_0x10ff0c(0x103)](_0x2cf26e)??'flowJson.edges';if(_0x2cf26e[_0x10ff0c(0x104)]!==_0x10ff0c(0xf6))_0x5d5206['push']({'path':_0x3d1bbc+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x189)});else(typeof _0x2cf26e['expression']!==_0x10ff0c(0xc7)||_0x2cf26e[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()==='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x3d1bbc+'.expression','message':_0x10ff0c(0x1a5)});}}}if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'&&(_0x1f955e[_0x10ff0c(0xbb)]??_0x10ff0c(0x1ab))===_0x10ff0c(0x1c2)){if(_0xb7a3bd[_0x10ff0c(0x17b)]!==0x1)_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x138)});else{const _0xdd8e84=_0xb7a3bd[0x0];((_0xdd8e84['conditionType']??_0x10ff0c(0xd9))!=='ALWAYS'||_0xdd8e84[_0x10ff0c(0x127)]===!![]||typeof _0xdd8e84['expression']===_0x10ff0c(0xc7)&&_0xdd8e84[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()!=='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x14576a['get'](_0xdd8e84)??'flowJson.edges','message':_0x10ff0c(0xbc)});}}else{if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'){const _0xe5906e=_0xb7a3bd[_0x10ff0c(0x18d)](_0x25dac8=>_0x25dac8['conditionType']??_0x10ff0c(0xd9)),_0x3df4ce=_0xe5906e['filter'](_0x17f62a=>_0x17f62a!==_0x10ff0c(0xa4)&&_0x17f62a!==_0x10ff0c(0x1f1));_0x3df4ce[_0x10ff0c(0x17b)]>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xc5)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x3660d1=>_0x3660d1===_0x10ff0c(0xa4))[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':_0x10ff0c(0x187)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x30c6d8=>_0x30c6d8===_0x10ff0c(0x1f1))['length']!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0xb7a3bd[_0x10ff0c(0x1f0)](_0x471913=>_0x471913[_0x10ff0c(0x127)]===!![])&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0xfa2c63=new Set(),_0xe33385=_0x4bdae6=>{const _0x5b9046=_0x10ff0c;if(_0xfa2c63['has'](_0x4bdae6))return;_0xfa2c63[_0x5b9046(0x16e)](_0x4bdae6);for(const _0x520f65 of _0x4d921d[_0x5b9046(0x103)](_0x4bdae6)??[]){const _0x21986e=resolveEdgeEndpoint(_0x520f65[_0x5b9046(0x199)],_0x520f65[_0x5b9046(0x1d3)]);if(_0x21986e&&_0x2273f9['has'](_0x21986e))_0xe33385(_0x21986e);}};_0xe33385(_0xd59304);for(const _0x370c64 of _0x2273f9['keys']()){!_0xfa2c63[_0x10ff0c(0x188)](_0x370c64)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x370c64,'message':_0x10ff0c(0xcc)});}const _0x4403f2=_0x434c71[_0x10ff0c(0x1f0)](_0x3071cb=>_0xfa2c63[_0x10ff0c(0x188)](_0x3071cb));if(!_0x4403f2){_0x5d5206['push']({'path':_0x10ff0c(0xbd),'message':_0x10ff0c(0x197)});return;}const _0x485d3e=new Set(),_0x2851d7=_0x2b39e9=>{const _0x24b729=_0x10ff0c;if(_0x485d3e['has'](_0x2b39e9))return;_0x485d3e[_0x24b729(0x16e)](_0x2b39e9);for(const _0x5151ab of _0x2ee086['get'](_0x2b39e9)??[]){const _0x29dd96=resolveEdgeEndpoint(_0x5151ab['source'],_0x5151ab[_0x24b729(0x186)]);if(_0x29dd96&&_0x2273f9[_0x24b729(0x188)](_0x29dd96))_0x2851d7(_0x29dd96);}};for(const _0xb2d6fd of _0x434c71){if(_0x2273f9[_0x10ff0c(0x188)](_0xb2d6fd))_0x2851d7(_0xb2d6fd);}for(const _0xcdfa75 of _0xfa2c63){!_0x485d3e[_0x10ff0c(0x188)](_0xcdfa75)&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0xcdfa75,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x5e6865,_0xfb3456,_0x2dd74e,_0x2c2f2f){const _0x46885f=a282_0x44ca9e;if(_0xfb3456===0x0)return;const _0x3ef91d=new Set(_0x2dd74e['map'](_0x26ef9b=>_0x5e6865[_0x46885f(0x103)](_0x26ef9b)?.[_0x46885f(0x113)])[_0x46885f(0x1bc)](_0x54f100=>typeof _0x54f100===_0x46885f(0xc7)));for(const _0x2f1888 of[_0x46885f(0xa4),_0x46885f(0x1f1)]){!_0x3ef91d[_0x46885f(0x188)](_0x2f1888)&&_0x2c2f2f[_0x46885f(0xdd)]({'path':_0x46885f(0x158),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x2f1888+'.'});}}function validateScriptResultReferences(_0x533ae9,_0x1e4085,_0xc7240d,_0x26b9b3,_0xa9bd61,_0x2fe80f,_0x274148){const _0x5b160e=a282_0x44ca9e;if(_0x2fe80f[_0x5b160e(0x16f)]===0x0)return;const _0x40d8f2=new Set(),_0x1c8aca=_0x3863b7=>{const _0x58abb6=_0x5b160e;if(!_0x40d8f2[_0x58abb6(0x188)](_0x3863b7)&&_0x533ae9['has'](_0x3863b7)){_0x40d8f2[_0x58abb6(0x16e)](_0x3863b7);for(const _0x5b3bf3 of _0xc7240d[_0x58abb6(0x103)](_0x3863b7)??[]){const _0x1f9d82=resolveEdgeEndpoint(_0x5b3bf3['target'],_0x5b3bf3[_0x58abb6(0x1d3)]);if(_0x1f9d82)_0x1c8aca(_0x1f9d82);}}};_0x1c8aca(_0x1e4085);const _0x3e0650=new Map();for(const _0x2c64c9 of _0x40d8f2){_0x3e0650['set'](_0x2c64c9,_0x2c64c9===_0x1e4085?new Set([_0x1e4085]):new Set(_0x40d8f2));}let _0x158bdc=!![];while(_0x158bdc){_0x158bdc=![];for(const _0x57a16c of _0x40d8f2){if(_0x57a16c===_0x1e4085)continue;const _0x384444=(_0x26b9b3[_0x5b160e(0x103)](_0x57a16c)??[])[_0x5b160e(0x18d)](_0xde7470=>resolveEdgeEndpoint(_0xde7470['source'],_0xde7470[_0x5b160e(0x186)]))[_0x5b160e(0x1bc)](_0xafe7d5=>Boolean(_0xafe7d5&&_0x40d8f2[_0x5b160e(0x188)](_0xafe7d5)));if(_0x384444['length']===0x0)continue;const _0xfa9745=new Set(_0x3e0650[_0x5b160e(0x103)](_0x384444[0x0])??[]);for(const _0x504708 of _0x384444[_0x5b160e(0x1a8)](0x1)){const _0x32c1c8=_0x3e0650[_0x5b160e(0x103)](_0x504708)??new Set();for(const _0x3b0c8b of _0xfa9745){if(!_0x32c1c8['has'](_0x3b0c8b))_0xfa9745[_0x5b160e(0x129)](_0x3b0c8b);}}_0xfa9745['add'](_0x57a16c);const _0x308868=_0x3e0650['get'](_0x57a16c);!setsEqual(_0x308868,_0xfa9745)&&(_0x3e0650[_0x5b160e(0xf9)](_0x57a16c,_0xfa9745),_0x158bdc=!![]);}}for(const [_0x1aaa11,_0x4cb60c]of _0xc7240d){const _0x38ef9b=_0x3e0650['get'](_0x1aaa11);if(!_0x38ef9b)continue;for(const _0x1ad4c7 of _0x4cb60c){if(_0x1ad4c7[_0x5b160e(0x104)]!=='EXPRESSION'||typeof _0x1ad4c7[_0x5b160e(0x1c9)]!==_0x5b160e(0xc7))continue;for(const [_0x4f0223,_0x52a91a]of _0x2fe80f){expressionReferencesVariable(_0x1ad4c7[_0x5b160e(0x1c9)],_0x4f0223)&&!_0x38ef9b[_0x5b160e(0x188)](_0x52a91a)&&_0x274148[_0x5b160e(0xdd)]({'path':(_0xa9bd61['get'](_0x1ad4c7)??_0x5b160e(0xbd))+_0x5b160e(0x101),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x4f0223+_0x5b160e(0x145)+_0x52a91a+_0x5b160e(0xe4)+_0x1aaa11+'.'});}}}}function expressionReferencesVariable(_0x46b0d0,_0x33bfd5){const _0x3bffab=a282_0x44ca9e;let _0x68fb2d=0x0;while(_0x68fb2d<_0x46b0d0['length']){const _0xbf53cf=_0x46b0d0[_0x68fb2d];if(_0xbf53cf==='\x27'||_0xbf53cf==='\x22'){_0x68fb2d=skipQuotedExpressionSegment(_0x46b0d0,_0x68fb2d,_0xbf53cf);continue;}if(!/[A-Za-z_]/[_0x3bffab(0xb1)](_0xbf53cf)){_0x68fb2d+=0x1;continue;}const _0x2f920c=_0x68fb2d;_0x68fb2d+=0x1;while(_0x68fb2d<_0x46b0d0[_0x3bffab(0x17b)]&&/[A-Za-z0-9_]/['test'](_0x46b0d0[_0x68fb2d])){_0x68fb2d+=0x1;}if(_0x46b0d0[_0x3bffab(0x1a8)](_0x2f920c,_0x68fb2d)!==_0x33bfd5)continue;let _0x52514d=_0x2f920c-0x1;while(_0x52514d>=0x0&&/\s/[_0x3bffab(0xb1)](_0x46b0d0[_0x52514d])){_0x52514d-=0x1;}if(_0x46b0d0[_0x52514d]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x2403f1,_0x4398a7,_0x3b0a40){let _0xfb1a5a=_0x4398a7+0x1;while(_0xfb1a5a<_0x2403f1['length']){if(_0x2403f1[_0xfb1a5a]==='\x5c'){_0xfb1a5a+=0x2;continue;}if(_0x2403f1[_0xfb1a5a]===_0x3b0a40)return _0xfb1a5a+0x1;_0xfb1a5a+=0x1;}return _0xfb1a5a;}function resolveEffectiveResultVariable(_0x54c1ab,_0x5656d8){const _0x5f40a3=a282_0x44ca9e;if(_0x54c1ab===undefined||_0x54c1ab===null||_0x5656d8&&_0x54c1ab==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x54c1ab!==_0x5f40a3(0xc7)||!VARIABLE_PATTERN[_0x5f40a3(0xb1)](_0x54c1ab)||RESERVED_RESULT_VARIABLES[_0x5f40a3(0x188)](_0x54c1ab)||_0x54c1ab['startsWith'](_0x5f40a3(0x1f2)))return undefined;return _0x54c1ab;}function registerResultVariableOwner(_0x21ddf1,_0x37bd94,_0x35a1bd,_0x9d2d65){const _0x2d0618=a282_0x44ca9e;if(_0x21ddf1['has'](_0x37bd94)){_0x9d2d65[_0x2d0618(0xdd)]({'path':'flowJson.nodes','message':_0x2d0618(0x1b4)+_0x37bd94+'.'});return;}_0x21ddf1[_0x2d0618(0xf9)](_0x37bd94,_0x35a1bd);}function setsEqual(_0x2f4c2a,_0x37279b){const _0x41b3b6=a282_0x44ca9e;return _0x2f4c2a[_0x41b3b6(0x16f)]===_0x37279b[_0x41b3b6(0x16f)]&&[..._0x2f4c2a][_0x41b3b6(0x17c)](_0x3a5389=>_0x37279b['has'](_0x3a5389));}function isValidUserId(_0x1fa315){const _0x5a735d=a282_0x44ca9e;if(typeof _0x1fa315===_0x5a735d(0xc7))return _0x1fa315[_0x5a735d(0xd2)]()['length']>0x0;return Number[_0x5a735d(0x176)](_0x1fa315)&&Number(_0x1fa315)>0x0;}function a282_0x58dc(_0x2f0180,_0x4dd807){_0x2f0180=_0x2f0180-0x9c;const _0x222247=a282_0x2222();let _0x58dcb3=_0x222247[_0x2f0180];return _0x58dcb3;}function resolveEdgeEndpoint(_0x278376,_0x2d452f){const _0x31afcd=a282_0x44ca9e;if(typeof _0x278376===_0x31afcd(0xc7)&&_0x278376[_0x31afcd(0xd2)]())return _0x278376[_0x31afcd(0xd2)]();if(typeof _0x2d452f===_0x31afcd(0xc7)&&_0x2d452f[_0x31afcd(0xd2)]())return _0x2d452f[_0x31afcd(0xd2)]();return undefined;}function removeEmptyMetadata(_0x4b9398,_0x5cee1c,_0x5ce9a2,_0x4f049e){const _0x3a8832=a282_0x44ca9e;if(Array[_0x3a8832(0x1f7)](_0x4b9398)){_0x4b9398[_0x3a8832(0x181)]((_0x24667a,_0x534136)=>removeEmptyMetadata(_0x24667a,_0x5cee1c+'['+_0x534136+']',_0x5ce9a2,_0x4f049e));return;}if(!isRecord(_0x4b9398))return;for(const [_0x6b5891,_0x3a49a4]of Object[_0x3a8832(0xfb)](_0x4b9398)){const _0x27d985=_0x5cee1c+'.'+_0x6b5891;if(_0x6b5891===_0x3a8832(0x139)&&isEmptyJsonValue(_0x3a49a4)){delete _0x4b9398[_0x6b5891],_0x4f049e['push'](_0x27d985),_0x5ce9a2['push']({'code':_0x3a8832(0x1fa),'path':_0x27d985,'message':_0x27d985+_0x3a8832(0x15a)});continue;}removeEmptyMetadata(_0x3a49a4,_0x27d985,_0x5ce9a2,_0x4f049e);}}function isEmptyJsonValue(_0x5b74c9){const _0x4a764f=a282_0x44ca9e;if(_0x5b74c9===null||_0x5b74c9===undefined)return!![];if(typeof _0x5b74c9===_0x4a764f(0xc7))return _0x5b74c9[_0x4a764f(0xd2)]()==='';if(Array['isArray'](_0x5b74c9))return _0x5b74c9[_0x4a764f(0x17b)]===0x0;return isRecord(_0x5b74c9)&&Object[_0x4a764f(0x169)](_0x5b74c9)['length']===0x0;}function isRecord(_0x64b9a5){return typeof _0x64b9a5==='object'&&_0x64b9a5!==null&&!Array['isArray'](_0x64b9a5);}function cloneJsonValue(_0x8fd739){const _0xd7e738=a282_0x44ca9e;return JSON[_0xd7e738(0x117)](JSON[_0xd7e738(0xac)](_0x8fd739));}export async function readFlowConfigFile(_0x34cc9c){const _0x52b419=a282_0x44ca9e,_0xa77295=await readFile(resolve(_0x34cc9c),_0x52b419(0x16d));return JSON['parse'](_0xa77295);}
|
|
1
|
+
const a287_0x571368=a287_0x2b53;(function(_0x349b65,_0x45948c){const _0x598157=a287_0x2b53,_0x2b96ff=_0x349b65();while(!![]){try{const _0x1b6114=-parseInt(_0x598157(0x203))/0x1*(parseInt(_0x598157(0x168))/0x2)+-parseInt(_0x598157(0x1ce))/0x3+parseInt(_0x598157(0x1f1))/0x4+parseInt(_0x598157(0x18c))/0x5*(-parseInt(_0x598157(0x142))/0x6)+-parseInt(_0x598157(0x1e9))/0x7+-parseInt(_0x598157(0x1c1))/0x8+parseInt(_0x598157(0x1db))/0x9;if(_0x1b6114===_0x45948c)break;else _0x2b96ff['push'](_0x2b96ff['shift']());}catch(_0x27c619){_0x2b96ff['push'](_0x2b96ff['shift']());}}}(a287_0x4097,0x6d5ec));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';function a287_0x4097(){const _0x3c8b08=['Notification\x20recipient.role\x20must\x20be\x20a\x20string.','template','SCRIPT\x20node\x20requires\x20scriptName.','.cc','3405208hQfEdW','flowJson.','.template','object','duration','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','formPermissions','appCode','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Notification\x20fact\x20must\x20be\x20an\x20object.','Rabetbase\x20FlowConfig','visible','2476257oztNdv','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Notification\x20template.','mode','flowJson.nodes.','.name','trim','edge\x20source\x20is\x20required.','formPermission','path','edge\x20must\x20be\x20an\x20object.','Notification\x20action\x20must\x20be\x20an\x20object.','CONTINUE','14694813rhQDHb','.role','BCC','FIXED','.timeout.action','EMAIL','.text','startPageId','stringify','SINGLE','push','version','slice','utf8','1688785kUQrFk','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','keys','approval_sys_dataId','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','AUTO_APPROVE','detailMarkdown','metadata','1949648ndcKvI','every','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','Node\x20has\x20no\x20incoming\x20edge.','\x20is\x20required.','isFinite','map','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Unsupported\x20node\x20type:\x20','Edge\x20target\x20node\x20not\x20found:\x20','flowJson.edges','CONDITION','.cc.readSources','position','edges\x20must\x20be\x20an\x20array.','replace','flowJson','isSafeInteger','35514JbrpTA','.async','flowKey','.tmp','warnings','resultVariable',',\x20but\x20node\x20','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','templateName','retryInterval','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','defaultFlow','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','pageId','NOTIFICATION','EXPRESSION\x20edge\x20requires\x20expression.','HANDLE','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','configCode','FORM_FLOW','bindDatasetCode','node\x20must\x20be\x20an\x20object.','value\x20must\x20be\x20a\x20non-empty\x20string.','PLATFORM_FORM','Notification\x20recipient.value\x20is\x20required.','add','.expression','Notification\x20template.facts\x20must\x20be\x20an\x20array.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','unit','actions','MINUTES','has','.waypoints[','EXPRESSION','flowJson.pageMode','.waypoints','approval_sys_initiatorUserId','.approvalMode','START','https://lovrabet.com/schema/rabetbase-flow-config.json','nodes','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','isInteger','https://json-schema.org/draft/2020-12/schema','facts','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.startPath','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','retryCount','expression','Unsupported\x20schemaVersion:\x20','conditionType','indexOf','#/$defs/timeAmount','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.transferCandidates.userIds[','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','value\x20must\x20be\x20an\x20array.','timeout\x20must\x20be\x20an\x20object.','flowJson.startPageId','.type','targetNodeId','sequential\x20must\x20be\x20a\x20boolean.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.cc.recipientUserIds','.cc.recipientUserIds[','.timeout.interrupting','flowJson.nodes','config','approval_sys_appCode','length','userIds','timeout','^[A-Za-z_][A-Za-z0-9_]*$','toUpperCase','Notification\x20template.actions\x20must\x20be\x20an\x20array.','failurePolicy\x20must\x20be\x20a\x20string.','catch','AUTO_REJECT','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','array','\x20was\x20empty\x20and\x20was\x20removed.','END','sequential','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','Duplicate\x20edge\x20route:\x20','.timeout.enabled','Notification\x20template\x20supports\x20at\x20most\x20','APPROVED','.config','title','Reserved\x20resultVariable:\x20','Duplicate\x20node\x20id:\x20','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','^[1-9][0-9]*$','string','approvalMode','strategy','size','.failurePolicy','Unsupported\x20notification\x20version:\x20','recipientUserIds','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','sourceNodeId','Node\x20cannot\x20reach\x20any\x20END.','EXECUTE_BFF','roleId','flowJson.nodes[','.detailMarkdown','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','flowCode','CUSTOM_PAGE','.value','scriptName','formDefinitions','interrupting','delete','\x20->\x20','filter','ANY','.version','APPROVAL','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','cc.recipientUserIds\x20supports\x20at\x20most\x20','name','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Unsupported\x20approval\x20mode:\x20','context','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','waypoint.','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.transferCandidates.strategy','position.','async.enabled\x20must\x20be\x20a\x20boolean.','.timeout.duration','readSources','label','edges','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.configCode','integer','.timeout.scriptName','event','isArray','waypoints\x20must\x20be\x20an\x20array.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','url','flowName','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20fact.','\x20facts.','204JSdsEh','form','transferCandidates','Node\x20has\x20no\x20outgoing\x20edge.','hasOwnProperty','edge\x20name\x20must\x20be\x20a\x20string.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.resultVariable','Notification\x20recipient.type\x20is\x20required.','NOTIFICATION\x20node\x20requires\x20config.','ROLE','datasetCode','flowDesc','__rabetbase_local_validation__','Duplicate\x20BPMN\x20element\x20id:\x20','target','FIXED\x20assignee\x20requires\x20userIds.','Notification\x20recipient\x20must\x20be\x20an\x20object.','call','flowType','set','flowJson\x20must\x20be\x20an\x20object.','findIndex','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','includes','assignee','.scriptName','.source','number','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.async.retryCount','Notification\x20recipients\x20must\x20be\x20an\x20array.','#/$defs/position','.unit','duration\x20requires\x20value\x20and\x20unit.','role','prototype','8dyFdAK','REJECTED','.position','.url','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','source','boolean','.id','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','].taskMode','test','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','recipients','.transferCandidates.userIds','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','ALL','.defaultFlow','cc\x20must\x20be\x20an\x20object.','USER','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','NOTIFICATION\x20node\x20requires\x20template.','APPROVAL\x20node\x20requires\x20assignee.','some','flowDesc\x20must\x20be\x20a\x20string.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','pageMode','waypoints','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','.target','FAIL','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','nodes\x20must\x20be\x20an\x20array.','approved','ALWAYS','async','5560pCUdvn','Unsupported\x20flowType:\x20','forEach','#/$defs/userId','value','taskMode','Duplicate\x20value:\x20','async\x20must\x20be\x20an\x20object.','formData','approval_sys_datasetCode','.timeout','type','DAYS','startsWith','.conditionType','Notification\x20version\x20must\x20be\x20a\x20string.','failurePolicy','INDEPENDENT_FLOW','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','get','.timeout.resultVariable','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','startPath','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','approval_sys_','NaN','approval_sys_pageId','summary','.assignee.userIds[','.assignee.userIds','SECONDS','text','#/$defs/flowNode','scriptResult','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','action','enabled','SCRIPT','.path','Unsupported\x20condition\x20type:\x20','Duplicate\x20cc\x20recipient\x20userId:\x20','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','legacy_field_removed','schemaVersion','flowJson.schemaVersion','parse','\x20must\x20be\x20a\x20finite\x20number.','datasetCode\x20must\x20be\x20a\x20string.','message'];a287_0x4097=function(){return _0x3c8b08;};return a287_0x4097();}export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x571368(0x22f),'$id':a287_0x571368(0x22b),'title':a287_0x571368(0x1cc),'type':'object','required':[a287_0x571368(0x13e),a287_0x571368(0x155),a287_0x571368(0x201)],'$defs':{'userId':{'anyOf':[{'type':a287_0x571368(0x10a),'minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':a287_0x571368(0x1c4),'required':['x','y'],'properties':{'x':{'type':a287_0x571368(0x15f),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x190),a287_0x571368(0x220)],'properties':{'value':{'type':a287_0x571368(0x137),'minimum':0x1},'unit':{'enum':['SECONDS',a287_0x571368(0x222),'HOURS',a287_0x571368(0x198)]}},'additionalProperties':!![]},'flowNode':{'type':a287_0x571368(0x1c4),'required':['id',a287_0x571368(0x197),a287_0x571368(0x127),'position'],'properties':{'id':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)},'type':{'enum':[a287_0x571368(0x22a),a287_0x571368(0xfc),a287_0x571368(0x124),a287_0x571368(0x1fc),'SCRIPT',a287_0x571368(0x211)]},'name':{'type':a287_0x571368(0x10a),'minLength':0x1},'path':{'type':a287_0x571368(0x10a),'minLength':0x1},'position':{'$ref':a287_0x571368(0x163)},'approvalMode':{'enum':[a287_0x571368(0x1e4),a287_0x571368(0x177),a287_0x571368(0x122)]},'taskMode':{'enum':[a287_0x571368(0x124),a287_0x571368(0x213)]},'assignee':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x10c)],'properties':{'strategy':{'enum':['FIXED',a287_0x571368(0x14c)]},'userIds':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':a287_0x571368(0x18f)}},'roleId':{'anyOf':[{'type':a287_0x571368(0x137),'minimum':0x1},{'type':'string','pattern':a287_0x571368(0x109)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a287_0x571368(0x1c4),'required':['strategy','userIds'],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a287_0x571368(0x18f)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a287_0x571368(0x102),a287_0x571368(0x169)]},'scriptName':{'type':a287_0x571368(0x10a),'minLength':0x1},'resultVariable':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)},'async':{'type':a287_0x571368(0x1c4),'properties':{'enabled':{'type':a287_0x571368(0x16e)},'retryCount':{'type':a287_0x571368(0x137),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a287_0x571368(0x23d)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a287_0x571368(0x16e)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a287_0x571368(0x1ee),a287_0x571368(0xf8),a287_0x571368(0x114)]},'interrupting':{'type':'boolean'},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)}},'additionalProperties':!![]},'cc':{'type':a287_0x571368(0x1c4),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a287_0x571368(0xfa),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x571368(0x10a),'minLength':0x1}},'visible':{'type':a287_0x571368(0xfa),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x571368(0x1c4),'required':['configCode',a287_0x571368(0x1be)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a287_0x571368(0x185)]},'template':{'type':'object','required':[a287_0x571368(0x104),'summary'],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a287_0x571368(0x10a),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':'array','maxItems':0x8,'items':{'type':a287_0x571368(0x1c4),'required':['label','value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a287_0x571368(0x10a),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x571368(0xfa),'maxItems':0x2,'items':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x1ab),a287_0x571368(0x13d)],'properties':{'text':{'type':a287_0x571368(0x10a),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x571368(0xfa),'items':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x197),a287_0x571368(0x190)],'properties':{'type':{'enum':[a287_0x571368(0x17a),a287_0x571368(0x14c),a287_0x571368(0x1e0)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a287_0x571368(0x1dd)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x571368(0x1c4),'properties':{'id':{'type':a287_0x571368(0x10a),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':'string','minLength':0x1},'target':{'type':a287_0x571368(0x10a),'minLength':0x1},'sourceNodeId':{'type':a287_0x571368(0x10a),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':['ALWAYS',a287_0x571368(0x102),a287_0x571368(0x169),a287_0x571368(0x225)]},'expression':{'type':'string'},'defaultFlow':{'type':a287_0x571368(0x16e)},'name':{'type':a287_0x571368(0x10a)},'waypoints':{'type':a287_0x571368(0xfa),'items':{'$ref':a287_0x571368(0x163)}}},'allOf':[{'anyOf':[{'required':[a287_0x571368(0x16d)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a287_0x571368(0x151)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x571368(0x10a),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':['FORM_FLOW',a287_0x571368(0x19d)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a287_0x571368(0x137)},'templateName':![],'flowJson':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x22c),a287_0x571368(0x134)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':'approval.simple-flow.v1','description':a287_0x571368(0x1ea)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':a287_0x571368(0x1ac)}},'edges':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x571368(0x205),a287_0x571368(0x119),a287_0x571368(0x13e),a287_0x571368(0x217),a287_0x571368(0x14d),a287_0x571368(0x1c9),a287_0x571368(0x210),a287_0x571368(0x20b)],REMOVED_ROOT_FIELDS=['id',a287_0x571368(0x1c9),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set([a287_0x571368(0x22a),a287_0x571368(0xfc),a287_0x571368(0x124),a287_0x571368(0x1fc),a287_0x571368(0x1b1),'NOTIFICATION']),CONDITION_TYPES=new Set([a287_0x571368(0x18a),'APPROVED','REJECTED',a287_0x571368(0x225)]),APPROVAL_MODES=new Set([a287_0x571368(0x1e4),a287_0x571368(0x177),a287_0x571368(0x122)]),APPROVAL_TASK_MODES=new Set([a287_0x571368(0x124),a287_0x571368(0x213)]),FLOW_TIME_UNITS=new Set([a287_0x571368(0x1aa),a287_0x571368(0x222),'HOURS',a287_0x571368(0x198)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a287_0x571368(0xf8),a287_0x571368(0x114)]),FLOW_TYPES=new Set([a287_0x571368(0x216),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a287_0x571368(0x21a)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x571368(0x1da),a287_0x571368(0x185)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x571368(0x17a),'ROLE',a287_0x571368(0x1e0)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x571368(0x1dd)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x571368(0x1ad),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a287_0x571368(0x194),a287_0x571368(0x189),a287_0x571368(0x250),'approval_sys_processInstanceId',a287_0x571368(0x228),'approval_sys_initiatorUsername',a287_0x571368(0x195),a287_0x571368(0x1a6),'approval_sys_operationType',a287_0x571368(0x1ec)]);export function normalizeFlowConfig(_0x4ebe55){const _0x29b6e3=a287_0x571368;if(!isRecord(_0x4ebe55))throw new TypeError(_0x29b6e3(0x1b5));const _0x2b182e=cloneJsonValue(_0x4ebe55),_0xa8a781=_0x2b182e['flowJson'],_0x1d785c=isRecord(_0xa8a781)?cloneJsonValue(_0xa8a781):{},_0x1b43b7=[],_0x540fff=[];for(const _0x1a5afe of REMOVED_ROOT_FIELDS){if(!Object[_0x29b6e3(0x167)]['hasOwnProperty']['call'](_0x2b182e,_0x1a5afe))continue;delete _0x2b182e[_0x1a5afe],_0x540fff['push'](_0x1a5afe),_0x1b43b7[_0x29b6e3(0x1e5)]({'code':'legacy_field_removed','path':_0x1a5afe,'message':_0x1a5afe+_0x29b6e3(0x1a1)});}for(const _0x51496e of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0x29b6e3(0x146)]['call'](_0x1d785c,_0x51496e))continue;const _0x5af604='flowJson.'+_0x51496e;delete _0x1d785c[_0x51496e],_0x540fff[_0x29b6e3(0x1e5)](_0x5af604),_0x1b43b7['push']({'code':_0x29b6e3(0x1b6),'path':_0x5af604,'message':_0x5af604+_0x29b6e3(0x1a1)});}if(Object[_0x29b6e3(0x167)][_0x29b6e3(0x146)][_0x29b6e3(0x154)](_0x1d785c,_0x29b6e3(0x1b7))){const _0x258ddc=_0x1d785c[_0x29b6e3(0x1b7)],_0x369d15=typeof _0x258ddc===_0x29b6e3(0x10a)?_0x258ddc[_0x29b6e3(0x1d4)]():_0x258ddc;if(isEmptyJsonValue(_0x258ddc)||_0x369d15===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5a15e9=_0x29b6e3(0x1b8);delete _0x1d785c[_0x29b6e3(0x1b7)],_0x540fff[_0x29b6e3(0x1e5)](_0x5a15e9),_0x1b43b7[_0x29b6e3(0x1e5)]({'code':_0x29b6e3(0x1b6),'path':_0x5a15e9,'message':_0x5a15e9+_0x29b6e3(0x148)+DEFAULT_FLOW_SCHEMA_VERSION+_0x29b6e3(0x1ed)});}}removeEmptyMetadata(_0x1d785c,_0x29b6e3(0x201),_0x1b43b7,_0x540fff);_0x2b182e['flowType']===_0x29b6e3(0x19d)&&!Object[_0x29b6e3(0x167)][_0x29b6e3(0x146)]['call'](_0x1d785c,_0x29b6e3(0x181))&&(_0x1d785c['pageMode']=_0x29b6e3(0x11a));_0x2b182e[_0x29b6e3(0x201)]=_0x1d785c;if(typeof _0x2b182e[_0x29b6e3(0x13e)]===_0x29b6e3(0x10a))_0x2b182e[_0x29b6e3(0x13e)]=_0x2b182e[_0x29b6e3(0x13e)][_0x29b6e3(0x1d4)]();return{'config':_0x2b182e,'warnings':_0x1b43b7,'removedPaths':_0x540fff};}function a287_0x2b53(_0x37c8db,_0x1b11d1){_0x37c8db=_0x37c8db-0xf5;const _0x4097f9=a287_0x4097();let _0x2b5337=_0x4097f9[_0x37c8db];return _0x2b5337;}export function validateFlowConfig(_0x1af917){const _0x5697e6=a287_0x571368;let _0x2ff934;try{_0x2ff934=normalizeFlowConfig(_0x1af917);}catch(_0x3945c0){const _0x4166b4=_0x3945c0 instanceof Error?_0x3945c0[_0x5697e6(0x1bc)]:String(_0x3945c0),_0x4d11fe={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x4166b4}],'warnings':[],'normalized':_0x4d11fe,'validationConfig':_0x4d11fe};}const _0x19e30e=_0x2ff934['config'],_0x202c89=cloneJsonValue(_0x19e30e),_0x34486e=_0x202c89[_0x5697e6(0x201)];_0x34486e['flowKey']=_0x5697e6(0x14f),_0x34486e[_0x5697e6(0x13e)]=_0x19e30e[_0x5697e6(0x13e)];typeof _0x19e30e[_0x5697e6(0x14d)]===_0x5697e6(0x10a)&&_0x19e30e['datasetCode'][_0x5697e6(0x1d4)]()&&(_0x34486e['bindDatasetCode']=_0x19e30e[_0x5697e6(0x14d)][_0x5697e6(0x1d4)]());const _0x16f512=[];return validateOuterMetadata(_0x19e30e,_0x16f512),validateFlowClassification(_0x19e30e,_0x16f512),validateGraph(_0x19e30e[_0x5697e6(0x201)],_0x16f512),{'valid':_0x16f512[_0x5697e6(0x251)]===0x0,'errors':_0x16f512,'warnings':_0x2ff934[_0x5697e6(0x207)],'normalized':_0x19e30e,'validationConfig':_0x202c89};}function validateFlowClassification(_0x2540ac,_0x105eae){const _0x3dcca8=a287_0x571368;if(!isRecord(_0x2540ac[_0x3dcca8(0x201)]))return;const _0x22899e=_0x2540ac[_0x3dcca8(0x155)],_0xcca33c=_0x2540ac[_0x3dcca8(0x201)][_0x3dcca8(0x181)];_0xcca33c!==undefined&&(typeof _0xcca33c!=='string'||!FLOW_PAGE_MODES[_0x3dcca8(0x223)](_0xcca33c))&&_0x105eae[_0x3dcca8(0x1e5)]({'path':_0x3dcca8(0x226),'message':'Unsupported\x20pageMode:\x20'+String(_0xcca33c)+'.'});_0x22899e==='FORM_FLOW'&&_0xcca33c!==undefined&&_0x105eae['push']({'path':'flowJson.pageMode','message':_0x3dcca8(0x1f3)});_0x22899e==='INDEPENDENT_FLOW'&&_0xcca33c==='PLATFORM_FORM'&&_0x105eae['push']({'path':_0x3dcca8(0x226),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x22899e===_0x3dcca8(0x216)||_0x22899e==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0x2540ac,_0x22899e,_0xcca33c,_0x105eae);if(_0x22899e!==_0x3dcca8(0x216)||!Array[_0x3dcca8(0x13a)](_0x2540ac[_0x3dcca8(0x201)][_0x3dcca8(0x22c)]))return;_0x2540ac['flowJson'][_0x3dcca8(0x22c)][_0x3dcca8(0x18e)]((_0x24458a,_0x3ee65a)=>{const _0x320f31=_0x3dcca8;isRecord(_0x24458a)&&_0x24458a['type']==='APPROVAL'&&_0x24458a['taskMode']===_0x320f31(0x213)&&_0x105eae['push']({'path':_0x320f31(0x116)+_0x3ee65a+_0x320f31(0x171),'message':_0x320f31(0x1a3)});});}function validateCustomPageNavigation(_0x1dbe34,_0x5056a3,_0x30e102,_0x2766aa){const _0x543afd=a287_0x571368,_0x4321b5=_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x1e2)];_0x4321b5!==undefined&&_0x2766aa['push']({'path':_0x543afd(0x243),'message':_0x543afd(0x237)});const _0x1c77dd=_0x1dbe34['flowJson'][_0x543afd(0x1a2)];_0x1c77dd!==undefined&&(typeof _0x1c77dd!==_0x543afd(0x10a)||_0x1c77dd['trim']()==='')&&_0x2766aa[_0x543afd(0x1e5)]({'path':_0x543afd(0x236),'message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x57abc7=Array['isArray'](_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x22c)])?_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x22c)][_0x543afd(0x1f7)]((_0xc44b8c,_0x1b4962)=>({'node':_0xc44b8c,'index':_0x1b4962}))[_0x543afd(0x121)](({node:_0x4c2d43})=>isRecord(_0x4c2d43)&&_0x4c2d43[_0x543afd(0x1d7)]!==undefined):[],_0x8720ca=_0x1c77dd!==undefined||_0x57abc7[_0x543afd(0x251)]>0x0,_0x1d44db=_0x30e102===undefined&&_0x5056a3===_0x543afd(0x19d)?_0x543afd(0x11a):_0x30e102;_0x8720ca&&(_0x5056a3!==_0x543afd(0x19d)||_0x1d44db!==_0x543afd(0x11a))&&(_0x1c77dd!==undefined&&_0x2766aa['push']({'path':_0x543afd(0x236),'message':_0x543afd(0x240)}),_0x57abc7['forEach'](({index:_0x2c7a19})=>{const _0x1ea220=_0x543afd;_0x2766aa[_0x1ea220(0x1e5)]({'path':'flowJson.nodes['+_0x2c7a19+'].path','message':_0x1ea220(0x1c7)});}));}export async function writeNormalizedFlowConfig(_0x2112b1,_0x5410b0,_0x20a723={}){const _0x290e48=a287_0x571368,_0x3e9c9b=resolve(_0x2112b1),_0x2f5ef1=_0x3e9c9b+'.'+process['pid']+'.'+randomUUID()+_0x290e48(0x206),_0x79c502=JSON[_0x290e48(0x1e3)](_0x5410b0,null,0x2)+'\x0a';let _0x15781d;try{try{_0x15781d=(await stat(_0x3e9c9b))[_0x290e48(0x1d1)]&0x1ff;}catch{_0x15781d=undefined;}await writeFile(_0x2f5ef1,_0x79c502,{'encoding':'utf8','flag':'wx','mode':_0x15781d??0x1a4});if(_0x15781d!==undefined)await chmod(_0x2f5ef1,_0x15781d);_0x20a723['overwrite']===![]?(await link(_0x2f5ef1,_0x3e9c9b),await unlink(_0x2f5ef1)):await rename(_0x2f5ef1,_0x3e9c9b);}finally{await unlink(_0x2f5ef1)[_0x290e48(0xf7)](()=>undefined);}}function validateOuterMetadata(_0x4812d9,_0xb358ed){const _0x4745aa=a287_0x571368;(typeof _0x4812d9[_0x4745aa(0x13e)]!==_0x4745aa(0x10a)||_0x4812d9[_0x4745aa(0x13e)][_0x4745aa(0x1d4)]()==='')&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x13e),'message':'flowName\x20is\x20required.'});_0x4812d9[_0x4745aa(0x14e)]!==undefined&&typeof _0x4812d9['flowDesc']!==_0x4745aa(0x10a)&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14e),'message':_0x4745aa(0x17f)});if(_0x4812d9[_0x4745aa(0x155)]===undefined||_0x4812d9['flowType']===null)_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x155),'message':'flowType\x20is\x20required.'});else(typeof _0x4812d9[_0x4745aa(0x155)]!==_0x4745aa(0x10a)||!FLOW_TYPES[_0x4745aa(0x223)](_0x4812d9[_0x4745aa(0x155)]))&&_0xb358ed['push']({'path':'flowType','message':_0x4745aa(0x18d)+String(_0x4812d9['flowType'])+'.'});_0x4812d9['datasetCode']!==undefined&&typeof _0x4812d9[_0x4745aa(0x14d)]!=='string'&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14d),'message':_0x4745aa(0x1bb)}),_0x4812d9[_0x4745aa(0x210)]!==undefined&&(!Number['isInteger'](_0x4812d9[_0x4745aa(0x210)])||_0x4812d9['pageId']<0x0)&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x210),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x4812d9[_0x4745aa(0x155)]===_0x4745aa(0x19d)&&_0x4812d9[_0x4745aa(0x14d)]!==undefined&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14d),'message':_0x4745aa(0x1ae)}),_0x4812d9['flowType']==='INDEPENDENT_FLOW'&&_0x4812d9[_0x4745aa(0x210)]!==undefined&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x210),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x4d8347,_0x49cf12){const _0x3d4d01=a287_0x571368;if(!isRecord(_0x4d8347)){_0x49cf12['push']({'path':'flowJson','message':_0x3d4d01(0x157)});return;}!Array[_0x3d4d01(0x13a)](_0x4d8347['nodes'])&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':'flowJson.nodes','message':_0x3d4d01(0x188)});!Array[_0x3d4d01(0x13a)](_0x4d8347[_0x3d4d01(0x134)])&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1fb),'message':_0x3d4d01(0x1ff)});Object[_0x3d4d01(0x167)][_0x3d4d01(0x146)][_0x3d4d01(0x154)](_0x4d8347,_0x3d4d01(0x1b7))&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1b8),'message':_0x3d4d01(0x23a)+String(_0x4d8347[_0x3d4d01(0x1b7)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x52e84c of['formSchema',_0x3d4d01(0x11d),_0x3d4d01(0x1c8)]){Object[_0x3d4d01(0x167)]['hasOwnProperty'][_0x3d4d01(0x154)](_0x4d8347,_0x52e84c)&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1c2)+_0x52e84c,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x3d4d01(0x13a)](_0x4d8347['nodes'])||!Array['isArray'](_0x4d8347[_0x3d4d01(0x134)]))return;const _0x2d3c44=new Map(),_0xcb1e73=[],_0xb839ea=[],_0x38a3ad=new Map(),_0x55db1b=new Map(),_0x4a5345=new Set();let _0x7c278d=0x0;_0x4d8347['nodes'][_0x3d4d01(0x18e)]((_0x238f01,_0x535cb4)=>{const _0x268424=_0x3d4d01,_0x585cde=_0x268424(0x116)+_0x535cb4+']';if(!isRecord(_0x238f01)){_0x49cf12[_0x268424(0x1e5)]({'path':_0x585cde,'message':_0x268424(0x218)});return;}const _0x21a110=_0x238f01;if(typeof _0x21a110['id']!==_0x268424(0x10a)||!BPMN_ID_PATTERN[_0x268424(0x172)](_0x21a110['id']))_0x49cf12['push']({'path':_0x585cde+_0x268424(0x16f),'message':_0x268424(0x159)});else _0x2d3c44[_0x268424(0x223)](_0x21a110['id'])?_0x49cf12['push']({'path':_0x585cde+_0x268424(0x16f),'message':_0x268424(0x106)+_0x21a110['id']+'.'}):(_0x2d3c44['set'](_0x21a110['id'],_0x21a110),_0x4a5345[_0x268424(0x21c)](_0x21a110['id']));if(!NODE_TYPES[_0x268424(0x223)](_0x21a110[_0x268424(0x197)]))_0x49cf12[_0x268424(0x1e5)]({'path':_0x585cde+'.type','message':_0x268424(0x1f9)+String(_0x21a110['type'])+'.'});else{if(_0x21a110[_0x268424(0x197)]===_0x268424(0x22a))_0xcb1e73['push'](_0x21a110['id']);else _0x21a110['type']===_0x268424(0xfc)&&_0xb839ea[_0x268424(0x1e5)](_0x21a110['id']);}_0x21a110[_0x268424(0x197)]===_0x268424(0x124)&&(_0x21a110[_0x268424(0x191)]===undefined||_0x21a110['taskMode']===_0x268424(0x124))&&(_0x7c278d+=0x1);validateNode(_0x21a110,_0x585cde,_0x49cf12);if(_0x21a110[_0x268424(0x197)]===_0x268424(0x1b1)){const _0x5d4887=resolveEffectiveResultVariable(_0x21a110[_0x268424(0x208)],![]);_0x5d4887&&(registerResultVariableOwner(_0x55db1b,_0x5d4887,_0x21a110['id'],_0x49cf12),!_0x38a3ad['has'](_0x5d4887)&&_0x38a3ad[_0x268424(0x156)](_0x5d4887,_0x21a110['id']));}if(_0x21a110[_0x268424(0x197)]==='APPROVAL'&&isRecord(_0x21a110[_0x268424(0x253)])&&_0x21a110[_0x268424(0x253)]['enabled']===!![]&&_0x21a110['timeout'][_0x268424(0x1af)]===_0x268424(0x114)){const _0x443ba1=resolveEffectiveResultVariable(_0x21a110[_0x268424(0x253)][_0x268424(0x208)],!![]);_0x443ba1&®isterResultVariableOwner(_0x55db1b,_0x443ba1,_0x21a110['id']+'.timeout',_0x49cf12);}});_0xcb1e73[_0x3d4d01(0x251)]!==0x1&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x24e),'message':_0x3d4d01(0x108)});_0xb839ea[_0x3d4d01(0x251)]===0x0&&_0x49cf12['push']({'path':'flowJson.nodes','message':_0x3d4d01(0x214)});const _0x1ca070=new Map(),_0x15fe0e=new Map(),_0x3e0a65=new Map(),_0x44089c=new Set();_0x4d8347['edges'][_0x3d4d01(0x18e)]((_0x1305dd,_0x1f14cf)=>{const _0x10b54d=_0x3d4d01,_0x1067fb='flowJson.edges['+_0x1f14cf+']';if(!isRecord(_0x1305dd)){_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb,'message':_0x10b54d(0x1d8)});return;}const _0x1130d1=_0x1305dd;_0x3e0a65['set'](_0x1130d1,_0x1067fb);const _0x4ef417=resolveEdgeEndpoint(_0x1130d1[_0x10b54d(0x16d)],_0x1130d1[_0x10b54d(0x112)]),_0x1ceb56=resolveEdgeEndpoint(_0x1130d1[_0x10b54d(0x151)],_0x1130d1['targetNodeId']);if(!_0x4ef417)_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x15e),'message':_0x10b54d(0x1d5)});if(!_0x1ceb56)_0x49cf12['push']({'path':_0x1067fb+_0x10b54d(0x184),'message':'edge\x20target\x20is\x20required.'});_0x4ef417&&!_0x2d3c44[_0x10b54d(0x223)](_0x4ef417)&&_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x15e),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x4ef417+'.'});_0x1ceb56&&!_0x2d3c44['has'](_0x1ceb56)&&_0x49cf12['push']({'path':_0x1067fb+_0x10b54d(0x184),'message':_0x10b54d(0x1fa)+_0x1ceb56+'.'});if(_0x1130d1['id']!==undefined){if(typeof _0x1130d1['id']!==_0x10b54d(0x10a)||!BPMN_ID_PATTERN['test'](_0x1130d1['id']))_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x16f),'message':_0x10b54d(0x17b)});else{if(_0x4a5345[_0x10b54d(0x223)](_0x1130d1['id']))_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x16f),'message':_0x10b54d(0x150)+_0x1130d1['id']+'.'});else!_0x4a5345[_0x10b54d(0x223)](_0x1130d1['id'])&&_0x4a5345[_0x10b54d(0x21c)](_0x1130d1['id']);}}if(_0x4ef417&&_0x1ceb56){const _0x542f1c=_0x4ef417+'\x00'+_0x1ceb56+'\x00'+(_0x1130d1[_0x10b54d(0x23b)]??_0x10b54d(0x18a));_0x44089c[_0x10b54d(0x223)](_0x542f1c)?_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb,'message':_0x10b54d(0xff)+_0x4ef417+_0x10b54d(0x120)+_0x1ceb56+'\x20('+(_0x1130d1[_0x10b54d(0x23b)]??'ALWAYS')+').'}):_0x44089c[_0x10b54d(0x21c)](_0x542f1c);}validateEdge(_0x1130d1,_0x1067fb,_0x49cf12),_0x4ef417&&_0x1ceb56&&(_0x1ca070[_0x10b54d(0x19f)](_0x4ef417)?.[_0x10b54d(0x1e5)](_0x1130d1)??_0x1ca070['set'](_0x4ef417,[_0x1130d1]),_0x15fe0e[_0x10b54d(0x19f)](_0x1ceb56)?.[_0x10b54d(0x1e5)](_0x1130d1)??_0x15fe0e[_0x10b54d(0x156)](_0x1ceb56,[_0x1130d1]));});if(_0xcb1e73[_0x3d4d01(0x251)]!==0x1)return;validateGraphShape(_0x2d3c44,_0xcb1e73[0x0],_0xb839ea,_0x1ca070,_0x15fe0e,_0x3e0a65,_0x49cf12),validateScriptResultReferences(_0x2d3c44,_0xcb1e73[0x0],_0x1ca070,_0x15fe0e,_0x3e0a65,_0x38a3ad,_0x49cf12),validateApprovalResults(_0x2d3c44,_0x7c278d,_0xb839ea,_0x49cf12);}function validateNode(_0x34b384,_0x2e9598,_0x180b59){const _0x54bbb3=a287_0x571368;for(const _0x4e2fa0 of[_0x54bbb3(0x143),_0x54bbb3(0x1d6)]){Object[_0x54bbb3(0x167)][_0x54bbb3(0x146)][_0x54bbb3(0x154)](_0x34b384,_0x4e2fa0)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.'+_0x4e2fa0,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x54bbb3(0x223)](_0x34b384[_0x54bbb3(0x197)]))return;(typeof _0x34b384[_0x54bbb3(0x127)]!=='string'||_0x34b384[_0x54bbb3(0x127)][_0x54bbb3(0x1d4)]()==='')&&_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x1d3),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x34b384['pageId']!==undefined&&_0x180b59['push']({'path':_0x2e9598+'.pageId','message':_0x54bbb3(0xf9)});if(_0x34b384['path']!==undefined){if(typeof _0x34b384[_0x54bbb3(0x1d7)]!==_0x54bbb3(0x10a)||_0x34b384[_0x54bbb3(0x1d7)][_0x54bbb3(0x1d4)]()==='')_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1b2),'message':_0x54bbb3(0x15a)});else _0x34b384['type']!==_0x54bbb3(0x124)&&_0x34b384[_0x54bbb3(0x197)]!==_0x54bbb3(0xfc)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1b2),'message':_0x54bbb3(0x234)});}const _0x37da25=_0x34b384[_0x54bbb3(0x1fe)];if(!isRecord(_0x37da25))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x16a),'message':_0x54bbb3(0x125)});else for(const _0x54db46 of['x','y']){const _0x180c1d=_0x37da25[_0x54db46];(typeof _0x180c1d!==_0x54bbb3(0x15f)||!Number[_0x54bbb3(0x1f6)](_0x180c1d)||_0x180c1d<0x0)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.position.'+_0x54db46,'message':_0x54bbb3(0x12f)+_0x54db46+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x34b384['type']===_0x54bbb3(0x124)){const _0x439764=_0x34b384[_0x54bbb3(0x10b)]??_0x54bbb3(0x1e4),_0x299213=_0x34b384[_0x54bbb3(0x191)]??_0x54bbb3(0x124);!APPROVAL_TASK_MODES[_0x54bbb3(0x223)](_0x299213)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x299213)+'.'});!APPROVAL_MODES[_0x54bbb3(0x223)](_0x439764)&&_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x229),'message':_0x54bbb3(0x129)+String(_0x439764)+'.'});if(!isRecord(_0x34b384[_0x54bbb3(0x15c)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.assignee','message':_0x54bbb3(0x17d)});else{const _0x583161=_0x34b384[_0x54bbb3(0x15c)][_0x54bbb3(0x10c)];_0x583161!==_0x54bbb3(0x1de)&&_0x583161!==_0x54bbb3(0x14c)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.assignee.strategy','message':_0x54bbb3(0x233)});if(_0x583161===_0x54bbb3(0x1de)){const _0x51fcd0=_0x34b384[_0x54bbb3(0x15c)]['userIds'];if(!Array[_0x54bbb3(0x13a)](_0x51fcd0)||_0x51fcd0[_0x54bbb3(0x251)]===0x0)_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a9),'message':_0x54bbb3(0x152)});else{const _0x2447ce=_0x51fcd0[_0x54bbb3(0x158)](_0x5a26b0=>!isValidUserId(_0x5a26b0));_0x2447ce>=0x0&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a8)+_0x2447ce+']','message':_0x54bbb3(0x173)});const _0x2a94b8=new Set(_0x51fcd0[_0x54bbb3(0x121)](isValidUserId)[_0x54bbb3(0x1f7)](_0x10c011=>String(_0x10c011)[_0x54bbb3(0x1d4)]()));_0x439764===_0x54bbb3(0x1e4)&&_0x2a94b8['size']>0x1&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a9),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x583161===_0x54bbb3(0x14c)){const _0x5f0ca3=_0x34b384['assignee'][_0x54bbb3(0x115)],_0xbcf82e=typeof _0x5f0ca3===_0x54bbb3(0x15f)||typeof _0x5f0ca3===_0x54bbb3(0x10a)?Number(String(_0x5f0ca3)['trim']()):Number[_0x54bbb3(0x1a5)];(!Number[_0x54bbb3(0x202)](_0xbcf82e)||_0xbcf82e<=0x0)&&_0x180b59['push']({'path':_0x2e9598+'.assignee.roleId','message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x34b384['transferCandidates']!==undefined){if(!isRecord(_0x34b384[_0x54bbb3(0x144)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.transferCandidates','message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x34b384[_0x54bbb3(0x144)]['strategy']!==_0x54bbb3(0x1de))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x12e),'message':_0x54bbb3(0x107)});else{const _0x3346f3=_0x34b384[_0x54bbb3(0x144)][_0x54bbb3(0x252)];if(!Array[_0x54bbb3(0x13a)](_0x3346f3)||_0x3346f3[_0x54bbb3(0x251)]===0x0)_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x175),'message':_0x54bbb3(0x19e)});else{const _0x37b49f=_0x3346f3[_0x54bbb3(0x158)](_0xe50e06=>!isValidUserId(_0xe50e06));_0x37b49f>=0x0&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x23f)+_0x37b49f+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x34b384[_0x54bbb3(0xfd)]!==undefined&&typeof _0x34b384[_0x54bbb3(0xfd)]!==_0x54bbb3(0x16e)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.sequential','message':_0x54bbb3(0x246)});if(_0x34b384[_0x54bbb3(0x197)]===_0x54bbb3(0x1b1)){(typeof _0x34b384[_0x54bbb3(0x11c)]!=='string'||_0x34b384['scriptName'][_0x54bbb3(0x1d4)]()==='')&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x15d),'message':_0x54bbb3(0x1bf)});if(_0x34b384[_0x54bbb3(0x208)]!==undefined){if(typeof _0x34b384[_0x54bbb3(0x208)]!==_0x54bbb3(0x10a)||!VARIABLE_PATTERN[_0x54bbb3(0x172)](_0x34b384[_0x54bbb3(0x208)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x149),'message':_0x54bbb3(0x1f8)});else(RESERVED_RESULT_VARIABLES[_0x54bbb3(0x223)](_0x34b384[_0x54bbb3(0x208)])||_0x34b384['resultVariable'][_0x54bbb3(0x199)](_0x54bbb3(0x1a4)))&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x149),'message':_0x54bbb3(0x105)+_0x34b384['resultVariable']+'.'});}}validateAsyncExecution(_0x34b384,_0x2e9598,_0x180b59),validateApprovalTimeout(_0x34b384,_0x2e9598,_0x180b59),validateCcConfig(_0x34b384,_0x2e9598,_0x180b59),_0x34b384[_0x54bbb3(0x197)]===_0x54bbb3(0x211)&&validateNotificationConfig(_0x34b384[_0x54bbb3(0x24f)],_0x2e9598+_0x54bbb3(0x103),_0x180b59);}function validateAsyncExecution(_0xf81579,_0x1d1372,_0x18801b){const _0xf70028=a287_0x571368;if(_0xf81579[_0xf70028(0x18b)]===undefined)return;if(!isRecord(_0xf81579[_0xf70028(0x18b)])){_0x18801b['push']({'path':_0x1d1372+_0xf70028(0x204),'message':_0xf70028(0x193)});return;}if(_0xf81579[_0xf70028(0x18b)]['enabled']!==undefined&&typeof _0xf81579[_0xf70028(0x18b)][_0xf70028(0x1b0)]!=='boolean'){_0x18801b[_0xf70028(0x1e5)]({'path':_0x1d1372+'.async.enabled','message':_0xf70028(0x130)});return;}if(_0xf81579[_0xf70028(0x18b)][_0xf70028(0x1b0)]!==!![])return;_0xf81579[_0xf70028(0x197)]!==_0xf70028(0x1b1)&&_0x18801b['push']({'path':_0x1d1372+_0xf70028(0x204),'message':_0xf70028(0x22d)});const _0x2e2869=_0xf81579[_0xf70028(0x18b)][_0xf70028(0x238)]??0x3;(!Number['isInteger'](_0x2e2869)||_0x2e2869<0x1||_0x2e2869>MAX_ASYNC_RETRY_COUNT)&&_0x18801b[_0xf70028(0x1e5)]({'path':_0x1d1372+_0xf70028(0x161),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0xf81579[_0xf70028(0x18b)][_0xf70028(0x20c)]!==undefined&&validateTimeAmount(_0xf81579[_0xf70028(0x18b)][_0xf70028(0x20c)],_0x1d1372+'.async.retryInterval',_0x18801b);}function validateApprovalTimeout(_0x7d778d,_0x361af4,_0xb1c558){const _0x5532e8=a287_0x571368;if(_0x7d778d['timeout']===undefined)return;if(!isRecord(_0x7d778d[_0x5532e8(0x253)])){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x196),'message':_0x5532e8(0x242)});return;}if(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1b0)]!==undefined&&typeof _0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1b0)]!==_0x5532e8(0x16e)){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x100),'message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x7d778d['timeout'][_0x5532e8(0x1b0)]!==!![])return;if(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]!==undefined&&typeof _0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]!=='boolean'){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.interrupting','message':_0x5532e8(0x249)});return;}_0x7d778d['type']!==_0x5532e8(0x124)&&_0xb1c558['push']({'path':_0x361af4+_0x5532e8(0x196),'message':_0x5532e8(0x1cf)});validateTimeAmount(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1c5)],_0x361af4+_0x5532e8(0x131),_0xb1c558);const _0x23c0ed=_0x7d778d['timeout'][_0x5532e8(0x1af)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x23c0ed)){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.action','message':_0x5532e8(0x20d)});return;}(_0x7d778d[_0x5532e8(0x191)]??_0x5532e8(0x124))===_0x5532e8(0x213)&&_0x23c0ed!=='EXECUTE_BFF'&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x1df),'message':_0x5532e8(0x186)});const _0x26091c=_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]??_0x23c0ed!=='EXECUTE_BFF';if(_0x23c0ed===_0x5532e8(0x114))_0x26091c&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.interrupting','message':_0x5532e8(0x1ca)}),(typeof _0x7d778d[_0x5532e8(0x253)]['scriptName']!==_0x5532e8(0x10a)||_0x7d778d['timeout'][_0x5532e8(0x11c)]['trim']()==='')&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x138),'message':_0x5532e8(0x118)}),validateOptionalResultVariable(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x208)],_0x361af4+_0x5532e8(0x1a0),_0xb1c558);else!_0x26091c&&_0xb1c558['push']({'path':_0x361af4+_0x5532e8(0x24d),'message':_0x23c0ed+_0x5532e8(0x176)});}function validateTimeAmount(_0x5e2733,_0x4557d0,_0x207d76){const _0x2e0ec8=a287_0x571368;if(!isRecord(_0x5e2733)){_0x207d76[_0x2e0ec8(0x1e5)]({'path':_0x4557d0,'message':_0x2e0ec8(0x165)});return;}(!Number[_0x2e0ec8(0x22e)](_0x5e2733[_0x2e0ec8(0x190)])||Number(_0x5e2733['value'])<=0x0)&&_0x207d76['push']({'path':_0x4557d0+_0x2e0ec8(0x11b),'message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x2e0ec8(0x223)](_0x5e2733[_0x2e0ec8(0x220)])&&_0x207d76[_0x2e0ec8(0x1e5)]({'path':_0x4557d0+_0x2e0ec8(0x164),'message':_0x2e0ec8(0x21f)});}function validateOptionalResultVariable(_0x145817,_0x4318fc,_0x1dc2db){const _0x32e7c5=a287_0x571368;if(_0x145817===undefined||_0x145817===null||_0x145817==='')return;if(typeof _0x145817!=='string'||!VARIABLE_PATTERN[_0x32e7c5(0x172)](_0x145817))_0x1dc2db[_0x32e7c5(0x1e5)]({'path':_0x4318fc,'message':_0x32e7c5(0x1f8)});else(RESERVED_RESULT_VARIABLES[_0x32e7c5(0x223)](_0x145817)||_0x145817[_0x32e7c5(0x199)](_0x32e7c5(0x1a4)))&&_0x1dc2db[_0x32e7c5(0x1e5)]({'path':_0x4318fc,'message':_0x32e7c5(0x105)+_0x145817+'.'});}function validateCcConfig(_0x285cd7,_0x583be8,_0x386bcf){const _0x95d910=a287_0x571368;if(_0x285cd7['cc']===undefined)return;if(!isRecord(_0x285cd7['cc'])){_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x1c0),'message':_0x95d910(0x179)});return;}_0x285cd7[_0x95d910(0x197)]!=='END'&&_0x285cd7[_0x95d910(0x197)]!==_0x95d910(0x124)&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+'.cc','message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x95d910(0x167)][_0x95d910(0x146)][_0x95d910(0x154)](_0x285cd7['cc'],_0x95d910(0x132))&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x1fd),'message':UNSUPPORTED_FORM_MESSAGE});const _0x23792f=_0x285cd7['cc'][_0x95d910(0x110)];if(!Array[_0x95d910(0x13a)](_0x23792f)||_0x23792f[_0x95d910(0x251)]===0x0)_0x386bcf['push']({'path':_0x583be8+_0x95d910(0x24b),'message':_0x95d910(0x183)});else{_0x23792f['length']>MAX_CC_RECIPIENTS&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x24b),'message':_0x95d910(0x126)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x4999ae=new Set();_0x23792f[_0x95d910(0x18e)]((_0x123fc3,_0x145ad1)=>{const _0x58637d=_0x95d910;if(typeof _0x123fc3!==_0x58637d(0x10a)||_0x123fc3[_0x58637d(0x1d4)]()==='')_0x386bcf[_0x58637d(0x1e5)]({'path':_0x583be8+_0x58637d(0x24c)+_0x145ad1+']','message':_0x58637d(0x20a)});else _0x4999ae[_0x58637d(0x223)](_0x123fc3[_0x58637d(0x1d4)]())?_0x386bcf[_0x58637d(0x1e5)]({'path':_0x583be8+_0x58637d(0x24c)+_0x145ad1+']','message':_0x58637d(0x1b4)+_0x123fc3[_0x58637d(0x1d4)]()+'.'}):_0x4999ae['add'](_0x123fc3['trim']());});}validateStringArray(_0x285cd7['cc'][_0x95d910(0x1cd)],_0x583be8+'.cc.visible',_0x386bcf);}function validateStringArray(_0x4d66cb,_0x540796,_0x40c35f){const _0x3ab9e6=a287_0x571368;if(_0x4d66cb===undefined)return;if(!Array[_0x3ab9e6(0x13a)](_0x4d66cb)){_0x40c35f[_0x3ab9e6(0x1e5)]({'path':_0x540796,'message':_0x3ab9e6(0x241)});return;}const _0x1199f2=new Set();_0x4d66cb[_0x3ab9e6(0x18e)]((_0x1067e6,_0x4c7d7f)=>{const _0x5921c2=_0x3ab9e6;if(typeof _0x1067e6!=='string'||_0x1067e6[_0x5921c2(0x1d4)]()==='')_0x40c35f[_0x5921c2(0x1e5)]({'path':_0x540796+'['+_0x4c7d7f+']','message':_0x5921c2(0x219)});else _0x1199f2[_0x5921c2(0x223)](_0x1067e6[_0x5921c2(0x1d4)]())?_0x40c35f[_0x5921c2(0x1e5)]({'path':_0x540796+'['+_0x4c7d7f+']','message':_0x5921c2(0x192)+_0x1067e6[_0x5921c2(0x1d4)]()+'.'}):_0x1199f2[_0x5921c2(0x21c)](_0x1067e6[_0x5921c2(0x1d4)]());});}function validateNotificationConfig(_0x2200b6,_0x3295c9,_0x28a022){const _0x5f3d2c=a287_0x571368;if(!isRecord(_0x2200b6)){_0x28a022['push']({'path':_0x3295c9,'message':_0x5f3d2c(0x14b)});return;}if(_0x2200b6[_0x5f3d2c(0x1e6)]!==undefined&&_0x2200b6[_0x5f3d2c(0x1e6)]!==null){if(typeof _0x2200b6['version']!==_0x5f3d2c(0x10a))_0x28a022['push']({'path':_0x3295c9+'.version','message':_0x5f3d2c(0x19b)});else _0x2200b6[_0x5f3d2c(0x1e6)][_0x5f3d2c(0x1d4)]()&&_0x2200b6[_0x5f3d2c(0x1e6)][_0x5f3d2c(0x1d4)]()!=='v1'&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x123),'message':_0x5f3d2c(0x10f)+_0x2200b6[_0x5f3d2c(0x1e6)]+'.'});}const _0x3caf32=requireNotificationString(_0x2200b6[_0x5f3d2c(0x215)],_0x3295c9+_0x5f3d2c(0x136),'Notification\x20configCode\x20is\x20required.',_0x28a022);_0x3caf32?.['includes']('${')&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x136),'message':_0x5f3d2c(0x170)});if(_0x2200b6[_0x5f3d2c(0x19c)]!==undefined&&_0x2200b6[_0x5f3d2c(0x19c)]!==null){if(typeof _0x2200b6[_0x5f3d2c(0x19c)]!==_0x5f3d2c(0x10a))_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x10e),'message':_0x5f3d2c(0xf6)});else!NOTIFICATION_FAILURE_POLICIES[_0x5f3d2c(0x223)](_0x2200b6[_0x5f3d2c(0x19c)]['trim']()[_0x5f3d2c(0x255)]())&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x10e),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x2200b6[_0x5f3d2c(0x1be)])?_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x1c3),'message':_0x5f3d2c(0x17c)}):validateNotificationTemplate(_0x2200b6['template'],_0x3295c9+_0x5f3d2c(0x1c3),_0x28a022),validateNotificationRecipients(_0x2200b6[_0x5f3d2c(0x174)],_0x3295c9+'.recipients',_0x28a022);}function validateNotificationTemplate(_0x2900d7,_0x17412e,_0x3f3730){const _0x2807b7=a287_0x571368;for(const _0x5c2d72 of[_0x2807b7(0x104),_0x2807b7(0x1a7)]){const _0x1c9281=requireNotificationString(_0x2900d7[_0x5c2d72],_0x17412e+'.'+_0x5c2d72,_0x2807b7(0x1d0)+_0x5c2d72+_0x2807b7(0x1f5),_0x3f3730);if(_0x1c9281)validateNotificationPlaceholders(_0x1c9281,_0x17412e+'.'+_0x5c2d72,_0x3f3730);}_0x2900d7[_0x2807b7(0x1ef)]!==undefined&&_0x2900d7[_0x2807b7(0x1ef)]!==null&&(typeof _0x2900d7[_0x2807b7(0x1ef)]!=='string'?_0x3f3730['push']({'path':_0x17412e+'.detailMarkdown','message':_0x2807b7(0x135)}):validateNotificationPlaceholders(_0x2900d7['detailMarkdown'],_0x17412e+_0x2807b7(0x117),_0x3f3730)),validateNotificationFacts(_0x2900d7[_0x2807b7(0x230)],_0x17412e+'.facts',_0x3f3730),validateNotificationActions(_0x2900d7[_0x2807b7(0x221)],_0x17412e+'.actions',_0x3f3730);}function validateNotificationFacts(_0x4ed697,_0x3791dd,_0x35a76c){const _0x1404ff=a287_0x571368;if(_0x4ed697===undefined||_0x4ed697===null)return;if(!Array[_0x1404ff(0x13a)](_0x4ed697)){_0x35a76c[_0x1404ff(0x1e5)]({'path':_0x3791dd,'message':_0x1404ff(0x21e)});return;}_0x4ed697[_0x1404ff(0x251)]>MAX_NOTIFICATION_FACTS&&_0x35a76c[_0x1404ff(0x1e5)]({'path':_0x3791dd,'message':_0x1404ff(0x101)+MAX_NOTIFICATION_FACTS+_0x1404ff(0x141)}),_0x4ed697[_0x1404ff(0x18e)]((_0x165663,_0x3a3df2)=>{const _0x1056cd=_0x1404ff,_0xd6a11a=_0x3791dd+'['+_0x3a3df2+']';if(!isRecord(_0x165663)){_0x35a76c['push']({'path':_0xd6a11a,'message':_0x1056cd(0x1cb)});return;}for(const _0xc8bbc8 of[_0x1056cd(0x133),'value']){const _0x4f5779=requireNotificationString(_0x165663[_0xc8bbc8],_0xd6a11a+'.'+_0xc8bbc8,_0x1056cd(0x140)+_0xc8bbc8+_0x1056cd(0x1f5),_0x35a76c);_0x4f5779&&validateNotificationPlaceholders(_0x4f5779,_0xd6a11a+'.'+_0xc8bbc8,_0x35a76c);}});}function validateNotificationActions(_0x28e142,_0x506a0a,_0x54960c){const _0x5ba567=a287_0x571368;if(_0x28e142===undefined||_0x28e142===null)return;if(!Array[_0x5ba567(0x13a)](_0x28e142)){_0x54960c[_0x5ba567(0x1e5)]({'path':_0x506a0a,'message':_0x5ba567(0xf5)});return;}_0x28e142[_0x5ba567(0x251)]>MAX_NOTIFICATION_ACTIONS&&_0x54960c[_0x5ba567(0x1e5)]({'path':_0x506a0a,'message':_0x5ba567(0x101)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x28e142['forEach']((_0x23395f,_0x56b422)=>{const _0x51620f=_0x5ba567,_0x303f06=_0x506a0a+'['+_0x56b422+']';if(!isRecord(_0x23395f)){_0x54960c[_0x51620f(0x1e5)]({'path':_0x303f06,'message':_0x51620f(0x1d9)});return;}const _0x1686d2=requireNotificationString(_0x23395f['text'],_0x303f06+_0x51620f(0x1e1),'Notification\x20action.text\x20is\x20required.',_0x54960c);if(_0x1686d2)validateNotificationPlaceholders(_0x1686d2,_0x303f06+_0x51620f(0x1e1),_0x54960c);const _0x385f17=requireNotificationString(_0x23395f[_0x51620f(0x13d)],_0x303f06+_0x51620f(0x16b),'Notification\x20action.url\x20is\x20required.',_0x54960c);if(!_0x385f17)return;validateNotificationPlaceholders(_0x385f17,_0x303f06+_0x51620f(0x16b),_0x54960c),!/^https?:\/\//i[_0x51620f(0x172)](_0x385f17)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x51620f(0x172)](_0x385f17)&&_0x54960c[_0x51620f(0x1e5)]({'path':_0x303f06+_0x51620f(0x16b),'message':_0x51620f(0x20f)});});}function validateNotificationRecipients(_0x586410,_0x31c45e,_0x4310ff){const _0x2642d4=a287_0x571368;if(_0x586410===undefined||_0x586410===null)return;if(!Array['isArray'](_0x586410)){_0x4310ff[_0x2642d4(0x1e5)]({'path':_0x31c45e,'message':_0x2642d4(0x162)});return;}let _0x29c700=![];_0x586410['forEach']((_0x484320,_0x5b05e6)=>{const _0x3cec7e=_0x2642d4,_0x51b351=_0x31c45e+'['+_0x5b05e6+']';if(!isRecord(_0x484320)){_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351,'message':_0x3cec7e(0x153)});return;}const _0x278ca1=requireNotificationString(_0x484320[_0x3cec7e(0x197)],_0x51b351+_0x3cec7e(0x244),_0x3cec7e(0x14a),_0x4310ff);_0x278ca1&&!NOTIFICATION_RECIPIENT_TYPES[_0x3cec7e(0x223)](_0x278ca1['toUpperCase']())&&_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x244),'message':_0x3cec7e(0x12d)});let _0x351bc5='TO';_0x484320[_0x3cec7e(0x166)]!==undefined&&_0x484320['role']!==null&&(typeof _0x484320[_0x3cec7e(0x166)]!==_0x3cec7e(0x10a)?(_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x1dc),'message':_0x3cec7e(0x1bd)}),_0x351bc5=''):(_0x351bc5=_0x484320['role'][_0x3cec7e(0x1d4)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x3cec7e(0x223)](_0x351bc5)&&_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x1dc),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x351bc5==='TO')_0x29c700=!![];const _0x5c720e=requireNotificationString(_0x484320['value'],_0x51b351+_0x3cec7e(0x11b),_0x3cec7e(0x21b),_0x4310ff);_0x5c720e&&validateNotificationPlaceholders(_0x5c720e,_0x51b351+_0x3cec7e(0x11b),_0x4310ff);}),_0x586410['length']>0x0&&!_0x29c700&&_0x4310ff[_0x2642d4(0x1e5)]({'path':_0x31c45e,'message':_0x2642d4(0x187)});}function requireNotificationString(_0x4f29d5,_0x48a9e8,_0x58b439,_0x5e4320){const _0x3765b9=a287_0x571368;if(typeof _0x4f29d5!==_0x3765b9(0x10a)||_0x4f29d5[_0x3765b9(0x1d4)]()==='')return _0x5e4320[_0x3765b9(0x1e5)]({'path':_0x48a9e8,'message':_0x58b439}),undefined;return _0x4f29d5['trim']();}function validateNotificationPlaceholders(_0x33006d,_0xac492b,_0x16dea7){const _0xd2de64=a287_0x571368;for(const _0x2bd9c5 of _0x33006d['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4e76eb=_0x2bd9c5[0x1]?.['trim']()??'',_0x2aaf8e=_0x4e76eb[_0xd2de64(0x23c)]('.'),_0x4a396c=_0x2aaf8e>=0x0?_0x4e76eb['slice'](0x0,_0x2aaf8e):_0x4e76eb,_0xc29e2e=_0x2aaf8e>=0x0?_0x4e76eb[_0xd2de64(0x1e7)](_0x2aaf8e+0x1)[_0xd2de64(0x1d4)]():'';(![_0xd2de64(0x139),_0xd2de64(0x12a),'variables'][_0xd2de64(0x15b)](_0x4a396c)||_0xc29e2e==='')&&_0x16dea7[_0xd2de64(0x1e5)]({'path':_0xac492b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x2bd9c5[0x0]+'.'});}_0x33006d[_0xd2de64(0x200)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0xd2de64(0x15b)]('${')&&_0x16dea7['push']({'path':_0xac492b,'message':_0xd2de64(0x180)});}function validateEdge(_0x20d935,_0x5b1ef0,_0x418a1c){const _0x502fa7=a287_0x571368;_0x20d935[_0x502fa7(0x127)]!==undefined&&typeof _0x20d935[_0x502fa7(0x127)]!==_0x502fa7(0x10a)&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x1d3),'message':_0x502fa7(0x147)}),_0x20d935[_0x502fa7(0x20e)]!==undefined&&typeof _0x20d935[_0x502fa7(0x20e)]!==_0x502fa7(0x16e)&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x178),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x20d935[_0x502fa7(0x182)]!==undefined&&(!Array[_0x502fa7(0x13a)](_0x20d935[_0x502fa7(0x182)])?_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x227),'message':_0x502fa7(0x13b)}):_0x20d935[_0x502fa7(0x182)][_0x502fa7(0x18e)]((_0x232bdf,_0x153858)=>{const _0x2b59de=_0x502fa7;if(!isRecord(_0x232bdf)){_0x418a1c['push']({'path':_0x5b1ef0+_0x2b59de(0x224)+_0x153858+']','message':_0x2b59de(0x232)});return;}for(const _0x3633c6 of['x','y']){const _0x583a23=_0x232bdf[_0x3633c6];(typeof _0x583a23!==_0x2b59de(0x15f)||!Number[_0x2b59de(0x1f6)](_0x583a23))&&_0x418a1c[_0x2b59de(0x1e5)]({'path':_0x5b1ef0+'.waypoints['+_0x153858+'].'+_0x3633c6,'message':_0x2b59de(0x12c)+_0x3633c6+_0x2b59de(0x1ba)});}})),_0x20d935['conditionType']!==undefined&&!CONDITION_TYPES[_0x502fa7(0x223)](_0x20d935[_0x502fa7(0x23b)])&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x19a),'message':_0x502fa7(0x1b3)+String(_0x20d935['conditionType'])+'.'}),_0x20d935[_0x502fa7(0x23b)]===_0x502fa7(0x225)&&(typeof _0x20d935['expression']!==_0x502fa7(0x10a)||_0x20d935[_0x502fa7(0x239)]['trim']()==='')&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x21d),'message':_0x502fa7(0x212)}),_0x20d935[_0x502fa7(0x20e)]===!![]&&_0x20d935['conditionType']!==_0x502fa7(0x18a)&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x178),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x20d935[_0x502fa7(0x20e)]===!![]&&typeof _0x20d935[_0x502fa7(0x239)]===_0x502fa7(0x10a)&&_0x20d935[_0x502fa7(0x239)][_0x502fa7(0x1d4)]()!==''&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x21d),'message':_0x502fa7(0x16c)});}function validateGraphShape(_0x32d509,_0x140a86,_0x297484,_0x14e133,_0x2c7499,_0x4497b9,_0x355590){const _0x3ffe76=a287_0x571368;for(const [_0x4fce7f,_0x47af26]of _0x32d509){const _0x272608=_0x2c7499['get'](_0x4fce7f)??[],_0x32456a=_0x14e133[_0x3ffe76(0x19f)](_0x4fce7f)??[];_0x47af26[_0x3ffe76(0x197)]!==_0x3ffe76(0x22a)&&_0x272608[_0x3ffe76(0x251)]===0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x1f4)});_0x47af26[_0x3ffe76(0x197)]!==_0x3ffe76(0xfc)&&_0x32456a[_0x3ffe76(0x251)]===0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x145)});_0x47af26[_0x3ffe76(0x197)]===_0x3ffe76(0x22a)&&_0x272608['length']>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x4fce7f,'message':_0x3ffe76(0x160)});_0x47af26[_0x3ffe76(0x197)]==='END'&&_0x32456a[_0x3ffe76(0x251)]>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x47af26['type']===_0x3ffe76(0x1fc)){_0x32456a[_0x3ffe76(0x251)]<0x2&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x23e)});const _0x5e2e7=_0x32456a['filter'](_0x4f3950=>_0x4f3950[_0x3ffe76(0x20e)]===!![]);_0x5e2e7[_0x3ffe76(0x251)]!==0x1&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x111)});if(_0x5e2e7[_0x3ffe76(0x251)]===0x1){const _0xc637ac=_0x5e2e7[0x0],_0x46d407=_0x4497b9['get'](_0xc637ac)??_0x3ffe76(0x1fb);_0xc637ac[_0x3ffe76(0x23b)]!==_0x3ffe76(0x18a)&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x46d407+'.conditionType','message':_0x3ffe76(0x231)});_0xc637ac[_0x3ffe76(0x239)]!==undefined&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x46d407+'.expression','message':_0x3ffe76(0x1c6)});for(const _0x2cbb86 of _0x32456a){if(_0x2cbb86===_0xc637ac)continue;const _0x1196fa=_0x4497b9[_0x3ffe76(0x19f)](_0x2cbb86)??'flowJson.edges';if(_0x2cbb86[_0x3ffe76(0x23b)]!==_0x3ffe76(0x225))_0x355590[_0x3ffe76(0x1e5)]({'path':_0x1196fa+_0x3ffe76(0x19a),'message':_0x3ffe76(0x248)});else(typeof _0x2cbb86[_0x3ffe76(0x239)]!=='string'||_0x2cbb86['expression'][_0x3ffe76(0x1d4)]()==='')&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x1196fa+_0x3ffe76(0x21d),'message':_0x3ffe76(0x24a)});}}}if(_0x47af26[_0x3ffe76(0x197)]===_0x3ffe76(0x124)&&(_0x47af26[_0x3ffe76(0x191)]??_0x3ffe76(0x124))===_0x3ffe76(0x213)){if(_0x32456a[_0x3ffe76(0x251)]!==0x1)_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x194328=_0x32456a[0x0];((_0x194328[_0x3ffe76(0x23b)]??'ALWAYS')!==_0x3ffe76(0x18a)||_0x194328[_0x3ffe76(0x20e)]===!![]||typeof _0x194328['expression']==='string'&&_0x194328[_0x3ffe76(0x239)]['trim']()!=='')&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x4497b9[_0x3ffe76(0x19f)](_0x194328)??_0x3ffe76(0x1fb),'message':_0x3ffe76(0x235)});}}else{if(_0x47af26[_0x3ffe76(0x197)]==='APPROVAL'){const _0x14bcc6=_0x32456a[_0x3ffe76(0x1f7)](_0x33382a=>_0x33382a[_0x3ffe76(0x23b)]??_0x3ffe76(0x18a)),_0x43d282=_0x14bcc6['filter'](_0x8003a5=>_0x8003a5!==_0x3ffe76(0x102)&&_0x8003a5!==_0x3ffe76(0x169));_0x43d282['length']>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x4fce7f,'message':_0x3ffe76(0x128)}),_0x14bcc6['filter'](_0x2e8a5e=>_0x2e8a5e===_0x3ffe76(0x102))[_0x3ffe76(0x251)]!==0x1&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x12b)}),_0x14bcc6[_0x3ffe76(0x121)](_0x4da2d9=>_0x4da2d9===_0x3ffe76(0x169))['length']!==0x1&&_0x355590['push']({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x32456a[_0x3ffe76(0x17e)](_0x4a0b7f=>_0x4a0b7f['defaultFlow']===!![])&&_0x355590['push']({'path':'flowJson.nodes.'+_0x4fce7f,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x3bb34c=new Set(),_0x105d4b=_0x3412d4=>{const _0x5be179=_0x3ffe76;if(_0x3bb34c[_0x5be179(0x223)](_0x3412d4))return;_0x3bb34c[_0x5be179(0x21c)](_0x3412d4);for(const _0x36217b of _0x14e133[_0x5be179(0x19f)](_0x3412d4)??[]){const _0x4b2bf1=resolveEdgeEndpoint(_0x36217b[_0x5be179(0x151)],_0x36217b[_0x5be179(0x245)]);if(_0x4b2bf1&&_0x32d509[_0x5be179(0x223)](_0x4b2bf1))_0x105d4b(_0x4b2bf1);}};_0x105d4b(_0x140a86);for(const _0x3e0b1d of _0x32d509[_0x3ffe76(0x1eb)]()){!_0x3bb34c[_0x3ffe76(0x223)](_0x3e0b1d)&&_0x355590['push']({'path':'flowJson.nodes.'+_0x3e0b1d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x543591=_0x297484[_0x3ffe76(0x17e)](_0x310c0c=>_0x3bb34c[_0x3ffe76(0x223)](_0x310c0c));if(!_0x543591){_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.edges','message':_0x3ffe76(0x13c)});return;}const _0x36ceb3=new Set(),_0x3962b8=_0x560df4=>{const _0x2d9793=_0x3ffe76;if(_0x36ceb3[_0x2d9793(0x223)](_0x560df4))return;_0x36ceb3[_0x2d9793(0x21c)](_0x560df4);for(const _0x3d567f of _0x2c7499['get'](_0x560df4)??[]){const _0x5cc4cf=resolveEdgeEndpoint(_0x3d567f[_0x2d9793(0x16d)],_0x3d567f[_0x2d9793(0x112)]);if(_0x5cc4cf&&_0x32d509['has'](_0x5cc4cf))_0x3962b8(_0x5cc4cf);}};for(const _0x5e4a3d of _0x297484){if(_0x32d509[_0x3ffe76(0x223)](_0x5e4a3d))_0x3962b8(_0x5e4a3d);}for(const _0x115f22 of _0x3bb34c){!_0x36ceb3[_0x3ffe76(0x223)](_0x115f22)&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x115f22,'message':_0x3ffe76(0x113)});}}function validateApprovalResults(_0xfef2df,_0x2ffcab,_0x3ad10,_0x5dced3){const _0x3cbf0a=a287_0x571368;if(_0x2ffcab===0x0)return;const _0x33768f=new Set(_0x3ad10[_0x3cbf0a(0x1f7)](_0x1bd9fd=>_0xfef2df[_0x3cbf0a(0x19f)](_0x1bd9fd)?.['result'])[_0x3cbf0a(0x121)](_0x31b81e=>typeof _0x31b81e===_0x3cbf0a(0x10a)));for(const _0x390aa6 of[_0x3cbf0a(0x102),_0x3cbf0a(0x169)]){!_0x33768f[_0x3cbf0a(0x223)](_0x390aa6)&&_0x5dced3['push']({'path':_0x3cbf0a(0x24e),'message':_0x3cbf0a(0x247)+_0x390aa6+'.'});}}function validateScriptResultReferences(_0x4f570d,_0x52fc0c,_0x155434,_0x8a5f1f,_0x45af32,_0x3ff6a2,_0x2c39b8){const _0x1c1bcb=a287_0x571368;if(_0x3ff6a2[_0x1c1bcb(0x10d)]===0x0)return;const _0x452865=new Set(),_0x23d376=_0x4e4c01=>{const _0x3d5733=_0x1c1bcb;if(!_0x452865[_0x3d5733(0x223)](_0x4e4c01)&&_0x4f570d[_0x3d5733(0x223)](_0x4e4c01)){_0x452865[_0x3d5733(0x21c)](_0x4e4c01);for(const _0x58d4c7 of _0x155434[_0x3d5733(0x19f)](_0x4e4c01)??[]){const _0xc62f70=resolveEdgeEndpoint(_0x58d4c7[_0x3d5733(0x151)],_0x58d4c7['targetNodeId']);if(_0xc62f70)_0x23d376(_0xc62f70);}}};_0x23d376(_0x52fc0c);const _0x23dcb4=new Map();for(const _0x3d80a3 of _0x452865){_0x23dcb4['set'](_0x3d80a3,_0x3d80a3===_0x52fc0c?new Set([_0x52fc0c]):new Set(_0x452865));}let _0x227059=!![];while(_0x227059){_0x227059=![];for(const _0x2ed395 of _0x452865){if(_0x2ed395===_0x52fc0c)continue;const _0x30c7b3=(_0x8a5f1f[_0x1c1bcb(0x19f)](_0x2ed395)??[])[_0x1c1bcb(0x1f7)](_0x59a2b9=>resolveEdgeEndpoint(_0x59a2b9['source'],_0x59a2b9['sourceNodeId']))[_0x1c1bcb(0x121)](_0xb85d47=>Boolean(_0xb85d47&&_0x452865[_0x1c1bcb(0x223)](_0xb85d47)));if(_0x30c7b3[_0x1c1bcb(0x251)]===0x0)continue;const _0x6dfc42=new Set(_0x23dcb4[_0x1c1bcb(0x19f)](_0x30c7b3[0x0])??[]);for(const _0x516d6e of _0x30c7b3['slice'](0x1)){const _0x5b29f5=_0x23dcb4[_0x1c1bcb(0x19f)](_0x516d6e)??new Set();for(const _0x2cb75c of _0x6dfc42){if(!_0x5b29f5[_0x1c1bcb(0x223)](_0x2cb75c))_0x6dfc42[_0x1c1bcb(0x11f)](_0x2cb75c);}}_0x6dfc42[_0x1c1bcb(0x21c)](_0x2ed395);const _0x326a3a=_0x23dcb4[_0x1c1bcb(0x19f)](_0x2ed395);!setsEqual(_0x326a3a,_0x6dfc42)&&(_0x23dcb4[_0x1c1bcb(0x156)](_0x2ed395,_0x6dfc42),_0x227059=!![]);}}for(const [_0x26df53,_0x1cd992]of _0x155434){const _0x1162e4=_0x23dcb4[_0x1c1bcb(0x19f)](_0x26df53);if(!_0x1162e4)continue;for(const _0x53dd95 of _0x1cd992){if(_0x53dd95[_0x1c1bcb(0x23b)]!==_0x1c1bcb(0x225)||typeof _0x53dd95['expression']!==_0x1c1bcb(0x10a))continue;for(const [_0x2d5fc7,_0x4969da]of _0x3ff6a2){expressionReferencesVariable(_0x53dd95[_0x1c1bcb(0x239)],_0x2d5fc7)&&!_0x1162e4['has'](_0x4969da)&&_0x2c39b8['push']({'path':(_0x45af32[_0x1c1bcb(0x19f)](_0x53dd95)??_0x1c1bcb(0x1fb))+_0x1c1bcb(0x21d),'message':_0x1c1bcb(0x13f)+_0x2d5fc7+_0x1c1bcb(0x209)+_0x4969da+_0x1c1bcb(0xfe)+_0x26df53+'.'});}}}}function expressionReferencesVariable(_0x30c3e3,_0x39fb70){const _0x4600f3=a287_0x571368;let _0x18743f=0x0;while(_0x18743f<_0x30c3e3[_0x4600f3(0x251)]){const _0x25c972=_0x30c3e3[_0x18743f];if(_0x25c972==='\x27'||_0x25c972==='\x22'){_0x18743f=skipQuotedExpressionSegment(_0x30c3e3,_0x18743f,_0x25c972);continue;}if(!/[A-Za-z_]/[_0x4600f3(0x172)](_0x25c972)){_0x18743f+=0x1;continue;}const _0x47211c=_0x18743f;_0x18743f+=0x1;while(_0x18743f<_0x30c3e3['length']&&/[A-Za-z0-9_]/[_0x4600f3(0x172)](_0x30c3e3[_0x18743f])){_0x18743f+=0x1;}if(_0x30c3e3[_0x4600f3(0x1e7)](_0x47211c,_0x18743f)!==_0x39fb70)continue;let _0x3141ec=_0x47211c-0x1;while(_0x3141ec>=0x0&&/\s/[_0x4600f3(0x172)](_0x30c3e3[_0x3141ec])){_0x3141ec-=0x1;}if(_0x30c3e3[_0x3141ec]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x42db57,_0x480125,_0x140080){const _0x2342e6=a287_0x571368;let _0x30af34=_0x480125+0x1;while(_0x30af34<_0x42db57[_0x2342e6(0x251)]){if(_0x42db57[_0x30af34]==='\x5c'){_0x30af34+=0x2;continue;}if(_0x42db57[_0x30af34]===_0x140080)return _0x30af34+0x1;_0x30af34+=0x1;}return _0x30af34;}function resolveEffectiveResultVariable(_0x9a91b6,_0x4a0f05){const _0x58cfad=a287_0x571368;if(_0x9a91b6===undefined||_0x9a91b6===null||_0x4a0f05&&_0x9a91b6==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x9a91b6!==_0x58cfad(0x10a)||!VARIABLE_PATTERN[_0x58cfad(0x172)](_0x9a91b6)||RESERVED_RESULT_VARIABLES[_0x58cfad(0x223)](_0x9a91b6)||_0x9a91b6[_0x58cfad(0x199)](_0x58cfad(0x1a4)))return undefined;return _0x9a91b6;}function registerResultVariableOwner(_0x512dc1,_0x313a25,_0x59a6e4,_0x1f2489){const _0x46f3d4=a287_0x571368;if(_0x512dc1[_0x46f3d4(0x223)](_0x313a25)){_0x1f2489[_0x46f3d4(0x1e5)]({'path':'flowJson.nodes','message':'Duplicate\x20resultVariable:\x20'+_0x313a25+'.'});return;}_0x512dc1[_0x46f3d4(0x156)](_0x313a25,_0x59a6e4);}function setsEqual(_0x22dbb8,_0x404a19){const _0x11b838=a287_0x571368;return _0x22dbb8[_0x11b838(0x10d)]===_0x404a19[_0x11b838(0x10d)]&&[..._0x22dbb8][_0x11b838(0x1f2)](_0x1683b8=>_0x404a19[_0x11b838(0x223)](_0x1683b8));}function isValidUserId(_0x60b95e){const _0x530bea=a287_0x571368;if(typeof _0x60b95e===_0x530bea(0x10a))return _0x60b95e[_0x530bea(0x1d4)]()['length']>0x0;return Number[_0x530bea(0x202)](_0x60b95e)&&Number(_0x60b95e)>0x0;}function resolveEdgeEndpoint(_0x5e6d08,_0x1c8707){const _0x29f639=a287_0x571368;if(typeof _0x5e6d08==='string'&&_0x5e6d08[_0x29f639(0x1d4)]())return _0x5e6d08[_0x29f639(0x1d4)]();if(typeof _0x1c8707==='string'&&_0x1c8707[_0x29f639(0x1d4)]())return _0x1c8707[_0x29f639(0x1d4)]();return undefined;}function removeEmptyMetadata(_0x332a7a,_0x116f54,_0x4afbb1,_0x19560e){const _0x5491a1=a287_0x571368;if(Array[_0x5491a1(0x13a)](_0x332a7a)){_0x332a7a[_0x5491a1(0x18e)]((_0x2c6f28,_0x2b2b3f)=>removeEmptyMetadata(_0x2c6f28,_0x116f54+'['+_0x2b2b3f+']',_0x4afbb1,_0x19560e));return;}if(!isRecord(_0x332a7a))return;for(const [_0x474167,_0x5d8026]of Object['entries'](_0x332a7a)){const _0x3093f4=_0x116f54+'.'+_0x474167;if(_0x474167===_0x5491a1(0x1f0)&&isEmptyJsonValue(_0x5d8026)){delete _0x332a7a[_0x474167],_0x19560e[_0x5491a1(0x1e5)](_0x3093f4),_0x4afbb1['push']({'code':'empty_metadata_removed','path':_0x3093f4,'message':_0x3093f4+_0x5491a1(0xfb)});continue;}removeEmptyMetadata(_0x5d8026,_0x3093f4,_0x4afbb1,_0x19560e);}}function isEmptyJsonValue(_0x28a594){const _0x2e02be=a287_0x571368;if(_0x28a594===null||_0x28a594===undefined)return!![];if(typeof _0x28a594==='string')return _0x28a594[_0x2e02be(0x1d4)]()==='';if(Array[_0x2e02be(0x13a)](_0x28a594))return _0x28a594[_0x2e02be(0x251)]===0x0;return isRecord(_0x28a594)&&Object[_0x2e02be(0x1eb)](_0x28a594)[_0x2e02be(0x251)]===0x0;}function isRecord(_0x20b865){const _0x594ffc=a287_0x571368;return typeof _0x20b865===_0x594ffc(0x1c4)&&_0x20b865!==null&&!Array[_0x594ffc(0x13a)](_0x20b865);}function cloneJsonValue(_0x5f5190){const _0x1328bb=a287_0x571368;return JSON['parse'](JSON[_0x1328bb(0x1e3)](_0x5f5190));}export async function readFlowConfigFile(_0x4e6e2e){const _0xd5e296=a287_0x571368,_0x3e0dd1=await readFile(resolve(_0x4e6e2e),_0xd5e296(0x1e8));return JSON[_0xd5e296(0x1b9)](_0x3e0dd1);}
|