@lovrabet/rabetbase-cli 2.5.6 → 2.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +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.d.ts +6 -2
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +26 -6
- 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-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +12 -0
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +8 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a298_0x4ad4d2=a298_0x3720;(function(_0x2b8bee,_0x19d835){const _0xba3adf=a298_0x3720,_0x56c00e=_0x2b8bee();while(!![]){try{const _0x44b375=parseInt(_0xba3adf(0x21c))/0x1+parseInt(_0xba3adf(0x250))/0x2*(parseInt(_0xba3adf(0x2c2))/0x3)+parseInt(_0xba3adf(0x222))/0x4+-parseInt(_0xba3adf(0x31f))/0x5+-parseInt(_0xba3adf(0x2a6))/0x6*(-parseInt(_0xba3adf(0x30a))/0x7)+parseInt(_0xba3adf(0x290))/0x8*(parseInt(_0xba3adf(0x311))/0x9)+-parseInt(_0xba3adf(0x23d))/0xa;if(_0x44b375===_0x19d835)break;else _0x56c00e['push'](_0x56c00e['shift']());}catch(_0x1da0ee){_0x56c00e['push'](_0x56c00e['shift']());}}}(a298_0x36ad,0xa10f9));function a298_0x3720(_0x5b4d10,_0x812e99){_0x5b4d10=_0x5b4d10-0x1c4;const _0x36ad8f=a298_0x36ad();let _0x372089=_0x36ad8f[_0x5b4d10];return _0x372089;}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':a298_0x4ad4d2(0x24f),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a298_0x4ad4d2(0x276),'type':a298_0x4ad4d2(0x224),'required':['flowName',a298_0x4ad4d2(0x26a),a298_0x4ad4d2(0x2f9)],'$defs':{'userId':{'anyOf':[{'type':a298_0x4ad4d2(0x283),'minLength':0x1},{'type':a298_0x4ad4d2(0x2cf),'minimum':0x1}]},'position':{'type':a298_0x4ad4d2(0x224),'required':['x','y'],'properties':{'x':{'type':a298_0x4ad4d2(0x292),'minimum':0x0},'y':{'type':a298_0x4ad4d2(0x292),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x285),'unit'],'properties':{'value':{'type':a298_0x4ad4d2(0x2cf),'minimum':0x1},'unit':{'enum':[a298_0x4ad4d2(0x22c),a298_0x4ad4d2(0x1f3),a298_0x4ad4d2(0x2b1),a298_0x4ad4d2(0x1d5)]}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id',a298_0x4ad4d2(0x2f2),a298_0x4ad4d2(0x1c5),'position'],'properties':{'id':{'type':a298_0x4ad4d2(0x283),'pattern':a298_0x4ad4d2(0x2ab)},'type':{'enum':[a298_0x4ad4d2(0x238),a298_0x4ad4d2(0x1e2),'APPROVAL',a298_0x4ad4d2(0x2e3),a298_0x4ad4d2(0x212),'NOTIFICATION']},'name':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'path':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a298_0x4ad4d2(0x260),a298_0x4ad4d2(0x229),'ANY']},'taskMode':{'enum':[a298_0x4ad4d2(0x26c),'HANDLE']},'assignee':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x1f4)],'properties':{'strategy':{'enum':[a298_0x4ad4d2(0x24b),a298_0x4ad4d2(0x314)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a298_0x4ad4d2(0x2f4)}},'roleId':{'anyOf':[{'type':a298_0x4ad4d2(0x2cf),'minimum':0x1},{'type':a298_0x4ad4d2(0x283),'pattern':a298_0x4ad4d2(0x2fb)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a298_0x4ad4d2(0x1f4),a298_0x4ad4d2(0x26e)],'properties':{'strategy':{'const':a298_0x4ad4d2(0x24b)},'userIds':{'type':a298_0x4ad4d2(0x1dc),'minItems':0x1,'items':{'$ref':a298_0x4ad4d2(0x2f4)}}},'additionalProperties':!![]},'sequential':{'type':a298_0x4ad4d2(0x1ee)},'result':{'enum':[a298_0x4ad4d2(0x261),a298_0x4ad4d2(0x21f)]},'scriptName':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'resultVariable':{'type':a298_0x4ad4d2(0x283),'pattern':a298_0x4ad4d2(0x2ab)},'async':{'type':a298_0x4ad4d2(0x224),'properties':{'enabled':{'type':a298_0x4ad4d2(0x1ee)},'retryCount':{'type':a298_0x4ad4d2(0x2cf),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a298_0x4ad4d2(0x224),'properties':{'enabled':{'type':'boolean'},'duration':{'$ref':a298_0x4ad4d2(0x319)},'action':{'enum':[a298_0x4ad4d2(0x235),'AUTO_REJECT','EXECUTE_BFF']},'interrupting':{'type':a298_0x4ad4d2(0x1ee)},'scriptName':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'resultVariable':{'type':'string','pattern':a298_0x4ad4d2(0x2ab)}},'additionalProperties':!![]},'cc':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x1e9)],'properties':{'recipientUserIds':{'type':a298_0x4ad4d2(0x1dc),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a298_0x4ad4d2(0x283),'minLength':0x1}},'visible':{'type':a298_0x4ad4d2(0x1dc),'uniqueItems':!![],'items':{'type':a298_0x4ad4d2(0x283),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x255),a298_0x4ad4d2(0x2d3)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a298_0x4ad4d2(0x1e5),a298_0x4ad4d2(0x2ec)]},'template':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x31c),a298_0x4ad4d2(0x2a1)],'properties':{'title':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'summary':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':a298_0x4ad4d2(0x1dc),'maxItems':0x8,'items':{'type':'object','required':[a298_0x4ad4d2(0x1f6),a298_0x4ad4d2(0x285)],'properties':{'label':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'value':{'type':a298_0x4ad4d2(0x283),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a298_0x4ad4d2(0x1dc),'maxItems':0x2,'items':{'type':a298_0x4ad4d2(0x224),'required':['text',a298_0x4ad4d2(0x320)],'properties':{'text':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'url':{'type':a298_0x4ad4d2(0x283),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a298_0x4ad4d2(0x1dc),'items':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x2f2),a298_0x4ad4d2(0x285)],'properties':{'type':{'enum':['USER',a298_0x4ad4d2(0x314),a298_0x4ad4d2(0x259)]},'value':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'role':{'enum':['TO','CC',a298_0x4ad4d2(0x2a2)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':a298_0x4ad4d2(0x283),'pattern':a298_0x4ad4d2(0x2ab)},'source':{'type':'string','minLength':0x1},'target':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'sourceNodeId':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a298_0x4ad4d2(0x232),'APPROVED',a298_0x4ad4d2(0x21f),a298_0x4ad4d2(0x29c)]},'expression':{'type':'string'},'defaultFlow':{'type':'boolean'},'name':{'type':a298_0x4ad4d2(0x283)},'waypoints':{'type':a298_0x4ad4d2(0x1dc),'items':{'$ref':a298_0x4ad4d2(0x1de)}}},'allOf':[{'anyOf':[{'required':[a298_0x4ad4d2(0x2f8)]},{'required':[a298_0x4ad4d2(0x301)]}]},{'anyOf':[{'required':[a298_0x4ad4d2(0x2c1)]},{'required':[a298_0x4ad4d2(0x28a)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a298_0x4ad4d2(0x283)},'flowType':{'enum':[a298_0x4ad4d2(0x1f5),'INDEPENDENT_FLOW']},'datasetCode':{'type':a298_0x4ad4d2(0x283),'minLength':0x1},'pageId':{'type':a298_0x4ad4d2(0x2cf)},'templateName':![],'flowJson':{'type':a298_0x4ad4d2(0x224),'required':[a298_0x4ad4d2(0x277),a298_0x4ad4d2(0x1c6)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a298_0x4ad4d2(0x283),'const':a298_0x4ad4d2(0x2ee),'description':a298_0x4ad4d2(0x244)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a298_0x4ad4d2(0x2ed)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a298_0x4ad4d2(0x1dc),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a298_0x4ad4d2(0x1dc),'minItems':0x1,'items':{'$ref':a298_0x4ad4d2(0x293)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a298_0x4ad4d2(0x1ef),'flowCode',a298_0x4ad4d2(0x28e),'bindDatasetCode',a298_0x4ad4d2(0x1fa),a298_0x4ad4d2(0x209),a298_0x4ad4d2(0x1e4),a298_0x4ad4d2(0x223)],REMOVED_ROOT_FIELDS=['id','appCode','templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a298_0x4ad4d2(0x2ee),NODE_TYPES=new Set([a298_0x4ad4d2(0x238),'END',a298_0x4ad4d2(0x26c),'CONDITION','SCRIPT',a298_0x4ad4d2(0x2bc)]),CONDITION_TYPES=new Set([a298_0x4ad4d2(0x232),'APPROVED',a298_0x4ad4d2(0x21f),a298_0x4ad4d2(0x29c)]),APPROVAL_MODES=new Set([a298_0x4ad4d2(0x260),a298_0x4ad4d2(0x229),'ANY']),APPROVAL_TASK_MODES=new Set(['APPROVAL',a298_0x4ad4d2(0x308)]),FLOW_TIME_UNITS=new Set([a298_0x4ad4d2(0x22c),'MINUTES',a298_0x4ad4d2(0x2b1),a298_0x4ad4d2(0x1d5)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a298_0x4ad4d2(0x2ff),a298_0x4ad4d2(0x299)]),FLOW_TYPES=new Set([a298_0x4ad4d2(0x1f5),a298_0x4ad4d2(0x2af)]),FLOW_PAGE_MODES=new Set([a298_0x4ad4d2(0x2ed),'PLATFORM_FORM']),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([a298_0x4ad4d2(0x1e5),a298_0x4ad4d2(0x2ec)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a298_0x4ad4d2(0x270),a298_0x4ad4d2(0x314),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a298_0x4ad4d2(0x2a2)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a298_0x4ad4d2(0x210),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a298_0x4ad4d2(0x202),RESERVED_RESULT_VARIABLES=new Set([a298_0x4ad4d2(0x240),'approved','approval_sys_appCode',a298_0x4ad4d2(0x23c),'approval_sys_initiatorUserId',a298_0x4ad4d2(0x29b),'approval_sys_datasetCode',a298_0x4ad4d2(0x2ac),a298_0x4ad4d2(0x20e),a298_0x4ad4d2(0x1f0)]);export function normalizeFlowConfig(_0x2087d4){const _0x346617=a298_0x4ad4d2;if(!isRecord(_0x2087d4))throw new TypeError(_0x346617(0x20f));const _0x440749=cloneJsonValue(_0x2087d4),_0x7c8d62=_0x440749[_0x346617(0x2f9)],_0x54795c=isRecord(_0x7c8d62)?cloneJsonValue(_0x7c8d62):{},_0x18a7be=[],_0x392dd2=[];for(const _0x30930e of REMOVED_ROOT_FIELDS){if(!Object['prototype']['hasOwnProperty'][_0x346617(0x268)](_0x440749,_0x30930e))continue;delete _0x440749[_0x30930e],_0x392dd2[_0x346617(0x28c)](_0x30930e),_0x18a7be[_0x346617(0x28c)]({'code':_0x346617(0x2c6),'path':_0x30930e,'message':_0x30930e+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x425c4b of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x346617(0x2e4)]['hasOwnProperty'][_0x346617(0x268)](_0x54795c,_0x425c4b))continue;const _0x34dfa6=_0x346617(0x304)+_0x425c4b;delete _0x54795c[_0x425c4b],_0x392dd2[_0x346617(0x28c)](_0x34dfa6),_0x18a7be[_0x346617(0x28c)]({'code':_0x346617(0x2c6),'path':_0x34dfa6,'message':_0x34dfa6+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x346617(0x2e4)]['hasOwnProperty']['call'](_0x54795c,_0x346617(0x1f9))){const _0xd88b92=_0x54795c['schemaVersion'],_0x3fd199=typeof _0xd88b92===_0x346617(0x283)?_0xd88b92[_0x346617(0x2e1)]():_0xd88b92;if(isEmptyJsonValue(_0xd88b92)||_0x3fd199===DEFAULT_FLOW_SCHEMA_VERSION){const _0x2934cd=_0x346617(0x22d);delete _0x54795c[_0x346617(0x1f9)],_0x392dd2[_0x346617(0x28c)](_0x2934cd),_0x18a7be[_0x346617(0x28c)]({'code':'legacy_field_removed','path':_0x2934cd,'message':_0x2934cd+_0x346617(0x21d)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x54795c,_0x346617(0x2f9),_0x18a7be,_0x392dd2);_0x440749['flowType']===_0x346617(0x2af)&&!Object[_0x346617(0x2e4)][_0x346617(0x26f)][_0x346617(0x268)](_0x54795c,_0x346617(0x258))&&(_0x54795c[_0x346617(0x258)]=_0x346617(0x2ed));_0x440749[_0x346617(0x2f9)]=_0x54795c;if(typeof _0x440749[_0x346617(0x28e)]==='string')_0x440749[_0x346617(0x28e)]=_0x440749[_0x346617(0x28e)]['trim']();return{'config':_0x440749,'warnings':_0x18a7be,'removedPaths':_0x392dd2};}export function validateFlowConfig(_0x2f2eb7){const _0x315ff3=a298_0x4ad4d2;let _0x367ac1;try{_0x367ac1=normalizeFlowConfig(_0x2f2eb7);}catch(_0x2d4e8e){const _0x5a5ed0=_0x2d4e8e instanceof Error?_0x2d4e8e[_0x315ff3(0x2e5)]:String(_0x2d4e8e),_0x466934={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5a5ed0}],'warnings':[],'normalized':_0x466934,'validationConfig':_0x466934};}const _0xeca9b2=_0x367ac1[_0x315ff3(0x2a7)],_0x547d72=cloneJsonValue(_0xeca9b2),_0x30321d=_0x547d72[_0x315ff3(0x2f9)];_0x30321d[_0x315ff3(0x1ef)]=_0x315ff3(0x281),_0x30321d['flowName']=_0xeca9b2[_0x315ff3(0x28e)];typeof _0xeca9b2[_0x315ff3(0x1fa)]==='string'&&_0xeca9b2['datasetCode'][_0x315ff3(0x2e1)]()&&(_0x30321d[_0x315ff3(0x287)]=_0xeca9b2[_0x315ff3(0x1fa)][_0x315ff3(0x2e1)]());const _0x3f86da=[];return validateOuterMetadata(_0xeca9b2,_0x3f86da),validateFlowClassification(_0xeca9b2,_0x3f86da),validateGraph(_0xeca9b2[_0x315ff3(0x2f9)],_0x3f86da),{'valid':_0x3f86da[_0x315ff3(0x2f1)]===0x0,'errors':_0x3f86da,'warnings':_0x367ac1[_0x315ff3(0x2e2)],'normalized':_0xeca9b2,'validationConfig':_0x547d72};}function validateFlowClassification(_0x56bf4,_0x2b7bba){const _0x468c4a=a298_0x4ad4d2;if(!isRecord(_0x56bf4[_0x468c4a(0x2f9)]))return;const _0x39c519=_0x56bf4['flowType'],_0x17006c=_0x56bf4['flowJson']['pageMode'];_0x17006c!==undefined&&(typeof _0x17006c!==_0x468c4a(0x283)||!FLOW_PAGE_MODES[_0x468c4a(0x27a)](_0x17006c))&&_0x2b7bba[_0x468c4a(0x28c)]({'path':'flowJson.pageMode','message':_0x468c4a(0x2e9)+String(_0x17006c)+'.'});_0x39c519===_0x468c4a(0x1f5)&&_0x17006c!==undefined&&_0x2b7bba[_0x468c4a(0x28c)]({'path':'flowJson.pageMode','message':_0x468c4a(0x286)});_0x39c519==='INDEPENDENT_FLOW'&&_0x17006c===_0x468c4a(0x241)&&_0x2b7bba[_0x468c4a(0x28c)]({'path':_0x468c4a(0x289),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x39c519==='FORM_FLOW'||_0x39c519===_0x468c4a(0x2af))&&validateCustomPageNavigation(_0x56bf4,_0x39c519,_0x17006c,_0x2b7bba);if(_0x39c519!==_0x468c4a(0x1f5)||!Array[_0x468c4a(0x28d)](_0x56bf4[_0x468c4a(0x2f9)][_0x468c4a(0x277)]))return;_0x56bf4['flowJson'][_0x468c4a(0x277)][_0x468c4a(0x237)]((_0x480266,_0x182ef1)=>{const _0x1aa583=_0x468c4a;isRecord(_0x480266)&&_0x480266[_0x1aa583(0x2f2)]==='APPROVAL'&&_0x480266[_0x1aa583(0x1c4)]==='HANDLE'&&_0x2b7bba[_0x1aa583(0x28c)]({'path':_0x1aa583(0x279)+_0x182ef1+_0x1aa583(0x288),'message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x559710,_0x21d19d,_0x247ad7,_0xf3c29e){const _0xe6c61e=a298_0x4ad4d2,_0x273bb8=_0x559710[_0xe6c61e(0x2f9)][_0xe6c61e(0x272)];_0x273bb8!==undefined&&_0xf3c29e[_0xe6c61e(0x28c)]({'path':_0xe6c61e(0x291),'message':_0xe6c61e(0x22e)});const _0x1ff831=_0x559710['flowJson']['startPath'];_0x1ff831!==undefined&&(typeof _0x1ff831!=='string'||_0x1ff831['trim']()==='')&&_0xf3c29e[_0xe6c61e(0x28c)]({'path':'flowJson.startPath','message':_0xe6c61e(0x234)});const _0x20015a=Array[_0xe6c61e(0x28d)](_0x559710[_0xe6c61e(0x2f9)][_0xe6c61e(0x277)])?_0x559710[_0xe6c61e(0x2f9)][_0xe6c61e(0x277)]['map']((_0x4ad930,_0x3b021)=>({'node':_0x4ad930,'index':_0x3b021}))[_0xe6c61e(0x2b8)](({node:_0x3d061b})=>isRecord(_0x3d061b)&&_0x3d061b[_0xe6c61e(0x23f)]!==undefined):[],_0x2e137d=_0x1ff831!==undefined||_0x20015a[_0xe6c61e(0x2f1)]>0x0,_0x221c4c=_0x247ad7===undefined&&_0x21d19d===_0xe6c61e(0x2af)?_0xe6c61e(0x2ed):_0x247ad7;_0x2e137d&&(_0x21d19d!=='INDEPENDENT_FLOW'||_0x221c4c!==_0xe6c61e(0x2ed))&&(_0x1ff831!==undefined&&_0xf3c29e[_0xe6c61e(0x28c)]({'path':'flowJson.startPath','message':_0xe6c61e(0x207)}),_0x20015a[_0xe6c61e(0x237)](({index:_0x332486})=>{const _0x2c36ac=_0xe6c61e;_0xf3c29e[_0x2c36ac(0x28c)]({'path':'flowJson.nodes['+_0x332486+_0x2c36ac(0x2ea),'message':_0x2c36ac(0x2c7)});}));}export async function writeNormalizedFlowConfig(_0x43881e,_0x3bd5c0,_0x5483f0={}){const _0x3587d4=a298_0x4ad4d2,_0x3c7d4d=resolve(_0x43881e),_0x26e96c=_0x3c7d4d+'.'+process[_0x3587d4(0x297)]+'.'+randomUUID()+_0x3587d4(0x2d8),_0x2d11fc=JSON[_0x3587d4(0x2b5)](_0x3bd5c0,null,0x2)+'\x0a';let _0x4561aa;try{try{_0x4561aa=(await stat(_0x3c7d4d))[_0x3587d4(0x271)]&0x1ff;}catch{_0x4561aa=undefined;}await writeFile(_0x26e96c,_0x2d11fc,{'encoding':_0x3587d4(0x269),'flag':'wx','mode':_0x4561aa??0x1a4});if(_0x4561aa!==undefined)await chmod(_0x26e96c,_0x4561aa);_0x5483f0['overwrite']===![]?(await link(_0x26e96c,_0x3c7d4d),await unlink(_0x26e96c)):await rename(_0x26e96c,_0x3c7d4d);}finally{await unlink(_0x26e96c)['catch'](()=>undefined);}}function validateOuterMetadata(_0x3188bd,_0x300f6a){const _0x209c8a=a298_0x4ad4d2;(typeof _0x3188bd[_0x209c8a(0x28e)]!==_0x209c8a(0x283)||_0x3188bd[_0x209c8a(0x28e)]['trim']()==='')&&_0x300f6a[_0x209c8a(0x28c)]({'path':_0x209c8a(0x28e),'message':_0x209c8a(0x1e7)});_0x3188bd['flowDesc']!==undefined&&typeof _0x3188bd[_0x209c8a(0x25a)]!==_0x209c8a(0x283)&&_0x300f6a[_0x209c8a(0x28c)]({'path':_0x209c8a(0x25a),'message':_0x209c8a(0x275)});if(_0x3188bd[_0x209c8a(0x26a)]===undefined||_0x3188bd[_0x209c8a(0x26a)]===null)_0x300f6a['push']({'path':_0x209c8a(0x26a),'message':_0x209c8a(0x230)});else(typeof _0x3188bd['flowType']!==_0x209c8a(0x283)||!FLOW_TYPES['has'](_0x3188bd['flowType']))&&_0x300f6a[_0x209c8a(0x28c)]({'path':_0x209c8a(0x26a),'message':_0x209c8a(0x263)+String(_0x3188bd[_0x209c8a(0x26a)])+'.'});_0x3188bd[_0x209c8a(0x1fa)]!==undefined&&typeof _0x3188bd[_0x209c8a(0x1fa)]!==_0x209c8a(0x283)&&_0x300f6a[_0x209c8a(0x28c)]({'path':_0x209c8a(0x1fa),'message':_0x209c8a(0x236)}),_0x3188bd[_0x209c8a(0x1e4)]!==undefined&&(!Number[_0x209c8a(0x1c9)](_0x3188bd[_0x209c8a(0x1e4)])||_0x3188bd[_0x209c8a(0x1e4)]<0x0)&&_0x300f6a[_0x209c8a(0x28c)]({'path':'pageId','message':_0x209c8a(0x2b7)}),_0x3188bd[_0x209c8a(0x26a)]===_0x209c8a(0x2af)&&_0x3188bd[_0x209c8a(0x1fa)]!==undefined&&_0x300f6a[_0x209c8a(0x28c)]({'path':_0x209c8a(0x1fa),'message':_0x209c8a(0x1d2)}),_0x3188bd[_0x209c8a(0x26a)]===_0x209c8a(0x2af)&&_0x3188bd[_0x209c8a(0x1e4)]!==undefined&&_0x300f6a['push']({'path':_0x209c8a(0x1e4),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x4cb6c6,_0x195b29){const _0x1f2314=a298_0x4ad4d2;if(!isRecord(_0x4cb6c6)){_0x195b29[_0x1f2314(0x28c)]({'path':_0x1f2314(0x2f9),'message':_0x1f2314(0x2a3)});return;}!Array[_0x1f2314(0x28d)](_0x4cb6c6[_0x1f2314(0x277)])&&_0x195b29[_0x1f2314(0x28c)]({'path':_0x1f2314(0x2c5),'message':_0x1f2314(0x30e)});!Array[_0x1f2314(0x28d)](_0x4cb6c6[_0x1f2314(0x1c6)])&&_0x195b29[_0x1f2314(0x28c)]({'path':_0x1f2314(0x2da),'message':_0x1f2314(0x27d)});Object[_0x1f2314(0x2e4)][_0x1f2314(0x26f)][_0x1f2314(0x268)](_0x4cb6c6,_0x1f2314(0x1f9))&&_0x195b29[_0x1f2314(0x28c)]({'path':_0x1f2314(0x22d),'message':_0x1f2314(0x2cb)+String(_0x4cb6c6[_0x1f2314(0x1f9)])+_0x1f2314(0x200)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x36609e of[_0x1f2314(0x2f0),_0x1f2314(0x20b),'formPermissions']){Object[_0x1f2314(0x2e4)][_0x1f2314(0x26f)]['call'](_0x4cb6c6,_0x36609e)&&_0x195b29[_0x1f2314(0x28c)]({'path':'flowJson.'+_0x36609e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x4cb6c6[_0x1f2314(0x277)])||!Array[_0x1f2314(0x28d)](_0x4cb6c6['edges']))return;const _0x2f421f=new Map(),_0x34bf8d=[],_0x1fdd76=[],_0x279ca4=new Map(),_0x269ddd=new Map(),_0x375f96=new Set();let _0x5824db=0x0;_0x4cb6c6['nodes'][_0x1f2314(0x237)]((_0x2242fa,_0x10962e)=>{const _0x40ec0a=_0x1f2314,_0x4d327c=_0x40ec0a(0x279)+_0x10962e+']';if(!isRecord(_0x2242fa)){_0x195b29[_0x40ec0a(0x28c)]({'path':_0x4d327c,'message':_0x40ec0a(0x313)});return;}const _0x6087c1=_0x2242fa;if(typeof _0x6087c1['id']!=='string'||!BPMN_ID_PATTERN[_0x40ec0a(0x1f1)](_0x6087c1['id']))_0x195b29[_0x40ec0a(0x28c)]({'path':_0x4d327c+_0x40ec0a(0x27e),'message':_0x40ec0a(0x305)});else _0x2f421f[_0x40ec0a(0x27a)](_0x6087c1['id'])?_0x195b29['push']({'path':_0x4d327c+_0x40ec0a(0x27e),'message':_0x40ec0a(0x1eb)+_0x6087c1['id']+'.'}):(_0x2f421f[_0x40ec0a(0x214)](_0x6087c1['id'],_0x6087c1),_0x375f96[_0x40ec0a(0x2e7)](_0x6087c1['id']));if(!NODE_TYPES[_0x40ec0a(0x27a)](_0x6087c1[_0x40ec0a(0x2f2)]))_0x195b29[_0x40ec0a(0x28c)]({'path':_0x4d327c+_0x40ec0a(0x205),'message':_0x40ec0a(0x257)+String(_0x6087c1[_0x40ec0a(0x2f2)])+'.'});else{if(_0x6087c1[_0x40ec0a(0x2f2)]===_0x40ec0a(0x238))_0x34bf8d[_0x40ec0a(0x28c)](_0x6087c1['id']);else _0x6087c1[_0x40ec0a(0x2f2)]===_0x40ec0a(0x1e2)&&_0x1fdd76[_0x40ec0a(0x28c)](_0x6087c1['id']);}_0x6087c1['type']===_0x40ec0a(0x26c)&&(_0x6087c1[_0x40ec0a(0x1c4)]===undefined||_0x6087c1[_0x40ec0a(0x1c4)]===_0x40ec0a(0x26c))&&(_0x5824db+=0x1);validateNode(_0x6087c1,_0x4d327c,_0x195b29);if(_0x6087c1[_0x40ec0a(0x2f2)]===_0x40ec0a(0x212)){const _0x4b7760=resolveEffectiveResultVariable(_0x6087c1[_0x40ec0a(0x2bd)],![]);_0x4b7760&&(registerResultVariableOwner(_0x269ddd,_0x4b7760,_0x6087c1['id'],_0x195b29),!_0x279ca4[_0x40ec0a(0x27a)](_0x4b7760)&&_0x279ca4[_0x40ec0a(0x214)](_0x4b7760,_0x6087c1['id']));}if(_0x6087c1['type']===_0x40ec0a(0x26c)&&isRecord(_0x6087c1[_0x40ec0a(0x309)])&&_0x6087c1[_0x40ec0a(0x309)][_0x40ec0a(0x300)]===!![]&&_0x6087c1[_0x40ec0a(0x309)]['action']===_0x40ec0a(0x299)){const _0x3d70ef=resolveEffectiveResultVariable(_0x6087c1['timeout']['resultVariable'],!![]);_0x3d70ef&®isterResultVariableOwner(_0x269ddd,_0x3d70ef,_0x6087c1['id']+_0x40ec0a(0x1f7),_0x195b29);}});_0x34bf8d[_0x1f2314(0x2f1)]!==0x1&&_0x195b29['push']({'path':_0x1f2314(0x2c5),'message':_0x1f2314(0x23a)});_0x1fdd76[_0x1f2314(0x2f1)]===0x0&&_0x195b29[_0x1f2314(0x28c)]({'path':_0x1f2314(0x2c5),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x413ae6=new Map(),_0x18ab1c=new Map(),_0x4b6421=new Map(),_0x397f85=new Set();_0x4cb6c6[_0x1f2314(0x1c6)][_0x1f2314(0x237)]((_0x410e7f,_0xe80644)=>{const _0x2297b6=_0x1f2314,_0x2d858f=_0x2297b6(0x2a9)+_0xe80644+']';if(!isRecord(_0x410e7f)){_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f,'message':_0x2297b6(0x24e)});return;}const _0x3f8e17=_0x410e7f;_0x4b6421['set'](_0x3f8e17,_0x2d858f);const _0x2d63d1=resolveEdgeEndpoint(_0x3f8e17[_0x2297b6(0x2f8)],_0x3f8e17[_0x2297b6(0x301)]),_0xb3555f=resolveEdgeEndpoint(_0x3f8e17[_0x2297b6(0x2c1)],_0x3f8e17[_0x2297b6(0x28a)]);if(!_0x2d63d1)_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+'.source','message':_0x2297b6(0x1ca)});if(!_0xb3555f)_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+_0x2297b6(0x2ce),'message':_0x2297b6(0x2a8)});_0x2d63d1&&!_0x2f421f[_0x2297b6(0x27a)](_0x2d63d1)&&_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+_0x2297b6(0x2b9),'message':_0x2297b6(0x2bb)+_0x2d63d1+'.'});_0xb3555f&&!_0x2f421f[_0x2297b6(0x27a)](_0xb3555f)&&_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+_0x2297b6(0x2ce),'message':_0x2297b6(0x1ce)+_0xb3555f+'.'});if(_0x3f8e17['id']!==undefined){if(typeof _0x3f8e17['id']!==_0x2297b6(0x283)||!BPMN_ID_PATTERN[_0x2297b6(0x1f1)](_0x3f8e17['id']))_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+_0x2297b6(0x27e),'message':_0x2297b6(0x248)});else{if(_0x375f96[_0x2297b6(0x27a)](_0x3f8e17['id']))_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f+_0x2297b6(0x27e),'message':_0x2297b6(0x1e1)+_0x3f8e17['id']+'.'});else!_0x375f96[_0x2297b6(0x27a)](_0x3f8e17['id'])&&_0x375f96[_0x2297b6(0x2e7)](_0x3f8e17['id']);}}if(_0x2d63d1&&_0xb3555f){const _0x2819cd=_0x2d63d1+'\x00'+_0xb3555f+'\x00'+(_0x3f8e17[_0x2297b6(0x28b)]??_0x2297b6(0x232));_0x397f85[_0x2297b6(0x27a)](_0x2819cd)?_0x195b29[_0x2297b6(0x28c)]({'path':_0x2d858f,'message':'Duplicate\x20edge\x20route:\x20'+_0x2d63d1+'\x20->\x20'+_0xb3555f+'\x20('+(_0x3f8e17[_0x2297b6(0x28b)]??_0x2297b6(0x232))+').'}):_0x397f85[_0x2297b6(0x2e7)](_0x2819cd);}validateEdge(_0x3f8e17,_0x2d858f,_0x195b29),_0x2d63d1&&_0xb3555f&&(_0x413ae6[_0x2297b6(0x2b0)](_0x2d63d1)?.['push'](_0x3f8e17)??_0x413ae6[_0x2297b6(0x214)](_0x2d63d1,[_0x3f8e17]),_0x18ab1c[_0x2297b6(0x2b0)](_0xb3555f)?.[_0x2297b6(0x28c)](_0x3f8e17)??_0x18ab1c['set'](_0xb3555f,[_0x3f8e17]));});if(_0x34bf8d[_0x1f2314(0x2f1)]!==0x1)return;validateGraphShape(_0x2f421f,_0x34bf8d[0x0],_0x1fdd76,_0x413ae6,_0x18ab1c,_0x4b6421,_0x195b29),validateScriptResultReferences(_0x2f421f,_0x34bf8d[0x0],_0x413ae6,_0x18ab1c,_0x4b6421,_0x279ca4,_0x195b29),validateApprovalResults(_0x2f421f,_0x5824db,_0x1fdd76,_0x195b29);}function validateNode(_0x1d1ddc,_0x2f9ba9,_0x1cf854){const _0x1a22a1=a298_0x4ad4d2;for(const _0x257767 of[_0x1a22a1(0x273),'formPermission']){Object[_0x1a22a1(0x2e4)][_0x1a22a1(0x26f)]['call'](_0x1d1ddc,_0x257767)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.'+_0x257767,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x1a22a1(0x27a)](_0x1d1ddc[_0x1a22a1(0x2f2)]))return;(typeof _0x1d1ddc[_0x1a22a1(0x1c5)]!==_0x1a22a1(0x283)||_0x1d1ddc[_0x1a22a1(0x1c5)]['trim']()==='')&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1e8),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x1d1ddc['pageId']!==undefined&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.pageId','message':_0x1a22a1(0x2d6)});if(_0x1d1ddc[_0x1a22a1(0x23f)]!==undefined){if(typeof _0x1d1ddc[_0x1a22a1(0x23f)]!=='string'||_0x1d1ddc['path'][_0x1a22a1(0x2e1)]()==='')_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1cf),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x1d1ddc[_0x1a22a1(0x2f2)]!=='APPROVAL'&&_0x1d1ddc[_0x1a22a1(0x2f2)]!==_0x1a22a1(0x1e2)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.path','message':_0x1a22a1(0x1c7)});}const _0x292c23=_0x1d1ddc['position'];if(!isRecord(_0x292c23))_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.position','message':_0x1a22a1(0x2d2)});else for(const _0x1070e2 of['x','y']){const _0x158ba6=_0x292c23[_0x1070e2];(typeof _0x158ba6!==_0x1a22a1(0x292)||!Number[_0x1a22a1(0x203)](_0x158ba6)||_0x158ba6<0x0)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x2df)+_0x1070e2,'message':_0x1a22a1(0x25e)+_0x1070e2+_0x1a22a1(0x306)});}if(_0x1d1ddc[_0x1a22a1(0x2f2)]===_0x1a22a1(0x26c)){const _0x4fa38a=_0x1d1ddc['approvalMode']??_0x1a22a1(0x260),_0x372c89=_0x1d1ddc[_0x1a22a1(0x1c4)]??_0x1a22a1(0x26c);!APPROVAL_TASK_MODES['has'](_0x372c89)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x317),'message':_0x1a22a1(0x1d7)+String(_0x372c89)+'.'});!APPROVAL_MODES[_0x1a22a1(0x27a)](_0x4fa38a)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1da),'message':_0x1a22a1(0x1db)+String(_0x4fa38a)+'.'});if(!isRecord(_0x1d1ddc[_0x1a22a1(0x1ff)]))_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1e3),'message':_0x1a22a1(0x239)});else{const _0x43cd89=_0x1d1ddc[_0x1a22a1(0x1ff)][_0x1a22a1(0x1f4)];_0x43cd89!==_0x1a22a1(0x24b)&&_0x43cd89!==_0x1a22a1(0x314)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x24a),'message':_0x1a22a1(0x2f6)});if(_0x43cd89===_0x1a22a1(0x24b)){const _0x33cc74=_0x1d1ddc[_0x1a22a1(0x1ff)][_0x1a22a1(0x26e)];if(!Array[_0x1a22a1(0x28d)](_0x33cc74)||_0x33cc74[_0x1a22a1(0x2f1)]===0x0)_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1d3),'message':_0x1a22a1(0x217)});else{const _0x42460e=_0x33cc74[_0x1a22a1(0x295)](_0x59eaa9=>!isValidUserId(_0x59eaa9));_0x42460e>=0x0&&_0x1cf854['push']({'path':_0x2f9ba9+_0x1a22a1(0x206)+_0x42460e+']','message':_0x1a22a1(0x2c4)});const _0x5a54f0=new Set(_0x33cc74[_0x1a22a1(0x2b8)](isValidUserId)['map'](_0x55b96c=>String(_0x55b96c)[_0x1a22a1(0x2e1)]()));_0x4fa38a===_0x1a22a1(0x260)&&_0x5a54f0[_0x1a22a1(0x1f8)]>0x1&&_0x1cf854['push']({'path':_0x2f9ba9+_0x1a22a1(0x1d3),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x43cd89===_0x1a22a1(0x314)){const _0x247f1d=_0x1d1ddc[_0x1a22a1(0x1ff)][_0x1a22a1(0x296)],_0x1080d4=typeof _0x247f1d===_0x1a22a1(0x292)||typeof _0x247f1d==='string'?Number(String(_0x247f1d)['trim']()):Number[_0x1a22a1(0x20d)];(!Number['isSafeInteger'](_0x1080d4)||_0x1080d4<=0x0)&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.assignee.roleId','message':_0x1a22a1(0x220)});}}if(_0x1d1ddc['transferCandidates']!==undefined){if(!isRecord(_0x1d1ddc['transferCandidates']))_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x215),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x1d1ddc[_0x1a22a1(0x2ae)][_0x1a22a1(0x1f4)]!==_0x1a22a1(0x24b))_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x243),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x3a6ab5=_0x1d1ddc[_0x1a22a1(0x2ae)][_0x1a22a1(0x26e)];if(!Array[_0x1a22a1(0x28d)](_0x3a6ab5)||_0x3a6ab5['length']===0x0)_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+'.transferCandidates.userIds','message':_0x1a22a1(0x26b)});else{const _0x414e36=_0x3a6ab5[_0x1a22a1(0x295)](_0x338ed4=>!isValidUserId(_0x338ed4));_0x414e36>=0x0&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x252)+_0x414e36+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x1d1ddc[_0x1a22a1(0x20a)]!==undefined&&typeof _0x1d1ddc['sequential']!=='boolean'&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x228),'message':_0x1a22a1(0x2a5)});if(_0x1d1ddc[_0x1a22a1(0x2f2)]==='SCRIPT'){(typeof _0x1d1ddc['scriptName']!==_0x1a22a1(0x283)||_0x1d1ddc[_0x1a22a1(0x225)][_0x1a22a1(0x2e1)]()==='')&&_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x25d),'message':_0x1a22a1(0x294)});if(_0x1d1ddc[_0x1a22a1(0x2bd)]!==undefined){if(typeof _0x1d1ddc[_0x1a22a1(0x2bd)]!==_0x1a22a1(0x283)||!VARIABLE_PATTERN[_0x1a22a1(0x1f1)](_0x1d1ddc[_0x1a22a1(0x2bd)]))_0x1cf854[_0x1a22a1(0x28c)]({'path':_0x2f9ba9+_0x1a22a1(0x1c8),'message':_0x1a22a1(0x2b3)});else(RESERVED_RESULT_VARIABLES['has'](_0x1d1ddc[_0x1a22a1(0x2bd)])||_0x1d1ddc[_0x1a22a1(0x2bd)][_0x1a22a1(0x2d7)]('approval_sys_'))&&_0x1cf854['push']({'path':_0x2f9ba9+_0x1a22a1(0x1c8),'message':_0x1a22a1(0x307)+_0x1d1ddc[_0x1a22a1(0x2bd)]+'.'});}}validateAsyncExecution(_0x1d1ddc,_0x2f9ba9,_0x1cf854),validateApprovalTimeout(_0x1d1ddc,_0x2f9ba9,_0x1cf854),validateCcConfig(_0x1d1ddc,_0x2f9ba9,_0x1cf854),_0x1d1ddc['type']===_0x1a22a1(0x2bc)&&validateNotificationConfig(_0x1d1ddc[_0x1a22a1(0x2a7)],_0x2f9ba9+_0x1a22a1(0x22a),_0x1cf854);}function validateAsyncExecution(_0x10b33d,_0x2c1eb6,_0x281991){const _0x3d0040=a298_0x4ad4d2;if(_0x10b33d['async']===undefined)return;if(!isRecord(_0x10b33d[_0x3d0040(0x208)])){_0x281991[_0x3d0040(0x28c)]({'path':_0x2c1eb6+'.async','message':_0x3d0040(0x316)});return;}if(_0x10b33d['async'][_0x3d0040(0x300)]!==undefined&&typeof _0x10b33d['async']['enabled']!==_0x3d0040(0x1ee)){_0x281991[_0x3d0040(0x28c)]({'path':_0x2c1eb6+_0x3d0040(0x274),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x10b33d[_0x3d0040(0x208)]['enabled']!==!![])return;_0x10b33d['type']!==_0x3d0040(0x212)&&_0x281991[_0x3d0040(0x28c)]({'path':_0x2c1eb6+_0x3d0040(0x26d),'message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x518064=_0x10b33d['async'][_0x3d0040(0x262)]??0x3;(!Number[_0x3d0040(0x1c9)](_0x518064)||_0x518064<0x1||_0x518064>MAX_ASYNC_RETRY_COUNT)&&_0x281991[_0x3d0040(0x28c)]({'path':_0x2c1eb6+_0x3d0040(0x211),'message':_0x3d0040(0x302)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x10b33d['async'][_0x3d0040(0x2c0)]!==undefined&&validateTimeAmount(_0x10b33d[_0x3d0040(0x208)][_0x3d0040(0x2c0)],_0x2c1eb6+_0x3d0040(0x1cb),_0x281991);}function validateApprovalTimeout(_0x3ce409,_0x199f2a,_0x364045){const _0x48dcb0=a298_0x4ad4d2;if(_0x3ce409['timeout']===undefined)return;if(!isRecord(_0x3ce409['timeout'])){_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+'.timeout','message':_0x48dcb0(0x2c8)});return;}if(_0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x300)]!==undefined&&typeof _0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x300)]!==_0x48dcb0(0x1ee)){_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+'.timeout.enabled','message':_0x48dcb0(0x265)});return;}if(_0x3ce409['timeout']['enabled']!==!![])return;if(_0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x27c)]!==undefined&&typeof _0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x27c)]!=='boolean'){_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+_0x48dcb0(0x322),'message':_0x48dcb0(0x2ca)});return;}_0x3ce409['type']!=='APPROVAL'&&_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+_0x48dcb0(0x1f7),'message':_0x48dcb0(0x216)});validateTimeAmount(_0x3ce409['timeout']['duration'],_0x199f2a+_0x48dcb0(0x2bf),_0x364045);const _0x1588de=_0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x1cc)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x1588de)){_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+_0x48dcb0(0x29a),'message':'timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.'});return;}(_0x3ce409[_0x48dcb0(0x1c4)]??_0x48dcb0(0x26c))===_0x48dcb0(0x308)&&_0x1588de!==_0x48dcb0(0x299)&&_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+_0x48dcb0(0x29a),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x2a7d1d=_0x3ce409['timeout'][_0x48dcb0(0x27c)]??_0x1588de!==_0x48dcb0(0x299);if(_0x1588de===_0x48dcb0(0x299))_0x2a7d1d&&_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+'.timeout.interrupting','message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x3ce409[_0x48dcb0(0x309)]['scriptName']!=='string'||_0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x225)][_0x48dcb0(0x2e1)]()==='')&&_0x364045[_0x48dcb0(0x28c)]({'path':_0x199f2a+'.timeout.scriptName','message':_0x48dcb0(0x30d)}),validateOptionalResultVariable(_0x3ce409[_0x48dcb0(0x309)][_0x48dcb0(0x2bd)],_0x199f2a+_0x48dcb0(0x201),_0x364045);else!_0x2a7d1d&&_0x364045['push']({'path':_0x199f2a+_0x48dcb0(0x322),'message':_0x1588de+_0x48dcb0(0x25f)});}function validateTimeAmount(_0x590b2f,_0xaa0591,_0x251d09){const _0x40011d=a298_0x4ad4d2;if(!isRecord(_0x590b2f)){_0x251d09[_0x40011d(0x28c)]({'path':_0xaa0591,'message':_0x40011d(0x1fd)});return;}(!Number['isInteger'](_0x590b2f[_0x40011d(0x285)])||Number(_0x590b2f[_0x40011d(0x285)])<=0x0)&&_0x251d09[_0x40011d(0x28c)]({'path':_0xaa0591+_0x40011d(0x31d),'message':_0x40011d(0x2b2)}),!FLOW_TIME_UNITS[_0x40011d(0x27a)](_0x590b2f[_0x40011d(0x22f)])&&_0x251d09['push']({'path':_0xaa0591+_0x40011d(0x23e),'message':_0x40011d(0x2f3)});}function validateOptionalResultVariable(_0x55615c,_0x138787,_0x2b7185){const _0x5aa265=a298_0x4ad4d2;if(_0x55615c===undefined||_0x55615c===null||_0x55615c==='')return;if(typeof _0x55615c!=='string'||!VARIABLE_PATTERN['test'](_0x55615c))_0x2b7185[_0x5aa265(0x28c)]({'path':_0x138787,'message':_0x5aa265(0x2b3)});else(RESERVED_RESULT_VARIABLES[_0x5aa265(0x27a)](_0x55615c)||_0x55615c[_0x5aa265(0x2d7)](_0x5aa265(0x2fa)))&&_0x2b7185[_0x5aa265(0x28c)]({'path':_0x138787,'message':_0x5aa265(0x307)+_0x55615c+'.'});}function validateCcConfig(_0x354b07,_0x111943,_0xfe1c26){const _0x5905b6=a298_0x4ad4d2;if(_0x354b07['cc']===undefined)return;if(!isRecord(_0x354b07['cc'])){_0xfe1c26[_0x5905b6(0x28c)]({'path':_0x111943+_0x5905b6(0x20c),'message':_0x5905b6(0x321)});return;}_0x354b07[_0x5905b6(0x2f2)]!==_0x5905b6(0x1e2)&&_0x354b07[_0x5905b6(0x2f2)]!==_0x5905b6(0x26c)&&_0xfe1c26[_0x5905b6(0x28c)]({'path':_0x111943+_0x5905b6(0x20c),'message':_0x5905b6(0x1e0)});Object[_0x5905b6(0x2e4)][_0x5905b6(0x26f)][_0x5905b6(0x268)](_0x354b07['cc'],'readSources')&&_0xfe1c26[_0x5905b6(0x28c)]({'path':_0x111943+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x319dd2=_0x354b07['cc'][_0x5905b6(0x1e9)];if(!Array['isArray'](_0x319dd2)||_0x319dd2[_0x5905b6(0x2f1)]===0x0)_0xfe1c26[_0x5905b6(0x28c)]({'path':_0x111943+_0x5905b6(0x2fe),'message':_0x5905b6(0x267)});else{_0x319dd2[_0x5905b6(0x2f1)]>MAX_CC_RECIPIENTS&&_0xfe1c26[_0x5905b6(0x28c)]({'path':_0x111943+'.cc.recipientUserIds','message':_0x5905b6(0x1d0)+MAX_CC_RECIPIENTS+_0x5905b6(0x2cc)});const _0x110c08=new Set();_0x319dd2['forEach']((_0xcdc480,_0x4cbfc5)=>{const _0x2427b4=_0x5905b6;if(typeof _0xcdc480!==_0x2427b4(0x283)||_0xcdc480[_0x2427b4(0x2e1)]()==='')_0xfe1c26['push']({'path':_0x111943+_0x2427b4(0x245)+_0x4cbfc5+']','message':_0x2427b4(0x2db)});else _0x110c08[_0x2427b4(0x27a)](_0xcdc480[_0x2427b4(0x2e1)]())?_0xfe1c26[_0x2427b4(0x28c)]({'path':_0x111943+_0x2427b4(0x245)+_0x4cbfc5+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0xcdc480['trim']()+'.'}):_0x110c08[_0x2427b4(0x2e7)](_0xcdc480[_0x2427b4(0x2e1)]());});}validateStringArray(_0x354b07['cc']['visible'],_0x111943+_0x5905b6(0x31e),_0xfe1c26);}function validateStringArray(_0x2c4eac,_0x50ac5a,_0x291659){const _0x274dac=a298_0x4ad4d2;if(_0x2c4eac===undefined)return;if(!Array[_0x274dac(0x28d)](_0x2c4eac)){_0x291659[_0x274dac(0x28c)]({'path':_0x50ac5a,'message':_0x274dac(0x24d)});return;}const _0x5e62c4=new Set();_0x2c4eac[_0x274dac(0x237)]((_0x1f8720,_0x41579d)=>{const _0x407f05=_0x274dac;if(typeof _0x1f8720!==_0x407f05(0x283)||_0x1f8720[_0x407f05(0x2e1)]()==='')_0x291659[_0x407f05(0x28c)]({'path':_0x50ac5a+'['+_0x41579d+']','message':_0x407f05(0x29f)});else _0x5e62c4[_0x407f05(0x27a)](_0x1f8720['trim']())?_0x291659[_0x407f05(0x28c)]({'path':_0x50ac5a+'['+_0x41579d+']','message':_0x407f05(0x2aa)+_0x1f8720['trim']()+'.'}):_0x5e62c4[_0x407f05(0x2e7)](_0x1f8720['trim']());});}function a298_0x36ad(){const _0x42ebb2=['A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','DAYS','toUpperCase','Unsupported\x20task\x20mode:\x20','Unsupported\x20notification\x20placeholder:\x20',',\x20but\x20node\x20','.approvalMode','Unsupported\x20approval\x20mode:\x20','array','\x20was\x20empty\x20and\x20was\x20removed.','#/$defs/position','.text','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','Duplicate\x20BPMN\x20element\x20id:\x20','END','.assignee','pageId','CONTINUE','Notification\x20fact.','flowName\x20is\x20required.','.name','recipientUserIds','Notification\x20recipient.value\x20is\x20required.','Duplicate\x20node\x20id:\x20','.expression','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','boolean','flowKey','approval_sys_dataId','test','EXPRESSION\x20edge\x20requires\x20expression.','MINUTES','strategy','FORM_FLOW','label','.timeout','size','schemaVersion','datasetCode','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','detailMarkdown','duration\x20requires\x20value\x20and\x20unit.','Notification\x20version\x20must\x20be\x20a\x20string.','assignee','.\x20This\x20CLI\x20supports\x20only\x20','.timeout.resultVariable','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','isFinite','.actions','.type','.assignee.userIds[','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','async','appCode','sequential','formDefinitions','.cc','NaN','approval_sys_operationType','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','scriptResult','.async.retryCount','SCRIPT','.template','set','.transferCandidates','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','FIXED\x20assignee\x20requires\x20userIds.','keys','some','Node\x20cannot\x20reach\x20any\x20END.','.conditionType','661200IkYLmh','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Notification\x20fact\x20must\x20be\x20an\x20object.','REJECTED','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','1239620rzPKkX','templateName','object','scriptName','.detailMarkdown','text','.sequential','ALL','.config','\x20facts.','SECONDS','flowJson.schemaVersion','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','unit','flowType\x20is\x20required.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','ALWAYS','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','AUTO_APPROVE','datasetCode\x20must\x20be\x20a\x20string.','forEach','START','APPROVAL\x20node\x20requires\x20assignee.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Notification\x20template.','approval_sys_processInstanceId','5253370rmBaai','.unit','path','formData','PLATFORM_FORM','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','.transferCandidates.strategy','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.cc.recipientUserIds[','Notification\x20template.actions\x20must\x20be\x20an\x20array.','Notification\x20configCode\x20is\x20required.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.assignee.strategy','FIXED','Duplicate\x20resultVariable:\x20','value\x20must\x20be\x20an\x20array.','edge\x20must\x20be\x20an\x20object.','https://json-schema.org/draft/2020-12/schema','1467382RjKOXL','empty_metadata_removed','.transferCandidates.userIds[','Unsupported\x20notification\x20version:\x20','failurePolicy','configCode','Notification\x20recipient.type\x20is\x20required.','Unsupported\x20node\x20type:\x20','pageMode','EMAIL','flowDesc','expression','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','.scriptName','position.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','SINGLE','APPROVED','retryCount','Unsupported\x20flowType:\x20','recipients','timeout.enabled\x20must\x20be\x20a\x20boolean.','.waypoints','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','call','utf8','flowType','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','APPROVAL','.async','userIds','hasOwnProperty','USER','mode','startPageId','form','.async.enabled','flowDesc\x20must\x20be\x20a\x20string.','Rabetbase\x20FlowConfig','nodes','waypoints','flowJson.nodes[','has','Notification\x20action.url\x20is\x20required.','interrupting','edges\x20must\x20be\x20an\x20array.','.id','slice','role','__rabetbase_local_validation__','Unsupported\x20condition\x20type:\x20','string','.role','value','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','bindDatasetCode','].taskMode','flowJson.pageMode','targetNodeId','conditionType','push','isArray','flowName','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','45576WrFCEh','flowJson.startPageId','number','#/$defs/flowEdge','SCRIPT\x20node\x20requires\x20scriptName.','findIndex','roleId','pid','.defaultFlow','EXECUTE_BFF','.timeout.action','approval_sys_initiatorUsername','EXPRESSION','matchAll','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','value\x20must\x20be\x20a\x20non-empty\x20string.','.configCode','summary','BCC','flowJson\x20must\x20be\x20an\x20object.','metadata','sequential\x20must\x20be\x20a\x20boolean.','12eQvBen','config','edge\x20target\x20is\x20required.','flowJson.edges[','Duplicate\x20value:\x20','^[A-Za-z_][A-Za-z0-9_]*$','approval_sys_pageId','.waypoints[','transferCandidates','INDEPENDENT_FLOW','get','HOURS','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','stringify','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','filter','.source','waypoints\x20must\x20be\x20an\x20array.','Edge\x20source\x20node\x20not\x20found:\x20','NOTIFICATION','resultVariable','.url','.timeout.duration','retryInterval','target','3nkOCpK','\x20is\x20required.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','flowJson.nodes','legacy_field_removed','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','timeout\x20must\x20be\x20an\x20object.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','Unsupported\x20schemaVersion:\x20','\x20users.','version','.target','integer','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','failurePolicy\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','template','defaultFlow','every','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','startsWith','.tmp','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','flowJson.edges','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20action\x20must\x20be\x20an\x20object.','actions','Notification\x20template\x20supports\x20at\x20most\x20','.position.','edge\x20name\x20must\x20be\x20a\x20string.','trim','warnings','CONDITION','prototype','message','.failurePolicy','add','flowJson.nodes.','Unsupported\x20pageMode:\x20','].path','replace','FAIL','CUSTOM_PAGE','approval.simple-flow.v1','.version','formSchema','length','type','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','#/$defs/userId','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','Node\x20is\x20not\x20reachable\x20from\x20START.','source','flowJson','approval_sys_','^[1-9][0-9]*$','parse','includes','.cc.recipientUserIds','AUTO_REJECT','enabled','sourceNodeId','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','flowJson.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','Reserved\x20resultVariable:\x20','HANDLE','timeout','977165XUJWxR','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','NOTIFICATION\x20node\x20requires\x20config.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','nodes\x20must\x20be\x20an\x20array.','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','NOTIFICATION\x20node\x20requires\x20template.','351vxEvRX','map','node\x20must\x20be\x20an\x20object.','ROLE','Node\x20has\x20no\x20incoming\x20edge.','async\x20must\x20be\x20an\x20object.','.taskMode','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','#/$defs/timeAmount','waypoint.','event','title','.value','.cc.visible','5105635pXeOaW','url','cc\x20must\x20be\x20an\x20object.','.timeout.interrupting','taskMode','name','edges','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.resultVariable','isInteger','edge\x20source\x20is\x20required.','.async.retryInterval','action','result','Edge\x20target\x20node\x20not\x20found:\x20','.path','cc.recipientUserIds\x20supports\x20at\x20most\x20','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.assignee.userIds'];a298_0x36ad=function(){return _0x42ebb2;};return a298_0x36ad();}function validateNotificationConfig(_0x43f150,_0x3d43de,_0x22b051){const _0x5be40d=a298_0x4ad4d2;if(!isRecord(_0x43f150)){_0x22b051[_0x5be40d(0x28c)]({'path':_0x3d43de,'message':_0x5be40d(0x30c)});return;}if(_0x43f150[_0x5be40d(0x2cd)]!==undefined&&_0x43f150[_0x5be40d(0x2cd)]!==null){if(typeof _0x43f150['version']!=='string')_0x22b051[_0x5be40d(0x28c)]({'path':_0x3d43de+_0x5be40d(0x2ef),'message':_0x5be40d(0x1fe)});else _0x43f150[_0x5be40d(0x2cd)]['trim']()&&_0x43f150['version']['trim']()!=='v1'&&_0x22b051[_0x5be40d(0x28c)]({'path':_0x3d43de+_0x5be40d(0x2ef),'message':_0x5be40d(0x253)+_0x43f150[_0x5be40d(0x2cd)]+'.'});}const _0x1b50b2=requireNotificationString(_0x43f150[_0x5be40d(0x255)],_0x3d43de+_0x5be40d(0x2a0),_0x5be40d(0x247),_0x22b051);_0x1b50b2?.[_0x5be40d(0x2fd)]('${')&&_0x22b051['push']({'path':_0x3d43de+'.configCode','message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x43f150[_0x5be40d(0x254)]!==undefined&&_0x43f150['failurePolicy']!==null){if(typeof _0x43f150['failurePolicy']!==_0x5be40d(0x283))_0x22b051['push']({'path':_0x3d43de+_0x5be40d(0x2e6),'message':_0x5be40d(0x2d1)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x43f150['failurePolicy'][_0x5be40d(0x2e1)]()[_0x5be40d(0x1d6)]())&&_0x22b051[_0x5be40d(0x28c)]({'path':_0x3d43de+'.failurePolicy','message':_0x5be40d(0x221)});}!isRecord(_0x43f150[_0x5be40d(0x2d3)])?_0x22b051['push']({'path':_0x3d43de+_0x5be40d(0x213),'message':_0x5be40d(0x310)}):validateNotificationTemplate(_0x43f150['template'],_0x3d43de+_0x5be40d(0x213),_0x22b051),validateNotificationRecipients(_0x43f150[_0x5be40d(0x264)],_0x3d43de+'.recipients',_0x22b051);}function validateNotificationTemplate(_0x5de86f,_0x99c764,_0x163b84){const _0x3cb569=a298_0x4ad4d2;for(const _0x597146 of[_0x3cb569(0x31c),_0x3cb569(0x2a1)]){const _0x2c3316=requireNotificationString(_0x5de86f[_0x597146],_0x99c764+'.'+_0x597146,_0x3cb569(0x23b)+_0x597146+_0x3cb569(0x2c3),_0x163b84);if(_0x2c3316)validateNotificationPlaceholders(_0x2c3316,_0x99c764+'.'+_0x597146,_0x163b84);}_0x5de86f[_0x3cb569(0x1fc)]!==undefined&&_0x5de86f[_0x3cb569(0x1fc)]!==null&&(typeof _0x5de86f[_0x3cb569(0x1fc)]!==_0x3cb569(0x283)?_0x163b84[_0x3cb569(0x28c)]({'path':_0x99c764+_0x3cb569(0x226),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x5de86f['detailMarkdown'],_0x99c764+'.detailMarkdown',_0x163b84)),validateNotificationFacts(_0x5de86f['facts'],_0x99c764+'.facts',_0x163b84),validateNotificationActions(_0x5de86f[_0x3cb569(0x2dd)],_0x99c764+_0x3cb569(0x204),_0x163b84);}function validateNotificationFacts(_0x24662b,_0x4473d3,_0x14c507){const _0x40b116=a298_0x4ad4d2;if(_0x24662b===undefined||_0x24662b===null)return;if(!Array[_0x40b116(0x28d)](_0x24662b)){_0x14c507[_0x40b116(0x28c)]({'path':_0x4473d3,'message':_0x40b116(0x249)});return;}_0x24662b[_0x40b116(0x2f1)]>MAX_NOTIFICATION_FACTS&&_0x14c507[_0x40b116(0x28c)]({'path':_0x4473d3,'message':_0x40b116(0x2de)+MAX_NOTIFICATION_FACTS+_0x40b116(0x22b)}),_0x24662b[_0x40b116(0x237)]((_0x28c68f,_0x3bec55)=>{const _0x5bd442=_0x40b116,_0x3f11f6=_0x4473d3+'['+_0x3bec55+']';if(!isRecord(_0x28c68f)){_0x14c507['push']({'path':_0x3f11f6,'message':_0x5bd442(0x21e)});return;}for(const _0x5e00a7 of[_0x5bd442(0x1f6),_0x5bd442(0x285)]){const _0x12cd5c=requireNotificationString(_0x28c68f[_0x5e00a7],_0x3f11f6+'.'+_0x5e00a7,_0x5bd442(0x1e6)+_0x5e00a7+_0x5bd442(0x2c3),_0x14c507);_0x12cd5c&&validateNotificationPlaceholders(_0x12cd5c,_0x3f11f6+'.'+_0x5e00a7,_0x14c507);}});}function validateNotificationActions(_0x30f2cd,_0x55e608,_0x1d0e58){const _0x238654=a298_0x4ad4d2;if(_0x30f2cd===undefined||_0x30f2cd===null)return;if(!Array[_0x238654(0x28d)](_0x30f2cd)){_0x1d0e58[_0x238654(0x28c)]({'path':_0x55e608,'message':_0x238654(0x246)});return;}_0x30f2cd[_0x238654(0x2f1)]>MAX_NOTIFICATION_ACTIONS&&_0x1d0e58[_0x238654(0x28c)]({'path':_0x55e608,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x30f2cd[_0x238654(0x237)]((_0x144169,_0x2f8fee)=>{const _0x466389=_0x238654,_0x48bdee=_0x55e608+'['+_0x2f8fee+']';if(!isRecord(_0x144169)){_0x1d0e58[_0x466389(0x28c)]({'path':_0x48bdee,'message':_0x466389(0x2dc)});return;}const _0x570a60=requireNotificationString(_0x144169[_0x466389(0x227)],_0x48bdee+_0x466389(0x1df),'Notification\x20action.text\x20is\x20required.',_0x1d0e58);if(_0x570a60)validateNotificationPlaceholders(_0x570a60,_0x48bdee+_0x466389(0x1df),_0x1d0e58);const _0x45756e=requireNotificationString(_0x144169[_0x466389(0x320)],_0x48bdee+_0x466389(0x2be),_0x466389(0x27b),_0x1d0e58);if(!_0x45756e)return;validateNotificationPlaceholders(_0x45756e,_0x48bdee+'.url',_0x1d0e58),!/^https?:\/\//i[_0x466389(0x1f1)](_0x45756e)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x466389(0x1f1)](_0x45756e)&&_0x1d0e58['push']({'path':_0x48bdee+_0x466389(0x2be),'message':_0x466389(0x2f5)});});}function validateNotificationRecipients(_0x5bd9ea,_0x3b44e9,_0x41a4f2){const _0x126fde=a298_0x4ad4d2;if(_0x5bd9ea===undefined||_0x5bd9ea===null)return;if(!Array[_0x126fde(0x28d)](_0x5bd9ea)){_0x41a4f2[_0x126fde(0x28c)]({'path':_0x3b44e9,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x261f05=![];_0x5bd9ea[_0x126fde(0x237)]((_0x472fe4,_0x571457)=>{const _0x3d5236=_0x126fde,_0x17812d=_0x3b44e9+'['+_0x571457+']';if(!isRecord(_0x472fe4)){_0x41a4f2[_0x3d5236(0x28c)]({'path':_0x17812d,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x1030f9=requireNotificationString(_0x472fe4[_0x3d5236(0x2f2)],_0x17812d+_0x3d5236(0x205),_0x3d5236(0x256),_0x41a4f2);_0x1030f9&&!NOTIFICATION_RECIPIENT_TYPES[_0x3d5236(0x27a)](_0x1030f9['toUpperCase']())&&_0x41a4f2['push']({'path':_0x17812d+'.type','message':_0x3d5236(0x28f)});let _0x34a5a5='TO';_0x472fe4[_0x3d5236(0x280)]!==undefined&&_0x472fe4[_0x3d5236(0x280)]!==null&&(typeof _0x472fe4[_0x3d5236(0x280)]!==_0x3d5236(0x283)?(_0x41a4f2[_0x3d5236(0x28c)]({'path':_0x17812d+_0x3d5236(0x284),'message':_0x3d5236(0x2d0)}),_0x34a5a5=''):(_0x34a5a5=_0x472fe4[_0x3d5236(0x280)][_0x3d5236(0x2e1)]()[_0x3d5236(0x1d6)](),!NOTIFICATION_RECIPIENT_ROLES[_0x3d5236(0x27a)](_0x34a5a5)&&_0x41a4f2[_0x3d5236(0x28c)]({'path':_0x17812d+'.role','message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x34a5a5==='TO')_0x261f05=!![];const _0x1c75a1=requireNotificationString(_0x472fe4['value'],_0x17812d+'.value',_0x3d5236(0x1ea),_0x41a4f2);_0x1c75a1&&validateNotificationPlaceholders(_0x1c75a1,_0x17812d+'.value',_0x41a4f2);}),_0x5bd9ea[_0x126fde(0x2f1)]>0x0&&!_0x261f05&&_0x41a4f2[_0x126fde(0x28c)]({'path':_0x3b44e9,'message':'Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.'});}function requireNotificationString(_0x10749e,_0x223a1c,_0x55c428,_0x435aa0){const _0x42c829=a298_0x4ad4d2;if(typeof _0x10749e!==_0x42c829(0x283)||_0x10749e[_0x42c829(0x2e1)]()==='')return _0x435aa0['push']({'path':_0x223a1c,'message':_0x55c428}),undefined;return _0x10749e[_0x42c829(0x2e1)]();}function validateNotificationPlaceholders(_0x46de9c,_0x5494e0,_0x428bc5){const _0x8f3fc4=a298_0x4ad4d2;for(const _0x342951 of _0x46de9c[_0x8f3fc4(0x29d)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x2eb244=_0x342951[0x1]?.[_0x8f3fc4(0x2e1)]()??'',_0x33a9b6=_0x2eb244['indexOf']('.'),_0x8e2d3c=_0x33a9b6>=0x0?_0x2eb244[_0x8f3fc4(0x27f)](0x0,_0x33a9b6):_0x2eb244,_0x46cbab=_0x33a9b6>=0x0?_0x2eb244[_0x8f3fc4(0x27f)](_0x33a9b6+0x1)['trim']():'';(![_0x8f3fc4(0x31b),'context','variables'][_0x8f3fc4(0x2fd)](_0x8e2d3c)||_0x46cbab==='')&&_0x428bc5[_0x8f3fc4(0x28c)]({'path':_0x5494e0,'message':_0x8f3fc4(0x1d8)+_0x342951[0x0]+'.'});}_0x46de9c[_0x8f3fc4(0x2eb)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x8f3fc4(0x2fd)]('${')&&_0x428bc5[_0x8f3fc4(0x28c)]({'path':_0x5494e0,'message':_0x8f3fc4(0x2d9)});}function validateEdge(_0x1acfd6,_0x4ac4ac,_0x5889db){const _0x530be9=a298_0x4ad4d2;_0x1acfd6[_0x530be9(0x1c5)]!==undefined&&typeof _0x1acfd6[_0x530be9(0x1c5)]!==_0x530be9(0x283)&&_0x5889db[_0x530be9(0x28c)]({'path':_0x4ac4ac+_0x530be9(0x1e8),'message':_0x530be9(0x2e0)}),_0x1acfd6['defaultFlow']!==undefined&&typeof _0x1acfd6['defaultFlow']!=='boolean'&&_0x5889db['push']({'path':_0x4ac4ac+_0x530be9(0x298),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x1acfd6[_0x530be9(0x278)]!==undefined&&(!Array[_0x530be9(0x28d)](_0x1acfd6['waypoints'])?_0x5889db[_0x530be9(0x28c)]({'path':_0x4ac4ac+_0x530be9(0x266),'message':_0x530be9(0x2ba)}):_0x1acfd6[_0x530be9(0x278)][_0x530be9(0x237)]((_0x2e521f,_0x46fde0)=>{const _0x4bd583=_0x530be9;if(!isRecord(_0x2e521f)){_0x5889db[_0x4bd583(0x28c)]({'path':_0x4ac4ac+_0x4bd583(0x2ad)+_0x46fde0+']','message':_0x4bd583(0x2b4)});return;}for(const _0xa9fb67 of['x','y']){const _0x474beb=_0x2e521f[_0xa9fb67];(typeof _0x474beb!==_0x4bd583(0x292)||!Number['isFinite'](_0x474beb))&&_0x5889db[_0x4bd583(0x28c)]({'path':_0x4ac4ac+'.waypoints['+_0x46fde0+'].'+_0xa9fb67,'message':_0x4bd583(0x31a)+_0xa9fb67+'\x20must\x20be\x20a\x20finite\x20number.'});}})),_0x1acfd6[_0x530be9(0x28b)]!==undefined&&!CONDITION_TYPES[_0x530be9(0x27a)](_0x1acfd6['conditionType'])&&_0x5889db[_0x530be9(0x28c)]({'path':_0x4ac4ac+_0x530be9(0x21b),'message':_0x530be9(0x282)+String(_0x1acfd6['conditionType'])+'.'}),_0x1acfd6[_0x530be9(0x28b)]==='EXPRESSION'&&(typeof _0x1acfd6[_0x530be9(0x25b)]!=='string'||_0x1acfd6[_0x530be9(0x25b)][_0x530be9(0x2e1)]()==='')&&_0x5889db['push']({'path':_0x4ac4ac+_0x530be9(0x1ec),'message':_0x530be9(0x1f2)}),_0x1acfd6['defaultFlow']===!![]&&_0x1acfd6[_0x530be9(0x28b)]!==_0x530be9(0x232)&&_0x5889db[_0x530be9(0x28c)]({'path':_0x4ac4ac+'.defaultFlow','message':_0x530be9(0x1fb)}),_0x1acfd6[_0x530be9(0x2d4)]===!![]&&typeof _0x1acfd6[_0x530be9(0x25b)]==='string'&&_0x1acfd6['expression'][_0x530be9(0x2e1)]()!==''&&_0x5889db[_0x530be9(0x28c)]({'path':_0x4ac4ac+_0x530be9(0x1ec),'message':_0x530be9(0x1d4)});}function validateGraphShape(_0x287926,_0x54e144,_0x47be1b,_0x3dd4dd,_0x477b63,_0x248ef6,_0x416a55){const _0x214942=a298_0x4ad4d2;for(const [_0x46b1cf,_0x1f5f17]of _0x287926){const _0x49c947=_0x477b63[_0x214942(0x2b0)](_0x46b1cf)??[],_0x2d671d=_0x3dd4dd[_0x214942(0x2b0)](_0x46b1cf)??[];_0x1f5f17[_0x214942(0x2f2)]!==_0x214942(0x238)&&_0x49c947['length']===0x0&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x315)});_0x1f5f17[_0x214942(0x2f2)]!=='END'&&_0x2d671d[_0x214942(0x2f1)]===0x0&&_0x416a55[_0x214942(0x28c)]({'path':'flowJson.nodes.'+_0x46b1cf,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x1f5f17[_0x214942(0x2f2)]===_0x214942(0x238)&&_0x49c947[_0x214942(0x2f1)]>0x0&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x1f5f17[_0x214942(0x2f2)]===_0x214942(0x1e2)&&_0x2d671d['length']>0x0&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x1ed)});if(_0x1f5f17[_0x214942(0x2f2)]===_0x214942(0x2e3)){_0x2d671d['length']<0x2&&_0x416a55[_0x214942(0x28c)]({'path':'flowJson.nodes.'+_0x46b1cf,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x538b65=_0x2d671d[_0x214942(0x2b8)](_0x537088=>_0x537088[_0x214942(0x2d4)]===!![]);_0x538b65['length']!==0x1&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x2b6)});if(_0x538b65[_0x214942(0x2f1)]===0x1){const _0x53c907=_0x538b65[0x0],_0x5a01a8=_0x248ef6[_0x214942(0x2b0)](_0x53c907)??_0x214942(0x2da);_0x53c907[_0x214942(0x28b)]!==_0x214942(0x232)&&_0x416a55[_0x214942(0x28c)]({'path':_0x5a01a8+_0x214942(0x21b),'message':_0x214942(0x242)});_0x53c907['expression']!==undefined&&_0x416a55[_0x214942(0x28c)]({'path':_0x5a01a8+_0x214942(0x1ec),'message':_0x214942(0x30f)});for(const _0x11275f of _0x2d671d){if(_0x11275f===_0x53c907)continue;const _0x45460a=_0x248ef6[_0x214942(0x2b0)](_0x11275f)??_0x214942(0x2da);if(_0x11275f[_0x214942(0x28b)]!==_0x214942(0x29c))_0x416a55[_0x214942(0x28c)]({'path':_0x45460a+'.conditionType','message':_0x214942(0x2c9)});else(typeof _0x11275f[_0x214942(0x25b)]!==_0x214942(0x283)||_0x11275f[_0x214942(0x25b)][_0x214942(0x2e1)]()==='')&&_0x416a55[_0x214942(0x28c)]({'path':_0x45460a+_0x214942(0x1ec),'message':_0x214942(0x30b)});}}}if(_0x1f5f17[_0x214942(0x2f2)]===_0x214942(0x26c)&&(_0x1f5f17[_0x214942(0x1c4)]??_0x214942(0x26c))==='HANDLE'){if(_0x2d671d[_0x214942(0x2f1)]!==0x1)_0x416a55['push']({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x233)});else{const _0x5ce820=_0x2d671d[0x0];((_0x5ce820[_0x214942(0x28b)]??_0x214942(0x232))!==_0x214942(0x232)||_0x5ce820[_0x214942(0x2d4)]===!![]||typeof _0x5ce820[_0x214942(0x25b)]===_0x214942(0x283)&&_0x5ce820[_0x214942(0x25b)]['trim']()!=='')&&_0x416a55[_0x214942(0x28c)]({'path':_0x248ef6['get'](_0x5ce820)??_0x214942(0x2da),'message':_0x214942(0x29e)});}}else{if(_0x1f5f17[_0x214942(0x2f2)]===_0x214942(0x26c)){const _0xba4903=_0x2d671d[_0x214942(0x312)](_0x57ece2=>_0x57ece2[_0x214942(0x28b)]??_0x214942(0x232)),_0x15d6bb=_0xba4903['filter'](_0x3cd1ac=>_0x3cd1ac!==_0x214942(0x261)&&_0x3cd1ac!=='REJECTED');_0x15d6bb[_0x214942(0x2f1)]>0x0&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0xba4903[_0x214942(0x2b8)](_0x12eb64=>_0x12eb64===_0x214942(0x261))[_0x214942(0x2f1)]!==0x1&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x231)}),_0xba4903[_0x214942(0x2b8)](_0x4dd1d5=>_0x4dd1d5===_0x214942(0x21f))[_0x214942(0x2f1)]!==0x1&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':_0x214942(0x303)}),_0x2d671d[_0x214942(0x219)](_0x12d041=>_0x12d041[_0x214942(0x2d4)]===!![])&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x46b1cf,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0xfc63cf=new Set(),_0x46cc02=_0x48e77d=>{const _0x40fe92=_0x214942;if(_0xfc63cf[_0x40fe92(0x27a)](_0x48e77d))return;_0xfc63cf[_0x40fe92(0x2e7)](_0x48e77d);for(const _0x1a6976 of _0x3dd4dd[_0x40fe92(0x2b0)](_0x48e77d)??[]){const _0x5ed8bd=resolveEdgeEndpoint(_0x1a6976[_0x40fe92(0x2c1)],_0x1a6976[_0x40fe92(0x28a)]);if(_0x5ed8bd&&_0x287926[_0x40fe92(0x27a)](_0x5ed8bd))_0x46cc02(_0x5ed8bd);}};_0x46cc02(_0x54e144);for(const _0x544763 of _0x287926['keys']()){!_0xfc63cf[_0x214942(0x27a)](_0x544763)&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x544763,'message':_0x214942(0x2f7)});}const _0x3c2821=_0x47be1b['some'](_0x1c88ff=>_0xfc63cf[_0x214942(0x27a)](_0x1c88ff));if(!_0x3c2821){_0x416a55[_0x214942(0x28c)]({'path':'flowJson.edges','message':_0x214942(0x25c)});return;}const _0x140ab1=new Set(),_0x295adc=_0x49bdb9=>{const _0xac2837=_0x214942;if(_0x140ab1[_0xac2837(0x27a)](_0x49bdb9))return;_0x140ab1['add'](_0x49bdb9);for(const _0x5dca93 of _0x477b63[_0xac2837(0x2b0)](_0x49bdb9)??[]){const _0x5003d3=resolveEdgeEndpoint(_0x5dca93[_0xac2837(0x2f8)],_0x5dca93[_0xac2837(0x301)]);if(_0x5003d3&&_0x287926[_0xac2837(0x27a)](_0x5003d3))_0x295adc(_0x5003d3);}};for(const _0x476471 of _0x47be1b){if(_0x287926[_0x214942(0x27a)](_0x476471))_0x295adc(_0x476471);}for(const _0x450db5 of _0xfc63cf){!_0x140ab1[_0x214942(0x27a)](_0x450db5)&&_0x416a55[_0x214942(0x28c)]({'path':_0x214942(0x2e8)+_0x450db5,'message':_0x214942(0x21a)});}}function validateApprovalResults(_0x1a190d,_0x4a1d84,_0x2398d5,_0x444398){const _0x3a79c2=a298_0x4ad4d2;if(_0x4a1d84===0x0)return;const _0x9aed46=new Set(_0x2398d5[_0x3a79c2(0x312)](_0x1a6ccf=>_0x1a190d[_0x3a79c2(0x2b0)](_0x1a6ccf)?.[_0x3a79c2(0x1cd)])[_0x3a79c2(0x2b8)](_0x4c3ac8=>typeof _0x4c3ac8==='string'));for(const _0x1facd7 of[_0x3a79c2(0x261),_0x3a79c2(0x21f)]){!_0x9aed46[_0x3a79c2(0x27a)](_0x1facd7)&&_0x444398['push']({'path':'flowJson.nodes','message':_0x3a79c2(0x318)+_0x1facd7+'.'});}}function validateScriptResultReferences(_0x200003,_0x1c7e48,_0x443c04,_0x4f1547,_0x2e8e8a,_0x20416b,_0x154006){const _0x3c63da=a298_0x4ad4d2;if(_0x20416b[_0x3c63da(0x1f8)]===0x0)return;const _0x59e074=new Set(),_0x379a6a=_0x1a7eec=>{const _0x8fe98f=_0x3c63da;if(!_0x59e074['has'](_0x1a7eec)&&_0x200003[_0x8fe98f(0x27a)](_0x1a7eec)){_0x59e074[_0x8fe98f(0x2e7)](_0x1a7eec);for(const _0x24fc4d of _0x443c04[_0x8fe98f(0x2b0)](_0x1a7eec)??[]){const _0x281a80=resolveEdgeEndpoint(_0x24fc4d['target'],_0x24fc4d[_0x8fe98f(0x28a)]);if(_0x281a80)_0x379a6a(_0x281a80);}}};_0x379a6a(_0x1c7e48);const _0x3aa1a1=new Map();for(const _0x35190a of _0x59e074){_0x3aa1a1['set'](_0x35190a,_0x35190a===_0x1c7e48?new Set([_0x1c7e48]):new Set(_0x59e074));}let _0x58db18=!![];while(_0x58db18){_0x58db18=![];for(const _0x388886 of _0x59e074){if(_0x388886===_0x1c7e48)continue;const _0x8ddb14=(_0x4f1547['get'](_0x388886)??[])['map'](_0x1e397a=>resolveEdgeEndpoint(_0x1e397a['source'],_0x1e397a['sourceNodeId']))[_0x3c63da(0x2b8)](_0x1600db=>Boolean(_0x1600db&&_0x59e074['has'](_0x1600db)));if(_0x8ddb14['length']===0x0)continue;const _0x6d3f7c=new Set(_0x3aa1a1[_0x3c63da(0x2b0)](_0x8ddb14[0x0])??[]);for(const _0xe1af5 of _0x8ddb14[_0x3c63da(0x27f)](0x1)){const _0x44d9e4=_0x3aa1a1['get'](_0xe1af5)??new Set();for(const _0x202173 of _0x6d3f7c){if(!_0x44d9e4[_0x3c63da(0x27a)](_0x202173))_0x6d3f7c['delete'](_0x202173);}}_0x6d3f7c[_0x3c63da(0x2e7)](_0x388886);const _0x23fc6d=_0x3aa1a1[_0x3c63da(0x2b0)](_0x388886);!setsEqual(_0x23fc6d,_0x6d3f7c)&&(_0x3aa1a1['set'](_0x388886,_0x6d3f7c),_0x58db18=!![]);}}for(const [_0x24ece2,_0x34344a]of _0x443c04){const _0x3b2042=_0x3aa1a1[_0x3c63da(0x2b0)](_0x24ece2);if(!_0x3b2042)continue;for(const _0x5b398f of _0x34344a){if(_0x5b398f[_0x3c63da(0x28b)]!=='EXPRESSION'||typeof _0x5b398f[_0x3c63da(0x25b)]!==_0x3c63da(0x283))continue;for(const [_0x1d8c6e,_0x16eb20]of _0x20416b){expressionReferencesVariable(_0x5b398f[_0x3c63da(0x25b)],_0x1d8c6e)&&!_0x3b2042[_0x3c63da(0x27a)](_0x16eb20)&&_0x154006[_0x3c63da(0x28c)]({'path':(_0x2e8e8a['get'](_0x5b398f)??_0x3c63da(0x2da))+'.expression','message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x1d8c6e+_0x3c63da(0x1d9)+_0x16eb20+_0x3c63da(0x1d1)+_0x24ece2+'.'});}}}}function expressionReferencesVariable(_0x5d785f,_0x11117a){const _0x204cd0=a298_0x4ad4d2;let _0x38753c=0x0;while(_0x38753c<_0x5d785f[_0x204cd0(0x2f1)]){const _0x24e0ee=_0x5d785f[_0x38753c];if(_0x24e0ee==='\x27'||_0x24e0ee==='\x22'){_0x38753c=skipQuotedExpressionSegment(_0x5d785f,_0x38753c,_0x24e0ee);continue;}if(!/[A-Za-z_]/[_0x204cd0(0x1f1)](_0x24e0ee)){_0x38753c+=0x1;continue;}const _0xa12ea7=_0x38753c;_0x38753c+=0x1;while(_0x38753c<_0x5d785f[_0x204cd0(0x2f1)]&&/[A-Za-z0-9_]/[_0x204cd0(0x1f1)](_0x5d785f[_0x38753c])){_0x38753c+=0x1;}if(_0x5d785f[_0x204cd0(0x27f)](_0xa12ea7,_0x38753c)!==_0x11117a)continue;let _0x30427c=_0xa12ea7-0x1;while(_0x30427c>=0x0&&/\s/[_0x204cd0(0x1f1)](_0x5d785f[_0x30427c])){_0x30427c-=0x1;}if(_0x5d785f[_0x30427c]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x3b05bc,_0x419f97,_0x43d134){let _0x1ee12f=_0x419f97+0x1;while(_0x1ee12f<_0x3b05bc['length']){if(_0x3b05bc[_0x1ee12f]==='\x5c'){_0x1ee12f+=0x2;continue;}if(_0x3b05bc[_0x1ee12f]===_0x43d134)return _0x1ee12f+0x1;_0x1ee12f+=0x1;}return _0x1ee12f;}function resolveEffectiveResultVariable(_0x47b64d,_0x3fc9e1){const _0x4ee89e=a298_0x4ad4d2;if(_0x47b64d===undefined||_0x47b64d===null||_0x3fc9e1&&_0x47b64d==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x47b64d!==_0x4ee89e(0x283)||!VARIABLE_PATTERN[_0x4ee89e(0x1f1)](_0x47b64d)||RESERVED_RESULT_VARIABLES[_0x4ee89e(0x27a)](_0x47b64d)||_0x47b64d['startsWith']('approval_sys_'))return undefined;return _0x47b64d;}function registerResultVariableOwner(_0x43acf8,_0x53a1d6,_0x3dcb59,_0x2bab54){const _0x14c131=a298_0x4ad4d2;if(_0x43acf8[_0x14c131(0x27a)](_0x53a1d6)){_0x2bab54[_0x14c131(0x28c)]({'path':'flowJson.nodes','message':_0x14c131(0x24c)+_0x53a1d6+'.'});return;}_0x43acf8['set'](_0x53a1d6,_0x3dcb59);}function setsEqual(_0x48661b,_0x2412d1){const _0xa08c96=a298_0x4ad4d2;return _0x48661b[_0xa08c96(0x1f8)]===_0x2412d1[_0xa08c96(0x1f8)]&&[..._0x48661b][_0xa08c96(0x2d5)](_0x4fae44=>_0x2412d1[_0xa08c96(0x27a)](_0x4fae44));}function isValidUserId(_0x31c6f4){const _0x316b02=a298_0x4ad4d2;if(typeof _0x31c6f4===_0x316b02(0x283))return _0x31c6f4[_0x316b02(0x2e1)]()['length']>0x0;return Number['isSafeInteger'](_0x31c6f4)&&Number(_0x31c6f4)>0x0;}function resolveEdgeEndpoint(_0x2f99e8,_0x1cc0d4){const _0x45f978=a298_0x4ad4d2;if(typeof _0x2f99e8==='string'&&_0x2f99e8[_0x45f978(0x2e1)]())return _0x2f99e8[_0x45f978(0x2e1)]();if(typeof _0x1cc0d4===_0x45f978(0x283)&&_0x1cc0d4[_0x45f978(0x2e1)]())return _0x1cc0d4[_0x45f978(0x2e1)]();return undefined;}function removeEmptyMetadata(_0x2cec10,_0x40b89e,_0x21c6ad,_0x373868){const _0x174200=a298_0x4ad4d2;if(Array[_0x174200(0x28d)](_0x2cec10)){_0x2cec10[_0x174200(0x237)]((_0x34b4e1,_0x521c0c)=>removeEmptyMetadata(_0x34b4e1,_0x40b89e+'['+_0x521c0c+']',_0x21c6ad,_0x373868));return;}if(!isRecord(_0x2cec10))return;for(const [_0x2a7265,_0x598d7f]of Object['entries'](_0x2cec10)){const _0x4052bb=_0x40b89e+'.'+_0x2a7265;if(_0x2a7265===_0x174200(0x2a4)&&isEmptyJsonValue(_0x598d7f)){delete _0x2cec10[_0x2a7265],_0x373868[_0x174200(0x28c)](_0x4052bb),_0x21c6ad['push']({'code':_0x174200(0x251),'path':_0x4052bb,'message':_0x4052bb+_0x174200(0x1dd)});continue;}removeEmptyMetadata(_0x598d7f,_0x4052bb,_0x21c6ad,_0x373868);}}function isEmptyJsonValue(_0x148750){const _0x1f706b=a298_0x4ad4d2;if(_0x148750===null||_0x148750===undefined)return!![];if(typeof _0x148750===_0x1f706b(0x283))return _0x148750['trim']()==='';if(Array[_0x1f706b(0x28d)](_0x148750))return _0x148750[_0x1f706b(0x2f1)]===0x0;return isRecord(_0x148750)&&Object[_0x1f706b(0x218)](_0x148750)[_0x1f706b(0x2f1)]===0x0;}function isRecord(_0x26d103){const _0x4ecce3=a298_0x4ad4d2;return typeof _0x26d103===_0x4ecce3(0x224)&&_0x26d103!==null&&!Array[_0x4ecce3(0x28d)](_0x26d103);}function cloneJsonValue(_0x440b01){const _0x34c6fc=a298_0x4ad4d2;return JSON[_0x34c6fc(0x2fc)](JSON[_0x34c6fc(0x2b5)](_0x440b01));}export async function readFlowConfigFile(_0x4086d7){const _0x510fb2=a298_0x4ad4d2,_0x54514d=await readFile(resolve(_0x4086d7),_0x510fb2(0x269));return JSON[_0x510fb2(0x2fc)](_0x54514d);}
|
|
1
|
+
const a299_0x565b99=a299_0x386c;(function(_0x31b24b,_0x59fb57){const _0x7fb5e8=a299_0x386c,_0x1c143b=_0x31b24b();while(!![]){try{const _0xeb3771=-parseInt(_0x7fb5e8(0x11b))/0x1+-parseInt(_0x7fb5e8(0xe8))/0x2+-parseInt(_0x7fb5e8(0x20d))/0x3+-parseInt(_0x7fb5e8(0x16e))/0x4+parseInt(_0x7fb5e8(0x20b))/0x5*(-parseInt(_0x7fb5e8(0xe9))/0x6)+-parseInt(_0x7fb5e8(0x1ec))/0x7*(-parseInt(_0x7fb5e8(0xf2))/0x8)+-parseInt(_0x7fb5e8(0x18c))/0x9*(-parseInt(_0x7fb5e8(0x1aa))/0xa);if(_0xeb3771===_0x59fb57)break;else _0x1c143b['push'](_0x1c143b['shift']());}catch(_0xa9518e){_0x1c143b['push'](_0x1c143b['shift']());}}}(a299_0x5e1f,0x8aed2));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':a299_0x565b99(0x17f),'$id':a299_0x565b99(0x10a),'title':'Rabetbase\x20FlowConfig','type':'object','required':[a299_0x565b99(0x179),'flowType',a299_0x565b99(0x1f9)],'$defs':{'userId':{'anyOf':[{'type':a299_0x565b99(0x21b),'minLength':0x1},{'type':a299_0x565b99(0x135),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0x565b99(0x1c0),'minimum':0x0},'y':{'type':a299_0x565b99(0x1c0),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x149),a299_0x565b99(0x1ce)],'properties':{'value':{'type':a299_0x565b99(0x135),'minimum':0x1},'unit':{'enum':['SECONDS','MINUTES',a299_0x565b99(0x13b),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x565b99(0x1e4),'required':['id',a299_0x565b99(0x174),a299_0x565b99(0xf4),'position'],'properties':{'id':{'type':a299_0x565b99(0x21b),'pattern':a299_0x565b99(0xc5)},'type':{'enum':[a299_0x565b99(0xd1),a299_0x565b99(0x199),'APPROVAL',a299_0x565b99(0x1a1),a299_0x565b99(0x1df),a299_0x565b99(0x11e)]},'name':{'type':'string','minLength':0x1},'path':{'type':a299_0x565b99(0x21b),'minLength':0x1},'position':{'$ref':a299_0x565b99(0x124)},'approvalMode':{'enum':['SINGLE',a299_0x565b99(0xe6),a299_0x565b99(0x12b)]},'taskMode':{'enum':['APPROVAL',a299_0x565b99(0x1ea)]},'assignee':{'type':'object','required':[a299_0x565b99(0x162)],'properties':{'strategy':{'enum':[a299_0x565b99(0x134),a299_0x565b99(0x18a)]},'userIds':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x120)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a299_0x565b99(0x21b),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x162),a299_0x565b99(0x1c9)],'properties':{'strategy':{'const':a299_0x565b99(0x134)},'userIds':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x120)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x565b99(0x1e9)},'result':{'enum':[a299_0x565b99(0x219),a299_0x565b99(0xdd)]},'scriptName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x565b99(0x1e4),'properties':{'enabled':{'type':a299_0x565b99(0x1e9)},'retryCount':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x565b99(0xfb)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x565b99(0x1e9)},'duration':{'$ref':a299_0x565b99(0xfb)},'action':{'enum':['AUTO_APPROVE',a299_0x565b99(0x225),a299_0x565b99(0xd5)]},'interrupting':{'type':a299_0x565b99(0x1e9)},'scriptName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x565b99(0xc5)}},'additionalProperties':!![]},'cc':{'type':'object','required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x565b99(0x21b),'minLength':0x1}},'visible':{'type':a299_0x565b99(0x18f),'uniqueItems':!![],'items':{'type':a299_0x565b99(0x21b),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0x565b99(0x215),a299_0x565b99(0x1f4)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x565b99(0x21b),'minLength':0x1},'failurePolicy':{'enum':[a299_0x565b99(0xd6),a299_0x565b99(0x1e7)]},'template':{'type':a299_0x565b99(0x1e4),'required':['title','summary'],'properties':{'title':{'type':a299_0x565b99(0x21b),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x565b99(0x21b)},'facts':{'type':a299_0x565b99(0x18f),'maxItems':0x8,'items':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x222),a299_0x565b99(0x149)],'properties':{'label':{'type':a299_0x565b99(0x21b),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x565b99(0x18f),'maxItems':0x2,'items':{'type':a299_0x565b99(0x1e4),'required':['text',a299_0x565b99(0x126)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x565b99(0x18f),'items':{'type':a299_0x565b99(0x1e4),'required':['type',a299_0x565b99(0x149)],'properties':{'type':{'enum':[a299_0x565b99(0x14e),a299_0x565b99(0x18a),a299_0x565b99(0x1fe)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0x565b99(0x202)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x565b99(0x1e4),'properties':{'id':{'type':a299_0x565b99(0x21b),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a299_0x565b99(0x21b),'minLength':0x1},'target':{'type':a299_0x565b99(0x21b),'minLength':0x1},'sourceNodeId':{'type':a299_0x565b99(0x21b),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':['ALWAYS',a299_0x565b99(0x219),a299_0x565b99(0xdd),a299_0x565b99(0x115)]},'expression':{'type':'string'},'defaultFlow':{'type':'boolean'},'name':{'type':'string'},'waypoints':{'type':'array','items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x565b99(0x192)]},{'required':[a299_0x565b99(0x1fa)]}]},{'anyOf':[{'required':['target']},{'required':[a299_0x565b99(0x1cd)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'flowDesc':{'type':a299_0x565b99(0x21b)},'flowType':{'enum':[a299_0x565b99(0xe1),a299_0x565b99(0x1d1)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':Number[a299_0x565b99(0xc4)]},'pageIds':{'type':a299_0x565b99(0x18f),'items':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x1d8),'edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x565b99(0xff),'description':'Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.'},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x565b99(0x12c)},'startPageId':![],'startPath':{'type':a299_0x565b99(0x21b),'minLength':0x1},'nodes':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x1c3)}},'edges':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x177)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a299_0x565b99(0x179),'bindDatasetCode',a299_0x565b99(0x136),a299_0x565b99(0x19c),a299_0x565b99(0x1d0),a299_0x565b99(0x193)],REMOVED_ROOT_FIELDS=['id',a299_0x565b99(0x19c),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set([a299_0x565b99(0xd1),a299_0x565b99(0x199),a299_0x565b99(0x11f),a299_0x565b99(0x1a1),'SCRIPT',a299_0x565b99(0x11e)]),CONDITION_TYPES=new Set([a299_0x565b99(0x167),a299_0x565b99(0x219),a299_0x565b99(0xdd),a299_0x565b99(0x115)]),APPROVAL_MODES=new Set([a299_0x565b99(0x188),'ALL',a299_0x565b99(0x12b)]),APPROVAL_TASK_MODES=new Set([a299_0x565b99(0x11f),a299_0x565b99(0x1ea)]),FLOW_TIME_UNITS=new Set([a299_0x565b99(0x130),a299_0x565b99(0xe3),a299_0x565b99(0x13b),a299_0x565b99(0x172)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a299_0x565b99(0x225),a299_0x565b99(0xd5)]),FLOW_TYPES=new Set([a299_0x565b99(0xe1),a299_0x565b99(0x1d1)]),FLOW_PAGE_MODES=new Set([a299_0x565b99(0x12c),a299_0x565b99(0xf3)]),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([a299_0x565b99(0xd6),a299_0x565b99(0x1e7)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x565b99(0x14e),'ROLE',a299_0x565b99(0x1fe)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x565b99(0x202)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x565b99(0x1d3),UNSUPPORTED_FORM_MESSAGE=a299_0x565b99(0x17b),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a299_0x565b99(0x198),'approved',a299_0x565b99(0x121),a299_0x565b99(0x11a),'approval_sys_initiatorUserId',a299_0x565b99(0x168),a299_0x565b99(0x157),a299_0x565b99(0x1ef),'approval_sys_operationType',a299_0x565b99(0x1a2)]);export function normalizeFlowConfig(_0x2fdf1b){const _0xc4e90a=a299_0x565b99;if(!isRecord(_0x2fdf1b))throw new TypeError(_0xc4e90a(0xc9));const _0x38208d=cloneJsonValue(_0x2fdf1b),_0x23b3b3=_0x38208d[_0xc4e90a(0x1f9)],_0x8e24b3=isRecord(_0x23b3b3)?cloneJsonValue(_0x23b3b3):{},_0x5514b7=[],_0x1d8c64=[];for(const _0x4ac5fd of REMOVED_ROOT_FIELDS){if(!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x38208d,_0x4ac5fd))continue;delete _0x38208d[_0x4ac5fd],_0x1d8c64['push'](_0x4ac5fd),_0x5514b7[_0xc4e90a(0x13a)]({'code':'legacy_field_removed','path':_0x4ac5fd,'message':_0x4ac5fd+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x1b3d79 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0x1b3d79))continue;const _0x328519=_0xc4e90a(0x196)+_0x1b3d79;delete _0x8e24b3[_0x1b3d79],_0x1d8c64[_0xc4e90a(0x13a)](_0x328519),_0x5514b7['push']({'code':_0xc4e90a(0x220),'path':_0x328519,'message':_0x328519+_0xc4e90a(0xd3)});}if(Object['prototype'][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0xc4e90a(0xd0))){const _0x225518=_0x8e24b3['schemaVersion'],_0x268d39=typeof _0x225518===_0xc4e90a(0x21b)?_0x225518[_0xc4e90a(0x201)]():_0x225518;if(isEmptyJsonValue(_0x225518)||_0x268d39===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4351bc='flowJson.schemaVersion';delete _0x8e24b3[_0xc4e90a(0xd0)],_0x1d8c64[_0xc4e90a(0x13a)](_0x4351bc),_0x5514b7[_0xc4e90a(0x13a)]({'code':_0xc4e90a(0x220),'path':_0x4351bc,'message':_0x4351bc+_0xc4e90a(0x161)+DEFAULT_FLOW_SCHEMA_VERSION+_0xc4e90a(0xe7)});}}removeEmptyMetadata(_0x8e24b3,_0xc4e90a(0x1f9),_0x5514b7,_0x1d8c64);_0x38208d[_0xc4e90a(0x145)]===_0xc4e90a(0x1d1)&&!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0xc4e90a(0x14c))&&(_0x8e24b3[_0xc4e90a(0x14c)]='CUSTOM_PAGE');_0x38208d[_0xc4e90a(0x1f9)]=_0x8e24b3;if(typeof _0x38208d[_0xc4e90a(0x179)]==='string')_0x38208d[_0xc4e90a(0x179)]=_0x38208d[_0xc4e90a(0x179)][_0xc4e90a(0x201)]();return{'config':_0x38208d,'warnings':_0x5514b7,'removedPaths':_0x1d8c64};}export function validateFlowConfig(_0x59acd9){const _0x3f4b43=a299_0x565b99;let _0x139ac2;try{_0x139ac2=normalizeFlowConfig(_0x59acd9);}catch(_0x3064dd){const _0x50f19c=_0x3064dd instanceof Error?_0x3064dd[_0x3f4b43(0x13c)]:String(_0x3064dd),_0x290622={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x50f19c}],'warnings':[],'normalized':_0x290622,'validationConfig':_0x290622};}const _0x4a494e=_0x139ac2[_0x3f4b43(0x214)],_0x34339d=cloneJsonValue(_0x4a494e),_0x718ba5=_0x34339d['flowJson'];_0x718ba5[_0x3f4b43(0x176)]=_0x3f4b43(0x14f),_0x718ba5[_0x3f4b43(0x179)]=_0x4a494e[_0x3f4b43(0x179)];typeof _0x4a494e['datasetCode']===_0x3f4b43(0x21b)&&_0x4a494e[_0x3f4b43(0x136)][_0x3f4b43(0x201)]()&&(_0x718ba5['bindDatasetCode']=_0x4a494e[_0x3f4b43(0x136)][_0x3f4b43(0x201)]());const _0x5dee94=[];return validateOuterMetadata(_0x4a494e,_0x5dee94),validateFlowClassification(_0x4a494e,_0x5dee94),validateGraph(_0x4a494e['flowJson'],_0x5dee94),{'valid':_0x5dee94[_0x3f4b43(0x10e)]===0x0,'errors':_0x5dee94,'warnings':_0x139ac2[_0x3f4b43(0x1bf)],'normalized':_0x4a494e,'validationConfig':_0x34339d};}function validateFlowClassification(_0x1b100b,_0x386651){const _0xb5469a=a299_0x565b99;if(!isRecord(_0x1b100b[_0xb5469a(0x1f9)]))return;const _0xa51590=_0x1b100b['flowType'],_0x1f36ea=_0x1b100b[_0xb5469a(0x1f9)][_0xb5469a(0x14c)];_0x1f36ea!==undefined&&(typeof _0x1f36ea!==_0xb5469a(0x21b)||!FLOW_PAGE_MODES['has'](_0x1f36ea))&&_0x386651[_0xb5469a(0x13a)]({'path':_0xb5469a(0xf9),'message':'Unsupported\x20pageMode:\x20'+String(_0x1f36ea)+'.'});_0xa51590==='FORM_FLOW'&&_0x1f36ea!==undefined&&_0x386651[_0xb5469a(0x13a)]({'path':'flowJson.pageMode','message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0xa51590==='INDEPENDENT_FLOW'&&_0x1f36ea===_0xb5469a(0xf3)&&_0x386651[_0xb5469a(0x13a)]({'path':_0xb5469a(0xf9),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xa51590===_0xb5469a(0xe1)||_0xa51590===_0xb5469a(0x1d1))&&validateCustomPageNavigation(_0x1b100b,_0xa51590,_0x1f36ea,_0x386651);if(_0xa51590!==_0xb5469a(0xe1)||!Array[_0xb5469a(0x182)](_0x1b100b['flowJson'][_0xb5469a(0x1d8)]))return;_0x1b100b['flowJson']['nodes'][_0xb5469a(0x1e2)]((_0x11b47d,_0x55e020)=>{const _0x30e433=_0xb5469a;isRecord(_0x11b47d)&&_0x11b47d[_0x30e433(0x174)]==='APPROVAL'&&_0x11b47d[_0x30e433(0x16d)]===_0x30e433(0x1ea)&&_0x386651[_0x30e433(0x13a)]({'path':'flowJson.nodes['+_0x55e020+_0x30e433(0x1a5),'message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x1f8130,_0x1d77b3,_0x50f602,_0xc2211d){const _0x26e5c2=a299_0x565b99,_0x590bdc=_0x1f8130['flowJson'][_0x26e5c2(0x17a)];_0x590bdc!==undefined&&_0xc2211d[_0x26e5c2(0x13a)]({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x25db63=_0x1f8130[_0x26e5c2(0x1f9)][_0x26e5c2(0x1c1)];_0x25db63!==undefined&&(typeof _0x25db63!=='string'||_0x25db63[_0x26e5c2(0x201)]()==='')&&_0xc2211d[_0x26e5c2(0x13a)]({'path':_0x26e5c2(0x1de),'message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x46fd08=Array[_0x26e5c2(0x182)](_0x1f8130[_0x26e5c2(0x1f9)]['nodes'])?_0x1f8130[_0x26e5c2(0x1f9)][_0x26e5c2(0x1d8)]['map']((_0x263326,_0x50da8a)=>({'node':_0x263326,'index':_0x50da8a}))[_0x26e5c2(0x1b3)](({node:_0x5bcf7b})=>isRecord(_0x5bcf7b)&&_0x5bcf7b['path']!==undefined):[],_0x219a53=_0x25db63!==undefined||_0x46fd08[_0x26e5c2(0x10e)]>0x0,_0x5e9c2=_0x50f602===undefined&&_0x1d77b3===_0x26e5c2(0x1d1)?_0x26e5c2(0x12c):_0x50f602;_0x219a53&&(_0x1d77b3!==_0x26e5c2(0x1d1)||_0x5e9c2!=='CUSTOM_PAGE')&&(_0x25db63!==undefined&&_0xc2211d[_0x26e5c2(0x13a)]({'path':_0x26e5c2(0x1de),'message':_0x26e5c2(0x21a)}),_0x46fd08['forEach'](({index:_0x6ebe9f})=>{const _0x59391c=_0x26e5c2;_0xc2211d[_0x59391c(0x13a)]({'path':_0x59391c(0x1da)+_0x6ebe9f+'].path','message':_0x59391c(0x12a)});}));}export async function writeNormalizedFlowConfig(_0x2b8160,_0x1740de,_0x4ad12f={}){const _0x4f63fc=a299_0x565b99,_0x47d23f=resolve(_0x2b8160),_0x3d8340=_0x47d23f+'.'+process[_0x4f63fc(0xcd)]+'.'+randomUUID()+_0x4f63fc(0x1e3),_0xcdecc3=JSON[_0x4f63fc(0x150)](_0x1740de,null,0x2)+'\x0a';let _0x8abfdc;try{try{_0x8abfdc=(await stat(_0x47d23f))[_0x4f63fc(0x200)]&0x1ff;}catch{_0x8abfdc=undefined;}await writeFile(_0x3d8340,_0xcdecc3,{'encoding':_0x4f63fc(0x153),'flag':'wx','mode':_0x8abfdc??0x1a4});if(_0x8abfdc!==undefined)await chmod(_0x3d8340,_0x8abfdc);_0x4ad12f['overwrite']===![]?(await link(_0x3d8340,_0x47d23f),await unlink(_0x3d8340)):await rename(_0x3d8340,_0x47d23f);}finally{await unlink(_0x3d8340)['catch'](()=>undefined);}}function validateOuterMetadata(_0x5b39f0,_0x457544){const _0x50af88=a299_0x565b99;(typeof _0x5b39f0[_0x50af88(0x179)]!==_0x50af88(0x21b)||_0x5b39f0[_0x50af88(0x179)][_0x50af88(0x201)]()==='')&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x179),'message':_0x50af88(0x218)});_0x5b39f0[_0x50af88(0xf6)]!==undefined&&typeof _0x5b39f0[_0x50af88(0xf6)]!==_0x50af88(0x21b)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0xf6),'message':_0x50af88(0x11d)});if(_0x5b39f0['flowType']===undefined||_0x5b39f0['flowType']===null)_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x145),'message':_0x50af88(0x1f2)});else(typeof _0x5b39f0['flowType']!=='string'||!FLOW_TYPES[_0x50af88(0x119)](_0x5b39f0[_0x50af88(0x145)]))&&_0x457544['push']({'path':_0x50af88(0x145),'message':_0x50af88(0x1ed)+String(_0x5b39f0[_0x50af88(0x145)])+'.'});_0x5b39f0[_0x50af88(0x136)]!==undefined&&typeof _0x5b39f0[_0x50af88(0x136)]!==_0x50af88(0x21b)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x136),'message':_0x50af88(0xde)});_0x5b39f0['pageIds']===undefined&&_0x5b39f0[_0x50af88(0x1d0)]!==undefined&&(!Number[_0x50af88(0x10d)](_0x5b39f0[_0x50af88(0x1d0)])||_0x5b39f0[_0x50af88(0x1d0)]<=0x0)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x1d0),'message':_0x50af88(0xda)});if(_0x5b39f0[_0x50af88(0x156)]!==undefined){if(!Array[_0x50af88(0x182)](_0x5b39f0[_0x50af88(0x156)])||_0x5b39f0['pageIds']['some'](_0x196c6a=>!Number[_0x50af88(0x10d)](_0x196c6a)||_0x196c6a<=0x0))_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x156),'message':_0x50af88(0x1b2)});else[...new Set(_0x5b39f0[_0x50af88(0x156)])][_0x50af88(0x143)](',')[_0x50af88(0x10e)]>0x800&&_0x457544['push']({'path':_0x50af88(0x156),'message':_0x50af88(0x1fc)});_0x5b39f0['flowType']===_0x50af88(0x1d1)&&Array['isArray'](_0x5b39f0[_0x50af88(0x156)])&&_0x5b39f0[_0x50af88(0x156)][_0x50af88(0x10e)]>0x0&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x156),'message':_0x50af88(0x186)});}_0x5b39f0[_0x50af88(0x145)]===_0x50af88(0x1d1)&&_0x5b39f0['datasetCode']!==undefined&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x136),'message':_0x50af88(0x15c)}),_0x5b39f0[_0x50af88(0x145)]==='INDEPENDENT_FLOW'&&_0x5b39f0[_0x50af88(0x156)]===undefined&&_0x5b39f0['pageId']!==undefined&&_0x457544[_0x50af88(0x13a)]({'path':'pageId','message':_0x50af88(0x19b)});}function validateGraph(_0x378861,_0x4d3f26){const _0x2f482b=a299_0x565b99;if(!isRecord(_0x378861)){_0x4d3f26['push']({'path':_0x2f482b(0x1f9),'message':_0x2f482b(0x178)});return;}!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0x1d8)])&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x1e0),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0xe5)])&&_0x4d3f26['push']({'path':_0x2f482b(0x107),'message':'edges\x20must\x20be\x20an\x20array.'});Object['prototype'][_0x2f482b(0x18e)][_0x2f482b(0x19a)](_0x378861,_0x2f482b(0xd0))&&_0x4d3f26['push']({'path':_0x2f482b(0x114),'message':_0x2f482b(0xfa)+String(_0x378861[_0x2f482b(0xd0)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x523281 of['formSchema',_0x2f482b(0x103),_0x2f482b(0x11c)]){Object['prototype'][_0x2f482b(0x18e)][_0x2f482b(0x19a)](_0x378861,_0x523281)&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x196)+_0x523281,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0x1d8)])||!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0xe5)]))return;const _0x57833d=new Map(),_0x35e71d=[],_0x12b565=[],_0x4b6e1e=new Map(),_0x2338fa=new Map(),_0x506504=new Set();let _0x555e6c=0x0;_0x378861[_0x2f482b(0x1d8)][_0x2f482b(0x1e2)]((_0x2a643d,_0x361347)=>{const _0x3c38c1=_0x2f482b,_0x26f3f2='flowJson.nodes['+_0x361347+']';if(!isRecord(_0x2a643d)){_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x5c7a5d=_0x2a643d;if(typeof _0x5c7a5d['id']!==_0x3c38c1(0x21b)||!BPMN_ID_PATTERN[_0x3c38c1(0x140)](_0x5c7a5d['id']))_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2+_0x3c38c1(0x21d),'message':_0x3c38c1(0x1dd)});else _0x57833d[_0x3c38c1(0x119)](_0x5c7a5d['id'])?_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2+_0x3c38c1(0x21d),'message':_0x3c38c1(0x1dc)+_0x5c7a5d['id']+'.'}):(_0x57833d[_0x3c38c1(0x191)](_0x5c7a5d['id'],_0x5c7a5d),_0x506504['add'](_0x5c7a5d['id']));if(!NODE_TYPES['has'](_0x5c7a5d[_0x3c38c1(0x174)]))_0x4d3f26['push']({'path':_0x26f3f2+_0x3c38c1(0x21f),'message':_0x3c38c1(0x1d9)+String(_0x5c7a5d[_0x3c38c1(0x174)])+'.'});else{if(_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0xd1))_0x35e71d[_0x3c38c1(0x13a)](_0x5c7a5d['id']);else _0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x199)&&_0x12b565[_0x3c38c1(0x13a)](_0x5c7a5d['id']);}_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x11f)&&(_0x5c7a5d[_0x3c38c1(0x16d)]===undefined||_0x5c7a5d[_0x3c38c1(0x16d)]===_0x3c38c1(0x11f))&&(_0x555e6c+=0x1);validateNode(_0x5c7a5d,_0x26f3f2,_0x4d3f26);if(_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x1df)){const _0x3ad905=resolveEffectiveResultVariable(_0x5c7a5d[_0x3c38c1(0x208)],![]);_0x3ad905&&(registerResultVariableOwner(_0x2338fa,_0x3ad905,_0x5c7a5d['id'],_0x4d3f26),!_0x4b6e1e['has'](_0x3ad905)&&_0x4b6e1e['set'](_0x3ad905,_0x5c7a5d['id']));}if(_0x5c7a5d['type']===_0x3c38c1(0x11f)&&isRecord(_0x5c7a5d[_0x3c38c1(0x13d)])&&_0x5c7a5d[_0x3c38c1(0x13d)]['enabled']===!![]&&_0x5c7a5d[_0x3c38c1(0x13d)]['action']===_0x3c38c1(0xd5)){const _0x3bc922=resolveEffectiveResultVariable(_0x5c7a5d[_0x3c38c1(0x13d)][_0x3c38c1(0x208)],!![]);_0x3bc922&®isterResultVariableOwner(_0x2338fa,_0x3bc922,_0x5c7a5d['id']+'.timeout',_0x4d3f26);}});_0x35e71d[_0x2f482b(0x10e)]!==0x1&&_0x4d3f26[_0x2f482b(0x13a)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x12b565['length']===0x0&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x1e0),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x5014b5=new Map(),_0x2ffadd=new Map(),_0x2e2db2=new Map(),_0x4d48f1=new Set();_0x378861[_0x2f482b(0xe5)][_0x2f482b(0x1e2)]((_0x17843e,_0xd8a30b)=>{const _0xe2d912=_0x2f482b,_0x1e3125=_0xe2d912(0x148)+_0xd8a30b+']';if(!isRecord(_0x17843e)){_0x4d3f26['push']({'path':_0x1e3125,'message':_0xe2d912(0x10f)});return;}const _0x4d8aa3=_0x17843e;_0x2e2db2[_0xe2d912(0x191)](_0x4d8aa3,_0x1e3125);const _0x404732=resolveEdgeEndpoint(_0x4d8aa3['source'],_0x4d8aa3[_0xe2d912(0x1fa)]),_0x108d62=resolveEdgeEndpoint(_0x4d8aa3[_0xe2d912(0x1c8)],_0x4d8aa3[_0xe2d912(0x1cd)]);if(!_0x404732)_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+'.source','message':_0xe2d912(0x1e1)});if(!_0x108d62)_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0xed),'message':_0xe2d912(0x138)});_0x404732&&!_0x57833d['has'](_0x404732)&&_0x4d3f26['push']({'path':_0x1e3125+'.source','message':_0xe2d912(0x1c6)+_0x404732+'.'});_0x108d62&&!_0x57833d['has'](_0x108d62)&&_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0xed),'message':_0xe2d912(0x129)+_0x108d62+'.'});if(_0x4d8aa3['id']!==undefined){if(typeof _0x4d8aa3['id']!==_0xe2d912(0x21b)||!BPMN_ID_PATTERN[_0xe2d912(0x140)](_0x4d8aa3['id']))_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0x21d),'message':_0xe2d912(0x221)});else{if(_0x506504[_0xe2d912(0x119)](_0x4d8aa3['id']))_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0x21d),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x4d8aa3['id']+'.'});else!_0x506504[_0xe2d912(0x119)](_0x4d8aa3['id'])&&_0x506504[_0xe2d912(0xce)](_0x4d8aa3['id']);}}if(_0x404732&&_0x108d62){const _0x95b23f=_0x404732+'\x00'+_0x108d62+'\x00'+(_0x4d8aa3[_0xe2d912(0x1b7)]??_0xe2d912(0x167));_0x4d48f1[_0xe2d912(0x119)](_0x95b23f)?_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125,'message':_0xe2d912(0x19e)+_0x404732+_0xe2d912(0xee)+_0x108d62+'\x20('+(_0x4d8aa3['conditionType']??_0xe2d912(0x167))+').'}):_0x4d48f1['add'](_0x95b23f);}validateEdge(_0x4d8aa3,_0x1e3125,_0x4d3f26),_0x404732&&_0x108d62&&(_0x5014b5[_0xe2d912(0x1c2)](_0x404732)?.[_0xe2d912(0x13a)](_0x4d8aa3)??_0x5014b5['set'](_0x404732,[_0x4d8aa3]),_0x2ffadd[_0xe2d912(0x1c2)](_0x108d62)?.['push'](_0x4d8aa3)??_0x2ffadd['set'](_0x108d62,[_0x4d8aa3]));});if(_0x35e71d[_0x2f482b(0x10e)]!==0x1)return;validateGraphShape(_0x57833d,_0x35e71d[0x0],_0x12b565,_0x5014b5,_0x2ffadd,_0x2e2db2,_0x4d3f26),validateScriptResultReferences(_0x57833d,_0x35e71d[0x0],_0x5014b5,_0x2ffadd,_0x2e2db2,_0x4b6e1e,_0x4d3f26),validateApprovalResults(_0x57833d,_0x555e6c,_0x12b565,_0x4d3f26);}function validateNode(_0x3f1270,_0x55fa00,_0x239c44){const _0x10624f=a299_0x565b99;for(const _0x1642a7 of[_0x10624f(0xea),_0x10624f(0x1a0)]){Object['prototype']['hasOwnProperty'][_0x10624f(0x19a)](_0x3f1270,_0x1642a7)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.'+_0x1642a7,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x10624f(0x119)](_0x3f1270['type']))return;(typeof _0x3f1270[_0x10624f(0xf4)]!=='string'||_0x3f1270[_0x10624f(0xf4)]['trim']()==='')&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x194),'message':_0x10624f(0x15f)});_0x3f1270[_0x10624f(0x1d0)]!==undefined&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x183),'message':_0x10624f(0x12f)});if(_0x3f1270[_0x10624f(0x15d)]!==undefined){if(typeof _0x3f1270[_0x10624f(0x15d)]!=='string'||_0x3f1270[_0x10624f(0x15d)][_0x10624f(0x201)]()==='')_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x1d5),'message':_0x10624f(0x170)});else _0x3f1270[_0x10624f(0x174)]!==_0x10624f(0x11f)&&_0x3f1270[_0x10624f(0x174)]!==_0x10624f(0x199)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1d5),'message':_0x10624f(0x1d4)});}const _0x5d905e=_0x3f1270[_0x10624f(0x14b)];if(!isRecord(_0x5d905e))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0xca),'message':_0x10624f(0x160)});else for(const _0x26261d of['x','y']){const _0x37b2f4=_0x5d905e[_0x26261d];(typeof _0x37b2f4!==_0x10624f(0x1c0)||!Number[_0x10624f(0x1fd)](_0x37b2f4)||_0x37b2f4<0x0)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x20f)+_0x26261d,'message':_0x10624f(0x224)+_0x26261d+_0x10624f(0x113)});}if(_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x11f)){const _0x674811=_0x3f1270[_0x10624f(0x1f0)]??_0x10624f(0x188),_0x4e72b7=_0x3f1270['taskMode']??'APPROVAL';!APPROVAL_TASK_MODES[_0x10624f(0x119)](_0x4e72b7)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x4e72b7)+'.'});!APPROVAL_MODES[_0x10624f(0x119)](_0x674811)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x154),'message':_0x10624f(0x211)+String(_0x674811)+'.'});if(!isRecord(_0x3f1270['assignee']))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x128),'message':_0x10624f(0xfe)});else{const _0x2f8bcf=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x162)];_0x2f8bcf!=='FIXED'&&_0x2f8bcf!==_0x10624f(0x18a)&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0xdf),'message':_0x10624f(0x1fb)});if(_0x2f8bcf===_0x10624f(0x134)){const _0x4f5b9d=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x1c9)];if(!Array[_0x10624f(0x182)](_0x4f5b9d)||_0x4f5b9d[_0x10624f(0x10e)]===0x0)_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x13e),'message':_0x10624f(0x1b4)});else{const _0x51dd32=_0x4f5b9d[_0x10624f(0x223)](_0x40c221=>!isValidUserId(_0x40c221));_0x51dd32>=0x0&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1ca)+_0x51dd32+']','message':'fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});const _0x16e840=new Set(_0x4f5b9d[_0x10624f(0x1b3)](isValidUserId)[_0x10624f(0xfc)](_0x3c91f6=>String(_0x3c91f6)[_0x10624f(0x201)]()));_0x674811===_0x10624f(0x188)&&_0x16e840[_0x10624f(0xf8)]>0x1&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x13e),'message':_0x10624f(0x1ab)});}}if(_0x2f8bcf===_0x10624f(0x18a)){const _0x381fe4=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x164)],_0x436e7f=typeof _0x381fe4==='number'||typeof _0x381fe4==='string'?Number(String(_0x381fe4)['trim']()):Number['NaN'];(!Number[_0x10624f(0x10d)](_0x436e7f)||_0x436e7f<=0x0)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x16c),'message':_0x10624f(0x137)});}}if(_0x3f1270[_0x10624f(0xd8)]!==undefined){if(!isRecord(_0x3f1270[_0x10624f(0xd8)]))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.transferCandidates','message':_0x10624f(0x1be)});else{if(_0x3f1270['transferCandidates']['strategy']!=='FIXED')_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x14a),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x3d4391=_0x3f1270[_0x10624f(0xd8)]['userIds'];if(!Array['isArray'](_0x3d4391)||_0x3d4391[_0x10624f(0x10e)]===0x0)_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1c7),'message':_0x10624f(0xcc)});else{const _0x488fb0=_0x3d4391[_0x10624f(0x223)](_0x5e4d4f=>!isValidUserId(_0x5e4d4f));_0x488fb0>=0x0&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1a3)+_0x488fb0+']','message':_0x10624f(0x1cc)});}}}}}_0x3f1270[_0x10624f(0x110)]!==undefined&&typeof _0x3f1270['sequential']!==_0x10624f(0x1e9)&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x112),'message':_0x10624f(0x19f)});if(_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x1df)){(typeof _0x3f1270[_0x10624f(0x209)]!==_0x10624f(0x21b)||_0x3f1270[_0x10624f(0x209)][_0x10624f(0x201)]()==='')&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.scriptName','message':_0x10624f(0x173)});if(_0x3f1270['resultVariable']!==undefined){if(typeof _0x3f1270[_0x10624f(0x208)]!=='string'||!VARIABLE_PATTERN['test'](_0x3f1270[_0x10624f(0x208)]))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x101),'message':_0x10624f(0x20e)});else(RESERVED_RESULT_VARIABLES[_0x10624f(0x119)](_0x3f1270[_0x10624f(0x208)])||_0x3f1270['resultVariable'][_0x10624f(0xc7)](_0x10624f(0x1ee)))&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x101),'message':_0x10624f(0xc6)+_0x3f1270['resultVariable']+'.'});}}validateAsyncExecution(_0x3f1270,_0x55fa00,_0x239c44),validateApprovalTimeout(_0x3f1270,_0x55fa00,_0x239c44),validateCcConfig(_0x3f1270,_0x55fa00,_0x239c44),_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x11e)&&validateNotificationConfig(_0x3f1270['config'],_0x55fa00+_0x10624f(0x1c5),_0x239c44);}function validateAsyncExecution(_0x1a0a0d,_0x205f03,_0x105adb){const _0x38cddb=a299_0x565b99;if(_0x1a0a0d[_0x38cddb(0xd9)]===undefined)return;if(!isRecord(_0x1a0a0d[_0x38cddb(0xd9)])){_0x105adb[_0x38cddb(0x13a)]({'path':_0x205f03+'.async','message':_0x38cddb(0x206)});return;}if(_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0xec)]!==undefined&&typeof _0x1a0a0d[_0x38cddb(0xd9)]['enabled']!==_0x38cddb(0x1e9)){_0x105adb[_0x38cddb(0x13a)]({'path':_0x205f03+_0x38cddb(0xf1),'message':_0x38cddb(0xf5)});return;}if(_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0xec)]!==!![])return;_0x1a0a0d['type']!==_0x38cddb(0x1df)&&_0x105adb['push']({'path':_0x205f03+_0x38cddb(0x171),'message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x5b1127=_0x1a0a0d[_0x38cddb(0xd9)]['retryCount']??0x3;(!Number[_0x38cddb(0x1ac)](_0x5b1127)||_0x5b1127<0x1||_0x5b1127>MAX_ASYNC_RETRY_COUNT)&&_0x105adb['push']({'path':_0x205f03+_0x38cddb(0x17d),'message':_0x38cddb(0x1e5)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0x142)]!==undefined&&validateTimeAmount(_0x1a0a0d['async'][_0x38cddb(0x142)],_0x205f03+_0x38cddb(0x131),_0x105adb);}function validateApprovalTimeout(_0x4c129e,_0x484285,_0x444d55){const _0x4d2d14=a299_0x565b99;if(_0x4c129e[_0x4d2d14(0x13d)]===undefined)return;if(!isRecord(_0x4c129e[_0x4d2d14(0x13d)])){_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x147),'message':_0x4d2d14(0x158)});return;}if(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0xec)]!==undefined&&typeof _0x4c129e['timeout']['enabled']!==_0x4d2d14(0x1e9)){_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+'.timeout.enabled','message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0xec)]!==!![])return;if(_0x4c129e['timeout'][_0x4d2d14(0x1a8)]!==undefined&&typeof _0x4c129e['timeout'][_0x4d2d14(0x1a8)]!==_0x4d2d14(0x1e9)){_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x189),'message':_0x4d2d14(0x1eb)});return;}_0x4c129e[_0x4d2d14(0x174)]!==_0x4d2d14(0x11f)&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x147),'message':_0x4d2d14(0x17c)});validateTimeAmount(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x104)],_0x484285+'.timeout.duration',_0x444d55);const _0x2756dd=_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x1ad)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x4d2d14(0x119)](_0x2756dd)){_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x123),'message':_0x4d2d14(0x1f5)});return;}(_0x4c129e['taskMode']??_0x4d2d14(0x11f))===_0x4d2d14(0x1ea)&&_0x2756dd!==_0x4d2d14(0xd5)&&_0x444d55['push']({'path':_0x484285+'.timeout.action','message':_0x4d2d14(0x1db)});const _0x4551fa=_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x1a8)]??_0x2756dd!==_0x4d2d14(0xd5);if(_0x2756dd===_0x4d2d14(0xd5))_0x4551fa&&_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x189),'message':_0x4d2d14(0x184)}),(typeof _0x4c129e['timeout']['scriptName']!=='string'||_0x4c129e[_0x4d2d14(0x13d)]['scriptName']['trim']()==='')&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0xf7),'message':_0x4d2d14(0x204)}),validateOptionalResultVariable(_0x4c129e['timeout']['resultVariable'],_0x484285+'.timeout.resultVariable',_0x444d55);else!_0x4551fa&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x189),'message':_0x2756dd+_0x4d2d14(0xcb)});}function validateTimeAmount(_0x539eae,_0x3fc0da,_0x1f84b7){const _0x32dc07=a299_0x565b99;if(!isRecord(_0x539eae)){_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da,'message':_0x32dc07(0x1a4)});return;}(!Number['isInteger'](_0x539eae[_0x32dc07(0x149)])||Number(_0x539eae['value'])<=0x0)&&_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da+'.value','message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x32dc07(0x119)](_0x539eae[_0x32dc07(0x1ce)])&&_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da+_0x32dc07(0x122),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x271e9d,_0x466898,_0x65176f){const _0x510439=a299_0x565b99;if(_0x271e9d===undefined||_0x271e9d===null||_0x271e9d==='')return;if(typeof _0x271e9d!=='string'||!VARIABLE_PATTERN[_0x510439(0x140)](_0x271e9d))_0x65176f[_0x510439(0x13a)]({'path':_0x466898,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES['has'](_0x271e9d)||_0x271e9d['startsWith'](_0x510439(0x1ee)))&&_0x65176f[_0x510439(0x13a)]({'path':_0x466898,'message':'Reserved\x20resultVariable:\x20'+_0x271e9d+'.'});}function validateCcConfig(_0x4680be,_0x4bc83f,_0x2e68f5){const _0x23221b=a299_0x565b99;if(_0x4680be['cc']===undefined)return;if(!isRecord(_0x4680be['cc'])){_0x2e68f5['push']({'path':_0x4bc83f+_0x23221b(0x116),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x4680be[_0x23221b(0x174)]!==_0x23221b(0x199)&&_0x4680be['type']!==_0x23221b(0x11f)&&_0x2e68f5[_0x23221b(0x13a)]({'path':_0x4bc83f+_0x23221b(0x116),'message':_0x23221b(0x1ae)});Object[_0x23221b(0x106)][_0x23221b(0x18e)][_0x23221b(0x19a)](_0x4680be['cc'],'readSources')&&_0x2e68f5['push']({'path':_0x4bc83f+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x5127de=_0x4680be['cc'][_0x23221b(0xe4)];if(!Array[_0x23221b(0x182)](_0x5127de)||_0x5127de['length']===0x0)_0x2e68f5['push']({'path':_0x4bc83f+'.cc.recipientUserIds','message':_0x23221b(0x18b)});else{_0x5127de[_0x23221b(0x10e)]>MAX_CC_RECIPIENTS&&_0x2e68f5[_0x23221b(0x13a)]({'path':_0x4bc83f+_0x23221b(0xef),'message':_0x23221b(0x14d)+MAX_CC_RECIPIENTS+_0x23221b(0x133)});const _0x56dc28=new Set();_0x5127de[_0x23221b(0x1e2)]((_0x386128,_0x2783be)=>{const _0x2baff2=_0x23221b;if(typeof _0x386128!=='string'||_0x386128[_0x2baff2(0x201)]()==='')_0x2e68f5['push']({'path':_0x4bc83f+_0x2baff2(0x132)+_0x2783be+']','message':_0x2baff2(0x100)});else _0x56dc28[_0x2baff2(0x119)](_0x386128['trim']())?_0x2e68f5[_0x2baff2(0x13a)]({'path':_0x4bc83f+_0x2baff2(0x132)+_0x2783be+']','message':_0x2baff2(0x163)+_0x386128[_0x2baff2(0x201)]()+'.'}):_0x56dc28['add'](_0x386128['trim']());});}validateStringArray(_0x4680be['cc']['visible'],_0x4bc83f+'.cc.visible',_0x2e68f5);}function validateStringArray(_0x27c692,_0x50bd64,_0x46a387){const _0x1577ea=a299_0x565b99;if(_0x27c692===undefined)return;if(!Array[_0x1577ea(0x182)](_0x27c692)){_0x46a387['push']({'path':_0x50bd64,'message':_0x1577ea(0x217)});return;}const _0xf9dbd4=new Set();_0x27c692['forEach']((_0x57f3d0,_0x15ffe2)=>{const _0x185bec=_0x1577ea;if(typeof _0x57f3d0!=='string'||_0x57f3d0['trim']()==='')_0x46a387[_0x185bec(0x13a)]({'path':_0x50bd64+'['+_0x15ffe2+']','message':_0x185bec(0x1af)});else _0xf9dbd4[_0x185bec(0x119)](_0x57f3d0[_0x185bec(0x201)]())?_0x46a387[_0x185bec(0x13a)]({'path':_0x50bd64+'['+_0x15ffe2+']','message':_0x185bec(0x15e)+_0x57f3d0[_0x185bec(0x201)]()+'.'}):_0xf9dbd4[_0x185bec(0xce)](_0x57f3d0[_0x185bec(0x201)]());});}function validateNotificationConfig(_0x559856,_0x37b1db,_0xaceaeb){const _0x48ae14=a299_0x565b99;if(!isRecord(_0x559856)){_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x559856[_0x48ae14(0xdb)]!==undefined&&_0x559856[_0x48ae14(0xdb)]!==null){if(typeof _0x559856[_0x48ae14(0xdb)]!=='string')_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x190),'message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x559856[_0x48ae14(0xdb)]['trim']()&&_0x559856[_0x48ae14(0xdb)][_0x48ae14(0x201)]()!=='v1'&&_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x190),'message':_0x48ae14(0x151)+_0x559856[_0x48ae14(0xdb)]+'.'});}const _0x2e6f18=requireNotificationString(_0x559856[_0x48ae14(0x215)],_0x37b1db+_0x48ae14(0x205),'Notification\x20configCode\x20is\x20required.',_0xaceaeb);_0x2e6f18?.[_0x48ae14(0x165)]('${')&&_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x205),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x559856[_0x48ae14(0x1d6)]!==undefined&&_0x559856[_0x48ae14(0x1d6)]!==null){if(typeof _0x559856['failurePolicy']!=='string')_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x16a),'message':_0x48ae14(0x1ba)});else!NOTIFICATION_FAILURE_POLICIES[_0x48ae14(0x119)](_0x559856[_0x48ae14(0x1d6)][_0x48ae14(0x201)]()[_0x48ae14(0x1f6)]())&&_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x16a),'message':_0x48ae14(0x1d2)});}!isRecord(_0x559856[_0x48ae14(0x1f4)])?_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x146),'message':_0x48ae14(0x187)}):validateNotificationTemplate(_0x559856[_0x48ae14(0x1f4)],_0x37b1db+'.template',_0xaceaeb),validateNotificationRecipients(_0x559856[_0x48ae14(0x203)],_0x37b1db+'.recipients',_0xaceaeb);}function validateNotificationTemplate(_0x2f6de7,_0x155230,_0x2f156c){const _0x5a6c20=a299_0x565b99;for(const _0x2f4661 of[_0x5a6c20(0x13f),'summary']){const _0xe83d18=requireNotificationString(_0x2f6de7[_0x2f4661],_0x155230+'.'+_0x2f4661,_0x5a6c20(0x166)+_0x2f4661+'\x20is\x20required.',_0x2f156c);if(_0xe83d18)validateNotificationPlaceholders(_0xe83d18,_0x155230+'.'+_0x2f4661,_0x2f156c);}_0x2f6de7[_0x5a6c20(0x216)]!==undefined&&_0x2f6de7[_0x5a6c20(0x216)]!==null&&(typeof _0x2f6de7['detailMarkdown']!=='string'?_0x2f156c[_0x5a6c20(0x13a)]({'path':_0x155230+_0x5a6c20(0x185),'message':_0x5a6c20(0x127)}):validateNotificationPlaceholders(_0x2f6de7[_0x5a6c20(0x216)],_0x155230+_0x5a6c20(0x185),_0x2f156c)),validateNotificationFacts(_0x2f6de7[_0x5a6c20(0x195)],_0x155230+_0x5a6c20(0x1f1),_0x2f156c),validateNotificationActions(_0x2f6de7['actions'],_0x155230+_0x5a6c20(0x10b),_0x2f156c);}function validateNotificationFacts(_0x2ff232,_0x3f2b9c,_0x39a38f){const _0xa6c8f9=a299_0x565b99;if(_0x2ff232===undefined||_0x2ff232===null)return;if(!Array[_0xa6c8f9(0x182)](_0x2ff232)){_0x39a38f[_0xa6c8f9(0x13a)]({'path':_0x3f2b9c,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x2ff232[_0xa6c8f9(0x10e)]>MAX_NOTIFICATION_FACTS&&_0x39a38f[_0xa6c8f9(0x13a)]({'path':_0x3f2b9c,'message':_0xa6c8f9(0xeb)+MAX_NOTIFICATION_FACTS+_0xa6c8f9(0x175)}),_0x2ff232[_0xa6c8f9(0x1e2)]((_0x221457,_0x5afa53)=>{const _0x1b856f=_0xa6c8f9,_0x46be2a=_0x3f2b9c+'['+_0x5afa53+']';if(!isRecord(_0x221457)){_0x39a38f[_0x1b856f(0x13a)]({'path':_0x46be2a,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x30d6b5 of[_0x1b856f(0x222),'value']){const _0x4233a0=requireNotificationString(_0x221457[_0x30d6b5],_0x46be2a+'.'+_0x30d6b5,_0x1b856f(0x139)+_0x30d6b5+_0x1b856f(0x1a7),_0x39a38f);_0x4233a0&&validateNotificationPlaceholders(_0x4233a0,_0x46be2a+'.'+_0x30d6b5,_0x39a38f);}});}function validateNotificationActions(_0x228e29,_0x43df1a,_0x2abde7){const _0x4c56b2=a299_0x565b99;if(_0x228e29===undefined||_0x228e29===null)return;if(!Array[_0x4c56b2(0x182)](_0x228e29)){_0x2abde7['push']({'path':_0x43df1a,'message':_0x4c56b2(0x105)});return;}_0x228e29[_0x4c56b2(0x10e)]>MAX_NOTIFICATION_ACTIONS&&_0x2abde7[_0x4c56b2(0x13a)]({'path':_0x43df1a,'message':_0x4c56b2(0xeb)+MAX_NOTIFICATION_ACTIONS+_0x4c56b2(0x17e)}),_0x228e29[_0x4c56b2(0x1e2)]((_0x1a0a21,_0x25cd17)=>{const _0x140029=_0x4c56b2,_0x252127=_0x43df1a+'['+_0x25cd17+']';if(!isRecord(_0x1a0a21)){_0x2abde7[_0x140029(0x13a)]({'path':_0x252127,'message':_0x140029(0x12e)});return;}const _0x8b2f57=requireNotificationString(_0x1a0a21['text'],_0x252127+_0x140029(0x169),'Notification\x20action.text\x20is\x20required.',_0x2abde7);if(_0x8b2f57)validateNotificationPlaceholders(_0x8b2f57,_0x252127+_0x140029(0x169),_0x2abde7);const _0x19d875=requireNotificationString(_0x1a0a21[_0x140029(0x126)],_0x252127+_0x140029(0x102),'Notification\x20action.url\x20is\x20required.',_0x2abde7);if(!_0x19d875)return;validateNotificationPlaceholders(_0x19d875,_0x252127+_0x140029(0x102),_0x2abde7),!/^https?:\/\//i['test'](_0x19d875)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x140029(0x140)](_0x19d875)&&_0x2abde7[_0x140029(0x13a)]({'path':_0x252127+_0x140029(0x102),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x20dc2c,_0x2a1ae5,_0x51e1cb){const _0x44444b=a299_0x565b99;if(_0x20dc2c===undefined||_0x20dc2c===null)return;if(!Array[_0x44444b(0x182)](_0x20dc2c)){_0x51e1cb[_0x44444b(0x13a)]({'path':_0x2a1ae5,'message':_0x44444b(0x1f3)});return;}let _0xd3770f=![];_0x20dc2c['forEach']((_0xcb0947,_0x10b5a7)=>{const _0x404e12=_0x44444b,_0x5bcf77=_0x2a1ae5+'['+_0x10b5a7+']';if(!isRecord(_0xcb0947)){_0x51e1cb['push']({'path':_0x5bcf77,'message':_0x404e12(0x1cf)});return;}const _0x2bbef0=requireNotificationString(_0xcb0947['type'],_0x5bcf77+'.type','Notification\x20recipient.type\x20is\x20required.',_0x51e1cb);_0x2bbef0&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x2bbef0[_0x404e12(0x1f6)]())&&_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+'.type','message':_0x404e12(0x16b)});let _0x196100='TO';_0xcb0947['role']!==undefined&&_0xcb0947[_0x404e12(0x1cb)]!==null&&(typeof _0xcb0947[_0x404e12(0x1cb)]!==_0x404e12(0x21b)?(_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+_0x404e12(0x19d),'message':_0x404e12(0x1b1)}),_0x196100=''):(_0x196100=_0xcb0947['role'][_0x404e12(0x201)]()[_0x404e12(0x1f6)](),!NOTIFICATION_RECIPIENT_ROLES[_0x404e12(0x119)](_0x196100)&&_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+_0x404e12(0x19d),'message':_0x404e12(0xd4)})));if(_0x196100==='TO')_0xd3770f=!![];const _0x1b5605=requireNotificationString(_0xcb0947[_0x404e12(0x149)],_0x5bcf77+_0x404e12(0x1c4),_0x404e12(0x144),_0x51e1cb);_0x1b5605&&validateNotificationPlaceholders(_0x1b5605,_0x5bcf77+_0x404e12(0x1c4),_0x51e1cb);}),_0x20dc2c[_0x44444b(0x10e)]>0x0&&!_0xd3770f&&_0x51e1cb[_0x44444b(0x13a)]({'path':_0x2a1ae5,'message':'Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.'});}function requireNotificationString(_0x161bb3,_0x28c9c1,_0x39f279,_0x58669c){const _0x279f41=a299_0x565b99;if(typeof _0x161bb3!==_0x279f41(0x21b)||_0x161bb3['trim']()==='')return _0x58669c[_0x279f41(0x13a)]({'path':_0x28c9c1,'message':_0x39f279}),undefined;return _0x161bb3[_0x279f41(0x201)]();}function validateNotificationPlaceholders(_0x1dd105,_0x44d1e0,_0xc512d5){const _0x2a45ed=a299_0x565b99;for(const _0x25c47b of _0x1dd105['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x36b5e3=_0x25c47b[0x1]?.[_0x2a45ed(0x201)]()??'',_0x44379e=_0x36b5e3[_0x2a45ed(0x1e8)]('.'),_0x350693=_0x44379e>=0x0?_0x36b5e3[_0x2a45ed(0xdc)](0x0,_0x44379e):_0x36b5e3,_0x233752=_0x44379e>=0x0?_0x36b5e3[_0x2a45ed(0xdc)](_0x44379e+0x1)[_0x2a45ed(0x201)]():'';(![_0x2a45ed(0xd2),_0x2a45ed(0xc8),_0x2a45ed(0x1a6)][_0x2a45ed(0x165)](_0x350693)||_0x233752==='')&&_0xc512d5[_0x2a45ed(0x13a)]({'path':_0x44d1e0,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x25c47b[0x0]+'.'});}_0x1dd105[_0x2a45ed(0x18d)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0xc512d5[_0x2a45ed(0x13a)]({'path':_0x44d1e0,'message':_0x2a45ed(0x207)});}function validateEdge(_0x3e49e4,_0x3c431d,_0x42754a){const _0x33d473=a299_0x565b99;_0x3e49e4[_0x33d473(0xf4)]!==undefined&&typeof _0x3e49e4['name']!==_0x33d473(0x21b)&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x194),'message':_0x33d473(0x1f8)}),_0x3e49e4['defaultFlow']!==undefined&&typeof _0x3e49e4['defaultFlow']!=='boolean'&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x152),'message':_0x33d473(0x111)}),_0x3e49e4['waypoints']!==undefined&&(!Array[_0x33d473(0x182)](_0x3e49e4[_0x33d473(0x213)])?_0x42754a['push']({'path':_0x3c431d+'.waypoints','message':_0x33d473(0x1bc)}):_0x3e49e4[_0x33d473(0x213)][_0x33d473(0x1e2)]((_0x247a31,_0x4f54e6)=>{const _0x1495db=_0x33d473;if(!isRecord(_0x247a31)){_0x42754a[_0x1495db(0x13a)]({'path':_0x3c431d+_0x1495db(0x15a)+_0x4f54e6+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x19f916 of['x','y']){const _0x3b0088=_0x247a31[_0x19f916];(typeof _0x3b0088!==_0x1495db(0x1c0)||!Number[_0x1495db(0x1fd)](_0x3b0088))&&_0x42754a[_0x1495db(0x13a)]({'path':_0x3c431d+'.waypoints['+_0x4f54e6+'].'+_0x19f916,'message':_0x1495db(0x197)+_0x19f916+_0x1495db(0x1b6)});}})),_0x3e49e4[_0x33d473(0x1b7)]!==undefined&&!CONDITION_TYPES['has'](_0x3e49e4[_0x33d473(0x1b7)])&&_0x42754a['push']({'path':_0x3c431d+_0x33d473(0x1ff),'message':_0x33d473(0x1f7)+String(_0x3e49e4[_0x33d473(0x1b7)])+'.'}),_0x3e49e4[_0x33d473(0x1b7)]==='EXPRESSION'&&(typeof _0x3e49e4['expression']!=='string'||_0x3e49e4['expression']['trim']()==='')&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x181),'message':_0x33d473(0xf0)}),_0x3e49e4[_0x33d473(0x155)]===!![]&&_0x3e49e4[_0x33d473(0x1b7)]!==_0x33d473(0x167)&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x152),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x3e49e4[_0x33d473(0x155)]===!![]&&typeof _0x3e49e4['expression']===_0x33d473(0x21b)&&_0x3e49e4['expression'][_0x33d473(0x201)]()!==''&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x181),'message':_0x33d473(0x108)});}function validateGraphShape(_0x5d5915,_0x4c7ffa,_0x4bfff4,_0x93164d,_0x3abd42,_0x2650eb,_0x354e27){const _0x597472=a299_0x565b99;for(const [_0x109f40,_0x30c5d2]of _0x5d5915){const _0x1cf9eb=_0x3abd42[_0x597472(0x1c2)](_0x109f40)??[],_0x193bac=_0x93164d[_0x597472(0x1c2)](_0x109f40)??[];_0x30c5d2[_0x597472(0x174)]!==_0x597472(0xd1)&&_0x1cf9eb['length']===0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x30c5d2['type']!==_0x597472(0x199)&&_0x193bac[_0x597472(0x10e)]===0x0&&_0x354e27[_0x597472(0x13a)]({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0x180)});_0x30c5d2[_0x597472(0x174)]===_0x597472(0xd1)&&_0x1cf9eb[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0x1b5)});_0x30c5d2['type']===_0x597472(0x199)&&_0x193bac[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0xfd)});if(_0x30c5d2[_0x597472(0x174)]==='CONDITION'){_0x193bac[_0x597472(0x10e)]<0x2&&_0x354e27['push']({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0xe2)});const _0x5dd762=_0x193bac['filter'](_0x94ba60=>_0x94ba60['defaultFlow']===!![]);_0x5dd762['length']!==0x1&&_0x354e27['push']({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x20a)});if(_0x5dd762[_0x597472(0x10e)]===0x1){const _0x6772e6=_0x5dd762[0x0],_0x2c22e4=_0x2650eb[_0x597472(0x1c2)](_0x6772e6)??_0x597472(0x107);_0x6772e6['conditionType']!==_0x597472(0x167)&&_0x354e27[_0x597472(0x13a)]({'path':_0x2c22e4+_0x597472(0x1ff),'message':_0x597472(0x1d7)});_0x6772e6['expression']!==undefined&&_0x354e27[_0x597472(0x13a)]({'path':_0x2c22e4+_0x597472(0x181),'message':_0x597472(0xe0)});for(const _0x133134 of _0x193bac){if(_0x133134===_0x6772e6)continue;const _0xb6c1ac=_0x2650eb[_0x597472(0x1c2)](_0x133134)??_0x597472(0x107);if(_0x133134[_0x597472(0x1b7)]!==_0x597472(0x115))_0x354e27['push']({'path':_0xb6c1ac+'.conditionType','message':_0x597472(0x20c)});else(typeof _0x133134['expression']!==_0x597472(0x21b)||_0x133134[_0x597472(0x117)][_0x597472(0x201)]()==='')&&_0x354e27[_0x597472(0x13a)]({'path':_0xb6c1ac+_0x597472(0x181),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x30c5d2[_0x597472(0x174)]===_0x597472(0x11f)&&(_0x30c5d2[_0x597472(0x16d)]??_0x597472(0x11f))===_0x597472(0x1ea)){if(_0x193bac[_0x597472(0x10e)]!==0x1)_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x210)});else{const _0x3ca4a2=_0x193bac[0x0];((_0x3ca4a2[_0x597472(0x1b7)]??_0x597472(0x167))!==_0x597472(0x167)||_0x3ca4a2[_0x597472(0x155)]===!![]||typeof _0x3ca4a2['expression']===_0x597472(0x21b)&&_0x3ca4a2[_0x597472(0x117)][_0x597472(0x201)]()!=='')&&_0x354e27[_0x597472(0x13a)]({'path':_0x2650eb['get'](_0x3ca4a2)??'flowJson.edges','message':_0x597472(0x1a9)});}}else{if(_0x30c5d2[_0x597472(0x174)]==='APPROVAL'){const _0x575b4d=_0x193bac['map'](_0xe90572=>_0xe90572[_0x597472(0x1b7)]??_0x597472(0x167)),_0x547bad=_0x575b4d['filter'](_0x2d7759=>_0x2d7759!==_0x597472(0x219)&&_0x2d7759!=='REJECTED');_0x547bad[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x575b4d[_0x597472(0x1b3)](_0x9e99a5=>_0x9e99a5===_0x597472(0x219))[_0x597472(0x10e)]!==0x1&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x125)}),_0x575b4d['filter'](_0xebe12f=>_0xebe12f===_0x597472(0xdd))[_0x597472(0x10e)]!==0x1&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0xcf)}),_0x193bac[_0x597472(0x1bb)](_0x5974f3=>_0x5974f3[_0x597472(0x155)]===!![])&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x10c)});}}}const _0x26fb2e=new Set(),_0x2ce328=_0x19a652=>{const _0xd04563=_0x597472;if(_0x26fb2e[_0xd04563(0x119)](_0x19a652))return;_0x26fb2e['add'](_0x19a652);for(const _0x838b65 of _0x93164d[_0xd04563(0x1c2)](_0x19a652)??[]){const _0x4fa56f=resolveEdgeEndpoint(_0x838b65[_0xd04563(0x1c8)],_0x838b65[_0xd04563(0x1cd)]);if(_0x4fa56f&&_0x5d5915[_0xd04563(0x119)](_0x4fa56f))_0x2ce328(_0x4fa56f);}};_0x2ce328(_0x4c7ffa);for(const _0x45cf7b of _0x5d5915[_0x597472(0x21c)]()){!_0x26fb2e[_0x597472(0x119)](_0x45cf7b)&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x45cf7b,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x1672df=_0x4bfff4[_0x597472(0x1bb)](_0x3580af=>_0x26fb2e[_0x597472(0x119)](_0x3580af));if(!_0x1672df){_0x354e27[_0x597472(0x13a)]({'path':'flowJson.edges','message':_0x597472(0x21e)});return;}const _0x3ad58a=new Set(),_0x5776e9=_0x2deba7=>{const _0x41311c=_0x597472;if(_0x3ad58a[_0x41311c(0x119)](_0x2deba7))return;_0x3ad58a[_0x41311c(0xce)](_0x2deba7);for(const _0x53d704 of _0x3abd42['get'](_0x2deba7)??[]){const _0x29439f=resolveEdgeEndpoint(_0x53d704['source'],_0x53d704[_0x41311c(0x1fa)]);if(_0x29439f&&_0x5d5915[_0x41311c(0x119)](_0x29439f))_0x5776e9(_0x29439f);}};for(const _0x304c3c of _0x4bfff4){if(_0x5d5915[_0x597472(0x119)](_0x304c3c))_0x5776e9(_0x304c3c);}for(const _0x5e1aa0 of _0x26fb2e){!_0x3ad58a[_0x597472(0x119)](_0x5e1aa0)&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x5e1aa0,'message':_0x597472(0x212)});}}function a299_0x5e1f(){const _0x489457=['EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','.detailMarkdown','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','NOTIFICATION\x20node\x20requires\x20template.','SINGLE','.timeout.interrupting','ROLE','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','261VUjCel','replace','hasOwnProperty','array','.version','set','source','templateName','.name','facts','flowJson.','waypoint.','formData','END','call','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','appCode','.role','Duplicate\x20edge\x20route:\x20','sequential\x20must\x20be\x20a\x20boolean.','formPermission','CONDITION','approval_sys_dataId','.transferCandidates.userIds[','duration\x20requires\x20value\x20and\x20unit.','].taskMode','variables','\x20is\x20required.','interrupting','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','530470azEWTH','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isInteger','action','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','value\x20must\x20be\x20a\x20non-empty\x20string.','flowJson.nodes.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','filter','FIXED\x20assignee\x20requires\x20userIds.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','\x20must\x20be\x20a\x20finite\x20number.','conditionType','entries','Expression\x20references\x20SCRIPT\x20resultVariable\x20','failurePolicy\x20must\x20be\x20a\x20string.','some','waypoints\x20must\x20be\x20an\x20array.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','transferCandidates\x20must\x20be\x20an\x20object.','warnings','number','startPath','get','#/$defs/flowNode','.value','.config','Edge\x20source\x20node\x20not\x20found:\x20','.transferCandidates.userIds','target','userIds','.assignee.userIds[','role','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','targetNodeId','unit','Notification\x20recipient\x20must\x20be\x20an\x20object.','pageId','INDEPENDENT_FLOW','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','scriptResult','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.path','failurePolicy','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','nodes','Unsupported\x20node\x20type:\x20','flowJson.nodes[','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Duplicate\x20node\x20id:\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','flowJson.startPath','SCRIPT','flowJson.nodes','edge\x20source\x20is\x20required.','forEach','.tmp','object','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','result','FAIL','indexOf','boolean','HANDLE','timeout.interrupting\x20must\x20be\x20a\x20boolean.','7SnRqgD','Unsupported\x20flowType:\x20','approval_sys_','approval_sys_pageId','approvalMode','.facts','flowType\x20is\x20required.','Notification\x20recipients\x20must\x20be\x20an\x20array.','template','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','toUpperCase','Unsupported\x20condition\x20type:\x20','edge\x20name\x20must\x20be\x20a\x20string.','flowJson','sourceNodeId','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','isFinite','EMAIL','.conditionType','mode','trim','BCC','recipients','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','.configCode','async\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','resultVariable','scriptName','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','5FyAGWh','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','1864956QcGSPC','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.position.','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','Unsupported\x20approval\x20mode:\x20','Node\x20cannot\x20reach\x20any\x20END.','waypoints','config','configCode','detailMarkdown','value\x20must\x20be\x20an\x20array.','flowName\x20is\x20required.','APPROVED','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','string','keys','.id','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','.type','legacy_field_removed','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','label','findIndex','position.','AUTO_REJECT','MAX_SAFE_INTEGER','^[A-Za-z_][A-Za-z0-9_]*$','Reserved\x20resultVariable:\x20','startsWith','context','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.position','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','pid','add','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','schemaVersion','START','event','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','EXECUTE_BFF','CONTINUE','every','transferCandidates','async','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','version','slice','REJECTED','datasetCode\x20must\x20be\x20a\x20string.','.assignee.strategy','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','FORM_FLOW','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','MINUTES','recipientUserIds','edges','ALL','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','609806fIdmqc','1541874Ohafge','form','Notification\x20template\x20supports\x20at\x20most\x20','enabled','.target','\x20->\x20','.cc.recipientUserIds','EXPRESSION\x20edge\x20requires\x20expression.','.async.enabled','4734352fBdqLS','PLATFORM_FORM','name','async.enabled\x20must\x20be\x20a\x20boolean.','flowDesc','.timeout.scriptName','size','flowJson.pageMode','Unsupported\x20schemaVersion:\x20','#/$defs/timeAmount','map','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','APPROVAL\x20node\x20requires\x20assignee.','approval.simple-flow.v1','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','.resultVariable','.url','formDefinitions','duration','Notification\x20template.actions\x20must\x20be\x20an\x20array.','prototype','flowJson.edges','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','assignee','https://lovrabet.com/schema/rabetbase-flow-config.json','.actions','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','isSafeInteger','length','edge\x20must\x20be\x20an\x20object.','sequential','defaultFlow\x20must\x20be\x20a\x20boolean.','.sequential','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson.schemaVersion','EXPRESSION','.cc','expression',',\x20but\x20node\x20','has','approval_sys_processInstanceId','122534YSICbD','formPermissions','flowDesc\x20must\x20be\x20a\x20string.','NOTIFICATION','APPROVAL','#/$defs/userId','approval_sys_appCode','.unit','.timeout.action','#/$defs/position','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','url','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.assignee','Edge\x20target\x20node\x20not\x20found:\x20','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','ANY','CUSTOM_PAGE','parse','Notification\x20action\x20must\x20be\x20an\x20object.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','SECONDS','.async.retryInterval','.cc.recipientUserIds[','\x20users.','FIXED','integer','datasetCode','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','edge\x20target\x20is\x20required.','Notification\x20fact.','push','HOURS','message','timeout','.assignee.userIds','title','test','metadata','retryInterval','join','Notification\x20recipient.value\x20is\x20required.','flowType','.template','.timeout','flowJson.edges[','value','.transferCandidates.strategy','position','pageMode','cc.recipientUserIds\x20supports\x20at\x20most\x20','USER','__rabetbase_local_validation__','stringify','Unsupported\x20notification\x20version:\x20','.defaultFlow','utf8','.approvalMode','defaultFlow','pageIds','approval_sys_datasetCode','timeout\x20must\x20be\x20an\x20object.','\x20was\x20empty\x20and\x20was\x20removed.','.waypoints[','delete','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','path','Duplicate\x20value:\x20','Every\x20node\x20requires\x20a\x20non-empty\x20name.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','strategy','Duplicate\x20cc\x20recipient\x20userId:\x20','roleId','includes','Notification\x20template.','ALWAYS','approval_sys_initiatorUsername','.text','.failurePolicy','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.assignee.roleId','taskMode','1020188zANMuq','empty_metadata_removed','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.async','DAYS','SCRIPT\x20node\x20requires\x20scriptName.','type','\x20facts.','flowKey','#/$defs/flowEdge','flowJson\x20must\x20be\x20an\x20object.','flowName','startPageId','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','.async.retryCount','\x20actions.','https://json-schema.org/draft/2020-12/schema','Node\x20has\x20no\x20outgoing\x20edge.','.expression','isArray','.pageId'];a299_0x5e1f=function(){return _0x489457;};return a299_0x5e1f();}function validateApprovalResults(_0x20e29c,_0x21b5b0,_0x3b543f,_0x58d317){const _0x3c09c7=a299_0x565b99;if(_0x21b5b0===0x0)return;const _0x1cd557=new Set(_0x3b543f['map'](_0x1cc6d9=>_0x20e29c[_0x3c09c7(0x1c2)](_0x1cc6d9)?.[_0x3c09c7(0x1e6)])['filter'](_0x5d8f2d=>typeof _0x5d8f2d===_0x3c09c7(0x21b)));for(const _0x582523 of[_0x3c09c7(0x219),_0x3c09c7(0xdd)]){!_0x1cd557[_0x3c09c7(0x119)](_0x582523)&&_0x58d317['push']({'path':_0x3c09c7(0x1e0),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x582523+'.'});}}function validateScriptResultReferences(_0x8846b2,_0x3792fd,_0x4c3aa8,_0xb7fcc7,_0x1aaad3,_0x374417,_0x132c9c){const _0x23082b=a299_0x565b99;if(_0x374417[_0x23082b(0xf8)]===0x0)return;const _0xaf49e4=new Set(),_0x1bbb79=_0x188a71=>{const _0x5802dd=_0x23082b;if(!_0xaf49e4['has'](_0x188a71)&&_0x8846b2['has'](_0x188a71)){_0xaf49e4[_0x5802dd(0xce)](_0x188a71);for(const _0x4aa35b of _0x4c3aa8[_0x5802dd(0x1c2)](_0x188a71)??[]){const _0x46c590=resolveEdgeEndpoint(_0x4aa35b['target'],_0x4aa35b[_0x5802dd(0x1cd)]);if(_0x46c590)_0x1bbb79(_0x46c590);}}};_0x1bbb79(_0x3792fd);const _0x6bdc8b=new Map();for(const _0x5466b6 of _0xaf49e4){_0x6bdc8b['set'](_0x5466b6,_0x5466b6===_0x3792fd?new Set([_0x3792fd]):new Set(_0xaf49e4));}let _0x566215=!![];while(_0x566215){_0x566215=![];for(const _0x149e0f of _0xaf49e4){if(_0x149e0f===_0x3792fd)continue;const _0xcb2d77=(_0xb7fcc7[_0x23082b(0x1c2)](_0x149e0f)??[])[_0x23082b(0xfc)](_0x478507=>resolveEdgeEndpoint(_0x478507[_0x23082b(0x192)],_0x478507[_0x23082b(0x1fa)]))[_0x23082b(0x1b3)](_0x246af5=>Boolean(_0x246af5&&_0xaf49e4['has'](_0x246af5)));if(_0xcb2d77[_0x23082b(0x10e)]===0x0)continue;const _0x5142ff=new Set(_0x6bdc8b[_0x23082b(0x1c2)](_0xcb2d77[0x0])??[]);for(const _0x3a4550 of _0xcb2d77[_0x23082b(0xdc)](0x1)){const _0x23b0ba=_0x6bdc8b['get'](_0x3a4550)??new Set();for(const _0x130aa1 of _0x5142ff){if(!_0x23b0ba['has'](_0x130aa1))_0x5142ff[_0x23082b(0x15b)](_0x130aa1);}}_0x5142ff[_0x23082b(0xce)](_0x149e0f);const _0x5d4638=_0x6bdc8b[_0x23082b(0x1c2)](_0x149e0f);!setsEqual(_0x5d4638,_0x5142ff)&&(_0x6bdc8b[_0x23082b(0x191)](_0x149e0f,_0x5142ff),_0x566215=!![]);}}for(const [_0x2950ac,_0x30c21a]of _0x4c3aa8){const _0x34408f=_0x6bdc8b[_0x23082b(0x1c2)](_0x2950ac);if(!_0x34408f)continue;for(const _0x2654af of _0x30c21a){if(_0x2654af[_0x23082b(0x1b7)]!==_0x23082b(0x115)||typeof _0x2654af[_0x23082b(0x117)]!=='string')continue;for(const [_0x32576f,_0x507213]of _0x374417){expressionReferencesVariable(_0x2654af[_0x23082b(0x117)],_0x32576f)&&!_0x34408f[_0x23082b(0x119)](_0x507213)&&_0x132c9c[_0x23082b(0x13a)]({'path':(_0x1aaad3['get'](_0x2654af)??_0x23082b(0x107))+'.expression','message':_0x23082b(0x1b9)+_0x32576f+_0x23082b(0x118)+_0x507213+_0x23082b(0x1bd)+_0x2950ac+'.'});}}}}function expressionReferencesVariable(_0x28fa0d,_0x4a3f77){const _0x4dc9a3=a299_0x565b99;let _0x79e970=0x0;while(_0x79e970<_0x28fa0d[_0x4dc9a3(0x10e)]){const _0x1777f0=_0x28fa0d[_0x79e970];if(_0x1777f0==='\x27'||_0x1777f0==='\x22'){_0x79e970=skipQuotedExpressionSegment(_0x28fa0d,_0x79e970,_0x1777f0);continue;}if(!/[A-Za-z_]/['test'](_0x1777f0)){_0x79e970+=0x1;continue;}const _0x2defb9=_0x79e970;_0x79e970+=0x1;while(_0x79e970<_0x28fa0d[_0x4dc9a3(0x10e)]&&/[A-Za-z0-9_]/[_0x4dc9a3(0x140)](_0x28fa0d[_0x79e970])){_0x79e970+=0x1;}if(_0x28fa0d[_0x4dc9a3(0xdc)](_0x2defb9,_0x79e970)!==_0x4a3f77)continue;let _0x503c7a=_0x2defb9-0x1;while(_0x503c7a>=0x0&&/\s/[_0x4dc9a3(0x140)](_0x28fa0d[_0x503c7a])){_0x503c7a-=0x1;}if(_0x28fa0d[_0x503c7a]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x5f1068,_0xd1056b,_0x391d11){let _0x45805e=_0xd1056b+0x1;while(_0x45805e<_0x5f1068['length']){if(_0x5f1068[_0x45805e]==='\x5c'){_0x45805e+=0x2;continue;}if(_0x5f1068[_0x45805e]===_0x391d11)return _0x45805e+0x1;_0x45805e+=0x1;}return _0x45805e;}function resolveEffectiveResultVariable(_0x9919eb,_0x1a1bfe){const _0x3364e1=a299_0x565b99;if(_0x9919eb===undefined||_0x9919eb===null||_0x1a1bfe&&_0x9919eb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x9919eb!==_0x3364e1(0x21b)||!VARIABLE_PATTERN[_0x3364e1(0x140)](_0x9919eb)||RESERVED_RESULT_VARIABLES[_0x3364e1(0x119)](_0x9919eb)||_0x9919eb['startsWith'](_0x3364e1(0x1ee)))return undefined;return _0x9919eb;}function registerResultVariableOwner(_0x46513c,_0x36bda,_0x3b5811,_0x4793f0){const _0x239dc7=a299_0x565b99;if(_0x46513c[_0x239dc7(0x119)](_0x36bda)){_0x4793f0[_0x239dc7(0x13a)]({'path':_0x239dc7(0x1e0),'message':'Duplicate\x20resultVariable:\x20'+_0x36bda+'.'});return;}_0x46513c[_0x239dc7(0x191)](_0x36bda,_0x3b5811);}function setsEqual(_0x86d06c,_0x1e2695){const _0x16b30a=a299_0x565b99;return _0x86d06c['size']===_0x1e2695[_0x16b30a(0xf8)]&&[..._0x86d06c][_0x16b30a(0xd7)](_0x3688bd=>_0x1e2695[_0x16b30a(0x119)](_0x3688bd));}function isValidUserId(_0x5b99fa){const _0x4b17dd=a299_0x565b99;if(typeof _0x5b99fa===_0x4b17dd(0x21b))return _0x5b99fa[_0x4b17dd(0x201)]()[_0x4b17dd(0x10e)]>0x0;return Number[_0x4b17dd(0x10d)](_0x5b99fa)&&Number(_0x5b99fa)>0x0;}function resolveEdgeEndpoint(_0x54aac0,_0x3c7022){const _0x378665=a299_0x565b99;if(typeof _0x54aac0===_0x378665(0x21b)&&_0x54aac0[_0x378665(0x201)]())return _0x54aac0[_0x378665(0x201)]();if(typeof _0x3c7022==='string'&&_0x3c7022[_0x378665(0x201)]())return _0x3c7022[_0x378665(0x201)]();return undefined;}function a299_0x386c(_0x45e0d7,_0x19cca8){_0x45e0d7=_0x45e0d7-0xc4;const _0x5e1f5c=a299_0x5e1f();let _0x386c9c=_0x5e1f5c[_0x45e0d7];return _0x386c9c;}function removeEmptyMetadata(_0x21e025,_0x11e373,_0x49957e,_0x2b691d){const _0x319ff6=a299_0x565b99;if(Array[_0x319ff6(0x182)](_0x21e025)){_0x21e025['forEach']((_0x41155f,_0x155979)=>removeEmptyMetadata(_0x41155f,_0x11e373+'['+_0x155979+']',_0x49957e,_0x2b691d));return;}if(!isRecord(_0x21e025))return;for(const [_0x439f1f,_0x555878]of Object[_0x319ff6(0x1b8)](_0x21e025)){const _0x45c19d=_0x11e373+'.'+_0x439f1f;if(_0x439f1f===_0x319ff6(0x141)&&isEmptyJsonValue(_0x555878)){delete _0x21e025[_0x439f1f],_0x2b691d[_0x319ff6(0x13a)](_0x45c19d),_0x49957e[_0x319ff6(0x13a)]({'code':_0x319ff6(0x16f),'path':_0x45c19d,'message':_0x45c19d+_0x319ff6(0x159)});continue;}removeEmptyMetadata(_0x555878,_0x45c19d,_0x49957e,_0x2b691d);}}function isEmptyJsonValue(_0x6d9f98){const _0x34adcf=a299_0x565b99;if(_0x6d9f98===null||_0x6d9f98===undefined)return!![];if(typeof _0x6d9f98===_0x34adcf(0x21b))return _0x6d9f98[_0x34adcf(0x201)]()==='';if(Array[_0x34adcf(0x182)](_0x6d9f98))return _0x6d9f98[_0x34adcf(0x10e)]===0x0;return isRecord(_0x6d9f98)&&Object[_0x34adcf(0x21c)](_0x6d9f98)['length']===0x0;}function isRecord(_0x2f178f){const _0x33cdc1=a299_0x565b99;return typeof _0x2f178f===_0x33cdc1(0x1e4)&&_0x2f178f!==null&&!Array[_0x33cdc1(0x182)](_0x2f178f);}function cloneJsonValue(_0x4a1d1e){const _0x3dc927=a299_0x565b99;return JSON[_0x3dc927(0x12d)](JSON[_0x3dc927(0x150)](_0x4a1d1e));}export async function readFlowConfigFile(_0x489cf8){const _0x115f3b=a299_0x565b99,_0x436fde=await readFile(resolve(_0x489cf8),_0x115f3b(0x153));return JSON['parse'](_0x436fde);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a300_0xbd3bb0=a300_0xdd20;(function(_0x7c30f9,_0x39c667){const _0xe88ce5=a300_0xdd20,_0x1fd887=_0x7c30f9();while(!![]){try{const _0x58d6c3=parseInt(_0xe88ce5(0x156))/0x1*(parseInt(_0xe88ce5(0x160))/0x2)+-parseInt(_0xe88ce5(0x155))/0x3*(-parseInt(_0xe88ce5(0x151))/0x4)+-parseInt(_0xe88ce5(0x17f))/0x5*(parseInt(_0xe88ce5(0x173))/0x6)+-parseInt(_0xe88ce5(0x167))/0x7*(parseInt(_0xe88ce5(0x166))/0x8)+parseInt(_0xe88ce5(0x15e))/0x9*(-parseInt(_0xe88ce5(0x16f))/0xa)+parseInt(_0xe88ce5(0x15d))/0xb+parseInt(_0xe88ce5(0x14c))/0xc;if(_0x58d6c3===_0x39c667)break;else _0x1fd887['push'](_0x1fd887['shift']());}catch(_0x414409){_0x1fd887['push'](_0x1fd887['shift']());}}}(a300_0x6ba2,0x87ddf));function a300_0xdd20(_0x38e5fd,_0x4f6502){_0x38e5fd=_0x38e5fd-0x146;const _0x6ba2e7=a300_0x6ba2();let _0xdd20fe=_0x6ba2e7[_0x38e5fd];return _0xdd20fe;}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='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0xbd3bb0(0x149);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x67040,_0x76e003,_0x226f92){return new CliError(_0x67040,0x1,_0x76e003,_0x226f92);}export function loadInstantApiPolicyLocalConfig(_0x44825f,_0x5e017c){assertSafeAppCode(_0x44825f);const _0x5eaf64=resolve(_0x5e017c??findProjectRootDirectory()),_0x5d985d=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x44825f+'/'+INSTANT_API_POLICY_FILE_NAME,_0x227a50=resolve(_0x5eaf64,INSTANT_API_POLICY_RELATIVE_ROOT,_0x44825f),_0x4bc258=resolve(_0x227a50,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x5eaf64,'appCode':_0x44825f,'policyRoot':_0x227a50,'policyFilePath':_0x4bc258,'policyRelativePath':_0x5d985d};}export function createDefaultInstantApiPolicyConfig(_0x4d091a,_0x38d7ec='allow'){return assertSafeAppCode(_0x4d091a),{'version':'2','appCode':_0x4d091a,'defaults':{'instantApi':_0x38d7ec},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0xc8c009){const _0xbfa5e2=a300_0xbd3bb0;let _0x38c04e;try{_0x38c04e=await stat(_0xc8c009[_0xbfa5e2(0x15b)]);}catch(_0x462681){throw instantApiPolicyError(_0xbfa5e2(0x168),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0xc8c009[_0xbfa5e2(0x15b)],_0xbfa5e2(0x154));}if(!_0x38c04e[_0xbfa5e2(0x169)]())throw instantApiPolicyError(_0xbfa5e2(0x178),_0xbfa5e2(0x14d)+_0xc8c009[_0xbfa5e2(0x15b)]);if(_0x38c04e[_0xbfa5e2(0x159)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xbfa5e2(0x177),_0xbfa5e2(0x14a));let _0x215710;try{_0x215710=await readFile(_0xc8c009[_0xbfa5e2(0x15b)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0xc8c009[_0xbfa5e2(0x15b)]);}if(_0x215710[_0xbfa5e2(0x153)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xbfa5e2(0x177),_0xbfa5e2(0x14a));let _0x1e8846;try{_0x1e8846=new TextDecoder(_0xbfa5e2(0x181),{'fatal':!![],'ignoreBOM':!![]})[_0xbfa5e2(0x150)](_0x215710);}catch{throw instantApiPolicyError(_0xbfa5e2(0x178),_0xbfa5e2(0x146)+_0xc8c009['policyFilePath']);}let _0x3108b0;try{_0x3108b0=JSON[_0xbfa5e2(0x182)](_0x1e8846);}catch{throw instantApiPolicyError(_0xbfa5e2(0x170),_0xbfa5e2(0x179)+_0xc8c009[_0xbfa5e2(0x15b)]);}return assertLocalPolicyContract(_0x3108b0,_0xc8c009[_0xbfa5e2(0x14e)]);}export async function writeInstantApiPolicyConfigFile(_0x114baa,_0x450875,_0x20fa3d={}){const _0x525bed=a300_0xbd3bb0,_0x3a9525=assertLocalPolicyContract(_0x450875,_0x114baa[_0x525bed(0x14e)]),_0x42b359=JSON[_0x525bed(0x16d)](_0x3a9525,null,0x2)+'\x0a';if(Buffer[_0x525bed(0x153)](_0x42b359,'utf8')>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x525bed(0x177),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x114baa[_0x525bed(0x157)],{'recursive':!![]});let _0x5358a4;try{_0x5358a4=await readFile(_0x114baa['policyFilePath'],'utf8');}catch(_0x15e8a2){if(!isMissingFile(_0x15e8a2))throw instantApiPolicyError(_0x525bed(0x16e),_0x525bed(0x15a)+_0x114baa[_0x525bed(0x15b)]);}if(_0x5358a4===_0x42b359)return{'action':_0x525bed(0x15f),'filePath':_0x114baa[_0x525bed(0x15b)]};if(_0x5358a4!==undefined&&!_0x20fa3d['force'])throw instantApiPolicyError(_0x525bed(0x17c),'Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x114baa[_0x525bed(0x15b)],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x5358a4===undefined)try{return await writeFile(_0x114baa[_0x525bed(0x15b)],_0x42b359,{'encoding':_0x525bed(0x147),'flag':'wx'}),{'action':_0x525bed(0x16b),'filePath':_0x114baa[_0x525bed(0x15b)]};}catch(_0x1779e4){if(!isAlreadyExists(_0x1779e4))throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x525bed(0x16a)+_0x114baa[_0x525bed(0x15b)]);if(!_0x20fa3d['force'])throw instantApiPolicyError(_0x525bed(0x17c),_0x525bed(0x165)+_0x114baa[_0x525bed(0x15b)],_0x525bed(0x17d));}const _0x1b9c22=resolve(dirname(_0x114baa[_0x525bed(0x15b)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x525bed(0x148));try{await writeFile(_0x1b9c22,_0x42b359,{'encoding':'utf8','flag':'wx'}),await rename(_0x1b9c22,_0x114baa['policyFilePath']);}catch{await unlink(_0x1b9c22)['catch'](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x114baa[_0x525bed(0x15b)]);}return{'action':_0x525bed(0x163),'filePath':_0x114baa['policyFilePath']};}function assertSafeAppCode(_0x5d9500){const _0x57a0f4=a300_0xbd3bb0,_0x40e696=_0x5d9500[_0x57a0f4(0x15c)]();if(!_0x40e696||_0x40e696!==_0x5d9500||_0x40e696[_0x57a0f4(0x164)]>0x64||_0x40e696==='.'||_0x40e696==='..'||_0x40e696['includes']('/')||_0x40e696['includes']('\x5c')||_0x40e696['includes']('\x00'))throw instantApiPolicyError(_0x57a0f4(0x16c),_0x57a0f4(0x152));}function assertLocalPolicyContract(_0xc91963,_0x2e18f5){const _0xf42246=a300_0xbd3bb0;if(!isObject(_0xc91963))throw instantApiPolicyError(_0xf42246(0x170),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0xc91963['version']!=='1'&&_0xc91963[_0xf42246(0x171)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0xf42246(0x175),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0xc91963[_0xf42246(0x14e)]!==_0x2e18f5)throw instantApiPolicyError(_0xf42246(0x158),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x2e18f5+'.');if(!isObject(_0xc91963[_0xf42246(0x174)])||typeof _0xc91963[_0xf42246(0x174)][_0xf42246(0x17a)]!==_0xf42246(0x17b))throw instantApiPolicyError(_0xf42246(0x176),'Policy\x20defaults.instantApi\x20is\x20required.');if(_0xc91963[_0xf42246(0x162)]!==undefined&&_0xc91963[_0xf42246(0x162)]!==null&&!Array[_0xf42246(0x172)](_0xc91963['rules']))throw instantApiPolicyError(_0xf42246(0x14f),_0xf42246(0x17e));return _0xc91963;}function isObject(_0x25d2c6){const _0x295091=a300_0xbd3bb0;return _0x25d2c6!==null&&typeof _0x25d2c6===_0x295091(0x14b)&&!Array['isArray'](_0x25d2c6);}function isMissingFile(_0x11d285){const _0xc53de0=a300_0xbd3bb0;return Boolean(_0x11d285&&typeof _0x11d285==='object'&&_0x11d285[_0xc53de0(0x161)]===_0xc53de0(0x183));}function a300_0x6ba2(){const _0x2d3326=['policyRoot','instant_api_policy_app_code_mismatch','size','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','policyFilePath','trim','7339827YYeYlw','47673sZQVrs','unchanged','1100402eLFArB','code','rules','overwritten','length','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','40808JixVxz','427RHQntZ','instant_api_policy_file_missing','isFile','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','created','instant_api_policy_app_code_invalid','stringify','instant_api_policy_file_unreadable','1650ocehty','instant_api_policy_json_invalid','version','isArray','30Glismp','defaults','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_defaults_invalid','instant_api_policy_file_too_large','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instantApi','string','instant_api_policy_file_exists','Review\x20the\x20file\x20before\x20retrying.','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','71145oSozSe','EEXIST','utf-8','parse','ENOENT','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','utf8','.tmp','policy.json','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','object','2283000TakKCC','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','appCode','instant_api_policy_rules_invalid','decode','1620456WsbpmD','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','byteLength','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','3VbNglG','1lLigEF'];a300_0x6ba2=function(){return _0x2d3326;};return a300_0x6ba2();}function isAlreadyExists(_0xedd5b1){const _0x2909b0=a300_0xbd3bb0;return Boolean(_0xedd5b1&&typeof _0xedd5b1===_0x2909b0(0x14b)&&_0xedd5b1[_0x2909b0(0x161)]===_0x2909b0(0x180));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a300_0x7e2592=a300_0x4b16;(function(_0x4fc064,_0x449bef){const _0x20e34f=a300_0x4b16,_0x479c71=_0x4fc064();while(!![]){try{const _0x2689a6=parseInt(_0x20e34f(0xd3))/0x1+-parseInt(_0x20e34f(0x10c))/0x2+parseInt(_0x20e34f(0xf8))/0x3+-parseInt(_0x20e34f(0x10a))/0x4*(parseInt(_0x20e34f(0xf9))/0x5)+-parseInt(_0x20e34f(0xfb))/0x6+parseInt(_0x20e34f(0x11c))/0x7*(parseInt(_0x20e34f(0xd7))/0x8)+parseInt(_0x20e34f(0xe3))/0x9;if(_0x2689a6===_0x449bef)break;else _0x479c71['push'](_0x479c71['shift']());}catch(_0x89eac3){_0x479c71['push'](_0x479c71['shift']());}}}(a300_0x1cc8,0x274c5));function a300_0x1cc8(){const _0x60e778=['json','length','scope','POST','total','607464QSFSMe','362980rAWvTZ','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','523344BJTlat','validation','content-type','isSafeInteger','get','timingsMs','no-store','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','schemaVersion','apiError','/v2/development/apps/','strategyFingerprint','revision','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','hits','16sVqCLk','rank','415082USJNJc','TimeoutError','cli:rabetbase','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','stringify','timeout','application/json','Knowledge\x20search\x20appCode\x20is\x20required.','topK','isFinite','https:','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','AbortError','toLowerCase','string','Knowledge\x20search\x20cancelled.','8701LBfpst','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','tags','/knowledge/search','origin','Knowledge\x20search\x20query\x20is\x20required.','search','hash','appCode','object','text','signal','authRequired','cookie','248472ScamAx','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','isArray','chunkId','1384QXFPGd','scoreKind','trim','entries','score','response','documentId','status','hits[','protocol','networkError','cache-control','721035CYSqPM','aborted','rawScore','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','development','split','headers','name','test','serviceUrl','finalScore','pathname','map','some','sort','title'];a300_0x1cc8=function(){return _0x60e778;};return a300_0x1cc8();}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a300_0x7e2592(0x103),'profile',a300_0x7e2592(0xf7),a300_0x7e2592(0x109),a300_0x7e2592(0x106),a300_0x7e2592(0x100)],HIT_KEYS=['documentId','revision','chunkId',a300_0x7e2592(0xf5),a300_0x7e2592(0xf2),a300_0x7e2592(0xcf),a300_0x7e2592(0x11e),'rank',a300_0x7e2592(0xe5),a300_0x7e2592(0xed),'scoreKind'];export function normalizeKbServiceOrigin(_0x19abe9){const _0x16ff53=a300_0x7e2592,_0x47095c=()=>CliErrors['validation']('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0x5c9a37=_0x19abe9?.[_0x16ff53(0xd9)]();if(!_0x5c9a37||/[\u0000-\u0020\u007f]/['test'](_0x5c9a37)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x16ff53(0xeb)](_0x5c9a37))throw _0x47095c();let _0x18fe06;try{_0x18fe06=new URL(_0x5c9a37);}catch{throw _0x47095c();}if(_0x18fe06[_0x16ff53(0xe0)]!==_0x16ff53(0x116)||!_0x18fe06['hostname']||_0x18fe06['username']||_0x18fe06['password']||_0x18fe06[_0x16ff53(0xee)]!=='/'||_0x18fe06[_0x16ff53(0x122)]||_0x18fe06[_0x16ff53(0xcc)])throw _0x47095c();return _0x18fe06[_0x16ff53(0x120)];}function a300_0x4b16(_0x154d1b,_0x233706){_0x154d1b=_0x154d1b-0xcc;const _0x1cc8fe=a300_0x1cc8();let _0x4b163b=_0x1cc8fe[_0x154d1b];return _0x4b163b;}export async function searchDirectKnowledge(_0x440807){const _0x6db7b5=a300_0x7e2592,_0xa9504b=_0x440807[_0x6db7b5(0xcd)]['trim'](),_0x5067fa=_0x440807['query']['trim']();if(!_0xa9504b)throw CliErrors[_0x6db7b5(0xfc)](_0x6db7b5(0x113));if(!_0x440807[_0x6db7b5(0xd2)]['trim']())throw CliErrors['authRequired']();if(!_0x5067fa)throw CliErrors['validation'](_0x6db7b5(0x121));validateTopK(_0x440807[_0x6db7b5(0x114)]);const _0x50e988=normalizeKbServiceOrigin(_0x440807[_0x6db7b5(0xec)]),_0x2c1262=AbortSignal[_0x6db7b5(0x111)](0xea60),_0x12e217=_0x440807[_0x6db7b5(0xd0)]?AbortSignal['any']([_0x440807[_0x6db7b5(0xd0)],_0x2c1262]):_0x2c1262;let _0x44886d;try{_0x44886d=await fetch(_0x50e988+_0x6db7b5(0x105)+encodeURIComponent(_0xa9504b)+_0x6db7b5(0x11f),{'method':_0x6db7b5(0xf6),'redirect':'error','headers':{'Content-Type':_0x6db7b5(0x112),'Cookie':_0x440807['cookie'],'X-Invoke-Source':_0x6db7b5(0x10e)},'body':JSON[_0x6db7b5(0x110)]({'query':_0x5067fa,..._0x440807[_0x6db7b5(0x114)]!==undefined?{'topK':_0x440807[_0x6db7b5(0x114)]}:{}}),'signal':_0x12e217});}catch(_0x2bb589){if(_0x440807[_0x6db7b5(0xd0)]?.[_0x6db7b5(0xe4)])throw new DOMException(_0x6db7b5(0x11b),_0x6db7b5(0x118));if(_0x2bb589 instanceof Error&&_0x2bb589[_0x6db7b5(0xea)]===_0x6db7b5(0x10d))throw CliErrors[_0x6db7b5(0xe1)](_0x6db7b5(0x108));throw CliErrors[_0x6db7b5(0xe1)]('KB\x20Service\x20knowledge\x20search\x20request\x20failed.');}if(_0x44886d[_0x6db7b5(0xde)]===0x191)throw CliErrors[_0x6db7b5(0xd1)]();if(_0x44886d[_0x6db7b5(0xde)]===0x1ad)throw CliErrors[_0x6db7b5(0x104)](_0x6db7b5(0xfa));if(!_0x44886d['ok'])throw CliErrors[_0x6db7b5(0x104)](_0x6db7b5(0x11d)+_0x44886d[_0x6db7b5(0xde)]+').');if(!hasNoStore(_0x44886d['headers']))throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x44886d[_0x6db7b5(0xe9)]['get'](_0x6db7b5(0xfd))??'')['toLowerCase']()['includes']('application/json'))throw CliErrors['apiError'](_0x6db7b5(0x102));let _0x12475a;try{_0x12475a=await _0x44886d[_0x6db7b5(0xf3)]();}catch(_0x165323){if(_0x440807[_0x6db7b5(0xd0)]?.[_0x6db7b5(0xe4)])throw new DOMException(_0x6db7b5(0x11b),_0x6db7b5(0x118));if(_0x2c1262[_0x6db7b5(0xe4)]||_0x165323 instanceof Error&&_0x165323[_0x6db7b5(0xea)]===_0x6db7b5(0x10d))throw CliErrors[_0x6db7b5(0xe1)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x6db7b5(0x104)](_0x6db7b5(0xd4));}try{const _0x490a83=requireExactRecord(_0x12475a,['hits',_0x6db7b5(0x106),_0x6db7b5(0x100)],_0x6db7b5(0xdc));if(!Array[_0x6db7b5(0xd5)](_0x490a83['hits']))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':'development','total':_0x490a83['hits']['length'],'hits':_0x490a83['hits'],'strategyFingerprint':_0x490a83[_0x6db7b5(0x106)],'timingsMs':_0x490a83['timingsMs']},_0x440807[_0x6db7b5(0x114)]??0xa);}catch(_0x23896d){if(_0x23896d instanceof CliError)throw CliErrors['apiError'](_0x6db7b5(0x10f));throw _0x23896d;}}function validateTopK(_0x1d77fe){const _0x2595c0=a300_0x7e2592;if(_0x1d77fe!==undefined&&(!Number['isSafeInteger'](_0x1d77fe)||_0x1d77fe<0x1||_0x1d77fe>0x32))throw CliErrors['validation'](_0x2595c0(0xe6));}function hasNoStore(_0x47a7ad){const _0x5d556f=a300_0x7e2592;return(_0x47a7ad[_0x5d556f(0xff)](_0x5d556f(0xe2))??'')[_0x5d556f(0xe8)](',')['some'](_0x3fd289=>_0x3fd289['trim']()[_0x5d556f(0x119)]()===_0x5d556f(0x101));}function parseDevelopmentSearchResponse(_0x20ab9e,_0x38c4fd){const _0x435378=a300_0x7e2592,_0x3e88b0=requireExactRecord(_0x20ab9e,RESPONSE_KEYS,_0x435378(0xdc));if(_0x3e88b0[_0x435378(0x103)]!==0x2||_0x3e88b0['profile']!==_0x435378(0xe7))throw invalidContract('profile');if(!Array[_0x435378(0xd5)](_0x3e88b0['hits'])||_0x3e88b0['hits'][_0x435378(0xf4)]>(_0x38c4fd??0x32))throw invalidContract('hits');if(typeof _0x3e88b0['strategyFingerprint']!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x435378(0xeb)](_0x3e88b0[_0x435378(0x106)]))throw invalidContract(_0x435378(0x106));const _0x3a426f=requireRecord(_0x3e88b0[_0x435378(0x100)],_0x435378(0x100)),_0x57cca5={};for(const [_0x4be520,_0x7ec717]of Object[_0x435378(0xda)](_0x3a426f)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x435378(0xeb)](_0x4be520)||typeof _0x7ec717!=='number'||!Number[_0x435378(0x115)](_0x7ec717)||_0x7ec717<0x0)throw invalidContract('timingsMs');_0x57cca5[_0x4be520]=_0x7ec717;}const _0xcb4e89=_0x3e88b0[_0x435378(0x109)][_0x435378(0xef)]((_0x383390,_0x3caf9a)=>parseHit(_0x383390,_0x3caf9a));if(!Number[_0x435378(0xfe)](_0x3e88b0['total'])||_0x3e88b0[_0x435378(0xf7)]!==_0xcb4e89['length'])throw invalidContract(_0x435378(0xf7));return{'schemaVersion':_0x3e88b0['schemaVersion'],'profile':_0x3e88b0['profile'],'total':_0x3e88b0['total'],'strategyFingerprint':_0x3e88b0['strategyFingerprint'],'timingsMs':_0x57cca5,'hits':_0xcb4e89};}function parseHit(_0x4db547,_0x17acb2){const _0xc96500=a300_0x7e2592,_0x3fdf27=requireExactRecord(_0x4db547,HIT_KEYS,_0xc96500(0xdf)+_0x17acb2+']'),_0x4a6e81=_0x315cc3=>{const _0x2f56f7=_0xc96500,_0x20530e=_0x3fdf27[_0x315cc3];if(typeof _0x20530e!==_0x2f56f7(0x11a)||!_0x20530e)throw invalidContract(_0x315cc3);return _0x20530e;};if(!Number[_0xc96500(0xfe)](_0x3fdf27[_0xc96500(0x107)])||_0x3fdf27[_0xc96500(0x107)]<0x1)throw invalidContract(_0xc96500(0x107));if(_0x3fdf27['scope']!=='public'&&_0x3fdf27['scope']!=='company')throw invalidContract(_0xc96500(0xf5));if(typeof _0x3fdf27['title']!=='string'||typeof _0x3fdf27['text']!==_0xc96500(0x11a))throw invalidContract(_0xc96500(0xcf));if(!Array[_0xc96500(0xd5)](_0x3fdf27[_0xc96500(0x11e)])||_0x3fdf27['tags'][_0xc96500(0xf0)](_0x527e6b=>typeof _0x527e6b!==_0xc96500(0x11a)))throw invalidContract(_0xc96500(0x11e));if(!Number['isSafeInteger'](_0x3fdf27[_0xc96500(0x10b)])||_0x3fdf27[_0xc96500(0x10b)]!==_0x17acb2+0x1)throw invalidContract(_0xc96500(0x10b));if(!isFiniteNumber(_0x3fdf27[_0xc96500(0xe5)])||!isFiniteNumber(_0x3fdf27[_0xc96500(0xed)]))throw invalidContract(_0xc96500(0xdb));return{'documentId':_0x4a6e81(_0xc96500(0xdd)),'revision':_0x3fdf27[_0xc96500(0x107)],'chunkId':_0x4a6e81(_0xc96500(0xd6)),'scope':_0x3fdf27[_0xc96500(0xf5)],'title':_0x3fdf27[_0xc96500(0xf2)],'text':_0x3fdf27[_0xc96500(0xcf)],'tags':[..._0x3fdf27[_0xc96500(0x11e)]],'rank':_0x3fdf27[_0xc96500(0x10b)],'rawScore':_0x3fdf27[_0xc96500(0xe5)],'finalScore':_0x3fdf27[_0xc96500(0xed)],'scoreKind':_0x4a6e81(_0xc96500(0xd8))};}function requireExactRecord(_0x146fde,_0x23fa2b,_0x50dda7){const _0x39b782=a300_0x7e2592,_0x382fde=requireRecord(_0x146fde,_0x50dda7),_0x6b71f4=Object['keys'](_0x382fde)[_0x39b782(0xf1)](),_0x590364=[..._0x23fa2b][_0x39b782(0xf1)]();if(_0x6b71f4['length']!==_0x590364[_0x39b782(0xf4)]||_0x6b71f4[_0x39b782(0xf0)]((_0x93e8c0,_0x3341ac)=>_0x93e8c0!==_0x590364[_0x3341ac]))throw invalidContract(_0x50dda7);return _0x382fde;}function requireRecord(_0x506b00,_0x8b457){const _0x376050=a300_0x7e2592;if(!_0x506b00||typeof _0x506b00!==_0x376050(0xce)||Array[_0x376050(0xd5)](_0x506b00))throw invalidContract(_0x8b457);return _0x506b00;}function isFiniteNumber(_0x4a6432){const _0x576457=a300_0x7e2592;return typeof _0x4a6432==='number'&&Number[_0x576457(0x115)](_0x4a6432);}function invalidContract(_0x1c7bd8){const _0x299ab6=a300_0x7e2592;return CliErrors['apiError'](_0x299ab6(0x117)+_0x1c7bd8+'\x20contract.');}
|
|
1
|
+
const a301_0x113ba7=a301_0x2606;(function(_0x1521b8,_0x327e40){const _0x3d2cf8=a301_0x2606,_0x5dbefc=_0x1521b8();while(!![]){try{const _0x4da2d5=-parseInt(_0x3d2cf8(0x1be))/0x1*(-parseInt(_0x3d2cf8(0x17b))/0x2)+-parseInt(_0x3d2cf8(0x197))/0x3+-parseInt(_0x3d2cf8(0x18b))/0x4*(parseInt(_0x3d2cf8(0x1a8))/0x5)+parseInt(_0x3d2cf8(0x1a9))/0x6*(-parseInt(_0x3d2cf8(0x19a))/0x7)+-parseInt(_0x3d2cf8(0x183))/0x8+-parseInt(_0x3d2cf8(0x1c2))/0x9*(parseInt(_0x3d2cf8(0x1ce))/0xa)+-parseInt(_0x3d2cf8(0x179))/0xb*(-parseInt(_0x3d2cf8(0x1b2))/0xc);if(_0x4da2d5===_0x327e40)break;else _0x5dbefc['push'](_0x5dbefc['shift']());}catch(_0x59b09e){_0x5dbefc['push'](_0x5dbefc['shift']());}}}(a301_0x22e4,0xa6df3));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=['schemaVersion',a301_0x113ba7(0x19d),a301_0x113ba7(0x1ac),a301_0x113ba7(0x1a4),a301_0x113ba7(0x194),a301_0x113ba7(0x193)],HIT_KEYS=[a301_0x113ba7(0x184),a301_0x113ba7(0x1c3),a301_0x113ba7(0x1ba),a301_0x113ba7(0x191),'title',a301_0x113ba7(0x19c),a301_0x113ba7(0x182),'rank',a301_0x113ba7(0x18f),'finalScore',a301_0x113ba7(0x192)];function a301_0x22e4(){const _0x1aabfe=['2670ZDbPpX','company','schemaVersion','password','Knowledge\x20search\x20cancelled.','trim','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','hostname','/v2/development/apps/','length','64361aGqvwo','hash','1052322kEqcQf','signal','\x20contract.','response','number','AbortError','split','tags','2384080UKarIL','documentId','sort','keys','map','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','name','isSafeInteger','36guCDdp','appCode','cookie','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','rawScore','rank','scope','scoreKind','timingsMs','strategyFingerprint','https:','topK','1735380dAsxvI','cli:rabetbase','finalScore','35Zysfjp','/knowledge/search','text','profile','score','no-store','authRequired','toLowerCase','Knowledge\x20search\x20appCode\x20is\x20required.','validation','hits','TimeoutError','json','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','307655OQukUX','1295166FKHVvf','string','timeout','total','stringify','POST','some','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','error','4632GqDDoT','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','isArray','status','headers','application/json','networkError','title','chunkId','query','apiError','protocol','2ErmTuY','test','isFinite','Knowledge\x20search\x20query\x20is\x20required.','3969LlptPj','revision','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','search','entries','pathname','serviceUrl','content-type','hits[','aborted','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','development'];a301_0x22e4=function(){return _0x1aabfe;};return a301_0x22e4();}export function normalizeKbServiceOrigin(_0x32899f){const _0x244f7e=a301_0x113ba7,_0x2ad3d7=()=>CliErrors['validation'](_0x244f7e(0x1b3)),_0x11c334=_0x32899f?.[_0x244f7e(0x1d3)]();if(!_0x11c334||/[\u0000-\u0020\u007f]/[_0x244f7e(0x1bf)](_0x11c334)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x244f7e(0x1bf)](_0x11c334))throw _0x2ad3d7();let _0x1455fe;try{_0x1455fe=new URL(_0x11c334);}catch{throw _0x2ad3d7();}if(_0x1455fe[_0x244f7e(0x1bd)]!==_0x244f7e(0x195)||!_0x1455fe[_0x244f7e(0x1d5)]||_0x1455fe['username']||_0x1455fe[_0x244f7e(0x1d1)]||_0x1455fe[_0x244f7e(0x1c7)]!=='/'||_0x1455fe[_0x244f7e(0x1c5)]||_0x1455fe[_0x244f7e(0x17a)])throw _0x2ad3d7();return _0x1455fe['origin'];}export async function searchDirectKnowledge(_0x5e3db5){const _0x4df210=a301_0x113ba7,_0x2efe7d=_0x5e3db5[_0x4df210(0x18c)][_0x4df210(0x1d3)](),_0x714d1f=_0x5e3db5[_0x4df210(0x1bb)][_0x4df210(0x1d3)]();if(!_0x2efe7d)throw CliErrors[_0x4df210(0x1a3)](_0x4df210(0x1a2));if(!_0x5e3db5[_0x4df210(0x18d)][_0x4df210(0x1d3)]())throw CliErrors['authRequired']();if(!_0x714d1f)throw CliErrors[_0x4df210(0x1a3)](_0x4df210(0x1c1));validateTopK(_0x5e3db5[_0x4df210(0x196)]);const _0x106c8f=normalizeKbServiceOrigin(_0x5e3db5[_0x4df210(0x1c8)]),_0x414c18=AbortSignal[_0x4df210(0x1ab)](0xea60),_0x26b918=_0x5e3db5[_0x4df210(0x17c)]?AbortSignal['any']([_0x5e3db5[_0x4df210(0x17c)],_0x414c18]):_0x414c18;let _0x64e95;try{_0x64e95=await fetch(_0x106c8f+_0x4df210(0x1d6)+encodeURIComponent(_0x2efe7d)+_0x4df210(0x19b),{'method':_0x4df210(0x1ae),'redirect':_0x4df210(0x1b1),'headers':{'Content-Type':_0x4df210(0x1b7),'Cookie':_0x5e3db5['cookie'],'X-Invoke-Source':_0x4df210(0x198)},'body':JSON[_0x4df210(0x1ad)]({'query':_0x714d1f,..._0x5e3db5['topK']!==undefined?{'topK':_0x5e3db5[_0x4df210(0x196)]}:{}}),'signal':_0x26b918});}catch(_0x514851){if(_0x5e3db5[_0x4df210(0x17c)]?.[_0x4df210(0x1cb)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x4df210(0x180));if(_0x514851 instanceof Error&&_0x514851[_0x4df210(0x189)]==='TimeoutError')throw CliErrors[_0x4df210(0x1b8)](_0x4df210(0x188));throw CliErrors['networkError'](_0x4df210(0x1d4));}if(_0x64e95[_0x4df210(0x1b5)]===0x191)throw CliErrors[_0x4df210(0x1a0)]();if(_0x64e95[_0x4df210(0x1b5)]===0x1ad)throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x64e95['ok'])throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x18e)+_0x64e95[_0x4df210(0x1b5)]+').');if(!hasNoStore(_0x64e95[_0x4df210(0x1b6)]))throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x64e95['headers']['get'](_0x4df210(0x1c9))??'')[_0x4df210(0x1a1)]()['includes']('application/json'))throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x1b0));let _0x3607d0;try{_0x3607d0=await _0x64e95[_0x4df210(0x1a6)]();}catch(_0x2fca33){if(_0x5e3db5['signal']?.['aborted'])throw new DOMException(_0x4df210(0x1d2),_0x4df210(0x180));if(_0x414c18[_0x4df210(0x1cb)]||_0x2fca33 instanceof Error&&_0x2fca33[_0x4df210(0x189)]===_0x4df210(0x1a5))throw CliErrors[_0x4df210(0x1b8)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x40621d=requireExactRecord(_0x3607d0,[_0x4df210(0x1a4),_0x4df210(0x194),'timingsMs'],_0x4df210(0x17e));if(!Array['isArray'](_0x40621d[_0x4df210(0x1a4)]))throw invalidContract(_0x4df210(0x1a4));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':'development','total':_0x40621d[_0x4df210(0x1a4)][_0x4df210(0x1d7)],'hits':_0x40621d[_0x4df210(0x1a4)],'strategyFingerprint':_0x40621d[_0x4df210(0x194)],'timingsMs':_0x40621d[_0x4df210(0x193)]},_0x5e3db5[_0x4df210(0x196)]??0xa);}catch(_0x27152f){if(_0x27152f instanceof CliError)throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x1a7));throw _0x27152f;}}function validateTopK(_0x29ab56){const _0x404c41=a301_0x113ba7;if(_0x29ab56!==undefined&&(!Number[_0x404c41(0x18a)](_0x29ab56)||_0x29ab56<0x1||_0x29ab56>0x32))throw CliErrors[_0x404c41(0x1a3)](_0x404c41(0x1cc));}function hasNoStore(_0x1d730f){const _0x348f69=a301_0x113ba7;return(_0x1d730f['get']('cache-control')??'')[_0x348f69(0x181)](',')[_0x348f69(0x1af)](_0x32e88d=>_0x32e88d['trim']()[_0x348f69(0x1a1)]()===_0x348f69(0x19f));}function parseDevelopmentSearchResponse(_0x4225d9,_0x50ff24){const _0x44f43c=a301_0x113ba7,_0x4d00d2=requireExactRecord(_0x4225d9,RESPONSE_KEYS,_0x44f43c(0x17e));if(_0x4d00d2[_0x44f43c(0x1d0)]!==0x2||_0x4d00d2[_0x44f43c(0x19d)]!==_0x44f43c(0x1cd))throw invalidContract(_0x44f43c(0x19d));if(!Array[_0x44f43c(0x1b4)](_0x4d00d2[_0x44f43c(0x1a4)])||_0x4d00d2[_0x44f43c(0x1a4)][_0x44f43c(0x1d7)]>(_0x50ff24??0x32))throw invalidContract(_0x44f43c(0x1a4));if(typeof _0x4d00d2[_0x44f43c(0x194)]!==_0x44f43c(0x1aa)||!/^sha256:[0-9a-f]{64}$/[_0x44f43c(0x1bf)](_0x4d00d2[_0x44f43c(0x194)]))throw invalidContract('strategyFingerprint');const _0x117873=requireRecord(_0x4d00d2[_0x44f43c(0x193)],_0x44f43c(0x193)),_0x50d0c4={};for(const [_0x3a8ae1,_0xdd89c0]of Object[_0x44f43c(0x1c6)](_0x117873)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x44f43c(0x1bf)](_0x3a8ae1)||typeof _0xdd89c0!=='number'||!Number[_0x44f43c(0x1c0)](_0xdd89c0)||_0xdd89c0<0x0)throw invalidContract(_0x44f43c(0x193));_0x50d0c4[_0x3a8ae1]=_0xdd89c0;}const _0x117756=_0x4d00d2[_0x44f43c(0x1a4)][_0x44f43c(0x187)]((_0x5cadf3,_0x33ed42)=>parseHit(_0x5cadf3,_0x33ed42));if(!Number['isSafeInteger'](_0x4d00d2[_0x44f43c(0x1ac)])||_0x4d00d2[_0x44f43c(0x1ac)]!==_0x117756['length'])throw invalidContract(_0x44f43c(0x1ac));return{'schemaVersion':_0x4d00d2[_0x44f43c(0x1d0)],'profile':_0x4d00d2['profile'],'total':_0x4d00d2[_0x44f43c(0x1ac)],'strategyFingerprint':_0x4d00d2['strategyFingerprint'],'timingsMs':_0x50d0c4,'hits':_0x117756};}function parseHit(_0x3a7418,_0x6b986b){const _0x4bafbd=a301_0x113ba7,_0x15f4c2=requireExactRecord(_0x3a7418,HIT_KEYS,_0x4bafbd(0x1ca)+_0x6b986b+']'),_0x389c2f=_0x1276bb=>{const _0x12e911=_0x4bafbd,_0x1567a2=_0x15f4c2[_0x1276bb];if(typeof _0x1567a2!==_0x12e911(0x1aa)||!_0x1567a2)throw invalidContract(_0x1276bb);return _0x1567a2;};if(!Number[_0x4bafbd(0x18a)](_0x15f4c2['revision'])||_0x15f4c2['revision']<0x1)throw invalidContract(_0x4bafbd(0x1c3));if(_0x15f4c2[_0x4bafbd(0x191)]!=='public'&&_0x15f4c2['scope']!==_0x4bafbd(0x1cf))throw invalidContract(_0x4bafbd(0x191));if(typeof _0x15f4c2[_0x4bafbd(0x1b9)]!==_0x4bafbd(0x1aa)||typeof _0x15f4c2[_0x4bafbd(0x19c)]!==_0x4bafbd(0x1aa))throw invalidContract(_0x4bafbd(0x19c));if(!Array[_0x4bafbd(0x1b4)](_0x15f4c2[_0x4bafbd(0x182)])||_0x15f4c2[_0x4bafbd(0x182)][_0x4bafbd(0x1af)](_0x414dbc=>typeof _0x414dbc!==_0x4bafbd(0x1aa)))throw invalidContract(_0x4bafbd(0x182));if(!Number['isSafeInteger'](_0x15f4c2[_0x4bafbd(0x190)])||_0x15f4c2[_0x4bafbd(0x190)]!==_0x6b986b+0x1)throw invalidContract(_0x4bafbd(0x190));if(!isFiniteNumber(_0x15f4c2['rawScore'])||!isFiniteNumber(_0x15f4c2['finalScore']))throw invalidContract(_0x4bafbd(0x19e));return{'documentId':_0x389c2f('documentId'),'revision':_0x15f4c2[_0x4bafbd(0x1c3)],'chunkId':_0x389c2f(_0x4bafbd(0x1ba)),'scope':_0x15f4c2[_0x4bafbd(0x191)],'title':_0x15f4c2['title'],'text':_0x15f4c2[_0x4bafbd(0x19c)],'tags':[..._0x15f4c2[_0x4bafbd(0x182)]],'rank':_0x15f4c2['rank'],'rawScore':_0x15f4c2[_0x4bafbd(0x18f)],'finalScore':_0x15f4c2[_0x4bafbd(0x199)],'scoreKind':_0x389c2f(_0x4bafbd(0x192))};}function requireExactRecord(_0x3c3ba1,_0x3cf94c,_0x27c507){const _0x4759dd=a301_0x113ba7,_0x1a0d54=requireRecord(_0x3c3ba1,_0x27c507),_0x184b64=Object[_0x4759dd(0x186)](_0x1a0d54)[_0x4759dd(0x185)](),_0x333b99=[..._0x3cf94c][_0x4759dd(0x185)]();if(_0x184b64[_0x4759dd(0x1d7)]!==_0x333b99['length']||_0x184b64[_0x4759dd(0x1af)]((_0x243058,_0x2b5312)=>_0x243058!==_0x333b99[_0x2b5312]))throw invalidContract(_0x27c507);return _0x1a0d54;}function requireRecord(_0x250856,_0x235000){const _0x1615be=a301_0x113ba7;if(!_0x250856||typeof _0x250856!=='object'||Array[_0x1615be(0x1b4)](_0x250856))throw invalidContract(_0x235000);return _0x250856;}function isFiniteNumber(_0x1b9956){const _0x2818e3=a301_0x113ba7;return typeof _0x1b9956===_0x2818e3(0x17f)&&Number[_0x2818e3(0x1c0)](_0x1b9956);}function a301_0x2606(_0x45e2bc,_0x366347){_0x45e2bc=_0x45e2bc-0x179;const _0x22e4a2=a301_0x22e4();let _0x260633=_0x22e4a2[_0x45e2bc];return _0x260633;}function invalidContract(_0x4b0595){const _0xc984fe=a301_0x113ba7;return CliErrors[_0xc984fe(0x1bc)](_0xc984fe(0x1c4)+_0x4b0595+_0xc984fe(0x17d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1dbb7f,_0x10d7a9){const _0x4d642e=a302_0x4b30,_0x5bcce7=_0x1dbb7f();while(!![]){try{const _0x21ba73=-parseInt(_0x4d642e(0x147))/0x1+parseInt(_0x4d642e(0x13b))/0x2*(-parseInt(_0x4d642e(0x14d))/0x3)+parseInt(_0x4d642e(0x142))/0x4+-parseInt(_0x4d642e(0x13d))/0x5+parseInt(_0x4d642e(0x14b))/0x6+parseInt(_0x4d642e(0x13c))/0x7*(-parseInt(_0x4d642e(0x13f))/0x8)+parseInt(_0x4d642e(0x136))/0x9;if(_0x21ba73===_0x10d7a9)break;else _0x5bcce7['push'](_0x5bcce7['shift']());}catch(_0x1146a8){_0x5bcce7['push'](_0x5bcce7['shift']());}}}(a302_0x4e3f,0xe4151));function a302_0x4b30(_0x4af0a4,_0x9a6712){_0x4af0a4=_0x4af0a4-0x134;const _0x4e3fa1=a302_0x4e3f();let _0x4b306c=_0x4e3fa1[_0x4af0a4];return _0x4b306c;}import{constants}from'node:fs';function a302_0x4e3f(){const _0x4998bd=['page.lock.json','sort','trim','103211mTtFZX','flagMissing','page','.rabetbase','8069316mByNjL','join','3aTzcsQ','name','page-dir','validation','16248789irSVjj','appPagesDir','isDirectory','.json','utf8','181154riRGrn','14HxRFUu','9128995htEQrC','isFile','6896328fZeyWG','Unsupported\x20file\x20in\x20page\x20directory:\x20','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','6110348sTfmFU','F_OK'];a302_0x4e3f=function(){return _0x4998bd;};return a302_0x4e3f();}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(_0xca451,_0x113f33=process['cwd']()){const _0x1ab447=a302_0x4b30,_0x421eaa=resolve(_0x113f33),_0x1288dd=join(_0x421eaa,_0x1ab447(0x14a),_0x1ab447(0x149));return{'projectRoot':_0x421eaa,'pagesBaseDir':_0x1288dd,'appPagesDir':join(_0x1288dd,_0xca451),'lockFilePath':join(_0x421eaa,_0x1ab447(0x14a),_0x1ab447(0x144))};}export function buildPageFileName(_0x1334f5,_0x263b55){const _0x791f46=a302_0x4b30;return _0x1334f5+'-'+_0x263b55['toUpperCase']()+_0x791f46(0x139);}export function resolvePageFilePath(_0x32caae,_0x3a3614,_0x3ca8be){const _0x3bf6be=a302_0x4b30;return join(_0x32caae[_0x3bf6be(0x137)],buildPageFileName(_0x3a3614,_0x3ca8be));}export async function ensureParentDirectory(_0x4fccdb){await mkdir(dirname(_0x4fccdb),{'recursive':!![]});}export async function fileExists(_0x559f7b){const _0x4b3436=a302_0x4b30;try{return await access(_0x559f7b,constants[_0x4b3436(0x143)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x1fdd28){const _0x1b1499=a302_0x4b30,_0x31d9da=_0x1fdd28[_0x1b1499(0x146)]();if(!_0x31d9da)throw CliErrors[_0x1b1499(0x148)](_0x1b1499(0x134));const _0x207d19=resolve(_0x31d9da);let _0x2fa773;try{_0x2fa773=await lstat(_0x207d19);}catch{throw CliErrors['validation']('Page\x20directory\x20not\x20found:\x20'+_0x31d9da);}if(!_0x2fa773[_0x1b1499(0x138)]())throw CliErrors[_0x1b1499(0x135)](_0x1b1499(0x141)+_0x31d9da);const _0x4af35a={};return await readDirectory(_0x207d19,_0x207d19,_0x4af35a),_0x4af35a;}async function readDirectory(_0x99199b,_0x2067cf,_0x54cdca){const _0x45d03d=a302_0x4b30,_0x59c7a9=await readdir(_0x2067cf,{'withFileTypes':!![]});for(const _0x934bd5 of _0x59c7a9[_0x45d03d(0x145)]((_0x5277bc,_0x34bd36)=>_0x5277bc['name']['localeCompare'](_0x34bd36[_0x45d03d(0x14e)]))){const _0x239c5f=join(_0x2067cf,_0x934bd5[_0x45d03d(0x14e)]);if(_0x934bd5[_0x45d03d(0x138)]()){await readDirectory(_0x99199b,_0x239c5f,_0x54cdca);continue;}if(!_0x934bd5[_0x45d03d(0x13e)]())throw CliErrors[_0x45d03d(0x135)](_0x45d03d(0x140)+_0x239c5f);_0x54cdca[relative(_0x99199b,_0x239c5f)['split'](sep)[_0x45d03d(0x14c)]('/')]=await readFile(_0x239c5f,_0x45d03d(0x13a));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x19d710,_0x5e565a){const _0x326549=a303_0x2ddf,_0xa8a041=_0x19d710();while(!![]){try{const _0x34c187=parseInt(_0x326549(0xac))/0x1*(parseInt(_0x326549(0xb0))/0x2)+parseInt(_0x326549(0xab))/0x3+parseInt(_0x326549(0xa7))/0x4*(parseInt(_0x326549(0xa5))/0x5)+parseInt(_0x326549(0xb1))/0x6+parseInt(_0x326549(0xa8))/0x7*(-parseInt(_0x326549(0xaf))/0x8)+-parseInt(_0x326549(0xa4))/0x9*(-parseInt(_0x326549(0xae))/0xa)+-parseInt(_0x326549(0xa9))/0xb*(parseInt(_0x326549(0xa6))/0xc);if(_0x34c187===_0x5e565a)break;else _0xa8a041['push'](_0xa8a041['shift']());}catch(_0x3d4591){_0xa8a041['push'](_0xa8a041['shift']());}}}(a303_0x1985,0x41d39));import a303_0x5144d2 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0xfbf563){const _0x32dab9=a303_0x2ddf;return JSON['stringify'](JSON[_0x32dab9(0xa3)](_0xfbf563),null,0x2)+'\x0a';}function a303_0x2ddf(_0x5eb9c1,_0x3de1db){_0x5eb9c1=_0x5eb9c1-0xa2;const _0x19852e=a303_0x1985();let _0x2ddf74=_0x19852e[_0x5eb9c1];return _0x2ddf74;}export function computePageContentHash(_0x24f92a){const _0x4b039b=a303_0x2ddf;return a303_0x5144d2['createHash'](_0x4b039b(0xad))['update'](_0x24f92a)[_0x4b039b(0xaa)](_0x4b039b(0xa2));}function a303_0x1985(){const _0xff42c5=['27944ZULOer','133030qeyNaC','1569324uFuMrC','hex','parse','218934hTKkSH','25ptFaeO','1034040VFkJXB','2404wXTcrv','14bqgbJq','33EyRKjz','digest','320229JyVoPk','1eIgCZM','md5','40qwfCsT'];a303_0x1985=function(){return _0xff42c5;};return a303_0x1985();}export function computeSerializedSchemaHash(_0x4f1ddf){return computePageContentHash(serializePageSchemaForFile(_0x4f1ddf));}export async function computePageFileHash(_0x161d6e){const _0x52f6f6=await readFile(_0x161d6e,'utf8');return computePageContentHash(_0x52f6f6);}
|