@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.10-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/README.md +1 -1
- 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.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.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 +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a299_0x32ec5c=a299_0x380b;(function(_0x375580,_0x3a2e74){const _0x5592ab=a299_0x380b,_0x240f82=_0x375580();while(!![]){try{const _0x198d58=-parseInt(_0x5592ab(0x1f7))/0x1*(-parseInt(_0x5592ab(0xde))/0x2)+-parseInt(_0x5592ab(0x13b))/0x3+parseInt(_0x5592ab(0x14e))/0x4+parseInt(_0x5592ab(0x12a))/0x5*(parseInt(_0x5592ab(0xea))/0x6)+-parseInt(_0x5592ab(0x189))/0x7*(-parseInt(_0x5592ab(0x1ab))/0x8)+parseInt(_0x5592ab(0x1de))/0x9+-parseInt(_0x5592ab(0xeb))/0xa;if(_0x198d58===_0x3a2e74)break;else _0x240f82['push'](_0x240f82['shift']());}catch(_0x4fa401){_0x240f82['push'](_0x240f82['shift']());}}}(a299_0x58a2,0xa3fd4));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';function a299_0x380b(_0xe827d5,_0x583287){_0xe827d5=_0xe827d5-0xa3;const _0x58a260=a299_0x58a2();let _0x380b9c=_0x58a260[_0xe827d5];return _0x380b9c;}export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x32ec5c(0x1a0),'$id':a299_0x32ec5c(0xfe),'title':a299_0x32ec5c(0xec),'type':'object','required':[a299_0x32ec5c(0xd5),a299_0x32ec5c(0x1b0),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a299_0x32ec5c(0x204),'minLength':0x1},{'type':a299_0x32ec5c(0x133),'minimum':0x1}]},'position':{'type':a299_0x32ec5c(0x1b2),'required':['x','y'],'properties':{'x':{'type':a299_0x32ec5c(0xfb),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x14f),a299_0x32ec5c(0x1b6)],'properties':{'value':{'type':a299_0x32ec5c(0x133),'minimum':0x1},'unit':{'enum':[a299_0x32ec5c(0xc1),a299_0x32ec5c(0x148),a299_0x32ec5c(0x144),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id',a299_0x32ec5c(0x1f4),a299_0x32ec5c(0xfc),a299_0x32ec5c(0xf3)],'properties':{'id':{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x16a)},'type':{'enum':['START',a299_0x32ec5c(0x188),a299_0x32ec5c(0xb7),a299_0x32ec5c(0x16c),'SCRIPT',a299_0x32ec5c(0x1c3)]},'name':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'path':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'position':{'$ref':a299_0x32ec5c(0xe4)},'approvalMode':{'enum':['SINGLE',a299_0x32ec5c(0xb2),'ANY']},'taskMode':{'enum':[a299_0x32ec5c(0xb7),a299_0x32ec5c(0x1b3)]},'assignee':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x193)],'properties':{'strategy':{'enum':[a299_0x32ec5c(0x10d),a299_0x32ec5c(0x1dd)]},'userIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x159)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x131)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a299_0x32ec5c(0x193),'userIds'],'properties':{'strategy':{'const':a299_0x32ec5c(0x10d)},'userIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a299_0x32ec5c(0x18b)},'result':{'enum':[a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4)]},'scriptName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x32ec5c(0x16a)},'async':{'type':a299_0x32ec5c(0x1b2),'properties':{'enabled':{'type':a299_0x32ec5c(0x18b)},'retryCount':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a299_0x32ec5c(0x1b2),'properties':{'enabled':{'type':a299_0x32ec5c(0x18b)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a299_0x32ec5c(0x116),a299_0x32ec5c(0x150),a299_0x32ec5c(0xaf)]},'interrupting':{'type':a299_0x32ec5c(0x18b)},'scriptName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x32ec5c(0x16a)}},'additionalProperties':!![]},'cc':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x1a5)],'properties':{'recipientUserIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'visible':{'type':a299_0x32ec5c(0x1ff),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0x32ec5c(0xa4),a299_0x32ec5c(0x1e4)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x32ec5c(0x200)]},'template':{'type':'object','required':['title',a299_0x32ec5c(0x167)],'properties':{'title':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x32ec5c(0x204)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x112),a299_0x32ec5c(0x14f)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x32ec5c(0x1ff),'maxItems':0x2,'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x118),'url'],'properties':{'text':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'url':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x32ec5c(0x1ff),'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x1f4),'value'],'properties':{'type':{'enum':[a299_0x32ec5c(0x1ad),'ROLE',a299_0x32ec5c(0xae)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0x32ec5c(0x19f)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x32ec5c(0x1b2),'properties':{'id':{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x16a)},'source':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'target':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'conditionType':{'enum':[a299_0x32ec5c(0x198),a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4),a299_0x32ec5c(0x180)]},'expression':{'type':a299_0x32ec5c(0x204)},'defaultFlow':{'type':a299_0x32ec5c(0x18b)},'name':{'type':a299_0x32ec5c(0x204)},'waypoints':{'type':a299_0x32ec5c(0x1ff),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x32ec5c(0x199)]},{'required':[a299_0x32ec5c(0x1ca)]}]},{'anyOf':[{'required':[a299_0x32ec5c(0x20b)]},{'required':[a299_0x32ec5c(0x103)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'flowDesc':{'type':a299_0x32ec5c(0x204)},'flowType':{'enum':[a299_0x32ec5c(0x1cd),'INDEPENDENT_FLOW']},'datasetCode':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'pageId':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':Number[a299_0x32ec5c(0x1b1)]},'pageIds':{'type':'array','items':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':Number[a299_0x32ec5c(0x1b1)]}},'templateName':![],'flowJson':{'type':a299_0x32ec5c(0x1b2),'required':['nodes',a299_0x32ec5c(0xc4)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x32ec5c(0x204),'const':a299_0x32ec5c(0x201),'description':a299_0x32ec5c(0x19c)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x32ec5c(0x1a2)},'startPageId':![],'startPath':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x1c9)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x19d)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x32ec5c(0x125),a299_0x32ec5c(0xff),a299_0x32ec5c(0xd5),a299_0x32ec5c(0x174),a299_0x32ec5c(0xac),a299_0x32ec5c(0x1ae),a299_0x32ec5c(0xe8),a299_0x32ec5c(0xbc)],REMOVED_ROOT_FIELDS=['id',a299_0x32ec5c(0x1ae),a299_0x32ec5c(0xbc)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x32ec5c(0x201),NODE_TYPES=new Set([a299_0x32ec5c(0x151),a299_0x32ec5c(0x188),a299_0x32ec5c(0xb7),a299_0x32ec5c(0x16c),a299_0x32ec5c(0x115),a299_0x32ec5c(0x1c3)]),CONDITION_TYPES=new Set([a299_0x32ec5c(0x198),a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4),a299_0x32ec5c(0x180)]),APPROVAL_MODES=new Set([a299_0x32ec5c(0xba),a299_0x32ec5c(0xb2),a299_0x32ec5c(0x13a)]),APPROVAL_TASK_MODES=new Set([a299_0x32ec5c(0xb7),a299_0x32ec5c(0x1b3)]),FLOW_TIME_UNITS=new Set([a299_0x32ec5c(0xc1),'MINUTES',a299_0x32ec5c(0x144),a299_0x32ec5c(0x1f2)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x32ec5c(0x116),a299_0x32ec5c(0x150),a299_0x32ec5c(0xaf)]),FLOW_TYPES=new Set([a299_0x32ec5c(0x1cd),a299_0x32ec5c(0x208)]),FLOW_PAGE_MODES=new Set([a299_0x32ec5c(0x1a2),'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([a299_0x32ec5c(0xca),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x32ec5c(0x1ad),a299_0x32ec5c(0x1dd),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x32ec5c(0x19f)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE=a299_0x32ec5c(0x19e),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_0x32ec5c(0xd4),a299_0x32ec5c(0x14d),a299_0x32ec5c(0x1f5),a299_0x32ec5c(0x1c5),a299_0x32ec5c(0x140),a299_0x32ec5c(0x17a),a299_0x32ec5c(0x1e8),a299_0x32ec5c(0x10c),a299_0x32ec5c(0x1cb),'approval_sys_dataId']);export function normalizeFlowConfig(_0x18121d){const _0x6c5624=a299_0x32ec5c;if(!isRecord(_0x18121d))throw new TypeError(_0x6c5624(0xb0));const _0x5f4592=cloneJsonValue(_0x18121d),_0x13286d=_0x5f4592[_0x6c5624(0xb8)],_0x41a6b2=isRecord(_0x13286d)?cloneJsonValue(_0x13286d):{},_0x9ee811=[],_0x173db7=[];for(const _0x16a169 of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x5f4592,_0x16a169))continue;delete _0x5f4592[_0x16a169],_0x173db7[_0x6c5624(0x1a4)](_0x16a169),_0x9ee811[_0x6c5624(0x1a4)]({'code':_0x6c5624(0xcd),'path':_0x16a169,'message':_0x16a169+_0x6c5624(0x18a)});}for(const _0x2535ef of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x41a6b2,_0x2535ef))continue;const _0x3db229=_0x6c5624(0x1b5)+_0x2535ef;delete _0x41a6b2[_0x2535ef],_0x173db7['push'](_0x3db229),_0x9ee811[_0x6c5624(0x1a4)]({'code':'legacy_field_removed','path':_0x3db229,'message':_0x3db229+_0x6c5624(0x18a)});}if(Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x41a6b2,'schemaVersion')){const _0xc0e93d=_0x41a6b2[_0x6c5624(0x155)],_0x2d614c=typeof _0xc0e93d==='string'?_0xc0e93d[_0x6c5624(0x104)]():_0xc0e93d;if(isEmptyJsonValue(_0xc0e93d)||_0x2d614c===DEFAULT_FLOW_SCHEMA_VERSION){const _0x2ce0cd=_0x6c5624(0x169);delete _0x41a6b2[_0x6c5624(0x155)],_0x173db7['push'](_0x2ce0cd),_0x9ee811[_0x6c5624(0x1a4)]({'code':'legacy_field_removed','path':_0x2ce0cd,'message':_0x2ce0cd+_0x6c5624(0x17e)+DEFAULT_FLOW_SCHEMA_VERSION+_0x6c5624(0x184)});}}removeEmptyMetadata(_0x41a6b2,_0x6c5624(0xb8),_0x9ee811,_0x173db7);_0x5f4592['flowType']===_0x6c5624(0x208)&&!Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)]['call'](_0x41a6b2,_0x6c5624(0x13d))&&(_0x41a6b2[_0x6c5624(0x13d)]=_0x6c5624(0x1a2));_0x5f4592[_0x6c5624(0xb8)]=_0x41a6b2;if(typeof _0x5f4592[_0x6c5624(0xd5)]===_0x6c5624(0x204))_0x5f4592['flowName']=_0x5f4592[_0x6c5624(0xd5)]['trim']();return{'config':_0x5f4592,'warnings':_0x9ee811,'removedPaths':_0x173db7};}export function validateFlowConfig(_0x458398){const _0x5793b7=a299_0x32ec5c;let _0x43d58d;try{_0x43d58d=normalizeFlowConfig(_0x458398);}catch(_0x59ddf4){const _0x5b7d88=_0x59ddf4 instanceof Error?_0x59ddf4['message']:String(_0x59ddf4),_0x386f86={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5b7d88}],'warnings':[],'normalized':_0x386f86,'validationConfig':_0x386f86};}const _0x5a345b=_0x43d58d[_0x5793b7(0x130)],_0x3bb748=cloneJsonValue(_0x5a345b),_0x9d21b1=_0x3bb748[_0x5793b7(0xb8)];_0x9d21b1[_0x5793b7(0x125)]=_0x5793b7(0x1e3),_0x9d21b1[_0x5793b7(0xd5)]=_0x5a345b[_0x5793b7(0xd5)];typeof _0x5a345b['datasetCode']===_0x5793b7(0x204)&&_0x5a345b['datasetCode'][_0x5793b7(0x104)]()&&(_0x9d21b1[_0x5793b7(0x174)]=_0x5a345b[_0x5793b7(0xac)]['trim']());const _0x20743e=[];return validateOuterMetadata(_0x5a345b,_0x20743e),validateFlowClassification(_0x5a345b,_0x20743e),validateGraph(_0x5a345b[_0x5793b7(0xb8)],_0x20743e),{'valid':_0x20743e['length']===0x0,'errors':_0x20743e,'warnings':_0x43d58d[_0x5793b7(0xc6)],'normalized':_0x5a345b,'validationConfig':_0x3bb748};}function validateFlowClassification(_0x2b3577,_0xaf8349){const _0x1470d7=a299_0x32ec5c;if(!isRecord(_0x2b3577[_0x1470d7(0xb8)]))return;const _0x3e7387=_0x2b3577[_0x1470d7(0x1b0)],_0x47d9cd=_0x2b3577['flowJson'][_0x1470d7(0x13d)];_0x47d9cd!==undefined&&(typeof _0x47d9cd!==_0x1470d7(0x204)||!FLOW_PAGE_MODES['has'](_0x47d9cd))&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':_0x1470d7(0x17b)+String(_0x47d9cd)+'.'});_0x3e7387===_0x1470d7(0x1cd)&&_0x47d9cd!==undefined&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':_0x1470d7(0xce)});_0x3e7387===_0x1470d7(0x208)&&_0x47d9cd==='PLATFORM_FORM'&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x3e7387===_0x1470d7(0x1cd)||_0x3e7387===_0x1470d7(0x208))&&validateCustomPageNavigation(_0x2b3577,_0x3e7387,_0x47d9cd,_0xaf8349);if(_0x3e7387!==_0x1470d7(0x1cd)||!Array[_0x1470d7(0x109)](_0x2b3577[_0x1470d7(0xb8)]['nodes']))return;_0x2b3577[_0x1470d7(0xb8)][_0x1470d7(0x156)][_0x1470d7(0x1df)]((_0x309280,_0x54bf66)=>{const _0x35dc85=_0x1470d7;isRecord(_0x309280)&&_0x309280[_0x35dc85(0x1f4)]===_0x35dc85(0xb7)&&_0x309280[_0x35dc85(0xc0)]===_0x35dc85(0x1b3)&&_0xaf8349['push']({'path':_0x35dc85(0x137)+_0x54bf66+'].taskMode','message':_0x35dc85(0x1b7)});});}function validateCustomPageNavigation(_0x2b8f79,_0x5edbfa,_0x3bd287,_0x262534){const _0x1011ab=a299_0x32ec5c,_0x2a7312=_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0x1e2)];_0x2a7312!==undefined&&_0x262534[_0x1011ab(0x1a4)]({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x2eabf3=_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0xe1)];_0x2eabf3!==undefined&&(typeof _0x2eabf3!=='string'||_0x2eabf3[_0x1011ab(0x104)]()==='')&&_0x262534[_0x1011ab(0x1a4)]({'path':_0x1011ab(0x1e1),'message':_0x1011ab(0x1e6)});const _0xc485c6=Array[_0x1011ab(0x109)](_0x2b8f79['flowJson'][_0x1011ab(0x156)])?_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0x156)]['map']((_0xdc7fda,_0x3dbb88)=>({'node':_0xdc7fda,'index':_0x3dbb88}))['filter'](({node:_0x6a2a82})=>isRecord(_0x6a2a82)&&_0x6a2a82[_0x1011ab(0x1d8)]!==undefined):[],_0x49ab8d=_0x2eabf3!==undefined||_0xc485c6[_0x1011ab(0x124)]>0x0,_0xfe9103=_0x3bd287===undefined&&_0x5edbfa===_0x1011ab(0x208)?_0x1011ab(0x1a2):_0x3bd287;_0x49ab8d&&(_0x5edbfa!=='INDEPENDENT_FLOW'||_0xfe9103!==_0x1011ab(0x1a2))&&(_0x2eabf3!==undefined&&_0x262534[_0x1011ab(0x1a4)]({'path':'flowJson.startPath','message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0xc485c6['forEach'](({index:_0x49fff7})=>{const _0x2f5339=_0x1011ab;_0x262534[_0x2f5339(0x1a4)]({'path':_0x2f5339(0x137)+_0x49fff7+_0x2f5339(0x1f9),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x3aceef,_0x50710c,_0xd73d9a={}){const _0x1e8151=a299_0x32ec5c,_0x4d8147=resolve(_0x3aceef),_0x66070d=_0x4d8147+'.'+process[_0x1e8151(0x16b)]+'.'+randomUUID()+_0x1e8151(0x1a8),_0x2e7ea8=JSON[_0x1e8151(0x158)](_0x50710c,null,0x2)+'\x0a';let _0x3d65b3;try{try{_0x3d65b3=(await stat(_0x4d8147))[_0x1e8151(0x142)]&0x1ff;}catch{_0x3d65b3=undefined;}await writeFile(_0x66070d,_0x2e7ea8,{'encoding':_0x1e8151(0x164),'flag':'wx','mode':_0x3d65b3??0x1a4});if(_0x3d65b3!==undefined)await chmod(_0x66070d,_0x3d65b3);_0xd73d9a[_0x1e8151(0xbe)]===![]?(await link(_0x66070d,_0x4d8147),await unlink(_0x66070d)):await rename(_0x66070d,_0x4d8147);}finally{await unlink(_0x66070d)[_0x1e8151(0xa9)](()=>undefined);}}function validateOuterMetadata(_0x5b1247,_0x4f73d1){const _0x500138=a299_0x32ec5c;(typeof _0x5b1247[_0x500138(0xd5)]!==_0x500138(0x204)||_0x5b1247[_0x500138(0xd5)]['trim']()==='')&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xd5),'message':_0x500138(0x139)});_0x5b1247[_0x500138(0x157)]!==undefined&&typeof _0x5b1247[_0x500138(0x157)]!==_0x500138(0x204)&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x157),'message':_0x500138(0x1bf)});if(_0x5b1247['flowType']===undefined||_0x5b1247['flowType']===null)_0x4f73d1['push']({'path':'flowType','message':_0x500138(0x15e)});else(typeof _0x5b1247['flowType']!=='string'||!FLOW_TYPES[_0x500138(0xbf)](_0x5b1247[_0x500138(0x1b0)]))&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x1b0),'message':_0x500138(0x1f3)+String(_0x5b1247[_0x500138(0x1b0)])+'.'});_0x5b1247[_0x500138(0xac)]!==undefined&&typeof _0x5b1247['datasetCode']!=='string'&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xac),'message':_0x500138(0xe0)});_0x5b1247[_0x500138(0x10b)]===undefined&&_0x5b1247['pageId']!==undefined&&(!Number[_0x500138(0x175)](_0x5b1247[_0x500138(0xe8)])||_0x5b1247[_0x500138(0xe8)]<=0x0)&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xe8),'message':_0x500138(0x196)});if(_0x5b1247[_0x500138(0x10b)]!==undefined){if(!Array[_0x500138(0x109)](_0x5b1247['pageIds'])||_0x5b1247[_0x500138(0x10b)][_0x500138(0x20a)](_0x4a174a=>!Number['isSafeInteger'](_0x4a174a)||_0x4a174a<=0x0))_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0x18c)});else[...new Set(_0x5b1247[_0x500138(0x10b)])][_0x500138(0x1d6)](',')[_0x500138(0x124)]>0x800&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0xf9)});_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&Array[_0x500138(0x109)](_0x5b1247[_0x500138(0x10b)])&&_0x5b1247[_0x500138(0x10b)][_0x500138(0x124)]>0x0&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0x1d9)});}_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&_0x5b1247[_0x500138(0xac)]!==undefined&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xac),'message':_0x500138(0xc9)}),_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&_0x5b1247[_0x500138(0x10b)]===undefined&&_0x5b1247[_0x500138(0xe8)]!==undefined&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xe8),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x1f2e2e,_0x59a023){const _0x4bc5cd=a299_0x32ec5c;if(!isRecord(_0x1f2e2e)){_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0xb8),'message':_0x4bc5cd(0x203)});return;}!Array['isArray'](_0x1f2e2e[_0x4bc5cd(0x156)])&&_0x59a023['push']({'path':_0x4bc5cd(0x1d2),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x4bc5cd(0x109)](_0x1f2e2e[_0x4bc5cd(0xc4)])&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':'flowJson.edges','message':_0x4bc5cd(0xf8)});Object['prototype'][_0x4bc5cd(0x16d)]['call'](_0x1f2e2e,_0x4bc5cd(0x155))&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x169),'message':_0x4bc5cd(0x181)+String(_0x1f2e2e['schemaVersion'])+_0x4bc5cd(0xf2)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x4eceaf of[_0x4bc5cd(0x100),_0x4bc5cd(0x161),_0x4bc5cd(0xf0)]){Object[_0x4bc5cd(0x15a)][_0x4bc5cd(0x16d)]['call'](_0x1f2e2e,_0x4eceaf)&&_0x59a023['push']({'path':_0x4bc5cd(0x1b5)+_0x4eceaf,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x1f2e2e[_0x4bc5cd(0x156)])||!Array[_0x4bc5cd(0x109)](_0x1f2e2e[_0x4bc5cd(0xc4)]))return;const _0x32b2be=new Map(),_0x46987c=[],_0x59cdd0=[],_0x53c50=new Map(),_0x54ef87=new Map(),_0x5d13b0=new Set();let _0x183dfe=0x0;_0x1f2e2e[_0x4bc5cd(0x156)]['forEach']((_0x532246,_0x5dc4d3)=>{const _0x17d8d2=_0x4bc5cd,_0x4a54b6='flowJson.nodes['+_0x5dc4d3+']';if(!isRecord(_0x532246)){_0x59a023['push']({'path':_0x4a54b6,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x4e9876=_0x532246;if(typeof _0x4e9876['id']!==_0x17d8d2(0x204)||!BPMN_ID_PATTERN[_0x17d8d2(0xc8)](_0x4e9876['id']))_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+_0x17d8d2(0xbb),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x32b2be[_0x17d8d2(0xbf)](_0x4e9876['id'])?_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+_0x17d8d2(0xbb),'message':_0x17d8d2(0x170)+_0x4e9876['id']+'.'}):(_0x32b2be[_0x17d8d2(0x1d7)](_0x4e9876['id'],_0x4e9876),_0x5d13b0[_0x17d8d2(0x138)](_0x4e9876['id']));if(!NODE_TYPES[_0x17d8d2(0xbf)](_0x4e9876[_0x17d8d2(0x1f4)]))_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x4e9876[_0x17d8d2(0x1f4)])+'.'});else{if(_0x4e9876[_0x17d8d2(0x1f4)]===_0x17d8d2(0x151))_0x46987c[_0x17d8d2(0x1a4)](_0x4e9876['id']);else _0x4e9876[_0x17d8d2(0x1f4)]===_0x17d8d2(0x188)&&_0x59cdd0['push'](_0x4e9876['id']);}_0x4e9876['type']==='APPROVAL'&&(_0x4e9876[_0x17d8d2(0xc0)]===undefined||_0x4e9876[_0x17d8d2(0xc0)]===_0x17d8d2(0xb7))&&(_0x183dfe+=0x1);validateNode(_0x4e9876,_0x4a54b6,_0x59a023);if(_0x4e9876['type']===_0x17d8d2(0x115)){const _0x3b6e26=resolveEffectiveResultVariable(_0x4e9876[_0x17d8d2(0x1ec)],![]);_0x3b6e26&&(registerResultVariableOwner(_0x54ef87,_0x3b6e26,_0x4e9876['id'],_0x59a023),!_0x53c50[_0x17d8d2(0xbf)](_0x3b6e26)&&_0x53c50[_0x17d8d2(0x1d7)](_0x3b6e26,_0x4e9876['id']));}if(_0x4e9876['type']==='APPROVAL'&&isRecord(_0x4e9876[_0x17d8d2(0xa7)])&&_0x4e9876[_0x17d8d2(0xa7)][_0x17d8d2(0x1e7)]===!![]&&_0x4e9876['timeout']['action']===_0x17d8d2(0xaf)){const _0x960fc4=resolveEffectiveResultVariable(_0x4e9876[_0x17d8d2(0xa7)][_0x17d8d2(0x1ec)],!![]);_0x960fc4&®isterResultVariableOwner(_0x54ef87,_0x960fc4,_0x4e9876['id']+_0x17d8d2(0xc7),_0x59a023);}});_0x46987c['length']!==0x1&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x1d2),'message':_0x4bc5cd(0x1bb)});_0x59cdd0['length']===0x0&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x1d2),'message':_0x4bc5cd(0x191)});const _0x4fe95c=new Map(),_0x2b173c=new Map(),_0x13bd26=new Map(),_0x56c4cb=new Set();_0x1f2e2e['edges'][_0x4bc5cd(0x1df)]((_0x11bb51,_0x45c172)=>{const _0x11d325=_0x4bc5cd,_0x395274=_0x11d325(0xd1)+_0x45c172+']';if(!isRecord(_0x11bb51)){_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x2cc3a9=_0x11bb51;_0x13bd26[_0x11d325(0x1d7)](_0x2cc3a9,_0x395274);const _0x17972f=resolveEdgeEndpoint(_0x2cc3a9[_0x11d325(0x199)],_0x2cc3a9[_0x11d325(0x1ca)]),_0x3295ce=resolveEdgeEndpoint(_0x2cc3a9[_0x11d325(0x20b)],_0x2cc3a9[_0x11d325(0x103)]);if(!_0x17972f)_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0x132),'message':_0x11d325(0x136)});if(!_0x3295ce)_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0x1d0),'message':_0x11d325(0x1c4)});_0x17972f&&!_0x32b2be['has'](_0x17972f)&&_0x59a023['push']({'path':_0x395274+_0x11d325(0x132),'message':_0x11d325(0x1da)+_0x17972f+'.'});_0x3295ce&&!_0x32b2be[_0x11d325(0xbf)](_0x3295ce)&&_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+'.target','message':_0x11d325(0x18d)+_0x3295ce+'.'});if(_0x2cc3a9['id']!==undefined){if(typeof _0x2cc3a9['id']!==_0x11d325(0x204)||!BPMN_ID_PATTERN[_0x11d325(0xc8)](_0x2cc3a9['id']))_0x59a023['push']({'path':_0x395274+_0x11d325(0xbb),'message':_0x11d325(0x1d4)});else{if(_0x5d13b0[_0x11d325(0xbf)](_0x2cc3a9['id']))_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0xbb),'message':_0x11d325(0x16f)+_0x2cc3a9['id']+'.'});else!_0x5d13b0[_0x11d325(0xbf)](_0x2cc3a9['id'])&&_0x5d13b0['add'](_0x2cc3a9['id']);}}if(_0x17972f&&_0x3295ce){const _0x36fcf3=_0x17972f+'\x00'+_0x3295ce+'\x00'+(_0x2cc3a9[_0x11d325(0x111)]??_0x11d325(0x198));_0x56c4cb[_0x11d325(0xbf)](_0x36fcf3)?_0x59a023['push']({'path':_0x395274,'message':_0x11d325(0xab)+_0x17972f+_0x11d325(0x12f)+_0x3295ce+'\x20('+(_0x2cc3a9[_0x11d325(0x111)]??'ALWAYS')+').'}):_0x56c4cb[_0x11d325(0x138)](_0x36fcf3);}validateEdge(_0x2cc3a9,_0x395274,_0x59a023),_0x17972f&&_0x3295ce&&(_0x4fe95c[_0x11d325(0xdf)](_0x17972f)?.[_0x11d325(0x1a4)](_0x2cc3a9)??_0x4fe95c['set'](_0x17972f,[_0x2cc3a9]),_0x2b173c[_0x11d325(0xdf)](_0x3295ce)?.[_0x11d325(0x1a4)](_0x2cc3a9)??_0x2b173c[_0x11d325(0x1d7)](_0x3295ce,[_0x2cc3a9]));});if(_0x46987c[_0x4bc5cd(0x124)]!==0x1)return;validateGraphShape(_0x32b2be,_0x46987c[0x0],_0x59cdd0,_0x4fe95c,_0x2b173c,_0x13bd26,_0x59a023),validateScriptResultReferences(_0x32b2be,_0x46987c[0x0],_0x4fe95c,_0x2b173c,_0x13bd26,_0x53c50,_0x59a023),validateApprovalResults(_0x32b2be,_0x183dfe,_0x59cdd0,_0x59a023);}function validateNode(_0x178b9f,_0xe410f3,_0x3edf7f){const _0xcdf5c5=a299_0x32ec5c;for(const _0xf729bb of['form',_0xcdf5c5(0x1f0)]){Object[_0xcdf5c5(0x15a)][_0xcdf5c5(0x16d)]['call'](_0x178b9f,_0xf729bb)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.'+_0xf729bb,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0xcdf5c5(0xbf)](_0x178b9f[_0xcdf5c5(0x1f4)]))return;(typeof _0x178b9f[_0xcdf5c5(0xfc)]!==_0xcdf5c5(0x204)||_0x178b9f[_0xcdf5c5(0xfc)]['trim']()==='')&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x153),'message':_0xcdf5c5(0x107)});_0x178b9f[_0xcdf5c5(0xe8)]!==undefined&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x134),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x178b9f[_0xcdf5c5(0x1d8)]!==undefined){if(typeof _0x178b9f[_0xcdf5c5(0x1d8)]!=='string'||_0x178b9f[_0xcdf5c5(0x1d8)][_0xcdf5c5(0x104)]()==='')_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.path','message':_0xcdf5c5(0xef)});else _0x178b9f[_0xcdf5c5(0x1f4)]!==_0xcdf5c5(0xb7)&&_0x178b9f[_0xcdf5c5(0x1f4)]!==_0xcdf5c5(0x188)&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0xb9),'message':_0xcdf5c5(0x11c)});}const _0x10581b=_0x178b9f[_0xcdf5c5(0xf3)];if(!isRecord(_0x10581b))_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0xdc),'message':_0xcdf5c5(0x162)});else for(const _0x5464ad of['x','y']){const _0x47fd98=_0x10581b[_0x5464ad];(typeof _0x47fd98!==_0xcdf5c5(0xfb)||!Number['isFinite'](_0x47fd98)||_0x47fd98<0x0)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x122)+_0x5464ad,'message':_0xcdf5c5(0xd8)+_0x5464ad+_0xcdf5c5(0x173)});}if(_0x178b9f[_0xcdf5c5(0x1f4)]==='APPROVAL'){const _0x256d4b=_0x178b9f['approvalMode']??_0xcdf5c5(0xba),_0x75152b=_0x178b9f[_0xcdf5c5(0xc0)]??_0xcdf5c5(0xb7);!APPROVAL_TASK_MODES[_0xcdf5c5(0xbf)](_0x75152b)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x75152b)+'.'});!APPROVAL_MODES[_0xcdf5c5(0xbf)](_0x256d4b)&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x1d1),'message':_0xcdf5c5(0x1bc)+String(_0x256d4b)+'.'});if(!isRecord(_0x178b9f[_0xcdf5c5(0x202)]))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0xf6),'message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x572a4b=_0x178b9f[_0xcdf5c5(0x202)][_0xcdf5c5(0x193)];_0x572a4b!==_0xcdf5c5(0x10d)&&_0x572a4b!=='ROLE'&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x152),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x572a4b==='FIXED'){const _0x50d752=_0x178b9f[_0xcdf5c5(0x202)]['userIds'];if(!Array[_0xcdf5c5(0x109)](_0x50d752)||_0x50d752[_0xcdf5c5(0x124)]===0x0)_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x15d),'message':_0xcdf5c5(0x166)});else{const _0x19e71b=_0x50d752[_0xcdf5c5(0x143)](_0x29ca5c=>!isValidUserId(_0x29ca5c));_0x19e71b>=0x0&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0xa8)+_0x19e71b+']','message':_0xcdf5c5(0xa6)});const _0x3e6648=new Set(_0x50d752[_0xcdf5c5(0x172)](isValidUserId)[_0xcdf5c5(0x1db)](_0x370047=>String(_0x370047)[_0xcdf5c5(0x104)]()));_0x256d4b===_0xcdf5c5(0xba)&&_0x3e6648[_0xcdf5c5(0x12e)]>0x1&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.assignee.userIds','message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x572a4b==='ROLE'){const _0x543adf=_0x178b9f['assignee']['roleId'],_0x3a95a6=typeof _0x543adf===_0xcdf5c5(0xfb)||typeof _0x543adf===_0xcdf5c5(0x204)?Number(String(_0x543adf)[_0xcdf5c5(0x104)]()):Number[_0xcdf5c5(0x127)];(!Number[_0xcdf5c5(0x175)](_0x3a95a6)||_0x3a95a6<=0x0)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x17c),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x178b9f['transferCandidates']!==undefined){if(!isRecord(_0x178b9f[_0xcdf5c5(0xee)]))_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x19b),'message':_0xcdf5c5(0x1e0)});else{if(_0x178b9f[_0xcdf5c5(0xee)][_0xcdf5c5(0x193)]!==_0xcdf5c5(0x10d))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1a3),'message':_0xcdf5c5(0x12c)});else{const _0x37be70=_0x178b9f['transferCandidates'][_0xcdf5c5(0x160)];if(!Array[_0xcdf5c5(0x109)](_0x37be70)||_0x37be70[_0xcdf5c5(0x124)]===0x0)_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x168),'message':_0xcdf5c5(0x163)});else{const _0x35ec73=_0x37be70[_0xcdf5c5(0x143)](_0x27ce36=>!isValidUserId(_0x27ce36));_0x35ec73>=0x0&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x11a)+_0x35ec73+']','message':_0xcdf5c5(0xad)});}}}}}_0x178b9f[_0xcdf5c5(0xd7)]!==undefined&&typeof _0x178b9f[_0xcdf5c5(0xd7)]!==_0xcdf5c5(0x18b)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1cc),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x178b9f[_0xcdf5c5(0x1f4)]===_0xcdf5c5(0x115)){(typeof _0x178b9f[_0xcdf5c5(0x1a1)]!=='string'||_0x178b9f['scriptName'][_0xcdf5c5(0x104)]()==='')&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.scriptName','message':_0xcdf5c5(0x1cf)});if(_0x178b9f[_0xcdf5c5(0x1ec)]!==undefined){if(typeof _0x178b9f['resultVariable']!==_0xcdf5c5(0x204)||!VARIABLE_PATTERN[_0xcdf5c5(0xc8)](_0x178b9f[_0xcdf5c5(0x1ec)]))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1b9),'message':_0xcdf5c5(0x1e9)});else(RESERVED_RESULT_VARIABLES['has'](_0x178b9f[_0xcdf5c5(0x1ec)])||_0x178b9f[_0xcdf5c5(0x1ec)]['startsWith'](_0xcdf5c5(0x16e)))&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1b9),'message':_0xcdf5c5(0x129)+_0x178b9f[_0xcdf5c5(0x1ec)]+'.'});}}validateAsyncExecution(_0x178b9f,_0xe410f3,_0x3edf7f),validateApprovalTimeout(_0x178b9f,_0xe410f3,_0x3edf7f),validateCcConfig(_0x178b9f,_0xe410f3,_0x3edf7f),_0x178b9f[_0xcdf5c5(0x1f4)]===_0xcdf5c5(0x1c3)&&validateNotificationConfig(_0x178b9f[_0xcdf5c5(0x130)],_0xe410f3+'.config',_0x3edf7f);}function validateAsyncExecution(_0x3178e9,_0x72daa4,_0x167c26){const _0x9d6810=a299_0x32ec5c;if(_0x3178e9[_0x9d6810(0xbd)]===undefined)return;if(!isRecord(_0x3178e9['async'])){_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+_0x9d6810(0xda),'message':_0x9d6810(0x13f)});return;}if(_0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x1e7)]!==undefined&&typeof _0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x1e7)]!==_0x9d6810(0x18b)){_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+'.async.enabled','message':_0x9d6810(0xb5)});return;}if(_0x3178e9[_0x9d6810(0xbd)]['enabled']!==!![])return;_0x3178e9['type']!=='SCRIPT'&&_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+_0x9d6810(0xda),'message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x4a2b46=_0x3178e9['async'][_0x9d6810(0x17f)]??0x3;(!Number['isInteger'](_0x4a2b46)||_0x4a2b46<0x1||_0x4a2b46>MAX_ASYNC_RETRY_COUNT)&&_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+'.async.retryCount','message':_0x9d6810(0x1ea)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x146)]!==undefined&&validateTimeAmount(_0x3178e9[_0x9d6810(0xbd)]['retryInterval'],_0x72daa4+_0x9d6810(0x147),_0x167c26);}function validateApprovalTimeout(_0x4fc753,_0x4bfcca,_0x7b536a){const _0x333e06=a299_0x32ec5c;if(_0x4fc753['timeout']===undefined)return;if(!isRecord(_0x4fc753[_0x333e06(0xa7)])){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0xc7),'message':_0x333e06(0xfa)});return;}if(_0x4fc753['timeout'][_0x333e06(0x1e7)]!==undefined&&typeof _0x4fc753['timeout']['enabled']!==_0x333e06(0x18b)){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0x1f6),'message':_0x333e06(0x135)});return;}if(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1e7)]!==!![])return;if(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x13e)]!==undefined&&typeof _0x4fc753['timeout'][_0x333e06(0x13e)]!=='boolean'){_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x333e06(0xb1)});return;}_0x4fc753[_0x333e06(0x1f4)]!==_0x333e06(0xb7)&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xc7),'message':_0x333e06(0x1ce)});validateTimeAmount(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1af)],_0x4bfcca+'.timeout.duration',_0x7b536a);const _0x514450=_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x117)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x333e06(0xbf)](_0x514450)){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0xd6),'message':_0x333e06(0x120)});return;}(_0x4fc753[_0x333e06(0xc0)]??_0x333e06(0xb7))===_0x333e06(0x1b3)&&_0x514450!==_0x333e06(0xaf)&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xd6),'message':_0x333e06(0x12b)});const _0x35da3f=_0x4fc753['timeout'][_0x333e06(0x13e)]??_0x514450!==_0x333e06(0xaf);if(_0x514450===_0x333e06(0xaf))_0x35da3f&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x333e06(0xdd)}),(typeof _0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1a1)]!==_0x333e06(0x204)||_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1a1)]['trim']()==='')&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0x197),'message':_0x333e06(0x192)}),validateOptionalResultVariable(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1ec)],_0x4bfcca+_0x333e06(0x18e),_0x7b536a);else!_0x35da3f&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x514450+_0x333e06(0x1ee)});}function validateTimeAmount(_0x529146,_0x43e068,_0x41c7c9){const _0x1d5b0a=a299_0x32ec5c;if(!isRecord(_0x529146)){_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068,'message':_0x1d5b0a(0x1a9)});return;}(!Number[_0x1d5b0a(0x1aa)](_0x529146[_0x1d5b0a(0x14f)])||Number(_0x529146[_0x1d5b0a(0x14f)])<=0x0)&&_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068+'.value','message':_0x1d5b0a(0xc2)}),!FLOW_TIME_UNITS[_0x1d5b0a(0xbf)](_0x529146['unit'])&&_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068+_0x1d5b0a(0xe7),'message':_0x1d5b0a(0x101)});}function validateOptionalResultVariable(_0x377a4c,_0x49c1e3,_0x33c3dc){const _0x2ab9d1=a299_0x32ec5c;if(_0x377a4c===undefined||_0x377a4c===null||_0x377a4c==='')return;if(typeof _0x377a4c!=='string'||!VARIABLE_PATTERN[_0x2ab9d1(0xc8)](_0x377a4c))_0x33c3dc[_0x2ab9d1(0x1a4)]({'path':_0x49c1e3,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2ab9d1(0xbf)](_0x377a4c)||_0x377a4c['startsWith'](_0x2ab9d1(0x16e)))&&_0x33c3dc[_0x2ab9d1(0x1a4)]({'path':_0x49c1e3,'message':_0x2ab9d1(0x129)+_0x377a4c+'.'});}function validateCcConfig(_0x429d17,_0x2d7b72,_0xf175b5){const _0x55830c=a299_0x32ec5c;if(_0x429d17['cc']===undefined)return;if(!isRecord(_0x429d17['cc'])){_0xf175b5['push']({'path':_0x2d7b72+'.cc','message':_0x55830c(0x1fc)});return;}_0x429d17[_0x55830c(0x1f4)]!==_0x55830c(0x188)&&_0x429d17['type']!==_0x55830c(0xb7)&&_0xf175b5['push']({'path':_0x2d7b72+'.cc','message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x55830c(0x15a)][_0x55830c(0x16d)][_0x55830c(0x205)](_0x429d17['cc'],_0x55830c(0xdb))&&_0xf175b5[_0x55830c(0x1a4)]({'path':_0x2d7b72+_0x55830c(0x12d),'message':UNSUPPORTED_FORM_MESSAGE});const _0x2d92e4=_0x429d17['cc'][_0x55830c(0x1a5)];if(!Array['isArray'](_0x2d92e4)||_0x2d92e4[_0x55830c(0x124)]===0x0)_0xf175b5['push']({'path':_0x2d7b72+_0x55830c(0x185),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x2d92e4[_0x55830c(0x124)]>MAX_CC_RECIPIENTS&&_0xf175b5[_0x55830c(0x1a4)]({'path':_0x2d7b72+_0x55830c(0x185),'message':_0x55830c(0xf7)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x3f9b97=new Set();_0x2d92e4[_0x55830c(0x1df)]((_0x544064,_0x3ce825)=>{const _0x42ae6a=_0x55830c;if(typeof _0x544064!==_0x42ae6a(0x204)||_0x544064['trim']()==='')_0xf175b5[_0x42ae6a(0x1a4)]({'path':_0x2d7b72+_0x42ae6a(0xc5)+_0x3ce825+']','message':_0x42ae6a(0x105)});else _0x3f9b97['has'](_0x544064[_0x42ae6a(0x104)]())?_0xf175b5[_0x42ae6a(0x1a4)]({'path':_0x2d7b72+_0x42ae6a(0xc5)+_0x3ce825+']','message':_0x42ae6a(0x1e5)+_0x544064[_0x42ae6a(0x104)]()+'.'}):_0x3f9b97[_0x42ae6a(0x138)](_0x544064[_0x42ae6a(0x104)]());});}validateStringArray(_0x429d17['cc'][_0x55830c(0x195)],_0x2d7b72+_0x55830c(0x1be),_0xf175b5);}function validateStringArray(_0x335121,_0x55a8d1,_0x4a7066){const _0x456cb0=a299_0x32ec5c;if(_0x335121===undefined)return;if(!Array[_0x456cb0(0x109)](_0x335121)){_0x4a7066[_0x456cb0(0x1a4)]({'path':_0x55a8d1,'message':_0x456cb0(0x182)});return;}const _0x2b1c05=new Set();_0x335121[_0x456cb0(0x1df)]((_0x333e8e,_0x3c2edb)=>{const _0x54b6f6=_0x456cb0;if(typeof _0x333e8e!==_0x54b6f6(0x204)||_0x333e8e[_0x54b6f6(0x104)]()==='')_0x4a7066[_0x54b6f6(0x1a4)]({'path':_0x55a8d1+'['+_0x3c2edb+']','message':_0x54b6f6(0x1fe)});else _0x2b1c05['has'](_0x333e8e[_0x54b6f6(0x104)]())?_0x4a7066[_0x54b6f6(0x1a4)]({'path':_0x55a8d1+'['+_0x3c2edb+']','message':_0x54b6f6(0x1fa)+_0x333e8e[_0x54b6f6(0x104)]()+'.'}):_0x2b1c05[_0x54b6f6(0x138)](_0x333e8e[_0x54b6f6(0x104)]());});}function validateNotificationConfig(_0x5bcf01,_0x51a2f1,_0x1e1001){const _0x5254c3=a299_0x32ec5c;if(!isRecord(_0x5bcf01)){_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x5bcf01[_0x5254c3(0x10e)]!==undefined&&_0x5bcf01[_0x5254c3(0x10e)]!==null){if(typeof _0x5bcf01[_0x5254c3(0x10e)]!==_0x5254c3(0x204))_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.version','message':_0x5254c3(0x19a)});else _0x5bcf01[_0x5254c3(0x10e)][_0x5254c3(0x104)]()&&_0x5bcf01[_0x5254c3(0x10e)][_0x5254c3(0x104)]()!=='v1'&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.version','message':'Unsupported\x20notification\x20version:\x20'+_0x5bcf01['version']+'.'});}const _0x4b26d7=requireNotificationString(_0x5bcf01[_0x5254c3(0xa4)],_0x51a2f1+_0x5254c3(0x1c2),_0x5254c3(0x1ed),_0x1e1001);_0x4b26d7?.[_0x5254c3(0xcf)]('${')&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x1c2),'message':_0x5254c3(0x176)});if(_0x5bcf01[_0x5254c3(0x1c6)]!==undefined&&_0x5bcf01[_0x5254c3(0x1c6)]!==null){if(typeof _0x5bcf01[_0x5254c3(0x1c6)]!=='string')_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.failurePolicy','message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x5254c3(0xbf)](_0x5bcf01[_0x5254c3(0x1c6)][_0x5254c3(0x104)]()[_0x5254c3(0x110)]())&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x11e),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x5bcf01[_0x5254c3(0x1e4)])?_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x171),'message':_0x5254c3(0xa3)}):validateNotificationTemplate(_0x5bcf01[_0x5254c3(0x1e4)],_0x51a2f1+_0x5254c3(0x171),_0x1e1001),validateNotificationRecipients(_0x5bcf01['recipients'],_0x51a2f1+_0x5254c3(0x1a6),_0x1e1001);}function validateNotificationTemplate(_0x4970f5,_0x36f256,_0x54acca){const _0x4153c9=a299_0x32ec5c;for(const _0x3d8476 of[_0x4153c9(0x123),'summary']){const _0x502492=requireNotificationString(_0x4970f5[_0x3d8476],_0x36f256+'.'+_0x3d8476,_0x4153c9(0xe9)+_0x3d8476+_0x4153c9(0x10a),_0x54acca);if(_0x502492)validateNotificationPlaceholders(_0x502492,_0x36f256+'.'+_0x3d8476,_0x54acca);}_0x4970f5[_0x4153c9(0xe3)]!==undefined&&_0x4970f5[_0x4153c9(0xe3)]!==null&&(typeof _0x4970f5[_0x4153c9(0xe3)]!==_0x4153c9(0x204)?_0x54acca[_0x4153c9(0x1a4)]({'path':_0x36f256+_0x4153c9(0x1d3),'message':_0x4153c9(0xd3)}):validateNotificationPlaceholders(_0x4970f5['detailMarkdown'],_0x36f256+_0x4153c9(0x1d3),_0x54acca)),validateNotificationFacts(_0x4970f5[_0x4153c9(0x154)],_0x36f256+_0x4153c9(0x14c),_0x54acca),validateNotificationActions(_0x4970f5[_0x4153c9(0xb6)],_0x36f256+_0x4153c9(0xa5),_0x54acca);}function validateNotificationFacts(_0x5641c8,_0x113d41,_0x8fe0fb){const _0x560875=a299_0x32ec5c;if(_0x5641c8===undefined||_0x5641c8===null)return;if(!Array['isArray'](_0x5641c8)){_0x8fe0fb[_0x560875(0x1a4)]({'path':_0x113d41,'message':_0x560875(0x113)});return;}_0x5641c8['length']>MAX_NOTIFICATION_FACTS&&_0x8fe0fb[_0x560875(0x1a4)]({'path':_0x113d41,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x5641c8[_0x560875(0x1df)]((_0x23329f,_0x11e1f9)=>{const _0x146a4c=_0x560875,_0x490573=_0x113d41+'['+_0x11e1f9+']';if(!isRecord(_0x23329f)){_0x8fe0fb[_0x146a4c(0x1a4)]({'path':_0x490573,'message':_0x146a4c(0xfd)});return;}for(const _0x2b5e9d of['label',_0x146a4c(0x14f)]){const _0x4e8d94=requireNotificationString(_0x23329f[_0x2b5e9d],_0x490573+'.'+_0x2b5e9d,_0x146a4c(0x1fb)+_0x2b5e9d+'\x20is\x20required.',_0x8fe0fb);_0x4e8d94&&validateNotificationPlaceholders(_0x4e8d94,_0x490573+'.'+_0x2b5e9d,_0x8fe0fb);}});}function validateNotificationActions(_0x1a372d,_0x37ffb9,_0x4215e9){const _0x10fba5=a299_0x32ec5c;if(_0x1a372d===undefined||_0x1a372d===null)return;if(!Array[_0x10fba5(0x109)](_0x1a372d)){_0x4215e9[_0x10fba5(0x1a4)]({'path':_0x37ffb9,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1a372d['length']>MAX_NOTIFICATION_ACTIONS&&_0x4215e9[_0x10fba5(0x1a4)]({'path':_0x37ffb9,'message':_0x10fba5(0x15c)+MAX_NOTIFICATION_ACTIONS+_0x10fba5(0x1a7)}),_0x1a372d[_0x10fba5(0x1df)]((_0x11bff0,_0x5391ae)=>{const _0x6dc2f6=_0x10fba5,_0x1770de=_0x37ffb9+'['+_0x5391ae+']';if(!isRecord(_0x11bff0)){_0x4215e9['push']({'path':_0x1770de,'message':_0x6dc2f6(0x178)});return;}const _0x86ac6f=requireNotificationString(_0x11bff0[_0x6dc2f6(0x118)],_0x1770de+_0x6dc2f6(0x126),'Notification\x20action.text\x20is\x20required.',_0x4215e9);if(_0x86ac6f)validateNotificationPlaceholders(_0x86ac6f,_0x1770de+_0x6dc2f6(0x126),_0x4215e9);const _0x22c081=requireNotificationString(_0x11bff0['url'],_0x1770de+'.url','Notification\x20action.url\x20is\x20required.',_0x4215e9);if(!_0x22c081)return;validateNotificationPlaceholders(_0x22c081,_0x1770de+_0x6dc2f6(0x179),_0x4215e9),!/^https?:\/\//i[_0x6dc2f6(0xc8)](_0x22c081)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x6dc2f6(0xc8)](_0x22c081)&&_0x4215e9[_0x6dc2f6(0x1a4)]({'path':_0x1770de+_0x6dc2f6(0x179),'message':_0x6dc2f6(0x128)});});}function validateNotificationRecipients(_0x155c33,_0x75bc59,_0x475932){const _0x118233=a299_0x32ec5c;if(_0x155c33===undefined||_0x155c33===null)return;if(!Array[_0x118233(0x109)](_0x155c33)){_0x475932[_0x118233(0x1a4)]({'path':_0x75bc59,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x3c0a1a=![];_0x155c33[_0x118233(0x1df)]((_0x2e59ae,_0x46a052)=>{const _0x4a1188=_0x118233,_0xe4bdfd=_0x75bc59+'['+_0x46a052+']';if(!isRecord(_0x2e59ae)){_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd,'message':_0x4a1188(0x1eb)});return;}const _0x112337=requireNotificationString(_0x2e59ae['type'],_0xe4bdfd+_0x4a1188(0x119),_0x4a1188(0xb3),_0x475932);_0x112337&&!NOTIFICATION_RECIPIENT_TYPES[_0x4a1188(0xbf)](_0x112337[_0x4a1188(0x110)]())&&_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+'.type','message':_0x4a1188(0xcc)});let _0x41c4f7='TO';_0x2e59ae[_0x4a1188(0x190)]!==undefined&&_0x2e59ae[_0x4a1188(0x190)]!==null&&(typeof _0x2e59ae[_0x4a1188(0x190)]!==_0x4a1188(0x204)?(_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+'.role','message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x41c4f7=''):(_0x41c4f7=_0x2e59ae[_0x4a1188(0x190)]['trim']()[_0x4a1188(0x110)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x41c4f7)&&_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+_0x4a1188(0x1ac),'message':_0x4a1188(0x15b)})));if(_0x41c4f7==='TO')_0x3c0a1a=!![];const _0x11eccf=requireNotificationString(_0x2e59ae[_0x4a1188(0x14f)],_0xe4bdfd+'.value','Notification\x20recipient.value\x20is\x20required.',_0x475932);_0x11eccf&&validateNotificationPlaceholders(_0x11eccf,_0xe4bdfd+_0x4a1188(0x121),_0x475932);}),_0x155c33[_0x118233(0x124)]>0x0&&!_0x3c0a1a&&_0x475932[_0x118233(0x1a4)]({'path':_0x75bc59,'message':_0x118233(0xb4)});}function requireNotificationString(_0x1b154c,_0x447e59,_0x293414,_0x268b7d){const _0x433c3b=a299_0x32ec5c;if(typeof _0x1b154c!==_0x433c3b(0x204)||_0x1b154c[_0x433c3b(0x104)]()==='')return _0x268b7d[_0x433c3b(0x1a4)]({'path':_0x447e59,'message':_0x293414}),undefined;return _0x1b154c['trim']();}function validateNotificationPlaceholders(_0x4ea331,_0x551b,_0xd32780){const _0x167d75=a299_0x32ec5c;for(const _0x1e7fbc of _0x4ea331[_0x167d75(0x149)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x45d866=_0x1e7fbc[0x1]?.['trim']()??'',_0x5450b8=_0x45d866[_0x167d75(0xd9)]('.'),_0x307a49=_0x5450b8>=0x0?_0x45d866[_0x167d75(0xf1)](0x0,_0x5450b8):_0x45d866,_0x3d0288=_0x5450b8>=0x0?_0x45d866[_0x167d75(0xf1)](_0x5450b8+0x1)[_0x167d75(0x104)]():'';(!['event','context','variables'][_0x167d75(0xcf)](_0x307a49)||_0x3d0288==='')&&_0xd32780[_0x167d75(0x1a4)]({'path':_0x551b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x1e7fbc[0x0]+'.'});}_0x4ea331[_0x167d75(0x18f)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x167d75(0xcf)]('${')&&_0xd32780[_0x167d75(0x1a4)]({'path':_0x551b,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x543cec,_0x5e6d60,_0x59cc0c){const _0xd331b2=a299_0x32ec5c;_0x543cec['name']!==undefined&&typeof _0x543cec[_0xd331b2(0xfc)]!=='string'&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x153),'message':_0xd331b2(0x1b8)}),_0x543cec['defaultFlow']!==undefined&&typeof _0x543cec['defaultFlow']!==_0xd331b2(0x18b)&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+'.defaultFlow','message':_0xd331b2(0x1c8)}),_0x543cec[_0xd331b2(0xf5)]!==undefined&&(!Array[_0xd331b2(0x109)](_0x543cec[_0xd331b2(0xf5)])?_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x10f),'message':_0xd331b2(0x206)}):_0x543cec[_0xd331b2(0xf5)]['forEach']((_0x1f78fc,_0x438c79)=>{const _0xc487e5=_0xd331b2;if(!isRecord(_0x1f78fc)){_0x59cc0c[_0xc487e5(0x1a4)]({'path':_0x5e6d60+_0xc487e5(0x11f)+_0x438c79+']','message':_0xc487e5(0x114)});return;}for(const _0x585178 of['x','y']){const _0x5c807a=_0x1f78fc[_0x585178];(typeof _0x5c807a!==_0xc487e5(0xfb)||!Number[_0xc487e5(0x1f8)](_0x5c807a))&&_0x59cc0c[_0xc487e5(0x1a4)]({'path':_0x5e6d60+_0xc487e5(0x11f)+_0x438c79+'].'+_0x585178,'message':'waypoint.'+_0x585178+_0xc487e5(0x209)});}})),_0x543cec[_0xd331b2(0x111)]!==undefined&&!CONDITION_TYPES[_0xd331b2(0xbf)](_0x543cec['conditionType'])&&_0x59cc0c['push']({'path':_0x5e6d60+'.conditionType','message':_0xd331b2(0xd0)+String(_0x543cec['conditionType'])+'.'}),_0x543cec[_0xd331b2(0x111)]===_0xd331b2(0x180)&&(typeof _0x543cec[_0xd331b2(0x187)]!=='string'||_0x543cec['expression'][_0xd331b2(0x104)]()==='')&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x194),'message':_0xd331b2(0xed)}),_0x543cec[_0xd331b2(0x14a)]===!![]&&_0x543cec[_0xd331b2(0x111)]!==_0xd331b2(0x198)&&_0x59cc0c['push']({'path':_0x5e6d60+_0xd331b2(0x1ef),'message':_0xd331b2(0x1dc)}),_0x543cec['defaultFlow']===!![]&&typeof _0x543cec[_0xd331b2(0x187)]===_0xd331b2(0x204)&&_0x543cec['expression'][_0xd331b2(0x104)]()!==''&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x194),'message':_0xd331b2(0x207)});}function validateGraphShape(_0x3e7cc3,_0x33102e,_0x268e73,_0x3b3218,_0x2fbdab,_0x5c08aa,_0x428563){const _0x3214a3=a299_0x32ec5c;for(const [_0x4fa0b0,_0x57a7fa]of _0x3e7cc3){const _0x1945a7=_0x2fbdab[_0x3214a3(0xdf)](_0x4fa0b0)??[],_0x44c983=_0x3b3218['get'](_0x4fa0b0)??[];_0x57a7fa[_0x3214a3(0x1f4)]!=='START'&&_0x1945a7[_0x3214a3(0x124)]===0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x57a7fa[_0x3214a3(0x1f4)]!==_0x3214a3(0x188)&&_0x44c983['length']===0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0xe5)});_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x151)&&_0x1945a7[_0x3214a3(0x124)]>0x0&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x188)&&_0x44c983[_0x3214a3(0x124)]>0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x11b)});if(_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x16c)){_0x44c983[_0x3214a3(0x124)]<0x2&&_0x428563[_0x3214a3(0x1a4)]({'path':'flowJson.nodes.'+_0x4fa0b0,'message':_0x3214a3(0xe6)});const _0x351fab=_0x44c983[_0x3214a3(0x172)](_0x5d76ce=>_0x5d76ce[_0x3214a3(0x14a)]===!![]);_0x351fab[_0x3214a3(0x124)]!==0x1&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0xd2)});if(_0x351fab[_0x3214a3(0x124)]===0x1){const _0x359320=_0x351fab[0x0],_0x58b285=_0x5c08aa['get'](_0x359320)??_0x3214a3(0x1c1);_0x359320[_0x3214a3(0x111)]!=='ALWAYS'&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x58b285+_0x3214a3(0x17d),'message':_0x3214a3(0x102)});_0x359320['expression']!==undefined&&_0x428563['push']({'path':_0x58b285+_0x3214a3(0x194),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2befd1 of _0x44c983){if(_0x2befd1===_0x359320)continue;const _0x4af267=_0x5c08aa[_0x3214a3(0xdf)](_0x2befd1)??_0x3214a3(0x1c1);if(_0x2befd1['conditionType']!==_0x3214a3(0x180))_0x428563[_0x3214a3(0x1a4)]({'path':_0x4af267+'.conditionType','message':_0x3214a3(0x183)});else(typeof _0x2befd1[_0x3214a3(0x187)]!==_0x3214a3(0x204)||_0x2befd1['expression'][_0x3214a3(0x104)]()==='')&&_0x428563['push']({'path':_0x4af267+_0x3214a3(0x194),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0xb7)&&(_0x57a7fa[_0x3214a3(0xc0)]??_0x3214a3(0xb7))===_0x3214a3(0x1b3)){if(_0x44c983[_0x3214a3(0x124)]!==0x1)_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x1bd)});else{const _0x354283=_0x44c983[0x0];((_0x354283[_0x3214a3(0x111)]??_0x3214a3(0x198))!==_0x3214a3(0x198)||_0x354283[_0x3214a3(0x14a)]===!![]||typeof _0x354283[_0x3214a3(0x187)]===_0x3214a3(0x204)&&_0x354283[_0x3214a3(0x187)]['trim']()!=='')&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x5c08aa[_0x3214a3(0xdf)](_0x354283)??_0x3214a3(0x1c1),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x57a7fa['type']==='APPROVAL'){const _0x39b314=_0x44c983[_0x3214a3(0x1db)](_0x52f371=>_0x52f371[_0x3214a3(0x111)]??_0x3214a3(0x198)),_0x4b8dd4=_0x39b314['filter'](_0x2d593a=>_0x2d593a!==_0x3214a3(0x1d5)&&_0x2d593a!==_0x3214a3(0x1b4));_0x4b8dd4[_0x3214a3(0x124)]>0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x186)}),_0x39b314[_0x3214a3(0x172)](_0xaa96ae=>_0xaa96ae==='APPROVED')['length']!==0x1&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x13c)}),_0x39b314[_0x3214a3(0x172)](_0x2f4370=>_0x2f4370==='REJECTED')[_0x3214a3(0x124)]!==0x1&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x1c7)}),_0x44c983[_0x3214a3(0x20a)](_0x5f387b=>_0x5f387b[_0x3214a3(0x14a)]===!![])&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x443b76=new Set(),_0x532664=_0x39ddac=>{const _0x1de004=_0x3214a3;if(_0x443b76[_0x1de004(0xbf)](_0x39ddac))return;_0x443b76[_0x1de004(0x138)](_0x39ddac);for(const _0x1bb0ff of _0x3b3218[_0x1de004(0xdf)](_0x39ddac)??[]){const _0x10251f=resolveEdgeEndpoint(_0x1bb0ff[_0x1de004(0x20b)],_0x1bb0ff['targetNodeId']);if(_0x10251f&&_0x3e7cc3[_0x1de004(0xbf)](_0x10251f))_0x532664(_0x10251f);}};_0x532664(_0x33102e);for(const _0x22f1a7 of _0x3e7cc3[_0x3214a3(0x165)]()){!_0x443b76[_0x3214a3(0xbf)](_0x22f1a7)&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x22f1a7,'message':_0x3214a3(0x177)});}const _0xa546bb=_0x268e73[_0x3214a3(0x20a)](_0x5c5cc8=>_0x443b76['has'](_0x5c5cc8));if(!_0xa546bb){_0x428563['push']({'path':'flowJson.edges','message':_0x3214a3(0x106)});return;}const _0x1940f0=new Set(),_0x368348=_0xc06bc6=>{const _0x5ef324=_0x3214a3;if(_0x1940f0['has'](_0xc06bc6))return;_0x1940f0[_0x5ef324(0x138)](_0xc06bc6);for(const _0x2a7b58 of _0x2fbdab[_0x5ef324(0xdf)](_0xc06bc6)??[]){const _0x8dd207=resolveEdgeEndpoint(_0x2a7b58['source'],_0x2a7b58[_0x5ef324(0x1ca)]);if(_0x8dd207&&_0x3e7cc3['has'](_0x8dd207))_0x368348(_0x8dd207);}};for(const _0x21369f of _0x268e73){if(_0x3e7cc3[_0x3214a3(0xbf)](_0x21369f))_0x368348(_0x21369f);}for(const _0x91aa71 of _0x443b76){!_0x1940f0[_0x3214a3(0xbf)](_0x91aa71)&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x91aa71,'message':_0x3214a3(0x11d)});}}function validateApprovalResults(_0x17fcd0,_0x491b1b,_0x4adabe,_0x2c64f8){const _0x180f19=a299_0x32ec5c;if(_0x491b1b===0x0)return;const _0x50925e=new Set(_0x4adabe[_0x180f19(0x1db)](_0x15f12c=>_0x17fcd0[_0x180f19(0xdf)](_0x15f12c)?.['result'])[_0x180f19(0x172)](_0x7e68=>typeof _0x7e68===_0x180f19(0x204)));for(const _0x5e435a of[_0x180f19(0x1d5),_0x180f19(0x1b4)]){!_0x50925e[_0x180f19(0xbf)](_0x5e435a)&&_0x2c64f8['push']({'path':'flowJson.nodes','message':_0x180f19(0x1ba)+_0x5e435a+'.'});}}function validateScriptResultReferences(_0x250f2d,_0x366d66,_0x12bb4a,_0x31609b,_0x248a6c,_0x259ee8,_0x2a69d9){const _0x5936bb=a299_0x32ec5c;if(_0x259ee8[_0x5936bb(0x12e)]===0x0)return;const _0x171fd2=new Set(),_0x133e66=_0x3f8bb5=>{const _0x581ffd=_0x5936bb;if(!_0x171fd2[_0x581ffd(0xbf)](_0x3f8bb5)&&_0x250f2d[_0x581ffd(0xbf)](_0x3f8bb5)){_0x171fd2['add'](_0x3f8bb5);for(const _0x15038f of _0x12bb4a[_0x581ffd(0xdf)](_0x3f8bb5)??[]){const _0x4af98c=resolveEdgeEndpoint(_0x15038f['target'],_0x15038f[_0x581ffd(0x103)]);if(_0x4af98c)_0x133e66(_0x4af98c);}}};_0x133e66(_0x366d66);const _0x2d879d=new Map();for(const _0x8f4256 of _0x171fd2){_0x2d879d['set'](_0x8f4256,_0x8f4256===_0x366d66?new Set([_0x366d66]):new Set(_0x171fd2));}let _0x550861=!![];while(_0x550861){_0x550861=![];for(const _0x17aae1 of _0x171fd2){if(_0x17aae1===_0x366d66)continue;const _0xe7f2a0=(_0x31609b[_0x5936bb(0xdf)](_0x17aae1)??[])[_0x5936bb(0x1db)](_0x381fcb=>resolveEdgeEndpoint(_0x381fcb[_0x5936bb(0x199)],_0x381fcb[_0x5936bb(0x1ca)]))[_0x5936bb(0x172)](_0x5dbfc4=>Boolean(_0x5dbfc4&&_0x171fd2['has'](_0x5dbfc4)));if(_0xe7f2a0['length']===0x0)continue;const _0x1b62e8=new Set(_0x2d879d[_0x5936bb(0xdf)](_0xe7f2a0[0x0])??[]);for(const _0xcca957 of _0xe7f2a0['slice'](0x1)){const _0x172c26=_0x2d879d['get'](_0xcca957)??new Set();for(const _0x22dedd of _0x1b62e8){if(!_0x172c26['has'](_0x22dedd))_0x1b62e8[_0x5936bb(0x141)](_0x22dedd);}}_0x1b62e8['add'](_0x17aae1);const _0x54ee53=_0x2d879d[_0x5936bb(0xdf)](_0x17aae1);!setsEqual(_0x54ee53,_0x1b62e8)&&(_0x2d879d['set'](_0x17aae1,_0x1b62e8),_0x550861=!![]);}}for(const [_0xb450c1,_0xb33e85]of _0x12bb4a){const _0x13f461=_0x2d879d['get'](_0xb450c1);if(!_0x13f461)continue;for(const _0x149928 of _0xb33e85){if(_0x149928['conditionType']!==_0x5936bb(0x180)||typeof _0x149928[_0x5936bb(0x187)]!==_0x5936bb(0x204))continue;for(const [_0x5f35db,_0x1d3bbc]of _0x259ee8){expressionReferencesVariable(_0x149928[_0x5936bb(0x187)],_0x5f35db)&&!_0x13f461[_0x5936bb(0xbf)](_0x1d3bbc)&&_0x2a69d9[_0x5936bb(0x1a4)]({'path':(_0x248a6c['get'](_0x149928)??_0x5936bb(0x1c1))+_0x5936bb(0x194),'message':_0x5936bb(0xaa)+_0x5f35db+',\x20but\x20node\x20'+_0x1d3bbc+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0xb450c1+'.'});}}}}function expressionReferencesVariable(_0x2ac3d5,_0x4bad6c){const _0x9f973c=a299_0x32ec5c;let _0x20a2b1=0x0;while(_0x20a2b1<_0x2ac3d5[_0x9f973c(0x124)]){const _0x5be023=_0x2ac3d5[_0x20a2b1];if(_0x5be023==='\x27'||_0x5be023==='\x22'){_0x20a2b1=skipQuotedExpressionSegment(_0x2ac3d5,_0x20a2b1,_0x5be023);continue;}if(!/[A-Za-z_]/[_0x9f973c(0xc8)](_0x5be023)){_0x20a2b1+=0x1;continue;}const _0x49f1ae=_0x20a2b1;_0x20a2b1+=0x1;while(_0x20a2b1<_0x2ac3d5['length']&&/[A-Za-z0-9_]/[_0x9f973c(0xc8)](_0x2ac3d5[_0x20a2b1])){_0x20a2b1+=0x1;}if(_0x2ac3d5[_0x9f973c(0xf1)](_0x49f1ae,_0x20a2b1)!==_0x4bad6c)continue;let _0x45bab3=_0x49f1ae-0x1;while(_0x45bab3>=0x0&&/\s/[_0x9f973c(0xc8)](_0x2ac3d5[_0x45bab3])){_0x45bab3-=0x1;}if(_0x2ac3d5[_0x45bab3]!=='.')return!![];}return![];}function a299_0x58a2(){const _0xefefce=['set','path','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','Edge\x20source\x20node\x20not\x20found:\x20','map','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','ROLE','10801548DdwJxB','forEach','transferCandidates\x20must\x20be\x20an\x20object.','flowJson.startPath','startPageId','__rabetbase_local_validation__','template','Duplicate\x20cc\x20recipient\x20userId:\x20','startPath\x20must\x20be\x20a\x20non-empty\x20string.','enabled','approval_sys_datasetCode','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20recipient\x20must\x20be\x20an\x20object.','resultVariable','Notification\x20configCode\x20is\x20required.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','.defaultFlow','formPermission','flowJson.nodes.','DAYS','Unsupported\x20flowType:\x20','type','approval_sys_appCode','.timeout.enabled','12DPdUDT','isFinite','].path','Duplicate\x20value:\x20','Notification\x20fact.','cc\x20must\x20be\x20an\x20object.','parse','value\x20must\x20be\x20a\x20non-empty\x20string.','array','FAIL','approval.simple-flow.v1','assignee','flowJson\x20must\x20be\x20an\x20object.','string','call','waypoints\x20must\x20be\x20an\x20array.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','INDEPENDENT_FLOW','\x20must\x20be\x20a\x20finite\x20number.','some','target','NOTIFICATION\x20node\x20requires\x20template.','configCode','.actions','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','timeout','.assignee.userIds[','catch','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Duplicate\x20edge\x20route:\x20','datasetCode','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','EMAIL','EXECUTE_BFF','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','ALL','Notification\x20recipient.type\x20is\x20required.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','async.enabled\x20must\x20be\x20a\x20boolean.','actions','APPROVAL','flowJson','.path','SINGLE','.id','templateName','async','overwrite','has','taskMode','SECONDS','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','startsWith','edges','.cc.recipientUserIds[','warnings','.timeout','test','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','CONTINUE','.timeout.interrupting','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','legacy_field_removed','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','includes','Unsupported\x20condition\x20type:\x20','flowJson.edges[','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','formData','flowName','.timeout.action','sequential','position.','indexOf','.async','readSources','.position','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','115914Fbvaho','get','datasetCode\x20must\x20be\x20a\x20string.','startPath','metadata','detailMarkdown','#/$defs/position','Node\x20has\x20no\x20outgoing\x20edge.','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.unit','pageId','Notification\x20template.','7754142TfEkoL','33554250FcPCKt','Rabetbase\x20FlowConfig','EXPRESSION\x20edge\x20requires\x20expression.','transferCandidates','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','formPermissions','slice','.\x20This\x20CLI\x20supports\x20only\x20','position','empty_metadata_removed','waypoints','.assignee','cc.recipientUserIds\x20supports\x20at\x20most\x20','edges\x20must\x20be\x20an\x20array.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','timeout\x20must\x20be\x20an\x20object.','number','name','Notification\x20fact\x20must\x20be\x20an\x20object.','https://lovrabet.com/schema/rabetbase-flow-config.json','flowCode','formSchema','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','targetNodeId','trim','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowJson.pageMode','isArray','\x20is\x20required.','pageIds','approval_sys_pageId','FIXED','version','.waypoints','toUpperCase','conditionType','label','Notification\x20template.facts\x20must\x20be\x20an\x20array.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','SCRIPT','AUTO_APPROVE','action','text','.type','.transferCandidates.userIds[','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Node\x20cannot\x20reach\x20any\x20END.','.failurePolicy','.waypoints[','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.value','.position.','title','length','flowKey','.text','NaN','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','Reserved\x20resultVariable:\x20','5ojYrxj','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.cc.readSources','size','\x20->\x20','config','^[1-9][0-9]*$','.source','integer','.pageId','timeout.enabled\x20must\x20be\x20a\x20boolean.','edge\x20source\x20is\x20required.','flowJson.nodes[','add','flowName\x20is\x20required.','ANY','256611PRStpb','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','pageMode','interrupting','async\x20must\x20be\x20an\x20object.','approval_sys_initiatorUserId','delete','mode','findIndex','HOURS','\x20was\x20empty\x20and\x20was\x20removed.','retryInterval','.async.retryInterval','MINUTES','matchAll','defaultFlow','entries','.facts','approved','699376tTZzPg','value','AUTO_REJECT','START','.assignee.strategy','.name','facts','schemaVersion','nodes','flowDesc','stringify','#/$defs/userId','prototype','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','Notification\x20template\x20supports\x20at\x20most\x20','.assignee.userIds','flowType\x20is\x20required.','Duplicate\x20resultVariable:\x20','userIds','formDefinitions','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','utf8','keys','FIXED\x20assignee\x20requires\x20userIds.','summary','.transferCandidates.userIds','flowJson.schemaVersion','^[A-Za-z_][A-Za-z0-9_]*$','pid','CONDITION','hasOwnProperty','approval_sys_','Duplicate\x20BPMN\x20element\x20id:\x20','Duplicate\x20node\x20id:\x20','.template','filter','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','bindDatasetCode','isSafeInteger','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','Node\x20is\x20not\x20reachable\x20from\x20START.','Notification\x20action\x20must\x20be\x20an\x20object.','.url','approval_sys_initiatorUsername','Unsupported\x20pageMode:\x20','.assignee.roleId','.conditionType','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','retryCount','EXPRESSION','Unsupported\x20schemaVersion:\x20','value\x20must\x20be\x20an\x20array.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','.cc.recipientUserIds','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','expression','END','49tVajFG','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','boolean','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','Edge\x20target\x20node\x20not\x20found:\x20','.timeout.resultVariable','replace','role','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','strategy','.expression','visible','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','.timeout.scriptName','ALWAYS','source','Notification\x20version\x20must\x20be\x20a\x20string.','.transferCandidates','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','#/$defs/flowEdge','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','BCC','https://json-schema.org/draft/2020-12/schema','scriptName','CUSTOM_PAGE','.transferCandidates.strategy','push','recipientUserIds','.recipients','\x20actions.','.tmp','duration\x20requires\x20value\x20and\x20unit.','isInteger','856920cxCSVg','.role','USER','appCode','duration','flowType','MAX_SAFE_INTEGER','object','HANDLE','REJECTED','flowJson.','unit','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','edge\x20name\x20must\x20be\x20a\x20string.','.resultVariable','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Unsupported\x20approval\x20mode:\x20','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','.cc.visible','flowDesc\x20must\x20be\x20a\x20string.','every','flowJson.edges','.configCode','NOTIFICATION','edge\x20target\x20is\x20required.','approval_sys_processInstanceId','failurePolicy','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','defaultFlow\x20must\x20be\x20a\x20boolean.','#/$defs/flowNode','sourceNodeId','approval_sys_operationType','.sequential','FORM_FLOW','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','SCRIPT\x20node\x20requires\x20scriptName.','.target','.approvalMode','flowJson.nodes','.detailMarkdown','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','APPROVED','join'];a299_0x58a2=function(){return _0xefefce;};return a299_0x58a2();}function skipQuotedExpressionSegment(_0xe5a922,_0x5ad3bb,_0x427f7a){let _0x31c2fc=_0x5ad3bb+0x1;while(_0x31c2fc<_0xe5a922['length']){if(_0xe5a922[_0x31c2fc]==='\x5c'){_0x31c2fc+=0x2;continue;}if(_0xe5a922[_0x31c2fc]===_0x427f7a)return _0x31c2fc+0x1;_0x31c2fc+=0x1;}return _0x31c2fc;}function resolveEffectiveResultVariable(_0x1e6525,_0x4c2be8){const _0x1197b9=a299_0x32ec5c;if(_0x1e6525===undefined||_0x1e6525===null||_0x4c2be8&&_0x1e6525==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1e6525!==_0x1197b9(0x204)||!VARIABLE_PATTERN[_0x1197b9(0xc8)](_0x1e6525)||RESERVED_RESULT_VARIABLES[_0x1197b9(0xbf)](_0x1e6525)||_0x1e6525[_0x1197b9(0xc3)](_0x1197b9(0x16e)))return undefined;return _0x1e6525;}function registerResultVariableOwner(_0x47cf9c,_0x450b87,_0x4e5bb1,_0x49b91a){const _0x5c6f1e=a299_0x32ec5c;if(_0x47cf9c[_0x5c6f1e(0xbf)](_0x450b87)){_0x49b91a['push']({'path':_0x5c6f1e(0x1d2),'message':_0x5c6f1e(0x15f)+_0x450b87+'.'});return;}_0x47cf9c['set'](_0x450b87,_0x4e5bb1);}function setsEqual(_0x128ed7,_0x5ba870){const _0x1e3c11=a299_0x32ec5c;return _0x128ed7['size']===_0x5ba870[_0x1e3c11(0x12e)]&&[..._0x128ed7][_0x1e3c11(0x1c0)](_0x33a494=>_0x5ba870[_0x1e3c11(0xbf)](_0x33a494));}function isValidUserId(_0x207c6f){const _0x1131fe=a299_0x32ec5c;if(typeof _0x207c6f==='string')return _0x207c6f[_0x1131fe(0x104)]()[_0x1131fe(0x124)]>0x0;return Number[_0x1131fe(0x175)](_0x207c6f)&&Number(_0x207c6f)>0x0;}function resolveEdgeEndpoint(_0x3c8dd4,_0xf49c25){const _0x1bb409=a299_0x32ec5c;if(typeof _0x3c8dd4===_0x1bb409(0x204)&&_0x3c8dd4[_0x1bb409(0x104)]())return _0x3c8dd4[_0x1bb409(0x104)]();if(typeof _0xf49c25===_0x1bb409(0x204)&&_0xf49c25[_0x1bb409(0x104)]())return _0xf49c25[_0x1bb409(0x104)]();return undefined;}function removeEmptyMetadata(_0x1ac7b2,_0x346d8b,_0x3fd873,_0x1101fd){const _0x3fa620=a299_0x32ec5c;if(Array[_0x3fa620(0x109)](_0x1ac7b2)){_0x1ac7b2['forEach']((_0x2dbdfe,_0xb69050)=>removeEmptyMetadata(_0x2dbdfe,_0x346d8b+'['+_0xb69050+']',_0x3fd873,_0x1101fd));return;}if(!isRecord(_0x1ac7b2))return;for(const [_0x72e0db,_0x1e41e2]of Object[_0x3fa620(0x14b)](_0x1ac7b2)){const _0x51c1c1=_0x346d8b+'.'+_0x72e0db;if(_0x72e0db===_0x3fa620(0xe2)&&isEmptyJsonValue(_0x1e41e2)){delete _0x1ac7b2[_0x72e0db],_0x1101fd['push'](_0x51c1c1),_0x3fd873[_0x3fa620(0x1a4)]({'code':_0x3fa620(0xf4),'path':_0x51c1c1,'message':_0x51c1c1+_0x3fa620(0x145)});continue;}removeEmptyMetadata(_0x1e41e2,_0x51c1c1,_0x3fd873,_0x1101fd);}}function isEmptyJsonValue(_0x36543a){const _0x500be6=a299_0x32ec5c;if(_0x36543a===null||_0x36543a===undefined)return!![];if(typeof _0x36543a===_0x500be6(0x204))return _0x36543a['trim']()==='';if(Array[_0x500be6(0x109)](_0x36543a))return _0x36543a['length']===0x0;return isRecord(_0x36543a)&&Object['keys'](_0x36543a)[_0x500be6(0x124)]===0x0;}function isRecord(_0x3e48ce){const _0x1ea95e=a299_0x32ec5c;return typeof _0x3e48ce==='object'&&_0x3e48ce!==null&&!Array[_0x1ea95e(0x109)](_0x3e48ce);}function cloneJsonValue(_0x5f33c9){const _0x432af6=a299_0x32ec5c;return JSON[_0x432af6(0x1fd)](JSON[_0x432af6(0x158)](_0x5f33c9));}export async function readFlowConfigFile(_0x5465ad){const _0x1b7633=a299_0x32ec5c,_0x4864e2=await readFile(resolve(_0x5465ad),_0x1b7633(0x164));return JSON[_0x1b7633(0x1fd)](_0x4864e2);}
|
|
1
|
+
const a299_0x348000=a299_0xc6d9;(function(_0x33e525,_0x283782){const _0x2f92fe=a299_0xc6d9,_0x1f0c49=_0x33e525();while(!![]){try{const _0x14223c=-parseInt(_0x2f92fe(0xdd))/0x1+parseInt(_0x2f92fe(0x1ff))/0x2*(parseInt(_0x2f92fe(0x144))/0x3)+-parseInt(_0x2f92fe(0x1fb))/0x4*(parseInt(_0x2f92fe(0xcb))/0x5)+-parseInt(_0x2f92fe(0x141))/0x6*(-parseInt(_0x2f92fe(0xe6))/0x7)+-parseInt(_0x2f92fe(0x19b))/0x8*(-parseInt(_0x2f92fe(0x1b3))/0x9)+parseInt(_0x2f92fe(0xfb))/0xa+-parseInt(_0x2f92fe(0x16d))/0xb*(parseInt(_0x2f92fe(0x159))/0xc);if(_0x14223c===_0x283782)break;else _0x1f0c49['push'](_0x1f0c49['shift']());}catch(_0x176871){_0x1f0c49['push'](_0x1f0c49['shift']());}}}(a299_0x156b,0xafe23));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_0x348000(0x176),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a299_0x348000(0x168),'type':'object','required':[a299_0x348000(0x1b1),a299_0x348000(0x1dc),a299_0x348000(0x13d)],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':a299_0x348000(0x185),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0x348000(0x1e2),'minimum':0x0},'y':{'type':a299_0x348000(0x1e2),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0xe5),a299_0x348000(0xde)],'properties':{'value':{'type':a299_0x348000(0x185),'minimum':0x1},'unit':{'enum':[a299_0x348000(0x193),a299_0x348000(0x1d8),a299_0x348000(0x177),a299_0x348000(0x18a)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x348000(0x1ef),'required':['id',a299_0x348000(0x14d),a299_0x348000(0x181),'position'],'properties':{'id':{'type':a299_0x348000(0x1df),'pattern':a299_0x348000(0x1cd)},'type':{'enum':[a299_0x348000(0x115),a299_0x348000(0x118),a299_0x348000(0x125),a299_0x348000(0x1d5),a299_0x348000(0xdc),'NOTIFICATION']},'name':{'type':a299_0x348000(0x1df),'minLength':0x1},'path':{'type':a299_0x348000(0x1df),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':['SINGLE',a299_0x348000(0x1af),a299_0x348000(0x1c6)]},'taskMode':{'enum':[a299_0x348000(0x125),a299_0x348000(0x14b)]},'assignee':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0x123)],'properties':{'strategy':{'enum':[a299_0x348000(0x1cf),'ROLE']},'userIds':{'type':a299_0x348000(0xdb),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a299_0x348000(0x185),'minimum':0x1},{'type':a299_0x348000(0x1df),'pattern':a299_0x348000(0x14e)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0x123),a299_0x348000(0x158)],'properties':{'strategy':{'const':a299_0x348000(0x1cf)},'userIds':{'type':a299_0x348000(0xdb),'minItems':0x1,'items':{'$ref':a299_0x348000(0x135)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0x348000(0x1aa),a299_0x348000(0xc4)]},'scriptName':{'type':a299_0x348000(0x1df),'minLength':0x1},'resultVariable':{'type':a299_0x348000(0x1df),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x348000(0x1ef),'properties':{'enabled':{'type':'boolean'},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x348000(0x1d3)}},'additionalProperties':!![]},'timeout':{'type':a299_0x348000(0x1ef),'properties':{'enabled':{'type':a299_0x348000(0x166)},'duration':{'$ref':a299_0x348000(0x1d3)},'action':{'enum':[a299_0x348000(0x1ac),a299_0x348000(0xba),a299_0x348000(0x19e)]},'interrupting':{'type':a299_0x348000(0x166)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x348000(0x1df),'pattern':a299_0x348000(0x1cd)}},'additionalProperties':!![]},'cc':{'type':a299_0x348000(0x1ef),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a299_0x348000(0xdb),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x348000(0x1df),'minLength':0x1}},'visible':{'type':a299_0x348000(0xdb),'uniqueItems':!![],'items':{'type':a299_0x348000(0x1df),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x348000(0x1ef),'required':['configCode',a299_0x348000(0xe4)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x348000(0x1df),'minLength':0x1},'failurePolicy':{'enum':[a299_0x348000(0x11b),a299_0x348000(0x109)]},'template':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0xe3),a299_0x348000(0x161)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a299_0x348000(0x1df),'minLength':0x1},'detailMarkdown':{'type':a299_0x348000(0x1df)},'facts':{'type':'array','maxItems':0x8,'items':{'type':'object','required':[a299_0x348000(0x19f),a299_0x348000(0xe5)],'properties':{'label':{'type':a299_0x348000(0x1df),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0xdf),'url'],'properties':{'text':{'type':a299_0x348000(0x1df),'minLength':0x1},'url':{'type':a299_0x348000(0x1df),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x348000(0xdb),'items':{'type':a299_0x348000(0x1ef),'required':['type',a299_0x348000(0xe5)],'properties':{'type':{'enum':[a299_0x348000(0x1a5),a299_0x348000(0x152),a299_0x348000(0xda)]},'value':{'type':a299_0x348000(0x1df),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x348000(0x1cb)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x348000(0x1ef),'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a299_0x348000(0x1df),'minLength':0x1},'target':{'type':a299_0x348000(0x1df),'minLength':0x1},'sourceNodeId':{'type':a299_0x348000(0x1df),'minLength':0x1},'targetNodeId':{'type':a299_0x348000(0x1df),'minLength':0x1},'conditionType':{'enum':[a299_0x348000(0xec),'APPROVED','REJECTED',a299_0x348000(0xd2)]},'expression':{'type':'string'},'defaultFlow':{'type':'boolean'},'name':{'type':a299_0x348000(0x1df)},'waypoints':{'type':a299_0x348000(0xdb),'items':{'$ref':a299_0x348000(0x1ca)}}},'allOf':[{'anyOf':[{'required':[a299_0x348000(0x1a3)]},{'required':[a299_0x348000(0x209)]}]},{'anyOf':[{'required':[a299_0x348000(0x20b)]},{'required':[a299_0x348000(0x1f2)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x348000(0x1df),'minLength':0x1},'flowDesc':{'type':a299_0x348000(0x1df)},'flowType':{'enum':[a299_0x348000(0x155),a299_0x348000(0x154)]},'datasetCode':{'type':a299_0x348000(0x1df),'minLength':0x1},'pageId':{'type':a299_0x348000(0x185),'minimum':0x1,'maximum':Number[a299_0x348000(0x10c)]},'pageIds':{'type':a299_0x348000(0xdb),'items':{'type':a299_0x348000(0x185),'minimum':0x1,'maximum':Number[a299_0x348000(0x10c)]}},'templateName':![],'flowJson':{'type':a299_0x348000(0x1ef),'required':[a299_0x348000(0xb1),a299_0x348000(0x157)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x348000(0x1df),'const':a299_0x348000(0x139),'description':a299_0x348000(0xf3)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a299_0x348000(0xdb),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a299_0x348000(0xdb),'minItems':0x1,'items':{'$ref':a299_0x348000(0xaa)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x348000(0x13c),a299_0x348000(0x1ea),a299_0x348000(0x1b1),a299_0x348000(0x145),a299_0x348000(0x116),a299_0x348000(0x15f),a299_0x348000(0x1d1),a299_0x348000(0x126)],REMOVED_ROOT_FIELDS=['id','appCode','templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x348000(0x139),NODE_TYPES=new Set([a299_0x348000(0x115),a299_0x348000(0x118),'APPROVAL',a299_0x348000(0x1d5),a299_0x348000(0xdc),a299_0x348000(0x131)]),CONDITION_TYPES=new Set([a299_0x348000(0xec),'APPROVED',a299_0x348000(0xc4),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0x348000(0x203),a299_0x348000(0x1af),a299_0x348000(0x1c6)]),APPROVAL_TASK_MODES=new Set(['APPROVAL','HANDLE']),FLOW_TIME_UNITS=new Set([a299_0x348000(0x193),a299_0x348000(0x1d8),'HOURS','DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x348000(0x1ac),a299_0x348000(0xba),a299_0x348000(0x19e)]),FLOW_TYPES=new Set([a299_0x348000(0x155),a299_0x348000(0x154)]),FLOW_PAGE_MODES=new Set([a299_0x348000(0x136),a299_0x348000(0x10f)]),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_0x348000(0x11b),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a299_0x348000(0x152),a299_0x348000(0xda)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x348000(0x1cb)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x348000(0x1a2),UNSUPPORTED_FORM_MESSAGE=a299_0x348000(0x1e6),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x348000(0xa7),RESERVED_RESULT_VARIABLES=new Set([a299_0x348000(0x122),a299_0x348000(0xe8),a299_0x348000(0x111),a299_0x348000(0xc9),'approval_sys_initiatorUserId','approval_sys_initiatorUsername',a299_0x348000(0x18b),a299_0x348000(0x1c1),a299_0x348000(0xd5),a299_0x348000(0xd3)]);export function normalizeFlowConfig(_0x24e290){const _0x11a427=a299_0x348000;if(!isRecord(_0x24e290))throw new TypeError(_0x11a427(0x1e3));const _0x2e3a6c=cloneJsonValue(_0x24e290),_0x301d9b=_0x2e3a6c['flowJson'],_0x2cd7e5=isRecord(_0x301d9b)?cloneJsonValue(_0x301d9b):{},_0x677353=[],_0x50925b=[];for(const _0x2d0e59 of REMOVED_ROOT_FIELDS){if(!Object[_0x11a427(0x121)]['hasOwnProperty'][_0x11a427(0x1a7)](_0x2e3a6c,_0x2d0e59))continue;delete _0x2e3a6c[_0x2d0e59],_0x50925b[_0x11a427(0x20c)](_0x2d0e59),_0x677353[_0x11a427(0x20c)]({'code':_0x11a427(0x165),'path':_0x2d0e59,'message':_0x2d0e59+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x599e9d of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x11a427(0x121)][_0x11a427(0xfd)][_0x11a427(0x1a7)](_0x2cd7e5,_0x599e9d))continue;const _0x299653=_0x11a427(0x202)+_0x599e9d;delete _0x2cd7e5[_0x599e9d],_0x50925b[_0x11a427(0x20c)](_0x299653),_0x677353['push']({'code':'legacy_field_removed','path':_0x299653,'message':_0x299653+_0x11a427(0x108)});}if(Object[_0x11a427(0x121)][_0x11a427(0xfd)][_0x11a427(0x1a7)](_0x2cd7e5,_0x11a427(0x138))){const _0x557934=_0x2cd7e5[_0x11a427(0x138)],_0x4e058e=typeof _0x557934===_0x11a427(0x1df)?_0x557934[_0x11a427(0x14f)]():_0x557934;if(isEmptyJsonValue(_0x557934)||_0x4e058e===DEFAULT_FLOW_SCHEMA_VERSION){const _0x128c92=_0x11a427(0x1ad);delete _0x2cd7e5[_0x11a427(0x138)],_0x50925b[_0x11a427(0x20c)](_0x128c92),_0x677353['push']({'code':_0x11a427(0x165),'path':_0x128c92,'message':_0x128c92+_0x11a427(0x151)+DEFAULT_FLOW_SCHEMA_VERSION+_0x11a427(0x183)});}}removeEmptyMetadata(_0x2cd7e5,'flowJson',_0x677353,_0x50925b);_0x2e3a6c[_0x11a427(0x1dc)]===_0x11a427(0x154)&&!Object[_0x11a427(0x121)][_0x11a427(0xfd)][_0x11a427(0x1a7)](_0x2cd7e5,_0x11a427(0x106))&&(_0x2cd7e5[_0x11a427(0x106)]=_0x11a427(0x136));_0x2e3a6c[_0x11a427(0x13d)]=_0x2cd7e5;if(typeof _0x2e3a6c['flowName']===_0x11a427(0x1df))_0x2e3a6c['flowName']=_0x2e3a6c['flowName'][_0x11a427(0x14f)]();return{'config':_0x2e3a6c,'warnings':_0x677353,'removedPaths':_0x50925b};}export function validateFlowConfig(_0x9b6bc9){const _0x22017d=a299_0x348000;let _0x3f4bf9;try{_0x3f4bf9=normalizeFlowConfig(_0x9b6bc9);}catch(_0x3745c8){const _0xa63f77=_0x3745c8 instanceof Error?_0x3745c8[_0x22017d(0xbf)]:String(_0x3745c8),_0x423292={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0xa63f77}],'warnings':[],'normalized':_0x423292,'validationConfig':_0x423292};}const _0x3ac46e=_0x3f4bf9[_0x22017d(0x12b)],_0x5b01a8=cloneJsonValue(_0x3ac46e),_0x52c6b9=_0x5b01a8['flowJson'];_0x52c6b9[_0x22017d(0x13c)]='__rabetbase_local_validation__',_0x52c6b9[_0x22017d(0x1b1)]=_0x3ac46e[_0x22017d(0x1b1)];typeof _0x3ac46e[_0x22017d(0x116)]===_0x22017d(0x1df)&&_0x3ac46e[_0x22017d(0x116)][_0x22017d(0x14f)]()&&(_0x52c6b9[_0x22017d(0x145)]=_0x3ac46e['datasetCode']['trim']());const _0x50ed61=[];return validateOuterMetadata(_0x3ac46e,_0x50ed61),validateFlowClassification(_0x3ac46e,_0x50ed61),validateGraph(_0x3ac46e[_0x22017d(0x13d)],_0x50ed61),{'valid':_0x50ed61['length']===0x0,'errors':_0x50ed61,'warnings':_0x3f4bf9[_0x22017d(0xab)],'normalized':_0x3ac46e,'validationConfig':_0x5b01a8};}function validateFlowClassification(_0xdfb9db,_0x2b05c3){const _0x435787=a299_0x348000;if(!isRecord(_0xdfb9db[_0x435787(0x13d)]))return;const _0x4724be=_0xdfb9db['flowType'],_0xde6a96=_0xdfb9db[_0x435787(0x13d)][_0x435787(0x106)];_0xde6a96!==undefined&&(typeof _0xde6a96!==_0x435787(0x1df)||!FLOW_PAGE_MODES['has'](_0xde6a96))&&_0x2b05c3[_0x435787(0x20c)]({'path':_0x435787(0xd8),'message':'Unsupported\x20pageMode:\x20'+String(_0xde6a96)+'.'});_0x4724be==='FORM_FLOW'&&_0xde6a96!==undefined&&_0x2b05c3[_0x435787(0x20c)]({'path':_0x435787(0xd8),'message':_0x435787(0x1eb)});_0x4724be===_0x435787(0x154)&&_0xde6a96===_0x435787(0x10f)&&_0x2b05c3['push']({'path':_0x435787(0xd8),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x4724be===_0x435787(0x155)||_0x4724be===_0x435787(0x154))&&validateCustomPageNavigation(_0xdfb9db,_0x4724be,_0xde6a96,_0x2b05c3);if(_0x4724be!==_0x435787(0x155)||!Array[_0x435787(0x162)](_0xdfb9db['flowJson'][_0x435787(0xb1)]))return;_0xdfb9db[_0x435787(0x13d)][_0x435787(0xb1)][_0x435787(0x16e)]((_0x28218f,_0x1f7525)=>{const _0x17b822=_0x435787;isRecord(_0x28218f)&&_0x28218f[_0x17b822(0x14d)]===_0x17b822(0x125)&&_0x28218f[_0x17b822(0x1b6)]==='HANDLE'&&_0x2b05c3[_0x17b822(0x20c)]({'path':_0x17b822(0xc1)+_0x1f7525+_0x17b822(0x1fd),'message':_0x17b822(0x12a)});});}function validateCustomPageNavigation(_0x1337ba,_0x2bc7c0,_0x17b034,_0x5cf17d){const _0x379753=a299_0x348000,_0x2183c6=_0x1337ba[_0x379753(0x13d)]['startPageId'];_0x2183c6!==undefined&&_0x5cf17d['push']({'path':'flowJson.startPageId','message':_0x379753(0x1b0)});const _0x3fd90b=_0x1337ba[_0x379753(0x13d)][_0x379753(0x102)];_0x3fd90b!==undefined&&(typeof _0x3fd90b!==_0x379753(0x1df)||_0x3fd90b[_0x379753(0x14f)]()==='')&&_0x5cf17d[_0x379753(0x20c)]({'path':_0x379753(0xf2),'message':_0x379753(0x140)});const _0x2051e0=Array['isArray'](_0x1337ba[_0x379753(0x13d)][_0x379753(0xb1)])?_0x1337ba[_0x379753(0x13d)][_0x379753(0xb1)]['map']((_0x31fb58,_0x31c52c)=>({'node':_0x31fb58,'index':_0x31c52c}))['filter'](({node:_0x4acf5a})=>isRecord(_0x4acf5a)&&_0x4acf5a[_0x379753(0x1e9)]!==undefined):[],_0x365eb1=_0x3fd90b!==undefined||_0x2051e0[_0x379753(0x1fe)]>0x0,_0x5595df=_0x17b034===undefined&&_0x2bc7c0===_0x379753(0x154)?_0x379753(0x136):_0x17b034;_0x365eb1&&(_0x2bc7c0!==_0x379753(0x154)||_0x5595df!==_0x379753(0x136))&&(_0x3fd90b!==undefined&&_0x5cf17d[_0x379753(0x20c)]({'path':_0x379753(0xf2),'message':_0x379753(0x169)}),_0x2051e0[_0x379753(0x16e)](({index:_0x310a1a})=>{const _0x4332f2=_0x379753;_0x5cf17d['push']({'path':_0x4332f2(0xc1)+_0x310a1a+'].path','message':_0x4332f2(0x128)});}));}export async function writeNormalizedFlowConfig(_0x2c7791,_0x546cf5,_0x509ce1={}){const _0x44642f=a299_0x348000,_0x1f313d=resolve(_0x2c7791),_0x59ed0c=_0x1f313d+'.'+process[_0x44642f(0x1c8)]+'.'+randomUUID()+_0x44642f(0x17e),_0x321afb=JSON['stringify'](_0x546cf5,null,0x2)+'\x0a';let _0x44b32a;try{try{_0x44b32a=(await stat(_0x1f313d))['mode']&0x1ff;}catch{_0x44b32a=undefined;}await writeFile(_0x59ed0c,_0x321afb,{'encoding':_0x44642f(0xf8),'flag':'wx','mode':_0x44b32a??0x1a4});if(_0x44b32a!==undefined)await chmod(_0x59ed0c,_0x44b32a);_0x509ce1[_0x44642f(0x164)]===![]?(await link(_0x59ed0c,_0x1f313d),await unlink(_0x59ed0c)):await rename(_0x59ed0c,_0x1f313d);}finally{await unlink(_0x59ed0c)['catch'](()=>undefined);}}function validateOuterMetadata(_0x5c8c56,_0x3fb2c8){const _0x2d5fc3=a299_0x348000;(typeof _0x5c8c56[_0x2d5fc3(0x1b1)]!==_0x2d5fc3(0x1df)||_0x5c8c56[_0x2d5fc3(0x1b1)][_0x2d5fc3(0x14f)]()==='')&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x1b1),'message':'flowName\x20is\x20required.'});_0x5c8c56[_0x2d5fc3(0xf7)]!==undefined&&typeof _0x5c8c56[_0x2d5fc3(0xf7)]!=='string'&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0xf7),'message':_0x2d5fc3(0xb3)});if(_0x5c8c56['flowType']===undefined||_0x5c8c56[_0x2d5fc3(0x1dc)]===null)_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x1dc),'message':_0x2d5fc3(0x1ee)});else(typeof _0x5c8c56[_0x2d5fc3(0x1dc)]!==_0x2d5fc3(0x1df)||!FLOW_TYPES[_0x2d5fc3(0x137)](_0x5c8c56[_0x2d5fc3(0x1dc)]))&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':'flowType','message':_0x2d5fc3(0x19a)+String(_0x5c8c56[_0x2d5fc3(0x1dc)])+'.'});_0x5c8c56[_0x2d5fc3(0x116)]!==undefined&&typeof _0x5c8c56['datasetCode']!==_0x2d5fc3(0x1df)&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x116),'message':_0x2d5fc3(0x1c4)});_0x5c8c56['pageIds']===undefined&&_0x5c8c56[_0x2d5fc3(0x1d1)]!==undefined&&(!Number[_0x2d5fc3(0x107)](_0x5c8c56['pageId'])||_0x5c8c56[_0x2d5fc3(0x1d1)]<=0x0)&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x1d1),'message':_0x2d5fc3(0x1e1)});if(_0x5c8c56[_0x2d5fc3(0x175)]!==undefined){if(!Array[_0x2d5fc3(0x162)](_0x5c8c56['pageIds'])||_0x5c8c56[_0x2d5fc3(0x175)][_0x2d5fc3(0x143)](_0x56294e=>!Number['isSafeInteger'](_0x56294e)||_0x56294e<=0x0))_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x175),'message':_0x2d5fc3(0x15e)});else[...new Set(_0x5c8c56['pageIds'])][_0x2d5fc3(0x18e)](',')[_0x2d5fc3(0x1fe)]>0x800&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':'pageIds','message':_0x2d5fc3(0x208)});_0x5c8c56[_0x2d5fc3(0x1dc)]===_0x2d5fc3(0x154)&&Array[_0x2d5fc3(0x162)](_0x5c8c56['pageIds'])&&_0x5c8c56['pageIds'][_0x2d5fc3(0x1fe)]>0x0&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x175),'message':_0x2d5fc3(0x1c9)});}_0x5c8c56[_0x2d5fc3(0x1dc)]===_0x2d5fc3(0x154)&&_0x5c8c56[_0x2d5fc3(0x116)]!==undefined&&_0x3fb2c8['push']({'path':_0x2d5fc3(0x116),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x5c8c56[_0x2d5fc3(0x1dc)]==='INDEPENDENT_FLOW'&&_0x5c8c56[_0x2d5fc3(0x175)]===undefined&&_0x5c8c56['pageId']!==undefined&&_0x3fb2c8[_0x2d5fc3(0x20c)]({'path':_0x2d5fc3(0x1d1),'message':_0x2d5fc3(0xb2)});}function validateGraph(_0x3ca5c4,_0x5f1540){const _0x1d1397=a299_0x348000;if(!isRecord(_0x3ca5c4)){_0x5f1540[_0x1d1397(0x20c)]({'path':'flowJson','message':_0x1d1397(0x1c7)});return;}!Array[_0x1d1397(0x162)](_0x3ca5c4[_0x1d1397(0xb1)])&&_0x5f1540['push']({'path':_0x1d1397(0xa4),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array['isArray'](_0x3ca5c4[_0x1d1397(0x157)])&&_0x5f1540[_0x1d1397(0x20c)]({'path':_0x1d1397(0x1b9),'message':_0x1d1397(0x15b)});Object[_0x1d1397(0x121)][_0x1d1397(0xfd)]['call'](_0x3ca5c4,'schemaVersion')&&_0x5f1540[_0x1d1397(0x20c)]({'path':_0x1d1397(0x1ad),'message':_0x1d1397(0xf1)+String(_0x3ca5c4[_0x1d1397(0x138)])+_0x1d1397(0x1f9)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x51f450 of['formSchema',_0x1d1397(0x1be),'formPermissions']){Object[_0x1d1397(0x121)][_0x1d1397(0xfd)][_0x1d1397(0x1a7)](_0x3ca5c4,_0x51f450)&&_0x5f1540['push']({'path':_0x1d1397(0x202)+_0x51f450,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x3ca5c4[_0x1d1397(0xb1)])||!Array[_0x1d1397(0x162)](_0x3ca5c4[_0x1d1397(0x157)]))return;const _0xbb7241=new Map(),_0x2f15a0=[],_0x275d57=[],_0x35a7c3=new Map(),_0x166747=new Map(),_0x5df9f4=new Set();let _0x4f88ec=0x0;_0x3ca5c4['nodes'][_0x1d1397(0x16e)]((_0x598141,_0x40cea1)=>{const _0x5f6e6f=_0x1d1397,_0x46d89b=_0x5f6e6f(0xc1)+_0x40cea1+']';if(!isRecord(_0x598141)){_0x5f1540[_0x5f6e6f(0x20c)]({'path':_0x46d89b,'message':_0x5f6e6f(0x105)});return;}const _0x278dc2=_0x598141;if(typeof _0x278dc2['id']!==_0x5f6e6f(0x1df)||!BPMN_ID_PATTERN[_0x5f6e6f(0x1a0)](_0x278dc2['id']))_0x5f1540['push']({'path':_0x46d89b+_0x5f6e6f(0x180),'message':_0x5f6e6f(0x1d7)});else _0xbb7241[_0x5f6e6f(0x137)](_0x278dc2['id'])?_0x5f1540[_0x5f6e6f(0x20c)]({'path':_0x46d89b+_0x5f6e6f(0x180),'message':'Duplicate\x20node\x20id:\x20'+_0x278dc2['id']+'.'}):(_0xbb7241[_0x5f6e6f(0x16f)](_0x278dc2['id'],_0x278dc2),_0x5df9f4[_0x5f6e6f(0x10b)](_0x278dc2['id']));if(!NODE_TYPES[_0x5f6e6f(0x137)](_0x278dc2[_0x5f6e6f(0x14d)]))_0x5f1540[_0x5f6e6f(0x20c)]({'path':_0x46d89b+'.type','message':_0x5f6e6f(0xeb)+String(_0x278dc2['type'])+'.'});else{if(_0x278dc2[_0x5f6e6f(0x14d)]===_0x5f6e6f(0x115))_0x2f15a0[_0x5f6e6f(0x20c)](_0x278dc2['id']);else _0x278dc2['type']===_0x5f6e6f(0x118)&&_0x275d57[_0x5f6e6f(0x20c)](_0x278dc2['id']);}_0x278dc2[_0x5f6e6f(0x14d)]===_0x5f6e6f(0x125)&&(_0x278dc2[_0x5f6e6f(0x1b6)]===undefined||_0x278dc2['taskMode']===_0x5f6e6f(0x125))&&(_0x4f88ec+=0x1);validateNode(_0x278dc2,_0x46d89b,_0x5f1540);if(_0x278dc2[_0x5f6e6f(0x14d)]===_0x5f6e6f(0xdc)){const _0x1e013f=resolveEffectiveResultVariable(_0x278dc2['resultVariable'],![]);_0x1e013f&&(registerResultVariableOwner(_0x166747,_0x1e013f,_0x278dc2['id'],_0x5f1540),!_0x35a7c3[_0x5f6e6f(0x137)](_0x1e013f)&&_0x35a7c3[_0x5f6e6f(0x16f)](_0x1e013f,_0x278dc2['id']));}if(_0x278dc2[_0x5f6e6f(0x14d)]===_0x5f6e6f(0x125)&&isRecord(_0x278dc2[_0x5f6e6f(0xee)])&&_0x278dc2['timeout'][_0x5f6e6f(0x127)]===!![]&&_0x278dc2['timeout'][_0x5f6e6f(0x198)]==='EXECUTE_BFF'){const _0x2d591f=resolveEffectiveResultVariable(_0x278dc2[_0x5f6e6f(0xee)][_0x5f6e6f(0x17c)],!![]);_0x2d591f&®isterResultVariableOwner(_0x166747,_0x2d591f,_0x278dc2['id']+_0x5f6e6f(0x171),_0x5f1540);}});_0x2f15a0['length']!==0x1&&_0x5f1540['push']({'path':_0x1d1397(0xa4),'message':_0x1d1397(0x17f)});_0x275d57[_0x1d1397(0x1fe)]===0x0&&_0x5f1540[_0x1d1397(0x20c)]({'path':_0x1d1397(0xa4),'message':_0x1d1397(0x1ce)});const _0x3f9735=new Map(),_0x31b3d1=new Map(),_0x3de615=new Map(),_0x38db1f=new Set();_0x3ca5c4['edges'][_0x1d1397(0x16e)]((_0x2846b7,_0x3556b0)=>{const _0x5060c0=_0x1d1397,_0x5a97bf=_0x5060c0(0xc3)+_0x3556b0+']';if(!isRecord(_0x2846b7)){_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf,'message':_0x5060c0(0x1d6)});return;}const _0x3a2e7a=_0x2846b7;_0x3de615[_0x5060c0(0x16f)](_0x3a2e7a,_0x5a97bf);const _0x386414=resolveEdgeEndpoint(_0x3a2e7a[_0x5060c0(0x1a3)],_0x3a2e7a[_0x5060c0(0x209)]),_0x19e0eb=resolveEdgeEndpoint(_0x3a2e7a[_0x5060c0(0x20b)],_0x3a2e7a['targetNodeId']);if(!_0x386414)_0x5f1540['push']({'path':_0x5a97bf+'.source','message':_0x5060c0(0x1b8)});if(!_0x19e0eb)_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf+_0x5060c0(0xcf),'message':_0x5060c0(0xc7)});_0x386414&&!_0xbb7241[_0x5060c0(0x137)](_0x386414)&&_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf+'.source','message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x386414+'.'});_0x19e0eb&&!_0xbb7241[_0x5060c0(0x137)](_0x19e0eb)&&_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf+_0x5060c0(0xcf),'message':_0x5060c0(0xf5)+_0x19e0eb+'.'});if(_0x3a2e7a['id']!==undefined){if(typeof _0x3a2e7a['id']!=='string'||!BPMN_ID_PATTERN['test'](_0x3a2e7a['id']))_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf+_0x5060c0(0x180),'message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x5df9f4[_0x5060c0(0x137)](_0x3a2e7a['id']))_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf+_0x5060c0(0x180),'message':_0x5060c0(0xd1)+_0x3a2e7a['id']+'.'});else!_0x5df9f4['has'](_0x3a2e7a['id'])&&_0x5df9f4['add'](_0x3a2e7a['id']);}}if(_0x386414&&_0x19e0eb){const _0x481f8b=_0x386414+'\x00'+_0x19e0eb+'\x00'+(_0x3a2e7a[_0x5060c0(0x13a)]??_0x5060c0(0xec));_0x38db1f[_0x5060c0(0x137)](_0x481f8b)?_0x5f1540[_0x5060c0(0x20c)]({'path':_0x5a97bf,'message':_0x5060c0(0xfa)+_0x386414+_0x5060c0(0xed)+_0x19e0eb+'\x20('+(_0x3a2e7a['conditionType']??_0x5060c0(0xec))+').'}):_0x38db1f[_0x5060c0(0x10b)](_0x481f8b);}validateEdge(_0x3a2e7a,_0x5a97bf,_0x5f1540),_0x386414&&_0x19e0eb&&(_0x3f9735[_0x5060c0(0x101)](_0x386414)?.[_0x5060c0(0x20c)](_0x3a2e7a)??_0x3f9735[_0x5060c0(0x16f)](_0x386414,[_0x3a2e7a]),_0x31b3d1[_0x5060c0(0x101)](_0x19e0eb)?.[_0x5060c0(0x20c)](_0x3a2e7a)??_0x31b3d1['set'](_0x19e0eb,[_0x3a2e7a]));});if(_0x2f15a0[_0x1d1397(0x1fe)]!==0x1)return;validateGraphShape(_0xbb7241,_0x2f15a0[0x0],_0x275d57,_0x3f9735,_0x31b3d1,_0x3de615,_0x5f1540),validateScriptResultReferences(_0xbb7241,_0x2f15a0[0x0],_0x3f9735,_0x31b3d1,_0x3de615,_0x35a7c3,_0x5f1540),validateApprovalResults(_0xbb7241,_0x4f88ec,_0x275d57,_0x5f1540);}function validateNode(_0x16100b,_0x459f41,_0x5b7467){const _0x57e542=a299_0x348000;for(const _0x2685bc of[_0x57e542(0xa6),_0x57e542(0x104)]){Object[_0x57e542(0x121)][_0x57e542(0xfd)]['call'](_0x16100b,_0x2685bc)&&_0x5b7467['push']({'path':_0x459f41+'.'+_0x2685bc,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x16100b['type']))return;(typeof _0x16100b[_0x57e542(0x181)]!==_0x57e542(0x1df)||_0x16100b['name'][_0x57e542(0x14f)]()==='')&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0xad),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x16100b[_0x57e542(0x1d1)]!==undefined&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0xd6),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x16100b[_0x57e542(0x1e9)]!==undefined){if(typeof _0x16100b[_0x57e542(0x1e9)]!==_0x57e542(0x1df)||_0x16100b[_0x57e542(0x1e9)][_0x57e542(0x14f)]()==='')_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+'.path','message':_0x57e542(0x117)});else _0x16100b['type']!==_0x57e542(0x125)&&_0x16100b[_0x57e542(0x14d)]!==_0x57e542(0x118)&&_0x5b7467['push']({'path':_0x459f41+_0x57e542(0x156),'message':_0x57e542(0x1fa)});}const _0x698367=_0x16100b[_0x57e542(0x200)];if(!isRecord(_0x698367))_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x16b),'message':_0x57e542(0x1c5)});else for(const _0x145dfd of['x','y']){const _0x3a4377=_0x698367[_0x145dfd];(typeof _0x3a4377!==_0x57e542(0x1e2)||!Number['isFinite'](_0x3a4377)||_0x3a4377<0x0)&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x163)+_0x145dfd,'message':_0x57e542(0x11c)+_0x145dfd+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x16100b['type']==='APPROVAL'){const _0x46f79e=_0x16100b[_0x57e542(0x13f)]??'SINGLE',_0x51bfd9=_0x16100b['taskMode']??_0x57e542(0x125);!APPROVAL_TASK_MODES[_0x57e542(0x137)](_0x51bfd9)&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x112),'message':_0x57e542(0xe9)+String(_0x51bfd9)+'.'});!APPROVAL_MODES[_0x57e542(0x137)](_0x46f79e)&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x1c3),'message':_0x57e542(0x11f)+String(_0x46f79e)+'.'});if(!isRecord(_0x16100b['assignee']))_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+'.assignee','message':_0x57e542(0x1ed)});else{const _0x16f36d=_0x16100b[_0x57e542(0x1bc)]['strategy'];_0x16f36d!==_0x57e542(0x1cf)&&_0x16f36d!==_0x57e542(0x152)&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x1ec),'message':_0x57e542(0xa5)});if(_0x16f36d==='FIXED'){const _0x407113=_0x16100b[_0x57e542(0x1bc)]['userIds'];if(!Array[_0x57e542(0x162)](_0x407113)||_0x407113['length']===0x0)_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0xb9),'message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x57adfb=_0x407113[_0x57e542(0x16a)](_0xe451de=>!isValidUserId(_0xe451de));_0x57adfb>=0x0&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x172)+_0x57adfb+']','message':_0x57e542(0xfc)});const _0x4356bb=new Set(_0x407113['filter'](isValidUserId)[_0x57e542(0x1fc)](_0x42db8f=>String(_0x42db8f)[_0x57e542(0x14f)]()));_0x46f79e===_0x57e542(0x203)&&_0x4356bb[_0x57e542(0xa9)]>0x1&&_0x5b7467['push']({'path':_0x459f41+_0x57e542(0xb9),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x16f36d===_0x57e542(0x152)){const _0x503119=_0x16100b[_0x57e542(0x1bc)][_0x57e542(0xce)],_0x6baeec=typeof _0x503119===_0x57e542(0x1e2)||typeof _0x503119===_0x57e542(0x1df)?Number(String(_0x503119)[_0x57e542(0x14f)]()):Number[_0x57e542(0xea)];(!Number['isSafeInteger'](_0x6baeec)||_0x6baeec<=0x0)&&_0x5b7467['push']({'path':_0x459f41+'.assignee.roleId','message':_0x57e542(0xd4)});}}if(_0x16100b['transferCandidates']!==undefined){if(!isRecord(_0x16100b['transferCandidates']))_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x167),'message':_0x57e542(0x10a)});else{if(_0x16100b[_0x57e542(0x110)][_0x57e542(0x123)]!==_0x57e542(0x1cf))_0x5b7467['push']({'path':_0x459f41+'.transferCandidates.strategy','message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x4409ab=_0x16100b[_0x57e542(0x110)][_0x57e542(0x158)];if(!Array[_0x57e542(0x162)](_0x4409ab)||_0x4409ab[_0x57e542(0x1fe)]===0x0)_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x1b7),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x54ac45=_0x4409ab[_0x57e542(0x16a)](_0x5821da=>!isValidUserId(_0x5821da));_0x54ac45>=0x0&&_0x5b7467['push']({'path':_0x459f41+'.transferCandidates.userIds['+_0x54ac45+']','message':_0x57e542(0x103)});}}}}}_0x16100b[_0x57e542(0x19c)]!==undefined&&typeof _0x16100b['sequential']!==_0x57e542(0x166)&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x1c2),'message':_0x57e542(0x1cc)});if(_0x16100b['type']==='SCRIPT'){(typeof _0x16100b['scriptName']!==_0x57e542(0x1df)||_0x16100b[_0x57e542(0x132)][_0x57e542(0x14f)]()==='')&&_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0x17a),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x16100b[_0x57e542(0x17c)]!==undefined){if(typeof _0x16100b['resultVariable']!==_0x57e542(0x1df)||!VARIABLE_PATTERN['test'](_0x16100b[_0x57e542(0x17c)]))_0x5b7467[_0x57e542(0x20c)]({'path':_0x459f41+_0x57e542(0xaf),'message':_0x57e542(0x16c)});else(RESERVED_RESULT_VARIABLES[_0x57e542(0x137)](_0x16100b[_0x57e542(0x17c)])||_0x16100b[_0x57e542(0x17c)][_0x57e542(0x14a)](_0x57e542(0x15a)))&&_0x5b7467['push']({'path':_0x459f41+_0x57e542(0xaf),'message':_0x57e542(0x10e)+_0x16100b[_0x57e542(0x17c)]+'.'});}}validateAsyncExecution(_0x16100b,_0x459f41,_0x5b7467),validateApprovalTimeout(_0x16100b,_0x459f41,_0x5b7467),validateCcConfig(_0x16100b,_0x459f41,_0x5b7467),_0x16100b[_0x57e542(0x14d)]==='NOTIFICATION'&&validateNotificationConfig(_0x16100b[_0x57e542(0x12b)],_0x459f41+_0x57e542(0xf6),_0x5b7467);}function validateAsyncExecution(_0x2e5018,_0x4cd6bd,_0x2091b6){const _0x30ac19=a299_0x348000;if(_0x2e5018[_0x30ac19(0xbb)]===undefined)return;if(!isRecord(_0x2e5018['async'])){_0x2091b6[_0x30ac19(0x20c)]({'path':_0x4cd6bd+_0x30ac19(0x1e5),'message':_0x30ac19(0x10d)});return;}if(_0x2e5018[_0x30ac19(0xbb)]['enabled']!==undefined&&typeof _0x2e5018['async'][_0x30ac19(0x127)]!==_0x30ac19(0x166)){_0x2091b6[_0x30ac19(0x20c)]({'path':_0x4cd6bd+'.async.enabled','message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x2e5018[_0x30ac19(0xbb)]['enabled']!==!![])return;_0x2e5018[_0x30ac19(0x14d)]!==_0x30ac19(0xdc)&&_0x2091b6['push']({'path':_0x4cd6bd+_0x30ac19(0x1e5),'message':_0x30ac19(0x1e0)});const _0x37b467=_0x2e5018['async'][_0x30ac19(0xb5)]??0x3;(!Number[_0x30ac19(0x15d)](_0x37b467)||_0x37b467<0x1||_0x37b467>MAX_ASYNC_RETRY_COUNT)&&_0x2091b6[_0x30ac19(0x20c)]({'path':_0x4cd6bd+_0x30ac19(0x1e7),'message':_0x30ac19(0x13b)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x2e5018[_0x30ac19(0xbb)]['retryInterval']!==undefined&&validateTimeAmount(_0x2e5018[_0x30ac19(0xbb)]['retryInterval'],_0x4cd6bd+'.async.retryInterval',_0x2091b6);}function validateApprovalTimeout(_0x340988,_0x4aec4f,_0x10086f){const _0x27544c=a299_0x348000;if(_0x340988[_0x27544c(0xee)]===undefined)return;if(!isRecord(_0x340988[_0x27544c(0xee)])){_0x10086f['push']({'path':_0x4aec4f+_0x27544c(0x171),'message':_0x27544c(0x205)});return;}if(_0x340988[_0x27544c(0xee)][_0x27544c(0x127)]!==undefined&&typeof _0x340988[_0x27544c(0xee)][_0x27544c(0x127)]!==_0x27544c(0x166)){_0x10086f['push']({'path':_0x4aec4f+_0x27544c(0x178),'message':_0x27544c(0x1f0)});return;}if(_0x340988['timeout'][_0x27544c(0x127)]!==!![])return;if(_0x340988[_0x27544c(0xee)][_0x27544c(0x1a8)]!==undefined&&typeof _0x340988[_0x27544c(0xee)][_0x27544c(0x1a8)]!==_0x27544c(0x166)){_0x10086f['push']({'path':_0x4aec4f+_0x27544c(0x201),'message':_0x27544c(0xbd)});return;}_0x340988[_0x27544c(0x14d)]!==_0x27544c(0x125)&&_0x10086f[_0x27544c(0x20c)]({'path':_0x4aec4f+'.timeout','message':_0x27544c(0xd0)});validateTimeAmount(_0x340988['timeout'][_0x27544c(0x129)],_0x4aec4f+_0x27544c(0x170),_0x10086f);const _0x571295=_0x340988['timeout']['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x27544c(0x137)](_0x571295)){_0x10086f[_0x27544c(0x20c)]({'path':_0x4aec4f+_0x27544c(0x187),'message':_0x27544c(0x1b2)});return;}(_0x340988[_0x27544c(0x1b6)]??'APPROVAL')===_0x27544c(0x14b)&&_0x571295!==_0x27544c(0x19e)&&_0x10086f['push']({'path':_0x4aec4f+'.timeout.action','message':_0x27544c(0x1a6)});const _0x1fcb3e=_0x340988['timeout'][_0x27544c(0x1a8)]??_0x571295!==_0x27544c(0x19e);if(_0x571295==='EXECUTE_BFF')_0x1fcb3e&&_0x10086f[_0x27544c(0x20c)]({'path':_0x4aec4f+_0x27544c(0x201),'message':_0x27544c(0xb0)}),(typeof _0x340988['timeout'][_0x27544c(0x132)]!==_0x27544c(0x1df)||_0x340988['timeout'][_0x27544c(0x132)][_0x27544c(0x14f)]()==='')&&_0x10086f[_0x27544c(0x20c)]({'path':_0x4aec4f+_0x27544c(0x1a1),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x340988[_0x27544c(0xee)][_0x27544c(0x17c)],_0x4aec4f+'.timeout.resultVariable',_0x10086f);else!_0x1fcb3e&&_0x10086f[_0x27544c(0x20c)]({'path':_0x4aec4f+'.timeout.interrupting','message':_0x571295+'\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.'});}function validateTimeAmount(_0x4e64b4,_0x58f785,_0x163f9d){const _0x3544a3=a299_0x348000;if(!isRecord(_0x4e64b4)){_0x163f9d[_0x3544a3(0x20c)]({'path':_0x58f785,'message':_0x3544a3(0xf9)});return;}(!Number[_0x3544a3(0x15d)](_0x4e64b4['value'])||Number(_0x4e64b4['value'])<=0x0)&&_0x163f9d['push']({'path':_0x58f785+_0x3544a3(0x17d),'message':_0x3544a3(0x1ab)}),!FLOW_TIME_UNITS[_0x3544a3(0x137)](_0x4e64b4[_0x3544a3(0xde)])&&_0x163f9d[_0x3544a3(0x20c)]({'path':_0x58f785+_0x3544a3(0xe2),'message':_0x3544a3(0xb7)});}function validateOptionalResultVariable(_0x569f0a,_0x4decf3,_0x1832eb){const _0x3b8872=a299_0x348000;if(_0x569f0a===undefined||_0x569f0a===null||_0x569f0a==='')return;if(typeof _0x569f0a!=='string'||!VARIABLE_PATTERN['test'](_0x569f0a))_0x1832eb[_0x3b8872(0x20c)]({'path':_0x4decf3,'message':_0x3b8872(0x16c)});else(RESERVED_RESULT_VARIABLES['has'](_0x569f0a)||_0x569f0a['startsWith']('approval_sys_'))&&_0x1832eb['push']({'path':_0x4decf3,'message':'Reserved\x20resultVariable:\x20'+_0x569f0a+'.'});}function validateCcConfig(_0x58867a,_0x3c68d5,_0x28a712){const _0x593bfd=a299_0x348000;if(_0x58867a['cc']===undefined)return;if(!isRecord(_0x58867a['cc'])){_0x28a712[_0x593bfd(0x20c)]({'path':_0x3c68d5+_0x593bfd(0x12c),'message':_0x593bfd(0x147)});return;}_0x58867a[_0x593bfd(0x14d)]!==_0x593bfd(0x118)&&_0x58867a[_0x593bfd(0x14d)]!=='APPROVAL'&&_0x28a712['push']({'path':_0x3c68d5+_0x593bfd(0x12c),'message':_0x593bfd(0x1da)});Object[_0x593bfd(0x121)]['hasOwnProperty']['call'](_0x58867a['cc'],_0x593bfd(0xf4))&&_0x28a712[_0x593bfd(0x20c)]({'path':_0x3c68d5+_0x593bfd(0x18c),'message':UNSUPPORTED_FORM_MESSAGE});const _0x365769=_0x58867a['cc'][_0x593bfd(0x15c)];if(!Array[_0x593bfd(0x162)](_0x365769)||_0x365769[_0x593bfd(0x1fe)]===0x0)_0x28a712['push']({'path':_0x3c68d5+_0x593bfd(0x1f5),'message':_0x593bfd(0x100)});else{_0x365769[_0x593bfd(0x1fe)]>MAX_CC_RECIPIENTS&&_0x28a712[_0x593bfd(0x20c)]({'path':_0x3c68d5+_0x593bfd(0x1f5),'message':_0x593bfd(0xcd)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x10ec68=new Set();_0x365769[_0x593bfd(0x16e)]((_0xe1748e,_0x5b325d)=>{const _0x1d75e5=_0x593bfd;if(typeof _0xe1748e!==_0x1d75e5(0x1df)||_0xe1748e[_0x1d75e5(0x14f)]()==='')_0x28a712[_0x1d75e5(0x20c)]({'path':_0x3c68d5+_0x1d75e5(0xf0)+_0x5b325d+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x10ec68['has'](_0xe1748e[_0x1d75e5(0x14f)]())?_0x28a712[_0x1d75e5(0x20c)]({'path':_0x3c68d5+_0x1d75e5(0xf0)+_0x5b325d+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0xe1748e[_0x1d75e5(0x14f)]()+'.'}):_0x10ec68['add'](_0xe1748e[_0x1d75e5(0x14f)]());});}validateStringArray(_0x58867a['cc'][_0x593bfd(0x1f7)],_0x3c68d5+'.cc.visible',_0x28a712);}function validateStringArray(_0x139b12,_0x5df23f,_0x3d0aaf){const _0x469f4c=a299_0x348000;if(_0x139b12===undefined)return;if(!Array['isArray'](_0x139b12)){_0x3d0aaf[_0x469f4c(0x20c)]({'path':_0x5df23f,'message':_0x469f4c(0xb8)});return;}const _0x380c44=new Set();_0x139b12[_0x469f4c(0x16e)]((_0x1aba2f,_0x461c93)=>{const _0xd34c3a=_0x469f4c;if(typeof _0x1aba2f!==_0xd34c3a(0x1df)||_0x1aba2f[_0xd34c3a(0x14f)]()==='')_0x3d0aaf[_0xd34c3a(0x20c)]({'path':_0x5df23f+'['+_0x461c93+']','message':_0xd34c3a(0x120)});else _0x380c44['has'](_0x1aba2f[_0xd34c3a(0x14f)]())?_0x3d0aaf[_0xd34c3a(0x20c)]({'path':_0x5df23f+'['+_0x461c93+']','message':'Duplicate\x20value:\x20'+_0x1aba2f[_0xd34c3a(0x14f)]()+'.'}):_0x380c44[_0xd34c3a(0x10b)](_0x1aba2f['trim']());});}function validateNotificationConfig(_0x23bcf1,_0x296d91,_0x321945){const _0x47fa99=a299_0x348000;if(!isRecord(_0x23bcf1)){_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91,'message':_0x47fa99(0x197)});return;}if(_0x23bcf1[_0x47fa99(0x186)]!==undefined&&_0x23bcf1['version']!==null){if(typeof _0x23bcf1[_0x47fa99(0x186)]!==_0x47fa99(0x1df))_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+_0x47fa99(0xca),'message':_0x47fa99(0x11a)});else _0x23bcf1[_0x47fa99(0x186)][_0x47fa99(0x14f)]()&&_0x23bcf1[_0x47fa99(0x186)][_0x47fa99(0x14f)]()!=='v1'&&_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+'.version','message':_0x47fa99(0x179)+_0x23bcf1[_0x47fa99(0x186)]+'.'});}const _0x45d6e0=requireNotificationString(_0x23bcf1[_0x47fa99(0x20d)],_0x296d91+_0x47fa99(0x1bb),_0x47fa99(0x150),_0x321945);_0x45d6e0?.[_0x47fa99(0xac)]('${')&&_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+'.configCode','message':_0x47fa99(0x194)});if(_0x23bcf1[_0x47fa99(0x19d)]!==undefined&&_0x23bcf1[_0x47fa99(0x19d)]!==null){if(typeof _0x23bcf1[_0x47fa99(0x19d)]!==_0x47fa99(0x1df))_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+_0x47fa99(0x1f3),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x23bcf1[_0x47fa99(0x19d)][_0x47fa99(0x14f)]()[_0x47fa99(0x1e4)]())&&_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+_0x47fa99(0x1f3),'message':_0x47fa99(0x1f1)});}!isRecord(_0x23bcf1[_0x47fa99(0xe4)])?_0x321945[_0x47fa99(0x20c)]({'path':_0x296d91+'.template','message':_0x47fa99(0x18f)}):validateNotificationTemplate(_0x23bcf1[_0x47fa99(0xe4)],_0x296d91+_0x47fa99(0x149),_0x321945),validateNotificationRecipients(_0x23bcf1[_0x47fa99(0x11e)],_0x296d91+_0x47fa99(0x1bf),_0x321945);}function validateNotificationTemplate(_0x9102c8,_0x2a9fe1,_0x4f8e56){const _0xae6565=a299_0x348000;for(const _0x324d0a of['title',_0xae6565(0x161)]){const _0x2f8416=requireNotificationString(_0x9102c8[_0x324d0a],_0x2a9fe1+'.'+_0x324d0a,_0xae6565(0xe0)+_0x324d0a+'\x20is\x20required.',_0x4f8e56);if(_0x2f8416)validateNotificationPlaceholders(_0x2f8416,_0x2a9fe1+'.'+_0x324d0a,_0x4f8e56);}_0x9102c8[_0xae6565(0xfe)]!==undefined&&_0x9102c8['detailMarkdown']!==null&&(typeof _0x9102c8[_0xae6565(0xfe)]!=='string'?_0x4f8e56[_0xae6565(0x20c)]({'path':_0x2a9fe1+_0xae6565(0x114),'message':_0xae6565(0x1f8)}):validateNotificationPlaceholders(_0x9102c8[_0xae6565(0xfe)],_0x2a9fe1+_0xae6565(0x114),_0x4f8e56)),validateNotificationFacts(_0x9102c8[_0xae6565(0x12d)],_0x2a9fe1+_0xae6565(0x192),_0x4f8e56),validateNotificationActions(_0x9102c8['actions'],_0x2a9fe1+_0xae6565(0xc0),_0x4f8e56);}function validateNotificationFacts(_0x515c46,_0x2ab956,_0x523abf){const _0x3d9730=a299_0x348000;if(_0x515c46===undefined||_0x515c46===null)return;if(!Array[_0x3d9730(0x162)](_0x515c46)){_0x523abf[_0x3d9730(0x20c)]({'path':_0x2ab956,'message':_0x3d9730(0x204)});return;}_0x515c46[_0x3d9730(0x1fe)]>MAX_NOTIFICATION_FACTS&&_0x523abf[_0x3d9730(0x20c)]({'path':_0x2ab956,'message':_0x3d9730(0x190)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x515c46[_0x3d9730(0x16e)]((_0x52e73a,_0x188244)=>{const _0x12b467=_0x3d9730,_0x113c7e=_0x2ab956+'['+_0x188244+']';if(!isRecord(_0x52e73a)){_0x523abf['push']({'path':_0x113c7e,'message':_0x12b467(0x174)});return;}for(const _0x913d58 of[_0x12b467(0x19f),_0x12b467(0xe5)]){const _0x3582d5=requireNotificationString(_0x52e73a[_0x913d58],_0x113c7e+'.'+_0x913d58,_0x12b467(0xc5)+_0x913d58+_0x12b467(0x1b5),_0x523abf);_0x3582d5&&validateNotificationPlaceholders(_0x3582d5,_0x113c7e+'.'+_0x913d58,_0x523abf);}});}function validateNotificationActions(_0x52441e,_0x1a7255,_0x1053df){const _0x590e75=a299_0x348000;if(_0x52441e===undefined||_0x52441e===null)return;if(!Array['isArray'](_0x52441e)){_0x1053df[_0x590e75(0x20c)]({'path':_0x1a7255,'message':_0x590e75(0x1de)});return;}_0x52441e[_0x590e75(0x1fe)]>MAX_NOTIFICATION_ACTIONS&&_0x1053df[_0x590e75(0x20c)]({'path':_0x1a7255,'message':_0x590e75(0x190)+MAX_NOTIFICATION_ACTIONS+_0x590e75(0x191)}),_0x52441e['forEach']((_0x33cdd3,_0x34ba2e)=>{const _0x1d2d3b=_0x590e75,_0x1c9a65=_0x1a7255+'['+_0x34ba2e+']';if(!isRecord(_0x33cdd3)){_0x1053df[_0x1d2d3b(0x20c)]({'path':_0x1c9a65,'message':_0x1d2d3b(0x1ba)});return;}const _0x4ec5a0=requireNotificationString(_0x33cdd3['text'],_0x1c9a65+'.text','Notification\x20action.text\x20is\x20required.',_0x1053df);if(_0x4ec5a0)validateNotificationPlaceholders(_0x4ec5a0,_0x1c9a65+_0x1d2d3b(0xbe),_0x1053df);const _0x46febb=requireNotificationString(_0x33cdd3[_0x1d2d3b(0xc8)],_0x1c9a65+_0x1d2d3b(0x195),_0x1d2d3b(0x153),_0x1053df);if(!_0x46febb)return;validateNotificationPlaceholders(_0x46febb,_0x1c9a65+'.url',_0x1053df),!/^https?:\/\//i[_0x1d2d3b(0x1a0)](_0x46febb)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x1d2d3b(0x1a0)](_0x46febb)&&_0x1053df[_0x1d2d3b(0x20c)]({'path':_0x1c9a65+_0x1d2d3b(0x195),'message':_0x1d2d3b(0x1a9)});});}function validateNotificationRecipients(_0x948818,_0x166fea,_0x2422af){const _0x195efc=a299_0x348000;if(_0x948818===undefined||_0x948818===null)return;if(!Array[_0x195efc(0x162)](_0x948818)){_0x2422af[_0x195efc(0x20c)]({'path':_0x166fea,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x500117=![];_0x948818[_0x195efc(0x16e)]((_0x20d924,_0xb6c09c)=>{const _0x44c990=_0x195efc,_0x47dbfd=_0x166fea+'['+_0xb6c09c+']';if(!isRecord(_0x20d924)){_0x2422af[_0x44c990(0x20c)]({'path':_0x47dbfd,'message':_0x44c990(0x1c0)});return;}const _0x62bc4b=requireNotificationString(_0x20d924[_0x44c990(0x14d)],_0x47dbfd+_0x44c990(0xef),'Notification\x20recipient.type\x20is\x20required.',_0x2422af);_0x62bc4b&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x62bc4b[_0x44c990(0x1e4)]())&&_0x2422af[_0x44c990(0x20c)]({'path':_0x47dbfd+_0x44c990(0xef),'message':_0x44c990(0x130)});let _0x212fee='TO';_0x20d924[_0x44c990(0x1f4)]!==undefined&&_0x20d924[_0x44c990(0x1f4)]!==null&&(typeof _0x20d924[_0x44c990(0x1f4)]!==_0x44c990(0x1df)?(_0x2422af['push']({'path':_0x47dbfd+_0x44c990(0x14c),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x212fee=''):(_0x212fee=_0x20d924['role']['trim']()[_0x44c990(0x1e4)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x212fee)&&_0x2422af[_0x44c990(0x20c)]({'path':_0x47dbfd+_0x44c990(0x14c),'message':_0x44c990(0xe1)})));if(_0x212fee==='TO')_0x500117=!![];const _0x40b76f=requireNotificationString(_0x20d924['value'],_0x47dbfd+_0x44c990(0x17d),_0x44c990(0xd7),_0x2422af);_0x40b76f&&validateNotificationPlaceholders(_0x40b76f,_0x47dbfd+_0x44c990(0x17d),_0x2422af);}),_0x948818[_0x195efc(0x1fe)]>0x0&&!_0x500117&&_0x2422af['push']({'path':_0x166fea,'message':_0x195efc(0x12e)});}function requireNotificationString(_0x4d4cd2,_0x9c1c1,_0x32f0e8,_0xe6df86){const _0x25ef11=a299_0x348000;if(typeof _0x4d4cd2!==_0x25ef11(0x1df)||_0x4d4cd2[_0x25ef11(0x14f)]()==='')return _0xe6df86[_0x25ef11(0x20c)]({'path':_0x9c1c1,'message':_0x32f0e8}),undefined;return _0x4d4cd2[_0x25ef11(0x14f)]();}function validateNotificationPlaceholders(_0x1f1601,_0x4b9c87,_0x547954){const _0x4e33fa=a299_0x348000;for(const _0x26b1de of _0x1f1601['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x497555=_0x26b1de[0x1]?.[_0x4e33fa(0x14f)]()??'',_0x1dd86d=_0x497555['indexOf']('.'),_0x228dcb=_0x1dd86d>=0x0?_0x497555[_0x4e33fa(0x173)](0x0,_0x1dd86d):_0x497555,_0x1ba762=_0x1dd86d>=0x0?_0x497555['slice'](_0x1dd86d+0x1)['trim']():'';(!['event',_0x4e33fa(0x119),'variables']['includes'](_0x228dcb)||_0x1ba762==='')&&_0x547954[_0x4e33fa(0x20c)]({'path':_0x4b9c87,'message':_0x4e33fa(0x134)+_0x26b1de[0x0]+'.'});}_0x1f1601[_0x4e33fa(0x142)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x4e33fa(0xac)]('${')&&_0x547954[_0x4e33fa(0x20c)]({'path':_0x4b9c87,'message':_0x4e33fa(0x17b)});}function validateEdge(_0x4f8a7a,_0x3912d8,_0x50eb33){const _0x8c9bf=a299_0x348000;_0x4f8a7a[_0x8c9bf(0x181)]!==undefined&&typeof _0x4f8a7a[_0x8c9bf(0x181)]!==_0x8c9bf(0x1df)&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+_0x8c9bf(0xad),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x4f8a7a[_0x8c9bf(0x1dd)]!==undefined&&typeof _0x4f8a7a['defaultFlow']!==_0x8c9bf(0x166)&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+_0x8c9bf(0x188),'message':_0x8c9bf(0x146)}),_0x4f8a7a[_0x8c9bf(0xcc)]!==undefined&&(!Array[_0x8c9bf(0x162)](_0x4f8a7a[_0x8c9bf(0xcc)])?_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+_0x8c9bf(0x11d),'message':_0x8c9bf(0xb4)}):_0x4f8a7a['waypoints'][_0x8c9bf(0x16e)]((_0x2a6b6d,_0x97ef76)=>{const _0x12ee6e=_0x8c9bf;if(!isRecord(_0x2a6b6d)){_0x50eb33[_0x12ee6e(0x20c)]({'path':_0x3912d8+_0x12ee6e(0x1db)+_0x97ef76+']','message':_0x12ee6e(0xbc)});return;}for(const _0x3bcf15 of['x','y']){const _0x507906=_0x2a6b6d[_0x3bcf15];(typeof _0x507906!==_0x12ee6e(0x1e2)||!Number['isFinite'](_0x507906))&&_0x50eb33[_0x12ee6e(0x20c)]({'path':_0x3912d8+_0x12ee6e(0x1db)+_0x97ef76+'].'+_0x3bcf15,'message':_0x12ee6e(0x1ae)+_0x3bcf15+_0x12ee6e(0xc6)});}})),_0x4f8a7a[_0x8c9bf(0x13a)]!==undefined&&!CONDITION_TYPES['has'](_0x4f8a7a['conditionType'])&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+_0x8c9bf(0x18d),'message':_0x8c9bf(0x148)+String(_0x4f8a7a[_0x8c9bf(0x13a)])+'.'}),_0x4f8a7a[_0x8c9bf(0x13a)]===_0x8c9bf(0xd2)&&(typeof _0x4f8a7a[_0x8c9bf(0x12f)]!=='string'||_0x4f8a7a['expression'][_0x8c9bf(0x14f)]()==='')&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+'.expression','message':_0x8c9bf(0x206)}),_0x4f8a7a[_0x8c9bf(0x1dd)]===!![]&&_0x4f8a7a[_0x8c9bf(0x13a)]!==_0x8c9bf(0xec)&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+_0x8c9bf(0x188),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x4f8a7a[_0x8c9bf(0x1dd)]===!![]&&typeof _0x4f8a7a[_0x8c9bf(0x12f)]===_0x8c9bf(0x1df)&&_0x4f8a7a[_0x8c9bf(0x12f)][_0x8c9bf(0x14f)]()!==''&&_0x50eb33[_0x8c9bf(0x20c)]({'path':_0x3912d8+'.expression','message':_0x8c9bf(0x124)});}function a299_0xc6d9(_0x237eaa,_0x5f3fed){_0x237eaa=_0x237eaa-0xa4;const _0x156b6a=a299_0x156b();let _0xc6d9bf=_0x156b6a[_0x237eaa];return _0xc6d9bf;}function validateGraphShape(_0x181389,_0x40e8d8,_0xc9407,_0x335645,_0x32a798,_0xbbaae,_0x3099c7){const _0x4bb267=a299_0x348000;for(const [_0x5a7041,_0x2baa81]of _0x181389){const _0x5b7b87=_0x32a798['get'](_0x5a7041)??[],_0x4d4c4c=_0x335645[_0x4bb267(0x101)](_0x5a7041)??[];_0x2baa81[_0x4bb267(0x14d)]!==_0x4bb267(0x115)&&_0x5b7b87[_0x4bb267(0x1fe)]===0x0&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':_0x4bb267(0x1d0)});_0x2baa81[_0x4bb267(0x14d)]!==_0x4bb267(0x118)&&_0x4d4c4c[_0x4bb267(0x1fe)]===0x0&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':_0x4bb267(0x207)});_0x2baa81['type']===_0x4bb267(0x115)&&_0x5b7b87[_0x4bb267(0x1fe)]>0x0&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':_0x4bb267(0xc2)});_0x2baa81[_0x4bb267(0x14d)]===_0x4bb267(0x118)&&_0x4d4c4c[_0x4bb267(0x1fe)]>0x0&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x2baa81[_0x4bb267(0x14d)]===_0x4bb267(0x1d5)){_0x4d4c4c[_0x4bb267(0x1fe)]<0x2&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x25acb1=_0x4d4c4c[_0x4bb267(0x199)](_0x3ae1d5=>_0x3ae1d5[_0x4bb267(0x1dd)]===!![]);_0x25acb1[_0x4bb267(0x1fe)]!==0x1&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0x25acb1['length']===0x1){const _0x1465ab=_0x25acb1[0x0],_0x5540de=_0xbbaae[_0x4bb267(0x101)](_0x1465ab)??_0x4bb267(0x1b9);_0x1465ab[_0x4bb267(0x13a)]!=='ALWAYS'&&_0x3099c7['push']({'path':_0x5540de+_0x4bb267(0x18d),'message':_0x4bb267(0x184)});_0x1465ab[_0x4bb267(0x12f)]!==undefined&&_0x3099c7['push']({'path':_0x5540de+_0x4bb267(0x1e8),'message':_0x4bb267(0x160)});for(const _0x570ac9 of _0x4d4c4c){if(_0x570ac9===_0x1465ab)continue;const _0x3b9d8a=_0xbbaae[_0x4bb267(0x101)](_0x570ac9)??_0x4bb267(0x1b9);if(_0x570ac9[_0x4bb267(0x13a)]!=='EXPRESSION')_0x3099c7[_0x4bb267(0x20c)]({'path':_0x3b9d8a+_0x4bb267(0x18d),'message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0x570ac9[_0x4bb267(0x12f)]!==_0x4bb267(0x1df)||_0x570ac9[_0x4bb267(0x12f)][_0x4bb267(0x14f)]()==='')&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x3b9d8a+_0x4bb267(0x1e8),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x2baa81['type']===_0x4bb267(0x125)&&(_0x2baa81['taskMode']??_0x4bb267(0x125))==='HANDLE'){if(_0x4d4c4c[_0x4bb267(0x1fe)]!==0x1)_0x3099c7[_0x4bb267(0x20c)]({'path':'flowJson.nodes.'+_0x5a7041,'message':_0x4bb267(0x133)});else{const _0x120226=_0x4d4c4c[0x0];((_0x120226['conditionType']??_0x4bb267(0xec))!==_0x4bb267(0xec)||_0x120226['defaultFlow']===!![]||typeof _0x120226[_0x4bb267(0x12f)]===_0x4bb267(0x1df)&&_0x120226[_0x4bb267(0x12f)][_0x4bb267(0x14f)]()!=='')&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0xbbaae[_0x4bb267(0x101)](_0x120226)??'flowJson.edges','message':_0x4bb267(0x182)});}}else{if(_0x2baa81[_0x4bb267(0x14d)]===_0x4bb267(0x125)){const _0x198879=_0x4d4c4c[_0x4bb267(0x1fc)](_0x5682c8=>_0x5682c8[_0x4bb267(0x13a)]??_0x4bb267(0xec)),_0x41992e=_0x198879[_0x4bb267(0x199)](_0x2b488c=>_0x2b488c!==_0x4bb267(0x1aa)&&_0x2b488c!==_0x4bb267(0xc4));_0x41992e[_0x4bb267(0x1fe)]>0x0&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x198879[_0x4bb267(0x199)](_0x3c13eb=>_0x3c13eb==='APPROVED')[_0x4bb267(0x1fe)]!==0x1&&_0x3099c7['push']({'path':_0x4bb267(0xe7)+_0x5a7041,'message':_0x4bb267(0x113)}),_0x198879[_0x4bb267(0x199)](_0x1c37c9=>_0x1c37c9===_0x4bb267(0xc4))[_0x4bb267(0x1fe)]!==0x1&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x5a7041,'message':_0x4bb267(0x189)}),_0x4d4c4c[_0x4bb267(0x143)](_0x5ec078=>_0x5ec078[_0x4bb267(0x1dd)]===!![])&&_0x3099c7[_0x4bb267(0x20c)]({'path':'flowJson.nodes.'+_0x5a7041,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x3fb846=new Set(),_0x55d318=_0x1b8d41=>{const _0xda29a0=_0x4bb267;if(_0x3fb846[_0xda29a0(0x137)](_0x1b8d41))return;_0x3fb846[_0xda29a0(0x10b)](_0x1b8d41);for(const _0x1ae938 of _0x335645[_0xda29a0(0x101)](_0x1b8d41)??[]){const _0x7fcdce=resolveEdgeEndpoint(_0x1ae938[_0xda29a0(0x20b)],_0x1ae938[_0xda29a0(0x1f2)]);if(_0x7fcdce&&_0x181389[_0xda29a0(0x137)](_0x7fcdce))_0x55d318(_0x7fcdce);}};_0x55d318(_0x40e8d8);for(const _0x207786 of _0x181389[_0x4bb267(0xb6)]()){!_0x3fb846[_0x4bb267(0x137)](_0x207786)&&_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0xe7)+_0x207786,'message':_0x4bb267(0x20a)});}const _0x1f7aa5=_0xc9407[_0x4bb267(0x143)](_0x469b2b=>_0x3fb846[_0x4bb267(0x137)](_0x469b2b));if(!_0x1f7aa5){_0x3099c7[_0x4bb267(0x20c)]({'path':_0x4bb267(0x1b9),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0xb63b4d=new Set(),_0x273c98=_0x265002=>{const _0x147d1a=_0x4bb267;if(_0xb63b4d[_0x147d1a(0x137)](_0x265002))return;_0xb63b4d[_0x147d1a(0x10b)](_0x265002);for(const _0x29628a of _0x32a798[_0x147d1a(0x101)](_0x265002)??[]){const _0x168abd=resolveEdgeEndpoint(_0x29628a[_0x147d1a(0x1a3)],_0x29628a['sourceNodeId']);if(_0x168abd&&_0x181389[_0x147d1a(0x137)](_0x168abd))_0x273c98(_0x168abd);}};for(const _0x32d7f0 of _0xc9407){if(_0x181389[_0x4bb267(0x137)](_0x32d7f0))_0x273c98(_0x32d7f0);}for(const _0x11c67a of _0x3fb846){!_0xb63b4d[_0x4bb267(0x137)](_0x11c67a)&&_0x3099c7['push']({'path':'flowJson.nodes.'+_0x11c67a,'message':_0x4bb267(0x1b4)});}}function validateApprovalResults(_0x40cb78,_0x23c3b7,_0xc9e84a,_0x25312f){const _0x41ccd4=a299_0x348000;if(_0x23c3b7===0x0)return;const _0xe5c9fd=new Set(_0xc9e84a[_0x41ccd4(0x1fc)](_0x109a0e=>_0x40cb78[_0x41ccd4(0x101)](_0x109a0e)?.['result'])['filter'](_0x349b3f=>typeof _0x349b3f==='string'));for(const _0x4e885d of[_0x41ccd4(0x1aa),_0x41ccd4(0xc4)]){!_0xe5c9fd[_0x41ccd4(0x137)](_0x4e885d)&&_0x25312f[_0x41ccd4(0x20c)]({'path':'flowJson.nodes','message':_0x41ccd4(0x13e)+_0x4e885d+'.'});}}function validateScriptResultReferences(_0x263b46,_0x5d7e73,_0x23b636,_0x59858d,_0x1bbae4,_0x243c8e,_0x569e67){const _0xcf1590=a299_0x348000;if(_0x243c8e['size']===0x0)return;const _0x11b5cb=new Set(),_0x4b1477=_0x3999c5=>{const _0x2a1fad=a299_0xc6d9;if(!_0x11b5cb[_0x2a1fad(0x137)](_0x3999c5)&&_0x263b46[_0x2a1fad(0x137)](_0x3999c5)){_0x11b5cb[_0x2a1fad(0x10b)](_0x3999c5);for(const _0x38075e of _0x23b636[_0x2a1fad(0x101)](_0x3999c5)??[]){const _0x43c54b=resolveEdgeEndpoint(_0x38075e[_0x2a1fad(0x20b)],_0x38075e[_0x2a1fad(0x1f2)]);if(_0x43c54b)_0x4b1477(_0x43c54b);}}};_0x4b1477(_0x5d7e73);const _0x5d3332=new Map();for(const _0x5a4fb9 of _0x11b5cb){_0x5d3332['set'](_0x5a4fb9,_0x5a4fb9===_0x5d7e73?new Set([_0x5d7e73]):new Set(_0x11b5cb));}let _0x18403d=!![];while(_0x18403d){_0x18403d=![];for(const _0x53eeca of _0x11b5cb){if(_0x53eeca===_0x5d7e73)continue;const _0x5652a6=(_0x59858d[_0xcf1590(0x101)](_0x53eeca)??[])['map'](_0x2053b3=>resolveEdgeEndpoint(_0x2053b3[_0xcf1590(0x1a3)],_0x2053b3[_0xcf1590(0x209)]))[_0xcf1590(0x199)](_0x3c3572=>Boolean(_0x3c3572&&_0x11b5cb[_0xcf1590(0x137)](_0x3c3572)));if(_0x5652a6[_0xcf1590(0x1fe)]===0x0)continue;const _0x133903=new Set(_0x5d3332[_0xcf1590(0x101)](_0x5652a6[0x0])??[]);for(const _0x4539ea of _0x5652a6[_0xcf1590(0x173)](0x1)){const _0x25eae0=_0x5d3332[_0xcf1590(0x101)](_0x4539ea)??new Set();for(const _0x46ed0d of _0x133903){if(!_0x25eae0[_0xcf1590(0x137)](_0x46ed0d))_0x133903[_0xcf1590(0xa8)](_0x46ed0d);}}_0x133903[_0xcf1590(0x10b)](_0x53eeca);const _0x1bcf2f=_0x5d3332['get'](_0x53eeca);!setsEqual(_0x1bcf2f,_0x133903)&&(_0x5d3332[_0xcf1590(0x16f)](_0x53eeca,_0x133903),_0x18403d=!![]);}}for(const [_0x34703c,_0x28fe87]of _0x23b636){const _0x1b8eab=_0x5d3332['get'](_0x34703c);if(!_0x1b8eab)continue;for(const _0x87aee6 of _0x28fe87){if(_0x87aee6[_0xcf1590(0x13a)]!==_0xcf1590(0xd2)||typeof _0x87aee6['expression']!==_0xcf1590(0x1df))continue;for(const [_0x3255d6,_0x3c3e66]of _0x243c8e){expressionReferencesVariable(_0x87aee6[_0xcf1590(0x12f)],_0x3255d6)&&!_0x1b8eab[_0xcf1590(0x137)](_0x3c3e66)&&_0x569e67['push']({'path':(_0x1bbae4['get'](_0x87aee6)??_0xcf1590(0x1b9))+_0xcf1590(0x1e8),'message':_0xcf1590(0x1d9)+_0x3255d6+_0xcf1590(0x1bd)+_0x3c3e66+_0xcf1590(0x1a4)+_0x34703c+'.'});}}}}function expressionReferencesVariable(_0x5957e3,_0x33fe40){const _0x9f84b2=a299_0x348000;let _0x4d3d52=0x0;while(_0x4d3d52<_0x5957e3[_0x9f84b2(0x1fe)]){const _0x2b302e=_0x5957e3[_0x4d3d52];if(_0x2b302e==='\x27'||_0x2b302e==='\x22'){_0x4d3d52=skipQuotedExpressionSegment(_0x5957e3,_0x4d3d52,_0x2b302e);continue;}if(!/[A-Za-z_]/[_0x9f84b2(0x1a0)](_0x2b302e)){_0x4d3d52+=0x1;continue;}const _0x43aea6=_0x4d3d52;_0x4d3d52+=0x1;while(_0x4d3d52<_0x5957e3[_0x9f84b2(0x1fe)]&&/[A-Za-z0-9_]/[_0x9f84b2(0x1a0)](_0x5957e3[_0x4d3d52])){_0x4d3d52+=0x1;}if(_0x5957e3[_0x9f84b2(0x173)](_0x43aea6,_0x4d3d52)!==_0x33fe40)continue;let _0x1ab8b2=_0x43aea6-0x1;while(_0x1ab8b2>=0x0&&/\s/[_0x9f84b2(0x1a0)](_0x5957e3[_0x1ab8b2])){_0x1ab8b2-=0x1;}if(_0x5957e3[_0x1ab8b2]!=='.')return!![];}return![];}function a299_0x156b(){const _0x3cc2b3=['hasOwnProperty','detailMarkdown','\x20was\x20empty\x20and\x20was\x20removed.','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','get','startPath','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','formPermission','node\x20must\x20be\x20an\x20object.','pageMode','isSafeInteger','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','FAIL','transferCandidates\x20must\x20be\x20an\x20object.','add','MAX_SAFE_INTEGER','async\x20must\x20be\x20an\x20object.','Reserved\x20resultVariable:\x20','PLATFORM_FORM','transferCandidates','approval_sys_appCode','.taskMode','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','.detailMarkdown','START','datasetCode','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','END','context','Notification\x20version\x20must\x20be\x20a\x20string.','CONTINUE','position.','.waypoints','recipients','Unsupported\x20approval\x20mode:\x20','value\x20must\x20be\x20a\x20non-empty\x20string.','prototype','formData','strategy','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','APPROVAL','templateName','enabled','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','duration','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','config','.cc','facts','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','expression','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','NOTIFICATION','scriptName','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','Unsupported\x20notification\x20placeholder:\x20','#/$defs/userId','CUSTOM_PAGE','has','schemaVersion','approval.simple-flow.v1','conditionType','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','flowKey','flowJson','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','approvalMode','startPath\x20must\x20be\x20a\x20non-empty\x20string.','714UPUNJh','replace','some','33nkrsRM','bindDatasetCode','defaultFlow\x20must\x20be\x20a\x20boolean.','cc\x20must\x20be\x20an\x20object.','Unsupported\x20condition\x20type:\x20','.template','startsWith','HANDLE','.role','type','^[1-9][0-9]*$','trim','Notification\x20configCode\x20is\x20required.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','ROLE','Notification\x20action.url\x20is\x20required.','INDEPENDENT_FLOW','FORM_FLOW','.path','edges','userIds','592944QHOfCB','approval_sys_','edges\x20must\x20be\x20an\x20array.','recipientUserIds','isInteger','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','appCode','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','summary','isArray','.position.','overwrite','legacy_field_removed','boolean','.transferCandidates','Rabetbase\x20FlowConfig','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','findIndex','.position','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','88byXUzo','forEach','set','.timeout.duration','.timeout','.assignee.userIds[','slice','Notification\x20fact\x20must\x20be\x20an\x20object.','pageIds','https://json-schema.org/draft/2020-12/schema','HOURS','.timeout.enabled','Unsupported\x20notification\x20version:\x20','.scriptName','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','resultVariable','.value','.tmp','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','.id','name','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','integer','version','.timeout.action','.defaultFlow','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','DAYS','approval_sys_datasetCode','.cc.readSources','.conditionType','join','NOTIFICATION\x20node\x20requires\x20template.','Notification\x20template\x20supports\x20at\x20most\x20','\x20actions.','.facts','SECONDS','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.url','every','NOTIFICATION\x20node\x20requires\x20config.','action','filter','Unsupported\x20flowType:\x20','8qFknyb','sequential','failurePolicy','EXECUTE_BFF','label','test','.timeout.scriptName','scriptResult','source','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','USER','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','call','interrupting','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','APPROVED','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','AUTO_APPROVE','flowJson.schemaVersion','waypoint.','ALL','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','flowName','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','687870DvErtb','Node\x20cannot\x20reach\x20any\x20END.','\x20is\x20required.','taskMode','.transferCandidates.userIds','edge\x20source\x20is\x20required.','flowJson.edges','Notification\x20action\x20must\x20be\x20an\x20object.','.configCode','assignee',',\x20but\x20node\x20','formDefinitions','.recipients','Notification\x20recipient\x20must\x20be\x20an\x20object.','approval_sys_pageId','.sequential','.approvalMode','datasetCode\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','ANY','flowJson\x20must\x20be\x20an\x20object.','pid','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','#/$defs/position','BCC','sequential\x20must\x20be\x20a\x20boolean.','^[A-Za-z_][A-Za-z0-9_]*$','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','FIXED','Node\x20has\x20no\x20incoming\x20edge.','pageId','stringify','#/$defs/timeAmount','metadata','CONDITION','edge\x20must\x20be\x20an\x20object.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','MINUTES','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.waypoints[','flowType','defaultFlow','Notification\x20template.actions\x20must\x20be\x20an\x20array.','string','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','number','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','toUpperCase','.async','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.async.retryCount','.expression','path','flowCode','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','.assignee.strategy','APPROVAL\x20node\x20requires\x20assignee.','flowType\x20is\x20required.','object','timeout.enabled\x20must\x20be\x20a\x20boolean.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','targetNodeId','.failurePolicy','role','.cc.recipientUserIds','entries','visible','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.\x20This\x20CLI\x20supports\x20only\x20','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','36dVFSGI','map','].taskMode','length','109614qbmbRD','position','.timeout.interrupting','flowJson.','SINGLE','Notification\x20template.facts\x20must\x20be\x20an\x20array.','timeout\x20must\x20be\x20an\x20object.','EXPRESSION\x20edge\x20requires\x20expression.','Node\x20has\x20no\x20outgoing\x20edge.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','sourceNodeId','Node\x20is\x20not\x20reachable\x20from\x20START.','target','push','configCode','flowJson.nodes','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','form','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','delete','size','#/$defs/flowEdge','warnings','includes','.name','parse','.resultVariable','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','nodes','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','flowDesc\x20must\x20be\x20a\x20string.','waypoints\x20must\x20be\x20an\x20array.','retryCount','keys','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','value\x20must\x20be\x20an\x20array.','.assignee.userIds','AUTO_REJECT','async','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','.text','message','.actions','flowJson.nodes[','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','flowJson.edges[','REJECTED','Notification\x20fact.','\x20must\x20be\x20a\x20finite\x20number.','edge\x20target\x20is\x20required.','url','approval_sys_processInstanceId','.version','74130ElXppv','waypoints','cc.recipientUserIds\x20supports\x20at\x20most\x20','roleId','.target','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Duplicate\x20BPMN\x20element\x20id:\x20','EXPRESSION','approval_sys_dataId','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','approval_sys_operationType','.pageId','Notification\x20recipient.value\x20is\x20required.','flowJson.pageMode','empty_metadata_removed','EMAIL','array','SCRIPT','846506WvqScD','unit','text','Notification\x20template.','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','.unit','title','template','value','11606ElBmEz','flowJson.nodes.','approved','Unsupported\x20task\x20mode:\x20','NaN','Unsupported\x20node\x20type:\x20','ALWAYS','\x20->\x20','timeout','.type','.cc.recipientUserIds[','Unsupported\x20schemaVersion:\x20','flowJson.startPath','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','readSources','Edge\x20target\x20node\x20not\x20found:\x20','.config','flowDesc','utf8','duration\x20requires\x20value\x20and\x20unit.','Duplicate\x20edge\x20route:\x20','12190460HljxXd','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'];a299_0x156b=function(){return _0x3cc2b3;};return a299_0x156b();}function skipQuotedExpressionSegment(_0x40ff36,_0x119ae2,_0x331af3){let _0x2b5eb9=_0x119ae2+0x1;while(_0x2b5eb9<_0x40ff36['length']){if(_0x40ff36[_0x2b5eb9]==='\x5c'){_0x2b5eb9+=0x2;continue;}if(_0x40ff36[_0x2b5eb9]===_0x331af3)return _0x2b5eb9+0x1;_0x2b5eb9+=0x1;}return _0x2b5eb9;}function resolveEffectiveResultVariable(_0x165a4d,_0x5761af){const _0x266741=a299_0x348000;if(_0x165a4d===undefined||_0x165a4d===null||_0x5761af&&_0x165a4d==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x165a4d!==_0x266741(0x1df)||!VARIABLE_PATTERN[_0x266741(0x1a0)](_0x165a4d)||RESERVED_RESULT_VARIABLES[_0x266741(0x137)](_0x165a4d)||_0x165a4d[_0x266741(0x14a)](_0x266741(0x15a)))return undefined;return _0x165a4d;}function registerResultVariableOwner(_0x818996,_0x42a7cc,_0x4d4e25,_0x2e6288){const _0x310486=a299_0x348000;if(_0x818996[_0x310486(0x137)](_0x42a7cc)){_0x2e6288[_0x310486(0x20c)]({'path':_0x310486(0xa4),'message':'Duplicate\x20resultVariable:\x20'+_0x42a7cc+'.'});return;}_0x818996['set'](_0x42a7cc,_0x4d4e25);}function setsEqual(_0x24b051,_0x25a796){const _0x4833f3=a299_0x348000;return _0x24b051['size']===_0x25a796['size']&&[..._0x24b051][_0x4833f3(0x196)](_0x2fd2f3=>_0x25a796[_0x4833f3(0x137)](_0x2fd2f3));}function isValidUserId(_0x6a5ab){const _0x1a560e=a299_0x348000;if(typeof _0x6a5ab===_0x1a560e(0x1df))return _0x6a5ab[_0x1a560e(0x14f)]()[_0x1a560e(0x1fe)]>0x0;return Number[_0x1a560e(0x107)](_0x6a5ab)&&Number(_0x6a5ab)>0x0;}function resolveEdgeEndpoint(_0x3615cb,_0x2d81f6){const _0x24126d=a299_0x348000;if(typeof _0x3615cb===_0x24126d(0x1df)&&_0x3615cb[_0x24126d(0x14f)]())return _0x3615cb[_0x24126d(0x14f)]();if(typeof _0x2d81f6===_0x24126d(0x1df)&&_0x2d81f6[_0x24126d(0x14f)]())return _0x2d81f6[_0x24126d(0x14f)]();return undefined;}function removeEmptyMetadata(_0xe7b6fa,_0x2ae308,_0x5ad28d,_0x5f2ebd){const _0x1e0872=a299_0x348000;if(Array['isArray'](_0xe7b6fa)){_0xe7b6fa[_0x1e0872(0x16e)]((_0x3a6da6,_0x1a637b)=>removeEmptyMetadata(_0x3a6da6,_0x2ae308+'['+_0x1a637b+']',_0x5ad28d,_0x5f2ebd));return;}if(!isRecord(_0xe7b6fa))return;for(const [_0x1423cc,_0x438987]of Object[_0x1e0872(0x1f6)](_0xe7b6fa)){const _0x52a723=_0x2ae308+'.'+_0x1423cc;if(_0x1423cc===_0x1e0872(0x1d4)&&isEmptyJsonValue(_0x438987)){delete _0xe7b6fa[_0x1423cc],_0x5f2ebd[_0x1e0872(0x20c)](_0x52a723),_0x5ad28d[_0x1e0872(0x20c)]({'code':_0x1e0872(0xd9),'path':_0x52a723,'message':_0x52a723+_0x1e0872(0xff)});continue;}removeEmptyMetadata(_0x438987,_0x52a723,_0x5ad28d,_0x5f2ebd);}}function isEmptyJsonValue(_0x2826c0){const _0x56ab02=a299_0x348000;if(_0x2826c0===null||_0x2826c0===undefined)return!![];if(typeof _0x2826c0===_0x56ab02(0x1df))return _0x2826c0['trim']()==='';if(Array[_0x56ab02(0x162)](_0x2826c0))return _0x2826c0[_0x56ab02(0x1fe)]===0x0;return isRecord(_0x2826c0)&&Object[_0x56ab02(0xb6)](_0x2826c0)['length']===0x0;}function isRecord(_0x2e10da){const _0x394fdd=a299_0x348000;return typeof _0x2e10da===_0x394fdd(0x1ef)&&_0x2e10da!==null&&!Array['isArray'](_0x2e10da);}function cloneJsonValue(_0x1e68cb){const _0x42c5ae=a299_0x348000;return JSON['parse'](JSON[_0x42c5ae(0x1d2)](_0x1e68cb));}export async function readFlowConfigFile(_0x6a4921){const _0x2e4a36=a299_0x348000,_0x2aac44=await readFile(resolve(_0x6a4921),_0x2e4a36(0xf8));return JSON[_0x2e4a36(0xae)](_0x2aac44);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a300_0x373303=a300_0x2d2a;(function(_0x5e84b1,_0x17a6a6){const _0x3589af=a300_0x2d2a,_0x2e34bc=_0x5e84b1();while(!![]){try{const _0x10b4b9=parseInt(_0x3589af(0x1d4))/0x1+-parseInt(_0x3589af(0x1d5))/0x2+parseInt(_0x3589af(0x1cf))/0x3+-parseInt(_0x3589af(0x1c2))/0x4+parseInt(_0x3589af(0x1c0))/0x5*(-parseInt(_0x3589af(0x1bf))/0x6)+-parseInt(_0x3589af(0x1dc))/0x7+parseInt(_0x3589af(0x1b3))/0x8;if(_0x10b4b9===_0x17a6a6)break;else _0x2e34bc['push'](_0x2e34bc['shift']());}catch(_0x274529){_0x2e34bc['push'](_0x2e34bc['shift']());}}}(a300_0x31fc,0x32643));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='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;function a300_0x31fc(){const _0x563e29=['1019838SHUelz','10pPUkWJ','version','1229140FodEth','instant_api_policy_app_code_invalid','instant_api_policy_defaults_invalid','rules','policyRoot','utf8','parse','isArray','length','policyFilePath','instant_api_policy_app_code_mismatch','trim','size','109389pVbCpB','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','ENOENT','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','byteLength','173672qtIBzV','662556YggLSF','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','created','pid','instant_api_policy_file_invalid','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_file_missing','2719360XWvfIB','EEXIST','Policy\x20defaults.instantApi\x20is\x20required.','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','allow','includes','code','appCode','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_file_too_large','overwritten','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instant_api_policy_file_exists','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','isFile','string','instantApi','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','10906056NHbwwO','instant_api_policy_file_unreadable','instant_api_policy_version_invalid','object','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','utf-8','instant_api_policy_rules_invalid','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','unchanged','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.'];a300_0x31fc=function(){return _0x563e29;};return a300_0x31fc();}export function instantApiPolicyError(_0x2e387f,_0x414d03,_0x25ab2e){return new CliError(_0x2e387f,0x1,_0x414d03,_0x25ab2e);}export function loadInstantApiPolicyLocalConfig(_0x4afff5,_0xed96d9){assertSafeAppCode(_0x4afff5);const _0x3c1734=resolve(_0xed96d9??findProjectRootDirectory()),_0x4ceb52=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x4afff5+'/'+INSTANT_API_POLICY_FILE_NAME,_0x327357=resolve(_0x3c1734,INSTANT_API_POLICY_RELATIVE_ROOT,_0x4afff5),_0x313e9f=resolve(_0x327357,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x3c1734,'appCode':_0x4afff5,'policyRoot':_0x327357,'policyFilePath':_0x313e9f,'policyRelativePath':_0x4ceb52};}export function createDefaultInstantApiPolicyConfig(_0x3ef872,_0x5164e0=a300_0x373303(0x1e1)){return assertSafeAppCode(_0x3ef872),{'version':'2','appCode':_0x3ef872,'defaults':{'instantApi':_0x5164e0},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x3774e1){const _0x820a20=a300_0x373303;let _0x61f4b6;try{_0x61f4b6=await stat(_0x3774e1[_0x820a20(0x1cb)]);}catch(_0x14dcc5){throw instantApiPolicyError(_0x820a20(0x1db),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x3774e1['policyFilePath'],_0x820a20(0x1da));}if(!_0x61f4b6[_0x820a20(0x1ec)]())throw instantApiPolicyError(_0x820a20(0x1d9),_0x820a20(0x1e0)+_0x3774e1[_0x820a20(0x1cb)]);if(_0x61f4b6[_0x820a20(0x1ce)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x820a20(0x1e6),_0x820a20(0x1be));let _0x537b89;try{_0x537b89=await readFile(_0x3774e1[_0x820a20(0x1cb)]);}catch{throw instantApiPolicyError(_0x820a20(0x1b4),_0x820a20(0x1eb)+_0x3774e1['policyFilePath']);}if(_0x537b89[_0x820a20(0x1d3)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x820a20(0x1be));let _0x4aff50;try{_0x4aff50=new TextDecoder(_0x820a20(0x1b9),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x537b89);}catch{throw instantApiPolicyError(_0x820a20(0x1d9),_0x820a20(0x1d6)+_0x3774e1[_0x820a20(0x1cb)]);}let _0x238527;try{_0x238527=JSON[_0x820a20(0x1c8)](_0x4aff50);}catch{throw instantApiPolicyError(_0x820a20(0x1b8),_0x820a20(0x1b7)+_0x3774e1[_0x820a20(0x1cb)]);}return assertLocalPolicyContract(_0x238527,_0x3774e1[_0x820a20(0x1e4)]);}export async function writeInstantApiPolicyConfigFile(_0x2aac47,_0x25a2cf,_0x8f3317={}){const _0x12d5c7=a300_0x373303,_0x1e37ca=assertLocalPolicyContract(_0x25a2cf,_0x2aac47[_0x12d5c7(0x1e4)]),_0x2f86ef=JSON['stringify'](_0x1e37ca,null,0x2)+'\x0a';if(Buffer[_0x12d5c7(0x1d3)](_0x2f86ef,_0x12d5c7(0x1c7))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x12d5c7(0x1e6),_0x12d5c7(0x1be));await mkdir(_0x2aac47[_0x12d5c7(0x1c6)],{'recursive':!![]});let _0x480f77;try{_0x480f77=await readFile(_0x2aac47[_0x12d5c7(0x1cb)],'utf8');}catch(_0x3e4848){if(!isMissingFile(_0x3e4848))throw instantApiPolicyError(_0x12d5c7(0x1b4),_0x12d5c7(0x1e8)+_0x2aac47[_0x12d5c7(0x1cb)]);}if(_0x480f77===_0x2f86ef)return{'action':_0x12d5c7(0x1bd),'filePath':_0x2aac47[_0x12d5c7(0x1cb)]};if(_0x480f77!==undefined&&!_0x8f3317['force'])throw instantApiPolicyError(_0x12d5c7(0x1ea),_0x12d5c7(0x1d2)+_0x2aac47['policyFilePath'],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x480f77===undefined)try{return await writeFile(_0x2aac47[_0x12d5c7(0x1cb)],_0x2f86ef,{'encoding':_0x12d5c7(0x1c7),'flag':'wx'}),{'action':_0x12d5c7(0x1d7),'filePath':_0x2aac47[_0x12d5c7(0x1cb)]};}catch(_0x39201b){if(!isAlreadyExists(_0x39201b))throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x2aac47[_0x12d5c7(0x1cb)]);if(!_0x8f3317['force'])throw instantApiPolicyError(_0x12d5c7(0x1ea),_0x12d5c7(0x1bc)+_0x2aac47[_0x12d5c7(0x1cb)],'Review\x20the\x20file\x20before\x20retrying.');}const _0x5955e0=resolve(dirname(_0x2aac47[_0x12d5c7(0x1cb)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x12d5c7(0x1d8)]+'.'+randomUUID()+'.tmp');try{await writeFile(_0x5955e0,_0x2f86ef,{'encoding':_0x12d5c7(0x1c7),'flag':'wx'}),await rename(_0x5955e0,_0x2aac47[_0x12d5c7(0x1cb)]);}catch{await unlink(_0x5955e0)['catch'](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x2aac47[_0x12d5c7(0x1cb)]);}return{'action':_0x12d5c7(0x1e7),'filePath':_0x2aac47[_0x12d5c7(0x1cb)]};}function assertSafeAppCode(_0x7fe670){const _0x2d6df6=a300_0x373303,_0x95070c=_0x7fe670[_0x2d6df6(0x1cd)]();if(!_0x95070c||_0x95070c!==_0x7fe670||_0x95070c[_0x2d6df6(0x1ca)]>0x64||_0x95070c==='.'||_0x95070c==='..'||_0x95070c[_0x2d6df6(0x1e2)]('/')||_0x95070c['includes']('\x5c')||_0x95070c[_0x2d6df6(0x1e2)]('\x00'))throw instantApiPolicyError(_0x2d6df6(0x1c3),_0x2d6df6(0x1e5));}function assertLocalPolicyContract(_0x4098fe,_0x241dfd){const _0x4b98fa=a300_0x373303;if(!isObject(_0x4098fe))throw instantApiPolicyError(_0x4b98fa(0x1b8),_0x4b98fa(0x1e9));if(_0x4098fe[_0x4b98fa(0x1c1)]!=='1'&&_0x4098fe[_0x4b98fa(0x1c1)]!=='2')throw instantApiPolicyError(_0x4b98fa(0x1b5),_0x4b98fa(0x1bb),_0x4b98fa(0x1b2));if(_0x4098fe[_0x4b98fa(0x1e4)]!==_0x241dfd)throw instantApiPolicyError(_0x4b98fa(0x1cc),_0x4b98fa(0x1d0)+_0x241dfd+'.');if(!isObject(_0x4098fe['defaults'])||typeof _0x4098fe['defaults'][_0x4b98fa(0x1b1)]!==_0x4b98fa(0x1ed))throw instantApiPolicyError(_0x4b98fa(0x1c4),_0x4b98fa(0x1de));if(_0x4098fe['rules']!==undefined&&_0x4098fe[_0x4b98fa(0x1c5)]!==null&&!Array[_0x4b98fa(0x1c9)](_0x4098fe[_0x4b98fa(0x1c5)]))throw instantApiPolicyError(_0x4b98fa(0x1ba),_0x4b98fa(0x1df));return _0x4098fe;}function isObject(_0x4e1354){const _0x3b0110=a300_0x373303;return _0x4e1354!==null&&typeof _0x4e1354===_0x3b0110(0x1b6)&&!Array[_0x3b0110(0x1c9)](_0x4e1354);}function isMissingFile(_0x1adef2){const _0x271c65=a300_0x373303;return Boolean(_0x1adef2&&typeof _0x1adef2===_0x271c65(0x1b6)&&_0x1adef2[_0x271c65(0x1e3)]===_0x271c65(0x1d1));}function a300_0x2d2a(_0x34f7da,_0x4f83a5){_0x34f7da=_0x34f7da-0x1b1;const _0x31fc4e=a300_0x31fc();let _0x2d2a01=_0x31fc4e[_0x34f7da];return _0x2d2a01;}function isAlreadyExists(_0x545fd7){const _0xb69db9=a300_0x373303;return Boolean(_0x545fd7&&typeof _0x545fd7==='object'&&_0x545fd7[_0xb69db9(0x1e3)]===_0xb69db9(0x1dd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a301_0x424b4b=a301_0x44bf;(function(_0x360663,_0x5e2ae8){const _0x3ebca6=a301_0x44bf,_0x3fa356=_0x360663();while(!![]){try{const _0x5d852d=-parseInt(_0x3ebca6(0x1ce))/0x1+parseInt(_0x3ebca6(0x1b4))/0x2*(-parseInt(_0x3ebca6(0x1f1))/0x3)+parseInt(_0x3ebca6(0x1ed))/0x4*(-parseInt(_0x3ebca6(0x1e0))/0x5)+-parseInt(_0x3ebca6(0x1e8))/0x6*(-parseInt(_0x3ebca6(0x1d3))/0x7)+parseInt(_0x3ebca6(0x1db))/0x8+-parseInt(_0x3ebca6(0x1bb))/0x9*(parseInt(_0x3ebca6(0x1c6))/0xa)+parseInt(_0x3ebca6(0x1bf))/0xb;if(_0x5d852d===_0x5e2ae8)break;else _0x3fa356['push'](_0x3fa356['shift']());}catch(_0x27ec01){_0x3fa356['push'](_0x3fa356['shift']());}}}(a301_0x2aa5,0x27675));import{AsyncLocalStorage}from'node:async_hooks';function a301_0x2aa5(){const _0x3f6cc6=['utf8','10736ioOXdG','length','defineProperty','application/json','6zBUukr','boolean','get','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','success','data','status','178646raWEpO','byteLength','API\x20error\x20code:\x20','stringify','includes','POST','test','40446vmHZDy','origin','method','aborted','6484962xlBPJs','105','content-type','httpStatus','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','signal','/page','530ksYZJf','errorCode','cookie','run','any','Knowledge\x20management\x20request\x20timed\x20out.','scope','authRequired','26731clDFsB','object','Knowledge\x20management\x20request\x20exceeds\x20the\x2032\x20MiB\x20JSON\x20limit.\x20Keep\x20the\x20source\x20file\x20and\x20reduce\x20the\x20request\x20size.','text','isArray','7PJajAO','pageTooLarge','body','Knowledge\x20management\x20request\x20cancelled.','Knowledge\x20management\x20returned\x20an\x20invalid\x20response\x20(HTTP\x20','0000','hasOwn','cancelled','2091880GGwxkn','Knowledge\x20requests\x20require\x20POST\x20and\x20a\x20non-empty\x20body\x20appCode\x20(at\x20most\x20100\x20characters);\x20scope\x20must\x20come\x20from\x20the\x20path.','appCode','headers','Invalid\x20knowledge\x20management\x20API\x20path.','575TBSzGk','getStore','Knowledge\x20management\x20request\x20failed\x20(HTTP\x20','validation','remoteErrorCode','endsWith','transportFailure','string','375534hVLWPi','errorMsg','kb-browser-v1','api_error'];a301_0x2aa5=function(){return _0x3f6cc6;};return a301_0x2aa5();}import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin,parseKnowledgeJson}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';function a301_0x44bf(_0x2279bc,_0x5c7359){_0x2279bc=_0x2279bc-0x1b2;const _0x2aa531=a301_0x2aa5();let _0x44bfe7=_0x2aa531[_0x2279bc];return _0x44bfe7;}const WRITE_RECONCILIATION='\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.',MAX_BODY_BYTES=0x20*0x400*0x400,session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a301_0x424b4b(0x1e6)];[a301_0x424b4b(0x1e4)];[a301_0x424b4b(0x1c2)];[a301_0x424b4b(0x1d4)];constructor(_0x4d506c,_0x2cf04d=![],_0x3f2b8e,_0x49a822,_0x2ba69c=![]){const _0x554d71=a301_0x424b4b;super(_0x554d71(0x1eb),0x1,_0x4d506c,_0x3f2b8e?_0x554d71(0x1b6)+_0x3f2b8e:undefined),this[_0x554d71(0x1e6)]=_0x2cf04d,this[_0x554d71(0x1e4)]=_0x3f2b8e,this['httpStatus']=_0x49a822,this[_0x554d71(0x1d4)]=_0x2ba69c;if(_0x3f2b8e)Object[_0x554d71(0x1ef)](this,_0x554d71(0x1b2),{'value':{'remoteErrorCode':_0x3f2b8e},'enumerable':![]});}}function resolveOrigin(){const _0x4119ec=a301_0x424b4b,_0x5bc3a9=getKbServiceDomain();if(!_0x5bc3a9)throw CliErrors['validation'](_0x4119ec(0x1c3));try{return normalizeKbServiceOrigin(_0x5bc3a9);}catch{throw CliErrors['validation'](_0x4119ec(0x1f4));}}export function withKbManagementSession(_0x38374f,_0x303268){const _0x46aa78=a301_0x424b4b;return session[_0x46aa78(0x1c9)]({'origin':resolveOrigin(),'signal':_0x38374f},_0x303268);}export async function kbManagementRequest(_0x47b030,_0x3734f9){const _0x1682f7=a301_0x424b4b;if(!/^\/api\/knowledge-base\/company\/(rules\/)?(page|get-one|get-by-title|create|update|delete|status|list)$/[_0x1682f7(0x1ba)](_0x47b030))throw CliErrors['validation'](_0x1682f7(0x1df));if(_0x3734f9[_0x1682f7(0x1bd)]!==undefined&&_0x3734f9['method']!=='POST'||typeof _0x3734f9[_0x1682f7(0x1d5)]?.[_0x1682f7(0x1dd)]!=='string'||!_0x3734f9[_0x1682f7(0x1d5)]['appCode']['trim']()||_0x3734f9[_0x1682f7(0x1d5)][_0x1682f7(0x1dd)][_0x1682f7(0x1ee)]>0x64||Object['hasOwn'](_0x3734f9[_0x1682f7(0x1d5)],_0x1682f7(0x1cc)))throw CliErrors[_0x1682f7(0x1e3)](_0x1682f7(0x1dc));const _0x12ebcc=session[_0x1682f7(0x1e1)]()?.[_0x1682f7(0x1bc)]??resolveOrigin();if(!_0x3734f9[_0x1682f7(0x1c8)]['trim']())throw CliErrors['authRequired']();const _0x3cb004=_0x3734f9[_0x1682f7(0x1d5)]===undefined?undefined:JSON[_0x1682f7(0x1b7)](_0x3734f9[_0x1682f7(0x1d5)]);if(_0x3cb004!==undefined&&Buffer[_0x1682f7(0x1b5)](_0x3cb004,_0x1682f7(0x1ec))>MAX_BODY_BYTES)throw CliErrors['validation'](_0x1682f7(0x1d0));const _0x2f3f3a=/\/(create|update|delete)$/[_0x1682f7(0x1ba)](_0x47b030),_0x4fb781=new AbortController(),_0x2e69bc=_0x3734f9[_0x1682f7(0x1c4)]??session[_0x1682f7(0x1e1)]()?.[_0x1682f7(0x1c4)],_0x44459d=_0x2e69bc?AbortSignal[_0x1682f7(0x1ca)]([_0x2e69bc,_0x4fb781['signal']]):_0x4fb781[_0x1682f7(0x1c4)];if(_0x44459d[_0x1682f7(0x1be)])throw CliErrors[_0x1682f7(0x1da)](_0x1682f7(0x1d6));const _0x133841=setTimeout(()=>_0x4fb781['abort'](),0xea60);try{let _0x2118de;try{_0x2118de=await fetch(''+_0x12ebcc+_0x47b030,{'method':_0x1682f7(0x1b9),'redirect':'error','signal':_0x44459d,'headers':{'Content-Type':_0x1682f7(0x1f0),'Cookie':_0x3734f9['cookie'],'X-Invoke-Source':'cli:rabetbase',..._0x2f3f3a?{'X-CSRF-Token':_0x1682f7(0x1ea)}:{}},..._0x3cb004===undefined?{}:{'body':_0x3cb004}});}catch{throw new KbManagementError(_0x4fb781['signal'][_0x1682f7(0x1be)]?_0x1682f7(0x1cb):'Knowledge\x20management\x20request\x20failed\x20or\x20was\x20cancelled.',!![]);}if(_0x2118de[_0x1682f7(0x1b3)]===0x191)throw CliErrors[_0x1682f7(0x1cd)]();const _0x48f0b0=()=>new KbManagementError(_0x1682f7(0x1d7)+_0x2118de[_0x1682f7(0x1b3)]+').'+(_0x2f3f3a?WRITE_RECONCILIATION:''),![],undefined,_0x2118de[_0x1682f7(0x1b3)]);if(!(_0x2118de[_0x1682f7(0x1de)][_0x1682f7(0x1f3)](_0x1682f7(0x1c1))??'')['toLowerCase']()[_0x1682f7(0x1b8)](_0x1682f7(0x1f0)))throw _0x48f0b0();let _0x414984;try{_0x414984=await _0x2118de[_0x1682f7(0x1d1)]();}catch{throw new KbManagementError('Knowledge\x20management\x20response\x20was\x20interrupted.',_0x2f3f3a);}let _0x183804;try{_0x183804=parseKnowledgeJson(_0x414984);}catch{throw _0x48f0b0();}if(!_0x183804||typeof _0x183804!==_0x1682f7(0x1cf)||Array[_0x1682f7(0x1d2)](_0x183804))throw _0x48f0b0();const _0x208fdf=_0x183804;if(typeof _0x208fdf['success']!==_0x1682f7(0x1f2)||typeof _0x208fdf[_0x1682f7(0x1c7)]!==_0x1682f7(0x1e7)||!/^\d{1,8}$/['test'](_0x208fdf['errorCode'])||!Object[_0x1682f7(0x1d9)](_0x208fdf,'data')||_0x208fdf[_0x1682f7(0x1f5)]&&_0x208fdf['errorCode']!==_0x1682f7(0x1d8)||!_0x208fdf[_0x1682f7(0x1f5)]&&_0x208fdf[_0x1682f7(0x1c7)]===_0x1682f7(0x1d8))throw _0x48f0b0();if(!_0x2118de['ok']||!_0x208fdf[_0x1682f7(0x1f5)])throw new KbManagementError(_0x1682f7(0x1e2)+_0x2118de[_0x1682f7(0x1b3)]+').'+(_0x2f3f3a&&_0x2118de[_0x1682f7(0x1b3)]>=0x1f4?WRITE_RECONCILIATION:''),![],_0x208fdf[_0x1682f7(0x1c7)],_0x2118de[_0x1682f7(0x1b3)],_0x47b030[_0x1682f7(0x1e5)](_0x1682f7(0x1c5))&&_0x2118de[_0x1682f7(0x1b3)]===0x19d&&_0x208fdf[_0x1682f7(0x1c7)]===_0x1682f7(0x1c0)&&_0x208fdf[_0x1682f7(0x1e9)]==='LEGACY_LIST_TOO_LARGE');if(_0x2118de[_0x1682f7(0x1b3)]!==0xc8)throw _0x48f0b0();return _0x208fdf[_0x1682f7(0x1b2)];}finally{clearTimeout(_0x133841);}}
|