@lovrabet/rabetbase-cli 2.5.5-beta.1 → 2.5.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -3
- package/skills/rabetbase/guides/independent-deployment.md +11 -1
- package/skills/rabetbase/references/rabetbase-config.md +16 -19
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
- package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
- package/skills/rabetbase-page-generation/SKILL.md +13 -9
- package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
- package/skills/rabetbase-page-generation/references/generation.md +64 -15
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a287_0x8cf25c=a287_0x3c35;(function(_0x2514b3,_0x2a1707){const _0xaff9c8=a287_0x3c35,_0x4a3b54=_0x2514b3();while(!![]){try{const _0x26d730=-parseInt(_0xaff9c8(0x2f0))/0x1*(parseInt(_0xaff9c8(0x1d4))/0x2)+parseInt(_0xaff9c8(0x290))/0x3*(-parseInt(_0xaff9c8(0x2d0))/0x4)+parseInt(_0xaff9c8(0x30b))/0x5*(parseInt(_0xaff9c8(0x1c1))/0x6)+parseInt(_0xaff9c8(0x259))/0x7*(-parseInt(_0xaff9c8(0x1b7))/0x8)+parseInt(_0xaff9c8(0x257))/0x9+-parseInt(_0xaff9c8(0x2a8))/0xa+parseInt(_0xaff9c8(0x233))/0xb;if(_0x26d730===_0x2a1707)break;else _0x4a3b54['push'](_0x4a3b54['shift']());}catch(_0x25912b){_0x4a3b54['push'](_0x4a3b54['shift']());}}}(a287_0x182b,0x88390));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x8cf25c(0x207),'$id':a287_0x8cf25c(0x31f),'title':a287_0x8cf25c(0x1c8),'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x1fa),a287_0x8cf25c(0x286),a287_0x8cf25c(0x2fb)],'$defs':{'userId':{'anyOf':[{'type':a287_0x8cf25c(0x1da),'minLength':0x1},{'type':a287_0x8cf25c(0x245),'minimum':0x1}]},'position':{'type':a287_0x8cf25c(0x2c7),'required':['x','y'],'properties':{'x':{'type':a287_0x8cf25c(0x22f),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x1c0),'unit'],'properties':{'value':{'type':a287_0x8cf25c(0x245),'minimum':0x1},'unit':{'enum':[a287_0x8cf25c(0x2d9),a287_0x8cf25c(0x31b),a287_0x8cf25c(0x254),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a287_0x8cf25c(0x2c7),'required':['id','type','name','position'],'properties':{'id':{'type':a287_0x8cf25c(0x1da),'pattern':a287_0x8cf25c(0x2a3)},'type':{'enum':['START',a287_0x8cf25c(0x20c),a287_0x8cf25c(0x307),a287_0x8cf25c(0x300),a287_0x8cf25c(0x1df),a287_0x8cf25c(0x2ea)]},'name':{'type':'string','minLength':0x1},'path':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'position':{'$ref':a287_0x8cf25c(0x241)},'approvalMode':{'enum':[a287_0x8cf25c(0x2e2),'ALL',a287_0x8cf25c(0x288)]},'taskMode':{'enum':['APPROVAL','HANDLE']},'assignee':{'type':'object','required':['strategy'],'properties':{'strategy':{'enum':['FIXED',a287_0x8cf25c(0x278)]},'userIds':{'type':a287_0x8cf25c(0x2db),'minItems':0x1,'items':{'$ref':a287_0x8cf25c(0x1f8)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a287_0x8cf25c(0x1da),'pattern':a287_0x8cf25c(0x211)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x2f6),a287_0x8cf25c(0x1d7)],'properties':{'strategy':{'const':a287_0x8cf25c(0x309)},'userIds':{'type':a287_0x8cf25c(0x2db),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a287_0x8cf25c(0x1e4)},'result':{'enum':[a287_0x8cf25c(0x253),a287_0x8cf25c(0x2cf)]},'scriptName':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'resultVariable':{'type':a287_0x8cf25c(0x1da),'pattern':a287_0x8cf25c(0x2a3)},'async':{'type':'object','properties':{'enabled':{'type':a287_0x8cf25c(0x1e4)},'retryCount':{'type':a287_0x8cf25c(0x245),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a287_0x8cf25c(0x2da)}},'additionalProperties':!![]},'timeout':{'type':a287_0x8cf25c(0x2c7),'properties':{'enabled':{'type':'boolean'},'duration':{'$ref':a287_0x8cf25c(0x2da)},'action':{'enum':[a287_0x8cf25c(0x214),a287_0x8cf25c(0x25a),'EXECUTE_BFF']},'interrupting':{'type':a287_0x8cf25c(0x1e4)},'scriptName':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'resultVariable':{'type':a287_0x8cf25c(0x1da),'pattern':a287_0x8cf25c(0x2a3)}},'additionalProperties':!![]},'cc':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x28f)],'properties':{'recipientUserIds':{'type':a287_0x8cf25c(0x2db),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a287_0x8cf25c(0x2db),'uniqueItems':!![],'items':{'type':a287_0x8cf25c(0x1da),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x8cf25c(0x2c7),'required':['configCode',a287_0x8cf25c(0x1b9)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'failurePolicy':{'enum':[a287_0x8cf25c(0x280),a287_0x8cf25c(0x293)]},'template':{'type':'object','required':['title','summary'],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'detailMarkdown':{'type':a287_0x8cf25c(0x1da)},'facts':{'type':a287_0x8cf25c(0x2db),'maxItems':0x8,'items':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x311),a287_0x8cf25c(0x1c0)],'properties':{'label':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'value':{'type':a287_0x8cf25c(0x1da),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x8cf25c(0x2db),'maxItems':0x2,'items':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x26b),a287_0x8cf25c(0x23c)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a287_0x8cf25c(0x1da),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x8cf25c(0x2db),'items':{'type':a287_0x8cf25c(0x2c7),'required':[a287_0x8cf25c(0x23e),a287_0x8cf25c(0x1c0)],'properties':{'type':{'enum':[a287_0x8cf25c(0x28b),a287_0x8cf25c(0x278),a287_0x8cf25c(0x267)]},'value':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'role':{'enum':['TO','CC',a287_0x8cf25c(0x287)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x8cf25c(0x2c7),'properties':{'id':{'type':a287_0x8cf25c(0x1da),'pattern':a287_0x8cf25c(0x2a3)},'source':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'target':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'sourceNodeId':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'targetNodeId':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'conditionType':{'enum':['ALWAYS',a287_0x8cf25c(0x253),a287_0x8cf25c(0x2cf),'EXPRESSION']},'expression':{'type':a287_0x8cf25c(0x1da)},'defaultFlow':{'type':'boolean'},'name':{'type':a287_0x8cf25c(0x1da)},'waypoints':{'type':a287_0x8cf25c(0x2db),'items':{'$ref':a287_0x8cf25c(0x241)}}},'allOf':[{'anyOf':[{'required':[a287_0x8cf25c(0x25d)]},{'required':[a287_0x8cf25c(0x26f)]}]},{'anyOf':[{'required':['target']},{'required':[a287_0x8cf25c(0x25e)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'flowDesc':{'type':a287_0x8cf25c(0x1da)},'flowType':{'enum':[a287_0x8cf25c(0x1e0),a287_0x8cf25c(0x315)]},'datasetCode':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'pageId':{'type':a287_0x8cf25c(0x245)},'templateName':![],'flowJson':{'type':'object','required':[a287_0x8cf25c(0x24b),a287_0x8cf25c(0x1e7)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a287_0x8cf25c(0x1da),'const':a287_0x8cf25c(0x21d),'description':'Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.'},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':a287_0x8cf25c(0x1da),'minLength':0x1},'nodes':{'type':a287_0x8cf25c(0x2db),'minItems':0x1,'items':{'$ref':a287_0x8cf25c(0x1ff)}},'edges':{'type':a287_0x8cf25c(0x2db),'minItems':0x1,'items':{'$ref':a287_0x8cf25c(0x1f3)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x8cf25c(0x27e),a287_0x8cf25c(0x249),'flowName',a287_0x8cf25c(0x28a),a287_0x8cf25c(0x204),a287_0x8cf25c(0x2e3),'pageId',a287_0x8cf25c(0x1c2)],REMOVED_ROOT_FIELDS=['id','appCode','templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x8cf25c(0x21d),NODE_TYPES=new Set(['START',a287_0x8cf25c(0x20c),'APPROVAL','CONDITION',a287_0x8cf25c(0x1df),a287_0x8cf25c(0x2ea)]),CONDITION_TYPES=new Set(['ALWAYS',a287_0x8cf25c(0x253),a287_0x8cf25c(0x2cf),a287_0x8cf25c(0x21b)]),APPROVAL_MODES=new Set(['SINGLE',a287_0x8cf25c(0x2ad),a287_0x8cf25c(0x288)]),APPROVAL_TASK_MODES=new Set([a287_0x8cf25c(0x307),a287_0x8cf25c(0x1f1)]),FLOW_TIME_UNITS=new Set([a287_0x8cf25c(0x2d9),a287_0x8cf25c(0x31b),a287_0x8cf25c(0x254),a287_0x8cf25c(0x2dc)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a287_0x8cf25c(0x25a),a287_0x8cf25c(0x2c3)]),FLOW_TYPES=new Set([a287_0x8cf25c(0x1e0),a287_0x8cf25c(0x315)]),FLOW_PAGE_MODES=new Set([a287_0x8cf25c(0x230),a287_0x8cf25c(0x292)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x8cf25c(0x280),a287_0x8cf25c(0x293)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x8cf25c(0x28b),a287_0x8cf25c(0x278),a287_0x8cf25c(0x267)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x8cf25c(0x287)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x8cf25c(0x1ee),UNSUPPORTED_FORM_MESSAGE=a287_0x8cf25c(0x24a),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x8cf25c(0x27a),RESERVED_RESULT_VARIABLES=new Set([a287_0x8cf25c(0x2ca),a287_0x8cf25c(0x1f5),a287_0x8cf25c(0x2a4),a287_0x8cf25c(0x222),a287_0x8cf25c(0x213),a287_0x8cf25c(0x2a1),a287_0x8cf25c(0x252),'approval_sys_pageId',a287_0x8cf25c(0x303),a287_0x8cf25c(0x308)]);export function normalizeFlowConfig(_0x1ea783){const _0x4bf56d=a287_0x8cf25c;if(!isRecord(_0x1ea783))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x388f2a=cloneJsonValue(_0x1ea783),_0x3facda=_0x388f2a[_0x4bf56d(0x2fb)],_0x3f9721=isRecord(_0x3facda)?cloneJsonValue(_0x3facda):{},_0x579740=[],_0x5d3dd3=[];for(const _0x52d4bf of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x4bf56d(0x1de)]['call'](_0x388f2a,_0x52d4bf))continue;delete _0x388f2a[_0x52d4bf],_0x5d3dd3[_0x4bf56d(0x1db)](_0x52d4bf),_0x579740[_0x4bf56d(0x1db)]({'code':'legacy_field_removed','path':_0x52d4bf,'message':_0x52d4bf+_0x4bf56d(0x2bc)});}for(const _0x36b92e of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x4bf56d(0x2ac)][_0x4bf56d(0x1de)][_0x4bf56d(0x2c6)](_0x3f9721,_0x36b92e))continue;const _0x445da7='flowJson.'+_0x36b92e;delete _0x3f9721[_0x36b92e],_0x5d3dd3[_0x4bf56d(0x1db)](_0x445da7),_0x579740['push']({'code':_0x4bf56d(0x2cc),'path':_0x445da7,'message':_0x445da7+_0x4bf56d(0x2bc)});}if(Object[_0x4bf56d(0x2ac)][_0x4bf56d(0x1de)][_0x4bf56d(0x2c6)](_0x3f9721,_0x4bf56d(0x2af))){const _0x5e6b17=_0x3f9721[_0x4bf56d(0x2af)],_0x20f75a=typeof _0x5e6b17===_0x4bf56d(0x1da)?_0x5e6b17['trim']():_0x5e6b17;if(isEmptyJsonValue(_0x5e6b17)||_0x20f75a===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4db7e1=_0x4bf56d(0x221);delete _0x3f9721['schemaVersion'],_0x5d3dd3['push'](_0x4db7e1),_0x579740[_0x4bf56d(0x1db)]({'code':'legacy_field_removed','path':_0x4db7e1,'message':_0x4db7e1+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x4bf56d(0x235)});}}removeEmptyMetadata(_0x3f9721,'flowJson',_0x579740,_0x5d3dd3);_0x388f2a[_0x4bf56d(0x286)]===_0x4bf56d(0x315)&&!Object[_0x4bf56d(0x2ac)][_0x4bf56d(0x1de)][_0x4bf56d(0x2c6)](_0x3f9721,_0x4bf56d(0x212))&&(_0x3f9721['pageMode']=_0x4bf56d(0x230));_0x388f2a['flowJson']=_0x3f9721;if(typeof _0x388f2a[_0x4bf56d(0x1fa)]==='string')_0x388f2a[_0x4bf56d(0x1fa)]=_0x388f2a['flowName']['trim']();return{'config':_0x388f2a,'warnings':_0x579740,'removedPaths':_0x5d3dd3};}export function validateFlowConfig(_0x3e97cc){const _0x54e224=a287_0x8cf25c;let _0x5054e8;try{_0x5054e8=normalizeFlowConfig(_0x3e97cc);}catch(_0x802251){const _0x58aa13=_0x802251 instanceof Error?_0x802251['message']:String(_0x802251),_0x35aeea={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x58aa13}],'warnings':[],'normalized':_0x35aeea,'validationConfig':_0x35aeea};}const _0xa55f8d=_0x5054e8[_0x54e224(0x28d)],_0x2f7997=cloneJsonValue(_0xa55f8d),_0x3cd3e5=_0x2f7997[_0x54e224(0x2fb)];_0x3cd3e5[_0x54e224(0x27e)]=_0x54e224(0x237),_0x3cd3e5[_0x54e224(0x1fa)]=_0xa55f8d[_0x54e224(0x1fa)];typeof _0xa55f8d[_0x54e224(0x204)]==='string'&&_0xa55f8d['datasetCode'][_0x54e224(0x1d3)]()&&(_0x3cd3e5[_0x54e224(0x28a)]=_0xa55f8d[_0x54e224(0x204)][_0x54e224(0x1d3)]());const _0x404d7d=[];return validateOuterMetadata(_0xa55f8d,_0x404d7d),validateFlowClassification(_0xa55f8d,_0x404d7d),validateGraph(_0xa55f8d[_0x54e224(0x2fb)],_0x404d7d),{'valid':_0x404d7d[_0x54e224(0x318)]===0x0,'errors':_0x404d7d,'warnings':_0x5054e8['warnings'],'normalized':_0xa55f8d,'validationConfig':_0x2f7997};}function validateFlowClassification(_0x4df875,_0x1c25be){const _0x328cf6=a287_0x8cf25c;if(!isRecord(_0x4df875['flowJson']))return;const _0x28cc01=_0x4df875[_0x328cf6(0x286)],_0x5d4f3c=_0x4df875[_0x328cf6(0x2fb)][_0x328cf6(0x212)];_0x5d4f3c!==undefined&&(typeof _0x5d4f3c!==_0x328cf6(0x1da)||!FLOW_PAGE_MODES[_0x328cf6(0x2ae)](_0x5d4f3c))&&_0x1c25be[_0x328cf6(0x1db)]({'path':_0x328cf6(0x283),'message':_0x328cf6(0x23a)+String(_0x5d4f3c)+'.'});_0x28cc01===_0x328cf6(0x1e0)&&_0x5d4f3c!==undefined&&_0x1c25be[_0x328cf6(0x1db)]({'path':'flowJson.pageMode','message':_0x328cf6(0x22c)});_0x28cc01===_0x328cf6(0x315)&&_0x5d4f3c==='PLATFORM_FORM'&&_0x1c25be['push']({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x28cc01===_0x328cf6(0x1e0)||_0x28cc01===_0x328cf6(0x315))&&validateCustomPageNavigation(_0x4df875,_0x28cc01,_0x5d4f3c,_0x1c25be);if(_0x28cc01!==_0x328cf6(0x1e0)||!Array[_0x328cf6(0x2df)](_0x4df875[_0x328cf6(0x2fb)][_0x328cf6(0x24b)]))return;_0x4df875[_0x328cf6(0x2fb)][_0x328cf6(0x24b)][_0x328cf6(0x236)]((_0x43751f,_0x48d12e)=>{const _0x4e8649=_0x328cf6;isRecord(_0x43751f)&&_0x43751f[_0x4e8649(0x23e)]===_0x4e8649(0x307)&&_0x43751f[_0x4e8649(0x2a0)]==='HANDLE'&&_0x1c25be['push']({'path':_0x4e8649(0x2fa)+_0x48d12e+_0x4e8649(0x2e4),'message':_0x4e8649(0x1cb)});});}function validateCustomPageNavigation(_0x4af14d,_0x5edb3b,_0x252f6c,_0xc29c9c){const _0x2284fc=a287_0x8cf25c,_0x5d9953=_0x4af14d[_0x2284fc(0x2fb)][_0x2284fc(0x2b2)];_0x5d9953!==undefined&&_0xc29c9c['push']({'path':_0x2284fc(0x304),'message':_0x2284fc(0x1ec)});const _0x417f70=_0x4af14d['flowJson'][_0x2284fc(0x240)];_0x417f70!==undefined&&(typeof _0x417f70!==_0x2284fc(0x1da)||_0x417f70[_0x2284fc(0x1d3)]()==='')&&_0xc29c9c[_0x2284fc(0x1db)]({'path':_0x2284fc(0x1c7),'message':_0x2284fc(0x1bf)});const _0x2eaa0c=Array[_0x2284fc(0x2df)](_0x4af14d[_0x2284fc(0x2fb)][_0x2284fc(0x24b)])?_0x4af14d[_0x2284fc(0x2fb)][_0x2284fc(0x24b)][_0x2284fc(0x2ab)]((_0x3c0bfd,_0x28991e)=>({'node':_0x3c0bfd,'index':_0x28991e}))[_0x2284fc(0x255)](({node:_0x540bb0})=>isRecord(_0x540bb0)&&_0x540bb0['path']!==undefined):[],_0xf58da5=_0x417f70!==undefined||_0x2eaa0c[_0x2284fc(0x318)]>0x0,_0x479509=_0x252f6c===undefined&&_0x5edb3b===_0x2284fc(0x315)?_0x2284fc(0x230):_0x252f6c;_0xf58da5&&(_0x5edb3b!=='INDEPENDENT_FLOW'||_0x479509!=='CUSTOM_PAGE')&&(_0x417f70!==undefined&&_0xc29c9c[_0x2284fc(0x1db)]({'path':_0x2284fc(0x1c7),'message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x2eaa0c[_0x2284fc(0x236)](({index:_0x3a949e})=>{const _0x37d374=_0x2284fc;_0xc29c9c[_0x37d374(0x1db)]({'path':_0x37d374(0x2fa)+_0x3a949e+_0x37d374(0x265),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x461c0d,_0x3c2706,_0x3b8978={}){const _0x2a0a1f=a287_0x8cf25c,_0x2addab=resolve(_0x461c0d),_0x5cd8a9=_0x2addab+'.'+process['pid']+'.'+randomUUID()+_0x2a0a1f(0x262),_0x147c4a=JSON[_0x2a0a1f(0x246)](_0x3c2706,null,0x2)+'\x0a';let _0x153ac3;try{try{_0x153ac3=(await stat(_0x2addab))['mode']&0x1ff;}catch{_0x153ac3=undefined;}await writeFile(_0x5cd8a9,_0x147c4a,{'encoding':_0x2a0a1f(0x219),'flag':'wx','mode':_0x153ac3??0x1a4});if(_0x153ac3!==undefined)await chmod(_0x5cd8a9,_0x153ac3);_0x3b8978[_0x2a0a1f(0x270)]===![]?(await link(_0x5cd8a9,_0x2addab),await unlink(_0x5cd8a9)):await rename(_0x5cd8a9,_0x2addab);}finally{await unlink(_0x5cd8a9)[_0x2a0a1f(0x2fc)](()=>undefined);}}function validateOuterMetadata(_0x4b8c86,_0x5ecbe2){const _0x14598d=a287_0x8cf25c;(typeof _0x4b8c86[_0x14598d(0x1fa)]!==_0x14598d(0x1da)||_0x4b8c86['flowName'][_0x14598d(0x1d3)]()==='')&&_0x5ecbe2[_0x14598d(0x1db)]({'path':_0x14598d(0x1fa),'message':_0x14598d(0x2e1)});_0x4b8c86[_0x14598d(0x2e5)]!==undefined&&typeof _0x4b8c86[_0x14598d(0x2e5)]!=='string'&&_0x5ecbe2[_0x14598d(0x1db)]({'path':'flowDesc','message':_0x14598d(0x26c)});if(_0x4b8c86['flowType']===undefined||_0x4b8c86['flowType']===null)_0x5ecbe2[_0x14598d(0x1db)]({'path':_0x14598d(0x286),'message':_0x14598d(0x25c)});else(typeof _0x4b8c86['flowType']!==_0x14598d(0x1da)||!FLOW_TYPES[_0x14598d(0x2ae)](_0x4b8c86[_0x14598d(0x286)]))&&_0x5ecbe2[_0x14598d(0x1db)]({'path':_0x14598d(0x286),'message':_0x14598d(0x2ff)+String(_0x4b8c86[_0x14598d(0x286)])+'.'});_0x4b8c86['datasetCode']!==undefined&&typeof _0x4b8c86[_0x14598d(0x204)]!==_0x14598d(0x1da)&&_0x5ecbe2[_0x14598d(0x1db)]({'path':'datasetCode','message':_0x14598d(0x268)}),_0x4b8c86['pageId']!==undefined&&(!Number['isInteger'](_0x4b8c86[_0x14598d(0x2f3)])||_0x4b8c86['pageId']<0x0)&&_0x5ecbe2[_0x14598d(0x1db)]({'path':_0x14598d(0x2f3),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x4b8c86[_0x14598d(0x286)]==='INDEPENDENT_FLOW'&&_0x4b8c86[_0x14598d(0x204)]!==undefined&&_0x5ecbe2[_0x14598d(0x1db)]({'path':_0x14598d(0x204),'message':_0x14598d(0x305)}),_0x4b8c86['flowType']===_0x14598d(0x315)&&_0x4b8c86[_0x14598d(0x2f3)]!==undefined&&_0x5ecbe2['push']({'path':_0x14598d(0x2f3),'message':_0x14598d(0x1fb)});}function validateGraph(_0x589d41,_0x52bae6){const _0x47a8e9=a287_0x8cf25c;if(!isRecord(_0x589d41)){_0x52bae6['push']({'path':_0x47a8e9(0x2fb),'message':_0x47a8e9(0x266)});return;}!Array[_0x47a8e9(0x2df)](_0x589d41[_0x47a8e9(0x24b)])&&_0x52bae6[_0x47a8e9(0x1db)]({'path':'flowJson.nodes','message':_0x47a8e9(0x2ef)});!Array['isArray'](_0x589d41[_0x47a8e9(0x1e7)])&&_0x52bae6['push']({'path':_0x47a8e9(0x247),'message':_0x47a8e9(0x2b7)});Object[_0x47a8e9(0x2ac)][_0x47a8e9(0x1de)][_0x47a8e9(0x2c6)](_0x589d41,'schemaVersion')&&_0x52bae6[_0x47a8e9(0x1db)]({'path':_0x47a8e9(0x221),'message':_0x47a8e9(0x1d2)+String(_0x589d41[_0x47a8e9(0x2af)])+_0x47a8e9(0x28e)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x270225 of[_0x47a8e9(0x273),_0x47a8e9(0x1bd),_0x47a8e9(0x239)]){Object[_0x47a8e9(0x2ac)][_0x47a8e9(0x1de)][_0x47a8e9(0x2c6)](_0x589d41,_0x270225)&&_0x52bae6[_0x47a8e9(0x1db)]({'path':_0x47a8e9(0x23d)+_0x270225,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x47a8e9(0x2df)](_0x589d41[_0x47a8e9(0x24b)])||!Array[_0x47a8e9(0x2df)](_0x589d41[_0x47a8e9(0x1e7)]))return;const _0x37ab1d=new Map(),_0x1554bd=[],_0x44d7b8=[],_0x19506c=new Map(),_0x4f9224=new Map(),_0xff4204=new Set();let _0x126ba6=0x0;_0x589d41[_0x47a8e9(0x24b)][_0x47a8e9(0x236)]((_0x45a113,_0xd8b788)=>{const _0x4e9c58=_0x47a8e9,_0x608797=_0x4e9c58(0x2fa)+_0xd8b788+']';if(!isRecord(_0x45a113)){_0x52bae6[_0x4e9c58(0x1db)]({'path':_0x608797,'message':_0x4e9c58(0x1cf)});return;}const _0x26aff1=_0x45a113;if(typeof _0x26aff1['id']!==_0x4e9c58(0x1da)||!BPMN_ID_PATTERN[_0x4e9c58(0x1ea)](_0x26aff1['id']))_0x52bae6['push']({'path':_0x608797+_0x4e9c58(0x2d3),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x37ab1d[_0x4e9c58(0x2ae)](_0x26aff1['id'])?_0x52bae6['push']({'path':_0x608797+'.id','message':'Duplicate\x20node\x20id:\x20'+_0x26aff1['id']+'.'}):(_0x37ab1d['set'](_0x26aff1['id'],_0x26aff1),_0xff4204[_0x4e9c58(0x238)](_0x26aff1['id']));if(!NODE_TYPES[_0x4e9c58(0x2ae)](_0x26aff1[_0x4e9c58(0x23e)]))_0x52bae6[_0x4e9c58(0x1db)]({'path':_0x608797+_0x4e9c58(0x20e),'message':_0x4e9c58(0x2ba)+String(_0x26aff1[_0x4e9c58(0x23e)])+'.'});else{if(_0x26aff1[_0x4e9c58(0x23e)]===_0x4e9c58(0x209))_0x1554bd[_0x4e9c58(0x1db)](_0x26aff1['id']);else _0x26aff1[_0x4e9c58(0x23e)]===_0x4e9c58(0x20c)&&_0x44d7b8['push'](_0x26aff1['id']);}_0x26aff1[_0x4e9c58(0x23e)]===_0x4e9c58(0x307)&&(_0x26aff1['taskMode']===undefined||_0x26aff1[_0x4e9c58(0x2a0)]===_0x4e9c58(0x307))&&(_0x126ba6+=0x1);validateNode(_0x26aff1,_0x608797,_0x52bae6);if(_0x26aff1[_0x4e9c58(0x23e)]===_0x4e9c58(0x1df)){const _0x206c23=resolveEffectiveResultVariable(_0x26aff1['resultVariable'],![]);_0x206c23&&(registerResultVariableOwner(_0x4f9224,_0x206c23,_0x26aff1['id'],_0x52bae6),!_0x19506c[_0x4e9c58(0x2ae)](_0x206c23)&&_0x19506c[_0x4e9c58(0x1e2)](_0x206c23,_0x26aff1['id']));}if(_0x26aff1[_0x4e9c58(0x23e)]===_0x4e9c58(0x307)&&isRecord(_0x26aff1['timeout'])&&_0x26aff1[_0x4e9c58(0x24f)]['enabled']===!![]&&_0x26aff1['timeout'][_0x4e9c58(0x31e)]===_0x4e9c58(0x2c3)){const _0x369034=resolveEffectiveResultVariable(_0x26aff1[_0x4e9c58(0x24f)][_0x4e9c58(0x234)],!![]);_0x369034&®isterResultVariableOwner(_0x4f9224,_0x369034,_0x26aff1['id']+_0x4e9c58(0x216),_0x52bae6);}});_0x1554bd['length']!==0x1&&_0x52bae6[_0x47a8e9(0x1db)]({'path':_0x47a8e9(0x2e0),'message':_0x47a8e9(0x277)});_0x44d7b8[_0x47a8e9(0x318)]===0x0&&_0x52bae6['push']({'path':'flowJson.nodes','message':_0x47a8e9(0x217)});const _0x1f3374=new Map(),_0x2d3a90=new Map(),_0x4674b0=new Map(),_0x3d1802=new Set();_0x589d41[_0x47a8e9(0x1e7)]['forEach']((_0x31d77f,_0x477aa9)=>{const _0x21688a=_0x47a8e9,_0x510eeb=_0x21688a(0x2c1)+_0x477aa9+']';if(!isRecord(_0x31d77f)){_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb,'message':_0x21688a(0x26d)});return;}const _0x4e9fb0=_0x31d77f;_0x4674b0[_0x21688a(0x1e2)](_0x4e9fb0,_0x510eeb);const _0x477c96=resolveEdgeEndpoint(_0x4e9fb0[_0x21688a(0x25d)],_0x4e9fb0['sourceNodeId']),_0x3d7869=resolveEdgeEndpoint(_0x4e9fb0[_0x21688a(0x25f)],_0x4e9fb0[_0x21688a(0x25e)]);if(!_0x477c96)_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x2d7),'message':'edge\x20source\x20is\x20required.'});if(!_0x3d7869)_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x298),'message':_0x21688a(0x1dc)});_0x477c96&&!_0x37ab1d['has'](_0x477c96)&&_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x2d7),'message':_0x21688a(0x229)+_0x477c96+'.'});_0x3d7869&&!_0x37ab1d[_0x21688a(0x2ae)](_0x3d7869)&&_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x298),'message':_0x21688a(0x316)+_0x3d7869+'.'});if(_0x4e9fb0['id']!==undefined){if(typeof _0x4e9fb0['id']!==_0x21688a(0x1da)||!BPMN_ID_PATTERN[_0x21688a(0x1ea)](_0x4e9fb0['id']))_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x2d3),'message':_0x21688a(0x282)});else{if(_0xff4204[_0x21688a(0x2ae)](_0x4e9fb0['id']))_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb+_0x21688a(0x2d3),'message':_0x21688a(0x27f)+_0x4e9fb0['id']+'.'});else!_0xff4204[_0x21688a(0x2ae)](_0x4e9fb0['id'])&&_0xff4204[_0x21688a(0x238)](_0x4e9fb0['id']);}}if(_0x477c96&&_0x3d7869){const _0x40a087=_0x477c96+'\x00'+_0x3d7869+'\x00'+(_0x4e9fb0[_0x21688a(0x297)]??_0x21688a(0x1fe));_0x3d1802[_0x21688a(0x2ae)](_0x40a087)?_0x52bae6[_0x21688a(0x1db)]({'path':_0x510eeb,'message':_0x21688a(0x276)+_0x477c96+_0x21688a(0x1d9)+_0x3d7869+'\x20('+(_0x4e9fb0[_0x21688a(0x297)]??_0x21688a(0x1fe))+').'}):_0x3d1802['add'](_0x40a087);}validateEdge(_0x4e9fb0,_0x510eeb,_0x52bae6),_0x477c96&&_0x3d7869&&(_0x1f3374[_0x21688a(0x22d)](_0x477c96)?.['push'](_0x4e9fb0)??_0x1f3374[_0x21688a(0x1e2)](_0x477c96,[_0x4e9fb0]),_0x2d3a90['get'](_0x3d7869)?.[_0x21688a(0x1db)](_0x4e9fb0)??_0x2d3a90[_0x21688a(0x1e2)](_0x3d7869,[_0x4e9fb0]));});if(_0x1554bd[_0x47a8e9(0x318)]!==0x1)return;validateGraphShape(_0x37ab1d,_0x1554bd[0x0],_0x44d7b8,_0x1f3374,_0x2d3a90,_0x4674b0,_0x52bae6),validateScriptResultReferences(_0x37ab1d,_0x1554bd[0x0],_0x1f3374,_0x2d3a90,_0x4674b0,_0x19506c,_0x52bae6),validateApprovalResults(_0x37ab1d,_0x126ba6,_0x44d7b8,_0x52bae6);}function a287_0x182b(){const _0x4fd0be=['waypoints','boolean','.waypoints[','NOTIFICATION\x20node\x20requires\x20template.','edges','detailMarkdown','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','test','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','scriptResult','.cc.recipientUserIds[','matchAll','HANDLE','role','#/$defs/flowEdge','empty_metadata_removed','approved','cc\x20must\x20be\x20an\x20object.','\x20is\x20required.','#/$defs/userId','context','flowName','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','.text','isSafeInteger','ALWAYS','#/$defs/flowNode','\x20must\x20be\x20a\x20finite\x20number.','.transferCandidates.userIds','.cc.visible','indexOf','datasetCode','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','https://json-schema.org/draft/2020-12/schema','Unsupported\x20notification\x20version:\x20','START','Node\x20cannot\x20reach\x20any\x20END.','Duplicate\x20resultVariable:\x20','END','.cc','.type','timeout.enabled\x20must\x20be\x20a\x20boolean.','timeout\x20must\x20be\x20an\x20object.','^[1-9][0-9]*$','pageMode','approval_sys_initiatorUserId','AUTO_APPROVE','retryInterval','.timeout','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','form','utf8','.assignee.roleId','EXPRESSION','.path','approval.simple-flow.v1','Node\x20has\x20no\x20incoming\x20edge.','Unsupported\x20condition\x20type:\x20','waypoint.','flowJson.schemaVersion','approval_sys_processInstanceId','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.configCode','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','.assignee.userIds','Notification\x20recipients\x20must\x20be\x20an\x20array.','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.facts','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','get','interrupting','number','CUSTOM_PAGE','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','25100669NiTiXu','resultVariable','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','forEach','__rabetbase_local_validation__','add','formPermissions','Unsupported\x20pageMode:\x20','path','url','flowJson.','type','.name','startPath','#/$defs/position','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','defaultFlow\x20must\x20be\x20a\x20boolean.','.detailMarkdown','integer','stringify','flowJson.edges','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowCode','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','nodes','.value','.defaultFlow','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','timeout','isInteger','\x20was\x20empty\x20and\x20was\x20removed.','approval_sys_datasetCode','APPROVED','HOURS','filter','Expression\x20references\x20SCRIPT\x20resultVariable\x20','8283942jyrdgf','startsWith','679FAtWXn','AUTO_REJECT','\x20actions.','flowType\x20is\x20required.','source','targetNodeId','target','.conditionType','\x20users.','.tmp','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','version','].path','flowJson\x20must\x20be\x20an\x20object.','EMAIL','datasetCode\x20must\x20be\x20a\x20string.','replace','cc.recipientUserIds\x20supports\x20at\x20most\x20','text','flowDesc\x20must\x20be\x20a\x20string.','edge\x20must\x20be\x20an\x20object.','.url','sourceNodeId','overwrite','name','Notification\x20template.actions\x20must\x20be\x20an\x20array.','formSchema','.async','Node\x20is\x20not\x20reachable\x20from\x20START.','Duplicate\x20edge\x20route:\x20','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','ROLE','transferCandidates\x20must\x20be\x20an\x20object.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','defaultFlow','\x20facts.','.timeout.resultVariable','flowKey','Duplicate\x20BPMN\x20element\x20id:\x20','CONTINUE','failurePolicy\x20must\x20be\x20a\x20string.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','flowJson.pageMode','approval_sys_','.timeout.action','flowType','BCC','ANY','.assignee.strategy','bindDatasetCode','USER','Notification\x20configCode\x20is\x20required.','config','.\x20This\x20CLI\x20supports\x20only\x20','recipientUserIds','3zejwqe','parse','PLATFORM_FORM','FAIL','Notification\x20recipient\x20must\x20be\x20an\x20object.','Duplicate\x20value:\x20','enabled','conditionType','.target','Notification\x20recipient.type\x20is\x20required.','.resultVariable','visible','keys','timeout.interrupting\x20must\x20be\x20a\x20boolean.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','Node\x20has\x20no\x20outgoing\x20edge.','taskMode','approval_sys_initiatorUsername','.taskMode','^[A-Za-z_][A-Za-z0-9_]*$','approval_sys_appCode','Notification\x20template\x20supports\x20at\x20most\x20','failurePolicy','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','5817610KrTqXY','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Notification\x20action.text\x20is\x20required.','map','prototype','ALL','has','schemaVersion','size','Notification\x20fact.','startPageId','variables','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','formPermission','every','edges\x20must\x20be\x20an\x20array.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Unsupported\x20node\x20type:\x20','actions','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','async\x20must\x20be\x20an\x20object.',',\x20but\x20node\x20','NOTIFICATION\x20node\x20requires\x20config.','duration\x20requires\x20value\x20and\x20unit.','flowJson.edges[','.transferCandidates.strategy','EXECUTE_BFF','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','recipients','call','object','APPROVAL\x20node\x20requires\x20assignee.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','formData','some','legacy_field_removed','position','roleId','REJECTED','3604980AKrQuG','.recipients','edge\x20name\x20must\x20be\x20a\x20string.','.id','.role','.timeout.scriptName','.pageId','.source','value\x20must\x20be\x20a\x20non-empty\x20string.','SECONDS','#/$defs/timeAmount','array','DAYS','summary','sequential\x20must\x20be\x20a\x20boolean.','isArray','flowJson.nodes','flowName\x20is\x20required.','SINGLE','appCode','].taskMode','flowDesc','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','value\x20must\x20be\x20an\x20array.','result','.timeout.enabled','NOTIFICATION','.scriptName','.timeout.interrupting','.unit','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','nodes\x20must\x20be\x20an\x20array.','829MBalmM','toUpperCase','Duplicate\x20cc\x20recipient\x20userId:\x20','pageId','sequential','.transferCandidates','strategy','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','title','includes','flowJson.nodes[','flowJson','catch','.actions','async.enabled\x20must\x20be\x20a\x20boolean.','Unsupported\x20flowType:\x20','CONDITION','Notification\x20fact\x20must\x20be\x20an\x20object.','.transferCandidates.userIds[','approval_sys_operationType','flowJson.startPageId','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','entries','APPROVAL','approval_sys_dataId','FIXED','.expression','2229065cszuxL','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','flowJson.nodes.','.failurePolicy','Unsupported\x20approval\x20mode:\x20','scriptName','label','assignee','findIndex','.cc.recipientUserIds','INDEPENDENT_FLOW','Edge\x20target\x20node\x20not\x20found:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','length','async','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','MINUTES','.version','transferCandidates','action','https://lovrabet.com/schema/rabetbase-flow-config.json','.timeout.duration','.template','67528YdrXHP','.waypoints','template','.sequential','facts','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','formDefinitions','slice','startPath\x20must\x20be\x20a\x20non-empty\x20string.','value','6vBlvqS','templateName','approvalMode','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','delete','duration','flowJson.startPath','Rabetbase\x20FlowConfig','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','event','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Reserved\x20resultVariable:\x20','node\x20must\x20be\x20an\x20object.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','expression','Unsupported\x20schemaVersion:\x20','trim','1902OueavS','readSources','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','userIds','.config','\x20->\x20','string','push','edge\x20target\x20is\x20required.','metadata','hasOwnProperty','SCRIPT','FORM_FLOW','EXPRESSION\x20edge\x20requires\x20expression.','set'];a287_0x182b=function(){return _0x4fd0be;};return a287_0x182b();}function validateNode(_0x1cc795,_0x2ba99f,_0xfa54fc){const _0x2db691=a287_0x8cf25c;for(const _0x31a857 of[_0x2db691(0x218),_0x2db691(0x2b5)]){Object[_0x2db691(0x2ac)][_0x2db691(0x1de)]['call'](_0x1cc795,_0x31a857)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.'+_0x31a857,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x1cc795[_0x2db691(0x23e)]))return;(typeof _0x1cc795['name']!==_0x2db691(0x1da)||_0x1cc795[_0x2db691(0x271)][_0x2db691(0x1d3)]()==='')&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.name','message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x1cc795[_0x2db691(0x2f3)]!==undefined&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x2d6),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x1cc795[_0x2db691(0x23b)]!==undefined){if(typeof _0x1cc795[_0x2db691(0x23b)]!==_0x2db691(0x1da)||_0x1cc795[_0x2db691(0x23b)][_0x2db691(0x1d3)]()==='')_0xfa54fc['push']({'path':_0x2ba99f+_0x2db691(0x21c),'message':_0x2db691(0x29e)});else _0x1cc795[_0x2db691(0x23e)]!==_0x2db691(0x307)&&_0x1cc795[_0x2db691(0x23e)]!==_0x2db691(0x20c)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.path','message':_0x2db691(0x2a9)});}const _0x3eb26d=_0x1cc795[_0x2db691(0x2cd)];if(!isRecord(_0x3eb26d))_0xfa54fc['push']({'path':_0x2ba99f+'.position','message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x5c2209 of['x','y']){const _0x4d563a=_0x3eb26d[_0x5c2209];(typeof _0x4d563a!=='number'||!Number['isFinite'](_0x4d563a)||_0x4d563a<0x0)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.position.'+_0x5c2209,'message':'position.'+_0x5c2209+_0x2db691(0x2e6)});}if(_0x1cc795[_0x2db691(0x23e)]===_0x2db691(0x307)){const _0x47acf3=_0x1cc795[_0x2db691(0x1c3)]??'SINGLE',_0x372deb=_0x1cc795[_0x2db691(0x2a0)]??_0x2db691(0x307);!APPROVAL_TASK_MODES[_0x2db691(0x2ae)](_0x372deb)&&_0xfa54fc['push']({'path':_0x2ba99f+_0x2db691(0x2a2),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x372deb)+'.'});!APPROVAL_MODES[_0x2db691(0x2ae)](_0x47acf3)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.approvalMode','message':_0x2db691(0x30f)+String(_0x47acf3)+'.'});if(!isRecord(_0x1cc795[_0x2db691(0x312)]))_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.assignee','message':_0x2db691(0x2c8)});else{const _0xda3a=_0x1cc795[_0x2db691(0x312)][_0x2db691(0x2f6)];_0xda3a!==_0x2db691(0x309)&&_0xda3a!==_0x2db691(0x278)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x289),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0xda3a==='FIXED'){const _0x54a7da=_0x1cc795[_0x2db691(0x312)][_0x2db691(0x1d7)];if(!Array[_0x2db691(0x2df)](_0x54a7da)||_0x54a7da[_0x2db691(0x318)]===0x0)_0xfa54fc['push']({'path':_0x2ba99f+'.assignee.userIds','message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x110c18=_0x54a7da[_0x2db691(0x313)](_0x148149=>!isValidUserId(_0x148149));_0x110c18>=0x0&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+'.assignee.userIds['+_0x110c18+']','message':_0x2db691(0x1bc)});const _0x10ea52=new Set(_0x54a7da['filter'](isValidUserId)['map'](_0x58c8d9=>String(_0x58c8d9)[_0x2db691(0x1d3)]()));_0x47acf3==='SINGLE'&&_0x10ea52[_0x2db691(0x2b0)]>0x1&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x227),'message':_0x2db691(0x242)});}}if(_0xda3a==='ROLE'){const _0x24e380=_0x1cc795[_0x2db691(0x312)][_0x2db691(0x2ce)],_0x45d507=typeof _0x24e380==='number'||typeof _0x24e380===_0x2db691(0x1da)?Number(String(_0x24e380)['trim']()):Number['NaN'];(!Number['isSafeInteger'](_0x45d507)||_0x45d507<=0x0)&&_0xfa54fc['push']({'path':_0x2ba99f+_0x2db691(0x21a),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x1cc795[_0x2db691(0x31d)]!==undefined){if(!isRecord(_0x1cc795[_0x2db691(0x31d)]))_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x2f5),'message':_0x2db691(0x279)});else{if(_0x1cc795['transferCandidates'][_0x2db691(0x2f6)]!==_0x2db691(0x309))_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x2c2),'message':_0x2db691(0x1cc)});else{const _0x1b53c7=_0x1cc795[_0x2db691(0x31d)]['userIds'];if(!Array[_0x2db691(0x2df)](_0x1b53c7)||_0x1b53c7[_0x2db691(0x318)]===0x0)_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x201),'message':_0x2db691(0x2a7)});else{const _0x250a80=_0x1b53c7[_0x2db691(0x313)](_0x26840f=>!isValidUserId(_0x26840f));_0x250a80>=0x0&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x302)+_0x250a80+']','message':_0x2db691(0x205)});}}}}}_0x1cc795['sequential']!==undefined&&typeof _0x1cc795[_0x2db691(0x2f4)]!==_0x2db691(0x1e4)&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x1ba),'message':_0x2db691(0x2de)});if(_0x1cc795[_0x2db691(0x23e)]===_0x2db691(0x1df)){(typeof _0x1cc795[_0x2db691(0x310)]!=='string'||_0x1cc795[_0x2db691(0x310)]['trim']()==='')&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x2eb),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x1cc795['resultVariable']!==undefined){if(typeof _0x1cc795[_0x2db691(0x234)]!=='string'||!VARIABLE_PATTERN[_0x2db691(0x1ea)](_0x1cc795[_0x2db691(0x234)]))_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x29a),'message':_0x2db691(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x2db691(0x2ae)](_0x1cc795[_0x2db691(0x234)])||_0x1cc795['resultVariable'][_0x2db691(0x258)](_0x2db691(0x284)))&&_0xfa54fc[_0x2db691(0x1db)]({'path':_0x2ba99f+_0x2db691(0x29a),'message':_0x2db691(0x1ce)+_0x1cc795[_0x2db691(0x234)]+'.'});}}validateAsyncExecution(_0x1cc795,_0x2ba99f,_0xfa54fc),validateApprovalTimeout(_0x1cc795,_0x2ba99f,_0xfa54fc),validateCcConfig(_0x1cc795,_0x2ba99f,_0xfa54fc),_0x1cc795['type']===_0x2db691(0x2ea)&&validateNotificationConfig(_0x1cc795[_0x2db691(0x28d)],_0x2ba99f+_0x2db691(0x1d8),_0xfa54fc);}function validateAsyncExecution(_0x21a114,_0x66bbbb,_0x5e0d7a){const _0x181949=a287_0x8cf25c;if(_0x21a114[_0x181949(0x319)]===undefined)return;if(!isRecord(_0x21a114[_0x181949(0x319)])){_0x5e0d7a[_0x181949(0x1db)]({'path':_0x66bbbb+_0x181949(0x274),'message':_0x181949(0x2bd)});return;}if(_0x21a114[_0x181949(0x319)][_0x181949(0x296)]!==undefined&&typeof _0x21a114['async'][_0x181949(0x296)]!==_0x181949(0x1e4)){_0x5e0d7a[_0x181949(0x1db)]({'path':_0x66bbbb+'.async.enabled','message':_0x181949(0x2fe)});return;}if(_0x21a114['async'][_0x181949(0x296)]!==!![])return;_0x21a114['type']!==_0x181949(0x1df)&&_0x5e0d7a['push']({'path':_0x66bbbb+_0x181949(0x274),'message':_0x181949(0x317)});const _0x664e28=_0x21a114['async']['retryCount']??0x3;(!Number[_0x181949(0x250)](_0x664e28)||_0x664e28<0x1||_0x664e28>MAX_ASYNC_RETRY_COUNT)&&_0x5e0d7a[_0x181949(0x1db)]({'path':_0x66bbbb+'.async.retryCount','message':_0x181949(0x2f7)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x21a114['async'][_0x181949(0x215)]!==undefined&&validateTimeAmount(_0x21a114[_0x181949(0x319)][_0x181949(0x215)],_0x66bbbb+'.async.retryInterval',_0x5e0d7a);}function a287_0x3c35(_0x1291ee,_0x27d0c6){_0x1291ee=_0x1291ee-0x1b5;const _0x182b79=a287_0x182b();let _0x3c3577=_0x182b79[_0x1291ee];return _0x3c3577;}function validateApprovalTimeout(_0x51ad82,_0x2589c8,_0x3ac0f0){const _0x5c4d99=a287_0x8cf25c;if(_0x51ad82[_0x5c4d99(0x24f)]===undefined)return;if(!isRecord(_0x51ad82[_0x5c4d99(0x24f)])){_0x3ac0f0['push']({'path':_0x2589c8+_0x5c4d99(0x216),'message':_0x5c4d99(0x210)});return;}if(_0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x296)]!==undefined&&typeof _0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x296)]!==_0x5c4d99(0x1e4)){_0x3ac0f0['push']({'path':_0x2589c8+_0x5c4d99(0x2e9),'message':_0x5c4d99(0x20f)});return;}if(_0x51ad82['timeout']['enabled']!==!![])return;if(_0x51ad82['timeout'][_0x5c4d99(0x22e)]!==undefined&&typeof _0x51ad82['timeout'][_0x5c4d99(0x22e)]!==_0x5c4d99(0x1e4)){_0x3ac0f0[_0x5c4d99(0x1db)]({'path':_0x2589c8+_0x5c4d99(0x2ec),'message':_0x5c4d99(0x29d)});return;}_0x51ad82[_0x5c4d99(0x23e)]!==_0x5c4d99(0x307)&&_0x3ac0f0[_0x5c4d99(0x1db)]({'path':_0x2589c8+'.timeout','message':_0x5c4d99(0x2ee)});validateTimeAmount(_0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x1c6)],_0x2589c8+_0x5c4d99(0x1b5),_0x3ac0f0);const _0x5c67d3=_0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x31e)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x5c67d3)){_0x3ac0f0[_0x5c4d99(0x1db)]({'path':_0x2589c8+_0x5c4d99(0x285),'message':'timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.'});return;}(_0x51ad82[_0x5c4d99(0x2a0)]??_0x5c4d99(0x307))===_0x5c4d99(0x1f1)&&_0x5c67d3!=='EXECUTE_BFF'&&_0x3ac0f0['push']({'path':_0x2589c8+'.timeout.action','message':_0x5c4d99(0x226)});const _0x14f781=_0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x22e)]??_0x5c67d3!==_0x5c4d99(0x2c3);if(_0x5c67d3===_0x5c4d99(0x2c3))_0x14f781&&_0x3ac0f0['push']({'path':_0x2589c8+_0x5c4d99(0x2ec),'message':_0x5c4d99(0x1d0)}),(typeof _0x51ad82[_0x5c4d99(0x24f)][_0x5c4d99(0x310)]!==_0x5c4d99(0x1da)||_0x51ad82[_0x5c4d99(0x24f)]['scriptName']['trim']()==='')&&_0x3ac0f0[_0x5c4d99(0x1db)]({'path':_0x2589c8+_0x5c4d99(0x2d5),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x51ad82[_0x5c4d99(0x24f)]['resultVariable'],_0x2589c8+_0x5c4d99(0x27d),_0x3ac0f0);else!_0x14f781&&_0x3ac0f0[_0x5c4d99(0x1db)]({'path':_0x2589c8+_0x5c4d99(0x2ec),'message':_0x5c67d3+_0x5c4d99(0x2c9)});}function validateTimeAmount(_0xff7374,_0x1c3a23,_0x1207fb){const _0x43f884=a287_0x8cf25c;if(!isRecord(_0xff7374)){_0x1207fb[_0x43f884(0x1db)]({'path':_0x1c3a23,'message':_0x43f884(0x2c0)});return;}(!Number[_0x43f884(0x250)](_0xff7374[_0x43f884(0x1c0)])||Number(_0xff7374['value'])<=0x0)&&_0x1207fb[_0x43f884(0x1db)]({'path':_0x1c3a23+_0x43f884(0x24c),'message':_0x43f884(0x231)}),!FLOW_TIME_UNITS[_0x43f884(0x2ae)](_0xff7374['unit'])&&_0x1207fb[_0x43f884(0x1db)]({'path':_0x1c3a23+_0x43f884(0x2ed),'message':_0x43f884(0x31a)});}function validateOptionalResultVariable(_0x51c9cf,_0x1bbe87,_0x387abf){const _0x1d1e4f=a287_0x8cf25c;if(_0x51c9cf===undefined||_0x51c9cf===null||_0x51c9cf==='')return;if(typeof _0x51c9cf!==_0x1d1e4f(0x1da)||!VARIABLE_PATTERN[_0x1d1e4f(0x1ea)](_0x51c9cf))_0x387abf['push']({'path':_0x1bbe87,'message':_0x1d1e4f(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x1d1e4f(0x2ae)](_0x51c9cf)||_0x51c9cf[_0x1d1e4f(0x258)](_0x1d1e4f(0x284)))&&_0x387abf[_0x1d1e4f(0x1db)]({'path':_0x1bbe87,'message':'Reserved\x20resultVariable:\x20'+_0x51c9cf+'.'});}function validateCcConfig(_0x50bfac,_0x84de71,_0x5aa82a){const _0x59b4e9=a287_0x8cf25c;if(_0x50bfac['cc']===undefined)return;if(!isRecord(_0x50bfac['cc'])){_0x5aa82a['push']({'path':_0x84de71+_0x59b4e9(0x20d),'message':_0x59b4e9(0x1f6)});return;}_0x50bfac[_0x59b4e9(0x23e)]!==_0x59b4e9(0x20c)&&_0x50bfac[_0x59b4e9(0x23e)]!==_0x59b4e9(0x307)&&_0x5aa82a[_0x59b4e9(0x1db)]({'path':_0x84de71+_0x59b4e9(0x20d),'message':_0x59b4e9(0x223)});Object[_0x59b4e9(0x2ac)][_0x59b4e9(0x1de)][_0x59b4e9(0x2c6)](_0x50bfac['cc'],_0x59b4e9(0x1d5))&&_0x5aa82a[_0x59b4e9(0x1db)]({'path':_0x84de71+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x93118=_0x50bfac['cc'][_0x59b4e9(0x28f)];if(!Array[_0x59b4e9(0x2df)](_0x93118)||_0x93118[_0x59b4e9(0x318)]===0x0)_0x5aa82a[_0x59b4e9(0x1db)]({'path':_0x84de71+_0x59b4e9(0x314),'message':_0x59b4e9(0x1eb)});else{_0x93118['length']>MAX_CC_RECIPIENTS&&_0x5aa82a[_0x59b4e9(0x1db)]({'path':_0x84de71+_0x59b4e9(0x314),'message':_0x59b4e9(0x26a)+MAX_CC_RECIPIENTS+_0x59b4e9(0x261)});const _0x521cde=new Set();_0x93118[_0x59b4e9(0x236)]((_0x43e44a,_0x5118d7)=>{const _0x2fd1a3=_0x59b4e9;if(typeof _0x43e44a!==_0x2fd1a3(0x1da)||_0x43e44a['trim']()==='')_0x5aa82a[_0x2fd1a3(0x1db)]({'path':_0x84de71+'.cc.recipientUserIds['+_0x5118d7+']','message':_0x2fd1a3(0x1ed)});else _0x521cde[_0x2fd1a3(0x2ae)](_0x43e44a[_0x2fd1a3(0x1d3)]())?_0x5aa82a['push']({'path':_0x84de71+_0x2fd1a3(0x1ef)+_0x5118d7+']','message':_0x2fd1a3(0x2f2)+_0x43e44a['trim']()+'.'}):_0x521cde[_0x2fd1a3(0x238)](_0x43e44a[_0x2fd1a3(0x1d3)]());});}validateStringArray(_0x50bfac['cc'][_0x59b4e9(0x29b)],_0x84de71+_0x59b4e9(0x202),_0x5aa82a);}function validateStringArray(_0x440f32,_0x4267ac,_0xf5d352){const _0x2be6de=a287_0x8cf25c;if(_0x440f32===undefined)return;if(!Array['isArray'](_0x440f32)){_0xf5d352[_0x2be6de(0x1db)]({'path':_0x4267ac,'message':_0x2be6de(0x2e7)});return;}const _0x19f924=new Set();_0x440f32[_0x2be6de(0x236)]((_0x49b30c,_0x452f3e)=>{const _0x25a64b=_0x2be6de;if(typeof _0x49b30c!==_0x25a64b(0x1da)||_0x49b30c[_0x25a64b(0x1d3)]()==='')_0xf5d352[_0x25a64b(0x1db)]({'path':_0x4267ac+'['+_0x452f3e+']','message':_0x25a64b(0x2d8)});else _0x19f924[_0x25a64b(0x2ae)](_0x49b30c[_0x25a64b(0x1d3)]())?_0xf5d352[_0x25a64b(0x1db)]({'path':_0x4267ac+'['+_0x452f3e+']','message':_0x25a64b(0x295)+_0x49b30c[_0x25a64b(0x1d3)]()+'.'}):_0x19f924['add'](_0x49b30c[_0x25a64b(0x1d3)]());});}function validateNotificationConfig(_0x2f8761,_0x2ff5c6,_0x2c3afa){const _0x56b86a=a287_0x8cf25c;if(!isRecord(_0x2f8761)){_0x2c3afa['push']({'path':_0x2ff5c6,'message':_0x56b86a(0x2bf)});return;}if(_0x2f8761[_0x56b86a(0x264)]!==undefined&&_0x2f8761[_0x56b86a(0x264)]!==null){if(typeof _0x2f8761[_0x56b86a(0x264)]!=='string')_0x2c3afa['push']({'path':_0x2ff5c6+_0x56b86a(0x31c),'message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x2f8761[_0x56b86a(0x264)][_0x56b86a(0x1d3)]()&&_0x2f8761[_0x56b86a(0x264)][_0x56b86a(0x1d3)]()!=='v1'&&_0x2c3afa[_0x56b86a(0x1db)]({'path':_0x2ff5c6+_0x56b86a(0x31c),'message':_0x56b86a(0x208)+_0x2f8761[_0x56b86a(0x264)]+'.'});}const _0x4e71a3=requireNotificationString(_0x2f8761['configCode'],_0x2ff5c6+_0x56b86a(0x225),_0x56b86a(0x28c),_0x2c3afa);_0x4e71a3?.[_0x56b86a(0x2f9)]('${')&&_0x2c3afa['push']({'path':_0x2ff5c6+_0x56b86a(0x225),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x2f8761[_0x56b86a(0x2a6)]!==undefined&&_0x2f8761[_0x56b86a(0x2a6)]!==null){if(typeof _0x2f8761[_0x56b86a(0x2a6)]!==_0x56b86a(0x1da))_0x2c3afa['push']({'path':_0x2ff5c6+_0x56b86a(0x30e),'message':_0x56b86a(0x281)});else!NOTIFICATION_FAILURE_POLICIES[_0x56b86a(0x2ae)](_0x2f8761['failurePolicy'][_0x56b86a(0x1d3)]()[_0x56b86a(0x2f1)]())&&_0x2c3afa[_0x56b86a(0x1db)]({'path':_0x2ff5c6+_0x56b86a(0x30e),'message':_0x56b86a(0x2b9)});}!isRecord(_0x2f8761[_0x56b86a(0x1b9)])?_0x2c3afa[_0x56b86a(0x1db)]({'path':_0x2ff5c6+_0x56b86a(0x1b6),'message':_0x56b86a(0x1e6)}):validateNotificationTemplate(_0x2f8761[_0x56b86a(0x1b9)],_0x2ff5c6+_0x56b86a(0x1b6),_0x2c3afa),validateNotificationRecipients(_0x2f8761[_0x56b86a(0x2c5)],_0x2ff5c6+_0x56b86a(0x2d1),_0x2c3afa);}function validateNotificationTemplate(_0x2f83b0,_0xe9dcbe,_0x56d5cb){const _0x1d6366=a287_0x8cf25c;for(const _0x53126e of[_0x1d6366(0x2f8),_0x1d6366(0x2dd)]){const _0x2dc9c6=requireNotificationString(_0x2f83b0[_0x53126e],_0xe9dcbe+'.'+_0x53126e,'Notification\x20template.'+_0x53126e+_0x1d6366(0x1f7),_0x56d5cb);if(_0x2dc9c6)validateNotificationPlaceholders(_0x2dc9c6,_0xe9dcbe+'.'+_0x53126e,_0x56d5cb);}_0x2f83b0[_0x1d6366(0x1e8)]!==undefined&&_0x2f83b0[_0x1d6366(0x1e8)]!==null&&(typeof _0x2f83b0[_0x1d6366(0x1e8)]!==_0x1d6366(0x1da)?_0x56d5cb['push']({'path':_0xe9dcbe+_0x1d6366(0x244),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x2f83b0[_0x1d6366(0x1e8)],_0xe9dcbe+_0x1d6366(0x244),_0x56d5cb)),validateNotificationFacts(_0x2f83b0[_0x1d6366(0x1bb)],_0xe9dcbe+_0x1d6366(0x22b),_0x56d5cb),validateNotificationActions(_0x2f83b0[_0x1d6366(0x2bb)],_0xe9dcbe+_0x1d6366(0x2fd),_0x56d5cb);}function validateNotificationFacts(_0x1516eb,_0x3b2618,_0xf7a46b){const _0x263ae3=a287_0x8cf25c;if(_0x1516eb===undefined||_0x1516eb===null)return;if(!Array[_0x263ae3(0x2df)](_0x1516eb)){_0xf7a46b['push']({'path':_0x3b2618,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x1516eb[_0x263ae3(0x318)]>MAX_NOTIFICATION_FACTS&&_0xf7a46b['push']({'path':_0x3b2618,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x263ae3(0x27c)}),_0x1516eb[_0x263ae3(0x236)]((_0x6d0d2f,_0x456178)=>{const _0xf43599=_0x263ae3,_0x4dbc39=_0x3b2618+'['+_0x456178+']';if(!isRecord(_0x6d0d2f)){_0xf7a46b['push']({'path':_0x4dbc39,'message':_0xf43599(0x301)});return;}for(const _0x1c8c4b of[_0xf43599(0x311),_0xf43599(0x1c0)]){const _0x314c55=requireNotificationString(_0x6d0d2f[_0x1c8c4b],_0x4dbc39+'.'+_0x1c8c4b,_0xf43599(0x2b1)+_0x1c8c4b+'\x20is\x20required.',_0xf7a46b);_0x314c55&&validateNotificationPlaceholders(_0x314c55,_0x4dbc39+'.'+_0x1c8c4b,_0xf7a46b);}});}function validateNotificationActions(_0x4cef8a,_0x308bc4,_0x260cd9){const _0x194175=a287_0x8cf25c;if(_0x4cef8a===undefined||_0x4cef8a===null)return;if(!Array['isArray'](_0x4cef8a)){_0x260cd9[_0x194175(0x1db)]({'path':_0x308bc4,'message':_0x194175(0x272)});return;}_0x4cef8a[_0x194175(0x318)]>MAX_NOTIFICATION_ACTIONS&&_0x260cd9[_0x194175(0x1db)]({'path':_0x308bc4,'message':_0x194175(0x2a5)+MAX_NOTIFICATION_ACTIONS+_0x194175(0x25b)}),_0x4cef8a[_0x194175(0x236)]((_0x240550,_0x1c5a0d)=>{const _0xf59a5d=_0x194175,_0xc80927=_0x308bc4+'['+_0x1c5a0d+']';if(!isRecord(_0x240550)){_0x260cd9['push']({'path':_0xc80927,'message':'Notification\x20action\x20must\x20be\x20an\x20object.'});return;}const _0x261f90=requireNotificationString(_0x240550[_0xf59a5d(0x26b)],_0xc80927+_0xf59a5d(0x1fc),_0xf59a5d(0x2aa),_0x260cd9);if(_0x261f90)validateNotificationPlaceholders(_0x261f90,_0xc80927+_0xf59a5d(0x1fc),_0x260cd9);const _0x7dd010=requireNotificationString(_0x240550[_0xf59a5d(0x23c)],_0xc80927+_0xf59a5d(0x26e),'Notification\x20action.url\x20is\x20required.',_0x260cd9);if(!_0x7dd010)return;validateNotificationPlaceholders(_0x7dd010,_0xc80927+_0xf59a5d(0x26e),_0x260cd9),!/^https?:\/\//i[_0xf59a5d(0x1ea)](_0x7dd010)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xf59a5d(0x1ea)](_0x7dd010)&&_0x260cd9['push']({'path':_0xc80927+_0xf59a5d(0x26e),'message':_0xf59a5d(0x2b4)});});}function validateNotificationRecipients(_0x114794,_0x170707,_0x1e6077){const _0x486554=a287_0x8cf25c;if(_0x114794===undefined||_0x114794===null)return;if(!Array[_0x486554(0x2df)](_0x114794)){_0x1e6077[_0x486554(0x1db)]({'path':_0x170707,'message':_0x486554(0x228)});return;}let _0x20d9a1=![];_0x114794[_0x486554(0x236)]((_0x5ca662,_0xeb077c)=>{const _0x20885e=_0x486554,_0x327cf3=_0x170707+'['+_0xeb077c+']';if(!isRecord(_0x5ca662)){_0x1e6077['push']({'path':_0x327cf3,'message':_0x20885e(0x294)});return;}const _0x2e415f=requireNotificationString(_0x5ca662[_0x20885e(0x23e)],_0x327cf3+'.type',_0x20885e(0x299),_0x1e6077);_0x2e415f&&!NOTIFICATION_RECIPIENT_TYPES[_0x20885e(0x2ae)](_0x2e415f['toUpperCase']())&&_0x1e6077['push']({'path':_0x327cf3+_0x20885e(0x20e),'message':_0x20885e(0x263)});let _0x26839d='TO';_0x5ca662[_0x20885e(0x1f2)]!==undefined&&_0x5ca662['role']!==null&&(typeof _0x5ca662[_0x20885e(0x1f2)]!=='string'?(_0x1e6077[_0x20885e(0x1db)]({'path':_0x327cf3+_0x20885e(0x2d4),'message':_0x20885e(0x24e)}),_0x26839d=''):(_0x26839d=_0x5ca662['role'][_0x20885e(0x1d3)]()[_0x20885e(0x2f1)](),!NOTIFICATION_RECIPIENT_ROLES[_0x20885e(0x2ae)](_0x26839d)&&_0x1e6077[_0x20885e(0x1db)]({'path':_0x327cf3+_0x20885e(0x2d4),'message':_0x20885e(0x1e9)})));if(_0x26839d==='TO')_0x20d9a1=!![];const _0x26c0ef=requireNotificationString(_0x5ca662[_0x20885e(0x1c0)],_0x327cf3+_0x20885e(0x24c),'Notification\x20recipient.value\x20is\x20required.',_0x1e6077);_0x26c0ef&&validateNotificationPlaceholders(_0x26c0ef,_0x327cf3+_0x20885e(0x24c),_0x1e6077);}),_0x114794[_0x486554(0x318)]>0x0&&!_0x20d9a1&&_0x1e6077[_0x486554(0x1db)]({'path':_0x170707,'message':_0x486554(0x2c4)});}function requireNotificationString(_0x1dfca1,_0x1f09f1,_0xa06c4f,_0x13bc0c){const _0x315ef3=a287_0x8cf25c;if(typeof _0x1dfca1!==_0x315ef3(0x1da)||_0x1dfca1[_0x315ef3(0x1d3)]()==='')return _0x13bc0c[_0x315ef3(0x1db)]({'path':_0x1f09f1,'message':_0xa06c4f}),undefined;return _0x1dfca1[_0x315ef3(0x1d3)]();}function validateNotificationPlaceholders(_0x594adb,_0x2b75b1,_0x2b9d58){const _0x463c15=a287_0x8cf25c;for(const _0x581a5c of _0x594adb[_0x463c15(0x1f0)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x402758=_0x581a5c[0x1]?.['trim']()??'',_0x5af08b=_0x402758[_0x463c15(0x203)]('.'),_0x1e1613=_0x5af08b>=0x0?_0x402758[_0x463c15(0x1be)](0x0,_0x5af08b):_0x402758,_0x5d3c11=_0x5af08b>=0x0?_0x402758[_0x463c15(0x1be)](_0x5af08b+0x1)[_0x463c15(0x1d3)]():'';(![_0x463c15(0x1ca),_0x463c15(0x1f9),_0x463c15(0x2b3)][_0x463c15(0x2f9)](_0x1e1613)||_0x5d3c11==='')&&_0x2b9d58['push']({'path':_0x2b75b1,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x581a5c[0x0]+'.'});}_0x594adb[_0x463c15(0x269)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x463c15(0x2f9)]('${')&&_0x2b9d58['push']({'path':_0x2b75b1,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x5e21bd,_0x1d18bd,_0x2bd912){const _0xaaa425=a287_0x8cf25c;_0x5e21bd['name']!==undefined&&typeof _0x5e21bd[_0xaaa425(0x271)]!==_0xaaa425(0x1da)&&_0x2bd912[_0xaaa425(0x1db)]({'path':_0x1d18bd+_0xaaa425(0x23f),'message':_0xaaa425(0x2d2)}),_0x5e21bd['defaultFlow']!==undefined&&typeof _0x5e21bd['defaultFlow']!=='boolean'&&_0x2bd912[_0xaaa425(0x1db)]({'path':_0x1d18bd+_0xaaa425(0x24d),'message':_0xaaa425(0x243)}),_0x5e21bd[_0xaaa425(0x1e3)]!==undefined&&(!Array[_0xaaa425(0x2df)](_0x5e21bd[_0xaaa425(0x1e3)])?_0x2bd912['push']({'path':_0x1d18bd+_0xaaa425(0x1b8),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x5e21bd[_0xaaa425(0x1e3)][_0xaaa425(0x236)]((_0x31bba9,_0x322fb3)=>{const _0x4543be=_0xaaa425;if(!isRecord(_0x31bba9)){_0x2bd912[_0x4543be(0x1db)]({'path':_0x1d18bd+_0x4543be(0x1e5)+_0x322fb3+']','message':_0x4543be(0x1c4)});return;}for(const _0x400d97 of['x','y']){const _0x2e7ee0=_0x31bba9[_0x400d97];(typeof _0x2e7ee0!==_0x4543be(0x22f)||!Number['isFinite'](_0x2e7ee0))&&_0x2bd912[_0x4543be(0x1db)]({'path':_0x1d18bd+'.waypoints['+_0x322fb3+'].'+_0x400d97,'message':_0x4543be(0x220)+_0x400d97+_0x4543be(0x200)});}})),_0x5e21bd[_0xaaa425(0x297)]!==undefined&&!CONDITION_TYPES['has'](_0x5e21bd[_0xaaa425(0x297)])&&_0x2bd912[_0xaaa425(0x1db)]({'path':_0x1d18bd+_0xaaa425(0x260),'message':_0xaaa425(0x21f)+String(_0x5e21bd[_0xaaa425(0x297)])+'.'}),_0x5e21bd[_0xaaa425(0x297)]===_0xaaa425(0x21b)&&(typeof _0x5e21bd[_0xaaa425(0x1d1)]!==_0xaaa425(0x1da)||_0x5e21bd[_0xaaa425(0x1d1)][_0xaaa425(0x1d3)]()==='')&&_0x2bd912[_0xaaa425(0x1db)]({'path':_0x1d18bd+_0xaaa425(0x30a),'message':_0xaaa425(0x1e1)}),_0x5e21bd[_0xaaa425(0x27b)]===!![]&&_0x5e21bd[_0xaaa425(0x297)]!==_0xaaa425(0x1fe)&&_0x2bd912[_0xaaa425(0x1db)]({'path':_0x1d18bd+_0xaaa425(0x24d),'message':_0xaaa425(0x1c9)}),_0x5e21bd[_0xaaa425(0x27b)]===!![]&&typeof _0x5e21bd['expression']===_0xaaa425(0x1da)&&_0x5e21bd['expression'][_0xaaa425(0x1d3)]()!==''&&_0x2bd912['push']({'path':_0x1d18bd+'.expression','message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x10816f,_0x2a4a90,_0x241e39,_0x2def50,_0x4f0158,_0x50874d,_0x336d82){const _0x38ed16=a287_0x8cf25c;for(const [_0x4b87d7,_0x544632]of _0x10816f){const _0x2ddc28=_0x4f0158[_0x38ed16(0x22d)](_0x4b87d7)??[],_0x380d71=_0x2def50[_0x38ed16(0x22d)](_0x4b87d7)??[];_0x544632['type']!==_0x38ed16(0x209)&&_0x2ddc28[_0x38ed16(0x318)]===0x0&&_0x336d82[_0x38ed16(0x1db)]({'path':'flowJson.nodes.'+_0x4b87d7,'message':_0x38ed16(0x21e)});_0x544632[_0x38ed16(0x23e)]!==_0x38ed16(0x20c)&&_0x380d71['length']===0x0&&_0x336d82['push']({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':_0x38ed16(0x29f)});_0x544632[_0x38ed16(0x23e)]===_0x38ed16(0x209)&&_0x2ddc28[_0x38ed16(0x318)]>0x0&&_0x336d82['push']({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':_0x38ed16(0x224)});_0x544632[_0x38ed16(0x23e)]===_0x38ed16(0x20c)&&_0x380d71[_0x38ed16(0x318)]>0x0&&_0x336d82[_0x38ed16(0x1db)]({'path':'flowJson.nodes.'+_0x4b87d7,'message':_0x38ed16(0x2b8)});if(_0x544632[_0x38ed16(0x23e)]==='CONDITION'){_0x380d71['length']<0x2&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x8f7b02=_0x380d71['filter'](_0x40ec54=>_0x40ec54['defaultFlow']===!![]);_0x8f7b02['length']!==0x1&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0x8f7b02[_0x38ed16(0x318)]===0x1){const _0x470ab5=_0x8f7b02[0x0],_0x170143=_0x50874d[_0x38ed16(0x22d)](_0x470ab5)??'flowJson.edges';_0x470ab5[_0x38ed16(0x297)]!==_0x38ed16(0x1fe)&&_0x336d82['push']({'path':_0x170143+_0x38ed16(0x260),'message':_0x38ed16(0x30c)});_0x470ab5[_0x38ed16(0x1d1)]!==undefined&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x170143+_0x38ed16(0x30a),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x3132e4 of _0x380d71){if(_0x3132e4===_0x470ab5)continue;const _0x33e2f2=_0x50874d[_0x38ed16(0x22d)](_0x3132e4)??_0x38ed16(0x247);if(_0x3132e4[_0x38ed16(0x297)]!==_0x38ed16(0x21b))_0x336d82['push']({'path':_0x33e2f2+_0x38ed16(0x260),'message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0x3132e4[_0x38ed16(0x1d1)]!=='string'||_0x3132e4[_0x38ed16(0x1d1)][_0x38ed16(0x1d3)]()==='')&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x33e2f2+'.expression','message':_0x38ed16(0x22a)});}}}if(_0x544632[_0x38ed16(0x23e)]===_0x38ed16(0x307)&&(_0x544632[_0x38ed16(0x2a0)]??'APPROVAL')===_0x38ed16(0x1f1)){if(_0x380d71[_0x38ed16(0x318)]!==0x1)_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':_0x38ed16(0x1d6)});else{const _0x4c8621=_0x380d71[0x0];((_0x4c8621[_0x38ed16(0x297)]??_0x38ed16(0x1fe))!==_0x38ed16(0x1fe)||_0x4c8621['defaultFlow']===!![]||typeof _0x4c8621[_0x38ed16(0x1d1)]===_0x38ed16(0x1da)&&_0x4c8621[_0x38ed16(0x1d1)][_0x38ed16(0x1d3)]()!=='')&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x50874d[_0x38ed16(0x22d)](_0x4c8621)??_0x38ed16(0x247),'message':_0x38ed16(0x248)});}}else{if(_0x544632[_0x38ed16(0x23e)]===_0x38ed16(0x307)){const _0x4c734d=_0x380d71[_0x38ed16(0x2ab)](_0x32fb0f=>_0x32fb0f[_0x38ed16(0x297)]??_0x38ed16(0x1fe)),_0x5508de=_0x4c734d[_0x38ed16(0x255)](_0x555a02=>_0x555a02!=='APPROVED'&&_0x555a02!=='REJECTED');_0x5508de[_0x38ed16(0x318)]>0x0&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':_0x38ed16(0x206)}),_0x4c734d[_0x38ed16(0x255)](_0x17db38=>_0x17db38===_0x38ed16(0x253))['length']!==0x1&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x4c734d[_0x38ed16(0x255)](_0x169093=>_0x169093==='REJECTED')[_0x38ed16(0x318)]!==0x1&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x4b87d7,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x380d71[_0x38ed16(0x2cb)](_0x3bc2f7=>_0x3bc2f7['defaultFlow']===!![])&&_0x336d82['push']({'path':'flowJson.nodes.'+_0x4b87d7,'message':_0x38ed16(0x232)});}}}const _0x1b9a71=new Set(),_0x5345dd=_0x8884c4=>{const _0x97230=_0x38ed16;if(_0x1b9a71[_0x97230(0x2ae)](_0x8884c4))return;_0x1b9a71[_0x97230(0x238)](_0x8884c4);for(const _0x351614 of _0x2def50[_0x97230(0x22d)](_0x8884c4)??[]){const _0x281752=resolveEdgeEndpoint(_0x351614[_0x97230(0x25f)],_0x351614[_0x97230(0x25e)]);if(_0x281752&&_0x10816f[_0x97230(0x2ae)](_0x281752))_0x5345dd(_0x281752);}};_0x5345dd(_0x2a4a90);for(const _0x198a36 of _0x10816f[_0x38ed16(0x29c)]()){!_0x1b9a71['has'](_0x198a36)&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x198a36,'message':_0x38ed16(0x275)});}const _0xc9ad1=_0x241e39[_0x38ed16(0x2cb)](_0x272282=>_0x1b9a71[_0x38ed16(0x2ae)](_0x272282));if(!_0xc9ad1){_0x336d82[_0x38ed16(0x1db)]({'path':'flowJson.edges','message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x35102a=new Set(),_0x51f402=_0x22c912=>{const _0x11195f=_0x38ed16;if(_0x35102a[_0x11195f(0x2ae)](_0x22c912))return;_0x35102a[_0x11195f(0x238)](_0x22c912);for(const _0x4d1ba8 of _0x4f0158['get'](_0x22c912)??[]){const _0x5ac9cd=resolveEdgeEndpoint(_0x4d1ba8[_0x11195f(0x25d)],_0x4d1ba8[_0x11195f(0x26f)]);if(_0x5ac9cd&&_0x10816f['has'](_0x5ac9cd))_0x51f402(_0x5ac9cd);}};for(const _0x2bfeb1 of _0x241e39){if(_0x10816f['has'](_0x2bfeb1))_0x51f402(_0x2bfeb1);}for(const _0x2e9eab of _0x1b9a71){!_0x35102a[_0x38ed16(0x2ae)](_0x2e9eab)&&_0x336d82[_0x38ed16(0x1db)]({'path':_0x38ed16(0x30d)+_0x2e9eab,'message':_0x38ed16(0x20a)});}}function validateApprovalResults(_0xb8ad,_0x3e94ca,_0x24684f,_0x455aa4){const _0x2dd0c1=a287_0x8cf25c;if(_0x3e94ca===0x0)return;const _0x1dfee0=new Set(_0x24684f[_0x2dd0c1(0x2ab)](_0x5cf086=>_0xb8ad['get'](_0x5cf086)?.[_0x2dd0c1(0x2e8)])[_0x2dd0c1(0x255)](_0x3b80f2=>typeof _0x3b80f2===_0x2dd0c1(0x1da)));for(const _0x52ee4d of['APPROVED',_0x2dd0c1(0x2cf)]){!_0x1dfee0[_0x2dd0c1(0x2ae)](_0x52ee4d)&&_0x455aa4[_0x2dd0c1(0x1db)]({'path':_0x2dd0c1(0x2e0),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x52ee4d+'.'});}}function validateScriptResultReferences(_0x22e431,_0x376a15,_0xaa4b21,_0x46ce93,_0xb20e78,_0x366690,_0x4334a0){const _0x2e9e8a=a287_0x8cf25c;if(_0x366690[_0x2e9e8a(0x2b0)]===0x0)return;const _0x4b38c7=new Set(),_0x2ac6d5=_0x2a027d=>{const _0x1b02ba=_0x2e9e8a;if(!_0x4b38c7[_0x1b02ba(0x2ae)](_0x2a027d)&&_0x22e431['has'](_0x2a027d)){_0x4b38c7['add'](_0x2a027d);for(const _0x267b49 of _0xaa4b21['get'](_0x2a027d)??[]){const _0x512f15=resolveEdgeEndpoint(_0x267b49[_0x1b02ba(0x25f)],_0x267b49['targetNodeId']);if(_0x512f15)_0x2ac6d5(_0x512f15);}}};_0x2ac6d5(_0x376a15);const _0xc56bc2=new Map();for(const _0xcdfeec of _0x4b38c7){_0xc56bc2[_0x2e9e8a(0x1e2)](_0xcdfeec,_0xcdfeec===_0x376a15?new Set([_0x376a15]):new Set(_0x4b38c7));}let _0x4f276a=!![];while(_0x4f276a){_0x4f276a=![];for(const _0x5533fa of _0x4b38c7){if(_0x5533fa===_0x376a15)continue;const _0x201794=(_0x46ce93[_0x2e9e8a(0x22d)](_0x5533fa)??[])[_0x2e9e8a(0x2ab)](_0x4375bb=>resolveEdgeEndpoint(_0x4375bb[_0x2e9e8a(0x25d)],_0x4375bb[_0x2e9e8a(0x26f)]))[_0x2e9e8a(0x255)](_0x18ad08=>Boolean(_0x18ad08&&_0x4b38c7[_0x2e9e8a(0x2ae)](_0x18ad08)));if(_0x201794[_0x2e9e8a(0x318)]===0x0)continue;const _0x2f39a3=new Set(_0xc56bc2[_0x2e9e8a(0x22d)](_0x201794[0x0])??[]);for(const _0x30ad1d of _0x201794['slice'](0x1)){const _0x2c5264=_0xc56bc2[_0x2e9e8a(0x22d)](_0x30ad1d)??new Set();for(const _0x51a5ed of _0x2f39a3){if(!_0x2c5264[_0x2e9e8a(0x2ae)](_0x51a5ed))_0x2f39a3[_0x2e9e8a(0x1c5)](_0x51a5ed);}}_0x2f39a3[_0x2e9e8a(0x238)](_0x5533fa);const _0x120ee0=_0xc56bc2['get'](_0x5533fa);!setsEqual(_0x120ee0,_0x2f39a3)&&(_0xc56bc2[_0x2e9e8a(0x1e2)](_0x5533fa,_0x2f39a3),_0x4f276a=!![]);}}for(const [_0x5c694d,_0x203253]of _0xaa4b21){const _0x19cfd5=_0xc56bc2[_0x2e9e8a(0x22d)](_0x5c694d);if(!_0x19cfd5)continue;for(const _0x4855db of _0x203253){if(_0x4855db[_0x2e9e8a(0x297)]!==_0x2e9e8a(0x21b)||typeof _0x4855db['expression']!=='string')continue;for(const [_0x3108e3,_0x2b270]of _0x366690){expressionReferencesVariable(_0x4855db['expression'],_0x3108e3)&&!_0x19cfd5[_0x2e9e8a(0x2ae)](_0x2b270)&&_0x4334a0[_0x2e9e8a(0x1db)]({'path':(_0xb20e78[_0x2e9e8a(0x22d)](_0x4855db)??_0x2e9e8a(0x247))+_0x2e9e8a(0x30a),'message':_0x2e9e8a(0x256)+_0x3108e3+_0x2e9e8a(0x2be)+_0x2b270+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x5c694d+'.'});}}}}function expressionReferencesVariable(_0x35fb5d,_0x3b5fb6){const _0x522ffb=a287_0x8cf25c;let _0x293458=0x0;while(_0x293458<_0x35fb5d[_0x522ffb(0x318)]){const _0x280fff=_0x35fb5d[_0x293458];if(_0x280fff==='\x27'||_0x280fff==='\x22'){_0x293458=skipQuotedExpressionSegment(_0x35fb5d,_0x293458,_0x280fff);continue;}if(!/[A-Za-z_]/['test'](_0x280fff)){_0x293458+=0x1;continue;}const _0x227317=_0x293458;_0x293458+=0x1;while(_0x293458<_0x35fb5d['length']&&/[A-Za-z0-9_]/[_0x522ffb(0x1ea)](_0x35fb5d[_0x293458])){_0x293458+=0x1;}if(_0x35fb5d[_0x522ffb(0x1be)](_0x227317,_0x293458)!==_0x3b5fb6)continue;let _0x54ce7c=_0x227317-0x1;while(_0x54ce7c>=0x0&&/\s/[_0x522ffb(0x1ea)](_0x35fb5d[_0x54ce7c])){_0x54ce7c-=0x1;}if(_0x35fb5d[_0x54ce7c]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x5152b6,_0x2ea36e,_0x322f17){let _0x141381=_0x2ea36e+0x1;while(_0x141381<_0x5152b6['length']){if(_0x5152b6[_0x141381]==='\x5c'){_0x141381+=0x2;continue;}if(_0x5152b6[_0x141381]===_0x322f17)return _0x141381+0x1;_0x141381+=0x1;}return _0x141381;}function resolveEffectiveResultVariable(_0x3f41cf,_0x27d974){const _0x5eba17=a287_0x8cf25c;if(_0x3f41cf===undefined||_0x3f41cf===null||_0x27d974&&_0x3f41cf==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x3f41cf!=='string'||!VARIABLE_PATTERN[_0x5eba17(0x1ea)](_0x3f41cf)||RESERVED_RESULT_VARIABLES['has'](_0x3f41cf)||_0x3f41cf['startsWith'](_0x5eba17(0x284)))return undefined;return _0x3f41cf;}function registerResultVariableOwner(_0x4acc40,_0x3dc654,_0x54dfc0,_0x36f9d3){const _0x34f8ad=a287_0x8cf25c;if(_0x4acc40[_0x34f8ad(0x2ae)](_0x3dc654)){_0x36f9d3[_0x34f8ad(0x1db)]({'path':'flowJson.nodes','message':_0x34f8ad(0x20b)+_0x3dc654+'.'});return;}_0x4acc40[_0x34f8ad(0x1e2)](_0x3dc654,_0x54dfc0);}function setsEqual(_0x48fd59,_0x2187c0){const _0x393492=a287_0x8cf25c;return _0x48fd59['size']===_0x2187c0[_0x393492(0x2b0)]&&[..._0x48fd59][_0x393492(0x2b6)](_0x8c3b79=>_0x2187c0[_0x393492(0x2ae)](_0x8c3b79));}function isValidUserId(_0x5e4754){const _0x1638ab=a287_0x8cf25c;if(typeof _0x5e4754===_0x1638ab(0x1da))return _0x5e4754[_0x1638ab(0x1d3)]()['length']>0x0;return Number[_0x1638ab(0x1fd)](_0x5e4754)&&Number(_0x5e4754)>0x0;}function resolveEdgeEndpoint(_0x2fefcc,_0x1da43a){const _0x48862c=a287_0x8cf25c;if(typeof _0x2fefcc===_0x48862c(0x1da)&&_0x2fefcc['trim']())return _0x2fefcc['trim']();if(typeof _0x1da43a===_0x48862c(0x1da)&&_0x1da43a['trim']())return _0x1da43a['trim']();return undefined;}function removeEmptyMetadata(_0x250efc,_0x455f4f,_0x5b17a1,_0x23df5c){const _0x4c1569=a287_0x8cf25c;if(Array[_0x4c1569(0x2df)](_0x250efc)){_0x250efc[_0x4c1569(0x236)]((_0x1d2f7b,_0x3ef439)=>removeEmptyMetadata(_0x1d2f7b,_0x455f4f+'['+_0x3ef439+']',_0x5b17a1,_0x23df5c));return;}if(!isRecord(_0x250efc))return;for(const [_0x569bd5,_0x1b9457]of Object[_0x4c1569(0x306)](_0x250efc)){const _0x387dd3=_0x455f4f+'.'+_0x569bd5;if(_0x569bd5===_0x4c1569(0x1dd)&&isEmptyJsonValue(_0x1b9457)){delete _0x250efc[_0x569bd5],_0x23df5c[_0x4c1569(0x1db)](_0x387dd3),_0x5b17a1['push']({'code':_0x4c1569(0x1f4),'path':_0x387dd3,'message':_0x387dd3+_0x4c1569(0x251)});continue;}removeEmptyMetadata(_0x1b9457,_0x387dd3,_0x5b17a1,_0x23df5c);}}function isEmptyJsonValue(_0x87eedf){const _0x2c7e66=a287_0x8cf25c;if(_0x87eedf===null||_0x87eedf===undefined)return!![];if(typeof _0x87eedf===_0x2c7e66(0x1da))return _0x87eedf[_0x2c7e66(0x1d3)]()==='';if(Array[_0x2c7e66(0x2df)](_0x87eedf))return _0x87eedf[_0x2c7e66(0x318)]===0x0;return isRecord(_0x87eedf)&&Object[_0x2c7e66(0x29c)](_0x87eedf)['length']===0x0;}function isRecord(_0x37e695){const _0xc3bcb6=a287_0x8cf25c;return typeof _0x37e695===_0xc3bcb6(0x2c7)&&_0x37e695!==null&&!Array[_0xc3bcb6(0x2df)](_0x37e695);}function cloneJsonValue(_0x47aa71){const _0x470dbe=a287_0x8cf25c;return JSON['parse'](JSON[_0x470dbe(0x246)](_0x47aa71));}export async function readFlowConfigFile(_0x1cf172){const _0x20d176=a287_0x8cf25c,_0x50bcd1=await readFile(resolve(_0x1cf172),_0x20d176(0x219));return JSON[_0x20d176(0x291)](_0x50bcd1);}
|
|
1
|
+
const a287_0x1a3fa1=a287_0x392b;(function(_0x40737e,_0x2557c0){const _0x2902e6=a287_0x392b,_0xbc9bc9=_0x40737e();while(!![]){try{const _0x13ebdd=-parseInt(_0x2902e6(0x29b))/0x1+parseInt(_0x2902e6(0x232))/0x2+-parseInt(_0x2902e6(0x2a9))/0x3+-parseInt(_0x2902e6(0x272))/0x4+parseInt(_0x2902e6(0x23e))/0x5*(parseInt(_0x2902e6(0x1b7))/0x6)+-parseInt(_0x2902e6(0x1f0))/0x7*(parseInt(_0x2902e6(0x29a))/0x8)+parseInt(_0x2902e6(0x1e8))/0x9*(parseInt(_0x2902e6(0x290))/0xa);if(_0x13ebdd===_0x2557c0)break;else _0xbc9bc9['push'](_0xbc9bc9['shift']());}catch(_0x4c8dc5){_0xbc9bc9['push'](_0xbc9bc9['shift']());}}}(a287_0x2e0e,0x6a1b7));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x1a3fa1(0x21a),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a287_0x1a3fa1(0x233),'type':a287_0x1a3fa1(0x1c5),'required':['flowName','flowType',a287_0x1a3fa1(0x1f1)],'$defs':{'userId':{'anyOf':[{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},{'type':a287_0x1a3fa1(0x1f7),'minimum':0x1}]},'position':{'type':a287_0x1a3fa1(0x1c5),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a287_0x1a3fa1(0x299),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a287_0x1a3fa1(0x190),a287_0x1a3fa1(0x26a)],'properties':{'value':{'type':a287_0x1a3fa1(0x1f7),'minimum':0x1},'unit':{'enum':['SECONDS','MINUTES',a287_0x1a3fa1(0x27b),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a287_0x1a3fa1(0x1c5),'required':['id',a287_0x1a3fa1(0x1b3),'name',a287_0x1a3fa1(0x2aa)],'properties':{'id':{'type':a287_0x1a3fa1(0x24b),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':['START',a287_0x1a3fa1(0x220),a287_0x1a3fa1(0x284),'CONDITION','SCRIPT',a287_0x1a3fa1(0x2db)]},'name':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'path':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'position':{'$ref':a287_0x1a3fa1(0x1e6)},'approvalMode':{'enum':[a287_0x1a3fa1(0x1a1),a287_0x1a3fa1(0x2c4),a287_0x1a3fa1(0x2b6)]},'taskMode':{'enum':[a287_0x1a3fa1(0x284),a287_0x1a3fa1(0x1f6)]},'assignee':{'type':a287_0x1a3fa1(0x1c5),'required':[a287_0x1a3fa1(0x2dc)],'properties':{'strategy':{'enum':[a287_0x1a3fa1(0x221),a287_0x1a3fa1(0x2a0)]},'userIds':{'type':a287_0x1a3fa1(0x26f),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a287_0x1a3fa1(0x1f7),'minimum':0x1},{'type':a287_0x1a3fa1(0x24b),'pattern':a287_0x1a3fa1(0x248)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a287_0x1a3fa1(0x1c5),'required':['strategy',a287_0x1a3fa1(0x186)],'properties':{'strategy':{'const':a287_0x1a3fa1(0x221)},'userIds':{'type':a287_0x1a3fa1(0x26f),'minItems':0x1,'items':{'$ref':a287_0x1a3fa1(0x2b2)}}},'additionalProperties':!![]},'sequential':{'type':a287_0x1a3fa1(0x20b)},'result':{'enum':[a287_0x1a3fa1(0x27d),'REJECTED']},'scriptName':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'resultVariable':{'type':a287_0x1a3fa1(0x24b),'pattern':a287_0x1a3fa1(0x27a)},'async':{'type':'object','properties':{'enabled':{'type':a287_0x1a3fa1(0x20b)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a287_0x1a3fa1(0x2d0)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':'boolean'},'duration':{'$ref':a287_0x1a3fa1(0x2d0)},'action':{'enum':[a287_0x1a3fa1(0x28b),a287_0x1a3fa1(0x2b3),'EXECUTE_BFF']},'interrupting':{'type':a287_0x1a3fa1(0x20b)},'scriptName':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'resultVariable':{'type':a287_0x1a3fa1(0x24b),'pattern':a287_0x1a3fa1(0x27a)}},'additionalProperties':!![]},'cc':{'type':a287_0x1a3fa1(0x1c5),'required':[a287_0x1a3fa1(0x259)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1}},'visible':{'type':a287_0x1a3fa1(0x26f),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x1a3fa1(0x1c5),'required':[a287_0x1a3fa1(0x19b),a287_0x1a3fa1(0x291)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'failurePolicy':{'enum':[a287_0x1a3fa1(0x1a8),a287_0x1a3fa1(0x204)]},'template':{'type':a287_0x1a3fa1(0x1c5),'required':['title',a287_0x1a3fa1(0x1d0)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':a287_0x1a3fa1(0x26f),'maxItems':0x8,'items':{'type':a287_0x1a3fa1(0x1c5),'required':['label',a287_0x1a3fa1(0x190)],'properties':{'label':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'value':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x1a3fa1(0x26f),'maxItems':0x2,'items':{'type':a287_0x1a3fa1(0x1c5),'required':[a287_0x1a3fa1(0x1e4),a287_0x1a3fa1(0x1bf)],'properties':{'text':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'url':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x1a3fa1(0x26f),'items':{'type':'object','required':['type',a287_0x1a3fa1(0x190)],'properties':{'type':{'enum':[a287_0x1a3fa1(0x1f3),a287_0x1a3fa1(0x2a0),a287_0x1a3fa1(0x22b)]},'value':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'role':{'enum':['TO','CC',a287_0x1a3fa1(0x2cd)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':a287_0x1a3fa1(0x24b),'pattern':a287_0x1a3fa1(0x27a)},'source':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'targetNodeId':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'conditionType':{'enum':['ALWAYS',a287_0x1a3fa1(0x27d),a287_0x1a3fa1(0x1b5),a287_0x1a3fa1(0x28c)]},'expression':{'type':a287_0x1a3fa1(0x24b)},'defaultFlow':{'type':a287_0x1a3fa1(0x20b)},'name':{'type':a287_0x1a3fa1(0x24b)},'waypoints':{'type':a287_0x1a3fa1(0x26f),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':['source']},{'required':[a287_0x1a3fa1(0x194)]}]},{'anyOf':[{'required':[a287_0x1a3fa1(0x23a)]},{'required':[a287_0x1a3fa1(0x1e0)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':['FORM_FLOW','INDEPENDENT_FLOW']},'datasetCode':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'pageId':{'type':a287_0x1a3fa1(0x1f7)},'templateName':![],'flowJson':{'type':a287_0x1a3fa1(0x1c5),'required':[a287_0x1a3fa1(0x1ec),a287_0x1a3fa1(0x25c)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a287_0x1a3fa1(0x24b),'const':a287_0x1a3fa1(0x211),'description':a287_0x1a3fa1(0x1c8)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a287_0x1a3fa1(0x235)},'startPageId':![],'startPath':{'type':a287_0x1a3fa1(0x24b),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a287_0x1a3fa1(0x20a)}},'edges':{'type':a287_0x1a3fa1(0x26f),'minItems':0x1,'items':{'$ref':a287_0x1a3fa1(0x1d3)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x1a3fa1(0x2c2),a287_0x1a3fa1(0x249),a287_0x1a3fa1(0x1b8),'bindDatasetCode',a287_0x1a3fa1(0x207),a287_0x1a3fa1(0x1b0),'pageId',a287_0x1a3fa1(0x1bd)],REMOVED_ROOT_FIELDS=['id',a287_0x1a3fa1(0x1b0),a287_0x1a3fa1(0x1bd)],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x1a3fa1(0x211),NODE_TYPES=new Set([a287_0x1a3fa1(0x241),'END',a287_0x1a3fa1(0x284),'CONDITION',a287_0x1a3fa1(0x2e4),a287_0x1a3fa1(0x2db)]),CONDITION_TYPES=new Set([a287_0x1a3fa1(0x293),a287_0x1a3fa1(0x27d),a287_0x1a3fa1(0x1b5),a287_0x1a3fa1(0x28c)]),APPROVAL_MODES=new Set(['SINGLE',a287_0x1a3fa1(0x2c4),a287_0x1a3fa1(0x2b6)]),APPROVAL_TASK_MODES=new Set(['APPROVAL','HANDLE']),FLOW_TIME_UNITS=new Set([a287_0x1a3fa1(0x20e),'MINUTES','HOURS',a287_0x1a3fa1(0x229)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a287_0x1a3fa1(0x28b),'AUTO_REJECT',a287_0x1a3fa1(0x228)]),FLOW_TYPES=new Set([a287_0x1a3fa1(0x208),a287_0x1a3fa1(0x213)]),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a287_0x1a3fa1(0x2a1)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x1a3fa1(0x1a8),a287_0x1a3fa1(0x204)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x1a3fa1(0x1f3),a287_0x1a3fa1(0x2a0),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x1a3fa1(0x1fc),UNSUPPORTED_FORM_MESSAGE=a287_0x1a3fa1(0x239),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x1a3fa1(0x27f),RESERVED_RESULT_VARIABLES=new Set([a287_0x1a3fa1(0x1b2),a287_0x1a3fa1(0x183),a287_0x1a3fa1(0x22f),a287_0x1a3fa1(0x189),a287_0x1a3fa1(0x20d),a287_0x1a3fa1(0x1d5),a287_0x1a3fa1(0x1ad),a287_0x1a3fa1(0x1fd),a287_0x1a3fa1(0x2bd),a287_0x1a3fa1(0x2df)]);export function normalizeFlowConfig(_0x4aa1a6){const _0x21589e=a287_0x1a3fa1;if(!isRecord(_0x4aa1a6))throw new TypeError(_0x21589e(0x2b9));const _0x230f73=cloneJsonValue(_0x4aa1a6),_0x44aa4f=_0x230f73['flowJson'],_0x2bcded=isRecord(_0x44aa4f)?cloneJsonValue(_0x44aa4f):{},_0x29394f=[],_0x5ba2d5=[];for(const _0x465661 of REMOVED_ROOT_FIELDS){if(!Object[_0x21589e(0x1be)][_0x21589e(0x182)][_0x21589e(0x236)](_0x230f73,_0x465661))continue;delete _0x230f73[_0x465661],_0x5ba2d5[_0x21589e(0x2c3)](_0x465661),_0x29394f[_0x21589e(0x2c3)]({'code':'legacy_field_removed','path':_0x465661,'message':_0x465661+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x359e6b of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x21589e(0x1be)]['hasOwnProperty'][_0x21589e(0x236)](_0x2bcded,_0x359e6b))continue;const _0x11a654=_0x21589e(0x22d)+_0x359e6b;delete _0x2bcded[_0x359e6b],_0x5ba2d5[_0x21589e(0x2c3)](_0x11a654),_0x29394f[_0x21589e(0x2c3)]({'code':_0x21589e(0x1c0),'path':_0x11a654,'message':_0x11a654+_0x21589e(0x1ac)});}if(Object['prototype'][_0x21589e(0x182)]['call'](_0x2bcded,'schemaVersion')){const _0x5de908=_0x2bcded[_0x21589e(0x2de)],_0x31d8ca=typeof _0x5de908===_0x21589e(0x24b)?_0x5de908[_0x21589e(0x260)]():_0x5de908;if(isEmptyJsonValue(_0x5de908)||_0x31d8ca===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5a7466='flowJson.schemaVersion';delete _0x2bcded['schemaVersion'],_0x5ba2d5[_0x21589e(0x2c3)](_0x5a7466),_0x29394f[_0x21589e(0x2c3)]({'code':_0x21589e(0x1c0),'path':_0x5a7466,'message':_0x5a7466+_0x21589e(0x230)+DEFAULT_FLOW_SCHEMA_VERSION+_0x21589e(0x2b1)});}}removeEmptyMetadata(_0x2bcded,_0x21589e(0x1f1),_0x29394f,_0x5ba2d5);_0x230f73[_0x21589e(0x1a7)]===_0x21589e(0x213)&&!Object[_0x21589e(0x1be)][_0x21589e(0x182)][_0x21589e(0x236)](_0x2bcded,'pageMode')&&(_0x2bcded[_0x21589e(0x21d)]=_0x21589e(0x235));_0x230f73[_0x21589e(0x1f1)]=_0x2bcded;if(typeof _0x230f73[_0x21589e(0x1b8)]===_0x21589e(0x24b))_0x230f73['flowName']=_0x230f73[_0x21589e(0x1b8)][_0x21589e(0x260)]();return{'config':_0x230f73,'warnings':_0x29394f,'removedPaths':_0x5ba2d5};}function a287_0x392b(_0x33743e,_0x36d657){_0x33743e=_0x33743e-0x179;const _0x2e0ef5=a287_0x2e0e();let _0x392bca=_0x2e0ef5[_0x33743e];return _0x392bca;}export function validateFlowConfig(_0x12a55a){const _0x21633c=a287_0x1a3fa1;let _0x192503;try{_0x192503=normalizeFlowConfig(_0x12a55a);}catch(_0x3066ea){const _0x2459d8=_0x3066ea instanceof Error?_0x3066ea[_0x21633c(0x18f)]:String(_0x3066ea),_0x5bc661={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x2459d8}],'warnings':[],'normalized':_0x5bc661,'validationConfig':_0x5bc661};}const _0x4fd5f9=_0x192503['config'],_0x2b9d9f=cloneJsonValue(_0x4fd5f9),_0x50604c=_0x2b9d9f[_0x21633c(0x1f1)];_0x50604c[_0x21633c(0x2c2)]=_0x21633c(0x23c),_0x50604c['flowName']=_0x4fd5f9[_0x21633c(0x1b8)];typeof _0x4fd5f9['datasetCode']==='string'&&_0x4fd5f9['datasetCode'][_0x21633c(0x260)]()&&(_0x50604c[_0x21633c(0x1cf)]=_0x4fd5f9['datasetCode'][_0x21633c(0x260)]());const _0x31aff0=[];return validateOuterMetadata(_0x4fd5f9,_0x31aff0),validateFlowClassification(_0x4fd5f9,_0x31aff0),validateGraph(_0x4fd5f9[_0x21633c(0x1f1)],_0x31aff0),{'valid':_0x31aff0[_0x21633c(0x23f)]===0x0,'errors':_0x31aff0,'warnings':_0x192503[_0x21633c(0x20c)],'normalized':_0x4fd5f9,'validationConfig':_0x2b9d9f};}function validateFlowClassification(_0x998384,_0x8ba206){const _0x44b337=a287_0x1a3fa1;if(!isRecord(_0x998384[_0x44b337(0x1f1)]))return;const _0x4a04dd=_0x998384[_0x44b337(0x1a7)],_0x59376d=_0x998384[_0x44b337(0x1f1)]['pageMode'];_0x59376d!==undefined&&(typeof _0x59376d!==_0x44b337(0x24b)||!FLOW_PAGE_MODES[_0x44b337(0x289)](_0x59376d))&&_0x8ba206[_0x44b337(0x2c3)]({'path':'flowJson.pageMode','message':_0x44b337(0x1fa)+String(_0x59376d)+'.'});_0x4a04dd==='FORM_FLOW'&&_0x59376d!==undefined&&_0x8ba206[_0x44b337(0x2c3)]({'path':'flowJson.pageMode','message':_0x44b337(0x2b0)});_0x4a04dd===_0x44b337(0x213)&&_0x59376d===_0x44b337(0x2a1)&&_0x8ba206[_0x44b337(0x2c3)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x4a04dd===_0x44b337(0x208)||_0x4a04dd===_0x44b337(0x213))&&validateCustomPageNavigation(_0x998384,_0x4a04dd,_0x59376d,_0x8ba206);if(_0x4a04dd!==_0x44b337(0x208)||!Array['isArray'](_0x998384[_0x44b337(0x1f1)][_0x44b337(0x1ec)]))return;_0x998384[_0x44b337(0x1f1)][_0x44b337(0x1ec)][_0x44b337(0x256)]((_0x6e8087,_0x22557d)=>{const _0x4c372c=_0x44b337;isRecord(_0x6e8087)&&_0x6e8087[_0x4c372c(0x1b3)]===_0x4c372c(0x284)&&_0x6e8087[_0x4c372c(0x21b)]===_0x4c372c(0x1f6)&&_0x8ba206[_0x4c372c(0x2c3)]({'path':_0x4c372c(0x2a8)+_0x22557d+'].taskMode','message':_0x4c372c(0x2b7)});});}function validateCustomPageNavigation(_0x243774,_0xace7e0,_0x249ea0,_0x46b26d){const _0x43fc1e=a287_0x1a3fa1,_0x36f417=_0x243774['flowJson'][_0x43fc1e(0x27e)];_0x36f417!==undefined&&_0x46b26d[_0x43fc1e(0x2c3)]({'path':_0x43fc1e(0x295),'message':_0x43fc1e(0x250)});const _0x3d20c8=_0x243774['flowJson'][_0x43fc1e(0x199)];_0x3d20c8!==undefined&&(typeof _0x3d20c8!==_0x43fc1e(0x24b)||_0x3d20c8[_0x43fc1e(0x260)]()==='')&&_0x46b26d['push']({'path':_0x43fc1e(0x23d),'message':_0x43fc1e(0x1d4)});const _0x3ab2ff=Array[_0x43fc1e(0x1a2)](_0x243774[_0x43fc1e(0x1f1)][_0x43fc1e(0x1ec)])?_0x243774[_0x43fc1e(0x1f1)][_0x43fc1e(0x1ec)][_0x43fc1e(0x29d)]((_0x19316e,_0x4a0441)=>({'node':_0x19316e,'index':_0x4a0441}))[_0x43fc1e(0x1fe)](({node:_0x4ab2a9})=>isRecord(_0x4ab2a9)&&_0x4ab2a9[_0x43fc1e(0x200)]!==undefined):[],_0x55e70f=_0x3d20c8!==undefined||_0x3ab2ff[_0x43fc1e(0x23f)]>0x0,_0xc04334=_0x249ea0===undefined&&_0xace7e0===_0x43fc1e(0x213)?_0x43fc1e(0x235):_0x249ea0;_0x55e70f&&(_0xace7e0!==_0x43fc1e(0x213)||_0xc04334!==_0x43fc1e(0x235))&&(_0x3d20c8!==undefined&&_0x46b26d[_0x43fc1e(0x2c3)]({'path':_0x43fc1e(0x23d),'message':_0x43fc1e(0x266)}),_0x3ab2ff[_0x43fc1e(0x256)](({index:_0x83dcf})=>{const _0x1c5287=_0x43fc1e;_0x46b26d[_0x1c5287(0x2c3)]({'path':_0x1c5287(0x2a8)+_0x83dcf+_0x1c5287(0x281),'message':_0x1c5287(0x2d8)});}));}export async function writeNormalizedFlowConfig(_0x34d702,_0x6a0f59,_0x2e8fc4={}){const _0x11f8af=a287_0x1a3fa1,_0x3e05c8=resolve(_0x34d702),_0x35f446=_0x3e05c8+'.'+process[_0x11f8af(0x2d4)]+'.'+randomUUID()+_0x11f8af(0x1ae),_0x1770ec=JSON['stringify'](_0x6a0f59,null,0x2)+'\x0a';let _0x36255a;try{try{_0x36255a=(await stat(_0x3e05c8))['mode']&0x1ff;}catch{_0x36255a=undefined;}await writeFile(_0x35f446,_0x1770ec,{'encoding':'utf8','flag':'wx','mode':_0x36255a??0x1a4});if(_0x36255a!==undefined)await chmod(_0x35f446,_0x36255a);_0x2e8fc4[_0x11f8af(0x2a7)]===![]?(await link(_0x35f446,_0x3e05c8),await unlink(_0x35f446)):await rename(_0x35f446,_0x3e05c8);}finally{await unlink(_0x35f446)['catch'](()=>undefined);}}function validateOuterMetadata(_0x241249,_0x5e50b2){const _0xdd6ba7=a287_0x1a3fa1;(typeof _0x241249[_0xdd6ba7(0x1b8)]!=='string'||_0x241249['flowName']['trim']()==='')&&_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':_0xdd6ba7(0x1b8),'message':_0xdd6ba7(0x2c7)});_0x241249['flowDesc']!==undefined&&typeof _0x241249[_0xdd6ba7(0x24a)]!=='string'&&_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':'flowDesc','message':_0xdd6ba7(0x1eb)});if(_0x241249[_0xdd6ba7(0x1a7)]===undefined||_0x241249[_0xdd6ba7(0x1a7)]===null)_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':'flowType','message':_0xdd6ba7(0x28e)});else(typeof _0x241249[_0xdd6ba7(0x1a7)]!==_0xdd6ba7(0x24b)||!FLOW_TYPES[_0xdd6ba7(0x289)](_0x241249[_0xdd6ba7(0x1a7)]))&&_0x5e50b2['push']({'path':_0xdd6ba7(0x1a7),'message':_0xdd6ba7(0x196)+String(_0x241249['flowType'])+'.'});_0x241249[_0xdd6ba7(0x207)]!==undefined&&typeof _0x241249[_0xdd6ba7(0x207)]!==_0xdd6ba7(0x24b)&&_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':_0xdd6ba7(0x207),'message':_0xdd6ba7(0x2c9)}),_0x241249['pageId']!==undefined&&(!Number[_0xdd6ba7(0x1f2)](_0x241249['pageId'])||_0x241249[_0xdd6ba7(0x1ed)]<0x0)&&_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':_0xdd6ba7(0x1ed),'message':_0xdd6ba7(0x263)}),_0x241249['flowType']===_0xdd6ba7(0x213)&&_0x241249[_0xdd6ba7(0x207)]!==undefined&&_0x5e50b2[_0xdd6ba7(0x2c3)]({'path':_0xdd6ba7(0x207),'message':_0xdd6ba7(0x26e)}),_0x241249[_0xdd6ba7(0x1a7)]===_0xdd6ba7(0x213)&&_0x241249['pageId']!==undefined&&_0x5e50b2['push']({'path':_0xdd6ba7(0x1ed),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x1ea6a5,_0x4eeefd){const _0x407b62=a287_0x1a3fa1;if(!isRecord(_0x1ea6a5)){_0x4eeefd['push']({'path':_0x407b62(0x1f1),'message':_0x407b62(0x2bf)});return;}!Array[_0x407b62(0x1a2)](_0x1ea6a5[_0x407b62(0x1ec)])&&_0x4eeefd[_0x407b62(0x2c3)]({'path':_0x407b62(0x1ce),'message':_0x407b62(0x231)});!Array['isArray'](_0x1ea6a5[_0x407b62(0x25c)])&&_0x4eeefd[_0x407b62(0x2c3)]({'path':_0x407b62(0x17d),'message':_0x407b62(0x271)});Object[_0x407b62(0x1be)][_0x407b62(0x182)][_0x407b62(0x236)](_0x1ea6a5,_0x407b62(0x2de))&&_0x4eeefd['push']({'path':_0x407b62(0x205),'message':_0x407b62(0x1ea)+String(_0x1ea6a5[_0x407b62(0x2de)])+_0x407b62(0x25b)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x44e84b of[_0x407b62(0x2ac),_0x407b62(0x192),_0x407b62(0x1db)]){Object[_0x407b62(0x1be)][_0x407b62(0x182)]['call'](_0x1ea6a5,_0x44e84b)&&_0x4eeefd[_0x407b62(0x2c3)]({'path':'flowJson.'+_0x44e84b,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x407b62(0x1a2)](_0x1ea6a5[_0x407b62(0x1ec)])||!Array[_0x407b62(0x1a2)](_0x1ea6a5['edges']))return;const _0x5d3309=new Map(),_0x3f5dfb=[],_0x37a40d=[],_0x1b27ca=new Map(),_0x576aa8=new Map(),_0x5cf2c7=new Set();let _0x30053c=0x0;_0x1ea6a5['nodes'][_0x407b62(0x256)]((_0x13c85a,_0x16dea2)=>{const _0x53c189=_0x407b62,_0x71cb9f=_0x53c189(0x2a8)+_0x16dea2+']';if(!isRecord(_0x13c85a)){_0x4eeefd['push']({'path':_0x71cb9f,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x1ae634=_0x13c85a;if(typeof _0x1ae634['id']!==_0x53c189(0x24b)||!BPMN_ID_PATTERN[_0x53c189(0x26b)](_0x1ae634['id']))_0x4eeefd[_0x53c189(0x2c3)]({'path':_0x71cb9f+_0x53c189(0x1b4),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x5d3309['has'](_0x1ae634['id'])?_0x4eeefd[_0x53c189(0x2c3)]({'path':_0x71cb9f+_0x53c189(0x1b4),'message':'Duplicate\x20node\x20id:\x20'+_0x1ae634['id']+'.'}):(_0x5d3309[_0x53c189(0x1dc)](_0x1ae634['id'],_0x1ae634),_0x5cf2c7[_0x53c189(0x1e1)](_0x1ae634['id']));if(!NODE_TYPES[_0x53c189(0x289)](_0x1ae634[_0x53c189(0x1b3)]))_0x4eeefd['push']({'path':_0x71cb9f+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x1ae634[_0x53c189(0x1b3)])+'.'});else{if(_0x1ae634['type']===_0x53c189(0x241))_0x3f5dfb[_0x53c189(0x2c3)](_0x1ae634['id']);else _0x1ae634[_0x53c189(0x1b3)]==='END'&&_0x37a40d[_0x53c189(0x2c3)](_0x1ae634['id']);}_0x1ae634[_0x53c189(0x1b3)]===_0x53c189(0x284)&&(_0x1ae634[_0x53c189(0x21b)]===undefined||_0x1ae634[_0x53c189(0x21b)]===_0x53c189(0x284))&&(_0x30053c+=0x1);validateNode(_0x1ae634,_0x71cb9f,_0x4eeefd);if(_0x1ae634[_0x53c189(0x1b3)]===_0x53c189(0x2e4)){const _0x3aa50c=resolveEffectiveResultVariable(_0x1ae634['resultVariable'],![]);_0x3aa50c&&(registerResultVariableOwner(_0x576aa8,_0x3aa50c,_0x1ae634['id'],_0x4eeefd),!_0x1b27ca[_0x53c189(0x289)](_0x3aa50c)&&_0x1b27ca[_0x53c189(0x1dc)](_0x3aa50c,_0x1ae634['id']));}if(_0x1ae634[_0x53c189(0x1b3)]===_0x53c189(0x284)&&isRecord(_0x1ae634[_0x53c189(0x2ce)])&&_0x1ae634[_0x53c189(0x2ce)]['enabled']===!![]&&_0x1ae634[_0x53c189(0x2ce)][_0x53c189(0x2b4)]===_0x53c189(0x228)){const _0x1ac53d=resolveEffectiveResultVariable(_0x1ae634['timeout'][_0x53c189(0x247)],!![]);_0x1ac53d&®isterResultVariableOwner(_0x576aa8,_0x1ac53d,_0x1ae634['id']+_0x53c189(0x244),_0x4eeefd);}});_0x3f5dfb[_0x407b62(0x23f)]!==0x1&&_0x4eeefd['push']({'path':_0x407b62(0x1ce),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x37a40d[_0x407b62(0x23f)]===0x0&&_0x4eeefd[_0x407b62(0x2c3)]({'path':_0x407b62(0x1ce),'message':_0x407b62(0x287)});const _0x2d15b1=new Map(),_0x57dc9b=new Map(),_0x55e0a9=new Map(),_0x1109fc=new Set();_0x1ea6a5['edges'][_0x407b62(0x256)]((_0x5a916d,_0x506feb)=>{const _0x3af574=_0x407b62,_0x1419aa=_0x3af574(0x246)+_0x506feb+']';if(!isRecord(_0x5a916d)){_0x4eeefd[_0x3af574(0x2c3)]({'path':_0x1419aa,'message':_0x3af574(0x2e6)});return;}const _0x3b2751=_0x5a916d;_0x55e0a9[_0x3af574(0x1dc)](_0x3b2751,_0x1419aa);const _0x3f0446=resolveEdgeEndpoint(_0x3b2751['source'],_0x3b2751[_0x3af574(0x194)]),_0x42a133=resolveEdgeEndpoint(_0x3b2751[_0x3af574(0x23a)],_0x3b2751[_0x3af574(0x1e0)]);if(!_0x3f0446)_0x4eeefd['push']({'path':_0x1419aa+'.source','message':'edge\x20source\x20is\x20required.'});if(!_0x42a133)_0x4eeefd['push']({'path':_0x1419aa+_0x3af574(0x234),'message':_0x3af574(0x1e5)});_0x3f0446&&!_0x5d3309[_0x3af574(0x289)](_0x3f0446)&&_0x4eeefd[_0x3af574(0x2c3)]({'path':_0x1419aa+_0x3af574(0x252),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x3f0446+'.'});_0x42a133&&!_0x5d3309[_0x3af574(0x289)](_0x42a133)&&_0x4eeefd[_0x3af574(0x2c3)]({'path':_0x1419aa+'.target','message':_0x3af574(0x278)+_0x42a133+'.'});if(_0x3b2751['id']!==undefined){if(typeof _0x3b2751['id']!==_0x3af574(0x24b)||!BPMN_ID_PATTERN[_0x3af574(0x26b)](_0x3b2751['id']))_0x4eeefd[_0x3af574(0x2c3)]({'path':_0x1419aa+_0x3af574(0x1b4),'message':_0x3af574(0x18c)});else{if(_0x5cf2c7[_0x3af574(0x289)](_0x3b2751['id']))_0x4eeefd['push']({'path':_0x1419aa+_0x3af574(0x1b4),'message':_0x3af574(0x255)+_0x3b2751['id']+'.'});else!_0x5cf2c7[_0x3af574(0x289)](_0x3b2751['id'])&&_0x5cf2c7[_0x3af574(0x1e1)](_0x3b2751['id']);}}if(_0x3f0446&&_0x42a133){const _0x4c6d93=_0x3f0446+'\x00'+_0x42a133+'\x00'+(_0x3b2751['conditionType']??'ALWAYS');_0x1109fc['has'](_0x4c6d93)?_0x4eeefd[_0x3af574(0x2c3)]({'path':_0x1419aa,'message':'Duplicate\x20edge\x20route:\x20'+_0x3f0446+_0x3af574(0x1ba)+_0x42a133+'\x20('+(_0x3b2751[_0x3af574(0x1a9)]??_0x3af574(0x293))+').'}):_0x1109fc[_0x3af574(0x1e1)](_0x4c6d93);}validateEdge(_0x3b2751,_0x1419aa,_0x4eeefd),_0x3f0446&&_0x42a133&&(_0x2d15b1[_0x3af574(0x275)](_0x3f0446)?.['push'](_0x3b2751)??_0x2d15b1[_0x3af574(0x1dc)](_0x3f0446,[_0x3b2751]),_0x57dc9b[_0x3af574(0x275)](_0x42a133)?.[_0x3af574(0x2c3)](_0x3b2751)??_0x57dc9b[_0x3af574(0x1dc)](_0x42a133,[_0x3b2751]));});if(_0x3f5dfb[_0x407b62(0x23f)]!==0x1)return;validateGraphShape(_0x5d3309,_0x3f5dfb[0x0],_0x37a40d,_0x2d15b1,_0x57dc9b,_0x55e0a9,_0x4eeefd),validateScriptResultReferences(_0x5d3309,_0x3f5dfb[0x0],_0x2d15b1,_0x57dc9b,_0x55e0a9,_0x1b27ca,_0x4eeefd),validateApprovalResults(_0x5d3309,_0x30053c,_0x37a40d,_0x4eeefd);}function validateNode(_0x208f78,_0xf43e83,_0x108598){const _0x36b243=a287_0x1a3fa1;for(const _0xa3df70 of['form',_0x36b243(0x1a0)]){Object['prototype'][_0x36b243(0x182)][_0x36b243(0x236)](_0x208f78,_0xa3df70)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.'+_0xa3df70,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x36b243(0x289)](_0x208f78[_0x36b243(0x1b3)]))return;(typeof _0x208f78['name']!==_0x36b243(0x24b)||_0x208f78[_0x36b243(0x274)][_0x36b243(0x260)]()==='')&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x26c),'message':_0x36b243(0x1c7)});_0x208f78[_0x36b243(0x1ed)]!==undefined&&_0x108598['push']({'path':_0xf43e83+_0x36b243(0x1f4),'message':_0x36b243(0x262)});if(_0x208f78[_0x36b243(0x200)]!==undefined){if(typeof _0x208f78['path']!==_0x36b243(0x24b)||_0x208f78[_0x36b243(0x200)][_0x36b243(0x260)]()==='')_0x108598['push']({'path':_0xf43e83+'.path','message':_0x36b243(0x227)});else _0x208f78[_0x36b243(0x1b3)]!==_0x36b243(0x284)&&_0x208f78[_0x36b243(0x1b3)]!==_0x36b243(0x220)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x1d1),'message':_0x36b243(0x24d)});}const _0xde4bfd=_0x208f78[_0x36b243(0x2aa)];if(!isRecord(_0xde4bfd))_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.position','message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x3e2a31 of['x','y']){const _0x3b5da1=_0xde4bfd[_0x3e2a31];(typeof _0x3b5da1!==_0x36b243(0x299)||!Number[_0x36b243(0x1aa)](_0x3b5da1)||_0x3b5da1<0x0)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x279)+_0x3e2a31,'message':_0x36b243(0x18d)+_0x3e2a31+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x208f78['type']===_0x36b243(0x284)){const _0x5e86fe=_0x208f78[_0x36b243(0x1a6)]??_0x36b243(0x1a1),_0x56bdc3=_0x208f78['taskMode']??_0x36b243(0x284);!APPROVAL_TASK_MODES[_0x36b243(0x289)](_0x56bdc3)&&_0x108598['push']({'path':_0xf43e83+_0x36b243(0x184),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x56bdc3)+'.'});!APPROVAL_MODES[_0x36b243(0x289)](_0x5e86fe)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x223),'message':_0x36b243(0x1d2)+String(_0x5e86fe)+'.'});if(!isRecord(_0x208f78[_0x36b243(0x1b6)]))_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.assignee','message':_0x36b243(0x2be)});else{const _0xa9b1da=_0x208f78['assignee']['strategy'];_0xa9b1da!==_0x36b243(0x221)&&_0xa9b1da!==_0x36b243(0x2a0)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x18b),'message':_0x36b243(0x2af)});if(_0xa9b1da===_0x36b243(0x221)){const _0x4bb3f0=_0x208f78[_0x36b243(0x1b6)][_0x36b243(0x186)];if(!Array[_0x36b243(0x1a2)](_0x4bb3f0)||_0x4bb3f0[_0x36b243(0x23f)]===0x0)_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.assignee.userIds','message':_0x36b243(0x1de)});else{const _0x57201c=_0x4bb3f0['findIndex'](_0x1bbcd7=>!isValidUserId(_0x1bbcd7));_0x57201c>=0x0&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.assignee.userIds['+_0x57201c+']','message':_0x36b243(0x2a6)});const _0x1e6502=new Set(_0x4bb3f0[_0x36b243(0x1fe)](isValidUserId)[_0x36b243(0x29d)](_0x31fa65=>String(_0x31fa65)[_0x36b243(0x260)]()));_0x5e86fe==='SINGLE'&&_0x1e6502[_0x36b243(0x240)]>0x1&&_0x108598['push']({'path':_0xf43e83+_0x36b243(0x216),'message':_0x36b243(0x2e2)});}}if(_0xa9b1da===_0x36b243(0x2a0)){const _0x370829=_0x208f78[_0x36b243(0x1b6)][_0x36b243(0x1c4)],_0x4fdbc9=typeof _0x370829===_0x36b243(0x299)||typeof _0x370829===_0x36b243(0x24b)?Number(String(_0x370829)['trim']()):Number[_0x36b243(0x254)];(!Number[_0x36b243(0x2e5)](_0x4fdbc9)||_0x4fdbc9<=0x0)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x185),'message':_0x36b243(0x195)});}}if(_0x208f78['transferCandidates']!==undefined){if(!isRecord(_0x208f78['transferCandidates']))_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x237),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x208f78[_0x36b243(0x24e)][_0x36b243(0x2dc)]!=='FIXED')_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x261),'message':_0x36b243(0x181)});else{const _0x1b43d6=_0x208f78[_0x36b243(0x24e)]['userIds'];if(!Array['isArray'](_0x1b43d6)||_0x1b43d6[_0x36b243(0x23f)]===0x0)_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x258),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0xe0edff=_0x1b43d6[_0x36b243(0x214)](_0x54ce20=>!isValidUserId(_0x54ce20));_0xe0edff>=0x0&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x280)+_0xe0edff+']','message':_0x36b243(0x2e1)});}}}}}_0x208f78[_0x36b243(0x24c)]!==undefined&&typeof _0x208f78['sequential']!==_0x36b243(0x20b)&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x2cf),'message':_0x36b243(0x191)});if(_0x208f78['type']===_0x36b243(0x2e4)){(typeof _0x208f78[_0x36b243(0x17b)]!==_0x36b243(0x24b)||_0x208f78[_0x36b243(0x17b)][_0x36b243(0x260)]()==='')&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+'.scriptName','message':_0x36b243(0x22e)});if(_0x208f78[_0x36b243(0x247)]!==undefined){if(typeof _0x208f78['resultVariable']!=='string'||!VARIABLE_PATTERN[_0x36b243(0x26b)](_0x208f78[_0x36b243(0x247)]))_0x108598['push']({'path':_0xf43e83+'.resultVariable','message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x36b243(0x289)](_0x208f78[_0x36b243(0x247)])||_0x208f78['resultVariable'][_0x36b243(0x285)]('approval_sys_'))&&_0x108598[_0x36b243(0x2c3)]({'path':_0xf43e83+_0x36b243(0x25a),'message':'Reserved\x20resultVariable:\x20'+_0x208f78[_0x36b243(0x247)]+'.'});}}validateAsyncExecution(_0x208f78,_0xf43e83,_0x108598),validateApprovalTimeout(_0x208f78,_0xf43e83,_0x108598),validateCcConfig(_0x208f78,_0xf43e83,_0x108598),_0x208f78[_0x36b243(0x1b3)]===_0x36b243(0x2db)&&validateNotificationConfig(_0x208f78['config'],_0xf43e83+_0x36b243(0x1a5),_0x108598);}function validateAsyncExecution(_0x2e48ce,_0x3225e6,_0x60bbe0){const _0x4b7cb9=a287_0x1a3fa1;if(_0x2e48ce['async']===undefined)return;if(!isRecord(_0x2e48ce[_0x4b7cb9(0x1a3)])){_0x60bbe0[_0x4b7cb9(0x2c3)]({'path':_0x3225e6+_0x4b7cb9(0x2c8),'message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x2e48ce[_0x4b7cb9(0x1a3)][_0x4b7cb9(0x19d)]!==undefined&&typeof _0x2e48ce[_0x4b7cb9(0x1a3)][_0x4b7cb9(0x19d)]!=='boolean'){_0x60bbe0[_0x4b7cb9(0x2c3)]({'path':_0x3225e6+_0x4b7cb9(0x22a),'message':_0x4b7cb9(0x1c1)});return;}if(_0x2e48ce[_0x4b7cb9(0x1a3)][_0x4b7cb9(0x19d)]!==!![])return;_0x2e48ce[_0x4b7cb9(0x1b3)]!=='SCRIPT'&&_0x60bbe0[_0x4b7cb9(0x2c3)]({'path':_0x3225e6+_0x4b7cb9(0x2c8),'message':_0x4b7cb9(0x2c1)});const _0x51feb9=_0x2e48ce[_0x4b7cb9(0x1a3)]['retryCount']??0x3;(!Number[_0x4b7cb9(0x1f2)](_0x51feb9)||_0x51feb9<0x1||_0x51feb9>MAX_ASYNC_RETRY_COUNT)&&_0x60bbe0['push']({'path':_0x3225e6+'.async.retryCount','message':_0x4b7cb9(0x1ef)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x2e48ce[_0x4b7cb9(0x1a3)][_0x4b7cb9(0x2e3)]!==undefined&&validateTimeAmount(_0x2e48ce['async'][_0x4b7cb9(0x2e3)],_0x3225e6+_0x4b7cb9(0x29e),_0x60bbe0);}function validateApprovalTimeout(_0x361f26,_0x2eec4a,_0x4111d5){const _0x30e758=a287_0x1a3fa1;if(_0x361f26[_0x30e758(0x2ce)]===undefined)return;if(!isRecord(_0x361f26[_0x30e758(0x2ce)])){_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x244),'message':_0x30e758(0x21c)});return;}if(_0x361f26[_0x30e758(0x2ce)][_0x30e758(0x19d)]!==undefined&&typeof _0x361f26[_0x30e758(0x2ce)]['enabled']!==_0x30e758(0x20b)){_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x1ca),'message':_0x30e758(0x2cb)});return;}if(_0x361f26['timeout'][_0x30e758(0x19d)]!==!![])return;if(_0x361f26[_0x30e758(0x2ce)][_0x30e758(0x187)]!==undefined&&typeof _0x361f26[_0x30e758(0x2ce)][_0x30e758(0x187)]!==_0x30e758(0x20b)){_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x2bb),'message':_0x30e758(0x283)});return;}_0x361f26[_0x30e758(0x1b3)]!==_0x30e758(0x284)&&_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x244),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x361f26[_0x30e758(0x2ce)][_0x30e758(0x251)],_0x2eec4a+'.timeout.duration',_0x4111d5);const _0x3ecccb=_0x361f26[_0x30e758(0x2ce)][_0x30e758(0x2b4)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x30e758(0x289)](_0x3ecccb)){_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x25d),'message':_0x30e758(0x1d6)});return;}(_0x361f26['taskMode']??_0x30e758(0x284))===_0x30e758(0x1f6)&&_0x3ecccb!=='EXECUTE_BFF'&&_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x25d),'message':_0x30e758(0x2d1)});const _0x12d4f3=_0x361f26['timeout'][_0x30e758(0x187)]??_0x3ecccb!==_0x30e758(0x228);if(_0x3ecccb===_0x30e758(0x228))_0x12d4f3&&_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+'.timeout.interrupting','message':_0x30e758(0x2c6)}),(typeof _0x361f26['timeout']['scriptName']!==_0x30e758(0x24b)||_0x361f26[_0x30e758(0x2ce)]['scriptName'][_0x30e758(0x260)]()==='')&&_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+'.timeout.scriptName','message':_0x30e758(0x2d6)}),validateOptionalResultVariable(_0x361f26[_0x30e758(0x2ce)][_0x30e758(0x247)],_0x2eec4a+_0x30e758(0x1c6),_0x4111d5);else!_0x12d4f3&&_0x4111d5[_0x30e758(0x2c3)]({'path':_0x2eec4a+_0x30e758(0x2bb),'message':_0x3ecccb+_0x30e758(0x1e9)});}function validateTimeAmount(_0xc89aa1,_0x38f54f,_0x58c26f){const _0x277bd3=a287_0x1a3fa1;if(!isRecord(_0xc89aa1)){_0x58c26f[_0x277bd3(0x2c3)]({'path':_0x38f54f,'message':_0x277bd3(0x179)});return;}(!Number[_0x277bd3(0x1f2)](_0xc89aa1[_0x277bd3(0x190)])||Number(_0xc89aa1[_0x277bd3(0x190)])<=0x0)&&_0x58c26f[_0x277bd3(0x2c3)]({'path':_0x38f54f+_0x277bd3(0x1df),'message':_0x277bd3(0x17e)}),!FLOW_TIME_UNITS[_0x277bd3(0x289)](_0xc89aa1['unit'])&&_0x58c26f[_0x277bd3(0x2c3)]({'path':_0x38f54f+_0x277bd3(0x17c),'message':_0x277bd3(0x2b8)});}function validateOptionalResultVariable(_0xa9b506,_0x446e47,_0x4b6f48){const _0x5d08a5=a287_0x1a3fa1;if(_0xa9b506===undefined||_0xa9b506===null||_0xa9b506==='')return;if(typeof _0xa9b506!=='string'||!VARIABLE_PATTERN[_0x5d08a5(0x26b)](_0xa9b506))_0x4b6f48[_0x5d08a5(0x2c3)]({'path':_0x446e47,'message':_0x5d08a5(0x1fb)});else(RESERVED_RESULT_VARIABLES[_0x5d08a5(0x289)](_0xa9b506)||_0xa9b506[_0x5d08a5(0x285)](_0x5d08a5(0x224)))&&_0x4b6f48[_0x5d08a5(0x2c3)]({'path':_0x446e47,'message':_0x5d08a5(0x288)+_0xa9b506+'.'});}function validateCcConfig(_0x480fb7,_0x74047e,_0x1de67a){const _0x47f709=a287_0x1a3fa1;if(_0x480fb7['cc']===undefined)return;if(!isRecord(_0x480fb7['cc'])){_0x1de67a[_0x47f709(0x2c3)]({'path':_0x74047e+_0x47f709(0x273),'message':_0x47f709(0x286)});return;}_0x480fb7['type']!==_0x47f709(0x220)&&_0x480fb7['type']!==_0x47f709(0x284)&&_0x1de67a[_0x47f709(0x2c3)]({'path':_0x74047e+_0x47f709(0x273),'message':_0x47f709(0x2c5)});Object[_0x47f709(0x1be)]['hasOwnProperty'][_0x47f709(0x236)](_0x480fb7['cc'],_0x47f709(0x265))&&_0x1de67a[_0x47f709(0x2c3)]({'path':_0x74047e+_0x47f709(0x2a5),'message':UNSUPPORTED_FORM_MESSAGE});const _0x10b328=_0x480fb7['cc'][_0x47f709(0x259)];if(!Array[_0x47f709(0x1a2)](_0x10b328)||_0x10b328[_0x47f709(0x23f)]===0x0)_0x1de67a[_0x47f709(0x2c3)]({'path':_0x74047e+'.cc.recipientUserIds','message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x10b328[_0x47f709(0x23f)]>MAX_CC_RECIPIENTS&&_0x1de67a[_0x47f709(0x2c3)]({'path':_0x74047e+_0x47f709(0x277),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x47f709(0x1b1)});const _0x25f246=new Set();_0x10b328[_0x47f709(0x256)]((_0x30736b,_0x9cc6c8)=>{const _0x36120f=_0x47f709;if(typeof _0x30736b!==_0x36120f(0x24b)||_0x30736b[_0x36120f(0x260)]()==='')_0x1de67a[_0x36120f(0x2c3)]({'path':_0x74047e+'.cc.recipientUserIds['+_0x9cc6c8+']','message':_0x36120f(0x17a)});else _0x25f246[_0x36120f(0x289)](_0x30736b[_0x36120f(0x260)]())?_0x1de67a[_0x36120f(0x2c3)]({'path':_0x74047e+_0x36120f(0x29f)+_0x9cc6c8+']','message':_0x36120f(0x19a)+_0x30736b[_0x36120f(0x260)]()+'.'}):_0x25f246[_0x36120f(0x1e1)](_0x30736b[_0x36120f(0x260)]());});}validateStringArray(_0x480fb7['cc'][_0x47f709(0x203)],_0x74047e+'.cc.visible',_0x1de67a);}function validateStringArray(_0x285231,_0x3516ca,_0x56c35e){const _0x4f8d22=a287_0x1a3fa1;if(_0x285231===undefined)return;if(!Array[_0x4f8d22(0x1a2)](_0x285231)){_0x56c35e[_0x4f8d22(0x2c3)]({'path':_0x3516ca,'message':_0x4f8d22(0x2a3)});return;}const _0x3412e0=new Set();_0x285231[_0x4f8d22(0x256)]((_0x1e0b5b,_0x34700d)=>{const _0x4d25c2=_0x4f8d22;if(typeof _0x1e0b5b!=='string'||_0x1e0b5b[_0x4d25c2(0x260)]()==='')_0x56c35e[_0x4d25c2(0x2c3)]({'path':_0x3516ca+'['+_0x34700d+']','message':_0x4d25c2(0x1cb)});else _0x3412e0[_0x4d25c2(0x289)](_0x1e0b5b[_0x4d25c2(0x260)]())?_0x56c35e['push']({'path':_0x3516ca+'['+_0x34700d+']','message':'Duplicate\x20value:\x20'+_0x1e0b5b[_0x4d25c2(0x260)]()+'.'}):_0x3412e0['add'](_0x1e0b5b[_0x4d25c2(0x260)]());});}function validateNotificationConfig(_0x34a359,_0x2db6ed,_0xd23566){const _0x2cb302=a287_0x1a3fa1;if(!isRecord(_0x34a359)){_0xd23566[_0x2cb302(0x2c3)]({'path':_0x2db6ed,'message':_0x2cb302(0x20f)});return;}if(_0x34a359[_0x2cb302(0x270)]!==undefined&&_0x34a359[_0x2cb302(0x270)]!==null){if(typeof _0x34a359[_0x2cb302(0x270)]!=='string')_0xd23566['push']({'path':_0x2db6ed+'.version','message':_0x2cb302(0x18e)});else _0x34a359[_0x2cb302(0x270)][_0x2cb302(0x260)]()&&_0x34a359[_0x2cb302(0x270)][_0x2cb302(0x260)]()!=='v1'&&_0xd23566[_0x2cb302(0x2c3)]({'path':_0x2db6ed+_0x2cb302(0x257),'message':_0x2cb302(0x2d7)+_0x34a359[_0x2cb302(0x270)]+'.'});}const _0x379f4c=requireNotificationString(_0x34a359[_0x2cb302(0x19b)],_0x2db6ed+'.configCode',_0x2cb302(0x210),_0xd23566);_0x379f4c?.['includes']('${')&&_0xd23566[_0x2cb302(0x2c3)]({'path':_0x2db6ed+'.configCode','message':_0x2cb302(0x2b5)});if(_0x34a359[_0x2cb302(0x1c2)]!==undefined&&_0x34a359[_0x2cb302(0x1c2)]!==null){if(typeof _0x34a359[_0x2cb302(0x1c2)]!==_0x2cb302(0x24b))_0xd23566[_0x2cb302(0x2c3)]({'path':_0x2db6ed+_0x2cb302(0x1bc),'message':_0x2cb302(0x2d5)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x34a359[_0x2cb302(0x1c2)][_0x2cb302(0x260)]()[_0x2cb302(0x1c3)]())&&_0xd23566[_0x2cb302(0x2c3)]({'path':_0x2db6ed+_0x2cb302(0x1bc),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x34a359[_0x2cb302(0x291)])?_0xd23566['push']({'path':_0x2db6ed+'.template','message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x34a359[_0x2cb302(0x291)],_0x2db6ed+_0x2cb302(0x28a),_0xd23566),validateNotificationRecipients(_0x34a359[_0x2cb302(0x25f)],_0x2db6ed+_0x2cb302(0x2dd),_0xd23566);}function a287_0x2e0e(){const _0x4d6f48=['prototype','url','legacy_field_removed','async.enabled\x20must\x20be\x20a\x20boolean.','failurePolicy','toUpperCase','roleId','object','.timeout.resultVariable','Every\x20node\x20requires\x20a\x20non-empty\x20name.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','context','.timeout.enabled','value\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20template\x20supports\x20at\x20most\x20','\x20must\x20be\x20a\x20finite\x20number.','flowJson.nodes','bindDatasetCode','summary','.path','Unsupported\x20approval\x20mode:\x20','#/$defs/flowEdge','startPath\x20must\x20be\x20a\x20non-empty\x20string.','approval_sys_initiatorUsername','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.text','defaultFlow','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','formPermissions','set','delete','FIXED\x20assignee\x20requires\x20userIds.','.value','targetNodeId','add','replace','.defaultFlow','text','edge\x20target\x20is\x20required.','#/$defs/position','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','18pOTnhM','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20schemaVersion:\x20','flowDesc\x20must\x20be\x20a\x20string.','nodes','pageId','.waypoints','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','384811BzRvNB','flowJson','isInteger','USER','.pageId','Expression\x20references\x20SCRIPT\x20resultVariable\x20','HANDLE','integer','\x20facts.','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','Unsupported\x20pageMode:\x20','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','scriptResult','approval_sys_pageId','filter','\x20is\x20required.','path','Unsupported\x20condition\x20type:\x20','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','visible','FAIL','flowJson.schemaVersion','.detailMarkdown','datasetCode','FORM_FLOW','Notification\x20action.text\x20is\x20required.','#/$defs/flowNode','boolean','warnings','approval_sys_initiatorUserId','SECONDS','NOTIFICATION\x20node\x20requires\x20config.','Notification\x20configCode\x20is\x20required.','approval.simple-flow.v1','Notification\x20template.facts\x20must\x20be\x20an\x20array.','INDEPENDENT_FLOW','findIndex','keys','.assignee.userIds','event','Node\x20has\x20no\x20incoming\x20edge.','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','https://json-schema.org/draft/2020-12/schema','taskMode','timeout\x20must\x20be\x20an\x20object.','pageMode','indexOf','Notification\x20action.url\x20is\x20required.','END','FIXED','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.approvalMode','approval_sys_','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','EXECUTE_BFF','DAYS','.async.enabled','EMAIL','source','flowJson.','SCRIPT\x20node\x20requires\x20scriptName.','approval_sys_appCode','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','nodes\x20must\x20be\x20an\x20array.','1148290MINhih','Rabetbase\x20FlowConfig','.target','CUSTOM_PAGE','call','.transferCandidates','.facts','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','target','Notification\x20recipient.type\x20is\x20required.','__rabetbase_local_validation__','flowJson.startPath','10HaIubT','length','size','START','Duplicate\x20resultVariable:\x20','Notification\x20recipient\x20must\x20be\x20an\x20object.','.timeout','Notification\x20fact\x20must\x20be\x20an\x20object.','flowJson.edges[','resultVariable','^[1-9][0-9]*$','flowCode','flowDesc','string','sequential','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','transferCandidates','flowJson.nodes.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','duration','.source','Notification\x20template.','NaN','Duplicate\x20BPMN\x20element\x20id:\x20','forEach','.version','.transferCandidates.userIds','recipientUserIds','.resultVariable','.\x20This\x20CLI\x20supports\x20only\x20','edges','.timeout.action','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','recipients','trim','.transferCandidates.strategy','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','title','readSources','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','EXPRESSION\x20edge\x20requires\x20expression.','matchAll','empty_metadata_removed','unit','test','.name','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','array','version','edges\x20must\x20be\x20an\x20array.','1709884ysTaHm','.cc','name','get','slice','.cc.recipientUserIds','Edge\x20target\x20node\x20not\x20found:\x20','.position.','^[A-Za-z_][A-Za-z0-9_]*$','HOURS','entries','APPROVED','startPageId','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.transferCandidates.userIds[','].path','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','APPROVAL','startsWith','cc\x20must\x20be\x20an\x20object.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Reserved\x20resultVariable:\x20','has','.template','AUTO_APPROVE','EXPRESSION','.conditionType','flowType\x20is\x20required.','Notification\x20recipient.value\x20is\x20required.','3206950nnhhal','template','\x20actions.','ALWAYS','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.startPageId','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','parse','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','number','16DrjVCx','561371gLxWvM','role','map','.async.retryInterval','.cc.recipientUserIds[','ROLE','PLATFORM_FORM','.role','value\x20must\x20be\x20an\x20array.','expression','.cc.readSources','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','overwrite','flowJson.nodes[','540138GULjDK','position','Notification\x20fact.','formSchema','some','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','#/$defs/userId','AUTO_REJECT','action','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','ANY','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.timeout.interrupting','.url','approval_sys_operationType','APPROVAL\x20node\x20requires\x20assignee.','flowJson\x20must\x20be\x20an\x20object.','.type','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','flowKey','push','ALL','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','flowName\x20is\x20required.','.async','datasetCode\x20must\x20be\x20a\x20string.','waypoint.','timeout.enabled\x20must\x20be\x20a\x20boolean.','Unsupported\x20notification\x20placeholder:\x20','BCC','timeout','.sequential','#/$defs/timeAmount','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','facts','stringify','pid','failurePolicy\x20must\x20be\x20a\x20string.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','Unsupported\x20notification\x20version:\x20','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','CONDITION','NOTIFICATION','strategy','.recipients','schemaVersion','approval_sys_dataId','Node\x20has\x20no\x20outgoing\x20edge.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','retryInterval','SCRIPT','isSafeInteger','edge\x20must\x20be\x20an\x20object.','duration\x20requires\x20value\x20and\x20unit.','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','scriptName','.unit','flowJson.edges','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','defaultFlow\x20must\x20be\x20a\x20boolean.','waypoints','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','hasOwnProperty','approved','.taskMode','.assignee.roleId','userIds','interrupting','.expression','approval_sys_processInstanceId','result','.assignee.strategy','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','position.','Notification\x20version\x20must\x20be\x20a\x20string.','message','value','sequential\x20must\x20be\x20a\x20boolean.','formDefinitions','Node\x20is\x20not\x20reachable\x20from\x20START.','sourceNodeId','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','Unsupported\x20flowType:\x20','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startPath','Duplicate\x20cc\x20recipient\x20userId:\x20','configCode',',\x20but\x20node\x20','enabled','.waypoints[','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','formPermission','SINGLE','isArray','async','every','.config','approvalMode','flowType','CONTINUE','conditionType','isFinite','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','approval_sys_datasetCode','.tmp','label','appCode','\x20users.','formData','type','.id','REJECTED','assignee','1493742iXoTzB','flowName','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','\x20->\x20','Notification\x20action\x20must\x20be\x20an\x20object.','.failurePolicy','templateName'];a287_0x2e0e=function(){return _0x4d6f48;};return a287_0x2e0e();}function validateNotificationTemplate(_0xb8df55,_0x2b202b,_0x516fbd){const _0x39edf5=a287_0x1a3fa1;for(const _0x15b916 of[_0x39edf5(0x264),'summary']){const _0x55c4a3=requireNotificationString(_0xb8df55[_0x15b916],_0x2b202b+'.'+_0x15b916,_0x39edf5(0x253)+_0x15b916+_0x39edf5(0x1ff),_0x516fbd);if(_0x55c4a3)validateNotificationPlaceholders(_0x55c4a3,_0x2b202b+'.'+_0x15b916,_0x516fbd);}_0xb8df55['detailMarkdown']!==undefined&&_0xb8df55['detailMarkdown']!==null&&(typeof _0xb8df55['detailMarkdown']!==_0x39edf5(0x24b)?_0x516fbd['push']({'path':_0x2b202b+_0x39edf5(0x206),'message':_0x39edf5(0x197)}):validateNotificationPlaceholders(_0xb8df55['detailMarkdown'],_0x2b202b+'.detailMarkdown',_0x516fbd)),validateNotificationFacts(_0xb8df55[_0x39edf5(0x2d2)],_0x2b202b+_0x39edf5(0x238),_0x516fbd),validateNotificationActions(_0xb8df55['actions'],_0x2b202b+'.actions',_0x516fbd);}function validateNotificationFacts(_0x32b324,_0x57809a,_0x5dd446){const _0x113371=a287_0x1a3fa1;if(_0x32b324===undefined||_0x32b324===null)return;if(!Array[_0x113371(0x1a2)](_0x32b324)){_0x5dd446[_0x113371(0x2c3)]({'path':_0x57809a,'message':_0x113371(0x212)});return;}_0x32b324[_0x113371(0x23f)]>MAX_NOTIFICATION_FACTS&&_0x5dd446[_0x113371(0x2c3)]({'path':_0x57809a,'message':_0x113371(0x1cc)+MAX_NOTIFICATION_FACTS+_0x113371(0x1f8)}),_0x32b324[_0x113371(0x256)]((_0x3d1c4a,_0x324dbf)=>{const _0x3f7fc4=_0x113371,_0x481190=_0x57809a+'['+_0x324dbf+']';if(!isRecord(_0x3d1c4a)){_0x5dd446['push']({'path':_0x481190,'message':_0x3f7fc4(0x245)});return;}for(const _0x39fd57 of[_0x3f7fc4(0x1af),_0x3f7fc4(0x190)]){const _0x22f6f5=requireNotificationString(_0x3d1c4a[_0x39fd57],_0x481190+'.'+_0x39fd57,_0x3f7fc4(0x2ab)+_0x39fd57+_0x3f7fc4(0x1ff),_0x5dd446);_0x22f6f5&&validateNotificationPlaceholders(_0x22f6f5,_0x481190+'.'+_0x39fd57,_0x5dd446);}});}function validateNotificationActions(_0x5970f4,_0x48416c,_0x3e8531){const _0x23ee2a=a287_0x1a3fa1;if(_0x5970f4===undefined||_0x5970f4===null)return;if(!Array[_0x23ee2a(0x1a2)](_0x5970f4)){_0x3e8531['push']({'path':_0x48416c,'message':_0x23ee2a(0x2d9)});return;}_0x5970f4[_0x23ee2a(0x23f)]>MAX_NOTIFICATION_ACTIONS&&_0x3e8531[_0x23ee2a(0x2c3)]({'path':_0x48416c,'message':_0x23ee2a(0x1cc)+MAX_NOTIFICATION_ACTIONS+_0x23ee2a(0x292)}),_0x5970f4[_0x23ee2a(0x256)]((_0x3038f7,_0x5ab80a)=>{const _0xa2698e=_0x23ee2a,_0x2d26c7=_0x48416c+'['+_0x5ab80a+']';if(!isRecord(_0x3038f7)){_0x3e8531[_0xa2698e(0x2c3)]({'path':_0x2d26c7,'message':_0xa2698e(0x1bb)});return;}const _0x1cfa66=requireNotificationString(_0x3038f7['text'],_0x2d26c7+_0xa2698e(0x1d7),_0xa2698e(0x209),_0x3e8531);if(_0x1cfa66)validateNotificationPlaceholders(_0x1cfa66,_0x2d26c7+'.text',_0x3e8531);const _0x3b779f=requireNotificationString(_0x3038f7['url'],_0x2d26c7+_0xa2698e(0x2bc),_0xa2698e(0x21f),_0x3e8531);if(!_0x3b779f)return;validateNotificationPlaceholders(_0x3b779f,_0x2d26c7+'.url',_0x3e8531),!/^https?:\/\//i['test'](_0x3b779f)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xa2698e(0x26b)](_0x3b779f)&&_0x3e8531[_0xa2698e(0x2c3)]({'path':_0x2d26c7+'.url','message':_0xa2698e(0x1ab)});});}function validateNotificationRecipients(_0x3a98b4,_0x3c3bbc,_0x114aac){const _0xe6f9be=a287_0x1a3fa1;if(_0x3a98b4===undefined||_0x3a98b4===null)return;if(!Array[_0xe6f9be(0x1a2)](_0x3a98b4)){_0x114aac[_0xe6f9be(0x2c3)]({'path':_0x3c3bbc,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x59ad88=![];_0x3a98b4['forEach']((_0x1991aa,_0x2460e4)=>{const _0xb4aba4=_0xe6f9be,_0x26fe86=_0x3c3bbc+'['+_0x2460e4+']';if(!isRecord(_0x1991aa)){_0x114aac['push']({'path':_0x26fe86,'message':_0xb4aba4(0x243)});return;}const _0x343845=requireNotificationString(_0x1991aa['type'],_0x26fe86+_0xb4aba4(0x2c0),_0xb4aba4(0x23b),_0x114aac);_0x343845&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x343845['toUpperCase']())&&_0x114aac[_0xb4aba4(0x2c3)]({'path':_0x26fe86+'.type','message':_0xb4aba4(0x222)});let _0x3b1ba8='TO';_0x1991aa[_0xb4aba4(0x29c)]!==undefined&&_0x1991aa['role']!==null&&(typeof _0x1991aa[_0xb4aba4(0x29c)]!=='string'?(_0x114aac[_0xb4aba4(0x2c3)]({'path':_0x26fe86+'.role','message':_0xb4aba4(0x1e7)}),_0x3b1ba8=''):(_0x3b1ba8=_0x1991aa[_0xb4aba4(0x29c)]['trim']()[_0xb4aba4(0x1c3)](),!NOTIFICATION_RECIPIENT_ROLES[_0xb4aba4(0x289)](_0x3b1ba8)&&_0x114aac[_0xb4aba4(0x2c3)]({'path':_0x26fe86+_0xb4aba4(0x2a2),'message':_0xb4aba4(0x26d)})));if(_0x3b1ba8==='TO')_0x59ad88=!![];const _0x2aff42=requireNotificationString(_0x1991aa['value'],_0x26fe86+_0xb4aba4(0x1df),_0xb4aba4(0x28f),_0x114aac);_0x2aff42&&validateNotificationPlaceholders(_0x2aff42,_0x26fe86+'.value',_0x114aac);}),_0x3a98b4[_0xe6f9be(0x23f)]>0x0&&!_0x59ad88&&_0x114aac['push']({'path':_0x3c3bbc,'message':_0xe6f9be(0x198)});}function requireNotificationString(_0x17c661,_0x4fecad,_0x1eda56,_0x44f514){const _0x5778c8=a287_0x1a3fa1;if(typeof _0x17c661!==_0x5778c8(0x24b)||_0x17c661[_0x5778c8(0x260)]()==='')return _0x44f514[_0x5778c8(0x2c3)]({'path':_0x4fecad,'message':_0x1eda56}),undefined;return _0x17c661[_0x5778c8(0x260)]();}function validateNotificationPlaceholders(_0x298b25,_0x171d21,_0x36b52e){const _0x50f814=a287_0x1a3fa1;for(const _0x1b580a of _0x298b25[_0x50f814(0x268)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5b0cca=_0x1b580a[0x1]?.[_0x50f814(0x260)]()??'',_0x309bbe=_0x5b0cca[_0x50f814(0x21e)]('.'),_0x38de3b=_0x309bbe>=0x0?_0x5b0cca[_0x50f814(0x276)](0x0,_0x309bbe):_0x5b0cca,_0x519256=_0x309bbe>=0x0?_0x5b0cca[_0x50f814(0x276)](_0x309bbe+0x1)[_0x50f814(0x260)]():'';(![_0x50f814(0x217),_0x50f814(0x1c9),'variables']['includes'](_0x38de3b)||_0x519256==='')&&_0x36b52e[_0x50f814(0x2c3)]({'path':_0x171d21,'message':_0x50f814(0x2cc)+_0x1b580a[0x0]+'.'});}_0x298b25[_0x50f814(0x1e2)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x36b52e[_0x50f814(0x2c3)]({'path':_0x171d21,'message':_0x50f814(0x2ae)});}function validateEdge(_0x43b933,_0x1e3501,_0x9b3062){const _0x2dc56b=a287_0x1a3fa1;_0x43b933[_0x2dc56b(0x274)]!==undefined&&typeof _0x43b933['name']!==_0x2dc56b(0x24b)&&_0x9b3062[_0x2dc56b(0x2c3)]({'path':_0x1e3501+_0x2dc56b(0x26c),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x43b933[_0x2dc56b(0x1d8)]!==undefined&&typeof _0x43b933[_0x2dc56b(0x1d8)]!=='boolean'&&_0x9b3062[_0x2dc56b(0x2c3)]({'path':_0x1e3501+_0x2dc56b(0x1e3),'message':_0x2dc56b(0x17f)}),_0x43b933[_0x2dc56b(0x180)]!==undefined&&(!Array['isArray'](_0x43b933[_0x2dc56b(0x180)])?_0x9b3062[_0x2dc56b(0x2c3)]({'path':_0x1e3501+_0x2dc56b(0x1ee),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x43b933[_0x2dc56b(0x180)][_0x2dc56b(0x256)]((_0x209103,_0x30922a)=>{const _0x1cbd5d=_0x2dc56b;if(!isRecord(_0x209103)){_0x9b3062[_0x1cbd5d(0x2c3)]({'path':_0x1e3501+'.waypoints['+_0x30922a+']','message':_0x1cbd5d(0x1d9)});return;}for(const _0x3aee51 of['x','y']){const _0x5402df=_0x209103[_0x3aee51];(typeof _0x5402df!=='number'||!Number['isFinite'](_0x5402df))&&_0x9b3062['push']({'path':_0x1e3501+_0x1cbd5d(0x19e)+_0x30922a+'].'+_0x3aee51,'message':_0x1cbd5d(0x2ca)+_0x3aee51+_0x1cbd5d(0x1cd)});}})),_0x43b933[_0x2dc56b(0x1a9)]!==undefined&&!CONDITION_TYPES['has'](_0x43b933['conditionType'])&&_0x9b3062['push']({'path':_0x1e3501+_0x2dc56b(0x28d),'message':_0x2dc56b(0x201)+String(_0x43b933[_0x2dc56b(0x1a9)])+'.'}),_0x43b933[_0x2dc56b(0x1a9)]===_0x2dc56b(0x28c)&&(typeof _0x43b933[_0x2dc56b(0x2a4)]!==_0x2dc56b(0x24b)||_0x43b933[_0x2dc56b(0x2a4)]['trim']()==='')&&_0x9b3062['push']({'path':_0x1e3501+_0x2dc56b(0x188),'message':_0x2dc56b(0x267)}),_0x43b933['defaultFlow']===!![]&&_0x43b933[_0x2dc56b(0x1a9)]!=='ALWAYS'&&_0x9b3062[_0x2dc56b(0x2c3)]({'path':_0x1e3501+'.defaultFlow','message':_0x2dc56b(0x1f9)}),_0x43b933['defaultFlow']===!![]&&typeof _0x43b933[_0x2dc56b(0x2a4)]==='string'&&_0x43b933[_0x2dc56b(0x2a4)][_0x2dc56b(0x260)]()!==''&&_0x9b3062[_0x2dc56b(0x2c3)]({'path':_0x1e3501+'.expression','message':_0x2dc56b(0x1da)});}function validateGraphShape(_0x3a0134,_0x2c10cd,_0x4bc955,_0x2b67ad,_0x49da72,_0x2be9bc,_0x544ac8){const _0x52c5bd=a287_0x1a3fa1;for(const [_0x49e8af,_0x550595]of _0x3a0134){const _0x39282e=_0x49da72[_0x52c5bd(0x275)](_0x49e8af)??[],_0x4044cf=_0x2b67ad['get'](_0x49e8af)??[];_0x550595[_0x52c5bd(0x1b3)]!=='START'&&_0x39282e[_0x52c5bd(0x23f)]===0x0&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x218)});_0x550595['type']!==_0x52c5bd(0x220)&&_0x4044cf[_0x52c5bd(0x23f)]===0x0&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x2e0)});_0x550595[_0x52c5bd(0x1b3)]===_0x52c5bd(0x241)&&_0x39282e[_0x52c5bd(0x23f)]>0x0&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x226)});_0x550595['type']===_0x52c5bd(0x220)&&_0x4044cf[_0x52c5bd(0x23f)]>0x0&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x298)});if(_0x550595[_0x52c5bd(0x1b3)]===_0x52c5bd(0x2da)){_0x4044cf[_0x52c5bd(0x23f)]<0x2&&_0x544ac8['push']({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x202)});const _0x3dc3e7=_0x4044cf[_0x52c5bd(0x1fe)](_0x4d5ae5=>_0x4d5ae5['defaultFlow']===!![]);_0x3dc3e7[_0x52c5bd(0x23f)]!==0x1&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x25e)});if(_0x3dc3e7[_0x52c5bd(0x23f)]===0x1){const _0x2ef736=_0x3dc3e7[0x0],_0x2f36e9=_0x2be9bc[_0x52c5bd(0x275)](_0x2ef736)??_0x52c5bd(0x17d);_0x2ef736[_0x52c5bd(0x1a9)]!==_0x52c5bd(0x293)&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x2f36e9+_0x52c5bd(0x28d),'message':_0x52c5bd(0x1b9)});_0x2ef736['expression']!==undefined&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x2f36e9+_0x52c5bd(0x188),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x27d191 of _0x4044cf){if(_0x27d191===_0x2ef736)continue;const _0x2c6ed2=_0x2be9bc[_0x52c5bd(0x275)](_0x27d191)??_0x52c5bd(0x17d);if(_0x27d191[_0x52c5bd(0x1a9)]!==_0x52c5bd(0x28c))_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x2c6ed2+'.conditionType','message':_0x52c5bd(0x296)});else(typeof _0x27d191[_0x52c5bd(0x2a4)]!==_0x52c5bd(0x24b)||_0x27d191['expression'][_0x52c5bd(0x260)]()==='')&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x2c6ed2+'.expression','message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x550595[_0x52c5bd(0x1b3)]===_0x52c5bd(0x284)&&(_0x550595[_0x52c5bd(0x21b)]??_0x52c5bd(0x284))===_0x52c5bd(0x1f6)){if(_0x4044cf[_0x52c5bd(0x23f)]!==0x1)_0x544ac8['push']({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x282)});else{const _0xb8f418=_0x4044cf[0x0];((_0xb8f418[_0x52c5bd(0x1a9)]??'ALWAYS')!==_0x52c5bd(0x293)||_0xb8f418[_0x52c5bd(0x1d8)]===!![]||typeof _0xb8f418['expression']===_0x52c5bd(0x24b)&&_0xb8f418['expression']['trim']()!=='')&&_0x544ac8['push']({'path':_0x2be9bc[_0x52c5bd(0x275)](_0xb8f418)??_0x52c5bd(0x17d),'message':_0x52c5bd(0x294)});}}else{if(_0x550595[_0x52c5bd(0x1b3)]===_0x52c5bd(0x284)){const _0x1fd3dc=_0x4044cf[_0x52c5bd(0x29d)](_0x2ab1ca=>_0x2ab1ca[_0x52c5bd(0x1a9)]??_0x52c5bd(0x293)),_0x46e5da=_0x1fd3dc[_0x52c5bd(0x1fe)](_0x5777c6=>_0x5777c6!==_0x52c5bd(0x27d)&&_0x5777c6!==_0x52c5bd(0x1b5));_0x46e5da['length']>0x0&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x1fd3dc[_0x52c5bd(0x1fe)](_0x3148ff=>_0x3148ff===_0x52c5bd(0x27d))[_0x52c5bd(0x23f)]!==0x1&&_0x544ac8['push']({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x1fd3dc[_0x52c5bd(0x1fe)](_0x5acafe=>_0x5acafe===_0x52c5bd(0x1b5))[_0x52c5bd(0x23f)]!==0x1&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x49e8af,'message':_0x52c5bd(0x225)}),_0x4044cf[_0x52c5bd(0x2ad)](_0x37c179=>_0x37c179[_0x52c5bd(0x1d8)]===!![])&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':'flowJson.nodes.'+_0x49e8af,'message':_0x52c5bd(0x219)});}}}const _0x583474=new Set(),_0x4384a9=_0x31873f=>{const _0x59325a=_0x52c5bd;if(_0x583474[_0x59325a(0x289)](_0x31873f))return;_0x583474[_0x59325a(0x1e1)](_0x31873f);for(const _0x5e257b of _0x2b67ad[_0x59325a(0x275)](_0x31873f)??[]){const _0x58ce59=resolveEdgeEndpoint(_0x5e257b[_0x59325a(0x23a)],_0x5e257b[_0x59325a(0x1e0)]);if(_0x58ce59&&_0x3a0134[_0x59325a(0x289)](_0x58ce59))_0x4384a9(_0x58ce59);}};_0x4384a9(_0x2c10cd);for(const _0x2ac7b6 of _0x3a0134[_0x52c5bd(0x215)]()){!_0x583474[_0x52c5bd(0x289)](_0x2ac7b6)&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':_0x52c5bd(0x24f)+_0x2ac7b6,'message':_0x52c5bd(0x193)});}const _0x304d3d=_0x4bc955[_0x52c5bd(0x2ad)](_0x5d45e7=>_0x583474[_0x52c5bd(0x289)](_0x5d45e7));if(!_0x304d3d){_0x544ac8[_0x52c5bd(0x2c3)]({'path':'flowJson.edges','message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x58ecf7=new Set(),_0x4a1654=_0xb40594=>{const _0x488dce=_0x52c5bd;if(_0x58ecf7['has'](_0xb40594))return;_0x58ecf7[_0x488dce(0x1e1)](_0xb40594);for(const _0x43a8f3 of _0x49da72['get'](_0xb40594)??[]){const _0x59dbd6=resolveEdgeEndpoint(_0x43a8f3[_0x488dce(0x22c)],_0x43a8f3[_0x488dce(0x194)]);if(_0x59dbd6&&_0x3a0134[_0x488dce(0x289)](_0x59dbd6))_0x4a1654(_0x59dbd6);}};for(const _0x13c0f0 of _0x4bc955){if(_0x3a0134[_0x52c5bd(0x289)](_0x13c0f0))_0x4a1654(_0x13c0f0);}for(const _0x33d515 of _0x583474){!_0x58ecf7[_0x52c5bd(0x289)](_0x33d515)&&_0x544ac8[_0x52c5bd(0x2c3)]({'path':'flowJson.nodes.'+_0x33d515,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0xd25786,_0x3d51aa,_0x327184,_0x1ec1d3){const _0x38553f=a287_0x1a3fa1;if(_0x3d51aa===0x0)return;const _0x31d03e=new Set(_0x327184[_0x38553f(0x29d)](_0x20803c=>_0xd25786['get'](_0x20803c)?.[_0x38553f(0x18a)])[_0x38553f(0x1fe)](_0x1a6a0a=>typeof _0x1a6a0a===_0x38553f(0x24b)));for(const _0x31b882 of[_0x38553f(0x27d),'REJECTED']){!_0x31d03e['has'](_0x31b882)&&_0x1ec1d3[_0x38553f(0x2c3)]({'path':'flowJson.nodes','message':_0x38553f(0x2ba)+_0x31b882+'.'});}}function validateScriptResultReferences(_0x3c7971,_0x5641f0,_0x44dbd9,_0x1a5a4b,_0x480181,_0x4b3220,_0x470a27){const _0x4deb9b=a287_0x1a3fa1;if(_0x4b3220[_0x4deb9b(0x240)]===0x0)return;const _0x25e5ed=new Set(),_0x2d8572=_0x306ac2=>{const _0x56a39c=_0x4deb9b;if(!_0x25e5ed['has'](_0x306ac2)&&_0x3c7971[_0x56a39c(0x289)](_0x306ac2)){_0x25e5ed[_0x56a39c(0x1e1)](_0x306ac2);for(const _0x507233 of _0x44dbd9[_0x56a39c(0x275)](_0x306ac2)??[]){const _0x526982=resolveEdgeEndpoint(_0x507233[_0x56a39c(0x23a)],_0x507233[_0x56a39c(0x1e0)]);if(_0x526982)_0x2d8572(_0x526982);}}};_0x2d8572(_0x5641f0);const _0x469924=new Map();for(const _0x5e7b4f of _0x25e5ed){_0x469924[_0x4deb9b(0x1dc)](_0x5e7b4f,_0x5e7b4f===_0x5641f0?new Set([_0x5641f0]):new Set(_0x25e5ed));}let _0x3aff07=!![];while(_0x3aff07){_0x3aff07=![];for(const _0x449a48 of _0x25e5ed){if(_0x449a48===_0x5641f0)continue;const _0x5aa50c=(_0x1a5a4b[_0x4deb9b(0x275)](_0x449a48)??[])[_0x4deb9b(0x29d)](_0x33ee75=>resolveEdgeEndpoint(_0x33ee75[_0x4deb9b(0x22c)],_0x33ee75['sourceNodeId']))[_0x4deb9b(0x1fe)](_0x226f60=>Boolean(_0x226f60&&_0x25e5ed[_0x4deb9b(0x289)](_0x226f60)));if(_0x5aa50c[_0x4deb9b(0x23f)]===0x0)continue;const _0x16540f=new Set(_0x469924['get'](_0x5aa50c[0x0])??[]);for(const _0x4b1479 of _0x5aa50c['slice'](0x1)){const _0x3166d8=_0x469924[_0x4deb9b(0x275)](_0x4b1479)??new Set();for(const _0x19d7fe of _0x16540f){if(!_0x3166d8[_0x4deb9b(0x289)](_0x19d7fe))_0x16540f[_0x4deb9b(0x1dd)](_0x19d7fe);}}_0x16540f[_0x4deb9b(0x1e1)](_0x449a48);const _0x30cc6b=_0x469924[_0x4deb9b(0x275)](_0x449a48);!setsEqual(_0x30cc6b,_0x16540f)&&(_0x469924[_0x4deb9b(0x1dc)](_0x449a48,_0x16540f),_0x3aff07=!![]);}}for(const [_0x4226b3,_0x3bdfb4]of _0x44dbd9){const _0x201cac=_0x469924[_0x4deb9b(0x275)](_0x4226b3);if(!_0x201cac)continue;for(const _0x5d1a61 of _0x3bdfb4){if(_0x5d1a61[_0x4deb9b(0x1a9)]!==_0x4deb9b(0x28c)||typeof _0x5d1a61[_0x4deb9b(0x2a4)]!==_0x4deb9b(0x24b))continue;for(const [_0x1f8799,_0x2e57a2]of _0x4b3220){expressionReferencesVariable(_0x5d1a61[_0x4deb9b(0x2a4)],_0x1f8799)&&!_0x201cac[_0x4deb9b(0x289)](_0x2e57a2)&&_0x470a27[_0x4deb9b(0x2c3)]({'path':(_0x480181[_0x4deb9b(0x275)](_0x5d1a61)??_0x4deb9b(0x17d))+_0x4deb9b(0x188),'message':_0x4deb9b(0x1f5)+_0x1f8799+_0x4deb9b(0x19c)+_0x2e57a2+_0x4deb9b(0x19f)+_0x4226b3+'.'});}}}}function expressionReferencesVariable(_0x19dbd9,_0x5d5ec8){const _0x4d551e=a287_0x1a3fa1;let _0x3e2e2e=0x0;while(_0x3e2e2e<_0x19dbd9[_0x4d551e(0x23f)]){const _0x1062c0=_0x19dbd9[_0x3e2e2e];if(_0x1062c0==='\x27'||_0x1062c0==='\x22'){_0x3e2e2e=skipQuotedExpressionSegment(_0x19dbd9,_0x3e2e2e,_0x1062c0);continue;}if(!/[A-Za-z_]/[_0x4d551e(0x26b)](_0x1062c0)){_0x3e2e2e+=0x1;continue;}const _0x217fe2=_0x3e2e2e;_0x3e2e2e+=0x1;while(_0x3e2e2e<_0x19dbd9[_0x4d551e(0x23f)]&&/[A-Za-z0-9_]/[_0x4d551e(0x26b)](_0x19dbd9[_0x3e2e2e])){_0x3e2e2e+=0x1;}if(_0x19dbd9[_0x4d551e(0x276)](_0x217fe2,_0x3e2e2e)!==_0x5d5ec8)continue;let _0x495738=_0x217fe2-0x1;while(_0x495738>=0x0&&/\s/[_0x4d551e(0x26b)](_0x19dbd9[_0x495738])){_0x495738-=0x1;}if(_0x19dbd9[_0x495738]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x1719f6,_0x686dfb,_0x58d532){const _0x5bc585=a287_0x1a3fa1;let _0x3b2052=_0x686dfb+0x1;while(_0x3b2052<_0x1719f6[_0x5bc585(0x23f)]){if(_0x1719f6[_0x3b2052]==='\x5c'){_0x3b2052+=0x2;continue;}if(_0x1719f6[_0x3b2052]===_0x58d532)return _0x3b2052+0x1;_0x3b2052+=0x1;}return _0x3b2052;}function resolveEffectiveResultVariable(_0x1cc2b7,_0x390f1a){const _0x46a72d=a287_0x1a3fa1;if(_0x1cc2b7===undefined||_0x1cc2b7===null||_0x390f1a&&_0x1cc2b7==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1cc2b7!=='string'||!VARIABLE_PATTERN[_0x46a72d(0x26b)](_0x1cc2b7)||RESERVED_RESULT_VARIABLES[_0x46a72d(0x289)](_0x1cc2b7)||_0x1cc2b7[_0x46a72d(0x285)](_0x46a72d(0x224)))return undefined;return _0x1cc2b7;}function registerResultVariableOwner(_0x2f249a,_0x339c02,_0x52ad3f,_0x203aa3){const _0x3b77fa=a287_0x1a3fa1;if(_0x2f249a['has'](_0x339c02)){_0x203aa3[_0x3b77fa(0x2c3)]({'path':_0x3b77fa(0x1ce),'message':_0x3b77fa(0x242)+_0x339c02+'.'});return;}_0x2f249a[_0x3b77fa(0x1dc)](_0x339c02,_0x52ad3f);}function setsEqual(_0x57deb3,_0x541d70){const _0x100817=a287_0x1a3fa1;return _0x57deb3[_0x100817(0x240)]===_0x541d70['size']&&[..._0x57deb3][_0x100817(0x1a4)](_0x566961=>_0x541d70['has'](_0x566961));}function isValidUserId(_0x50396e){const _0x19071d=a287_0x1a3fa1;if(typeof _0x50396e==='string')return _0x50396e[_0x19071d(0x260)]()[_0x19071d(0x23f)]>0x0;return Number['isSafeInteger'](_0x50396e)&&Number(_0x50396e)>0x0;}function resolveEdgeEndpoint(_0x34c395,_0x43b148){const _0x1b37c2=a287_0x1a3fa1;if(typeof _0x34c395===_0x1b37c2(0x24b)&&_0x34c395[_0x1b37c2(0x260)]())return _0x34c395[_0x1b37c2(0x260)]();if(typeof _0x43b148===_0x1b37c2(0x24b)&&_0x43b148[_0x1b37c2(0x260)]())return _0x43b148[_0x1b37c2(0x260)]();return undefined;}function removeEmptyMetadata(_0x29af26,_0x15dd6c,_0x306cb1,_0x538e20){const _0x5a82e6=a287_0x1a3fa1;if(Array[_0x5a82e6(0x1a2)](_0x29af26)){_0x29af26[_0x5a82e6(0x256)]((_0x1e85ec,_0x4b0fdd)=>removeEmptyMetadata(_0x1e85ec,_0x15dd6c+'['+_0x4b0fdd+']',_0x306cb1,_0x538e20));return;}if(!isRecord(_0x29af26))return;for(const [_0x288cc8,_0x2123b8]of Object[_0x5a82e6(0x27c)](_0x29af26)){const _0x54999e=_0x15dd6c+'.'+_0x288cc8;if(_0x288cc8==='metadata'&&isEmptyJsonValue(_0x2123b8)){delete _0x29af26[_0x288cc8],_0x538e20['push'](_0x54999e),_0x306cb1[_0x5a82e6(0x2c3)]({'code':_0x5a82e6(0x269),'path':_0x54999e,'message':_0x54999e+'\x20was\x20empty\x20and\x20was\x20removed.'});continue;}removeEmptyMetadata(_0x2123b8,_0x54999e,_0x306cb1,_0x538e20);}}function isEmptyJsonValue(_0x515b50){const _0x469a12=a287_0x1a3fa1;if(_0x515b50===null||_0x515b50===undefined)return!![];if(typeof _0x515b50===_0x469a12(0x24b))return _0x515b50[_0x469a12(0x260)]()==='';if(Array[_0x469a12(0x1a2)](_0x515b50))return _0x515b50[_0x469a12(0x23f)]===0x0;return isRecord(_0x515b50)&&Object[_0x469a12(0x215)](_0x515b50)[_0x469a12(0x23f)]===0x0;}function isRecord(_0x275a6f){const _0x2ef9a2=a287_0x1a3fa1;return typeof _0x275a6f===_0x2ef9a2(0x1c5)&&_0x275a6f!==null&&!Array[_0x2ef9a2(0x1a2)](_0x275a6f);}function cloneJsonValue(_0x3aa4e2){const _0x2fbea8=a287_0x1a3fa1;return JSON[_0x2fbea8(0x297)](JSON[_0x2fbea8(0x2d3)](_0x3aa4e2));}export async function readFlowConfigFile(_0x5b3721){const _0x32a552=a287_0x1a3fa1,_0x2adb72=await readFile(resolve(_0x5b3721),'utf8');return JSON[_0x32a552(0x297)](_0x2adb72);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a288_0x543aa7=a288_0x3984;(function(_0x5cb20a,_0x28237c){const _0x554177=a288_0x3984,_0x2ee434=_0x5cb20a();while(!![]){try{const _0x1a3161=-parseInt(_0x554177(0x185))/0x1*(-parseInt(_0x554177(0x176))/0x2)+-parseInt(_0x554177(0x18c))/0x3+-parseInt(_0x554177(0x175))/0x4*(parseInt(_0x554177(0x192))/0x5)+parseInt(_0x554177(0x1a6))/0x6*(parseInt(_0x554177(0x195))/0x7)+parseInt(_0x554177(0x174))/0x8+-parseInt(_0x554177(0x173))/0x9+parseInt(_0x554177(0x177))/0xa;if(_0x1a3161===_0x28237c)break;else _0x2ee434['push'](_0x2ee434['shift']());}catch(_0x42ac45){_0x2ee434['push'](_0x2ee434['shift']());}}}(a288_0x1268,0xb3fd3));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';function a288_0x3984(_0x5c606e,_0x513486){_0x5c606e=_0x5c606e-0x171;const _0x12686c=a288_0x1268();let _0x3984d5=_0x12686c[_0x5c606e];return _0x3984d5;}import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x543aa7(0x1a2);export const INSTANT_API_POLICY_FILE_NAME=a288_0x543aa7(0x182);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x42ed75,_0x53b88b,_0x1f2aaa){return new CliError(_0x42ed75,0x1,_0x53b88b,_0x1f2aaa);}export function loadInstantApiPolicyLocalConfig(_0x57323d,_0x13ac93){assertSafeAppCode(_0x57323d);const _0xbe227e=resolve(_0x13ac93??findProjectRootDirectory()),_0x3a13a0=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x57323d+'/'+INSTANT_API_POLICY_FILE_NAME,_0x5e67e9=resolve(_0xbe227e,INSTANT_API_POLICY_RELATIVE_ROOT,_0x57323d),_0xa5de7a=resolve(_0x5e67e9,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0xbe227e,'appCode':_0x57323d,'policyRoot':_0x5e67e9,'policyFilePath':_0xa5de7a,'policyRelativePath':_0x3a13a0};}export function createDefaultInstantApiPolicyConfig(_0x2d0dba,_0x55e0c5=a288_0x543aa7(0x172)){return assertSafeAppCode(_0x2d0dba),{'version':'2','appCode':_0x2d0dba,'defaults':{'instantApi':_0x55e0c5},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x974e69){const _0xd81090=a288_0x543aa7;let _0x589b26;try{_0x589b26=await stat(_0x974e69[_0xd81090(0x1a5)]);}catch(_0x3bd556){throw instantApiPolicyError(_0xd81090(0x194),_0xd81090(0x17a)+_0x974e69[_0xd81090(0x1a5)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0x589b26[_0xd81090(0x19f)]())throw instantApiPolicyError(_0xd81090(0x180),_0xd81090(0x19d)+_0x974e69[_0xd81090(0x1a5)]);if(_0x589b26[_0xd81090(0x1a3)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0xd81090(0x17f));let _0x403dd1;try{_0x403dd1=await readFile(_0x974e69[_0xd81090(0x1a5)]);}catch{throw instantApiPolicyError(_0xd81090(0x19c),_0xd81090(0x17b)+_0x974e69[_0xd81090(0x1a5)]);}if(_0x403dd1[_0xd81090(0x184)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xd81090(0x1a7),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0xac2811;try{_0xac2811=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0xd81090(0x199)](_0x403dd1);}catch{throw instantApiPolicyError(_0xd81090(0x180),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x974e69[_0xd81090(0x1a5)]);}let _0x425731;try{_0x425731=JSON[_0xd81090(0x19a)](_0xac2811);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x974e69[_0xd81090(0x1a5)]);}return assertLocalPolicyContract(_0x425731,_0x974e69[_0xd81090(0x18a)]);}export async function writeInstantApiPolicyConfigFile(_0x17f035,_0x344d58,_0x1ec3cd={}){const _0x4aaf7b=a288_0x543aa7,_0x3a3aae=assertLocalPolicyContract(_0x344d58,_0x17f035[_0x4aaf7b(0x18a)]),_0x2b2a2d=JSON[_0x4aaf7b(0x1a1)](_0x3a3aae,null,0x2)+'\x0a';if(Buffer[_0x4aaf7b(0x184)](_0x2b2a2d,_0x4aaf7b(0x17c))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x4aaf7b(0x1a7),_0x4aaf7b(0x17f));await mkdir(_0x17f035['policyRoot'],{'recursive':!![]});let _0x34b16d;try{_0x34b16d=await readFile(_0x17f035[_0x4aaf7b(0x1a5)],_0x4aaf7b(0x17c));}catch(_0x35cd09){if(!isMissingFile(_0x35cd09))throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x4aaf7b(0x179)+_0x17f035[_0x4aaf7b(0x1a5)]);}if(_0x34b16d===_0x2b2a2d)return{'action':'unchanged','filePath':_0x17f035[_0x4aaf7b(0x1a5)]};if(_0x34b16d!==undefined&&!_0x1ec3cd[_0x4aaf7b(0x181)])throw instantApiPolicyError('instant_api_policy_file_exists','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x17f035[_0x4aaf7b(0x1a5)],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x34b16d===undefined)try{return await writeFile(_0x17f035[_0x4aaf7b(0x1a5)],_0x2b2a2d,{'encoding':_0x4aaf7b(0x17c),'flag':'wx'}),{'action':_0x4aaf7b(0x17e),'filePath':_0x17f035[_0x4aaf7b(0x1a5)]};}catch(_0x362ddf){if(!isAlreadyExists(_0x362ddf))throw instantApiPolicyError(_0x4aaf7b(0x18d),_0x4aaf7b(0x17d)+_0x17f035[_0x4aaf7b(0x1a5)]);if(!_0x1ec3cd['force'])throw instantApiPolicyError(_0x4aaf7b(0x1a8),_0x4aaf7b(0x1a0)+_0x17f035[_0x4aaf7b(0x1a5)],'Review\x20the\x20file\x20before\x20retrying.');}const _0xb0bfa7=resolve(dirname(_0x17f035[_0x4aaf7b(0x1a5)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x4aaf7b(0x191));try{await writeFile(_0xb0bfa7,_0x2b2a2d,{'encoding':_0x4aaf7b(0x17c),'flag':'wx'}),await rename(_0xb0bfa7,_0x17f035['policyFilePath']);}catch{await unlink(_0xb0bfa7)[_0x4aaf7b(0x187)](()=>undefined);throw instantApiPolicyError(_0x4aaf7b(0x18d),_0x4aaf7b(0x197)+_0x17f035['policyFilePath']);}return{'action':_0x4aaf7b(0x19b),'filePath':_0x17f035[_0x4aaf7b(0x1a5)]};}function assertSafeAppCode(_0x1e6552){const _0x58e801=_0x1e6552['trim']();if(!_0x58e801||_0x58e801!==_0x1e6552||_0x58e801['length']>0x64||_0x58e801==='.'||_0x58e801==='..'||_0x58e801['includes']('/')||_0x58e801['includes']('\x5c')||_0x58e801['includes']('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function a288_0x1268(){const _0x224ea1=['62nGtOfS','rules','catch','instant_api_policy_defaults_invalid','instant_api_policy_json_invalid','appCode','version','336807vpcxrN','instant_api_policy_file_unwritable','EEXIST','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_version_invalid','.tmp','263990eYDZfr','ENOENT','instant_api_policy_file_missing','7QFbMJF','instantApi','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','isArray','decode','parse','overwritten','instant_api_policy_file_unreadable','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','isFile','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','stringify','.rabetbase/instant-api-policy','size','code','policyFilePath','7984554jgOeRe','instant_api_policy_file_too_large','instant_api_policy_file_exists','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','object','instant_api_policy_rules_invalid','allow','12972123VxwZBp','5127776zINWKm','68Licqzn','7926JGWtXT','9709800hWDRcS','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','utf8','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','created','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_file_invalid','force','policy.json','defaults','byteLength'];a288_0x1268=function(){return _0x224ea1;};return a288_0x1268();}function assertLocalPolicyContract(_0x4de99f,_0x4f81af){const _0x456091=a288_0x543aa7;if(!isObject(_0x4de99f))throw instantApiPolicyError(_0x456091(0x189),_0x456091(0x178));if(_0x4de99f[_0x456091(0x18b)]!=='1'&&_0x4de99f[_0x456091(0x18b)]!=='2')throw instantApiPolicyError(_0x456091(0x190),_0x456091(0x1a9),_0x456091(0x18f));if(_0x4de99f[_0x456091(0x18a)]!==_0x4f81af)throw instantApiPolicyError('instant_api_policy_app_code_mismatch',_0x456091(0x19e)+_0x4f81af+'.');if(!isObject(_0x4de99f[_0x456091(0x183)])||typeof _0x4de99f[_0x456091(0x183)][_0x456091(0x196)]!=='string')throw instantApiPolicyError(_0x456091(0x188),'Policy\x20defaults.instantApi\x20is\x20required.');if(_0x4de99f[_0x456091(0x186)]!==undefined&&_0x4de99f[_0x456091(0x186)]!==null&&!Array['isArray'](_0x4de99f[_0x456091(0x186)]))throw instantApiPolicyError(_0x456091(0x171),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x4de99f;}function isObject(_0x15ef10){const _0x3acf26=a288_0x543aa7;return _0x15ef10!==null&&typeof _0x15ef10===_0x3acf26(0x1aa)&&!Array[_0x3acf26(0x198)](_0x15ef10);}function isMissingFile(_0x15771e){const _0x4d444c=a288_0x543aa7;return Boolean(_0x15771e&&typeof _0x15771e==='object'&&_0x15771e[_0x4d444c(0x1a4)]===_0x4d444c(0x193));}function isAlreadyExists(_0x364b01){const _0x3bb5c6=a288_0x543aa7;return Boolean(_0x364b01&&typeof _0x364b01===_0x3bb5c6(0x1aa)&&_0x364b01[_0x3bb5c6(0x1a4)]===_0x3bb5c6(0x18e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a289_0x5679c2=a289_0x8775;(function(_0x5de85a,_0x23b53d){const _0x11d846=a289_0x8775,_0x14bc6c=_0x5de85a();while(!![]){try{const _0x561eda=-parseInt(_0x11d846(0x201))/0x1+-parseInt(_0x11d846(0x1dd))/0x2+parseInt(_0x11d846(0x1f8))/0x3*(parseInt(_0x11d846(0x1e2))/0x4)+parseInt(_0x11d846(0x1d3))/0x5*(-parseInt(_0x11d846(0x206))/0x6)+-parseInt(_0x11d846(0x1fc))/0x7+-parseInt(_0x11d846(0x1ec))/0x8+parseInt(_0x11d846(0x1f0))/0x9*(parseInt(_0x11d846(0x215))/0xa);if(_0x561eda===_0x23b53d)break;else _0x14bc6c['push'](_0x14bc6c['shift']());}catch(_0x16ab46){_0x14bc6c['push'](_0x14bc6c['shift']());}}}(a289_0x5886,0xc5569));function a289_0x5886(){const _0x26c4f5=['total','hostname','status','headers','stringify','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','no-store','any','5210110eTAdGU','isSafeInteger','name','cookie','split','tags','strategyFingerprint','content-type','trim','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','public','documentId','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','TimeoutError','https:','hash','number','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','timeout','test','aborted','error','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','revision','timingsMs','application/json','61600MNgvWb','some','length','title','development','signal','chunkId','query','pathname','finalScore','410540wJMjPQ','rank','string','response','entries','888564umWoys','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','validation','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','/knowledge/search','\x20contract.','Knowledge\x20search\x20appCode\x20is\x20required.','AbortError','profile','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','12006952MXFbaz','protocol','hits','map','81WrZwaf','authRequired','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','networkError','Knowledge\x20search\x20query\x20is\x20required.','company','topK','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','6aeXSpo','toLowerCase','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','isArray','3927161iAeeiD','Knowledge\x20search\x20cancelled.','sort','rawScore','hits[','1257122BcARJH','object','username','/v2/development/apps/','search','390dqeWax','POST','isFinite','schemaVersion','scope','text','apiError'];a289_0x5886=function(){return _0x26c4f5;};return a289_0x5886();}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x5679c2(0x209),a289_0x5679c2(0x1ea),'total',a289_0x5679c2(0x1ee),a289_0x5679c2(0x21b),a289_0x5679c2(0x1d1)],HIT_KEYS=[a289_0x5679c2(0x220),a289_0x5679c2(0x1d0),a289_0x5679c2(0x1d9),a289_0x5679c2(0x20a),a289_0x5679c2(0x1d6),a289_0x5679c2(0x20b),'tags',a289_0x5679c2(0x1de),a289_0x5679c2(0x1ff),'finalScore','scoreKind'];export function normalizeKbServiceOrigin(_0x45e0b5){const _0x4822f4=a289_0x5679c2,_0x4557bd=()=>CliErrors['validation'](_0x4822f4(0x1e5)),_0x127022=_0x45e0b5?.[_0x4822f4(0x21d)]();if(!_0x127022||/[\u0000-\u0020\u007f]/[_0x4822f4(0x1cc)](_0x127022)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x4822f4(0x1cc)](_0x127022))throw _0x4557bd();let _0x3cfcd2;try{_0x3cfcd2=new URL(_0x127022);}catch{throw _0x4557bd();}if(_0x3cfcd2[_0x4822f4(0x1ed)]!==_0x4822f4(0x223)||!_0x3cfcd2[_0x4822f4(0x20e)]||_0x3cfcd2[_0x4822f4(0x203)]||_0x3cfcd2['password']||_0x3cfcd2[_0x4822f4(0x1db)]!=='/'||_0x3cfcd2[_0x4822f4(0x205)]||_0x3cfcd2[_0x4822f4(0x1c8)])throw _0x4557bd();return _0x3cfcd2['origin'];}export async function searchDirectKnowledge(_0x285e86){const _0x263424=a289_0x5679c2,_0x302937=_0x285e86['appCode'][_0x263424(0x21d)](),_0x5bf676=_0x285e86[_0x263424(0x1da)][_0x263424(0x21d)]();if(!_0x302937)throw CliErrors[_0x263424(0x1e4)](_0x263424(0x1e8));if(!_0x285e86[_0x263424(0x218)][_0x263424(0x21d)]())throw CliErrors[_0x263424(0x1f1)]();if(!_0x5bf676)throw CliErrors[_0x263424(0x1e4)](_0x263424(0x1f4));validateTopK(_0x285e86[_0x263424(0x1f6)]);const _0x4cecaf=normalizeKbServiceOrigin(_0x285e86['serviceUrl']),_0x44108c=AbortSignal[_0x263424(0x1cb)](0xea60),_0x778368=_0x285e86[_0x263424(0x1d8)]?AbortSignal[_0x263424(0x214)]([_0x285e86[_0x263424(0x1d8)],_0x44108c]):_0x44108c;let _0x3d9150;try{_0x3d9150=await fetch(_0x4cecaf+_0x263424(0x204)+encodeURIComponent(_0x302937)+_0x263424(0x1e6),{'method':_0x263424(0x207),'redirect':_0x263424(0x1ce),'headers':{'Content-Type':'application/json','Cookie':_0x285e86[_0x263424(0x218)],'X-Invoke-Source':'cli:rabetbase'},'body':JSON[_0x263424(0x211)]({'query':_0x5bf676,..._0x285e86['topK']!==undefined?{'topK':_0x285e86[_0x263424(0x1f6)]}:{}}),'signal':_0x778368});}catch(_0x1e6188){if(_0x285e86['signal']?.[_0x263424(0x1cd)])throw new DOMException(_0x263424(0x1fd),_0x263424(0x1e9));if(_0x1e6188 instanceof Error&&_0x1e6188[_0x263424(0x217)]==='TimeoutError')throw CliErrors[_0x263424(0x1f3)](_0x263424(0x212));throw CliErrors[_0x263424(0x1f3)](_0x263424(0x1eb));}if(_0x3d9150[_0x263424(0x20f)]===0x191)throw CliErrors[_0x263424(0x1f1)]();if(_0x3d9150[_0x263424(0x20f)]===0x1ad)throw CliErrors[_0x263424(0x20c)](_0x263424(0x1f2));if(!_0x3d9150['ok'])throw CliErrors[_0x263424(0x20c)](_0x263424(0x1cf)+_0x3d9150['status']+').');if(!hasNoStore(_0x3d9150[_0x263424(0x210)]))throw CliErrors[_0x263424(0x20c)](_0x263424(0x1ca));if(!(_0x3d9150[_0x263424(0x210)]['get'](_0x263424(0x21c))??'')[_0x263424(0x1f9)]()['includes'](_0x263424(0x1d2)))throw CliErrors[_0x263424(0x20c)](_0x263424(0x1fa));let _0x15b30a;try{_0x15b30a=await _0x3d9150['json']();}catch(_0x4d42bd){if(_0x285e86[_0x263424(0x1d8)]?.[_0x263424(0x1cd)])throw new DOMException(_0x263424(0x1fd),_0x263424(0x1e9));if(_0x44108c[_0x263424(0x1cd)]||_0x4d42bd instanceof Error&&_0x4d42bd[_0x263424(0x217)]===_0x263424(0x222))throw CliErrors[_0x263424(0x1f3)](_0x263424(0x212));throw CliErrors[_0x263424(0x20c)](_0x263424(0x21e));}try{const _0x467b04=requireExactRecord(_0x15b30a,[_0x263424(0x1ee),'strategyFingerprint',_0x263424(0x1d1)],_0x263424(0x1e0));if(!Array[_0x263424(0x1fb)](_0x467b04[_0x263424(0x1ee)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x263424(0x1d7),'total':_0x467b04['hits']['length'],'hits':_0x467b04[_0x263424(0x1ee)],'strategyFingerprint':_0x467b04[_0x263424(0x21b)],'timingsMs':_0x467b04['timingsMs']},_0x285e86[_0x263424(0x1f6)]??0xa);}catch(_0x3860d3){if(_0x3860d3 instanceof CliError)throw CliErrors[_0x263424(0x20c)](_0x263424(0x221));throw _0x3860d3;}}function validateTopK(_0x4e9171){const _0x2f7e2c=a289_0x5679c2;if(_0x4e9171!==undefined&&(!Number[_0x2f7e2c(0x216)](_0x4e9171)||_0x4e9171<0x1||_0x4e9171>0x32))throw CliErrors['validation'](_0x2f7e2c(0x1f7));}function hasNoStore(_0x416300){const _0x1698cb=a289_0x5679c2;return(_0x416300['get']('cache-control')??'')[_0x1698cb(0x219)](',')[_0x1698cb(0x1d4)](_0x133488=>_0x133488['trim']()[_0x1698cb(0x1f9)]()===_0x1698cb(0x213));}function parseDevelopmentSearchResponse(_0x2776d0,_0x525756){const _0x428843=a289_0x5679c2,_0x1f5a4e=requireExactRecord(_0x2776d0,RESPONSE_KEYS,'response');if(_0x1f5a4e[_0x428843(0x209)]!==0x2||_0x1f5a4e[_0x428843(0x1ea)]!=='development')throw invalidContract('profile');if(!Array['isArray'](_0x1f5a4e[_0x428843(0x1ee)])||_0x1f5a4e[_0x428843(0x1ee)][_0x428843(0x1d5)]>(_0x525756??0x32))throw invalidContract(_0x428843(0x1ee));if(typeof _0x1f5a4e[_0x428843(0x21b)]!==_0x428843(0x1df)||!/^sha256:[0-9a-f]{64}$/[_0x428843(0x1cc)](_0x1f5a4e[_0x428843(0x21b)]))throw invalidContract(_0x428843(0x21b));const _0x22db48=requireRecord(_0x1f5a4e[_0x428843(0x1d1)],_0x428843(0x1d1)),_0x4595d4={};for(const [_0x2c30cf,_0x3910dd]of Object[_0x428843(0x1e1)](_0x22db48)){if(!/^[A-Za-z][A-Za-z0-9]*$/['test'](_0x2c30cf)||typeof _0x3910dd!=='number'||!Number[_0x428843(0x208)](_0x3910dd)||_0x3910dd<0x0)throw invalidContract(_0x428843(0x1d1));_0x4595d4[_0x2c30cf]=_0x3910dd;}const _0x2c910b=_0x1f5a4e[_0x428843(0x1ee)][_0x428843(0x1ef)]((_0x5dd356,_0x488913)=>parseHit(_0x5dd356,_0x488913));if(!Number[_0x428843(0x216)](_0x1f5a4e['total'])||_0x1f5a4e[_0x428843(0x20d)]!==_0x2c910b[_0x428843(0x1d5)])throw invalidContract('total');return{'schemaVersion':_0x1f5a4e[_0x428843(0x209)],'profile':_0x1f5a4e[_0x428843(0x1ea)],'total':_0x1f5a4e[_0x428843(0x20d)],'strategyFingerprint':_0x1f5a4e[_0x428843(0x21b)],'timingsMs':_0x4595d4,'hits':_0x2c910b};}function a289_0x8775(_0x5b02d0,_0x8e59cf){_0x5b02d0=_0x5b02d0-0x1c8;const _0x58863a=a289_0x5886();let _0x877585=_0x58863a[_0x5b02d0];return _0x877585;}function parseHit(_0xc09d15,_0x475508){const _0x3debd5=a289_0x5679c2,_0x2bef6d=requireExactRecord(_0xc09d15,HIT_KEYS,_0x3debd5(0x200)+_0x475508+']'),_0x2b8aca=_0xbb9251=>{const _0x21408b=_0x3debd5,_0x6ee997=_0x2bef6d[_0xbb9251];if(typeof _0x6ee997!==_0x21408b(0x1df)||!_0x6ee997)throw invalidContract(_0xbb9251);return _0x6ee997;};if(!Number[_0x3debd5(0x216)](_0x2bef6d[_0x3debd5(0x1d0)])||_0x2bef6d[_0x3debd5(0x1d0)]<0x1)throw invalidContract(_0x3debd5(0x1d0));if(_0x2bef6d[_0x3debd5(0x20a)]!==_0x3debd5(0x21f)&&_0x2bef6d[_0x3debd5(0x20a)]!==_0x3debd5(0x1f5))throw invalidContract(_0x3debd5(0x20a));if(typeof _0x2bef6d[_0x3debd5(0x1d6)]!=='string'||typeof _0x2bef6d[_0x3debd5(0x20b)]!==_0x3debd5(0x1df))throw invalidContract(_0x3debd5(0x20b));if(!Array[_0x3debd5(0x1fb)](_0x2bef6d[_0x3debd5(0x21a)])||_0x2bef6d[_0x3debd5(0x21a)]['some'](_0x39e6ca=>typeof _0x39e6ca!==_0x3debd5(0x1df)))throw invalidContract(_0x3debd5(0x21a));if(!Number[_0x3debd5(0x216)](_0x2bef6d[_0x3debd5(0x1de)])||_0x2bef6d[_0x3debd5(0x1de)]!==_0x475508+0x1)throw invalidContract(_0x3debd5(0x1de));if(!isFiniteNumber(_0x2bef6d[_0x3debd5(0x1ff)])||!isFiniteNumber(_0x2bef6d[_0x3debd5(0x1dc)]))throw invalidContract('score');return{'documentId':_0x2b8aca(_0x3debd5(0x220)),'revision':_0x2bef6d[_0x3debd5(0x1d0)],'chunkId':_0x2b8aca(_0x3debd5(0x1d9)),'scope':_0x2bef6d[_0x3debd5(0x20a)],'title':_0x2bef6d[_0x3debd5(0x1d6)],'text':_0x2bef6d[_0x3debd5(0x20b)],'tags':[..._0x2bef6d[_0x3debd5(0x21a)]],'rank':_0x2bef6d[_0x3debd5(0x1de)],'rawScore':_0x2bef6d['rawScore'],'finalScore':_0x2bef6d[_0x3debd5(0x1dc)],'scoreKind':_0x2b8aca('scoreKind')};}function requireExactRecord(_0x32f23f,_0x4cb63a,_0x475395){const _0x2a9474=a289_0x5679c2,_0x5a8479=requireRecord(_0x32f23f,_0x475395),_0x300f0a=Object['keys'](_0x5a8479)[_0x2a9474(0x1fe)](),_0x49296a=[..._0x4cb63a][_0x2a9474(0x1fe)]();if(_0x300f0a[_0x2a9474(0x1d5)]!==_0x49296a[_0x2a9474(0x1d5)]||_0x300f0a[_0x2a9474(0x1d4)]((_0x3c1bc4,_0x430c82)=>_0x3c1bc4!==_0x49296a[_0x430c82]))throw invalidContract(_0x475395);return _0x5a8479;}function requireRecord(_0x5c8d9c,_0x3a1698){const _0x7dd147=a289_0x5679c2;if(!_0x5c8d9c||typeof _0x5c8d9c!==_0x7dd147(0x202)||Array[_0x7dd147(0x1fb)](_0x5c8d9c))throw invalidContract(_0x3a1698);return _0x5c8d9c;}function isFiniteNumber(_0x518c3f){const _0x4f8fe9=a289_0x5679c2;return typeof _0x518c3f===_0x4f8fe9(0x1c9)&&Number[_0x4f8fe9(0x208)](_0x518c3f);}function invalidContract(_0x50296b){const _0x4c8d99=a289_0x5679c2;return CliErrors['apiError'](_0x4c8d99(0x1e3)+_0x50296b+_0x4c8d99(0x1e7));}
|
|
1
|
+
function a289_0xbf06(_0x1cfe20,_0x28316f){_0x1cfe20=_0x1cfe20-0x160;const _0x559a38=a289_0x559a();let _0xbf0608=_0x559a38[_0x1cfe20];return _0xbf0608;}const a289_0x2288cb=a289_0xbf06;function a289_0x559a(){const _0x5d67c6=['total','toLowerCase','status','name','pathname','networkError','apiError','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','get','keys','rank','headers','stringify','cli:rabetbase','finalScore','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','some','any','105hllaPR','split','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','/knowledge/search','documentId','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','Knowledge\x20search\x20appCode\x20is\x20required.','error','aborted','sort','hits','authRequired','4985376Tryxsu','no-store','entries','password','signal','number','4pGeVDT','scope','2240mMwMbw','isArray','topK','text','includes','isSafeInteger','TimeoutError','cache-control','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','profile','5212592pllShw','string','Knowledge\x20search\x20cancelled.','AbortError','timingsMs','public','map','timeout','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','strategyFingerprint','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','username','score','https:','json','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','16578pbrFpt','POST','scoreKind','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','hostname','response','serviceUrl','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','appCode','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','tags','trim','hits[','2899400GHmdZE','365983pgkUzD','chunkId','hash','cookie','length','revision','protocol','287244toGvmN','title','validation','isFinite','418047hHdZEA','development','schemaVersion','origin','test'];a289_0x559a=function(){return _0x5d67c6;};return a289_0x559a();}(function(_0x294fde,_0x253fb2){const _0x250f72=a289_0xbf06,_0x5072d8=_0x294fde();while(!![]){try{const _0x2b2801=parseInt(_0x250f72(0x168))/0x1*(-parseInt(_0x250f72(0x19c))/0x2)+parseInt(_0x250f72(0x173))/0x3+-parseInt(_0x250f72(0x16f))/0x4*(-parseInt(_0x250f72(0x18a))/0x5)+-parseInt(_0x250f72(0x196))/0x6+parseInt(_0x250f72(0x1a8))/0x7+parseInt(_0x250f72(0x167))/0x8+parseInt(_0x250f72(0x1b8))/0x9*(-parseInt(_0x250f72(0x19e))/0xa);if(_0x2b2801===_0x253fb2)break;else _0x5072d8['push'](_0x5072d8['shift']());}catch(_0x29858f){_0x5072d8['push'](_0x5072d8['shift']());}}}(a289_0x559a,0xbe2ef));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=['schemaVersion',a289_0x2288cb(0x1a7),a289_0x2288cb(0x178),a289_0x2288cb(0x194),'strategyFingerprint',a289_0x2288cb(0x1ac)],HIT_KEYS=['documentId','revision',a289_0x2288cb(0x169),a289_0x2288cb(0x19d),a289_0x2288cb(0x170),'text',a289_0x2288cb(0x164),'rank','rawScore',a289_0x2288cb(0x186),a289_0x2288cb(0x1ba)];export function normalizeKbServiceOrigin(_0x41e7e3){const _0x30697c=a289_0x2288cb,_0x303782=()=>CliErrors['validation'](_0x30697c(0x18f)),_0x2df655=_0x41e7e3?.[_0x30697c(0x165)]();if(!_0x2df655||/[\u0000-\u0020\u007f]/['test'](_0x2df655)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x30697c(0x177)](_0x2df655))throw _0x303782();let _0x2de09a;try{_0x2de09a=new URL(_0x2df655);}catch{throw _0x303782();}if(_0x2de09a[_0x30697c(0x16e)]!==_0x30697c(0x1b5)||!_0x2de09a[_0x30697c(0x1bc)]||_0x2de09a[_0x30697c(0x1b3)]||_0x2de09a[_0x30697c(0x199)]||_0x2de09a[_0x30697c(0x17c)]!=='/'||_0x2de09a['search']||_0x2de09a[_0x30697c(0x16a)])throw _0x303782();return _0x2de09a[_0x30697c(0x176)];}export async function searchDirectKnowledge(_0x5c7357){const _0x4a9d70=a289_0x2288cb,_0x461006=_0x5c7357[_0x4a9d70(0x162)][_0x4a9d70(0x165)](),_0x4da22a=_0x5c7357['query'][_0x4a9d70(0x165)]();if(!_0x461006)throw CliErrors['validation'](_0x4a9d70(0x190));if(!_0x5c7357[_0x4a9d70(0x16b)][_0x4a9d70(0x165)]())throw CliErrors[_0x4a9d70(0x195)]();if(!_0x4da22a)throw CliErrors[_0x4a9d70(0x171)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x5c7357[_0x4a9d70(0x1a0)]);const _0x59e2b6=normalizeKbServiceOrigin(_0x5c7357[_0x4a9d70(0x160)]),_0xa8a941=AbortSignal[_0x4a9d70(0x1af)](0xea60),_0x5070af=_0x5c7357['signal']?AbortSignal[_0x4a9d70(0x189)]([_0x5c7357[_0x4a9d70(0x19a)],_0xa8a941]):_0xa8a941;let _0x5b4581;try{_0x5b4581=await fetch(_0x59e2b6+'/v2/development/apps/'+encodeURIComponent(_0x461006)+_0x4a9d70(0x18d),{'method':_0x4a9d70(0x1b9),'redirect':_0x4a9d70(0x191),'headers':{'Content-Type':'application/json','Cookie':_0x5c7357['cookie'],'X-Invoke-Source':_0x4a9d70(0x185)},'body':JSON[_0x4a9d70(0x184)]({'query':_0x4da22a,..._0x5c7357[_0x4a9d70(0x1a0)]!==undefined?{'topK':_0x5c7357[_0x4a9d70(0x1a0)]}:{}}),'signal':_0x5070af});}catch(_0x4e93fb){if(_0x5c7357['signal']?.[_0x4a9d70(0x192)])throw new DOMException(_0x4a9d70(0x1aa),_0x4a9d70(0x1ab));if(_0x4e93fb instanceof Error&&_0x4e93fb['name']===_0x4a9d70(0x1a4))throw CliErrors['networkError']('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x4a9d70(0x17d)](_0x4a9d70(0x1a6));}if(_0x5b4581[_0x4a9d70(0x17a)]===0x191)throw CliErrors['authRequired']();if(_0x5b4581[_0x4a9d70(0x17a)]===0x1ad)throw CliErrors[_0x4a9d70(0x17e)](_0x4a9d70(0x163));if(!_0x5b4581['ok'])throw CliErrors[_0x4a9d70(0x17e)](_0x4a9d70(0x18c)+_0x5b4581[_0x4a9d70(0x17a)]+').');if(!hasNoStore(_0x5b4581[_0x4a9d70(0x183)]))throw CliErrors[_0x4a9d70(0x17e)](_0x4a9d70(0x17f));if(!(_0x5b4581[_0x4a9d70(0x183)][_0x4a9d70(0x180)]('content-type')??'')[_0x4a9d70(0x179)]()[_0x4a9d70(0x1a2)]('application/json'))throw CliErrors[_0x4a9d70(0x17e)](_0x4a9d70(0x1b0));let _0x5834bd;try{_0x5834bd=await _0x5b4581[_0x4a9d70(0x1b6)]();}catch(_0x49f820){if(_0x5c7357[_0x4a9d70(0x19a)]?.['aborted'])throw new DOMException(_0x4a9d70(0x1aa),_0x4a9d70(0x1ab));if(_0xa8a941[_0x4a9d70(0x192)]||_0x49f820 instanceof Error&&_0x49f820[_0x4a9d70(0x17b)]===_0x4a9d70(0x1a4))throw CliErrors['networkError'](_0x4a9d70(0x1b2));throw CliErrors['apiError'](_0x4a9d70(0x187));}try{const _0x58c928=requireExactRecord(_0x5834bd,[_0x4a9d70(0x194),_0x4a9d70(0x1b1),_0x4a9d70(0x1ac)],_0x4a9d70(0x1bd));if(!Array['isArray'](_0x58c928[_0x4a9d70(0x194)]))throw invalidContract(_0x4a9d70(0x194));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x4a9d70(0x174),'total':_0x58c928[_0x4a9d70(0x194)][_0x4a9d70(0x16c)],'hits':_0x58c928['hits'],'strategyFingerprint':_0x58c928[_0x4a9d70(0x1b1)],'timingsMs':_0x58c928[_0x4a9d70(0x1ac)]},_0x5c7357[_0x4a9d70(0x1a0)]??0xa);}catch(_0x1200c5){if(_0x1200c5 instanceof CliError)throw CliErrors[_0x4a9d70(0x17e)](_0x4a9d70(0x161));throw _0x1200c5;}}function validateTopK(_0x18b362){const _0x8918d5=a289_0x2288cb;if(_0x18b362!==undefined&&(!Number[_0x8918d5(0x1a3)](_0x18b362)||_0x18b362<0x1||_0x18b362>0x32))throw CliErrors['validation'](_0x8918d5(0x1bb));}function hasNoStore(_0x1900ed){const _0x1083dd=a289_0x2288cb;return(_0x1900ed[_0x1083dd(0x180)](_0x1083dd(0x1a5))??'')[_0x1083dd(0x18b)](',')[_0x1083dd(0x188)](_0x29e081=>_0x29e081[_0x1083dd(0x165)]()['toLowerCase']()===_0x1083dd(0x197));}function parseDevelopmentSearchResponse(_0x7e8618,_0xbde6e4){const _0x1ec029=a289_0x2288cb,_0x26a8bd=requireExactRecord(_0x7e8618,RESPONSE_KEYS,_0x1ec029(0x1bd));if(_0x26a8bd[_0x1ec029(0x175)]!==0x2||_0x26a8bd[_0x1ec029(0x1a7)]!==_0x1ec029(0x174))throw invalidContract(_0x1ec029(0x1a7));if(!Array[_0x1ec029(0x19f)](_0x26a8bd[_0x1ec029(0x194)])||_0x26a8bd['hits'][_0x1ec029(0x16c)]>(_0xbde6e4??0x32))throw invalidContract(_0x1ec029(0x194));if(typeof _0x26a8bd[_0x1ec029(0x1b1)]!=='string'||!/^sha256:[0-9a-f]{64}$/['test'](_0x26a8bd['strategyFingerprint']))throw invalidContract(_0x1ec029(0x1b1));const _0x59f3b9=requireRecord(_0x26a8bd[_0x1ec029(0x1ac)],'timingsMs'),_0x553045={};for(const [_0x83d38d,_0x527555]of Object[_0x1ec029(0x198)](_0x59f3b9)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x1ec029(0x177)](_0x83d38d)||typeof _0x527555!==_0x1ec029(0x19b)||!Number[_0x1ec029(0x172)](_0x527555)||_0x527555<0x0)throw invalidContract(_0x1ec029(0x1ac));_0x553045[_0x83d38d]=_0x527555;}const _0x383492=_0x26a8bd[_0x1ec029(0x194)][_0x1ec029(0x1ae)]((_0x1a5bfe,_0x4ebd6c)=>parseHit(_0x1a5bfe,_0x4ebd6c));if(!Number['isSafeInteger'](_0x26a8bd['total'])||_0x26a8bd[_0x1ec029(0x178)]!==_0x383492[_0x1ec029(0x16c)])throw invalidContract('total');return{'schemaVersion':_0x26a8bd[_0x1ec029(0x175)],'profile':_0x26a8bd[_0x1ec029(0x1a7)],'total':_0x26a8bd[_0x1ec029(0x178)],'strategyFingerprint':_0x26a8bd[_0x1ec029(0x1b1)],'timingsMs':_0x553045,'hits':_0x383492};}function parseHit(_0x5b1bc1,_0xd6028d){const _0x4b66c9=a289_0x2288cb,_0x41b871=requireExactRecord(_0x5b1bc1,HIT_KEYS,_0x4b66c9(0x166)+_0xd6028d+']'),_0x3543fb=_0x45d025=>{const _0x16736a=_0x4b66c9,_0x308976=_0x41b871[_0x45d025];if(typeof _0x308976!==_0x16736a(0x1a9)||!_0x308976)throw invalidContract(_0x45d025);return _0x308976;};if(!Number[_0x4b66c9(0x1a3)](_0x41b871[_0x4b66c9(0x16d)])||_0x41b871[_0x4b66c9(0x16d)]<0x1)throw invalidContract('revision');if(_0x41b871[_0x4b66c9(0x19d)]!==_0x4b66c9(0x1ad)&&_0x41b871[_0x4b66c9(0x19d)]!=='company')throw invalidContract('scope');if(typeof _0x41b871[_0x4b66c9(0x170)]!==_0x4b66c9(0x1a9)||typeof _0x41b871[_0x4b66c9(0x1a1)]!==_0x4b66c9(0x1a9))throw invalidContract(_0x4b66c9(0x1a1));if(!Array['isArray'](_0x41b871['tags'])||_0x41b871[_0x4b66c9(0x164)][_0x4b66c9(0x188)](_0x230742=>typeof _0x230742!==_0x4b66c9(0x1a9)))throw invalidContract(_0x4b66c9(0x164));if(!Number['isSafeInteger'](_0x41b871['rank'])||_0x41b871[_0x4b66c9(0x182)]!==_0xd6028d+0x1)throw invalidContract(_0x4b66c9(0x182));if(!isFiniteNumber(_0x41b871['rawScore'])||!isFiniteNumber(_0x41b871['finalScore']))throw invalidContract(_0x4b66c9(0x1b4));return{'documentId':_0x3543fb(_0x4b66c9(0x18e)),'revision':_0x41b871[_0x4b66c9(0x16d)],'chunkId':_0x3543fb(_0x4b66c9(0x169)),'scope':_0x41b871[_0x4b66c9(0x19d)],'title':_0x41b871[_0x4b66c9(0x170)],'text':_0x41b871[_0x4b66c9(0x1a1)],'tags':[..._0x41b871['tags']],'rank':_0x41b871[_0x4b66c9(0x182)],'rawScore':_0x41b871['rawScore'],'finalScore':_0x41b871[_0x4b66c9(0x186)],'scoreKind':_0x3543fb(_0x4b66c9(0x1ba))};}function requireExactRecord(_0x5f4856,_0x1dccb9,_0xbb005){const _0x2dfd2d=a289_0x2288cb,_0xc1699b=requireRecord(_0x5f4856,_0xbb005),_0x436229=Object[_0x2dfd2d(0x181)](_0xc1699b)[_0x2dfd2d(0x193)](),_0x1cde76=[..._0x1dccb9][_0x2dfd2d(0x193)]();if(_0x436229['length']!==_0x1cde76[_0x2dfd2d(0x16c)]||_0x436229['some']((_0x1f96a0,_0xee474f)=>_0x1f96a0!==_0x1cde76[_0xee474f]))throw invalidContract(_0xbb005);return _0xc1699b;}function requireRecord(_0xcdbda8,_0x5ceaae){const _0xdaa76b=a289_0x2288cb;if(!_0xcdbda8||typeof _0xcdbda8!=='object'||Array[_0xdaa76b(0x19f)](_0xcdbda8))throw invalidContract(_0x5ceaae);return _0xcdbda8;}function isFiniteNumber(_0x36ec3d){const _0x56b0cb=a289_0x2288cb;return typeof _0x36ec3d===_0x56b0cb(0x19b)&&Number[_0x56b0cb(0x172)](_0x36ec3d);}function invalidContract(_0x5ee77e){const _0x5c0945=a289_0x2288cb;return CliErrors[_0x5c0945(0x17e)](_0x5c0945(0x1b7)+_0x5ee77e+'\x20contract.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a290_0x597056=a290_0x88cc;function a290_0x2cc4(){const _0xf10d04=['toUpperCase','2065512LAiXnp','7209990eLHwLi','appPagesDir','.json','validation','Unsupported\x20file\x20in\x20page\x20directory:\x20','Page\x20directory\x20not\x20found:\x20','412334XWQUJd','4osmgpo','isDirectory','localeCompare','24498180GxhZZJ','cwd','utf8','1531461DmnNyz','split','F_OK','.rabetbase','flagMissing','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','459925Qjdijt','1144801DEHXwz','name','4Jhkipu','isFile','page','36ruJvZb'];a290_0x2cc4=function(){return _0xf10d04;};return a290_0x2cc4();}(function(_0x5e668e,_0x63bc54){const _0x5063bd=a290_0x88cc,_0x19b17c=_0x5e668e();while(!![]){try{const _0x28029d=-parseInt(_0x5063bd(0x1fa))/0x1*(parseInt(_0x5063bd(0x1f9))/0x2)+-parseInt(_0x5063bd(0x1e4))/0x3*(-parseInt(_0x5063bd(0x1ed))/0x4)+-parseInt(_0x5063bd(0x1ea))/0x5+parseInt(_0x5063bd(0x1f0))/0x6*(-parseInt(_0x5063bd(0x1eb))/0x7)+parseInt(_0x5063bd(0x1f2))/0x8+-parseInt(_0x5063bd(0x1f3))/0x9+parseInt(_0x5063bd(0x1e1))/0xa;if(_0x28029d===_0x63bc54)break;else _0x19b17c['push'](_0x19b17c['shift']());}catch(_0x11b83d){_0x19b17c['push'](_0x19b17c['shift']());}}}(a290_0x2cc4,0x7ed31));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x4a6c41,_0x216c78=process[a290_0x597056(0x1e2)]()){const _0x16d37f=a290_0x597056,_0x358434=resolve(_0x216c78),_0x34870d=join(_0x358434,_0x16d37f(0x1e7),_0x16d37f(0x1ef));return{'projectRoot':_0x358434,'pagesBaseDir':_0x34870d,'appPagesDir':join(_0x34870d,_0x4a6c41),'lockFilePath':join(_0x358434,'.rabetbase','page.lock.json')};}export function buildPageFileName(_0xbd3ca3,_0x58a4aa){const _0x351cce=a290_0x597056;return _0xbd3ca3+'-'+_0x58a4aa[_0x351cce(0x1f1)]()+_0x351cce(0x1f5);}export function resolvePageFilePath(_0x4a7d60,_0x58f9bf,_0x436cf4){const _0x2a927e=a290_0x597056;return join(_0x4a7d60[_0x2a927e(0x1f4)],buildPageFileName(_0x58f9bf,_0x436cf4));}function a290_0x88cc(_0x29f45c,_0x4f5c8e){_0x29f45c=_0x29f45c-0x1df;const _0x2cc4eb=a290_0x2cc4();let _0x88cc0c=_0x2cc4eb[_0x29f45c];return _0x88cc0c;}export async function ensureParentDirectory(_0x55c763){await mkdir(dirname(_0x55c763),{'recursive':!![]});}export async function fileExists(_0x4893ff){const _0x4a0001=a290_0x597056;try{return await access(_0x4893ff,constants[_0x4a0001(0x1e6)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x13766f){const _0x599c98=a290_0x597056,_0x121a43=_0x13766f['trim']();if(!_0x121a43)throw CliErrors[_0x599c98(0x1e8)]('page-dir');const _0x413447=resolve(_0x121a43);let _0x4c65f5;try{_0x4c65f5=await lstat(_0x413447);}catch{throw CliErrors['validation'](_0x599c98(0x1f8)+_0x121a43);}if(!_0x4c65f5[_0x599c98(0x1df)]())throw CliErrors[_0x599c98(0x1f6)](_0x599c98(0x1e9)+_0x121a43);const _0x4a904c={};return await readDirectory(_0x413447,_0x413447,_0x4a904c),_0x4a904c;}async function readDirectory(_0x30f442,_0x4a2ef6,_0x3829c3){const _0x270e0a=a290_0x597056,_0x2b00cf=await readdir(_0x4a2ef6,{'withFileTypes':!![]});for(const _0x43d7e8 of _0x2b00cf['sort']((_0x23aa3a,_0x24bc3f)=>_0x23aa3a[_0x270e0a(0x1ec)][_0x270e0a(0x1e0)](_0x24bc3f[_0x270e0a(0x1ec)]))){const _0x2e62b5=join(_0x4a2ef6,_0x43d7e8[_0x270e0a(0x1ec)]);if(_0x43d7e8[_0x270e0a(0x1df)]()){await readDirectory(_0x30f442,_0x2e62b5,_0x3829c3);continue;}if(!_0x43d7e8[_0x270e0a(0x1ee)]())throw CliErrors['validation'](_0x270e0a(0x1f7)+_0x2e62b5);_0x3829c3[relative(_0x30f442,_0x2e62b5)[_0x270e0a(0x1e5)](sep)['join']('/')]=await readFile(_0x2e62b5,_0x270e0a(0x1e3));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd3353d,_0x134a62){const _0x2b6d5a=a291_0x67c0,_0x368013=_0xd3353d();while(!![]){try{const _0x14493e=parseInt(_0x2b6d5a(0x132))/0x1+parseInt(_0x2b6d5a(0x136))/0x2*(-parseInt(_0x2b6d5a(0x131))/0x3)+parseInt(_0x2b6d5a(0x135))/0x4+-parseInt(_0x2b6d5a(0x139))/0x5+parseInt(_0x2b6d5a(0x137))/0x6*(parseInt(_0x2b6d5a(0x13b))/0x7)+-parseInt(_0x2b6d5a(0x133))/0x8+parseInt(_0x2b6d5a(0x130))/0x9;if(_0x14493e===_0x134a62)break;else _0x368013['push'](_0x368013['shift']());}catch(_0x207938){_0x368013['push'](_0x368013['shift']());}}}(a291_0x2a58,0xd39b7));import a291_0x4ba37c from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x53d228){const _0x59f1d9=a291_0x67c0;return JSON[_0x59f1d9(0x12e)](JSON[_0x59f1d9(0x134)](_0x53d228),null,0x2)+'\x0a';}function a291_0x67c0(_0x290d79,_0x269c9d){_0x290d79=_0x290d79-0x12d;const _0x2a58c9=a291_0x2a58();let _0x67c039=_0x2a58c9[_0x290d79];return _0x67c039;}export function computePageContentHash(_0x59f742){const _0x151e7f=a291_0x67c0;return a291_0x4ba37c[_0x151e7f(0x13a)]('md5')[_0x151e7f(0x12f)](_0x59f742)[_0x151e7f(0x138)](_0x151e7f(0x12d));}function a291_0x2a58(){const _0x42809d=['4865336bNROvE','parse','1377320YnIjxJ','699306JxzeCt','9422922OSaTay','digest','7499280wshFHF','createHash','7hbQVlr','utf8','hex','stringify','update','1450998ZmHfnz','3KKFhMW','1248380ItHtcV'];a291_0x2a58=function(){return _0x42809d;};return a291_0x2a58();}export function computeSerializedSchemaHash(_0x5814a0){return computePageContentHash(serializePageSchemaForFile(_0x5814a0));}export async function computePageFileHash(_0x7aa59a){const _0x2b2d78=a291_0x67c0,_0x41658e=await readFile(_0x7aa59a,_0x2b2d78(0x13c));return computePageContentHash(_0x41658e);}
|