@lovrabet/rabetbase-cli 2.5.13-beta.1 → 2.5.13

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.
Files changed (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a299_0xf05f06=a299_0x495f;(function(_0x5aa72e,_0x509dc3){const _0x23d3fc=a299_0x495f,_0x26749b=_0x5aa72e();while(!![]){try{const _0x5e1a60=-parseInt(_0x23d3fc(0x202))/0x1*(parseInt(_0x23d3fc(0x257))/0x2)+-parseInt(_0x23d3fc(0x277))/0x3*(parseInt(_0x23d3fc(0x231))/0x4)+-parseInt(_0x23d3fc(0x221))/0x5+-parseInt(_0x23d3fc(0x2d7))/0x6*(parseInt(_0x23d3fc(0x2cc))/0x7)+-parseInt(_0x23d3fc(0x23e))/0x8+parseInt(_0x23d3fc(0x2c7))/0x9+-parseInt(_0x23d3fc(0x2d0))/0xa*(-parseInt(_0x23d3fc(0x236))/0xb);if(_0x5e1a60===_0x509dc3)break;else _0x26749b['push'](_0x26749b['shift']());}catch(_0x317159){_0x26749b['push'](_0x26749b['shift']());}}}(a299_0x40f3,0x45b98));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0xf05f06(0x26b),'$id':a299_0xf05f06(0x225),'title':a299_0xf05f06(0x22e),'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x1dc),a299_0xf05f06(0x2b4),a299_0xf05f06(0x1ef)],'$defs':{'userId':{'anyOf':[{'type':a299_0xf05f06(0x2dd),'minLength':0x1},{'type':a299_0xf05f06(0x30c),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0xf05f06(0x220),'minimum':0x0},'y':{'type':a299_0xf05f06(0x220),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x2f9),a299_0xf05f06(0x2a5)],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':['SECONDS','MINUTES',a299_0xf05f06(0x215),a299_0xf05f06(0x24c)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0xf05f06(0x206),'required':['id','type',a299_0xf05f06(0x246),a299_0xf05f06(0x1d9)],'properties':{'id':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)},'type':{'enum':['START',a299_0xf05f06(0x2ff),a299_0xf05f06(0x282),a299_0xf05f06(0x239),a299_0xf05f06(0x20f),a299_0xf05f06(0x264)]},'name':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'path':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'position':{'$ref':a299_0xf05f06(0x2be)},'approvalMode':{'enum':[a299_0xf05f06(0x22c),a299_0xf05f06(0x223),a299_0xf05f06(0x208)]},'taskMode':{'enum':[a299_0xf05f06(0x282),a299_0xf05f06(0x1d5)]},'assignee':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x31e)],'properties':{'strategy':{'enum':['FIXED',a299_0xf05f06(0x24b)]},'userIds':{'type':a299_0xf05f06(0x308),'minItems':0x1,'items':{'$ref':a299_0xf05f06(0x2b5)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a299_0xf05f06(0x262)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x31e),a299_0xf05f06(0x256)],'properties':{'strategy':{'const':a299_0xf05f06(0x234)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0xf05f06(0x2b5)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0xf05f06(0x28c),a299_0xf05f06(0x2a8)]},'scriptName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a299_0xf05f06(0x228)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0xf05f06(0x200)}},'additionalProperties':!![]},'timeout':{'type':a299_0xf05f06(0x206),'properties':{'enabled':{'type':a299_0xf05f06(0x228)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a299_0xf05f06(0x1e6),a299_0xf05f06(0x244),'EXECUTE_BFF']},'interrupting':{'type':a299_0xf05f06(0x228)},'scriptName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'resultVariable':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)}},'additionalProperties':!![]},'cc':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x2d6)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0xf05f06(0x24f),a299_0xf05f06(0x334)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a299_0xf05f06(0x1f9),a299_0xf05f06(0x2fe)]},'template':{'type':'object','required':[a299_0xf05f06(0x1e9),'summary'],'properties':{'title':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'summary':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'detailMarkdown':{'type':a299_0xf05f06(0x2dd)},'facts':{'type':a299_0xf05f06(0x308),'maxItems':0x8,'items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x301),'value'],'properties':{'label':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'value':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x263),'url'],'properties':{'text':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'url':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x265),a299_0xf05f06(0x2f9)],'properties':{'type':{'enum':[a299_0xf05f06(0x278),'ROLE',a299_0xf05f06(0x27b)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0xf05f06(0x2bc)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0xf05f06(0x206),'properties':{'id':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)},'source':{'type':'string','minLength':0x1},'target':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'conditionType':{'enum':[a299_0xf05f06(0x2fb),a299_0xf05f06(0x28c),'REJECTED',a299_0xf05f06(0x27f)]},'expression':{'type':a299_0xf05f06(0x2dd)},'defaultFlow':{'type':a299_0xf05f06(0x228)},'name':{'type':a299_0xf05f06(0x2dd)},'waypoints':{'type':a299_0xf05f06(0x308),'items':{'$ref':a299_0xf05f06(0x2be)}}},'allOf':[{'anyOf':[{'required':[a299_0xf05f06(0x30a)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0xf05f06(0x216)]},{'required':[a299_0xf05f06(0x23c)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a299_0xf05f06(0x23d),'INDEPENDENT_FLOW']},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a299_0xf05f06(0x30c),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']},'pageIds':{'type':a299_0xf05f06(0x308),'items':{'type':a299_0xf05f06(0x30c),'minimum':0x1,'maximum':Number[a299_0xf05f06(0x1cf)]}},'templateName':![],'flowJson':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x23b),a299_0xf05f06(0x329)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0xf05f06(0x1fe),'description':a299_0xf05f06(0x1d8)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0xf05f06(0x271)},'startPageId':![],'startPath':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0xf05f06(0x280)}},'edges':{'type':a299_0xf05f06(0x308),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0xf05f06(0x1c9),a299_0xf05f06(0x2b9),a299_0xf05f06(0x1dc),a299_0xf05f06(0x303),'datasetCode','appCode',a299_0xf05f06(0x1de),a299_0xf05f06(0x307)],REMOVED_ROOT_FIELDS=['id',a299_0xf05f06(0x25d),a299_0xf05f06(0x307)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0xf05f06(0x1fe),NODE_TYPES=new Set([a299_0xf05f06(0x2f7),a299_0xf05f06(0x2ff),a299_0xf05f06(0x282),a299_0xf05f06(0x239),'SCRIPT','NOTIFICATION']),CONDITION_TYPES=new Set([a299_0xf05f06(0x2fb),'APPROVED',a299_0xf05f06(0x2a8),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0xf05f06(0x22c),a299_0xf05f06(0x223),'ANY']),APPROVAL_TASK_MODES=new Set([a299_0xf05f06(0x282),a299_0xf05f06(0x1d5)]),FLOW_TIME_UNITS=new Set([a299_0xf05f06(0x1d3),'MINUTES',a299_0xf05f06(0x215),'DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0xf05f06(0x1e6),'AUTO_REJECT',a299_0xf05f06(0x2a6)]),FLOW_TYPES=new Set([a299_0xf05f06(0x23d),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a299_0xf05f06(0x271),a299_0xf05f06(0x30b)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0xf05f06(0x1f9),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0xf05f06(0x278),'ROLE',a299_0xf05f06(0x27b)]),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='scriptResult',UNSUPPORTED_FORM_MESSAGE=a299_0xf05f06(0x2db),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a299_0xf05f06(0x2aa),a299_0xf05f06(0x26f),'approval_sys_appCode',a299_0xf05f06(0x2c3),a299_0xf05f06(0x318),a299_0xf05f06(0x29d),'approval_sys_datasetCode',a299_0xf05f06(0x2e2),a299_0xf05f06(0x227),a299_0xf05f06(0x1f7)]);export function normalizeFlowConfig(_0x1e270e){const _0x497c66=a299_0xf05f06;if(!isRecord(_0x1e270e))throw new TypeError(_0x497c66(0x2b6));const _0x434ba0=cloneJsonValue(_0x1e270e),_0x2c62b3=_0x434ba0[_0x497c66(0x1ef)],_0x4aad95=isRecord(_0x2c62b3)?cloneJsonValue(_0x2c62b3):{},_0xfbb725=[],_0x3e5920=[];for(const _0x37f5c1 of REMOVED_ROOT_FIELDS){if(!Object[_0x497c66(0x30e)]['hasOwnProperty'][_0x497c66(0x331)](_0x434ba0,_0x37f5c1))continue;delete _0x434ba0[_0x37f5c1],_0x3e5920[_0x497c66(0x2b2)](_0x37f5c1),_0xfbb725['push']({'code':'legacy_field_removed','path':_0x37f5c1,'message':_0x37f5c1+_0x497c66(0x2a0)});}for(const _0x298073 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x298073))continue;const _0x2c39db='flowJson.'+_0x298073;delete _0x4aad95[_0x298073],_0x3e5920[_0x497c66(0x2b2)](_0x2c39db),_0xfbb725[_0x497c66(0x2b2)]({'code':_0x497c66(0x336),'path':_0x2c39db,'message':_0x2c39db+_0x497c66(0x2a0)});}if(Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x497c66(0x324))){const _0x54fe48=_0x4aad95[_0x497c66(0x324)],_0x43ffea=typeof _0x54fe48==='string'?_0x54fe48[_0x497c66(0x284)]():_0x54fe48;if(isEmptyJsonValue(_0x54fe48)||_0x43ffea===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5c1036=_0x497c66(0x2cf);delete _0x4aad95[_0x497c66(0x324)],_0x3e5920[_0x497c66(0x2b2)](_0x5c1036),_0xfbb725[_0x497c66(0x2b2)]({'code':'legacy_field_removed','path':_0x5c1036,'message':_0x5c1036+_0x497c66(0x2eb)+DEFAULT_FLOW_SCHEMA_VERSION+_0x497c66(0x255)});}}removeEmptyMetadata(_0x4aad95,'flowJson',_0xfbb725,_0x3e5920);_0x434ba0[_0x497c66(0x2b4)]===_0x497c66(0x249)&&!Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x497c66(0x335))&&(_0x4aad95[_0x497c66(0x335)]=_0x497c66(0x271));_0x434ba0[_0x497c66(0x1ef)]=_0x4aad95;if(typeof _0x434ba0['flowName']==='string')_0x434ba0['flowName']=_0x434ba0[_0x497c66(0x1dc)][_0x497c66(0x284)]();return{'config':_0x434ba0,'warnings':_0xfbb725,'removedPaths':_0x3e5920};}export function validateFlowConfig(_0x1d5576){const _0x2b3a72=a299_0xf05f06;let _0x5c4e75;try{_0x5c4e75=normalizeFlowConfig(_0x1d5576);}catch(_0x2e6a7b){const _0x2d0552=_0x2e6a7b instanceof Error?_0x2e6a7b[_0x2b3a72(0x1f6)]:String(_0x2e6a7b),_0x4e5495={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x2d0552}],'warnings':[],'normalized':_0x4e5495,'validationConfig':_0x4e5495};}const _0x1ee79f=_0x5c4e75[_0x2b3a72(0x27a)],_0x91f1b7=cloneJsonValue(_0x1ee79f),_0x50273c=_0x91f1b7[_0x2b3a72(0x1ef)];_0x50273c[_0x2b3a72(0x1c9)]=_0x2b3a72(0x338),_0x50273c['flowName']=_0x1ee79f[_0x2b3a72(0x1dc)];typeof _0x1ee79f[_0x2b3a72(0x2ae)]===_0x2b3a72(0x2dd)&&_0x1ee79f['datasetCode'][_0x2b3a72(0x284)]()&&(_0x50273c['bindDatasetCode']=_0x1ee79f[_0x2b3a72(0x2ae)][_0x2b3a72(0x284)]());const _0x3c5fcd=[];return validateOuterMetadata(_0x1ee79f,_0x3c5fcd),validateFlowClassification(_0x1ee79f,_0x3c5fcd),validateGraph(_0x1ee79f[_0x2b3a72(0x1ef)],_0x3c5fcd),{'valid':_0x3c5fcd[_0x2b3a72(0x2c4)]===0x0,'errors':_0x3c5fcd,'warnings':_0x5c4e75[_0x2b3a72(0x25b)],'normalized':_0x1ee79f,'validationConfig':_0x91f1b7};}function validateFlowClassification(_0x3cc59f,_0x163f56){const _0x223698=a299_0xf05f06;if(!isRecord(_0x3cc59f['flowJson']))return;const _0x3ee5b4=_0x3cc59f[_0x223698(0x2b4)],_0x482d36=_0x3cc59f[_0x223698(0x1ef)]['pageMode'];_0x482d36!==undefined&&(typeof _0x482d36!==_0x223698(0x2dd)||!FLOW_PAGE_MODES[_0x223698(0x2e6)](_0x482d36))&&_0x163f56[_0x223698(0x2b2)]({'path':_0x223698(0x2b3),'message':_0x223698(0x326)+String(_0x482d36)+'.'});_0x3ee5b4===_0x223698(0x23d)&&_0x482d36!==undefined&&_0x163f56['push']({'path':'flowJson.pageMode','message':_0x223698(0x31b)});_0x3ee5b4===_0x223698(0x249)&&_0x482d36==='PLATFORM_FORM'&&_0x163f56[_0x223698(0x2b2)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x3ee5b4==='FORM_FLOW'||_0x3ee5b4===_0x223698(0x249))&&validateCustomPageNavigation(_0x3cc59f,_0x3ee5b4,_0x482d36,_0x163f56);if(_0x3ee5b4!=='FORM_FLOW'||!Array[_0x223698(0x213)](_0x3cc59f['flowJson'][_0x223698(0x23b)]))return;_0x3cc59f[_0x223698(0x1ef)]['nodes'][_0x223698(0x309)]((_0x232ee0,_0x54319b)=>{const _0x234e9d=_0x223698;isRecord(_0x232ee0)&&_0x232ee0[_0x234e9d(0x265)]===_0x234e9d(0x282)&&_0x232ee0[_0x234e9d(0x1fd)]==='HANDLE'&&_0x163f56['push']({'path':_0x234e9d(0x2b1)+_0x54319b+_0x234e9d(0x1da),'message':_0x234e9d(0x20a)});});}function validateCustomPageNavigation(_0x3fad7e,_0x4c0c55,_0x1d782b,_0x2e9e90){const _0x4a1838=a299_0xf05f06,_0x4c88c9=_0x3fad7e[_0x4a1838(0x1ef)][_0x4a1838(0x1e4)];_0x4c88c9!==undefined&&_0x2e9e90['push']({'path':_0x4a1838(0x230),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0xaf57e2=_0x3fad7e[_0x4a1838(0x1ef)][_0x4a1838(0x1e1)];_0xaf57e2!==undefined&&(typeof _0xaf57e2!==_0x4a1838(0x2dd)||_0xaf57e2[_0x4a1838(0x284)]()==='')&&_0x2e9e90[_0x4a1838(0x2b2)]({'path':_0x4a1838(0x210),'message':_0x4a1838(0x1db)});const _0x3e2594=Array[_0x4a1838(0x213)](_0x3fad7e['flowJson'][_0x4a1838(0x23b)])?_0x3fad7e['flowJson']['nodes'][_0x4a1838(0x273)]((_0xecf86a,_0x4ce29a)=>({'node':_0xecf86a,'index':_0x4ce29a}))[_0x4a1838(0x29f)](({node:_0x3ec9f1})=>isRecord(_0x3ec9f1)&&_0x3ec9f1['path']!==undefined):[],_0x457442=_0xaf57e2!==undefined||_0x3e2594[_0x4a1838(0x2c4)]>0x0,_0x193bf7=_0x1d782b===undefined&&_0x4c0c55===_0x4a1838(0x249)?_0x4a1838(0x271):_0x1d782b;_0x457442&&(_0x4c0c55!=='INDEPENDENT_FLOW'||_0x193bf7!=='CUSTOM_PAGE')&&(_0xaf57e2!==undefined&&_0x2e9e90[_0x4a1838(0x2b2)]({'path':_0x4a1838(0x210),'message':_0x4a1838(0x1d2)}),_0x3e2594['forEach'](({index:_0x37b10c})=>{const _0x115a64=_0x4a1838;_0x2e9e90[_0x115a64(0x2b2)]({'path':_0x115a64(0x2b1)+_0x37b10c+'].path','message':_0x115a64(0x21e)});}));}export async function writeNormalizedFlowConfig(_0x48f14f,_0x4d2c95,_0x10d777={}){const _0x53c2bb=a299_0xf05f06,_0xe1c717=resolve(_0x48f14f),_0xfe0bea=_0xe1c717+'.'+process[_0x53c2bb(0x247)]+'.'+randomUUID()+_0x53c2bb(0x2cb),_0x19bda3=JSON[_0x53c2bb(0x251)](_0x4d2c95,null,0x2)+'\x0a';let _0x5299d6;try{try{_0x5299d6=(await stat(_0xe1c717))[_0x53c2bb(0x2ca)]&0x1ff;}catch{_0x5299d6=undefined;}await writeFile(_0xfe0bea,_0x19bda3,{'encoding':_0x53c2bb(0x327),'flag':'wx','mode':_0x5299d6??0x1a4});if(_0x5299d6!==undefined)await chmod(_0xfe0bea,_0x5299d6);_0x10d777[_0x53c2bb(0x1d7)]===![]?(await link(_0xfe0bea,_0xe1c717),await unlink(_0xfe0bea)):await rename(_0xfe0bea,_0xe1c717);}finally{await unlink(_0xfe0bea)[_0x53c2bb(0x1ff)](()=>undefined);}}function validateOuterMetadata(_0x18eeea,_0x3d221b){const _0x55a307=a299_0xf05f06;(typeof _0x18eeea[_0x55a307(0x1dc)]!==_0x55a307(0x2dd)||_0x18eeea[_0x55a307(0x1dc)][_0x55a307(0x284)]()==='')&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x1dc),'message':'flowName\x20is\x20required.'});_0x18eeea['flowDesc']!==undefined&&typeof _0x18eeea[_0x55a307(0x211)]!==_0x55a307(0x2dd)&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x211),'message':_0x55a307(0x2d1)});if(_0x18eeea[_0x55a307(0x2b4)]===undefined||_0x18eeea[_0x55a307(0x2b4)]===null)_0x3d221b[_0x55a307(0x2b2)]({'path':'flowType','message':_0x55a307(0x315)});else(typeof _0x18eeea[_0x55a307(0x2b4)]!==_0x55a307(0x2dd)||!FLOW_TYPES[_0x55a307(0x2e6)](_0x18eeea['flowType']))&&_0x3d221b['push']({'path':'flowType','message':_0x55a307(0x2a9)+String(_0x18eeea['flowType'])+'.'});_0x18eeea['datasetCode']!==undefined&&typeof _0x18eeea[_0x55a307(0x2ae)]!==_0x55a307(0x2dd)&&_0x3d221b['push']({'path':_0x55a307(0x2ae),'message':_0x55a307(0x21b)});_0x18eeea[_0x55a307(0x302)]===undefined&&_0x18eeea[_0x55a307(0x1de)]!==undefined&&(!Number[_0x55a307(0x23a)](_0x18eeea[_0x55a307(0x1de)])||_0x18eeea[_0x55a307(0x1de)]<=0x0)&&_0x3d221b['push']({'path':_0x55a307(0x1de),'message':_0x55a307(0x312)});if(_0x18eeea[_0x55a307(0x302)]!==undefined){if(!Array[_0x55a307(0x213)](_0x18eeea[_0x55a307(0x302)])||_0x18eeea['pageIds'][_0x55a307(0x24a)](_0x3aeb65=>!Number['isSafeInteger'](_0x3aeb65)||_0x3aeb65<=0x0))_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x1ca)});else[...new Set(_0x18eeea[_0x55a307(0x302)])]['join'](',')[_0x55a307(0x2c4)]>0x800&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x298)});_0x18eeea['flowType']===_0x55a307(0x249)&&Array[_0x55a307(0x213)](_0x18eeea['pageIds'])&&_0x18eeea[_0x55a307(0x302)][_0x55a307(0x2c4)]>0x0&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x1e0)});}_0x18eeea[_0x55a307(0x2b4)]===_0x55a307(0x249)&&_0x18eeea[_0x55a307(0x2ae)]!==undefined&&_0x3d221b[_0x55a307(0x2b2)]({'path':'datasetCode','message':_0x55a307(0x214)}),_0x18eeea[_0x55a307(0x2b4)]===_0x55a307(0x249)&&_0x18eeea[_0x55a307(0x302)]===undefined&&_0x18eeea[_0x55a307(0x1de)]!==undefined&&_0x3d221b[_0x55a307(0x2b2)]({'path':'pageId','message':_0x55a307(0x20d)});}function validateGraph(_0x4e5afe,_0x615846){const _0x582a1=a299_0xf05f06;if(!isRecord(_0x4e5afe)){_0x615846['push']({'path':_0x582a1(0x1ef),'message':_0x582a1(0x237)});return;}!Array[_0x582a1(0x213)](_0x4e5afe[_0x582a1(0x23b)])&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x286),'message':_0x582a1(0x222)});!Array[_0x582a1(0x213)](_0x4e5afe['edges'])&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x2bb),'message':_0x582a1(0x1d6)});Object[_0x582a1(0x30e)][_0x582a1(0x297)][_0x582a1(0x331)](_0x4e5afe,_0x582a1(0x324))&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x2cf),'message':_0x582a1(0x2bd)+String(_0x4e5afe['schemaVersion'])+_0x582a1(0x285)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x5c8568 of[_0x582a1(0x299),'formDefinitions',_0x582a1(0x22a)]){Object[_0x582a1(0x30e)][_0x582a1(0x297)]['call'](_0x4e5afe,_0x5c8568)&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x25c)+_0x5c8568,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x4e5afe[_0x582a1(0x23b)])||!Array[_0x582a1(0x213)](_0x4e5afe[_0x582a1(0x329)]))return;const _0x3a832a=new Map(),_0x538061=[],_0x3d8ba6=[],_0x2fadcb=new Map(),_0x27f8ad=new Map(),_0x1b97e2=new Set();let _0x462234=0x0;_0x4e5afe[_0x582a1(0x23b)][_0x582a1(0x309)]((_0x39fa72,_0x2634b3)=>{const _0x55ec8d=_0x582a1,_0x439533=_0x55ec8d(0x2b1)+_0x2634b3+']';if(!isRecord(_0x39fa72)){_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x29e50c=_0x39fa72;if(typeof _0x29e50c['id']!==_0x55ec8d(0x2dd)||!BPMN_ID_PATTERN[_0x55ec8d(0x288)](_0x29e50c['id']))_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+_0x55ec8d(0x22f),'message':_0x55ec8d(0x226)});else _0x3a832a[_0x55ec8d(0x2e6)](_0x29e50c['id'])?_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+'.id','message':_0x55ec8d(0x2ec)+_0x29e50c['id']+'.'}):(_0x3a832a[_0x55ec8d(0x328)](_0x29e50c['id'],_0x29e50c),_0x1b97e2[_0x55ec8d(0x29b)](_0x29e50c['id']));if(!NODE_TYPES['has'](_0x29e50c[_0x55ec8d(0x265)]))_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+_0x55ec8d(0x2c5),'message':_0x55ec8d(0x314)+String(_0x29e50c[_0x55ec8d(0x265)])+'.'});else{if(_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x2f7))_0x538061[_0x55ec8d(0x2b2)](_0x29e50c['id']);else _0x29e50c[_0x55ec8d(0x265)]==='END'&&_0x3d8ba6[_0x55ec8d(0x2b2)](_0x29e50c['id']);}_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x282)&&(_0x29e50c['taskMode']===undefined||_0x29e50c[_0x55ec8d(0x1fd)]===_0x55ec8d(0x282))&&(_0x462234+=0x1);validateNode(_0x29e50c,_0x439533,_0x615846);if(_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x20f)){const _0x221910=resolveEffectiveResultVariable(_0x29e50c[_0x55ec8d(0x252)],![]);_0x221910&&(registerResultVariableOwner(_0x27f8ad,_0x221910,_0x29e50c['id'],_0x615846),!_0x2fadcb['has'](_0x221910)&&_0x2fadcb[_0x55ec8d(0x328)](_0x221910,_0x29e50c['id']));}if(_0x29e50c[_0x55ec8d(0x265)]==='APPROVAL'&&isRecord(_0x29e50c[_0x55ec8d(0x1f1)])&&_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x2ab)]===!![]&&_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x279)]===_0x55ec8d(0x2a6)){const _0x5df128=resolveEffectiveResultVariable(_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x252)],!![]);_0x5df128&&registerResultVariableOwner(_0x27f8ad,_0x5df128,_0x29e50c['id']+_0x55ec8d(0x293),_0x615846);}});_0x538061[_0x582a1(0x2c4)]!==0x1&&_0x615846[_0x582a1(0x2b2)]({'path':'flowJson.nodes','message':_0x582a1(0x2b8)});_0x3d8ba6[_0x582a1(0x2c4)]===0x0&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x286),'message':_0x582a1(0x28b)});const _0x46fdcd=new Map(),_0x21e032=new Map(),_0x3eea26=new Map(),_0x41f17e=new Set();_0x4e5afe['edges']['forEach']((_0x43f514,_0x16ed49)=>{const _0x8f5005=_0x582a1,_0x541ce9=_0x8f5005(0x2d3)+_0x16ed49+']';if(!isRecord(_0x43f514)){_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9,'message':_0x8f5005(0x2e8)});return;}const _0x4fed9e=_0x43f514;_0x3eea26['set'](_0x4fed9e,_0x541ce9);const _0x548071=resolveEdgeEndpoint(_0x4fed9e[_0x8f5005(0x30a)],_0x4fed9e[_0x8f5005(0x2f0)]),_0x450ca7=resolveEdgeEndpoint(_0x4fed9e[_0x8f5005(0x216)],_0x4fed9e[_0x8f5005(0x23c)]);if(!_0x548071)_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+_0x8f5005(0x1e3),'message':_0x8f5005(0x330)});if(!_0x450ca7)_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+'.target','message':_0x8f5005(0x23f)});_0x548071&&!_0x3a832a[_0x8f5005(0x2e6)](_0x548071)&&_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+'.source','message':_0x8f5005(0x203)+_0x548071+'.'});_0x450ca7&&!_0x3a832a[_0x8f5005(0x2e6)](_0x450ca7)&&_0x615846['push']({'path':_0x541ce9+_0x8f5005(0x205),'message':'Edge\x20target\x20node\x20not\x20found:\x20'+_0x450ca7+'.'});if(_0x4fed9e['id']!==undefined){if(typeof _0x4fed9e['id']!=='string'||!BPMN_ID_PATTERN[_0x8f5005(0x288)](_0x4fed9e['id']))_0x615846['push']({'path':_0x541ce9+_0x8f5005(0x22f),'message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x1b97e2['has'](_0x4fed9e['id']))_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+_0x8f5005(0x22f),'message':_0x8f5005(0x2e9)+_0x4fed9e['id']+'.'});else!_0x1b97e2[_0x8f5005(0x2e6)](_0x4fed9e['id'])&&_0x1b97e2[_0x8f5005(0x29b)](_0x4fed9e['id']);}}if(_0x548071&&_0x450ca7){const _0x2cf12d=_0x548071+'\x00'+_0x450ca7+'\x00'+(_0x4fed9e['conditionType']??_0x8f5005(0x2fb));_0x41f17e[_0x8f5005(0x2e6)](_0x2cf12d)?_0x615846['push']({'path':_0x541ce9,'message':_0x8f5005(0x243)+_0x548071+_0x8f5005(0x20b)+_0x450ca7+'\x20('+(_0x4fed9e[_0x8f5005(0x2b7)]??_0x8f5005(0x2fb))+').'}):_0x41f17e['add'](_0x2cf12d);}validateEdge(_0x4fed9e,_0x541ce9,_0x615846),_0x548071&&_0x450ca7&&(_0x46fdcd[_0x8f5005(0x24e)](_0x548071)?.['push'](_0x4fed9e)??_0x46fdcd[_0x8f5005(0x328)](_0x548071,[_0x4fed9e]),_0x21e032['get'](_0x450ca7)?.[_0x8f5005(0x2b2)](_0x4fed9e)??_0x21e032['set'](_0x450ca7,[_0x4fed9e]));});if(_0x538061[_0x582a1(0x2c4)]!==0x1)return;validateGraphShape(_0x3a832a,_0x538061[0x0],_0x3d8ba6,_0x46fdcd,_0x21e032,_0x3eea26,_0x615846),validateScriptResultReferences(_0x3a832a,_0x538061[0x0],_0x46fdcd,_0x21e032,_0x3eea26,_0x2fadcb,_0x615846),validateApprovalResults(_0x3a832a,_0x462234,_0x3d8ba6,_0x615846);}function validateNode(_0x8480d2,_0x3aa715,_0x24cb29){const _0x33884c=a299_0xf05f06;for(const _0x4a4b22 of['form',_0x33884c(0x311)]){Object[_0x33884c(0x30e)][_0x33884c(0x297)][_0x33884c(0x331)](_0x8480d2,_0x4a4b22)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.'+_0x4a4b22,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x33884c(0x2e6)](_0x8480d2[_0x33884c(0x265)]))return;(typeof _0x8480d2[_0x33884c(0x246)]!=='string'||_0x8480d2[_0x33884c(0x246)]['trim']()==='')&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.name','message':_0x33884c(0x250)});_0x8480d2[_0x33884c(0x1de)]!==undefined&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2b0),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x8480d2['path']!==undefined){if(typeof _0x8480d2[_0x33884c(0x2a1)]!==_0x33884c(0x2dd)||_0x8480d2[_0x33884c(0x2a1)][_0x33884c(0x284)]()==='')_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ba),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x8480d2[_0x33884c(0x265)]!==_0x33884c(0x282)&&_0x8480d2[_0x33884c(0x265)]!==_0x33884c(0x2ff)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ba),'message':_0x33884c(0x333)});}const _0x98d287=_0x8480d2[_0x33884c(0x1d9)];if(!isRecord(_0x98d287))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x27d),'message':_0x33884c(0x233)});else for(const _0x820b86 of['x','y']){const _0x343390=_0x98d287[_0x820b86];(typeof _0x343390!==_0x33884c(0x220)||!Number[_0x33884c(0x275)](_0x343390)||_0x343390<0x0)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x31f)+_0x820b86,'message':_0x33884c(0x1f4)+_0x820b86+_0x33884c(0x2ce)});}if(_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x282)){const _0x445023=_0x8480d2['approvalMode']??_0x33884c(0x22c),_0x15b455=_0x8480d2['taskMode']??_0x33884c(0x282);!APPROVAL_TASK_MODES[_0x33884c(0x2e6)](_0x15b455)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2a3),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x15b455)+'.'});!APPROVAL_MODES[_0x33884c(0x2e6)](_0x445023)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2c8),'message':_0x33884c(0x272)+String(_0x445023)+'.'});if(!isRecord(_0x8480d2[_0x33884c(0x25f)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x248),'message':_0x33884c(0x2a2)});else{const _0x232d24=_0x8480d2[_0x33884c(0x25f)][_0x33884c(0x31e)];_0x232d24!==_0x33884c(0x234)&&_0x232d24!==_0x33884c(0x24b)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ef),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x232d24===_0x33884c(0x234)){const _0xd063c9=_0x8480d2['assignee'][_0x33884c(0x256)];if(!Array[_0x33884c(0x213)](_0xd063c9)||_0xd063c9['length']===0x0)_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x201),'message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x1748a9=_0xd063c9[_0x33884c(0x268)](_0x3b6e62=>!isValidUserId(_0x3b6e62));_0x1748a9>=0x0&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2e0)+_0x1748a9+']','message':_0x33884c(0x212)});const _0x5d15ea=new Set(_0xd063c9['filter'](isValidUserId)[_0x33884c(0x273)](_0x5c5a0a=>String(_0x5c5a0a)[_0x33884c(0x284)]()));_0x445023===_0x33884c(0x22c)&&_0x5d15ea[_0x33884c(0x25e)]>0x1&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x201),'message':_0x33884c(0x28d)});}}if(_0x232d24===_0x33884c(0x24b)){const _0x39185c=_0x8480d2[_0x33884c(0x25f)][_0x33884c(0x254)],_0x47688c=typeof _0x39185c===_0x33884c(0x220)||typeof _0x39185c===_0x33884c(0x2dd)?Number(String(_0x39185c)['trim']()):Number['NaN'];(!Number[_0x33884c(0x23a)](_0x47688c)||_0x47688c<=0x0)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2f2),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x8480d2[_0x33884c(0x325)]!==undefined){if(!isRecord(_0x8480d2[_0x33884c(0x325)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x1ec),'message':_0x33884c(0x1c6)});else{if(_0x8480d2['transferCandidates'][_0x33884c(0x31e)]!==_0x33884c(0x234))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x267),'message':_0x33884c(0x1dd)});else{const _0x3bc085=_0x8480d2[_0x33884c(0x325)]['userIds'];if(!Array[_0x33884c(0x213)](_0x3bc085)||_0x3bc085[_0x33884c(0x2c4)]===0x0)_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.transferCandidates.userIds','message':_0x33884c(0x294)});else{const _0x2d4200=_0x3bc085[_0x33884c(0x268)](_0x15a49b=>!isValidUserId(_0x15a49b));_0x2d4200>=0x0&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2af)+_0x2d4200+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x8480d2[_0x33884c(0x2ed)]!==undefined&&typeof _0x8480d2['sequential']!=='boolean'&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x319),'message':_0x33884c(0x21c)});if(_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x20f)){(typeof _0x8480d2[_0x33884c(0x259)]!==_0x33884c(0x2dd)||_0x8480d2[_0x33884c(0x259)][_0x33884c(0x284)]()==='')&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x31d),'message':_0x33884c(0x27e)});if(_0x8480d2[_0x33884c(0x252)]!==undefined){if(typeof _0x8480d2['resultVariable']!==_0x33884c(0x2dd)||!VARIABLE_PATTERN[_0x33884c(0x288)](_0x8480d2[_0x33884c(0x252)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x32e),'message':_0x33884c(0x1cc)});else(RESERVED_RESULT_VARIABLES[_0x33884c(0x2e6)](_0x8480d2[_0x33884c(0x252)])||_0x8480d2[_0x33884c(0x252)]['startsWith'](_0x33884c(0x292)))&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x32e),'message':'Reserved\x20resultVariable:\x20'+_0x8480d2[_0x33884c(0x252)]+'.'});}}validateAsyncExecution(_0x8480d2,_0x3aa715,_0x24cb29),validateApprovalTimeout(_0x8480d2,_0x3aa715,_0x24cb29),validateCcConfig(_0x8480d2,_0x3aa715,_0x24cb29),_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x264)&&validateNotificationConfig(_0x8480d2['config'],_0x3aa715+_0x33884c(0x2ea),_0x24cb29);}function validateAsyncExecution(_0x5910e0,_0x3d8ddc,_0x1735cf){const _0x5cb959=a299_0xf05f06;if(_0x5910e0[_0x5cb959(0x2da)]===undefined)return;if(!isRecord(_0x5910e0[_0x5cb959(0x2da)])){_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x32b),'message':_0x5cb959(0x27c)});return;}if(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==undefined&&typeof _0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==_0x5cb959(0x228)){_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x2e5),'message':_0x5cb959(0x1d1)});return;}if(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==!![])return;_0x5910e0[_0x5cb959(0x265)]!=='SCRIPT'&&_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x32b),'message':_0x5cb959(0x269)});const _0x5ad036=_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x1e5)]??0x3;(!Number[_0x5cb959(0x22d)](_0x5ad036)||_0x5ad036<0x1||_0x5ad036>MAX_ASYNC_RETRY_COUNT)&&_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+'.async.retryCount','message':_0x5cb959(0x217)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x32c)]!==undefined&&validateTimeAmount(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x32c)],_0x3d8ddc+_0x5cb959(0x260),_0x1735cf);}function validateApprovalTimeout(_0x50e3fa,_0x45a3f4,_0x1c7d1b){const _0x3e25e3=a299_0xf05f06;if(_0x50e3fa[_0x3e25e3(0x1f1)]===undefined)return;if(!isRecord(_0x50e3fa[_0x3e25e3(0x1f1)])){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x293),'message':_0x3e25e3(0x2e7)});return;}if(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x2ab)]!==undefined&&typeof _0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x2ab)]!==_0x3e25e3(0x228)){_0x1c7d1b['push']({'path':_0x45a3f4+_0x3e25e3(0x1cb),'message':_0x3e25e3(0x289)});return;}if(_0x50e3fa[_0x3e25e3(0x1f1)]['enabled']!==!![])return;if(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x290)]!==undefined&&typeof _0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x290)]!=='boolean'){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x1cd),'message':_0x3e25e3(0x32f)});return;}_0x50e3fa[_0x3e25e3(0x265)]!==_0x3e25e3(0x282)&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x293),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x323)],_0x45a3f4+'.timeout.duration',_0x1c7d1b);const _0x42f5f9=_0x50e3fa['timeout'][_0x3e25e3(0x279)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x3e25e3(0x2e6)](_0x42f5f9)){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.action','message':_0x3e25e3(0x1f2)});return;}(_0x50e3fa[_0x3e25e3(0x1fd)]??_0x3e25e3(0x282))===_0x3e25e3(0x1d5)&&_0x42f5f9!==_0x3e25e3(0x2a6)&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.action','message':_0x3e25e3(0x32a)});const _0x5e1d00=_0x50e3fa['timeout'][_0x3e25e3(0x290)]??_0x42f5f9!==_0x3e25e3(0x2a6);if(_0x42f5f9==='EXECUTE_BFF')_0x5e1d00&&_0x1c7d1b['push']({'path':_0x45a3f4+_0x3e25e3(0x1cd),'message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x50e3fa[_0x3e25e3(0x1f1)]['scriptName']!==_0x3e25e3(0x2dd)||_0x50e3fa[_0x3e25e3(0x1f1)]['scriptName'][_0x3e25e3(0x284)]()==='')&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x304),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x252)],_0x45a3f4+'.timeout.resultVariable',_0x1c7d1b);else!_0x5e1d00&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.interrupting','message':_0x42f5f9+_0x3e25e3(0x1eb)});}function validateTimeAmount(_0x15f04b,_0x1832bf,_0x34494c){const _0x2cb78c=a299_0xf05f06;if(!isRecord(_0x15f04b)){_0x34494c[_0x2cb78c(0x2b2)]({'path':_0x1832bf,'message':_0x2cb78c(0x2e4)});return;}(!Number[_0x2cb78c(0x22d)](_0x15f04b[_0x2cb78c(0x2f9)])||Number(_0x15f04b['value'])<=0x0)&&_0x34494c['push']({'path':_0x1832bf+_0x2cb78c(0x1df),'message':_0x2cb78c(0x300)}),!FLOW_TIME_UNITS[_0x2cb78c(0x2e6)](_0x15f04b[_0x2cb78c(0x2a5)])&&_0x34494c[_0x2cb78c(0x2b2)]({'path':_0x1832bf+_0x2cb78c(0x2a7),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x434522,_0x4848bc,_0x4ac8fc){const _0x30d413=a299_0xf05f06;if(_0x434522===undefined||_0x434522===null||_0x434522==='')return;if(typeof _0x434522!==_0x30d413(0x2dd)||!VARIABLE_PATTERN['test'](_0x434522))_0x4ac8fc[_0x30d413(0x2b2)]({'path':_0x4848bc,'message':_0x30d413(0x1cc)});else(RESERVED_RESULT_VARIABLES[_0x30d413(0x2e6)](_0x434522)||_0x434522[_0x30d413(0x2f4)]('approval_sys_'))&&_0x4ac8fc[_0x30d413(0x2b2)]({'path':_0x4848bc,'message':_0x30d413(0x291)+_0x434522+'.'});}function a299_0x40f3(){const _0x57fd14=['pageId','.value','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','startPath','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.source','startPageId','retryCount','AUTO_APPROVE','waypoint.','.detailMarkdown','title','defaultFlow','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','.transferCandidates','expression','delete','flowJson','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','timeout','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.url','position.','.defaultFlow','message','approval_sys_dataId','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','CONTINUE','failurePolicy','waypoints\x20must\x20be\x20an\x20array.','.cc','taskMode','approval.simple-flow.v1','catch','#/$defs/timeAmount','.assignee.userIds','752oJfzix','Edge\x20source\x20node\x20not\x20found:\x20','readSources','.target','object','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','ANY','\x20is\x20required.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','\x20->\x20','detailMarkdown','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','metadata','SCRIPT','flowJson.startPath','flowDesc','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','isArray','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','HOURS','target','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Notification\x20action.url\x20is\x20required.','empty_metadata_removed','datasetCode\x20must\x20be\x20a\x20string.','sequential\x20must\x20be\x20a\x20boolean.','actions','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.waypoints[','number','833200oZLLgu','nodes\x20must\x20be\x20an\x20array.','ALL','Notification\x20recipient\x20must\x20be\x20an\x20object.','https://lovrabet.com/schema/rabetbase-flow-config.json','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','approval_sys_operationType','boolean','.configCode','formPermissions','.facts','SINGLE','isInteger','Rabetbase\x20FlowConfig','.id','flowJson.startPageId','4lNQZwa','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','FIXED','Node\x20has\x20no\x20incoming\x20edge.','2699620AzIIRt','flowJson\x20must\x20be\x20an\x20object.','value\x20must\x20be\x20a\x20non-empty\x20string.','CONDITION','isSafeInteger','nodes','targetNodeId','FORM_FLOW','1597216iiXzqL','edge\x20target\x20is\x20required.','Notification\x20action\x20must\x20be\x20an\x20object.',',\x20but\x20node\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','Duplicate\x20edge\x20route:\x20','AUTO_REJECT','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','name','pid','.assignee','INDEPENDENT_FLOW','some','ROLE','DAYS','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','get','configCode','Every\x20node\x20requires\x20a\x20non-empty\x20name.','stringify','resultVariable','flowJson.nodes.','roleId','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','userIds','1388jtUbrH','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','scriptName','.waypoints','warnings','flowJson.','appCode','size','assignee','.async.retryInterval','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','^[1-9][0-9]*$','text','NOTIFICATION','type','defaultFlow\x20must\x20be\x20a\x20boolean.','.transferCandidates.strategy','findIndex','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','\x20users.','https://json-schema.org/draft/2020-12/schema','.role','.expression','.conditionType','approved','Notification\x20template.facts\x20must\x20be\x20an\x20array.','CUSTOM_PAGE','Unsupported\x20approval\x20mode:\x20','map','Notification\x20recipients\x20must\x20be\x20an\x20array.','isFinite','.text','547626hixkaF','USER','action','config','EMAIL','async\x20must\x20be\x20an\x20object.','.position','SCRIPT\x20node\x20requires\x20scriptName.','EXPRESSION','#/$defs/flowNode','Expression\x20references\x20SCRIPT\x20resultVariable\x20','APPROVAL','.version','trim','.\x20This\x20CLI\x20supports\x20only\x20','flowJson.nodes','.recipients','test','timeout.enabled\x20must\x20be\x20a\x20boolean.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','APPROVED','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','\x20actions.','.cc.visible','interrupting','Reserved\x20resultVariable:\x20','approval_sys_','.timeout','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Notification\x20template\x20supports\x20at\x20most\x20','hasOwnProperty','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','formSchema','recipients','add','failurePolicy\x20must\x20be\x20a\x20string.','approval_sys_initiatorUsername','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','filter','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','path','APPROVAL\x20node\x20requires\x20assignee.','.taskMode','variables','unit','EXECUTE_BFF','.unit','REJECTED','Unsupported\x20flowType:\x20','formData','enabled','.cc.recipientUserIds','summary','datasetCode','.transferCandidates.userIds[','.pageId','flowJson.nodes[','push','flowJson.pageMode','flowType','#/$defs/userId','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','conditionType','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','flowCode','.path','flowJson.edges','BCC','Unsupported\x20schemaVersion:\x20','#/$defs/position','Unsupported\x20notification\x20version:\x20','slice','Notification\x20version\x20must\x20be\x20a\x20string.','every','approval_sys_processInstanceId','length','.type','Notification\x20action.text\x20is\x20required.','5070348Oakllu','.approvalMode','indexOf','mode','.tmp','60053rFanZP','Notification\x20fact.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson.schemaVersion','40fYlynH','flowDesc\x20must\x20be\x20a\x20string.','.cc.recipientUserIds[','flowJson.edges[','\x20was\x20empty\x20and\x20was\x20removed.','Node\x20is\x20not\x20reachable\x20from\x20START.','recipientUserIds','132PTIhyp','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','waypoints','async','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','edge\x20name\x20must\x20be\x20a\x20string.','string','includes','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.assignee.userIds[','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','approval_sys_pageId','NOTIFICATION\x20node\x20requires\x20config.','duration\x20requires\x20value\x20and\x20unit.','.async.enabled','has','timeout\x20must\x20be\x20an\x20object.','edge\x20must\x20be\x20an\x20object.','Duplicate\x20BPMN\x20element\x20id:\x20','.config','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Duplicate\x20node\x20id:\x20','sequential','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','.assignee.strategy','sourceNodeId','event','.assignee.roleId','.name','startsWith','version','cc\x20must\x20be\x20an\x20object.','START','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','value','toUpperCase','ALWAYS','Notification\x20template.','facts','FAIL','END','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','label','pageIds','bindDatasetCode','.timeout.scriptName','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','url','templateName','array','forEach','source','PLATFORM_FORM','integer','keys','prototype','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','.failurePolicy','formPermission','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Unsupported\x20node\x20type:\x20','flowType\x20is\x20required.','role','result','approval_sys_initiatorUserId','.sequential','Unsupported\x20notification\x20placeholder:\x20','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','parse','.scriptName','strategy','.position.','Duplicate\x20cc\x20recipient\x20userId:\x20','entries','Node\x20has\x20no\x20outgoing\x20edge.','duration','schemaVersion','transferCandidates','Unsupported\x20pageMode:\x20','utf8','set','edges','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','.async','retryInterval','Node\x20cannot\x20reach\x20any\x20END.','.resultVariable','timeout.interrupting\x20must\x20be\x20a\x20boolean.','edge\x20source\x20is\x20required.','call','.template','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','template','pageMode','legacy_field_removed','matchAll','__rabetbase_local_validation__','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','transferCandidates\x20must\x20be\x20an\x20object.','\x20must\x20be\x20a\x20finite\x20number.','.cc.readSources','flowKey','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','.timeout.enabled','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.timeout.interrupting','^[A-Za-z_][A-Za-z0-9_]*$','MAX_SAFE_INTEGER','Notification\x20recipient.value\x20is\x20required.','async.enabled\x20must\x20be\x20a\x20boolean.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','SECONDS','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','HANDLE','edges\x20must\x20be\x20an\x20array.','overwrite','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','position','].taskMode','startPath\x20must\x20be\x20a\x20non-empty\x20string.','flowName','transferCandidates\x20currently\x20supports\x20FIXED\x20only.'];a299_0x40f3=function(){return _0x57fd14;};return a299_0x40f3();}function validateCcConfig(_0x29140b,_0x45aead,_0x2dda6f){const _0x489c4f=a299_0xf05f06;if(_0x29140b['cc']===undefined)return;if(!isRecord(_0x29140b['cc'])){_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1fc),'message':_0x489c4f(0x2f6)});return;}_0x29140b[_0x489c4f(0x265)]!=='END'&&_0x29140b[_0x489c4f(0x265)]!==_0x489c4f(0x282)&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1fc),'message':_0x489c4f(0x1e2)});Object['prototype'][_0x489c4f(0x297)][_0x489c4f(0x331)](_0x29140b['cc'],_0x489c4f(0x204))&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1c8),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3f732c=_0x29140b['cc'][_0x489c4f(0x2d6)];if(!Array['isArray'](_0x3f732c)||_0x3f732c[_0x489c4f(0x2c4)]===0x0)_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x2ac),'message':_0x489c4f(0x1d4)});else{_0x3f732c['length']>MAX_CC_RECIPIENTS&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x2ac),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x489c4f(0x26a)});const _0x2f75b1=new Set();_0x3f732c[_0x489c4f(0x309)]((_0x23e0a9,_0x2f868c)=>{const _0x1144c7=_0x489c4f;if(typeof _0x23e0a9!=='string'||_0x23e0a9[_0x1144c7(0x284)]()==='')_0x2dda6f['push']({'path':_0x45aead+_0x1144c7(0x2d2)+_0x2f868c+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x2f75b1[_0x1144c7(0x2e6)](_0x23e0a9['trim']())?_0x2dda6f[_0x1144c7(0x2b2)]({'path':_0x45aead+'.cc.recipientUserIds['+_0x2f868c+']','message':_0x1144c7(0x320)+_0x23e0a9[_0x1144c7(0x284)]()+'.'}):_0x2f75b1[_0x1144c7(0x29b)](_0x23e0a9['trim']());});}validateStringArray(_0x29140b['cc']['visible'],_0x45aead+_0x489c4f(0x28f),_0x2dda6f);}function validateStringArray(_0x12511a,_0x25254f,_0xb8aabd){const _0x334ea5=a299_0xf05f06;if(_0x12511a===undefined)return;if(!Array[_0x334ea5(0x213)](_0x12511a)){_0xb8aabd['push']({'path':_0x25254f,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x30e4a1=new Set();_0x12511a[_0x334ea5(0x309)]((_0x3617e1,_0x2f7395)=>{const _0x363c73=_0x334ea5;if(typeof _0x3617e1!=='string'||_0x3617e1[_0x363c73(0x284)]()==='')_0xb8aabd[_0x363c73(0x2b2)]({'path':_0x25254f+'['+_0x2f7395+']','message':_0x363c73(0x238)});else _0x30e4a1[_0x363c73(0x2e6)](_0x3617e1['trim']())?_0xb8aabd[_0x363c73(0x2b2)]({'path':_0x25254f+'['+_0x2f7395+']','message':'Duplicate\x20value:\x20'+_0x3617e1[_0x363c73(0x284)]()+'.'}):_0x30e4a1[_0x363c73(0x29b)](_0x3617e1[_0x363c73(0x284)]());});}function validateNotificationConfig(_0x541fc3,_0x5cb27e,_0x17f96f){const _0x5ba426=a299_0xf05f06;if(!isRecord(_0x541fc3)){_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e,'message':_0x5ba426(0x2e3)});return;}if(_0x541fc3['version']!==undefined&&_0x541fc3[_0x5ba426(0x2f5)]!==null){if(typeof _0x541fc3[_0x5ba426(0x2f5)]!==_0x5ba426(0x2dd))_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x283),'message':_0x5ba426(0x2c1)});else _0x541fc3['version'][_0x5ba426(0x284)]()&&_0x541fc3[_0x5ba426(0x2f5)]['trim']()!=='v1'&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x283),'message':_0x5ba426(0x2bf)+_0x541fc3[_0x5ba426(0x2f5)]+'.'});}const _0x1079ef=requireNotificationString(_0x541fc3[_0x5ba426(0x24f)],_0x5cb27e+_0x5ba426(0x229),'Notification\x20configCode\x20is\x20required.',_0x17f96f);_0x1079ef?.['includes']('${')&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+'.configCode','message':_0x5ba426(0x24d)});if(_0x541fc3['failurePolicy']!==undefined&&_0x541fc3[_0x5ba426(0x1fa)]!==null){if(typeof _0x541fc3[_0x5ba426(0x1fa)]!==_0x5ba426(0x2dd))_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x310),'message':_0x5ba426(0x29c)});else!NOTIFICATION_FAILURE_POLICIES[_0x5ba426(0x2e6)](_0x541fc3[_0x5ba426(0x1fa)][_0x5ba426(0x284)]()[_0x5ba426(0x2fa)]())&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x310),'message':_0x5ba426(0x29e)});}!isRecord(_0x541fc3[_0x5ba426(0x334)])?_0x17f96f['push']({'path':_0x5cb27e+_0x5ba426(0x332),'message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x541fc3[_0x5ba426(0x334)],_0x5cb27e+_0x5ba426(0x332),_0x17f96f),validateNotificationRecipients(_0x541fc3[_0x5ba426(0x29a)],_0x5cb27e+_0x5ba426(0x287),_0x17f96f);}function validateNotificationTemplate(_0x18cc2d,_0x55a23a,_0x1fae7b){const _0x22f449=a299_0xf05f06;for(const _0x166189 of[_0x22f449(0x1e9),_0x22f449(0x2ad)]){const _0x531c1a=requireNotificationString(_0x18cc2d[_0x166189],_0x55a23a+'.'+_0x166189,_0x22f449(0x2fc)+_0x166189+_0x22f449(0x209),_0x1fae7b);if(_0x531c1a)validateNotificationPlaceholders(_0x531c1a,_0x55a23a+'.'+_0x166189,_0x1fae7b);}_0x18cc2d[_0x22f449(0x20c)]!==undefined&&_0x18cc2d[_0x22f449(0x20c)]!==null&&(typeof _0x18cc2d[_0x22f449(0x20c)]!=='string'?_0x1fae7b[_0x22f449(0x2b2)]({'path':_0x55a23a+_0x22f449(0x1e8),'message':_0x22f449(0x2d8)}):validateNotificationPlaceholders(_0x18cc2d['detailMarkdown'],_0x55a23a+'.detailMarkdown',_0x1fae7b)),validateNotificationFacts(_0x18cc2d[_0x22f449(0x2fd)],_0x55a23a+_0x22f449(0x22b),_0x1fae7b),validateNotificationActions(_0x18cc2d[_0x22f449(0x21d)],_0x55a23a+'.actions',_0x1fae7b);}function validateNotificationFacts(_0x507ea4,_0x80d0ae,_0x2da7be){const _0x363118=a299_0xf05f06;if(_0x507ea4===undefined||_0x507ea4===null)return;if(!Array['isArray'](_0x507ea4)){_0x2da7be[_0x363118(0x2b2)]({'path':_0x80d0ae,'message':_0x363118(0x270)});return;}_0x507ea4[_0x363118(0x2c4)]>MAX_NOTIFICATION_FACTS&&_0x2da7be['push']({'path':_0x80d0ae,'message':_0x363118(0x296)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x507ea4[_0x363118(0x309)]((_0x8ae1ab,_0x1e7fd8)=>{const _0x3b8800=_0x363118,_0x2f1bd6=_0x80d0ae+'['+_0x1e7fd8+']';if(!isRecord(_0x8ae1ab)){_0x2da7be[_0x3b8800(0x2b2)]({'path':_0x2f1bd6,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x49ee70 of[_0x3b8800(0x301),_0x3b8800(0x2f9)]){const _0x392789=requireNotificationString(_0x8ae1ab[_0x49ee70],_0x2f1bd6+'.'+_0x49ee70,_0x3b8800(0x2cd)+_0x49ee70+'\x20is\x20required.',_0x2da7be);_0x392789&&validateNotificationPlaceholders(_0x392789,_0x2f1bd6+'.'+_0x49ee70,_0x2da7be);}});}function validateNotificationActions(_0x12b30b,_0x347aad,_0x9d8876){const _0x544fe3=a299_0xf05f06;if(_0x12b30b===undefined||_0x12b30b===null)return;if(!Array[_0x544fe3(0x213)](_0x12b30b)){_0x9d8876[_0x544fe3(0x2b2)]({'path':_0x347aad,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x12b30b[_0x544fe3(0x2c4)]>MAX_NOTIFICATION_ACTIONS&&_0x9d8876[_0x544fe3(0x2b2)]({'path':_0x347aad,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x544fe3(0x28e)}),_0x12b30b[_0x544fe3(0x309)]((_0x1cc75e,_0xb1a007)=>{const _0x7a3f0=_0x544fe3,_0x284ec3=_0x347aad+'['+_0xb1a007+']';if(!isRecord(_0x1cc75e)){_0x9d8876[_0x7a3f0(0x2b2)]({'path':_0x284ec3,'message':_0x7a3f0(0x240)});return;}const _0x59e4bd=requireNotificationString(_0x1cc75e[_0x7a3f0(0x263)],_0x284ec3+_0x7a3f0(0x276),_0x7a3f0(0x2c6),_0x9d8876);if(_0x59e4bd)validateNotificationPlaceholders(_0x59e4bd,_0x284ec3+_0x7a3f0(0x276),_0x9d8876);const _0x3eea14=requireNotificationString(_0x1cc75e[_0x7a3f0(0x306)],_0x284ec3+_0x7a3f0(0x1f3),_0x7a3f0(0x219),_0x9d8876);if(!_0x3eea14)return;validateNotificationPlaceholders(_0x3eea14,_0x284ec3+_0x7a3f0(0x1f3),_0x9d8876),!/^https?:\/\//i[_0x7a3f0(0x288)](_0x3eea14)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x3eea14)&&_0x9d8876[_0x7a3f0(0x2b2)]({'path':_0x284ec3+_0x7a3f0(0x1f3),'message':_0x7a3f0(0x261)});});}function validateNotificationRecipients(_0x10c925,_0x44e43c,_0x4b38c3){const _0x252695=a299_0xf05f06;if(_0x10c925===undefined||_0x10c925===null)return;if(!Array['isArray'](_0x10c925)){_0x4b38c3[_0x252695(0x2b2)]({'path':_0x44e43c,'message':_0x252695(0x274)});return;}let _0x3023be=![];_0x10c925[_0x252695(0x309)]((_0x1fbcb8,_0x28c036)=>{const _0x1c0b86=_0x252695,_0x51d62a=_0x44e43c+'['+_0x28c036+']';if(!isRecord(_0x1fbcb8)){_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a,'message':_0x1c0b86(0x224)});return;}const _0x265aef=requireNotificationString(_0x1fbcb8[_0x1c0b86(0x265)],_0x51d62a+_0x1c0b86(0x2c5),'Notification\x20recipient.type\x20is\x20required.',_0x4b38c3);_0x265aef&&!NOTIFICATION_RECIPIENT_TYPES[_0x1c0b86(0x2e6)](_0x265aef[_0x1c0b86(0x2fa)]())&&_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x522bc8='TO';_0x1fbcb8[_0x1c0b86(0x316)]!==undefined&&_0x1fbcb8['role']!==null&&(typeof _0x1fbcb8[_0x1c0b86(0x316)]!=='string'?(_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+_0x1c0b86(0x26c),'message':_0x1c0b86(0x305)}),_0x522bc8=''):(_0x522bc8=_0x1fbcb8[_0x1c0b86(0x316)][_0x1c0b86(0x284)]()[_0x1c0b86(0x2fa)](),!NOTIFICATION_RECIPIENT_ROLES[_0x1c0b86(0x2e6)](_0x522bc8)&&_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+_0x1c0b86(0x26c),'message':_0x1c0b86(0x258)})));if(_0x522bc8==='TO')_0x3023be=!![];const _0x28b134=requireNotificationString(_0x1fbcb8[_0x1c0b86(0x2f9)],_0x51d62a+_0x1c0b86(0x1df),_0x1c0b86(0x1d0),_0x4b38c3);_0x28b134&&validateNotificationPlaceholders(_0x28b134,_0x51d62a+_0x1c0b86(0x1df),_0x4b38c3);}),_0x10c925['length']>0x0&&!_0x3023be&&_0x4b38c3[_0x252695(0x2b2)]({'path':_0x44e43c,'message':_0x252695(0x28a)});}function requireNotificationString(_0x5c4683,_0x520626,_0x425139,_0x4a09aa){const _0x48ff56=a299_0xf05f06;if(typeof _0x5c4683!=='string'||_0x5c4683['trim']()==='')return _0x4a09aa['push']({'path':_0x520626,'message':_0x425139}),undefined;return _0x5c4683[_0x48ff56(0x284)]();}function validateNotificationPlaceholders(_0x2bc1de,_0x8100cc,_0x429874){const _0x516a31=a299_0xf05f06;for(const _0x4915a2 of _0x2bc1de[_0x516a31(0x337)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3c0593=_0x4915a2[0x1]?.['trim']()??'',_0x3e0a95=_0x3c0593[_0x516a31(0x2c9)]('.'),_0x2c5510=_0x3e0a95>=0x0?_0x3c0593[_0x516a31(0x2c0)](0x0,_0x3e0a95):_0x3c0593,_0x32bc33=_0x3e0a95>=0x0?_0x3c0593['slice'](_0x3e0a95+0x1)[_0x516a31(0x284)]():'';(![_0x516a31(0x2f1),'context',_0x516a31(0x2a4)][_0x516a31(0x2de)](_0x2c5510)||_0x32bc33==='')&&_0x429874['push']({'path':_0x8100cc,'message':_0x516a31(0x31a)+_0x4915a2[0x0]+'.'});}_0x2bc1de['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x516a31(0x2de)]('${')&&_0x429874['push']({'path':_0x8100cc,'message':_0x516a31(0x2f8)});}function validateEdge(_0xba11c8,_0xb6ba94,_0x478750){const _0x1bbd31=a299_0xf05f06;_0xba11c8[_0x1bbd31(0x246)]!==undefined&&typeof _0xba11c8['name']!==_0x1bbd31(0x2dd)&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x2f3),'message':_0x1bbd31(0x2dc)}),_0xba11c8[_0x1bbd31(0x1ea)]!==undefined&&typeof _0xba11c8[_0x1bbd31(0x1ea)]!==_0x1bbd31(0x228)&&_0x478750['push']({'path':_0xb6ba94+_0x1bbd31(0x1f5),'message':_0x1bbd31(0x266)}),_0xba11c8[_0x1bbd31(0x2d9)]!==undefined&&(!Array['isArray'](_0xba11c8[_0x1bbd31(0x2d9)])?_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x25a),'message':_0x1bbd31(0x1fb)}):_0xba11c8[_0x1bbd31(0x2d9)][_0x1bbd31(0x309)]((_0x14a0b7,_0x16937e)=>{const _0x23ed1a=_0x1bbd31;if(!isRecord(_0x14a0b7)){_0x478750['push']({'path':_0xb6ba94+'.waypoints['+_0x16937e+']','message':_0x23ed1a(0x2e1)});return;}for(const _0x4a1c05 of['x','y']){const _0x53f839=_0x14a0b7[_0x4a1c05];(typeof _0x53f839!=='number'||!Number[_0x23ed1a(0x275)](_0x53f839))&&_0x478750[_0x23ed1a(0x2b2)]({'path':_0xb6ba94+_0x23ed1a(0x21f)+_0x16937e+'].'+_0x4a1c05,'message':_0x23ed1a(0x1e7)+_0x4a1c05+_0x23ed1a(0x1c7)});}})),_0xba11c8[_0x1bbd31(0x2b7)]!==undefined&&!CONDITION_TYPES[_0x1bbd31(0x2e6)](_0xba11c8[_0x1bbd31(0x2b7)])&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26e),'message':'Unsupported\x20condition\x20type:\x20'+String(_0xba11c8[_0x1bbd31(0x2b7)])+'.'}),_0xba11c8[_0x1bbd31(0x2b7)]==='EXPRESSION'&&(typeof _0xba11c8[_0x1bbd31(0x1ed)]!==_0x1bbd31(0x2dd)||_0xba11c8[_0x1bbd31(0x1ed)][_0x1bbd31(0x284)]()==='')&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26d),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0xba11c8[_0x1bbd31(0x1ea)]===!![]&&_0xba11c8[_0x1bbd31(0x2b7)]!==_0x1bbd31(0x2fb)&&_0x478750['push']({'path':_0xb6ba94+_0x1bbd31(0x1f5),'message':_0x1bbd31(0x1f0)}),_0xba11c8['defaultFlow']===!![]&&typeof _0xba11c8[_0x1bbd31(0x1ed)]===_0x1bbd31(0x2dd)&&_0xba11c8['expression'][_0x1bbd31(0x284)]()!==''&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26d),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x6ef129,_0x2a31cb,_0x3f06de,_0x3429c3,_0x1da8a0,_0x1d8f4c,_0x50d01c){const _0x30bae0=a299_0xf05f06;for(const [_0x4ae2d9,_0x996446]of _0x6ef129){const _0x27e39d=_0x1da8a0[_0x30bae0(0x24e)](_0x4ae2d9)??[],_0x5919c6=_0x3429c3[_0x30bae0(0x24e)](_0x4ae2d9)??[];_0x996446[_0x30bae0(0x265)]!==_0x30bae0(0x2f7)&&_0x27e39d[_0x30bae0(0x2c4)]===0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x235)});_0x996446['type']!==_0x30bae0(0x2ff)&&_0x5919c6['length']===0x0&&_0x50d01c['push']({'path':'flowJson.nodes.'+_0x4ae2d9,'message':_0x30bae0(0x322)});_0x996446[_0x30bae0(0x265)]===_0x30bae0(0x2f7)&&_0x27e39d['length']>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x996446[_0x30bae0(0x265)]===_0x30bae0(0x2ff)&&_0x5919c6['length']>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x1c5)});if(_0x996446['type']===_0x30bae0(0x239)){_0x5919c6[_0x30bae0(0x2c4)]<0x2&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x1e6c62=_0x5919c6[_0x30bae0(0x29f)](_0x3ab121=>_0x3ab121['defaultFlow']===!![]);_0x1e6c62[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x2ee)});if(_0x1e6c62[_0x30bae0(0x2c4)]===0x1){const _0x123c40=_0x1e6c62[0x0],_0x45ee33=_0x1d8f4c[_0x30bae0(0x24e)](_0x123c40)??_0x30bae0(0x2bb);_0x123c40[_0x30bae0(0x2b7)]!=='ALWAYS'&&_0x50d01c['push']({'path':_0x45ee33+_0x30bae0(0x26e),'message':_0x30bae0(0x207)});_0x123c40['expression']!==undefined&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x45ee33+_0x30bae0(0x26d),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2d8380 of _0x5919c6){if(_0x2d8380===_0x123c40)continue;const _0x1b343a=_0x1d8f4c['get'](_0x2d8380)??_0x30bae0(0x2bb);if(_0x2d8380['conditionType']!==_0x30bae0(0x27f))_0x50d01c['push']({'path':_0x1b343a+_0x30bae0(0x26e),'message':_0x30bae0(0x245)});else(typeof _0x2d8380[_0x30bae0(0x1ed)]!=='string'||_0x2d8380['expression'][_0x30bae0(0x284)]()==='')&&_0x50d01c['push']({'path':_0x1b343a+'.expression','message':_0x30bae0(0x2df)});}}}if(_0x996446['type']===_0x30bae0(0x282)&&(_0x996446[_0x30bae0(0x1fd)]??_0x30bae0(0x282))===_0x30bae0(0x1d5)){if(_0x5919c6[_0x30bae0(0x2c4)]!==0x1)_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x30f)});else{const _0x58b273=_0x5919c6[0x0];((_0x58b273[_0x30bae0(0x2b7)]??_0x30bae0(0x2fb))!==_0x30bae0(0x2fb)||_0x58b273[_0x30bae0(0x1ea)]===!![]||typeof _0x58b273[_0x30bae0(0x1ed)]==='string'&&_0x58b273['expression']['trim']()!=='')&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x1d8f4c['get'](_0x58b273)??_0x30bae0(0x2bb),'message':_0x30bae0(0x295)});}}else{if(_0x996446['type']===_0x30bae0(0x282)){const _0x2813b6=_0x5919c6['map'](_0x3b1d0c=>_0x3b1d0c[_0x30bae0(0x2b7)]??'ALWAYS'),_0x5c69da=_0x2813b6['filter'](_0x18c892=>_0x18c892!==_0x30bae0(0x28c)&&_0x18c892!=='REJECTED');_0x5c69da[_0x30bae0(0x2c4)]>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x218)}),_0x2813b6['filter'](_0x165a9a=>_0x165a9a===_0x30bae0(0x28c))[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x2813b6['filter'](_0x106a1e=>_0x106a1e===_0x30bae0(0x2a8))[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c['push']({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x242)}),_0x5919c6[_0x30bae0(0x24a)](_0x1b5beb=>_0x1b5beb[_0x30bae0(0x1ea)]===!![])&&_0x50d01c['push']({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x1f8)});}}}const _0x317010=new Set(),_0x430d48=_0x26f8be=>{const _0x4baed4=_0x30bae0;if(_0x317010[_0x4baed4(0x2e6)](_0x26f8be))return;_0x317010[_0x4baed4(0x29b)](_0x26f8be);for(const _0x52c2a2 of _0x3429c3[_0x4baed4(0x24e)](_0x26f8be)??[]){const _0x5a25b3=resolveEdgeEndpoint(_0x52c2a2[_0x4baed4(0x216)],_0x52c2a2[_0x4baed4(0x23c)]);if(_0x5a25b3&&_0x6ef129[_0x4baed4(0x2e6)](_0x5a25b3))_0x430d48(_0x5a25b3);}};_0x430d48(_0x2a31cb);for(const _0x24b46c of _0x6ef129[_0x30bae0(0x30d)]()){!_0x317010[_0x30bae0(0x2e6)](_0x24b46c)&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x24b46c,'message':_0x30bae0(0x2d5)});}const _0x48eb82=_0x3f06de['some'](_0x3d182c=>_0x317010[_0x30bae0(0x2e6)](_0x3d182c));if(!_0x48eb82){_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x2bb),'message':_0x30bae0(0x232)});return;}const _0x22f6bf=new Set(),_0xf7cd0=_0x20e950=>{const _0x1bbe01=_0x30bae0;if(_0x22f6bf[_0x1bbe01(0x2e6)](_0x20e950))return;_0x22f6bf[_0x1bbe01(0x29b)](_0x20e950);for(const _0x1b5983 of _0x1da8a0[_0x1bbe01(0x24e)](_0x20e950)??[]){const _0x3934ce=resolveEdgeEndpoint(_0x1b5983[_0x1bbe01(0x30a)],_0x1b5983[_0x1bbe01(0x2f0)]);if(_0x3934ce&&_0x6ef129[_0x1bbe01(0x2e6)](_0x3934ce))_0xf7cd0(_0x3934ce);}};for(const _0x330af6 of _0x3f06de){if(_0x6ef129[_0x30bae0(0x2e6)](_0x330af6))_0xf7cd0(_0x330af6);}for(const _0x5d4ce1 of _0x317010){!_0x22f6bf['has'](_0x5d4ce1)&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x5d4ce1,'message':_0x30bae0(0x32d)});}}function validateApprovalResults(_0x238d63,_0x1201e0,_0x4bbb4e,_0x44d27d){const _0x220656=a299_0xf05f06;if(_0x1201e0===0x0)return;const _0x110989=new Set(_0x4bbb4e[_0x220656(0x273)](_0x5639eb=>_0x238d63['get'](_0x5639eb)?.[_0x220656(0x317)])[_0x220656(0x29f)](_0x373d04=>typeof _0x373d04===_0x220656(0x2dd)));for(const _0x287bb0 of['APPROVED',_0x220656(0x2a8)]){!_0x110989['has'](_0x287bb0)&&_0x44d27d['push']({'path':_0x220656(0x286),'message':_0x220656(0x313)+_0x287bb0+'.'});}}function validateScriptResultReferences(_0x4e1dcd,_0x1eede4,_0x2c861b,_0x4666ff,_0x54717e,_0x43213a,_0x48f007){const _0x5335cd=a299_0xf05f06;if(_0x43213a[_0x5335cd(0x25e)]===0x0)return;const _0x76631a=new Set(),_0x460a64=_0xae85d2=>{const _0x3ee938=_0x5335cd;if(!_0x76631a['has'](_0xae85d2)&&_0x4e1dcd['has'](_0xae85d2)){_0x76631a[_0x3ee938(0x29b)](_0xae85d2);for(const _0x55a0c5 of _0x2c861b[_0x3ee938(0x24e)](_0xae85d2)??[]){const _0x1e4861=resolveEdgeEndpoint(_0x55a0c5['target'],_0x55a0c5[_0x3ee938(0x23c)]);if(_0x1e4861)_0x460a64(_0x1e4861);}}};_0x460a64(_0x1eede4);const _0x578e5b=new Map();for(const _0xb4fe9e of _0x76631a){_0x578e5b[_0x5335cd(0x328)](_0xb4fe9e,_0xb4fe9e===_0x1eede4?new Set([_0x1eede4]):new Set(_0x76631a));}let _0x111bab=!![];while(_0x111bab){_0x111bab=![];for(const _0x53b5eb of _0x76631a){if(_0x53b5eb===_0x1eede4)continue;const _0x2cba2b=(_0x4666ff['get'](_0x53b5eb)??[])['map'](_0x1b67f3=>resolveEdgeEndpoint(_0x1b67f3[_0x5335cd(0x30a)],_0x1b67f3[_0x5335cd(0x2f0)]))[_0x5335cd(0x29f)](_0x2339c5=>Boolean(_0x2339c5&&_0x76631a[_0x5335cd(0x2e6)](_0x2339c5)));if(_0x2cba2b[_0x5335cd(0x2c4)]===0x0)continue;const _0x332b4c=new Set(_0x578e5b[_0x5335cd(0x24e)](_0x2cba2b[0x0])??[]);for(const _0x1914ba of _0x2cba2b[_0x5335cd(0x2c0)](0x1)){const _0xcd7c3a=_0x578e5b[_0x5335cd(0x24e)](_0x1914ba)??new Set();for(const _0x48904f of _0x332b4c){if(!_0xcd7c3a[_0x5335cd(0x2e6)](_0x48904f))_0x332b4c[_0x5335cd(0x1ee)](_0x48904f);}}_0x332b4c[_0x5335cd(0x29b)](_0x53b5eb);const _0x3a0776=_0x578e5b[_0x5335cd(0x24e)](_0x53b5eb);!setsEqual(_0x3a0776,_0x332b4c)&&(_0x578e5b[_0x5335cd(0x328)](_0x53b5eb,_0x332b4c),_0x111bab=!![]);}}for(const [_0x3a0c05,_0x1b6131]of _0x2c861b){const _0x41ef44=_0x578e5b['get'](_0x3a0c05);if(!_0x41ef44)continue;for(const _0x39b4ba of _0x1b6131){if(_0x39b4ba[_0x5335cd(0x2b7)]!==_0x5335cd(0x27f)||typeof _0x39b4ba[_0x5335cd(0x1ed)]!==_0x5335cd(0x2dd))continue;for(const [_0x4e48dd,_0x4f8d2a]of _0x43213a){expressionReferencesVariable(_0x39b4ba['expression'],_0x4e48dd)&&!_0x41ef44[_0x5335cd(0x2e6)](_0x4f8d2a)&&_0x48f007[_0x5335cd(0x2b2)]({'path':(_0x54717e[_0x5335cd(0x24e)](_0x39b4ba)??_0x5335cd(0x2bb))+_0x5335cd(0x26d),'message':_0x5335cd(0x281)+_0x4e48dd+_0x5335cd(0x241)+_0x4f8d2a+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x3a0c05+'.'});}}}}function expressionReferencesVariable(_0x2e0412,_0x2a87f6){const _0x1cf92b=a299_0xf05f06;let _0x4540a3=0x0;while(_0x4540a3<_0x2e0412[_0x1cf92b(0x2c4)]){const _0x2c9809=_0x2e0412[_0x4540a3];if(_0x2c9809==='\x27'||_0x2c9809==='\x22'){_0x4540a3=skipQuotedExpressionSegment(_0x2e0412,_0x4540a3,_0x2c9809);continue;}if(!/[A-Za-z_]/[_0x1cf92b(0x288)](_0x2c9809)){_0x4540a3+=0x1;continue;}const _0x5eef13=_0x4540a3;_0x4540a3+=0x1;while(_0x4540a3<_0x2e0412[_0x1cf92b(0x2c4)]&&/[A-Za-z0-9_]/[_0x1cf92b(0x288)](_0x2e0412[_0x4540a3])){_0x4540a3+=0x1;}if(_0x2e0412[_0x1cf92b(0x2c0)](_0x5eef13,_0x4540a3)!==_0x2a87f6)continue;let _0x1b08f2=_0x5eef13-0x1;while(_0x1b08f2>=0x0&&/\s/[_0x1cf92b(0x288)](_0x2e0412[_0x1b08f2])){_0x1b08f2-=0x1;}if(_0x2e0412[_0x1b08f2]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x102d2b,_0x53ecbc,_0x384ce4){let _0xf8f02b=_0x53ecbc+0x1;while(_0xf8f02b<_0x102d2b['length']){if(_0x102d2b[_0xf8f02b]==='\x5c'){_0xf8f02b+=0x2;continue;}if(_0x102d2b[_0xf8f02b]===_0x384ce4)return _0xf8f02b+0x1;_0xf8f02b+=0x1;}return _0xf8f02b;}function resolveEffectiveResultVariable(_0x1f26fb,_0x379185){const _0x283f6c=a299_0xf05f06;if(_0x1f26fb===undefined||_0x1f26fb===null||_0x379185&&_0x1f26fb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1f26fb!==_0x283f6c(0x2dd)||!VARIABLE_PATTERN['test'](_0x1f26fb)||RESERVED_RESULT_VARIABLES[_0x283f6c(0x2e6)](_0x1f26fb)||_0x1f26fb[_0x283f6c(0x2f4)]('approval_sys_'))return undefined;return _0x1f26fb;}function a299_0x495f(_0x1ed31c,_0x35b416){_0x1ed31c=_0x1ed31c-0x1c5;const _0x40f3ed=a299_0x40f3();let _0x495f0a=_0x40f3ed[_0x1ed31c];return _0x495f0a;}function registerResultVariableOwner(_0x51367a,_0x547b77,_0x4c5fb6,_0x37729f){const _0xdac1ec=a299_0xf05f06;if(_0x51367a['has'](_0x547b77)){_0x37729f[_0xdac1ec(0x2b2)]({'path':_0xdac1ec(0x286),'message':'Duplicate\x20resultVariable:\x20'+_0x547b77+'.'});return;}_0x51367a[_0xdac1ec(0x328)](_0x547b77,_0x4c5fb6);}function setsEqual(_0x3c5fbb,_0x24c90b){const _0x321fe5=a299_0xf05f06;return _0x3c5fbb[_0x321fe5(0x25e)]===_0x24c90b[_0x321fe5(0x25e)]&&[..._0x3c5fbb][_0x321fe5(0x2c2)](_0x11b1ae=>_0x24c90b[_0x321fe5(0x2e6)](_0x11b1ae));}function isValidUserId(_0x292f52){const _0x23d4a7=a299_0xf05f06;if(typeof _0x292f52===_0x23d4a7(0x2dd))return _0x292f52[_0x23d4a7(0x284)]()[_0x23d4a7(0x2c4)]>0x0;return Number[_0x23d4a7(0x23a)](_0x292f52)&&Number(_0x292f52)>0x0;}function resolveEdgeEndpoint(_0x1e2d7e,_0x2b514c){const _0x575249=a299_0xf05f06;if(typeof _0x1e2d7e==='string'&&_0x1e2d7e[_0x575249(0x284)]())return _0x1e2d7e['trim']();if(typeof _0x2b514c===_0x575249(0x2dd)&&_0x2b514c[_0x575249(0x284)]())return _0x2b514c[_0x575249(0x284)]();return undefined;}function removeEmptyMetadata(_0x5e7d94,_0x3fd1cb,_0x5526eb,_0x561890){const _0x1ada0b=a299_0xf05f06;if(Array[_0x1ada0b(0x213)](_0x5e7d94)){_0x5e7d94[_0x1ada0b(0x309)]((_0x308d3b,_0x5ae966)=>removeEmptyMetadata(_0x308d3b,_0x3fd1cb+'['+_0x5ae966+']',_0x5526eb,_0x561890));return;}if(!isRecord(_0x5e7d94))return;for(const [_0x5c0e6b,_0x1c4988]of Object[_0x1ada0b(0x321)](_0x5e7d94)){const _0x227b71=_0x3fd1cb+'.'+_0x5c0e6b;if(_0x5c0e6b===_0x1ada0b(0x20e)&&isEmptyJsonValue(_0x1c4988)){delete _0x5e7d94[_0x5c0e6b],_0x561890[_0x1ada0b(0x2b2)](_0x227b71),_0x5526eb[_0x1ada0b(0x2b2)]({'code':_0x1ada0b(0x21a),'path':_0x227b71,'message':_0x227b71+_0x1ada0b(0x2d4)});continue;}removeEmptyMetadata(_0x1c4988,_0x227b71,_0x5526eb,_0x561890);}}function isEmptyJsonValue(_0x1a0175){const _0x56873b=a299_0xf05f06;if(_0x1a0175===null||_0x1a0175===undefined)return!![];if(typeof _0x1a0175===_0x56873b(0x2dd))return _0x1a0175[_0x56873b(0x284)]()==='';if(Array[_0x56873b(0x213)](_0x1a0175))return _0x1a0175[_0x56873b(0x2c4)]===0x0;return isRecord(_0x1a0175)&&Object[_0x56873b(0x30d)](_0x1a0175)['length']===0x0;}function isRecord(_0x409ee8){const _0x14f69f=a299_0xf05f06;return typeof _0x409ee8===_0x14f69f(0x206)&&_0x409ee8!==null&&!Array[_0x14f69f(0x213)](_0x409ee8);}function cloneJsonValue(_0x498313){const _0x55a3c7=a299_0xf05f06;return JSON[_0x55a3c7(0x31c)](JSON[_0x55a3c7(0x251)](_0x498313));}export async function readFlowConfigFile(_0x477bf4){const _0x4efc2c=a299_0xf05f06,_0x40f5b3=await readFile(resolve(_0x477bf4),_0x4efc2c(0x327));return JSON[_0x4efc2c(0x31c)](_0x40f5b3);}
1
+ const a299_0x2f5efa=a299_0x4ea1;(function(_0x3cfac2,_0x271596){const _0x3bd994=a299_0x4ea1,_0x27ee81=_0x3cfac2();while(!![]){try{const _0x4844f3=-parseInt(_0x3bd994(0x1c3))/0x1+parseInt(_0x3bd994(0x1ad))/0x2+-parseInt(_0x3bd994(0x27e))/0x3*(parseInt(_0x3bd994(0x245))/0x4)+-parseInt(_0x3bd994(0x279))/0x5+parseInt(_0x3bd994(0x1f1))/0x6+-parseInt(_0x3bd994(0x261))/0x7*(parseInt(_0x3bd994(0x1ff))/0x8)+parseInt(_0x3bd994(0x1b3))/0x9;if(_0x4844f3===_0x271596)break;else _0x27ee81['push'](_0x27ee81['shift']());}catch(_0x328c06){_0x27ee81['push'](_0x27ee81['shift']());}}}(a299_0x2e21,0x89872));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';function a299_0x2e21(){const _0x2e80c4=['context','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','source','waypoint.','stringify','templateName','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','role','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','\x20must\x20be\x20a\x20finite\x20number.','startsWith','retryCount','#/$defs/flowEdge','.timeout.resultVariable','indexOf','isSafeInteger','bindDatasetCode','recipients','approval_sys_','DAYS','name','AUTO_REJECT','isArray','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','Unsupported\x20node\x20type:\x20','toUpperCase','.assignee.strategy','position','approval.simple-flow.v1','#/$defs/timeAmount','.cc.recipientUserIds[','.waypoints','CUSTOM_PAGE','4KMizFj','expression','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','transferCandidates','Notification\x20recipient.type\x20is\x20required.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','template','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','flowJson\x20must\x20be\x20an\x20object.','path','startPath\x20must\x20be\x20a\x20non-empty\x20string.','SINGLE','Notification\x20template.','SCRIPT\x20node\x20requires\x20scriptName.','text','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','Unsupported\x20condition\x20type:\x20','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','mode','isInteger','PLATFORM_FORM','formPermissions','retryInterval','delete','.template','Edge\x20source\x20node\x20not\x20found:\x20','EXPRESSION','994FeXMNz','.\x20This\x20CLI\x20supports\x20only\x20','slice','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','duration','edge\x20source\x20is\x20required.','utf8','flowJson.edges','.unit','warnings','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','failurePolicy','assignee','flowJson.schemaVersion','includes','HANDLE','recipientUserIds','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','APPROVAL','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','CONTINUE','.sequential','string','.timeout','4774815JDYOLy','transferCandidates\x20must\x20be\x20an\x20object.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','MINUTES','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','1445853vsnwek','type','some','edge\x20target\x20is\x20required.','EXECUTE_BFF','EXPRESSION\x20edge\x20requires\x20expression.','get','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','START','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','flowName\x20is\x20required.','Notification\x20fact\x20must\x20be\x20an\x20object.','url','formDefinitions','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','Notification\x20recipient\x20must\x20be\x20an\x20object.','ALWAYS','\x20->\x20','userIds','timeout\x20must\x20be\x20an\x20object.','ALL','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','CONDITION','nodes','overwrite','scriptName','pageMode','label','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','.scriptName','map','.url','has','SECONDS','Notification\x20configCode\x20is\x20required.','flowJson','Node\x20has\x20no\x20incoming\x20edge.','^[1-9][0-9]*$','FAIL','object','Duplicate\x20value:\x20','edges','set','.actions','NOTIFICATION\x20node\x20requires\x20config.','approved','catch','sequential','approval_sys_pageId','every','timeout.interrupting\x20must\x20be\x20a\x20boolean.',',\x20but\x20node\x20','.config','flowJson.startPageId','.id','conditionType','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','target','.source','pageId','configCode','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','Notification\x20action\x20must\x20be\x20an\x20object.','sourceNodeId','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','Duplicate\x20edge\x20route:\x20','.assignee.userIds','EMAIL','approval_sys_initiatorUserId','approvalMode','.assignee','.facts','value\x20must\x20be\x20a\x20non-empty\x20string.','flowJson.startPath','.timeout.duration','flowDesc\x20must\x20be\x20a\x20string.','Notification\x20action.url\x20is\x20required.','push','.transferCandidates.userIds','event','.failurePolicy','async\x20must\x20be\x20an\x20object.','flowJson.nodes[','entries','summary','Unsupported\x20notification\x20placeholder:\x20','scriptResult','isFinite','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.name','ROLE','approval_sys_appCode','position.','flowDesc','appCode','title','.resultVariable','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','.timeout.action','REJECTED','.recipients','waypoints','boolean','.pageId','.cc','action','forEach','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','#/$defs/flowNode','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','parse','.async','.detailMarkdown','async','USER','call','approval_sys_processInstanceId','legacy_field_removed','add','length','FIXED\x20assignee\x20requires\x20userIds.','Reserved\x20resultVariable:\x20','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.position.','edge\x20must\x20be\x20an\x20object.','.role','Notification\x20fact.','array','flowName','.expression','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.taskMode','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','668788hhdtpm','.transferCandidates.userIds[','matchAll','.timeout.enabled','empty_metadata_removed','readSources','22908294NPDdEo','approval_sys_initiatorUsername','config','SCRIPT','flowType\x20is\x20required.','schemaVersion','#/$defs/userId','strategy','nodes\x20must\x20be\x20an\x20array.','value\x20must\x20be\x20an\x20array.','join','.configCode','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','AUTO_APPROVE','Unsupported\x20task\x20mode:\x20','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','74018GMWVOa','test','.type','targetNodeId','flowJson.','visible','flowJson.nodes','taskMode','facts','integer','ANY','FIXED','interrupting','prototype','flowJson.nodes.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','hasOwnProperty','#/$defs/position','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','\x20was\x20empty\x20and\x20was\x20removed.','.position','Expression\x20references\x20SCRIPT\x20resultVariable\x20','MAX_SAFE_INTEGER','APPROVAL\x20node\x20requires\x20assignee.','.cc.visible','node\x20must\x20be\x20an\x20object.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','flowType','datasetCode\x20must\x20be\x20a\x20string.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.target','Unsupported\x20notification\x20version:\x20','trim','resultVariable','INDEPENDENT_FLOW','approval_sys_operationType','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','FORM_FLOW','.version','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','.assignee.roleId','Unsupported\x20pageMode:\x20','detailMarkdown','.transferCandidates','].path','NaN','315552avISAV','version','.cc.recipientUserIds','.async.retryCount','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','keys','Node\x20has\x20no\x20outgoing\x20edge.','HOURS','defaultFlow\x20must\x20be\x20a\x20boolean.','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Notification\x20template\x20supports\x20at\x20most\x20','defaultFlow','enabled','48344ZSSKwe','pageIds','END','datasetCode','.conditionType','number','value','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','approval_sys_datasetCode','Edge\x20target\x20node\x20not\x20found:\x20','timeout','Unsupported\x20approval\x20mode:\x20','Node\x20cannot\x20reach\x20any\x20END.','.async.retryInterval','BCC','flowKey','Notification\x20recipients\x20must\x20be\x20an\x20array.','formSchema','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','.waypoints[','APPROVED','^[A-Za-z_][A-Za-z0-9_]*$','.defaultFlow','unit','replace','size','flowJson.pageMode','Unsupported\x20schemaVersion:\x20','\x20is\x20required.','filter','Duplicate\x20cc\x20recipient\x20userId:\x20','edges\x20must\x20be\x20an\x20array.','NOTIFICATION','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'];a299_0x2e21=function(){return _0x2e80c4;};return a299_0x2e21();}import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':'https://json-schema.org/draft/2020-12/schema','$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':'Rabetbase\x20FlowConfig','type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x1a8),'flowType',a299_0x2f5efa(0x2a3)],'$defs':{'userId':{'anyOf':[{'type':a299_0x2f5efa(0x277),'minLength':0x1},{'type':a299_0x2f5efa(0x1cc),'minimum':0x1}]},'position':{'type':a299_0x2f5efa(0x2a7),'required':['x','y'],'properties':{'x':{'type':a299_0x2f5efa(0x204),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0x2f5efa(0x205),'unit'],'properties':{'value':{'type':a299_0x2f5efa(0x1cc),'minimum':0x1},'unit':{'enum':[a299_0x2f5efa(0x2a1),a299_0x2f5efa(0x27c),'HOURS',a299_0x2f5efa(0x236)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x2f5efa(0x2a7),'required':['id',a299_0x2f5efa(0x27f),'name',a299_0x2f5efa(0x23f)],'properties':{'id':{'type':a299_0x2f5efa(0x277),'pattern':a299_0x2f5efa(0x215)},'type':{'enum':['START',a299_0x2f5efa(0x201),a299_0x2f5efa(0x273),a299_0x2f5efa(0x296),a299_0x2f5efa(0x1b6),a299_0x2f5efa(0x220)]},'name':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'path':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a299_0x2f5efa(0x251),'ALL',a299_0x2f5efa(0x1cd)]},'taskMode':{'enum':[a299_0x2f5efa(0x273),a299_0x2f5efa(0x270)]},'assignee':{'type':'object','required':['strategy'],'properties':{'strategy':{'enum':[a299_0x2f5efa(0x1ce),a299_0x2f5efa(0x181)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2f5efa(0x1b9)}},'roleId':{'anyOf':[{'type':a299_0x2f5efa(0x1cc),'minimum':0x1},{'type':a299_0x2f5efa(0x277),'pattern':a299_0x2f5efa(0x2a5)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x1ba),a299_0x2f5efa(0x292)],'properties':{'strategy':{'const':a299_0x2f5efa(0x1ce)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2f5efa(0x1b9)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x2f5efa(0x18d)},'result':{'enum':[a299_0x2f5efa(0x214),a299_0x2f5efa(0x18a)]},'scriptName':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'resultVariable':{'type':a299_0x2f5efa(0x277),'pattern':a299_0x2f5efa(0x215)},'async':{'type':a299_0x2f5efa(0x2a7),'properties':{'enabled':{'type':a299_0x2f5efa(0x18d)},'retryCount':{'type':a299_0x2f5efa(0x1cc),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x2f5efa(0x241)}},'additionalProperties':!![]},'timeout':{'type':a299_0x2f5efa(0x2a7),'properties':{'enabled':{'type':a299_0x2f5efa(0x18d)},'duration':{'$ref':a299_0x2f5efa(0x241)},'action':{'enum':[a299_0x2f5efa(0x1c0),a299_0x2f5efa(0x238),'EXECUTE_BFF']},'interrupting':{'type':'boolean'},'scriptName':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x2f5efa(0x215)}},'additionalProperties':!![]},'cc':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x271)],'properties':{'recipientUserIds':{'type':a299_0x2f5efa(0x1a7),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x2f5efa(0x277),'minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':a299_0x2f5efa(0x277),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x162),a299_0x2f5efa(0x24c)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'failurePolicy':{'enum':[a299_0x2f5efa(0x275),a299_0x2f5efa(0x2a6)]},'template':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x186),'summary'],'properties':{'title':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'summary':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':'array','maxItems':0x8,'items':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x29b),a299_0x2f5efa(0x205)],'properties':{'label':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x2f5efa(0x1a7),'maxItems':0x2,'items':{'type':'object','required':['text',a299_0x2f5efa(0x28c)],'properties':{'text':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'url':{'type':a299_0x2f5efa(0x277),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':a299_0x2f5efa(0x2a7),'required':[a299_0x2f5efa(0x27f),a299_0x2f5efa(0x205)],'properties':{'type':{'enum':[a299_0x2f5efa(0x19a),'ROLE',a299_0x2f5efa(0x169)]},'value':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x2f5efa(0x20d)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x2f5efa(0x2a7),'properties':{'id':{'type':a299_0x2f5efa(0x277),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':'string','minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'targetNodeId':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'conditionType':{'enum':[a299_0x2f5efa(0x290),a299_0x2f5efa(0x214),'REJECTED',a299_0x2f5efa(0x260)]},'expression':{'type':a299_0x2f5efa(0x277)},'defaultFlow':{'type':a299_0x2f5efa(0x18d)},'name':{'type':'string'},'waypoints':{'type':a299_0x2f5efa(0x1a7),'items':{'$ref':a299_0x2f5efa(0x1d4)}}},'allOf':[{'anyOf':[{'required':['source']},{'required':['sourceNodeId']}]},{'anyOf':[{'required':['target']},{'required':[a299_0x2f5efa(0x1c6)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'flowDesc':{'type':a299_0x2f5efa(0x277)},'flowType':{'enum':[a299_0x2f5efa(0x1e8),a299_0x2f5efa(0x1e5)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':'integer','minimum':0x1,'maximum':Number[a299_0x2f5efa(0x1d9)]},'pageIds':{'type':'array','items':{'type':a299_0x2f5efa(0x1cc),'minimum':0x1,'maximum':Number[a299_0x2f5efa(0x1d9)]}},'templateName':![],'flowJson':{'type':a299_0x2f5efa(0x2a7),'required':['nodes',a299_0x2f5efa(0x2a9)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x2f5efa(0x277),'const':a299_0x2f5efa(0x240),'description':a299_0x2f5efa(0x255)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x2f5efa(0x244)},'startPageId':![],'startPath':{'type':a299_0x2f5efa(0x277),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2f5efa(0x193)}},'edges':{'type':a299_0x2f5efa(0x1a7),'minItems':0x1,'items':{'$ref':a299_0x2f5efa(0x22f)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a299_0x2f5efa(0x1a8),a299_0x2f5efa(0x233),'datasetCode',a299_0x2f5efa(0x185),a299_0x2f5efa(0x2bb),'templateName'],REMOVED_ROOT_FIELDS=['id','appCode',a299_0x2f5efa(0x228)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x2f5efa(0x240),NODE_TYPES=new Set([a299_0x2f5efa(0x286),a299_0x2f5efa(0x201),a299_0x2f5efa(0x273),a299_0x2f5efa(0x296),a299_0x2f5efa(0x1b6),a299_0x2f5efa(0x220)]),CONDITION_TYPES=new Set([a299_0x2f5efa(0x290),a299_0x2f5efa(0x214),'REJECTED',a299_0x2f5efa(0x260)]),APPROVAL_MODES=new Set(['SINGLE',a299_0x2f5efa(0x294),a299_0x2f5efa(0x1cd)]),APPROVAL_TASK_MODES=new Set([a299_0x2f5efa(0x273),a299_0x2f5efa(0x270)]),FLOW_TIME_UNITS=new Set([a299_0x2f5efa(0x2a1),a299_0x2f5efa(0x27c),a299_0x2f5efa(0x1f8),a299_0x2f5efa(0x236)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a299_0x2f5efa(0x238),a299_0x2f5efa(0x282)]),FLOW_TYPES=new Set([a299_0x2f5efa(0x1e8),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a299_0x2f5efa(0x244),a299_0x2f5efa(0x25a)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x2f5efa(0x275),a299_0x2f5efa(0x2a6)]),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER','ROLE',a299_0x2f5efa(0x169)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x2f5efa(0x20d)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x2f5efa(0x17c),UNSUPPORTED_FORM_MESSAGE=a299_0x2f5efa(0x247),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x2f5efa(0x17f),RESERVED_RESULT_VARIABLES=new Set(['formData',a299_0x2f5efa(0x2ad),a299_0x2f5efa(0x182),a299_0x2f5efa(0x19c),a299_0x2f5efa(0x16a),a299_0x2f5efa(0x1b4),a299_0x2f5efa(0x207),a299_0x2f5efa(0x2b0),a299_0x2f5efa(0x1e6),'approval_sys_dataId']);export function normalizeFlowConfig(_0x3d7ff1){const _0x225c9d=a299_0x2f5efa;if(!isRecord(_0x3d7ff1))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x27345c=cloneJsonValue(_0x3d7ff1),_0x5b9c32=_0x27345c[_0x225c9d(0x2a3)],_0x5bc2f4=isRecord(_0x5b9c32)?cloneJsonValue(_0x5b9c32):{},_0x349394=[],_0x7cd258=[];for(const _0x14285d of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x225c9d(0x1d3)][_0x225c9d(0x19b)](_0x27345c,_0x14285d))continue;delete _0x27345c[_0x14285d],_0x7cd258[_0x225c9d(0x173)](_0x14285d),_0x349394[_0x225c9d(0x173)]({'code':'legacy_field_removed','path':_0x14285d,'message':_0x14285d+_0x225c9d(0x264)});}for(const _0x1b938a of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x225c9d(0x1d0)][_0x225c9d(0x1d3)]['call'](_0x5bc2f4,_0x1b938a))continue;const _0x25fdaa=_0x225c9d(0x1c7)+_0x1b938a;delete _0x5bc2f4[_0x1b938a],_0x7cd258[_0x225c9d(0x173)](_0x25fdaa),_0x349394[_0x225c9d(0x173)]({'code':_0x225c9d(0x19d),'path':_0x25fdaa,'message':_0x25fdaa+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x225c9d(0x1d0)][_0x225c9d(0x1d3)][_0x225c9d(0x19b)](_0x5bc2f4,_0x225c9d(0x1b8))){const _0x4129e7=_0x5bc2f4['schemaVersion'],_0x334fd9=typeof _0x4129e7===_0x225c9d(0x277)?_0x4129e7[_0x225c9d(0x1e3)]():_0x4129e7;if(isEmptyJsonValue(_0x4129e7)||_0x334fd9===DEFAULT_FLOW_SCHEMA_VERSION){const _0x528eb8=_0x225c9d(0x26e);delete _0x5bc2f4[_0x225c9d(0x1b8)],_0x7cd258[_0x225c9d(0x173)](_0x528eb8),_0x349394[_0x225c9d(0x173)]({'code':_0x225c9d(0x19d),'path':_0x528eb8,'message':_0x528eb8+_0x225c9d(0x1a2)+DEFAULT_FLOW_SCHEMA_VERSION+_0x225c9d(0x287)});}}removeEmptyMetadata(_0x5bc2f4,_0x225c9d(0x2a3),_0x349394,_0x7cd258);_0x27345c[_0x225c9d(0x1de)]===_0x225c9d(0x1e5)&&!Object[_0x225c9d(0x1d0)][_0x225c9d(0x1d3)][_0x225c9d(0x19b)](_0x5bc2f4,_0x225c9d(0x29a))&&(_0x5bc2f4['pageMode']='CUSTOM_PAGE');_0x27345c[_0x225c9d(0x2a3)]=_0x5bc2f4;if(typeof _0x27345c['flowName']===_0x225c9d(0x277))_0x27345c[_0x225c9d(0x1a8)]=_0x27345c['flowName'][_0x225c9d(0x1e3)]();return{'config':_0x27345c,'warnings':_0x349394,'removedPaths':_0x7cd258};}export function validateFlowConfig(_0x4922bc){const _0xfd41e7=a299_0x2f5efa;let _0x5b664d;try{_0x5b664d=normalizeFlowConfig(_0x4922bc);}catch(_0x240dc3){const _0x53d1cf=_0x240dc3 instanceof Error?_0x240dc3['message']:String(_0x240dc3),_0x33a523={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x53d1cf}],'warnings':[],'normalized':_0x33a523,'validationConfig':_0x33a523};}const _0x24c47f=_0x5b664d[_0xfd41e7(0x1b5)],_0x30c4f4=cloneJsonValue(_0x24c47f),_0x5441ca=_0x30c4f4['flowJson'];_0x5441ca[_0xfd41e7(0x20e)]='__rabetbase_local_validation__',_0x5441ca[_0xfd41e7(0x1a8)]=_0x24c47f[_0xfd41e7(0x1a8)];typeof _0x24c47f[_0xfd41e7(0x202)]===_0xfd41e7(0x277)&&_0x24c47f[_0xfd41e7(0x202)]['trim']()&&(_0x5441ca[_0xfd41e7(0x233)]=_0x24c47f[_0xfd41e7(0x202)][_0xfd41e7(0x1e3)]());const _0x491d58=[];return validateOuterMetadata(_0x24c47f,_0x491d58),validateFlowClassification(_0x24c47f,_0x491d58),validateGraph(_0x24c47f[_0xfd41e7(0x2a3)],_0x491d58),{'valid':_0x491d58['length']===0x0,'errors':_0x491d58,'warnings':_0x5b664d[_0xfd41e7(0x26a)],'normalized':_0x24c47f,'validationConfig':_0x30c4f4};}function validateFlowClassification(_0x3668e2,_0x5a7b5d){const _0x11dff4=a299_0x2f5efa;if(!isRecord(_0x3668e2[_0x11dff4(0x2a3)]))return;const _0x15b797=_0x3668e2[_0x11dff4(0x1de)],_0x1292e4=_0x3668e2[_0x11dff4(0x2a3)][_0x11dff4(0x29a)];_0x1292e4!==undefined&&(typeof _0x1292e4!==_0x11dff4(0x277)||!FLOW_PAGE_MODES['has'](_0x1292e4))&&_0x5a7b5d['push']({'path':_0x11dff4(0x21a),'message':_0x11dff4(0x1ec)+String(_0x1292e4)+'.'});_0x15b797===_0x11dff4(0x1e8)&&_0x1292e4!==undefined&&_0x5a7b5d[_0x11dff4(0x173)]({'path':_0x11dff4(0x21a),'message':_0x11dff4(0x212)});_0x15b797===_0x11dff4(0x1e5)&&_0x1292e4==='PLATFORM_FORM'&&_0x5a7b5d['push']({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x15b797===_0x11dff4(0x1e8)||_0x15b797===_0x11dff4(0x1e5))&&validateCustomPageNavigation(_0x3668e2,_0x15b797,_0x1292e4,_0x5a7b5d);if(_0x15b797!==_0x11dff4(0x1e8)||!Array['isArray'](_0x3668e2['flowJson']['nodes']))return;_0x3668e2[_0x11dff4(0x2a3)][_0x11dff4(0x297)]['forEach']((_0x595d3e,_0x48a8d5)=>{const _0x364f2b=_0x11dff4;isRecord(_0x595d3e)&&_0x595d3e[_0x364f2b(0x27f)]===_0x364f2b(0x273)&&_0x595d3e[_0x364f2b(0x1ca)]===_0x364f2b(0x270)&&_0x5a7b5d[_0x364f2b(0x173)]({'path':_0x364f2b(0x178)+_0x48a8d5+'].taskMode','message':_0x364f2b(0x1d2)});});}function validateCustomPageNavigation(_0x1325c3,_0x1f96fc,_0x55ae58,_0xb89039){const _0x5bb7fb=a299_0x2f5efa,_0x40b593=_0x1325c3[_0x5bb7fb(0x2a3)]['startPageId'];_0x40b593!==undefined&&_0xb89039[_0x5bb7fb(0x173)]({'path':_0x5bb7fb(0x2b5),'message':_0x5bb7fb(0x1ea)});const _0x5db190=_0x1325c3[_0x5bb7fb(0x2a3)]['startPath'];_0x5db190!==undefined&&(typeof _0x5db190!==_0x5bb7fb(0x277)||_0x5db190[_0x5bb7fb(0x1e3)]()==='')&&_0xb89039['push']({'path':_0x5bb7fb(0x16f),'message':_0x5bb7fb(0x250)});const _0x32dc98=Array[_0x5bb7fb(0x239)](_0x1325c3[_0x5bb7fb(0x2a3)][_0x5bb7fb(0x297)])?_0x1325c3[_0x5bb7fb(0x2a3)][_0x5bb7fb(0x297)][_0x5bb7fb(0x29e)]((_0x56a4d8,_0x548bb0)=>({'node':_0x56a4d8,'index':_0x548bb0}))[_0x5bb7fb(0x21d)](({node:_0x454bba})=>isRecord(_0x454bba)&&_0x454bba[_0x5bb7fb(0x24f)]!==undefined):[],_0x3c1493=_0x5db190!==undefined||_0x32dc98[_0x5bb7fb(0x19f)]>0x0,_0x3fa955=_0x55ae58===undefined&&_0x1f96fc===_0x5bb7fb(0x1e5)?'CUSTOM_PAGE':_0x55ae58;_0x3c1493&&(_0x1f96fc!=='INDEPENDENT_FLOW'||_0x3fa955!==_0x5bb7fb(0x244))&&(_0x5db190!==undefined&&_0xb89039[_0x5bb7fb(0x173)]({'path':'flowJson.startPath','message':_0x5bb7fb(0x295)}),_0x32dc98[_0x5bb7fb(0x191)](({index:_0x58ddf9})=>{const _0xcd57af=_0x5bb7fb;_0xb89039[_0xcd57af(0x173)]({'path':_0xcd57af(0x178)+_0x58ddf9+_0xcd57af(0x1ef),'message':_0xcd57af(0x1fa)});}));}export async function writeNormalizedFlowConfig(_0x3905a1,_0x4c89eb,_0x49b3c9={}){const _0x2b801c=a299_0x2f5efa,_0x2fcce6=resolve(_0x3905a1),_0x2a6228=_0x2fcce6+'.'+process['pid']+'.'+randomUUID()+'.tmp',_0x4ff788=JSON['stringify'](_0x4c89eb,null,0x2)+'\x0a';let _0x1c4530;try{try{_0x1c4530=(await stat(_0x2fcce6))[_0x2b801c(0x258)]&0x1ff;}catch{_0x1c4530=undefined;}await writeFile(_0x2a6228,_0x4ff788,{'encoding':_0x2b801c(0x267),'flag':'wx','mode':_0x1c4530??0x1a4});if(_0x1c4530!==undefined)await chmod(_0x2a6228,_0x1c4530);_0x49b3c9[_0x2b801c(0x298)]===![]?(await link(_0x2a6228,_0x2fcce6),await unlink(_0x2a6228)):await rename(_0x2a6228,_0x2fcce6);}finally{await unlink(_0x2a6228)[_0x2b801c(0x2ae)](()=>undefined);}}function validateOuterMetadata(_0x1aa309,_0xdfc8fd){const _0x237137=a299_0x2f5efa;(typeof _0x1aa309[_0x237137(0x1a8)]!=='string'||_0x1aa309[_0x237137(0x1a8)][_0x237137(0x1e3)]()==='')&&_0xdfc8fd[_0x237137(0x173)]({'path':'flowName','message':_0x237137(0x28a)});_0x1aa309[_0x237137(0x184)]!==undefined&&typeof _0x1aa309[_0x237137(0x184)]!==_0x237137(0x277)&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x184),'message':_0x237137(0x171)});if(_0x1aa309[_0x237137(0x1de)]===undefined||_0x1aa309['flowType']===null)_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x1de),'message':_0x237137(0x1b7)});else(typeof _0x1aa309[_0x237137(0x1de)]!==_0x237137(0x277)||!FLOW_TYPES[_0x237137(0x2a0)](_0x1aa309[_0x237137(0x1de)]))&&_0xdfc8fd[_0x237137(0x173)]({'path':'flowType','message':'Unsupported\x20flowType:\x20'+String(_0x1aa309['flowType'])+'.'});_0x1aa309[_0x237137(0x202)]!==undefined&&typeof _0x1aa309['datasetCode']!==_0x237137(0x277)&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x202),'message':_0x237137(0x1df)});_0x1aa309[_0x237137(0x200)]===undefined&&_0x1aa309['pageId']!==undefined&&(!Number[_0x237137(0x232)](_0x1aa309['pageId'])||_0x1aa309[_0x237137(0x2bb)]<=0x0)&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x2bb),'message':_0x237137(0x29c)});if(_0x1aa309[_0x237137(0x200)]!==undefined){if(!Array['isArray'](_0x1aa309[_0x237137(0x200)])||_0x1aa309[_0x237137(0x200)][_0x237137(0x280)](_0xd7fba4=>!Number['isSafeInteger'](_0xd7fba4)||_0xd7fba4<=0x0))_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x200),'message':_0x237137(0x1bf)});else[...new Set(_0x1aa309[_0x237137(0x200)])][_0x237137(0x1bd)](',')[_0x237137(0x19f)]>0x800&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x200),'message':_0x237137(0x257)});_0x1aa309[_0x237137(0x1de)]==='INDEPENDENT_FLOW'&&Array['isArray'](_0x1aa309[_0x237137(0x200)])&&_0x1aa309[_0x237137(0x200)][_0x237137(0x19f)]>0x0&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x200),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.'});}_0x1aa309[_0x237137(0x1de)]==='INDEPENDENT_FLOW'&&_0x1aa309[_0x237137(0x202)]!==undefined&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x202),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x1aa309[_0x237137(0x1de)]===_0x237137(0x1e5)&&_0x1aa309['pageIds']===undefined&&_0x1aa309['pageId']!==undefined&&_0xdfc8fd[_0x237137(0x173)]({'path':_0x237137(0x2bb),'message':_0x237137(0x166)});}function validateGraph(_0x4bc861,_0x5bab20){const _0x5e0b86=a299_0x2f5efa;if(!isRecord(_0x4bc861)){_0x5bab20[_0x5e0b86(0x173)]({'path':_0x5e0b86(0x2a3),'message':_0x5e0b86(0x24e)});return;}!Array['isArray'](_0x4bc861[_0x5e0b86(0x297)])&&_0x5bab20[_0x5e0b86(0x173)]({'path':_0x5e0b86(0x1c9),'message':_0x5e0b86(0x1bb)});!Array[_0x5e0b86(0x239)](_0x4bc861[_0x5e0b86(0x2a9)])&&_0x5bab20[_0x5e0b86(0x173)]({'path':_0x5e0b86(0x268),'message':_0x5e0b86(0x21f)});Object[_0x5e0b86(0x1d0)][_0x5e0b86(0x1d3)]['call'](_0x4bc861,_0x5e0b86(0x1b8))&&_0x5bab20[_0x5e0b86(0x173)]({'path':_0x5e0b86(0x26e),'message':_0x5e0b86(0x21b)+String(_0x4bc861['schemaVersion'])+_0x5e0b86(0x262)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x52983e of[_0x5e0b86(0x210),_0x5e0b86(0x28d),_0x5e0b86(0x25b)]){Object[_0x5e0b86(0x1d0)]['hasOwnProperty'][_0x5e0b86(0x19b)](_0x4bc861,_0x52983e)&&_0x5bab20[_0x5e0b86(0x173)]({'path':'flowJson.'+_0x52983e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x4bc861[_0x5e0b86(0x297)])||!Array[_0x5e0b86(0x239)](_0x4bc861['edges']))return;const _0x3db4f3=new Map(),_0x49c56e=[],_0xd323a9=[],_0x21b513=new Map(),_0x19943e=new Map(),_0x5077ef=new Set();let _0x3ef6da=0x0;_0x4bc861[_0x5e0b86(0x297)][_0x5e0b86(0x191)]((_0x5430a2,_0x3412db)=>{const _0x2dc8ea=_0x5e0b86,_0x3c1eba=_0x2dc8ea(0x178)+_0x3412db+']';if(!isRecord(_0x5430a2)){_0x5bab20['push']({'path':_0x3c1eba,'message':_0x2dc8ea(0x1dc)});return;}const _0x43983f=_0x5430a2;if(typeof _0x43983f['id']!==_0x2dc8ea(0x277)||!BPMN_ID_PATTERN['test'](_0x43983f['id']))_0x5bab20['push']({'path':_0x3c1eba+_0x2dc8ea(0x2b6),'message':_0x2dc8ea(0x229)});else _0x3db4f3['has'](_0x43983f['id'])?_0x5bab20[_0x2dc8ea(0x173)]({'path':_0x3c1eba+_0x2dc8ea(0x2b6),'message':'Duplicate\x20node\x20id:\x20'+_0x43983f['id']+'.'}):(_0x3db4f3[_0x2dc8ea(0x2aa)](_0x43983f['id'],_0x43983f),_0x5077ef[_0x2dc8ea(0x19e)](_0x43983f['id']));if(!NODE_TYPES['has'](_0x43983f[_0x2dc8ea(0x27f)]))_0x5bab20['push']({'path':_0x3c1eba+_0x2dc8ea(0x1c5),'message':_0x2dc8ea(0x23c)+String(_0x43983f[_0x2dc8ea(0x27f)])+'.'});else{if(_0x43983f['type']===_0x2dc8ea(0x286))_0x49c56e[_0x2dc8ea(0x173)](_0x43983f['id']);else _0x43983f[_0x2dc8ea(0x27f)]===_0x2dc8ea(0x201)&&_0xd323a9[_0x2dc8ea(0x173)](_0x43983f['id']);}_0x43983f[_0x2dc8ea(0x27f)]===_0x2dc8ea(0x273)&&(_0x43983f[_0x2dc8ea(0x1ca)]===undefined||_0x43983f[_0x2dc8ea(0x1ca)]===_0x2dc8ea(0x273))&&(_0x3ef6da+=0x1);validateNode(_0x43983f,_0x3c1eba,_0x5bab20);if(_0x43983f[_0x2dc8ea(0x27f)]===_0x2dc8ea(0x1b6)){const _0x1500b9=resolveEffectiveResultVariable(_0x43983f[_0x2dc8ea(0x1e4)],![]);_0x1500b9&&(registerResultVariableOwner(_0x19943e,_0x1500b9,_0x43983f['id'],_0x5bab20),!_0x21b513[_0x2dc8ea(0x2a0)](_0x1500b9)&&_0x21b513['set'](_0x1500b9,_0x43983f['id']));}if(_0x43983f[_0x2dc8ea(0x27f)]==='APPROVAL'&&isRecord(_0x43983f['timeout'])&&_0x43983f[_0x2dc8ea(0x209)][_0x2dc8ea(0x1fe)]===!![]&&_0x43983f[_0x2dc8ea(0x209)]['action']===_0x2dc8ea(0x282)){const _0x569f39=resolveEffectiveResultVariable(_0x43983f[_0x2dc8ea(0x209)][_0x2dc8ea(0x1e4)],!![]);_0x569f39&&registerResultVariableOwner(_0x19943e,_0x569f39,_0x43983f['id']+_0x2dc8ea(0x278),_0x5bab20);}});_0x49c56e[_0x5e0b86(0x19f)]!==0x1&&_0x5bab20['push']({'path':_0x5e0b86(0x1c9),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0xd323a9[_0x5e0b86(0x19f)]===0x0&&_0x5bab20['push']({'path':_0x5e0b86(0x1c9),'message':_0x5e0b86(0x272)});const _0x33a8b3=new Map(),_0x7cb7fc=new Map(),_0x6a97ac=new Map(),_0x334743=new Set();_0x4bc861['edges']['forEach']((_0x5a86fb,_0x5749e0)=>{const _0x3690cd=_0x5e0b86,_0x48258d='flowJson.edges['+_0x5749e0+']';if(!isRecord(_0x5a86fb)){_0x5bab20[_0x3690cd(0x173)]({'path':_0x48258d,'message':_0x3690cd(0x1a4)});return;}const _0x410a14=_0x5a86fb;_0x6a97ac[_0x3690cd(0x2aa)](_0x410a14,_0x48258d);const _0x273953=resolveEdgeEndpoint(_0x410a14[_0x3690cd(0x225)],_0x410a14['sourceNodeId']),_0x132631=resolveEdgeEndpoint(_0x410a14[_0x3690cd(0x2b9)],_0x410a14[_0x3690cd(0x1c6)]);if(!_0x273953)_0x5bab20['push']({'path':_0x48258d+_0x3690cd(0x2ba),'message':_0x3690cd(0x266)});if(!_0x132631)_0x5bab20['push']({'path':_0x48258d+_0x3690cd(0x1e1),'message':_0x3690cd(0x281)});_0x273953&&!_0x3db4f3[_0x3690cd(0x2a0)](_0x273953)&&_0x5bab20[_0x3690cd(0x173)]({'path':_0x48258d+_0x3690cd(0x2ba),'message':_0x3690cd(0x25f)+_0x273953+'.'});_0x132631&&!_0x3db4f3[_0x3690cd(0x2a0)](_0x132631)&&_0x5bab20['push']({'path':_0x48258d+_0x3690cd(0x1e1),'message':_0x3690cd(0x208)+_0x132631+'.'});if(_0x410a14['id']!==undefined){if(typeof _0x410a14['id']!==_0x3690cd(0x277)||!BPMN_ID_PATTERN[_0x3690cd(0x1c4)](_0x410a14['id']))_0x5bab20[_0x3690cd(0x173)]({'path':_0x48258d+_0x3690cd(0x2b6),'message':_0x3690cd(0x24b)});else{if(_0x5077ef[_0x3690cd(0x2a0)](_0x410a14['id']))_0x5bab20[_0x3690cd(0x173)]({'path':_0x48258d+'.id','message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x410a14['id']+'.'});else!_0x5077ef[_0x3690cd(0x2a0)](_0x410a14['id'])&&_0x5077ef[_0x3690cd(0x19e)](_0x410a14['id']);}}if(_0x273953&&_0x132631){const _0x44aead=_0x273953+'\x00'+_0x132631+'\x00'+(_0x410a14[_0x3690cd(0x2b7)]??_0x3690cd(0x290));_0x334743['has'](_0x44aead)?_0x5bab20[_0x3690cd(0x173)]({'path':_0x48258d,'message':_0x3690cd(0x167)+_0x273953+_0x3690cd(0x291)+_0x132631+'\x20('+(_0x410a14[_0x3690cd(0x2b7)]??_0x3690cd(0x290))+').'}):_0x334743['add'](_0x44aead);}validateEdge(_0x410a14,_0x48258d,_0x5bab20),_0x273953&&_0x132631&&(_0x33a8b3[_0x3690cd(0x284)](_0x273953)?.[_0x3690cd(0x173)](_0x410a14)??_0x33a8b3['set'](_0x273953,[_0x410a14]),_0x7cb7fc[_0x3690cd(0x284)](_0x132631)?.['push'](_0x410a14)??_0x7cb7fc[_0x3690cd(0x2aa)](_0x132631,[_0x410a14]));});if(_0x49c56e[_0x5e0b86(0x19f)]!==0x1)return;validateGraphShape(_0x3db4f3,_0x49c56e[0x0],_0xd323a9,_0x33a8b3,_0x7cb7fc,_0x6a97ac,_0x5bab20),validateScriptResultReferences(_0x3db4f3,_0x49c56e[0x0],_0x33a8b3,_0x7cb7fc,_0x6a97ac,_0x21b513,_0x5bab20),validateApprovalResults(_0x3db4f3,_0x3ef6da,_0xd323a9,_0x5bab20);}function validateNode(_0x6aaabd,_0x1dcba4,_0x153b84){const _0x327122=a299_0x2f5efa;for(const _0x533c58 of['form','formPermission']){Object['prototype'][_0x327122(0x1d3)][_0x327122(0x19b)](_0x6aaabd,_0x533c58)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+'.'+_0x533c58,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x327122(0x2a0)](_0x6aaabd[_0x327122(0x27f)]))return;(typeof _0x6aaabd['name']!==_0x327122(0x277)||_0x6aaabd['name'][_0x327122(0x1e3)]()==='')&&_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x180),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x6aaabd[_0x327122(0x2bb)]!==undefined&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x18e),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x6aaabd['path']!==undefined){if(typeof _0x6aaabd[_0x327122(0x24f)]!==_0x327122(0x277)||_0x6aaabd[_0x327122(0x24f)][_0x327122(0x1e3)]()==='')_0x153b84['push']({'path':_0x1dcba4+'.path','message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x6aaabd[_0x327122(0x27f)]!==_0x327122(0x273)&&_0x6aaabd['type']!==_0x327122(0x201)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x48c660=_0x6aaabd[_0x327122(0x23f)];if(!isRecord(_0x48c660))_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x1d7),'message':_0x327122(0x1dd)});else for(const _0x520411 of['x','y']){const _0x4d08d5=_0x48c660[_0x520411];(typeof _0x4d08d5!==_0x327122(0x204)||!Number[_0x327122(0x17d)](_0x4d08d5)||_0x4d08d5<0x0)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x1a3)+_0x520411,'message':_0x327122(0x183)+_0x520411+_0x327122(0x285)});}if(_0x6aaabd['type']===_0x327122(0x273)){const _0x4597eb=_0x6aaabd[_0x327122(0x16b)]??_0x327122(0x251),_0x42b52f=_0x6aaabd[_0x327122(0x1ca)]??_0x327122(0x273);!APPROVAL_TASK_MODES['has'](_0x42b52f)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x1ab),'message':_0x327122(0x1c1)+String(_0x42b52f)+'.'});!APPROVAL_MODES['has'](_0x4597eb)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+'.approvalMode','message':_0x327122(0x20a)+String(_0x4597eb)+'.'});if(!isRecord(_0x6aaabd[_0x327122(0x26d)]))_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x16c),'message':_0x327122(0x1da)});else{const _0x5e1a06=_0x6aaabd['assignee'][_0x327122(0x1ba)];_0x5e1a06!==_0x327122(0x1ce)&&_0x5e1a06!==_0x327122(0x181)&&_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x23e),'message':_0x327122(0x22b)});if(_0x5e1a06===_0x327122(0x1ce)){const _0x31590c=_0x6aaabd[_0x327122(0x26d)]['userIds'];if(!Array[_0x327122(0x239)](_0x31590c)||_0x31590c[_0x327122(0x19f)]===0x0)_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x168),'message':_0x327122(0x1a0)});else{const _0x5f1939=_0x31590c['findIndex'](_0x10fd9c=>!isValidUserId(_0x10fd9c));_0x5f1939>=0x0&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+'.assignee.userIds['+_0x5f1939+']','message':'fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});const _0x528b56=new Set(_0x31590c[_0x327122(0x21d)](isValidUserId)[_0x327122(0x29e)](_0x155cb5=>String(_0x155cb5)[_0x327122(0x1e3)]()));_0x4597eb==='SINGLE'&&_0x528b56[_0x327122(0x219)]>0x1&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x168),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x5e1a06===_0x327122(0x181)){const _0x248715=_0x6aaabd['assignee']['roleId'],_0x48d7d0=typeof _0x248715===_0x327122(0x204)||typeof _0x248715===_0x327122(0x277)?Number(String(_0x248715)[_0x327122(0x1e3)]()):Number[_0x327122(0x1f0)];(!Number['isSafeInteger'](_0x48d7d0)||_0x48d7d0<=0x0)&&_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x1eb),'message':_0x327122(0x23a)});}}if(_0x6aaabd['transferCandidates']!==undefined){if(!isRecord(_0x6aaabd['transferCandidates']))_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x1ee),'message':_0x327122(0x27a)});else{if(_0x6aaabd[_0x327122(0x249)][_0x327122(0x1ba)]!==_0x327122(0x1ce))_0x153b84['push']({'path':_0x1dcba4+'.transferCandidates.strategy','message':_0x327122(0x1c2)});else{const _0x2a37e2=_0x6aaabd[_0x327122(0x249)][_0x327122(0x292)];if(!Array[_0x327122(0x239)](_0x2a37e2)||_0x2a37e2[_0x327122(0x19f)]===0x0)_0x153b84['push']({'path':_0x1dcba4+_0x327122(0x174),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x581be7=_0x2a37e2['findIndex'](_0x4657de=>!isValidUserId(_0x4657de));_0x581be7>=0x0&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x1ae)+_0x581be7+']','message':_0x327122(0x274)});}}}}}_0x6aaabd[_0x327122(0x2af)]!==undefined&&typeof _0x6aaabd[_0x327122(0x2af)]!==_0x327122(0x18d)&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x276),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x6aaabd[_0x327122(0x27f)]===_0x327122(0x1b6)){(typeof _0x6aaabd[_0x327122(0x299)]!==_0x327122(0x277)||_0x6aaabd[_0x327122(0x299)]['trim']()==='')&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x29d),'message':_0x327122(0x253)});if(_0x6aaabd['resultVariable']!==undefined){if(typeof _0x6aaabd[_0x327122(0x1e4)]!=='string'||!VARIABLE_PATTERN['test'](_0x6aaabd[_0x327122(0x1e4)]))_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x187),'message':_0x327122(0x211)});else(RESERVED_RESULT_VARIABLES[_0x327122(0x2a0)](_0x6aaabd['resultVariable'])||_0x6aaabd['resultVariable'][_0x327122(0x22d)](_0x327122(0x235)))&&_0x153b84[_0x327122(0x173)]({'path':_0x1dcba4+_0x327122(0x187),'message':_0x327122(0x1a1)+_0x6aaabd[_0x327122(0x1e4)]+'.'});}}validateAsyncExecution(_0x6aaabd,_0x1dcba4,_0x153b84),validateApprovalTimeout(_0x6aaabd,_0x1dcba4,_0x153b84),validateCcConfig(_0x6aaabd,_0x1dcba4,_0x153b84),_0x6aaabd[_0x327122(0x27f)]===_0x327122(0x220)&&validateNotificationConfig(_0x6aaabd[_0x327122(0x1b5)],_0x1dcba4+_0x327122(0x2b4),_0x153b84);}function validateAsyncExecution(_0x17adaa,_0x257f1b,_0x4800ba){const _0x15a97f=a299_0x2f5efa;if(_0x17adaa[_0x15a97f(0x199)]===undefined)return;if(!isRecord(_0x17adaa['async'])){_0x4800ba[_0x15a97f(0x173)]({'path':_0x257f1b+_0x15a97f(0x197),'message':_0x15a97f(0x177)});return;}if(_0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x1fe)]!==undefined&&typeof _0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x1fe)]!==_0x15a97f(0x18d)){_0x4800ba[_0x15a97f(0x173)]({'path':_0x257f1b+'.async.enabled','message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x1fe)]!==!![])return;_0x17adaa[_0x15a97f(0x27f)]!==_0x15a97f(0x1b6)&&_0x4800ba[_0x15a97f(0x173)]({'path':_0x257f1b+_0x15a97f(0x197),'message':_0x15a97f(0x26b)});const _0x2ba3ce=_0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x22e)]??0x3;(!Number[_0x15a97f(0x259)](_0x2ba3ce)||_0x2ba3ce<0x1||_0x2ba3ce>MAX_ASYNC_RETRY_COUNT)&&_0x4800ba[_0x15a97f(0x173)]({'path':_0x257f1b+_0x15a97f(0x1f4),'message':_0x15a97f(0x289)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x25c)]!==undefined&&validateTimeAmount(_0x17adaa[_0x15a97f(0x199)][_0x15a97f(0x25c)],_0x257f1b+_0x15a97f(0x20c),_0x4800ba);}function validateApprovalTimeout(_0xea8ef,_0x360ba3,_0x60dc6e){const _0x53c2c2=a299_0x2f5efa;if(_0xea8ef[_0x53c2c2(0x209)]===undefined)return;if(!isRecord(_0xea8ef[_0x53c2c2(0x209)])){_0x60dc6e['push']({'path':_0x360ba3+_0x53c2c2(0x278),'message':_0x53c2c2(0x293)});return;}if(_0xea8ef[_0x53c2c2(0x209)]['enabled']!==undefined&&typeof _0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x1fe)]!==_0x53c2c2(0x18d)){_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+_0x53c2c2(0x1b0),'message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x1fe)]!==!![])return;if(_0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x1cf)]!==undefined&&typeof _0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x1cf)]!==_0x53c2c2(0x18d)){_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+'.timeout.interrupting','message':_0x53c2c2(0x2b2)});return;}_0xea8ef['type']!==_0x53c2c2(0x273)&&_0x60dc6e['push']({'path':_0x360ba3+'.timeout','message':_0x53c2c2(0x194)});validateTimeAmount(_0xea8ef['timeout'][_0x53c2c2(0x265)],_0x360ba3+_0x53c2c2(0x170),_0x60dc6e);const _0x34b0ec=_0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x190)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x53c2c2(0x2a0)](_0x34b0ec)){_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+_0x53c2c2(0x189),'message':_0x53c2c2(0x1d5)});return;}(_0xea8ef[_0x53c2c2(0x1ca)]??_0x53c2c2(0x273))==='HANDLE'&&_0x34b0ec!=='EXECUTE_BFF'&&_0x60dc6e['push']({'path':_0x360ba3+_0x53c2c2(0x189),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0xc074d7=_0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x1cf)]??_0x34b0ec!==_0x53c2c2(0x282);if(_0x34b0ec==='EXECUTE_BFF')_0xc074d7&&_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+'.timeout.interrupting','message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0xea8ef[_0x53c2c2(0x209)]['scriptName']!=='string'||_0xea8ef[_0x53c2c2(0x209)][_0x53c2c2(0x299)][_0x53c2c2(0x1e3)]()==='')&&_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+'.timeout.scriptName','message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0xea8ef['timeout'][_0x53c2c2(0x1e4)],_0x360ba3+_0x53c2c2(0x230),_0x60dc6e);else!_0xc074d7&&_0x60dc6e[_0x53c2c2(0x173)]({'path':_0x360ba3+'.timeout.interrupting','message':_0x34b0ec+_0x53c2c2(0x27b)});}function validateTimeAmount(_0x4bc04b,_0x551a55,_0x5280a6){const _0x485262=a299_0x2f5efa;if(!isRecord(_0x4bc04b)){_0x5280a6[_0x485262(0x173)]({'path':_0x551a55,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x485262(0x259)](_0x4bc04b[_0x485262(0x205)])||Number(_0x4bc04b[_0x485262(0x205)])<=0x0)&&_0x5280a6[_0x485262(0x173)]({'path':_0x551a55+'.value','message':_0x485262(0x1aa)}),!FLOW_TIME_UNITS[_0x485262(0x2a0)](_0x4bc04b[_0x485262(0x217)])&&_0x5280a6[_0x485262(0x173)]({'path':_0x551a55+_0x485262(0x269),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0xb3029a,_0x40b7ac,_0x1dbb35){const _0x2ba94e=a299_0x2f5efa;if(_0xb3029a===undefined||_0xb3029a===null||_0xb3029a==='')return;if(typeof _0xb3029a!=='string'||!VARIABLE_PATTERN[_0x2ba94e(0x1c4)](_0xb3029a))_0x1dbb35[_0x2ba94e(0x173)]({'path':_0x40b7ac,'message':_0x2ba94e(0x211)});else(RESERVED_RESULT_VARIABLES[_0x2ba94e(0x2a0)](_0xb3029a)||_0xb3029a[_0x2ba94e(0x22d)](_0x2ba94e(0x235)))&&_0x1dbb35[_0x2ba94e(0x173)]({'path':_0x40b7ac,'message':'Reserved\x20resultVariable:\x20'+_0xb3029a+'.'});}function validateCcConfig(_0x330bb9,_0x4f5394,_0x1bbf3b){const _0x38e83b=a299_0x2f5efa;if(_0x330bb9['cc']===undefined)return;if(!isRecord(_0x330bb9['cc'])){_0x1bbf3b['push']({'path':_0x4f5394+'.cc','message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x330bb9[_0x38e83b(0x27f)]!==_0x38e83b(0x201)&&_0x330bb9[_0x38e83b(0x27f)]!==_0x38e83b(0x273)&&_0x1bbf3b['push']({'path':_0x4f5394+_0x38e83b(0x18f),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object['prototype'][_0x38e83b(0x1d3)][_0x38e83b(0x19b)](_0x330bb9['cc'],_0x38e83b(0x1b2))&&_0x1bbf3b[_0x38e83b(0x173)]({'path':_0x4f5394+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x1f04ca=_0x330bb9['cc'][_0x38e83b(0x271)];if(!Array['isArray'](_0x1f04ca)||_0x1f04ca[_0x38e83b(0x19f)]===0x0)_0x1bbf3b['push']({'path':_0x4f5394+'.cc.recipientUserIds','message':_0x38e83b(0x2b8)});else{_0x1f04ca['length']>MAX_CC_RECIPIENTS&&_0x1bbf3b[_0x38e83b(0x173)]({'path':_0x4f5394+_0x38e83b(0x1f3),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+'\x20users.'});const _0x399963=new Set();_0x1f04ca[_0x38e83b(0x191)]((_0x442911,_0x2cbbea)=>{const _0x3f7397=_0x38e83b;if(typeof _0x442911!==_0x3f7397(0x277)||_0x442911[_0x3f7397(0x1e3)]()==='')_0x1bbf3b[_0x3f7397(0x173)]({'path':_0x4f5394+'.cc.recipientUserIds['+_0x2cbbea+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x399963['has'](_0x442911[_0x3f7397(0x1e3)]())?_0x1bbf3b[_0x3f7397(0x173)]({'path':_0x4f5394+_0x3f7397(0x242)+_0x2cbbea+']','message':_0x3f7397(0x21e)+_0x442911['trim']()+'.'}):_0x399963[_0x3f7397(0x19e)](_0x442911[_0x3f7397(0x1e3)]());});}validateStringArray(_0x330bb9['cc'][_0x38e83b(0x1c8)],_0x4f5394+_0x38e83b(0x1db),_0x1bbf3b);}function a299_0x4ea1(_0x474ff2,_0x4f5b8c){_0x474ff2=_0x474ff2-0x162;const _0x2e2170=a299_0x2e21();let _0x4ea1e0=_0x2e2170[_0x474ff2];return _0x4ea1e0;}function validateStringArray(_0x3a9710,_0x5c7a85,_0x46b213){const _0x1c7c58=a299_0x2f5efa;if(_0x3a9710===undefined)return;if(!Array[_0x1c7c58(0x239)](_0x3a9710)){_0x46b213['push']({'path':_0x5c7a85,'message':_0x1c7c58(0x1bc)});return;}const _0x2cdd36=new Set();_0x3a9710['forEach']((_0x59fdf9,_0x3b6bd8)=>{const _0x55d66e=_0x1c7c58;if(typeof _0x59fdf9!=='string'||_0x59fdf9[_0x55d66e(0x1e3)]()==='')_0x46b213[_0x55d66e(0x173)]({'path':_0x5c7a85+'['+_0x3b6bd8+']','message':_0x55d66e(0x16e)});else _0x2cdd36[_0x55d66e(0x2a0)](_0x59fdf9['trim']())?_0x46b213[_0x55d66e(0x173)]({'path':_0x5c7a85+'['+_0x3b6bd8+']','message':_0x55d66e(0x2a8)+_0x59fdf9[_0x55d66e(0x1e3)]()+'.'}):_0x2cdd36[_0x55d66e(0x19e)](_0x59fdf9[_0x55d66e(0x1e3)]());});}function validateNotificationConfig(_0x31ae6f,_0x2b500e,_0x29cd66){const _0x102d30=a299_0x2f5efa;if(!isRecord(_0x31ae6f)){_0x29cd66[_0x102d30(0x173)]({'path':_0x2b500e,'message':_0x102d30(0x2ac)});return;}if(_0x31ae6f[_0x102d30(0x1f2)]!==undefined&&_0x31ae6f[_0x102d30(0x1f2)]!==null){if(typeof _0x31ae6f[_0x102d30(0x1f2)]!==_0x102d30(0x277))_0x29cd66[_0x102d30(0x173)]({'path':_0x2b500e+_0x102d30(0x1e9),'message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x31ae6f[_0x102d30(0x1f2)][_0x102d30(0x1e3)]()&&_0x31ae6f[_0x102d30(0x1f2)][_0x102d30(0x1e3)]()!=='v1'&&_0x29cd66['push']({'path':_0x2b500e+_0x102d30(0x1e9),'message':_0x102d30(0x1e2)+_0x31ae6f[_0x102d30(0x1f2)]+'.'});}const _0x586954=requireNotificationString(_0x31ae6f['configCode'],_0x2b500e+_0x102d30(0x1be),_0x102d30(0x2a2),_0x29cd66);_0x586954?.[_0x102d30(0x26f)]('${')&&_0x29cd66['push']({'path':_0x2b500e+_0x102d30(0x1be),'message':_0x102d30(0x1e0)});if(_0x31ae6f[_0x102d30(0x26c)]!==undefined&&_0x31ae6f[_0x102d30(0x26c)]!==null){if(typeof _0x31ae6f['failurePolicy']!=='string')_0x29cd66['push']({'path':_0x2b500e+_0x102d30(0x176),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x102d30(0x2a0)](_0x31ae6f[_0x102d30(0x26c)][_0x102d30(0x1e3)]()[_0x102d30(0x23d)]())&&_0x29cd66['push']({'path':_0x2b500e+_0x102d30(0x176),'message':_0x102d30(0x1f5)});}!isRecord(_0x31ae6f['template'])?_0x29cd66['push']({'path':_0x2b500e+_0x102d30(0x25e),'message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x31ae6f[_0x102d30(0x24c)],_0x2b500e+_0x102d30(0x25e),_0x29cd66),validateNotificationRecipients(_0x31ae6f[_0x102d30(0x234)],_0x2b500e+_0x102d30(0x18b),_0x29cd66);}function validateNotificationTemplate(_0x58a4da,_0x2fc666,_0x279cb2){const _0x3326e5=a299_0x2f5efa;for(const _0x561a6a of['title',_0x3326e5(0x17a)]){const _0x22d517=requireNotificationString(_0x58a4da[_0x561a6a],_0x2fc666+'.'+_0x561a6a,_0x3326e5(0x252)+_0x561a6a+'\x20is\x20required.',_0x279cb2);if(_0x22d517)validateNotificationPlaceholders(_0x22d517,_0x2fc666+'.'+_0x561a6a,_0x279cb2);}_0x58a4da[_0x3326e5(0x1ed)]!==undefined&&_0x58a4da[_0x3326e5(0x1ed)]!==null&&(typeof _0x58a4da[_0x3326e5(0x1ed)]!==_0x3326e5(0x277)?_0x279cb2[_0x3326e5(0x173)]({'path':_0x2fc666+'.detailMarkdown','message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x58a4da[_0x3326e5(0x1ed)],_0x2fc666+_0x3326e5(0x198),_0x279cb2)),validateNotificationFacts(_0x58a4da[_0x3326e5(0x1cb)],_0x2fc666+_0x3326e5(0x16d),_0x279cb2),validateNotificationActions(_0x58a4da['actions'],_0x2fc666+_0x3326e5(0x2ab),_0x279cb2);}function validateNotificationFacts(_0x59b5c5,_0x866657,_0x12089c){const _0x47b7ac=a299_0x2f5efa;if(_0x59b5c5===undefined||_0x59b5c5===null)return;if(!Array['isArray'](_0x59b5c5)){_0x12089c[_0x47b7ac(0x173)]({'path':_0x866657,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x59b5c5['length']>MAX_NOTIFICATION_FACTS&&_0x12089c[_0x47b7ac(0x173)]({'path':_0x866657,'message':_0x47b7ac(0x1fc)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x59b5c5[_0x47b7ac(0x191)]((_0x4f75f0,_0x1d68e2)=>{const _0x36c2b1=_0x47b7ac,_0x323297=_0x866657+'['+_0x1d68e2+']';if(!isRecord(_0x4f75f0)){_0x12089c[_0x36c2b1(0x173)]({'path':_0x323297,'message':_0x36c2b1(0x28b)});return;}for(const _0x588c6c of[_0x36c2b1(0x29b),_0x36c2b1(0x205)]){const _0x40127a=requireNotificationString(_0x4f75f0[_0x588c6c],_0x323297+'.'+_0x588c6c,_0x36c2b1(0x1a6)+_0x588c6c+_0x36c2b1(0x21c),_0x12089c);_0x40127a&&validateNotificationPlaceholders(_0x40127a,_0x323297+'.'+_0x588c6c,_0x12089c);}});}function validateNotificationActions(_0x22e57b,_0x4648ee,_0x4c01fa){const _0x3d15d1=a299_0x2f5efa;if(_0x22e57b===undefined||_0x22e57b===null)return;if(!Array[_0x3d15d1(0x239)](_0x22e57b)){_0x4c01fa[_0x3d15d1(0x173)]({'path':_0x4648ee,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x22e57b['length']>MAX_NOTIFICATION_ACTIONS&&_0x4c01fa[_0x3d15d1(0x173)]({'path':_0x4648ee,'message':_0x3d15d1(0x1fc)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x22e57b[_0x3d15d1(0x191)]((_0x5806a1,_0x2a38c3)=>{const _0x137629=_0x3d15d1,_0x5141a0=_0x4648ee+'['+_0x2a38c3+']';if(!isRecord(_0x5806a1)){_0x4c01fa[_0x137629(0x173)]({'path':_0x5141a0,'message':_0x137629(0x164)});return;}const _0x4d7ab7=requireNotificationString(_0x5806a1[_0x137629(0x254)],_0x5141a0+'.text','Notification\x20action.text\x20is\x20required.',_0x4c01fa);if(_0x4d7ab7)validateNotificationPlaceholders(_0x4d7ab7,_0x5141a0+'.text',_0x4c01fa);const _0x1e5260=requireNotificationString(_0x5806a1[_0x137629(0x28c)],_0x5141a0+_0x137629(0x29f),_0x137629(0x172),_0x4c01fa);if(!_0x1e5260)return;validateNotificationPlaceholders(_0x1e5260,_0x5141a0+_0x137629(0x29f),_0x4c01fa),!/^https?:\/\//i['test'](_0x1e5260)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x137629(0x1c4)](_0x1e5260)&&_0x4c01fa[_0x137629(0x173)]({'path':_0x5141a0+'.url','message':_0x137629(0x224)});});}function validateNotificationRecipients(_0x22cf51,_0xddb429,_0x1a05f4){const _0x53ccc8=a299_0x2f5efa;if(_0x22cf51===undefined||_0x22cf51===null)return;if(!Array['isArray'](_0x22cf51)){_0x1a05f4[_0x53ccc8(0x173)]({'path':_0xddb429,'message':_0x53ccc8(0x20f)});return;}let _0x5901de=![];_0x22cf51[_0x53ccc8(0x191)]((_0x54da7f,_0x26ed8a)=>{const _0x1b4e22=_0x53ccc8,_0x212fa0=_0xddb429+'['+_0x26ed8a+']';if(!isRecord(_0x54da7f)){_0x1a05f4[_0x1b4e22(0x173)]({'path':_0x212fa0,'message':_0x1b4e22(0x28f)});return;}const _0x4143b4=requireNotificationString(_0x54da7f['type'],_0x212fa0+'.type',_0x1b4e22(0x24a),_0x1a05f4);_0x4143b4&&!NOTIFICATION_RECIPIENT_TYPES[_0x1b4e22(0x2a0)](_0x4143b4[_0x1b4e22(0x23d)]())&&_0x1a05f4[_0x1b4e22(0x173)]({'path':_0x212fa0+_0x1b4e22(0x1c5),'message':_0x1b4e22(0x17e)});let _0x57e0a3='TO';_0x54da7f['role']!==undefined&&_0x54da7f[_0x1b4e22(0x22a)]!==null&&(typeof _0x54da7f[_0x1b4e22(0x22a)]!==_0x1b4e22(0x277)?(_0x1a05f4[_0x1b4e22(0x173)]({'path':_0x212fa0+_0x1b4e22(0x1a5),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x57e0a3=''):(_0x57e0a3=_0x54da7f[_0x1b4e22(0x22a)][_0x1b4e22(0x1e3)]()[_0x1b4e22(0x23d)](),!NOTIFICATION_RECIPIENT_ROLES[_0x1b4e22(0x2a0)](_0x57e0a3)&&_0x1a05f4['push']({'path':_0x212fa0+_0x1b4e22(0x1a5),'message':_0x1b4e22(0x1ac)})));if(_0x57e0a3==='TO')_0x5901de=!![];const _0x743950=requireNotificationString(_0x54da7f[_0x1b4e22(0x205)],_0x212fa0+'.value','Notification\x20recipient.value\x20is\x20required.',_0x1a05f4);_0x743950&&validateNotificationPlaceholders(_0x743950,_0x212fa0+'.value',_0x1a05f4);}),_0x22cf51[_0x53ccc8(0x19f)]>0x0&&!_0x5901de&&_0x1a05f4[_0x53ccc8(0x173)]({'path':_0xddb429,'message':'Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.'});}function requireNotificationString(_0xff4a18,_0x46bb58,_0x1b0240,_0x21d27c){const _0x48d74c=a299_0x2f5efa;if(typeof _0xff4a18!==_0x48d74c(0x277)||_0xff4a18[_0x48d74c(0x1e3)]()==='')return _0x21d27c[_0x48d74c(0x173)]({'path':_0x46bb58,'message':_0x1b0240}),undefined;return _0xff4a18[_0x48d74c(0x1e3)]();}function validateNotificationPlaceholders(_0x3f7a04,_0x4206c0,_0xe6b573){const _0x16e168=a299_0x2f5efa;for(const _0x2a1dfc of _0x3f7a04[_0x16e168(0x1af)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4cc286=_0x2a1dfc[0x1]?.[_0x16e168(0x1e3)]()??'',_0x236521=_0x4cc286[_0x16e168(0x231)]('.'),_0x2542d8=_0x236521>=0x0?_0x4cc286[_0x16e168(0x263)](0x0,_0x236521):_0x4cc286,_0x10ce96=_0x236521>=0x0?_0x4cc286['slice'](_0x236521+0x1)[_0x16e168(0x1e3)]():'';(![_0x16e168(0x175),_0x16e168(0x222),'variables'][_0x16e168(0x26f)](_0x2542d8)||_0x10ce96==='')&&_0xe6b573['push']({'path':_0x4206c0,'message':_0x16e168(0x17b)+_0x2a1dfc[0x0]+'.'});}_0x3f7a04[_0x16e168(0x218)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x16e168(0x26f)]('${')&&_0xe6b573[_0x16e168(0x173)]({'path':_0x4206c0,'message':_0x16e168(0x24d)});}function validateEdge(_0x3356d3,_0x3d799b,_0x51abb6){const _0x1d8dbf=a299_0x2f5efa;_0x3356d3[_0x1d8dbf(0x237)]!==undefined&&typeof _0x3356d3[_0x1d8dbf(0x237)]!==_0x1d8dbf(0x277)&&_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+_0x1d8dbf(0x180),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x3356d3[_0x1d8dbf(0x1fd)]!==undefined&&typeof _0x3356d3['defaultFlow']!==_0x1d8dbf(0x18d)&&_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+_0x1d8dbf(0x216),'message':_0x1d8dbf(0x1f9)}),_0x3356d3[_0x1d8dbf(0x18c)]!==undefined&&(!Array[_0x1d8dbf(0x239)](_0x3356d3[_0x1d8dbf(0x18c)])?_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+_0x1d8dbf(0x243),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x3356d3[_0x1d8dbf(0x18c)][_0x1d8dbf(0x191)]((_0x16fe03,_0x155dc2)=>{const _0x1c09bf=_0x1d8dbf;if(!isRecord(_0x16fe03)){_0x51abb6[_0x1c09bf(0x173)]({'path':_0x3d799b+_0x1c09bf(0x213)+_0x155dc2+']','message':_0x1c09bf(0x1e7)});return;}for(const _0x55e37c of['x','y']){const _0x1fced4=_0x16fe03[_0x55e37c];(typeof _0x1fced4!==_0x1c09bf(0x204)||!Number[_0x1c09bf(0x17d)](_0x1fced4))&&_0x51abb6[_0x1c09bf(0x173)]({'path':_0x3d799b+_0x1c09bf(0x213)+_0x155dc2+'].'+_0x55e37c,'message':_0x1c09bf(0x226)+_0x55e37c+_0x1c09bf(0x22c)});}})),_0x3356d3[_0x1d8dbf(0x2b7)]!==undefined&&!CONDITION_TYPES['has'](_0x3356d3[_0x1d8dbf(0x2b7)])&&_0x51abb6['push']({'path':_0x3d799b+_0x1d8dbf(0x203),'message':_0x1d8dbf(0x256)+String(_0x3356d3['conditionType'])+'.'}),_0x3356d3[_0x1d8dbf(0x2b7)]===_0x1d8dbf(0x260)&&(typeof _0x3356d3[_0x1d8dbf(0x246)]!==_0x1d8dbf(0x277)||_0x3356d3['expression'][_0x1d8dbf(0x1e3)]()==='')&&_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+_0x1d8dbf(0x1a9),'message':_0x1d8dbf(0x283)}),_0x3356d3[_0x1d8dbf(0x1fd)]===!![]&&_0x3356d3[_0x1d8dbf(0x2b7)]!==_0x1d8dbf(0x290)&&_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+'.defaultFlow','message':_0x1d8dbf(0x28e)}),_0x3356d3[_0x1d8dbf(0x1fd)]===!![]&&typeof _0x3356d3['expression']==='string'&&_0x3356d3[_0x1d8dbf(0x246)][_0x1d8dbf(0x1e3)]()!==''&&_0x51abb6[_0x1d8dbf(0x173)]({'path':_0x3d799b+'.expression','message':_0x1d8dbf(0x206)});}function validateGraphShape(_0x433c64,_0x3177c8,_0x5753f4,_0x44a694,_0x421f89,_0x345d71,_0x4a528f){const _0x7af0b4=a299_0x2f5efa;for(const [_0x7063d,_0x201656]of _0x433c64){const _0x48105b=_0x421f89[_0x7af0b4(0x284)](_0x7063d)??[],_0x11dad7=_0x44a694[_0x7af0b4(0x284)](_0x7063d)??[];_0x201656[_0x7af0b4(0x27f)]!==_0x7af0b4(0x286)&&_0x48105b['length']===0x0&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x2a4)});_0x201656['type']!=='END'&&_0x11dad7[_0x7af0b4(0x19f)]===0x0&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x1f7)});_0x201656['type']===_0x7af0b4(0x286)&&_0x48105b[_0x7af0b4(0x19f)]>0x0&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x221)});_0x201656['type']==='END'&&_0x11dad7[_0x7af0b4(0x19f)]>0x0&&_0x4a528f[_0x7af0b4(0x173)]({'path':'flowJson.nodes.'+_0x7063d,'message':_0x7af0b4(0x248)});if(_0x201656[_0x7af0b4(0x27f)]==='CONDITION'){_0x11dad7[_0x7af0b4(0x19f)]<0x2&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x27d)});const _0x97ec97=_0x11dad7['filter'](_0x37388d=>_0x37388d[_0x7af0b4(0x1fd)]===!![]);_0x97ec97[_0x7af0b4(0x19f)]!==0x1&&_0x4a528f['push']({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0x97ec97[_0x7af0b4(0x19f)]===0x1){const _0x2c21ef=_0x97ec97[0x0],_0x581633=_0x345d71['get'](_0x2c21ef)??'flowJson.edges';_0x2c21ef['conditionType']!==_0x7af0b4(0x290)&&_0x4a528f['push']({'path':_0x581633+_0x7af0b4(0x203),'message':_0x7af0b4(0x188)});_0x2c21ef[_0x7af0b4(0x246)]!==undefined&&_0x4a528f['push']({'path':_0x581633+_0x7af0b4(0x1a9),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x1c092d of _0x11dad7){if(_0x1c092d===_0x2c21ef)continue;const _0x52b60d=_0x345d71[_0x7af0b4(0x284)](_0x1c092d)??_0x7af0b4(0x268);if(_0x1c092d[_0x7af0b4(0x2b7)]!=='EXPRESSION')_0x4a528f[_0x7af0b4(0x173)]({'path':_0x52b60d+'.conditionType','message':_0x7af0b4(0x192)});else(typeof _0x1c092d[_0x7af0b4(0x246)]!==_0x7af0b4(0x277)||_0x1c092d['expression']['trim']()==='')&&_0x4a528f['push']({'path':_0x52b60d+_0x7af0b4(0x1a9),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x201656['type']===_0x7af0b4(0x273)&&(_0x201656[_0x7af0b4(0x1ca)]??'APPROVAL')==='HANDLE'){if(_0x11dad7[_0x7af0b4(0x19f)]!==0x1)_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x3c8888=_0x11dad7[0x0];((_0x3c8888[_0x7af0b4(0x2b7)]??'ALWAYS')!=='ALWAYS'||_0x3c8888[_0x7af0b4(0x1fd)]===!![]||typeof _0x3c8888[_0x7af0b4(0x246)]==='string'&&_0x3c8888[_0x7af0b4(0x246)][_0x7af0b4(0x1e3)]()!=='')&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x345d71[_0x7af0b4(0x284)](_0x3c8888)??_0x7af0b4(0x268),'message':_0x7af0b4(0x1fb)});}}else{if(_0x201656[_0x7af0b4(0x27f)]===_0x7af0b4(0x273)){const _0x283bd1=_0x11dad7[_0x7af0b4(0x29e)](_0x11f3da=>_0x11f3da[_0x7af0b4(0x2b7)]??_0x7af0b4(0x290)),_0x3dba68=_0x283bd1[_0x7af0b4(0x21d)](_0x2544cb=>_0x2544cb!=='APPROVED'&&_0x2544cb!==_0x7af0b4(0x18a));_0x3dba68[_0x7af0b4(0x19f)]>0x0&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x283bd1['filter'](_0x61d036=>_0x61d036===_0x7af0b4(0x214))[_0x7af0b4(0x19f)]!==0x1&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x163)}),_0x283bd1[_0x7af0b4(0x21d)](_0xd3afa9=>_0xd3afa9===_0x7af0b4(0x18a))['length']!==0x1&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':_0x7af0b4(0x195)}),_0x11dad7[_0x7af0b4(0x280)](_0x30edd6=>_0x30edd6[_0x7af0b4(0x1fd)]===!![])&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x7063d,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x491c94=new Set(),_0x425286=_0xf6502d=>{const _0x4e2d74=_0x7af0b4;if(_0x491c94[_0x4e2d74(0x2a0)](_0xf6502d))return;_0x491c94['add'](_0xf6502d);for(const _0x374eec of _0x44a694[_0x4e2d74(0x284)](_0xf6502d)??[]){const _0x5db9e4=resolveEdgeEndpoint(_0x374eec[_0x4e2d74(0x2b9)],_0x374eec[_0x4e2d74(0x1c6)]);if(_0x5db9e4&&_0x433c64['has'](_0x5db9e4))_0x425286(_0x5db9e4);}};_0x425286(_0x3177c8);for(const _0xb13ad8 of _0x433c64[_0x7af0b4(0x1f6)]()){!_0x491c94[_0x7af0b4(0x2a0)](_0xb13ad8)&&_0x4a528f['push']({'path':_0x7af0b4(0x1d1)+_0xb13ad8,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x26bdef=_0x5753f4[_0x7af0b4(0x280)](_0x1f2096=>_0x491c94[_0x7af0b4(0x2a0)](_0x1f2096));if(!_0x26bdef){_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x268),'message':_0x7af0b4(0x223)});return;}const _0x2922d0=new Set(),_0x6a96c=_0x36a5b9=>{const _0xb8f4ee=_0x7af0b4;if(_0x2922d0[_0xb8f4ee(0x2a0)](_0x36a5b9))return;_0x2922d0[_0xb8f4ee(0x19e)](_0x36a5b9);for(const _0x122f19 of _0x421f89[_0xb8f4ee(0x284)](_0x36a5b9)??[]){const _0x2a7c47=resolveEdgeEndpoint(_0x122f19['source'],_0x122f19[_0xb8f4ee(0x165)]);if(_0x2a7c47&&_0x433c64[_0xb8f4ee(0x2a0)](_0x2a7c47))_0x6a96c(_0x2a7c47);}};for(const _0x3e8f65 of _0x5753f4){if(_0x433c64[_0x7af0b4(0x2a0)](_0x3e8f65))_0x6a96c(_0x3e8f65);}for(const _0x20175a of _0x491c94){!_0x2922d0['has'](_0x20175a)&&_0x4a528f[_0x7af0b4(0x173)]({'path':_0x7af0b4(0x1d1)+_0x20175a,'message':_0x7af0b4(0x20b)});}}function validateApprovalResults(_0xcf4ab4,_0x38711f,_0x3ba25b,_0x3dfc99){const _0xe82655=a299_0x2f5efa;if(_0x38711f===0x0)return;const _0x3f5841=new Set(_0x3ba25b[_0xe82655(0x29e)](_0x2565e8=>_0xcf4ab4[_0xe82655(0x284)](_0x2565e8)?.['result'])['filter'](_0x33e573=>typeof _0x33e573===_0xe82655(0x277)));for(const _0x4ecb83 of['APPROVED',_0xe82655(0x18a)]){!_0x3f5841['has'](_0x4ecb83)&&_0x3dfc99[_0xe82655(0x173)]({'path':_0xe82655(0x1c9),'message':_0xe82655(0x288)+_0x4ecb83+'.'});}}function validateScriptResultReferences(_0x1be376,_0x47e3ac,_0x3b170b,_0x393e3c,_0x3b56b3,_0xf61fb,_0x54db9f){const _0x4dfbfc=a299_0x2f5efa;if(_0xf61fb[_0x4dfbfc(0x219)]===0x0)return;const _0x3045ba=new Set(),_0x3fca8e=_0x221fd9=>{const _0x2d83c0=_0x4dfbfc;if(!_0x3045ba['has'](_0x221fd9)&&_0x1be376[_0x2d83c0(0x2a0)](_0x221fd9)){_0x3045ba['add'](_0x221fd9);for(const _0x5f406d of _0x3b170b['get'](_0x221fd9)??[]){const _0x4d4861=resolveEdgeEndpoint(_0x5f406d[_0x2d83c0(0x2b9)],_0x5f406d[_0x2d83c0(0x1c6)]);if(_0x4d4861)_0x3fca8e(_0x4d4861);}}};_0x3fca8e(_0x47e3ac);const _0x3f9f3e=new Map();for(const _0x3283f6 of _0x3045ba){_0x3f9f3e[_0x4dfbfc(0x2aa)](_0x3283f6,_0x3283f6===_0x47e3ac?new Set([_0x47e3ac]):new Set(_0x3045ba));}let _0x25d81c=!![];while(_0x25d81c){_0x25d81c=![];for(const _0x33b2e7 of _0x3045ba){if(_0x33b2e7===_0x47e3ac)continue;const _0x1a8f7e=(_0x393e3c['get'](_0x33b2e7)??[])[_0x4dfbfc(0x29e)](_0xd46d76=>resolveEdgeEndpoint(_0xd46d76[_0x4dfbfc(0x225)],_0xd46d76[_0x4dfbfc(0x165)]))[_0x4dfbfc(0x21d)](_0xb9192c=>Boolean(_0xb9192c&&_0x3045ba[_0x4dfbfc(0x2a0)](_0xb9192c)));if(_0x1a8f7e[_0x4dfbfc(0x19f)]===0x0)continue;const _0x3b47c5=new Set(_0x3f9f3e[_0x4dfbfc(0x284)](_0x1a8f7e[0x0])??[]);for(const _0x542045 of _0x1a8f7e[_0x4dfbfc(0x263)](0x1)){const _0x4bd318=_0x3f9f3e['get'](_0x542045)??new Set();for(const _0xe0484f of _0x3b47c5){if(!_0x4bd318['has'](_0xe0484f))_0x3b47c5[_0x4dfbfc(0x25d)](_0xe0484f);}}_0x3b47c5['add'](_0x33b2e7);const _0x3bf2d7=_0x3f9f3e[_0x4dfbfc(0x284)](_0x33b2e7);!setsEqual(_0x3bf2d7,_0x3b47c5)&&(_0x3f9f3e['set'](_0x33b2e7,_0x3b47c5),_0x25d81c=!![]);}}for(const [_0xf7082d,_0x5aaea5]of _0x3b170b){const _0x1acc99=_0x3f9f3e[_0x4dfbfc(0x284)](_0xf7082d);if(!_0x1acc99)continue;for(const _0x3b2896 of _0x5aaea5){if(_0x3b2896['conditionType']!==_0x4dfbfc(0x260)||typeof _0x3b2896[_0x4dfbfc(0x246)]!==_0x4dfbfc(0x277))continue;for(const [_0x1ebf68,_0xeac4cf]of _0xf61fb){expressionReferencesVariable(_0x3b2896['expression'],_0x1ebf68)&&!_0x1acc99[_0x4dfbfc(0x2a0)](_0xeac4cf)&&_0x54db9f[_0x4dfbfc(0x173)]({'path':(_0x3b56b3['get'](_0x3b2896)??_0x4dfbfc(0x268))+_0x4dfbfc(0x1a9),'message':_0x4dfbfc(0x1d8)+_0x1ebf68+_0x4dfbfc(0x2b3)+_0xeac4cf+_0x4dfbfc(0x23b)+_0xf7082d+'.'});}}}}function expressionReferencesVariable(_0x3438b6,_0xd8a51d){const _0x2c4ff8=a299_0x2f5efa;let _0x1be9ed=0x0;while(_0x1be9ed<_0x3438b6[_0x2c4ff8(0x19f)]){const _0x417f54=_0x3438b6[_0x1be9ed];if(_0x417f54==='\x27'||_0x417f54==='\x22'){_0x1be9ed=skipQuotedExpressionSegment(_0x3438b6,_0x1be9ed,_0x417f54);continue;}if(!/[A-Za-z_]/[_0x2c4ff8(0x1c4)](_0x417f54)){_0x1be9ed+=0x1;continue;}const _0x2f7c32=_0x1be9ed;_0x1be9ed+=0x1;while(_0x1be9ed<_0x3438b6[_0x2c4ff8(0x19f)]&&/[A-Za-z0-9_]/[_0x2c4ff8(0x1c4)](_0x3438b6[_0x1be9ed])){_0x1be9ed+=0x1;}if(_0x3438b6[_0x2c4ff8(0x263)](_0x2f7c32,_0x1be9ed)!==_0xd8a51d)continue;let _0x43cb61=_0x2f7c32-0x1;while(_0x43cb61>=0x0&&/\s/[_0x2c4ff8(0x1c4)](_0x3438b6[_0x43cb61])){_0x43cb61-=0x1;}if(_0x3438b6[_0x43cb61]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x20853f,_0x1087bd,_0x2f7541){const _0x2b12c1=a299_0x2f5efa;let _0xc6aecb=_0x1087bd+0x1;while(_0xc6aecb<_0x20853f[_0x2b12c1(0x19f)]){if(_0x20853f[_0xc6aecb]==='\x5c'){_0xc6aecb+=0x2;continue;}if(_0x20853f[_0xc6aecb]===_0x2f7541)return _0xc6aecb+0x1;_0xc6aecb+=0x1;}return _0xc6aecb;}function resolveEffectiveResultVariable(_0x38be13,_0x519b43){const _0x11bf7c=a299_0x2f5efa;if(_0x38be13===undefined||_0x38be13===null||_0x519b43&&_0x38be13==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x38be13!==_0x11bf7c(0x277)||!VARIABLE_PATTERN[_0x11bf7c(0x1c4)](_0x38be13)||RESERVED_RESULT_VARIABLES[_0x11bf7c(0x2a0)](_0x38be13)||_0x38be13[_0x11bf7c(0x22d)](_0x11bf7c(0x235)))return undefined;return _0x38be13;}function registerResultVariableOwner(_0x22ee29,_0x5cbbfd,_0x22b484,_0x4b1176){const _0x4ff90a=a299_0x2f5efa;if(_0x22ee29['has'](_0x5cbbfd)){_0x4b1176[_0x4ff90a(0x173)]({'path':_0x4ff90a(0x1c9),'message':'Duplicate\x20resultVariable:\x20'+_0x5cbbfd+'.'});return;}_0x22ee29[_0x4ff90a(0x2aa)](_0x5cbbfd,_0x22b484);}function setsEqual(_0x114781,_0x7e79e1){const _0x50f5d3=a299_0x2f5efa;return _0x114781[_0x50f5d3(0x219)]===_0x7e79e1[_0x50f5d3(0x219)]&&[..._0x114781][_0x50f5d3(0x2b1)](_0x5b07d4=>_0x7e79e1[_0x50f5d3(0x2a0)](_0x5b07d4));}function isValidUserId(_0x461bcb){const _0x211420=a299_0x2f5efa;if(typeof _0x461bcb===_0x211420(0x277))return _0x461bcb[_0x211420(0x1e3)]()[_0x211420(0x19f)]>0x0;return Number['isSafeInteger'](_0x461bcb)&&Number(_0x461bcb)>0x0;}function resolveEdgeEndpoint(_0x3f3c04,_0x5b9b75){const _0x4acae3=a299_0x2f5efa;if(typeof _0x3f3c04===_0x4acae3(0x277)&&_0x3f3c04[_0x4acae3(0x1e3)]())return _0x3f3c04[_0x4acae3(0x1e3)]();if(typeof _0x5b9b75==='string'&&_0x5b9b75[_0x4acae3(0x1e3)]())return _0x5b9b75[_0x4acae3(0x1e3)]();return undefined;}function removeEmptyMetadata(_0x26677b,_0x2cf1dc,_0x5223c4,_0x36c688){const _0x195d53=a299_0x2f5efa;if(Array[_0x195d53(0x239)](_0x26677b)){_0x26677b['forEach']((_0x9e6af3,_0x46fdf9)=>removeEmptyMetadata(_0x9e6af3,_0x2cf1dc+'['+_0x46fdf9+']',_0x5223c4,_0x36c688));return;}if(!isRecord(_0x26677b))return;for(const [_0x5d9d93,_0x862d63]of Object[_0x195d53(0x179)](_0x26677b)){const _0x2a7570=_0x2cf1dc+'.'+_0x5d9d93;if(_0x5d9d93==='metadata'&&isEmptyJsonValue(_0x862d63)){delete _0x26677b[_0x5d9d93],_0x36c688[_0x195d53(0x173)](_0x2a7570),_0x5223c4[_0x195d53(0x173)]({'code':_0x195d53(0x1b1),'path':_0x2a7570,'message':_0x2a7570+_0x195d53(0x1d6)});continue;}removeEmptyMetadata(_0x862d63,_0x2a7570,_0x5223c4,_0x36c688);}}function isEmptyJsonValue(_0x5a527a){const _0x263a44=a299_0x2f5efa;if(_0x5a527a===null||_0x5a527a===undefined)return!![];if(typeof _0x5a527a===_0x263a44(0x277))return _0x5a527a[_0x263a44(0x1e3)]()==='';if(Array[_0x263a44(0x239)](_0x5a527a))return _0x5a527a[_0x263a44(0x19f)]===0x0;return isRecord(_0x5a527a)&&Object[_0x263a44(0x1f6)](_0x5a527a)[_0x263a44(0x19f)]===0x0;}function isRecord(_0x270157){const _0x1ae9a4=a299_0x2f5efa;return typeof _0x270157===_0x1ae9a4(0x2a7)&&_0x270157!==null&&!Array[_0x1ae9a4(0x239)](_0x270157);}function cloneJsonValue(_0x9ccde0){const _0x418cba=a299_0x2f5efa;return JSON[_0x418cba(0x196)](JSON[_0x418cba(0x227)](_0x9ccde0));}export async function readFlowConfigFile(_0x236cc5){const _0xca0f90=a299_0x2f5efa,_0x1de6d9=await readFile(resolve(_0x236cc5),_0xca0f90(0x267));return JSON[_0xca0f90(0x196)](_0x1de6d9);}
@@ -1 +1 @@
1
- const a300_0x109505=a300_0x43cf;(function(_0x3d5c73,_0x218fbf){const _0x5c0c59=a300_0x43cf,_0x108c4d=_0x3d5c73();while(!![]){try{const _0x226277=-parseInt(_0x5c0c59(0x16e))/0x1+parseInt(_0x5c0c59(0x163))/0x2+parseInt(_0x5c0c59(0x188))/0x3*(-parseInt(_0x5c0c59(0x160))/0x4)+-parseInt(_0x5c0c59(0x16c))/0x5+-parseInt(_0x5c0c59(0x17c))/0x6*(-parseInt(_0x5c0c59(0x175))/0x7)+parseInt(_0x5c0c59(0x167))/0x8*(-parseInt(_0x5c0c59(0x172))/0x9)+parseInt(_0x5c0c59(0x181))/0xa;if(_0x226277===_0x218fbf)break;else _0x108c4d['push'](_0x108c4d['shift']());}catch(_0x171589){_0x108c4d['push'](_0x108c4d['shift']());}}}(a300_0x129f,0x90435));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x109505(0x174);export const INSTANT_API_POLICY_FILE_NAME=a300_0x109505(0x155);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x31f4b8,_0x1f410c,_0x426a1f){return new CliError(_0x31f4b8,0x1,_0x1f410c,_0x426a1f);}export function loadInstantApiPolicyLocalConfig(_0xe0ddd3,_0x2f8435){assertSafeAppCode(_0xe0ddd3);const _0x4cbd9d=resolve(_0x2f8435??findProjectRootDirectory()),_0x2b2078=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xe0ddd3+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3ad15a=resolve(_0x4cbd9d,INSTANT_API_POLICY_RELATIVE_ROOT,_0xe0ddd3),_0x391b1e=resolve(_0x3ad15a,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x4cbd9d,'appCode':_0xe0ddd3,'policyRoot':_0x3ad15a,'policyFilePath':_0x391b1e,'policyRelativePath':_0x2b2078};}function a300_0x43cf(_0x1e3122,_0x189aa8){_0x1e3122=_0x1e3122-0x150;const _0x129fe6=a300_0x129f();let _0x43cfe6=_0x129fe6[_0x1e3122];return _0x43cfe6;}export function createDefaultInstantApiPolicyConfig(_0x41abf3,_0x21d615='allow'){return assertSafeAppCode(_0x41abf3),{'version':'2','appCode':_0x41abf3,'defaults':{'instantApi':_0x21d615},'rules':[]};}function a300_0x129f(){const _0x1dc394=['version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','defaults','198hHQxci','Policy\x20defaults.instantApi\x20is\x20required.','.rabetbase/instant-api-policy','21wOrQPV','version','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','instant_api_policy_version_invalid','.tmp','includes','303522gCnUuw','instant_api_policy_app_code_invalid','policyFilePath','instant_api_policy_rules_invalid','instant_api_policy_file_exists','12882440JSRgDq','object','force','decode','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','length','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','126ZOfcUj','pid','parse','trim','isArray','instant_api_policy_file_invalid','policyRoot','ENOENT','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_defaults_invalid','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_app_code_mismatch','instantApi','utf8','instant_api_policy_json_invalid','policy.json','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','EEXIST','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','overwritten','size','appCode','instant_api_policy_file_missing','instant_api_policy_file_too_large','Review\x20the\x20file\x20before\x20retrying.','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','33584LtReUc','created','code','1955200qsNxqb','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','63624uzzNyx','instant_api_policy_file_unwritable','unchanged','string','rules','4262350duucOd','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','446636CiXdxx'];a300_0x129f=function(){return _0x1dc394;};return a300_0x129f();}export async function readInstantApiPolicyConfigFile(_0x3d9d90){const _0x5586b4=a300_0x109505;let _0x1f9ec2;try{_0x1f9ec2=await stat(_0x3d9d90[_0x5586b4(0x17e)]);}catch(_0x3296b8){throw instantApiPolicyError(_0x5586b4(0x15c),_0x5586b4(0x164)+_0x3d9d90[_0x5586b4(0x17e)],_0x5586b4(0x190));}if(!_0x1f9ec2['isFile']())throw instantApiPolicyError(_0x5586b4(0x18d),_0x5586b4(0x16d)+_0x3d9d90[_0x5586b4(0x17e)]);if(_0x1f9ec2[_0x5586b4(0x15a)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x5586b4(0x15f));let _0x12cf48;try{_0x12cf48=await readFile(_0x3d9d90[_0x5586b4(0x17e)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x5586b4(0x156)+_0x3d9d90[_0x5586b4(0x17e)]);}if(_0x12cf48['byteLength']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5586b4(0x15d),_0x5586b4(0x15f));let _0x30bd76;try{_0x30bd76=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x5586b4(0x184)](_0x12cf48);}catch{throw instantApiPolicyError(_0x5586b4(0x18d),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x3d9d90[_0x5586b4(0x17e)]);}let _0x1fa1fc;try{_0x1fa1fc=JSON[_0x5586b4(0x18a)](_0x30bd76);}catch{throw instantApiPolicyError(_0x5586b4(0x154),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x3d9d90[_0x5586b4(0x17e)]);}return assertLocalPolicyContract(_0x1fa1fc,_0x3d9d90[_0x5586b4(0x15b)]);}export async function writeInstantApiPolicyConfigFile(_0x5ddbf5,_0x48c693,_0x45b71e={}){const _0x22e732=a300_0x109505,_0x118bac=assertLocalPolicyContract(_0x48c693,_0x5ddbf5[_0x22e732(0x15b)]),_0x3abdd8=JSON['stringify'](_0x118bac,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x3abdd8,_0x22e732(0x153))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x22e732(0x15f));await mkdir(_0x5ddbf5[_0x22e732(0x18e)],{'recursive':!![]});let _0x1a63d6;try{_0x1a63d6=await readFile(_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x153));}catch(_0x3f6800){if(!isMissingFile(_0x3f6800))throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x5ddbf5[_0x22e732(0x17e)]);}if(_0x1a63d6===_0x3abdd8)return{'action':_0x22e732(0x169),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};if(_0x1a63d6!==undefined&&!_0x45b71e[_0x22e732(0x183)])throw instantApiPolicyError(_0x22e732(0x180),_0x22e732(0x158)+_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x187));if(_0x1a63d6===undefined)try{return await writeFile(_0x5ddbf5[_0x22e732(0x17e)],_0x3abdd8,{'encoding':_0x22e732(0x153),'flag':'wx'}),{'action':_0x22e732(0x161),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};}catch(_0x795f4a){if(!isAlreadyExists(_0x795f4a))throw instantApiPolicyError(_0x22e732(0x168),_0x22e732(0x166)+_0x5ddbf5[_0x22e732(0x17e)]);if(!_0x45b71e['force'])throw instantApiPolicyError(_0x22e732(0x180),_0x22e732(0x170)+_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x15e));}const _0x4dc7c0=resolve(dirname(_0x5ddbf5[_0x22e732(0x17e)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x22e732(0x189)]+'.'+randomUUID()+_0x22e732(0x17a));try{await writeFile(_0x4dc7c0,_0x3abdd8,{'encoding':'utf8','flag':'wx'}),await rename(_0x4dc7c0,_0x5ddbf5[_0x22e732(0x17e)]);}catch{await unlink(_0x4dc7c0)['catch'](()=>undefined);throw instantApiPolicyError(_0x22e732(0x168),'Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x5ddbf5['policyFilePath']);}return{'action':_0x22e732(0x159),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};}function assertSafeAppCode(_0x593e29){const _0x4e7a89=a300_0x109505,_0x319494=_0x593e29[_0x4e7a89(0x18b)]();if(!_0x319494||_0x319494!==_0x593e29||_0x319494[_0x4e7a89(0x186)]>0x64||_0x319494==='.'||_0x319494==='..'||_0x319494[_0x4e7a89(0x17b)]('/')||_0x319494['includes']('\x5c')||_0x319494['includes']('\x00'))throw instantApiPolicyError(_0x4e7a89(0x17d),_0x4e7a89(0x177));}function assertLocalPolicyContract(_0x1fb7cd,_0x595914){const _0x53eed8=a300_0x109505;if(!isObject(_0x1fb7cd))throw instantApiPolicyError(_0x53eed8(0x154),_0x53eed8(0x185));if(_0x1fb7cd[_0x53eed8(0x176)]!=='1'&&_0x1fb7cd['version']!=='2')throw instantApiPolicyError(_0x53eed8(0x179),_0x53eed8(0x165),_0x53eed8(0x16f));if(_0x1fb7cd[_0x53eed8(0x15b)]!==_0x595914)throw instantApiPolicyError(_0x53eed8(0x151),_0x53eed8(0x150)+_0x595914+'.');if(!isObject(_0x1fb7cd[_0x53eed8(0x171)])||typeof _0x1fb7cd['defaults'][_0x53eed8(0x152)]!==_0x53eed8(0x16a))throw instantApiPolicyError(_0x53eed8(0x191),_0x53eed8(0x173));if(_0x1fb7cd[_0x53eed8(0x16b)]!==undefined&&_0x1fb7cd[_0x53eed8(0x16b)]!==null&&!Array[_0x53eed8(0x18c)](_0x1fb7cd[_0x53eed8(0x16b)]))throw instantApiPolicyError(_0x53eed8(0x17f),_0x53eed8(0x178));return _0x1fb7cd;}function isObject(_0x1fb582){const _0x3ef9c3=a300_0x109505;return _0x1fb582!==null&&typeof _0x1fb582===_0x3ef9c3(0x182)&&!Array['isArray'](_0x1fb582);}function isMissingFile(_0x46dc81){const _0x515e96=a300_0x109505;return Boolean(_0x46dc81&&typeof _0x46dc81===_0x515e96(0x182)&&_0x46dc81[_0x515e96(0x162)]===_0x515e96(0x18f));}function isAlreadyExists(_0x3bab2a){const _0x46ab66=a300_0x109505;return Boolean(_0x3bab2a&&typeof _0x3bab2a==='object'&&_0x3bab2a[_0x46ab66(0x162)]===_0x46ab66(0x157));}
1
+ function a300_0x30a5(_0x3c20a5,_0x4e6309){_0x3c20a5=_0x3c20a5-0xf6;const _0x23577=a300_0x2357();let _0x30a5a5=_0x23577[_0x3c20a5];return _0x30a5a5;}const a300_0x585bd2=a300_0x30a5;(function(_0x1ff344,_0x4dcda1){const _0x3d7480=a300_0x30a5,_0x10105f=_0x1ff344();while(!![]){try{const _0x72c4a0=parseInt(_0x3d7480(0x118))/0x1+parseInt(_0x3d7480(0x102))/0x2+-parseInt(_0x3d7480(0x10f))/0x3*(-parseInt(_0x3d7480(0x11d))/0x4)+-parseInt(_0x3d7480(0x10a))/0x5*(parseInt(_0x3d7480(0x106))/0x6)+parseInt(_0x3d7480(0x10b))/0x7*(-parseInt(_0x3d7480(0x122))/0x8)+-parseInt(_0x3d7480(0x125))/0x9+-parseInt(_0x3d7480(0x128))/0xa;if(_0x72c4a0===_0x4dcda1)break;else _0x10105f['push'](_0x10105f['shift']());}catch(_0xb5c895){_0x10105f['push'](_0x10105f['shift']());}}}(a300_0x2357,0xc84fd));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0x585bd2(0x126);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x2cd7b1,_0x1c424f,_0x3948d7){return new CliError(_0x2cd7b1,0x1,_0x1c424f,_0x3948d7);}export function loadInstantApiPolicyLocalConfig(_0xeab1,_0x4f508f){assertSafeAppCode(_0xeab1);const _0x3eeccf=resolve(_0x4f508f??findProjectRootDirectory()),_0x3b2d9e=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xeab1+'/'+INSTANT_API_POLICY_FILE_NAME,_0x465460=resolve(_0x3eeccf,INSTANT_API_POLICY_RELATIVE_ROOT,_0xeab1),_0x36bc7a=resolve(_0x465460,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x3eeccf,'appCode':_0xeab1,'policyRoot':_0x465460,'policyFilePath':_0x36bc7a,'policyRelativePath':_0x3b2d9e};}export function createDefaultInstantApiPolicyConfig(_0x38a026,_0xb2b260=a300_0x585bd2(0x100)){return assertSafeAppCode(_0x38a026),{'version':'2','appCode':_0x38a026,'defaults':{'instantApi':_0xb2b260},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x2d4695){const _0x479078=a300_0x585bd2;let _0x2e8b63;try{_0x2e8b63=await stat(_0x2d4695[_0x479078(0x11a)]);}catch(_0x4d8725){throw instantApiPolicyError('instant_api_policy_file_missing','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x2d4695[_0x479078(0x11a)],_0x479078(0x116));}if(!_0x2e8b63[_0x479078(0x10e)]())throw instantApiPolicyError(_0x479078(0x12c),_0x479078(0x131)+_0x2d4695[_0x479078(0x11a)]);if(_0x2e8b63['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x479078(0x110),_0x479078(0x12d));let _0xfd3fbb;try{_0xfd3fbb=await readFile(_0x2d4695['policyFilePath']);}catch{throw instantApiPolicyError(_0x479078(0x112),_0x479078(0xf6)+_0x2d4695[_0x479078(0x11a)]);}if(_0xfd3fbb[_0x479078(0x11c)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x479078(0x110),_0x479078(0x12d));let _0x2d05f9;try{_0x2d05f9=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x479078(0x109)](_0xfd3fbb);}catch{throw instantApiPolicyError('instant_api_policy_file_invalid',_0x479078(0xfd)+_0x2d4695[_0x479078(0x11a)]);}let _0x139797;try{_0x139797=JSON[_0x479078(0x114)](_0x2d05f9);}catch{throw instantApiPolicyError(_0x479078(0x12b),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x2d4695[_0x479078(0x11a)]);}return assertLocalPolicyContract(_0x139797,_0x2d4695[_0x479078(0x104)]);}export async function writeInstantApiPolicyConfigFile(_0x57c156,_0x12ea9f,_0x2ee5a2={}){const _0x2d9a04=a300_0x585bd2,_0x4a1e0b=assertLocalPolicyContract(_0x12ea9f,_0x57c156[_0x2d9a04(0x104)]),_0x421721=JSON[_0x2d9a04(0x113)](_0x4a1e0b,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x421721,_0x2d9a04(0xfb))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x2d9a04(0x110),_0x2d9a04(0x12d));await mkdir(_0x57c156[_0x2d9a04(0xfe)],{'recursive':!![]});let _0x1298bf;try{_0x1298bf=await readFile(_0x57c156[_0x2d9a04(0x11a)],_0x2d9a04(0xfb));}catch(_0xb04eb0){if(!isMissingFile(_0xb04eb0))throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x57c156[_0x2d9a04(0x11a)]);}if(_0x1298bf===_0x421721)return{'action':_0x2d9a04(0x108),'filePath':_0x57c156[_0x2d9a04(0x11a)]};if(_0x1298bf!==undefined&&!_0x2ee5a2[_0x2d9a04(0x10d)])throw instantApiPolicyError(_0x2d9a04(0x121),_0x2d9a04(0x111)+_0x57c156[_0x2d9a04(0x11a)],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x1298bf===undefined)try{return await writeFile(_0x57c156[_0x2d9a04(0x11a)],_0x421721,{'encoding':_0x2d9a04(0xfb),'flag':'wx'}),{'action':_0x2d9a04(0x11b),'filePath':_0x57c156[_0x2d9a04(0x11a)]};}catch(_0x45f55b){if(!isAlreadyExists(_0x45f55b))throw instantApiPolicyError(_0x2d9a04(0xf8),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x57c156['policyFilePath']);if(!_0x2ee5a2[_0x2d9a04(0x10d)])throw instantApiPolicyError(_0x2d9a04(0x121),_0x2d9a04(0x11f)+_0x57c156[_0x2d9a04(0x11a)],_0x2d9a04(0x11e));}const _0x2b48db=resolve(dirname(_0x57c156[_0x2d9a04(0x11a)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x2d9a04(0x115)]+'.'+randomUUID()+_0x2d9a04(0x12e));try{await writeFile(_0x2b48db,_0x421721,{'encoding':_0x2d9a04(0xfb),'flag':'wx'}),await rename(_0x2b48db,_0x57c156[_0x2d9a04(0x11a)]);}catch{await unlink(_0x2b48db)['catch'](()=>undefined);throw instantApiPolicyError(_0x2d9a04(0xf8),_0x2d9a04(0x105)+_0x57c156[_0x2d9a04(0x11a)]);}return{'action':'overwritten','filePath':_0x57c156[_0x2d9a04(0x11a)]};}function assertSafeAppCode(_0x36f079){const _0x1278c2=a300_0x585bd2,_0x33293b=_0x36f079[_0x1278c2(0x129)]();if(!_0x33293b||_0x33293b!==_0x36f079||_0x33293b[_0x1278c2(0x10c)]>0x64||_0x33293b==='.'||_0x33293b==='..'||_0x33293b[_0x1278c2(0x120)]('/')||_0x33293b['includes']('\x5c')||_0x33293b[_0x1278c2(0x120)]('\x00'))throw instantApiPolicyError(_0x1278c2(0x127),_0x1278c2(0x130));}function assertLocalPolicyContract(_0x325fcd,_0x3496e7){const _0x2e512e=a300_0x585bd2;if(!isObject(_0x325fcd))throw instantApiPolicyError('instant_api_policy_json_invalid',_0x2e512e(0xff));if(_0x325fcd['version']!=='1'&&_0x325fcd[_0x2e512e(0x12a)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x325fcd[_0x2e512e(0x104)]!==_0x3496e7)throw instantApiPolicyError('instant_api_policy_app_code_mismatch',_0x2e512e(0x107)+_0x3496e7+'.');if(!isObject(_0x325fcd[_0x2e512e(0x12f)])||typeof _0x325fcd[_0x2e512e(0x12f)][_0x2e512e(0x103)]!=='string')throw instantApiPolicyError(_0x2e512e(0x119),_0x2e512e(0xfa));if(_0x325fcd[_0x2e512e(0x132)]!==undefined&&_0x325fcd[_0x2e512e(0x132)]!==null&&!Array['isArray'](_0x325fcd[_0x2e512e(0x132)]))throw instantApiPolicyError(_0x2e512e(0x117),_0x2e512e(0x101));return _0x325fcd;}function isObject(_0x44cc42){const _0x5437fb=a300_0x585bd2;return _0x44cc42!==null&&typeof _0x44cc42===_0x5437fb(0x123)&&!Array[_0x5437fb(0xfc)](_0x44cc42);}function isMissingFile(_0x42dda5){const _0x83e4e2=a300_0x585bd2;return Boolean(_0x42dda5&&typeof _0x42dda5===_0x83e4e2(0x123)&&_0x42dda5[_0x83e4e2(0xf7)]===_0x83e4e2(0xf9));}function a300_0x2357(){const _0x1612ff=['691770lWkzyP','1606766MrqRSE','length','force','isFile','51dBBKBm','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_file_unreadable','stringify','parse','pid','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_rules_invalid','368140RgyWGv','instant_api_policy_defaults_invalid','policyFilePath','created','byteLength','153788UrxFpi','Review\x20the\x20file\x20before\x20retrying.','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','includes','instant_api_policy_file_exists','8wiheNm','object','EEXIST','5512329NnFVLC','policy.json','instant_api_policy_app_code_invalid','3647160VcfvdC','trim','version','instant_api_policy_json_invalid','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','.tmp','defaults','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','rules','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','code','instant_api_policy_file_unwritable','ENOENT','Policy\x20defaults.instantApi\x20is\x20required.','utf8','isArray','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','policyRoot','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','allow','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','2564362ERgDdU','instantApi','appCode','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','12LZfZIz','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','unchanged','decode'];a300_0x2357=function(){return _0x1612ff;};return a300_0x2357();}function isAlreadyExists(_0xbcf150){const _0x5a7c06=a300_0x585bd2;return Boolean(_0xbcf150&&typeof _0xbcf150===_0x5a7c06(0x123)&&_0xbcf150[_0x5a7c06(0xf7)]===_0x5a7c06(0x124));}
@@ -1 +1 @@
1
- function a301_0x149c(_0x403171,_0x4db955){_0x403171=_0x403171-0xf2;const _0x13e4ad=a301_0x13e4();let _0x149c04=_0x13e4ad[_0x403171];return _0x149c04;}const a301_0x4dd46a=a301_0x149c;(function(_0x156a8e,_0x462929){const _0x12d6a9=a301_0x149c,_0x3a2ae9=_0x156a8e();while(!![]){try{const _0x2f1586=-parseInt(_0x12d6a9(0xf7))/0x1*(-parseInt(_0x12d6a9(0xfd))/0x2)+-parseInt(_0x12d6a9(0x102))/0x3*(parseInt(_0x12d6a9(0xfb))/0x4)+-parseInt(_0x12d6a9(0x101))/0x5*(-parseInt(_0x12d6a9(0xfe))/0x6)+-parseInt(_0x12d6a9(0xf9))/0x7+parseInt(_0x12d6a9(0xf2))/0x8*(-parseInt(_0x12d6a9(0xfc))/0x9)+-parseInt(_0x12d6a9(0xf6))/0xa*(-parseInt(_0x12d6a9(0xf8))/0xb)+parseInt(_0x12d6a9(0xff))/0xc;if(_0x2f1586===_0x462929)break;else _0x3a2ae9['push'](_0x3a2ae9['shift']());}catch(_0x455695){_0x3a2ae9['push'](_0x3a2ae9['shift']());}}}(a301_0x13e4,0x4c309));const base='/smartapi/instant-api-policy';function a301_0x13e4(){const _0x4b36b2=['9186TTgneW','375216tvgaeO','/revision','1905BtXUQI','3fxPnit','/rollback','224flfhlE','/publish','/revisions','/validate','5240OsiMsr','11083kgujcp','4719ofTapz','593418GTxGyM','freeze','1944604WBPDOL','46539MoMkdy','34usMOVs'];a301_0x13e4=function(){return _0x4b36b2;};return a301_0x13e4();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x4dd46a(0xfa)]({'current':base+'/current','validate':base+a301_0x4dd46a(0xf5),'publish':base+a301_0x4dd46a(0xf3),'revisions':base+a301_0x4dd46a(0xf4),'revision':base+a301_0x4dd46a(0x100),'rollback':base+a301_0x4dd46a(0x103)});
1
+ const a301_0x113a41=a301_0x7bc3;(function(_0x6392be,_0x30bb1a){const _0x32718f=a301_0x7bc3,_0x20f9a3=_0x6392be();while(!![]){try{const _0xd225f8=-parseInt(_0x32718f(0xd6))/0x1*(parseInt(_0x32718f(0xca))/0x2)+-parseInt(_0x32718f(0xd5))/0x3+parseInt(_0x32718f(0xd9))/0x4*(-parseInt(_0x32718f(0xcb))/0x5)+parseInt(_0x32718f(0xd7))/0x6*(parseInt(_0x32718f(0xcd))/0x7)+-parseInt(_0x32718f(0xc9))/0x8+parseInt(_0x32718f(0xda))/0x9*(-parseInt(_0x32718f(0xcc))/0xa)+-parseInt(_0x32718f(0xd8))/0xb*(-parseInt(_0x32718f(0xcf))/0xc);if(_0xd225f8===_0x30bb1a)break;else _0x20f9a3['push'](_0x20f9a3['shift']());}catch(_0xf729e0){_0x20f9a3['push'](_0x20f9a3['shift']());}}}(a301_0x4f00,0x2597c));function a301_0x7bc3(_0x5309f3,_0x32cf80){_0x5309f3=_0x5309f3-0xc9;const _0x4f00a3=a301_0x4f00();let _0x7bc34=_0x4f00a3[_0x5309f3];return _0x7bc34;}const base=a301_0x113a41(0xd1);function a301_0x4f00(){const _0x269a1d=['7jbRWpR','/publish','72iTcvjH','/validate','/smartapi/instant-api-policy','/rollback','/revision','freeze','652662eAFNCw','94796tincTZ','1581402JOysfH','1635029viqnyQ','10124EafPbR','11079OxVfxL','2084936wWajsu','2wLFGDr','540xwNVLt','1260IMHhGf'];a301_0x4f00=function(){return _0x269a1d;};return a301_0x4f00();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x113a41(0xd4)]({'current':base+'/current','validate':base+a301_0x113a41(0xd0),'publish':base+a301_0x113a41(0xce),'revisions':base+'/revisions','revision':base+a301_0x113a41(0xd3),'rollback':base+a301_0x113a41(0xd2)});
@@ -1 +1 @@
1
- function a302_0x1657(_0x361ec2,_0x11b266){_0x361ec2=_0x361ec2-0x15a;const _0x4e6419=a302_0x4e64();let _0x1657ce=_0x4e6419[_0x361ec2];return _0x1657ce;}const a302_0x39c7c6=a302_0x1657;(function(_0x150633,_0x20f33b){const _0x1934d6=a302_0x1657,_0xb996a4=_0x150633();while(!![]){try{const _0x45244e=-parseInt(_0x1934d6(0x176))/0x1+parseInt(_0x1934d6(0x15a))/0x2*(-parseInt(_0x1934d6(0x161))/0x3)+-parseInt(_0x1934d6(0x172))/0x4+-parseInt(_0x1934d6(0x173))/0x5+parseInt(_0x1934d6(0x179))/0x6+parseInt(_0x1934d6(0x17b))/0x7+-parseInt(_0x1934d6(0x15f))/0x8*(-parseInt(_0x1934d6(0x178))/0x9);if(_0x45244e===_0x20f33b)break;else _0xb996a4['push'](_0xb996a4['shift']());}catch(_0x2c4060){_0xb996a4['push'](_0xb996a4['shift']());}}}(a302_0x4e64,0xca088));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';function a302_0x4e64(){const _0x302719=['getStore','pageTooLarge','test','cookie','status','transportFailure','message','timeout','signal','api_error','httpStatus','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','validation','6137936cnBZiV','1017920YmaIGK','origin','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','616338twGzEV','Knowledge\x20management\x20request\x20cancelled.','408825fCQBvr','9035256HUDHbB','defineProperty','8150709gFiZiH','run','authRequired','5596letjUr','kind','remoteErrorCode','trim','network','200WZWasg','code','669rrIqEG','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','cancelled','API\x20error\x20code:\x20'];a302_0x4e64=function(){return _0x302719;};return a302_0x4e64();}const WRITE_RECONCILIATION=a302_0x39c7c6(0x170),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x39c7c6(0x16a)];[a302_0x39c7c6(0x15c)];[a302_0x39c7c6(0x16f)];[a302_0x39c7c6(0x166)];constructor(_0x4fdef6,_0x1f310c=![],_0x43c833,_0x1bb556,_0x1334f5=![]){const _0x1c29b1=a302_0x39c7c6;super(_0x1c29b1(0x16e),0x1,_0x4fdef6,_0x43c833?_0x1c29b1(0x164)+_0x43c833:undefined),this[_0x1c29b1(0x16a)]=_0x1f310c,this[_0x1c29b1(0x15c)]=_0x43c833,this['httpStatus']=_0x1bb556,this[_0x1c29b1(0x166)]=_0x1334f5;if(_0x43c833)Object[_0x1c29b1(0x17a)](this,'data',{'value':{'remoteErrorCode':_0x43c833},'enumerable':![]});}}function resolveOrigin(){const _0xeae02f=a302_0x39c7c6,_0x285827=getKbServiceDomain();if(!_0x285827)throw CliErrors[_0xeae02f(0x171)](_0xeae02f(0x162));try{return normalizeKbServiceOrigin(_0x285827);}catch{throw CliErrors[_0xeae02f(0x171)](_0xeae02f(0x175));}}export function withKbManagementSession(_0x27abd9,_0x26a992){const _0x42e097=a302_0x39c7c6;return session[_0x42e097(0x17c)]({'origin':resolveOrigin(),'signal':_0x27abd9},_0x26a992);}export async function withKbManagementClient(_0x18a456,_0x203bfa,_0x2eecbb={}){const _0x273fb3=a302_0x39c7c6,_0x278896=session[_0x273fb3(0x165)]()?.[_0x273fb3(0x174)]??resolveOrigin();if(!_0x18a456[_0x273fb3(0x15d)]())throw CliErrors[_0x273fb3(0x17d)]();const _0x22c367=_0x2eecbb[_0x273fb3(0x16d)]??session[_0x273fb3(0x165)]()?.['signal'];if(_0x22c367?.['aborted'])throw CliErrors['cancelled'](_0x273fb3(0x177));try{const _0x5be64c=createKnowledgeClient({'kbServiceDomain':_0x278896,'authMode':_0x273fb3(0x168),'cookie':_0x18a456,'invokeSource':'cli:rabetbase'});return await _0x203bfa(_0x5be64c,{'signal':_0x22c367});}catch(_0x4d7a53){if(!(_0x4d7a53 instanceof KnowledgeServiceError))throw _0x4d7a53;if(_0x4d7a53['kind']==='auth')throw CliErrors[_0x273fb3(0x17d)]();if(_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x171))throw CliErrors[_0x273fb3(0x171)](_0x4d7a53[_0x273fb3(0x16b)]);const _0x23aa1d=_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x15e)||_0x4d7a53['kind']===_0x273fb3(0x16c)||_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x163);throw new KbManagementError(_0x4d7a53[_0x273fb3(0x16b)]+(_0x4d7a53['writeUncertain']?WRITE_RECONCILIATION:''),_0x23aa1d,/^\d+$/[_0x273fb3(0x167)](_0x4d7a53['code']??'')?_0x4d7a53[_0x273fb3(0x160)]:undefined,_0x4d7a53[_0x273fb3(0x169)],_0x4d7a53[_0x273fb3(0x166)]);}}
1
+ const a302_0x3d4144=a302_0x293e;(function(_0x4fe451,_0x23d2a5){const _0x48d432=a302_0x293e,_0x2cbe03=_0x4fe451();while(!![]){try{const _0x12aa8b=parseInt(_0x48d432(0x19a))/0x1*(parseInt(_0x48d432(0x1a2))/0x2)+parseInt(_0x48d432(0x1b3))/0x3+parseInt(_0x48d432(0x19f))/0x4*(-parseInt(_0x48d432(0x1a5))/0x5)+-parseInt(_0x48d432(0x19d))/0x6+parseInt(_0x48d432(0x193))/0x7*(parseInt(_0x48d432(0x1ac))/0x8)+parseInt(_0x48d432(0x1a4))/0x9*(parseInt(_0x48d432(0x1ba))/0xa)+-parseInt(_0x48d432(0x1a7))/0xb;if(_0x12aa8b===_0x23d2a5)break;else _0x2cbe03['push'](_0x2cbe03['shift']());}catch(_0x23d8ec){_0x2cbe03['push'](_0x2cbe03['shift']());}}}(a302_0x9f9f,0xd5306));function a302_0x293e(_0x596d9e,_0x24737f){_0x596d9e=_0x596d9e-0x193;const _0x9f9f3b=a302_0x9f9f();let _0x293e08=_0x9f9f3b[_0x596d9e];return _0x293e08;}import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';function a302_0x9f9f(){const _0x281714=['data','trim','cookie','1199817YLBVEG','signal','Knowledge\x20management\x20request\x20cancelled.','cancelled','authRequired','auth','network','180KrYyVi','7JNBrmv','transportFailure','timeout','validation','httpStatus','kind','pageTooLarge','14iktlCx','api_error','code','5376582eyCavq','getStore','8nnZgYV','remoteErrorCode','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','98306ixeBqf','cli:rabetbase','508527fGAgca','1269080MtWLxf','writeUncertain','10890286ygwuhs','status','defineProperty','origin','aborted','9294736YKDqnP','run','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','API\x20error\x20code:\x20'];a302_0x9f9f=function(){return _0x281714;};return a302_0x9f9f();}import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION='\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.',session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x3d4144(0x194)];[a302_0x3d4144(0x1a0)];[a302_0x3d4144(0x197)];[a302_0x3d4144(0x199)];constructor(_0x48f75b,_0x3089cf=![],_0x398b11,_0x2f2dc8,_0x3ddc66=![]){const _0xc278a2=a302_0x3d4144;super(_0xc278a2(0x19b),0x1,_0x48f75b,_0x398b11?_0xc278a2(0x1af)+_0x398b11:undefined),this[_0xc278a2(0x194)]=_0x3089cf,this[_0xc278a2(0x1a0)]=_0x398b11,this[_0xc278a2(0x197)]=_0x2f2dc8,this['pageTooLarge']=_0x3ddc66;if(_0x398b11)Object[_0xc278a2(0x1a9)](this,_0xc278a2(0x1b0),{'value':{'remoteErrorCode':_0x398b11},'enumerable':![]});}}function resolveOrigin(){const _0x3cfeec=a302_0x3d4144,_0x58bc0f=getKbServiceDomain();if(!_0x58bc0f)throw CliErrors[_0x3cfeec(0x196)](_0x3cfeec(0x1ae));try{return normalizeKbServiceOrigin(_0x58bc0f);}catch{throw CliErrors['validation'](_0x3cfeec(0x1a1));}}export function withKbManagementSession(_0xb20297,_0x127086){const _0x504870=a302_0x3d4144;return session[_0x504870(0x1ad)]({'origin':resolveOrigin(),'signal':_0xb20297},_0x127086);}export async function withKbManagementClient(_0x58cf42,_0x4c2334,_0x5746c4={}){const _0x5c7a17=a302_0x3d4144,_0x16942a=session[_0x5c7a17(0x19e)]()?.[_0x5c7a17(0x1aa)]??resolveOrigin();if(!_0x58cf42[_0x5c7a17(0x1b1)]())throw CliErrors['authRequired']();const _0x3e833d=_0x5746c4[_0x5c7a17(0x1b4)]??session[_0x5c7a17(0x19e)]()?.[_0x5c7a17(0x1b4)];if(_0x3e833d?.[_0x5c7a17(0x1ab)])throw CliErrors['cancelled'](_0x5c7a17(0x1b5));try{const _0x1155c3=createKnowledgeClient({'kbServiceDomain':_0x16942a,'authMode':_0x5c7a17(0x1b2),'cookie':_0x58cf42,'invokeSource':_0x5c7a17(0x1a3)});return await _0x4c2334(_0x1155c3,{'signal':_0x3e833d});}catch(_0x16683b){if(!(_0x16683b instanceof KnowledgeServiceError))throw _0x16683b;if(_0x16683b[_0x5c7a17(0x198)]===_0x5c7a17(0x1b8))throw CliErrors[_0x5c7a17(0x1b7)]();if(_0x16683b[_0x5c7a17(0x198)]===_0x5c7a17(0x196))throw CliErrors['validation'](_0x16683b['message']);const _0x25e7cf=_0x16683b[_0x5c7a17(0x198)]===_0x5c7a17(0x1b9)||_0x16683b[_0x5c7a17(0x198)]===_0x5c7a17(0x195)||_0x16683b[_0x5c7a17(0x198)]===_0x5c7a17(0x1b6);throw new KbManagementError(_0x16683b['message']+(_0x16683b[_0x5c7a17(0x1a6)]?WRITE_RECONCILIATION:''),_0x25e7cf,/^\d+$/['test'](_0x16683b[_0x5c7a17(0x19c)]??'')?_0x16683b[_0x5c7a17(0x19c)]:undefined,_0x16683b[_0x5c7a17(0x1a8)],_0x16683b[_0x5c7a17(0x199)]);}}
@@ -1 +1 @@
1
- (function(_0x377638,_0x387fb2){const _0x26354a=a303_0x8ab6,_0x1b6766=_0x377638();while(!![]){try{const _0xc8061e=parseInt(_0x26354a(0x1b0))/0x1*(parseInt(_0x26354a(0x1b8))/0x2)+parseInt(_0x26354a(0x1af))/0x3*(parseInt(_0x26354a(0x1b9))/0x4)+parseInt(_0x26354a(0x1ae))/0x5+-parseInt(_0x26354a(0x1c6))/0x6+parseInt(_0x26354a(0x1b3))/0x7+parseInt(_0x26354a(0x1c8))/0x8+-parseInt(_0x26354a(0x1ad))/0x9*(parseInt(_0x26354a(0x1c9))/0xa);if(_0xc8061e===_0x387fb2)break;else _0x1b6766['push'](_0x1b6766['shift']());}catch(_0x58b06){_0x1b6766['push'](_0x1b6766['shift']());}}}(a303_0x2a42,0x81413));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x2a42(){const _0x3dddf9=['search','validation','Knowledge\x20search\x20cancelled.','976962YPVnHv','341556rEPbqd','out-of-scope','cookie','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','serviceUrl','data','HTTP\x20','includes','Knowledge\x20search\x20appCode\x20is\x20required.','hits','length','code','1748988giqvhN','signal','7178968aVhJZE','1202860mvdbrH','status','apiError','networkError','\x20(HTTP\x20','company','query','topK','message','kind','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','appCode','AbortError','development','171vxoAnh','134935HodanM','9EFogTJ','2DSqOTW','trim','network','6642104UwSZxW','authRequired'];a303_0x2a42=function(){return _0x3dddf9;};return a303_0x2a42();}import{CliErrors}from'../errors.js';function a303_0x8ab6(_0x5e53f8,_0x19aa3b){_0x5e53f8=_0x5e53f8-0x1a4;const _0x2a429e=a303_0x2a42();let _0x8ab633=_0x2a429e[_0x5e53f8];return _0x8ab633;}export function normalizeKbServiceOrigin(_0x28d88f){const _0x44b974=a303_0x8ab6;try{return normalizeKnowledgeServiceOrigin(_0x28d88f);}catch{throw CliErrors[_0x44b974(0x1b6)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x389fe6){const _0x2e66b8=a303_0x8ab6,_0x2a5474=_0x389fe6[_0x2e66b8(0x1aa)][_0x2e66b8(0x1b1)](),_0x52ca95=_0x389fe6[_0x2e66b8(0x1a5)]['trim']();if(!_0x2a5474)throw CliErrors[_0x2e66b8(0x1b6)](_0x2e66b8(0x1c2));if(!_0x52ca95)throw CliErrors[_0x2e66b8(0x1b6)]('Knowledge\x20search\x20query\x20is\x20required.');if(!_0x389fe6[_0x2e66b8(0x1bb)][_0x2e66b8(0x1b1)]())throw CliErrors[_0x2e66b8(0x1b4)]();const _0x11ff7e=normalizeKbServiceOrigin(_0x389fe6[_0x2e66b8(0x1be)]);try{const _0x479c8e=createKnowledgeClient({'kbServiceDomain':_0x11ff7e,'authMode':_0x2e66b8(0x1bb),'cookie':_0x389fe6[_0x2e66b8(0x1bb)],'invokeSource':'cli:rabetbase'}),_0x49191d=await _0x479c8e[_0x2e66b8(0x1b5)]({'appCode':_0x2a5474,'query':_0x52ca95,'scopes':['public',_0x2e66b8(0x1a4)],..._0x389fe6[_0x2e66b8(0x1a6)]!==undefined?{'topK':_0x389fe6[_0x2e66b8(0x1a6)]}:{}},{'signal':_0x389fe6[_0x2e66b8(0x1c7)]});return{..._0x49191d,'hits':_0x49191d['hits'],'schemaVersion':0x2,'profile':_0x2e66b8(0x1ac),'total':_0x49191d[_0x2e66b8(0x1c3)][_0x2e66b8(0x1c4)]};}catch(_0x1d0bf9){if(!(_0x1d0bf9 instanceof KnowledgeServiceError))throw _0x1d0bf9;if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='auth')throw CliErrors[_0x2e66b8(0x1b4)]();if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='validation')throw CliErrors[_0x2e66b8(0x1b6)](_0x1d0bf9[_0x2e66b8(0x1a7)]);if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='cancelled')throw new DOMException(_0x2e66b8(0x1b7),_0x2e66b8(0x1ab));if(_0x1d0bf9[_0x2e66b8(0x1a8)]===_0x2e66b8(0x1b2)||_0x1d0bf9[_0x2e66b8(0x1a8)]==='timeout')throw CliErrors[_0x2e66b8(0x1cc)](_0x1d0bf9[_0x2e66b8(0x1a8)]==='timeout'?_0x2e66b8(0x1bc):_0x2e66b8(0x1bd));const _0x3ebc96=_0x1d0bf9[_0x2e66b8(0x1a8)]==='contract'&&_0x1d0bf9[_0x2e66b8(0x1a7)][_0x2e66b8(0x1c1)](_0x2e66b8(0x1ba))?_0x2e66b8(0x1a9):_0x1d0bf9[_0x2e66b8(0x1a7)],_0x50dafe=CliErrors[_0x2e66b8(0x1cb)](_0x1d0bf9[_0x2e66b8(0x1ca)]!==undefined&&_0x1d0bf9[_0x2e66b8(0x1ca)]!==0xc8&&!_0x3ebc96[_0x2e66b8(0x1c1)](_0x2e66b8(0x1c0)+_0x1d0bf9[_0x2e66b8(0x1ca)])?_0x3ebc96+_0x2e66b8(0x1cd)+_0x1d0bf9[_0x2e66b8(0x1ca)]+')':_0x3ebc96);if(/^\d+$/['test'](_0x1d0bf9[_0x2e66b8(0x1c5)]??''))Object['defineProperty'](_0x50dafe,_0x2e66b8(0x1bf),{'value':{'remoteErrorCode':_0x1d0bf9['code']},'enumerable':![]});throw _0x50dafe;}}
1
+ (function(_0x5334af,_0x4be25b){const _0x1a89c3=a303_0x4cac,_0x407a54=_0x5334af();while(!![]){try{const _0x4152c4=-parseInt(_0x1a89c3(0xd3))/0x1*(parseInt(_0x1a89c3(0xcb))/0x2)+-parseInt(_0x1a89c3(0xdd))/0x3+parseInt(_0x1a89c3(0xd9))/0x4+parseInt(_0x1a89c3(0xd0))/0x5+parseInt(_0x1a89c3(0xe4))/0x6*(-parseInt(_0x1a89c3(0xd6))/0x7)+parseInt(_0x1a89c3(0xe5))/0x8+-parseInt(_0x1a89c3(0xc6))/0x9;if(_0x4152c4===_0x4be25b)break;else _0x407a54['push'](_0x407a54['shift']());}catch(_0x5d86a1){_0x407a54['push'](_0x407a54['shift']());}}}(a303_0x294d,0x38958));function a303_0x4cac(_0x42f9f4,_0x5b4dc6){_0x42f9f4=_0x42f9f4-0xbf;const _0x294d91=a303_0x294d();let _0x4caca8=_0x294d91[_0x42f9f4];return _0x4caca8;}import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x294d(){const _0x1d447d=['code','cli:rabetbase','length','16242coCJsg','includes','authRequired','timeout','network','2206900aBaawz','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','cancelled','22TKgQLu','trim','Knowledge\x20search\x20cancelled.','7zEzmhy','Knowledge\x20search\x20query\x20is\x20required.','test','563176FIQalG','HTTP\x20','message','cookie','737547JbFdFx','kind','status','apiError','hits','search','networkError','1774308BLpONj','3608928AVNDnQ','validation','contract','defineProperty','query','company','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','Knowledge\x20search\x20appCode\x20is\x20required.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','731637NzWANM','out-of-scope'];a303_0x294d=function(){return _0x1d447d;};return a303_0x294d();}import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x562cc5){const _0x17c81c=a303_0x4cac;try{return normalizeKnowledgeServiceOrigin(_0x562cc5);}catch{throw CliErrors[_0x17c81c(0xe6)](_0x17c81c(0xc3));}}export async function searchDirectKnowledge(_0x135b3c){const _0x22f7d5=a303_0x4cac,_0x1ba4ef=_0x135b3c['appCode'][_0x22f7d5(0xd4)](),_0x1b9a8f=_0x135b3c[_0x22f7d5(0xc1)]['trim']();if(!_0x1ba4ef)throw CliErrors[_0x22f7d5(0xe6)](_0x22f7d5(0xc4));if(!_0x1b9a8f)throw CliErrors['validation'](_0x22f7d5(0xd7));if(!_0x135b3c['cookie']['trim']())throw CliErrors[_0x22f7d5(0xcd)]();const _0x552a7d=normalizeKbServiceOrigin(_0x135b3c['serviceUrl']);try{const _0x31bba9=createKnowledgeClient({'kbServiceDomain':_0x552a7d,'authMode':_0x22f7d5(0xdc),'cookie':_0x135b3c[_0x22f7d5(0xdc)],'invokeSource':_0x22f7d5(0xc9)}),_0x4069c3=await _0x31bba9[_0x22f7d5(0xe2)]({'appCode':_0x1ba4ef,'query':_0x1b9a8f,'scopes':['public',_0x22f7d5(0xc2)],..._0x135b3c['topK']!==undefined?{'topK':_0x135b3c['topK']}:{}},{'signal':_0x135b3c['signal']});return{..._0x4069c3,'hits':_0x4069c3[_0x22f7d5(0xe1)],'schemaVersion':0x2,'profile':'development','total':_0x4069c3['hits'][_0x22f7d5(0xca)]};}catch(_0x5a736d){if(!(_0x5a736d instanceof KnowledgeServiceError))throw _0x5a736d;if(_0x5a736d[_0x22f7d5(0xde)]==='auth')throw CliErrors[_0x22f7d5(0xcd)]();if(_0x5a736d[_0x22f7d5(0xde)]==='validation')throw CliErrors[_0x22f7d5(0xe6)](_0x5a736d[_0x22f7d5(0xdb)]);if(_0x5a736d[_0x22f7d5(0xde)]===_0x22f7d5(0xd2))throw new DOMException(_0x22f7d5(0xd5),'AbortError');if(_0x5a736d[_0x22f7d5(0xde)]===_0x22f7d5(0xcf)||_0x5a736d[_0x22f7d5(0xde)]===_0x22f7d5(0xce))throw CliErrors[_0x22f7d5(0xe3)](_0x5a736d[_0x22f7d5(0xde)]==='timeout'?_0x22f7d5(0xd1):_0x22f7d5(0xc5));const _0x2f835e=_0x5a736d['kind']===_0x22f7d5(0xbf)&&_0x5a736d[_0x22f7d5(0xdb)][_0x22f7d5(0xcc)](_0x22f7d5(0xc7))?'KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.':_0x5a736d[_0x22f7d5(0xdb)],_0x349022=CliErrors[_0x22f7d5(0xe0)](_0x5a736d[_0x22f7d5(0xdf)]!==undefined&&_0x5a736d['status']!==0xc8&&!_0x2f835e[_0x22f7d5(0xcc)](_0x22f7d5(0xda)+_0x5a736d[_0x22f7d5(0xdf)])?_0x2f835e+'\x20(HTTP\x20'+_0x5a736d[_0x22f7d5(0xdf)]+')':_0x2f835e);if(/^\d+$/[_0x22f7d5(0xd8)](_0x5a736d[_0x22f7d5(0xc8)]??''))Object[_0x22f7d5(0xc0)](_0x349022,'data',{'value':{'remoteErrorCode':_0x5a736d[_0x22f7d5(0xc8)]},'enumerable':![]});throw _0x349022;}}