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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a299_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
+ const a299_0x3070f7=a299_0x4beb;(function(_0x4f1bf8,_0x15b078){const _0x4e6f76=a299_0x4beb,_0x463472=_0x4f1bf8();while(!![]){try{const _0x5479f3=parseInt(_0x4e6f76(0x1bd))/0x1+-parseInt(_0x4e6f76(0x256))/0x2+-parseInt(_0x4e6f76(0x145))/0x3*(parseInt(_0x4e6f76(0x19f))/0x4)+-parseInt(_0x4e6f76(0x251))/0x5*(-parseInt(_0x4e6f76(0x159))/0x6)+-parseInt(_0x4e6f76(0x1ec))/0x7+parseInt(_0x4e6f76(0x21c))/0x8*(-parseInt(_0x4e6f76(0x12d))/0x9)+-parseInt(_0x4e6f76(0x148))/0xa*(-parseInt(_0x4e6f76(0x23a))/0xb);if(_0x5479f3===_0x15b078)break;else _0x463472['push'](_0x463472['shift']());}catch(_0x4d2345){_0x463472['push'](_0x463472['shift']());}}}(a299_0x5ab3,0x4b984));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_0x3070f7(0x1d8),'$id':a299_0x3070f7(0xec),'title':a299_0x3070f7(0x179),'type':'object','required':[a299_0x3070f7(0x139),a299_0x3070f7(0x177),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':a299_0x3070f7(0x252),'minimum':0x1}]},'position':{'type':a299_0x3070f7(0x16c),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x13a),'unit'],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a299_0x3070f7(0x1f7),a299_0x3070f7(0x1d6),a299_0x3070f7(0x114),a299_0x3070f7(0x1b0)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x3070f7(0x16c),'required':['id','type','name',a299_0x3070f7(0x18f)],'properties':{'id':{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x18a)},'type':{'enum':[a299_0x3070f7(0x1d9),a299_0x3070f7(0xe5),a299_0x3070f7(0x158),a299_0x3070f7(0x1a7),a299_0x3070f7(0x11c),a299_0x3070f7(0x229)]},'name':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'path':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'position':{'$ref':a299_0x3070f7(0x15d)},'approvalMode':{'enum':[a299_0x3070f7(0x1fe),a299_0x3070f7(0x1ed),'ANY']},'taskMode':{'enum':['APPROVAL',a299_0x3070f7(0x16d)]},'assignee':{'type':'object','required':[a299_0x3070f7(0x1b7)],'properties':{'strategy':{'enum':['FIXED',a299_0x3070f7(0x176)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x3070f7(0xe3)}},'roleId':{'anyOf':[{'type':a299_0x3070f7(0x252),'minimum':0x1},{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x21d)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x1b7),a299_0x3070f7(0x1b9)],'properties':{'strategy':{'const':a299_0x3070f7(0x21b)},'userIds':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':a299_0x3070f7(0xe3)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x3070f7(0x152)},'result':{'enum':[a299_0x3070f7(0x1e1),a299_0x3070f7(0x156)]},'scriptName':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x3070f7(0x18a)},'async':{'type':a299_0x3070f7(0x16c),'properties':{'enabled':{'type':a299_0x3070f7(0x152)},'retryCount':{'type':a299_0x3070f7(0x252),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x3070f7(0xdf)}},'additionalProperties':!![]},'timeout':{'type':a299_0x3070f7(0x16c),'properties':{'enabled':{'type':a299_0x3070f7(0x152)},'duration':{'$ref':a299_0x3070f7(0xdf)},'action':{'enum':[a299_0x3070f7(0x1d0),a299_0x3070f7(0x103),a299_0x3070f7(0x134)]},'interrupting':{'type':a299_0x3070f7(0x152)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x16e)],'properties':{'recipientUserIds':{'type':a299_0x3070f7(0x226),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x1f9),a299_0x3070f7(0x10e)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x3070f7(0xef)]},'template':{'type':'object','required':[a299_0x3070f7(0x14c),a299_0x3070f7(0x11d)],'properties':{'title':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'summary':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':a299_0x3070f7(0x226),'maxItems':0x8,'items':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x118),a299_0x3070f7(0x13a)],'properties':{'label':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'value':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0x3070f7(0x16c),'required':['text',a299_0x3070f7(0xe4)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x3070f7(0x226),'items':{'type':'object','required':['type',a299_0x3070f7(0x13a)],'properties':{'type':{'enum':[a299_0x3070f7(0x171),a299_0x3070f7(0x176),a299_0x3070f7(0x144)]},'value':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x3070f7(0x1b2)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x3070f7(0x16c),'properties':{'id':{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x18a)},'source':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'targetNodeId':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'conditionType':{'enum':['ALWAYS',a299_0x3070f7(0x1e1),a299_0x3070f7(0x156),a299_0x3070f7(0xe1)]},'expression':{'type':a299_0x3070f7(0x1e9)},'defaultFlow':{'type':a299_0x3070f7(0x152)},'name':{'type':a299_0x3070f7(0x1e9)},'waypoints':{'type':a299_0x3070f7(0x226),'items':{'$ref':a299_0x3070f7(0x15d)}}},'allOf':[{'anyOf':[{'required':['source']},{'required':[a299_0x3070f7(0x17f)]}]},{'anyOf':[{'required':['target']},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'flowDesc':{'type':a299_0x3070f7(0x1e9)},'flowType':{'enum':[a299_0x3070f7(0x122),a299_0x3070f7(0x1b8)]},'datasetCode':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'pageId':{'type':a299_0x3070f7(0x252),'minimum':0x1,'maximum':Number[a299_0x3070f7(0x11b)]},'pageIds':{'type':a299_0x3070f7(0x226),'items':{'type':'integer','minimum':0x1,'maximum':Number[a299_0x3070f7(0x11b)]}},'templateName':![],'flowJson':{'type':a299_0x3070f7(0x16c),'required':['nodes',a299_0x3070f7(0x1c9)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x3070f7(0x1e9),'const':a299_0x3070f7(0x1a2),'description':a299_0x3070f7(0x168)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x3070f7(0x161)},'startPageId':![],'startPath':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'nodes':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':a299_0x3070f7(0x1c5)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x3070f7(0x167),a299_0x3070f7(0x139),a299_0x3070f7(0x225),a299_0x3070f7(0x1ff),a299_0x3070f7(0xd8),'pageId','templateName'],REMOVED_ROOT_FIELDS=['id',a299_0x3070f7(0xd8),a299_0x3070f7(0xe9)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x3070f7(0x1a2),NODE_TYPES=new Set([a299_0x3070f7(0x1d9),a299_0x3070f7(0xe5),a299_0x3070f7(0x158),a299_0x3070f7(0x1a7),a299_0x3070f7(0x11c),a299_0x3070f7(0x229)]),CONDITION_TYPES=new Set([a299_0x3070f7(0x20e),a299_0x3070f7(0x1e1),'REJECTED',a299_0x3070f7(0xe1)]),APPROVAL_MODES=new Set(['SINGLE',a299_0x3070f7(0x1ed),a299_0x3070f7(0x1a5)]),APPROVAL_TASK_MODES=new Set([a299_0x3070f7(0x158),a299_0x3070f7(0x16d)]),FLOW_TIME_UNITS=new Set([a299_0x3070f7(0x1f7),a299_0x3070f7(0x1d6),a299_0x3070f7(0x114),a299_0x3070f7(0x1b0)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE','AUTO_REJECT',a299_0x3070f7(0x134)]),FLOW_TYPES=new Set([a299_0x3070f7(0x122),a299_0x3070f7(0x1b8)]),FLOW_PAGE_MODES=new Set([a299_0x3070f7(0x161),'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_0x3070f7(0x173),a299_0x3070f7(0xef)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x3070f7(0x171),a299_0x3070f7(0x176),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x3070f7(0x1b2)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x3070f7(0x1d2),UNSUPPORTED_FORM_MESSAGE=a299_0x3070f7(0x240),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x3070f7(0x211),RESERVED_RESULT_VARIABLES=new Set([a299_0x3070f7(0x10b),'approved',a299_0x3070f7(0x190),a299_0x3070f7(0xee),a299_0x3070f7(0x197),a299_0x3070f7(0x186),a299_0x3070f7(0x150),'approval_sys_pageId',a299_0x3070f7(0x188),a299_0x3070f7(0xeb)]);export function normalizeFlowConfig(_0x30c60d){const _0x1039c7=a299_0x3070f7;if(!isRecord(_0x30c60d))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x2264c2=cloneJsonValue(_0x30c60d),_0x13ae75=_0x2264c2[_0x1039c7(0xf1)],_0x47eb09=isRecord(_0x13ae75)?cloneJsonValue(_0x13ae75):{},_0x11453d=[],_0x16ae09=[];for(const _0x2de512 of REMOVED_ROOT_FIELDS){if(!Object[_0x1039c7(0x183)][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x2264c2,_0x2de512))continue;delete _0x2264c2[_0x2de512],_0x16ae09[_0x1039c7(0x235)](_0x2de512),_0x11453d[_0x1039c7(0x235)]({'code':_0x1039c7(0x24f),'path':_0x2de512,'message':_0x2de512+_0x1039c7(0x1ea)});}for(const _0x35bc6f of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x1039c7(0x183)][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x47eb09,_0x35bc6f))continue;const _0x532758='flowJson.'+_0x35bc6f;delete _0x47eb09[_0x35bc6f],_0x16ae09[_0x1039c7(0x235)](_0x532758),_0x11453d[_0x1039c7(0x235)]({'code':'legacy_field_removed','path':_0x532758,'message':_0x532758+_0x1039c7(0x1ea)});}if(Object['prototype'][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x47eb09,'schemaVersion')){const _0x621c1b=_0x47eb09[_0x1039c7(0x128)],_0x2bec67=typeof _0x621c1b===_0x1039c7(0x1e9)?_0x621c1b[_0x1039c7(0xf8)]():_0x621c1b;if(isEmptyJsonValue(_0x621c1b)||_0x2bec67===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5df430='flowJson.schemaVersion';delete _0x47eb09[_0x1039c7(0x128)],_0x16ae09[_0x1039c7(0x235)](_0x5df430),_0x11453d[_0x1039c7(0x235)]({'code':_0x1039c7(0x24f),'path':_0x5df430,'message':_0x5df430+_0x1039c7(0x1e2)+DEFAULT_FLOW_SCHEMA_VERSION+_0x1039c7(0xed)});}}removeEmptyMetadata(_0x47eb09,_0x1039c7(0xf1),_0x11453d,_0x16ae09);_0x2264c2['flowType']==='INDEPENDENT_FLOW'&&!Object[_0x1039c7(0x183)]['hasOwnProperty'][_0x1039c7(0x107)](_0x47eb09,_0x1039c7(0x137))&&(_0x47eb09[_0x1039c7(0x137)]=_0x1039c7(0x161));_0x2264c2[_0x1039c7(0xf1)]=_0x47eb09;if(typeof _0x2264c2['flowName']===_0x1039c7(0x1e9))_0x2264c2['flowName']=_0x2264c2[_0x1039c7(0x139)]['trim']();return{'config':_0x2264c2,'warnings':_0x11453d,'removedPaths':_0x16ae09};}export function validateFlowConfig(_0x58c632){const _0x3fec39=a299_0x3070f7;let _0x2ffade;try{_0x2ffade=normalizeFlowConfig(_0x58c632);}catch(_0x52da5e){const _0x40c229=_0x52da5e instanceof Error?_0x52da5e[_0x3fec39(0x24b)]:String(_0x52da5e),_0x1b6b43={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x40c229}],'warnings':[],'normalized':_0x1b6b43,'validationConfig':_0x1b6b43};}const _0x26b537=_0x2ffade[_0x3fec39(0x1e0)],_0x3c2c69=cloneJsonValue(_0x26b537),_0x5e9d1d=_0x3c2c69[_0x3fec39(0xf1)];_0x5e9d1d[_0x3fec39(0x1b3)]=_0x3fec39(0x221),_0x5e9d1d[_0x3fec39(0x139)]=_0x26b537[_0x3fec39(0x139)];typeof _0x26b537[_0x3fec39(0x1ff)]==='string'&&_0x26b537[_0x3fec39(0x1ff)][_0x3fec39(0xf8)]()&&(_0x5e9d1d['bindDatasetCode']=_0x26b537[_0x3fec39(0x1ff)][_0x3fec39(0xf8)]());const _0x270089=[];return validateOuterMetadata(_0x26b537,_0x270089),validateFlowClassification(_0x26b537,_0x270089),validateGraph(_0x26b537[_0x3fec39(0xf1)],_0x270089),{'valid':_0x270089[_0x3fec39(0xda)]===0x0,'errors':_0x270089,'warnings':_0x2ffade[_0x3fec39(0x224)],'normalized':_0x26b537,'validationConfig':_0x3c2c69};}function validateFlowClassification(_0x3a165b,_0x1af822){const _0x15c1ee=a299_0x3070f7;if(!isRecord(_0x3a165b[_0x15c1ee(0xf1)]))return;const _0x17d9f7=_0x3a165b['flowType'],_0x52c576=_0x3a165b[_0x15c1ee(0xf1)][_0x15c1ee(0x137)];_0x52c576!==undefined&&(typeof _0x52c576!==_0x15c1ee(0x1e9)||!FLOW_PAGE_MODES[_0x15c1ee(0x196)](_0x52c576))&&_0x1af822['push']({'path':_0x15c1ee(0x1da),'message':_0x15c1ee(0x13d)+String(_0x52c576)+'.'});_0x17d9f7==='FORM_FLOW'&&_0x52c576!==undefined&&_0x1af822[_0x15c1ee(0x235)]({'path':'flowJson.pageMode','message':_0x15c1ee(0xde)});_0x17d9f7==='INDEPENDENT_FLOW'&&_0x52c576==='PLATFORM_FORM'&&_0x1af822['push']({'path':_0x15c1ee(0x1da),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x17d9f7===_0x15c1ee(0x122)||_0x17d9f7===_0x15c1ee(0x1b8))&&validateCustomPageNavigation(_0x3a165b,_0x17d9f7,_0x52c576,_0x1af822);if(_0x17d9f7!==_0x15c1ee(0x122)||!Array[_0x15c1ee(0x136)](_0x3a165b['flowJson']['nodes']))return;_0x3a165b[_0x15c1ee(0xf1)]['nodes'][_0x15c1ee(0x17b)]((_0x1f367f,_0x30df45)=>{const _0x11c95f=_0x15c1ee;isRecord(_0x1f367f)&&_0x1f367f[_0x11c95f(0x222)]===_0x11c95f(0x158)&&_0x1f367f['taskMode']===_0x11c95f(0x16d)&&_0x1af822[_0x11c95f(0x235)]({'path':'flowJson.nodes['+_0x30df45+_0x11c95f(0x162),'message':_0x11c95f(0x1ee)});});}function validateCustomPageNavigation(_0x2e9fa3,_0x2c8c0b,_0xd9c7aa,_0x491711){const _0x50980f=a299_0x3070f7,_0x55319d=_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x143)];_0x55319d!==undefined&&_0x491711[_0x50980f(0x235)]({'path':'flowJson.startPageId','message':_0x50980f(0x178)});const _0x51a5e3=_0x2e9fa3['flowJson'][_0x50980f(0x1dc)];_0x51a5e3!==undefined&&(typeof _0x51a5e3!==_0x50980f(0x1e9)||_0x51a5e3[_0x50980f(0xf8)]()==='')&&_0x491711[_0x50980f(0x235)]({'path':_0x50980f(0x234),'message':_0x50980f(0x13b)});const _0x6f6a36=Array[_0x50980f(0x136)](_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x244)])?_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x244)][_0x50980f(0x200)]((_0x8d198b,_0x3dbfee)=>({'node':_0x8d198b,'index':_0x3dbfee}))['filter'](({node:_0x5bbb37})=>isRecord(_0x5bbb37)&&_0x5bbb37[_0x50980f(0x246)]!==undefined):[],_0x318b86=_0x51a5e3!==undefined||_0x6f6a36[_0x50980f(0xda)]>0x0,_0xe793b5=_0xd9c7aa===undefined&&_0x2c8c0b===_0x50980f(0x1b8)?_0x50980f(0x161):_0xd9c7aa;_0x318b86&&(_0x2c8c0b!==_0x50980f(0x1b8)||_0xe793b5!==_0x50980f(0x161))&&(_0x51a5e3!==undefined&&_0x491711[_0x50980f(0x235)]({'path':'flowJson.startPath','message':_0x50980f(0x1c2)}),_0x6f6a36[_0x50980f(0x17b)](({index:_0x5397c5})=>{const _0x368543=_0x50980f;_0x491711['push']({'path':'flowJson.nodes['+_0x5397c5+_0x368543(0x1cb),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x2423a2,_0xf292bd,_0x25e298={}){const _0x1ffbd5=a299_0x3070f7,_0x555dc6=resolve(_0x2423a2),_0x24b449=_0x555dc6+'.'+process[_0x1ffbd5(0x16a)]+'.'+randomUUID()+_0x1ffbd5(0x18d),_0x2c32aa=JSON[_0x1ffbd5(0x247)](_0xf292bd,null,0x2)+'\x0a';let _0x4f8287;try{try{_0x4f8287=(await stat(_0x555dc6))[_0x1ffbd5(0x24a)]&0x1ff;}catch{_0x4f8287=undefined;}await writeFile(_0x24b449,_0x2c32aa,{'encoding':_0x1ffbd5(0x16f),'flag':'wx','mode':_0x4f8287??0x1a4});if(_0x4f8287!==undefined)await chmod(_0x24b449,_0x4f8287);_0x25e298['overwrite']===![]?(await link(_0x24b449,_0x555dc6),await unlink(_0x24b449)):await rename(_0x24b449,_0x555dc6);}finally{await unlink(_0x24b449)[_0x1ffbd5(0x13f)](()=>undefined);}}function validateOuterMetadata(_0x12b023,_0x361cd3){const _0x422e51=a299_0x3070f7;(typeof _0x12b023[_0x422e51(0x139)]!==_0x422e51(0x1e9)||_0x12b023[_0x422e51(0x139)]['trim']()==='')&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x139),'message':_0x422e51(0x1c8)});_0x12b023[_0x422e51(0x170)]!==undefined&&typeof _0x12b023[_0x422e51(0x170)]!==_0x422e51(0x1e9)&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x170),'message':_0x422e51(0x248)});if(_0x12b023['flowType']===undefined||_0x12b023[_0x422e51(0x177)]===null)_0x361cd3[_0x422e51(0x235)]({'path':'flowType','message':'flowType\x20is\x20required.'});else(typeof _0x12b023[_0x422e51(0x177)]!==_0x422e51(0x1e9)||!FLOW_TYPES['has'](_0x12b023[_0x422e51(0x177)]))&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x177),'message':_0x422e51(0x207)+String(_0x12b023[_0x422e51(0x177)])+'.'});_0x12b023['datasetCode']!==undefined&&typeof _0x12b023['datasetCode']!==_0x422e51(0x1e9)&&_0x361cd3['push']({'path':'datasetCode','message':_0x422e51(0x174)});_0x12b023[_0x422e51(0x1df)]===undefined&&_0x12b023[_0x422e51(0xf3)]!==undefined&&(!Number[_0x422e51(0x209)](_0x12b023[_0x422e51(0xf3)])||_0x12b023[_0x422e51(0xf3)]<=0x0)&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0xf3),'message':_0x422e51(0x202)});if(_0x12b023['pageIds']!==undefined){if(!Array[_0x422e51(0x136)](_0x12b023[_0x422e51(0x1df)])||_0x12b023[_0x422e51(0x1df)][_0x422e51(0x23c)](_0x1853c5=>!Number[_0x422e51(0x209)](_0x1853c5)||_0x1853c5<=0x0))_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x1df),'message':_0x422e51(0x165)});else[...new Set(_0x12b023[_0x422e51(0x1df)])][_0x422e51(0x228)](',')['length']>0x800&&_0x361cd3['push']({'path':_0x422e51(0x1df),'message':_0x422e51(0x18e)});_0x12b023['flowType']===_0x422e51(0x1b8)&&Array[_0x422e51(0x136)](_0x12b023['pageIds'])&&_0x12b023[_0x422e51(0x1df)][_0x422e51(0xda)]>0x0&&_0x361cd3[_0x422e51(0x235)]({'path':'pageIds','message':_0x422e51(0x116)});}_0x12b023[_0x422e51(0x177)]===_0x422e51(0x1b8)&&_0x12b023[_0x422e51(0x1ff)]!==undefined&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x1ff),'message':_0x422e51(0x20b)}),_0x12b023[_0x422e51(0x177)]===_0x422e51(0x1b8)&&_0x12b023[_0x422e51(0x1df)]===undefined&&_0x12b023[_0x422e51(0xf3)]!==undefined&&_0x361cd3['push']({'path':_0x422e51(0xf3),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0xc00ea2,_0x1a0b1){const _0x528662=a299_0x3070f7;if(!isRecord(_0xc00ea2)){_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0xf1),'message':_0x528662(0x146)});return;}!Array[_0x528662(0x136)](_0xc00ea2[_0x528662(0x244)])&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x1ac),'message':_0x528662(0x23d)});!Array[_0x528662(0x136)](_0xc00ea2['edges'])&&_0x1a0b1[_0x528662(0x235)]({'path':'flowJson.edges','message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x528662(0x183)]['hasOwnProperty'][_0x528662(0x107)](_0xc00ea2,_0x528662(0x128))&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x10d),'message':_0x528662(0x193)+String(_0xc00ea2[_0x528662(0x128)])+_0x528662(0x1b6)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x1cb39f of[_0x528662(0x22a),'formDefinitions',_0x528662(0x189)]){Object['prototype'][_0x528662(0x1c0)][_0x528662(0x107)](_0xc00ea2,_0x1cb39f)&&_0x1a0b1['push']({'path':_0x528662(0x141)+_0x1cb39f,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0xc00ea2[_0x528662(0x244)])||!Array[_0x528662(0x136)](_0xc00ea2[_0x528662(0x1c9)]))return;const _0x1b8653=new Map(),_0xaa21cd=[],_0x32ca85=[],_0x1b6e62=new Map(),_0x5b6d0b=new Map(),_0x1d20c7=new Set();let _0x665887=0x0;_0xc00ea2[_0x528662(0x244)][_0x528662(0x17b)]((_0x553490,_0x47b72b)=>{const _0x48fc85=_0x528662,_0x331161=_0x48fc85(0xf7)+_0x47b72b+']';if(!isRecord(_0x553490)){_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161,'message':_0x48fc85(0xe8)});return;}const _0x58bfbe=_0x553490;if(typeof _0x58bfbe['id']!==_0x48fc85(0x1e9)||!BPMN_ID_PATTERN[_0x48fc85(0x129)](_0x58bfbe['id']))_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161+'.id','message':_0x48fc85(0x13c)});else _0x1b8653[_0x48fc85(0x196)](_0x58bfbe['id'])?_0x1a0b1['push']({'path':_0x331161+_0x48fc85(0x22e),'message':_0x48fc85(0x253)+_0x58bfbe['id']+'.'}):(_0x1b8653[_0x48fc85(0x1ab)](_0x58bfbe['id'],_0x58bfbe),_0x1d20c7[_0x48fc85(0x1be)](_0x58bfbe['id']));if(!NODE_TYPES[_0x48fc85(0x196)](_0x58bfbe[_0x48fc85(0x222)]))_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161+_0x48fc85(0x1d5),'message':_0x48fc85(0xf9)+String(_0x58bfbe[_0x48fc85(0x222)])+'.'});else{if(_0x58bfbe[_0x48fc85(0x222)]==='START')_0xaa21cd[_0x48fc85(0x235)](_0x58bfbe['id']);else _0x58bfbe['type']===_0x48fc85(0xe5)&&_0x32ca85['push'](_0x58bfbe['id']);}_0x58bfbe[_0x48fc85(0x222)]===_0x48fc85(0x158)&&(_0x58bfbe['taskMode']===undefined||_0x58bfbe[_0x48fc85(0x1dd)]===_0x48fc85(0x158))&&(_0x665887+=0x1);validateNode(_0x58bfbe,_0x331161,_0x1a0b1);if(_0x58bfbe['type']===_0x48fc85(0x11c)){const _0xfdad78=resolveEffectiveResultVariable(_0x58bfbe[_0x48fc85(0x124)],![]);_0xfdad78&&(registerResultVariableOwner(_0x5b6d0b,_0xfdad78,_0x58bfbe['id'],_0x1a0b1),!_0x1b6e62[_0x48fc85(0x196)](_0xfdad78)&&_0x1b6e62[_0x48fc85(0x1ab)](_0xfdad78,_0x58bfbe['id']));}if(_0x58bfbe['type']===_0x48fc85(0x158)&&isRecord(_0x58bfbe[_0x48fc85(0x191)])&&_0x58bfbe[_0x48fc85(0x191)][_0x48fc85(0x1e8)]===!![]&&_0x58bfbe[_0x48fc85(0x191)][_0x48fc85(0x220)]===_0x48fc85(0x134)){const _0x2b7bb7=resolveEffectiveResultVariable(_0x58bfbe['timeout'][_0x48fc85(0x124)],!![]);_0x2b7bb7&&registerResultVariableOwner(_0x5b6d0b,_0x2b7bb7,_0x58bfbe['id']+_0x48fc85(0x241),_0x1a0b1);}});_0xaa21cd[_0x528662(0xda)]!==0x1&&_0x1a0b1[_0x528662(0x235)]({'path':'flowJson.nodes','message':_0x528662(0x131)});_0x32ca85[_0x528662(0xda)]===0x0&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x1ac),'message':_0x528662(0x1a3)});const _0x52c8b=new Map(),_0x30aaac=new Map(),_0x1fa19e=new Map(),_0x332a5a=new Set();_0xc00ea2[_0x528662(0x1c9)][_0x528662(0x17b)]((_0x3a6aba,_0x28c238)=>{const _0x66ab65=_0x528662,_0x43f97d=_0x66ab65(0x1c6)+_0x28c238+']';if(!isRecord(_0x3a6aba)){_0x1a0b1['push']({'path':_0x43f97d,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x42f0b8=_0x3a6aba;_0x1fa19e['set'](_0x42f0b8,_0x43f97d);const _0x2a3e76=resolveEdgeEndpoint(_0x42f0b8['source'],_0x42f0b8['sourceNodeId']),_0x20a48b=resolveEdgeEndpoint(_0x42f0b8['target'],_0x42f0b8[_0x66ab65(0x106)]);if(!_0x2a3e76)_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x216),'message':_0x66ab65(0x19b)});if(!_0x20a48b)_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x175),'message':_0x66ab65(0x10a)});_0x2a3e76&&!_0x1b8653[_0x66ab65(0x196)](_0x2a3e76)&&_0x1a0b1['push']({'path':_0x43f97d+_0x66ab65(0x216),'message':_0x66ab65(0x10f)+_0x2a3e76+'.'});_0x20a48b&&!_0x1b8653[_0x66ab65(0x196)](_0x20a48b)&&_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x175),'message':_0x66ab65(0x1cf)+_0x20a48b+'.'});if(_0x42f0b8['id']!==undefined){if(typeof _0x42f0b8['id']!==_0x66ab65(0x1e9)||!BPMN_ID_PATTERN[_0x66ab65(0x129)](_0x42f0b8['id']))_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x22e),'message':_0x66ab65(0x245)});else{if(_0x1d20c7['has'](_0x42f0b8['id']))_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x22e),'message':_0x66ab65(0x1af)+_0x42f0b8['id']+'.'});else!_0x1d20c7[_0x66ab65(0x196)](_0x42f0b8['id'])&&_0x1d20c7[_0x66ab65(0x1be)](_0x42f0b8['id']);}}if(_0x2a3e76&&_0x20a48b){const _0x263d19=_0x2a3e76+'\x00'+_0x20a48b+'\x00'+(_0x42f0b8[_0x66ab65(0x20d)]??_0x66ab65(0x20e));_0x332a5a[_0x66ab65(0x196)](_0x263d19)?_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d,'message':_0x66ab65(0x172)+_0x2a3e76+_0x66ab65(0x210)+_0x20a48b+'\x20('+(_0x42f0b8[_0x66ab65(0x20d)]??'ALWAYS')+').'}):_0x332a5a[_0x66ab65(0x1be)](_0x263d19);}validateEdge(_0x42f0b8,_0x43f97d,_0x1a0b1),_0x2a3e76&&_0x20a48b&&(_0x52c8b['get'](_0x2a3e76)?.[_0x66ab65(0x235)](_0x42f0b8)??_0x52c8b[_0x66ab65(0x1ab)](_0x2a3e76,[_0x42f0b8]),_0x30aaac[_0x66ab65(0x194)](_0x20a48b)?.[_0x66ab65(0x235)](_0x42f0b8)??_0x30aaac[_0x66ab65(0x1ab)](_0x20a48b,[_0x42f0b8]));});if(_0xaa21cd['length']!==0x1)return;validateGraphShape(_0x1b8653,_0xaa21cd[0x0],_0x32ca85,_0x52c8b,_0x30aaac,_0x1fa19e,_0x1a0b1),validateScriptResultReferences(_0x1b8653,_0xaa21cd[0x0],_0x52c8b,_0x30aaac,_0x1fa19e,_0x1b6e62,_0x1a0b1),validateApprovalResults(_0x1b8653,_0x665887,_0x32ca85,_0x1a0b1);}function validateNode(_0x19c843,_0x13f39a,_0x3d4dcb){const _0x5477cb=a299_0x3070f7;for(const _0x4cb2d9 of[_0x5477cb(0x239),'formPermission']){Object[_0x5477cb(0x183)]['hasOwnProperty']['call'](_0x19c843,_0x4cb2d9)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+'.'+_0x4cb2d9,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x5477cb(0x196)](_0x19c843['type']))return;(typeof _0x19c843[_0x5477cb(0x215)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0x215)][_0x5477cb(0xf8)]()==='')&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x198),'message':_0x5477cb(0x155)});_0x19c843[_0x5477cb(0xf3)]!==undefined&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x199),'message':_0x5477cb(0x250)});if(_0x19c843[_0x5477cb(0x246)]!==undefined){if(typeof _0x19c843[_0x5477cb(0x246)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0x246)]['trim']()==='')_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1a8),'message':_0x5477cb(0x108)});else _0x19c843[_0x5477cb(0x222)]!==_0x5477cb(0x158)&&_0x19c843['type']!==_0x5477cb(0xe5)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1a8),'message':_0x5477cb(0x19d)});}const _0xa66147=_0x19c843[_0x5477cb(0x18f)];if(!isRecord(_0xa66147))_0x3d4dcb['push']({'path':_0x13f39a+_0x5477cb(0x14e),'message':_0x5477cb(0x1ce)});else for(const _0xbf13e2 of['x','y']){const _0x404b01=_0xa66147[_0xbf13e2];(typeof _0x404b01!==_0x5477cb(0x125)||!Number['isFinite'](_0x404b01)||_0x404b01<0x0)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1e5)+_0xbf13e2,'message':_0x5477cb(0x1eb)+_0xbf13e2+_0x5477cb(0x11f)});}if(_0x19c843[_0x5477cb(0x222)]===_0x5477cb(0x158)){const _0x503834=_0x19c843['approvalMode']??_0x5477cb(0x1fe),_0x142d7a=_0x19c843[_0x5477cb(0x1dd)]??_0x5477cb(0x158);!APPROVAL_TASK_MODES[_0x5477cb(0x196)](_0x142d7a)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x132),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x142d7a)+'.'});!APPROVAL_MODES['has'](_0x503834)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x147),'message':_0x5477cb(0xfd)+String(_0x503834)+'.'});if(!isRecord(_0x19c843[_0x5477cb(0x12c)]))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x151),'message':_0x5477cb(0x16b)});else{const _0x34f07d=_0x19c843[_0x5477cb(0x12c)][_0x5477cb(0x1b7)];_0x34f07d!==_0x5477cb(0x21b)&&_0x34f07d!==_0x5477cb(0x176)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x21e),'message':_0x5477cb(0x1d7)});if(_0x34f07d===_0x5477cb(0x21b)){const _0x235578=_0x19c843['assignee'][_0x5477cb(0x1b9)];if(!Array[_0x5477cb(0x136)](_0x235578)||_0x235578['length']===0x0)_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x24e),'message':_0x5477cb(0x22f)});else{const _0x5d4be0=_0x235578[_0x5477cb(0x169)](_0x4396aa=>!isValidUserId(_0x4396aa));_0x5d4be0>=0x0&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x102)+_0x5d4be0+']','message':_0x5477cb(0x126)});const _0x15483d=new Set(_0x235578[_0x5477cb(0x1aa)](isValidUserId)[_0x5477cb(0x200)](_0x1e054e=>String(_0x1e054e)[_0x5477cb(0xf8)]()));_0x503834===_0x5477cb(0x1fe)&&_0x15483d[_0x5477cb(0x138)]>0x1&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x24e),'message':_0x5477cb(0xd9)});}}if(_0x34f07d===_0x5477cb(0x176)){const _0x5a5ef2=_0x19c843[_0x5477cb(0x12c)][_0x5477cb(0x1fb)],_0x56d5ce=typeof _0x5a5ef2===_0x5477cb(0x125)||typeof _0x5a5ef2===_0x5477cb(0x1e9)?Number(String(_0x5a5ef2)['trim']()):Number['NaN'];(!Number['isSafeInteger'](_0x56d5ce)||_0x56d5ce<=0x0)&&_0x3d4dcb['push']({'path':_0x13f39a+_0x5477cb(0x237),'message':_0x5477cb(0x18c)});}}if(_0x19c843[_0x5477cb(0x204)]!==undefined){if(!isRecord(_0x19c843[_0x5477cb(0x204)]))_0x3d4dcb['push']({'path':_0x13f39a+'.transferCandidates','message':_0x5477cb(0x187)});else{if(_0x19c843[_0x5477cb(0x204)][_0x5477cb(0x1b7)]!==_0x5477cb(0x21b))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x19c),'message':_0x5477cb(0x117)});else{const _0x2b1566=_0x19c843['transferCandidates'][_0x5477cb(0x1b9)];if(!Array[_0x5477cb(0x136)](_0x2b1566)||_0x2b1566['length']===0x0)_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x133),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x3be130=_0x2b1566[_0x5477cb(0x169)](_0xec56b0=>!isValidUserId(_0xec56b0));_0x3be130>=0x0&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x205)+_0x3be130+']','message':_0x5477cb(0x195)});}}}}}_0x19c843['sequential']!==undefined&&typeof _0x19c843['sequential']!=='boolean'&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1e7),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x19c843['type']==='SCRIPT'){(typeof _0x19c843[_0x5477cb(0xdc)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0xdc)][_0x5477cb(0xf8)]()==='')&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x12e),'message':_0x5477cb(0x1f0)});if(_0x19c843[_0x5477cb(0x124)]!==undefined){if(typeof _0x19c843[_0x5477cb(0x124)]!==_0x5477cb(0x1e9)||!VARIABLE_PATTERN[_0x5477cb(0x129)](_0x19c843[_0x5477cb(0x124)]))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+'.resultVariable','message':_0x5477cb(0x1f4)});else(RESERVED_RESULT_VARIABLES[_0x5477cb(0x196)](_0x19c843[_0x5477cb(0x124)])||_0x19c843['resultVariable'][_0x5477cb(0x218)](_0x5477cb(0x1ad)))&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x121),'message':'Reserved\x20resultVariable:\x20'+_0x19c843[_0x5477cb(0x124)]+'.'});}}validateAsyncExecution(_0x19c843,_0x13f39a,_0x3d4dcb),validateApprovalTimeout(_0x19c843,_0x13f39a,_0x3d4dcb),validateCcConfig(_0x19c843,_0x13f39a,_0x3d4dcb),_0x19c843[_0x5477cb(0x222)]===_0x5477cb(0x229)&&validateNotificationConfig(_0x19c843['config'],_0x13f39a+_0x5477cb(0x1e6),_0x3d4dcb);}function validateAsyncExecution(_0x3f4be0,_0x905a0c,_0x5b9fc3){const _0x5c11b5=a299_0x3070f7;if(_0x3f4be0['async']===undefined)return;if(!isRecord(_0x3f4be0[_0x5c11b5(0x242)])){_0x5b9fc3['push']({'path':_0x905a0c+_0x5c11b5(0x1b4),'message':_0x5c11b5(0x1f6)});return;}if(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==undefined&&typeof _0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==_0x5c11b5(0x152)){_0x5b9fc3[_0x5c11b5(0x235)]({'path':_0x905a0c+'.async.enabled','message':_0x5c11b5(0x105)});return;}if(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==!![])return;_0x3f4be0['type']!==_0x5c11b5(0x11c)&&_0x5b9fc3[_0x5c11b5(0x235)]({'path':_0x905a0c+_0x5c11b5(0x1b4),'message':_0x5c11b5(0xfa)});const _0xc2e22e=_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x115)]??0x3;(!Number['isInteger'](_0xc2e22e)||_0xc2e22e<0x1||_0xc2e22e>MAX_ASYNC_RETRY_COUNT)&&_0x5b9fc3['push']({'path':_0x905a0c+_0x5c11b5(0xe2),'message':_0x5c11b5(0x1db)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3f4be0['async']['retryInterval']!==undefined&&validateTimeAmount(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0xe6)],_0x905a0c+_0x5c11b5(0x15f),_0x5b9fc3);}function validateApprovalTimeout(_0x677c40,_0x1392ea,_0x5a9025){const _0x490ba6=a299_0x3070f7;if(_0x677c40[_0x490ba6(0x191)]===undefined)return;if(!isRecord(_0x677c40[_0x490ba6(0x191)])){_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x241),'message':_0x490ba6(0x19a)});return;}if(_0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1e8)]!==undefined&&typeof _0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1e8)]!=='boolean'){_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x22c),'message':_0x490ba6(0x257)});return;}if(_0x677c40['timeout'][_0x490ba6(0x1e8)]!==!![])return;if(_0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1ca)]!==undefined&&typeof _0x677c40['timeout'][_0x490ba6(0x1ca)]!==_0x490ba6(0x152)){_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+'.timeout.interrupting','message':_0x490ba6(0x1a6)});return;}_0x677c40[_0x490ba6(0x222)]!==_0x490ba6(0x158)&&_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x241),'message':_0x490ba6(0x1a4)});validateTimeAmount(_0x677c40['timeout']['duration'],_0x1392ea+'.timeout.duration',_0x5a9025);const _0x2c2dd8=_0x677c40[_0x490ba6(0x191)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x490ba6(0x196)](_0x2c2dd8)){_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x12a),'message':_0x490ba6(0x130)});return;}(_0x677c40[_0x490ba6(0x1dd)]??_0x490ba6(0x158))==='HANDLE'&&_0x2c2dd8!==_0x490ba6(0x134)&&_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x12a),'message':_0x490ba6(0x1c1)});const _0x1b1af5=_0x677c40['timeout'][_0x490ba6(0x1ca)]??_0x2c2dd8!==_0x490ba6(0x134);if(_0x2c2dd8==='EXECUTE_BFF')_0x1b1af5&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x11a),'message':_0x490ba6(0x23f)}),(typeof _0x677c40[_0x490ba6(0x191)][_0x490ba6(0xdc)]!=='string'||_0x677c40[_0x490ba6(0x191)]['scriptName'][_0x490ba6(0xf8)]()==='')&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x17d),'message':_0x490ba6(0x1a9)}),validateOptionalResultVariable(_0x677c40['timeout'][_0x490ba6(0x124)],_0x1392ea+_0x490ba6(0x254),_0x5a9025);else!_0x1b1af5&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x11a),'message':_0x2c2dd8+_0x490ba6(0x1cc)});}function validateTimeAmount(_0x543b78,_0x389a2a,_0x1d9fd2){const _0x3e07ae=a299_0x3070f7;if(!isRecord(_0x543b78)){_0x1d9fd2[_0x3e07ae(0x235)]({'path':_0x389a2a,'message':_0x3e07ae(0x232)});return;}(!Number[_0x3e07ae(0x101)](_0x543b78[_0x3e07ae(0x13a)])||Number(_0x543b78[_0x3e07ae(0x13a)])<=0x0)&&_0x1d9fd2['push']({'path':_0x389a2a+'.value','message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x3e07ae(0x196)](_0x543b78['unit'])&&_0x1d9fd2[_0x3e07ae(0x235)]({'path':_0x389a2a+_0x3e07ae(0x236),'message':_0x3e07ae(0x22b)});}function validateOptionalResultVariable(_0x5d0d6d,_0x295afe,_0x1b5882){const _0x739991=a299_0x3070f7;if(_0x5d0d6d===undefined||_0x5d0d6d===null||_0x5d0d6d==='')return;if(typeof _0x5d0d6d!=='string'||!VARIABLE_PATTERN[_0x739991(0x129)](_0x5d0d6d))_0x1b5882[_0x739991(0x235)]({'path':_0x295afe,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x739991(0x196)](_0x5d0d6d)||_0x5d0d6d['startsWith'](_0x739991(0x1ad)))&&_0x1b5882[_0x739991(0x235)]({'path':_0x295afe,'message':_0x739991(0xfc)+_0x5d0d6d+'.'});}function validateCcConfig(_0x236dbd,_0x1ebc1d,_0x17be0b){const _0x259c24=a299_0x3070f7;if(_0x236dbd['cc']===undefined)return;if(!isRecord(_0x236dbd['cc'])){_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x213),'message':_0x259c24(0x1fa)});return;}_0x236dbd[_0x259c24(0x222)]!=='END'&&_0x236dbd['type']!=='APPROVAL'&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x213),'message':_0x259c24(0x1de)});Object[_0x259c24(0x183)][_0x259c24(0x1c0)]['call'](_0x236dbd['cc'],_0x259c24(0x185))&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0xfe),'message':UNSUPPORTED_FORM_MESSAGE});const _0x1932b4=_0x236dbd['cc'][_0x259c24(0x16e)];if(!Array[_0x259c24(0x136)](_0x1932b4)||_0x1932b4[_0x259c24(0xda)]===0x0)_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x1b1),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x1932b4[_0x259c24(0xda)]>MAX_CC_RECIPIENTS&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+'.cc.recipientUserIds','message':_0x259c24(0x214)+MAX_CC_RECIPIENTS+_0x259c24(0x1f3)});const _0x206b5b=new Set();_0x1932b4[_0x259c24(0x17b)]((_0x2d0102,_0x2e6773)=>{const _0x42f9d2=_0x259c24;if(typeof _0x2d0102!=='string'||_0x2d0102['trim']()==='')_0x17be0b[_0x42f9d2(0x235)]({'path':_0x1ebc1d+'.cc.recipientUserIds['+_0x2e6773+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x206b5b[_0x42f9d2(0x196)](_0x2d0102[_0x42f9d2(0xf8)]())?_0x17be0b[_0x42f9d2(0x235)]({'path':_0x1ebc1d+_0x42f9d2(0x1fd)+_0x2e6773+']','message':_0x42f9d2(0xfb)+_0x2d0102['trim']()+'.'}):_0x206b5b[_0x42f9d2(0x1be)](_0x2d0102[_0x42f9d2(0xf8)]());});}validateStringArray(_0x236dbd['cc'][_0x259c24(0x100)],_0x1ebc1d+_0x259c24(0x15c),_0x17be0b);}function validateStringArray(_0x3062ea,_0x1f9326,_0x1cf06c){const _0x1478aa=a299_0x3070f7;if(_0x3062ea===undefined)return;if(!Array[_0x1478aa(0x136)](_0x3062ea)){_0x1cf06c[_0x1478aa(0x235)]({'path':_0x1f9326,'message':_0x1478aa(0x1fc)});return;}const _0x47f846=new Set();_0x3062ea['forEach']((_0x238fe6,_0xffdd04)=>{const _0x15c5e7=_0x1478aa;if(typeof _0x238fe6!=='string'||_0x238fe6['trim']()==='')_0x1cf06c['push']({'path':_0x1f9326+'['+_0xffdd04+']','message':_0x15c5e7(0x181)});else _0x47f846[_0x15c5e7(0x196)](_0x238fe6[_0x15c5e7(0xf8)]())?_0x1cf06c['push']({'path':_0x1f9326+'['+_0xffdd04+']','message':'Duplicate\x20value:\x20'+_0x238fe6[_0x15c5e7(0xf8)]()+'.'}):_0x47f846['add'](_0x238fe6['trim']());});}function validateNotificationConfig(_0x4b8bc4,_0x1262fd,_0x2f9e85){const _0x491e6d=a299_0x3070f7;if(!isRecord(_0x4b8bc4)){_0x2f9e85['push']({'path':_0x1262fd,'message':_0x491e6d(0x13e)});return;}if(_0x4b8bc4[_0x491e6d(0x119)]!==undefined&&_0x4b8bc4[_0x491e6d(0x119)]!==null){if(typeof _0x4b8bc4[_0x491e6d(0x119)]!=='string')_0x2f9e85['push']({'path':_0x1262fd+'.version','message':_0x491e6d(0x154)});else _0x4b8bc4[_0x491e6d(0x119)][_0x491e6d(0xf8)]()&&_0x4b8bc4[_0x491e6d(0x119)][_0x491e6d(0xf8)]()!=='v1'&&_0x2f9e85['push']({'path':_0x1262fd+_0x491e6d(0x104),'message':_0x491e6d(0x164)+_0x4b8bc4[_0x491e6d(0x119)]+'.'});}const _0x3fba50=requireNotificationString(_0x4b8bc4['configCode'],_0x1262fd+_0x491e6d(0x1d3),'Notification\x20configCode\x20is\x20required.',_0x2f9e85);_0x3fba50?.['includes']('${')&&_0x2f9e85['push']({'path':_0x1262fd+'.configCode','message':_0x491e6d(0x1ba)});if(_0x4b8bc4['failurePolicy']!==undefined&&_0x4b8bc4[_0x491e6d(0x192)]!==null){if(typeof _0x4b8bc4['failurePolicy']!==_0x491e6d(0x1e9))_0x2f9e85[_0x491e6d(0x235)]({'path':_0x1262fd+_0x491e6d(0x1e3),'message':_0x491e6d(0x1cd)});else!NOTIFICATION_FAILURE_POLICIES[_0x491e6d(0x196)](_0x4b8bc4[_0x491e6d(0x192)][_0x491e6d(0xf8)]()[_0x491e6d(0x135)]())&&_0x2f9e85[_0x491e6d(0x235)]({'path':_0x1262fd+_0x491e6d(0x1e3),'message':_0x491e6d(0x249)});}!isRecord(_0x4b8bc4['template'])?_0x2f9e85['push']({'path':_0x1262fd+_0x491e6d(0x201),'message':_0x491e6d(0x1bf)}):validateNotificationTemplate(_0x4b8bc4[_0x491e6d(0x10e)],_0x1262fd+_0x491e6d(0x201),_0x2f9e85),validateNotificationRecipients(_0x4b8bc4[_0x491e6d(0x14f)],_0x1262fd+_0x491e6d(0x163),_0x2f9e85);}function validateNotificationTemplate(_0x578d30,_0x3c3c3d,_0x3acdda){const _0x1523c8=a299_0x3070f7;for(const _0x45b61c of['title',_0x1523c8(0x11d)]){const _0xdc4e18=requireNotificationString(_0x578d30[_0x45b61c],_0x3c3c3d+'.'+_0x45b61c,'Notification\x20template.'+_0x45b61c+_0x1523c8(0x20a),_0x3acdda);if(_0xdc4e18)validateNotificationPlaceholders(_0xdc4e18,_0x3c3c3d+'.'+_0x45b61c,_0x3acdda);}_0x578d30[_0x1523c8(0xff)]!==undefined&&_0x578d30[_0x1523c8(0xff)]!==null&&(typeof _0x578d30['detailMarkdown']!==_0x1523c8(0x1e9)?_0x3acdda[_0x1523c8(0x235)]({'path':_0x3c3c3d+_0x1523c8(0xf5),'message':_0x1523c8(0x238)}):validateNotificationPlaceholders(_0x578d30[_0x1523c8(0xff)],_0x3c3c3d+_0x1523c8(0xf5),_0x3acdda)),validateNotificationFacts(_0x578d30['facts'],_0x3c3c3d+_0x1523c8(0x230),_0x3acdda),validateNotificationActions(_0x578d30[_0x1523c8(0x112)],_0x3c3c3d+_0x1523c8(0x223),_0x3acdda);}function validateNotificationFacts(_0x58e156,_0x47fbc3,_0x5132c7){const _0x1b929c=a299_0x3070f7;if(_0x58e156===undefined||_0x58e156===null)return;if(!Array[_0x1b929c(0x136)](_0x58e156)){_0x5132c7[_0x1b929c(0x235)]({'path':_0x47fbc3,'message':_0x1b929c(0x1a0)});return;}_0x58e156[_0x1b929c(0xda)]>MAX_NOTIFICATION_FACTS&&_0x5132c7[_0x1b929c(0x235)]({'path':_0x47fbc3,'message':_0x1b929c(0x127)+MAX_NOTIFICATION_FACTS+_0x1b929c(0x1f1)}),_0x58e156[_0x1b929c(0x17b)]((_0x54819d,_0x501095)=>{const _0x5cd629=_0x1b929c,_0x3c7a9e=_0x47fbc3+'['+_0x501095+']';if(!isRecord(_0x54819d)){_0x5132c7[_0x5cd629(0x235)]({'path':_0x3c7a9e,'message':_0x5cd629(0x212)});return;}for(const _0x1169cf of[_0x5cd629(0x118),_0x5cd629(0x13a)]){const _0x4fcb8e=requireNotificationString(_0x54819d[_0x1169cf],_0x3c7a9e+'.'+_0x1169cf,_0x5cd629(0x203)+_0x1169cf+_0x5cd629(0x20a),_0x5132c7);_0x4fcb8e&&validateNotificationPlaceholders(_0x4fcb8e,_0x3c7a9e+'.'+_0x1169cf,_0x5132c7);}});}function validateNotificationActions(_0x1aa7b6,_0x38579e,_0x5d2354){const _0xa36096=a299_0x3070f7;if(_0x1aa7b6===undefined||_0x1aa7b6===null)return;if(!Array['isArray'](_0x1aa7b6)){_0x5d2354['push']({'path':_0x38579e,'message':_0xa36096(0x180)});return;}_0x1aa7b6[_0xa36096(0xda)]>MAX_NOTIFICATION_ACTIONS&&_0x5d2354[_0xa36096(0x235)]({'path':_0x38579e,'message':_0xa36096(0x127)+MAX_NOTIFICATION_ACTIONS+_0xa36096(0x1ef)}),_0x1aa7b6['forEach']((_0x20667c,_0x1d8171)=>{const _0x1293ea=_0xa36096,_0x4d2c32=_0x38579e+'['+_0x1d8171+']';if(!isRecord(_0x20667c)){_0x5d2354['push']({'path':_0x4d2c32,'message':_0x1293ea(0xe0)});return;}const _0x2e9af2=requireNotificationString(_0x20667c[_0x1293ea(0x10c)],_0x4d2c32+_0x1293ea(0x157),_0x1293ea(0x11e),_0x5d2354);if(_0x2e9af2)validateNotificationPlaceholders(_0x2e9af2,_0x4d2c32+_0x1293ea(0x157),_0x5d2354);const _0x2b2f29=requireNotificationString(_0x20667c[_0x1293ea(0xe4)],_0x4d2c32+_0x1293ea(0x23e),_0x1293ea(0x14a),_0x5d2354);if(!_0x2b2f29)return;validateNotificationPlaceholders(_0x2b2f29,_0x4d2c32+_0x1293ea(0x23e),_0x5d2354),!/^https?:\/\//i[_0x1293ea(0x129)](_0x2b2f29)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x1293ea(0x129)](_0x2b2f29)&&_0x5d2354[_0x1293ea(0x235)]({'path':_0x4d2c32+_0x1293ea(0x23e),'message':_0x1293ea(0x1c3)});});}function validateNotificationRecipients(_0x30fbbf,_0x4f02af,_0xdaca0f){const _0xb60da=a299_0x3070f7;if(_0x30fbbf===undefined||_0x30fbbf===null)return;if(!Array[_0xb60da(0x136)](_0x30fbbf)){_0xdaca0f[_0xb60da(0x235)]({'path':_0x4f02af,'message':_0xb60da(0x113)});return;}let _0x3df2f8=![];_0x30fbbf[_0xb60da(0x17b)]((_0x493870,_0x4c36a1)=>{const _0x156796=_0xb60da,_0x204d65=_0x4f02af+'['+_0x4c36a1+']';if(!isRecord(_0x493870)){_0xdaca0f[_0x156796(0x235)]({'path':_0x204d65,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x4b8c25=requireNotificationString(_0x493870[_0x156796(0x222)],_0x204d65+_0x156796(0x1d5),_0x156796(0x227),_0xdaca0f);_0x4b8c25&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x4b8c25['toUpperCase']())&&_0xdaca0f['push']({'path':_0x204d65+_0x156796(0x1d5),'message':_0x156796(0x255)});let _0x2fe881='TO';_0x493870[_0x156796(0x140)]!==undefined&&_0x493870[_0x156796(0x140)]!==null&&(typeof _0x493870['role']!==_0x156796(0x1e9)?(_0xdaca0f['push']({'path':_0x204d65+_0x156796(0x1c4),'message':_0x156796(0x1f2)}),_0x2fe881=''):(_0x2fe881=_0x493870[_0x156796(0x140)][_0x156796(0xf8)]()[_0x156796(0x135)](),!NOTIFICATION_RECIPIENT_ROLES[_0x156796(0x196)](_0x2fe881)&&_0xdaca0f[_0x156796(0x235)]({'path':_0x204d65+'.role','message':_0x156796(0x243)})));if(_0x2fe881==='TO')_0x3df2f8=!![];const _0x376d9b=requireNotificationString(_0x493870[_0x156796(0x13a)],_0x204d65+_0x156796(0x1d4),_0x156796(0xf6),_0xdaca0f);_0x376d9b&&validateNotificationPlaceholders(_0x376d9b,_0x204d65+_0x156796(0x1d4),_0xdaca0f);}),_0x30fbbf[_0xb60da(0xda)]>0x0&&!_0x3df2f8&&_0xdaca0f[_0xb60da(0x235)]({'path':_0x4f02af,'message':_0xb60da(0x217)});}function requireNotificationString(_0x2d380a,_0x16ef97,_0x4e492b,_0xba4b0d){const _0x435ee4=a299_0x3070f7;if(typeof _0x2d380a!==_0x435ee4(0x1e9)||_0x2d380a[_0x435ee4(0xf8)]()==='')return _0xba4b0d['push']({'path':_0x16ef97,'message':_0x4e492b}),undefined;return _0x2d380a[_0x435ee4(0xf8)]();}function validateNotificationPlaceholders(_0x2deaf8,_0x6564bf,_0x572c7e){const _0x1b5f5c=a299_0x3070f7;for(const _0x376e06 of _0x2deaf8[_0x1b5f5c(0x14b)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5c9d8b=_0x376e06[0x1]?.['trim']()??'',_0x2da334=_0x5c9d8b[_0x1b5f5c(0x142)]('.'),_0x501cbf=_0x2da334>=0x0?_0x5c9d8b[_0x1b5f5c(0x182)](0x0,_0x2da334):_0x5c9d8b,_0x1550c7=_0x2da334>=0x0?_0x5c9d8b[_0x1b5f5c(0x182)](_0x2da334+0x1)[_0x1b5f5c(0xf8)]():'';(![_0x1b5f5c(0xea),_0x1b5f5c(0x19e),_0x1b5f5c(0x12f)][_0x1b5f5c(0x1c7)](_0x501cbf)||_0x1550c7==='')&&_0x572c7e[_0x1b5f5c(0x235)]({'path':_0x6564bf,'message':_0x1b5f5c(0x24d)+_0x376e06[0x0]+'.'});}_0x2deaf8[_0x1b5f5c(0x24c)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x1b5f5c(0x1c7)]('${')&&_0x572c7e[_0x1b5f5c(0x235)]({'path':_0x6564bf,'message':_0x1b5f5c(0x22d)});}function validateEdge(_0x54583b,_0x1c25e3,_0x2df104){const _0x2222c6=a299_0x3070f7;_0x54583b[_0x2222c6(0x215)]!==undefined&&typeof _0x54583b['name']!=='string'&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+_0x2222c6(0x198),'message':_0x2222c6(0x1d1)}),_0x54583b[_0x2222c6(0x1f5)]!==undefined&&typeof _0x54583b[_0x2222c6(0x1f5)]!==_0x2222c6(0x152)&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x109),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x54583b[_0x2222c6(0x23b)]!==undefined&&(!Array[_0x2222c6(0x136)](_0x54583b[_0x2222c6(0x23b)])?_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0xe7),'message':_0x2222c6(0x1bb)}):_0x54583b[_0x2222c6(0x23b)][_0x2222c6(0x17b)]((_0x3280e3,_0x35d45f)=>{const _0x9e45f8=_0x2222c6;if(!isRecord(_0x3280e3)){_0x2df104['push']({'path':_0x1c25e3+'.waypoints['+_0x35d45f+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x2e0708 of['x','y']){const _0x1c9e75=_0x3280e3[_0x2e0708];(typeof _0x1c9e75!=='number'||!Number[_0x9e45f8(0x17a)](_0x1c9e75))&&_0x2df104['push']({'path':_0x1c25e3+'.waypoints['+_0x35d45f+'].'+_0x2e0708,'message':_0x9e45f8(0x111)+_0x2e0708+_0x9e45f8(0x1f8)});}})),_0x54583b['conditionType']!==undefined&&!CONDITION_TYPES['has'](_0x54583b['conditionType'])&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x1a1),'message':_0x2222c6(0x17c)+String(_0x54583b[_0x2222c6(0x20d)])+'.'}),_0x54583b[_0x2222c6(0x20d)]==='EXPRESSION'&&(typeof _0x54583b['expression']!==_0x2222c6(0x1e9)||_0x54583b[_0x2222c6(0x18b)][_0x2222c6(0xf8)]()==='')&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+'.expression','message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x54583b[_0x2222c6(0x1f5)]===!![]&&_0x54583b['conditionType']!==_0x2222c6(0x20e)&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x109),'message':_0x2222c6(0x17e)}),_0x54583b[_0x2222c6(0x1f5)]===!![]&&typeof _0x54583b[_0x2222c6(0x18b)]===_0x2222c6(0x1e9)&&_0x54583b[_0x2222c6(0x18b)][_0x2222c6(0xf8)]()!==''&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+'.expression','message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x55c933,_0x33b6ea,_0x29f1f3,_0x12283b,_0x4796e7,_0x15edd2,_0x1749b4){const _0x501f02=a299_0x3070f7;for(const [_0x14a6f2,_0x37f963]of _0x55c933){const _0x152146=_0x4796e7[_0x501f02(0x194)](_0x14a6f2)??[],_0x5f29fa=_0x12283b['get'](_0x14a6f2)??[];_0x37f963['type']!==_0x501f02(0x1d9)&&_0x152146[_0x501f02(0xda)]===0x0&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x37f963[_0x501f02(0x222)]!==_0x501f02(0xe5)&&_0x5f29fa[_0x501f02(0xda)]===0x0&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x37f963[_0x501f02(0x222)]===_0x501f02(0x1d9)&&_0x152146[_0x501f02(0xda)]>0x0&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x120)});_0x37f963[_0x501f02(0x222)]===_0x501f02(0xe5)&&_0x5f29fa[_0x501f02(0xda)]>0x0&&_0x1749b4['push']({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x160)});if(_0x37f963[_0x501f02(0x222)]===_0x501f02(0x1a7)){_0x5f29fa[_0x501f02(0xda)]<0x2&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x15e)});const _0x4d7e2e=_0x5f29fa[_0x501f02(0x1aa)](_0x4736b9=>_0x4736b9['defaultFlow']===!![]);_0x4d7e2e[_0x501f02(0xda)]!==0x1&&_0x1749b4['push']({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0x20f)});if(_0x4d7e2e[_0x501f02(0xda)]===0x1){const _0x2c2f03=_0x4d7e2e[0x0],_0x350340=_0x15edd2['get'](_0x2c2f03)??_0x501f02(0x14d);_0x2c2f03[_0x501f02(0x20d)]!==_0x501f02(0x20e)&&_0x1749b4[_0x501f02(0x235)]({'path':_0x350340+_0x501f02(0x1a1),'message':_0x501f02(0xdb)});_0x2c2f03['expression']!==undefined&&_0x1749b4[_0x501f02(0x235)]({'path':_0x350340+_0x501f02(0x153),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x28438d of _0x5f29fa){if(_0x28438d===_0x2c2f03)continue;const _0x3ddf73=_0x15edd2['get'](_0x28438d)??_0x501f02(0x14d);if(_0x28438d[_0x501f02(0x20d)]!==_0x501f02(0xe1))_0x1749b4['push']({'path':_0x3ddf73+_0x501f02(0x1a1),'message':_0x501f02(0x21f)});else(typeof _0x28438d['expression']!=='string'||_0x28438d['expression'][_0x501f02(0xf8)]()==='')&&_0x1749b4['push']({'path':_0x3ddf73+'.expression','message':_0x501f02(0x110)});}}}if(_0x37f963['type']===_0x501f02(0x158)&&(_0x37f963[_0x501f02(0x1dd)]??_0x501f02(0x158))===_0x501f02(0x16d)){if(_0x5f29fa[_0x501f02(0xda)]!==0x1)_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0xf0)});else{const _0x15b224=_0x5f29fa[0x0];((_0x15b224['conditionType']??'ALWAYS')!==_0x501f02(0x20e)||_0x15b224[_0x501f02(0x1f5)]===!![]||typeof _0x15b224['expression']===_0x501f02(0x1e9)&&_0x15b224[_0x501f02(0x18b)][_0x501f02(0xf8)]()!=='')&&_0x1749b4[_0x501f02(0x235)]({'path':_0x15edd2[_0x501f02(0x194)](_0x15b224)??'flowJson.edges','message':_0x501f02(0xdd)});}}else{if(_0x37f963['type']===_0x501f02(0x158)){const _0x5a2de5=_0x5f29fa[_0x501f02(0x200)](_0x1fb11c=>_0x1fb11c[_0x501f02(0x20d)]??_0x501f02(0x20e)),_0x217174=_0x5a2de5[_0x501f02(0x1aa)](_0x49360e=>_0x49360e!=='APPROVED'&&_0x49360e!==_0x501f02(0x156));_0x217174[_0x501f02(0xda)]>0x0&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0x21a)}),_0x5a2de5[_0x501f02(0x1aa)](_0x10cbc4=>_0x10cbc4===_0x501f02(0x1e1))[_0x501f02(0xda)]!==0x1&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x208)}),_0x5a2de5[_0x501f02(0x1aa)](_0x5f1da8=>_0x5f1da8===_0x501f02(0x156))[_0x501f02(0xda)]!==0x1&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x5f29fa[_0x501f02(0x23c)](_0x313b5f=>_0x313b5f[_0x501f02(0x1f5)]===!![])&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0xf4)});}}}const _0x227f20=new Set(),_0xca2b37=_0x29d53d=>{const _0xa0cdbf=_0x501f02;if(_0x227f20[_0xa0cdbf(0x196)](_0x29d53d))return;_0x227f20[_0xa0cdbf(0x1be)](_0x29d53d);for(const _0x34daef of _0x12283b[_0xa0cdbf(0x194)](_0x29d53d)??[]){const _0xec1f39=resolveEdgeEndpoint(_0x34daef[_0xa0cdbf(0x166)],_0x34daef[_0xa0cdbf(0x106)]);if(_0xec1f39&&_0x55c933[_0xa0cdbf(0x196)](_0xec1f39))_0xca2b37(_0xec1f39);}};_0xca2b37(_0x33b6ea);for(const _0x422b23 of _0x55c933['keys']()){!_0x227f20[_0x501f02(0x196)](_0x422b23)&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x422b23,'message':_0x501f02(0x184)});}const _0x3bc4fb=_0x29f1f3['some'](_0x2e3858=>_0x227f20[_0x501f02(0x196)](_0x2e3858));if(!_0x3bc4fb){_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x14d),'message':_0x501f02(0x1ae)});return;}const _0x286e5b=new Set(),_0x2fa09d=_0x3215f1=>{const _0x390f8d=_0x501f02;if(_0x286e5b[_0x390f8d(0x196)](_0x3215f1))return;_0x286e5b[_0x390f8d(0x1be)](_0x3215f1);for(const _0x1598d1 of _0x4796e7[_0x390f8d(0x194)](_0x3215f1)??[]){const _0x555d81=resolveEdgeEndpoint(_0x1598d1[_0x390f8d(0x20c)],_0x1598d1['sourceNodeId']);if(_0x555d81&&_0x55c933[_0x390f8d(0x196)](_0x555d81))_0x2fa09d(_0x555d81);}};for(const _0x3d3045 of _0x29f1f3){if(_0x55c933[_0x501f02(0x196)](_0x3d3045))_0x2fa09d(_0x3d3045);}for(const _0x2653cb of _0x227f20){!_0x286e5b['has'](_0x2653cb)&&_0x1749b4['push']({'path':_0x501f02(0x149)+_0x2653cb,'message':_0x501f02(0x219)});}}function a299_0x4beb(_0x790849,_0x223e23){_0x790849=_0x790849-0xd8;const _0x5ab3e1=a299_0x5ab3();let _0x4beb48=_0x5ab3e1[_0x790849];return _0x4beb48;}function validateApprovalResults(_0x54a03c,_0x27bd9e,_0x1b7924,_0x134261){const _0x36c36c=a299_0x3070f7;if(_0x27bd9e===0x0)return;const _0x223198=new Set(_0x1b7924[_0x36c36c(0x200)](_0x3b45bf=>_0x54a03c[_0x36c36c(0x194)](_0x3b45bf)?.[_0x36c36c(0x1b5)])[_0x36c36c(0x1aa)](_0xfdcc55=>typeof _0xfdcc55===_0x36c36c(0x1e9)));for(const _0x5f5e9a of[_0x36c36c(0x1e1),_0x36c36c(0x156)]){!_0x223198[_0x36c36c(0x196)](_0x5f5e9a)&&_0x134261[_0x36c36c(0x235)]({'path':'flowJson.nodes','message':_0x36c36c(0x1e4)+_0x5f5e9a+'.'});}}function validateScriptResultReferences(_0x2f04b7,_0x186659,_0x2c3120,_0x29783c,_0x19762b,_0x359b7c,_0x150fd5){const _0x1e03fc=a299_0x3070f7;if(_0x359b7c[_0x1e03fc(0x138)]===0x0)return;const _0x31ccb4=new Set(),_0x5b740f=_0x546432=>{const _0x331ae9=_0x1e03fc;if(!_0x31ccb4['has'](_0x546432)&&_0x2f04b7[_0x331ae9(0x196)](_0x546432)){_0x31ccb4[_0x331ae9(0x1be)](_0x546432);for(const _0x4fead1 of _0x2c3120['get'](_0x546432)??[]){const _0x3fcf24=resolveEdgeEndpoint(_0x4fead1['target'],_0x4fead1[_0x331ae9(0x106)]);if(_0x3fcf24)_0x5b740f(_0x3fcf24);}}};_0x5b740f(_0x186659);const _0x5a441a=new Map();for(const _0x34d2db of _0x31ccb4){_0x5a441a['set'](_0x34d2db,_0x34d2db===_0x186659?new Set([_0x186659]):new Set(_0x31ccb4));}let _0x30394d=!![];while(_0x30394d){_0x30394d=![];for(const _0x2b01a0 of _0x31ccb4){if(_0x2b01a0===_0x186659)continue;const _0xd105cb=(_0x29783c[_0x1e03fc(0x194)](_0x2b01a0)??[])[_0x1e03fc(0x200)](_0x12db86=>resolveEdgeEndpoint(_0x12db86[_0x1e03fc(0x20c)],_0x12db86[_0x1e03fc(0x17f)]))['filter'](_0x405476=>Boolean(_0x405476&&_0x31ccb4[_0x1e03fc(0x196)](_0x405476)));if(_0xd105cb[_0x1e03fc(0xda)]===0x0)continue;const _0x927fc2=new Set(_0x5a441a[_0x1e03fc(0x194)](_0xd105cb[0x0])??[]);for(const _0x221e28 of _0xd105cb[_0x1e03fc(0x182)](0x1)){const _0x2c4638=_0x5a441a[_0x1e03fc(0x194)](_0x221e28)??new Set();for(const _0x2dcc55 of _0x927fc2){if(!_0x2c4638[_0x1e03fc(0x196)](_0x2dcc55))_0x927fc2[_0x1e03fc(0xf2)](_0x2dcc55);}}_0x927fc2[_0x1e03fc(0x1be)](_0x2b01a0);const _0x811033=_0x5a441a[_0x1e03fc(0x194)](_0x2b01a0);!setsEqual(_0x811033,_0x927fc2)&&(_0x5a441a['set'](_0x2b01a0,_0x927fc2),_0x30394d=!![]);}}for(const [_0x28896b,_0x588a3c]of _0x2c3120){const _0x436376=_0x5a441a['get'](_0x28896b);if(!_0x436376)continue;for(const _0x31fc21 of _0x588a3c){if(_0x31fc21[_0x1e03fc(0x20d)]!=='EXPRESSION'||typeof _0x31fc21[_0x1e03fc(0x18b)]!==_0x1e03fc(0x1e9))continue;for(const [_0x1cfac8,_0x10e884]of _0x359b7c){expressionReferencesVariable(_0x31fc21['expression'],_0x1cfac8)&&!_0x436376[_0x1e03fc(0x196)](_0x10e884)&&_0x150fd5[_0x1e03fc(0x235)]({'path':(_0x19762b['get'](_0x31fc21)??'flowJson.edges')+_0x1e03fc(0x153),'message':_0x1e03fc(0x233)+_0x1cfac8+',\x20but\x20node\x20'+_0x10e884+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x28896b+'.'});}}}}function a299_0x5ab3(){const _0x19ac21=['utf8','flowDesc','USER','Duplicate\x20edge\x20route:\x20','CONTINUE','datasetCode\x20must\x20be\x20a\x20string.','.target','ROLE','flowType','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','Rabetbase\x20FlowConfig','isFinite','forEach','Unsupported\x20condition\x20type:\x20','.timeout.scriptName','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','sourceNodeId','Notification\x20template.actions\x20must\x20be\x20an\x20array.','value\x20must\x20be\x20a\x20non-empty\x20string.','slice','prototype','Node\x20is\x20not\x20reachable\x20from\x20START.','readSources','approval_sys_initiatorUsername','transferCandidates\x20must\x20be\x20an\x20object.','approval_sys_operationType','formPermissions','^[A-Za-z_][A-Za-z0-9_]*$','expression','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','.tmp','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','position','approval_sys_appCode','timeout','failurePolicy','Unsupported\x20schemaVersion:\x20','get','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','has','approval_sys_initiatorUserId','.name','.pageId','timeout\x20must\x20be\x20an\x20object.','edge\x20source\x20is\x20required.','.transferCandidates.strategy','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','context','64744jPOhci','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.conditionType','approval.simple-flow.v1','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','ANY','timeout.interrupting\x20must\x20be\x20a\x20boolean.','CONDITION','.path','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','filter','set','flowJson.nodes','approval_sys_','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Duplicate\x20BPMN\x20element\x20id:\x20','DAYS','.cc.recipientUserIds','BCC','flowKey','.async','result','.\x20This\x20CLI\x20supports\x20only\x20','strategy','INDEPENDENT_FLOW','userIds','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','waypoints\x20must\x20be\x20an\x20array.','empty_metadata_removed','462193iYjiCq','add','NOTIFICATION\x20node\x20requires\x20template.','hasOwnProperty','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','.role','#/$defs/flowEdge','flowJson.edges[','includes','flowName\x20is\x20required.','edges','interrupting','].path','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','failurePolicy\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','Edge\x20target\x20node\x20not\x20found:\x20','AUTO_APPROVE','edge\x20name\x20must\x20be\x20a\x20string.','scriptResult','.configCode','.value','.type','MINUTES','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','https://json-schema.org/draft/2020-12/schema','START','flowJson.pageMode','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','startPath','taskMode','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','pageIds','config','APPROVED','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.failurePolicy','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.position.','.config','.sequential','enabled','string','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','position.','1377565LNGXJO','ALL','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','\x20actions.','SCRIPT\x20node\x20requires\x20scriptName.','\x20facts.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','\x20users.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','defaultFlow','async\x20must\x20be\x20an\x20object.','SECONDS','\x20must\x20be\x20a\x20finite\x20number.','configCode','cc\x20must\x20be\x20an\x20object.','roleId','value\x20must\x20be\x20an\x20array.','.cc.recipientUserIds[','SINGLE','datasetCode','map','.template','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20fact.','transferCandidates','.transferCandidates.userIds[','entries','Unsupported\x20flowType:\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','isSafeInteger','\x20is\x20required.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','source','conditionType','ALWAYS','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','\x20->\x20','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20fact\x20must\x20be\x20an\x20object.','.cc','cc.recipientUserIds\x20supports\x20at\x20most\x20','name','.source','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startsWith','Node\x20cannot\x20reach\x20any\x20END.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','FIXED','856ydQMco','^[1-9][0-9]*$','.assignee.strategy','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','action','__rabetbase_local_validation__','type','.actions','warnings','bindDatasetCode','array','Notification\x20recipient.type\x20is\x20required.','join','NOTIFICATION','formSchema','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','.timeout.enabled','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.id','FIXED\x20assignee\x20requires\x20userIds.','.facts','parse','duration\x20requires\x20value\x20and\x20unit.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','flowJson.startPath','push','.unit','.assignee.roleId','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','form','11gUvNOp','waypoints','some','nodes\x20must\x20be\x20an\x20array.','.url','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.timeout','async','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','nodes','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','path','stringify','flowDesc\x20must\x20be\x20a\x20string.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','mode','message','replace','Unsupported\x20notification\x20placeholder:\x20','.assignee.userIds','legacy_field_removed','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','5molHOL','integer','Duplicate\x20node\x20id:\x20','.timeout.resultVariable','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','366614PkBHGM','timeout.enabled\x20must\x20be\x20a\x20boolean.','appCode','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','length','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','scriptName','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','#/$defs/timeAmount','Notification\x20action\x20must\x20be\x20an\x20object.','EXPRESSION','.async.retryCount','#/$defs/userId','url','END','retryInterval','.waypoints','node\x20must\x20be\x20an\x20object.','templateName','event','approval_sys_dataId','https://lovrabet.com/schema/rabetbase-flow-config.json','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','approval_sys_processInstanceId','FAIL','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','flowJson','delete','pageId','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.detailMarkdown','Notification\x20recipient.value\x20is\x20required.','flowJson.nodes[','trim','Unsupported\x20node\x20type:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','Duplicate\x20cc\x20recipient\x20userId:\x20','Reserved\x20resultVariable:\x20','Unsupported\x20approval\x20mode:\x20','.cc.readSources','detailMarkdown','visible','isInteger','.assignee.userIds[','AUTO_REJECT','.version','async.enabled\x20must\x20be\x20a\x20boolean.','targetNodeId','call','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.defaultFlow','edge\x20target\x20is\x20required.','formData','text','flowJson.schemaVersion','template','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','waypoint.','actions','Notification\x20recipients\x20must\x20be\x20an\x20array.','HOURS','retryCount','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','label','version','.timeout.interrupting','MAX_SAFE_INTEGER','SCRIPT','summary','Notification\x20action.text\x20is\x20required.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.resultVariable','FORM_FLOW','keys','resultVariable','number','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20template\x20supports\x20at\x20most\x20','schemaVersion','test','.timeout.action','metadata','assignee','40311NXzMqB','.scriptName','variables','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','.taskMode','.transferCandidates.userIds','EXECUTE_BFF','toUpperCase','isArray','pageMode','size','flowName','value','startPath\x20must\x20be\x20a\x20non-empty\x20string.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Unsupported\x20pageMode:\x20','NOTIFICATION\x20node\x20requires\x20config.','catch','role','flowJson.','indexOf','startPageId','EMAIL','102zFfLIa','flowJson\x20must\x20be\x20an\x20object.','.approvalMode','7250310EcLzwT','flowJson.nodes.','Notification\x20action.url\x20is\x20required.','matchAll','title','flowJson.edges','.position','recipients','approval_sys_datasetCode','.assignee','boolean','.expression','Notification\x20version\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','REJECTED','.text','APPROVAL','3192546ZzQDPd','every','\x20was\x20empty\x20and\x20was\x20removed.','.cc.visible','#/$defs/position','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.async.retryInterval','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','CUSTOM_PAGE','].taskMode','.recipients','Unsupported\x20notification\x20version:\x20','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','target','flowCode','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','findIndex','pid','APPROVAL\x20node\x20requires\x20assignee.','object','HANDLE','recipientUserIds'];a299_0x5ab3=function(){return _0x19ac21;};return a299_0x5ab3();}function expressionReferencesVariable(_0x235d9d,_0x5c3a9b){const _0x451585=a299_0x3070f7;let _0x479d98=0x0;while(_0x479d98<_0x235d9d[_0x451585(0xda)]){const _0x6a07b3=_0x235d9d[_0x479d98];if(_0x6a07b3==='\x27'||_0x6a07b3==='\x22'){_0x479d98=skipQuotedExpressionSegment(_0x235d9d,_0x479d98,_0x6a07b3);continue;}if(!/[A-Za-z_]/[_0x451585(0x129)](_0x6a07b3)){_0x479d98+=0x1;continue;}const _0x48651c=_0x479d98;_0x479d98+=0x1;while(_0x479d98<_0x235d9d[_0x451585(0xda)]&&/[A-Za-z0-9_]/[_0x451585(0x129)](_0x235d9d[_0x479d98])){_0x479d98+=0x1;}if(_0x235d9d[_0x451585(0x182)](_0x48651c,_0x479d98)!==_0x5c3a9b)continue;let _0x27e6d0=_0x48651c-0x1;while(_0x27e6d0>=0x0&&/\s/[_0x451585(0x129)](_0x235d9d[_0x27e6d0])){_0x27e6d0-=0x1;}if(_0x235d9d[_0x27e6d0]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x29fefa,_0x2548a6,_0x5da32b){const _0x2aef2e=a299_0x3070f7;let _0x48d227=_0x2548a6+0x1;while(_0x48d227<_0x29fefa[_0x2aef2e(0xda)]){if(_0x29fefa[_0x48d227]==='\x5c'){_0x48d227+=0x2;continue;}if(_0x29fefa[_0x48d227]===_0x5da32b)return _0x48d227+0x1;_0x48d227+=0x1;}return _0x48d227;}function resolveEffectiveResultVariable(_0x11f927,_0x28ce3f){const _0x5107d8=a299_0x3070f7;if(_0x11f927===undefined||_0x11f927===null||_0x28ce3f&&_0x11f927==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x11f927!==_0x5107d8(0x1e9)||!VARIABLE_PATTERN[_0x5107d8(0x129)](_0x11f927)||RESERVED_RESULT_VARIABLES['has'](_0x11f927)||_0x11f927[_0x5107d8(0x218)](_0x5107d8(0x1ad)))return undefined;return _0x11f927;}function registerResultVariableOwner(_0x2307fc,_0xf1e542,_0x37dd7b,_0x216950){const _0x22a1d8=a299_0x3070f7;if(_0x2307fc[_0x22a1d8(0x196)](_0xf1e542)){_0x216950[_0x22a1d8(0x235)]({'path':'flowJson.nodes','message':'Duplicate\x20resultVariable:\x20'+_0xf1e542+'.'});return;}_0x2307fc[_0x22a1d8(0x1ab)](_0xf1e542,_0x37dd7b);}function setsEqual(_0x2b30e6,_0x5ef2a0){const _0x197631=a299_0x3070f7;return _0x2b30e6[_0x197631(0x138)]===_0x5ef2a0[_0x197631(0x138)]&&[..._0x2b30e6][_0x197631(0x15a)](_0x658005=>_0x5ef2a0[_0x197631(0x196)](_0x658005));}function isValidUserId(_0x168de8){const _0x533031=a299_0x3070f7;if(typeof _0x168de8===_0x533031(0x1e9))return _0x168de8[_0x533031(0xf8)]()[_0x533031(0xda)]>0x0;return Number[_0x533031(0x209)](_0x168de8)&&Number(_0x168de8)>0x0;}function resolveEdgeEndpoint(_0x346f33,_0x3ba053){const _0xd231a9=a299_0x3070f7;if(typeof _0x346f33==='string'&&_0x346f33[_0xd231a9(0xf8)]())return _0x346f33[_0xd231a9(0xf8)]();if(typeof _0x3ba053===_0xd231a9(0x1e9)&&_0x3ba053[_0xd231a9(0xf8)]())return _0x3ba053[_0xd231a9(0xf8)]();return undefined;}function removeEmptyMetadata(_0x57cabc,_0x34bba6,_0x10929c,_0x1ec257){const _0x27971c=a299_0x3070f7;if(Array[_0x27971c(0x136)](_0x57cabc)){_0x57cabc['forEach']((_0x5f122d,_0x1517e5)=>removeEmptyMetadata(_0x5f122d,_0x34bba6+'['+_0x1517e5+']',_0x10929c,_0x1ec257));return;}if(!isRecord(_0x57cabc))return;for(const [_0x24f779,_0x4340fc]of Object[_0x27971c(0x206)](_0x57cabc)){const _0x6446ff=_0x34bba6+'.'+_0x24f779;if(_0x24f779===_0x27971c(0x12b)&&isEmptyJsonValue(_0x4340fc)){delete _0x57cabc[_0x24f779],_0x1ec257[_0x27971c(0x235)](_0x6446ff),_0x10929c[_0x27971c(0x235)]({'code':_0x27971c(0x1bc),'path':_0x6446ff,'message':_0x6446ff+_0x27971c(0x15b)});continue;}removeEmptyMetadata(_0x4340fc,_0x6446ff,_0x10929c,_0x1ec257);}}function isEmptyJsonValue(_0x5b33e0){const _0x3eaab3=a299_0x3070f7;if(_0x5b33e0===null||_0x5b33e0===undefined)return!![];if(typeof _0x5b33e0==='string')return _0x5b33e0[_0x3eaab3(0xf8)]()==='';if(Array[_0x3eaab3(0x136)](_0x5b33e0))return _0x5b33e0['length']===0x0;return isRecord(_0x5b33e0)&&Object[_0x3eaab3(0x123)](_0x5b33e0)['length']===0x0;}function isRecord(_0x4a26c7){const _0x4b33a2=a299_0x3070f7;return typeof _0x4a26c7===_0x4b33a2(0x16c)&&_0x4a26c7!==null&&!Array[_0x4b33a2(0x136)](_0x4a26c7);}function cloneJsonValue(_0x335149){const _0x16bfc0=a299_0x3070f7;return JSON['parse'](JSON[_0x16bfc0(0x247)](_0x335149));}export async function readFlowConfigFile(_0x492be5){const _0x580861=a299_0x3070f7,_0x3e0577=await readFile(resolve(_0x492be5),'utf8');return JSON[_0x580861(0x231)](_0x3e0577);}
@@ -1 +1 @@
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
+ const a300_0x12cc09=a300_0xecb3;(function(_0xb6d557,_0x53276c){const _0x167c6c=a300_0xecb3,_0x1eecd1=_0xb6d557();while(!![]){try{const _0x2da8b1=-parseInt(_0x167c6c(0x7f))/0x1*(-parseInt(_0x167c6c(0x8a))/0x2)+-parseInt(_0x167c6c(0x7d))/0x3+parseInt(_0x167c6c(0x96))/0x4*(-parseInt(_0x167c6c(0x9e))/0x5)+parseInt(_0x167c6c(0x74))/0x6+-parseInt(_0x167c6c(0x99))/0x7*(parseInt(_0x167c6c(0x77))/0x8)+parseInt(_0x167c6c(0x83))/0x9+parseInt(_0x167c6c(0x97))/0xa;if(_0x2da8b1===_0x53276c)break;else _0x1eecd1['push'](_0x1eecd1['shift']());}catch(_0x14c712){_0x1eecd1['push'](_0x1eecd1['shift']());}}}(a300_0xcdec,0x67f1b));import{randomUUID}from'node:crypto';function a300_0xecb3(_0x2459ef,_0x7c5777){_0x2459ef=_0x2459ef-0x6e;const _0xcdecdb=a300_0xcdec();let _0xecb3f9=_0xcdecdb[_0x2459ef];return _0xecb3f9;}import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0x12cc09(0x89);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3d7278,_0x4ec488,_0x5db2ef){return new CliError(_0x3d7278,0x1,_0x4ec488,_0x5db2ef);}function a300_0xcdec(){const _0x40b3f3=['defaults','Policy\x20defaults.instantApi\x20is\x20required.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_rules_invalid','289185zxrSpg','instant_api_policy_file_exists','instant_api_policy_file_unwritable','instant_api_policy_app_code_mismatch','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','instant_api_policy_file_invalid','stringify','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_version_invalid','code','object','pid','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_app_code_invalid','rules','overwritten','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','length','created','1085730AyAsNm','instant_api_policy_file_unreadable','.tmp','11664pJdkHL','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','force','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Review\x20the\x20file\x20before\x20retrying.','instantApi','1460952NWkwSp','includes','1hwTXnw','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_defaults_invalid','5927517ssZAyZ','isArray','policyFilePath','trim','instant_api_policy_file_too_large','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','policy.json','760462utsHfh','unchanged','catch','parse','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','isFile','version','utf8','utf-8','byteLength','ENOENT','appCode','16hpFwwW','7597220mnPzbh','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','4011dPsSXx'];a300_0xcdec=function(){return _0x40b3f3;};return a300_0xcdec();}export function loadInstantApiPolicyLocalConfig(_0xfb2a96,_0x5166a8){assertSafeAppCode(_0xfb2a96);const _0x56bd89=resolve(_0x5166a8??findProjectRootDirectory()),_0x582810=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xfb2a96+'/'+INSTANT_API_POLICY_FILE_NAME,_0x5a13bc=resolve(_0x56bd89,INSTANT_API_POLICY_RELATIVE_ROOT,_0xfb2a96),_0x16ee29=resolve(_0x5a13bc,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x56bd89,'appCode':_0xfb2a96,'policyRoot':_0x5a13bc,'policyFilePath':_0x16ee29,'policyRelativePath':_0x582810};}export function createDefaultInstantApiPolicyConfig(_0x547137,_0x3eb9f8='allow'){return assertSafeAppCode(_0x547137),{'version':'2','appCode':_0x547137,'defaults':{'instantApi':_0x3eb9f8},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x2d0cb3){const _0x324dc0=a300_0x12cc09;let _0x500fb9;try{_0x500fb9=await stat(_0x2d0cb3['policyFilePath']);}catch(_0x1fa127){throw instantApiPolicyError('instant_api_policy_file_missing',_0x324dc0(0x71)+_0x2d0cb3[_0x324dc0(0x85)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0x500fb9[_0x324dc0(0x8f)]())throw instantApiPolicyError(_0x324dc0(0xa4),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2d0cb3[_0x324dc0(0x85)]);if(_0x500fb9['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324dc0(0x87),_0x324dc0(0x98));let _0x535103;try{_0x535103=await readFile(_0x2d0cb3[_0x324dc0(0x85)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0x2d0cb3[_0x324dc0(0x85)]);}if(_0x535103[_0x324dc0(0x93)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324dc0(0x87),_0x324dc0(0x98));let _0xa14ed6;try{_0xa14ed6=new TextDecoder(_0x324dc0(0x92),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x535103);}catch{throw instantApiPolicyError(_0x324dc0(0xa4),_0x324dc0(0xac)+_0x2d0cb3[_0x324dc0(0x85)]);}let _0x374e26;try{_0x374e26=JSON[_0x324dc0(0x8d)](_0xa14ed6);}catch{throw instantApiPolicyError(_0x324dc0(0xa3),_0x324dc0(0xa2)+_0x2d0cb3[_0x324dc0(0x85)]);}return assertLocalPolicyContract(_0x374e26,_0x2d0cb3[_0x324dc0(0x95)]);}export async function writeInstantApiPolicyConfigFile(_0x3e2ed7,_0x5476e7,_0x2122b2={}){const _0x35a2de=a300_0x12cc09,_0x4edc02=assertLocalPolicyContract(_0x5476e7,_0x3e2ed7[_0x35a2de(0x95)]),_0x5924ea=JSON[_0x35a2de(0xa5)](_0x4edc02,null,0x2)+'\x0a';if(Buffer[_0x35a2de(0x93)](_0x5924ea,_0x35a2de(0x91))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x35a2de(0x87),_0x35a2de(0x98));await mkdir(_0x3e2ed7['policyRoot'],{'recursive':!![]});let _0x4876f6;try{_0x4876f6=await readFile(_0x3e2ed7['policyFilePath'],_0x35a2de(0x91));}catch(_0x230c33){if(!isMissingFile(_0x230c33))throw instantApiPolicyError(_0x35a2de(0x75),_0x35a2de(0xa6)+_0x3e2ed7['policyFilePath']);}if(_0x4876f6===_0x5924ea)return{'action':_0x35a2de(0x8b),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};if(_0x4876f6!==undefined&&!_0x2122b2[_0x35a2de(0x79)])throw instantApiPolicyError(_0x35a2de(0x9f),_0x35a2de(0x81)+_0x3e2ed7[_0x35a2de(0x85)],_0x35a2de(0x8e));if(_0x4876f6===undefined)try{return await writeFile(_0x3e2ed7[_0x35a2de(0x85)],_0x5924ea,{'encoding':_0x35a2de(0x91),'flag':'wx'}),{'action':_0x35a2de(0x73),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};}catch(_0x1aab49){if(!isAlreadyExists(_0x1aab49))throw instantApiPolicyError(_0x35a2de(0xa0),_0x35a2de(0x70)+_0x3e2ed7[_0x35a2de(0x85)]);if(!_0x2122b2[_0x35a2de(0x79)])throw instantApiPolicyError(_0x35a2de(0x9f),_0x35a2de(0xab)+_0x3e2ed7[_0x35a2de(0x85)],_0x35a2de(0x7b));}const _0x72dd94=resolve(dirname(_0x3e2ed7[_0x35a2de(0x85)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x35a2de(0xaa)]+'.'+randomUUID()+_0x35a2de(0x76));try{await writeFile(_0x72dd94,_0x5924ea,{'encoding':_0x35a2de(0x91),'flag':'wx'}),await rename(_0x72dd94,_0x3e2ed7['policyFilePath']);}catch{await unlink(_0x72dd94)[_0x35a2de(0x8c)](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x35a2de(0x9c)+_0x3e2ed7[_0x35a2de(0x85)]);}return{'action':_0x35a2de(0x6f),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};}function assertSafeAppCode(_0x31ff57){const _0x400d43=a300_0x12cc09,_0x44ce62=_0x31ff57[_0x400d43(0x86)]();if(!_0x44ce62||_0x44ce62!==_0x31ff57||_0x44ce62[_0x400d43(0x72)]>0x64||_0x44ce62==='.'||_0x44ce62==='..'||_0x44ce62['includes']('/')||_0x44ce62[_0x400d43(0x7e)]('\x5c')||_0x44ce62['includes']('\x00'))throw instantApiPolicyError(_0x400d43(0xae),_0x400d43(0x78));}function assertLocalPolicyContract(_0x1b2575,_0x5cf2a7){const _0x30dde0=a300_0x12cc09;if(!isObject(_0x1b2575))throw instantApiPolicyError(_0x30dde0(0xa3),_0x30dde0(0x80));if(_0x1b2575[_0x30dde0(0x90)]!=='1'&&_0x1b2575[_0x30dde0(0x90)]!=='2')throw instantApiPolicyError(_0x30dde0(0xa7),_0x30dde0(0x7a),_0x30dde0(0xad));if(_0x1b2575[_0x30dde0(0x95)]!==_0x5cf2a7)throw instantApiPolicyError(_0x30dde0(0xa1),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x5cf2a7+'.');if(!isObject(_0x1b2575['defaults'])||typeof _0x1b2575[_0x30dde0(0x9a)][_0x30dde0(0x7c)]!=='string')throw instantApiPolicyError(_0x30dde0(0x82),_0x30dde0(0x9b));if(_0x1b2575[_0x30dde0(0x6e)]!==undefined&&_0x1b2575[_0x30dde0(0x6e)]!==null&&!Array[_0x30dde0(0x84)](_0x1b2575[_0x30dde0(0x6e)]))throw instantApiPolicyError(_0x30dde0(0x9d),_0x30dde0(0x88));return _0x1b2575;}function isObject(_0x4a6c6b){return _0x4a6c6b!==null&&typeof _0x4a6c6b==='object'&&!Array['isArray'](_0x4a6c6b);}function isMissingFile(_0x5c313c){const _0x1dfe83=a300_0x12cc09;return Boolean(_0x5c313c&&typeof _0x5c313c===_0x1dfe83(0xa9)&&_0x5c313c[_0x1dfe83(0xa8)]===_0x1dfe83(0x94));}function isAlreadyExists(_0x332ea9){const _0x1dc63a=a300_0x12cc09;return Boolean(_0x332ea9&&typeof _0x332ea9===_0x1dc63a(0xa9)&&_0x332ea9['code']==='EEXIST');}
@@ -1 +1 @@
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
+ const a301_0x576073=a301_0x438e;(function(_0x2c284c,_0x5fe142){const _0x508245=a301_0x438e,_0x585be4=_0x2c284c();while(!![]){try{const _0x10c8b7=parseInt(_0x508245(0x179))/0x1+parseInt(_0x508245(0x184))/0x2+-parseInt(_0x508245(0x17b))/0x3+-parseInt(_0x508245(0x17a))/0x4*(parseInt(_0x508245(0x180))/0x5)+parseInt(_0x508245(0x186))/0x6*(-parseInt(_0x508245(0x17e))/0x7)+-parseInt(_0x508245(0x182))/0x8*(-parseInt(_0x508245(0x177))/0x9)+-parseInt(_0x508245(0x185))/0xa*(-parseInt(_0x508245(0x17d))/0xb);if(_0x10c8b7===_0x5fe142)break;else _0x585be4['push'](_0x585be4['shift']());}catch(_0x2b2e67){_0x585be4['push'](_0x585be4['shift']());}}}(a301_0x4986,0xe1c88));function a301_0x438e(_0x264c62,_0x22b8e0){_0x264c62=_0x264c62-0x176;const _0x498650=a301_0x4986();let _0x438e15=_0x498650[_0x264c62];return _0x438e15;}const base=a301_0x576073(0x17c);function a301_0x4986(){const _0x23e060=['1506ixOBZE','/publish','freeze','8824266CugRyw','/revision','1328928ppkchC','542828eOHPyy','4140537DNcgks','/smartapi/instant-api-policy','11RKltFi','16009CCkVGb','/rollback','25tXNKFg','/validate','8JdkhBg','/revisions','2118072ZfDnWJ','1891210mOiKlL'];a301_0x4986=function(){return _0x23e060;};return a301_0x4986();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x576073(0x176)]({'current':base+'/current','validate':base+a301_0x576073(0x181),'publish':base+a301_0x576073(0x187),'revisions':base+a301_0x576073(0x183),'revision':base+a301_0x576073(0x178),'rollback':base+a301_0x576073(0x17f)});
@@ -1 +1 @@
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
+ function a302_0xd6c4(){const _0xb048a9=['cancelled','cli:rabetbase','defineProperty','code','2691493vuexIb','kind','data','102852ghGDbm','1749830eWYJAa','network','pageTooLarge','status','auth','message','1124324ztzkra','aborted','520RPhvVJ','1094256sreJyi','run','validation','origin','trim','1yiPixM','getStore','12ALShOw','1581349CLexOK','timeout','api_error','httpStatus','190xWBTBi','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','1774616lLQnhO','remoteErrorCode'];a302_0xd6c4=function(){return _0xb048a9;};return a302_0xd6c4();}const a302_0x100d8e=a302_0x1558;(function(_0x4fc487,_0x14bdec){const _0x2a0368=a302_0x1558,_0x188f66=_0x4fc487();while(!![]){try{const _0x4e18a6=-parseInt(_0x2a0368(0xb9))/0x1*(parseInt(_0x2a0368(0xb1))/0x2)+-parseInt(_0x2a0368(0xb4))/0x3+parseInt(_0x2a0368(0xc3))/0x4+-parseInt(_0x2a0368(0xab))/0x5+parseInt(_0x2a0368(0xbb))/0x6*(-parseInt(_0x2a0368(0xa7))/0x7)+-parseInt(_0x2a0368(0xb3))/0x8*(parseInt(_0x2a0368(0xaa))/0x9)+parseInt(_0x2a0368(0xc0))/0xa*(parseInt(_0x2a0368(0xbc))/0xb);if(_0x4e18a6===_0x14bdec)break;else _0x188f66['push'](_0x188f66['shift']());}catch(_0x2f0c47){_0x188f66['push'](_0x188f66['shift']());}}}(a302_0xd6c4,0x5e549));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='\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.',session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];['remoteErrorCode'];[a302_0x100d8e(0xbf)];[a302_0x100d8e(0xad)];constructor(_0x3dabe0,_0x38c677=![],_0x48e8ea,_0x3943ba,_0x15e193=![]){const _0x5d27a0=a302_0x100d8e;super(_0x5d27a0(0xbe),0x1,_0x3dabe0,_0x48e8ea?'API\x20error\x20code:\x20'+_0x48e8ea:undefined),this['transportFailure']=_0x38c677,this[_0x5d27a0(0xc4)]=_0x48e8ea,this[_0x5d27a0(0xbf)]=_0x3943ba,this['pageTooLarge']=_0x15e193;if(_0x48e8ea)Object[_0x5d27a0(0xa5)](this,_0x5d27a0(0xa9),{'value':{'remoteErrorCode':_0x48e8ea},'enumerable':![]});}}function resolveOrigin(){const _0x57a629=a302_0x100d8e,_0x1f5372=getKbServiceDomain();if(!_0x1f5372)throw CliErrors[_0x57a629(0xb6)]('Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.');try{return normalizeKbServiceOrigin(_0x1f5372);}catch{throw CliErrors[_0x57a629(0xb6)](_0x57a629(0xc1));}}function a302_0x1558(_0x2368fd,_0x3cc498){_0x2368fd=_0x2368fd-0xa3;const _0xd6c4e2=a302_0xd6c4();let _0x1558b6=_0xd6c4e2[_0x2368fd];return _0x1558b6;}export function withKbManagementSession(_0x3f16f8,_0x3fbe8d){const _0x53dedc=a302_0x100d8e;return session[_0x53dedc(0xb5)]({'origin':resolveOrigin(),'signal':_0x3f16f8},_0x3fbe8d);}export async function withKbManagementClient(_0x26b45d,_0x5f25a4,_0x4b3e4d={}){const _0x273372=a302_0x100d8e,_0x3528b7=session['getStore']()?.[_0x273372(0xb7)]??resolveOrigin();if(!_0x26b45d[_0x273372(0xb8)]())throw CliErrors[_0x273372(0xc2)]();const _0x3bfc2c=_0x4b3e4d['signal']??session[_0x273372(0xba)]()?.['signal'];if(_0x3bfc2c?.[_0x273372(0xb2)])throw CliErrors[_0x273372(0xa3)]('Knowledge\x20management\x20request\x20cancelled.');try{const _0x454bbe=createKnowledgeClient({'kbServiceDomain':_0x3528b7,'authMode':'cookie','cookie':_0x26b45d,'invokeSource':_0x273372(0xa4)});return await _0x5f25a4(_0x454bbe,{'signal':_0x3bfc2c});}catch(_0x29993a){if(!(_0x29993a instanceof KnowledgeServiceError))throw _0x29993a;if(_0x29993a[_0x273372(0xa8)]===_0x273372(0xaf))throw CliErrors[_0x273372(0xc2)]();if(_0x29993a['kind']===_0x273372(0xb6))throw CliErrors[_0x273372(0xb6)](_0x29993a['message']);const _0x4b2d6b=_0x29993a[_0x273372(0xa8)]===_0x273372(0xac)||_0x29993a[_0x273372(0xa8)]===_0x273372(0xbd)||_0x29993a[_0x273372(0xa8)]===_0x273372(0xa3);throw new KbManagementError(_0x29993a[_0x273372(0xb0)]+(_0x29993a['writeUncertain']?WRITE_RECONCILIATION:''),_0x4b2d6b,/^\d+$/['test'](_0x29993a['code']??'')?_0x29993a[_0x273372(0xa6)]:undefined,_0x29993a[_0x273372(0xae)],_0x29993a[_0x273372(0xad)]);}}
@@ -1 +1 @@
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
+ function a303_0x1a47(_0x404a0d,_0x2c769d){_0x404a0d=_0x404a0d-0xb3;const _0x5b62d2=a303_0x5b62();let _0x1a47b0=_0x5b62d2[_0x404a0d];return _0x1a47b0;}(function(_0x4b4e9e,_0x57d400){const _0x3e8a21=a303_0x1a47,_0x52200b=_0x4b4e9e();while(!![]){try{const _0x2ec873=-parseInt(_0x3e8a21(0xc1))/0x1+parseInt(_0x3e8a21(0xd0))/0x2+-parseInt(_0x3e8a21(0xbd))/0x3*(-parseInt(_0x3e8a21(0xcd))/0x4)+parseInt(_0x3e8a21(0xc9))/0x5+-parseInt(_0x3e8a21(0xc0))/0x6+-parseInt(_0x3e8a21(0xcc))/0x7+parseInt(_0x3e8a21(0xd2))/0x8;if(_0x2ec873===_0x57d400)break;else _0x52200b['push'](_0x52200b['shift']());}catch(_0x2d9235){_0x52200b['push'](_0x52200b['shift']());}}}(a303_0x5b62,0x56828));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x3875e7){const _0x5de1f5=a303_0x1a47;try{return normalizeKnowledgeServiceOrigin(_0x3875e7);}catch{throw CliErrors['validation'](_0x5de1f5(0xb6));}}export async function searchDirectKnowledge(_0x32e161){const _0x3be56c=a303_0x1a47,_0x4e0f79=_0x32e161['appCode']['trim'](),_0x4bfb21=_0x32e161[_0x3be56c(0xba)][_0x3be56c(0xd8)]();if(!_0x4e0f79)throw CliErrors[_0x3be56c(0xc7)](_0x3be56c(0xb9));if(!_0x4bfb21)throw CliErrors[_0x3be56c(0xc7)]('Knowledge\x20search\x20query\x20is\x20required.');if(!_0x32e161[_0x3be56c(0xb8)][_0x3be56c(0xd8)]())throw CliErrors[_0x3be56c(0xc2)]();const _0x1ca9d1=normalizeKbServiceOrigin(_0x32e161[_0x3be56c(0xb5)]);try{const _0x1df3d1=createKnowledgeClient({'kbServiceDomain':_0x1ca9d1,'authMode':_0x3be56c(0xb8),'cookie':_0x32e161[_0x3be56c(0xb8)],'invokeSource':'cli:rabetbase'}),_0x97bc1f=await _0x1df3d1['search']({'appCode':_0x4e0f79,'query':_0x4bfb21,'scopes':['public','company'],..._0x32e161[_0x3be56c(0xd4)]!==undefined?{'topK':_0x32e161[_0x3be56c(0xd4)]}:{}},{'signal':_0x32e161['signal']});return{..._0x97bc1f,'hits':_0x97bc1f[_0x3be56c(0xbe)],'schemaVersion':0x2,'profile':'development','total':_0x97bc1f[_0x3be56c(0xbe)][_0x3be56c(0xc5)]};}catch(_0x3977ad){if(!(_0x3977ad instanceof KnowledgeServiceError))throw _0x3977ad;if(_0x3977ad[_0x3be56c(0xbf)]==='auth')throw CliErrors[_0x3be56c(0xc2)]();if(_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xc7))throw CliErrors[_0x3be56c(0xc7)](_0x3977ad[_0x3be56c(0xd6)]);if(_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xc6))throw new DOMException('Knowledge\x20search\x20cancelled.',_0x3be56c(0xd5));if(_0x3977ad['kind']===_0x3be56c(0xcb)||_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xb4))throw CliErrors[_0x3be56c(0xd7)](_0x3977ad[_0x3be56c(0xbf)]==='timeout'?_0x3be56c(0xb7):_0x3be56c(0xd3));const _0x40a4df=_0x3977ad[_0x3be56c(0xbf)]==='contract'&&_0x3977ad[_0x3be56c(0xd6)][_0x3be56c(0xb3)](_0x3be56c(0xbb))?_0x3be56c(0xce):_0x3977ad[_0x3be56c(0xd6)],_0x36363e=CliErrors['apiError'](_0x3977ad[_0x3be56c(0xca)]!==undefined&&_0x3977ad['status']!==0xc8&&!_0x40a4df[_0x3be56c(0xb3)](_0x3be56c(0xc3)+_0x3977ad[_0x3be56c(0xca)])?_0x40a4df+_0x3be56c(0xc8)+_0x3977ad['status']+')':_0x40a4df);if(/^\d+$/[_0x3be56c(0xcf)](_0x3977ad[_0x3be56c(0xd1)]??''))Object[_0x3be56c(0xbc)](_0x36363e,_0x3be56c(0xc4),{'value':{'remoteErrorCode':_0x3977ad[_0x3be56c(0xd1)]},'enumerable':![]});throw _0x36363e;}}function a303_0x5b62(){const _0x30244f=['includes','timeout','serviceUrl','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','cookie','Knowledge\x20search\x20appCode\x20is\x20required.','query','out-of-scope','defineProperty','141ULHtKJ','hits','kind','3966342tliGOC','227678ujhXDh','authRequired','HTTP\x20','data','length','cancelled','validation','\x20(HTTP\x20','2230805CnkBbP','status','network','1416737JbVmvc','40736QbOEcF','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','test','860864PJrvjV','code','721832rvKtVZ','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','topK','AbortError','message','networkError','trim'];a303_0x5b62=function(){return _0x30244f;};return a303_0x5b62();}
@@ -1 +1 @@
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));}}
1
+ const a304_0x35faea=a304_0x4380;function a304_0x2ece(){const _0x4ed573=['sort','2141724JhWcHS','page.lock.json','4626288jKzgFz','.json','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','join','300013imXNaW','flagMissing','F_OK','isDirectory','270850IGPrCR','page','validation','toUpperCase','18ESxAHv','2228024vuGkVu','6aQqPiD','.rabetbase','49675nckMRI','cwd','trim','page-dir','name','756ggnWYN','241331tJvuYi','583igwIKP'];a304_0x2ece=function(){return _0x4ed573;};return a304_0x2ece();}(function(_0x2d441d,_0x76bb06){const _0x3f5161=a304_0x4380,_0x30d373=_0x2d441d();while(!![]){try{const _0x6a67ab=-parseInt(_0x3f5161(0x167))/0x1*(-parseInt(_0x3f5161(0x17a))/0x2)+parseInt(_0x3f5161(0x16a))/0x3+-parseInt(_0x3f5161(0x16c))/0x4+parseInt(_0x3f5161(0x161))/0x5*(parseInt(_0x3f5161(0x166))/0x6)+parseInt(_0x3f5161(0x170))/0x7+parseInt(_0x3f5161(0x179))/0x8*(parseInt(_0x3f5161(0x178))/0x9)+parseInt(_0x3f5161(0x174))/0xa*(-parseInt(_0x3f5161(0x168))/0xb);if(_0x6a67ab===_0x76bb06)break;else _0x30d373['push'](_0x30d373['shift']());}catch(_0x2d2757){_0x30d373['push'](_0x30d373['shift']());}}}(a304_0x2ece,0xaa49b));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a304_0x4380(_0x15592f,_0x1d1b39){_0x15592f=_0x15592f-0x161;const _0x2ecee2=a304_0x2ece();let _0x438039=_0x2ecee2[_0x15592f];return _0x438039;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x4aaf13,_0x36fc80=process[a304_0x35faea(0x162)]()){const _0x54ebe3=a304_0x35faea,_0x2fd5b8=resolve(_0x36fc80),_0x3402c=join(_0x2fd5b8,'.rabetbase',_0x54ebe3(0x175));return{'projectRoot':_0x2fd5b8,'pagesBaseDir':_0x3402c,'appPagesDir':join(_0x3402c,_0x4aaf13),'lockFilePath':join(_0x2fd5b8,_0x54ebe3(0x17b),_0x54ebe3(0x16b))};}export function buildPageFileName(_0xc43a21,_0x3ecc7b){const _0x4a8ec9=a304_0x35faea;return _0xc43a21+'-'+_0x3ecc7b[_0x4a8ec9(0x177)]()+_0x4a8ec9(0x16d);}export function resolvePageFilePath(_0x2f486f,_0x11a0c4,_0x415753){return join(_0x2f486f['appPagesDir'],buildPageFileName(_0x11a0c4,_0x415753));}export async function ensureParentDirectory(_0x3ae7d4){await mkdir(dirname(_0x3ae7d4),{'recursive':!![]});}export async function fileExists(_0x5b9d53){const _0x27e7d6=a304_0x35faea;try{return await access(_0x5b9d53,constants[_0x27e7d6(0x172)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x3ea957){const _0x5ebe28=a304_0x35faea,_0x1fcb9d=_0x3ea957[_0x5ebe28(0x163)]();if(!_0x1fcb9d)throw CliErrors[_0x5ebe28(0x171)](_0x5ebe28(0x164));const _0x4a220e=resolve(_0x1fcb9d);let _0x5756b8;try{_0x5756b8=await lstat(_0x4a220e);}catch{throw CliErrors[_0x5ebe28(0x176)]('Page\x20directory\x20not\x20found:\x20'+_0x1fcb9d);}if(!_0x5756b8['isDirectory']())throw CliErrors[_0x5ebe28(0x176)](_0x5ebe28(0x16e)+_0x1fcb9d);const _0x39fa70={};return await readDirectory(_0x4a220e,_0x4a220e,_0x39fa70),_0x39fa70;}async function readDirectory(_0x9a2a21,_0x2377a6,_0xef4efe){const _0x3f89c2=a304_0x35faea,_0x14d89e=await readdir(_0x2377a6,{'withFileTypes':!![]});for(const _0x55322d of _0x14d89e[_0x3f89c2(0x169)]((_0x453b3d,_0x2453f6)=>_0x453b3d[_0x3f89c2(0x165)]['localeCompare'](_0x2453f6['name']))){const _0x385e63=join(_0x2377a6,_0x55322d['name']);if(_0x55322d[_0x3f89c2(0x173)]()){await readDirectory(_0x9a2a21,_0x385e63,_0xef4efe);continue;}if(!_0x55322d['isFile']())throw CliErrors[_0x3f89c2(0x176)]('Unsupported\x20file\x20in\x20page\x20directory:\x20'+_0x385e63);_0xef4efe[relative(_0x9a2a21,_0x385e63)['split'](sep)[_0x3f89c2(0x16f)]('/')]=await readFile(_0x385e63,'utf8');}}