@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.12-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) 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.d.ts +1 -0
  283. package/lib/constant/routing-profile.js +1 -1
  284. package/lib/context/app-resolver.js +1 -1
  285. package/lib/context/auth-resolver.js +1 -1
  286. package/lib/context/config-loader.js +1 -1
  287. package/lib/context.js +1 -1
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-analysis.js +1 -1
  297. package/lib/core/cross-db-relation.js +1 -1
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.js +1 -1
  301. package/lib/core/instant-api-policy/endpoints.js +1 -1
  302. package/lib/core/kb-management-client.js +1 -1
  303. package/lib/core/kb-search-client.js +1 -1
  304. package/lib/core/page/file-system.js +1 -1
  305. package/lib/core/page/hash.js +1 -1
  306. package/lib/core/page/lock.js +1 -1
  307. package/lib/core/page/lr-smart-jsx.js +1 -1
  308. package/lib/core/sql-index-auditor.js +1 -1
  309. package/lib/core/sql-sync/config.js +1 -1
  310. package/lib/core/sql-sync/file-system.js +1 -1
  311. package/lib/core/sql-sync/hash.js +1 -1
  312. package/lib/core/sql-sync/lock.js +1 -1
  313. package/lib/core/sql-sync/utils.js +1 -1
  314. package/lib/core/sql-validator.js +1 -1
  315. package/lib/errors.js +1 -1
  316. package/lib/framework/build-all-flags.js +1 -1
  317. package/lib/framework/error-output.js +1 -1
  318. package/lib/framework/explicit-yes.js +1 -1
  319. package/lib/framework/flags.js +1 -1
  320. package/lib/framework/help.js +1 -1
  321. package/lib/framework/index.js +1 -1
  322. package/lib/framework/output.js +1 -1
  323. package/lib/framework/response.js +1 -1
  324. package/lib/framework/runner-alias.js +1 -1
  325. package/lib/framework/runner.js +1 -1
  326. package/lib/framework/schema-export.js +1 -1
  327. package/lib/framework/supported-flags.js +1 -1
  328. package/lib/framework/types.js +1 -1
  329. package/lib/generated/build-info.d.ts +4 -4
  330. package/lib/generated/build-info.js +1 -1
  331. package/lib/generated/official-routing.d.ts +2 -1
  332. package/lib/generated/official-routing.js +1 -1
  333. package/lib/generated/routing-contract.js +1 -1
  334. package/lib/help.js +1 -1
  335. package/lib/postinstall.js +1 -1
  336. package/lib/runtime/confirmation.js +1 -1
  337. package/lib/runtime/event.js +1 -1
  338. package/lib/runtime/index.js +1 -1
  339. package/lib/runtime/queue.js +1 -1
  340. package/lib/runtime/resolve.js +1 -1
  341. package/lib/services/dataset-design/checkpoint.js +1 -1
  342. package/lib/services/dataset-design/commands.js +1 -1
  343. package/lib/services/dataset-design/contract.js +1 -1
  344. package/lib/skills/builtin-skill.js +1 -1
  345. package/lib/skills/main.js +1 -1
  346. package/lib/skills/npx-skills-add.js +1 -1
  347. package/lib/skills/skill-presence.js +1 -1
  348. package/lib/telemetry/cli-command-trace.js +1 -1
  349. package/lib/telemetry/cli-help-trace.js +1 -1
  350. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  351. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  352. package/lib/telemetry/send-cli-trace-log.js +1 -1
  353. package/lib/utils/ai_config.js +1 -1
  354. package/lib/utils/apply-jq-filter.js +1 -1
  355. package/lib/utils/cdn-config.js +1 -1
  356. package/lib/utils/check-sdk-version.js +1 -1
  357. package/lib/utils/cli-version-check.js +1 -1
  358. package/lib/utils/cli-version-policy.js +1 -1
  359. package/lib/utils/config.js +1 -1
  360. package/lib/utils/entity-with-id.js +1 -1
  361. package/lib/utils/file-utils.js +1 -1
  362. package/lib/utils/guides-cdn.js +1 -1
  363. package/lib/utils/http-client.js +1 -1
  364. package/lib/utils/is-non-interactive.js +1 -1
  365. package/lib/utils/logger.js +1 -1
  366. package/lib/utils/params.js +1 -1
  367. package/lib/utils/platform.js +1 -1
  368. package/lib/utils/sleep.js +1 -1
  369. package/lib/utils/template-replacer.js +1 -1
  370. package/lib/utils/update-notice.js +1 -1
  371. package/lib/utils/version.js +1 -1
  372. package/lib/utils/with-active-cookie.js +1 -1
  373. package/lib/utils/write-cli-side-channel.js +1 -1
  374. package/package.json +1 -1
  375. package/skills/rabetbase/SKILL.md +1 -1
  376. package/skills/rabetbase/references/rabetbase-kb.md +1 -1
  377. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  378. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  379. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a299_0x4a86f2=a299_0x3bd6;(function(_0x14705b,_0x476334){const _0x3c65b7=a299_0x3bd6,_0x288420=_0x14705b();while(!![]){try{const _0x413120=-parseInt(_0x3c65b7(0x232))/0x1*(parseInt(_0x3c65b7(0x1f2))/0x2)+parseInt(_0x3c65b7(0x1bb))/0x3*(-parseInt(_0x3c65b7(0x1b9))/0x4)+-parseInt(_0x3c65b7(0x1e2))/0x5*(parseInt(_0x3c65b7(0x210))/0x6)+-parseInt(_0x3c65b7(0x1ff))/0x7*(-parseInt(_0x3c65b7(0x1d1))/0x8)+parseInt(_0x3c65b7(0x2ae))/0x9+-parseInt(_0x3c65b7(0x2f3))/0xa+parseInt(_0x3c65b7(0x266))/0xb;if(_0x413120===_0x476334)break;else _0x288420['push'](_0x288420['shift']());}catch(_0x18d003){_0x288420['push'](_0x288420['shift']());}}}(a299_0x43eb,0xec4e8));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_0x4a86f2(0x247),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a299_0x4a86f2(0x23e),'type':'object','required':[a299_0x4a86f2(0x2b2),a299_0x4a86f2(0x1f0),a299_0x4a86f2(0x2f0)],'$defs':{'userId':{'anyOf':[{'type':a299_0x4a86f2(0x28c),'minLength':0x1},{'type':a299_0x4a86f2(0x2a1),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a299_0x4a86f2(0x249),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x22d),a299_0x4a86f2(0x209)],'properties':{'value':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1},'unit':{'enum':[a299_0x4a86f2(0x2b9),a299_0x4a86f2(0x2dd),'HOURS','DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x4a86f2(0x1ce),'required':['id','type',a299_0x4a86f2(0x2bb),a299_0x4a86f2(0x263)],'properties':{'id':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'type':{'enum':[a299_0x4a86f2(0x218),'END',a299_0x4a86f2(0x274),'CONDITION',a299_0x4a86f2(0x290),a299_0x4a86f2(0x2fd)]},'name':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':a299_0x4a86f2(0x2b4)},'approvalMode':{'enum':['SINGLE','ALL','ANY']},'taskMode':{'enum':['APPROVAL',a299_0x4a86f2(0x283)]},'assignee':{'type':'object','required':[a299_0x4a86f2(0x226)],'properties':{'strategy':{'enum':[a299_0x4a86f2(0x1f7),'ROLE']},'userIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x271)}},'roleId':{'anyOf':[{'type':a299_0x4a86f2(0x2a1),'minimum':0x1},{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x214)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':['strategy',a299_0x4a86f2(0x1d9)],'properties':{'strategy':{'const':a299_0x4a86f2(0x1f7)},'userIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x271)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x4a86f2(0x1ad)},'result':{'enum':[a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4)]},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'async':{'type':a299_0x4a86f2(0x1ce),'properties':{'enabled':{'type':'boolean'},'retryCount':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x4a86f2(0x1ad)},'duration':{'$ref':a299_0x4a86f2(0x1e4)},'action':{'enum':['AUTO_APPROVE',a299_0x4a86f2(0x24c),'EXECUTE_BFF']},'interrupting':{'type':a299_0x4a86f2(0x1ad)},'scriptName':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x4a86f2(0x1b8)}},'additionalProperties':!![]},'cc':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x1cf)],'properties':{'recipientUserIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'visible':{'type':a299_0x4a86f2(0x277),'uniqueItems':!![],'items':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2d5),a299_0x4a86f2(0x2fc)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x4a86f2(0x203)]},'template':{'type':'object','required':['title',a299_0x4a86f2(0x1ea)],'properties':{'title':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'summary':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'detailMarkdown':{'type':a299_0x4a86f2(0x28c)},'facts':{'type':a299_0x4a86f2(0x277),'maxItems':0x8,'items':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2bc),a299_0x4a86f2(0x22d)],'properties':{'label':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'value':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x4a86f2(0x277),'maxItems':0x2,'items':{'type':'object','required':[a299_0x4a86f2(0x1be),a299_0x4a86f2(0x251)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x4a86f2(0x277),'items':{'type':'object','required':[a299_0x4a86f2(0x2e9),'value'],'properties':{'type':{'enum':[a299_0x4a86f2(0x1fa),'ROLE',a299_0x4a86f2(0x219)]},'value':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x4a86f2(0x1e7)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x4a86f2(0x1ce),'properties':{'id':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'source':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'target':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'sourceNodeId':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'targetNodeId':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'conditionType':{'enum':[a299_0x4a86f2(0x250),a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4),'EXPRESSION']},'expression':{'type':a299_0x4a86f2(0x28c)},'defaultFlow':{'type':a299_0x4a86f2(0x1ad)},'name':{'type':'string'},'waypoints':{'type':a299_0x4a86f2(0x277),'items':{'$ref':a299_0x4a86f2(0x2b4)}}},'allOf':[{'anyOf':[{'required':[a299_0x4a86f2(0x304)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0x4a86f2(0x215)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a299_0x4a86f2(0x28c)},'flowType':{'enum':[a299_0x4a86f2(0x2a5),a299_0x4a86f2(0x267)]},'datasetCode':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'pageId':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':Number[a299_0x4a86f2(0x26f)]},'pageIds':{'type':a299_0x4a86f2(0x277),'items':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2cf),a299_0x4a86f2(0x217)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x4a86f2(0x282),'description':a299_0x4a86f2(0x208)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x4a86f2(0x272)},'startPageId':![],'startPath':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x1fc)}},'edges':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x4a86f2(0x302),a299_0x4a86f2(0x2b2),a299_0x4a86f2(0x1dd),a299_0x4a86f2(0x22e),a299_0x4a86f2(0x20a),a299_0x4a86f2(0x206),a299_0x4a86f2(0x268)],REMOVED_ROOT_FIELDS=['id',a299_0x4a86f2(0x20a),a299_0x4a86f2(0x268)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x4a86f2(0x282),NODE_TYPES=new Set(['START','END',a299_0x4a86f2(0x274),'CONDITION','SCRIPT',a299_0x4a86f2(0x2fd)]),CONDITION_TYPES=new Set([a299_0x4a86f2(0x250),a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4),a299_0x4a86f2(0x2a0)]),APPROVAL_MODES=new Set(['SINGLE','ALL','ANY']),APPROVAL_TASK_MODES=new Set([a299_0x4a86f2(0x274),a299_0x4a86f2(0x283)]),FLOW_TIME_UNITS=new Set(['SECONDS',a299_0x4a86f2(0x2dd),a299_0x4a86f2(0x2d3),a299_0x4a86f2(0x1c9)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x4a86f2(0x1bc),a299_0x4a86f2(0x24c),a299_0x4a86f2(0x224)]),FLOW_TYPES=new Set([a299_0x4a86f2(0x2a5),a299_0x4a86f2(0x267)]),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE','PLATFORM_FORM']),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x4a86f2(0x2e7),a299_0x4a86f2(0x203)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x4a86f2(0x1fa),a299_0x4a86f2(0x1eb),a299_0x4a86f2(0x219)]),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_0x4a86f2(0x253),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_0x4a86f2(0x1ab),a299_0x4a86f2(0x1d6),'approval_sys_appCode',a299_0x4a86f2(0x205),a299_0x4a86f2(0x1c2),'approval_sys_initiatorUsername','approval_sys_datasetCode',a299_0x4a86f2(0x221),a299_0x4a86f2(0x2ea),a299_0x4a86f2(0x29e)]);export function normalizeFlowConfig(_0x595833){const _0x54e081=a299_0x4a86f2;if(!isRecord(_0x595833))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x46d0f1=cloneJsonValue(_0x595833),_0x488ee6=_0x46d0f1[_0x54e081(0x2f0)],_0x3bfe1e=isRecord(_0x488ee6)?cloneJsonValue(_0x488ee6):{},_0x3b3964=[],_0xa2ea=[];for(const _0x3464a9 of REMOVED_ROOT_FIELDS){if(!Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x46d0f1,_0x3464a9))continue;delete _0x46d0f1[_0x3464a9],_0xa2ea[_0x54e081(0x1d2)](_0x3464a9),_0x3b3964[_0x54e081(0x1d2)]({'code':_0x54e081(0x2c6),'path':_0x3464a9,'message':_0x3464a9+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x1549a1 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x54e081(0x242)]['hasOwnProperty']['call'](_0x3bfe1e,_0x1549a1))continue;const _0x955a3c=_0x54e081(0x2ba)+_0x1549a1;delete _0x3bfe1e[_0x1549a1],_0xa2ea[_0x54e081(0x1d2)](_0x955a3c),_0x3b3964[_0x54e081(0x1d2)]({'code':'legacy_field_removed','path':_0x955a3c,'message':_0x955a3c+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x3bfe1e,_0x54e081(0x2e4))){const _0x26e709=_0x3bfe1e[_0x54e081(0x2e4)],_0x47544e=typeof _0x26e709==='string'?_0x26e709[_0x54e081(0x260)]():_0x26e709;if(isEmptyJsonValue(_0x26e709)||_0x47544e===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5bfc3f='flowJson.schemaVersion';delete _0x3bfe1e[_0x54e081(0x2e4)],_0xa2ea[_0x54e081(0x1d2)](_0x5bfc3f),_0x3b3964[_0x54e081(0x1d2)]({'code':'legacy_field_removed','path':_0x5bfc3f,'message':_0x5bfc3f+_0x54e081(0x24f)+DEFAULT_FLOW_SCHEMA_VERSION+_0x54e081(0x1b2)});}}removeEmptyMetadata(_0x3bfe1e,_0x54e081(0x2f0),_0x3b3964,_0xa2ea);_0x46d0f1[_0x54e081(0x1f0)]==='INDEPENDENT_FLOW'&&!Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x3bfe1e,_0x54e081(0x2e3))&&(_0x3bfe1e['pageMode']=_0x54e081(0x272));_0x46d0f1[_0x54e081(0x2f0)]=_0x3bfe1e;if(typeof _0x46d0f1[_0x54e081(0x2b2)]===_0x54e081(0x28c))_0x46d0f1[_0x54e081(0x2b2)]=_0x46d0f1[_0x54e081(0x2b2)][_0x54e081(0x260)]();return{'config':_0x46d0f1,'warnings':_0x3b3964,'removedPaths':_0xa2ea};}export function validateFlowConfig(_0x56bf14){const _0x4ef0d6=a299_0x4a86f2;let _0x5c227e;try{_0x5c227e=normalizeFlowConfig(_0x56bf14);}catch(_0x2998d4){const _0x425cdb=_0x2998d4 instanceof Error?_0x2998d4['message']:String(_0x2998d4),_0x2c98cf={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x425cdb}],'warnings':[],'normalized':_0x2c98cf,'validationConfig':_0x2c98cf};}const _0x4299e8=_0x5c227e[_0x4ef0d6(0x1dc)],_0x4abbdc=cloneJsonValue(_0x4299e8),_0x5646e5=_0x4abbdc[_0x4ef0d6(0x2f0)];_0x5646e5['flowKey']='__rabetbase_local_validation__',_0x5646e5[_0x4ef0d6(0x2b2)]=_0x4299e8[_0x4ef0d6(0x2b2)];typeof _0x4299e8['datasetCode']===_0x4ef0d6(0x28c)&&_0x4299e8[_0x4ef0d6(0x22e)][_0x4ef0d6(0x260)]()&&(_0x5646e5['bindDatasetCode']=_0x4299e8[_0x4ef0d6(0x22e)][_0x4ef0d6(0x260)]());const _0x49064b=[];return validateOuterMetadata(_0x4299e8,_0x49064b),validateFlowClassification(_0x4299e8,_0x49064b),validateGraph(_0x4299e8[_0x4ef0d6(0x2f0)],_0x49064b),{'valid':_0x49064b['length']===0x0,'errors':_0x49064b,'warnings':_0x5c227e['warnings'],'normalized':_0x4299e8,'validationConfig':_0x4abbdc};}function validateFlowClassification(_0x3cc04e,_0x9766a0){const _0x179c24=a299_0x4a86f2;if(!isRecord(_0x3cc04e[_0x179c24(0x2f0)]))return;const _0xdcf2e0=_0x3cc04e[_0x179c24(0x1f0)],_0x2dc210=_0x3cc04e['flowJson'][_0x179c24(0x2e3)];_0x2dc210!==undefined&&(typeof _0x2dc210!==_0x179c24(0x28c)||!FLOW_PAGE_MODES[_0x179c24(0x2f7)](_0x2dc210))&&_0x9766a0[_0x179c24(0x1d2)]({'path':_0x179c24(0x255),'message':_0x179c24(0x2b7)+String(_0x2dc210)+'.'});_0xdcf2e0==='FORM_FLOW'&&_0x2dc210!==undefined&&_0x9766a0[_0x179c24(0x1d2)]({'path':_0x179c24(0x255),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0xdcf2e0===_0x179c24(0x267)&&_0x2dc210==='PLATFORM_FORM'&&_0x9766a0['push']({'path':_0x179c24(0x255),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xdcf2e0===_0x179c24(0x2a5)||_0xdcf2e0===_0x179c24(0x267))&&validateCustomPageNavigation(_0x3cc04e,_0xdcf2e0,_0x2dc210,_0x9766a0);if(_0xdcf2e0!==_0x179c24(0x2a5)||!Array[_0x179c24(0x202)](_0x3cc04e[_0x179c24(0x2f0)]['nodes']))return;_0x3cc04e[_0x179c24(0x2f0)][_0x179c24(0x2cf)][_0x179c24(0x281)]((_0x45c59e,_0x3497a2)=>{const _0x5c53ae=_0x179c24;isRecord(_0x45c59e)&&_0x45c59e[_0x5c53ae(0x2e9)]===_0x5c53ae(0x274)&&_0x45c59e[_0x5c53ae(0x1df)]===_0x5c53ae(0x283)&&_0x9766a0[_0x5c53ae(0x1d2)]({'path':_0x5c53ae(0x1ba)+_0x3497a2+'].taskMode','message':_0x5c53ae(0x24d)});});}function a299_0x3bd6(_0x1ce71a,_0x4c4c37){_0x1ce71a=_0x1ce71a-0x1aa;const _0x43ebda=a299_0x43eb();let _0x3bd686=_0x43ebda[_0x1ce71a];return _0x3bd686;}function validateCustomPageNavigation(_0x24c330,_0x45aab9,_0x5136f1,_0x5dab07){const _0x4ce6a9=a299_0x4a86f2,_0x21f821=_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cd)];_0x21f821!==undefined&&_0x5dab07['push']({'path':_0x4ce6a9(0x1ed),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0xeeec47=_0x24c330['flowJson'][_0x4ce6a9(0x2d9)];_0xeeec47!==undefined&&(typeof _0xeeec47!==_0x4ce6a9(0x28c)||_0xeeec47[_0x4ce6a9(0x260)]()==='')&&_0x5dab07[_0x4ce6a9(0x1d2)]({'path':_0x4ce6a9(0x2fb),'message':_0x4ce6a9(0x25a)});const _0x382a05=Array['isArray'](_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cf)])?_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cf)][_0x4ce6a9(0x2bd)]((_0x496edb,_0x235a19)=>({'node':_0x496edb,'index':_0x235a19}))[_0x4ce6a9(0x235)](({node:_0x1636a9})=>isRecord(_0x1636a9)&&_0x1636a9[_0x4ce6a9(0x248)]!==undefined):[],_0xb10682=_0xeeec47!==undefined||_0x382a05[_0x4ce6a9(0x2a2)]>0x0,_0x4ad584=_0x5136f1===undefined&&_0x45aab9===_0x4ce6a9(0x267)?_0x4ce6a9(0x272):_0x5136f1;_0xb10682&&(_0x45aab9!==_0x4ce6a9(0x267)||_0x4ad584!=='CUSTOM_PAGE')&&(_0xeeec47!==undefined&&_0x5dab07['push']({'path':_0x4ce6a9(0x2fb),'message':_0x4ce6a9(0x292)}),_0x382a05[_0x4ce6a9(0x281)](({index:_0x240fdf})=>{const _0x5c093a=_0x4ce6a9;_0x5dab07['push']({'path':_0x5c093a(0x1ba)+_0x240fdf+_0x5c093a(0x2d0),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x20aa8d,_0x3fbbdd,_0x547a4b={}){const _0x3234c9=a299_0x4a86f2,_0x3aa225=resolve(_0x20aa8d),_0xbf633=_0x3aa225+'.'+process[_0x3234c9(0x303)]+'.'+randomUUID()+_0x3234c9(0x2ac),_0x44932=JSON[_0x3234c9(0x287)](_0x3fbbdd,null,0x2)+'\x0a';let _0x1e6bce;try{try{_0x1e6bce=(await stat(_0x3aa225))['mode']&0x1ff;}catch{_0x1e6bce=undefined;}await writeFile(_0xbf633,_0x44932,{'encoding':'utf8','flag':'wx','mode':_0x1e6bce??0x1a4});if(_0x1e6bce!==undefined)await chmod(_0xbf633,_0x1e6bce);_0x547a4b[_0x3234c9(0x1e0)]===![]?(await link(_0xbf633,_0x3aa225),await unlink(_0xbf633)):await rename(_0xbf633,_0x3aa225);}finally{await unlink(_0xbf633)[_0x3234c9(0x288)](()=>undefined);}}function a299_0x43eb(){const _0x55a343=['END','Notification\x20recipient\x20must\x20be\x20an\x20object.','.assignee.strategy','variables','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','title','flowType\x20is\x20required.','.timeout.action','indexOf','.text','approval_sys_dataId','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','EXPRESSION','integer','length','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','utf8','FORM_FLOW','async.enabled\x20must\x20be\x20a\x20boolean.','waypoints\x20must\x20be\x20an\x20array.','\x20is\x20required.','result','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.async','.tmp','\x20actions.','3335076ZdwSdH','.role','version','flowJson.schemaVersion','flowName','targetNodeId','#/$defs/position','SINGLE','defaultFlow','Unsupported\x20pageMode:\x20','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','SECONDS','flowJson.','name','label','map','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.cc','Every\x20node\x20requires\x20a\x20non-empty\x20name.','timeout\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','nodes\x20must\x20be\x20an\x20array.','flowJson.nodes','.version','legacy_field_removed','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isInteger','call','slice','edge\x20target\x20is\x20required.','Duplicate\x20value:\x20','startPageId','toUpperCase','nodes','].path','enabled','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','HOURS','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','configCode','.path','context','parse','startPath','.approvalMode','flowDesc','waypoint.','MINUTES','transferCandidates\x20must\x20be\x20an\x20object.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.id','.timeout.resultVariable','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','pageMode','schemaVersion','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.nodes.','CONTINUE','flowJson.edges','type','approval_sys_operationType','scriptName','Notification\x20template.','.async.enabled','value\x20must\x20be\x20a\x20non-empty\x20string.','NOTIFICATION\x20node\x20requires\x20template.','flowJson','NOTIFICATION\x20node\x20requires\x20config.','\x20facts.','7160090eORXQz','async\x20must\x20be\x20an\x20object.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','.timeout.scriptName','has','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','datasetCode\x20must\x20be\x20a\x20string.','.async.retryCount','flowJson.startPath','template','NOTIFICATION','keys','isSafeInteger','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','actions','flowCode','pid','source','.position.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','formData','cc.recipientUserIds\x20supports\x20at\x20most\x20','boolean','formDefinitions','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','includes','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','.value','REJECTED','.target','duration\x20requires\x20value\x20and\x20unit.','Notification\x20fact.','^[A-Za-z_][A-Za-z0-9_]*$','1158348pCzJkj','flowJson.nodes[','9uOZtSx','AUTO_APPROVE','action','text','.cc.visible','formSchema','Unsupported\x20task\x20mode:\x20','approval_sys_initiatorUserId','.timeout.duration','role','entries','.actions','.configCode','roleId','DAYS','resultVariable','formPermission','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','object','recipientUserIds','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','16JPrSQU','push','Duplicate\x20BPMN\x20element\x20id:\x20','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','add','approved','Notification\x20recipients\x20must\x20be\x20an\x20array.','hasOwnProperty','userIds','delete','.transferCandidates.userIds','config','bindDatasetCode','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','taskMode','overwrite','Reserved\x20resultVariable:\x20','15iwSAZk','\x20was\x20empty\x20and\x20was\x20removed.','#/$defs/timeAmount','transferCandidates','edge\x20must\x20be\x20an\x20object.','BCC','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','Unsupported\x20notification\x20placeholder:\x20','summary','ROLE','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','flowJson.startPageId','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.taskMode','flowType','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','320iDdaTA','.waypoints','Notification\x20version\x20must\x20be\x20a\x20string.','detailMarkdown','.unit','FIXED','Duplicate\x20edge\x20route:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','USER','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','#/$defs/flowNode','.name','.timeout','6722464PiUkAE','.detailMarkdown','.conditionType','isArray','FAIL','\x20users.','approval_sys_processInstanceId','pageId','expression','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','unit','appCode','Notification\x20action.text\x20is\x20required.','.waypoints[','defaultFlow\x20must\x20be\x20a\x20boolean.','pageIds','EXPRESSION\x20edge\x20requires\x20expression.','2130330BBTFZT','.assignee.userIds[','edges\x20must\x20be\x20an\x20array.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','^[1-9][0-9]*$','target','flowJson\x20must\x20be\x20an\x20object.','edges','START','EMAIL','.type','interrupting','.cc.readSources','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','findIndex','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.position','approval_sys_pageId','Unsupported\x20notification\x20version:\x20','Edge\x20target\x20node\x20not\x20found:\x20','EXECUTE_BFF','test','strategy','failurePolicy\x20must\x20be\x20a\x20string.','\x20->\x20','NaN','.cc.recipientUserIds[','startsWith','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','value','datasetCode','timeout','every','sourceNodeId','4918psfuAu','.timeout.interrupting','.resultVariable','filter','join','assignee','APPROVED','duration','.source','form','edge\x20source\x20is\x20required.','set','Rabetbase\x20FlowConfig','Duplicate\x20cc\x20recipient\x20userId:\x20','Duplicate\x20resultVariable:\x20','Notification\x20fact\x20must\x20be\x20an\x20object.','prototype','.assignee','replace','some','Notification\x20configCode\x20is\x20required.','https://json-schema.org/draft/2020-12/schema','path','number','formPermissions','conditionType','AUTO_REJECT','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','visible','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','ALWAYS','url','readSources','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.defaultFlow','flowJson.pageMode','retryInterval','flowName\x20is\x20required.','Notification\x20action\x20must\x20be\x20an\x20object.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','.assignee.userIds','.transferCandidates','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20recipient.type\x20is\x20required.','trim','flowJson.edges[','FIXED\x20assignee\x20requires\x20userIds.','position','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','value\x20must\x20be\x20an\x20array.','23248049WxQOIc','INDEPENDENT_FLOW','templateName','Unsupported\x20schemaVersion:\x20','.failurePolicy','APPROVAL\x20node\x20requires\x20assignee.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','approval_sys_','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','MAX_SAFE_INTEGER','.url','#/$defs/userId','CUSTOM_PAGE','empty_metadata_removed','APPROVAL','retryCount',',\x20but\x20node\x20','array','Unsupported\x20approval\x20mode:\x20','.cc.recipientUserIds','Notification\x20template\x20supports\x20at\x20most\x20','facts','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','Node\x20cannot\x20reach\x20any\x20END.','failurePolicy','.expression','size','forEach','approval.simple-flow.v1','HANDLE','async','get','.transferCandidates.strategy','stringify','catch','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','sequential','.config','string','metadata','waypoints','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','SCRIPT','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'];a299_0x43eb=function(){return _0x55a343;};return a299_0x43eb();}function validateOuterMetadata(_0x57c531,_0x5df1aa){const _0x26e420=a299_0x4a86f2;(typeof _0x57c531['flowName']!==_0x26e420(0x28c)||_0x57c531[_0x26e420(0x2b2)][_0x26e420(0x260)]()==='')&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x2b2),'message':_0x26e420(0x257)});_0x57c531[_0x26e420(0x2db)]!==undefined&&typeof _0x57c531[_0x26e420(0x2db)]!==_0x26e420(0x28c)&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'flowDesc','message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x57c531['flowType']===undefined||_0x57c531[_0x26e420(0x1f0)]===null)_0x5df1aa['push']({'path':_0x26e420(0x1f0),'message':_0x26e420(0x29a)});else(typeof _0x57c531['flowType']!=='string'||!FLOW_TYPES[_0x26e420(0x2f7)](_0x57c531[_0x26e420(0x1f0)]))&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x1f0),'message':'Unsupported\x20flowType:\x20'+String(_0x57c531[_0x26e420(0x1f0)])+'.'});_0x57c531[_0x26e420(0x22e)]!==undefined&&typeof _0x57c531[_0x26e420(0x22e)]!=='string'&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x22e),'message':_0x26e420(0x2f9)});_0x57c531[_0x26e420(0x20e)]===undefined&&_0x57c531[_0x26e420(0x206)]!==undefined&&(!Number[_0x26e420(0x2ff)](_0x57c531[_0x26e420(0x206)])||_0x57c531['pageId']<=0x0)&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageId','message':'pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.'});if(_0x57c531[_0x26e420(0x20e)]!==undefined){if(!Array['isArray'](_0x57c531[_0x26e420(0x20e)])||_0x57c531['pageIds']['some'](_0x478c07=>!Number['isSafeInteger'](_0x478c07)||_0x478c07<=0x0))_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageIds','message':_0x26e420(0x1e8)});else[...new Set(_0x57c531[_0x26e420(0x20e)])][_0x26e420(0x236)](',')[_0x26e420(0x2a2)]>0x800&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x20e),'message':_0x26e420(0x2e2)});_0x57c531['flowType']===_0x26e420(0x267)&&Array['isArray'](_0x57c531[_0x26e420(0x20e)])&&_0x57c531[_0x26e420(0x20e)]['length']>0x0&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageIds','message':_0x26e420(0x2f5)});}_0x57c531['flowType']===_0x26e420(0x267)&&_0x57c531[_0x26e420(0x22e)]!==undefined&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x22e),'message':_0x26e420(0x2aa)}),_0x57c531[_0x26e420(0x1f0)]==='INDEPENDENT_FLOW'&&_0x57c531[_0x26e420(0x20e)]===undefined&&_0x57c531[_0x26e420(0x206)]!==undefined&&_0x5df1aa['push']({'path':'pageId','message':_0x26e420(0x1b1)});}function validateGraph(_0x34d08c,_0x52d21e){const _0x47517d=a299_0x4a86f2;if(!isRecord(_0x34d08c)){_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2f0),'message':_0x47517d(0x216)});return;}!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x2cf)])&&_0x52d21e[_0x47517d(0x1d2)]({'path':'flowJson.nodes','message':_0x47517d(0x2c3)});!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x217)])&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2e8),'message':_0x47517d(0x212)});Object[_0x47517d(0x242)][_0x47517d(0x1d8)][_0x47517d(0x2c9)](_0x34d08c,_0x47517d(0x2e4))&&_0x52d21e['push']({'path':_0x47517d(0x2b1),'message':_0x47517d(0x269)+String(_0x34d08c[_0x47517d(0x2e4)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x56e643 of[_0x47517d(0x1c0),_0x47517d(0x1ae),_0x47517d(0x24a)]){Object['prototype'][_0x47517d(0x1d8)][_0x47517d(0x2c9)](_0x34d08c,_0x56e643)&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2ba)+_0x56e643,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x2cf)])||!Array['isArray'](_0x34d08c[_0x47517d(0x217)]))return;const _0x2b0759=new Map(),_0x1b6b17=[],_0x247773=[],_0x766560=new Map(),_0xcb0c17=new Map(),_0x218713=new Set();let _0x2b67c3=0x0;_0x34d08c[_0x47517d(0x2cf)][_0x47517d(0x281)]((_0x5a2839,_0xabed1c)=>{const _0x5ede74=_0x47517d,_0x49e622='flowJson.nodes['+_0xabed1c+']';if(!isRecord(_0x5a2839)){_0x52d21e['push']({'path':_0x49e622,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x1a169b=_0x5a2839;if(typeof _0x1a169b['id']!==_0x5ede74(0x28c)||!BPMN_ID_PATTERN[_0x5ede74(0x225)](_0x1a169b['id']))_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+_0x5ede74(0x2e0),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x2b0759[_0x5ede74(0x2f7)](_0x1a169b['id'])?_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+_0x5ede74(0x2e0),'message':'Duplicate\x20node\x20id:\x20'+_0x1a169b['id']+'.'}):(_0x2b0759[_0x5ede74(0x23d)](_0x1a169b['id'],_0x1a169b),_0x218713['add'](_0x1a169b['id']));if(!NODE_TYPES['has'](_0x1a169b[_0x5ede74(0x2e9)]))_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x1a169b['type'])+'.'});else{if(_0x1a169b[_0x5ede74(0x2e9)]==='START')_0x1b6b17['push'](_0x1a169b['id']);else _0x1a169b[_0x5ede74(0x2e9)]===_0x5ede74(0x294)&&_0x247773['push'](_0x1a169b['id']);}_0x1a169b['type']===_0x5ede74(0x274)&&(_0x1a169b[_0x5ede74(0x1df)]===undefined||_0x1a169b[_0x5ede74(0x1df)]==='APPROVAL')&&(_0x2b67c3+=0x1);validateNode(_0x1a169b,_0x49e622,_0x52d21e);if(_0x1a169b['type']==='SCRIPT'){const _0x205935=resolveEffectiveResultVariable(_0x1a169b[_0x5ede74(0x1ca)],![]);_0x205935&&(registerResultVariableOwner(_0xcb0c17,_0x205935,_0x1a169b['id'],_0x52d21e),!_0x766560[_0x5ede74(0x2f7)](_0x205935)&&_0x766560[_0x5ede74(0x23d)](_0x205935,_0x1a169b['id']));}if(_0x1a169b[_0x5ede74(0x2e9)]===_0x5ede74(0x274)&&isRecord(_0x1a169b[_0x5ede74(0x22f)])&&_0x1a169b[_0x5ede74(0x22f)][_0x5ede74(0x2d1)]===!![]&&_0x1a169b[_0x5ede74(0x22f)][_0x5ede74(0x1bd)]===_0x5ede74(0x224)){const _0x193801=resolveEffectiveResultVariable(_0x1a169b['timeout'][_0x5ede74(0x1ca)],!![]);_0x193801&&registerResultVariableOwner(_0xcb0c17,_0x193801,_0x1a169b['id']+_0x5ede74(0x1fe),_0x52d21e);}});_0x1b6b17[_0x47517d(0x2a2)]!==0x1&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2c4),'message':_0x47517d(0x1d4)});_0x247773[_0x47517d(0x2a2)]===0x0&&_0x52d21e['push']({'path':'flowJson.nodes','message':_0x47517d(0x25d)});const _0x38c58c=new Map(),_0x406b3a=new Map(),_0x5d3386=new Map(),_0xa88a95=new Set();_0x34d08c[_0x47517d(0x217)][_0x47517d(0x281)]((_0x32ac4d,_0x35ae8d)=>{const _0x570abb=_0x47517d,_0x52a935=_0x570abb(0x261)+_0x35ae8d+']';if(!isRecord(_0x32ac4d)){_0x52d21e['push']({'path':_0x52a935,'message':_0x570abb(0x1e6)});return;}const _0x11ba15=_0x32ac4d;_0x5d3386['set'](_0x11ba15,_0x52a935);const _0x21b1f8=resolveEdgeEndpoint(_0x11ba15[_0x570abb(0x304)],_0x11ba15[_0x570abb(0x231)]),_0x201aa3=resolveEdgeEndpoint(_0x11ba15[_0x570abb(0x215)],_0x11ba15[_0x570abb(0x2b3)]);if(!_0x21b1f8)_0x52d21e['push']({'path':_0x52a935+'.source','message':_0x570abb(0x23c)});if(!_0x201aa3)_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x1b5),'message':_0x570abb(0x2cb)});_0x21b1f8&&!_0x2b0759[_0x570abb(0x2f7)](_0x21b1f8)&&_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x23a),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x21b1f8+'.'});_0x201aa3&&!_0x2b0759['has'](_0x201aa3)&&_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x1b5),'message':_0x570abb(0x223)+_0x201aa3+'.'});if(_0x11ba15['id']!==undefined){if(typeof _0x11ba15['id']!==_0x570abb(0x28c)||!BPMN_ID_PATTERN[_0x570abb(0x225)](_0x11ba15['id']))_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+'.id','message':_0x570abb(0x21f)});else{if(_0x218713[_0x570abb(0x2f7)](_0x11ba15['id']))_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+'.id','message':_0x570abb(0x1d3)+_0x11ba15['id']+'.'});else!_0x218713[_0x570abb(0x2f7)](_0x11ba15['id'])&&_0x218713['add'](_0x11ba15['id']);}}if(_0x21b1f8&&_0x201aa3){const _0xb2b61f=_0x21b1f8+'\x00'+_0x201aa3+'\x00'+(_0x11ba15[_0x570abb(0x24b)]??_0x570abb(0x250));_0xa88a95[_0x570abb(0x2f7)](_0xb2b61f)?_0x52d21e['push']({'path':_0x52a935,'message':_0x570abb(0x1f8)+_0x21b1f8+_0x570abb(0x228)+_0x201aa3+'\x20('+(_0x11ba15['conditionType']??_0x570abb(0x250))+').'}):_0xa88a95['add'](_0xb2b61f);}validateEdge(_0x11ba15,_0x52a935,_0x52d21e),_0x21b1f8&&_0x201aa3&&(_0x38c58c[_0x570abb(0x285)](_0x21b1f8)?.[_0x570abb(0x1d2)](_0x11ba15)??_0x38c58c[_0x570abb(0x23d)](_0x21b1f8,[_0x11ba15]),_0x406b3a[_0x570abb(0x285)](_0x201aa3)?.['push'](_0x11ba15)??_0x406b3a[_0x570abb(0x23d)](_0x201aa3,[_0x11ba15]));});if(_0x1b6b17['length']!==0x1)return;validateGraphShape(_0x2b0759,_0x1b6b17[0x0],_0x247773,_0x38c58c,_0x406b3a,_0x5d3386,_0x52d21e),validateScriptResultReferences(_0x2b0759,_0x1b6b17[0x0],_0x38c58c,_0x406b3a,_0x5d3386,_0x766560,_0x52d21e),validateApprovalResults(_0x2b0759,_0x2b67c3,_0x247773,_0x52d21e);}function validateNode(_0x47355c,_0xc66171,_0xdc3aee){const _0x493a67=a299_0x4a86f2;for(const _0x283f3d of[_0x493a67(0x23b),_0x493a67(0x1cb)]){Object[_0x493a67(0x242)][_0x493a67(0x1d8)]['call'](_0x47355c,_0x283f3d)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.'+_0x283f3d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x47355c[_0x493a67(0x2e9)]))return;(typeof _0x47355c[_0x493a67(0x2bb)]!==_0x493a67(0x28c)||_0x47355c[_0x493a67(0x2bb)][_0x493a67(0x260)]()==='')&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1fd),'message':_0x493a67(0x2c0)});_0x47355c[_0x493a67(0x206)]!==undefined&&_0xdc3aee['push']({'path':_0xc66171+'.pageId','message':_0x493a67(0x1ec)});if(_0x47355c[_0x493a67(0x248)]!==undefined){if(typeof _0x47355c[_0x493a67(0x248)]!==_0x493a67(0x28c)||_0x47355c['path']['trim']()==='')_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x2d6),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x47355c[_0x493a67(0x2e9)]!==_0x493a67(0x274)&&_0x47355c['type']!==_0x493a67(0x294)&&_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x2d6),'message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x37d598=_0x47355c['position'];if(!isRecord(_0x37d598))_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x220),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x3867f0 of['x','y']){const _0x13e1ea=_0x37d598[_0x3867f0];(typeof _0x13e1ea!=='number'||!Number['isFinite'](_0x13e1ea)||_0x13e1ea<0x0)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x305)+_0x3867f0,'message':'position.'+_0x3867f0+_0x493a67(0x26e)});}if(_0x47355c[_0x493a67(0x2e9)]===_0x493a67(0x274)){const _0x2b901b=_0x47355c['approvalMode']??'SINGLE',_0x2d8e9a=_0x47355c[_0x493a67(0x1df)]??_0x493a67(0x274);!APPROVAL_TASK_MODES[_0x493a67(0x2f7)](_0x2d8e9a)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1ef),'message':_0x493a67(0x1c1)+String(_0x2d8e9a)+'.'});!APPROVAL_MODES[_0x493a67(0x2f7)](_0x2b901b)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x2da),'message':_0x493a67(0x278)+String(_0x2b901b)+'.'});if(!isRecord(_0x47355c[_0x493a67(0x237)]))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x243),'message':_0x493a67(0x26b)});else{const _0x1ca945=_0x47355c['assignee'][_0x493a67(0x226)];_0x1ca945!==_0x493a67(0x1f7)&&_0x1ca945!=='ROLE'&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x296),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x1ca945===_0x493a67(0x1f7)){const _0x42e544=_0x47355c[_0x493a67(0x237)]['userIds'];if(!Array[_0x493a67(0x202)](_0x42e544)||_0x42e544[_0x493a67(0x2a2)]===0x0)_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x25b),'message':_0x493a67(0x262)});else{const _0x3c425c=_0x42e544[_0x493a67(0x21e)](_0x47cec4=>!isValidUserId(_0x47cec4));_0x3c425c>=0x0&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x211)+_0x3c425c+']','message':_0x493a67(0x1ee)});const _0x16e4e8=new Set(_0x42e544[_0x493a67(0x235)](isValidUserId)['map'](_0x344bdb=>String(_0x344bdb)[_0x493a67(0x260)]()));_0x2b901b===_0x493a67(0x2b5)&&_0x16e4e8[_0x493a67(0x280)]>0x1&&_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x25b),'message':_0x493a67(0x2c7)});}}if(_0x1ca945===_0x493a67(0x1eb)){const _0x3d68a8=_0x47355c[_0x493a67(0x237)][_0x493a67(0x1c8)],_0x235d39=typeof _0x3d68a8===_0x493a67(0x249)||typeof _0x3d68a8===_0x493a67(0x28c)?Number(String(_0x3d68a8)[_0x493a67(0x260)]()):Number[_0x493a67(0x229)];(!Number[_0x493a67(0x2ff)](_0x235d39)||_0x235d39<=0x0)&&_0xdc3aee['push']({'path':_0xc66171+'.assignee.roleId','message':_0x493a67(0x289)});}}if(_0x47355c['transferCandidates']!==undefined){if(!isRecord(_0x47355c['transferCandidates']))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x25c),'message':_0x493a67(0x2de)});else{if(_0x47355c[_0x493a67(0x1e5)][_0x493a67(0x226)]!==_0x493a67(0x1f7))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x286),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x3cbc81=_0x47355c[_0x493a67(0x1e5)][_0x493a67(0x1d9)];if(!Array[_0x493a67(0x202)](_0x3cbc81)||_0x3cbc81[_0x493a67(0x2a2)]===0x0)_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1db),'message':_0x493a67(0x2df)});else{const _0x4625a0=_0x3cbc81['findIndex'](_0x2bf05f=>!isValidUserId(_0x2bf05f));_0x4625a0>=0x0&&_0xdc3aee['push']({'path':_0xc66171+'.transferCandidates.userIds['+_0x4625a0+']','message':_0x493a67(0x1f1)});}}}}}_0x47355c[_0x493a67(0x28a)]!==undefined&&typeof _0x47355c['sequential']!==_0x493a67(0x1ad)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.sequential','message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x47355c[_0x493a67(0x2e9)]===_0x493a67(0x290)){(typeof _0x47355c[_0x493a67(0x2eb)]!==_0x493a67(0x28c)||_0x47355c[_0x493a67(0x2eb)][_0x493a67(0x260)]()==='')&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.scriptName','message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x47355c[_0x493a67(0x1ca)]!==undefined){if(typeof _0x47355c[_0x493a67(0x1ca)]!==_0x493a67(0x28c)||!VARIABLE_PATTERN[_0x493a67(0x225)](_0x47355c[_0x493a67(0x1ca)]))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.resultVariable','message':_0x493a67(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x493a67(0x2f7)](_0x47355c[_0x493a67(0x1ca)])||_0x47355c[_0x493a67(0x1ca)]['startsWith']('approval_sys_'))&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x234),'message':_0x493a67(0x1e1)+_0x47355c['resultVariable']+'.'});}}validateAsyncExecution(_0x47355c,_0xc66171,_0xdc3aee),validateApprovalTimeout(_0x47355c,_0xc66171,_0xdc3aee),validateCcConfig(_0x47355c,_0xc66171,_0xdc3aee),_0x47355c[_0x493a67(0x2e9)]==='NOTIFICATION'&&validateNotificationConfig(_0x47355c[_0x493a67(0x1dc)],_0xc66171+_0x493a67(0x28b),_0xdc3aee);}function validateAsyncExecution(_0x562d7d,_0x5cca50,_0x5b4eb9){const _0x480d66=a299_0x4a86f2;if(_0x562d7d['async']===undefined)return;if(!isRecord(_0x562d7d[_0x480d66(0x284)])){_0x5b4eb9['push']({'path':_0x5cca50+_0x480d66(0x2ab),'message':_0x480d66(0x2f4)});return;}if(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x2d1)]!==undefined&&typeof _0x562d7d[_0x480d66(0x284)]['enabled']!==_0x480d66(0x1ad)){_0x5b4eb9[_0x480d66(0x1d2)]({'path':_0x5cca50+_0x480d66(0x2ed),'message':_0x480d66(0x2a6)});return;}if(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x2d1)]!==!![])return;_0x562d7d[_0x480d66(0x2e9)]!==_0x480d66(0x290)&&_0x5b4eb9['push']({'path':_0x5cca50+_0x480d66(0x2ab),'message':_0x480d66(0x1f9)});const _0x566424=_0x562d7d['async'][_0x480d66(0x275)]??0x3;(!Number[_0x480d66(0x2c8)](_0x566424)||_0x566424<0x1||_0x566424>MAX_ASYNC_RETRY_COUNT)&&_0x5b4eb9[_0x480d66(0x1d2)]({'path':_0x5cca50+_0x480d66(0x2fa),'message':_0x480d66(0x1de)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x562d7d[_0x480d66(0x284)][_0x480d66(0x256)]!==undefined&&validateTimeAmount(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x256)],_0x5cca50+'.async.retryInterval',_0x5b4eb9);}function validateApprovalTimeout(_0x54b49f,_0x17e952,_0x5eddbf){const _0x159e78=a299_0x4a86f2;if(_0x54b49f[_0x159e78(0x22f)]===undefined)return;if(!isRecord(_0x54b49f[_0x159e78(0x22f)])){_0x5eddbf['push']({'path':_0x17e952+'.timeout','message':_0x159e78(0x2c1)});return;}if(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2d1)]!==undefined&&typeof _0x54b49f[_0x159e78(0x22f)]['enabled']!==_0x159e78(0x1ad)){_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+'.timeout.enabled','message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2d1)]!==!![])return;if(_0x54b49f[_0x159e78(0x22f)]['interrupting']!==undefined&&typeof _0x54b49f[_0x159e78(0x22f)][_0x159e78(0x21b)]!==_0x159e78(0x1ad)){_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x54b49f['type']!==_0x159e78(0x274)&&_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x1fe),'message':_0x159e78(0x300)});validateTimeAmount(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x239)],_0x17e952+_0x159e78(0x1c3),_0x5eddbf);const _0x9b0abc=_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x1bd)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x159e78(0x2f7)](_0x9b0abc)){_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x29b),'message':_0x159e78(0x26c)});return;}(_0x54b49f['taskMode']??_0x159e78(0x274))===_0x159e78(0x283)&&_0x9b0abc!==_0x159e78(0x224)&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x29b),'message':_0x159e78(0x29f)});const _0xc31857=_0x54b49f['timeout'][_0x159e78(0x21b)]??_0x9b0abc!==_0x159e78(0x224);if(_0x9b0abc===_0x159e78(0x224))_0xc31857&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':_0x159e78(0x2d4)}),(typeof _0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2eb)]!=='string'||_0x54b49f['timeout'][_0x159e78(0x2eb)]['trim']()==='')&&_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x2f6),'message':_0x159e78(0x2b8)}),validateOptionalResultVariable(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x1ca)],_0x17e952+_0x159e78(0x2e1),_0x5eddbf);else!_0xc31857&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':_0x9b0abc+_0x159e78(0x28f)});}function validateTimeAmount(_0x244d9c,_0x2b80da,_0x509d93){const _0x163bfd=a299_0x4a86f2;if(!isRecord(_0x244d9c)){_0x509d93['push']({'path':_0x2b80da,'message':_0x163bfd(0x1b6)});return;}(!Number[_0x163bfd(0x2c8)](_0x244d9c['value'])||Number(_0x244d9c[_0x163bfd(0x22d)])<=0x0)&&_0x509d93[_0x163bfd(0x1d2)]({'path':_0x2b80da+_0x163bfd(0x1b3),'message':_0x163bfd(0x213)}),!FLOW_TIME_UNITS[_0x163bfd(0x2f7)](_0x244d9c[_0x163bfd(0x209)])&&_0x509d93['push']({'path':_0x2b80da+_0x163bfd(0x1f6),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0xa75a0,_0x17b3af,_0x191461){const _0x2d5b49=a299_0x4a86f2;if(_0xa75a0===undefined||_0xa75a0===null||_0xa75a0==='')return;if(typeof _0xa75a0!==_0x2d5b49(0x28c)||!VARIABLE_PATTERN[_0x2d5b49(0x225)](_0xa75a0))_0x191461['push']({'path':_0x17b3af,'message':_0x2d5b49(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x2d5b49(0x2f7)](_0xa75a0)||_0xa75a0[_0x2d5b49(0x22b)](_0x2d5b49(0x26d)))&&_0x191461[_0x2d5b49(0x1d2)]({'path':_0x17b3af,'message':'Reserved\x20resultVariable:\x20'+_0xa75a0+'.'});}function validateCcConfig(_0x1c0341,_0x5ea8af,_0x3149eb){const _0x1b853c=a299_0x4a86f2;if(_0x1c0341['cc']===undefined)return;if(!isRecord(_0x1c0341['cc'])){_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+'.cc','message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x1c0341[_0x1b853c(0x2e9)]!==_0x1b853c(0x294)&&_0x1c0341['type']!=='APPROVAL'&&_0x3149eb['push']({'path':_0x5ea8af+_0x1b853c(0x2bf),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x1b853c(0x242)][_0x1b853c(0x1d8)][_0x1b853c(0x2c9)](_0x1c0341['cc'],_0x1b853c(0x252))&&_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+_0x1b853c(0x21c),'message':UNSUPPORTED_FORM_MESSAGE});const _0x2402f2=_0x1c0341['cc'][_0x1b853c(0x1cf)];if(!Array[_0x1b853c(0x202)](_0x2402f2)||_0x2402f2[_0x1b853c(0x2a2)]===0x0)_0x3149eb['push']({'path':_0x5ea8af+_0x1b853c(0x279),'message':_0x1b853c(0x27c)});else{_0x2402f2['length']>MAX_CC_RECIPIENTS&&_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+'.cc.recipientUserIds','message':_0x1b853c(0x1ac)+MAX_CC_RECIPIENTS+_0x1b853c(0x204)});const _0x45b892=new Set();_0x2402f2['forEach']((_0x2e3714,_0x1f0c8a)=>{const _0x4cab67=_0x1b853c;if(typeof _0x2e3714!==_0x4cab67(0x28c)||_0x2e3714[_0x4cab67(0x260)]()==='')_0x3149eb[_0x4cab67(0x1d2)]({'path':_0x5ea8af+_0x4cab67(0x22a)+_0x1f0c8a+']','message':_0x4cab67(0x264)});else _0x45b892[_0x4cab67(0x2f7)](_0x2e3714[_0x4cab67(0x260)]())?_0x3149eb[_0x4cab67(0x1d2)]({'path':_0x5ea8af+'.cc.recipientUserIds['+_0x1f0c8a+']','message':_0x4cab67(0x23f)+_0x2e3714[_0x4cab67(0x260)]()+'.'}):_0x45b892[_0x4cab67(0x1d5)](_0x2e3714['trim']());});}validateStringArray(_0x1c0341['cc'][_0x1b853c(0x24e)],_0x5ea8af+_0x1b853c(0x1bf),_0x3149eb);}function validateStringArray(_0x3a1cd8,_0xc6075b,_0x26488e){const _0x3daf01=a299_0x4a86f2;if(_0x3a1cd8===undefined)return;if(!Array[_0x3daf01(0x202)](_0x3a1cd8)){_0x26488e[_0x3daf01(0x1d2)]({'path':_0xc6075b,'message':_0x3daf01(0x265)});return;}const _0x5c1ad7=new Set();_0x3a1cd8[_0x3daf01(0x281)]((_0x4006bc,_0x450e07)=>{const _0x2f4125=_0x3daf01;if(typeof _0x4006bc!==_0x2f4125(0x28c)||_0x4006bc[_0x2f4125(0x260)]()==='')_0x26488e[_0x2f4125(0x1d2)]({'path':_0xc6075b+'['+_0x450e07+']','message':_0x2f4125(0x2ee)});else _0x5c1ad7[_0x2f4125(0x2f7)](_0x4006bc[_0x2f4125(0x260)]())?_0x26488e[_0x2f4125(0x1d2)]({'path':_0xc6075b+'['+_0x450e07+']','message':_0x2f4125(0x2cc)+_0x4006bc[_0x2f4125(0x260)]()+'.'}):_0x5c1ad7[_0x2f4125(0x1d5)](_0x4006bc[_0x2f4125(0x260)]());});}function validateNotificationConfig(_0x442a27,_0x4a632f,_0x559bf6){const _0x62a0d3=a299_0x4a86f2;if(!isRecord(_0x442a27)){_0x559bf6['push']({'path':_0x4a632f,'message':_0x62a0d3(0x2f1)});return;}if(_0x442a27[_0x62a0d3(0x2b0)]!==undefined&&_0x442a27['version']!==null){if(typeof _0x442a27[_0x62a0d3(0x2b0)]!==_0x62a0d3(0x28c))_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x2c5),'message':_0x62a0d3(0x1f4)});else _0x442a27['version'][_0x62a0d3(0x260)]()&&_0x442a27['version'][_0x62a0d3(0x260)]()!=='v1'&&_0x559bf6['push']({'path':_0x4a632f+_0x62a0d3(0x2c5),'message':_0x62a0d3(0x222)+_0x442a27['version']+'.'});}const _0x4adf66=requireNotificationString(_0x442a27[_0x62a0d3(0x2d5)],_0x4a632f+_0x62a0d3(0x1c7),_0x62a0d3(0x246),_0x559bf6);_0x4adf66?.[_0x62a0d3(0x1b0)]('${')&&_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x1c7),'message':_0x62a0d3(0x2be)});if(_0x442a27['failurePolicy']!==undefined&&_0x442a27[_0x62a0d3(0x27e)]!==null){if(typeof _0x442a27[_0x62a0d3(0x27e)]!==_0x62a0d3(0x28c))_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x26a),'message':_0x62a0d3(0x227)});else!NOTIFICATION_FAILURE_POLICIES[_0x62a0d3(0x2f7)](_0x442a27[_0x62a0d3(0x27e)][_0x62a0d3(0x260)]()[_0x62a0d3(0x2ce)]())&&_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x26a),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x442a27[_0x62a0d3(0x2fc)])?_0x559bf6['push']({'path':_0x4a632f+'.template','message':_0x62a0d3(0x2ef)}):validateNotificationTemplate(_0x442a27[_0x62a0d3(0x2fc)],_0x4a632f+'.template',_0x559bf6),validateNotificationRecipients(_0x442a27['recipients'],_0x4a632f+'.recipients',_0x559bf6);}function validateNotificationTemplate(_0x519965,_0x4d7f54,_0x137f59){const _0x4c8e24=a299_0x4a86f2;for(const _0x3ced6f of[_0x4c8e24(0x299),'summary']){const _0x5b3c5c=requireNotificationString(_0x519965[_0x3ced6f],_0x4d7f54+'.'+_0x3ced6f,_0x4c8e24(0x2ec)+_0x3ced6f+_0x4c8e24(0x2a8),_0x137f59);if(_0x5b3c5c)validateNotificationPlaceholders(_0x5b3c5c,_0x4d7f54+'.'+_0x3ced6f,_0x137f59);}_0x519965[_0x4c8e24(0x1f5)]!==undefined&&_0x519965[_0x4c8e24(0x1f5)]!==null&&(typeof _0x519965[_0x4c8e24(0x1f5)]!==_0x4c8e24(0x28c)?_0x137f59['push']({'path':_0x4d7f54+_0x4c8e24(0x200),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x519965[_0x4c8e24(0x1f5)],_0x4d7f54+_0x4c8e24(0x200),_0x137f59)),validateNotificationFacts(_0x519965[_0x4c8e24(0x27b)],_0x4d7f54+'.facts',_0x137f59),validateNotificationActions(_0x519965[_0x4c8e24(0x301)],_0x4d7f54+_0x4c8e24(0x1c6),_0x137f59);}function validateNotificationFacts(_0x3548c8,_0x212931,_0x4bb3a1){const _0x5b5843=a299_0x4a86f2;if(_0x3548c8===undefined||_0x3548c8===null)return;if(!Array[_0x5b5843(0x202)](_0x3548c8)){_0x4bb3a1[_0x5b5843(0x1d2)]({'path':_0x212931,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x3548c8[_0x5b5843(0x2a2)]>MAX_NOTIFICATION_FACTS&&_0x4bb3a1[_0x5b5843(0x1d2)]({'path':_0x212931,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x5b5843(0x2f2)}),_0x3548c8[_0x5b5843(0x281)]((_0xfbd375,_0x3b716f)=>{const _0x307e69=_0x5b5843,_0x2fda5b=_0x212931+'['+_0x3b716f+']';if(!isRecord(_0xfbd375)){_0x4bb3a1[_0x307e69(0x1d2)]({'path':_0x2fda5b,'message':_0x307e69(0x241)});return;}for(const _0x5dc5d5 of[_0x307e69(0x2bc),_0x307e69(0x22d)]){const _0x5a898f=requireNotificationString(_0xfbd375[_0x5dc5d5],_0x2fda5b+'.'+_0x5dc5d5,_0x307e69(0x1b7)+_0x5dc5d5+_0x307e69(0x2a8),_0x4bb3a1);_0x5a898f&&validateNotificationPlaceholders(_0x5a898f,_0x2fda5b+'.'+_0x5dc5d5,_0x4bb3a1);}});}function validateNotificationActions(_0x1b014d,_0x1489c1,_0x549aa0){const _0x25c443=a299_0x4a86f2;if(_0x1b014d===undefined||_0x1b014d===null)return;if(!Array['isArray'](_0x1b014d)){_0x549aa0[_0x25c443(0x1d2)]({'path':_0x1489c1,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1b014d['length']>MAX_NOTIFICATION_ACTIONS&&_0x549aa0[_0x25c443(0x1d2)]({'path':_0x1489c1,'message':_0x25c443(0x27a)+MAX_NOTIFICATION_ACTIONS+_0x25c443(0x2ad)}),_0x1b014d[_0x25c443(0x281)]((_0x359da6,_0x536571)=>{const _0x211a13=_0x25c443,_0x309be0=_0x1489c1+'['+_0x536571+']';if(!isRecord(_0x359da6)){_0x549aa0[_0x211a13(0x1d2)]({'path':_0x309be0,'message':_0x211a13(0x258)});return;}const _0x56d1fa=requireNotificationString(_0x359da6['text'],_0x309be0+_0x211a13(0x29d),_0x211a13(0x20b),_0x549aa0);if(_0x56d1fa)validateNotificationPlaceholders(_0x56d1fa,_0x309be0+_0x211a13(0x29d),_0x549aa0);const _0x1ef31f=requireNotificationString(_0x359da6['url'],_0x309be0+_0x211a13(0x270),'Notification\x20action.url\x20is\x20required.',_0x549aa0);if(!_0x1ef31f)return;validateNotificationPlaceholders(_0x1ef31f,_0x309be0+_0x211a13(0x270),_0x549aa0),!/^https?:\/\//i['test'](_0x1ef31f)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x211a13(0x225)](_0x1ef31f)&&_0x549aa0[_0x211a13(0x1d2)]({'path':_0x309be0+_0x211a13(0x270),'message':_0x211a13(0x1fb)});});}function validateNotificationRecipients(_0x534dd3,_0x1d45f9,_0x3dc697){const _0x15d695=a299_0x4a86f2;if(_0x534dd3===undefined||_0x534dd3===null)return;if(!Array[_0x15d695(0x202)](_0x534dd3)){_0x3dc697['push']({'path':_0x1d45f9,'message':_0x15d695(0x1d7)});return;}let _0x283f6a=![];_0x534dd3[_0x15d695(0x281)]((_0x1a0a7c,_0x501441)=>{const _0x4a3710=_0x15d695,_0x3979ce=_0x1d45f9+'['+_0x501441+']';if(!isRecord(_0x1a0a7c)){_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce,'message':_0x4a3710(0x295)});return;}const _0x58fcfc=requireNotificationString(_0x1a0a7c['type'],_0x3979ce+'.type',_0x4a3710(0x25f),_0x3dc697);_0x58fcfc&&!NOTIFICATION_RECIPIENT_TYPES[_0x4a3710(0x2f7)](_0x58fcfc[_0x4a3710(0x2ce)]())&&_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x21a),'message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0xc85fb='TO';_0x1a0a7c['role']!==undefined&&_0x1a0a7c[_0x4a3710(0x1c4)]!==null&&(typeof _0x1a0a7c[_0x4a3710(0x1c4)]!==_0x4a3710(0x28c)?(_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x2af),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0xc85fb=''):(_0xc85fb=_0x1a0a7c[_0x4a3710(0x1c4)][_0x4a3710(0x260)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x4a3710(0x2f7)](_0xc85fb)&&_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x2af),'message':_0x4a3710(0x2d2)})));if(_0xc85fb==='TO')_0x283f6a=!![];const _0x1f5252=requireNotificationString(_0x1a0a7c['value'],_0x3979ce+_0x4a3710(0x1b3),'Notification\x20recipient.value\x20is\x20required.',_0x3dc697);_0x1f5252&&validateNotificationPlaceholders(_0x1f5252,_0x3979ce+_0x4a3710(0x1b3),_0x3dc697);}),_0x534dd3[_0x15d695(0x2a2)]>0x0&&!_0x283f6a&&_0x3dc697[_0x15d695(0x1d2)]({'path':_0x1d45f9,'message':_0x15d695(0x291)});}function requireNotificationString(_0x34513b,_0x5a790f,_0x61cfcd,_0x562c8a){const _0x297b9c=a299_0x4a86f2;if(typeof _0x34513b!=='string'||_0x34513b['trim']()==='')return _0x562c8a['push']({'path':_0x5a790f,'message':_0x61cfcd}),undefined;return _0x34513b[_0x297b9c(0x260)]();}function validateNotificationPlaceholders(_0x3cbe4f,_0x2daa8a,_0x188b2e){const _0x1c914b=a299_0x4a86f2;for(const _0x66a986 of _0x3cbe4f['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5c7a53=_0x66a986[0x1]?.[_0x1c914b(0x260)]()??'',_0x2ddf8c=_0x5c7a53[_0x1c914b(0x29c)]('.'),_0x5b1798=_0x2ddf8c>=0x0?_0x5c7a53[_0x1c914b(0x2ca)](0x0,_0x2ddf8c):_0x5c7a53,_0x5e5033=_0x2ddf8c>=0x0?_0x5c7a53[_0x1c914b(0x2ca)](_0x2ddf8c+0x1)[_0x1c914b(0x260)]():'';(!['event',_0x1c914b(0x2d7),_0x1c914b(0x297)][_0x1c914b(0x1b0)](_0x5b1798)||_0x5e5033==='')&&_0x188b2e['push']({'path':_0x2daa8a,'message':_0x1c914b(0x1e9)+_0x66a986[0x0]+'.'});}_0x3cbe4f[_0x1c914b(0x244)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x188b2e[_0x1c914b(0x1d2)]({'path':_0x2daa8a,'message':_0x1c914b(0x2c2)});}function validateEdge(_0x15724f,_0x36e688,_0x534ea9){const _0x5b61bf=a299_0x4a86f2;_0x15724f[_0x5b61bf(0x2bb)]!==undefined&&typeof _0x15724f[_0x5b61bf(0x2bb)]!==_0x5b61bf(0x28c)&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x1fd),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x15724f[_0x5b61bf(0x2b6)]!==undefined&&typeof _0x15724f[_0x5b61bf(0x2b6)]!=='boolean'&&_0x534ea9['push']({'path':_0x36e688+'.defaultFlow','message':_0x5b61bf(0x20d)}),_0x15724f[_0x5b61bf(0x28e)]!==undefined&&(!Array[_0x5b61bf(0x202)](_0x15724f[_0x5b61bf(0x28e)])?_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x1f3),'message':_0x5b61bf(0x2a7)}):_0x15724f[_0x5b61bf(0x28e)][_0x5b61bf(0x281)]((_0x446fac,_0xa28c34)=>{const _0x314a27=_0x5b61bf;if(!isRecord(_0x446fac)){_0x534ea9['push']({'path':_0x36e688+_0x314a27(0x20c)+_0xa28c34+']','message':_0x314a27(0x2a3)});return;}for(const _0x564cc0 of['x','y']){const _0x490d1d=_0x446fac[_0x564cc0];(typeof _0x490d1d!=='number'||!Number['isFinite'](_0x490d1d))&&_0x534ea9[_0x314a27(0x1d2)]({'path':_0x36e688+_0x314a27(0x20c)+_0xa28c34+'].'+_0x564cc0,'message':_0x314a27(0x2dc)+_0x564cc0+_0x314a27(0x25e)});}})),_0x15724f[_0x5b61bf(0x24b)]!==undefined&&!CONDITION_TYPES['has'](_0x15724f[_0x5b61bf(0x24b)])&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x201),'message':'Unsupported\x20condition\x20type:\x20'+String(_0x15724f[_0x5b61bf(0x24b)])+'.'}),_0x15724f[_0x5b61bf(0x24b)]===_0x5b61bf(0x2a0)&&(typeof _0x15724f['expression']!=='string'||_0x15724f['expression'][_0x5b61bf(0x260)]()==='')&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x27f),'message':_0x5b61bf(0x20f)}),_0x15724f[_0x5b61bf(0x2b6)]===!![]&&_0x15724f[_0x5b61bf(0x24b)]!=='ALWAYS'&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x254),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x15724f[_0x5b61bf(0x2b6)]===!![]&&typeof _0x15724f[_0x5b61bf(0x207)]===_0x5b61bf(0x28c)&&_0x15724f[_0x5b61bf(0x207)][_0x5b61bf(0x260)]()!==''&&_0x534ea9['push']({'path':_0x36e688+_0x5b61bf(0x27f),'message':_0x5b61bf(0x22c)});}function validateGraphShape(_0x1a9326,_0x5d98f0,_0x3fb992,_0x413e1e,_0xf88ffe,_0x41649d,_0x49694f){const _0x2a2a27=a299_0x4a86f2;for(const [_0xdad9b6,_0x451662]of _0x1a9326){const _0x1b9659=_0xf88ffe[_0x2a2a27(0x285)](_0xdad9b6)??[],_0x385f7d=_0x413e1e[_0x2a2a27(0x285)](_0xdad9b6)??[];_0x451662[_0x2a2a27(0x2e9)]!==_0x2a2a27(0x218)&&_0x1b9659[_0x2a2a27(0x2a2)]===0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0xdad9b6,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x451662[_0x2a2a27(0x2e9)]!=='END'&&_0x385f7d[_0x2a2a27(0x2a2)]===0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x451662[_0x2a2a27(0x2e9)]===_0x2a2a27(0x218)&&_0x1b9659[_0x2a2a27(0x2a2)]>0x0&&_0x49694f['push']({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x1cc)});_0x451662['type']===_0x2a2a27(0x294)&&_0x385f7d['length']>0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x2f8)});if(_0x451662[_0x2a2a27(0x2e9)]==='CONDITION'){_0x385f7d['length']<0x2&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x4f77f9=_0x385f7d[_0x2a2a27(0x235)](_0x55686d=>_0x55686d[_0x2a2a27(0x2b6)]===!![]);_0x4f77f9['length']!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x1af)});if(_0x4f77f9[_0x2a2a27(0x2a2)]===0x1){const _0x5a0f95=_0x4f77f9[0x0],_0x4586dc=_0x41649d['get'](_0x5a0f95)??_0x2a2a27(0x2e8);_0x5a0f95[_0x2a2a27(0x24b)]!==_0x2a2a27(0x250)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x4586dc+'.conditionType','message':_0x2a2a27(0x21d)});_0x5a0f95['expression']!==undefined&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x4586dc+_0x2a2a27(0x27f),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x14ba0b of _0x385f7d){if(_0x14ba0b===_0x5a0f95)continue;const _0x41cf69=_0x41649d[_0x2a2a27(0x285)](_0x14ba0b)??_0x2a2a27(0x2e8);if(_0x14ba0b[_0x2a2a27(0x24b)]!==_0x2a2a27(0x2a0))_0x49694f['push']({'path':_0x41cf69+'.conditionType','message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0x14ba0b[_0x2a2a27(0x207)]!==_0x2a2a27(0x28c)||_0x14ba0b[_0x2a2a27(0x207)]['trim']()==='')&&_0x49694f['push']({'path':_0x41cf69+_0x2a2a27(0x27f),'message':_0x2a2a27(0x259)});}}}if(_0x451662[_0x2a2a27(0x2e9)]===_0x2a2a27(0x274)&&(_0x451662[_0x2a2a27(0x1df)]??_0x2a2a27(0x274))===_0x2a2a27(0x283)){if(_0x385f7d[_0x2a2a27(0x2a2)]!==0x1)_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x2cec82=_0x385f7d[0x0];((_0x2cec82[_0x2a2a27(0x24b)]??'ALWAYS')!=='ALWAYS'||_0x2cec82[_0x2a2a27(0x2b6)]===!![]||typeof _0x2cec82[_0x2a2a27(0x207)]===_0x2a2a27(0x28c)&&_0x2cec82[_0x2a2a27(0x207)][_0x2a2a27(0x260)]()!=='')&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x41649d[_0x2a2a27(0x285)](_0x2cec82)??_0x2a2a27(0x2e8),'message':_0x2a2a27(0x2e5)});}}else{if(_0x451662['type']===_0x2a2a27(0x274)){const _0x136f64=_0x385f7d[_0x2a2a27(0x2bd)](_0x23953c=>_0x23953c[_0x2a2a27(0x24b)]??_0x2a2a27(0x250)),_0x1b20d9=_0x136f64[_0x2a2a27(0x235)](_0x2e8cc2=>_0x2e8cc2!=='APPROVED'&&_0x2e8cc2!==_0x2a2a27(0x1b4));_0x1b20d9['length']>0x0&&_0x49694f['push']({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x136f64[_0x2a2a27(0x235)](_0x5c01ce=>_0x5c01ce===_0x2a2a27(0x238))['length']!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x298)}),_0x136f64[_0x2a2a27(0x235)](_0x52f385=>_0x52f385===_0x2a2a27(0x1b4))[_0x2a2a27(0x2a2)]!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0xdad9b6,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x385f7d[_0x2a2a27(0x245)](_0x323ecd=>_0x323ecd[_0x2a2a27(0x2b6)]===!![])&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x1453b8=new Set(),_0x42da54=_0x420bc6=>{const _0x4894b3=_0x2a2a27;if(_0x1453b8[_0x4894b3(0x2f7)](_0x420bc6))return;_0x1453b8[_0x4894b3(0x1d5)](_0x420bc6);for(const _0x40d5fb of _0x413e1e['get'](_0x420bc6)??[]){const _0x30c8c4=resolveEdgeEndpoint(_0x40d5fb[_0x4894b3(0x215)],_0x40d5fb[_0x4894b3(0x2b3)]);if(_0x30c8c4&&_0x1a9326['has'](_0x30c8c4))_0x42da54(_0x30c8c4);}};_0x42da54(_0x5d98f0);for(const _0x37795d of _0x1a9326[_0x2a2a27(0x2fe)]()){!_0x1453b8[_0x2a2a27(0x2f7)](_0x37795d)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0x37795d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x1c6871=_0x3fb992[_0x2a2a27(0x245)](_0x333401=>_0x1453b8['has'](_0x333401));if(!_0x1c6871){_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e8),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x5af535=new Set(),_0x3b5ee2=_0x333362=>{const _0x35cf8a=_0x2a2a27;if(_0x5af535[_0x35cf8a(0x2f7)](_0x333362))return;_0x5af535[_0x35cf8a(0x1d5)](_0x333362);for(const _0x217669 of _0xf88ffe[_0x35cf8a(0x285)](_0x333362)??[]){const _0x456a3c=resolveEdgeEndpoint(_0x217669[_0x35cf8a(0x304)],_0x217669[_0x35cf8a(0x231)]);if(_0x456a3c&&_0x1a9326['has'](_0x456a3c))_0x3b5ee2(_0x456a3c);}};for(const _0x37a433 of _0x3fb992){if(_0x1a9326[_0x2a2a27(0x2f7)](_0x37a433))_0x3b5ee2(_0x37a433);}for(const _0x657038 of _0x1453b8){!_0x5af535[_0x2a2a27(0x2f7)](_0x657038)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0x657038,'message':_0x2a2a27(0x27d)});}}function validateApprovalResults(_0x27096f,_0x39a305,_0x57577d,_0x40f0c1){const _0x422071=a299_0x4a86f2;if(_0x39a305===0x0)return;const _0x5047dd=new Set(_0x57577d[_0x422071(0x2bd)](_0x1df767=>_0x27096f['get'](_0x1df767)?.[_0x422071(0x2a9)])[_0x422071(0x235)](_0x50adf9=>typeof _0x50adf9==='string'));for(const _0x3d1551 of[_0x422071(0x238),'REJECTED']){!_0x5047dd['has'](_0x3d1551)&&_0x40f0c1['push']({'path':_0x422071(0x2c4),'message':_0x422071(0x293)+_0x3d1551+'.'});}}function validateScriptResultReferences(_0x3a7359,_0x2b56ab,_0x827033,_0x265c10,_0xb5f703,_0x32c604,_0x132d2b){const _0x53f539=a299_0x4a86f2;if(_0x32c604['size']===0x0)return;const _0x2c4b51=new Set(),_0x261a1d=_0x3fb001=>{const _0x3ece4c=a299_0x3bd6;if(!_0x2c4b51[_0x3ece4c(0x2f7)](_0x3fb001)&&_0x3a7359['has'](_0x3fb001)){_0x2c4b51[_0x3ece4c(0x1d5)](_0x3fb001);for(const _0x102f7c of _0x827033[_0x3ece4c(0x285)](_0x3fb001)??[]){const _0x10946a=resolveEdgeEndpoint(_0x102f7c[_0x3ece4c(0x215)],_0x102f7c['targetNodeId']);if(_0x10946a)_0x261a1d(_0x10946a);}}};_0x261a1d(_0x2b56ab);const _0x373aaf=new Map();for(const _0x1fd4bc of _0x2c4b51){_0x373aaf['set'](_0x1fd4bc,_0x1fd4bc===_0x2b56ab?new Set([_0x2b56ab]):new Set(_0x2c4b51));}let _0x1397e7=!![];while(_0x1397e7){_0x1397e7=![];for(const _0x17a2fe of _0x2c4b51){if(_0x17a2fe===_0x2b56ab)continue;const _0x18ae52=(_0x265c10[_0x53f539(0x285)](_0x17a2fe)??[])[_0x53f539(0x2bd)](_0x26f335=>resolveEdgeEndpoint(_0x26f335[_0x53f539(0x304)],_0x26f335[_0x53f539(0x231)]))[_0x53f539(0x235)](_0x824048=>Boolean(_0x824048&&_0x2c4b51[_0x53f539(0x2f7)](_0x824048)));if(_0x18ae52[_0x53f539(0x2a2)]===0x0)continue;const _0x2d88de=new Set(_0x373aaf[_0x53f539(0x285)](_0x18ae52[0x0])??[]);for(const _0x2c5da8 of _0x18ae52[_0x53f539(0x2ca)](0x1)){const _0x437fad=_0x373aaf[_0x53f539(0x285)](_0x2c5da8)??new Set();for(const _0x36992a of _0x2d88de){if(!_0x437fad['has'](_0x36992a))_0x2d88de[_0x53f539(0x1da)](_0x36992a);}}_0x2d88de['add'](_0x17a2fe);const _0x561f80=_0x373aaf[_0x53f539(0x285)](_0x17a2fe);!setsEqual(_0x561f80,_0x2d88de)&&(_0x373aaf[_0x53f539(0x23d)](_0x17a2fe,_0x2d88de),_0x1397e7=!![]);}}for(const [_0x25d36d,_0x41644c]of _0x827033){const _0x3e73ab=_0x373aaf[_0x53f539(0x285)](_0x25d36d);if(!_0x3e73ab)continue;for(const _0x1e8573 of _0x41644c){if(_0x1e8573['conditionType']!==_0x53f539(0x2a0)||typeof _0x1e8573['expression']!=='string')continue;for(const [_0x244046,_0x5924c2]of _0x32c604){expressionReferencesVariable(_0x1e8573['expression'],_0x244046)&&!_0x3e73ab[_0x53f539(0x2f7)](_0x5924c2)&&_0x132d2b[_0x53f539(0x1d2)]({'path':(_0xb5f703[_0x53f539(0x285)](_0x1e8573)??'flowJson.edges')+_0x53f539(0x27f),'message':_0x53f539(0x1aa)+_0x244046+_0x53f539(0x276)+_0x5924c2+_0x53f539(0x1d0)+_0x25d36d+'.'});}}}}function expressionReferencesVariable(_0xda7a2,_0x23238f){const _0x1a0718=a299_0x4a86f2;let _0x17aaad=0x0;while(_0x17aaad<_0xda7a2[_0x1a0718(0x2a2)]){const _0x4b93ed=_0xda7a2[_0x17aaad];if(_0x4b93ed==='\x27'||_0x4b93ed==='\x22'){_0x17aaad=skipQuotedExpressionSegment(_0xda7a2,_0x17aaad,_0x4b93ed);continue;}if(!/[A-Za-z_]/[_0x1a0718(0x225)](_0x4b93ed)){_0x17aaad+=0x1;continue;}const _0x39f249=_0x17aaad;_0x17aaad+=0x1;while(_0x17aaad<_0xda7a2[_0x1a0718(0x2a2)]&&/[A-Za-z0-9_]/[_0x1a0718(0x225)](_0xda7a2[_0x17aaad])){_0x17aaad+=0x1;}if(_0xda7a2['slice'](_0x39f249,_0x17aaad)!==_0x23238f)continue;let _0x444e28=_0x39f249-0x1;while(_0x444e28>=0x0&&/\s/[_0x1a0718(0x225)](_0xda7a2[_0x444e28])){_0x444e28-=0x1;}if(_0xda7a2[_0x444e28]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x112a18,_0x9a46fc,_0x26a1b5){const _0x6db55b=a299_0x4a86f2;let _0x955910=_0x9a46fc+0x1;while(_0x955910<_0x112a18[_0x6db55b(0x2a2)]){if(_0x112a18[_0x955910]==='\x5c'){_0x955910+=0x2;continue;}if(_0x112a18[_0x955910]===_0x26a1b5)return _0x955910+0x1;_0x955910+=0x1;}return _0x955910;}function resolveEffectiveResultVariable(_0x2ef7d7,_0x1a23f6){const _0x5cadbc=a299_0x4a86f2;if(_0x2ef7d7===undefined||_0x2ef7d7===null||_0x1a23f6&&_0x2ef7d7==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x2ef7d7!=='string'||!VARIABLE_PATTERN[_0x5cadbc(0x225)](_0x2ef7d7)||RESERVED_RESULT_VARIABLES[_0x5cadbc(0x2f7)](_0x2ef7d7)||_0x2ef7d7['startsWith'](_0x5cadbc(0x26d)))return undefined;return _0x2ef7d7;}function registerResultVariableOwner(_0x211b5c,_0x1eee05,_0x5a8808,_0x52ce63){const _0xc9060=a299_0x4a86f2;if(_0x211b5c['has'](_0x1eee05)){_0x52ce63[_0xc9060(0x1d2)]({'path':'flowJson.nodes','message':_0xc9060(0x240)+_0x1eee05+'.'});return;}_0x211b5c[_0xc9060(0x23d)](_0x1eee05,_0x5a8808);}function setsEqual(_0x22a96f,_0x57acec){const _0x4e384f=a299_0x4a86f2;return _0x22a96f[_0x4e384f(0x280)]===_0x57acec[_0x4e384f(0x280)]&&[..._0x22a96f][_0x4e384f(0x230)](_0x226182=>_0x57acec[_0x4e384f(0x2f7)](_0x226182));}function isValidUserId(_0x30231c){const _0x541ce7=a299_0x4a86f2;if(typeof _0x30231c===_0x541ce7(0x28c))return _0x30231c[_0x541ce7(0x260)]()['length']>0x0;return Number[_0x541ce7(0x2ff)](_0x30231c)&&Number(_0x30231c)>0x0;}function resolveEdgeEndpoint(_0x2bde54,_0x3c64bf){const _0x2a0bd6=a299_0x4a86f2;if(typeof _0x2bde54==='string'&&_0x2bde54[_0x2a0bd6(0x260)]())return _0x2bde54[_0x2a0bd6(0x260)]();if(typeof _0x3c64bf==='string'&&_0x3c64bf['trim']())return _0x3c64bf[_0x2a0bd6(0x260)]();return undefined;}function removeEmptyMetadata(_0x5a3749,_0x266d8e,_0x380b0a,_0x3409d2){const _0x23ceac=a299_0x4a86f2;if(Array[_0x23ceac(0x202)](_0x5a3749)){_0x5a3749['forEach']((_0x535523,_0x3a6640)=>removeEmptyMetadata(_0x535523,_0x266d8e+'['+_0x3a6640+']',_0x380b0a,_0x3409d2));return;}if(!isRecord(_0x5a3749))return;for(const [_0x440e96,_0x446d86]of Object[_0x23ceac(0x1c5)](_0x5a3749)){const _0x318fe9=_0x266d8e+'.'+_0x440e96;if(_0x440e96===_0x23ceac(0x28d)&&isEmptyJsonValue(_0x446d86)){delete _0x5a3749[_0x440e96],_0x3409d2[_0x23ceac(0x1d2)](_0x318fe9),_0x380b0a['push']({'code':_0x23ceac(0x273),'path':_0x318fe9,'message':_0x318fe9+_0x23ceac(0x1e3)});continue;}removeEmptyMetadata(_0x446d86,_0x318fe9,_0x380b0a,_0x3409d2);}}function isEmptyJsonValue(_0x2a5566){const _0x108a2f=a299_0x4a86f2;if(_0x2a5566===null||_0x2a5566===undefined)return!![];if(typeof _0x2a5566===_0x108a2f(0x28c))return _0x2a5566[_0x108a2f(0x260)]()==='';if(Array[_0x108a2f(0x202)](_0x2a5566))return _0x2a5566['length']===0x0;return isRecord(_0x2a5566)&&Object[_0x108a2f(0x2fe)](_0x2a5566)[_0x108a2f(0x2a2)]===0x0;}function isRecord(_0x25c842){const _0x45988e=a299_0x4a86f2;return typeof _0x25c842===_0x45988e(0x1ce)&&_0x25c842!==null&&!Array[_0x45988e(0x202)](_0x25c842);}function cloneJsonValue(_0xd4ad5e){const _0x2584c4=a299_0x4a86f2;return JSON[_0x2584c4(0x2d8)](JSON[_0x2584c4(0x287)](_0xd4ad5e));}export async function readFlowConfigFile(_0x42e99e){const _0x5b803a=a299_0x4a86f2,_0x118657=await readFile(resolve(_0x42e99e),_0x5b803a(0x2a4));return JSON[_0x5b803a(0x2d8)](_0x118657);}
1
+ const a299_0xf21873=a299_0x1204;(function(_0x4d10ce,_0x466ad5){const _0x416a7e=a299_0x1204,_0x2b79c4=_0x4d10ce();while(!![]){try{const _0x29a9be=-parseInt(_0x416a7e(0x25d))/0x1*(parseInt(_0x416a7e(0x20c))/0x2)+parseInt(_0x416a7e(0x257))/0x3*(-parseInt(_0x416a7e(0x292))/0x4)+parseInt(_0x416a7e(0x204))/0x5+-parseInt(_0x416a7e(0x328))/0x6+-parseInt(_0x416a7e(0x23b))/0x7*(-parseInt(_0x416a7e(0x310))/0x8)+parseInt(_0x416a7e(0x217))/0x9+parseInt(_0x416a7e(0x1cf))/0xa;if(_0x29a9be===_0x466ad5)break;else _0x2b79c4['push'](_0x2b79c4['shift']());}catch(_0x11039a){_0x2b79c4['push'](_0x2b79c4['shift']());}}}(a299_0xb9a6,0xdd3b8));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_0xf21873(0x31c),'$id':a299_0xf21873(0x200),'title':a299_0xf21873(0x2c2),'type':a299_0xf21873(0x23a),'required':['flowName',a299_0xf21873(0x315),a299_0xf21873(0x309)],'$defs':{'userId':{'anyOf':[{'type':a299_0xf21873(0x21e),'minLength':0x1},{'type':a299_0xf21873(0x20e),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0xf21873(0x285),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0xf21873(0x29c),a299_0xf21873(0x1ee)],'properties':{'value':{'type':a299_0xf21873(0x20e),'minimum':0x1},'unit':{'enum':['SECONDS',a299_0xf21873(0x206),a299_0xf21873(0x262),a299_0xf21873(0x2f8)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0xf21873(0x23a),'required':['id',a299_0xf21873(0x1f0),a299_0xf21873(0x26e),a299_0xf21873(0x2ec)],'properties':{'id':{'type':a299_0xf21873(0x21e),'pattern':a299_0xf21873(0x2ed)},'type':{'enum':[a299_0xf21873(0x22d),a299_0xf21873(0x318),a299_0xf21873(0x2dc),a299_0xf21873(0x1f8),a299_0xf21873(0x32d),a299_0xf21873(0x2c6)]},'name':{'type':a299_0xf21873(0x21e),'minLength':0x1},'path':{'type':a299_0xf21873(0x21e),'minLength':0x1},'position':{'$ref':a299_0xf21873(0x230)},'approvalMode':{'enum':[a299_0xf21873(0x2d0),a299_0xf21873(0x2a1),'ANY']},'taskMode':{'enum':[a299_0xf21873(0x2dc),a299_0xf21873(0x2d1)]},'assignee':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x327)],'properties':{'strategy':{'enum':[a299_0xf21873(0x211),'ROLE']},'userIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a299_0xf21873(0x20e),'minimum':0x1},{'type':'string','pattern':a299_0xf21873(0x264)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x327),'userIds'],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x1ef)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0xf21873(0x248),'REJECTED']},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0xf21873(0x21e),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a299_0xf21873(0x275)},'retryCount':{'type':a299_0xf21873(0x20e),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0xf21873(0x208)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0xf21873(0x275)},'duration':{'$ref':a299_0xf21873(0x208)},'action':{'enum':[a299_0xf21873(0x283),'AUTO_REJECT',a299_0xf21873(0x2bb)]},'interrupting':{'type':a299_0xf21873(0x275)},'scriptName':{'type':a299_0xf21873(0x21e),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0xf21873(0x2ed)}},'additionalProperties':!![]},'cc':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x297)],'properties':{'recipientUserIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'visible':{'type':a299_0xf21873(0x22b),'uniqueItems':!![],'items':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x272),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0xf21873(0x21e),'minLength':0x1},'failurePolicy':{'enum':[a299_0xf21873(0x2fc),'FAIL']},'template':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x268),a299_0xf21873(0x301)],'properties':{'title':{'type':a299_0xf21873(0x21e),'minLength':0x1},'summary':{'type':a299_0xf21873(0x21e),'minLength':0x1},'detailMarkdown':{'type':a299_0xf21873(0x21e)},'facts':{'type':a299_0xf21873(0x22b),'maxItems':0x8,'items':{'type':a299_0xf21873(0x23a),'required':['label',a299_0xf21873(0x29c)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0xf21873(0x22b),'maxItems':0x2,'items':{'type':'object','required':['text',a299_0xf21873(0x1d9)],'properties':{'text':{'type':a299_0xf21873(0x21e),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0xf21873(0x22b),'items':{'type':a299_0xf21873(0x23a),'required':['type','value'],'properties':{'type':{'enum':[a299_0xf21873(0x31e),a299_0xf21873(0x252),a299_0xf21873(0x308)]},'value':{'type':a299_0xf21873(0x21e),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0xf21873(0x23a),'properties':{'id':{'type':a299_0xf21873(0x21e),'pattern':a299_0xf21873(0x2ed)},'source':{'type':a299_0xf21873(0x21e),'minLength':0x1},'target':{'type':a299_0xf21873(0x21e),'minLength':0x1},'sourceNodeId':{'type':a299_0xf21873(0x21e),'minLength':0x1},'targetNodeId':{'type':a299_0xf21873(0x21e),'minLength':0x1},'conditionType':{'enum':[a299_0xf21873(0x30f),a299_0xf21873(0x248),a299_0xf21873(0x1e6),a299_0xf21873(0x306)]},'expression':{'type':a299_0xf21873(0x21e)},'defaultFlow':{'type':a299_0xf21873(0x275)},'name':{'type':'string'},'waypoints':{'type':a299_0xf21873(0x22b),'items':{'$ref':a299_0xf21873(0x230)}}},'allOf':[{'anyOf':[{'required':[a299_0xf21873(0x267)]},{'required':[a299_0xf21873(0x2c9)]}]},{'anyOf':[{'required':[a299_0xf21873(0x2b4)]},{'required':[a299_0xf21873(0x1cd)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0xf21873(0x21e),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a299_0xf21873(0x2e0),a299_0xf21873(0x260)]},'datasetCode':{'type':a299_0xf21873(0x21e),'minLength':0x1},'pageId':{'type':'integer','minimum':0x1,'maximum':Number[a299_0xf21873(0x210)]},'pageIds':{'type':a299_0xf21873(0x22b),'items':{'type':a299_0xf21873(0x20e),'minimum':0x1,'maximum':Number[a299_0xf21873(0x210)]}},'templateName':![],'flowJson':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x1c9),a299_0xf21873(0x1e8)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0xf21873(0x21e),'const':'approval.simple-flow.v1','description':a299_0xf21873(0x1fe)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0xf21873(0x1ce)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x30c)}},'edges':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x31b)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0xf21873(0x23e),a299_0xf21873(0x302),'flowName',a299_0xf21873(0x265),'datasetCode',a299_0xf21873(0x219),a299_0xf21873(0x2e3),a299_0xf21873(0x21d)],REMOVED_ROOT_FIELDS=['id',a299_0xf21873(0x219),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a299_0xf21873(0x2e7),NODE_TYPES=new Set(['START',a299_0xf21873(0x318),'APPROVAL',a299_0xf21873(0x1f8),'SCRIPT',a299_0xf21873(0x2c6)]),CONDITION_TYPES=new Set([a299_0xf21873(0x30f),a299_0xf21873(0x248),a299_0xf21873(0x1e6),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0xf21873(0x2d0),a299_0xf21873(0x2a1),a299_0xf21873(0x2d8)]),APPROVAL_TASK_MODES=new Set([a299_0xf21873(0x2dc),'HANDLE']),FLOW_TIME_UNITS=new Set([a299_0xf21873(0x1cc),a299_0xf21873(0x206),a299_0xf21873(0x262),a299_0xf21873(0x2f8)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0xf21873(0x283),a299_0xf21873(0x2d2),'EXECUTE_BFF']),FLOW_TYPES=new Set([a299_0xf21873(0x2e0),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a299_0xf21873(0x28b)]),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_0xf21873(0x2fc),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a299_0xf21873(0x252),a299_0xf21873(0x308)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0xf21873(0x23f)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0xf21873(0x2cf),UNSUPPORTED_FORM_MESSAGE=a299_0xf21873(0x216),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0xf21873(0x215),RESERVED_RESULT_VARIABLES=new Set([a299_0xf21873(0x21f),a299_0xf21873(0x27f),'approval_sys_appCode',a299_0xf21873(0x2cb),'approval_sys_initiatorUserId',a299_0xf21873(0x27d),a299_0xf21873(0x2b7),'approval_sys_pageId',a299_0xf21873(0x220),'approval_sys_dataId']);export function normalizeFlowConfig(_0x66cb15){const _0x21ca37=a299_0xf21873;if(!isRecord(_0x66cb15))throw new TypeError(_0x21ca37(0x317));const _0x28876a=cloneJsonValue(_0x66cb15),_0x436939=_0x28876a[_0x21ca37(0x309)],_0x1eb536=isRecord(_0x436939)?cloneJsonValue(_0x436939):{},_0x5990f1=[],_0x1093ae=[];for(const _0x266be2 of REMOVED_ROOT_FIELDS){if(!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x28876a,_0x266be2))continue;delete _0x28876a[_0x266be2],_0x1093ae[_0x21ca37(0x2c1)](_0x266be2),_0x5990f1['push']({'code':_0x21ca37(0x2ba),'path':_0x266be2,'message':_0x266be2+_0x21ca37(0x2b8)});}for(const _0x3af03d of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,_0x3af03d))continue;const _0x4e3409=_0x21ca37(0x1dc)+_0x3af03d;delete _0x1eb536[_0x3af03d],_0x1093ae[_0x21ca37(0x2c1)](_0x4e3409),_0x5990f1['push']({'code':'legacy_field_removed','path':_0x4e3409,'message':_0x4e3409+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,'schemaVersion')){const _0x361e8c=_0x1eb536[_0x21ca37(0x2c0)],_0x585812=typeof _0x361e8c===_0x21ca37(0x21e)?_0x361e8c[_0x21ca37(0x325)]():_0x361e8c;if(isEmptyJsonValue(_0x361e8c)||_0x585812===DEFAULT_FLOW_SCHEMA_VERSION){const _0x3b5e8b='flowJson.schemaVersion';delete _0x1eb536['schemaVersion'],_0x1093ae['push'](_0x3b5e8b),_0x5990f1[_0x21ca37(0x2c1)]({'code':'legacy_field_removed','path':_0x3b5e8b,'message':_0x3b5e8b+_0x21ca37(0x287)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x1eb536,_0x21ca37(0x309),_0x5990f1,_0x1093ae);_0x28876a[_0x21ca37(0x315)]===_0x21ca37(0x260)&&!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,'pageMode')&&(_0x1eb536[_0x21ca37(0x1e7)]=_0x21ca37(0x1ce));_0x28876a[_0x21ca37(0x309)]=_0x1eb536;if(typeof _0x28876a[_0x21ca37(0x282)]===_0x21ca37(0x21e))_0x28876a['flowName']=_0x28876a[_0x21ca37(0x282)]['trim']();return{'config':_0x28876a,'warnings':_0x5990f1,'removedPaths':_0x1093ae};}export function validateFlowConfig(_0x40473b){const _0xa2716=a299_0xf21873;let _0x1c78c9;try{_0x1c78c9=normalizeFlowConfig(_0x40473b);}catch(_0x270c53){const _0x31c0c4=_0x270c53 instanceof Error?_0x270c53[_0xa2716(0x2fe)]:String(_0x270c53),_0x5437d1={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x31c0c4}],'warnings':[],'normalized':_0x5437d1,'validationConfig':_0x5437d1};}const _0x55dfd5=_0x1c78c9[_0xa2716(0x22f)],_0x5dcb32=cloneJsonValue(_0x55dfd5),_0x4faaeb=_0x5dcb32[_0xa2716(0x309)];_0x4faaeb['flowKey']='__rabetbase_local_validation__',_0x4faaeb[_0xa2716(0x282)]=_0x55dfd5[_0xa2716(0x282)];typeof _0x55dfd5[_0xa2716(0x274)]===_0xa2716(0x21e)&&_0x55dfd5[_0xa2716(0x274)][_0xa2716(0x325)]()&&(_0x4faaeb[_0xa2716(0x265)]=_0x55dfd5['datasetCode'][_0xa2716(0x325)]());const _0x309104=[];return validateOuterMetadata(_0x55dfd5,_0x309104),validateFlowClassification(_0x55dfd5,_0x309104),validateGraph(_0x55dfd5[_0xa2716(0x309)],_0x309104),{'valid':_0x309104[_0xa2716(0x24f)]===0x0,'errors':_0x309104,'warnings':_0x1c78c9[_0xa2716(0x266)],'normalized':_0x55dfd5,'validationConfig':_0x5dcb32};}function validateFlowClassification(_0x31f301,_0x3c1091){const _0x1a05af=a299_0xf21873;if(!isRecord(_0x31f301[_0x1a05af(0x309)]))return;const _0x53eac6=_0x31f301[_0x1a05af(0x315)],_0x1e71ab=_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1e7)];_0x1e71ab!==undefined&&(typeof _0x1e71ab!==_0x1a05af(0x21e)||!FLOW_PAGE_MODES['has'](_0x1e71ab))&&_0x3c1091[_0x1a05af(0x2c1)]({'path':'flowJson.pageMode','message':_0x1a05af(0x29d)+String(_0x1e71ab)+'.'});_0x53eac6===_0x1a05af(0x2e0)&&_0x1e71ab!==undefined&&_0x3c1091[_0x1a05af(0x2c1)]({'path':_0x1a05af(0x1e2),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0x53eac6===_0x1a05af(0x260)&&_0x1e71ab==='PLATFORM_FORM'&&_0x3c1091[_0x1a05af(0x2c1)]({'path':_0x1a05af(0x1e2),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x53eac6===_0x1a05af(0x2e0)||_0x53eac6===_0x1a05af(0x260))&&validateCustomPageNavigation(_0x31f301,_0x53eac6,_0x1e71ab,_0x3c1091);if(_0x53eac6!=='FORM_FLOW'||!Array[_0x1a05af(0x1f1)](_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1c9)]))return;_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1c9)][_0x1a05af(0x32a)]((_0x56775b,_0x44edc3)=>{const _0x5dbac2=_0x1a05af;isRecord(_0x56775b)&&_0x56775b['type']===_0x5dbac2(0x2dc)&&_0x56775b[_0x5dbac2(0x279)]===_0x5dbac2(0x2d1)&&_0x3c1091['push']({'path':_0x5dbac2(0x300)+_0x44edc3+_0x5dbac2(0x289),'message':_0x5dbac2(0x307)});});}function validateCustomPageNavigation(_0x58172f,_0x2cda5c,_0xe27b01,_0x2a4ef6){const _0x4e4860=a299_0xf21873,_0x1d4c95=_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x2c5)];_0x1d4c95!==undefined&&_0x2a4ef6[_0x4e4860(0x2c1)]({'path':_0x4e4860(0x2f5),'message':_0x4e4860(0x269)});const _0x3e4907=_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x223)];_0x3e4907!==undefined&&(typeof _0x3e4907!==_0x4e4860(0x21e)||_0x3e4907[_0x4e4860(0x325)]()==='')&&_0x2a4ef6[_0x4e4860(0x2c1)]({'path':'flowJson.startPath','message':_0x4e4860(0x1e4)});const _0x2aebbe=Array[_0x4e4860(0x1f1)](_0x58172f[_0x4e4860(0x309)]['nodes'])?_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x1c9)][_0x4e4860(0x253)]((_0x286835,_0x3c4bf5)=>({'node':_0x286835,'index':_0x3c4bf5}))[_0x4e4860(0x2a3)](({node:_0x1a72d9})=>isRecord(_0x1a72d9)&&_0x1a72d9[_0x4e4860(0x27a)]!==undefined):[],_0x3d2127=_0x3e4907!==undefined||_0x2aebbe[_0x4e4860(0x24f)]>0x0,_0xcc29d7=_0xe27b01===undefined&&_0x2cda5c===_0x4e4860(0x260)?_0x4e4860(0x1ce):_0xe27b01;_0x3d2127&&(_0x2cda5c!==_0x4e4860(0x260)||_0xcc29d7!==_0x4e4860(0x1ce))&&(_0x3e4907!==undefined&&_0x2a4ef6['push']({'path':_0x4e4860(0x214),'message':_0x4e4860(0x235)}),_0x2aebbe[_0x4e4860(0x32a)](({index:_0x29a36d})=>{const _0x3e6cb6=_0x4e4860;_0x2a4ef6[_0x3e6cb6(0x2c1)]({'path':_0x3e6cb6(0x300)+_0x29a36d+_0x3e6cb6(0x1fb),'message':_0x3e6cb6(0x26f)});}));}export async function writeNormalizedFlowConfig(_0x270866,_0x5db509,_0x34beda={}){const _0x3d1e49=a299_0xf21873,_0x1c2e54=resolve(_0x270866),_0x28fb6e=_0x1c2e54+'.'+process[_0x3d1e49(0x29b)]+'.'+randomUUID()+_0x3d1e49(0x2a0),_0x204164=JSON[_0x3d1e49(0x21a)](_0x5db509,null,0x2)+'\x0a';let _0x45dfbc;try{try{_0x45dfbc=(await stat(_0x1c2e54))[_0x3d1e49(0x1e9)]&0x1ff;}catch{_0x45dfbc=undefined;}await writeFile(_0x28fb6e,_0x204164,{'encoding':_0x3d1e49(0x278),'flag':'wx','mode':_0x45dfbc??0x1a4});if(_0x45dfbc!==undefined)await chmod(_0x28fb6e,_0x45dfbc);_0x34beda[_0x3d1e49(0x251)]===![]?(await link(_0x28fb6e,_0x1c2e54),await unlink(_0x28fb6e)):await rename(_0x28fb6e,_0x1c2e54);}finally{await unlink(_0x28fb6e)[_0x3d1e49(0x1f4)](()=>undefined);}}function validateOuterMetadata(_0x5cccf8,_0x49a551){const _0x397636=a299_0xf21873;(typeof _0x5cccf8[_0x397636(0x282)]!=='string'||_0x5cccf8[_0x397636(0x282)][_0x397636(0x325)]()==='')&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x282),'message':_0x397636(0x329)});_0x5cccf8[_0x397636(0x2a4)]!==undefined&&typeof _0x5cccf8[_0x397636(0x2a4)]!==_0x397636(0x21e)&&_0x49a551['push']({'path':_0x397636(0x2a4),'message':_0x397636(0x26d)});if(_0x5cccf8[_0x397636(0x315)]===undefined||_0x5cccf8[_0x397636(0x315)]===null)_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x315),'message':_0x397636(0x311)});else(typeof _0x5cccf8[_0x397636(0x315)]!==_0x397636(0x21e)||!FLOW_TYPES[_0x397636(0x2fb)](_0x5cccf8['flowType']))&&_0x49a551['push']({'path':'flowType','message':_0x397636(0x2a5)+String(_0x5cccf8[_0x397636(0x315)])+'.'});_0x5cccf8[_0x397636(0x274)]!==undefined&&typeof _0x5cccf8['datasetCode']!==_0x397636(0x21e)&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x274),'message':_0x397636(0x24b)});_0x5cccf8[_0x397636(0x22a)]===undefined&&_0x5cccf8[_0x397636(0x2e3)]!==undefined&&(!Number['isSafeInteger'](_0x5cccf8[_0x397636(0x2e3)])||_0x5cccf8[_0x397636(0x2e3)]<=0x0)&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x2e3),'message':_0x397636(0x1cb)});if(_0x5cccf8['pageIds']!==undefined){if(!Array[_0x397636(0x1f1)](_0x5cccf8[_0x397636(0x22a)])||_0x5cccf8[_0x397636(0x22a)]['some'](_0x1f9732=>!Number[_0x397636(0x1d4)](_0x1f9732)||_0x1f9732<=0x0))_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x22a),'message':'pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.'});else[...new Set(_0x5cccf8['pageIds'])][_0x397636(0x2f9)](',')[_0x397636(0x24f)]>0x800&&_0x49a551[_0x397636(0x2c1)]({'path':'pageIds','message':_0x397636(0x1fd)});_0x5cccf8[_0x397636(0x315)]==='INDEPENDENT_FLOW'&&Array[_0x397636(0x1f1)](_0x5cccf8['pageIds'])&&_0x5cccf8[_0x397636(0x22a)][_0x397636(0x24f)]>0x0&&_0x49a551['push']({'path':_0x397636(0x22a),'message':_0x397636(0x29e)});}_0x5cccf8['flowType']===_0x397636(0x260)&&_0x5cccf8[_0x397636(0x274)]!==undefined&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x274),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x5cccf8[_0x397636(0x315)]==='INDEPENDENT_FLOW'&&_0x5cccf8[_0x397636(0x22a)]===undefined&&_0x5cccf8['pageId']!==undefined&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x2e3),'message':_0x397636(0x24a)});}function validateGraph(_0x255619,_0x3d54f5){const _0x33b7f4=a299_0xf21873;if(!isRecord(_0x255619)){_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x309),'message':_0x33b7f4(0x28e)});return;}!Array[_0x33b7f4(0x1f1)](_0x255619[_0x33b7f4(0x1c9)])&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':'flowJson.nodes','message':_0x33b7f4(0x23d)});!Array[_0x33b7f4(0x1f1)](_0x255619['edges'])&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x233),'message':_0x33b7f4(0x31a)});Object[_0x33b7f4(0x31d)]['hasOwnProperty'][_0x33b7f4(0x20b)](_0x255619,_0x33b7f4(0x2c0))&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':'flowJson.schemaVersion','message':'Unsupported\x20schemaVersion:\x20'+String(_0x255619[_0x33b7f4(0x2c0)])+_0x33b7f4(0x1ca)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x26fecc of[_0x33b7f4(0x218),_0x33b7f4(0x2a2),'formPermissions']){Object['prototype'][_0x33b7f4(0x2fd)][_0x33b7f4(0x20b)](_0x255619,_0x26fecc)&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x1dc)+_0x26fecc,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x255619[_0x33b7f4(0x1c9)])||!Array[_0x33b7f4(0x1f1)](_0x255619['edges']))return;const _0x249796=new Map(),_0x45d2e3=[],_0x800a34=[],_0x7d899a=new Map(),_0xbada06=new Map(),_0x2a00bc=new Set();let _0x406a1c=0x0;_0x255619[_0x33b7f4(0x1c9)][_0x33b7f4(0x32a)]((_0xeb1db7,_0x5523c2)=>{const _0x218e95=_0x33b7f4,_0x2b3d90=_0x218e95(0x300)+_0x5523c2+']';if(!isRecord(_0xeb1db7)){_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90,'message':_0x218e95(0x2b6)});return;}const _0x3df17f=_0xeb1db7;if(typeof _0x3df17f['id']!==_0x218e95(0x21e)||!BPMN_ID_PATTERN[_0x218e95(0x2eb)](_0x3df17f['id']))_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+_0x218e95(0x2fa),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x249796[_0x218e95(0x2fb)](_0x3df17f['id'])?_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+'.id','message':_0x218e95(0x2e1)+_0x3df17f['id']+'.'}):(_0x249796[_0x218e95(0x227)](_0x3df17f['id'],_0x3df17f),_0x2a00bc[_0x218e95(0x32f)](_0x3df17f['id']));if(!NODE_TYPES[_0x218e95(0x2fb)](_0x3df17f['type']))_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+_0x218e95(0x2ca),'message':_0x218e95(0x246)+String(_0x3df17f[_0x218e95(0x1f0)])+'.'});else{if(_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x22d))_0x45d2e3[_0x218e95(0x2c1)](_0x3df17f['id']);else _0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x318)&&_0x800a34[_0x218e95(0x2c1)](_0x3df17f['id']);}_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x2dc)&&(_0x3df17f[_0x218e95(0x279)]===undefined||_0x3df17f['taskMode']==='APPROVAL')&&(_0x406a1c+=0x1);validateNode(_0x3df17f,_0x2b3d90,_0x3d54f5);if(_0x3df17f['type']===_0x218e95(0x32d)){const _0x4797de=resolveEffectiveResultVariable(_0x3df17f[_0x218e95(0x2a7)],![]);_0x4797de&&(registerResultVariableOwner(_0xbada06,_0x4797de,_0x3df17f['id'],_0x3d54f5),!_0x7d899a[_0x218e95(0x2fb)](_0x4797de)&&_0x7d899a[_0x218e95(0x227)](_0x4797de,_0x3df17f['id']));}if(_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x2dc)&&isRecord(_0x3df17f[_0x218e95(0x2aa)])&&_0x3df17f[_0x218e95(0x2aa)][_0x218e95(0x32c)]===!![]&&_0x3df17f['timeout'][_0x218e95(0x26b)]===_0x218e95(0x2bb)){const _0x2e886a=resolveEffectiveResultVariable(_0x3df17f[_0x218e95(0x2aa)][_0x218e95(0x2a7)],!![]);_0x2e886a&&registerResultVariableOwner(_0xbada06,_0x2e886a,_0x3df17f['id']+'.timeout',_0x3d54f5);}});_0x45d2e3['length']!==0x1&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x26c),'message':_0x33b7f4(0x229)});_0x800a34[_0x33b7f4(0x24f)]===0x0&&_0x3d54f5['push']({'path':_0x33b7f4(0x26c),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x57bd17=new Map(),_0x575fc4=new Map(),_0x37c28c=new Map(),_0x338e66=new Set();_0x255619['edges']['forEach']((_0x351cb9,_0x26060a)=>{const _0xf63826=_0x33b7f4,_0x51f61e=_0xf63826(0x232)+_0x26060a+']';if(!isRecord(_0x351cb9)){_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e,'message':_0xf63826(0x259)});return;}const _0x4846d9=_0x351cb9;_0x37c28c[_0xf63826(0x227)](_0x4846d9,_0x51f61e);const _0x111f19=resolveEdgeEndpoint(_0x4846d9[_0xf63826(0x267)],_0x4846d9['sourceNodeId']),_0x7f85e4=resolveEdgeEndpoint(_0x4846d9['target'],_0x4846d9[_0xf63826(0x1cd)]);if(!_0x111f19)_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x21b),'message':'edge\x20source\x20is\x20required.'});if(!_0x7f85e4)_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2af),'message':_0xf63826(0x281)});_0x111f19&&!_0x249796[_0xf63826(0x2fb)](_0x111f19)&&_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x21b),'message':_0xf63826(0x24c)+_0x111f19+'.'});_0x7f85e4&&!_0x249796[_0xf63826(0x2fb)](_0x7f85e4)&&_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+'.target','message':_0xf63826(0x2bd)+_0x7f85e4+'.'});if(_0x4846d9['id']!==undefined){if(typeof _0x4846d9['id']!==_0xf63826(0x21e)||!BPMN_ID_PATTERN['test'](_0x4846d9['id']))_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2fa),'message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x2a00bc[_0xf63826(0x2fb)](_0x4846d9['id']))_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2fa),'message':_0xf63826(0x322)+_0x4846d9['id']+'.'});else!_0x2a00bc[_0xf63826(0x2fb)](_0x4846d9['id'])&&_0x2a00bc[_0xf63826(0x32f)](_0x4846d9['id']);}}if(_0x111f19&&_0x7f85e4){const _0x55e3a9=_0x111f19+'\x00'+_0x7f85e4+'\x00'+(_0x4846d9[_0xf63826(0x261)]??'ALWAYS');_0x338e66[_0xf63826(0x2fb)](_0x55e3a9)?_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e,'message':'Duplicate\x20edge\x20route:\x20'+_0x111f19+_0xf63826(0x1dd)+_0x7f85e4+'\x20('+(_0x4846d9[_0xf63826(0x261)]??_0xf63826(0x30f))+').'}):_0x338e66[_0xf63826(0x32f)](_0x55e3a9);}validateEdge(_0x4846d9,_0x51f61e,_0x3d54f5),_0x111f19&&_0x7f85e4&&(_0x57bd17['get'](_0x111f19)?.['push'](_0x4846d9)??_0x57bd17[_0xf63826(0x227)](_0x111f19,[_0x4846d9]),_0x575fc4[_0xf63826(0x2f6)](_0x7f85e4)?.[_0xf63826(0x2c1)](_0x4846d9)??_0x575fc4['set'](_0x7f85e4,[_0x4846d9]));});if(_0x45d2e3['length']!==0x1)return;validateGraphShape(_0x249796,_0x45d2e3[0x0],_0x800a34,_0x57bd17,_0x575fc4,_0x37c28c,_0x3d54f5),validateScriptResultReferences(_0x249796,_0x45d2e3[0x0],_0x57bd17,_0x575fc4,_0x37c28c,_0x7d899a,_0x3d54f5),validateApprovalResults(_0x249796,_0x406a1c,_0x800a34,_0x3d54f5);}function validateNode(_0x686ed7,_0x315520,_0x19b8f7){const _0x3b1740=a299_0xf21873;for(const _0x49c990 of[_0x3b1740(0x207),_0x3b1740(0x202)]){Object['prototype'][_0x3b1740(0x2fd)][_0x3b1740(0x20b)](_0x686ed7,_0x49c990)&&_0x19b8f7['push']({'path':_0x315520+'.'+_0x49c990,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x3b1740(0x2fb)](_0x686ed7[_0x3b1740(0x1f0)]))return;(typeof _0x686ed7[_0x3b1740(0x26e)]!==_0x3b1740(0x21e)||_0x686ed7['name'][_0x3b1740(0x325)]()==='')&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+'.name','message':_0x3b1740(0x255)});_0x686ed7[_0x3b1740(0x2e3)]!==undefined&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x2cd),'message':_0x3b1740(0x2c7)});if(_0x686ed7['path']!==undefined){if(typeof _0x686ed7[_0x3b1740(0x27a)]!=='string'||_0x686ed7['path']['trim']()==='')_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x224),'message':_0x3b1740(0x2d4)});else _0x686ed7['type']!=='APPROVAL'&&_0x686ed7[_0x3b1740(0x1f0)]!==_0x3b1740(0x318)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x224),'message':_0x3b1740(0x1f2)});}const _0x39efa2=_0x686ed7[_0x3b1740(0x2ec)];if(!isRecord(_0x39efa2))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x228),'message':_0x3b1740(0x1d2)});else for(const _0x254d6b of['x','y']){const _0x4b604e=_0x39efa2[_0x254d6b];(typeof _0x4b604e!==_0x3b1740(0x285)||!Number[_0x3b1740(0x209)](_0x4b604e)||_0x4b604e<0x0)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2d7)+_0x254d6b,'message':_0x3b1740(0x212)+_0x254d6b+_0x3b1740(0x32b)});}if(_0x686ed7['type']==='APPROVAL'){const _0x16baa6=_0x686ed7[_0x3b1740(0x249)]??_0x3b1740(0x2d0),_0xa347d8=_0x686ed7[_0x3b1740(0x279)]??_0x3b1740(0x2dc);!APPROVAL_TASK_MODES[_0x3b1740(0x2fb)](_0xa347d8)&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x271),'message':_0x3b1740(0x25c)+String(_0xa347d8)+'.'});!APPROVAL_MODES[_0x3b1740(0x2fb)](_0x16baa6)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x237),'message':_0x3b1740(0x28c)+String(_0x16baa6)+'.'});if(!isRecord(_0x686ed7[_0x3b1740(0x20f)]))_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x2e6),'message':_0x3b1740(0x273)});else{const _0x31b23f=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x327)];_0x31b23f!=='FIXED'&&_0x31b23f!==_0x3b1740(0x252)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+'.assignee.strategy','message':_0x3b1740(0x333)});if(_0x31b23f===_0x3b1740(0x211)){const _0x23434a=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x290)];if(!Array['isArray'](_0x23434a)||_0x23434a[_0x3b1740(0x24f)]===0x0)_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1db),'message':_0x3b1740(0x2ee)});else{const _0x1f428e=_0x23434a[_0x3b1740(0x276)](_0x2a0c24=>!isValidUserId(_0x2a0c24));_0x1f428e>=0x0&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x24e)+_0x1f428e+']','message':_0x3b1740(0x226)});const _0x190976=new Set(_0x23434a[_0x3b1740(0x2a3)](isValidUserId)[_0x3b1740(0x253)](_0x19b9d4=>String(_0x19b9d4)[_0x3b1740(0x325)]()));_0x16baa6==='SINGLE'&&_0x190976[_0x3b1740(0x2df)]>0x1&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x1db),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x31b23f===_0x3b1740(0x252)){const _0x2646c1=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x2de)],_0x170158=typeof _0x2646c1===_0x3b1740(0x285)||typeof _0x2646c1===_0x3b1740(0x21e)?Number(String(_0x2646c1)['trim']()):Number['NaN'];(!Number[_0x3b1740(0x1d4)](_0x170158)||_0x170158<=0x0)&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x1ff),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x686ed7[_0x3b1740(0x250)]!==undefined){if(!isRecord(_0x686ed7[_0x3b1740(0x250)]))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x24d),'message':_0x3b1740(0x1e5)});else{if(_0x686ed7[_0x3b1740(0x250)]['strategy']!==_0x3b1740(0x211))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2d6),'message':_0x3b1740(0x2f0)});else{const _0x1ec60d=_0x686ed7[_0x3b1740(0x250)][_0x3b1740(0x290)];if(!Array[_0x3b1740(0x1f1)](_0x1ec60d)||_0x1ec60d[_0x3b1740(0x24f)]===0x0)_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2ce),'message':_0x3b1740(0x2a6)});else{const _0x1bf46d=_0x1ec60d['findIndex'](_0x340610=>!isValidUserId(_0x340610));_0x1bf46d>=0x0&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1ea)+_0x1bf46d+']','message':_0x3b1740(0x25b)});}}}}}_0x686ed7[_0x3b1740(0x1d3)]!==undefined&&typeof _0x686ed7['sequential']!==_0x3b1740(0x275)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1f9),'message':_0x3b1740(0x299)});if(_0x686ed7[_0x3b1740(0x1f0)]===_0x3b1740(0x32d)){(typeof _0x686ed7[_0x3b1740(0x304)]!=='string'||_0x686ed7[_0x3b1740(0x304)][_0x3b1740(0x325)]()==='')&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2c4),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x686ed7[_0x3b1740(0x2a7)]!==undefined){if(typeof _0x686ed7[_0x3b1740(0x2a7)]!==_0x3b1740(0x21e)||!VARIABLE_PATTERN[_0x3b1740(0x2eb)](_0x686ed7[_0x3b1740(0x2a7)]))_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x239),'message':_0x3b1740(0x28f)});else(RESERVED_RESULT_VARIABLES[_0x3b1740(0x2fb)](_0x686ed7[_0x3b1740(0x2a7)])||_0x686ed7[_0x3b1740(0x2a7)][_0x3b1740(0x240)](_0x3b1740(0x2f4)))&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x239),'message':_0x3b1740(0x332)+_0x686ed7[_0x3b1740(0x2a7)]+'.'});}}validateAsyncExecution(_0x686ed7,_0x315520,_0x19b8f7),validateApprovalTimeout(_0x686ed7,_0x315520,_0x19b8f7),validateCcConfig(_0x686ed7,_0x315520,_0x19b8f7),_0x686ed7[_0x3b1740(0x1f0)]===_0x3b1740(0x2c6)&&validateNotificationConfig(_0x686ed7[_0x3b1740(0x22f)],_0x315520+_0x3b1740(0x27b),_0x19b8f7);}function validateAsyncExecution(_0x496b8c,_0x41b280,_0x2edad6){const _0x3a67d1=a299_0xf21873;if(_0x496b8c[_0x3a67d1(0x213)]===undefined)return;if(!isRecord(_0x496b8c['async'])){_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+_0x3a67d1(0x324),'message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x32c)]!==undefined&&typeof _0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x32c)]!=='boolean'){_0x2edad6['push']({'path':_0x41b280+_0x3a67d1(0x2a9),'message':_0x3a67d1(0x222)});return;}if(_0x496b8c['async'][_0x3a67d1(0x32c)]!==!![])return;_0x496b8c[_0x3a67d1(0x1f0)]!==_0x3a67d1(0x32d)&&_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+'.async','message':_0x3a67d1(0x22c)});const _0x5bffdb=_0x496b8c[_0x3a67d1(0x213)]['retryCount']??0x3;(!Number[_0x3a67d1(0x323)](_0x5bffdb)||_0x5bffdb<0x1||_0x5bffdb>MAX_ASYNC_RETRY_COUNT)&&_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+_0x3a67d1(0x2d5),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x20a)]!==undefined&&validateTimeAmount(_0x496b8c[_0x3a67d1(0x213)]['retryInterval'],_0x41b280+_0x3a67d1(0x27e),_0x2edad6);}function validateApprovalTimeout(_0x1dcc11,_0x31a22b,_0x31a843){const _0x35efae=a299_0xf21873;if(_0x1dcc11[_0x35efae(0x2aa)]===undefined)return;if(!isRecord(_0x1dcc11[_0x35efae(0x2aa)])){_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x314),'message':_0x35efae(0x31f)});return;}if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!==undefined&&typeof _0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!=='boolean'){_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x2e2),'message':_0x35efae(0x277)});return;}if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!==!![])return;if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]!==undefined&&typeof _0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]!==_0x35efae(0x275)){_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x221),'message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x1dcc11[_0x35efae(0x1f0)]!==_0x35efae(0x2dc)&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x314),'message':_0x35efae(0x1d7)});validateTimeAmount(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x2bf)],_0x31a22b+_0x35efae(0x2be),_0x31a843);const _0x26b9fd=_0x1dcc11['timeout'][_0x35efae(0x26b)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x35efae(0x2fb)](_0x26b9fd)){_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x247),'message':_0x35efae(0x1e1)});return;}(_0x1dcc11[_0x35efae(0x279)]??_0x35efae(0x2dc))===_0x35efae(0x2d1)&&_0x26b9fd!=='EXECUTE_BFF'&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x247),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x435e53=_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]??_0x26b9fd!==_0x35efae(0x2bb);if(_0x26b9fd===_0x35efae(0x2bb))_0x435e53&&_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x221),'message':_0x35efae(0x2b3)}),(typeof _0x1dcc11['timeout'][_0x35efae(0x304)]!==_0x35efae(0x21e)||_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x304)]['trim']()==='')&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x1f3),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x2a7)],_0x31a22b+_0x35efae(0x30d),_0x31a843);else!_0x435e53&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x221),'message':_0x26b9fd+_0x35efae(0x25f)});}function validateTimeAmount(_0x3ba573,_0x4be071,_0x10b234){const _0x356a09=a299_0xf21873;if(!isRecord(_0x3ba573)){_0x10b234[_0x356a09(0x2c1)]({'path':_0x4be071,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number['isInteger'](_0x3ba573[_0x356a09(0x29c)])||Number(_0x3ba573['value'])<=0x0)&&_0x10b234['push']({'path':_0x4be071+_0x356a09(0x294),'message':_0x356a09(0x30a)}),!FLOW_TIME_UNITS[_0x356a09(0x2fb)](_0x3ba573[_0x356a09(0x1ee)])&&_0x10b234[_0x356a09(0x2c1)]({'path':_0x4be071+'.unit','message':_0x356a09(0x293)});}function validateOptionalResultVariable(_0x1e87d1,_0x1a9031,_0x847cd){const _0x55c728=a299_0xf21873;if(_0x1e87d1===undefined||_0x1e87d1===null||_0x1e87d1==='')return;if(typeof _0x1e87d1!=='string'||!VARIABLE_PATTERN[_0x55c728(0x2eb)](_0x1e87d1))_0x847cd['push']({'path':_0x1a9031,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x55c728(0x2fb)](_0x1e87d1)||_0x1e87d1[_0x55c728(0x240)]('approval_sys_'))&&_0x847cd[_0x55c728(0x2c1)]({'path':_0x1a9031,'message':_0x55c728(0x332)+_0x1e87d1+'.'});}function validateCcConfig(_0x1c0d1b,_0x4b331a,_0xfa119f){const _0x13de8b=a299_0xf21873;if(_0x1c0d1b['cc']===undefined)return;if(!isRecord(_0x1c0d1b['cc'])){_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+_0x13de8b(0x295),'message':_0x13de8b(0x2cc)});return;}_0x1c0d1b['type']!==_0x13de8b(0x318)&&_0x1c0d1b['type']!==_0x13de8b(0x2dc)&&_0xfa119f['push']({'path':_0x4b331a+_0x13de8b(0x295),'message':_0x13de8b(0x203)});Object[_0x13de8b(0x31d)][_0x13de8b(0x2fd)][_0x13de8b(0x20b)](_0x1c0d1b['cc'],_0x13de8b(0x26a))&&_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+_0x13de8b(0x296),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3af51f=_0x1c0d1b['cc']['recipientUserIds'];if(!Array[_0x13de8b(0x1f1)](_0x3af51f)||_0x3af51f[_0x13de8b(0x24f)]===0x0)_0xfa119f['push']({'path':_0x4b331a+_0x13de8b(0x2ad),'message':_0x13de8b(0x23c)});else{_0x3af51f[_0x13de8b(0x24f)]>MAX_CC_RECIPIENTS&&_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+'.cc.recipientUserIds','message':_0x13de8b(0x238)+MAX_CC_RECIPIENTS+_0x13de8b(0x1ec)});const _0x5d351a=new Set();_0x3af51f[_0x13de8b(0x32a)]((_0x23d5f0,_0x440f7e)=>{const _0x4c9ae5=_0x13de8b;if(typeof _0x23d5f0!==_0x4c9ae5(0x21e)||_0x23d5f0[_0x4c9ae5(0x325)]()==='')_0xfa119f['push']({'path':_0x4b331a+'.cc.recipientUserIds['+_0x440f7e+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x5d351a['has'](_0x23d5f0[_0x4c9ae5(0x325)]())?_0xfa119f['push']({'path':_0x4b331a+'.cc.recipientUserIds['+_0x440f7e+']','message':_0x4c9ae5(0x2b9)+_0x23d5f0[_0x4c9ae5(0x325)]()+'.'}):_0x5d351a['add'](_0x23d5f0[_0x4c9ae5(0x325)]());});}validateStringArray(_0x1c0d1b['cc'][_0x13de8b(0x29a)],_0x4b331a+_0x13de8b(0x241),_0xfa119f);}function validateStringArray(_0x2a8fe1,_0x2edfdd,_0x5e9051){const _0x355aeb=a299_0xf21873;if(_0x2a8fe1===undefined)return;if(!Array[_0x355aeb(0x1f1)](_0x2a8fe1)){_0x5e9051[_0x355aeb(0x2c1)]({'path':_0x2edfdd,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x3e956b=new Set();_0x2a8fe1[_0x355aeb(0x32a)]((_0x170250,_0xffdd8f)=>{const _0xa3f780=_0x355aeb;if(typeof _0x170250!==_0xa3f780(0x21e)||_0x170250['trim']()==='')_0x5e9051[_0xa3f780(0x2c1)]({'path':_0x2edfdd+'['+_0xffdd8f+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x3e956b[_0xa3f780(0x2fb)](_0x170250[_0xa3f780(0x325)]())?_0x5e9051[_0xa3f780(0x2c1)]({'path':_0x2edfdd+'['+_0xffdd8f+']','message':_0xa3f780(0x1df)+_0x170250['trim']()+'.'}):_0x3e956b[_0xa3f780(0x32f)](_0x170250[_0xa3f780(0x325)]());});}function validateNotificationConfig(_0x535337,_0x1a753d,_0x18afa9){const _0x2d1aa8=a299_0xf21873;if(!isRecord(_0x535337)){_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x535337[_0x2d1aa8(0x2f2)]!==undefined&&_0x535337[_0x2d1aa8(0x2f2)]!==null){if(typeof _0x535337[_0x2d1aa8(0x2f2)]!==_0x2d1aa8(0x21e))_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x1e0),'message':_0x2d1aa8(0x331)});else _0x535337[_0x2d1aa8(0x2f2)]['trim']()&&_0x535337['version'][_0x2d1aa8(0x325)]()!=='v1'&&_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x1e0),'message':_0x2d1aa8(0x1f5)+_0x535337['version']+'.'});}const _0x2e60f7=requireNotificationString(_0x535337[_0x2d1aa8(0x272)],_0x1a753d+'.configCode',_0x2d1aa8(0x2c8),_0x18afa9);_0x2e60f7?.['includes']('${')&&_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x2b0),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x535337[_0x2d1aa8(0x2b1)]!==undefined&&_0x535337[_0x2d1aa8(0x2b1)]!==null){if(typeof _0x535337[_0x2d1aa8(0x2b1)]!==_0x2d1aa8(0x21e))_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+'.failurePolicy','message':_0x2d1aa8(0x1d1)});else!NOTIFICATION_FAILURE_POLICIES[_0x2d1aa8(0x2fb)](_0x535337[_0x2d1aa8(0x2b1)][_0x2d1aa8(0x325)]()['toUpperCase']())&&_0x18afa9['push']({'path':_0x1a753d+_0x2d1aa8(0x305),'message':_0x2d1aa8(0x286)});}!isRecord(_0x535337[_0x2d1aa8(0x32e)])?_0x18afa9['push']({'path':_0x1a753d+_0x2d1aa8(0x291),'message':_0x2d1aa8(0x2d3)}):validateNotificationTemplate(_0x535337[_0x2d1aa8(0x32e)],_0x1a753d+'.template',_0x18afa9),validateNotificationRecipients(_0x535337['recipients'],_0x1a753d+_0x2d1aa8(0x28d),_0x18afa9);}function validateNotificationTemplate(_0x3f6480,_0x33f95c,_0x45d7cc){const _0x143142=a299_0xf21873;for(const _0x30a760 of['title',_0x143142(0x301)]){const _0x2ca39f=requireNotificationString(_0x3f6480[_0x30a760],_0x33f95c+'.'+_0x30a760,'Notification\x20template.'+_0x30a760+_0x143142(0x303),_0x45d7cc);if(_0x2ca39f)validateNotificationPlaceholders(_0x2ca39f,_0x33f95c+'.'+_0x30a760,_0x45d7cc);}_0x3f6480[_0x143142(0x1d8)]!==undefined&&_0x3f6480[_0x143142(0x1d8)]!==null&&(typeof _0x3f6480['detailMarkdown']!==_0x143142(0x21e)?_0x45d7cc[_0x143142(0x2c1)]({'path':_0x33f95c+_0x143142(0x288),'message':_0x143142(0x319)}):validateNotificationPlaceholders(_0x3f6480[_0x143142(0x1d8)],_0x33f95c+_0x143142(0x288),_0x45d7cc)),validateNotificationFacts(_0x3f6480[_0x143142(0x1da)],_0x33f95c+_0x143142(0x2ff),_0x45d7cc),validateNotificationActions(_0x3f6480[_0x143142(0x234)],_0x33f95c+_0x143142(0x242),_0x45d7cc);}function validateNotificationFacts(_0x41fdc1,_0x32b372,_0x6291e7){const _0x347efe=a299_0xf21873;if(_0x41fdc1===undefined||_0x41fdc1===null)return;if(!Array[_0x347efe(0x1f1)](_0x41fdc1)){_0x6291e7['push']({'path':_0x32b372,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x41fdc1[_0x347efe(0x24f)]>MAX_NOTIFICATION_FACTS&&_0x6291e7[_0x347efe(0x2c1)]({'path':_0x32b372,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x41fdc1[_0x347efe(0x32a)]((_0xc60312,_0x34695b)=>{const _0x248f86=_0x347efe,_0x53c881=_0x32b372+'['+_0x34695b+']';if(!isRecord(_0xc60312)){_0x6291e7[_0x248f86(0x2c1)]({'path':_0x53c881,'message':_0x248f86(0x27c)});return;}for(const _0x1f6a7 of[_0x248f86(0x2f7),_0x248f86(0x29c)]){const _0x42794f=requireNotificationString(_0xc60312[_0x1f6a7],_0x53c881+'.'+_0x1f6a7,_0x248f86(0x321)+_0x1f6a7+_0x248f86(0x303),_0x6291e7);_0x42794f&&validateNotificationPlaceholders(_0x42794f,_0x53c881+'.'+_0x1f6a7,_0x6291e7);}});}function validateNotificationActions(_0x4d93b9,_0x5471b0,_0x43d112){const _0x3a8d9e=a299_0xf21873;if(_0x4d93b9===undefined||_0x4d93b9===null)return;if(!Array[_0x3a8d9e(0x1f1)](_0x4d93b9)){_0x43d112['push']({'path':_0x5471b0,'message':_0x3a8d9e(0x2dd)});return;}_0x4d93b9[_0x3a8d9e(0x24f)]>MAX_NOTIFICATION_ACTIONS&&_0x43d112[_0x3a8d9e(0x2c1)]({'path':_0x5471b0,'message':_0x3a8d9e(0x22e)+MAX_NOTIFICATION_ACTIONS+_0x3a8d9e(0x254)}),_0x4d93b9['forEach']((_0x454a7a,_0x305c8d)=>{const _0x492324=_0x3a8d9e,_0x4ba8c4=_0x5471b0+'['+_0x305c8d+']';if(!isRecord(_0x454a7a)){_0x43d112[_0x492324(0x2c1)]({'path':_0x4ba8c4,'message':_0x492324(0x30e)});return;}const _0x39d671=requireNotificationString(_0x454a7a[_0x492324(0x298)],_0x4ba8c4+'.text',_0x492324(0x1e3),_0x43d112);if(_0x39d671)validateNotificationPlaceholders(_0x39d671,_0x4ba8c4+_0x492324(0x2f3),_0x43d112);const _0x1a8b33=requireNotificationString(_0x454a7a['url'],_0x4ba8c4+_0x492324(0x2b5),'Notification\x20action.url\x20is\x20required.',_0x43d112);if(!_0x1a8b33)return;validateNotificationPlaceholders(_0x1a8b33,_0x4ba8c4+_0x492324(0x2b5),_0x43d112),!/^https?:\/\//i['test'](_0x1a8b33)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x492324(0x2eb)](_0x1a8b33)&&_0x43d112[_0x492324(0x2c1)]({'path':_0x4ba8c4+_0x492324(0x2b5),'message':_0x492324(0x2ea)});});}function validateNotificationRecipients(_0x5bb3bb,_0x532b7d,_0x321613){const _0x49cb0d=a299_0xf21873;if(_0x5bb3bb===undefined||_0x5bb3bb===null)return;if(!Array[_0x49cb0d(0x1f1)](_0x5bb3bb)){_0x321613[_0x49cb0d(0x2c1)]({'path':_0x532b7d,'message':_0x49cb0d(0x1fc)});return;}let _0x3e38d8=![];_0x5bb3bb[_0x49cb0d(0x32a)]((_0x11b2b0,_0xb296ef)=>{const _0x2b1267=_0x49cb0d,_0x21af51=_0x532b7d+'['+_0xb296ef+']';if(!isRecord(_0x11b2b0)){_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x18d4a4=requireNotificationString(_0x11b2b0[_0x2b1267(0x1f0)],_0x21af51+_0x2b1267(0x2ca),_0x2b1267(0x225),_0x321613);_0x18d4a4&&!NOTIFICATION_RECIPIENT_TYPES[_0x2b1267(0x2fb)](_0x18d4a4[_0x2b1267(0x25a)]())&&_0x321613['push']({'path':_0x21af51+_0x2b1267(0x2ca),'message':_0x2b1267(0x2ae)});let _0x164028='TO';_0x11b2b0['role']!==undefined&&_0x11b2b0[_0x2b1267(0x1d6)]!==null&&(typeof _0x11b2b0['role']!==_0x2b1267(0x21e)?(_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51+_0x2b1267(0x312),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x164028=''):(_0x164028=_0x11b2b0[_0x2b1267(0x1d6)]['trim']()[_0x2b1267(0x25a)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x164028)&&_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51+_0x2b1267(0x312),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x164028==='TO')_0x3e38d8=!![];const _0x311eff=requireNotificationString(_0x11b2b0[_0x2b1267(0x29c)],_0x21af51+_0x2b1267(0x294),_0x2b1267(0x28a),_0x321613);_0x311eff&&validateNotificationPlaceholders(_0x311eff,_0x21af51+_0x2b1267(0x294),_0x321613);}),_0x5bb3bb['length']>0x0&&!_0x3e38d8&&_0x321613['push']({'path':_0x532b7d,'message':_0x49cb0d(0x284)});}function requireNotificationString(_0x447d8d,_0x3b64a4,_0x4a0810,_0x35f18b){const _0x4b31cf=a299_0xf21873;if(typeof _0x447d8d!=='string'||_0x447d8d['trim']()==='')return _0x35f18b[_0x4b31cf(0x2c1)]({'path':_0x3b64a4,'message':_0x4a0810}),undefined;return _0x447d8d[_0x4b31cf(0x325)]();}function validateNotificationPlaceholders(_0x240192,_0x1a62c8,_0x100d70){const _0xcb36b1=a299_0xf21873;for(const _0x5bf163 of _0x240192[_0xcb36b1(0x243)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x31c4c8=_0x5bf163[0x1]?.[_0xcb36b1(0x325)]()??'',_0x42a928=_0x31c4c8['indexOf']('.'),_0x5b97d5=_0x42a928>=0x0?_0x31c4c8[_0xcb36b1(0x263)](0x0,_0x42a928):_0x31c4c8,_0x49df97=_0x42a928>=0x0?_0x31c4c8[_0xcb36b1(0x263)](_0x42a928+0x1)[_0xcb36b1(0x325)]():'';(![_0xcb36b1(0x2d9),'context','variables'][_0xcb36b1(0x334)](_0x5b97d5)||_0x49df97==='')&&_0x100d70[_0xcb36b1(0x2c1)]({'path':_0x1a62c8,'message':_0xcb36b1(0x316)+_0x5bf163[0x0]+'.'});}_0x240192['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0xcb36b1(0x334)]('${')&&_0x100d70[_0xcb36b1(0x2c1)]({'path':_0x1a62c8,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function a299_0xb9a6(){const _0x3f6bbf=['transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Unsupported\x20task\x20mode:\x20','83MsJpox','flowJson.nodes.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','INDEPENDENT_FLOW','conditionType','HOURS','slice','^[1-9][0-9]*$','bindDatasetCode','warnings','source','title','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','readSources','action','flowJson.nodes','flowDesc\x20must\x20be\x20a\x20string.','name','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.taskMode','configCode','APPROVAL\x20node\x20requires\x20assignee.','datasetCode','boolean','findIndex','timeout.enabled\x20must\x20be\x20a\x20boolean.','utf8','taskMode','path','.config','Notification\x20fact\x20must\x20be\x20an\x20object.','approval_sys_initiatorUsername','.async.retryInterval','approved','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','edge\x20target\x20is\x20required.','flowName','AUTO_APPROVE','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','number','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.detailMarkdown','].taskMode','Notification\x20recipient.value\x20is\x20required.','PLATFORM_FORM','Unsupported\x20approval\x20mode:\x20','.recipients','flowJson\x20must\x20be\x20an\x20object.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','userIds','.template','4rgaaJk','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','.value','.cc','.cc.readSources','recipientUserIds','text','sequential\x20must\x20be\x20a\x20boolean.','visible','pid','value','Unsupported\x20pageMode:\x20','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','.defaultFlow','.tmp','ALL','formDefinitions','filter','flowDesc','Unsupported\x20flowType:\x20','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','resultVariable','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.async.enabled','timeout','empty_metadata_removed','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','.cc.recipientUserIds','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.target','.configCode','failurePolicy','Node\x20cannot\x20reach\x20any\x20END.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','target','.url','node\x20must\x20be\x20an\x20object.','approval_sys_datasetCode','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Duplicate\x20cc\x20recipient\x20userId:\x20','legacy_field_removed','EXECUTE_BFF','waypoint.','Edge\x20target\x20node\x20not\x20found:\x20','.timeout.duration','duration','schemaVersion','push','Rabetbase\x20FlowConfig',',\x20but\x20node\x20','.scriptName','startPageId','NOTIFICATION','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','Notification\x20configCode\x20is\x20required.','sourceNodeId','.type','approval_sys_processInstanceId','cc\x20must\x20be\x20an\x20object.','.pageId','.transferCandidates.userIds','scriptResult','SINGLE','HANDLE','AUTO_REJECT','NOTIFICATION\x20node\x20requires\x20template.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.async.retryCount','.transferCandidates.strategy','.position.','ANY','event','\x20must\x20be\x20a\x20finite\x20number.','.expression','APPROVAL','Notification\x20template.actions\x20must\x20be\x20an\x20array.','roleId','size','FORM_FLOW','Duplicate\x20node\x20id:\x20','.timeout.enabled','pageId','.waypoints[','Node\x20has\x20no\x20outgoing\x20edge.','.assignee','approval.simple-flow.v1','some','defaultFlow\x20must\x20be\x20a\x20boolean.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','test','position','^[A-Za-z_][A-Za-z0-9_]*$','FIXED\x20assignee\x20requires\x20userIds.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Node\x20is\x20not\x20reachable\x20from\x20START.','version','.text','approval_sys_','flowJson.startPageId','get','label','DAYS','join','.id','has','CONTINUE','hasOwnProperty','message','.facts','flowJson.nodes[','summary','flowCode','\x20is\x20required.','scriptName','.failurePolicy','EXPRESSION','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','EMAIL','flowJson','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','#/$defs/flowNode','.timeout.resultVariable','Notification\x20action\x20must\x20be\x20an\x20object.','ALWAYS','38104PfOrHc','flowType\x20is\x20required.','.role','waypoints','.timeout','flowType','Unsupported\x20notification\x20placeholder:\x20','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','END','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','edges\x20must\x20be\x20an\x20array.','#/$defs/flowEdge','https://json-schema.org/draft/2020-12/schema','prototype','USER','timeout\x20must\x20be\x20an\x20object.','entries','Notification\x20fact.','Duplicate\x20BPMN\x20element\x20id:\x20','isInteger','.async','trim','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','strategy','3172182RDqpIA','flowName\x20is\x20required.','forEach','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','enabled','SCRIPT','template','add','metadata','Notification\x20version\x20must\x20be\x20a\x20string.','Reserved\x20resultVariable:\x20','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','includes','nodes','.\x20This\x20CLI\x20supports\x20only\x20','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','SECONDS','targetNodeId','CUSTOM_PAGE','4239420dDBVuW','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','failurePolicy\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','sequential','isSafeInteger','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','role','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','detailMarkdown','url','facts','.assignee.userIds','flowJson.','\x20->\x20','expression','Duplicate\x20value:\x20','.version','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','flowJson.pageMode','Notification\x20action.text\x20is\x20required.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','transferCandidates\x20must\x20be\x20an\x20object.','REJECTED','pageMode','edges','mode','.transferCandidates.userIds[','interrupting','\x20users.','edge\x20name\x20must\x20be\x20a\x20string.','unit','#/$defs/userId','type','isArray','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.timeout.scriptName','catch','Unsupported\x20notification\x20version:\x20','parse','Node\x20has\x20no\x20incoming\x20edge.','CONDITION','.sequential','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','].path','Notification\x20recipients\x20must\x20be\x20an\x20array.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.assignee.roleId','https://lovrabet.com/schema/rabetbase-flow-config.json','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','formPermission','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','7165085HWmyyY','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','MINUTES','form','#/$defs/timeAmount','isFinite','retryInterval','call','35270iuMhTA','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','integer','assignee','MAX_SAFE_INTEGER','FIXED','position.','async','flowJson.startPath','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','9041706sjrVaH','formSchema','appCode','stringify','.source','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','templateName','string','formData','approval_sys_operationType','.timeout.interrupting','async.enabled\x20must\x20be\x20a\x20boolean.','startPath','.path','Notification\x20recipient.type\x20is\x20required.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','set','.position','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','pageIds','array','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','START','Notification\x20template\x20supports\x20at\x20most\x20','config','#/$defs/position','Expression\x20references\x20SCRIPT\x20resultVariable\x20','flowJson.edges[','flowJson.edges','actions','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.conditionType','.approvalMode','cc.recipientUserIds\x20supports\x20at\x20most\x20','.resultVariable','object','2219hUaAvj','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','nodes\x20must\x20be\x20an\x20array.','flowKey','BCC','startsWith','.cc.visible','.actions','matchAll','defaultFlow','Unsupported\x20condition\x20type:\x20','Unsupported\x20node\x20type:\x20','.timeout.action','APPROVED','approvalMode','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','datasetCode\x20must\x20be\x20a\x20string.','Edge\x20source\x20node\x20not\x20found:\x20','.transferCandidates','.assignee.userIds[','length','transferCandidates','overwrite','ROLE','map','\x20actions.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','4418682RjCXjA','keys','edge\x20must\x20be\x20an\x20object.','toUpperCase'];a299_0xb9a6=function(){return _0x3f6bbf;};return a299_0xb9a6();}function validateEdge(_0x100049,_0x1cbb54,_0x25a455){const _0x1871b6=a299_0xf21873;_0x100049['name']!==undefined&&typeof _0x100049[_0x1871b6(0x26e)]!==_0x1871b6(0x21e)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+'.name','message':_0x1871b6(0x1ed)}),_0x100049['defaultFlow']!==undefined&&typeof _0x100049[_0x1871b6(0x244)]!==_0x1871b6(0x275)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x29f),'message':_0x1871b6(0x2e9)}),_0x100049['waypoints']!==undefined&&(!Array[_0x1871b6(0x1f1)](_0x100049[_0x1871b6(0x313)])?_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+'.waypoints','message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x100049[_0x1871b6(0x313)][_0x1871b6(0x32a)]((_0x429e38,_0x2b88d8)=>{const _0x477cca=_0x1871b6;if(!isRecord(_0x429e38)){_0x25a455[_0x477cca(0x2c1)]({'path':_0x1cbb54+_0x477cca(0x2e4)+_0x2b88d8+']','message':_0x477cca(0x30b)});return;}for(const _0x21f0a7 of['x','y']){const _0x186a70=_0x429e38[_0x21f0a7];(typeof _0x186a70!==_0x477cca(0x285)||!Number[_0x477cca(0x209)](_0x186a70))&&_0x25a455[_0x477cca(0x2c1)]({'path':_0x1cbb54+_0x477cca(0x2e4)+_0x2b88d8+'].'+_0x21f0a7,'message':_0x477cca(0x2bc)+_0x21f0a7+_0x477cca(0x2da)});}})),_0x100049[_0x1871b6(0x261)]!==undefined&&!CONDITION_TYPES['has'](_0x100049[_0x1871b6(0x261)])&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x236),'message':_0x1871b6(0x245)+String(_0x100049[_0x1871b6(0x261)])+'.'}),_0x100049[_0x1871b6(0x261)]===_0x1871b6(0x306)&&(typeof _0x100049[_0x1871b6(0x1de)]!==_0x1871b6(0x21e)||_0x100049[_0x1871b6(0x1de)][_0x1871b6(0x325)]()==='')&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x2db),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x100049[_0x1871b6(0x244)]===!![]&&_0x100049[_0x1871b6(0x261)]!==_0x1871b6(0x30f)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x29f),'message':_0x1871b6(0x201)}),_0x100049['defaultFlow']===!![]&&typeof _0x100049[_0x1871b6(0x1de)]===_0x1871b6(0x21e)&&_0x100049['expression'][_0x1871b6(0x325)]()!==''&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x2db),'message':_0x1871b6(0x326)});}function validateGraphShape(_0x4bd347,_0x242868,_0x263c6a,_0x1651b8,_0x5257c7,_0x14691b,_0x4c4fd2){const _0x480d78=a299_0xf21873;for(const [_0x47ea71,_0x4ce6b8]of _0x4bd347){const _0x5e6a7a=_0x5257c7['get'](_0x47ea71)??[],_0x175c7d=_0x1651b8[_0x480d78(0x2f6)](_0x47ea71)??[];_0x4ce6b8[_0x480d78(0x1f0)]!=='START'&&_0x5e6a7a['length']===0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1f7)});_0x4ce6b8[_0x480d78(0x1f0)]!=='END'&&_0x175c7d['length']===0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x2e5)});_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x22d)&&_0x5e6a7a[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1d5)});_0x4ce6b8[_0x480d78(0x1f0)]==='END'&&_0x175c7d[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1d0)});if(_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x1f8)){_0x175c7d['length']<0x2&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':'flowJson.nodes.'+_0x47ea71,'message':_0x480d78(0x2a8)});const _0x5a5ee0=_0x175c7d[_0x480d78(0x2a3)](_0x1786d6=>_0x1786d6['defaultFlow']===!![]);_0x5a5ee0['length']!==0x1&&_0x4c4fd2['push']({'path':_0x480d78(0x25e)+_0x47ea71,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0x5a5ee0['length']===0x1){const _0x5092dc=_0x5a5ee0[0x0],_0x5ead8e=_0x14691b[_0x480d78(0x2f6)](_0x5092dc)??_0x480d78(0x233);_0x5092dc[_0x480d78(0x261)]!==_0x480d78(0x30f)&&_0x4c4fd2['push']({'path':_0x5ead8e+'.conditionType','message':_0x480d78(0x20d)});_0x5092dc['expression']!==undefined&&_0x4c4fd2['push']({'path':_0x5ead8e+'.expression','message':_0x480d78(0x280)});for(const _0x5abdef of _0x175c7d){if(_0x5abdef===_0x5092dc)continue;const _0x5a4eaf=_0x14691b[_0x480d78(0x2f6)](_0x5abdef)??_0x480d78(0x233);if(_0x5abdef['conditionType']!==_0x480d78(0x306))_0x4c4fd2['push']({'path':_0x5a4eaf+_0x480d78(0x236),'message':_0x480d78(0x2ef)});else(typeof _0x5abdef[_0x480d78(0x1de)]!==_0x480d78(0x21e)||_0x5abdef[_0x480d78(0x1de)][_0x480d78(0x325)]()==='')&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x5a4eaf+_0x480d78(0x2db),'message':_0x480d78(0x270)});}}}if(_0x4ce6b8[_0x480d78(0x1f0)]==='APPROVAL'&&(_0x4ce6b8[_0x480d78(0x279)]??_0x480d78(0x2dc))===_0x480d78(0x2d1)){if(_0x175c7d[_0x480d78(0x24f)]!==0x1)_0x4c4fd2[_0x480d78(0x2c1)]({'path':'flowJson.nodes.'+_0x47ea71,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x915cec=_0x175c7d[0x0];((_0x915cec['conditionType']??_0x480d78(0x30f))!==_0x480d78(0x30f)||_0x915cec[_0x480d78(0x244)]===!![]||typeof _0x915cec[_0x480d78(0x1de)]===_0x480d78(0x21e)&&_0x915cec[_0x480d78(0x1de)][_0x480d78(0x325)]()!=='')&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x14691b['get'](_0x915cec)??_0x480d78(0x233),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x2dc)){const _0x2653ff=_0x175c7d[_0x480d78(0x253)](_0x3d5890=>_0x3d5890[_0x480d78(0x261)]??_0x480d78(0x30f)),_0x4217d3=_0x2653ff['filter'](_0x4dfe05=>_0x4dfe05!==_0x480d78(0x248)&&_0x4dfe05!==_0x480d78(0x1e6));_0x4217d3[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x205)}),_0x2653ff[_0x480d78(0x2a3)](_0x12f6a8=>_0x12f6a8==='APPROVED')['length']!==0x1&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x2ac)}),_0x2653ff[_0x480d78(0x2a3)](_0x3d232d=>_0x3d232d==='REJECTED')[_0x480d78(0x24f)]!==0x1&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x21c)}),_0x175c7d[_0x480d78(0x2e8)](_0x393a95=>_0x393a95[_0x480d78(0x244)]===!![])&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x1b380f=new Set(),_0x51414f=_0x5dd72a=>{const _0x1a039a=_0x480d78;if(_0x1b380f['has'](_0x5dd72a))return;_0x1b380f[_0x1a039a(0x32f)](_0x5dd72a);for(const _0x4426ec of _0x1651b8[_0x1a039a(0x2f6)](_0x5dd72a)??[]){const _0x5c221c=resolveEdgeEndpoint(_0x4426ec['target'],_0x4426ec['targetNodeId']);if(_0x5c221c&&_0x4bd347[_0x1a039a(0x2fb)](_0x5c221c))_0x51414f(_0x5c221c);}};_0x51414f(_0x242868);for(const _0x597f47 of _0x4bd347[_0x480d78(0x258)]()){!_0x1b380f[_0x480d78(0x2fb)](_0x597f47)&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x597f47,'message':_0x480d78(0x2f1)});}const _0x3c25cf=_0x263c6a['some'](_0x40fd43=>_0x1b380f[_0x480d78(0x2fb)](_0x40fd43));if(!_0x3c25cf){_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x233),'message':_0x480d78(0x1fa)});return;}const _0x3341d3=new Set(),_0x32c717=_0x116112=>{const _0x5b73a7=_0x480d78;if(_0x3341d3[_0x5b73a7(0x2fb)](_0x116112))return;_0x3341d3[_0x5b73a7(0x32f)](_0x116112);for(const _0x5470cf of _0x5257c7['get'](_0x116112)??[]){const _0x45de94=resolveEdgeEndpoint(_0x5470cf[_0x5b73a7(0x267)],_0x5470cf[_0x5b73a7(0x2c9)]);if(_0x45de94&&_0x4bd347[_0x5b73a7(0x2fb)](_0x45de94))_0x32c717(_0x45de94);}};for(const _0x145af2 of _0x263c6a){if(_0x4bd347[_0x480d78(0x2fb)](_0x145af2))_0x32c717(_0x145af2);}for(const _0x1b82b1 of _0x1b380f){!_0x3341d3['has'](_0x1b82b1)&&_0x4c4fd2['push']({'path':_0x480d78(0x25e)+_0x1b82b1,'message':_0x480d78(0x2b2)});}}function a299_0x1204(_0x12d06b,_0x5d4ace){_0x12d06b=_0x12d06b-0x1c9;const _0xb9a6f8=a299_0xb9a6();let _0x120489=_0xb9a6f8[_0x12d06b];return _0x120489;}function validateApprovalResults(_0x2db0c8,_0x183e70,_0x26fc51,_0xdb24d3){const _0x45bb6a=a299_0xf21873;if(_0x183e70===0x0)return;const _0x4c7d3b=new Set(_0x26fc51[_0x45bb6a(0x253)](_0x353cfa=>_0x2db0c8[_0x45bb6a(0x2f6)](_0x353cfa)?.['result'])[_0x45bb6a(0x2a3)](_0x1ff2bf=>typeof _0x1ff2bf===_0x45bb6a(0x21e)));for(const _0x5dcdc1 of[_0x45bb6a(0x248),'REJECTED']){!_0x4c7d3b[_0x45bb6a(0x2fb)](_0x5dcdc1)&&_0xdb24d3[_0x45bb6a(0x2c1)]({'path':_0x45bb6a(0x26c),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x5dcdc1+'.'});}}function validateScriptResultReferences(_0x310df1,_0x4a951b,_0x422c3b,_0x401cfe,_0x1008a6,_0x47fe7b,_0x2d4de4){const _0x401952=a299_0xf21873;if(_0x47fe7b[_0x401952(0x2df)]===0x0)return;const _0x40fe05=new Set(),_0x595c76=_0x573c59=>{const _0x5bdd12=_0x401952;if(!_0x40fe05['has'](_0x573c59)&&_0x310df1[_0x5bdd12(0x2fb)](_0x573c59)){_0x40fe05[_0x5bdd12(0x32f)](_0x573c59);for(const _0x585af2 of _0x422c3b['get'](_0x573c59)??[]){const _0x3ae032=resolveEdgeEndpoint(_0x585af2[_0x5bdd12(0x2b4)],_0x585af2['targetNodeId']);if(_0x3ae032)_0x595c76(_0x3ae032);}}};_0x595c76(_0x4a951b);const _0x4c1f11=new Map();for(const _0x5a6e8c of _0x40fe05){_0x4c1f11['set'](_0x5a6e8c,_0x5a6e8c===_0x4a951b?new Set([_0x4a951b]):new Set(_0x40fe05));}let _0x444665=!![];while(_0x444665){_0x444665=![];for(const _0x5eb75a of _0x40fe05){if(_0x5eb75a===_0x4a951b)continue;const _0x2dfe9e=(_0x401cfe[_0x401952(0x2f6)](_0x5eb75a)??[])[_0x401952(0x253)](_0x2384a1=>resolveEdgeEndpoint(_0x2384a1[_0x401952(0x267)],_0x2384a1[_0x401952(0x2c9)]))[_0x401952(0x2a3)](_0x99f7fd=>Boolean(_0x99f7fd&&_0x40fe05[_0x401952(0x2fb)](_0x99f7fd)));if(_0x2dfe9e[_0x401952(0x24f)]===0x0)continue;const _0x4dde8f=new Set(_0x4c1f11[_0x401952(0x2f6)](_0x2dfe9e[0x0])??[]);for(const _0x4f58e4 of _0x2dfe9e[_0x401952(0x263)](0x1)){const _0x12b9a6=_0x4c1f11[_0x401952(0x2f6)](_0x4f58e4)??new Set();for(const _0x3ba69a of _0x4dde8f){if(!_0x12b9a6[_0x401952(0x2fb)](_0x3ba69a))_0x4dde8f['delete'](_0x3ba69a);}}_0x4dde8f[_0x401952(0x32f)](_0x5eb75a);const _0x438e88=_0x4c1f11['get'](_0x5eb75a);!setsEqual(_0x438e88,_0x4dde8f)&&(_0x4c1f11[_0x401952(0x227)](_0x5eb75a,_0x4dde8f),_0x444665=!![]);}}for(const [_0x508a94,_0x181b6a]of _0x422c3b){const _0x9d078c=_0x4c1f11['get'](_0x508a94);if(!_0x9d078c)continue;for(const _0x3fd773 of _0x181b6a){if(_0x3fd773[_0x401952(0x261)]!=='EXPRESSION'||typeof _0x3fd773[_0x401952(0x1de)]!==_0x401952(0x21e))continue;for(const [_0x31098b,_0x2bd404]of _0x47fe7b){expressionReferencesVariable(_0x3fd773[_0x401952(0x1de)],_0x31098b)&&!_0x9d078c[_0x401952(0x2fb)](_0x2bd404)&&_0x2d4de4['push']({'path':(_0x1008a6['get'](_0x3fd773)??_0x401952(0x233))+_0x401952(0x2db),'message':_0x401952(0x231)+_0x31098b+_0x401952(0x2c3)+_0x2bd404+_0x401952(0x256)+_0x508a94+'.'});}}}}function expressionReferencesVariable(_0x19d389,_0x51223d){const _0x3c6463=a299_0xf21873;let _0x27da3e=0x0;while(_0x27da3e<_0x19d389[_0x3c6463(0x24f)]){const _0x1361b3=_0x19d389[_0x27da3e];if(_0x1361b3==='\x27'||_0x1361b3==='\x22'){_0x27da3e=skipQuotedExpressionSegment(_0x19d389,_0x27da3e,_0x1361b3);continue;}if(!/[A-Za-z_]/[_0x3c6463(0x2eb)](_0x1361b3)){_0x27da3e+=0x1;continue;}const _0x2b6a43=_0x27da3e;_0x27da3e+=0x1;while(_0x27da3e<_0x19d389[_0x3c6463(0x24f)]&&/[A-Za-z0-9_]/[_0x3c6463(0x2eb)](_0x19d389[_0x27da3e])){_0x27da3e+=0x1;}if(_0x19d389[_0x3c6463(0x263)](_0x2b6a43,_0x27da3e)!==_0x51223d)continue;let _0x3cf75f=_0x2b6a43-0x1;while(_0x3cf75f>=0x0&&/\s/[_0x3c6463(0x2eb)](_0x19d389[_0x3cf75f])){_0x3cf75f-=0x1;}if(_0x19d389[_0x3cf75f]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x2f2ee4,_0x208c34,_0x842d){const _0x18ef93=a299_0xf21873;let _0x28f212=_0x208c34+0x1;while(_0x28f212<_0x2f2ee4[_0x18ef93(0x24f)]){if(_0x2f2ee4[_0x28f212]==='\x5c'){_0x28f212+=0x2;continue;}if(_0x2f2ee4[_0x28f212]===_0x842d)return _0x28f212+0x1;_0x28f212+=0x1;}return _0x28f212;}function resolveEffectiveResultVariable(_0x8c2684,_0x4073cf){const _0x5e5684=a299_0xf21873;if(_0x8c2684===undefined||_0x8c2684===null||_0x4073cf&&_0x8c2684==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x8c2684!==_0x5e5684(0x21e)||!VARIABLE_PATTERN['test'](_0x8c2684)||RESERVED_RESULT_VARIABLES[_0x5e5684(0x2fb)](_0x8c2684)||_0x8c2684[_0x5e5684(0x240)](_0x5e5684(0x2f4)))return undefined;return _0x8c2684;}function registerResultVariableOwner(_0x9569dc,_0xf23ba2,_0x133dd2,_0x3c8ddf){const _0x58ecee=a299_0xf21873;if(_0x9569dc[_0x58ecee(0x2fb)](_0xf23ba2)){_0x3c8ddf['push']({'path':_0x58ecee(0x26c),'message':'Duplicate\x20resultVariable:\x20'+_0xf23ba2+'.'});return;}_0x9569dc[_0x58ecee(0x227)](_0xf23ba2,_0x133dd2);}function setsEqual(_0x396d42,_0xf6f1cb){const _0xb218b0=a299_0xf21873;return _0x396d42['size']===_0xf6f1cb[_0xb218b0(0x2df)]&&[..._0x396d42]['every'](_0x4f19d2=>_0xf6f1cb[_0xb218b0(0x2fb)](_0x4f19d2));}function isValidUserId(_0x507a5b){const _0x24c015=a299_0xf21873;if(typeof _0x507a5b===_0x24c015(0x21e))return _0x507a5b[_0x24c015(0x325)]()[_0x24c015(0x24f)]>0x0;return Number[_0x24c015(0x1d4)](_0x507a5b)&&Number(_0x507a5b)>0x0;}function resolveEdgeEndpoint(_0x3e3945,_0x512d23){const _0x56fac3=a299_0xf21873;if(typeof _0x3e3945===_0x56fac3(0x21e)&&_0x3e3945[_0x56fac3(0x325)]())return _0x3e3945[_0x56fac3(0x325)]();if(typeof _0x512d23===_0x56fac3(0x21e)&&_0x512d23['trim']())return _0x512d23[_0x56fac3(0x325)]();return undefined;}function removeEmptyMetadata(_0x41d580,_0x278e51,_0x4f30bc,_0x9ef19a){const _0x264290=a299_0xf21873;if(Array['isArray'](_0x41d580)){_0x41d580[_0x264290(0x32a)]((_0x3f8a21,_0x1d507b)=>removeEmptyMetadata(_0x3f8a21,_0x278e51+'['+_0x1d507b+']',_0x4f30bc,_0x9ef19a));return;}if(!isRecord(_0x41d580))return;for(const [_0x3a75d3,_0x5e0111]of Object[_0x264290(0x320)](_0x41d580)){const _0x7ddb80=_0x278e51+'.'+_0x3a75d3;if(_0x3a75d3===_0x264290(0x330)&&isEmptyJsonValue(_0x5e0111)){delete _0x41d580[_0x3a75d3],_0x9ef19a[_0x264290(0x2c1)](_0x7ddb80),_0x4f30bc[_0x264290(0x2c1)]({'code':_0x264290(0x2ab),'path':_0x7ddb80,'message':_0x7ddb80+'\x20was\x20empty\x20and\x20was\x20removed.'});continue;}removeEmptyMetadata(_0x5e0111,_0x7ddb80,_0x4f30bc,_0x9ef19a);}}function isEmptyJsonValue(_0x114058){const _0x3c5c94=a299_0xf21873;if(_0x114058===null||_0x114058===undefined)return!![];if(typeof _0x114058===_0x3c5c94(0x21e))return _0x114058['trim']()==='';if(Array[_0x3c5c94(0x1f1)](_0x114058))return _0x114058['length']===0x0;return isRecord(_0x114058)&&Object[_0x3c5c94(0x258)](_0x114058)['length']===0x0;}function isRecord(_0x236363){const _0x2e1e6b=a299_0xf21873;return typeof _0x236363===_0x2e1e6b(0x23a)&&_0x236363!==null&&!Array[_0x2e1e6b(0x1f1)](_0x236363);}function cloneJsonValue(_0x262115){const _0x1e2ad5=a299_0xf21873;return JSON[_0x1e2ad5(0x1f6)](JSON['stringify'](_0x262115));}export async function readFlowConfigFile(_0x4932a0){const _0x26facc=a299_0xf21873,_0x5ae55d=await readFile(resolve(_0x4932a0),'utf8');return JSON[_0x26facc(0x1f6)](_0x5ae55d);}
@@ -1 +1 @@
1
- const a300_0x1a2d71=a300_0x1d56;(function(_0x2f1af2,_0x260797){const _0x42176e=a300_0x1d56,_0x3ef821=_0x2f1af2();while(!![]){try{const _0x38e66c=-parseInt(_0x42176e(0x7d))/0x1*(parseInt(_0x42176e(0x9a))/0x2)+-parseInt(_0x42176e(0x93))/0x3*(parseInt(_0x42176e(0x92))/0x4)+-parseInt(_0x42176e(0x8e))/0x5+parseInt(_0x42176e(0x91))/0x6+-parseInt(_0x42176e(0x82))/0x7+-parseInt(_0x42176e(0x9d))/0x8*(-parseInt(_0x42176e(0x84))/0x9)+parseInt(_0x42176e(0x81))/0xa;if(_0x38e66c===_0x260797)break;else _0x3ef821['push'](_0x3ef821['shift']());}catch(_0x3cc2fd){_0x3ef821['push'](_0x3ef821['shift']());}}}(a300_0x375e,0x4acf6));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_0x1a2d71(0x87);export const INSTANT_API_POLICY_FILE_NAME=a300_0x1a2d71(0xad);function a300_0x375e(){const _0x279963=['includes','instant_api_policy_file_unwritable','808JIzoSZ','allow','Policy\x20defaults.instantApi\x20is\x20required.','size','Review\x20the\x20file\x20before\x20retrying.','code','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','unchanged','length','instant_api_policy_rules_invalid','force','instant_api_policy_file_unreadable','instantApi','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','version','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','policy.json','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_app_code_invalid','instant_api_policy_file_too_large','object','EEXIST','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','isArray','25bGPLZE','instant_api_policy_file_missing','parse','decode','8279970RpZuvA','1966615YoQxjI','stringify','39987syuIBS','policyFilePath','byteLength','.rabetbase/instant-api-policy','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','rules','utf8','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','instant_api_policy_app_code_mismatch','instant_api_policy_file_invalid','667910nHbzLg','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','created','2241666UCMDLF','1908508kkHKNX','3oqqoNK','defaults','appCode','instant_api_policy_json_invalid','ENOENT','trim','instant_api_policy_file_exists','36182FDCTRX'];a300_0x375e=function(){return _0x279963;};return a300_0x375e();}export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;function a300_0x1d56(_0x5d6b35,_0x4b63c4){_0x5d6b35=_0x5d6b35-0x75;const _0x375ef0=a300_0x375e();let _0x1d5665=_0x375ef0[_0x5d6b35];return _0x1d5665;}export function instantApiPolicyError(_0x5efca7,_0x3108f0,_0xed6b32){return new CliError(_0x5efca7,0x1,_0x3108f0,_0xed6b32);}export function loadInstantApiPolicyLocalConfig(_0xa97e9b,_0x3b965f){assertSafeAppCode(_0xa97e9b);const _0x5ab8f3=resolve(_0x3b965f??findProjectRootDirectory()),_0x3af175=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xa97e9b+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3ddb6e=resolve(_0x5ab8f3,INSTANT_API_POLICY_RELATIVE_ROOT,_0xa97e9b),_0x5ab3e9=resolve(_0x3ddb6e,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x5ab8f3,'appCode':_0xa97e9b,'policyRoot':_0x3ddb6e,'policyFilePath':_0x5ab3e9,'policyRelativePath':_0x3af175};}export function createDefaultInstantApiPolicyConfig(_0x47044a,_0x46040e=a300_0x1a2d71(0x9e)){return assertSafeAppCode(_0x47044a),{'version':'2','appCode':_0x47044a,'defaults':{'instantApi':_0x46040e},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x1865f1){const _0x324f36=a300_0x1a2d71;let _0xd04025;try{_0xd04025=await stat(_0x1865f1[_0x324f36(0x85)]);}catch(_0x278556){throw instantApiPolicyError(_0x324f36(0x7e),_0x324f36(0x7a)+_0x1865f1[_0x324f36(0x85)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0xd04025['isFile']())throw instantApiPolicyError(_0x324f36(0x8d),_0x324f36(0x8f)+_0x1865f1[_0x324f36(0x85)]);if(_0xd04025[_0x324f36(0xa0)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324f36(0x77),_0x324f36(0xa3));let _0x5da4cc;try{_0x5da4cc=await readFile(_0x1865f1[_0x324f36(0x85)]);}catch{throw instantApiPolicyError(_0x324f36(0xa8),_0x324f36(0x88)+_0x1865f1[_0x324f36(0x85)]);}if(_0x5da4cc[_0x324f36(0x86)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x324f36(0xa3));let _0x77c0dd;try{_0x77c0dd=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x324f36(0x80)](_0x5da4cc);}catch{throw instantApiPolicyError(_0x324f36(0x8d),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x1865f1[_0x324f36(0x85)]);}let _0x1c44e2;try{_0x1c44e2=JSON[_0x324f36(0x7f)](_0x77c0dd);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x1865f1[_0x324f36(0x85)]);}return assertLocalPolicyContract(_0x1c44e2,_0x1865f1['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x3a3ab1,_0x5ea2b5,_0x529d9c={}){const _0x37517c=a300_0x1a2d71,_0x36594a=assertLocalPolicyContract(_0x5ea2b5,_0x3a3ab1[_0x37517c(0x95)]),_0x5dd19d=JSON[_0x37517c(0x83)](_0x36594a,null,0x2)+'\x0a';if(Buffer[_0x37517c(0x86)](_0x5dd19d,'utf8')>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x37517c(0x77),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x3a3ab1['policyRoot'],{'recursive':!![]});let _0x239d3e;try{_0x239d3e=await readFile(_0x3a3ab1['policyFilePath'],_0x37517c(0x8a));}catch(_0x2f93a0){if(!isMissingFile(_0x2f93a0))throw instantApiPolicyError(_0x37517c(0xa8),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x3a3ab1[_0x37517c(0x85)]);}if(_0x239d3e===_0x5dd19d)return{'action':_0x37517c(0xa4),'filePath':_0x3a3ab1['policyFilePath']};if(_0x239d3e!==undefined&&!_0x529d9c[_0x37517c(0xa7)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x37517c(0xac)+_0x3a3ab1[_0x37517c(0x85)],_0x37517c(0xaa));if(_0x239d3e===undefined)try{return await writeFile(_0x3a3ab1[_0x37517c(0x85)],_0x5dd19d,{'encoding':_0x37517c(0x8a),'flag':'wx'}),{'action':_0x37517c(0x90),'filePath':_0x3a3ab1[_0x37517c(0x85)]};}catch(_0x49126c){if(!isAlreadyExists(_0x49126c))throw instantApiPolicyError(_0x37517c(0x9c),_0x37517c(0x75)+_0x3a3ab1[_0x37517c(0x85)]);if(!_0x529d9c[_0x37517c(0xa7)])throw instantApiPolicyError(_0x37517c(0x99),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x3a3ab1[_0x37517c(0x85)],_0x37517c(0xa1));}const _0x25d2d9=resolve(dirname(_0x3a3ab1[_0x37517c(0x85)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x25d2d9,_0x5dd19d,{'encoding':'utf8','flag':'wx'}),await rename(_0x25d2d9,_0x3a3ab1[_0x37517c(0x85)]);}catch{await unlink(_0x25d2d9)['catch'](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x3a3ab1['policyFilePath']);}return{'action':'overwritten','filePath':_0x3a3ab1[_0x37517c(0x85)]};}function assertSafeAppCode(_0x4cecce){const _0x58e0=a300_0x1a2d71,_0x41f6f6=_0x4cecce[_0x58e0(0x98)]();if(!_0x41f6f6||_0x41f6f6!==_0x4cecce||_0x41f6f6[_0x58e0(0xa5)]>0x64||_0x41f6f6==='.'||_0x41f6f6==='..'||_0x41f6f6[_0x58e0(0x9b)]('/')||_0x41f6f6['includes']('\x5c')||_0x41f6f6['includes']('\x00'))throw instantApiPolicyError(_0x58e0(0x76),'appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x35d4ce,_0x420cb8){const _0x45b868=a300_0x1a2d71;if(!isObject(_0x35d4ce))throw instantApiPolicyError(_0x45b868(0x96),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x35d4ce[_0x45b868(0xab)]!=='1'&&_0x35d4ce[_0x45b868(0xab)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x45b868(0x7b),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x35d4ce[_0x45b868(0x95)]!==_0x420cb8)throw instantApiPolicyError(_0x45b868(0x8c),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x420cb8+'.');if(!isObject(_0x35d4ce[_0x45b868(0x94)])||typeof _0x35d4ce['defaults'][_0x45b868(0xa9)]!=='string')throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x45b868(0x9f));if(_0x35d4ce[_0x45b868(0x89)]!==undefined&&_0x35d4ce[_0x45b868(0x89)]!==null&&!Array[_0x45b868(0x7c)](_0x35d4ce['rules']))throw instantApiPolicyError(_0x45b868(0xa6),_0x45b868(0x8b));return _0x35d4ce;}function isObject(_0x4f0eb7){const _0x5548b5=a300_0x1a2d71;return _0x4f0eb7!==null&&typeof _0x4f0eb7===_0x5548b5(0x78)&&!Array[_0x5548b5(0x7c)](_0x4f0eb7);}function isMissingFile(_0x385059){const _0x3a94dd=a300_0x1a2d71;return Boolean(_0x385059&&typeof _0x385059===_0x3a94dd(0x78)&&_0x385059[_0x3a94dd(0xa2)]===_0x3a94dd(0x97));}function isAlreadyExists(_0x1bedd3){const _0x4f3873=a300_0x1a2d71;return Boolean(_0x1bedd3&&typeof _0x1bedd3===_0x4f3873(0x78)&&_0x1bedd3[_0x4f3873(0xa2)]===_0x4f3873(0x79));}
1
+ const a300_0x19b80b=a300_0x26e3;(function(_0x5326bd,_0x613b4a){const _0x2c4150=a300_0x26e3,_0x52aac7=_0x5326bd();while(!![]){try{const _0x460e8d=parseInt(_0x2c4150(0x16c))/0x1*(-parseInt(_0x2c4150(0x161))/0x2)+parseInt(_0x2c4150(0x14f))/0x3*(-parseInt(_0x2c4150(0x172))/0x4)+-parseInt(_0x2c4150(0x15f))/0x5+-parseInt(_0x2c4150(0x169))/0x6+parseInt(_0x2c4150(0x177))/0x7*(parseInt(_0x2c4150(0x150))/0x8)+-parseInt(_0x2c4150(0x16f))/0x9+parseInt(_0x2c4150(0x17b))/0xa;if(_0x460e8d===_0x613b4a)break;else _0x52aac7['push'](_0x52aac7['shift']());}catch(_0x314691){_0x52aac7['push'](_0x52aac7['shift']());}}}(a300_0x2da3,0xb1d69));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';function a300_0x26e3(_0xf2a102,_0x2a869a){_0xf2a102=_0xf2a102-0x142;const _0x2da35c=a300_0x2da3();let _0x26e35a=_0x2da35c[_0xf2a102];return _0x26e35a;}export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0x19b80b(0x160);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x110e2d,_0xfd4154,_0x56da67){return new CliError(_0x110e2d,0x1,_0xfd4154,_0x56da67);}export function loadInstantApiPolicyLocalConfig(_0x539df4,_0x58baf3){assertSafeAppCode(_0x539df4);const _0x48a4ea=resolve(_0x58baf3??findProjectRootDirectory()),_0x444f28=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x539df4+'/'+INSTANT_API_POLICY_FILE_NAME,_0x57bed6=resolve(_0x48a4ea,INSTANT_API_POLICY_RELATIVE_ROOT,_0x539df4),_0x583794=resolve(_0x57bed6,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x48a4ea,'appCode':_0x539df4,'policyRoot':_0x57bed6,'policyFilePath':_0x583794,'policyRelativePath':_0x444f28};}export function createDefaultInstantApiPolicyConfig(_0x96590f,_0x3f0659=a300_0x19b80b(0x16d)){return assertSafeAppCode(_0x96590f),{'version':'2','appCode':_0x96590f,'defaults':{'instantApi':_0x3f0659},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x142104){const _0x548f03=a300_0x19b80b;let _0x406009;try{_0x406009=await stat(_0x142104[_0x548f03(0x159)]);}catch(_0x196613){throw instantApiPolicyError(_0x548f03(0x181),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x142104[_0x548f03(0x159)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0x406009[_0x548f03(0x15a)]())throw instantApiPolicyError(_0x548f03(0x158),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x142104[_0x548f03(0x159)]);if(_0x406009[_0x548f03(0x147)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x548f03(0x14d),_0x548f03(0x171));let _0x4c2f62;try{_0x4c2f62=await readFile(_0x142104[_0x548f03(0x159)]);}catch{throw instantApiPolicyError(_0x548f03(0x179),_0x548f03(0x145)+_0x142104[_0x548f03(0x159)]);}if(_0x4c2f62[_0x548f03(0x14b)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x548f03(0x14d),_0x548f03(0x171));let _0x2fe742;try{_0x2fe742=new TextDecoder(_0x548f03(0x142),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x4c2f62);}catch{throw instantApiPolicyError(_0x548f03(0x158),_0x548f03(0x178)+_0x142104[_0x548f03(0x159)]);}let _0x49b7a3;try{_0x49b7a3=JSON[_0x548f03(0x180)](_0x2fe742);}catch{throw instantApiPolicyError(_0x548f03(0x144),_0x548f03(0x151)+_0x142104[_0x548f03(0x159)]);}return assertLocalPolicyContract(_0x49b7a3,_0x142104['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x4664e6,_0x36e26c,_0x382be2={}){const _0x3aa824=a300_0x19b80b,_0x3c14b4=assertLocalPolicyContract(_0x36e26c,_0x4664e6[_0x3aa824(0x152)]),_0x9463e6=JSON['stringify'](_0x3c14b4,null,0x2)+'\x0a';if(Buffer[_0x3aa824(0x14b)](_0x9463e6,_0x3aa824(0x163))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x3aa824(0x14d),_0x3aa824(0x171));await mkdir(_0x4664e6[_0x3aa824(0x162)],{'recursive':!![]});let _0x573f9c;try{_0x573f9c=await readFile(_0x4664e6['policyFilePath'],_0x3aa824(0x163));}catch(_0x3a9372){if(!isMissingFile(_0x3a9372))throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x3aa824(0x15e)+_0x4664e6[_0x3aa824(0x159)]);}if(_0x573f9c===_0x9463e6)return{'action':'unchanged','filePath':_0x4664e6[_0x3aa824(0x159)]};if(_0x573f9c!==undefined&&!_0x382be2[_0x3aa824(0x146)])throw instantApiPolicyError(_0x3aa824(0x170),'Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x4664e6['policyFilePath'],_0x3aa824(0x154));if(_0x573f9c===undefined)try{return await writeFile(_0x4664e6['policyFilePath'],_0x9463e6,{'encoding':_0x3aa824(0x163),'flag':'wx'}),{'action':_0x3aa824(0x17e),'filePath':_0x4664e6[_0x3aa824(0x159)]};}catch(_0x4e3012){if(!isAlreadyExists(_0x4e3012))throw instantApiPolicyError(_0x3aa824(0x14a),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x4664e6[_0x3aa824(0x159)]);if(!_0x382be2[_0x3aa824(0x146)])throw instantApiPolicyError(_0x3aa824(0x170),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x4664e6['policyFilePath'],_0x3aa824(0x17f));}const _0x44ea75=resolve(dirname(_0x4664e6[_0x3aa824(0x159)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x3aa824(0x16e));try{await writeFile(_0x44ea75,_0x9463e6,{'encoding':_0x3aa824(0x163),'flag':'wx'}),await rename(_0x44ea75,_0x4664e6['policyFilePath']);}catch{await unlink(_0x44ea75)['catch'](()=>undefined);throw instantApiPolicyError(_0x3aa824(0x14a),_0x3aa824(0x168)+_0x4664e6[_0x3aa824(0x159)]);}return{'action':_0x3aa824(0x17c),'filePath':_0x4664e6[_0x3aa824(0x159)]};}function assertSafeAppCode(_0x1b567a){const _0x43ede2=a300_0x19b80b,_0x31e741=_0x1b567a[_0x43ede2(0x167)]();if(!_0x31e741||_0x31e741!==_0x1b567a||_0x31e741[_0x43ede2(0x155)]>0x64||_0x31e741==='.'||_0x31e741==='..'||_0x31e741[_0x43ede2(0x156)]('/')||_0x31e741[_0x43ede2(0x156)]('\x5c')||_0x31e741[_0x43ede2(0x156)]('\x00'))throw instantApiPolicyError(_0x43ede2(0x17a),_0x43ede2(0x143));}function a300_0x2da3(){const _0x51e2bf=['Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','appCode','rules','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','length','includes','instant_api_policy_app_code_mismatch','instant_api_policy_file_invalid','policyFilePath','isFile','ENOENT','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','string','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','4424705vEcmEN','policy.json','2zwbluW','policyRoot','utf8','instantApi','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','trim','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','8053116DcYPdM','code','instant_api_policy_rules_invalid','712633MluzuW','allow','.tmp','7801605yqDpIV','instant_api_policy_file_exists','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','4OltOJc','EEXIST','isArray','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','1905736GOrkGx','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','instant_api_policy_file_unreadable','instant_api_policy_app_code_invalid','47770710nkayHI','overwritten','object','created','Review\x20the\x20file\x20before\x20retrying.','parse','instant_api_policy_file_missing','utf-8','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_json_invalid','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','force','size','defaults','instant_api_policy_version_invalid','instant_api_policy_file_unwritable','byteLength','version','instant_api_policy_file_too_large','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','1542867yRTMDL','8MlQqzD'];a300_0x2da3=function(){return _0x51e2bf;};return a300_0x2da3();}function assertLocalPolicyContract(_0x4ca25d,_0x5b70d6){const _0xd5c6e8=a300_0x19b80b;if(!isObject(_0x4ca25d))throw instantApiPolicyError('instant_api_policy_json_invalid',_0xd5c6e8(0x166));if(_0x4ca25d[_0xd5c6e8(0x14c)]!=='1'&&_0x4ca25d['version']!=='2')throw instantApiPolicyError(_0xd5c6e8(0x149),_0xd5c6e8(0x176),_0xd5c6e8(0x165));if(_0x4ca25d[_0xd5c6e8(0x152)]!==_0x5b70d6)throw instantApiPolicyError(_0xd5c6e8(0x157),_0xd5c6e8(0x14e)+_0x5b70d6+'.');if(!isObject(_0x4ca25d[_0xd5c6e8(0x148)])||typeof _0x4ca25d['defaults'][_0xd5c6e8(0x164)]!==_0xd5c6e8(0x15d))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0xd5c6e8(0x175));if(_0x4ca25d[_0xd5c6e8(0x153)]!==undefined&&_0x4ca25d[_0xd5c6e8(0x153)]!==null&&!Array[_0xd5c6e8(0x174)](_0x4ca25d[_0xd5c6e8(0x153)]))throw instantApiPolicyError(_0xd5c6e8(0x16b),_0xd5c6e8(0x15c));return _0x4ca25d;}function isObject(_0x479b42){const _0x2b2253=a300_0x19b80b;return _0x479b42!==null&&typeof _0x479b42===_0x2b2253(0x17d)&&!Array[_0x2b2253(0x174)](_0x479b42);}function isMissingFile(_0x50c898){const _0x1b3d50=a300_0x19b80b;return Boolean(_0x50c898&&typeof _0x50c898===_0x1b3d50(0x17d)&&_0x50c898[_0x1b3d50(0x16a)]===_0x1b3d50(0x15b));}function isAlreadyExists(_0x3435dd){const _0x419665=a300_0x19b80b;return Boolean(_0x3435dd&&typeof _0x3435dd==='object'&&_0x3435dd['code']===_0x419665(0x173));}
@@ -1 +1 @@
1
- function a301_0x258a(_0x5c519e,_0x4aaf84){_0x5c519e=_0x5c519e-0xdd;const _0xede9a1=a301_0xede9();let _0x258a88=_0xede9a1[_0x5c519e];return _0x258a88;}const a301_0x8101cf=a301_0x258a;(function(_0x219e03,_0x1ea113){const _0x50601d=a301_0x258a,_0x1c25b8=_0x219e03();while(!![]){try{const _0x449af7=parseInt(_0x50601d(0xe7))/0x1+parseInt(_0x50601d(0xe5))/0x2+parseInt(_0x50601d(0xe8))/0x3*(-parseInt(_0x50601d(0xeb))/0x4)+-parseInt(_0x50601d(0xe6))/0x5*(parseInt(_0x50601d(0xe1))/0x6)+-parseInt(_0x50601d(0xde))/0x7+parseInt(_0x50601d(0xe4))/0x8*(-parseInt(_0x50601d(0xe3))/0x9)+-parseInt(_0x50601d(0xe0))/0xa*(-parseInt(_0x50601d(0xe2))/0xb);if(_0x449af7===_0x1ea113)break;else _0x1c25b8['push'](_0x1c25b8['shift']());}catch(_0x6e1f3a){_0x1c25b8['push'](_0x1c25b8['shift']());}}}(a301_0xede9,0x35faf));function a301_0xede9(){const _0x37e542=['103176NOnJSi','96fyjFMX','86830NPYWMd','1186435fWLCiH','69439ZfPrLt','1201110QbMMhJ','/revision','/rollback','4PVwyRp','/smartapi/instant-api-policy','2259586XNmqwE','/revisions','20480sfqUVO','6CQOlhX','6479KUPibQ'];a301_0xede9=function(){return _0x37e542;};return a301_0xede9();}const base=a301_0x8101cf(0xdd);export const INSTANT_API_POLICY_PATHS=Object['freeze']({'current':base+'/current','validate':base+'/validate','publish':base+'/publish','revisions':base+a301_0x8101cf(0xdf),'revision':base+a301_0x8101cf(0xe9),'rollback':base+a301_0x8101cf(0xea)});
1
+ function a301_0x29b0(_0xb28db7,_0x577eb3){_0xb28db7=_0xb28db7-0x17b;const _0x24282f=a301_0x2428();let _0x29b048=_0x24282f[_0xb28db7];return _0x29b048;}const a301_0x281eaa=a301_0x29b0;(function(_0x4b2674,_0x230e09){const _0x182f38=a301_0x29b0,_0x38ff1a=_0x4b2674();while(!![]){try{const _0x520806=parseInt(_0x182f38(0x18c))/0x1*(parseInt(_0x182f38(0x17d))/0x2)+-parseInt(_0x182f38(0x187))/0x3+parseInt(_0x182f38(0x184))/0x4*(-parseInt(_0x182f38(0x183))/0x5)+parseInt(_0x182f38(0x186))/0x6*(-parseInt(_0x182f38(0x17f))/0x7)+parseInt(_0x182f38(0x18b))/0x8+-parseInt(_0x182f38(0x180))/0x9+-parseInt(_0x182f38(0x18a))/0xa*(-parseInt(_0x182f38(0x185))/0xb);if(_0x520806===_0x230e09)break;else _0x38ff1a['push'](_0x38ff1a['shift']());}catch(_0x4a837a){_0x38ff1a['push'](_0x38ff1a['shift']());}}}(a301_0x2428,0xe2789));const base='/smartapi/instant-api-policy';function a301_0x2428(){const _0x86b514=['4776400VnvJEh','261094AIURGa','/revision','/revisions','8LwdImu','/publish','33803GvEbTT','8794386vmQAAw','/rollback','/current','5xICREh','4644796NNdRxl','81697OLODEC','1164LOQDVw','4368300Ysuhgc','freeze','/validate','5140tVKOmg'];a301_0x2428=function(){return _0x86b514;};return a301_0x2428();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x281eaa(0x188)]({'current':base+a301_0x281eaa(0x182),'validate':base+a301_0x281eaa(0x189),'publish':base+a301_0x281eaa(0x17e),'revisions':base+a301_0x281eaa(0x17c),'revision':base+a301_0x281eaa(0x17b),'rollback':base+a301_0x281eaa(0x181)});
@@ -1 +1 @@
1
- const a302_0x3f2611=a302_0x5795;function a302_0x5795(_0x542eb4,_0x2983f4){_0x542eb4=_0x542eb4-0x1f3;const _0x36b0fb=a302_0x36b0();let _0x5795c3=_0x36b0fb[_0x542eb4];return _0x5795c3;}(function(_0x4aa7a3,_0x410d8c){const _0x419866=a302_0x5795,_0x368287=_0x4aa7a3();while(!![]){try{const _0x4f3d1d=parseInt(_0x419866(0x209))/0x1+parseInt(_0x419866(0x204))/0x2+-parseInt(_0x419866(0x214))/0x3*(parseInt(_0x419866(0x20c))/0x4)+parseInt(_0x419866(0x1f6))/0x5+-parseInt(_0x419866(0x20d))/0x6+-parseInt(_0x419866(0x1ff))/0x7*(-parseInt(_0x419866(0x205))/0x8)+parseInt(_0x419866(0x203))/0x9;if(_0x4f3d1d===_0x410d8c)break;else _0x368287['push'](_0x368287['shift']());}catch(_0x16df0c){_0x368287['push'](_0x368287['shift']());}}}(a302_0x36b0,0xed269));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';const WRITE_RECONCILIATION=a302_0x3f2611(0x1fb),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x3f2611(0x217)];[a302_0x3f2611(0x20e)];[a302_0x3f2611(0x1f4)];[a302_0x3f2611(0x212)];constructor(_0x1c83da,_0x4fe95a=![],_0x241c92,_0x327872,_0x262d0f=![]){const _0x5b74ec=a302_0x3f2611;super(_0x5b74ec(0x1fc),0x1,_0x1c83da,_0x241c92?_0x5b74ec(0x213)+_0x241c92:undefined),this[_0x5b74ec(0x217)]=_0x4fe95a,this[_0x5b74ec(0x20e)]=_0x241c92,this['httpStatus']=_0x327872,this[_0x5b74ec(0x212)]=_0x262d0f;if(_0x241c92)Object[_0x5b74ec(0x202)](this,_0x5b74ec(0x1fa),{'value':{'remoteErrorCode':_0x241c92},'enumerable':![]});}}function resolveOrigin(){const _0x3489b6=a302_0x3f2611,_0x2ec377=getKbServiceDomain();if(!_0x2ec377)throw CliErrors[_0x3489b6(0x1f8)]('Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.');try{return normalizeKbServiceOrigin(_0x2ec377);}catch{throw CliErrors[_0x3489b6(0x1f8)](_0x3489b6(0x20a));}}export function withKbManagementSession(_0x2d537b,_0x39ab94){const _0x47135b=a302_0x3f2611;return session[_0x47135b(0x218)]({'origin':resolveOrigin(),'signal':_0x2d537b},_0x39ab94);}function a302_0x36b0(){const _0x308159=['code','test','defineProperty','5100147ibUzNR','91120GTmXbX','10159000ZxoWnc','getStore','network','aborted','359879QZzOPK','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','4dDKKiY','8432586WhTeEs','remoteErrorCode','trim','signal','message','pageTooLarge','API\x20error\x20code:\x20','1236363dehSRB','timeout','cookie','transportFailure','run','cancelled','httpStatus','writeUncertain','2734620YxSmPw','auth','validation','origin','data','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','api_error','status','kind','7wlFyuj'];a302_0x36b0=function(){return _0x308159;};return a302_0x36b0();}export async function withKbManagementClient(_0x1fa13c,_0x232b30,_0x33fc55={}){const _0x55c6ff=a302_0x3f2611,_0x204a71=session[_0x55c6ff(0x206)]()?.[_0x55c6ff(0x1f9)]??resolveOrigin();if(!_0x1fa13c[_0x55c6ff(0x20f)]())throw CliErrors[_0x55c6ff(0x20b)]();const _0x1ebb4e=_0x33fc55['signal']??session[_0x55c6ff(0x206)]()?.[_0x55c6ff(0x210)];if(_0x1ebb4e?.[_0x55c6ff(0x208)])throw CliErrors[_0x55c6ff(0x1f3)]('Knowledge\x20management\x20request\x20cancelled.');try{const _0x2f5aad=createKnowledgeClient({'kbServiceDomain':_0x204a71,'authMode':_0x55c6ff(0x216),'cookie':_0x1fa13c,'invokeSource':'cli:rabetbase'});return await _0x232b30(_0x2f5aad,{'signal':_0x1ebb4e});}catch(_0x417d25){if(!(_0x417d25 instanceof KnowledgeServiceError))throw _0x417d25;if(_0x417d25['kind']===_0x55c6ff(0x1f7))throw CliErrors[_0x55c6ff(0x20b)]();if(_0x417d25[_0x55c6ff(0x1fe)]===_0x55c6ff(0x1f8))throw CliErrors['validation'](_0x417d25[_0x55c6ff(0x211)]);const _0xe9d4ac=_0x417d25['kind']===_0x55c6ff(0x207)||_0x417d25[_0x55c6ff(0x1fe)]===_0x55c6ff(0x215)||_0x417d25['kind']==='cancelled';throw new KbManagementError(_0x417d25[_0x55c6ff(0x211)]+(_0x417d25[_0x55c6ff(0x1f5)]?WRITE_RECONCILIATION:''),_0xe9d4ac,/^\d+$/[_0x55c6ff(0x201)](_0x417d25[_0x55c6ff(0x200)]??'')?_0x417d25[_0x55c6ff(0x200)]:undefined,_0x417d25[_0x55c6ff(0x1fd)],_0x417d25[_0x55c6ff(0x212)]);}}
1
+ const a302_0x4a09eb=a302_0xf2e7;function a302_0x24a8(){const _0x48b085=['Knowledge\x20management\x20request\x20cancelled.','network','549288XeKdVl','signal','run','httpStatus','36642vvwjvv','735YwQwBw','authRequired','1004493xvSXft','defineProperty','message','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','3319985JdUwes','191621AQEsAL','origin','2362070tAJGhJ','cancelled','validation','kind','code','trim','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','auth','remoteErrorCode','getStore','pageTooLarge','api_error','54FkKKSL','transportFailure','status','4tdCpGM','cookie','data','540312eDkKYO','API\x20error\x20code:\x20'];a302_0x24a8=function(){return _0x48b085;};return a302_0x24a8();}(function(_0x42d94e,_0x27e668){const _0x34bbbd=a302_0xf2e7,_0x172068=_0x42d94e();while(!![]){try{const _0x4190f3=parseInt(_0x34bbbd(0x91))/0x1*(parseInt(_0x34bbbd(0xa2))/0x2)+parseInt(_0x34bbbd(0xb0))/0x3+-parseInt(_0x34bbbd(0xa5))/0x4+parseInt(_0x34bbbd(0x90))/0x5+parseInt(_0x34bbbd(0xad))/0x6*(parseInt(_0x34bbbd(0xae))/0x7)+-parseInt(_0x34bbbd(0xa9))/0x8+parseInt(_0x34bbbd(0x9f))/0x9*(-parseInt(_0x34bbbd(0x93))/0xa);if(_0x4190f3===_0x27e668)break;else _0x172068['push'](_0x172068['shift']());}catch(_0x338614){_0x172068['push'](_0x172068['shift']());}}}(a302_0x24a8,0x62394));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';function a302_0xf2e7(_0x7937e8,_0x3efb65){_0x7937e8=_0x7937e8-0x8d;const _0x24a836=a302_0x24a8();let _0xf2e74c=_0x24a836[_0x7937e8];return _0xf2e74c;}import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x4a09eb(0x8f),session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];[a302_0x4a09eb(0x9b)];[a302_0x4a09eb(0xac)];[a302_0x4a09eb(0x9d)];constructor(_0x2e44e5,_0x29ead7=![],_0x1aca30,_0x1b6cb4,_0xdc101b=![]){const _0x13621b=a302_0x4a09eb;super(_0x13621b(0x9e),0x1,_0x2e44e5,_0x1aca30?_0x13621b(0xa6)+_0x1aca30:undefined),this[_0x13621b(0xa0)]=_0x29ead7,this['remoteErrorCode']=_0x1aca30,this[_0x13621b(0xac)]=_0x1b6cb4,this[_0x13621b(0x9d)]=_0xdc101b;if(_0x1aca30)Object[_0x13621b(0x8d)](this,_0x13621b(0xa4),{'value':{'remoteErrorCode':_0x1aca30},'enumerable':![]});}}function resolveOrigin(){const _0x50c9e1=a302_0x4a09eb,_0x14d0f2=getKbServiceDomain();if(!_0x14d0f2)throw CliErrors[_0x50c9e1(0x95)](_0x50c9e1(0x99));try{return normalizeKbServiceOrigin(_0x14d0f2);}catch{throw CliErrors[_0x50c9e1(0x95)]('Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export function withKbManagementSession(_0x339334,_0x8768a8){const _0xb082c2=a302_0x4a09eb;return session[_0xb082c2(0xab)]({'origin':resolveOrigin(),'signal':_0x339334},_0x8768a8);}export async function withKbManagementClient(_0x1fdf10,_0x553746,_0x406d9d={}){const _0x231835=a302_0x4a09eb,_0x7dd8e9=session[_0x231835(0x9c)]()?.[_0x231835(0x92)]??resolveOrigin();if(!_0x1fdf10[_0x231835(0x98)]())throw CliErrors['authRequired']();const _0x238ce8=_0x406d9d[_0x231835(0xaa)]??session[_0x231835(0x9c)]()?.[_0x231835(0xaa)];if(_0x238ce8?.['aborted'])throw CliErrors[_0x231835(0x94)](_0x231835(0xa7));try{const _0x3fd507=createKnowledgeClient({'kbServiceDomain':_0x7dd8e9,'authMode':_0x231835(0xa3),'cookie':_0x1fdf10,'invokeSource':'cli:rabetbase'});return await _0x553746(_0x3fd507,{'signal':_0x238ce8});}catch(_0x28451f){if(!(_0x28451f instanceof KnowledgeServiceError))throw _0x28451f;if(_0x28451f[_0x231835(0x96)]===_0x231835(0x9a))throw CliErrors[_0x231835(0xaf)]();if(_0x28451f[_0x231835(0x96)]===_0x231835(0x95))throw CliErrors[_0x231835(0x95)](_0x28451f[_0x231835(0x8e)]);const _0x115a06=_0x28451f['kind']===_0x231835(0xa8)||_0x28451f[_0x231835(0x96)]==='timeout'||_0x28451f[_0x231835(0x96)]===_0x231835(0x94);throw new KbManagementError(_0x28451f[_0x231835(0x8e)]+(_0x28451f['writeUncertain']?WRITE_RECONCILIATION:''),_0x115a06,/^\d+$/['test'](_0x28451f[_0x231835(0x97)]??'')?_0x28451f[_0x231835(0x97)]:undefined,_0x28451f[_0x231835(0xa1)],_0x28451f['pageTooLarge']);}}
@@ -1 +1 @@
1
- (function(_0x44bd70,_0x65b834){const _0x1c328f=a303_0x225e,_0x21258e=_0x44bd70();while(!![]){try{const _0x2927ca=parseInt(_0x1c328f(0x1c2))/0x1+parseInt(_0x1c328f(0x1c0))/0x2*(-parseInt(_0x1c328f(0x1ea))/0x3)+-parseInt(_0x1c328f(0x1e4))/0x4*(parseInt(_0x1c328f(0x1c1))/0x5)+parseInt(_0x1c328f(0x1d0))/0x6+-parseInt(_0x1c328f(0x1e0))/0x7+-parseInt(_0x1c328f(0x1c9))/0x8+parseInt(_0x1c328f(0x1be))/0x9*(parseInt(_0x1c328f(0x1e3))/0xa);if(_0x2927ca===_0x65b834)break;else _0x21258e['push'](_0x21258e['shift']());}catch(_0x5233af){_0x21258e['push'](_0x21258e['shift']());}}}(a303_0x1e9c,0x73fa9));function a303_0x225e(_0x2bef02,_0x4476b2){_0x2bef02=_0x2bef02-0x1bc;const _0x1e9c40=a303_0x1e9c();let _0x225e0c=_0x1e9c40[_0x2bef02];return _0x225e0c;}import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x1e9c(){const _0x330014=['topK','code','3613326XRMJNT','defineProperty','includes','HTTP\x20','apiError','authRequired','auth','AbortError','Knowledge\x20search\x20cancelled.','query','serviceUrl','validation','status','cli:rabetbase','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','3616760wVcVOM','development','company','691510DzfQku','68bkWxZF','search','contract','data','\x20(HTTP\x20','networkError','31539QJiSlN','hits','length','27xIkRqH','message','60zkCuVC','12235xAgMHY','712760qVVkMs','timeout','cookie','kind','trim','appCode','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','1389728oXrsOo','Knowledge\x20search\x20query\x20is\x20required.','test','network','signal'];a303_0x1e9c=function(){return _0x330014;};return a303_0x1e9c();}import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0xab7cd2){const _0x445844=a303_0x225e;try{return normalizeKnowledgeServiceOrigin(_0xab7cd2);}catch{throw CliErrors[_0x445844(0x1db)](_0x445844(0x1df));}}export async function searchDirectKnowledge(_0x1637ec){const _0x18e0d0=a303_0x225e,_0x2f3c2c=_0x1637ec[_0x18e0d0(0x1c7)][_0x18e0d0(0x1c6)](),_0x1d3ab3=_0x1637ec[_0x18e0d0(0x1d9)]['trim']();if(!_0x2f3c2c)throw CliErrors[_0x18e0d0(0x1db)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0x1d3ab3)throw CliErrors[_0x18e0d0(0x1db)](_0x18e0d0(0x1ca));if(!_0x1637ec['cookie'][_0x18e0d0(0x1c6)]())throw CliErrors[_0x18e0d0(0x1d5)]();const _0x2e283b=normalizeKbServiceOrigin(_0x1637ec[_0x18e0d0(0x1da)]);try{const _0xe58700=createKnowledgeClient({'kbServiceDomain':_0x2e283b,'authMode':_0x18e0d0(0x1c4),'cookie':_0x1637ec['cookie'],'invokeSource':_0x18e0d0(0x1dd)}),_0x2c3624=await _0xe58700[_0x18e0d0(0x1e5)]({'appCode':_0x2f3c2c,'query':_0x1d3ab3,'scopes':['public',_0x18e0d0(0x1e2)],..._0x1637ec[_0x18e0d0(0x1ce)]!==undefined?{'topK':_0x1637ec[_0x18e0d0(0x1ce)]}:{}},{'signal':_0x1637ec[_0x18e0d0(0x1cd)]});return{..._0x2c3624,'hits':_0x2c3624['hits'],'schemaVersion':0x2,'profile':_0x18e0d0(0x1e1),'total':_0x2c3624[_0x18e0d0(0x1bc)][_0x18e0d0(0x1bd)]};}catch(_0x3f03df){if(!(_0x3f03df instanceof KnowledgeServiceError))throw _0x3f03df;if(_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1d6))throw CliErrors[_0x18e0d0(0x1d5)]();if(_0x3f03df[_0x18e0d0(0x1c5)]==='validation')throw CliErrors[_0x18e0d0(0x1db)](_0x3f03df[_0x18e0d0(0x1bf)]);if(_0x3f03df[_0x18e0d0(0x1c5)]==='cancelled')throw new DOMException(_0x18e0d0(0x1d8),_0x18e0d0(0x1d7));if(_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1cc)||_0x3f03df['kind']===_0x18e0d0(0x1c3))throw CliErrors[_0x18e0d0(0x1e9)](_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1c3)?_0x18e0d0(0x1de):_0x18e0d0(0x1c8));const _0x57805d=_0x3f03df['kind']===_0x18e0d0(0x1e6)&&_0x3f03df[_0x18e0d0(0x1bf)][_0x18e0d0(0x1d2)]('out-of-scope')?'KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.':_0x3f03df['message'],_0x3bef9a=CliErrors[_0x18e0d0(0x1d4)](_0x3f03df[_0x18e0d0(0x1dc)]!==undefined&&_0x3f03df['status']!==0xc8&&!_0x57805d[_0x18e0d0(0x1d2)](_0x18e0d0(0x1d3)+_0x3f03df[_0x18e0d0(0x1dc)])?_0x57805d+_0x18e0d0(0x1e8)+_0x3f03df[_0x18e0d0(0x1dc)]+')':_0x57805d);if(/^\d+$/[_0x18e0d0(0x1cb)](_0x3f03df[_0x18e0d0(0x1cf)]??''))Object[_0x18e0d0(0x1d1)](_0x3bef9a,_0x18e0d0(0x1e7),{'value':{'remoteErrorCode':_0x3f03df[_0x18e0d0(0x1cf)]},'enumerable':![]});throw _0x3bef9a;}}
1
+ (function(_0x388389,_0x4f748d){const _0x204eb4=a303_0x4b87,_0x32face=_0x388389();while(!![]){try{const _0x1029e8=-parseInt(_0x204eb4(0x1c1))/0x1+parseInt(_0x204eb4(0x1ae))/0x2+parseInt(_0x204eb4(0x1b9))/0x3+parseInt(_0x204eb4(0x1b7))/0x4+-parseInt(_0x204eb4(0x1c8))/0x5*(parseInt(_0x204eb4(0x1c3))/0x6)+-parseInt(_0x204eb4(0x1b8))/0x7*(parseInt(_0x204eb4(0x1b0))/0x8)+parseInt(_0x204eb4(0x1bd))/0x9*(parseInt(_0x204eb4(0x1af))/0xa);if(_0x1029e8===_0x4f748d)break;else _0x32face['push'](_0x32face['shift']());}catch(_0xfc8dae){_0x32face['push'](_0x32face['shift']());}}}(a303_0x22c8,0x6f4fd));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x4b87(_0x1f06b4,_0x39d71c){_0x1f06b4=_0x1f06b4-0x1a9;const _0x22c802=a303_0x22c8();let _0x4b8719=_0x22c802[_0x1f06b4];return _0x4b8719;}import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x27776a){const _0x58e564=a303_0x4b87;try{return normalizeKnowledgeServiceOrigin(_0x27776a);}catch{throw CliErrors[_0x58e564(0x1ca)](_0x58e564(0x1cc));}}export async function searchDirectKnowledge(_0x185b9e){const _0x4ee9d2=a303_0x4b87,_0xe97e09=_0x185b9e[_0x4ee9d2(0x1c7)][_0x4ee9d2(0x1d1)](),_0x2e710c=_0x185b9e['query'][_0x4ee9d2(0x1d1)]();if(!_0xe97e09)throw CliErrors[_0x4ee9d2(0x1ca)](_0x4ee9d2(0x1c0));if(!_0x2e710c)throw CliErrors[_0x4ee9d2(0x1ca)](_0x4ee9d2(0x1c6));if(!_0x185b9e['cookie']['trim']())throw CliErrors['authRequired']();const _0x2d290b=normalizeKbServiceOrigin(_0x185b9e[_0x4ee9d2(0x1bc)]);try{const _0x4cde01=createKnowledgeClient({'kbServiceDomain':_0x2d290b,'authMode':'cookie','cookie':_0x185b9e['cookie'],'invokeSource':_0x4ee9d2(0x1c9)}),_0x1af3fa=await _0x4cde01['search']({'appCode':_0xe97e09,'query':_0x2e710c,'scopes':['public',_0x4ee9d2(0x1ba)],..._0x185b9e['topK']!==undefined?{'topK':_0x185b9e[_0x4ee9d2(0x1cf)]}:{}},{'signal':_0x185b9e['signal']});return{..._0x1af3fa,'hits':_0x1af3fa[_0x4ee9d2(0x1bb)],'schemaVersion':0x2,'profile':'development','total':_0x1af3fa[_0x4ee9d2(0x1bb)][_0x4ee9d2(0x1c5)]};}catch(_0xcd7be5){if(!(_0xcd7be5 instanceof KnowledgeServiceError))throw _0xcd7be5;if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1b3))throw CliErrors[_0x4ee9d2(0x1b1)]();if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1ca))throw CliErrors['validation'](_0xcd7be5[_0x4ee9d2(0x1c4)]);if(_0xcd7be5['kind']===_0x4ee9d2(0x1b6))throw new DOMException('Knowledge\x20search\x20cancelled.',_0x4ee9d2(0x1b2));if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1ad)||_0xcd7be5[_0x4ee9d2(0x1bf)]==='timeout')throw CliErrors[_0x4ee9d2(0x1ac)](_0xcd7be5[_0x4ee9d2(0x1bf)]==='timeout'?'KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.':_0x4ee9d2(0x1d0));const _0x5149e7=_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1aa)&&_0xcd7be5[_0x4ee9d2(0x1c4)][_0x4ee9d2(0x1cd)]('out-of-scope')?_0x4ee9d2(0x1b4):_0xcd7be5[_0x4ee9d2(0x1c4)],_0x1503dd=CliErrors['apiError'](_0xcd7be5[_0x4ee9d2(0x1a9)]!==undefined&&_0xcd7be5[_0x4ee9d2(0x1a9)]!==0xc8&&!_0x5149e7['includes'](_0x4ee9d2(0x1be)+_0xcd7be5['status'])?_0x5149e7+_0x4ee9d2(0x1b5)+_0xcd7be5['status']+')':_0x5149e7);if(/^\d+$/[_0x4ee9d2(0x1c2)](_0xcd7be5['code']??''))Object[_0x4ee9d2(0x1ce)](_0x1503dd,_0x4ee9d2(0x1ab),{'value':{'remoteErrorCode':_0xcd7be5[_0x4ee9d2(0x1cb)]},'enumerable':![]});throw _0x1503dd;}}function a303_0x22c8(){const _0x9a67e8=['kind','Knowledge\x20search\x20appCode\x20is\x20required.','154279MiCMKm','test','109566gzulOj','message','length','Knowledge\x20search\x20query\x20is\x20required.','appCode','220SwCDub','cli:rabetbase','validation','code','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','includes','defineProperty','topK','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','trim','status','contract','data','networkError','network','921510tapTfc','241970QOYSTA','8UtkmwZ','authRequired','AbortError','auth','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','\x20(HTTP\x20','cancelled','1305432JcsUGe','3903221NQZLby','140781iSFuEX','company','hits','serviceUrl','423ZoDGkZ','HTTP\x20'];a303_0x22c8=function(){return _0x9a67e8;};return a303_0x22c8();}
@@ -1 +1 @@
1
- const a304_0x45a5f=a304_0x56a4;(function(_0x48089f,_0x265da1){const _0x236751=a304_0x56a4,_0xd3b337=_0x48089f();while(!![]){try{const _0x3850a1=-parseInt(_0x236751(0x110))/0x1+-parseInt(_0x236751(0x10f))/0x2*(parseInt(_0x236751(0x10e))/0x3)+parseInt(_0x236751(0x11f))/0x4+-parseInt(_0x236751(0x122))/0x5*(-parseInt(_0x236751(0x117))/0x6)+parseInt(_0x236751(0x116))/0x7*(-parseInt(_0x236751(0x11a))/0x8)+-parseInt(_0x236751(0x10a))/0x9*(-parseInt(_0x236751(0x123))/0xa)+parseInt(_0x236751(0x120))/0xb;if(_0x3850a1===_0x265da1)break;else _0xd3b337['push'](_0xd3b337['shift']());}catch(_0x5bcc2f){_0xd3b337['push'](_0xd3b337['shift']());}}}(a304_0x2d09,0x47f10));import{constants}from'node:fs';function a304_0x2d09(){const _0x48571e=['split','1613300gRLtsO','1739694DjAhMO','Unsupported\x20file\x20in\x20page\x20directory:\x20','1018865SwyEPF','347870JrMsgH','trim','isDirectory','page-dir','sort','.json','81dcIOXO','utf8','flagMissing','appPagesDir','870951kYcJNV','2BOVbJG','386020jzBPkO','name','toUpperCase','validation','isFile','cwd','1442fysxMH','6SGiFpC','page','F_OK','4168FFfyrh','page.lock.json','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.rabetbase'];a304_0x2d09=function(){return _0x48571e;};return a304_0x2d09();}import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x5a86ab,_0x321965=process[a304_0x45a5f(0x115)]()){const _0x453b2f=a304_0x45a5f,_0xabc002=resolve(_0x321965),_0xf3cfc3=join(_0xabc002,_0x453b2f(0x11d),_0x453b2f(0x118));return{'projectRoot':_0xabc002,'pagesBaseDir':_0xf3cfc3,'appPagesDir':join(_0xf3cfc3,_0x5a86ab),'lockFilePath':join(_0xabc002,_0x453b2f(0x11d),_0x453b2f(0x11b))};}export function buildPageFileName(_0x6a944d,_0x1f08ba){const _0x31912e=a304_0x45a5f;return _0x6a944d+'-'+_0x1f08ba[_0x31912e(0x112)]()+_0x31912e(0x128);}export function resolvePageFilePath(_0x16ce56,_0x3d4690,_0x323eb9){const _0x2ecba3=a304_0x45a5f;return join(_0x16ce56[_0x2ecba3(0x10d)],buildPageFileName(_0x3d4690,_0x323eb9));}function a304_0x56a4(_0x452f61,_0x9548ae){_0x452f61=_0x452f61-0x10a;const _0x2d0904=a304_0x2d09();let _0x56a42b=_0x2d0904[_0x452f61];return _0x56a42b;}export async function ensureParentDirectory(_0x52d8e8){await mkdir(dirname(_0x52d8e8),{'recursive':!![]});}export async function fileExists(_0x37cce6){const _0x4566fc=a304_0x45a5f;try{return await access(_0x37cce6,constants[_0x4566fc(0x119)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x4d3bee){const _0x55ad72=a304_0x45a5f,_0xfb0427=_0x4d3bee[_0x55ad72(0x124)]();if(!_0xfb0427)throw CliErrors[_0x55ad72(0x10c)](_0x55ad72(0x126));const _0x1eb9aa=resolve(_0xfb0427);let _0x5498a7;try{_0x5498a7=await lstat(_0x1eb9aa);}catch{throw CliErrors['validation']('Page\x20directory\x20not\x20found:\x20'+_0xfb0427);}if(!_0x5498a7[_0x55ad72(0x125)]())throw CliErrors['validation'](_0x55ad72(0x11c)+_0xfb0427);const _0x46d26f={};return await readDirectory(_0x1eb9aa,_0x1eb9aa,_0x46d26f),_0x46d26f;}async function readDirectory(_0x38d68e,_0x53bdb2,_0x1ac7eb){const _0x3ce068=a304_0x45a5f,_0x2df7dc=await readdir(_0x53bdb2,{'withFileTypes':!![]});for(const _0x2cd5a1 of _0x2df7dc[_0x3ce068(0x127)]((_0x4d3f09,_0x3f8b19)=>_0x4d3f09[_0x3ce068(0x111)]['localeCompare'](_0x3f8b19[_0x3ce068(0x111)]))){const _0x5da8ae=join(_0x53bdb2,_0x2cd5a1['name']);if(_0x2cd5a1[_0x3ce068(0x125)]()){await readDirectory(_0x38d68e,_0x5da8ae,_0x1ac7eb);continue;}if(!_0x2cd5a1[_0x3ce068(0x114)]())throw CliErrors[_0x3ce068(0x113)](_0x3ce068(0x121)+_0x5da8ae);_0x1ac7eb[relative(_0x38d68e,_0x5da8ae)[_0x3ce068(0x11e)](sep)['join']('/')]=await readFile(_0x5da8ae,_0x3ce068(0x10b));}}
1
+ const a304_0x2df38b=a304_0x2ea7;(function(_0x27b7ad,_0x45bcfe){const _0x204264=a304_0x2ea7,_0x41ba8b=_0x27b7ad();while(!![]){try{const _0x38ebb5=parseInt(_0x204264(0x1a4))/0x1*(-parseInt(_0x204264(0x1a3))/0x2)+-parseInt(_0x204264(0x1aa))/0x3*(parseInt(_0x204264(0x1b0))/0x4)+parseInt(_0x204264(0x1b2))/0x5+parseInt(_0x204264(0x1af))/0x6*(parseInt(_0x204264(0x1a6))/0x7)+-parseInt(_0x204264(0x1a5))/0x8+parseInt(_0x204264(0x1ab))/0x9+parseInt(_0x204264(0x1ac))/0xa;if(_0x38ebb5===_0x45bcfe)break;else _0x41ba8b['push'](_0x41ba8b['shift']());}catch(_0xa2315d){_0x41ba8b['push'](_0x41ba8b['shift']());}}}(a304_0x2f5f,0xbe548));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x3a6261,_0x2dfaec=process[a304_0x2df38b(0x19d)]()){const _0x558189=a304_0x2df38b,_0x439e7c=resolve(_0x2dfaec),_0x4a7f69=join(_0x439e7c,_0x558189(0x199),_0x558189(0x19e));return{'projectRoot':_0x439e7c,'pagesBaseDir':_0x4a7f69,'appPagesDir':join(_0x4a7f69,_0x3a6261),'lockFilePath':join(_0x439e7c,_0x558189(0x199),_0x558189(0x1a1))};}export function buildPageFileName(_0x53ebfa,_0x887fb0){const _0x41e191=a304_0x2df38b;return _0x53ebfa+'-'+_0x887fb0[_0x41e191(0x1a8)]()+_0x41e191(0x1a7);}export function resolvePageFilePath(_0x14121b,_0x5cadd1,_0x3db5e2){return join(_0x14121b['appPagesDir'],buildPageFileName(_0x5cadd1,_0x3db5e2));}export async function ensureParentDirectory(_0x26fef6){await mkdir(dirname(_0x26fef6),{'recursive':!![]});}export async function fileExists(_0x3bf0fd){const _0x540669=a304_0x2df38b;try{return await access(_0x3bf0fd,constants[_0x540669(0x1ad)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x465d5c){const _0x3133cd=a304_0x2df38b,_0x5da7f0=_0x465d5c[_0x3133cd(0x196)]();if(!_0x5da7f0)throw CliErrors[_0x3133cd(0x1a2)](_0x3133cd(0x19c));const _0x5688be=resolve(_0x5da7f0);let _0x2cd79b;try{_0x2cd79b=await lstat(_0x5688be);}catch{throw CliErrors[_0x3133cd(0x19f)](_0x3133cd(0x19a)+_0x5da7f0);}if(!_0x2cd79b[_0x3133cd(0x198)]())throw CliErrors['validation'](_0x3133cd(0x1a9)+_0x5da7f0);const _0x2572ee={};return await readDirectory(_0x5688be,_0x5688be,_0x2572ee),_0x2572ee;}function a304_0x2f5f(){const _0x5234b4=['Page\x20directory\x20not\x20found:\x20','split','page-dir','cwd','page','validation','name','page.lock.json','flagMissing','2xGFpnC','893674tlunEh','7397448KbzzZH','1918iSYvke','.json','toUpperCase','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','3ouLUVp','2733372Qsjqtk','25924420pqQpbX','F_OK','isFile','16194udEUlS','4701668wJQLBn','Unsupported\x20file\x20in\x20page\x20directory:\x20','688440NMFmVh','utf8','join','trim','sort','isDirectory','.rabetbase'];a304_0x2f5f=function(){return _0x5234b4;};return a304_0x2f5f();}function a304_0x2ea7(_0xc132a,_0x478420){_0xc132a=_0xc132a-0x196;const _0x2f5f45=a304_0x2f5f();let _0x2ea753=_0x2f5f45[_0xc132a];return _0x2ea753;}async function readDirectory(_0xfda313,_0x2bda68,_0x26c566){const _0x2c9c1c=a304_0x2df38b,_0x2582d4=await readdir(_0x2bda68,{'withFileTypes':!![]});for(const _0x1306db of _0x2582d4[_0x2c9c1c(0x197)]((_0xfea17c,_0x487d90)=>_0xfea17c[_0x2c9c1c(0x1a0)]['localeCompare'](_0x487d90['name']))){const _0x1c30fa=join(_0x2bda68,_0x1306db['name']);if(_0x1306db[_0x2c9c1c(0x198)]()){await readDirectory(_0xfda313,_0x1c30fa,_0x26c566);continue;}if(!_0x1306db[_0x2c9c1c(0x1ae)]())throw CliErrors[_0x2c9c1c(0x19f)](_0x2c9c1c(0x1b1)+_0x1c30fa);_0x26c566[relative(_0xfda313,_0x1c30fa)[_0x2c9c1c(0x19b)](sep)[_0x2c9c1c(0x1b4)]('/')]=await readFile(_0x1c30fa,_0x2c9c1c(0x1b3));}}