@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.3
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.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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/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.d.ts +7 -0
- 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.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- 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/service.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/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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/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.d.ts +2 -0
- 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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- 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.d.ts +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.d.ts +0 -10
- 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/types/index.d.ts +11 -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.d.ts +12 -0
- 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 +4 -1
- package/skills/rabetbase/SKILL.md +10 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a269_0x1c57b2=a269_0x40e0;(function(_0x35e9c6,_0xfe5dc3){const _0x47dd27=a269_0x40e0,_0x3d2c22=_0x35e9c6();while(!![]){try{const _0x573c1b=-parseInt(_0x47dd27(0x222))/0x1*(parseInt(_0x47dd27(0x2cd))/0x2)+parseInt(_0x47dd27(0x182))/0x3+-parseInt(_0x47dd27(0x2ca))/0x4*(-parseInt(_0x47dd27(0x208))/0x5)+parseInt(_0x47dd27(0x237))/0x6*(-parseInt(_0x47dd27(0x2e5))/0x7)+parseInt(_0x47dd27(0x1dd))/0x8+parseInt(_0x47dd27(0x1f3))/0x9*(parseInt(_0x47dd27(0x1e6))/0xa)+-parseInt(_0x47dd27(0x2bf))/0xb*(parseInt(_0x47dd27(0x1c9))/0xc);if(_0x573c1b===_0xfe5dc3)break;else _0x3d2c22['push'](_0x3d2c22['shift']());}catch(_0x4a8232){_0x3d2c22['push'](_0x3d2c22['shift']());}}}(a269_0x5923,0xd3d2f));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':'https://json-schema.org/draft/2020-12/schema','$id':a269_0x1c57b2(0x181),'title':a269_0x1c57b2(0x25b),'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x1a1),a269_0x1c57b2(0x261),a269_0x1c57b2(0x1e0)],'$defs':{'userId':{'anyOf':[{'type':a269_0x1c57b2(0x27d),'minLength':0x1},{'type':a269_0x1c57b2(0x28f),'minimum':0x1}]},'position':{'type':a269_0x1c57b2(0x23f),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a269_0x1c57b2(0x295),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x212),a269_0x1c57b2(0x1ad)],'properties':{'value':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'unit':{'enum':[a269_0x1c57b2(0x272),a269_0x1c57b2(0x203),'HOURS',a269_0x1c57b2(0x17a)]}},'additionalProperties':!![]},'flowNode':{'type':a269_0x1c57b2(0x23f),'required':['id',a269_0x1c57b2(0x174),a269_0x1c57b2(0x233),'position'],'properties':{'id':{'type':a269_0x1c57b2(0x27d),'pattern':a269_0x1c57b2(0x196)},'type':{'enum':[a269_0x1c57b2(0x19f),a269_0x1c57b2(0x290),'APPROVAL',a269_0x1c57b2(0x1e3),a269_0x1c57b2(0x1e2),a269_0x1c57b2(0x2da)]},'name':{'type':'string','minLength':0x1},'pageId':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'position':{'$ref':a269_0x1c57b2(0x287)},'approvalMode':{'enum':[a269_0x1c57b2(0x2d6),a269_0x1c57b2(0x23d),a269_0x1c57b2(0x298)]},'taskMode':{'enum':['APPROVAL',a269_0x1c57b2(0x263)]},'assignee':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x229)],'properties':{'strategy':{'enum':[a269_0x1c57b2(0x256),'ROLE']},'userIds':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1e8)}},'roleId':{'anyOf':[{'type':a269_0x1c57b2(0x28f),'minimum':0x1},{'type':a269_0x1c57b2(0x27d),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a269_0x1c57b2(0x229),'userIds'],'properties':{'strategy':{'const':a269_0x1c57b2(0x256)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1e8)}}},'additionalProperties':!![]},'sequential':{'type':a269_0x1c57b2(0x1af)},'result':{'enum':[a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180)]},'scriptName':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'resultVariable':{'type':a269_0x1c57b2(0x27d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a269_0x1c57b2(0x23f),'properties':{'enabled':{'type':a269_0x1c57b2(0x1af)},'retryCount':{'type':a269_0x1c57b2(0x28f),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a269_0x1c57b2(0x23f),'properties':{'enabled':{'type':a269_0x1c57b2(0x1af)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a269_0x1c57b2(0x20f),a269_0x1c57b2(0x1c5),a269_0x1c57b2(0x266)]},'interrupting':{'type':a269_0x1c57b2(0x1af)},'scriptName':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'resultVariable':{'type':a269_0x1c57b2(0x27d),'pattern':a269_0x1c57b2(0x196)}},'additionalProperties':!![]},'cc':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x251)],'properties':{'recipientUserIds':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'visible':{'type':a269_0x1c57b2(0x1e7),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a269_0x1c57b2(0x2c0),a269_0x1c57b2(0x1b8)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a269_0x1c57b2(0x17e),a269_0x1c57b2(0x1c1)]},'template':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x183),a269_0x1c57b2(0x241)],'properties':{'title':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'summary':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'detailMarkdown':{'type':a269_0x1c57b2(0x27d)},'facts':{'type':a269_0x1c57b2(0x1e7),'maxItems':0x8,'items':{'type':'object','required':[a269_0x1c57b2(0x284),a269_0x1c57b2(0x212)],'properties':{'label':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'value':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a269_0x1c57b2(0x1e7),'maxItems':0x2,'items':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x2b3),a269_0x1c57b2(0x1ac)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':'object','required':[a269_0x1c57b2(0x174),a269_0x1c57b2(0x212)],'properties':{'type':{'enum':['USER',a269_0x1c57b2(0x1b5),a269_0x1c57b2(0x2ad)]},'value':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a269_0x1c57b2(0x23f),'properties':{'id':{'type':a269_0x1c57b2(0x27d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'targetNodeId':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'conditionType':{'enum':[a269_0x1c57b2(0x1a8),a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180),a269_0x1c57b2(0x277)]},'expression':{'type':'string'},'defaultFlow':{'type':a269_0x1c57b2(0x1af)},'name':{'type':a269_0x1c57b2(0x27d)},'waypoints':{'type':'array','items':{'$ref':a269_0x1c57b2(0x287)}}},'allOf':[{'anyOf':[{'required':[a269_0x1c57b2(0x259)]},{'required':[a269_0x1c57b2(0x201)]}]},{'anyOf':[{'required':[a269_0x1c57b2(0x1ae)]},{'required':[a269_0x1c57b2(0x22e)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a269_0x1c57b2(0x194),a269_0x1c57b2(0x22a)]},'datasetCode':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'pageId':{'type':a269_0x1c57b2(0x28f)},'templateName':![],'flowJson':{'type':a269_0x1c57b2(0x23f),'required':['nodes',a269_0x1c57b2(0x23a)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a269_0x1c57b2(0x27d),'const':a269_0x1c57b2(0x22c),'description':a269_0x1c57b2(0x25e)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a269_0x1c57b2(0x218)},'startPageId':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x209)}},'edges':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1a6)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a269_0x1c57b2(0x2bd),a269_0x1c57b2(0x1df),a269_0x1c57b2(0x1a1),a269_0x1c57b2(0x24d),a269_0x1c57b2(0x2e3),a269_0x1c57b2(0x189),a269_0x1c57b2(0x207),a269_0x1c57b2(0x271)],REMOVED_ROOT_FIELDS=['id',a269_0x1c57b2(0x189),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a269_0x1c57b2(0x22c),NODE_TYPES=new Set([a269_0x1c57b2(0x19f),a269_0x1c57b2(0x290),a269_0x1c57b2(0x179),'CONDITION',a269_0x1c57b2(0x1e2),a269_0x1c57b2(0x2da)]),CONDITION_TYPES=new Set(['ALWAYS',a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180),a269_0x1c57b2(0x277)]),APPROVAL_MODES=new Set([a269_0x1c57b2(0x2d6),a269_0x1c57b2(0x23d),a269_0x1c57b2(0x298)]),APPROVAL_TASK_MODES=new Set([a269_0x1c57b2(0x179),a269_0x1c57b2(0x263)]),FLOW_TIME_UNITS=new Set([a269_0x1c57b2(0x272),a269_0x1c57b2(0x203),'HOURS',a269_0x1c57b2(0x17a)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a269_0x1c57b2(0x1c5),a269_0x1c57b2(0x266)]),FLOW_TYPES=new Set([a269_0x1c57b2(0x194),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a269_0x1c57b2(0x21d)]),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([a269_0x1c57b2(0x17e),a269_0x1c57b2(0x1c1)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a269_0x1c57b2(0x1f1),a269_0x1c57b2(0x1b5),a269_0x1c57b2(0x2ad)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a269_0x1c57b2(0x1fa)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a269_0x1c57b2(0x257),UNSUPPORTED_FORM_MESSAGE=a269_0x1c57b2(0x2a4),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a269_0x1c57b2(0x187),RESERVED_RESULT_VARIABLES=new Set(['formData',a269_0x1c57b2(0x1be),a269_0x1c57b2(0x20b),a269_0x1c57b2(0x2bb),a269_0x1c57b2(0x1d6),'approval_sys_initiatorUsername',a269_0x1c57b2(0x18e),'approval_sys_pageId',a269_0x1c57b2(0x231),'approval_sys_dataId']);export function normalizeFlowConfig(_0x56da4c){const _0xc60646=a269_0x1c57b2;if(!isRecord(_0x56da4c))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x2fe3fe=cloneJsonValue(_0x56da4c),_0x142e7e=_0x2fe3fe['flowJson'],_0x54982=isRecord(_0x142e7e)?cloneJsonValue(_0x142e7e):{},_0x35e595=[],_0x51e078=[];for(const _0x5f23be of REMOVED_ROOT_FIELDS){if(!Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x2fe3fe,_0x5f23be))continue;delete _0x2fe3fe[_0x5f23be],_0x51e078[_0xc60646(0x24b)](_0x5f23be),_0x35e595['push']({'code':_0xc60646(0x1d1),'path':_0x5f23be,'message':_0x5f23be+_0xc60646(0x2d7)});}for(const _0x2f45c8 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x54982,_0x2f45c8))continue;const _0x275bd5=_0xc60646(0x17b)+_0x2f45c8;delete _0x54982[_0x2f45c8],_0x51e078[_0xc60646(0x24b)](_0x275bd5),_0x35e595[_0xc60646(0x24b)]({'code':_0xc60646(0x1d1),'path':_0x275bd5,'message':_0x275bd5+_0xc60646(0x2d7)});}if(Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x54982,'schemaVersion')){const _0x226e77=_0x54982[_0xc60646(0x2e6)],_0x64c80b=typeof _0x226e77===_0xc60646(0x27d)?_0x226e77[_0xc60646(0x2d3)]():_0x226e77;if(isEmptyJsonValue(_0x226e77)||_0x64c80b===DEFAULT_FLOW_SCHEMA_VERSION){const _0x260a82='flowJson.schemaVersion';delete _0x54982[_0xc60646(0x2e6)],_0x51e078[_0xc60646(0x24b)](_0x260a82),_0x35e595[_0xc60646(0x24b)]({'code':_0xc60646(0x1d1),'path':_0x260a82,'message':_0x260a82+_0xc60646(0x1cf)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x54982,_0xc60646(0x1e0),_0x35e595,_0x51e078);_0x2fe3fe['flowType']===_0xc60646(0x22a)&&!Object['prototype'][_0xc60646(0x242)]['call'](_0x54982,_0xc60646(0x265))&&(_0x54982[_0xc60646(0x265)]=_0xc60646(0x218));_0x2fe3fe[_0xc60646(0x1e0)]=_0x54982;if(typeof _0x2fe3fe[_0xc60646(0x1a1)]===_0xc60646(0x27d))_0x2fe3fe[_0xc60646(0x1a1)]=_0x2fe3fe[_0xc60646(0x1a1)][_0xc60646(0x2d3)]();return{'config':_0x2fe3fe,'warnings':_0x35e595,'removedPaths':_0x51e078};}export function validateFlowConfig(_0x52b913){const _0xba3904=a269_0x1c57b2;let _0x39d2f5;try{_0x39d2f5=normalizeFlowConfig(_0x52b913);}catch(_0xbc8440){const _0x15b808=_0xbc8440 instanceof Error?_0xbc8440[_0xba3904(0x23e)]:String(_0xbc8440),_0x47e1e0={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x15b808}],'warnings':[],'normalized':_0x47e1e0,'validationConfig':_0x47e1e0};}const _0x5b7c77=_0x39d2f5[_0xba3904(0x288)],_0x19552d=cloneJsonValue(_0x5b7c77),_0x2f026e=_0x19552d[_0xba3904(0x1e0)];_0x2f026e[_0xba3904(0x2bd)]=_0xba3904(0x175),_0x2f026e[_0xba3904(0x1a1)]=_0x5b7c77['flowName'];typeof _0x5b7c77[_0xba3904(0x2e3)]===_0xba3904(0x27d)&&_0x5b7c77[_0xba3904(0x2e3)][_0xba3904(0x2d3)]()&&(_0x2f026e[_0xba3904(0x24d)]=_0x5b7c77[_0xba3904(0x2e3)][_0xba3904(0x2d3)]());const _0x405358=[];return validateOuterMetadata(_0x5b7c77,_0x405358),validateFlowClassification(_0x5b7c77,_0x405358),validateGraph(_0x5b7c77[_0xba3904(0x1e0)],_0x405358),{'valid':_0x405358[_0xba3904(0x2cc)]===0x0,'errors':_0x405358,'warnings':_0x39d2f5[_0xba3904(0x1c3)],'normalized':_0x5b7c77,'validationConfig':_0x19552d};}function validateFlowClassification(_0x302ede,_0x45789d){const _0xa6e484=a269_0x1c57b2;if(!isRecord(_0x302ede[_0xa6e484(0x1e0)]))return;const _0x1f8202=_0x302ede[_0xa6e484(0x261)],_0x4ce3e6=_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x265)];_0x4ce3e6!==undefined&&(typeof _0x4ce3e6!=='string'||!FLOW_PAGE_MODES['has'](_0x4ce3e6))&&_0x45789d[_0xa6e484(0x24b)]({'path':'flowJson.pageMode','message':_0xa6e484(0x2be)+String(_0x4ce3e6)+'.'});_0x1f8202===_0xa6e484(0x194)&&_0x4ce3e6!==undefined&&_0x45789d[_0xa6e484(0x24b)]({'path':_0xa6e484(0x245),'message':_0xa6e484(0x2e2)});_0x1f8202===_0xa6e484(0x22a)&&_0x4ce3e6===_0xa6e484(0x21d)&&_0x45789d[_0xa6e484(0x24b)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x1f8202===_0xa6e484(0x194)||_0x1f8202===_0xa6e484(0x22a))&&validateCustomPageNavigation(_0x302ede,_0x1f8202,_0x4ce3e6,_0x45789d);if(_0x1f8202!==_0xa6e484(0x194)||!Array['isArray'](_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x214)]))return;_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x214)][_0xa6e484(0x197)]((_0x426cc7,_0x1606dd)=>{const _0x3d0e02=_0xa6e484;isRecord(_0x426cc7)&&_0x426cc7[_0x3d0e02(0x174)]===_0x3d0e02(0x179)&&_0x426cc7[_0x3d0e02(0x279)]===_0x3d0e02(0x263)&&_0x45789d['push']({'path':'flowJson.nodes['+_0x1606dd+_0x3d0e02(0x269),'message':_0x3d0e02(0x27f)});});}function validateCustomPageNavigation(_0x158344,_0x12ad17,_0x4626d8,_0x24ea95){const _0x2c9699=a269_0x1c57b2,_0x5f5bf9=_0x158344['flowJson'][_0x2c9699(0x224)];_0x5f5bf9!==undefined&&(!Number[_0x2c9699(0x1ab)](_0x5f5bf9)||_0x5f5bf9<=0x0)&&_0x24ea95['push']({'path':_0x2c9699(0x27b),'message':'startPageId\x20must\x20be\x20a\x20positive\x20integer.'});const _0x2b3d1f=Array[_0x2c9699(0x230)](_0x158344['flowJson'][_0x2c9699(0x214)])?_0x158344[_0x2c9699(0x1e0)]['nodes'][_0x2c9699(0x1bb)]((_0x38dcf8,_0x4ef581)=>({'node':_0x38dcf8,'index':_0x4ef581}))[_0x2c9699(0x20c)](({node:_0x1beaa9})=>isRecord(_0x1beaa9)&&_0x1beaa9['pageId']!==undefined):[],_0x1cf3b2=_0x5f5bf9!==undefined||_0x2b3d1f['length']>0x0,_0xe3b227=_0x4626d8===undefined&&_0x12ad17===_0x2c9699(0x22a)?_0x2c9699(0x218):_0x4626d8;_0x1cf3b2&&(_0x12ad17!==_0x2c9699(0x22a)||_0xe3b227!=='CUSTOM_PAGE')&&(_0x5f5bf9!==undefined&&_0x24ea95[_0x2c9699(0x24b)]({'path':'flowJson.startPageId','message':_0x2c9699(0x27e)}),_0x2b3d1f[_0x2c9699(0x197)](({index:_0x4d93a5})=>{const _0x1e07a2=_0x2c9699;_0x24ea95['push']({'path':_0x1e07a2(0x217)+_0x4d93a5+_0x1e07a2(0x2af),'message':_0x1e07a2(0x226)});}));}export async function writeNormalizedFlowConfig(_0xaa7b56,_0x19a1bc,_0x402b79={}){const _0x1d6688=a269_0x1c57b2,_0x140306=resolve(_0xaa7b56),_0x26580f=_0x140306+'.'+process[_0x1d6688(0x280)]+'.'+randomUUID()+_0x1d6688(0x1bd),_0x510d93=JSON[_0x1d6688(0x293)](_0x19a1bc,null,0x2)+'\x0a';let _0x3e38d5;try{try{_0x3e38d5=(await stat(_0x140306))[_0x1d6688(0x1a5)]&0x1ff;}catch{_0x3e38d5=undefined;}await writeFile(_0x26580f,_0x510d93,{'encoding':'utf8','flag':'wx','mode':_0x3e38d5??0x1a4});if(_0x3e38d5!==undefined)await chmod(_0x26580f,_0x3e38d5);_0x402b79[_0x1d6688(0x1cb)]===![]?(await link(_0x26580f,_0x140306),await unlink(_0x26580f)):await rename(_0x26580f,_0x140306);}finally{await unlink(_0x26580f)[_0x1d6688(0x1b6)](()=>undefined);}}function validateOuterMetadata(_0x4c0f4d,_0x2ca220){const _0x31d82a=a269_0x1c57b2;(typeof _0x4c0f4d['flowName']!=='string'||_0x4c0f4d['flowName']['trim']()==='')&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x1a1),'message':_0x31d82a(0x24c)});_0x4c0f4d[_0x31d82a(0x228)]!==undefined&&typeof _0x4c0f4d['flowDesc']!==_0x31d82a(0x27d)&&_0x2ca220['push']({'path':_0x31d82a(0x228),'message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x4c0f4d[_0x31d82a(0x261)]===undefined||_0x4c0f4d['flowType']===null)_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x261),'message':_0x31d82a(0x2d5)});else(typeof _0x4c0f4d['flowType']!==_0x31d82a(0x27d)||!FLOW_TYPES[_0x31d82a(0x29d)](_0x4c0f4d[_0x31d82a(0x261)]))&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x261),'message':_0x31d82a(0x2a9)+String(_0x4c0f4d[_0x31d82a(0x261)])+'.'});_0x4c0f4d[_0x31d82a(0x2e3)]!==undefined&&typeof _0x4c0f4d[_0x31d82a(0x2e3)]!==_0x31d82a(0x27d)&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x2e3),'message':_0x31d82a(0x291)}),_0x4c0f4d[_0x31d82a(0x207)]!==undefined&&(!Number['isInteger'](_0x4c0f4d[_0x31d82a(0x207)])||_0x4c0f4d[_0x31d82a(0x207)]<0x0)&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x207),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x4c0f4d[_0x31d82a(0x261)]===_0x31d82a(0x22a)&&_0x4c0f4d['datasetCode']!==undefined&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x2e3),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x4c0f4d[_0x31d82a(0x261)]===_0x31d82a(0x22a)&&_0x4c0f4d[_0x31d82a(0x207)]!==undefined&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x207),'message':_0x31d82a(0x221)});}function validateGraph(_0x441721,_0x81fa6e){const _0x28a70f=a269_0x1c57b2;if(!isRecord(_0x441721)){_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x1e0),'message':_0x28a70f(0x18a)});return;}!Array[_0x28a70f(0x230)](_0x441721[_0x28a70f(0x214)])&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array['isArray'](_0x441721[_0x28a70f(0x23a)])&&_0x81fa6e['push']({'path':'flowJson.edges','message':_0x28a70f(0x2c7)});Object['prototype'][_0x28a70f(0x242)][_0x28a70f(0x2bc)](_0x441721,'schemaVersion')&&_0x81fa6e[_0x28a70f(0x24b)]({'path':'flowJson.schemaVersion','message':_0x28a70f(0x216)+String(_0x441721['schemaVersion'])+_0x28a70f(0x247)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x5e726d of[_0x28a70f(0x2b1),_0x28a70f(0x188),_0x28a70f(0x2a8)]){Object[_0x28a70f(0x19c)][_0x28a70f(0x242)]['call'](_0x441721,_0x5e726d)&&_0x81fa6e[_0x28a70f(0x24b)]({'path':'flowJson.'+_0x5e726d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x28a70f(0x230)](_0x441721['nodes'])||!Array[_0x28a70f(0x230)](_0x441721['edges']))return;const _0x3b2f97=new Map(),_0x5397ce=[],_0x547efe=[],_0x84de6e=new Map(),_0x566dd9=new Map(),_0x1569a7=new Set();let _0xdfc8c3=0x0;_0x441721[_0x28a70f(0x214)][_0x28a70f(0x197)]((_0x16432f,_0x38880c)=>{const _0xd0e0e1=_0x28a70f,_0x5ec72d=_0xd0e0e1(0x217)+_0x38880c+']';if(!isRecord(_0x16432f)){_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d,'message':_0xd0e0e1(0x2ba)});return;}const _0xacd034=_0x16432f;if(typeof _0xacd034['id']!==_0xd0e0e1(0x27d)||!BPMN_ID_PATTERN[_0xd0e0e1(0x2dc)](_0xacd034['id']))_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+'.id','message':_0xd0e0e1(0x23b)});else _0x3b2f97[_0xd0e0e1(0x29d)](_0xacd034['id'])?_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+_0xd0e0e1(0x1c7),'message':'Duplicate\x20node\x20id:\x20'+_0xacd034['id']+'.'}):(_0x3b2f97['set'](_0xacd034['id'],_0xacd034),_0x1569a7[_0xd0e0e1(0x26d)](_0xacd034['id']));if(!NODE_TYPES[_0xd0e0e1(0x29d)](_0xacd034['type']))_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+_0xd0e0e1(0x268),'message':_0xd0e0e1(0x1dc)+String(_0xacd034[_0xd0e0e1(0x174)])+'.'});else{if(_0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x19f))_0x5397ce['push'](_0xacd034['id']);else _0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x290)&&_0x547efe[_0xd0e0e1(0x24b)](_0xacd034['id']);}_0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x179)&&(_0xacd034['taskMode']===undefined||_0xacd034[_0xd0e0e1(0x279)]==='APPROVAL')&&(_0xdfc8c3+=0x1);validateNode(_0xacd034,_0x5ec72d,_0x81fa6e);if(_0xacd034[_0xd0e0e1(0x174)]==='SCRIPT'){const _0x1f61c1=resolveEffectiveResultVariable(_0xacd034[_0xd0e0e1(0x20d)],![]);_0x1f61c1&&(registerResultVariableOwner(_0x566dd9,_0x1f61c1,_0xacd034['id'],_0x81fa6e),!_0x84de6e['has'](_0x1f61c1)&&_0x84de6e['set'](_0x1f61c1,_0xacd034['id']));}if(_0xacd034['type']==='APPROVAL'&&isRecord(_0xacd034['timeout'])&&_0xacd034[_0xd0e0e1(0x2d0)][_0xd0e0e1(0x1b2)]===!![]&&_0xacd034[_0xd0e0e1(0x2d0)][_0xd0e0e1(0x29b)]==='EXECUTE_BFF'){const _0x5ab932=resolveEffectiveResultVariable(_0xacd034['timeout']['resultVariable'],!![]);_0x5ab932&®isterResultVariableOwner(_0x566dd9,_0x5ab932,_0xacd034['id']+_0xd0e0e1(0x192),_0x81fa6e);}});_0x5397ce['length']!==0x1&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':_0x28a70f(0x193)});_0x547efe['length']===0x0&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':_0x28a70f(0x278)});const _0xf76529=new Map(),_0x4141c=new Map(),_0x137dbf=new Map(),_0x2291ed=new Set();_0x441721[_0x28a70f(0x23a)][_0x28a70f(0x197)]((_0x4b343c,_0x256391)=>{const _0x409736=_0x28a70f,_0x297a6f=_0x409736(0x1f4)+_0x256391+']';if(!isRecord(_0x4b343c)){_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f,'message':_0x409736(0x1c8)});return;}const _0x398808=_0x4b343c;_0x137dbf[_0x409736(0x294)](_0x398808,_0x297a6f);const _0x402225=resolveEdgeEndpoint(_0x398808[_0x409736(0x259)],_0x398808['sourceNodeId']),_0x1ef0c3=resolveEdgeEndpoint(_0x398808['target'],_0x398808['targetNodeId']);if(!_0x402225)_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1b9),'message':_0x409736(0x213)});if(!_0x1ef0c3)_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1ee),'message':_0x409736(0x26f)});_0x402225&&!_0x3b2f97[_0x409736(0x29d)](_0x402225)&&_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1b9),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x402225+'.'});_0x1ef0c3&&!_0x3b2f97[_0x409736(0x29d)](_0x1ef0c3)&&_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1ee),'message':_0x409736(0x1ba)+_0x1ef0c3+'.'});if(_0x398808['id']!==undefined){if(typeof _0x398808['id']!==_0x409736(0x27d)||!BPMN_ID_PATTERN[_0x409736(0x2dc)](_0x398808['id']))_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+'.id','message':_0x409736(0x273)});else{if(_0x1569a7[_0x409736(0x29d)](_0x398808['id']))_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1c7),'message':_0x409736(0x270)+_0x398808['id']+'.'});else!_0x1569a7[_0x409736(0x29d)](_0x398808['id'])&&_0x1569a7[_0x409736(0x26d)](_0x398808['id']);}}if(_0x402225&&_0x1ef0c3){const _0x354c44=_0x402225+'\x00'+_0x1ef0c3+'\x00'+(_0x398808[_0x409736(0x18c)]??_0x409736(0x1a8));_0x2291ed[_0x409736(0x29d)](_0x354c44)?_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f,'message':_0x409736(0x1b4)+_0x402225+_0x409736(0x1cc)+_0x1ef0c3+'\x20('+(_0x398808[_0x409736(0x18c)]??_0x409736(0x1a8))+').'}):_0x2291ed[_0x409736(0x26d)](_0x354c44);}validateEdge(_0x398808,_0x297a6f,_0x81fa6e),_0x402225&&_0x1ef0c3&&(_0xf76529[_0x409736(0x28e)](_0x402225)?.['push'](_0x398808)??_0xf76529[_0x409736(0x294)](_0x402225,[_0x398808]),_0x4141c[_0x409736(0x28e)](_0x1ef0c3)?.['push'](_0x398808)??_0x4141c[_0x409736(0x294)](_0x1ef0c3,[_0x398808]));});if(_0x5397ce['length']!==0x1)return;validateGraphShape(_0x3b2f97,_0x5397ce[0x0],_0x547efe,_0xf76529,_0x4141c,_0x137dbf,_0x81fa6e),validateScriptResultReferences(_0x3b2f97,_0x5397ce[0x0],_0xf76529,_0x4141c,_0x137dbf,_0x84de6e,_0x81fa6e),validateApprovalResults(_0x3b2f97,_0xdfc8c3,_0x547efe,_0x81fa6e);}function validateNode(_0x23fd6c,_0x50ca2e,_0xfe53bb){const _0x242d1c=a269_0x1c57b2;for(const _0x248a29 of[_0x242d1c(0x276),_0x242d1c(0x2a6)]){Object[_0x242d1c(0x19c)][_0x242d1c(0x242)][_0x242d1c(0x2bc)](_0x23fd6c,_0x248a29)&&_0xfe53bb['push']({'path':_0x50ca2e+'.'+_0x248a29,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x242d1c(0x29d)](_0x23fd6c[_0x242d1c(0x174)]))return;(typeof _0x23fd6c['name']!==_0x242d1c(0x27d)||_0x23fd6c[_0x242d1c(0x233)][_0x242d1c(0x2d3)]()==='')&&_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x2aa),'message':_0x242d1c(0x2b0)});if(_0x23fd6c[_0x242d1c(0x207)]!==undefined){if(!Number[_0x242d1c(0x1ab)](_0x23fd6c[_0x242d1c(0x207)])||_0x23fd6c[_0x242d1c(0x207)]<=0x0)_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2df),'message':_0x242d1c(0x1b1)});else _0x23fd6c['type']!==_0x242d1c(0x179)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.pageId','message':'node\x20pageId\x20is\x20supported\x20only\x20on\x20APPROVAL\x20user\x20tasks.'});}const _0x6b5cfe=_0x23fd6c[_0x242d1c(0x2c1)];if(!isRecord(_0x6b5cfe))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1aa),'message':_0x242d1c(0x27a)});else for(const _0x5a6240 of['x','y']){const _0x1d0237=_0x6b5cfe[_0x5a6240];(typeof _0x1d0237!==_0x242d1c(0x295)||!Number[_0x242d1c(0x28d)](_0x1d0237)||_0x1d0237<0x0)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x186)+_0x5a6240,'message':_0x242d1c(0x235)+_0x5a6240+_0x242d1c(0x274)});}if(_0x23fd6c[_0x242d1c(0x174)]==='APPROVAL'){const _0x14ccca=_0x23fd6c[_0x242d1c(0x25d)]??'SINGLE',_0x3439b5=_0x23fd6c[_0x242d1c(0x279)]??_0x242d1c(0x179);!APPROVAL_TASK_MODES[_0x242d1c(0x29d)](_0x3439b5)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2e7),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x3439b5)+'.'});!APPROVAL_MODES[_0x242d1c(0x29d)](_0x14ccca)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x19d),'message':_0x242d1c(0x19e)+String(_0x14ccca)+'.'});if(!isRecord(_0x23fd6c[_0x242d1c(0x24f)]))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x199),'message':_0x242d1c(0x2e0)});else{const _0x213e6d=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x229)];_0x213e6d!==_0x242d1c(0x256)&&_0x213e6d!=='ROLE'&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1e5),'message':_0x242d1c(0x21a)});if(_0x213e6d===_0x242d1c(0x256)){const _0x51e971=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x249)];if(!Array[_0x242d1c(0x230)](_0x51e971)||_0x51e971[_0x242d1c(0x2cc)]===0x0)_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2d8),'message':_0x242d1c(0x24a)});else{const _0x39819f=_0x51e971[_0x242d1c(0x21e)](_0x1eeff7=>!isValidUserId(_0x1eeff7));_0x39819f>=0x0&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x219)+_0x39819f+']','message':_0x242d1c(0x285)});const _0x1e296b=new Set(_0x51e971['filter'](isValidUserId)[_0x242d1c(0x1bb)](_0x53431d=>String(_0x53431d)[_0x242d1c(0x2d3)]()));_0x14ccca===_0x242d1c(0x2d6)&&_0x1e296b[_0x242d1c(0x27c)]>0x1&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2d8),'message':_0x242d1c(0x2db)});}}if(_0x213e6d===_0x242d1c(0x1b5)){const _0x4b6b97=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x1a7)],_0x14c26e=typeof _0x4b6b97===_0x242d1c(0x295)||typeof _0x4b6b97==='string'?Number(String(_0x4b6b97)[_0x242d1c(0x2d3)]()):Number[_0x242d1c(0x25a)];(!Number['isSafeInteger'](_0x14c26e)||_0x14c26e<=0x0)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.assignee.roleId','message':_0x242d1c(0x236)});}}if(_0x23fd6c[_0x242d1c(0x255)]!==undefined){if(!isRecord(_0x23fd6c['transferCandidates']))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1f8),'message':_0x242d1c(0x2ce)});else{if(_0x23fd6c[_0x242d1c(0x255)][_0x242d1c(0x229)]!==_0x242d1c(0x256))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2a7),'message':_0x242d1c(0x264)});else{const _0x6d92ed=_0x23fd6c[_0x242d1c(0x255)][_0x242d1c(0x249)];if(!Array['isArray'](_0x6d92ed)||_0x6d92ed[_0x242d1c(0x2cc)]===0x0)_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x2c8),'message':_0x242d1c(0x2c9)});else{const _0x1c4835=_0x6d92ed[_0x242d1c(0x21e)](_0x346841=>!isValidUserId(_0x346841));_0x1c4835>=0x0&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1c2)+_0x1c4835+']','message':_0x242d1c(0x299)});}}}}}_0x23fd6c[_0x242d1c(0x26e)]!==undefined&&typeof _0x23fd6c['sequential']!==_0x242d1c(0x1af)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x26b),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x23fd6c[_0x242d1c(0x174)]===_0x242d1c(0x1e2)){(typeof _0x23fd6c[_0x242d1c(0x191)]!==_0x242d1c(0x27d)||_0x23fd6c['scriptName'][_0x242d1c(0x2d3)]()==='')&&_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x211),'message':_0x242d1c(0x1ca)});if(_0x23fd6c['resultVariable']!==undefined){if(typeof _0x23fd6c[_0x242d1c(0x20d)]!==_0x242d1c(0x27d)||!VARIABLE_PATTERN[_0x242d1c(0x2dc)](_0x23fd6c[_0x242d1c(0x20d)]))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.resultVariable','message':_0x242d1c(0x1ea)});else(RESERVED_RESULT_VARIABLES[_0x242d1c(0x29d)](_0x23fd6c[_0x242d1c(0x20d)])||_0x23fd6c[_0x242d1c(0x20d)]['startsWith'](_0x242d1c(0x253)))&&_0xfe53bb['push']({'path':_0x50ca2e+'.resultVariable','message':_0x242d1c(0x18f)+_0x23fd6c['resultVariable']+'.'});}}validateAsyncExecution(_0x23fd6c,_0x50ca2e,_0xfe53bb),validateApprovalTimeout(_0x23fd6c,_0x50ca2e,_0xfe53bb),validateCcConfig(_0x23fd6c,_0x50ca2e,_0xfe53bb),_0x23fd6c[_0x242d1c(0x174)]===_0x242d1c(0x2da)&&validateNotificationConfig(_0x23fd6c[_0x242d1c(0x288)],_0x50ca2e+_0x242d1c(0x2ae),_0xfe53bb);}function validateAsyncExecution(_0x16306e,_0x591914,_0x351d07){const _0x32a796=a269_0x1c57b2;if(_0x16306e[_0x32a796(0x1d8)]===undefined)return;if(!isRecord(_0x16306e[_0x32a796(0x1d8)])){_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+'.async','message':_0x32a796(0x21f)});return;}if(_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==undefined&&typeof _0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==_0x32a796(0x1af)){_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x185),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==!![])return;_0x16306e[_0x32a796(0x174)]!==_0x32a796(0x1e2)&&_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x1e1),'message':_0x32a796(0x1c4)});const _0xe84fe7=_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1f0)]??0x3;(!Number[_0x32a796(0x1f6)](_0xe84fe7)||_0xe84fe7<0x1||_0xe84fe7>MAX_ASYNC_RETRY_COUNT)&&_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x19a),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x16306e['async'][_0x32a796(0x29f)]!==undefined&&validateTimeAmount(_0x16306e[_0x32a796(0x1d8)]['retryInterval'],_0x591914+_0x32a796(0x1fe),_0x351d07);}function validateApprovalTimeout(_0x11b101,_0x2764c1,_0x3892d7){const _0x1a4375=a269_0x1c57b2;if(_0x11b101[_0x1a4375(0x2d0)]===undefined)return;if(!isRecord(_0x11b101[_0x1a4375(0x2d0)])){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x192),'message':_0x1a4375(0x2b8)});return;}if(_0x11b101['timeout'][_0x1a4375(0x1b2)]!==undefined&&typeof _0x11b101['timeout'][_0x1a4375(0x1b2)]!==_0x1a4375(0x1af)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x238),'message':_0x1a4375(0x1e4)});return;}if(_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x1b2)]!==!![])return;if(_0x11b101['timeout'][_0x1a4375(0x2ab)]!==undefined&&typeof _0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x2ab)]!==_0x1a4375(0x1af)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout.interrupting','message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x11b101['type']!==_0x1a4375(0x179)&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout','message':_0x1a4375(0x202)});validateTimeAmount(_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x1db)],_0x2764c1+_0x1a4375(0x204),_0x3892d7);const _0x59e688=_0x11b101['timeout'][_0x1a4375(0x29b)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x1a4375(0x29d)](_0x59e688)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout.action','message':_0x1a4375(0x1c0)});return;}(_0x11b101[_0x1a4375(0x279)]??_0x1a4375(0x179))==='HANDLE'&&_0x59e688!==_0x1a4375(0x266)&&_0x3892d7['push']({'path':_0x2764c1+'.timeout.action','message':_0x1a4375(0x2d1)});const _0x3bd6b2=_0x11b101[_0x1a4375(0x2d0)]['interrupting']??_0x59e688!==_0x1a4375(0x266);if(_0x59e688===_0x1a4375(0x266))_0x3bd6b2&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x1b7),'message':_0x1a4375(0x2b9)}),(typeof _0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x191)]!==_0x1a4375(0x27d)||_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x191)][_0x1a4375(0x2d3)]()==='')&&_0x3892d7['push']({'path':_0x2764c1+'.timeout.scriptName','message':_0x1a4375(0x1ff)}),validateOptionalResultVariable(_0x11b101['timeout']['resultVariable'],_0x2764c1+_0x1a4375(0x29c),_0x3892d7);else!_0x3bd6b2&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x1b7),'message':_0x59e688+_0x1a4375(0x2e8)});}function validateTimeAmount(_0x5350a9,_0x2ef3bd,_0x39c02f){const _0x4749c1=a269_0x1c57b2;if(!isRecord(_0x5350a9)){_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x4749c1(0x1f6)](_0x5350a9[_0x4749c1(0x212)])||Number(_0x5350a9[_0x4749c1(0x212)])<=0x0)&&_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd+_0x4749c1(0x2a0),'message':_0x4749c1(0x267)}),!FLOW_TIME_UNITS[_0x4749c1(0x29d)](_0x5350a9[_0x4749c1(0x1ad)])&&_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd+_0x4749c1(0x2c6),'message':_0x4749c1(0x17c)});}function validateOptionalResultVariable(_0x107e60,_0x7e08e2,_0x4e156e){const _0x2f699e=a269_0x1c57b2;if(_0x107e60===undefined||_0x107e60===null||_0x107e60==='')return;if(typeof _0x107e60!=='string'||!VARIABLE_PATTERN[_0x2f699e(0x2dc)](_0x107e60))_0x4e156e[_0x2f699e(0x24b)]({'path':_0x7e08e2,'message':_0x2f699e(0x1ea)});else(RESERVED_RESULT_VARIABLES[_0x2f699e(0x29d)](_0x107e60)||_0x107e60[_0x2f699e(0x262)](_0x2f699e(0x253)))&&_0x4e156e['push']({'path':_0x7e08e2,'message':_0x2f699e(0x18f)+_0x107e60+'.'});}function validateCcConfig(_0xc39b0e,_0x1bf2fd,_0x10c9b9){const _0x5c173e=a269_0x1c57b2;if(_0xc39b0e['cc']===undefined)return;if(!isRecord(_0xc39b0e['cc'])){_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x292),'message':_0x5c173e(0x177)});return;}_0xc39b0e[_0x5c173e(0x174)]!==_0x5c173e(0x290)&&_0xc39b0e[_0x5c173e(0x174)]!==_0x5c173e(0x179)&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+'.cc','message':_0x5c173e(0x225)});Object['prototype'][_0x5c173e(0x242)][_0x5c173e(0x2bc)](_0xc39b0e['cc'],_0x5c173e(0x1d4))&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x28a),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3700ef=_0xc39b0e['cc']['recipientUserIds'];if(!Array[_0x5c173e(0x230)](_0x3700ef)||_0x3700ef['length']===0x0)_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x2b5),'message':_0x5c173e(0x215)});else{_0x3700ef[_0x5c173e(0x2cc)]>MAX_CC_RECIPIENTS&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x2b5),'message':_0x5c173e(0x1a0)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x50c5a4=new Set();_0x3700ef['forEach']((_0xf08839,_0x5ccd44)=>{const _0x5eefe2=_0x5c173e;if(typeof _0xf08839!==_0x5eefe2(0x27d)||_0xf08839[_0x5eefe2(0x2d3)]()==='')_0x10c9b9['push']({'path':_0x1bf2fd+_0x5eefe2(0x1f7)+_0x5ccd44+']','message':_0x5eefe2(0x1fb)});else _0x50c5a4['has'](_0xf08839[_0x5eefe2(0x2d3)]())?_0x10c9b9[_0x5eefe2(0x24b)]({'path':_0x1bf2fd+_0x5eefe2(0x1f7)+_0x5ccd44+']','message':_0x5eefe2(0x1d3)+_0xf08839['trim']()+'.'}):_0x50c5a4[_0x5eefe2(0x26d)](_0xf08839[_0x5eefe2(0x2d3)]());});}validateStringArray(_0xc39b0e['cc'][_0x5c173e(0x25c)],_0x1bf2fd+_0x5c173e(0x297),_0x10c9b9);}function a269_0x40e0(_0x55d8a4,_0x47a25e){_0x55d8a4=_0x55d8a4-0x172;const _0x592307=a269_0x5923();let _0x40e0af=_0x592307[_0x55d8a4];return _0x40e0af;}function validateStringArray(_0x7cc5aa,_0x1efc5a,_0x2c98c6){const _0x9fd95d=a269_0x1c57b2;if(_0x7cc5aa===undefined)return;if(!Array[_0x9fd95d(0x230)](_0x7cc5aa)){_0x2c98c6[_0x9fd95d(0x24b)]({'path':_0x1efc5a,'message':_0x9fd95d(0x29e)});return;}const _0x2292e3=new Set();_0x7cc5aa[_0x9fd95d(0x197)]((_0x2d2642,_0x1cba82)=>{const _0x37e32a=_0x9fd95d;if(typeof _0x2d2642!==_0x37e32a(0x27d)||_0x2d2642[_0x37e32a(0x2d3)]()==='')_0x2c98c6[_0x37e32a(0x24b)]({'path':_0x1efc5a+'['+_0x1cba82+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x2292e3[_0x37e32a(0x29d)](_0x2d2642[_0x37e32a(0x2d3)]())?_0x2c98c6[_0x37e32a(0x24b)]({'path':_0x1efc5a+'['+_0x1cba82+']','message':_0x37e32a(0x17f)+_0x2d2642[_0x37e32a(0x2d3)]()+'.'}):_0x2292e3[_0x37e32a(0x26d)](_0x2d2642['trim']());});}function validateNotificationConfig(_0x22c18d,_0x1fa62e,_0x2daa21){const _0x42bb99=a269_0x1c57b2;if(!isRecord(_0x22c18d)){_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e,'message':_0x42bb99(0x1cd)});return;}if(_0x22c18d[_0x42bb99(0x1b0)]!==undefined&&_0x22c18d['version']!==null){if(typeof _0x22c18d[_0x42bb99(0x1b0)]!==_0x42bb99(0x27d))_0x2daa21['push']({'path':_0x1fa62e+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x22c18d[_0x42bb99(0x1b0)][_0x42bb99(0x2d3)]()&&_0x22c18d['version'][_0x42bb99(0x2d3)]()!=='v1'&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x1d2),'message':_0x42bb99(0x1ed)+_0x22c18d[_0x42bb99(0x1b0)]+'.'});}const _0x2ebf06=requireNotificationString(_0x22c18d[_0x42bb99(0x2c0)],_0x1fa62e+_0x42bb99(0x2d4),_0x42bb99(0x289),_0x2daa21);_0x2ebf06?.[_0x42bb99(0x29a)]('${')&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x2d4),'message':_0x42bb99(0x260)});if(_0x22c18d[_0x42bb99(0x2d2)]!==undefined&&_0x22c18d['failurePolicy']!==null){if(typeof _0x22c18d[_0x42bb99(0x2d2)]!==_0x42bb99(0x27d))_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x22b),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x42bb99(0x29d)](_0x22c18d['failurePolicy'][_0x42bb99(0x2d3)]()['toUpperCase']())&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x22b),'message':_0x42bb99(0x2d9)});}!isRecord(_0x22c18d[_0x42bb99(0x1b8)])?_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x1eb),'message':_0x42bb99(0x28c)}):validateNotificationTemplate(_0x22c18d[_0x42bb99(0x1b8)],_0x1fa62e+_0x42bb99(0x1eb),_0x2daa21),validateNotificationRecipients(_0x22c18d['recipients'],_0x1fa62e+'.recipients',_0x2daa21);}function validateNotificationTemplate(_0x195dd6,_0x158bda,_0x4c6fbe){const _0x46220e=a269_0x1c57b2;for(const _0x3e91db of['title','summary']){const _0x248fe8=requireNotificationString(_0x195dd6[_0x3e91db],_0x158bda+'.'+_0x3e91db,_0x46220e(0x2c3)+_0x3e91db+_0x46220e(0x18b),_0x4c6fbe);if(_0x248fe8)validateNotificationPlaceholders(_0x248fe8,_0x158bda+'.'+_0x3e91db,_0x4c6fbe);}_0x195dd6[_0x46220e(0x244)]!==undefined&&_0x195dd6[_0x46220e(0x244)]!==null&&(typeof _0x195dd6[_0x46220e(0x244)]!=='string'?_0x4c6fbe[_0x46220e(0x24b)]({'path':_0x158bda+_0x46220e(0x2b6),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x195dd6[_0x46220e(0x244)],_0x158bda+'.detailMarkdown',_0x4c6fbe)),validateNotificationFacts(_0x195dd6[_0x46220e(0x190)],_0x158bda+_0x46220e(0x23c),_0x4c6fbe),validateNotificationActions(_0x195dd6[_0x46220e(0x200)],_0x158bda+_0x46220e(0x198),_0x4c6fbe);}function a269_0x5923(){const _0x227234=['targetNodeId','waypoint.','isArray','approval_sys_operationType','.url','name','(?![A-Za-z0-9_])','position.','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','195606BYuADo','.timeout.enabled','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','edges','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.facts','ALL','message','object','Duplicate\x20resultVariable:\x20','summary','hasOwnProperty','.waypoints','detailMarkdown','flowJson.pageMode','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.\x20This\x20CLI\x20supports\x20only\x20','matchAll','userIds','FIXED\x20assignee\x20requires\x20userIds.','push','flowName\x20is\x20required.','bindDatasetCode','flowJson.nodes.','assignee','Notification\x20template.actions\x20must\x20be\x20an\x20array.','recipientUserIds','.role','approval_sys_','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','transferCandidates','FIXED','scriptResult','indexOf','source','NaN','Rabetbase\x20FlowConfig','visible','approvalMode','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','expression','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','flowType','startsWith','HANDLE','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','pageMode','EXECUTE_BFF','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.type','].taskMode','result','.sequential','Notification\x20fact.','add','sequential','edge\x20target\x20is\x20required.','Duplicate\x20BPMN\x20element\x20id:\x20','templateName','SECONDS','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','form','EXPRESSION','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','taskMode','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','flowJson.startPageId','size','string','startPageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','pid','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','slice',',\x20but\x20node\x20','label','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','#/$defs/position','config','Notification\x20configCode\x20is\x20required.','.cc.readSources','.conditionType','NOTIFICATION\x20node\x20requires\x20template.','isFinite','get','integer','END','datasetCode\x20must\x20be\x20a\x20string.','.cc','stringify','set','number','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.cc.visible','ANY','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','includes','action','.timeout.resultVariable','has','value\x20must\x20be\x20an\x20array.','retryInterval','.value','Node\x20has\x20no\x20incoming\x20edge.','flowJson.nodes','Node\x20cannot\x20reach\x20any\x20END.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','Unsupported\x20notification\x20placeholder:\x20','formPermission','.transferCandidates.strategy','formPermissions','Unsupported\x20flowType:\x20','.name','interrupting','metadata','EMAIL','.config','].pageId','Every\x20node\x20requires\x20a\x20non-empty\x20name.','formSchema','waypoints\x20must\x20be\x20an\x20array.','text','role','.cc.recipientUserIds','.detailMarkdown','replace','timeout\x20must\x20be\x20an\x20object.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','node\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','call','flowKey','Unsupported\x20pageMode:\x20','3911413ZkqOpQ','configCode','position','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20template.','\x20was\x20empty\x20and\x20was\x20removed.','Notification\x20template\x20supports\x20at\x20most\x20','.unit','edges\x20must\x20be\x20an\x20array.','.transferCandidates.userIds','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','945492FJNsJh','Notification\x20action.url\x20is\x20required.','length','2ZWYFSA','transferCandidates\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','timeout','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','failurePolicy','trim','.configCode','flowType\x20is\x20required.','SINGLE','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','.assignee.userIds','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','NOTIFICATION','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','test','toUpperCase','context','.pageId','APPROVAL\x20node\x20requires\x20assignee.','empty_metadata_removed','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','datasetCode','Node\x20has\x20no\x20outgoing\x20edge.','147HrtKJb','schemaVersion','.taskMode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','\x20actions.','type','__rabetbase_local_validation__','flowJson.edges','cc\x20must\x20be\x20an\x20object.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','APPROVAL','DAYS','flowJson.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','CONTINUE','Duplicate\x20value:\x20','REJECTED','https://lovrabet.com/schema/rabetbase-flow-config.json','3782862MsUGYP','title','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','.async.enabled','.position.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','formDefinitions','appCode','flowJson\x20must\x20be\x20an\x20object.','\x20is\x20required.','conditionType','Notification\x20recipient.value\x20is\x20required.','approval_sys_datasetCode','Reserved\x20resultVariable:\x20','facts','scriptName','.timeout','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','FORM_FLOW','waypoints','^[A-Za-z_][A-Za-z0-9_]*$','forEach','.actions','.assignee','.async.retryCount','.expression','prototype','.approvalMode','Unsupported\x20approval\x20mode:\x20','START','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowName','.waypoints[','\x5c$&','Notification\x20fact\x20must\x20be\x20an\x20object.','mode','#/$defs/flowEdge','roleId','ALWAYS','Unsupported\x20condition\x20type:\x20','.position','isSafeInteger','url','unit','target','boolean','version','node\x20pageId\x20must\x20be\x20a\x20positive\x20integer.','enabled','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','Duplicate\x20edge\x20route:\x20','ROLE','catch','.timeout.interrupting','template','.source','Edge\x20target\x20node\x20not\x20found:\x20','map','some','.tmp','approved','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','FAIL','.transferCandidates.userIds[','warnings','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','AUTO_REJECT','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.id','edge\x20must\x20be\x20an\x20object.','96HqgFKV','SCRIPT\x20node\x20requires\x20scriptName.','overwrite','\x20->\x20','NOTIFICATION\x20node\x20requires\x20config.','parse','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','legacy_field_removed','.version','Duplicate\x20cc\x20recipient\x20userId:\x20','readSources','Node\x20is\x20not\x20reachable\x20from\x20START.','approval_sys_initiatorUserId','utf8','async','delete','every','duration','Unsupported\x20node\x20type:\x20','3593032oeLddZ','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','flowCode','flowJson','.async','SCRIPT','CONDITION','timeout.enabled\x20must\x20be\x20a\x20boolean.','.assignee.strategy','40qqvWTU','array','#/$defs/userId','Notification\x20recipient.type\x20is\x20required.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.template','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','Unsupported\x20notification\x20version:\x20','.target','(?<![A-Za-z0-9_])','retryCount','USER','APPROVED','3186873EUfcGi','flowJson.edges[','defaultFlow','isInteger','.cc.recipientUserIds[','.transferCandidates','\x20facts.','BCC','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','defaultFlow\x20must\x20be\x20a\x20boolean.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.async.retryInterval','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','actions','sourceNodeId','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','MINUTES','.timeout.duration','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','Notification\x20recipients\x20must\x20be\x20an\x20array.','pageId','30KwLyWl','#/$defs/flowNode','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','approval_sys_appCode','filter','resultVariable','.text','AUTO_APPROVE','variables','.scriptName','value','edge\x20source\x20is\x20required.','nodes','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','Unsupported\x20schemaVersion:\x20','flowJson.nodes[','CUSTOM_PAGE','.assignee.userIds[','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','edge\x20name\x20must\x20be\x20a\x20string.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','PLATFORM_FORM','findIndex','async\x20must\x20be\x20an\x20object.','keys','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','147793yBakAE','.defaultFlow','startPageId','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','node\x20pageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20recipient\x20must\x20be\x20an\x20object.','flowDesc','strategy','INDEPENDENT_FLOW','.failurePolicy','approval.simple-flow.v1','No\x20END\x20node\x20is\x20reachable\x20from\x20START.'];a269_0x5923=function(){return _0x227234;};return a269_0x5923();}function validateNotificationFacts(_0x193d1e,_0x436896,_0x24bf57){const _0x1c34a5=a269_0x1c57b2;if(_0x193d1e===undefined||_0x193d1e===null)return;if(!Array[_0x1c34a5(0x230)](_0x193d1e)){_0x24bf57['push']({'path':_0x436896,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x193d1e[_0x1c34a5(0x2cc)]>MAX_NOTIFICATION_FACTS&&_0x24bf57[_0x1c34a5(0x24b)]({'path':_0x436896,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x1c34a5(0x1f9)}),_0x193d1e[_0x1c34a5(0x197)]((_0x4239d0,_0x942ab0)=>{const _0x7b530a=_0x1c34a5,_0x135c73=_0x436896+'['+_0x942ab0+']';if(!isRecord(_0x4239d0)){_0x24bf57[_0x7b530a(0x24b)]({'path':_0x135c73,'message':_0x7b530a(0x1a4)});return;}for(const _0x387943 of[_0x7b530a(0x284),'value']){const _0x68426e=requireNotificationString(_0x4239d0[_0x387943],_0x135c73+'.'+_0x387943,_0x7b530a(0x26c)+_0x387943+'\x20is\x20required.',_0x24bf57);_0x68426e&&validateNotificationPlaceholders(_0x68426e,_0x135c73+'.'+_0x387943,_0x24bf57);}});}function validateNotificationActions(_0x28e8ef,_0x2d9bbb,_0x54a3ff){const _0x188794=a269_0x1c57b2;if(_0x28e8ef===undefined||_0x28e8ef===null)return;if(!Array['isArray'](_0x28e8ef)){_0x54a3ff[_0x188794(0x24b)]({'path':_0x2d9bbb,'message':_0x188794(0x250)});return;}_0x28e8ef['length']>MAX_NOTIFICATION_ACTIONS&&_0x54a3ff['push']({'path':_0x2d9bbb,'message':_0x188794(0x2c5)+MAX_NOTIFICATION_ACTIONS+_0x188794(0x173)}),_0x28e8ef[_0x188794(0x197)]((_0x394846,_0x36e0f4)=>{const _0x23b56d=_0x188794,_0x3a99b2=_0x2d9bbb+'['+_0x36e0f4+']';if(!isRecord(_0x394846)){_0x54a3ff[_0x23b56d(0x24b)]({'path':_0x3a99b2,'message':'Notification\x20action\x20must\x20be\x20an\x20object.'});return;}const _0x493a10=requireNotificationString(_0x394846[_0x23b56d(0x2b3)],_0x3a99b2+_0x23b56d(0x20e),'Notification\x20action.text\x20is\x20required.',_0x54a3ff);if(_0x493a10)validateNotificationPlaceholders(_0x493a10,_0x3a99b2+_0x23b56d(0x20e),_0x54a3ff);const _0x2f0f0a=requireNotificationString(_0x394846[_0x23b56d(0x1ac)],_0x3a99b2+_0x23b56d(0x232),_0x23b56d(0x2cb),_0x54a3ff);if(!_0x2f0f0a)return;validateNotificationPlaceholders(_0x2f0f0a,_0x3a99b2+_0x23b56d(0x232),_0x54a3ff),!/^https?:\/\//i['test'](_0x2f0f0a)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x23b56d(0x2dc)](_0x2f0f0a)&&_0x54a3ff[_0x23b56d(0x24b)]({'path':_0x3a99b2+_0x23b56d(0x232),'message':_0x23b56d(0x1bf)});});}function validateNotificationRecipients(_0x1d716d,_0x3b01e2,_0x1bac25){const _0x5e21c0=a269_0x1c57b2;if(_0x1d716d===undefined||_0x1d716d===null)return;if(!Array[_0x5e21c0(0x230)](_0x1d716d)){_0x1bac25[_0x5e21c0(0x24b)]({'path':_0x3b01e2,'message':_0x5e21c0(0x206)});return;}let _0x33f0f6=![];_0x1d716d[_0x5e21c0(0x197)]((_0xd61705,_0xa94566)=>{const _0x13fadf=_0x5e21c0,_0x254aff=_0x3b01e2+'['+_0xa94566+']';if(!isRecord(_0xd61705)){_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff,'message':_0x13fadf(0x227)});return;}const _0x50c5c2=requireNotificationString(_0xd61705[_0x13fadf(0x174)],_0x254aff+_0x13fadf(0x268),_0x13fadf(0x1e9),_0x1bac25);_0x50c5c2&&!NOTIFICATION_RECIPIENT_TYPES[_0x13fadf(0x29d)](_0x50c5c2[_0x13fadf(0x2dd)]())&&_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x268),'message':_0x13fadf(0x20a)});let _0x265288='TO';_0xd61705['role']!==undefined&&_0xd61705[_0x13fadf(0x2b4)]!==null&&(typeof _0xd61705[_0x13fadf(0x2b4)]!==_0x13fadf(0x27d)?(_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x252),'message':_0x13fadf(0x21c)}),_0x265288=''):(_0x265288=_0xd61705[_0x13fadf(0x2b4)]['trim']()[_0x13fadf(0x2dd)](),!NOTIFICATION_RECIPIENT_ROLES[_0x13fadf(0x29d)](_0x265288)&&_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x252),'message':_0x13fadf(0x286)})));if(_0x265288==='TO')_0x33f0f6=!![];const _0x5f22b8=requireNotificationString(_0xd61705[_0x13fadf(0x212)],_0x254aff+_0x13fadf(0x2a0),_0x13fadf(0x18d),_0x1bac25);_0x5f22b8&&validateNotificationPlaceholders(_0x5f22b8,_0x254aff+_0x13fadf(0x2a0),_0x1bac25);}),_0x1d716d[_0x5e21c0(0x2cc)]>0x0&&!_0x33f0f6&&_0x1bac25[_0x5e21c0(0x24b)]({'path':_0x3b01e2,'message':_0x5e21c0(0x172)});}function requireNotificationString(_0x3fac3a,_0x33aaba,_0x644aec,_0x1f29c5){const _0x1f86ba=a269_0x1c57b2;if(typeof _0x3fac3a!==_0x1f86ba(0x27d)||_0x3fac3a['trim']()==='')return _0x1f29c5[_0x1f86ba(0x24b)]({'path':_0x33aaba,'message':_0x644aec}),undefined;return _0x3fac3a[_0x1f86ba(0x2d3)]();}function validateNotificationPlaceholders(_0x390db3,_0x2adb53,_0x4d348c){const _0x32b36d=a269_0x1c57b2;for(const _0x1dce13 of _0x390db3[_0x32b36d(0x248)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x434281=_0x1dce13[0x1]?.['trim']()??'',_0x3d5488=_0x434281[_0x32b36d(0x258)]('.'),_0x5e54b2=_0x3d5488>=0x0?_0x434281[_0x32b36d(0x282)](0x0,_0x3d5488):_0x434281,_0x21e2e7=_0x3d5488>=0x0?_0x434281[_0x32b36d(0x282)](_0x3d5488+0x1)[_0x32b36d(0x2d3)]():'';(!['event',_0x32b36d(0x2de),_0x32b36d(0x210)][_0x32b36d(0x29a)](_0x5e54b2)||_0x21e2e7==='')&&_0x4d348c['push']({'path':_0x2adb53,'message':_0x32b36d(0x2a5)+_0x1dce13[0x0]+'.'});}_0x390db3[_0x32b36d(0x2b7)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x32b36d(0x29a)]('${')&&_0x4d348c['push']({'path':_0x2adb53,'message':_0x32b36d(0x2cf)});}function validateEdge(_0x161b0c,_0x5067e8,_0x3b0508){const _0x22e370=a269_0x1c57b2;_0x161b0c[_0x22e370(0x233)]!==undefined&&typeof _0x161b0c[_0x22e370(0x233)]!==_0x22e370(0x27d)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.name','message':_0x22e370(0x21b)}),_0x161b0c[_0x22e370(0x1f5)]!==undefined&&typeof _0x161b0c['defaultFlow']!==_0x22e370(0x1af)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.defaultFlow','message':_0x22e370(0x1fc)}),_0x161b0c['waypoints']!==undefined&&(!Array[_0x22e370(0x230)](_0x161b0c[_0x22e370(0x195)])?_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x243),'message':_0x22e370(0x2b2)}):_0x161b0c[_0x22e370(0x195)][_0x22e370(0x197)]((_0x54a93e,_0x179b90)=>{const _0x4afbfc=_0x22e370;if(!isRecord(_0x54a93e)){_0x3b0508['push']({'path':_0x5067e8+'.waypoints['+_0x179b90+']','message':_0x4afbfc(0x1b3)});return;}for(const _0x5f531f of['x','y']){const _0x502655=_0x54a93e[_0x5f531f];(typeof _0x502655!==_0x4afbfc(0x295)||!Number[_0x4afbfc(0x28d)](_0x502655))&&_0x3b0508['push']({'path':_0x5067e8+_0x4afbfc(0x1a2)+_0x179b90+'].'+_0x5f531f,'message':_0x4afbfc(0x22f)+_0x5f531f+_0x4afbfc(0x2c2)});}})),_0x161b0c[_0x22e370(0x18c)]!==undefined&&!CONDITION_TYPES[_0x22e370(0x29d)](_0x161b0c[_0x22e370(0x18c)])&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.conditionType','message':_0x22e370(0x1a9)+String(_0x161b0c['conditionType'])+'.'}),_0x161b0c[_0x22e370(0x18c)]===_0x22e370(0x277)&&(typeof _0x161b0c[_0x22e370(0x25f)]!==_0x22e370(0x27d)||_0x161b0c[_0x22e370(0x25f)]['trim']()==='')&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x19b),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x161b0c[_0x22e370(0x1f5)]===!![]&&_0x161b0c[_0x22e370(0x18c)]!==_0x22e370(0x1a8)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x223),'message':_0x22e370(0x254)}),_0x161b0c[_0x22e370(0x1f5)]===!![]&&typeof _0x161b0c[_0x22e370(0x25f)]===_0x22e370(0x27d)&&_0x161b0c[_0x22e370(0x25f)]['trim']()!==''&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x19b),'message':_0x22e370(0x205)});}function validateGraphShape(_0x5acdec,_0x1eec3a,_0x50793b,_0x213d34,_0x5de0ae,_0x2b77c1,_0x4a272b){const _0x2412e2=a269_0x1c57b2;for(const [_0xfb24c1,_0x24a7b2]of _0x5acdec){const _0x18a559=_0x5de0ae[_0x2412e2(0x28e)](_0xfb24c1)??[],_0xdfeda3=_0x213d34['get'](_0xfb24c1)??[];_0x24a7b2[_0x2412e2(0x174)]!==_0x2412e2(0x19f)&&_0x18a559['length']===0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x2a1)});_0x24a7b2['type']!=='END'&&_0xdfeda3['length']===0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x2e4)});_0x24a7b2['type']===_0x2412e2(0x19f)&&_0x18a559[_0x2412e2(0x2cc)]>0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x296)});_0x24a7b2[_0x2412e2(0x174)]==='END'&&_0xdfeda3['length']>0x0&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x281)});if(_0x24a7b2[_0x2412e2(0x174)]===_0x2412e2(0x1e3)){_0xdfeda3[_0x2412e2(0x2cc)]<0x2&&_0x4a272b[_0x2412e2(0x24b)]({'path':'flowJson.nodes.'+_0xfb24c1,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0xad5e62=_0xdfeda3['filter'](_0x47d16d=>_0x47d16d[_0x2412e2(0x1f5)]===!![]);_0xad5e62[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x239)});if(_0xad5e62[_0x2412e2(0x2cc)]===0x1){const _0x838a10=_0xad5e62[0x0],_0x553b1d=_0x2b77c1[_0x2412e2(0x28e)](_0x838a10)??'flowJson.edges';_0x838a10[_0x2412e2(0x18c)]!==_0x2412e2(0x1a8)&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x553b1d+_0x2412e2(0x28b),'message':_0x2412e2(0x178)});_0x838a10['expression']!==undefined&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x553b1d+_0x2412e2(0x19b),'message':_0x2412e2(0x1de)});for(const _0x57aa05 of _0xdfeda3){if(_0x57aa05===_0x838a10)continue;const _0x123786=_0x2b77c1[_0x2412e2(0x28e)](_0x57aa05)??'flowJson.edges';if(_0x57aa05[_0x2412e2(0x18c)]!=='EXPRESSION')_0x4a272b[_0x2412e2(0x24b)]({'path':_0x123786+'.conditionType','message':_0x2412e2(0x1fd)});else(typeof _0x57aa05[_0x2412e2(0x25f)]!==_0x2412e2(0x27d)||_0x57aa05[_0x2412e2(0x25f)][_0x2412e2(0x2d3)]()==='')&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x123786+'.expression','message':_0x2412e2(0x275)});}}}if(_0x24a7b2[_0x2412e2(0x174)]===_0x2412e2(0x179)&&(_0x24a7b2['taskMode']??_0x2412e2(0x179))===_0x2412e2(0x263)){if(_0xdfeda3[_0x2412e2(0x2cc)]!==0x1)_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x1ec)});else{const _0x409820=_0xdfeda3[0x0];((_0x409820[_0x2412e2(0x18c)]??_0x2412e2(0x1a8))!==_0x2412e2(0x1a8)||_0x409820[_0x2412e2(0x1f5)]===!![]||typeof _0x409820[_0x2412e2(0x25f)]===_0x2412e2(0x27d)&&_0x409820[_0x2412e2(0x25f)][_0x2412e2(0x2d3)]()!=='')&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2b77c1[_0x2412e2(0x28e)](_0x409820)??'flowJson.edges','message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x24a7b2['type']==='APPROVAL'){const _0xf7b05a=_0xdfeda3[_0x2412e2(0x1bb)](_0x443087=>_0x443087['conditionType']??_0x2412e2(0x1a8)),_0x1bbde3=_0xf7b05a[_0x2412e2(0x20c)](_0x48d85f=>_0x48d85f!==_0x2412e2(0x1f2)&&_0x48d85f!==_0x2412e2(0x180));_0x1bbde3[_0x2412e2(0x2cc)]>0x0&&_0x4a272b['push']({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x184)}),_0xf7b05a['filter'](_0x546bb2=>_0x546bb2===_0x2412e2(0x1f2))[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0xf7b05a[_0x2412e2(0x20c)](_0x2e18ac=>_0x2e18ac===_0x2412e2(0x180))[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x17d)}),_0xdfeda3['some'](_0x58e39a=>_0x58e39a[_0x2412e2(0x1f5)]===!![])&&_0x4a272b['push']({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x246)});}}}const _0x64e4da=new Set(),_0x1ff0d6=_0x4acdc4=>{const _0x2c8a97=_0x2412e2;if(_0x64e4da[_0x2c8a97(0x29d)](_0x4acdc4))return;_0x64e4da['add'](_0x4acdc4);for(const _0x1f91d6 of _0x213d34[_0x2c8a97(0x28e)](_0x4acdc4)??[]){const _0x338b4c=resolveEdgeEndpoint(_0x1f91d6[_0x2c8a97(0x1ae)],_0x1f91d6[_0x2c8a97(0x22e)]);if(_0x338b4c&&_0x5acdec[_0x2c8a97(0x29d)](_0x338b4c))_0x1ff0d6(_0x338b4c);}};_0x1ff0d6(_0x1eec3a);for(const _0x4c5e1c of _0x5acdec[_0x2412e2(0x220)]()){!_0x64e4da['has'](_0x4c5e1c)&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0x4c5e1c,'message':_0x2412e2(0x1d5)});}const _0x5be168=_0x50793b[_0x2412e2(0x1bc)](_0x3f587f=>_0x64e4da[_0x2412e2(0x29d)](_0x3f587f));if(!_0x5be168){_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x176),'message':_0x2412e2(0x22d)});return;}const _0x2cbd29=new Set(),_0x2b5837=_0x57e996=>{const _0x29972e=_0x2412e2;if(_0x2cbd29[_0x29972e(0x29d)](_0x57e996))return;_0x2cbd29[_0x29972e(0x26d)](_0x57e996);for(const _0x1da578 of _0x5de0ae['get'](_0x57e996)??[]){const _0x25e328=resolveEdgeEndpoint(_0x1da578['source'],_0x1da578[_0x29972e(0x201)]);if(_0x25e328&&_0x5acdec[_0x29972e(0x29d)](_0x25e328))_0x2b5837(_0x25e328);}};for(const _0x17be6d of _0x50793b){if(_0x5acdec[_0x2412e2(0x29d)](_0x17be6d))_0x2b5837(_0x17be6d);}for(const _0x5100f7 of _0x64e4da){!_0x2cbd29[_0x2412e2(0x29d)](_0x5100f7)&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0x5100f7,'message':_0x2412e2(0x2a3)});}}function validateApprovalResults(_0x272e45,_0xa56415,_0x5adb93,_0x11e2de){const _0xfe57f4=a269_0x1c57b2;if(_0xa56415===0x0)return;const _0xd1e671=new Set(_0x5adb93[_0xfe57f4(0x1bb)](_0x4c570d=>_0x272e45['get'](_0x4c570d)?.[_0xfe57f4(0x26a)])[_0xfe57f4(0x20c)](_0x1e6a66=>typeof _0x1e6a66===_0xfe57f4(0x27d)));for(const _0x31c5f0 of[_0xfe57f4(0x1f2),_0xfe57f4(0x180)]){!_0xd1e671[_0xfe57f4(0x29d)](_0x31c5f0)&&_0x11e2de['push']({'path':_0xfe57f4(0x2a2),'message':_0xfe57f4(0x1c6)+_0x31c5f0+'.'});}}function validateScriptResultReferences(_0x1a0a00,_0xb3b1db,_0x1148d9,_0x5a3336,_0x25f1b5,_0x8027d0,_0x27fe15){const _0x3b26ba=a269_0x1c57b2;if(_0x8027d0[_0x3b26ba(0x27c)]===0x0)return;const _0x1f71b7=new Set(),_0x13aa02=_0x57e2d2=>{const _0x3b6d7c=_0x3b26ba;if(!_0x1f71b7['has'](_0x57e2d2)&&_0x1a0a00[_0x3b6d7c(0x29d)](_0x57e2d2)){_0x1f71b7[_0x3b6d7c(0x26d)](_0x57e2d2);for(const _0x5d62ab of _0x1148d9[_0x3b6d7c(0x28e)](_0x57e2d2)??[]){const _0x3abf83=resolveEdgeEndpoint(_0x5d62ab[_0x3b6d7c(0x1ae)],_0x5d62ab[_0x3b6d7c(0x22e)]);if(_0x3abf83)_0x13aa02(_0x3abf83);}}};_0x13aa02(_0xb3b1db);const _0x49e5f4=new Map();for(const _0x3000fd of _0x1f71b7){_0x49e5f4[_0x3b26ba(0x294)](_0x3000fd,_0x3000fd===_0xb3b1db?new Set([_0xb3b1db]):new Set(_0x1f71b7));}let _0x3fa5ec=!![];while(_0x3fa5ec){_0x3fa5ec=![];for(const _0x1c4e02 of _0x1f71b7){if(_0x1c4e02===_0xb3b1db)continue;const _0x3bdcdd=(_0x5a3336[_0x3b26ba(0x28e)](_0x1c4e02)??[])['map'](_0x457635=>resolveEdgeEndpoint(_0x457635[_0x3b26ba(0x259)],_0x457635[_0x3b26ba(0x201)]))[_0x3b26ba(0x20c)](_0x533e9d=>Boolean(_0x533e9d&&_0x1f71b7[_0x3b26ba(0x29d)](_0x533e9d)));if(_0x3bdcdd[_0x3b26ba(0x2cc)]===0x0)continue;const _0x13020b=new Set(_0x49e5f4[_0x3b26ba(0x28e)](_0x3bdcdd[0x0])??[]);for(const _0x1cf6fb of _0x3bdcdd[_0x3b26ba(0x282)](0x1)){const _0x36fd72=_0x49e5f4[_0x3b26ba(0x28e)](_0x1cf6fb)??new Set();for(const _0x5d87aa of _0x13020b){if(!_0x36fd72[_0x3b26ba(0x29d)](_0x5d87aa))_0x13020b[_0x3b26ba(0x1d9)](_0x5d87aa);}}_0x13020b['add'](_0x1c4e02);const _0x4ca209=_0x49e5f4[_0x3b26ba(0x28e)](_0x1c4e02);!setsEqual(_0x4ca209,_0x13020b)&&(_0x49e5f4[_0x3b26ba(0x294)](_0x1c4e02,_0x13020b),_0x3fa5ec=!![]);}}for(const [_0x5490a3,_0x547943]of _0x1148d9){const _0x16e8a8=_0x49e5f4[_0x3b26ba(0x28e)](_0x5490a3);if(!_0x16e8a8)continue;for(const _0x211c63 of _0x547943){if(_0x211c63[_0x3b26ba(0x18c)]!==_0x3b26ba(0x277)||typeof _0x211c63[_0x3b26ba(0x25f)]!==_0x3b26ba(0x27d))continue;for(const [_0x4eefe3,_0x43e8db]of _0x8027d0){expressionReferencesVariable(_0x211c63[_0x3b26ba(0x25f)],_0x4eefe3)&&!_0x16e8a8[_0x3b26ba(0x29d)](_0x43e8db)&&_0x27fe15['push']({'path':(_0x25f1b5[_0x3b26ba(0x28e)](_0x211c63)??_0x3b26ba(0x176))+_0x3b26ba(0x19b),'message':_0x3b26ba(0x1d0)+_0x4eefe3+_0x3b26ba(0x283)+_0x43e8db+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x5490a3+'.'});}}}}function expressionReferencesVariable(_0x15b614,_0x1404d1){const _0x2812bb=a269_0x1c57b2,_0x211b1c=_0x1404d1[_0x2812bb(0x2b7)](/[.*+?^${}()|[\]\\]/g,_0x2812bb(0x1a3));return new RegExp(_0x2812bb(0x1ef)+_0x211b1c+_0x2812bb(0x234))[_0x2812bb(0x2dc)](_0x15b614);}function resolveEffectiveResultVariable(_0x2f22e5,_0x294737){const _0x25a831=a269_0x1c57b2;if(_0x2f22e5===undefined||_0x2f22e5===null||_0x294737&&_0x2f22e5==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x2f22e5!==_0x25a831(0x27d)||!VARIABLE_PATTERN[_0x25a831(0x2dc)](_0x2f22e5)||RESERVED_RESULT_VARIABLES[_0x25a831(0x29d)](_0x2f22e5)||_0x2f22e5['startsWith'](_0x25a831(0x253)))return undefined;return _0x2f22e5;}function registerResultVariableOwner(_0x18c643,_0x373c17,_0x2aa6c4,_0x523a40){const _0x4bb8d0=a269_0x1c57b2;if(_0x18c643[_0x4bb8d0(0x29d)](_0x373c17)){_0x523a40[_0x4bb8d0(0x24b)]({'path':'flowJson.nodes','message':_0x4bb8d0(0x240)+_0x373c17+'.'});return;}_0x18c643[_0x4bb8d0(0x294)](_0x373c17,_0x2aa6c4);}function setsEqual(_0x1d5e57,_0x80aefe){const _0x1187ce=a269_0x1c57b2;return _0x1d5e57[_0x1187ce(0x27c)]===_0x80aefe[_0x1187ce(0x27c)]&&[..._0x1d5e57][_0x1187ce(0x1da)](_0x2b357b=>_0x80aefe[_0x1187ce(0x29d)](_0x2b357b));}function isValidUserId(_0x3889ba){const _0x442fa2=a269_0x1c57b2;if(typeof _0x3889ba===_0x442fa2(0x27d))return _0x3889ba['trim']()[_0x442fa2(0x2cc)]>0x0;return Number[_0x442fa2(0x1ab)](_0x3889ba)&&Number(_0x3889ba)>0x0;}function resolveEdgeEndpoint(_0x14e724,_0x3ab808){const _0x46ede3=a269_0x1c57b2;if(typeof _0x14e724===_0x46ede3(0x27d)&&_0x14e724[_0x46ede3(0x2d3)]())return _0x14e724[_0x46ede3(0x2d3)]();if(typeof _0x3ab808==='string'&&_0x3ab808[_0x46ede3(0x2d3)]())return _0x3ab808[_0x46ede3(0x2d3)]();return undefined;}function removeEmptyMetadata(_0x3914c2,_0x30586a,_0x1a46e5,_0x5b97e4){const _0x3dcc45=a269_0x1c57b2;if(Array[_0x3dcc45(0x230)](_0x3914c2)){_0x3914c2[_0x3dcc45(0x197)]((_0x685ba,_0x5e32b9)=>removeEmptyMetadata(_0x685ba,_0x30586a+'['+_0x5e32b9+']',_0x1a46e5,_0x5b97e4));return;}if(!isRecord(_0x3914c2))return;for(const [_0x166a86,_0x353d24]of Object['entries'](_0x3914c2)){const _0x15d4e9=_0x30586a+'.'+_0x166a86;if(_0x166a86===_0x3dcc45(0x2ac)&&isEmptyJsonValue(_0x353d24)){delete _0x3914c2[_0x166a86],_0x5b97e4[_0x3dcc45(0x24b)](_0x15d4e9),_0x1a46e5[_0x3dcc45(0x24b)]({'code':_0x3dcc45(0x2e1),'path':_0x15d4e9,'message':_0x15d4e9+_0x3dcc45(0x2c4)});continue;}removeEmptyMetadata(_0x353d24,_0x15d4e9,_0x1a46e5,_0x5b97e4);}}function isEmptyJsonValue(_0x183ab0){const _0x306d2e=a269_0x1c57b2;if(_0x183ab0===null||_0x183ab0===undefined)return!![];if(typeof _0x183ab0===_0x306d2e(0x27d))return _0x183ab0[_0x306d2e(0x2d3)]()==='';if(Array[_0x306d2e(0x230)](_0x183ab0))return _0x183ab0['length']===0x0;return isRecord(_0x183ab0)&&Object[_0x306d2e(0x220)](_0x183ab0)[_0x306d2e(0x2cc)]===0x0;}function isRecord(_0x20e523){const _0x221c54=a269_0x1c57b2;return typeof _0x20e523===_0x221c54(0x23f)&&_0x20e523!==null&&!Array[_0x221c54(0x230)](_0x20e523);}function cloneJsonValue(_0x2f6335){const _0x3a74be=a269_0x1c57b2;return JSON[_0x3a74be(0x1ce)](JSON[_0x3a74be(0x293)](_0x2f6335));}export async function readFlowConfigFile(_0x18ef00){const _0x2b3c25=a269_0x1c57b2,_0x7a9706=await readFile(resolve(_0x18ef00),_0x2b3c25(0x1d7));return JSON['parse'](_0x7a9706);}
|
|
1
|
+
const a281_0x358266=a281_0x4a08;(function(_0x255704,_0x1e7c19){const _0x11d309=a281_0x4a08,_0x335f09=_0x255704();while(!![]){try{const _0x4bed74=-parseInt(_0x11d309(0x250))/0x1+parseInt(_0x11d309(0x171))/0x2+-parseInt(_0x11d309(0x117))/0x3+-parseInt(_0x11d309(0x148))/0x4+-parseInt(_0x11d309(0x17d))/0x5+parseInt(_0x11d309(0x1bb))/0x6*(-parseInt(_0x11d309(0x164))/0x7)+parseInt(_0x11d309(0x16f))/0x8;if(_0x4bed74===_0x1e7c19)break;else _0x335f09['push'](_0x335f09['shift']());}catch(_0x24fc17){_0x335f09['push'](_0x335f09['shift']());}}}(a281_0x445b,0x39853));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':a281_0x358266(0x1e9),'$id':a281_0x358266(0x260),'title':a281_0x358266(0x136),'type':'object','required':[a281_0x358266(0x1e6),a281_0x358266(0x177),a281_0x358266(0x1fb)],'$defs':{'userId':{'anyOf':[{'type':a281_0x358266(0x19d),'minLength':0x1},{'type':a281_0x358266(0x221),'minimum':0x1}]},'position':{'type':a281_0x358266(0x1c7),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a281_0x358266(0x1f8),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x114),a281_0x358266(0x161)],'properties':{'value':{'type':a281_0x358266(0x221),'minimum':0x1},'unit':{'enum':[a281_0x358266(0x21a),a281_0x358266(0x113),'HOURS',a281_0x358266(0x120)]}},'additionalProperties':!![]},'flowNode':{'type':a281_0x358266(0x1c7),'required':['id','type','name',a281_0x358266(0x208)],'properties':{'id':{'type':a281_0x358266(0x19d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':['START',a281_0x358266(0x207),a281_0x358266(0x1a8),a281_0x358266(0x20c),'SCRIPT',a281_0x358266(0x251)]},'name':{'type':a281_0x358266(0x19d),'minLength':0x1},'pageId':{'type':a281_0x358266(0x221),'minimum':0x1},'position':{'$ref':a281_0x358266(0x144)},'approvalMode':{'enum':[a281_0x358266(0x15f),a281_0x358266(0x110),a281_0x358266(0x10c)]},'taskMode':{'enum':[a281_0x358266(0x1a8),a281_0x358266(0x17a)]},'assignee':{'type':'object','required':[a281_0x358266(0x1a9)],'properties':{'strategy':{'enum':[a281_0x358266(0x1f6),a281_0x358266(0x191)]},'userIds':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x1c4)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a281_0x358266(0x14f)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x1a9),a281_0x358266(0x1b4)],'properties':{'strategy':{'const':a281_0x358266(0x1f6)},'userIds':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x1c4)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a281_0x358266(0x1cc),a281_0x358266(0x1a1)]},'scriptName':{'type':a281_0x358266(0x19d),'minLength':0x1},'resultVariable':{'type':a281_0x358266(0x19d),'pattern':a281_0x358266(0x149)},'async':{'type':a281_0x358266(0x1c7),'properties':{'enabled':{'type':a281_0x358266(0x13b)},'retryCount':{'type':a281_0x358266(0x221),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a281_0x358266(0x1d9)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a281_0x358266(0x13b)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':['AUTO_APPROVE',a281_0x358266(0x175),a281_0x358266(0x12f)]},'interrupting':{'type':a281_0x358266(0x13b)},'scriptName':{'type':a281_0x358266(0x19d),'minLength':0x1},'resultVariable':{'type':'string','pattern':a281_0x358266(0x149)}},'additionalProperties':!![]},'cc':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x24c)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a281_0x358266(0x199),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a281_0x358266(0x1c2),a281_0x358266(0x1e0)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a281_0x358266(0x19d),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a281_0x358266(0x1f2)]},'template':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x128),a281_0x358266(0x26e)],'properties':{'title':{'type':a281_0x358266(0x19d),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a281_0x358266(0x19d)},'facts':{'type':'array','maxItems':0x8,'items':{'type':'object','required':[a281_0x358266(0x198),a281_0x358266(0x114)],'properties':{'label':{'type':a281_0x358266(0x19d),'minLength':0x1},'value':{'type':a281_0x358266(0x19d),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a281_0x358266(0x199),'maxItems':0x2,'items':{'type':'object','required':['text',a281_0x358266(0x259)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a281_0x358266(0x19d),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a281_0x358266(0x199),'items':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x1ed),a281_0x358266(0x114)],'properties':{'type':{'enum':[a281_0x358266(0x232),'ROLE',a281_0x358266(0x1d0)]},'value':{'type':a281_0x358266(0x19d),'minLength':0x1},'role':{'enum':['TO','CC',a281_0x358266(0x262)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a281_0x358266(0x1c7),'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':'string','minLength':0x1},'target':{'type':a281_0x358266(0x19d),'minLength':0x1},'sourceNodeId':{'type':a281_0x358266(0x19d),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a281_0x358266(0x184),a281_0x358266(0x1cc),a281_0x358266(0x1a1),a281_0x358266(0x150)]},'expression':{'type':a281_0x358266(0x19d)},'defaultFlow':{'type':a281_0x358266(0x13b)},'name':{'type':a281_0x358266(0x19d)},'waypoints':{'type':'array','items':{'$ref':a281_0x358266(0x144)}}},'allOf':[{'anyOf':[{'required':[a281_0x358266(0x166)]},{'required':[a281_0x358266(0x1ca)]}]},{'anyOf':[{'required':[a281_0x358266(0x17b)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a281_0x358266(0x19d),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a281_0x358266(0x21d),a281_0x358266(0x15d)]},'datasetCode':{'type':a281_0x358266(0x19d),'minLength':0x1},'pageId':{'type':a281_0x358266(0x221)},'templateName':![],'flowJson':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x216),a281_0x358266(0x1af)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a281_0x358266(0x19d),'const':'approval.simple-flow.v1','description':a281_0x358266(0x1e5)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a281_0x358266(0x23e)},'startPageId':{'type':a281_0x358266(0x221),'minimum':0x1},'nodes':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x14d)}},'edges':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x26b)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a281_0x358266(0x1a6),a281_0x358266(0x1e6),a281_0x358266(0x190),a281_0x358266(0x269),a281_0x358266(0x20e),a281_0x358266(0x160),a281_0x358266(0x11e)],REMOVED_ROOT_FIELDS=['id',a281_0x358266(0x20e),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a281_0x358266(0x1e3),NODE_TYPES=new Set(['START','END',a281_0x358266(0x1a8),a281_0x358266(0x20c),a281_0x358266(0x10d),a281_0x358266(0x251)]),CONDITION_TYPES=new Set([a281_0x358266(0x184),a281_0x358266(0x1cc),a281_0x358266(0x1a1),a281_0x358266(0x150)]),APPROVAL_MODES=new Set([a281_0x358266(0x15f),a281_0x358266(0x110),a281_0x358266(0x10c)]),APPROVAL_TASK_MODES=new Set([a281_0x358266(0x1a8),a281_0x358266(0x17a)]),FLOW_TIME_UNITS=new Set([a281_0x358266(0x21a),'MINUTES',a281_0x358266(0x242),a281_0x358266(0x120)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a281_0x358266(0x11a),a281_0x358266(0x175),a281_0x358266(0x12f)]),FLOW_TYPES=new Set([a281_0x358266(0x21d),a281_0x358266(0x15d)]),FLOW_PAGE_MODES=new Set([a281_0x358266(0x23e),a281_0x358266(0x1ba)]),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([a281_0x358266(0x23d),a281_0x358266(0x1f2)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a281_0x358266(0x232),a281_0x358266(0x191),a281_0x358266(0x1d0)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a281_0x358266(0x262)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a281_0x358266(0x11d),UNSUPPORTED_FORM_MESSAGE=a281_0x358266(0x24d),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a281_0x358266(0x133),RESERVED_RESULT_VARIABLES=new Set([a281_0x358266(0x25a),'approved',a281_0x358266(0x1ec),a281_0x358266(0x212),a281_0x358266(0x215),a281_0x358266(0x267),a281_0x358266(0x209),'approval_sys_pageId',a281_0x358266(0x222),'approval_sys_dataId']);export function normalizeFlowConfig(_0x31ab34){const _0x539b4e=a281_0x358266;if(!isRecord(_0x31ab34))throw new TypeError(_0x539b4e(0x21c));const _0x5bc527=cloneJsonValue(_0x31ab34),_0x1712de=_0x5bc527[_0x539b4e(0x1fb)],_0x1a8e1b=isRecord(_0x1712de)?cloneJsonValue(_0x1712de):{},_0x5bc5ae=[],_0x34ee5a=[];for(const _0x1ca2b2 of REMOVED_ROOT_FIELDS){if(!Object[_0x539b4e(0x169)]['hasOwnProperty']['call'](_0x5bc527,_0x1ca2b2))continue;delete _0x5bc527[_0x1ca2b2],_0x34ee5a[_0x539b4e(0x1be)](_0x1ca2b2),_0x5bc5ae['push']({'code':_0x539b4e(0x1b5),'path':_0x1ca2b2,'message':_0x1ca2b2+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x729f43 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x539b4e(0x169)]['hasOwnProperty'][_0x539b4e(0x21f)](_0x1a8e1b,_0x729f43))continue;const _0x305b4=_0x539b4e(0x1cb)+_0x729f43;delete _0x1a8e1b[_0x729f43],_0x34ee5a[_0x539b4e(0x1be)](_0x305b4),_0x5bc5ae[_0x539b4e(0x1be)]({'code':_0x539b4e(0x1b5),'path':_0x305b4,'message':_0x305b4+_0x539b4e(0x167)});}if(Object[_0x539b4e(0x169)][_0x539b4e(0x1b2)][_0x539b4e(0x21f)](_0x1a8e1b,_0x539b4e(0x12d))){const _0x430972=_0x1a8e1b[_0x539b4e(0x12d)],_0x2c64c3=typeof _0x430972===_0x539b4e(0x19d)?_0x430972[_0x539b4e(0x1cf)]():_0x430972;if(isEmptyJsonValue(_0x430972)||_0x2c64c3===DEFAULT_FLOW_SCHEMA_VERSION){const _0x249550='flowJson.schemaVersion';delete _0x1a8e1b['schemaVersion'],_0x34ee5a[_0x539b4e(0x1be)](_0x249550),_0x5bc5ae[_0x539b4e(0x1be)]({'code':_0x539b4e(0x1b5),'path':_0x249550,'message':_0x249550+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x539b4e(0x202)});}}removeEmptyMetadata(_0x1a8e1b,_0x539b4e(0x1fb),_0x5bc5ae,_0x34ee5a);_0x5bc527[_0x539b4e(0x177)]===_0x539b4e(0x15d)&&!Object[_0x539b4e(0x169)][_0x539b4e(0x1b2)]['call'](_0x1a8e1b,_0x539b4e(0x241))&&(_0x1a8e1b[_0x539b4e(0x241)]=_0x539b4e(0x23e));_0x5bc527[_0x539b4e(0x1fb)]=_0x1a8e1b;if(typeof _0x5bc527[_0x539b4e(0x1e6)]===_0x539b4e(0x19d))_0x5bc527[_0x539b4e(0x1e6)]=_0x5bc527[_0x539b4e(0x1e6)][_0x539b4e(0x1cf)]();return{'config':_0x5bc527,'warnings':_0x5bc5ae,'removedPaths':_0x34ee5a};}export function validateFlowConfig(_0x299b0f){const _0x67f54b=a281_0x358266;let _0x32b1a2;try{_0x32b1a2=normalizeFlowConfig(_0x299b0f);}catch(_0x34f619){const _0x567ebd=_0x34f619 instanceof Error?_0x34f619[_0x67f54b(0x14c)]:String(_0x34f619),_0x4e21bc={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x567ebd}],'warnings':[],'normalized':_0x4e21bc,'validationConfig':_0x4e21bc};}const _0x132ada=_0x32b1a2[_0x67f54b(0x13c)],_0x2b9189=cloneJsonValue(_0x132ada),_0x437af6=_0x2b9189[_0x67f54b(0x1fb)];_0x437af6[_0x67f54b(0x234)]='__rabetbase_local_validation__',_0x437af6['flowName']=_0x132ada[_0x67f54b(0x1e6)];typeof _0x132ada[_0x67f54b(0x269)]==='string'&&_0x132ada[_0x67f54b(0x269)][_0x67f54b(0x1cf)]()&&(_0x437af6[_0x67f54b(0x190)]=_0x132ada[_0x67f54b(0x269)][_0x67f54b(0x1cf)]());const _0x5c734f=[];return validateOuterMetadata(_0x132ada,_0x5c734f),validateFlowClassification(_0x132ada,_0x5c734f),validateGraph(_0x132ada['flowJson'],_0x5c734f),{'valid':_0x5c734f[_0x67f54b(0x1bf)]===0x0,'errors':_0x5c734f,'warnings':_0x32b1a2[_0x67f54b(0x151)],'normalized':_0x132ada,'validationConfig':_0x2b9189};}function validateFlowClassification(_0x1b4411,_0x15c56c){const _0x5e49f2=a281_0x358266;if(!isRecord(_0x1b4411[_0x5e49f2(0x1fb)]))return;const _0x1c5dce=_0x1b4411[_0x5e49f2(0x177)],_0x46cb01=_0x1b4411['flowJson'][_0x5e49f2(0x241)];_0x46cb01!==undefined&&(typeof _0x46cb01!==_0x5e49f2(0x19d)||!FLOW_PAGE_MODES[_0x5e49f2(0x1f9)](_0x46cb01))&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':_0x5e49f2(0x1f4)+String(_0x46cb01)+'.'});_0x1c5dce==='FORM_FLOW'&&_0x46cb01!==undefined&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':_0x5e49f2(0x263)});_0x1c5dce===_0x5e49f2(0x15d)&&_0x46cb01===_0x5e49f2(0x1ba)&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x1c5dce===_0x5e49f2(0x21d)||_0x1c5dce===_0x5e49f2(0x15d))&&validateCustomPageNavigation(_0x1b4411,_0x1c5dce,_0x46cb01,_0x15c56c);if(_0x1c5dce!==_0x5e49f2(0x21d)||!Array[_0x5e49f2(0x121)](_0x1b4411[_0x5e49f2(0x1fb)][_0x5e49f2(0x216)]))return;_0x1b4411[_0x5e49f2(0x1fb)]['nodes'][_0x5e49f2(0x1d2)]((_0xc32cca,_0x381a45)=>{const _0x4859eb=_0x5e49f2;isRecord(_0xc32cca)&&_0xc32cca[_0x4859eb(0x1ed)]==='APPROVAL'&&_0xc32cca[_0x4859eb(0x231)]===_0x4859eb(0x17a)&&_0x15c56c[_0x4859eb(0x1be)]({'path':_0x4859eb(0x1b6)+_0x381a45+_0x4859eb(0x1cd),'message':_0x4859eb(0x20a)});});}function validateCustomPageNavigation(_0x8fe0b7,_0x20e27d,_0x45c734,_0x2b3e49){const _0x49673b=a281_0x358266,_0x3a000b=_0x8fe0b7[_0x49673b(0x1fb)]['startPageId'];_0x3a000b!==undefined&&(!Number[_0x49673b(0x1f5)](_0x3a000b)||_0x3a000b<=0x0)&&_0x2b3e49[_0x49673b(0x1be)]({'path':_0x49673b(0x19f),'message':_0x49673b(0x1d4)});const _0x3a6d27=Array[_0x49673b(0x121)](_0x8fe0b7[_0x49673b(0x1fb)]['nodes'])?_0x8fe0b7[_0x49673b(0x1fb)][_0x49673b(0x216)][_0x49673b(0x261)]((_0x1f46ca,_0x2132e4)=>({'node':_0x1f46ca,'index':_0x2132e4}))[_0x49673b(0x226)](({node:_0x4ad8c2})=>isRecord(_0x4ad8c2)&&_0x4ad8c2['pageId']!==undefined):[],_0x1c01b0=_0x3a000b!==undefined||_0x3a6d27[_0x49673b(0x1bf)]>0x0,_0x37c2b2=_0x45c734===undefined&&_0x20e27d===_0x49673b(0x15d)?_0x49673b(0x23e):_0x45c734;_0x1c01b0&&(_0x20e27d!==_0x49673b(0x15d)||_0x37c2b2!==_0x49673b(0x23e))&&(_0x3a000b!==undefined&&_0x2b3e49[_0x49673b(0x1be)]({'path':_0x49673b(0x19f),'message':'startPageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x3a6d27[_0x49673b(0x1d2)](({index:_0x323cf1})=>{const _0x55b630=_0x49673b;_0x2b3e49[_0x55b630(0x1be)]({'path':_0x55b630(0x1b6)+_0x323cf1+'].pageId','message':_0x55b630(0x181)});}));}export async function writeNormalizedFlowConfig(_0x13057b,_0x5cc175,_0x554e48={}){const _0x2832a6=a281_0x358266,_0xb46651=resolve(_0x13057b),_0x32049f=_0xb46651+'.'+process[_0x2832a6(0x1e4)]+'.'+randomUUID()+_0x2832a6(0x17c),_0x223f3e=JSON[_0x2832a6(0x194)](_0x5cc175,null,0x2)+'\x0a';let _0x42a365;try{try{_0x42a365=(await stat(_0xb46651))[_0x2832a6(0x122)]&0x1ff;}catch{_0x42a365=undefined;}await writeFile(_0x32049f,_0x223f3e,{'encoding':_0x2832a6(0x138),'flag':'wx','mode':_0x42a365??0x1a4});if(_0x42a365!==undefined)await chmod(_0x32049f,_0x42a365);_0x554e48[_0x2832a6(0x16a)]===![]?(await link(_0x32049f,_0xb46651),await unlink(_0x32049f)):await rename(_0x32049f,_0xb46651);}finally{await unlink(_0x32049f)[_0x2832a6(0x132)](()=>undefined);}}function validateOuterMetadata(_0x1f4f7c,_0x69f7e2){const _0x386935=a281_0x358266;(typeof _0x1f4f7c[_0x386935(0x1e6)]!==_0x386935(0x19d)||_0x1f4f7c[_0x386935(0x1e6)][_0x386935(0x1cf)]()==='')&&_0x69f7e2['push']({'path':_0x386935(0x1e6),'message':_0x386935(0x1ae)});_0x1f4f7c['flowDesc']!==undefined&&typeof _0x1f4f7c[_0x386935(0x246)]!==_0x386935(0x19d)&&_0x69f7e2['push']({'path':_0x386935(0x246),'message':_0x386935(0x213)});if(_0x1f4f7c['flowType']===undefined||_0x1f4f7c[_0x386935(0x177)]===null)_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x177),'message':_0x386935(0x12b)});else(typeof _0x1f4f7c[_0x386935(0x177)]!==_0x386935(0x19d)||!FLOW_TYPES[_0x386935(0x1f9)](_0x1f4f7c[_0x386935(0x177)]))&&_0x69f7e2['push']({'path':_0x386935(0x177),'message':_0x386935(0x15c)+String(_0x1f4f7c[_0x386935(0x177)])+'.'});_0x1f4f7c[_0x386935(0x269)]!==undefined&&typeof _0x1f4f7c['datasetCode']!=='string'&&_0x69f7e2['push']({'path':'datasetCode','message':_0x386935(0x116)}),_0x1f4f7c['pageId']!==undefined&&(!Number['isInteger'](_0x1f4f7c['pageId'])||_0x1f4f7c[_0x386935(0x160)]<0x0)&&_0x69f7e2[_0x386935(0x1be)]({'path':'pageId','message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x1f4f7c[_0x386935(0x177)]==='INDEPENDENT_FLOW'&&_0x1f4f7c['datasetCode']!==undefined&&_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x269),'message':_0x386935(0x205)}),_0x1f4f7c[_0x386935(0x177)]==='INDEPENDENT_FLOW'&&_0x1f4f7c['pageId']!==undefined&&_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x160),'message':_0x386935(0x1a7)});}function validateGraph(_0x3f0b7e,_0x8d9cd1){const _0x9bfbeb=a281_0x358266;if(!isRecord(_0x3f0b7e)){_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':'flowJson','message':_0x9bfbeb(0x1f7)});return;}!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x216)])&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x192)});!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x1af)])&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x17e),'message':_0x9bfbeb(0x1d3)});Object[_0x9bfbeb(0x169)][_0x9bfbeb(0x1b2)][_0x9bfbeb(0x21f)](_0x3f0b7e,_0x9bfbeb(0x12d))&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x203),'message':_0x9bfbeb(0x200)+String(_0x3f0b7e[_0x9bfbeb(0x12d)])+_0x9bfbeb(0x143)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x218cfb of[_0x9bfbeb(0x1c9),'formDefinitions',_0x9bfbeb(0x1ef)]){Object['prototype'][_0x9bfbeb(0x1b2)][_0x9bfbeb(0x21f)](_0x3f0b7e,_0x218cfb)&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1cb)+_0x218cfb,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x216)])||!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x1af)]))return;const _0x5e5b89=new Map(),_0x25f793=[],_0x1077b7=[],_0xd31a83=new Map(),_0x2e5606=new Map(),_0x707960=new Set();let _0x3bbbeb=0x0;_0x3f0b7e[_0x9bfbeb(0x216)][_0x9bfbeb(0x1d2)]((_0x235197,_0x158832)=>{const _0x385f17=_0x9bfbeb,_0x274162=_0x385f17(0x1b6)+_0x158832+']';if(!isRecord(_0x235197)){_0x8d9cd1['push']({'path':_0x274162,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x5cf5bf=_0x235197;if(typeof _0x5cf5bf['id']!=='string'||!BPMN_ID_PATTERN[_0x385f17(0x26d)](_0x5cf5bf['id']))_0x8d9cd1['push']({'path':_0x274162+'.id','message':_0x385f17(0x14e)});else _0x5e5b89['has'](_0x5cf5bf['id'])?_0x8d9cd1['push']({'path':_0x274162+_0x385f17(0x142),'message':_0x385f17(0x1fc)+_0x5cf5bf['id']+'.'}):(_0x5e5b89[_0x385f17(0x1ce)](_0x5cf5bf['id'],_0x5cf5bf),_0x707960[_0x385f17(0x18d)](_0x5cf5bf['id']));if(!NODE_TYPES[_0x385f17(0x1f9)](_0x5cf5bf[_0x385f17(0x1ed)]))_0x8d9cd1['push']({'path':_0x274162+'.type','message':_0x385f17(0x170)+String(_0x5cf5bf[_0x385f17(0x1ed)])+'.'});else{if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x126))_0x25f793[_0x385f17(0x1be)](_0x5cf5bf['id']);else _0x5cf5bf['type']===_0x385f17(0x207)&&_0x1077b7[_0x385f17(0x1be)](_0x5cf5bf['id']);}_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x1a8)&&(_0x5cf5bf[_0x385f17(0x231)]===undefined||_0x5cf5bf['taskMode']==='APPROVAL')&&(_0x3bbbeb+=0x1);validateNode(_0x5cf5bf,_0x274162,_0x8d9cd1);if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x10d)){const _0x58b590=resolveEffectiveResultVariable(_0x5cf5bf[_0x385f17(0x1c5)],![]);_0x58b590&&(registerResultVariableOwner(_0x2e5606,_0x58b590,_0x5cf5bf['id'],_0x8d9cd1),!_0xd31a83['has'](_0x58b590)&&_0xd31a83[_0x385f17(0x1ce)](_0x58b590,_0x5cf5bf['id']));}if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x1a8)&&isRecord(_0x5cf5bf[_0x385f17(0x23f)])&&_0x5cf5bf['timeout'][_0x385f17(0x1f0)]===!![]&&_0x5cf5bf[_0x385f17(0x23f)][_0x385f17(0x238)]===_0x385f17(0x12f)){const _0x6f3415=resolveEffectiveResultVariable(_0x5cf5bf[_0x385f17(0x23f)]['resultVariable'],!![]);_0x6f3415&®isterResultVariableOwner(_0x2e5606,_0x6f3415,_0x5cf5bf['id']+_0x385f17(0x15b),_0x8d9cd1);}});_0x25f793[_0x9bfbeb(0x1bf)]!==0x1&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x1ad)});_0x1077b7['length']===0x0&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x16c)});const _0x10fe98=new Map(),_0x2ab481=new Map(),_0xa13df3=new Map(),_0x32611d=new Set();_0x3f0b7e[_0x9bfbeb(0x1af)][_0x9bfbeb(0x1d2)]((_0x5afae7,_0x545cdc)=>{const _0x20fe32=_0x9bfbeb,_0x56782a=_0x20fe32(0x22a)+_0x545cdc+']';if(!isRecord(_0x5afae7)){_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a,'message':_0x20fe32(0x229)});return;}const _0xd8b1ae=_0x5afae7;_0xa13df3[_0x20fe32(0x1ce)](_0xd8b1ae,_0x56782a);const _0x19ae2d=resolveEdgeEndpoint(_0xd8b1ae[_0x20fe32(0x166)],_0xd8b1ae[_0x20fe32(0x1ca)]),_0x2e7d06=resolveEdgeEndpoint(_0xd8b1ae[_0x20fe32(0x17b)],_0xd8b1ae['targetNodeId']);if(!_0x19ae2d)_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a+_0x20fe32(0x1bd),'message':_0x20fe32(0x153)});if(!_0x2e7d06)_0x8d9cd1['push']({'path':_0x56782a+_0x20fe32(0x1ee),'message':'edge\x20target\x20is\x20required.'});_0x19ae2d&&!_0x5e5b89[_0x20fe32(0x1f9)](_0x19ae2d)&&_0x8d9cd1['push']({'path':_0x56782a+'.source','message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x19ae2d+'.'});_0x2e7d06&&!_0x5e5b89[_0x20fe32(0x1f9)](_0x2e7d06)&&_0x8d9cd1['push']({'path':_0x56782a+_0x20fe32(0x1ee),'message':_0x20fe32(0x14b)+_0x2e7d06+'.'});if(_0xd8b1ae['id']!==undefined){if(typeof _0xd8b1ae['id']!=='string'||!BPMN_ID_PATTERN[_0x20fe32(0x26d)](_0xd8b1ae['id']))_0x8d9cd1['push']({'path':_0x56782a+'.id','message':_0x20fe32(0x1b8)});else{if(_0x707960[_0x20fe32(0x1f9)](_0xd8b1ae['id']))_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a+_0x20fe32(0x142),'message':_0x20fe32(0x15a)+_0xd8b1ae['id']+'.'});else!_0x707960[_0x20fe32(0x1f9)](_0xd8b1ae['id'])&&_0x707960[_0x20fe32(0x18d)](_0xd8b1ae['id']);}}if(_0x19ae2d&&_0x2e7d06){const _0x485acb=_0x19ae2d+'\x00'+_0x2e7d06+'\x00'+(_0xd8b1ae['conditionType']??_0x20fe32(0x184));_0x32611d['has'](_0x485acb)?_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a,'message':_0x20fe32(0x26c)+_0x19ae2d+_0x20fe32(0x10f)+_0x2e7d06+'\x20('+(_0xd8b1ae['conditionType']??_0x20fe32(0x184))+').'}):_0x32611d[_0x20fe32(0x18d)](_0x485acb);}validateEdge(_0xd8b1ae,_0x56782a,_0x8d9cd1),_0x19ae2d&&_0x2e7d06&&(_0x10fe98[_0x20fe32(0x1b3)](_0x19ae2d)?.[_0x20fe32(0x1be)](_0xd8b1ae)??_0x10fe98['set'](_0x19ae2d,[_0xd8b1ae]),_0x2ab481['get'](_0x2e7d06)?.[_0x20fe32(0x1be)](_0xd8b1ae)??_0x2ab481[_0x20fe32(0x1ce)](_0x2e7d06,[_0xd8b1ae]));});if(_0x25f793[_0x9bfbeb(0x1bf)]!==0x1)return;validateGraphShape(_0x5e5b89,_0x25f793[0x0],_0x1077b7,_0x10fe98,_0x2ab481,_0xa13df3,_0x8d9cd1),validateScriptResultReferences(_0x5e5b89,_0x25f793[0x0],_0x10fe98,_0x2ab481,_0xa13df3,_0xd31a83,_0x8d9cd1),validateApprovalResults(_0x5e5b89,_0x3bbbeb,_0x1077b7,_0x8d9cd1);}function validateNode(_0x3272f4,_0x430f12,_0x334fd2){const _0x2041a6=a281_0x358266;for(const _0x1fb263 of[_0x2041a6(0x147),'formPermission']){Object[_0x2041a6(0x169)]['hasOwnProperty']['call'](_0x3272f4,_0x1fb263)&&_0x334fd2['push']({'path':_0x430f12+'.'+_0x1fb263,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x2041a6(0x1f9)](_0x3272f4['type']))return;(typeof _0x3272f4[_0x2041a6(0x193)]!==_0x2041a6(0x19d)||_0x3272f4['name'][_0x2041a6(0x1cf)]()==='')&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x24b),'message':_0x2041a6(0x146)});if(_0x3272f4[_0x2041a6(0x160)]!==undefined){if(!Number['isSafeInteger'](_0x3272f4[_0x2041a6(0x160)])||_0x3272f4['pageId']<=0x0)_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x239),'message':_0x2041a6(0x1e8)});else _0x3272f4[_0x2041a6(0x1ed)]!==_0x2041a6(0x1a8)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x239),'message':'node\x20pageId\x20is\x20supported\x20only\x20on\x20APPROVAL\x20user\x20tasks.'});}const _0x1665c1=_0x3272f4[_0x2041a6(0x208)];if(!isRecord(_0x1665c1))_0x334fd2['push']({'path':_0x430f12+'.position','message':_0x2041a6(0x187)});else for(const _0x4542c8 of['x','y']){const _0x4e1518=_0x1665c1[_0x4542c8];(typeof _0x4e1518!==_0x2041a6(0x1f8)||!Number[_0x2041a6(0x19e)](_0x4e1518)||_0x4e1518<0x0)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.position.'+_0x4542c8,'message':'position.'+_0x4542c8+_0x2041a6(0x1fa)});}if(_0x3272f4[_0x2041a6(0x1ed)]===_0x2041a6(0x1a8)){const _0x2cfa42=_0x3272f4['approvalMode']??'SINGLE',_0x5091d5=_0x3272f4[_0x2041a6(0x231)]??_0x2041a6(0x1a8);!APPROVAL_TASK_MODES['has'](_0x5091d5)&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x264),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x5091d5)+'.'});!APPROVAL_MODES[_0x2041a6(0x1f9)](_0x2cfa42)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x256),'message':_0x2041a6(0x25d)+String(_0x2cfa42)+'.'});if(!isRecord(_0x3272f4['assignee']))_0x334fd2['push']({'path':_0x430f12+'.assignee','message':_0x2041a6(0x228)});else{const _0x461756=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1a9)];_0x461756!=='FIXED'&&_0x461756!==_0x2041a6(0x191)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.assignee.strategy','message':_0x2041a6(0x22c)});if(_0x461756==='FIXED'){const _0x3b7895=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1b4)];if(!Array['isArray'](_0x3b7895)||_0x3b7895[_0x2041a6(0x1bf)]===0x0)_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x1a5),'message':_0x2041a6(0x266)});else{const _0x110cfd=_0x3b7895[_0x2041a6(0x254)](_0x3e3ed5=>!isValidUserId(_0x3e3ed5));_0x110cfd>=0x0&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x1c1)+_0x110cfd+']','message':_0x2041a6(0x1e1)});const _0xcdf586=new Set(_0x3b7895['filter'](isValidUserId)[_0x2041a6(0x261)](_0x2cb883=>String(_0x2cb883)['trim']()));_0x2cfa42===_0x2041a6(0x15f)&&_0xcdf586[_0x2041a6(0x134)]>0x1&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x1a5),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x461756===_0x2041a6(0x191)){const _0x4e7f3a=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1c8)],_0x3a0927=typeof _0x4e7f3a===_0x2041a6(0x1f8)||typeof _0x4e7f3a==='string'?Number(String(_0x4e7f3a)[_0x2041a6(0x1cf)]()):Number[_0x2041a6(0x13d)];(!Number[_0x2041a6(0x1f5)](_0x3a0927)||_0x3a0927<=0x0)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.assignee.roleId','message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x3272f4[_0x2041a6(0x219)]!==undefined){if(!isRecord(_0x3272f4[_0x2041a6(0x219)]))_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x220),'message':_0x2041a6(0x227)});else{if(_0x3272f4[_0x2041a6(0x219)][_0x2041a6(0x1a9)]!=='FIXED')_0x334fd2['push']({'path':_0x430f12+'.transferCandidates.strategy','message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x5cd958=_0x3272f4[_0x2041a6(0x219)][_0x2041a6(0x1b4)];if(!Array[_0x2041a6(0x121)](_0x5cd958)||_0x5cd958['length']===0x0)_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x182),'message':_0x2041a6(0x25b)});else{const _0x419bd4=_0x5cd958[_0x2041a6(0x254)](_0x110a09=>!isValidUserId(_0x110a09));_0x419bd4>=0x0&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x22d)+_0x419bd4+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x3272f4[_0x2041a6(0x18f)]!==undefined&&typeof _0x3272f4[_0x2041a6(0x18f)]!==_0x2041a6(0x13b)&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x16e),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x3272f4[_0x2041a6(0x1ed)]==='SCRIPT'){(typeof _0x3272f4[_0x2041a6(0x253)]!==_0x2041a6(0x19d)||_0x3272f4['scriptName'][_0x2041a6(0x1cf)]()==='')&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.scriptName','message':_0x2041a6(0x235)});if(_0x3272f4[_0x2041a6(0x1c5)]!==undefined){if(typeof _0x3272f4['resultVariable']!==_0x2041a6(0x19d)||!VARIABLE_PATTERN[_0x2041a6(0x26d)](_0x3272f4[_0x2041a6(0x1c5)]))_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x24e),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2041a6(0x1f9)](_0x3272f4[_0x2041a6(0x1c5)])||_0x3272f4[_0x2041a6(0x1c5)][_0x2041a6(0x1d7)](_0x2041a6(0x139)))&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x24e),'message':'Reserved\x20resultVariable:\x20'+_0x3272f4[_0x2041a6(0x1c5)]+'.'});}}validateAsyncExecution(_0x3272f4,_0x430f12,_0x334fd2),validateApprovalTimeout(_0x3272f4,_0x430f12,_0x334fd2),validateCcConfig(_0x3272f4,_0x430f12,_0x334fd2),_0x3272f4[_0x2041a6(0x1ed)]===_0x2041a6(0x251)&&validateNotificationConfig(_0x3272f4[_0x2041a6(0x13c)],_0x430f12+'.config',_0x334fd2);}function validateAsyncExecution(_0x58e15f,_0x2a7aab,_0x2c0b5a){const _0x5790a6=a281_0x358266;if(_0x58e15f[_0x5790a6(0x162)]===undefined)return;if(!isRecord(_0x58e15f['async'])){_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1a3),'message':_0x5790a6(0x248)});return;}if(_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x1f0)]!==undefined&&typeof _0x58e15f[_0x5790a6(0x162)]['enabled']!==_0x5790a6(0x13b)){_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1c0),'message':_0x5790a6(0x115)});return;}if(_0x58e15f['async']['enabled']!==!![])return;_0x58e15f[_0x5790a6(0x1ed)]!==_0x5790a6(0x10d)&&_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1a3),'message':_0x5790a6(0x1bc)});const _0x34b8fa=_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x20b)]??0x3;(!Number[_0x5790a6(0x168)](_0x34b8fa)||_0x34b8fa<0x1||_0x34b8fa>MAX_ASYNC_RETRY_COUNT)&&_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x11b),'message':_0x5790a6(0x195)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x206)]!==undefined&&validateTimeAmount(_0x58e15f[_0x5790a6(0x162)]['retryInterval'],_0x2a7aab+'.async.retryInterval',_0x2c0b5a);}function validateApprovalTimeout(_0x21fa98,_0x48e6c0,_0x3d77c8){const _0x7a469=a281_0x358266;if(_0x21fa98[_0x7a469(0x23f)]===undefined)return;if(!isRecord(_0x21fa98[_0x7a469(0x23f)])){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x15b),'message':_0x7a469(0x127)});return;}if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1f0)]!==undefined&&typeof _0x21fa98['timeout'][_0x7a469(0x1f0)]!==_0x7a469(0x13b)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+'.timeout.enabled','message':_0x7a469(0x141)});return;}if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1f0)]!==!![])return;if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x13a)]!==undefined&&typeof _0x21fa98[_0x7a469(0x23f)][_0x7a469(0x13a)]!==_0x7a469(0x13b)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x240),'message':_0x7a469(0x19a)});return;}_0x21fa98[_0x7a469(0x1ed)]!==_0x7a469(0x1a8)&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+'.timeout','message':_0x7a469(0x18c)});validateTimeAmount(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1ff)],_0x48e6c0+'.timeout.duration',_0x3d77c8);const _0xe4bdff=_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x238)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x7a469(0x1f9)](_0xe4bdff)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x22b),'message':_0x7a469(0x123)});return;}(_0x21fa98['taskMode']??_0x7a469(0x1a8))===_0x7a469(0x17a)&&_0xe4bdff!=='EXECUTE_BFF'&&_0x3d77c8['push']({'path':_0x48e6c0+_0x7a469(0x22b),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x184b8b=_0x21fa98['timeout'][_0x7a469(0x13a)]??_0xe4bdff!==_0x7a469(0x12f);if(_0xe4bdff===_0x7a469(0x12f))_0x184b8b&&_0x3d77c8['push']({'path':_0x48e6c0+_0x7a469(0x240),'message':_0x7a469(0x245)}),(typeof _0x21fa98[_0x7a469(0x23f)][_0x7a469(0x253)]!==_0x7a469(0x19d)||_0x21fa98['timeout'][_0x7a469(0x253)]['trim']()==='')&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x174),'message':_0x7a469(0x159)}),validateOptionalResultVariable(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1c5)],_0x48e6c0+_0x7a469(0x233),_0x3d77c8);else!_0x184b8b&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x240),'message':_0xe4bdff+_0x7a469(0x265)});}function validateTimeAmount(_0x7b10bb,_0x13c963,_0x393879){const _0x946b25=a281_0x358266;if(!isRecord(_0x7b10bb)){_0x393879[_0x946b25(0x1be)]({'path':_0x13c963,'message':_0x946b25(0x236)});return;}(!Number[_0x946b25(0x168)](_0x7b10bb[_0x946b25(0x114)])||Number(_0x7b10bb[_0x946b25(0x114)])<=0x0)&&_0x393879[_0x946b25(0x1be)]({'path':_0x13c963+'.value','message':_0x946b25(0x26a)}),!FLOW_TIME_UNITS[_0x946b25(0x1f9)](_0x7b10bb['unit'])&&_0x393879['push']({'path':_0x13c963+_0x946b25(0x14a),'message':_0x946b25(0x158)});}function validateOptionalResultVariable(_0x4021e3,_0x59779a,_0x1fa597){const _0x1fbd82=a281_0x358266;if(_0x4021e3===undefined||_0x4021e3===null||_0x4021e3==='')return;if(typeof _0x4021e3!==_0x1fbd82(0x19d)||!VARIABLE_PATTERN[_0x1fbd82(0x26d)](_0x4021e3))_0x1fa597[_0x1fbd82(0x1be)]({'path':_0x59779a,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x1fbd82(0x1f9)](_0x4021e3)||_0x4021e3[_0x1fbd82(0x1d7)](_0x1fbd82(0x139)))&&_0x1fa597[_0x1fbd82(0x1be)]({'path':_0x59779a,'message':'Reserved\x20resultVariable:\x20'+_0x4021e3+'.'});}function validateCcConfig(_0x550bb3,_0x1d95e8,_0x3c6dd9){const _0xa97f0a=a281_0x358266;if(_0x550bb3['cc']===undefined)return;if(!isRecord(_0x550bb3['cc'])){_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x13e),'message':_0xa97f0a(0x15e)});return;}_0x550bb3[_0xa97f0a(0x1ed)]!==_0xa97f0a(0x207)&&_0x550bb3[_0xa97f0a(0x1ed)]!==_0xa97f0a(0x1a8)&&_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x13e),'message':_0xa97f0a(0x16b)});Object[_0xa97f0a(0x169)][_0xa97f0a(0x1b2)]['call'](_0x550bb3['cc'],'readSources')&&_0x3c6dd9['push']({'path':_0x1d95e8+_0xa97f0a(0x1e7),'message':UNSUPPORTED_FORM_MESSAGE});const _0x278171=_0x550bb3['cc']['recipientUserIds'];if(!Array[_0xa97f0a(0x121)](_0x278171)||_0x278171[_0xa97f0a(0x1bf)]===0x0)_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x21b),'message':_0xa97f0a(0x225)});else{_0x278171['length']>MAX_CC_RECIPIENTS&&_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x21b),'message':_0xa97f0a(0x19b)+MAX_CC_RECIPIENTS+_0xa97f0a(0x137)});const _0x12e08a=new Set();_0x278171['forEach']((_0x2440e7,_0x180b09)=>{const _0x1ad520=_0xa97f0a;if(typeof _0x2440e7!==_0x1ad520(0x19d)||_0x2440e7[_0x1ad520(0x1cf)]()==='')_0x3c6dd9[_0x1ad520(0x1be)]({'path':_0x1d95e8+_0x1ad520(0x224)+_0x180b09+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x12e08a[_0x1ad520(0x1f9)](_0x2440e7[_0x1ad520(0x1cf)]())?_0x3c6dd9[_0x1ad520(0x1be)]({'path':_0x1d95e8+_0x1ad520(0x224)+_0x180b09+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x2440e7[_0x1ad520(0x1cf)]()+'.'}):_0x12e08a[_0x1ad520(0x18d)](_0x2440e7[_0x1ad520(0x1cf)]());});}validateStringArray(_0x550bb3['cc'][_0xa97f0a(0x1ea)],_0x1d95e8+_0xa97f0a(0x17f),_0x3c6dd9);}function validateStringArray(_0xcdeaf1,_0x3fd1ac,_0x3e0dec){const _0x5e3aec=a281_0x358266;if(_0xcdeaf1===undefined)return;if(!Array['isArray'](_0xcdeaf1)){_0x3e0dec[_0x5e3aec(0x1be)]({'path':_0x3fd1ac,'message':_0x5e3aec(0x1f3)});return;}const _0x3f2da1=new Set();_0xcdeaf1['forEach']((_0x59ad86,_0x250f62)=>{const _0xf7cc76=_0x5e3aec;if(typeof _0x59ad86!==_0xf7cc76(0x19d)||_0x59ad86['trim']()==='')_0x3e0dec[_0xf7cc76(0x1be)]({'path':_0x3fd1ac+'['+_0x250f62+']','message':_0xf7cc76(0x197)});else _0x3f2da1['has'](_0x59ad86[_0xf7cc76(0x1cf)]())?_0x3e0dec[_0xf7cc76(0x1be)]({'path':_0x3fd1ac+'['+_0x250f62+']','message':_0xf7cc76(0x1f1)+_0x59ad86['trim']()+'.'}):_0x3f2da1[_0xf7cc76(0x18d)](_0x59ad86[_0xf7cc76(0x1cf)]());});}function validateNotificationConfig(_0x2df2f1,_0x2a1c90,_0x184abd){const _0x100be1=a281_0x358266;if(!isRecord(_0x2df2f1)){_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90,'message':_0x100be1(0x201)});return;}if(_0x2df2f1[_0x100be1(0x1c3)]!==undefined&&_0x2df2f1[_0x100be1(0x1c3)]!==null){if(typeof _0x2df2f1[_0x100be1(0x1c3)]!=='string')_0x184abd['push']({'path':_0x2a1c90+_0x100be1(0x1fe),'message':_0x100be1(0x1d8)});else _0x2df2f1[_0x100be1(0x1c3)][_0x100be1(0x1cf)]()&&_0x2df2f1[_0x100be1(0x1c3)]['trim']()!=='v1'&&_0x184abd['push']({'path':_0x2a1c90+'.version','message':_0x100be1(0x255)+_0x2df2f1['version']+'.'});}const _0x44c72e=requireNotificationString(_0x2df2f1[_0x100be1(0x1c2)],_0x2a1c90+'.configCode','Notification\x20configCode\x20is\x20required.',_0x184abd);_0x44c72e?.[_0x100be1(0x173)]('${')&&_0x184abd['push']({'path':_0x2a1c90+'.configCode','message':_0x100be1(0x10e)});if(_0x2df2f1[_0x100be1(0x23c)]!==undefined&&_0x2df2f1[_0x100be1(0x23c)]!==null){if(typeof _0x2df2f1[_0x100be1(0x23c)]!==_0x100be1(0x19d))_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+_0x100be1(0x118),'message':_0x100be1(0x135)});else!NOTIFICATION_FAILURE_POLICIES[_0x100be1(0x1f9)](_0x2df2f1[_0x100be1(0x23c)][_0x100be1(0x1cf)]()[_0x100be1(0x1a2)]())&&_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+_0x100be1(0x118),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x2df2f1[_0x100be1(0x1e0)])?_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+'.template','message':_0x100be1(0x214)}):validateNotificationTemplate(_0x2df2f1[_0x100be1(0x1e0)],_0x2a1c90+'.template',_0x184abd),validateNotificationRecipients(_0x2df2f1[_0x100be1(0x196)],_0x2a1c90+_0x100be1(0x218),_0x184abd);}function validateNotificationTemplate(_0xf210b5,_0x2c9e98,_0x5f2e30){const _0x51a17b=a281_0x358266;for(const _0x5850b8 of[_0x51a17b(0x128),_0x51a17b(0x26e)]){const _0x47b7c9=requireNotificationString(_0xf210b5[_0x5850b8],_0x2c9e98+'.'+_0x5850b8,'Notification\x20template.'+_0x5850b8+_0x51a17b(0x145),_0x5f2e30);if(_0x47b7c9)validateNotificationPlaceholders(_0x47b7c9,_0x2c9e98+'.'+_0x5850b8,_0x5f2e30);}_0xf210b5[_0x51a17b(0x11c)]!==undefined&&_0xf210b5[_0x51a17b(0x11c)]!==null&&(typeof _0xf210b5[_0x51a17b(0x11c)]!=='string'?_0x5f2e30[_0x51a17b(0x1be)]({'path':_0x2c9e98+'.detailMarkdown','message':_0x51a17b(0x130)}):validateNotificationPlaceholders(_0xf210b5['detailMarkdown'],_0x2c9e98+_0x51a17b(0x189),_0x5f2e30)),validateNotificationFacts(_0xf210b5[_0x51a17b(0x1d1)],_0x2c9e98+_0x51a17b(0x16d),_0x5f2e30),validateNotificationActions(_0xf210b5[_0x51a17b(0x18e)],_0x2c9e98+_0x51a17b(0x11f),_0x5f2e30);}function validateNotificationFacts(_0x442059,_0x373ed4,_0x386f23){const _0x4ea0c8=a281_0x358266;if(_0x442059===undefined||_0x442059===null)return;if(!Array[_0x4ea0c8(0x121)](_0x442059)){_0x386f23[_0x4ea0c8(0x1be)]({'path':_0x373ed4,'message':_0x4ea0c8(0x119)});return;}_0x442059['length']>MAX_NOTIFICATION_FACTS&&_0x386f23['push']({'path':_0x373ed4,'message':_0x4ea0c8(0x247)+MAX_NOTIFICATION_FACTS+_0x4ea0c8(0x112)}),_0x442059[_0x4ea0c8(0x1d2)]((_0xef3393,_0x4378bf)=>{const _0x35869b=_0x4ea0c8,_0xed7b6f=_0x373ed4+'['+_0x4378bf+']';if(!isRecord(_0xef3393)){_0x386f23[_0x35869b(0x1be)]({'path':_0xed7b6f,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x18af34 of[_0x35869b(0x198),_0x35869b(0x114)]){const _0x4c1f0d=requireNotificationString(_0xef3393[_0x18af34],_0xed7b6f+'.'+_0x18af34,_0x35869b(0x18a)+_0x18af34+'\x20is\x20required.',_0x386f23);_0x4c1f0d&&validateNotificationPlaceholders(_0x4c1f0d,_0xed7b6f+'.'+_0x18af34,_0x386f23);}});}function validateNotificationActions(_0x11378a,_0x575261,_0x4a1bbf){const _0x1ad07a=a281_0x358266;if(_0x11378a===undefined||_0x11378a===null)return;if(!Array[_0x1ad07a(0x121)](_0x11378a)){_0x4a1bbf['push']({'path':_0x575261,'message':_0x1ad07a(0x180)});return;}_0x11378a[_0x1ad07a(0x1bf)]>MAX_NOTIFICATION_ACTIONS&&_0x4a1bbf['push']({'path':_0x575261,'message':_0x1ad07a(0x247)+MAX_NOTIFICATION_ACTIONS+_0x1ad07a(0x230)}),_0x11378a[_0x1ad07a(0x1d2)]((_0x5925e8,_0x1a4fe3)=>{const _0x17a5e2=_0x1ad07a,_0x97600e=_0x575261+'['+_0x1a4fe3+']';if(!isRecord(_0x5925e8)){_0x4a1bbf[_0x17a5e2(0x1be)]({'path':_0x97600e,'message':_0x17a5e2(0x165)});return;}const _0x49a59e=requireNotificationString(_0x5925e8[_0x17a5e2(0x243)],_0x97600e+_0x17a5e2(0x210),_0x17a5e2(0x223),_0x4a1bbf);if(_0x49a59e)validateNotificationPlaceholders(_0x49a59e,_0x97600e+_0x17a5e2(0x210),_0x4a1bbf);const _0xf15f28=requireNotificationString(_0x5925e8[_0x17a5e2(0x259)],_0x97600e+'.url',_0x17a5e2(0x1b0),_0x4a1bbf);if(!_0xf15f28)return;validateNotificationPlaceholders(_0xf15f28,_0x97600e+'.url',_0x4a1bbf),!/^https?:\/\//i[_0x17a5e2(0x26d)](_0xf15f28)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x17a5e2(0x26d)](_0xf15f28)&&_0x4a1bbf['push']({'path':_0x97600e+_0x17a5e2(0x155),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x568603,_0x3cd88a,_0x2c3cb1){const _0x220b1e=a281_0x358266;if(_0x568603===undefined||_0x568603===null)return;if(!Array[_0x220b1e(0x121)](_0x568603)){_0x2c3cb1[_0x220b1e(0x1be)]({'path':_0x3cd88a,'message':_0x220b1e(0x1e2)});return;}let _0x2d42c2=![];_0x568603[_0x220b1e(0x1d2)]((_0x2a4a66,_0x2ac3c3)=>{const _0x358d61=_0x220b1e,_0x3d64fc=_0x3cd88a+'['+_0x2ac3c3+']';if(!isRecord(_0x2a4a66)){_0x2c3cb1['push']({'path':_0x3d64fc,'message':_0x358d61(0x1df)});return;}const _0x4625b4=requireNotificationString(_0x2a4a66[_0x358d61(0x1ed)],_0x3d64fc+_0x358d61(0x172),'Notification\x20recipient.type\x20is\x20required.',_0x2c3cb1);_0x4625b4&&!NOTIFICATION_RECIPIENT_TYPES[_0x358d61(0x1f9)](_0x4625b4[_0x358d61(0x1a2)]())&&_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x172),'message':_0x358d61(0x1b7)});let _0x1f3c39='TO';_0x2a4a66[_0x358d61(0x111)]!==undefined&&_0x2a4a66[_0x358d61(0x111)]!==null&&(typeof _0x2a4a66[_0x358d61(0x111)]!==_0x358d61(0x19d)?(_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x1c6),'message':_0x358d61(0x252)}),_0x1f3c39=''):(_0x1f3c39=_0x2a4a66[_0x358d61(0x111)][_0x358d61(0x1cf)]()[_0x358d61(0x1a2)](),!NOTIFICATION_RECIPIENT_ROLES[_0x358d61(0x1f9)](_0x1f3c39)&&_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x1c6),'message':_0x358d61(0x22e)})));if(_0x1f3c39==='TO')_0x2d42c2=!![];const _0x504b23=requireNotificationString(_0x2a4a66[_0x358d61(0x114)],_0x3d64fc+_0x358d61(0x1ab),_0x358d61(0x211),_0x2c3cb1);_0x504b23&&validateNotificationPlaceholders(_0x504b23,_0x3d64fc+_0x358d61(0x1ab),_0x2c3cb1);}),_0x568603[_0x220b1e(0x1bf)]>0x0&&!_0x2d42c2&&_0x2c3cb1[_0x220b1e(0x1be)]({'path':_0x3cd88a,'message':_0x220b1e(0x185)});}function requireNotificationString(_0x7f7619,_0x12b68e,_0x5a86a2,_0x3b2a61){const _0x4a4aa2=a281_0x358266;if(typeof _0x7f7619!==_0x4a4aa2(0x19d)||_0x7f7619[_0x4a4aa2(0x1cf)]()==='')return _0x3b2a61[_0x4a4aa2(0x1be)]({'path':_0x12b68e,'message':_0x5a86a2}),undefined;return _0x7f7619['trim']();}function validateNotificationPlaceholders(_0x3ce85b,_0x523152,_0x1a2956){const _0x225742=a281_0x358266;for(const _0x146f38 of _0x3ce85b[_0x225742(0x154)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x2498ab=_0x146f38[0x1]?.[_0x225742(0x1cf)]()??'',_0x49c4d7=_0x2498ab[_0x225742(0x25e)]('.'),_0xc22032=_0x49c4d7>=0x0?_0x2498ab[_0x225742(0x257)](0x0,_0x49c4d7):_0x2498ab,_0x203705=_0x49c4d7>=0x0?_0x2498ab[_0x225742(0x257)](_0x49c4d7+0x1)[_0x225742(0x1cf)]():'';(![_0x225742(0x152),_0x225742(0x24a),'variables'][_0x225742(0x173)](_0xc22032)||_0x203705==='')&&_0x1a2956[_0x225742(0x1be)]({'path':_0x523152,'message':_0x225742(0x12a)+_0x146f38[0x0]+'.'});}_0x3ce85b[_0x225742(0x23a)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x225742(0x173)]('${')&&_0x1a2956['push']({'path':_0x523152,'message':_0x225742(0x179)});}function a281_0x4a08(_0x2e8347,_0x5d60f5){_0x2e8347=_0x2e8347-0x10c;const _0x445b87=a281_0x445b();let _0x4a0873=_0x445b87[_0x2e8347];return _0x4a0873;}function validateEdge(_0x3e8401,_0x33c02b,_0x3e80ac){const _0x4ea97c=a281_0x358266;_0x3e8401[_0x4ea97c(0x193)]!==undefined&&typeof _0x3e8401[_0x4ea97c(0x193)]!==_0x4ea97c(0x19d)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+'.name','message':_0x4ea97c(0x244)}),_0x3e8401['defaultFlow']!==undefined&&typeof _0x3e8401[_0x4ea97c(0x12c)]!==_0x4ea97c(0x13b)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x129),'message':_0x4ea97c(0x25f)}),_0x3e8401[_0x4ea97c(0x258)]!==undefined&&(!Array[_0x4ea97c(0x121)](_0x3e8401[_0x4ea97c(0x258)])?_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x20f),'message':_0x4ea97c(0x1de)}):_0x3e8401['waypoints']['forEach']((_0x2376db,_0x54f002)=>{const _0x40f371=_0x4ea97c;if(!isRecord(_0x2376db)){_0x3e80ac[_0x40f371(0x1be)]({'path':_0x33c02b+_0x40f371(0x237)+_0x54f002+']','message':_0x40f371(0x125)});return;}for(const _0x576c36 of['x','y']){const _0x281f97=_0x2376db[_0x576c36];(typeof _0x281f97!==_0x40f371(0x1f8)||!Number[_0x40f371(0x19e)](_0x281f97))&&_0x3e80ac[_0x40f371(0x1be)]({'path':_0x33c02b+'.waypoints['+_0x54f002+'].'+_0x576c36,'message':_0x40f371(0x20d)+_0x576c36+_0x40f371(0x217)});}})),_0x3e8401['conditionType']!==undefined&&!CONDITION_TYPES[_0x4ea97c(0x1f9)](_0x3e8401[_0x4ea97c(0x1dd)])&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+'.conditionType','message':'Unsupported\x20condition\x20type:\x20'+String(_0x3e8401['conditionType'])+'.'}),_0x3e8401[_0x4ea97c(0x1dd)]===_0x4ea97c(0x150)&&(typeof _0x3e8401[_0x4ea97c(0x178)]!=='string'||_0x3e8401[_0x4ea97c(0x178)][_0x4ea97c(0x1cf)]()==='')&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x23b),'message':_0x4ea97c(0x21e)}),_0x3e8401[_0x4ea97c(0x12c)]===!![]&&_0x3e8401[_0x4ea97c(0x1dd)]!==_0x4ea97c(0x184)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x129),'message':_0x4ea97c(0x12e)}),_0x3e8401['defaultFlow']===!![]&&typeof _0x3e8401['expression']==='string'&&_0x3e8401[_0x4ea97c(0x178)][_0x4ea97c(0x1cf)]()!==''&&_0x3e80ac['push']({'path':_0x33c02b+_0x4ea97c(0x23b),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x4a9068,_0x407ac9,_0x5555a3,_0x56ee08,_0x501f84,_0x4841cb,_0x3ec318){const _0x5c1327=a281_0x358266;for(const [_0x3e9066,_0x4e3966]of _0x4a9068){const _0x5f1f34=_0x501f84['get'](_0x3e9066)??[],_0x47e4ac=_0x56ee08[_0x5c1327(0x1b3)](_0x3e9066)??[];_0x4e3966[_0x5c1327(0x1ed)]!==_0x5c1327(0x126)&&_0x5f1f34['length']===0x0&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x22f)});_0x4e3966[_0x5c1327(0x1ed)]!==_0x5c1327(0x207)&&_0x47e4ac[_0x5c1327(0x1bf)]===0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x126)&&_0x5f1f34[_0x5c1327(0x1bf)]>0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x207)&&_0x47e4ac[_0x5c1327(0x1bf)]>0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x4e3966['type']===_0x5c1327(0x20c)){_0x47e4ac[_0x5c1327(0x1bf)]<0x2&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x31f86e=_0x47e4ac[_0x5c1327(0x226)](_0x3c70df=>_0x3c70df[_0x5c1327(0x12c)]===!![]);_0x31f86e[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318[_0x5c1327(0x1be)]({'path':'flowJson.nodes.'+_0x3e9066,'message':_0x5c1327(0x1a0)});if(_0x31f86e['length']===0x1){const _0x223fe0=_0x31f86e[0x0],_0x13e9c4=_0x4841cb[_0x5c1327(0x1b3)](_0x223fe0)??_0x5c1327(0x17e);_0x223fe0[_0x5c1327(0x1dd)]!==_0x5c1327(0x184)&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x13e9c4+_0x5c1327(0x24f),'message':'CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.'});_0x223fe0['expression']!==undefined&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x13e9c4+_0x5c1327(0x23b),'message':_0x5c1327(0x1fd)});for(const _0x351c58 of _0x47e4ac){if(_0x351c58===_0x223fe0)continue;const _0x282ba2=_0x4841cb[_0x5c1327(0x1b3)](_0x351c58)??_0x5c1327(0x17e);if(_0x351c58[_0x5c1327(0x1dd)]!==_0x5c1327(0x150))_0x3ec318[_0x5c1327(0x1be)]({'path':_0x282ba2+_0x5c1327(0x24f),'message':_0x5c1327(0x1aa)});else(typeof _0x351c58[_0x5c1327(0x178)]!=='string'||_0x351c58['expression']['trim']()==='')&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x282ba2+_0x5c1327(0x23b),'message':_0x5c1327(0x124)});}}}if(_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x1a8)&&(_0x4e3966['taskMode']??_0x5c1327(0x1a8))===_0x5c1327(0x17a)){if(_0x47e4ac[_0x5c1327(0x1bf)]!==0x1)_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x140)});else{const _0x1119d6=_0x47e4ac[0x0];((_0x1119d6[_0x5c1327(0x1dd)]??'ALWAYS')!=='ALWAYS'||_0x1119d6[_0x5c1327(0x12c)]===!![]||typeof _0x1119d6[_0x5c1327(0x178)]==='string'&&_0x1119d6[_0x5c1327(0x178)][_0x5c1327(0x1cf)]()!=='')&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x4841cb[_0x5c1327(0x1b3)](_0x1119d6)??_0x5c1327(0x17e),'message':_0x5c1327(0x163)});}}else{if(_0x4e3966['type']===_0x5c1327(0x1a8)){const _0x494d45=_0x47e4ac['map'](_0x346fd8=>_0x346fd8[_0x5c1327(0x1dd)]??_0x5c1327(0x184)),_0x2beecd=_0x494d45[_0x5c1327(0x226)](_0x31daa9=>_0x31daa9!==_0x5c1327(0x1cc)&&_0x31daa9!==_0x5c1327(0x1a1));_0x2beecd[_0x5c1327(0x1bf)]>0x0&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x494d45[_0x5c1327(0x226)](_0x326f81=>_0x326f81===_0x5c1327(0x1cc))[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x249)}),_0x494d45[_0x5c1327(0x226)](_0x28d341=>_0x28d341===_0x5c1327(0x1a1))[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x1eb)}),_0x47e4ac['some'](_0x1e6998=>_0x1e6998['defaultFlow']===!![])&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x176)});}}}const _0x91fb54=new Set(),_0x46e52b=_0x36a11d=>{const _0x300810=_0x5c1327;if(_0x91fb54[_0x300810(0x1f9)](_0x36a11d))return;_0x91fb54['add'](_0x36a11d);for(const _0x58b48e of _0x56ee08[_0x300810(0x1b3)](_0x36a11d)??[]){const _0x8cdfdd=resolveEdgeEndpoint(_0x58b48e[_0x300810(0x17b)],_0x58b48e[_0x300810(0x131)]);if(_0x8cdfdd&&_0x4a9068[_0x300810(0x1f9)](_0x8cdfdd))_0x46e52b(_0x8cdfdd);}};_0x46e52b(_0x407ac9);for(const _0x3e163e of _0x4a9068[_0x5c1327(0x188)]()){!_0x91fb54['has'](_0x3e163e)&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e163e,'message':_0x5c1327(0x204)});}const _0x72ea60=_0x5555a3['some'](_0x30f295=>_0x91fb54[_0x5c1327(0x1f9)](_0x30f295));if(!_0x72ea60){_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x17e),'message':_0x5c1327(0x1b1)});return;}const _0x5ba59e=new Set(),_0xf8c635=_0x19cf3c=>{const _0x9d8504=_0x5c1327;if(_0x5ba59e[_0x9d8504(0x1f9)](_0x19cf3c))return;_0x5ba59e[_0x9d8504(0x18d)](_0x19cf3c);for(const _0x4815dd of _0x501f84[_0x9d8504(0x1b3)](_0x19cf3c)??[]){const _0x3e734f=resolveEdgeEndpoint(_0x4815dd[_0x9d8504(0x166)],_0x4815dd['sourceNodeId']);if(_0x3e734f&&_0x4a9068[_0x9d8504(0x1f9)](_0x3e734f))_0xf8c635(_0x3e734f);}};for(const _0xa0f7cd of _0x5555a3){if(_0x4a9068[_0x5c1327(0x1f9)](_0xa0f7cd))_0xf8c635(_0xa0f7cd);}for(const _0x39e410 of _0x91fb54){!_0x5ba59e[_0x5c1327(0x1f9)](_0x39e410)&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x39e410,'message':_0x5c1327(0x25c)});}}function validateApprovalResults(_0x2ca2d0,_0x1d166e,_0x141682,_0x422021){const _0x5547aa=a281_0x358266;if(_0x1d166e===0x0)return;const _0xf378af=new Set(_0x141682[_0x5547aa(0x261)](_0x52a0e9=>_0x2ca2d0[_0x5547aa(0x1b3)](_0x52a0e9)?.[_0x5547aa(0x157)])['filter'](_0x3fa018=>typeof _0x3fa018==='string'));for(const _0x1f4136 of[_0x5547aa(0x1cc),'REJECTED']){!_0xf378af[_0x5547aa(0x1f9)](_0x1f4136)&&_0x422021[_0x5547aa(0x1be)]({'path':_0x5547aa(0x1ac),'message':_0x5547aa(0x1db)+_0x1f4136+'.'});}}function validateScriptResultReferences(_0x23d4a8,_0x3a24dd,_0x50cc99,_0x1fce89,_0x4c9bd1,_0x39a11e,_0x10de83){const _0x57a274=a281_0x358266;if(_0x39a11e['size']===0x0)return;const _0x20aac9=new Set(),_0x29e80e=_0x1faf67=>{const _0x49d197=a281_0x4a08;if(!_0x20aac9['has'](_0x1faf67)&&_0x23d4a8[_0x49d197(0x1f9)](_0x1faf67)){_0x20aac9[_0x49d197(0x18d)](_0x1faf67);for(const _0x5bbb06 of _0x50cc99['get'](_0x1faf67)??[]){const _0x54e299=resolveEdgeEndpoint(_0x5bbb06['target'],_0x5bbb06[_0x49d197(0x131)]);if(_0x54e299)_0x29e80e(_0x54e299);}}};_0x29e80e(_0x3a24dd);const _0x35daee=new Map();for(const _0x362cfa of _0x20aac9){_0x35daee[_0x57a274(0x1ce)](_0x362cfa,_0x362cfa===_0x3a24dd?new Set([_0x3a24dd]):new Set(_0x20aac9));}let _0x4d6a2f=!![];while(_0x4d6a2f){_0x4d6a2f=![];for(const _0x2372d5 of _0x20aac9){if(_0x2372d5===_0x3a24dd)continue;const _0x910c37=(_0x1fce89[_0x57a274(0x1b3)](_0x2372d5)??[])[_0x57a274(0x261)](_0x1b6aa3=>resolveEdgeEndpoint(_0x1b6aa3[_0x57a274(0x166)],_0x1b6aa3[_0x57a274(0x1ca)]))[_0x57a274(0x226)](_0x365804=>Boolean(_0x365804&&_0x20aac9[_0x57a274(0x1f9)](_0x365804)));if(_0x910c37[_0x57a274(0x1bf)]===0x0)continue;const _0x5f3cc5=new Set(_0x35daee[_0x57a274(0x1b3)](_0x910c37[0x0])??[]);for(const _0x1d3aa0 of _0x910c37[_0x57a274(0x257)](0x1)){const _0x519530=_0x35daee[_0x57a274(0x1b3)](_0x1d3aa0)??new Set();for(const _0x540090 of _0x5f3cc5){if(!_0x519530[_0x57a274(0x1f9)](_0x540090))_0x5f3cc5[_0x57a274(0x156)](_0x540090);}}_0x5f3cc5['add'](_0x2372d5);const _0x515389=_0x35daee[_0x57a274(0x1b3)](_0x2372d5);!setsEqual(_0x515389,_0x5f3cc5)&&(_0x35daee[_0x57a274(0x1ce)](_0x2372d5,_0x5f3cc5),_0x4d6a2f=!![]);}}for(const [_0x481968,_0x16fceb]of _0x50cc99){const _0x405800=_0x35daee[_0x57a274(0x1b3)](_0x481968);if(!_0x405800)continue;for(const _0x68cf63 of _0x16fceb){if(_0x68cf63[_0x57a274(0x1dd)]!==_0x57a274(0x150)||typeof _0x68cf63[_0x57a274(0x178)]!==_0x57a274(0x19d))continue;for(const [_0x54d01d,_0x3fd427]of _0x39a11e){expressionReferencesVariable(_0x68cf63[_0x57a274(0x178)],_0x54d01d)&&!_0x405800[_0x57a274(0x1f9)](_0x3fd427)&&_0x10de83[_0x57a274(0x1be)]({'path':(_0x4c9bd1[_0x57a274(0x1b3)](_0x68cf63)??_0x57a274(0x17e))+_0x57a274(0x23b),'message':_0x57a274(0x19c)+_0x54d01d+_0x57a274(0x268)+_0x3fd427+_0x57a274(0x18b)+_0x481968+'.'});}}}}function expressionReferencesVariable(_0x2aa5ad,_0x3682b0){const _0x5aa9ff=a281_0x358266,_0x530b71=_0x3682b0[_0x5aa9ff(0x23a)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp('(?<![A-Za-z0-9_])'+_0x530b71+_0x5aa9ff(0x1da))[_0x5aa9ff(0x26d)](_0x2aa5ad);}function resolveEffectiveResultVariable(_0x136abb,_0x24553a){const _0xc0e130=a281_0x358266;if(_0x136abb===undefined||_0x136abb===null||_0x24553a&&_0x136abb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x136abb!==_0xc0e130(0x19d)||!VARIABLE_PATTERN[_0xc0e130(0x26d)](_0x136abb)||RESERVED_RESULT_VARIABLES[_0xc0e130(0x1f9)](_0x136abb)||_0x136abb[_0xc0e130(0x1d7)]('approval_sys_'))return undefined;return _0x136abb;}function registerResultVariableOwner(_0x4a884f,_0x130bd6,_0x2413d5,_0x35bdc7){const _0x48205d=a281_0x358266;if(_0x4a884f[_0x48205d(0x1f9)](_0x130bd6)){_0x35bdc7['push']({'path':_0x48205d(0x1ac),'message':_0x48205d(0x1a4)+_0x130bd6+'.'});return;}_0x4a884f['set'](_0x130bd6,_0x2413d5);}function setsEqual(_0x3dcfc3,_0x39679b){const _0x4439c3=a281_0x358266;return _0x3dcfc3['size']===_0x39679b[_0x4439c3(0x134)]&&[..._0x3dcfc3]['every'](_0x3efc0a=>_0x39679b[_0x4439c3(0x1f9)](_0x3efc0a));}function isValidUserId(_0x1ce12b){const _0x2384eb=a281_0x358266;if(typeof _0x1ce12b==='string')return _0x1ce12b[_0x2384eb(0x1cf)]()[_0x2384eb(0x1bf)]>0x0;return Number[_0x2384eb(0x1f5)](_0x1ce12b)&&Number(_0x1ce12b)>0x0;}function resolveEdgeEndpoint(_0x5722a2,_0x359821){const _0x50770d=a281_0x358266;if(typeof _0x5722a2==='string'&&_0x5722a2[_0x50770d(0x1cf)]())return _0x5722a2[_0x50770d(0x1cf)]();if(typeof _0x359821===_0x50770d(0x19d)&&_0x359821[_0x50770d(0x1cf)]())return _0x359821['trim']();return undefined;}function removeEmptyMetadata(_0x5a6c3f,_0xc98b02,_0x303cc9,_0x426d0c){const _0x43dcd2=a281_0x358266;if(Array['isArray'](_0x5a6c3f)){_0x5a6c3f['forEach']((_0x5341b7,_0x596e7a)=>removeEmptyMetadata(_0x5341b7,_0xc98b02+'['+_0x596e7a+']',_0x303cc9,_0x426d0c));return;}if(!isRecord(_0x5a6c3f))return;for(const [_0x40a35b,_0x52bf29]of Object[_0x43dcd2(0x13f)](_0x5a6c3f)){const _0x33ca04=_0xc98b02+'.'+_0x40a35b;if(_0x40a35b==='metadata'&&isEmptyJsonValue(_0x52bf29)){delete _0x5a6c3f[_0x40a35b],_0x426d0c[_0x43dcd2(0x1be)](_0x33ca04),_0x303cc9[_0x43dcd2(0x1be)]({'code':_0x43dcd2(0x1b9),'path':_0x33ca04,'message':_0x33ca04+_0x43dcd2(0x186)});continue;}removeEmptyMetadata(_0x52bf29,_0x33ca04,_0x303cc9,_0x426d0c);}}function isEmptyJsonValue(_0x1d4311){const _0x15c81e=a281_0x358266;if(_0x1d4311===null||_0x1d4311===undefined)return!![];if(typeof _0x1d4311===_0x15c81e(0x19d))return _0x1d4311[_0x15c81e(0x1cf)]()==='';if(Array['isArray'](_0x1d4311))return _0x1d4311[_0x15c81e(0x1bf)]===0x0;return isRecord(_0x1d4311)&&Object['keys'](_0x1d4311)['length']===0x0;}function isRecord(_0xf3e7b1){return typeof _0xf3e7b1==='object'&&_0xf3e7b1!==null&&!Array['isArray'](_0xf3e7b1);}function cloneJsonValue(_0x204da6){const _0x5a47af=a281_0x358266;return JSON[_0x5a47af(0x1d5)](JSON[_0x5a47af(0x194)](_0x204da6));}export async function readFlowConfigFile(_0xa3d935){const _0x33d496=await readFile(resolve(_0xa3d935),'utf8');return JSON['parse'](_0x33d496);}function a281_0x445b(){const _0x271a8c=['includes','.timeout.scriptName','AUTO_REJECT','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','flowType','expression','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','HANDLE','target','.tmp','297140YCsDUI','flowJson.edges','.cc.visible','Notification\x20template.actions\x20must\x20be\x20an\x20array.','node\x20pageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.transferCandidates.userIds','flowJson.nodes.','ALWAYS','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','\x20was\x20empty\x20and\x20was\x20removed.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','keys','.detailMarkdown','Notification\x20fact.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','add','actions','sequential','bindDatasetCode','ROLE','nodes\x20must\x20be\x20an\x20array.','name','stringify','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','recipients','value\x20must\x20be\x20a\x20non-empty\x20string.','label','array','timeout.interrupting\x20must\x20be\x20a\x20boolean.','cc.recipientUserIds\x20supports\x20at\x20most\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','string','isFinite','flowJson.startPageId','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','REJECTED','toUpperCase','.async','Duplicate\x20resultVariable:\x20','.assignee.userIds','flowCode','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','APPROVAL','strategy','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.value','flowJson.nodes','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','flowName\x20is\x20required.','edges','Notification\x20action.url\x20is\x20required.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','hasOwnProperty','get','userIds','legacy_field_removed','flowJson.nodes[','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','empty_metadata_removed','PLATFORM_FORM','2310684YiUmEY','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.source','push','length','.async.enabled','.assignee.userIds[','configCode','version','#/$defs/userId','resultVariable','.role','object','roleId','formSchema','sourceNodeId','flowJson.','APPROVED','].taskMode','set','trim','EMAIL','facts','forEach','edges\x20must\x20be\x20an\x20array.','startPageId\x20must\x20be\x20a\x20positive\x20integer.','parse','assignee','startsWith','Notification\x20version\x20must\x20be\x20a\x20string.','#/$defs/timeAmount','(?![A-Za-z0-9_])','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','flowJson.pageMode','conditionType','waypoints\x20must\x20be\x20an\x20array.','Notification\x20recipient\x20must\x20be\x20an\x20object.','template','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20recipients\x20must\x20be\x20an\x20array.','approval.simple-flow.v1','pid','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','flowName','.cc.readSources','node\x20pageId\x20must\x20be\x20a\x20positive\x20integer.','https://json-schema.org/draft/2020-12/schema','visible','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','approval_sys_appCode','type','.target','formPermissions','enabled','Duplicate\x20value:\x20','FAIL','value\x20must\x20be\x20an\x20array.','Unsupported\x20pageMode:\x20','isSafeInteger','FIXED','flowJson\x20must\x20be\x20an\x20object.','number','has','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson','Duplicate\x20node\x20id:\x20','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','.version','duration','Unsupported\x20schemaVersion:\x20','NOTIFICATION\x20node\x20requires\x20config.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','flowJson.schemaVersion','Node\x20is\x20not\x20reachable\x20from\x20START.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','retryInterval','END','position','approval_sys_datasetCode','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','retryCount','CONDITION','waypoint.','appCode','.waypoints','.text','Notification\x20recipient.value\x20is\x20required.','approval_sys_processInstanceId','flowDesc\x20must\x20be\x20a\x20string.','NOTIFICATION\x20node\x20requires\x20template.','approval_sys_initiatorUserId','nodes','\x20must\x20be\x20a\x20finite\x20number.','.recipients','transferCandidates','SECONDS','.cc.recipientUserIds','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','FORM_FLOW','EXPRESSION\x20edge\x20requires\x20expression.','call','.transferCandidates','integer','approval_sys_operationType','Notification\x20action.text\x20is\x20required.','.cc.recipientUserIds[','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','filter','transferCandidates\x20must\x20be\x20an\x20object.','APPROVAL\x20node\x20requires\x20assignee.','edge\x20must\x20be\x20an\x20object.','flowJson.edges[','.timeout.action','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','.transferCandidates.userIds[','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','Node\x20has\x20no\x20incoming\x20edge.','\x20actions.','taskMode','USER','.timeout.resultVariable','flowKey','SCRIPT\x20node\x20requires\x20scriptName.','duration\x20requires\x20value\x20and\x20unit.','.waypoints[','action','.pageId','replace','.expression','failurePolicy','CONTINUE','CUSTOM_PAGE','timeout','.timeout.interrupting','pageMode','HOURS','text','edge\x20name\x20must\x20be\x20a\x20string.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','flowDesc','Notification\x20template\x20supports\x20at\x20most\x20','async\x20must\x20be\x20an\x20object.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','context','.name','recipientUserIds','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.resultVariable','.conditionType','9467AWlsUq','NOTIFICATION','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','scriptName','findIndex','Unsupported\x20notification\x20version:\x20','.approvalMode','slice','waypoints','url','formData','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','Node\x20cannot\x20reach\x20any\x20END.','Unsupported\x20approval\x20mode:\x20','indexOf','defaultFlow\x20must\x20be\x20a\x20boolean.','https://lovrabet.com/schema/rabetbase-flow-config.json','map','BCC','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','.taskMode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','FIXED\x20assignee\x20requires\x20userIds.','approval_sys_initiatorUsername',',\x20but\x20node\x20','datasetCode','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','#/$defs/flowEdge','Duplicate\x20edge\x20route:\x20','test','summary','ANY','SCRIPT','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','\x20->\x20','ALL','role','\x20facts.','MINUTES','value','async.enabled\x20must\x20be\x20a\x20boolean.','datasetCode\x20must\x20be\x20a\x20string.','528414vNzzHL','.failurePolicy','Notification\x20template.facts\x20must\x20be\x20an\x20array.','AUTO_APPROVE','.async.retryCount','detailMarkdown','scriptResult','templateName','.actions','DAYS','isArray','mode','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','START','timeout\x20must\x20be\x20an\x20object.','title','.defaultFlow','Unsupported\x20notification\x20placeholder:\x20','flowType\x20is\x20required.','defaultFlow','schemaVersion','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','EXECUTE_BFF','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','targetNodeId','catch','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','size','failurePolicy\x20must\x20be\x20a\x20string.','Rabetbase\x20FlowConfig','\x20users.','utf8','approval_sys_','interrupting','boolean','config','NaN','.cc','entries','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','timeout.enabled\x20must\x20be\x20a\x20boolean.','.id','.\x20This\x20CLI\x20supports\x20only\x20','#/$defs/position','\x20is\x20required.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','form','1725684YHTUaY','^[A-Za-z_][A-Za-z0-9_]*$','.unit','Edge\x20target\x20node\x20not\x20found:\x20','message','#/$defs/flowNode','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','^[1-9][0-9]*$','EXPRESSION','warnings','event','edge\x20source\x20is\x20required.','matchAll','.url','delete','result','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','Duplicate\x20BPMN\x20element\x20id:\x20','.timeout','Unsupported\x20flowType:\x20','INDEPENDENT_FLOW','cc\x20must\x20be\x20an\x20object.','SINGLE','pageId','unit','async','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','7yHZoql','Notification\x20action\x20must\x20be\x20an\x20object.','source','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','isInteger','prototype','overwrite','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','.facts','.sequential','9817144XESyhT','Unsupported\x20node\x20type:\x20','140056IAwIfG','.type'];a281_0x445b=function(){return _0x271a8c;};return a281_0x445b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a282_0x58b8a3=a282_0x5e02;(function(_0x594159,_0x24c9af){const _0xde3e9a=a282_0x5e02,_0x331b77=_0x594159();while(!![]){try{const _0x2d7b41=parseInt(_0xde3e9a(0x170))/0x1*(-parseInt(_0xde3e9a(0x156))/0x2)+parseInt(_0xde3e9a(0x182))/0x3+-parseInt(_0xde3e9a(0x18d))/0x4+-parseInt(_0xde3e9a(0x171))/0x5*(parseInt(_0xde3e9a(0x16d))/0x6)+-parseInt(_0xde3e9a(0x16e))/0x7*(-parseInt(_0xde3e9a(0x193))/0x8)+-parseInt(_0xde3e9a(0x163))/0x9*(-parseInt(_0xde3e9a(0x159))/0xa)+parseInt(_0xde3e9a(0x172))/0xb;if(_0x2d7b41===_0x24c9af)break;else _0x331b77['push'](_0x331b77['shift']());}catch(_0x40da08){_0x331b77['push'](_0x331b77['shift']());}}}(a282_0x5827,0xc6fb3));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a282_0x58b8a3(0x16b);function a282_0x5e02(_0x5664e5,_0x2c1bb6){_0x5664e5=_0x5664e5-0x155;const _0x582753=a282_0x5827();let _0x5e02e0=_0x582753[_0x5664e5];return _0x5e02e0;}export const INSTANT_API_POLICY_FILE_NAME=a282_0x58b8a3(0x179);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0xdbaa11,_0x5e9f9c,_0x3ba012){return new CliError(_0xdbaa11,0x1,_0x5e9f9c,_0x3ba012);}export function loadInstantApiPolicyLocalConfig(_0x3b61a6,_0xf24d94){assertSafeAppCode(_0x3b61a6);const _0x2420e8=resolve(_0xf24d94??findProjectRootDirectory()),_0x177fd5=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x3b61a6+'/'+INSTANT_API_POLICY_FILE_NAME,_0xf356b8=resolve(_0x2420e8,INSTANT_API_POLICY_RELATIVE_ROOT,_0x3b61a6),_0x1a5b81=resolve(_0xf356b8,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x2420e8,'appCode':_0x3b61a6,'policyRoot':_0xf356b8,'policyFilePath':_0x1a5b81,'policyRelativePath':_0x177fd5};}export function createDefaultInstantApiPolicyConfig(_0x35b8d7,_0x63269e=a282_0x58b8a3(0x180)){return assertSafeAppCode(_0x35b8d7),{'version':'2','appCode':_0x35b8d7,'defaults':{'instantApi':_0x63269e},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x13d0eb){const _0x5e06f4=a282_0x58b8a3;let _0x3c2dea;try{_0x3c2dea=await stat(_0x13d0eb[_0x5e06f4(0x173)]);}catch(_0x29f537){throw instantApiPolicyError(_0x5e06f4(0x15d),_0x5e06f4(0x189)+_0x13d0eb[_0x5e06f4(0x173)],_0x5e06f4(0x16a));}if(!_0x3c2dea['isFile']())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x5e06f4(0x177)+_0x13d0eb[_0x5e06f4(0x173)]);if(_0x3c2dea['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5e06f4(0x188),_0x5e06f4(0x157));let _0x508b89;try{_0x508b89=await readFile(_0x13d0eb[_0x5e06f4(0x173)]);}catch{throw instantApiPolicyError(_0x5e06f4(0x15f),_0x5e06f4(0x18c)+_0x13d0eb[_0x5e06f4(0x173)]);}if(_0x508b89[_0x5e06f4(0x169)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x5e06f4(0x157));let _0x365c84;try{_0x365c84=new TextDecoder(_0x5e06f4(0x166),{'fatal':!![],'ignoreBOM':!![]})[_0x5e06f4(0x178)](_0x508b89);}catch{throw instantApiPolicyError(_0x5e06f4(0x161),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x13d0eb[_0x5e06f4(0x173)]);}let _0x4f0b8d;try{_0x4f0b8d=JSON['parse'](_0x365c84);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x13d0eb[_0x5e06f4(0x173)]);}return assertLocalPolicyContract(_0x4f0b8d,_0x13d0eb[_0x5e06f4(0x167)]);}export async function writeInstantApiPolicyConfigFile(_0xb4c534,_0x26eb75,_0x430f39={}){const _0x1ccf3e=a282_0x58b8a3,_0x3007e1=assertLocalPolicyContract(_0x26eb75,_0xb4c534[_0x1ccf3e(0x167)]),_0x5c7643=JSON[_0x1ccf3e(0x15c)](_0x3007e1,null,0x2)+'\x0a';if(Buffer[_0x1ccf3e(0x169)](_0x5c7643,_0x1ccf3e(0x165))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1ccf3e(0x188),_0x1ccf3e(0x157));await mkdir(_0xb4c534[_0x1ccf3e(0x195)],{'recursive':!![]});let _0x517997;try{_0x517997=await readFile(_0xb4c534[_0x1ccf3e(0x173)],'utf8');}catch(_0x171aa6){if(!isMissingFile(_0x171aa6))throw instantApiPolicyError(_0x1ccf3e(0x15f),_0x1ccf3e(0x174)+_0xb4c534[_0x1ccf3e(0x173)]);}if(_0x517997===_0x5c7643)return{'action':_0x1ccf3e(0x17d),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};if(_0x517997!==undefined&&!_0x430f39['force'])throw instantApiPolicyError(_0x1ccf3e(0x17f),_0x1ccf3e(0x18a)+_0xb4c534['policyFilePath'],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x517997===undefined)try{return await writeFile(_0xb4c534[_0x1ccf3e(0x173)],_0x5c7643,{'encoding':_0x1ccf3e(0x165),'flag':'wx'}),{'action':_0x1ccf3e(0x15a),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};}catch(_0x197c2b){if(!isAlreadyExists(_0x197c2b))throw instantApiPolicyError(_0x1ccf3e(0x18f),_0x1ccf3e(0x15e)+_0xb4c534['policyFilePath']);if(!_0x430f39[_0x1ccf3e(0x18b)])throw instantApiPolicyError(_0x1ccf3e(0x17f),_0x1ccf3e(0x16f)+_0xb4c534[_0x1ccf3e(0x173)],_0x1ccf3e(0x184));}const _0x474ce6=resolve(dirname(_0xb4c534[_0x1ccf3e(0x173)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x1ccf3e(0x17a)]+'.'+randomUUID()+_0x1ccf3e(0x168));try{await writeFile(_0x474ce6,_0x5c7643,{'encoding':'utf8','flag':'wx'}),await rename(_0x474ce6,_0xb4c534['policyFilePath']);}catch{await unlink(_0x474ce6)[_0x1ccf3e(0x15b)](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x1ccf3e(0x160)+_0xb4c534['policyFilePath']);}return{'action':_0x1ccf3e(0x158),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};}function assertSafeAppCode(_0x2a9a2b){const _0x307080=a282_0x58b8a3,_0x2b49f9=_0x2a9a2b[_0x307080(0x186)]();if(!_0x2b49f9||_0x2b49f9!==_0x2a9a2b||_0x2b49f9['length']>0x64||_0x2b49f9==='.'||_0x2b49f9==='..'||_0x2b49f9[_0x307080(0x175)]('/')||_0x2b49f9[_0x307080(0x175)]('\x5c')||_0x2b49f9[_0x307080(0x175)]('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid',_0x307080(0x17c));}function assertLocalPolicyContract(_0x26be5f,_0x2336ad){const _0x46f0d7=a282_0x58b8a3;if(!isObject(_0x26be5f))throw instantApiPolicyError(_0x46f0d7(0x164),_0x46f0d7(0x16c));if(_0x26be5f[_0x46f0d7(0x183)]!=='1'&&_0x26be5f[_0x46f0d7(0x183)]!=='2')throw instantApiPolicyError(_0x46f0d7(0x176),_0x46f0d7(0x187),_0x46f0d7(0x194));if(_0x26be5f['appCode']!==_0x2336ad)throw instantApiPolicyError(_0x46f0d7(0x17e),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x2336ad+'.');if(!isObject(_0x26be5f[_0x46f0d7(0x155)])||typeof _0x26be5f[_0x46f0d7(0x155)][_0x46f0d7(0x192)]!==_0x46f0d7(0x181))throw instantApiPolicyError(_0x46f0d7(0x17b),_0x46f0d7(0x162));if(_0x26be5f[_0x46f0d7(0x190)]!==undefined&&_0x26be5f[_0x46f0d7(0x190)]!==null&&!Array['isArray'](_0x26be5f[_0x46f0d7(0x190)]))throw instantApiPolicyError(_0x46f0d7(0x185),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x26be5f;}function isObject(_0x246734){const _0x14438d=a282_0x58b8a3;return _0x246734!==null&&typeof _0x246734==='object'&&!Array[_0x14438d(0x191)](_0x246734);}function isMissingFile(_0x2ffb5c){const _0x1af9da=a282_0x58b8a3;return Boolean(_0x2ffb5c&&typeof _0x2ffb5c==='object'&&_0x2ffb5c[_0x1af9da(0x18e)]==='ENOENT');}function a282_0x5827(){const _0x210539=['policyRoot','defaults','24xvQpbo','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','overwritten','2320gZINgP','created','catch','stringify','instant_api_policy_file_missing','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_unreadable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_invalid','Policy\x20defaults.instantApi\x20is\x20required.','16236SSVrHZ','instant_api_policy_json_invalid','utf8','utf-8','appCode','.tmp','byteLength','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','.rabetbase/instant-api-policy','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','5547480eMasCI','4713877WJTmze','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','23953YofBmJ','5bpcJtE','5306664Chalme','policyFilePath','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','includes','instant_api_policy_version_invalid','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','decode','policy.json','pid','instant_api_policy_defaults_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','unchanged','instant_api_policy_app_code_mismatch','instant_api_policy_file_exists','allow','string','2945232hjmWiB','version','Review\x20the\x20file\x20before\x20retrying.','instant_api_policy_rules_invalid','trim','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','force','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','4809900BpzWiS','code','instant_api_policy_file_unwritable','rules','isArray','instantApi','16nSQpQI','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.'];a282_0x5827=function(){return _0x210539;};return a282_0x5827();}function isAlreadyExists(_0x18a63e){const _0x3b1642=a282_0x58b8a3;return Boolean(_0x18a63e&&typeof _0x18a63e==='object'&&_0x18a63e[_0x3b1642(0x18e)]==='EEXIST');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a283_0x1ee16c=a283_0x219b;(function(_0x41af40,_0x1873eb){const _0x414f63=a283_0x219b,_0x16d286=_0x41af40();while(!![]){try{const _0x1b299d=parseInt(_0x414f63(0x198))/0x1*(parseInt(_0x414f63(0x194))/0x2)+parseInt(_0x414f63(0x1bc))/0x3*(-parseInt(_0x414f63(0x1b4))/0x4)+-parseInt(_0x414f63(0x1d6))/0x5*(-parseInt(_0x414f63(0x1a9))/0x6)+parseInt(_0x414f63(0x1c4))/0x7+parseInt(_0x414f63(0x19b))/0x8+-parseInt(_0x414f63(0x1bb))/0x9+-parseInt(_0x414f63(0x1a1))/0xa;if(_0x1b299d===_0x1873eb)break;else _0x16d286['push'](_0x16d286['shift']());}catch(_0x3f68db){_0x16d286['push'](_0x16d286['shift']());}}}(a283_0xa71f,0xf2381));function a283_0xa71f(){const _0x55bbda=['authRequired','name','isSafeInteger','scope','rank','134335PfTVTH','scoreKind','data','AbortError','object','Knowledge\x20search\x20query\x20is\x20required.','text','application/json','profile','total','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','apiError','/smartapi/knowledge/company-public/search','public','map','19678syCCQh','get','success','strategyFingerprint','109xbDNVY','documentId','revision','7933296JpXUCd','entries','chunkId','validation','split','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','6627450wFFkrK','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','\x20contract.','hits','isArray','signal','finalScore','POST','48FrJPZR','content-type','appCode','stringify','schemaVersion','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','topK','SmartCode\x20knowledge\x20search\x20failed.','company','no-store','cookie','3792SxUooo','cache-control','cli:rabetbase','timingsMs','networkError','headers','test','8304570maHgkK','1338bEBxgK','toLowerCase','title','sort','some','isFinite','rawScore','development','5049541HvzJtR','string','length','json','number','SmartCode\x20knowledge\x20search\x20request\x20failed.','tags','hits[','trim','includes','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','response\x20envelope','score'];a283_0xa71f=function(){return _0x55bbda;};return a283_0xa71f();}import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x1ee16c(0x1ad),'profile',a283_0x1ee16c(0x18e),a283_0x1ee16c(0x1a4),'strategyFingerprint',a283_0x1ee16c(0x1b7)],HIT_KEYS=['documentId',a283_0x1ee16c(0x19a),a283_0x1ee16c(0x19d),a283_0x1ee16c(0x1d4),a283_0x1ee16c(0x1be),a283_0x1ee16c(0x18b),a283_0x1ee16c(0x1ca),a283_0x1ee16c(0x1d5),a283_0x1ee16c(0x1c2),a283_0x1ee16c(0x1a7),a283_0x1ee16c(0x186)];export async function searchDevelopmentKnowledge(_0xc6a4a){const _0x37eedc=a283_0x1ee16c,_0x5b6239=_0xc6a4a[_0x37eedc(0x1ab)][_0x37eedc(0x1cc)](),_0x59c373=_0xc6a4a['query']['trim']();if(!_0x5b6239)throw CliErrors['validation']('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0xc6a4a[_0x37eedc(0x1b3)][_0x37eedc(0x1cc)]())throw CliErrors[_0x37eedc(0x1d1)]();if(!_0x59c373)throw CliErrors['validation'](_0x37eedc(0x18a));validateTopK(_0xc6a4a[_0x37eedc(0x1af)]);const _0x44de8e=getKbDomain()+_0x37eedc(0x191);let _0x3f3c75;try{_0x3f3c75=await fetch(_0x44de8e,{'method':_0x37eedc(0x1a8),'headers':{'Content-Type':_0x37eedc(0x18c),'Cookie':_0xc6a4a['cookie'],'X-Invoke-Source':_0x37eedc(0x1b6)},'body':JSON[_0x37eedc(0x1ac)]({'appCode':_0x5b6239,'query':_0x59c373,..._0xc6a4a[_0x37eedc(0x1af)]!==undefined?{'topK':_0xc6a4a[_0x37eedc(0x1af)]}:{}}),'signal':_0xc6a4a[_0x37eedc(0x1a6)]});}catch(_0x173145){if(_0x173145 instanceof CliError)throw _0x173145;if(_0x173145 instanceof Error&&_0x173145[_0x37eedc(0x1d2)]===_0x37eedc(0x188))throw _0x173145;throw CliErrors[_0x37eedc(0x1b8)](_0x37eedc(0x1c9));}if(!hasNoStore(_0x3f3c75[_0x37eedc(0x1b9)]))throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1ce));if(_0x3f3c75['status']===0x191)throw CliErrors['authRequired']();if(!_0x3f3c75['ok'])throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1a2)+_0x3f3c75['status']+').');if(!(_0x3f3c75[_0x37eedc(0x1b9)]['get'](_0x37eedc(0x1aa))??'')[_0x37eedc(0x1bd)]()[_0x37eedc(0x1cd)](_0x37eedc(0x18c)))throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1ae));let _0xe72405;try{_0xe72405=await _0x3f3c75[_0x37eedc(0x1c7)]();}catch{throw CliErrors[_0x37eedc(0x190)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0xe72405),_0xc6a4a['topK']);}function readEnvelopeData(_0x41a0f1){const _0x221e12=a283_0x1ee16c,_0x36e0da=requireRecord(_0x41a0f1,_0x221e12(0x1cf));if(_0x36e0da[_0x221e12(0x196)]===![])throw CliErrors['apiError'](_0x221e12(0x1b0));if(!(_0x221e12(0x187)in _0x36e0da))throw invalidContract(_0x221e12(0x1cf));return _0x36e0da[_0x221e12(0x187)];}function validateTopK(_0x3b1e97){const _0x38ec2e=a283_0x1ee16c;if(_0x3b1e97!==undefined&&(!Number['isSafeInteger'](_0x3b1e97)||_0x3b1e97<0x1||_0x3b1e97>0x32))throw CliErrors[_0x38ec2e(0x19e)](_0x38ec2e(0x1a0));}function hasNoStore(_0xc9b444){const _0x1e8ffd=a283_0x1ee16c;return(_0xc9b444[_0x1e8ffd(0x195)](_0x1e8ffd(0x1b5))??'')[_0x1e8ffd(0x19f)](',')[_0x1e8ffd(0x1c0)](_0x57bb48=>_0x57bb48[_0x1e8ffd(0x1cc)]()[_0x1e8ffd(0x1bd)]()===_0x1e8ffd(0x1b2));}function parseDevelopmentSearchResponse(_0xe9d42c,_0x12ab03){const _0x39736c=a283_0x1ee16c,_0x304deb=requireExactRecord(_0xe9d42c,RESPONSE_KEYS,'response');if(_0x304deb['schemaVersion']!==0x2||_0x304deb[_0x39736c(0x18d)]!==_0x39736c(0x1c3))throw invalidContract(_0x39736c(0x18d));if(!Array['isArray'](_0x304deb[_0x39736c(0x1a4)])||_0x304deb[_0x39736c(0x1a4)][_0x39736c(0x1c6)]>(_0x12ab03??0x32))throw invalidContract(_0x39736c(0x1a4));if(typeof _0x304deb['strategyFingerprint']!=='string'||!/^sha256:[0-9a-f]{64}$/['test'](_0x304deb[_0x39736c(0x197)]))throw invalidContract(_0x39736c(0x197));const _0xa2bca7=requireRecord(_0x304deb[_0x39736c(0x1b7)],_0x39736c(0x1b7)),_0x39c845={};for(const [_0x536bd7,_0x33c5f5]of Object[_0x39736c(0x19c)](_0xa2bca7)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x39736c(0x1ba)](_0x536bd7)||typeof _0x33c5f5!=='number'||!Number[_0x39736c(0x1c1)](_0x33c5f5)||_0x33c5f5<0x0)throw invalidContract(_0x39736c(0x1b7));_0x39c845[_0x536bd7]=_0x33c5f5;}const _0x172b98=_0x304deb[_0x39736c(0x1a4)][_0x39736c(0x193)]((_0x8981f3,_0x1369a0)=>parseHit(_0x8981f3,_0x1369a0));if(!Number['isSafeInteger'](_0x304deb[_0x39736c(0x18e)])||_0x304deb[_0x39736c(0x18e)]!==_0x172b98[_0x39736c(0x1c6)])throw invalidContract(_0x39736c(0x18e));return{'schemaVersion':_0x304deb[_0x39736c(0x1ad)],'profile':_0x304deb['profile'],'total':_0x304deb[_0x39736c(0x18e)],'strategyFingerprint':_0x304deb[_0x39736c(0x197)],'timingsMs':_0x39c845,'hits':_0x172b98};}function a283_0x219b(_0x283963,_0x1aa114){_0x283963=_0x283963-0x186;const _0xa71f44=a283_0xa71f();let _0x219b2c=_0xa71f44[_0x283963];return _0x219b2c;}function parseHit(_0x501e14,_0x250eb2){const _0x100d81=a283_0x1ee16c,_0x21d316=requireExactRecord(_0x501e14,HIT_KEYS,_0x100d81(0x1cb)+_0x250eb2+']'),_0x104a0a=_0x313329=>{const _0x2b9df9=_0x100d81,_0x3ca309=_0x21d316[_0x313329];if(typeof _0x3ca309!==_0x2b9df9(0x1c5)||!_0x3ca309)throw invalidContract(_0x313329);return _0x3ca309;};if(!Number[_0x100d81(0x1d3)](_0x21d316[_0x100d81(0x19a)])||_0x21d316['revision']<0x1)throw invalidContract(_0x100d81(0x19a));if(_0x21d316[_0x100d81(0x1d4)]!==_0x100d81(0x192)&&_0x21d316[_0x100d81(0x1d4)]!==_0x100d81(0x1b1))throw invalidContract(_0x100d81(0x1d4));if(typeof _0x21d316[_0x100d81(0x1be)]!==_0x100d81(0x1c5)||typeof _0x21d316['text']!==_0x100d81(0x1c5))throw invalidContract(_0x100d81(0x18b));if(!Array[_0x100d81(0x1a5)](_0x21d316['tags'])||_0x21d316[_0x100d81(0x1ca)][_0x100d81(0x1c0)](_0x13e8e7=>typeof _0x13e8e7!==_0x100d81(0x1c5)))throw invalidContract(_0x100d81(0x1ca));if(!Number[_0x100d81(0x1d3)](_0x21d316[_0x100d81(0x1d5)])||_0x21d316[_0x100d81(0x1d5)]!==_0x250eb2+0x1)throw invalidContract(_0x100d81(0x1d5));if(!isFiniteNumber(_0x21d316[_0x100d81(0x1c2)])||!isFiniteNumber(_0x21d316['finalScore']))throw invalidContract(_0x100d81(0x1d0));return{'documentId':_0x104a0a(_0x100d81(0x199)),'revision':_0x21d316[_0x100d81(0x19a)],'chunkId':_0x104a0a(_0x100d81(0x19d)),'scope':_0x21d316[_0x100d81(0x1d4)],'title':_0x21d316['title'],'text':_0x21d316['text'],'tags':[..._0x21d316[_0x100d81(0x1ca)]],'rank':_0x21d316[_0x100d81(0x1d5)],'rawScore':_0x21d316['rawScore'],'finalScore':_0x21d316[_0x100d81(0x1a7)],'scoreKind':_0x104a0a(_0x100d81(0x186))};}function requireExactRecord(_0x4e2947,_0x488db1,_0x18ca05){const _0x182f65=a283_0x1ee16c,_0x50708b=requireRecord(_0x4e2947,_0x18ca05),_0x4fe5c2=Object['keys'](_0x50708b)[_0x182f65(0x1bf)](),_0x32c8fa=[..._0x488db1]['sort']();if(_0x4fe5c2[_0x182f65(0x1c6)]!==_0x32c8fa[_0x182f65(0x1c6)]||_0x4fe5c2['some']((_0x10f161,_0x3606d8)=>_0x10f161!==_0x32c8fa[_0x3606d8]))throw invalidContract(_0x18ca05);return _0x50708b;}function requireRecord(_0x522b90,_0x563d20){const _0x40c706=a283_0x1ee16c;if(!_0x522b90||typeof _0x522b90!==_0x40c706(0x189)||Array[_0x40c706(0x1a5)](_0x522b90))throw invalidContract(_0x563d20);return _0x522b90;}function isFiniteNumber(_0x45babe){const _0x5853af=a283_0x1ee16c;return typeof _0x45babe===_0x5853af(0x1c8)&&Number[_0x5853af(0x1c1)](_0x45babe);}function invalidContract(_0x368371){const _0x194f01=a283_0x1ee16c;return CliErrors[_0x194f01(0x190)](_0x194f01(0x18f)+_0x368371+_0x194f01(0x1a3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a284_0x22dd40=a284_0x3324;(function(_0x5d1407,_0x2e203c){const _0x5d51c6=a284_0x3324,_0x2ac933=_0x5d1407();while(!![]){try{const _0x44d5b7=-parseInt(_0x5d51c6(0x173))/0x1+-parseInt(_0x5d51c6(0x18b))/0x2*(parseInt(_0x5d51c6(0x17f))/0x3)+parseInt(_0x5d51c6(0x18d))/0x4+parseInt(_0x5d51c6(0x176))/0x5+parseInt(_0x5d51c6(0x16f))/0x6*(parseInt(_0x5d51c6(0x17d))/0x7)+-parseInt(_0x5d51c6(0x17c))/0x8*(-parseInt(_0x5d51c6(0x18c))/0x9)+-parseInt(_0x5d51c6(0x175))/0xa;if(_0x44d5b7===_0x2e203c)break;else _0x2ac933['push'](_0x2ac933['shift']());}catch(_0x21310d){_0x2ac933['push'](_0x2ac933['shift']());}}}(a284_0x1120,0x90bc2));function a284_0x3324(_0x430c1d,_0x168fdd){_0x430c1d=_0x430c1d-0x16f;const _0x112050=a284_0x1120();let _0x33246d=_0x112050[_0x430c1d];return _0x33246d;}import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x1f8935,_0x2c129d=process[a284_0x22dd40(0x177)]()){const _0x34051e=a284_0x22dd40,_0x495ccf=resolve(_0x2c129d),_0x53eb96=join(_0x495ccf,_0x34051e(0x189),_0x34051e(0x17b));return{'projectRoot':_0x495ccf,'pagesBaseDir':_0x53eb96,'appPagesDir':join(_0x53eb96,_0x1f8935),'lockFilePath':join(_0x495ccf,_0x34051e(0x189),_0x34051e(0x179))};}export function buildPageFileName(_0x344b54,_0x2b62dd){const _0x193dbc=a284_0x22dd40;return _0x344b54+'-'+_0x2b62dd[_0x193dbc(0x174)]()+_0x193dbc(0x181);}export function resolvePageFilePath(_0x5948cf,_0xb7e1e6,_0x574cde){const _0x4b4a72=a284_0x22dd40;return join(_0x5948cf[_0x4b4a72(0x188)],buildPageFileName(_0xb7e1e6,_0x574cde));}export async function ensureParentDirectory(_0x37d6cd){await mkdir(dirname(_0x37d6cd),{'recursive':!![]});}function a284_0x1120(){const _0x3abc5e=['9OICQTZ','4736756mYHWfY','48VZWloe','isDirectory','sort','localeCompare','25397UbjiKY','toUpperCase','21026240tJetWv','3303080FWAiPH','cwd','validation','page.lock.json','flagMissing','page','1756984rxSvnN','659554EDKMrZ','trim','21fSNwDg','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.json','name','utf8','Page\x20directory\x20not\x20found:\x20','F_OK','split','Unsupported\x20file\x20in\x20page\x20directory:\x20','appPagesDir','.rabetbase','isFile','27814orwKVY'];a284_0x1120=function(){return _0x3abc5e;};return a284_0x1120();}export async function fileExists(_0x57b2e0){const _0x364284=a284_0x22dd40;try{return await access(_0x57b2e0,constants[_0x364284(0x185)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0xae5e5a){const _0x129603=a284_0x22dd40,_0x4e41c4=_0xae5e5a[_0x129603(0x17e)]();if(!_0x4e41c4)throw CliErrors[_0x129603(0x17a)]('page-dir');const _0x3bc4e3=resolve(_0x4e41c4);let _0x5bef15;try{_0x5bef15=await lstat(_0x3bc4e3);}catch{throw CliErrors[_0x129603(0x178)](_0x129603(0x184)+_0x4e41c4);}if(!_0x5bef15[_0x129603(0x170)]())throw CliErrors[_0x129603(0x178)](_0x129603(0x180)+_0x4e41c4);const _0x23d3c7={};return await readDirectory(_0x3bc4e3,_0x3bc4e3,_0x23d3c7),_0x23d3c7;}async function readDirectory(_0x6c0d20,_0x28721e,_0x5bd5e5){const _0xa0ec59=a284_0x22dd40,_0x417e0f=await readdir(_0x28721e,{'withFileTypes':!![]});for(const _0x37de45 of _0x417e0f[_0xa0ec59(0x171)]((_0x3bee52,_0x2e8696)=>_0x3bee52[_0xa0ec59(0x182)][_0xa0ec59(0x172)](_0x2e8696[_0xa0ec59(0x182)]))){const _0x4b3998=join(_0x28721e,_0x37de45[_0xa0ec59(0x182)]);if(_0x37de45[_0xa0ec59(0x170)]()){await readDirectory(_0x6c0d20,_0x4b3998,_0x5bd5e5);continue;}if(!_0x37de45[_0xa0ec59(0x18a)]())throw CliErrors[_0xa0ec59(0x178)](_0xa0ec59(0x187)+_0x4b3998);_0x5bd5e5[relative(_0x6c0d20,_0x4b3998)[_0xa0ec59(0x186)](sep)['join']('/')]=await readFile(_0x4b3998,_0xa0ec59(0x183));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a285_0x5e68(_0x1e0984,_0x1d092b){_0x1e0984=_0x1e0984-0x86;const _0x2e2792=a285_0x2e27();let _0x5e686d=_0x2e2792[_0x1e0984];return _0x5e686d;}(function(_0x2c4614,_0x137cba){const _0x37ed7a=a285_0x5e68,_0x1fcc3c=_0x2c4614();while(!![]){try{const _0x554703=parseInt(_0x37ed7a(0x8e))/0x1*(-parseInt(_0x37ed7a(0x8a))/0x2)+parseInt(_0x37ed7a(0x8b))/0x3+-parseInt(_0x37ed7a(0x86))/0x4*(-parseInt(_0x37ed7a(0x8f))/0x5)+-parseInt(_0x37ed7a(0x8c))/0x6+parseInt(_0x37ed7a(0x91))/0x7+parseInt(_0x37ed7a(0x90))/0x8+parseInt(_0x37ed7a(0x88))/0x9;if(_0x554703===_0x137cba)break;else _0x1fcc3c['push'](_0x1fcc3c['shift']());}catch(_0x3085f3){_0x1fcc3c['push'](_0x1fcc3c['shift']());}}}(a285_0x2e27,0x2f060));import a285_0x2581bd from'node:crypto';import{readFile}from'node:fs/promises';function a285_0x2e27(){const _0x3f30be=['2PCTNCn','468159XbsWqw','210030ugeQOI','utf8','342407etqIkD','9995pFDpLT','235352qSYlCv','1143198DsTefs','update','20khsmId','hex','1901151hwYpJh','createHash'];a285_0x2e27=function(){return _0x3f30be;};return a285_0x2e27();}export function serializePageSchemaForFile(_0x5f4059){return JSON['stringify'](JSON['parse'](_0x5f4059),null,0x2)+'\x0a';}export function computePageContentHash(_0x121c81){const _0xf9cc63=a285_0x5e68;return a285_0x2581bd[_0xf9cc63(0x89)]('md5')[_0xf9cc63(0x92)](_0x121c81)['digest'](_0xf9cc63(0x87));}export function computeSerializedSchemaHash(_0xd8c2cf){return computePageContentHash(serializePageSchemaForFile(_0xd8c2cf));}export async function computePageFileHash(_0x473a48){const _0x4e3c88=a285_0x5e68,_0x5f4f0e=await readFile(_0x473a48,_0x4e3c88(0x8d));return computePageContentHash(_0x5f4f0e);}
|