@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.js +1 -1
- 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.js +1 -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.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- 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.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- 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.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 +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +39 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +126 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +48 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +721 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
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)]};}
|
|
1
|
+
(function(_0x9131fc,_0x5a12dd){const _0x307f54=a281_0x1a59,_0x397708=_0x9131fc();while(!![]){try{const _0x17ba3d=parseInt(_0x307f54(0x1f3))/0x1+parseInt(_0x307f54(0x203))/0x2+parseInt(_0x307f54(0x1ed))/0x3+parseInt(_0x307f54(0x1fa))/0x4*(-parseInt(_0x307f54(0x1f9))/0x5)+parseInt(_0x307f54(0x20d))/0x6*(parseInt(_0x307f54(0x1f6))/0x7)+-parseInt(_0x307f54(0x211))/0x8+parseInt(_0x307f54(0x1fd))/0x9*(-parseInt(_0x307f54(0x209))/0xa);if(_0x17ba3d===_0x5a12dd)break;else _0x397708['push'](_0x397708['shift']());}catch(_0x36ccf4){_0x397708['push'](_0x397708['shift']());}}}(a281_0x4877,0x37458));import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x2b23f3){const _0xc85569=a281_0x1a59,_0x4fc523=[];for(const [_0x38df81,_0x370bb4]of Object['entries'](_0x2b23f3[_0xc85569(0x202)])){const [_0x440529,_0x3e2e98]=_0x38df81[_0xc85569(0x208)]('/');if(_0x440529!=='HOOK'||!_0x3e2e98||!_0x370bb4[_0xc85569(0x1f2)])continue;_0x4fc523[_0xc85569(0x20c)]({'alias':_0x3e2e98,'datasetCode':_0x370bb4['datasetCode']});}return _0x4fc523;}export function uniqueTrackedHookDirectoryByDataset(_0xbbe718){const _0x13f720=a281_0x1a59,_0x27c67b=new Map();for(const _0x26824e of trackedHookDirectoryMappings(_0xbbe718)){const _0x429403=directoryIdentity(_0x26824e[_0x13f720(0x1f2)]),_0x2769cb=_0x27c67b[_0x13f720(0x200)](_0x429403)??new Map();_0x2769cb[_0x13f720(0x1f4)](directoryIdentity(_0x26824e[_0x13f720(0x216)]),_0x26824e[_0x13f720(0x216)]),_0x27c67b[_0x13f720(0x1f4)](_0x429403,_0x2769cb);}const _0x377551=new Map();for(const [_0x5f2559,_0x326963]of _0x27c67b){if(_0x326963[_0x13f720(0x215)]>0x1)throw hookDirectoryError(_0x13f720(0x217),'Dataset\x20\x22'+_0x5f2559+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x326963[_0x13f720(0x1e7)]()]['join'](',\x20')+'.',{'datasetCode':_0x5f2559,'directories':[..._0x326963[_0x13f720(0x1e7)]()]});_0x377551[_0x13f720(0x1f4)](_0x5f2559,[..._0x326963['values']()][0x0]);}return _0x377551;}export function assertUnambiguousHookDirectoryMappings(_0x49dc7f){const _0x4bd9d4=a281_0x1a59,_0x2922df=new Map();for(const {alias:_0x108a78,datasetCode:_0x437d43}of _0x49dc7f){const _0x7612f4=directoryIdentity(_0x108a78),_0xa42f1f=_0x2922df[_0x4bd9d4(0x200)](_0x7612f4)??new Set();_0xa42f1f[_0x4bd9d4(0x20f)](_0x437d43),_0x2922df[_0x4bd9d4(0x1f4)](_0x7612f4,_0xa42f1f);}for(const [_0x2ec0d9,_0x164c73]of _0x2922df){if(_0x164c73[_0x4bd9d4(0x215)]>0x1)throw hookDirectoryError(_0x4bd9d4(0x206),_0x4bd9d4(0x20e)+_0x2ec0d9+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x2ec0d9,'datasetCodes':[..._0x164c73]});}}export function assertUnambiguousHookAliases(_0x496a93){const _0x33c35e=a281_0x1a59,_0x549869=[..._0x496a93],_0x22376b=new Map(),_0x2644d2=new Map();for(const {alias:_0x21bbda,datasetCode:_0x2eefb7}of _0x549869){const _0x680147=directoryIdentity(_0x21bbda),_0x27963e=directoryIdentity(_0x2eefb7),_0x7e9bc4=_0x22376b[_0x33c35e(0x200)](_0x680147)??new Set();_0x7e9bc4[_0x33c35e(0x20f)](_0x2eefb7),_0x22376b[_0x33c35e(0x1f4)](_0x680147,_0x7e9bc4);const _0x4b9904=_0x2644d2[_0x33c35e(0x200)](_0x27963e)??new Set();_0x4b9904[_0x33c35e(0x20f)](_0x21bbda),_0x2644d2[_0x33c35e(0x1f4)](_0x27963e,_0x4b9904);}for(const [_0x59d4e4,_0x592753]of _0x22376b){if(_0x592753['size']>0x1)throw hookDirectoryError(_0x33c35e(0x205),_0x33c35e(0x213)+_0x59d4e4+_0x33c35e(0x1ef),{'alias':_0x59d4e4,'datasetCodes':[..._0x592753]});}for(const [_0x5c100c,_0x9492f6]of _0x2644d2){if(_0x9492f6[_0x33c35e(0x215)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x33c35e(0x1e8)+_0x5c100c+_0x33c35e(0x207),{'datasetCode':_0x5c100c,'aliases':[..._0x9492f6]});}}export function buildHookDirectoryIndexes(_0x1786d2,_0x44f6a3=[]){const _0x18a434=a281_0x1a59,_0x4bd7ea=[..._0x44f6a3];assertUnambiguousHookDirectoryMappings(_0x4bd7ea[_0x18a434(0x20b)](([_0x262f17,_0x15744b])=>({'alias':_0x262f17,'datasetCode':_0x15744b})));const _0x575aa8=new Map(),_0x41ed42=new Map();for(const _0x437168 of _0x1786d2){appendUnique(_0x575aa8,directoryIdentity(_0x437168[_0x18a434(0x1f7)]),_0x437168,_0x2505c5=>_0x2505c5['code']);}for(const [_0x47cd6f,_0xf72ed6]of _0x4bd7ea){appendUnique(_0x41ed42,directoryIdentity(_0x47cd6f),_0xf72ed6,_0x58bcf8=>_0x58bcf8);}return{'datasetCodeToDatasets':_0x575aa8,'aliasToDatasetCodes':_0x41ed42};}export function resolvePushHookDirectory(_0xdc45ca,_0x3f5c6c,_0x1efa61){const _0x268a46=a281_0x1a59,_0x1ee120=directoryIdentity(_0xdc45ca),_0x5ea025=_0x1efa61[_0x268a46(0x1e3)][_0x268a46(0x200)](_0x1ee120)??[],_0x5220ef=_0x1efa61[_0x268a46(0x1ff)][_0x268a46(0x200)](_0x1ee120)??[],_0x2044ce=new Set([..._0x5ea025[_0x268a46(0x20b)](_0x5aa95f=>_0x5aa95f[_0x268a46(0x1f7)]),..._0x5220ef]);if(_0x2044ce[_0x268a46(0x215)]>0x1)throw hookDirectoryError(_0x268a46(0x206),_0x268a46(0x20e)+_0xdc45ca+_0x268a46(0x1e4),{'directoryName':_0xdc45ca,'datasetCodes':[..._0x2044ce]});const _0x3b157c=[..._0x2044ce][0x0];if(_0x3b157c&&_0x3f5c6c?.[_0x268a46(0x1f2)]&&_0x3b157c!==_0x3f5c6c[_0x268a46(0x1f2)])throw hookDirectoryError(_0x268a46(0x1fb),'HOOK\x20directory\x20\x22'+_0xdc45ca+_0x268a46(0x204)+_0x3f5c6c[_0x268a46(0x1f2)]+_0x268a46(0x1f5)+_0x3b157c+'\x22.',{'directoryName':_0xdc45ca,'datasetCode':_0x3b157c,'lockedDatasetCode':_0x3f5c6c[_0x268a46(0x1f2)]});const _0x4bb60b=_0x3b157c?findDatasetByCode(_0x1efa61,_0x3b157c):undefined,_0x17bed8=!!_0x3b157c&&_0x5220ef[_0x268a46(0x1e6)](_0x3b157c);if(_0x4bb60b)return{'dataset':_0x4bb60b,'datasetCode':_0x4bb60b[_0x268a46(0x1f7)],..._0x17bed8?{'alias':_0xdc45ca}:{},'directoryProtocol':_0x17bed8?'alias':_0x268a46(0x1f2),'warnings':[]};const _0x58451e=_0x3f5c6c?.['datasetCode'];if(_0x58451e){const _0x540c36=findDatasetByCode(_0x1efa61,_0x58451e);if(_0x540c36)return{'dataset':_0x540c36,'datasetCode':_0x540c36[_0x268a46(0x1f7)],..._0x3f5c6c[_0x268a46(0x216)]?{'alias':_0x3f5c6c[_0x268a46(0x216)]}:{},'directoryProtocol':_0x3f5c6c['alias']?'alias':_0x268a46(0x1f2),'warnings':[]};}if(_0x3b157c||_0x58451e){const _0x3fc222=_0x3b157c??_0x58451e;throw hookDirectoryError(_0x268a46(0x210),_0x268a46(0x20e)+_0xdc45ca+_0x268a46(0x201),{'directoryName':_0xdc45ca,'datasetCode':_0x3fc222});}throw hookDirectoryError(_0x268a46(0x1e5),_0x268a46(0x1fc)+_0xdc45ca+'\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.',{'directoryName':_0xdc45ca});}function a281_0x4877(){const _0x56c83b=['lockKey','map','push','6LyPYYQ','HOOK\x20directory\x20\x22','add','HOOK_DATASET_NOT_FOUND','957880BNtoJs','some','SDK\x20alias\x20\x22','HOOK','size','alias','HOOK_DUPLICATE_DIRECTORIES','message','type','datasetCodeToDatasets','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK_DIRECTORY_UNRESOLVED','includes','values','Dataset\x20\x22','Incomplete\x20HOOK\x20path:\x20','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','toLowerCase','571494VVCUBd','NFC','\x22\x20resolves\x20to\x20multiple\x20Datasets.','join','details','datasetCode','310214KMHcDb','set','\x22\x20to\x20\x22','132993vIScEC','code','normalize','2555YYdYBX','668NMdmBT','HOOK_MAPPING_DRIFT','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','126wEZUyY','length','aliasToDatasetCodes','get','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','functions','763662QhHkGa','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','HOOK_ALIAS_AMBIGUOUS','HOOK_DIRECTORY_AMBIGUOUS','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','split','335770Qwaiti'];a281_0x4877=function(){return _0x56c83b;};return a281_0x4877();}export function preflightPushHookDirectories(_0x46bb77,_0x48790b,_0x335728,_0x5eda79){const _0x30c6cd=a281_0x1a59,_0x21c263=new Map(),_0x10357e=new Map();for(const _0x3522d4 of _0x46bb77){if(_0x3522d4[_0x30c6cd(0x1e2)]!==_0x30c6cd(0x214))continue;const _0x263063=_0x3522d4['alias'];if(!_0x263063)throw hookDirectoryError(_0x30c6cd(0x1e5),_0x30c6cd(0x1e9)+_0x3522d4['lockKey'],{'lockKey':_0x3522d4[_0x30c6cd(0x20a)]});let _0x25dae4;try{_0x25dae4=resolvePushHookDirectory(_0x263063,_0x48790b['functions'][_0x3522d4['lockKey']],_0x335728);}catch(_0x460aa0){if(_0x5eda79&&_0x460aa0 instanceof CliError&&[_0x30c6cd(0x210),_0x30c6cd(0x1e5)]['includes'](_0x460aa0[_0x30c6cd(0x1f7)])){_0x5eda79[_0x30c6cd(0x1f4)](_0x3522d4['lockKey'],_0x460aa0[_0x30c6cd(0x218)]);continue;}throw _0x460aa0;}_0x21c263[_0x30c6cd(0x1f4)](_0x3522d4[_0x30c6cd(0x20a)],_0x25dae4);const _0x5c7731=_0x10357e[_0x30c6cd(0x200)](_0x25dae4[_0x30c6cd(0x1f2)])??new Set();_0x5c7731['add'](_0x263063),_0x10357e[_0x30c6cd(0x1f4)](_0x25dae4[_0x30c6cd(0x1f2)],_0x5c7731);}for(const [_0x379a52,_0xfc945d]of _0x10357e){if(_0xfc945d[_0x30c6cd(0x215)]>0x1)throw hookDirectoryError(_0x30c6cd(0x217),_0x30c6cd(0x1e8)+_0x379a52+_0x30c6cd(0x1ea)+[..._0xfc945d][_0x30c6cd(0x1f0)](',\x20')+'.',{'datasetCode':_0x379a52,'directories':[..._0xfc945d]});}return _0x21c263;}export function hookDirectoryError(_0x3dcbd8,_0x31d22f,_0x2d8e84){const _0x21f94f=a281_0x1a59,_0x3f8c71=new CliError(_0x3dcbd8,0x2,_0x3dcbd8+':\x20'+_0x31d22f);return _0x3f8c71[_0x21f94f(0x1f1)]=_0x2d8e84,_0x3f8c71;}function a281_0x1a59(_0x1528f6,_0x429e55){_0x1528f6=_0x1528f6-0x1e2;const _0x4877e2=a281_0x4877();let _0x1a599d=_0x4877e2[_0x1528f6];return _0x1a599d;}function findDatasetByCode(_0x46d6e2,_0x403d3e){const _0x2dcfb9=a281_0x1a59,_0x44ea96=_0x46d6e2[_0x2dcfb9(0x1e3)][_0x2dcfb9(0x200)](directoryIdentity(_0x403d3e))??[];if(_0x44ea96[_0x2dcfb9(0x1fe)]>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS','Dataset\x20code\x20\x22'+_0x403d3e+_0x2dcfb9(0x1eb),{'datasetCode':_0x403d3e,'candidates':_0x44ea96[_0x2dcfb9(0x20b)](datasetFact)});return _0x44ea96[0x0];}function directoryIdentity(_0x3be7d0){const _0x1ede5e=a281_0x1a59;return _0x3be7d0[_0x1ede5e(0x1f8)](_0x1ede5e(0x1ee))[_0x1ede5e(0x1ec)]();}function appendUnique(_0x28c504,_0x5affe7,_0x4f6047,_0x44baf0){const _0x457e74=a281_0x1a59,_0x58254d=_0x28c504[_0x457e74(0x200)](_0x5affe7)??[];!_0x58254d[_0x457e74(0x212)](_0x17d659=>_0x44baf0(_0x17d659)===_0x44baf0(_0x4f6047))&&_0x58254d[_0x457e74(0x20c)](_0x4f6047),_0x28c504[_0x457e74(0x1f4)](_0x5affe7,_0x58254d);}function datasetFact(_0x33040a){const _0x3fc4de=a281_0x1a59;return{'id':_0x33040a['id'],'name':_0x33040a['name'],'datasetCode':_0x33040a[_0x3fc4de(0x1f7)]};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x61fa9e,_0x186e26){const _0x236a82=a282_0x50be,_0x4687a4=_0x61fa9e();while(!![]){try{const _0x1d2880=parseInt(_0x236a82(0xb1))/0x1+-parseInt(_0x236a82(0xbe))/0x2+parseInt(_0x236a82(0xb8))/0x3*(parseInt(_0x236a82(0xc2))/0x4)+parseInt(_0x236a82(0xb2))/0x5*(parseInt(_0x236a82(0xb9))/0x6)+-parseInt(_0x236a82(0xc4))/0x7*(parseInt(_0x236a82(0xc0))/0x8)+parseInt(_0x236a82(0xbf))/0x9*(parseInt(_0x236a82(0xbc))/0xa)+-parseInt(_0x236a82(0xc1))/0xb*(parseInt(_0x236a82(0xb6))/0xc);if(_0x1d2880===_0x186e26)break;else _0x4687a4['push'](_0x4687a4['shift']());}catch(_0x35c36b){_0x4687a4['push'](_0x4687a4['shift']());}}}(a282_0x36fc,0x46d21));function a282_0x50be(_0x450661,_0x1dd1f7){_0x450661=_0x450661-0xad;const _0x36fcc6=a282_0x36fc();let _0x50be14=_0x36fcc6[_0x450661];return _0x50be14;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x535d04,_0x210ac0,_0x4a62b1,_0x4f27a8){const _0x304473=a282_0x50be,_0x302f53={'apps':_0x535d04[_0x304473(0xbd)]&&typeof _0x535d04[_0x304473(0xbd)]===_0x304473(0xbb)?_0x535d04['apps']:{}};let _0x413a7f=_0x302f53[_0x304473(0xbd)][_0x210ac0];if(!_0x413a7f)return _0x413a7f={'scriptsRoot':_0x4a62b1,'lastSync':'','functions':{}},_0x302f53[_0x304473(0xbd)][_0x210ac0]=_0x413a7f,{'lockData':_0x302f53,'appLock':_0x413a7f};if(!_0x413a7f[_0x304473(0xae)])_0x413a7f[_0x304473(0xae)]=_0x4a62b1;else{if(_0x413a7f[_0x304473(0xae)]!==_0x4a62b1)throw new Error(_0x4f27a8+_0x304473(0xc3)+(_0x304473(0xb0)+_0x4a62b1+_0x304473(0xb5)+_0x413a7f['scriptsRoot']+'\x22.\x20')+_0x304473(0xb7));}return!_0x413a7f[_0x304473(0xad)]&&(_0x413a7f[_0x304473(0xad)]={}),!_0x413a7f[_0x304473(0xb4)]&&(_0x413a7f[_0x304473(0xb4)]=''),{'lockData':_0x302f53,'appLock':_0x413a7f};}export async function readBffLockFile(_0x541345){const _0x336aee=a282_0x50be;try{const _0x4588ff=await readFile(_0x541345,_0x336aee(0xb3)),_0x1aefde=JSON[_0x336aee(0xba)](_0x4588ff);return{'apps':_0x1aefde[_0x336aee(0xbd)]&&typeof _0x1aefde['apps']===_0x336aee(0xbb)?_0x1aefde[_0x336aee(0xbd)]:{}};}catch(_0xfff890){if(_0xfff890['code']===_0x336aee(0xc5))return null;throw new Error('Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20'+String(_0xfff890));}}function a282_0x36fc(){const _0x13beac=['12edTyAE','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','3aAgKjE','414uYzVOB','parse','object','890rPHrzI','apps','477306MVpNBc','57465lLulZL','974392ZyUCMh','2835569LWczIE','858068wWXrAc',':\x20scriptsRoot\x20mismatch\x20—\x20','7yxTyfc','ENOENT','functions','scriptsRoot','stringify','current\x20\x22','77299YsHuaD','3495ANExol','utf8','lastSync','\x22\x20vs\x20lock\x20\x22'];a282_0x36fc=function(){return _0x13beac;};return a282_0x36fc();}export async function writeBffLockFile(_0x181d18,_0x31d2de){const _0x14aab2=a282_0x50be;await mkdir(dirname(_0x181d18),{'recursive':!![]}),await writeFile(_0x181d18,JSON[_0x14aab2(0xaf)](_0x31d2de,null,0x2),_0x14aab2(0xb3));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x5dcd14=a284_0x1405;(function(_0x39b706,_0x4658b5){const _0x40219f=a284_0x1405,_0x125f10=_0x39b706();while(!![]){try{const _0x3c8342=parseInt(_0x40219f(0x1da))/0x1+-parseInt(_0x40219f(0x1e3))/0x2*(parseInt(_0x40219f(0x1ef))/0x3)+parseInt(_0x40219f(0x1d9))/0x4*(-parseInt(_0x40219f(0x1e1))/0x5)+parseInt(_0x40219f(0x1eb))/0x6+parseInt(_0x40219f(0x1d5))/0x7*(-parseInt(_0x40219f(0x1e6))/0x8)+-parseInt(_0x40219f(0x1e4))/0x9*(-parseInt(_0x40219f(0x1e9))/0xa)+parseInt(_0x40219f(0x1ea))/0xb;if(_0x3c8342===_0x4658b5)break;else _0x125f10['push'](_0x125f10['shift']());}catch(_0x1eb1f9){_0x125f10['push'](_0x125f10['shift']());}}}(a284_0x1492,0x752e0));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a284_0x5dcd14(0x1ee);function a284_0x1492(){const _0x21fe66=['toLowerCase','374952IZGEtH','entries','before','10HxafsQ','153615AMSCEb','3863940DThMJc','alias','after','TODO:\x20add\x20script\x20description','1096521eKEqsr','datasetCode','operationType','21xKxVbT','some','split','startsWith','660316EaqOxz','89962FkxjXo','test','map','replace','functionNode','match','remoteId','15LYEeny','trim','2CkESCj','6600618xJvVUT'];a284_0x1492=function(){return _0x21fe66;};return a284_0x1492();}export function snakeToCamel(_0x26c48f){const _0x413ade=a284_0x5dcd14;return _0x26c48f[_0x413ade(0x1e5)]()[_0x413ade(0x1dd)](/_([a-z])/g,(_0x5b5e76,_0x34bb77)=>_0x34bb77['toUpperCase']());}function a284_0x1405(_0x38bf00,_0x621b1a){_0x38bf00=_0x38bf00-0x1d4;const _0x14929f=a284_0x1492();let _0x140541=_0x14929f[_0x38bf00];return _0x140541;}export function findHookLocationByRemoteId(_0x49278d,_0x15bb4a){const _0x5de1a1=a284_0x5dcd14;if(!_0x15bb4a)return undefined;for(const [_0x2701c3,_0xa08c65]of Object[_0x5de1a1(0x1e7)](_0x49278d)){if(_0xa08c65[_0x5de1a1(0x1e0)]===_0x15bb4a&&_0xa08c65['datasetCode']&&_0xa08c65[_0x5de1a1(0x1d4)]&&_0xa08c65[_0x5de1a1(0x1de)]){const _0x56a09b=_0x2701c3['split']('/')[0x1];return{'alias':_0x56a09b||_0xa08c65[_0x5de1a1(0x1ec)],'datasetCode':_0xa08c65[_0x5de1a1(0x1f0)],'operationType':_0xa08c65[_0x5de1a1(0x1d4)],'functionNode':_0xa08c65[_0x5de1a1(0x1de)]};}}return undefined;}export function extractScriptDescription(_0x3d3c0d){const _0x2e21e0=a284_0x5dcd14,_0x330157=_0x3d3c0d[_0x2e21e0(0x1df)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x330157?.[0x1])return undefined;const _0x2fa619=_0x330157[0x1],_0x5783b4=_0x2e743b=>{const _0x141219=_0x2e21e0,_0xbdea69=_0x2e743b?.[_0x141219(0x1e2)]();if(!_0xbdea69||_0xbdea69===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0xbdea69===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0xbdea69;},_0x30e1d0=_0x2fa619[_0x2e21e0(0x1df)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x30e1d0)return _0x5783b4(_0x30e1d0[0x1]);const _0x1be93a=_0x2fa619[_0x2e21e0(0x1d7)](/\r?\n/)[_0x2e21e0(0x1dc)](_0x547395=>_0x547395[_0x2e21e0(0x1dd)](/^\s*\*\s?/,'')[_0x2e21e0(0x1e2)]()),_0x4202ca=_0x1be93a[_0x2e21e0(0x1d6)](_0x478547=>/^\[\s*脚本类型\s*]\s*\S+/[_0x2e21e0(0x1db)](_0x478547))&&_0x1be93a[_0x2e21e0(0x1d6)](_0x123fe8=>/^\[\s*脚本名称\s*]\s*\S+/[_0x2e21e0(0x1db)](_0x123fe8));if(!_0x4202ca)return undefined;for(const _0xb03f61 of _0x1be93a){if(!_0xb03f61||_0xb03f61[_0x2e21e0(0x1d8)]('@')||/^\[[^\]]+]\s*/[_0x2e21e0(0x1db)](_0xb03f61))continue;return _0x5783b4(_0xb03f61);}return undefined;}export function isValidBffFunctionName(_0x3cc744){const _0x8b7f7b=a284_0x5dcd14;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x8b7f7b(0x1db)](_0x3cc744);}export function normalizeHookFunctionNode(_0x591aec){const _0x517836=a284_0x5dcd14;if(!_0x591aec)return undefined;const _0x475c6e=_0x591aec[_0x517836(0x1e2)]()[_0x517836(0x1e5)]();if(_0x475c6e===_0x517836(0x1e8)||_0x475c6e===_0x517836(0x1ed))return _0x475c6e;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a285_0x56bd(){const _0x1f312f=['1521937pZxpnA','78hnFKNd','1379mKgqiY','1479687dFdLFH','31528sguPhX','695gSuODA','4779290VoeVWF','/smartapi/cross-db-relation/delete','/smartapi/cross-db-relation/update','/smartapi/cross-db-relation/create','686652qeKbep','45yxLgWy','1991450LmMasg'];a285_0x56bd=function(){return _0x1f312f;};return a285_0x56bd();}const a285_0x58e930=a285_0x564f;(function(_0x3b586b,_0x21b961){const _0x400350=a285_0x564f,_0x265751=_0x3b586b();while(!![]){try{const _0x127738=-parseInt(_0x400350(0x1e3))/0x1+parseInt(_0x400350(0x1e2))/0x2+-parseInt(_0x400350(0x1e6))/0x3+parseInt(_0x400350(0x1e0))/0x4+-parseInt(_0x400350(0x1e8))/0x5*(-parseInt(_0x400350(0x1e4))/0x6)+-parseInt(_0x400350(0x1e5))/0x7*(parseInt(_0x400350(0x1e7))/0x8)+parseInt(_0x400350(0x1e1))/0x9*(parseInt(_0x400350(0x1e9))/0xa);if(_0x127738===_0x21b961)break;else _0x265751['push'](_0x265751['shift']());}catch(_0x315198){_0x265751['push'](_0x265751['shift']());}}}(a285_0x56bd,0xbb541));function a285_0x564f(_0x4bfe46,_0x34f3ad){_0x4bfe46=_0x4bfe46-0x1e0;const _0x56bd56=a285_0x56bd();let _0x564f11=_0x56bd56[_0x4bfe46];return _0x564f11;}export const CROSS_DB_RELATION_PATHS={'list':'/smartapi/cross-db-relation/query','create':a285_0x58e930(0x1ec),'update':a285_0x58e930(0x1eb),'delete':a285_0x58e930(0x1ea)};
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b2e32,_0x585f76){const _0x2e6cae=a286_0x32b8,_0x25c5cb=_0x5b2e32();while(!![]){try{const _0x115465=parseInt(_0x2e6cae(0x82))/0x1*(parseInt(_0x2e6cae(0x90))/0x2)+-parseInt(_0x2e6cae(0x93))/0x3*(parseInt(_0x2e6cae(0x7a))/0x4)+-parseInt(_0x2e6cae(0x8b))/0x5+parseInt(_0x2e6cae(0x7c))/0x6*(parseInt(_0x2e6cae(0x95))/0x7)+-parseInt(_0x2e6cae(0x85))/0x8+-parseInt(_0x2e6cae(0x84))/0x9+parseInt(_0x2e6cae(0x7b))/0xa*(parseInt(_0x2e6cae(0x8d))/0xb);if(_0x115465===_0x585f76)break;else _0x25c5cb['push'](_0x25c5cb['shift']());}catch(_0x283a29){_0x25c5cb['push'](_0x25c5cb['shift']());}}}(a286_0x7ba2,0x9c7a1));import{listDatasets}from'../core/api-client.js';function a286_0x7ba2(){const _0x4e2f89=['685169DwpxWB','toLowerCase','3402657wdkAio','7681200JIuhbo','set','get','map','join','has','6068100TMnzaY','No\x20database\x20matching\x20\x22','2755379LnNxlI','dbId','isNaN','2XVGKet','length','\x22\x20under\x20app\x20\x22','41274VlhRQx','filter','1232vPEIUD','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','.\x20Be\x20more\x20specific.','dbName','196ZNBpOB','90TIYTbo','31614VsOrZc','\x22\x20matches\x20multiple\x20databases:\x20','find','\x22.\x20Available:\x20','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','includes'];a286_0x7ba2=function(){return _0x4e2f89;};return a286_0x7ba2();}const cache=new Map();function a286_0x32b8(_0x575511,_0xcd1624){_0x575511=_0x575511-0x79;const _0x7ba28e=a286_0x7ba2();let _0x32b8a2=_0x7ba28e[_0x575511];return _0x32b8a2;}export async function listDatabases(_0x10a14e){const _0x5c673c=a286_0x32b8;if(cache[_0x5c673c(0x8a)](_0x10a14e))return cache[_0x5c673c(0x87)](_0x10a14e);const _0x40a19f=await listDatasets(_0x10a14e),_0x1a4e21=new Map();for(const _0x5eeac6 of _0x40a19f){const _0x353260=_0x5eeac6['dbtableConfig'];_0x353260?.['dbId']!=null&&_0x1a4e21[_0x5c673c(0x86)](_0x353260[_0x5c673c(0x8e)],_0x353260['dbName']??'db-'+_0x353260['dbId']);}const _0x30f2c8=[..._0x1a4e21['entries']()]['map'](([_0x57d730,_0x842acd])=>({'dbId':_0x57d730,'dbName':_0x842acd}));return cache[_0x5c673c(0x86)](_0x10a14e,_0x30f2c8),_0x30f2c8;}export async function resolveDb(_0x5e57dd,_0x5a944e){const _0x452531=a286_0x32b8,_0x1ec4e7=await listDatabases(_0x5e57dd);if(_0x1ec4e7['length']===0x0)return{'resolved':[],'error':_0x452531(0x80)+_0x5e57dd+_0x452531(0x96)};if(!_0x5a944e)return{'resolved':_0x1ec4e7};const _0x4adb24=Number(_0x5a944e);if(!Number[_0x452531(0x8f)](_0x4adb24)){const _0x381e2a=_0x1ec4e7[_0x452531(0x7e)](_0x52be1d=>_0x52be1d['dbId']===_0x4adb24);if(_0x381e2a)return{'resolved':[_0x381e2a]};}const _0x598045=_0x5a944e['toLowerCase'](),_0x5872b4=_0x1ec4e7[_0x452531(0x94)](_0x297bc0=>_0x297bc0[_0x452531(0x79)][_0x452531(0x83)]()[_0x452531(0x81)](_0x598045));if(_0x5872b4[_0x452531(0x91)]>0x0)return{'resolved':_0x5872b4};const _0x41c8de=_0x1ec4e7[_0x452531(0x88)](_0x4a35de=>_0x4a35de['dbName']+'\x20('+_0x4a35de['dbId']+')')[_0x452531(0x89)](',\x20');return{'resolved':[],'error':_0x452531(0x8c)+_0x5a944e+_0x452531(0x92)+_0x5e57dd+_0x452531(0x7f)+_0x41c8de+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x1df336,_0x6a7486){const _0x39b665=a286_0x32b8,{resolved:_0x38392c,error:_0x447c05}=await resolveDb(_0x1df336,_0x6a7486);if(_0x447c05)return{'db':null,'error':_0x447c05};if(_0x38392c[_0x39b665(0x91)]===0x1)return{'db':_0x38392c[0x0]};if(!_0x6a7486){const _0x5edef7=_0x38392c['map'](_0x205843=>_0x205843['dbName']+'\x20('+_0x205843[_0x39b665(0x8e)]+')')[_0x39b665(0x89)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x5edef7};}const _0x549d1a=_0x38392c['map'](_0x5cc4e3=>_0x5cc4e3[_0x39b665(0x79)]+'\x20('+_0x5cc4e3['dbId']+')')[_0x39b665(0x89)](',\x20');return{'db':null,'error':'\x22'+_0x6a7486+_0x39b665(0x7d)+_0x549d1a+_0x39b665(0x97)};}export async function getDbName(_0x263b34,_0xf2aeb9){const _0x2051a0=a286_0x32b8,_0x19abca=await listDatabases(_0x263b34);return _0x19abca[_0x2051a0(0x7e)](_0x385dc6=>_0x385dc6[_0x2051a0(0x8e)]===_0xf2aeb9)?.[_0x2051a0(0x79)];}
|
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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);}
|
|
1
|
+
function a287_0x12ee(){const _0x4e3f44=['version','5hPCinr','sequential','.assignee.userIds[','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','value\x20must\x20be\x20a\x20non-empty\x20string.','utf8','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.url','keys','Notification\x20fact\x20must\x20be\x20an\x20object.','role','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','.facts','flowJson.startPath','duration\x20requires\x20value\x20and\x20unit.','PLATFORM_FORM','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','.timeout.duration','Duplicate\x20BPMN\x20element\x20id:\x20','test','Duplicate\x20edge\x20route:\x20','warnings','name','SECONDS','taskMode','value','#/$defs/flowEdge','sequential\x20must\x20be\x20a\x20boolean.','async\x20must\x20be\x20an\x20object.','object','number','transferCandidates\x20must\x20be\x20an\x20object.','.tmp','findIndex','target','schemaVersion','.assignee','CONDITION','unit','expression','6539630cABVOM','nodes','visible','catch','\x20->\x20','timeout\x20must\x20be\x20an\x20object.','Notification\x20recipient.type\x20is\x20required.','flowName\x20is\x20required.','.cc.recipientUserIds[','approval_sys_initiatorUsername','title','isSafeInteger','edges','mode','edge\x20target\x20is\x20required.','scriptName','Unsupported\x20schemaVersion:\x20','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','#/$defs/flowNode','position','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','userIds','size','flowName','datasetCode','strategy','Duplicate\x20resultVariable:\x20','timeout.interrupting\x20must\x20be\x20a\x20boolean.','empty_metadata_removed','^[1-9][0-9]*$','\x20must\x20be\x20a\x20finite\x20number.','position.','type','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','EXECUTE_BFF','forEach','resultVariable','variables','recipientUserIds','.cc.readSources','ALL','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','edge\x20source\x20is\x20required.','actions','NOTIFICATION','push','startPath\x20must\x20be\x20a\x20non-empty\x20string.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','transferCandidates','NOTIFICATION\x20node\x20requires\x20config.','.value','every','approval_sys_dataId','failurePolicy','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','ROLE','defaultFlow','approval_sys_datasetCode','has','flowDesc\x20must\x20be\x20a\x20string.','array','.position','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','flowJson','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','result','approved','timeout.enabled\x20must\x20be\x20a\x20boolean.','flowType\x20is\x20required.','delete','conditionType','.unit','.pageId','^[A-Za-z_][A-Za-z0-9_]*$','filter','ALWAYS','source','.transferCandidates','templateName','value\x20must\x20be\x20an\x20array.','assignee','Notification\x20template\x20supports\x20at\x20most\x20','Notification\x20configCode\x20is\x20required.','.recipients','flowDesc','summary','flowJson.pageMode','.timeout','.async.enabled','718962nIdBer','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','includes','SCRIPT','123zAbUKQ','.actions','approval_sys_','flowJson.nodes.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','overwrite','flowType','startPath','message','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','USER','HOURS','boolean','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','pageMode','2GBiTpp','START','action','parse','.template','pid','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','Node\x20cannot\x20reach\x20any\x20END.','.async','SCRIPT\x20node\x20requires\x20scriptName.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','approval.simple-flow.v1','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','Notification\x20recipient.value\x20is\x20required.','enabled','.conditionType','pageId','get','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.waypoints[','APPROVED','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Unsupported\x20flowType:\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','slice','Unsupported\x20node\x20type:\x20','bindDatasetCode','CONTINUE','startsWith','NaN','roleId','.async.retryCount','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','Edge\x20target\x20node\x20not\x20found:\x20','config','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','integer','Notification\x20action.text\x20is\x20required.','interrupting','label','.timeout.scriptName','indexOf','.sequential','add','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','matchAll','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','EMAIL','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','#/$defs/position','.detailMarkdown','1684755zkrdmz','927087cbJTye','Unsupported\x20approval\x20mode:\x20','.name','.timeout.enabled','58060NonLfK','Rabetbase\x20FlowConfig','.async.retryInterval','.configCode','.config','SINGLE','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','\x20actions.','failurePolicy\x20must\x20be\x20a\x20string.','retryCount','.\x20This\x20CLI\x20supports\x20only\x20','appCode','approval_sys_operationType','isInteger','AUTO_REJECT','EXPRESSION\x20edge\x20requires\x20expression.','.position.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','map','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','hasOwnProperty','.assignee.roleId','datasetCode\x20must\x20be\x20a\x20string.','Node\x20is\x20not\x20reachable\x20from\x20START.','FORM_FLOW','Node\x20has\x20no\x20incoming\x20edge.','prototype','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','recipients','EXPRESSION','detailMarkdown','.text','.transferCandidates.userIds[','text','edge\x20must\x20be\x20an\x20object.','path','\x20is\x20required.','flowJson.edges','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','length','formPermission','.expression','APPROVAL','END','NOTIFICATION\x20node\x20requires\x20template.','MINUTES','REJECTED','async.enabled\x20must\x20be\x20a\x20boolean.','sourceNodeId','2561112FXfttw','.cc','string','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.id','Notification\x20recipients\x20must\x20be\x20an\x20array.','entries','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','configCode','__rabetbase_local_validation__','toUpperCase','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.path','event','.taskMode','replace','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','flowJson.nodes','nodes\x20must\x20be\x20an\x20array.','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowJson.schemaVersion','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','formData','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','facts','Notification\x20template.actions\x20must\x20be\x20an\x20array.','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','legacy_field_removed','flowKey','.timeout.resultVariable','waypoint.','.waypoints','waypoints','.scriptName','.transferCandidates.userIds','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','flowJson.edges[','https://json-schema.org/draft/2020-12/schema','cc\x20must\x20be\x20an\x20object.','trim','Notification\x20recipient\x20must\x20be\x20an\x20object.','INDEPENDENT_FLOW','.resultVariable','stringify','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','targetNodeId','Duplicate\x20cc\x20recipient\x20userId:\x20','FIXED','flowJson.nodes[','.assignee.strategy','.defaultFlow','call','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','DAYS','Reserved\x20resultVariable:\x20','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','.timeout.interrupting','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.',',\x20but\x20node\x20','async','template','.type','startPageId','timeout','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','FAIL','url','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','set','279260SxGooN','AUTO_APPROVE','retryInterval','edges\x20must\x20be\x20an\x20array.','Node\x20has\x20no\x20outgoing\x20edge.','.role','some','.cc.visible','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','BCC','Edge\x20source\x20node\x20not\x20found:\x20','Unsupported\x20pageMode:\x20','approval_sys_processInstanceId','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20template.','.transferCandidates.strategy','.version','approval_sys_initiatorUserId','.source','.assignee.userIds','CUSTOM_PAGE','HANDLE','Notification\x20version\x20must\x20be\x20a\x20string.','isArray','ANY','.cc.recipientUserIds','\x20users.','flowJson.','.approvalMode','waypoints\x20must\x20be\x20an\x20array.','Unsupported\x20condition\x20type:\x20','Duplicate\x20value:\x20','approval_sys_pageId','Every\x20node\x20requires\x20a\x20non-empty\x20name.','.timeout.action','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','Unsupported\x20task\x20mode:\x20','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','flowJson.startPageId'];a287_0x12ee=function(){return _0x4e3f44;};return a287_0x12ee();}const a287_0x4050df=a287_0x4188;(function(_0x36291e,_0x7391b6){const _0x345fd0=a287_0x4188,_0x14a23b=_0x36291e();while(!![]){try{const _0x2ae8a7=-parseInt(_0x345fd0(0x22d))/0x1*(parseInt(_0x345fd0(0x16e))/0x2)+parseInt(_0x345fd0(0x21e))/0x3*(parseInt(_0x345fd0(0x267))/0x4)+parseInt(_0x345fd0(0x197))/0x5*(parseInt(_0x345fd0(0x21a))/0x6)+parseInt(_0x345fd0(0x263))/0x7+parseInt(_0x345fd0(0x298))/0x8+parseInt(_0x345fd0(0x262))/0x9+-parseInt(_0x345fd0(0x1bf))/0xa;if(_0x2ae8a7===_0x7391b6)break;else _0x14a23b['push'](_0x14a23b['shift']());}catch(_0x4e3e47){_0x14a23b['push'](_0x14a23b['shift']());}}}(a287_0x12ee,0x66e76));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':a287_0x4050df(0x2bd),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a287_0x4050df(0x268),'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x1d6),a287_0x4050df(0x224),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a287_0x4050df(0x29a),'minLength':0x1},{'type':a287_0x4050df(0x252),'minimum':0x1}]},'position':{'type':a287_0x4050df(0x1b4),'required':['x','y'],'properties':{'x':{'type':a287_0x4050df(0x1b5),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x1b0),a287_0x4050df(0x1bd)],'properties':{'value':{'type':a287_0x4050df(0x252),'minimum':0x1},'unit':{'enum':[a287_0x4050df(0x1ae),a287_0x4050df(0x294),a287_0x4050df(0x229),a287_0x4050df(0x15e)]}},'additionalProperties':!![]},'flowNode':{'type':a287_0x4050df(0x1b4),'required':['id','type','name',a287_0x4050df(0x1d2)],'properties':{'id':{'type':a287_0x4050df(0x29a),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':['START','END',a287_0x4050df(0x291),'CONDITION',a287_0x4050df(0x21d),'NOTIFICATION']},'name':{'type':a287_0x4050df(0x29a),'minLength':0x1},'path':{'type':a287_0x4050df(0x29a),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a287_0x4050df(0x26c),a287_0x4050df(0x1e8),a287_0x4050df(0x187)]},'taskMode':{'enum':['APPROVAL','HANDLE']},'assignee':{'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x1d8)],'properties':{'strategy':{'enum':[a287_0x4050df(0x158),a287_0x4050df(0x1f7)]},'userIds':{'type':a287_0x4050df(0x1fc),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a287_0x4050df(0x252),'minimum':0x1},{'type':a287_0x4050df(0x29a),'pattern':a287_0x4050df(0x1dc)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a287_0x4050df(0x1d8),a287_0x4050df(0x1d4)],'properties':{'strategy':{'const':a287_0x4050df(0x158)},'userIds':{'type':a287_0x4050df(0x1fc),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a287_0x4050df(0x22a)},'result':{'enum':[a287_0x4050df(0x241),a287_0x4050df(0x295)]},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a287_0x4050df(0x29a),'pattern':a287_0x4050df(0x20a)},'async':{'type':a287_0x4050df(0x1b4),'properties':{'enabled':{'type':a287_0x4050df(0x22a)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a287_0x4050df(0x22a)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a287_0x4050df(0x16f),a287_0x4050df(0x275),a287_0x4050df(0x1e2)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a287_0x4050df(0x29a),'minLength':0x1},'resultVariable':{'type':a287_0x4050df(0x29a),'pattern':a287_0x4050df(0x20a)}},'additionalProperties':!![]},'cc':{'type':'object','required':[a287_0x4050df(0x1e6)],'properties':{'recipientUserIds':{'type':a287_0x4050df(0x1fc),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x4050df(0x29a),'minLength':0x1}},'visible':{'type':a287_0x4050df(0x1fc),'uniqueItems':!![],'items':{'type':a287_0x4050df(0x29a),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x2a0),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x4050df(0x29a),'minLength':0x1},'failurePolicy':{'enum':[a287_0x4050df(0x249),a287_0x4050df(0x16a)]},'template':{'type':'object','required':['title',a287_0x4050df(0x216)],'properties':{'title':{'type':a287_0x4050df(0x29a),'minLength':0x1},'summary':{'type':a287_0x4050df(0x29a),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':a287_0x4050df(0x1fc),'maxItems':0x8,'items':{'type':'object','required':[a287_0x4050df(0x255),'value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x4050df(0x1fc),'maxItems':0x2,'items':{'type':a287_0x4050df(0x1b4),'required':['text','url'],'properties':{'text':{'type':a287_0x4050df(0x29a),'minLength':0x1},'url':{'type':a287_0x4050df(0x29a),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x1df),a287_0x4050df(0x1b0)],'properties':{'type':{'enum':['USER',a287_0x4050df(0x1f7),a287_0x4050df(0x25e)]},'value':{'type':a287_0x4050df(0x29a),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x4050df(0x1b4),'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a287_0x4050df(0x29a),'minLength':0x1},'target':{'type':a287_0x4050df(0x29a),'minLength':0x1},'sourceNodeId':{'type':a287_0x4050df(0x29a),'minLength':0x1},'targetNodeId':{'type':a287_0x4050df(0x29a),'minLength':0x1},'conditionType':{'enum':[a287_0x4050df(0x20c),a287_0x4050df(0x241),a287_0x4050df(0x295),a287_0x4050df(0x284)]},'expression':{'type':'string'},'defaultFlow':{'type':a287_0x4050df(0x22a)},'name':{'type':a287_0x4050df(0x29a)},'waypoints':{'type':'array','items':{'$ref':a287_0x4050df(0x260)}}},'allOf':[{'anyOf':[{'required':['source']},{'required':[a287_0x4050df(0x297)]}]},{'anyOf':[{'required':['target']},{'required':[a287_0x4050df(0x156)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x4050df(0x29a),'minLength':0x1},'flowDesc':{'type':a287_0x4050df(0x29a)},'flowType':{'enum':['FORM_FLOW',a287_0x4050df(0x152)]},'datasetCode':{'type':a287_0x4050df(0x29a),'minLength':0x1},'pageId':{'type':a287_0x4050df(0x252)},'templateName':![],'flowJson':{'type':a287_0x4050df(0x1b4),'required':[a287_0x4050df(0x1c0),a287_0x4050df(0x1cb)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a287_0x4050df(0x29a),'const':'approval.simple-flow.v1','description':'Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.'},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a287_0x4050df(0x183)},'startPageId':![],'startPath':{'type':a287_0x4050df(0x29a),'minLength':0x1},'nodes':{'type':a287_0x4050df(0x1fc),'minItems':0x1,'items':{'$ref':a287_0x4050df(0x1d1)}},'edges':{'type':a287_0x4050df(0x1fc),'minItems':0x1,'items':{'$ref':a287_0x4050df(0x1b1)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x4050df(0x2b4),'flowCode','flowName',a287_0x4050df(0x248),a287_0x4050df(0x1d7),a287_0x4050df(0x272),a287_0x4050df(0x23d),a287_0x4050df(0x20f)],REMOVED_ROOT_FIELDS=['id',a287_0x4050df(0x272),a287_0x4050df(0x20f)],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x4050df(0x238),NODE_TYPES=new Set([a287_0x4050df(0x22e),'END',a287_0x4050df(0x291),'CONDITION',a287_0x4050df(0x21d),a287_0x4050df(0x1ec)]),CONDITION_TYPES=new Set([a287_0x4050df(0x20c),a287_0x4050df(0x241),a287_0x4050df(0x295),'EXPRESSION']),APPROVAL_MODES=new Set([a287_0x4050df(0x26c),'ALL',a287_0x4050df(0x187)]),APPROVAL_TASK_MODES=new Set([a287_0x4050df(0x291),a287_0x4050df(0x184)]),FLOW_TIME_UNITS=new Set([a287_0x4050df(0x1ae),a287_0x4050df(0x294),'HOURS',a287_0x4050df(0x15e)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a287_0x4050df(0x16f),a287_0x4050df(0x275),a287_0x4050df(0x1e2)]),FLOW_TYPES=new Set([a287_0x4050df(0x27f),a287_0x4050df(0x152)]),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a287_0x4050df(0x1a6)]),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','FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x4050df(0x228),'ROLE',a287_0x4050df(0x25e)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x4050df(0x177)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE=a287_0x4050df(0x2ad),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x4050df(0x19d),RESERVED_RESULT_VARIABLES=new Set([a287_0x4050df(0x2ae),a287_0x4050df(0x203),'approval_sys_appCode',a287_0x4050df(0x17a),a287_0x4050df(0x180),a287_0x4050df(0x1c8),a287_0x4050df(0x1f9),a287_0x4050df(0x18f),a287_0x4050df(0x273),a287_0x4050df(0x1f4)]);export function normalizeFlowConfig(_0x57a407){const _0x341294=a287_0x4050df;if(!isRecord(_0x57a407))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x5ac29b=cloneJsonValue(_0x57a407),_0x5eda6b=_0x5ac29b[_0x341294(0x200)],_0xcefde9=isRecord(_0x5eda6b)?cloneJsonValue(_0x5eda6b):{},_0xb4e4f9=[],_0x8fed57=[];for(const _0x3aafb5 of REMOVED_ROOT_FIELDS){if(!Object['prototype']['hasOwnProperty'][_0x341294(0x15c)](_0x5ac29b,_0x3aafb5))continue;delete _0x5ac29b[_0x3aafb5],_0x8fed57[_0x341294(0x1ed)](_0x3aafb5),_0xb4e4f9[_0x341294(0x1ed)]({'code':_0x341294(0x2b3),'path':_0x3aafb5,'message':_0x3aafb5+_0x341294(0x242)});}for(const _0x1ae957 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0x341294(0x27b)][_0x341294(0x15c)](_0xcefde9,_0x1ae957))continue;const _0x452d5a='flowJson.'+_0x1ae957;delete _0xcefde9[_0x1ae957],_0x8fed57[_0x341294(0x1ed)](_0x452d5a),_0xb4e4f9[_0x341294(0x1ed)]({'code':_0x341294(0x2b3),'path':_0x452d5a,'message':_0x452d5a+_0x341294(0x242)});}if(Object[_0x341294(0x281)][_0x341294(0x27b)][_0x341294(0x15c)](_0xcefde9,_0x341294(0x1ba))){const _0x2efd0c=_0xcefde9[_0x341294(0x1ba)],_0x4b66c5=typeof _0x2efd0c==='string'?_0x2efd0c['trim']():_0x2efd0c;if(isEmptyJsonValue(_0x2efd0c)||_0x4b66c5===DEFAULT_FLOW_SCHEMA_VERSION){const _0x195605=_0x341294(0x2ac);delete _0xcefde9[_0x341294(0x1ba)],_0x8fed57['push'](_0x195605),_0xb4e4f9[_0x341294(0x1ed)]({'code':'legacy_field_removed','path':_0x195605,'message':_0x195605+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x341294(0x245)});}}removeEmptyMetadata(_0xcefde9,_0x341294(0x200),_0xb4e4f9,_0x8fed57);_0x5ac29b[_0x341294(0x224)]===_0x341294(0x152)&&!Object[_0x341294(0x281)]['hasOwnProperty'][_0x341294(0x15c)](_0xcefde9,_0x341294(0x22c))&&(_0xcefde9[_0x341294(0x22c)]='CUSTOM_PAGE');_0x5ac29b[_0x341294(0x200)]=_0xcefde9;if(typeof _0x5ac29b[_0x341294(0x1d6)]==='string')_0x5ac29b['flowName']=_0x5ac29b[_0x341294(0x1d6)][_0x341294(0x2bf)]();return{'config':_0x5ac29b,'warnings':_0xb4e4f9,'removedPaths':_0x8fed57};}export function validateFlowConfig(_0x159010){const _0x47c346=a287_0x4050df;let _0xf49239;try{_0xf49239=normalizeFlowConfig(_0x159010);}catch(_0x3885e5){const _0x2019d9=_0x3885e5 instanceof Error?_0x3885e5[_0x47c346(0x226)]:String(_0x3885e5),_0x33b36c={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x2019d9}],'warnings':[],'normalized':_0x33b36c,'validationConfig':_0x33b36c};}const _0x11b532=_0xf49239[_0x47c346(0x250)],_0x305b36=cloneJsonValue(_0x11b532),_0x57cd23=_0x305b36['flowJson'];_0x57cd23[_0x47c346(0x2b4)]=_0x47c346(0x2a1),_0x57cd23['flowName']=_0x11b532[_0x47c346(0x1d6)];typeof _0x11b532[_0x47c346(0x1d7)]===_0x47c346(0x29a)&&_0x11b532[_0x47c346(0x1d7)][_0x47c346(0x2bf)]()&&(_0x57cd23[_0x47c346(0x248)]=_0x11b532['datasetCode'][_0x47c346(0x2bf)]());const _0x315782=[];return validateOuterMetadata(_0x11b532,_0x315782),validateFlowClassification(_0x11b532,_0x315782),validateGraph(_0x11b532['flowJson'],_0x315782),{'valid':_0x315782[_0x47c346(0x28e)]===0x0,'errors':_0x315782,'warnings':_0xf49239[_0x47c346(0x1ac)],'normalized':_0x11b532,'validationConfig':_0x305b36};}function validateFlowClassification(_0x57e8f9,_0x73eff8){const _0x2b27d1=a287_0x4050df;if(!isRecord(_0x57e8f9[_0x2b27d1(0x200)]))return;const _0x5717fe=_0x57e8f9[_0x2b27d1(0x224)],_0x508166=_0x57e8f9[_0x2b27d1(0x200)]['pageMode'];_0x508166!==undefined&&(typeof _0x508166!=='string'||!FLOW_PAGE_MODES[_0x2b27d1(0x1fa)](_0x508166))&&_0x73eff8[_0x2b27d1(0x1ed)]({'path':_0x2b27d1(0x217),'message':_0x2b27d1(0x179)+String(_0x508166)+'.'});_0x5717fe===_0x2b27d1(0x27f)&&_0x508166!==undefined&&_0x73eff8[_0x2b27d1(0x1ed)]({'path':_0x2b27d1(0x217),'message':_0x2b27d1(0x1a2)});_0x5717fe===_0x2b27d1(0x152)&&_0x508166===_0x2b27d1(0x1a6)&&_0x73eff8[_0x2b27d1(0x1ed)]({'path':_0x2b27d1(0x217),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x5717fe===_0x2b27d1(0x27f)||_0x5717fe===_0x2b27d1(0x152))&&validateCustomPageNavigation(_0x57e8f9,_0x5717fe,_0x508166,_0x73eff8);if(_0x5717fe!=='FORM_FLOW'||!Array[_0x2b27d1(0x186)](_0x57e8f9[_0x2b27d1(0x200)]['nodes']))return;_0x57e8f9[_0x2b27d1(0x200)][_0x2b27d1(0x1c0)][_0x2b27d1(0x1e3)]((_0x16301f,_0x5d3677)=>{const _0x7e2c89=_0x2b27d1;isRecord(_0x16301f)&&_0x16301f[_0x7e2c89(0x1df)]===_0x7e2c89(0x291)&&_0x16301f[_0x7e2c89(0x1af)]==='HANDLE'&&_0x73eff8[_0x7e2c89(0x1ed)]({'path':_0x7e2c89(0x159)+_0x5d3677+'].taskMode','message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x4409a6,_0x39e716,_0x1d6f2c,_0x4535e6){const _0x30d8a9=a287_0x4050df,_0x2e09cf=_0x4409a6[_0x30d8a9(0x200)][_0x30d8a9(0x167)];_0x2e09cf!==undefined&&_0x4535e6[_0x30d8a9(0x1ed)]({'path':_0x30d8a9(0x195),'message':_0x30d8a9(0x176)});const _0x1fbc11=_0x4409a6[_0x30d8a9(0x200)][_0x30d8a9(0x225)];_0x1fbc11!==undefined&&(typeof _0x1fbc11!==_0x30d8a9(0x29a)||_0x1fbc11['trim']()==='')&&_0x4535e6[_0x30d8a9(0x1ed)]({'path':_0x30d8a9(0x1a4),'message':_0x30d8a9(0x1ee)});const _0x68dd93=Array[_0x30d8a9(0x186)](_0x4409a6['flowJson']['nodes'])?_0x4409a6['flowJson'][_0x30d8a9(0x1c0)]['map']((_0x357db3,_0x2cc618)=>({'node':_0x357db3,'index':_0x2cc618}))['filter'](({node:_0x351782})=>isRecord(_0x351782)&&_0x351782[_0x30d8a9(0x28a)]!==undefined):[],_0x2a1df9=_0x1fbc11!==undefined||_0x68dd93[_0x30d8a9(0x28e)]>0x0,_0x23c71b=_0x1d6f2c===undefined&&_0x39e716===_0x30d8a9(0x152)?'CUSTOM_PAGE':_0x1d6f2c;_0x2a1df9&&(_0x39e716!==_0x30d8a9(0x152)||_0x23c71b!=='CUSTOM_PAGE')&&(_0x1fbc11!==undefined&&_0x4535e6[_0x30d8a9(0x1ed)]({'path':'flowJson.startPath','message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x68dd93['forEach'](({index:_0x52e055})=>{const _0x58f6fd=_0x30d8a9;_0x4535e6[_0x58f6fd(0x1ed)]({'path':_0x58f6fd(0x159)+_0x52e055+'].path','message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x5c5b7b,_0x43e4eb,_0x5dab23={}){const _0x4f5fd1=a287_0x4050df,_0x2f8d5c=resolve(_0x5c5b7b),_0x6f9016=_0x2f8d5c+'.'+process[_0x4f5fd1(0x232)]+'.'+randomUUID()+_0x4f5fd1(0x1b7),_0x395365=JSON[_0x4f5fd1(0x154)](_0x43e4eb,null,0x2)+'\x0a';let _0x3d8be7;try{try{_0x3d8be7=(await stat(_0x2f8d5c))[_0x4f5fd1(0x1cc)]&0x1ff;}catch{_0x3d8be7=undefined;}await writeFile(_0x6f9016,_0x395365,{'encoding':_0x4f5fd1(0x19c),'flag':'wx','mode':_0x3d8be7??0x1a4});if(_0x3d8be7!==undefined)await chmod(_0x6f9016,_0x3d8be7);_0x5dab23[_0x4f5fd1(0x223)]===![]?(await link(_0x6f9016,_0x2f8d5c),await unlink(_0x6f9016)):await rename(_0x6f9016,_0x2f8d5c);}finally{await unlink(_0x6f9016)[_0x4f5fd1(0x1c2)](()=>undefined);}}function validateOuterMetadata(_0x3c0802,_0xe040fe){const _0x463a50=a287_0x4050df;(typeof _0x3c0802[_0x463a50(0x1d6)]!==_0x463a50(0x29a)||_0x3c0802[_0x463a50(0x1d6)][_0x463a50(0x2bf)]()==='')&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x1d6),'message':_0x463a50(0x1c6)});_0x3c0802[_0x463a50(0x215)]!==undefined&&typeof _0x3c0802[_0x463a50(0x215)]!==_0x463a50(0x29a)&&_0xe040fe[_0x463a50(0x1ed)]({'path':'flowDesc','message':_0x463a50(0x1fb)});if(_0x3c0802[_0x463a50(0x224)]===undefined||_0x3c0802['flowType']===null)_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x224),'message':_0x463a50(0x205)});else(typeof _0x3c0802[_0x463a50(0x224)]!==_0x463a50(0x29a)||!FLOW_TYPES[_0x463a50(0x1fa)](_0x3c0802[_0x463a50(0x224)]))&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x224),'message':_0x463a50(0x243)+String(_0x3c0802[_0x463a50(0x224)])+'.'});_0x3c0802[_0x463a50(0x1d7)]!==undefined&&typeof _0x3c0802[_0x463a50(0x1d7)]!==_0x463a50(0x29a)&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x1d7),'message':_0x463a50(0x27d)}),_0x3c0802[_0x463a50(0x23d)]!==undefined&&(!Number['isInteger'](_0x3c0802['pageId'])||_0x3c0802[_0x463a50(0x23d)]<0x0)&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x23d),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x3c0802[_0x463a50(0x224)]===_0x463a50(0x152)&&_0x3c0802[_0x463a50(0x1d7)]!==undefined&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x1d7),'message':_0x463a50(0x28d)}),_0x3c0802['flowType']===_0x463a50(0x152)&&_0x3c0802['pageId']!==undefined&&_0xe040fe[_0x463a50(0x1ed)]({'path':_0x463a50(0x23d),'message':_0x463a50(0x2a8)});}function validateGraph(_0x1aa8bc,_0x3a9a5e){const _0x1eee28=a287_0x4050df;if(!isRecord(_0x1aa8bc)){_0x3a9a5e[_0x1eee28(0x1ed)]({'path':_0x1eee28(0x200),'message':'flowJson\x20must\x20be\x20an\x20object.'});return;}!Array[_0x1eee28(0x186)](_0x1aa8bc[_0x1eee28(0x1c0)])&&_0x3a9a5e[_0x1eee28(0x1ed)]({'path':'flowJson.nodes','message':_0x1eee28(0x2aa)});!Array['isArray'](_0x1aa8bc[_0x1eee28(0x1cb)])&&_0x3a9a5e[_0x1eee28(0x1ed)]({'path':'flowJson.edges','message':_0x1eee28(0x171)});Object[_0x1eee28(0x281)][_0x1eee28(0x27b)][_0x1eee28(0x15c)](_0x1aa8bc,'schemaVersion')&&_0x3a9a5e[_0x1eee28(0x1ed)]({'path':_0x1eee28(0x2ac),'message':_0x1eee28(0x1cf)+String(_0x1aa8bc[_0x1eee28(0x1ba)])+_0x1eee28(0x271)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x995cd6 of['formSchema','formDefinitions','formPermissions']){Object[_0x1eee28(0x281)][_0x1eee28(0x27b)][_0x1eee28(0x15c)](_0x1aa8bc,_0x995cd6)&&_0x3a9a5e['push']({'path':_0x1eee28(0x18a)+_0x995cd6,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x1eee28(0x186)](_0x1aa8bc[_0x1eee28(0x1c0)])||!Array['isArray'](_0x1aa8bc[_0x1eee28(0x1cb)]))return;const _0x273413=new Map(),_0x729ed=[],_0x1036a5=[],_0x1100d9=new Map(),_0x2c3e29=new Map(),_0x4ef1cf=new Set();let _0x4fa55c=0x0;_0x1aa8bc[_0x1eee28(0x1c0)][_0x1eee28(0x1e3)]((_0x2b4cfc,_0x22d864)=>{const _0x33d582=_0x1eee28,_0xedbde3=_0x33d582(0x159)+_0x22d864+']';if(!isRecord(_0x2b4cfc)){_0x3a9a5e['push']({'path':_0xedbde3,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x4cdd79=_0x2b4cfc;if(typeof _0x4cdd79['id']!=='string'||!BPMN_ID_PATTERN[_0x33d582(0x1aa)](_0x4cdd79['id']))_0x3a9a5e[_0x33d582(0x1ed)]({'path':_0xedbde3+_0x33d582(0x29c),'message':_0x33d582(0x244)});else _0x273413[_0x33d582(0x1fa)](_0x4cdd79['id'])?_0x3a9a5e['push']({'path':_0xedbde3+_0x33d582(0x29c),'message':'Duplicate\x20node\x20id:\x20'+_0x4cdd79['id']+'.'}):(_0x273413[_0x33d582(0x16d)](_0x4cdd79['id'],_0x4cdd79),_0x4ef1cf[_0x33d582(0x259)](_0x4cdd79['id']));if(!NODE_TYPES[_0x33d582(0x1fa)](_0x4cdd79['type']))_0x3a9a5e[_0x33d582(0x1ed)]({'path':_0xedbde3+_0x33d582(0x166),'message':_0x33d582(0x247)+String(_0x4cdd79[_0x33d582(0x1df)])+'.'});else{if(_0x4cdd79[_0x33d582(0x1df)]===_0x33d582(0x22e))_0x729ed['push'](_0x4cdd79['id']);else _0x4cdd79[_0x33d582(0x1df)]==='END'&&_0x1036a5['push'](_0x4cdd79['id']);}_0x4cdd79[_0x33d582(0x1df)]===_0x33d582(0x291)&&(_0x4cdd79['taskMode']===undefined||_0x4cdd79[_0x33d582(0x1af)]===_0x33d582(0x291))&&(_0x4fa55c+=0x1);validateNode(_0x4cdd79,_0xedbde3,_0x3a9a5e);if(_0x4cdd79[_0x33d582(0x1df)]===_0x33d582(0x21d)){const _0x59b7d1=resolveEffectiveResultVariable(_0x4cdd79[_0x33d582(0x1e4)],![]);_0x59b7d1&&(registerResultVariableOwner(_0x2c3e29,_0x59b7d1,_0x4cdd79['id'],_0x3a9a5e),!_0x1100d9[_0x33d582(0x1fa)](_0x59b7d1)&&_0x1100d9[_0x33d582(0x16d)](_0x59b7d1,_0x4cdd79['id']));}if(_0x4cdd79[_0x33d582(0x1df)]===_0x33d582(0x291)&&isRecord(_0x4cdd79[_0x33d582(0x168)])&&_0x4cdd79[_0x33d582(0x168)][_0x33d582(0x23b)]===!![]&&_0x4cdd79[_0x33d582(0x168)][_0x33d582(0x22f)]===_0x33d582(0x1e2)){const _0x151542=resolveEffectiveResultVariable(_0x4cdd79[_0x33d582(0x168)][_0x33d582(0x1e4)],!![]);_0x151542&®isterResultVariableOwner(_0x2c3e29,_0x151542,_0x4cdd79['id']+_0x33d582(0x218),_0x3a9a5e);}});_0x729ed[_0x1eee28(0x28e)]!==0x1&&_0x3a9a5e[_0x1eee28(0x1ed)]({'path':_0x1eee28(0x2a9),'message':_0x1eee28(0x1e0)});_0x1036a5[_0x1eee28(0x28e)]===0x0&&_0x3a9a5e['push']({'path':_0x1eee28(0x2a9),'message':_0x1eee28(0x237)});const _0x77f7e8=new Map(),_0x14c30d=new Map(),_0x20577e=new Map(),_0x5f0778=new Set();_0x1aa8bc['edges'][_0x1eee28(0x1e3)]((_0xbdaa05,_0x1c5272)=>{const _0x33b3cf=_0x1eee28,_0x3d4ecd=_0x33b3cf(0x2bc)+_0x1c5272+']';if(!isRecord(_0xbdaa05)){_0x3a9a5e['push']({'path':_0x3d4ecd,'message':_0x33b3cf(0x289)});return;}const _0x132ba9=_0xbdaa05;_0x20577e[_0x33b3cf(0x16d)](_0x132ba9,_0x3d4ecd);const _0x40dc4f=resolveEdgeEndpoint(_0x132ba9[_0x33b3cf(0x20d)],_0x132ba9[_0x33b3cf(0x297)]),_0x49d8fa=resolveEdgeEndpoint(_0x132ba9[_0x33b3cf(0x1b9)],_0x132ba9[_0x33b3cf(0x156)]);if(!_0x40dc4f)_0x3a9a5e[_0x33b3cf(0x1ed)]({'path':_0x3d4ecd+'.source','message':_0x33b3cf(0x1ea)});if(!_0x49d8fa)_0x3a9a5e[_0x33b3cf(0x1ed)]({'path':_0x3d4ecd+'.target','message':_0x33b3cf(0x1cd)});_0x40dc4f&&!_0x273413[_0x33b3cf(0x1fa)](_0x40dc4f)&&_0x3a9a5e[_0x33b3cf(0x1ed)]({'path':_0x3d4ecd+_0x33b3cf(0x181),'message':_0x33b3cf(0x178)+_0x40dc4f+'.'});_0x49d8fa&&!_0x273413[_0x33b3cf(0x1fa)](_0x49d8fa)&&_0x3a9a5e['push']({'path':_0x3d4ecd+'.target','message':_0x33b3cf(0x24f)+_0x49d8fa+'.'});if(_0x132ba9['id']!==undefined){if(typeof _0x132ba9['id']!==_0x33b3cf(0x29a)||!BPMN_ID_PATTERN[_0x33b3cf(0x1aa)](_0x132ba9['id']))_0x3a9a5e[_0x33b3cf(0x1ed)]({'path':_0x3d4ecd+'.id','message':_0x33b3cf(0x201)});else{if(_0x4ef1cf['has'](_0x132ba9['id']))_0x3a9a5e[_0x33b3cf(0x1ed)]({'path':_0x3d4ecd+'.id','message':_0x33b3cf(0x1a9)+_0x132ba9['id']+'.'});else!_0x4ef1cf['has'](_0x132ba9['id'])&&_0x4ef1cf[_0x33b3cf(0x259)](_0x132ba9['id']);}}if(_0x40dc4f&&_0x49d8fa){const _0x4f8aab=_0x40dc4f+'\x00'+_0x49d8fa+'\x00'+(_0x132ba9[_0x33b3cf(0x207)]??_0x33b3cf(0x20c));_0x5f0778['has'](_0x4f8aab)?_0x3a9a5e['push']({'path':_0x3d4ecd,'message':_0x33b3cf(0x1ab)+_0x40dc4f+_0x33b3cf(0x1c3)+_0x49d8fa+'\x20('+(_0x132ba9[_0x33b3cf(0x207)]??_0x33b3cf(0x20c))+').'}):_0x5f0778['add'](_0x4f8aab);}validateEdge(_0x132ba9,_0x3d4ecd,_0x3a9a5e),_0x40dc4f&&_0x49d8fa&&(_0x77f7e8[_0x33b3cf(0x23e)](_0x40dc4f)?.[_0x33b3cf(0x1ed)](_0x132ba9)??_0x77f7e8[_0x33b3cf(0x16d)](_0x40dc4f,[_0x132ba9]),_0x14c30d[_0x33b3cf(0x23e)](_0x49d8fa)?.['push'](_0x132ba9)??_0x14c30d['set'](_0x49d8fa,[_0x132ba9]));});if(_0x729ed['length']!==0x1)return;validateGraphShape(_0x273413,_0x729ed[0x0],_0x1036a5,_0x77f7e8,_0x14c30d,_0x20577e,_0x3a9a5e),validateScriptResultReferences(_0x273413,_0x729ed[0x0],_0x77f7e8,_0x14c30d,_0x20577e,_0x1100d9,_0x3a9a5e),validateApprovalResults(_0x273413,_0x4fa55c,_0x1036a5,_0x3a9a5e);}function validateNode(_0x4a243b,_0x5931ed,_0x4b0bae){const _0xfebd41=a287_0x4050df;for(const _0x718b57 of['form',_0xfebd41(0x28f)]){Object[_0xfebd41(0x281)][_0xfebd41(0x27b)][_0xfebd41(0x15c)](_0x4a243b,_0x718b57)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+'.'+_0x718b57,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x4a243b[_0xfebd41(0x1df)]))return;(typeof _0x4a243b['name']!=='string'||_0x4a243b[_0xfebd41(0x1ad)][_0xfebd41(0x2bf)]()==='')&&_0x4b0bae['push']({'path':_0x5931ed+_0xfebd41(0x265),'message':_0xfebd41(0x190)});_0x4a243b[_0xfebd41(0x23d)]!==undefined&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x209),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x4a243b[_0xfebd41(0x28a)]!==undefined){if(typeof _0x4a243b[_0xfebd41(0x28a)]!==_0xfebd41(0x29a)||_0x4a243b[_0xfebd41(0x28a)][_0xfebd41(0x2bf)]()==='')_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x2a4),'message':_0xfebd41(0x26d)});else _0x4a243b['type']!==_0xfebd41(0x291)&&_0x4a243b[_0xfebd41(0x1df)]!==_0xfebd41(0x292)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x2a4),'message':_0xfebd41(0x2a3)});}const _0x1b397f=_0x4a243b[_0xfebd41(0x1d2)];if(!isRecord(_0x1b397f))_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x1fd),'message':_0xfebd41(0x282)});else for(const _0x26c60f of['x','y']){const _0x52e647=_0x1b397f[_0x26c60f];(typeof _0x52e647!==_0xfebd41(0x1b5)||!Number['isFinite'](_0x52e647)||_0x52e647<0x0)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x277)+_0x26c60f,'message':_0xfebd41(0x1de)+_0x26c60f+_0xfebd41(0x160)});}if(_0x4a243b[_0xfebd41(0x1df)]===_0xfebd41(0x291)){const _0xc100cb=_0x4a243b['approvalMode']??'SINGLE',_0x4d0eef=_0x4a243b[_0xfebd41(0x1af)]??_0xfebd41(0x291);!APPROVAL_TASK_MODES[_0xfebd41(0x1fa)](_0x4d0eef)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x2a6),'message':_0xfebd41(0x193)+String(_0x4d0eef)+'.'});!APPROVAL_MODES[_0xfebd41(0x1fa)](_0xc100cb)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x18b),'message':_0xfebd41(0x264)+String(_0xc100cb)+'.'});if(!isRecord(_0x4a243b[_0xfebd41(0x211)]))_0x4b0bae['push']({'path':_0x5931ed+_0xfebd41(0x1bb),'message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x37cf86=_0x4a243b[_0xfebd41(0x211)][_0xfebd41(0x1d8)];_0x37cf86!=='FIXED'&&_0x37cf86!==_0xfebd41(0x1f7)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x15a),'message':_0xfebd41(0x1a7)});if(_0x37cf86===_0xfebd41(0x158)){const _0x594402=_0x4a243b[_0xfebd41(0x211)][_0xfebd41(0x1d4)];if(!Array[_0xfebd41(0x186)](_0x594402)||_0x594402['length']===0x0)_0x4b0bae['push']({'path':_0x5931ed+'.assignee.userIds','message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x1401f6=_0x594402[_0xfebd41(0x1b8)](_0x9f385b=>!isValidUserId(_0x9f385b));_0x1401f6>=0x0&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x199)+_0x1401f6+']','message':_0xfebd41(0x15d)});const _0x9a0f2a=new Set(_0x594402[_0xfebd41(0x20b)](isValidUserId)['map'](_0x402237=>String(_0x402237)[_0xfebd41(0x2bf)]()));_0xc100cb===_0xfebd41(0x26c)&&_0x9a0f2a[_0xfebd41(0x1d5)]>0x1&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x182),'message':_0xfebd41(0x2bb)});}}if(_0x37cf86===_0xfebd41(0x1f7)){const _0x5dc415=_0x4a243b[_0xfebd41(0x211)][_0xfebd41(0x24c)],_0x5316a9=typeof _0x5dc415==='number'||typeof _0x5dc415===_0xfebd41(0x29a)?Number(String(_0x5dc415)[_0xfebd41(0x2bf)]()):Number[_0xfebd41(0x24b)];(!Number[_0xfebd41(0x1ca)](_0x5316a9)||_0x5316a9<=0x0)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x27c),'message':_0xfebd41(0x1d3)});}}if(_0x4a243b[_0xfebd41(0x1f0)]!==undefined){if(!isRecord(_0x4a243b['transferCandidates']))_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x20e),'message':_0xfebd41(0x1b6)});else{if(_0x4a243b[_0xfebd41(0x1f0)][_0xfebd41(0x1d8)]!=='FIXED')_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x17e),'message':_0xfebd41(0x1ff)});else{const _0x31dfc4=_0x4a243b[_0xfebd41(0x1f0)][_0xfebd41(0x1d4)];if(!Array[_0xfebd41(0x186)](_0x31dfc4)||_0x31dfc4[_0xfebd41(0x28e)]===0x0)_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x2ba),'message':_0xfebd41(0x23f)});else{const _0x4d0008=_0x31dfc4[_0xfebd41(0x1b8)](_0x43d070=>!isValidUserId(_0x43d070));_0x4d0008>=0x0&&_0x4b0bae['push']({'path':_0x5931ed+_0xfebd41(0x287)+_0x4d0008+']','message':_0xfebd41(0x29b)});}}}}}_0x4a243b[_0xfebd41(0x198)]!==undefined&&typeof _0x4a243b['sequential']!==_0xfebd41(0x22a)&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x258),'message':_0xfebd41(0x1b2)});if(_0x4a243b[_0xfebd41(0x1df)]===_0xfebd41(0x21d)){(typeof _0x4a243b[_0xfebd41(0x1ce)]!==_0xfebd41(0x29a)||_0x4a243b[_0xfebd41(0x1ce)]['trim']()==='')&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x2b9),'message':_0xfebd41(0x236)});if(_0x4a243b['resultVariable']!==undefined){if(typeof _0x4a243b[_0xfebd41(0x1e4)]!==_0xfebd41(0x29a)||!VARIABLE_PATTERN[_0xfebd41(0x1aa)](_0x4a243b['resultVariable']))_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+_0xfebd41(0x153),'message':_0xfebd41(0x29f)});else(RESERVED_RESULT_VARIABLES[_0xfebd41(0x1fa)](_0x4a243b['resultVariable'])||_0x4a243b['resultVariable']['startsWith']('approval_sys_'))&&_0x4b0bae[_0xfebd41(0x1ed)]({'path':_0x5931ed+'.resultVariable','message':_0xfebd41(0x15f)+_0x4a243b['resultVariable']+'.'});}}validateAsyncExecution(_0x4a243b,_0x5931ed,_0x4b0bae),validateApprovalTimeout(_0x4a243b,_0x5931ed,_0x4b0bae),validateCcConfig(_0x4a243b,_0x5931ed,_0x4b0bae),_0x4a243b['type']==='NOTIFICATION'&&validateNotificationConfig(_0x4a243b[_0xfebd41(0x250)],_0x5931ed+_0xfebd41(0x26b),_0x4b0bae);}function validateAsyncExecution(_0x562c13,_0x324735,_0x4bcf8b){const _0x2400e9=a287_0x4050df;if(_0x562c13[_0x2400e9(0x164)]===undefined)return;if(!isRecord(_0x562c13[_0x2400e9(0x164)])){_0x4bcf8b[_0x2400e9(0x1ed)]({'path':_0x324735+_0x2400e9(0x235),'message':_0x2400e9(0x1b3)});return;}if(_0x562c13[_0x2400e9(0x164)][_0x2400e9(0x23b)]!==undefined&&typeof _0x562c13[_0x2400e9(0x164)][_0x2400e9(0x23b)]!==_0x2400e9(0x22a)){_0x4bcf8b['push']({'path':_0x324735+_0x2400e9(0x219),'message':_0x2400e9(0x296)});return;}if(_0x562c13[_0x2400e9(0x164)][_0x2400e9(0x23b)]!==!![])return;_0x562c13['type']!==_0x2400e9(0x21d)&&_0x4bcf8b['push']({'path':_0x324735+'.async','message':_0x2400e9(0x239)});const _0x19b9df=_0x562c13[_0x2400e9(0x164)][_0x2400e9(0x270)]??0x3;(!Number['isInteger'](_0x19b9df)||_0x19b9df<0x1||_0x19b9df>MAX_ASYNC_RETRY_COUNT)&&_0x4bcf8b[_0x2400e9(0x1ed)]({'path':_0x324735+_0x2400e9(0x24d),'message':_0x2400e9(0x17c)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x562c13['async'][_0x2400e9(0x170)]!==undefined&&validateTimeAmount(_0x562c13['async']['retryInterval'],_0x324735+_0x2400e9(0x269),_0x4bcf8b);}function validateApprovalTimeout(_0x356be2,_0x296576,_0x2a7f43){const _0x25860f=a287_0x4050df;if(_0x356be2[_0x25860f(0x168)]===undefined)return;if(!isRecord(_0x356be2['timeout'])){_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+'.timeout','message':_0x25860f(0x1c4)});return;}if(_0x356be2[_0x25860f(0x168)][_0x25860f(0x23b)]!==undefined&&typeof _0x356be2[_0x25860f(0x168)][_0x25860f(0x23b)]!=='boolean'){_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+_0x25860f(0x266),'message':_0x25860f(0x204)});return;}if(_0x356be2[_0x25860f(0x168)][_0x25860f(0x23b)]!==!![])return;if(_0x356be2[_0x25860f(0x168)][_0x25860f(0x254)]!==undefined&&typeof _0x356be2[_0x25860f(0x168)][_0x25860f(0x254)]!=='boolean'){_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+'.timeout.interrupting','message':_0x25860f(0x1da)});return;}_0x356be2[_0x25860f(0x1df)]!==_0x25860f(0x291)&&_0x2a7f43['push']({'path':_0x296576+_0x25860f(0x218),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x356be2[_0x25860f(0x168)]['duration'],_0x296576+_0x25860f(0x1a8),_0x2a7f43);const _0x543d87=_0x356be2[_0x25860f(0x168)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x25860f(0x1fa)](_0x543d87)){_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+_0x25860f(0x191),'message':_0x25860f(0x27a)});return;}(_0x356be2['taskMode']??'APPROVAL')===_0x25860f(0x184)&&_0x543d87!==_0x25860f(0x1e2)&&_0x2a7f43['push']({'path':_0x296576+_0x25860f(0x191),'message':_0x25860f(0x25a)});const _0x46d31e=_0x356be2[_0x25860f(0x168)]['interrupting']??_0x543d87!==_0x25860f(0x1e2);if(_0x543d87===_0x25860f(0x1e2))_0x46d31e&&_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+'.timeout.interrupting','message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x356be2[_0x25860f(0x168)][_0x25860f(0x1ce)]!==_0x25860f(0x29a)||_0x356be2[_0x25860f(0x168)]['scriptName'][_0x25860f(0x2bf)]()==='')&&_0x2a7f43['push']({'path':_0x296576+_0x25860f(0x256),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x356be2[_0x25860f(0x168)][_0x25860f(0x1e4)],_0x296576+_0x25860f(0x2b5),_0x2a7f43);else!_0x46d31e&&_0x2a7f43[_0x25860f(0x1ed)]({'path':_0x296576+_0x25860f(0x161),'message':_0x543d87+_0x25860f(0x22b)});}function validateTimeAmount(_0x3c5083,_0x22b165,_0x54d0d4){const _0x229d1b=a287_0x4050df;if(!isRecord(_0x3c5083)){_0x54d0d4[_0x229d1b(0x1ed)]({'path':_0x22b165,'message':_0x229d1b(0x1a5)});return;}(!Number[_0x229d1b(0x274)](_0x3c5083[_0x229d1b(0x1b0)])||Number(_0x3c5083[_0x229d1b(0x1b0)])<=0x0)&&_0x54d0d4[_0x229d1b(0x1ed)]({'path':_0x22b165+'.value','message':_0x229d1b(0x278)}),!FLOW_TIME_UNITS[_0x229d1b(0x1fa)](_0x3c5083[_0x229d1b(0x1bd)])&&_0x54d0d4[_0x229d1b(0x1ed)]({'path':_0x22b165+_0x229d1b(0x208),'message':_0x229d1b(0x233)});}function validateOptionalResultVariable(_0x560631,_0xcd1311,_0x18c66b){const _0x37a99b=a287_0x4050df;if(_0x560631===undefined||_0x560631===null||_0x560631==='')return;if(typeof _0x560631!=='string'||!VARIABLE_PATTERN[_0x37a99b(0x1aa)](_0x560631))_0x18c66b[_0x37a99b(0x1ed)]({'path':_0xcd1311,'message':_0x37a99b(0x29f)});else(RESERVED_RESULT_VARIABLES[_0x37a99b(0x1fa)](_0x560631)||_0x560631['startsWith'](_0x37a99b(0x220)))&&_0x18c66b['push']({'path':_0xcd1311,'message':_0x37a99b(0x15f)+_0x560631+'.'});}function validateCcConfig(_0x1e001f,_0x11d8be,_0x308dd0){const _0x1c44c3=a287_0x4050df;if(_0x1e001f['cc']===undefined)return;if(!isRecord(_0x1e001f['cc'])){_0x308dd0[_0x1c44c3(0x1ed)]({'path':_0x11d8be+_0x1c44c3(0x299),'message':_0x1c44c3(0x2be)});return;}_0x1e001f[_0x1c44c3(0x1df)]!==_0x1c44c3(0x292)&&_0x1e001f[_0x1c44c3(0x1df)]!==_0x1c44c3(0x291)&&_0x308dd0[_0x1c44c3(0x1ed)]({'path':_0x11d8be+_0x1c44c3(0x299),'message':_0x1c44c3(0x1ef)});Object[_0x1c44c3(0x281)]['hasOwnProperty']['call'](_0x1e001f['cc'],'readSources')&&_0x308dd0['push']({'path':_0x11d8be+_0x1c44c3(0x1e7),'message':UNSUPPORTED_FORM_MESSAGE});const _0x2d9631=_0x1e001f['cc'][_0x1c44c3(0x1e6)];if(!Array['isArray'](_0x2d9631)||_0x2d9631['length']===0x0)_0x308dd0[_0x1c44c3(0x1ed)]({'path':_0x11d8be+_0x1c44c3(0x188),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x2d9631[_0x1c44c3(0x28e)]>MAX_CC_RECIPIENTS&&_0x308dd0['push']({'path':_0x11d8be+_0x1c44c3(0x188),'message':_0x1c44c3(0x2ab)+MAX_CC_RECIPIENTS+_0x1c44c3(0x189)});const _0xbabcea=new Set();_0x2d9631[_0x1c44c3(0x1e3)]((_0x9f8311,_0x135d93)=>{const _0x4abd7b=_0x1c44c3;if(typeof _0x9f8311!==_0x4abd7b(0x29a)||_0x9f8311['trim']()==='')_0x308dd0[_0x4abd7b(0x1ed)]({'path':_0x11d8be+_0x4abd7b(0x1c7)+_0x135d93+']','message':_0x4abd7b(0x21b)});else _0xbabcea[_0x4abd7b(0x1fa)](_0x9f8311['trim']())?_0x308dd0[_0x4abd7b(0x1ed)]({'path':_0x11d8be+'.cc.recipientUserIds['+_0x135d93+']','message':_0x4abd7b(0x157)+_0x9f8311[_0x4abd7b(0x2bf)]()+'.'}):_0xbabcea['add'](_0x9f8311[_0x4abd7b(0x2bf)]());});}validateStringArray(_0x1e001f['cc'][_0x1c44c3(0x1c1)],_0x11d8be+_0x1c44c3(0x175),_0x308dd0);}function validateStringArray(_0x7af822,_0x16fc1d,_0x5db98e){const _0x11165d=a287_0x4050df;if(_0x7af822===undefined)return;if(!Array[_0x11165d(0x186)](_0x7af822)){_0x5db98e[_0x11165d(0x1ed)]({'path':_0x16fc1d,'message':_0x11165d(0x210)});return;}const _0x483027=new Set();_0x7af822[_0x11165d(0x1e3)]((_0x364fcc,_0x405a18)=>{const _0x4281ec=_0x11165d;if(typeof _0x364fcc!==_0x4281ec(0x29a)||_0x364fcc['trim']()==='')_0x5db98e[_0x4281ec(0x1ed)]({'path':_0x16fc1d+'['+_0x405a18+']','message':_0x4281ec(0x19b)});else _0x483027[_0x4281ec(0x1fa)](_0x364fcc[_0x4281ec(0x2bf)]())?_0x5db98e[_0x4281ec(0x1ed)]({'path':_0x16fc1d+'['+_0x405a18+']','message':_0x4281ec(0x18e)+_0x364fcc['trim']()+'.'}):_0x483027[_0x4281ec(0x259)](_0x364fcc[_0x4281ec(0x2bf)]());});}function validateNotificationConfig(_0x27ceeb,_0x1db262,_0x496180){const _0x471568=a287_0x4050df;if(!isRecord(_0x27ceeb)){_0x496180[_0x471568(0x1ed)]({'path':_0x1db262,'message':_0x471568(0x1f1)});return;}if(_0x27ceeb[_0x471568(0x196)]!==undefined&&_0x27ceeb['version']!==null){if(typeof _0x27ceeb[_0x471568(0x196)]!==_0x471568(0x29a))_0x496180[_0x471568(0x1ed)]({'path':_0x1db262+_0x471568(0x17f),'message':_0x471568(0x185)});else _0x27ceeb[_0x471568(0x196)][_0x471568(0x2bf)]()&&_0x27ceeb['version'][_0x471568(0x2bf)]()!=='v1'&&_0x496180[_0x471568(0x1ed)]({'path':_0x1db262+'.version','message':'Unsupported\x20notification\x20version:\x20'+_0x27ceeb[_0x471568(0x196)]+'.'});}const _0x4cf92b=requireNotificationString(_0x27ceeb[_0x471568(0x2a0)],_0x1db262+_0x471568(0x26a),_0x471568(0x213),_0x496180);_0x4cf92b?.[_0x471568(0x21c)]('${')&&_0x496180[_0x471568(0x1ed)]({'path':_0x1db262+_0x471568(0x26a),'message':_0x471568(0x227)});if(_0x27ceeb[_0x471568(0x1f5)]!==undefined&&_0x27ceeb['failurePolicy']!==null){if(typeof _0x27ceeb['failurePolicy']!=='string')_0x496180['push']({'path':_0x1db262+'.failurePolicy','message':_0x471568(0x26f)});else!NOTIFICATION_FAILURE_POLICIES[_0x471568(0x1fa)](_0x27ceeb[_0x471568(0x1f5)][_0x471568(0x2bf)]()[_0x471568(0x2a2)]())&&_0x496180[_0x471568(0x1ed)]({'path':_0x1db262+'.failurePolicy','message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x27ceeb['template'])?_0x496180[_0x471568(0x1ed)]({'path':_0x1db262+_0x471568(0x231),'message':_0x471568(0x293)}):validateNotificationTemplate(_0x27ceeb[_0x471568(0x165)],_0x1db262+'.template',_0x496180),validateNotificationRecipients(_0x27ceeb[_0x471568(0x283)],_0x1db262+_0x471568(0x214),_0x496180);}function validateNotificationTemplate(_0xb706f9,_0x3a3452,_0x765113){const _0x4e1bad=a287_0x4050df;for(const _0x1fe815 of[_0x4e1bad(0x1c9),_0x4e1bad(0x216)]){const _0x53d795=requireNotificationString(_0xb706f9[_0x1fe815],_0x3a3452+'.'+_0x1fe815,_0x4e1bad(0x17d)+_0x1fe815+_0x4e1bad(0x28b),_0x765113);if(_0x53d795)validateNotificationPlaceholders(_0x53d795,_0x3a3452+'.'+_0x1fe815,_0x765113);}_0xb706f9[_0x4e1bad(0x285)]!==undefined&&_0xb706f9['detailMarkdown']!==null&&(typeof _0xb706f9[_0x4e1bad(0x285)]!=='string'?_0x765113[_0x4e1bad(0x1ed)]({'path':_0x3a3452+'.detailMarkdown','message':_0x4e1bad(0x162)}):validateNotificationPlaceholders(_0xb706f9['detailMarkdown'],_0x3a3452+_0x4e1bad(0x261),_0x765113)),validateNotificationFacts(_0xb706f9[_0x4e1bad(0x2b0)],_0x3a3452+_0x4e1bad(0x1a3),_0x765113),validateNotificationActions(_0xb706f9[_0x4e1bad(0x1eb)],_0x3a3452+_0x4e1bad(0x21f),_0x765113);}function validateNotificationFacts(_0x117196,_0x1473fd,_0xa14372){const _0x127a92=a287_0x4050df;if(_0x117196===undefined||_0x117196===null)return;if(!Array[_0x127a92(0x186)](_0x117196)){_0xa14372[_0x127a92(0x1ed)]({'path':_0x1473fd,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x117196[_0x127a92(0x28e)]>MAX_NOTIFICATION_FACTS&&_0xa14372['push']({'path':_0x1473fd,'message':_0x127a92(0x212)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x117196[_0x127a92(0x1e3)]((_0x5da81,_0x142f95)=>{const _0x16bdf2=_0x127a92,_0x1f1402=_0x1473fd+'['+_0x142f95+']';if(!isRecord(_0x5da81)){_0xa14372[_0x16bdf2(0x1ed)]({'path':_0x1f1402,'message':_0x16bdf2(0x1a0)});return;}for(const _0x243124 of[_0x16bdf2(0x255),_0x16bdf2(0x1b0)]){const _0x5061db=requireNotificationString(_0x5da81[_0x243124],_0x1f1402+'.'+_0x243124,'Notification\x20fact.'+_0x243124+_0x16bdf2(0x28b),_0xa14372);_0x5061db&&validateNotificationPlaceholders(_0x5061db,_0x1f1402+'.'+_0x243124,_0xa14372);}});}function validateNotificationActions(_0x17b4e2,_0x58bbb6,_0x62ba45){const _0x3315e2=a287_0x4050df;if(_0x17b4e2===undefined||_0x17b4e2===null)return;if(!Array[_0x3315e2(0x186)](_0x17b4e2)){_0x62ba45['push']({'path':_0x58bbb6,'message':_0x3315e2(0x2b1)});return;}_0x17b4e2['length']>MAX_NOTIFICATION_ACTIONS&&_0x62ba45['push']({'path':_0x58bbb6,'message':_0x3315e2(0x212)+MAX_NOTIFICATION_ACTIONS+_0x3315e2(0x26e)}),_0x17b4e2[_0x3315e2(0x1e3)]((_0x57c4d9,_0x14f4b6)=>{const _0x450bc2=_0x3315e2,_0xaab032=_0x58bbb6+'['+_0x14f4b6+']';if(!isRecord(_0x57c4d9)){_0x62ba45[_0x450bc2(0x1ed)]({'path':_0xaab032,'message':'Notification\x20action\x20must\x20be\x20an\x20object.'});return;}const _0x2ed115=requireNotificationString(_0x57c4d9[_0x450bc2(0x288)],_0xaab032+_0x450bc2(0x286),_0x450bc2(0x253),_0x62ba45);if(_0x2ed115)validateNotificationPlaceholders(_0x2ed115,_0xaab032+_0x450bc2(0x286),_0x62ba45);const _0x138951=requireNotificationString(_0x57c4d9[_0x450bc2(0x16b)],_0xaab032+_0x450bc2(0x19e),'Notification\x20action.url\x20is\x20required.',_0x62ba45);if(!_0x138951)return;validateNotificationPlaceholders(_0x138951,_0xaab032+_0x450bc2(0x19e),_0x62ba45),!/^https?:\/\//i['test'](_0x138951)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x450bc2(0x1aa)](_0x138951)&&_0x62ba45['push']({'path':_0xaab032+_0x450bc2(0x19e),'message':_0x450bc2(0x155)});});}function validateNotificationRecipients(_0x5a2b26,_0x4f7f4c,_0x3561de){const _0xb24967=a287_0x4050df;if(_0x5a2b26===undefined||_0x5a2b26===null)return;if(!Array['isArray'](_0x5a2b26)){_0x3561de[_0xb24967(0x1ed)]({'path':_0x4f7f4c,'message':_0xb24967(0x29d)});return;}let _0x5025c4=![];_0x5a2b26['forEach']((_0x52ff25,_0x1d15b2)=>{const _0x3585d3=_0xb24967,_0x548ac6=_0x4f7f4c+'['+_0x1d15b2+']';if(!isRecord(_0x52ff25)){_0x3561de[_0x3585d3(0x1ed)]({'path':_0x548ac6,'message':_0x3585d3(0x151)});return;}const _0x53d34a=requireNotificationString(_0x52ff25['type'],_0x548ac6+_0x3585d3(0x166),_0x3585d3(0x1c5),_0x3561de);_0x53d34a&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x53d34a[_0x3585d3(0x2a2)]())&&_0x3561de[_0x3585d3(0x1ed)]({'path':_0x548ac6+_0x3585d3(0x166),'message':_0x3585d3(0x192)});let _0x1992be='TO';_0x52ff25['role']!==undefined&&_0x52ff25['role']!==null&&(typeof _0x52ff25[_0x3585d3(0x1a1)]!==_0x3585d3(0x29a)?(_0x3561de[_0x3585d3(0x1ed)]({'path':_0x548ac6+_0x3585d3(0x173),'message':_0x3585d3(0x2af)}),_0x1992be=''):(_0x1992be=_0x52ff25['role'][_0x3585d3(0x2bf)]()[_0x3585d3(0x2a2)](),!NOTIFICATION_RECIPIENT_ROLES[_0x3585d3(0x1fa)](_0x1992be)&&_0x3561de[_0x3585d3(0x1ed)]({'path':_0x548ac6+_0x3585d3(0x173),'message':_0x3585d3(0x1e9)})));if(_0x1992be==='TO')_0x5025c4=!![];const _0x559322=requireNotificationString(_0x52ff25['value'],_0x548ac6+_0x3585d3(0x1f2),_0x3585d3(0x23a),_0x3561de);_0x559322&&validateNotificationPlaceholders(_0x559322,_0x548ac6+_0x3585d3(0x1f2),_0x3561de);}),_0x5a2b26[_0xb24967(0x28e)]>0x0&&!_0x5025c4&&_0x3561de['push']({'path':_0x4f7f4c,'message':'Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.'});}function requireNotificationString(_0x18513b,_0x25c1fe,_0x233a8d,_0x5d04b7){const _0x34acda=a287_0x4050df;if(typeof _0x18513b!==_0x34acda(0x29a)||_0x18513b[_0x34acda(0x2bf)]()==='')return _0x5d04b7['push']({'path':_0x25c1fe,'message':_0x233a8d}),undefined;return _0x18513b['trim']();}function validateNotificationPlaceholders(_0x266e97,_0x233c94,_0x1433f8){const _0x2afd06=a287_0x4050df;for(const _0x7185cd of _0x266e97[_0x2afd06(0x25b)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0xcbd433=_0x7185cd[0x1]?.[_0x2afd06(0x2bf)]()??'',_0x1f2bc4=_0xcbd433[_0x2afd06(0x257)]('.'),_0x582c46=_0x1f2bc4>=0x0?_0xcbd433[_0x2afd06(0x246)](0x0,_0x1f2bc4):_0xcbd433,_0x2b2559=_0x1f2bc4>=0x0?_0xcbd433[_0x2afd06(0x246)](_0x1f2bc4+0x1)[_0x2afd06(0x2bf)]():'';(![_0x2afd06(0x2a5),'context',_0x2afd06(0x1e5)][_0x2afd06(0x21c)](_0x582c46)||_0x2b2559==='')&&_0x1433f8[_0x2afd06(0x1ed)]({'path':_0x233c94,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x7185cd[0x0]+'.'});}_0x266e97[_0x2afd06(0x2a7)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x2afd06(0x21c)]('${')&&_0x1433f8['push']({'path':_0x233c94,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x476416,_0x543774,_0x1a8787){const _0x244c89=a287_0x4050df;_0x476416['name']!==undefined&&typeof _0x476416[_0x244c89(0x1ad)]!=='string'&&_0x1a8787['push']({'path':_0x543774+_0x244c89(0x265),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x476416[_0x244c89(0x1f8)]!==undefined&&typeof _0x476416['defaultFlow']!==_0x244c89(0x22a)&&_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+_0x244c89(0x15b),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x476416[_0x244c89(0x2b8)]!==undefined&&(!Array[_0x244c89(0x186)](_0x476416[_0x244c89(0x2b8)])?_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+_0x244c89(0x2b7),'message':_0x244c89(0x18c)}):_0x476416[_0x244c89(0x2b8)]['forEach']((_0x38ef33,_0x5f475e)=>{const _0x44682d=_0x244c89;if(!isRecord(_0x38ef33)){_0x1a8787[_0x44682d(0x1ed)]({'path':_0x543774+_0x44682d(0x240)+_0x5f475e+']','message':_0x44682d(0x19a)});return;}for(const _0xcdbae of['x','y']){const _0x1cc917=_0x38ef33[_0xcdbae];(typeof _0x1cc917!==_0x44682d(0x1b5)||!Number['isFinite'](_0x1cc917))&&_0x1a8787['push']({'path':_0x543774+_0x44682d(0x240)+_0x5f475e+'].'+_0xcdbae,'message':_0x44682d(0x2b6)+_0xcdbae+_0x44682d(0x1dd)});}})),_0x476416['conditionType']!==undefined&&!CONDITION_TYPES[_0x244c89(0x1fa)](_0x476416[_0x244c89(0x207)])&&_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+'.conditionType','message':_0x244c89(0x18d)+String(_0x476416[_0x244c89(0x207)])+'.'}),_0x476416[_0x244c89(0x207)]===_0x244c89(0x284)&&(typeof _0x476416['expression']!==_0x244c89(0x29a)||_0x476416['expression'][_0x244c89(0x2bf)]()==='')&&_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+'.expression','message':_0x244c89(0x276)}),_0x476416[_0x244c89(0x1f8)]===!![]&&_0x476416[_0x244c89(0x207)]!=='ALWAYS'&&_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+_0x244c89(0x15b),'message':_0x244c89(0x2b2)}),_0x476416['defaultFlow']===!![]&&typeof _0x476416[_0x244c89(0x1be)]==='string'&&_0x476416[_0x244c89(0x1be)][_0x244c89(0x2bf)]()!==''&&_0x1a8787[_0x244c89(0x1ed)]({'path':_0x543774+_0x244c89(0x290),'message':_0x244c89(0x194)});}function validateGraphShape(_0x4815c7,_0x169d8f,_0x1fc7ba,_0x29a3f6,_0x12eb4d,_0x1dc437,_0x544ed7){const _0x490976=a287_0x4050df;for(const [_0x27ded6,_0x5d3aa8]of _0x4815c7){const _0x1c6652=_0x12eb4d['get'](_0x27ded6)??[],_0x5ab833=_0x29a3f6[_0x490976(0x23e)](_0x27ded6)??[];_0x5d3aa8['type']!=='START'&&_0x1c6652['length']===0x0&&_0x544ed7[_0x490976(0x1ed)]({'path':'flowJson.nodes.'+_0x27ded6,'message':_0x490976(0x280)});_0x5d3aa8[_0x490976(0x1df)]!==_0x490976(0x292)&&_0x5ab833[_0x490976(0x28e)]===0x0&&_0x544ed7[_0x490976(0x1ed)]({'path':'flowJson.nodes.'+_0x27ded6,'message':_0x490976(0x172)});_0x5d3aa8[_0x490976(0x1df)]===_0x490976(0x22e)&&_0x1c6652[_0x490976(0x28e)]>0x0&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':_0x490976(0x222)});_0x5d3aa8[_0x490976(0x1df)]==='END'&&_0x5ab833[_0x490976(0x28e)]>0x0&&_0x544ed7[_0x490976(0x1ed)]({'path':'flowJson.nodes.'+_0x27ded6,'message':_0x490976(0x1f6)});if(_0x5d3aa8[_0x490976(0x1df)]===_0x490976(0x1bc)){_0x5ab833[_0x490976(0x28e)]<0x2&&_0x544ed7['push']({'path':'flowJson.nodes.'+_0x27ded6,'message':_0x490976(0x16c)});const _0x463ab5=_0x5ab833[_0x490976(0x20b)](_0x2f790f=>_0x2f790f[_0x490976(0x1f8)]===!![]);_0x463ab5[_0x490976(0x28e)]!==0x1&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':_0x490976(0x1d0)});if(_0x463ab5['length']===0x1){const _0x173d33=_0x463ab5[0x0],_0x177b1a=_0x1dc437[_0x490976(0x23e)](_0x173d33)??_0x490976(0x28c);_0x173d33[_0x490976(0x207)]!=='ALWAYS'&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x177b1a+_0x490976(0x23c),'message':_0x490976(0x25f)});_0x173d33[_0x490976(0x1be)]!==undefined&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x177b1a+'.expression','message':_0x490976(0x169)});for(const _0x244119 of _0x5ab833){if(_0x244119===_0x173d33)continue;const _0x4277ca=_0x1dc437[_0x490976(0x23e)](_0x244119)??'flowJson.edges';if(_0x244119[_0x490976(0x207)]!=='EXPRESSION')_0x544ed7[_0x490976(0x1ed)]({'path':_0x4277ca+_0x490976(0x23c),'message':_0x490976(0x24e)});else(typeof _0x244119[_0x490976(0x1be)]!==_0x490976(0x29a)||_0x244119['expression'][_0x490976(0x2bf)]()==='')&&_0x544ed7['push']({'path':_0x4277ca+_0x490976(0x290),'message':_0x490976(0x1fe)});}}}if(_0x5d3aa8['type']==='APPROVAL'&&(_0x5d3aa8['taskMode']??_0x490976(0x291))===_0x490976(0x184)){if(_0x5ab833[_0x490976(0x28e)]!==0x1)_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':_0x490976(0x17b)});else{const _0x4f58ec=_0x5ab833[0x0];((_0x4f58ec[_0x490976(0x207)]??_0x490976(0x20c))!==_0x490976(0x20c)||_0x4f58ec['defaultFlow']===!![]||typeof _0x4f58ec[_0x490976(0x1be)]==='string'&&_0x4f58ec['expression']['trim']()!=='')&&_0x544ed7['push']({'path':_0x1dc437['get'](_0x4f58ec)??_0x490976(0x28c),'message':_0x490976(0x25c)});}}else{if(_0x5d3aa8['type']===_0x490976(0x291)){const _0x2162d1=_0x5ab833['map'](_0x3845e2=>_0x3845e2['conditionType']??'ALWAYS'),_0x3664fa=_0x2162d1['filter'](_0x1e587f=>_0x1e587f!==_0x490976(0x241)&&_0x1e587f!==_0x490976(0x295));_0x3664fa[_0x490976(0x28e)]>0x0&&_0x544ed7['push']({'path':_0x490976(0x221)+_0x27ded6,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x2162d1[_0x490976(0x20b)](_0x1de8b5=>_0x1de8b5===_0x490976(0x241))[_0x490976(0x28e)]!==0x1&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x2162d1[_0x490976(0x20b)](_0x52d174=>_0x52d174==='REJECTED')[_0x490976(0x28e)]!==0x1&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':_0x490976(0x251)}),_0x5ab833[_0x490976(0x174)](_0x12ab41=>_0x12ab41[_0x490976(0x1f8)]===!![])&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x27ded6,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x2f75c3=new Set(),_0x1b929d=_0xc02850=>{const _0x5766b9=_0x490976;if(_0x2f75c3[_0x5766b9(0x1fa)](_0xc02850))return;_0x2f75c3[_0x5766b9(0x259)](_0xc02850);for(const _0x2ca981 of _0x29a3f6['get'](_0xc02850)??[]){const _0x2555dc=resolveEdgeEndpoint(_0x2ca981[_0x5766b9(0x1b9)],_0x2ca981['targetNodeId']);if(_0x2555dc&&_0x4815c7[_0x5766b9(0x1fa)](_0x2555dc))_0x1b929d(_0x2555dc);}};_0x1b929d(_0x169d8f);for(const _0x1f6c1c of _0x4815c7[_0x490976(0x19f)]()){!_0x2f75c3[_0x490976(0x1fa)](_0x1f6c1c)&&_0x544ed7[_0x490976(0x1ed)]({'path':'flowJson.nodes.'+_0x1f6c1c,'message':_0x490976(0x27e)});}const _0x1eb6f1=_0x1fc7ba[_0x490976(0x174)](_0x4d4512=>_0x2f75c3[_0x490976(0x1fa)](_0x4d4512));if(!_0x1eb6f1){_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x28c),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0xd5cafc=new Set(),_0x39c30e=_0x387d7b=>{const _0x3df02a=_0x490976;if(_0xd5cafc['has'](_0x387d7b))return;_0xd5cafc[_0x3df02a(0x259)](_0x387d7b);for(const _0x24e3fc of _0x12eb4d[_0x3df02a(0x23e)](_0x387d7b)??[]){const _0x22ac29=resolveEdgeEndpoint(_0x24e3fc[_0x3df02a(0x20d)],_0x24e3fc[_0x3df02a(0x297)]);if(_0x22ac29&&_0x4815c7['has'](_0x22ac29))_0x39c30e(_0x22ac29);}};for(const _0x36e7fc of _0x1fc7ba){if(_0x4815c7[_0x490976(0x1fa)](_0x36e7fc))_0x39c30e(_0x36e7fc);}for(const _0x287548 of _0x2f75c3){!_0xd5cafc[_0x490976(0x1fa)](_0x287548)&&_0x544ed7[_0x490976(0x1ed)]({'path':_0x490976(0x221)+_0x287548,'message':_0x490976(0x234)});}}function a287_0x4188(_0x6630f0,_0x2ccb55){_0x6630f0=_0x6630f0-0x151;const _0x12ee06=a287_0x12ee();let _0x418809=_0x12ee06[_0x6630f0];return _0x418809;}function validateApprovalResults(_0x3f3d6a,_0x427700,_0x15e474,_0x34d2b3){const _0x417a8e=a287_0x4050df;if(_0x427700===0x0)return;const _0x34ad05=new Set(_0x15e474[_0x417a8e(0x279)](_0x337497=>_0x3f3d6a[_0x417a8e(0x23e)](_0x337497)?.[_0x417a8e(0x202)])[_0x417a8e(0x20b)](_0x2fb3c0=>typeof _0x2fb3c0===_0x417a8e(0x29a)));for(const _0x4e9f06 of['APPROVED',_0x417a8e(0x295)]){!_0x34ad05[_0x417a8e(0x1fa)](_0x4e9f06)&&_0x34d2b3[_0x417a8e(0x1ed)]({'path':_0x417a8e(0x2a9),'message':_0x417a8e(0x1e1)+_0x4e9f06+'.'});}}function validateScriptResultReferences(_0x150673,_0x447548,_0xcba363,_0x1dacd6,_0x44ba20,_0xd2809a,_0xaca381){const _0x4c79bd=a287_0x4050df;if(_0xd2809a['size']===0x0)return;const _0x11aa96=new Set(),_0x5249f9=_0x4be36a=>{const _0x4bdeaa=a287_0x4188;if(!_0x11aa96[_0x4bdeaa(0x1fa)](_0x4be36a)&&_0x150673[_0x4bdeaa(0x1fa)](_0x4be36a)){_0x11aa96['add'](_0x4be36a);for(const _0x1b9f3f of _0xcba363[_0x4bdeaa(0x23e)](_0x4be36a)??[]){const _0x1f9908=resolveEdgeEndpoint(_0x1b9f3f['target'],_0x1b9f3f[_0x4bdeaa(0x156)]);if(_0x1f9908)_0x5249f9(_0x1f9908);}}};_0x5249f9(_0x447548);const _0x1fca99=new Map();for(const _0x18d3d1 of _0x11aa96){_0x1fca99['set'](_0x18d3d1,_0x18d3d1===_0x447548?new Set([_0x447548]):new Set(_0x11aa96));}let _0x4e07ef=!![];while(_0x4e07ef){_0x4e07ef=![];for(const _0x388701 of _0x11aa96){if(_0x388701===_0x447548)continue;const _0x2f3ea5=(_0x1dacd6['get'](_0x388701)??[])[_0x4c79bd(0x279)](_0x26290f=>resolveEdgeEndpoint(_0x26290f[_0x4c79bd(0x20d)],_0x26290f[_0x4c79bd(0x297)]))[_0x4c79bd(0x20b)](_0x3540a3=>Boolean(_0x3540a3&&_0x11aa96['has'](_0x3540a3)));if(_0x2f3ea5[_0x4c79bd(0x28e)]===0x0)continue;const _0xa63a71=new Set(_0x1fca99[_0x4c79bd(0x23e)](_0x2f3ea5[0x0])??[]);for(const _0x10efd4 of _0x2f3ea5[_0x4c79bd(0x246)](0x1)){const _0x150d65=_0x1fca99['get'](_0x10efd4)??new Set();for(const _0x475041 of _0xa63a71){if(!_0x150d65['has'](_0x475041))_0xa63a71[_0x4c79bd(0x206)](_0x475041);}}_0xa63a71[_0x4c79bd(0x259)](_0x388701);const _0x58239e=_0x1fca99['get'](_0x388701);!setsEqual(_0x58239e,_0xa63a71)&&(_0x1fca99['set'](_0x388701,_0xa63a71),_0x4e07ef=!![]);}}for(const [_0x55da67,_0x5f3703]of _0xcba363){const _0x29456a=_0x1fca99[_0x4c79bd(0x23e)](_0x55da67);if(!_0x29456a)continue;for(const _0x265818 of _0x5f3703){if(_0x265818[_0x4c79bd(0x207)]!==_0x4c79bd(0x284)||typeof _0x265818[_0x4c79bd(0x1be)]!==_0x4c79bd(0x29a))continue;for(const [_0x21b277,_0x36ef61]of _0xd2809a){expressionReferencesVariable(_0x265818[_0x4c79bd(0x1be)],_0x21b277)&&!_0x29456a[_0x4c79bd(0x1fa)](_0x36ef61)&&_0xaca381['push']({'path':(_0x44ba20[_0x4c79bd(0x23e)](_0x265818)??'flowJson.edges')+_0x4c79bd(0x290),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x21b277+_0x4c79bd(0x163)+_0x36ef61+_0x4c79bd(0x25d)+_0x55da67+'.'});}}}}function expressionReferencesVariable(_0x2ea3cb,_0x157426){const _0x12bf90=a287_0x4050df;let _0x59cee7=0x0;while(_0x59cee7<_0x2ea3cb[_0x12bf90(0x28e)]){const _0xa8b0af=_0x2ea3cb[_0x59cee7];if(_0xa8b0af==='\x27'||_0xa8b0af==='\x22'){_0x59cee7=skipQuotedExpressionSegment(_0x2ea3cb,_0x59cee7,_0xa8b0af);continue;}if(!/[A-Za-z_]/[_0x12bf90(0x1aa)](_0xa8b0af)){_0x59cee7+=0x1;continue;}const _0x1f59b3=_0x59cee7;_0x59cee7+=0x1;while(_0x59cee7<_0x2ea3cb[_0x12bf90(0x28e)]&&/[A-Za-z0-9_]/['test'](_0x2ea3cb[_0x59cee7])){_0x59cee7+=0x1;}if(_0x2ea3cb[_0x12bf90(0x246)](_0x1f59b3,_0x59cee7)!==_0x157426)continue;let _0x482337=_0x1f59b3-0x1;while(_0x482337>=0x0&&/\s/[_0x12bf90(0x1aa)](_0x2ea3cb[_0x482337])){_0x482337-=0x1;}if(_0x2ea3cb[_0x482337]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x253765,_0x2a38ca,_0x28b489){const _0x3c7704=a287_0x4050df;let _0x43bc59=_0x2a38ca+0x1;while(_0x43bc59<_0x253765[_0x3c7704(0x28e)]){if(_0x253765[_0x43bc59]==='\x5c'){_0x43bc59+=0x2;continue;}if(_0x253765[_0x43bc59]===_0x28b489)return _0x43bc59+0x1;_0x43bc59+=0x1;}return _0x43bc59;}function resolveEffectiveResultVariable(_0x1d9139,_0x37d40e){const _0x180f96=a287_0x4050df;if(_0x1d9139===undefined||_0x1d9139===null||_0x37d40e&&_0x1d9139==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1d9139!=='string'||!VARIABLE_PATTERN['test'](_0x1d9139)||RESERVED_RESULT_VARIABLES['has'](_0x1d9139)||_0x1d9139[_0x180f96(0x24a)](_0x180f96(0x220)))return undefined;return _0x1d9139;}function registerResultVariableOwner(_0x215393,_0x23f4f7,_0x38829d,_0x10796d){const _0x4d5856=a287_0x4050df;if(_0x215393[_0x4d5856(0x1fa)](_0x23f4f7)){_0x10796d[_0x4d5856(0x1ed)]({'path':'flowJson.nodes','message':_0x4d5856(0x1d9)+_0x23f4f7+'.'});return;}_0x215393[_0x4d5856(0x16d)](_0x23f4f7,_0x38829d);}function setsEqual(_0x45611c,_0x16b6cd){const _0x90230f=a287_0x4050df;return _0x45611c[_0x90230f(0x1d5)]===_0x16b6cd['size']&&[..._0x45611c][_0x90230f(0x1f3)](_0x19f233=>_0x16b6cd[_0x90230f(0x1fa)](_0x19f233));}function isValidUserId(_0x5872eb){const _0x3268c1=a287_0x4050df;if(typeof _0x5872eb===_0x3268c1(0x29a))return _0x5872eb[_0x3268c1(0x2bf)]()[_0x3268c1(0x28e)]>0x0;return Number[_0x3268c1(0x1ca)](_0x5872eb)&&Number(_0x5872eb)>0x0;}function resolveEdgeEndpoint(_0x4c3c15,_0x5a1bf7){const _0x48a015=a287_0x4050df;if(typeof _0x4c3c15===_0x48a015(0x29a)&&_0x4c3c15[_0x48a015(0x2bf)]())return _0x4c3c15[_0x48a015(0x2bf)]();if(typeof _0x5a1bf7===_0x48a015(0x29a)&&_0x5a1bf7['trim']())return _0x5a1bf7[_0x48a015(0x2bf)]();return undefined;}function removeEmptyMetadata(_0x53a3dc,_0x4cd14c,_0x13f8db,_0x539c13){const _0x5e067e=a287_0x4050df;if(Array[_0x5e067e(0x186)](_0x53a3dc)){_0x53a3dc['forEach']((_0x36e8ad,_0x53a866)=>removeEmptyMetadata(_0x36e8ad,_0x4cd14c+'['+_0x53a866+']',_0x13f8db,_0x539c13));return;}if(!isRecord(_0x53a3dc))return;for(const [_0x22f9a2,_0x25b5da]of Object[_0x5e067e(0x29e)](_0x53a3dc)){const _0x1d9d10=_0x4cd14c+'.'+_0x22f9a2;if(_0x22f9a2==='metadata'&&isEmptyJsonValue(_0x25b5da)){delete _0x53a3dc[_0x22f9a2],_0x539c13[_0x5e067e(0x1ed)](_0x1d9d10),_0x13f8db[_0x5e067e(0x1ed)]({'code':_0x5e067e(0x1db),'path':_0x1d9d10,'message':_0x1d9d10+'\x20was\x20empty\x20and\x20was\x20removed.'});continue;}removeEmptyMetadata(_0x25b5da,_0x1d9d10,_0x13f8db,_0x539c13);}}function isEmptyJsonValue(_0x5eee06){const _0x18cbbc=a287_0x4050df;if(_0x5eee06===null||_0x5eee06===undefined)return!![];if(typeof _0x5eee06===_0x18cbbc(0x29a))return _0x5eee06[_0x18cbbc(0x2bf)]()==='';if(Array[_0x18cbbc(0x186)](_0x5eee06))return _0x5eee06[_0x18cbbc(0x28e)]===0x0;return isRecord(_0x5eee06)&&Object[_0x18cbbc(0x19f)](_0x5eee06)[_0x18cbbc(0x28e)]===0x0;}function isRecord(_0xabc3bf){return typeof _0xabc3bf==='object'&&_0xabc3bf!==null&&!Array['isArray'](_0xabc3bf);}function cloneJsonValue(_0x469336){const _0x40c970=a287_0x4050df;return JSON[_0x40c970(0x230)](JSON[_0x40c970(0x154)](_0x469336));}export async function readFlowConfigFile(_0x4a7360){const _0x4373e5=a287_0x4050df,_0x2755b0=await readFile(resolve(_0x4a7360),_0x4373e5(0x19c));return JSON[_0x4373e5(0x230)](_0x2755b0);}
|