@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10

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 +4 -4
  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_0x5863df=a299_0x3fbc;(function(_0x4a1a1a,_0x27b517){const _0x8b6ed8=a299_0x3fbc,_0x1975f4=_0x4a1a1a();while(!![]){try{const _0x56c1cc=-parseInt(_0x8b6ed8(0x13d))/0x1*(parseInt(_0x8b6ed8(0x1f5))/0x2)+parseInt(_0x8b6ed8(0x145))/0x3*(-parseInt(_0x8b6ed8(0x107))/0x4)+parseInt(_0x8b6ed8(0x1e9))/0x5+parseInt(_0x8b6ed8(0x199))/0x6+-parseInt(_0x8b6ed8(0xcd))/0x7+parseInt(_0x8b6ed8(0xfa))/0x8*(-parseInt(_0x8b6ed8(0x1a3))/0x9)+-parseInt(_0x8b6ed8(0x14d))/0xa*(-parseInt(_0x8b6ed8(0x1c8))/0xb);if(_0x56c1cc===_0x27b517)break;else _0x1975f4['push'](_0x1975f4['shift']());}catch(_0x33992d){_0x1975f4['push'](_0x1975f4['shift']());}}}(a299_0x3f00,0xacb32));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':'https://json-schema.org/draft/2020-12/schema','$id':a299_0x5863df(0x22a),'title':a299_0x5863df(0xe3),'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0xf6),a299_0x5863df(0x117),a299_0x5863df(0x211)],'$defs':{'userId':{'anyOf':[{'type':a299_0x5863df(0x188),'minLength':0x1},{'type':a299_0x5863df(0x112),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0x5863df(0x122),'minimum':0x0},'y':{'type':a299_0x5863df(0x122),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x22b),a299_0x5863df(0x183)],'properties':{'value':{'type':a299_0x5863df(0x112),'minimum':0x1},'unit':{'enum':[a299_0x5863df(0x1cc),a299_0x5863df(0x212),a299_0x5863df(0xe0),a299_0x5863df(0x20c)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x5863df(0x1c5),'required':['id',a299_0x5863df(0xce),'name',a299_0x5863df(0x158)],'properties':{'id':{'type':a299_0x5863df(0x188),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a299_0x5863df(0xd9),a299_0x5863df(0x159),a299_0x5863df(0xf7),a299_0x5863df(0x203),'SCRIPT',a299_0x5863df(0x124)]},'name':{'type':a299_0x5863df(0x188),'minLength':0x1},'path':{'type':a299_0x5863df(0x188),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a299_0x5863df(0x228),a299_0x5863df(0x137),a299_0x5863df(0xf0)]},'taskMode':{'enum':[a299_0x5863df(0xf7),'HANDLE']},'assignee':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x1ac)],'properties':{'strategy':{'enum':['FIXED',a299_0x5863df(0xd2)]},'userIds':{'type':a299_0x5863df(0xb9),'minItems':0x1,'items':{'$ref':a299_0x5863df(0xe8)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a299_0x5863df(0x188),'pattern':a299_0x5863df(0x170)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x1ac),a299_0x5863df(0x14e)],'properties':{'strategy':{'const':a299_0x5863df(0x140)},'userIds':{'type':a299_0x5863df(0xb9),'minItems':0x1,'items':{'$ref':a299_0x5863df(0xe8)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x5863df(0x167)},'result':{'enum':[a299_0x5863df(0x205),a299_0x5863df(0x1a4)]},'scriptName':{'type':a299_0x5863df(0x188),'minLength':0x1},'resultVariable':{'type':a299_0x5863df(0x188),'pattern':a299_0x5863df(0x11e)},'async':{'type':a299_0x5863df(0x1c5),'properties':{'enabled':{'type':'boolean'},'retryCount':{'type':a299_0x5863df(0x112),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x5863df(0x209)}},'additionalProperties':!![]},'timeout':{'type':a299_0x5863df(0x1c5),'properties':{'enabled':{'type':'boolean'},'duration':{'$ref':a299_0x5863df(0x209)},'action':{'enum':[a299_0x5863df(0x1b4),a299_0x5863df(0x1db),a299_0x5863df(0x16a)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a299_0x5863df(0x188),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x5863df(0x11e)}},'additionalProperties':!![]},'cc':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x1ce)],'properties':{'recipientUserIds':{'type':a299_0x5863df(0xb9),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x121),a299_0x5863df(0xd8)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x5863df(0x188),'minLength':0x1},'failurePolicy':{'enum':[a299_0x5863df(0x169),'FAIL']},'template':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0xc6),'summary'],'properties':{'title':{'type':a299_0x5863df(0x188),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x5863df(0x188)},'facts':{'type':a299_0x5863df(0xb9),'maxItems':0x8,'items':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x1c1),a299_0x5863df(0x22b)],'properties':{'label':{'type':a299_0x5863df(0x188),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x1e2),a299_0x5863df(0x1f6)],'properties':{'text':{'type':a299_0x5863df(0x188),'minLength':0x1},'url':{'type':a299_0x5863df(0x188),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x5863df(0xb9),'items':{'type':a299_0x5863df(0x1c5),'required':['type',a299_0x5863df(0x22b)],'properties':{'type':{'enum':[a299_0x5863df(0x1ba),a299_0x5863df(0xd2),a299_0x5863df(0x150)]},'value':{'type':a299_0x5863df(0x188),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x5863df(0x1c3)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a299_0x5863df(0x188),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a299_0x5863df(0x188),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a299_0x5863df(0x143),a299_0x5863df(0x205),a299_0x5863df(0x1a4),'EXPRESSION']},'expression':{'type':a299_0x5863df(0x188)},'defaultFlow':{'type':a299_0x5863df(0x167)},'name':{'type':a299_0x5863df(0x188)},'waypoints':{'type':a299_0x5863df(0xb9),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x5863df(0x189)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0x5863df(0x1a0)]},{'required':[a299_0x5863df(0x14b)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x5863df(0x188),'minLength':0x1},'flowDesc':{'type':a299_0x5863df(0x188)},'flowType':{'enum':['FORM_FLOW','INDEPENDENT_FLOW']},'datasetCode':{'type':a299_0x5863df(0x188),'minLength':0x1},'pageId':{'type':a299_0x5863df(0x112),'minimum':0x1,'maximum':Number[a299_0x5863df(0x12b)]},'pageIds':{'type':'array','items':{'type':a299_0x5863df(0x112),'minimum':0x1,'maximum':Number[a299_0x5863df(0x12b)]}},'templateName':![],'flowJson':{'type':a299_0x5863df(0x1c5),'required':[a299_0x5863df(0x10d),a299_0x5863df(0x1f9)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x5863df(0x188),'const':'approval.simple-flow.v1','description':a299_0x5863df(0x13b)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x5863df(0x151)},'startPageId':![],'startPath':{'type':a299_0x5863df(0x188),'minLength':0x1},'nodes':{'type':a299_0x5863df(0xb9),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a299_0x5863df(0xb9),'minItems':0x1,'items':{'$ref':a299_0x5863df(0xc4)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x5863df(0x144),a299_0x5863df(0x15e),a299_0x5863df(0xf6),a299_0x5863df(0x213),a299_0x5863df(0xe6),'appCode',a299_0x5863df(0x204),a299_0x5863df(0x17b)],REMOVED_ROOT_FIELDS=['id',a299_0x5863df(0x190),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x5863df(0x184),NODE_TYPES=new Set([a299_0x5863df(0xd9),a299_0x5863df(0x159),a299_0x5863df(0xf7),a299_0x5863df(0x203),a299_0x5863df(0x14c),a299_0x5863df(0x124)]),CONDITION_TYPES=new Set([a299_0x5863df(0x143),a299_0x5863df(0x205),a299_0x5863df(0x1a4),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0x5863df(0x228),a299_0x5863df(0x137),a299_0x5863df(0xf0)]),APPROVAL_TASK_MODES=new Set([a299_0x5863df(0xf7),'HANDLE']),FLOW_TIME_UNITS=new Set([a299_0x5863df(0x1cc),a299_0x5863df(0x212),'HOURS',a299_0x5863df(0x20c)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x5863df(0x1b4),a299_0x5863df(0x1db),a299_0x5863df(0x16a)]),FLOW_TYPES=new Set(['FORM_FLOW',a299_0x5863df(0x1d8)]),FLOW_PAGE_MODES=new Set([a299_0x5863df(0x151),a299_0x5863df(0x138)]),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(['CONTINUE',a299_0x5863df(0x1a5)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x5863df(0x1ba),a299_0x5863df(0xd2),a299_0x5863df(0x150)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x5863df(0x1c3)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x5863df(0x1ea),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x5863df(0xfb),RESERVED_RESULT_VARIABLES=new Set([a299_0x5863df(0x135),a299_0x5863df(0x1a7),a299_0x5863df(0x139),a299_0x5863df(0xba),a299_0x5863df(0x10c),a299_0x5863df(0x1fc),a299_0x5863df(0x104),a299_0x5863df(0x157),a299_0x5863df(0x15c),a299_0x5863df(0xf5)]);export function normalizeFlowConfig(_0x216acb){const _0xd4164e=a299_0x5863df;if(!isRecord(_0x216acb))throw new TypeError(_0xd4164e(0x114));const _0x56ee2d=cloneJsonValue(_0x216acb),_0x5ab338=_0x56ee2d['flowJson'],_0x1e9d73=isRecord(_0x5ab338)?cloneJsonValue(_0x5ab338):{},_0xb22cff=[],_0x90090d=[];for(const _0x5c2904 of REMOVED_ROOT_FIELDS){if(!Object[_0xd4164e(0x201)][_0xd4164e(0x10e)]['call'](_0x56ee2d,_0x5c2904))continue;delete _0x56ee2d[_0x5c2904],_0x90090d[_0xd4164e(0xdc)](_0x5c2904),_0xb22cff[_0xd4164e(0xdc)]({'code':_0xd4164e(0x1b9),'path':_0x5c2904,'message':_0x5c2904+_0xd4164e(0x106)});}for(const _0x2b0ada of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0xd4164e(0x10e)]['call'](_0x1e9d73,_0x2b0ada))continue;const _0x23f3e5=_0xd4164e(0x11c)+_0x2b0ada;delete _0x1e9d73[_0x2b0ada],_0x90090d[_0xd4164e(0xdc)](_0x23f3e5),_0xb22cff[_0xd4164e(0xdc)]({'code':_0xd4164e(0x1b9),'path':_0x23f3e5,'message':_0x23f3e5+_0xd4164e(0x106)});}if(Object[_0xd4164e(0x201)][_0xd4164e(0x10e)][_0xd4164e(0x1ff)](_0x1e9d73,'schemaVersion')){const _0x113135=_0x1e9d73[_0xd4164e(0x11d)],_0x251421=typeof _0x113135==='string'?_0x113135[_0xd4164e(0x18b)]():_0x113135;if(isEmptyJsonValue(_0x113135)||_0x251421===DEFAULT_FLOW_SCHEMA_VERSION){const _0x11fc9e=_0xd4164e(0xfd);delete _0x1e9d73['schemaVersion'],_0x90090d['push'](_0x11fc9e),_0xb22cff['push']({'code':_0xd4164e(0x1b9),'path':_0x11fc9e,'message':_0x11fc9e+_0xd4164e(0x19b)+DEFAULT_FLOW_SCHEMA_VERSION+_0xd4164e(0x197)});}}removeEmptyMetadata(_0x1e9d73,_0xd4164e(0x211),_0xb22cff,_0x90090d);_0x56ee2d['flowType']===_0xd4164e(0x1d8)&&!Object[_0xd4164e(0x201)][_0xd4164e(0x10e)][_0xd4164e(0x1ff)](_0x1e9d73,_0xd4164e(0x1da))&&(_0x1e9d73[_0xd4164e(0x1da)]='CUSTOM_PAGE');_0x56ee2d[_0xd4164e(0x211)]=_0x1e9d73;if(typeof _0x56ee2d[_0xd4164e(0xf6)]===_0xd4164e(0x188))_0x56ee2d[_0xd4164e(0xf6)]=_0x56ee2d[_0xd4164e(0xf6)]['trim']();return{'config':_0x56ee2d,'warnings':_0xb22cff,'removedPaths':_0x90090d};}export function validateFlowConfig(_0x116a70){const _0x27689f=a299_0x5863df;let _0x2c0e0f;try{_0x2c0e0f=normalizeFlowConfig(_0x116a70);}catch(_0xdb93e2){const _0x1fea9c=_0xdb93e2 instanceof Error?_0xdb93e2[_0x27689f(0x1f0)]:String(_0xdb93e2),_0x1ebd77={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x1fea9c}],'warnings':[],'normalized':_0x1ebd77,'validationConfig':_0x1ebd77};}const _0x20f53c=_0x2c0e0f[_0x27689f(0x18e)],_0x456675=cloneJsonValue(_0x20f53c),_0x2acce5=_0x456675['flowJson'];_0x2acce5[_0x27689f(0x144)]=_0x27689f(0x1ed),_0x2acce5[_0x27689f(0xf6)]=_0x20f53c[_0x27689f(0xf6)];typeof _0x20f53c[_0x27689f(0xe6)]===_0x27689f(0x188)&&_0x20f53c['datasetCode'][_0x27689f(0x18b)]()&&(_0x2acce5[_0x27689f(0x213)]=_0x20f53c[_0x27689f(0xe6)][_0x27689f(0x18b)]());const _0x1199c3=[];return validateOuterMetadata(_0x20f53c,_0x1199c3),validateFlowClassification(_0x20f53c,_0x1199c3),validateGraph(_0x20f53c[_0x27689f(0x211)],_0x1199c3),{'valid':_0x1199c3['length']===0x0,'errors':_0x1199c3,'warnings':_0x2c0e0f[_0x27689f(0x136)],'normalized':_0x20f53c,'validationConfig':_0x456675};}function validateFlowClassification(_0xa300cb,_0x5ce574){const _0x733ee0=a299_0x5863df;if(!isRecord(_0xa300cb[_0x733ee0(0x211)]))return;const _0xa958b1=_0xa300cb[_0x733ee0(0x117)],_0x2cd3a3=_0xa300cb[_0x733ee0(0x211)][_0x733ee0(0x1da)];_0x2cd3a3!==undefined&&(typeof _0x2cd3a3!==_0x733ee0(0x188)||!FLOW_PAGE_MODES[_0x733ee0(0x1af)](_0x2cd3a3))&&_0x5ce574['push']({'path':_0x733ee0(0x119),'message':_0x733ee0(0x216)+String(_0x2cd3a3)+'.'});_0xa958b1===_0x733ee0(0x14f)&&_0x2cd3a3!==undefined&&_0x5ce574[_0x733ee0(0xdc)]({'path':_0x733ee0(0x119),'message':_0x733ee0(0x166)});_0xa958b1===_0x733ee0(0x1d8)&&_0x2cd3a3==='PLATFORM_FORM'&&_0x5ce574[_0x733ee0(0xdc)]({'path':_0x733ee0(0x119),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xa958b1==='FORM_FLOW'||_0xa958b1===_0x733ee0(0x1d8))&&validateCustomPageNavigation(_0xa300cb,_0xa958b1,_0x2cd3a3,_0x5ce574);if(_0xa958b1!==_0x733ee0(0x14f)||!Array[_0x733ee0(0x21c)](_0xa300cb[_0x733ee0(0x211)][_0x733ee0(0x10d)]))return;_0xa300cb[_0x733ee0(0x211)][_0x733ee0(0x10d)][_0x733ee0(0x215)]((_0x1d9215,_0x182e8b)=>{const _0x1e8281=_0x733ee0;isRecord(_0x1d9215)&&_0x1d9215[_0x1e8281(0xce)]==='APPROVAL'&&_0x1d9215['taskMode']==='HANDLE'&&_0x5ce574[_0x1e8281(0xdc)]({'path':_0x1e8281(0x1fe)+_0x182e8b+_0x1e8281(0x1d1),'message':_0x1e8281(0x1e1)});});}function validateCustomPageNavigation(_0x443126,_0x3c6b41,_0x40b9cf,_0x17065c){const _0x5ee6ff=a299_0x5863df,_0x328df1=_0x443126['flowJson'][_0x5ee6ff(0x217)];_0x328df1!==undefined&&_0x17065c['push']({'path':_0x5ee6ff(0x132),'message':_0x5ee6ff(0xd4)});const _0x5dd910=_0x443126[_0x5ee6ff(0x211)][_0x5ee6ff(0x16d)];_0x5dd910!==undefined&&(typeof _0x5dd910!==_0x5ee6ff(0x188)||_0x5dd910['trim']()==='')&&_0x17065c[_0x5ee6ff(0xdc)]({'path':'flowJson.startPath','message':_0x5ee6ff(0x1e7)});const _0xfc0df1=Array[_0x5ee6ff(0x21c)](_0x443126[_0x5ee6ff(0x211)][_0x5ee6ff(0x10d)])?_0x443126['flowJson'][_0x5ee6ff(0x10d)][_0x5ee6ff(0xf3)]((_0x19834f,_0x4ccc2b)=>({'node':_0x19834f,'index':_0x4ccc2b}))[_0x5ee6ff(0x1b8)](({node:_0x348e98})=>isRecord(_0x348e98)&&_0x348e98[_0x5ee6ff(0x147)]!==undefined):[],_0xc3245=_0x5dd910!==undefined||_0xfc0df1[_0x5ee6ff(0x11b)]>0x0,_0x462754=_0x40b9cf===undefined&&_0x3c6b41==='INDEPENDENT_FLOW'?_0x5ee6ff(0x151):_0x40b9cf;_0xc3245&&(_0x3c6b41!==_0x5ee6ff(0x1d8)||_0x462754!==_0x5ee6ff(0x151))&&(_0x5dd910!==undefined&&_0x17065c[_0x5ee6ff(0xdc)]({'path':_0x5ee6ff(0x15a),'message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0xfc0df1[_0x5ee6ff(0x215)](({index:_0x3b96a5})=>{const _0x15f5d0=_0x5ee6ff;_0x17065c[_0x15f5d0(0xdc)]({'path':_0x15f5d0(0x1fe)+_0x3b96a5+_0x15f5d0(0x163),'message':_0x15f5d0(0x172)});}));}export async function writeNormalizedFlowConfig(_0x222e1c,_0x4cd4f1,_0x1d8a5d={}){const _0x16b70a=a299_0x5863df,_0x2e7811=resolve(_0x222e1c),_0xb0c787=_0x2e7811+'.'+process['pid']+'.'+randomUUID()+'.tmp',_0xd576cf=JSON['stringify'](_0x4cd4f1,null,0x2)+'\x0a';let _0x15557d;try{try{_0x15557d=(await stat(_0x2e7811))[_0x16b70a(0x178)]&0x1ff;}catch{_0x15557d=undefined;}await writeFile(_0xb0c787,_0xd576cf,{'encoding':_0x16b70a(0x20e),'flag':'wx','mode':_0x15557d??0x1a4});if(_0x15557d!==undefined)await chmod(_0xb0c787,_0x15557d);_0x1d8a5d['overwrite']===![]?(await link(_0xb0c787,_0x2e7811),await unlink(_0xb0c787)):await rename(_0xb0c787,_0x2e7811);}finally{await unlink(_0xb0c787)[_0x16b70a(0x13f)](()=>undefined);}}function validateOuterMetadata(_0x1239c1,_0x109089){const _0x199f02=a299_0x5863df;(typeof _0x1239c1['flowName']!==_0x199f02(0x188)||_0x1239c1[_0x199f02(0xf6)][_0x199f02(0x18b)]()==='')&&_0x109089['push']({'path':_0x199f02(0xf6),'message':_0x199f02(0x195)});_0x1239c1[_0x199f02(0x1aa)]!==undefined&&typeof _0x1239c1[_0x199f02(0x1aa)]!=='string'&&_0x109089[_0x199f02(0xdc)]({'path':'flowDesc','message':_0x199f02(0xe2)});if(_0x1239c1[_0x199f02(0x117)]===undefined||_0x1239c1[_0x199f02(0x117)]===null)_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0x117),'message':_0x199f02(0x113)});else(typeof _0x1239c1[_0x199f02(0x117)]!==_0x199f02(0x188)||!FLOW_TYPES[_0x199f02(0x1af)](_0x1239c1[_0x199f02(0x117)]))&&_0x109089[_0x199f02(0xdc)]({'path':'flowType','message':'Unsupported\x20flowType:\x20'+String(_0x1239c1['flowType'])+'.'});_0x1239c1[_0x199f02(0xe6)]!==undefined&&typeof _0x1239c1[_0x199f02(0xe6)]!==_0x199f02(0x188)&&_0x109089[_0x199f02(0xdc)]({'path':'datasetCode','message':'datasetCode\x20must\x20be\x20a\x20string.'});_0x1239c1['pageIds']===undefined&&_0x1239c1[_0x199f02(0x204)]!==undefined&&(!Number['isSafeInteger'](_0x1239c1[_0x199f02(0x204)])||_0x1239c1['pageId']<=0x0)&&_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0x204),'message':_0x199f02(0xcb)});if(_0x1239c1[_0x199f02(0x1fa)]!==undefined){if(!Array['isArray'](_0x1239c1['pageIds'])||_0x1239c1[_0x199f02(0x1fa)]['some'](_0x44cceb=>!Number[_0x199f02(0x1d5)](_0x44cceb)||_0x44cceb<=0x0))_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0x1fa),'message':_0x199f02(0x146)});else[...new Set(_0x1239c1[_0x199f02(0x1fa)])][_0x199f02(0x18a)](',')['length']>0x800&&_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0x1fa),'message':'pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.'});_0x1239c1[_0x199f02(0x117)]===_0x199f02(0x1d8)&&Array[_0x199f02(0x21c)](_0x1239c1['pageIds'])&&_0x1239c1[_0x199f02(0x1fa)][_0x199f02(0x11b)]>0x0&&_0x109089['push']({'path':'pageIds','message':_0x199f02(0xde)});}_0x1239c1['flowType']==='INDEPENDENT_FLOW'&&_0x1239c1[_0x199f02(0xe6)]!==undefined&&_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0xe6),'message':_0x199f02(0x13e)}),_0x1239c1['flowType']===_0x199f02(0x1d8)&&_0x1239c1[_0x199f02(0x1fa)]===undefined&&_0x1239c1['pageId']!==undefined&&_0x109089[_0x199f02(0xdc)]({'path':_0x199f02(0x204),'message':_0x199f02(0xf2)});}function validateGraph(_0x2d4ff3,_0x25058b){const _0x510799=a299_0x5863df;if(!isRecord(_0x2d4ff3)){_0x25058b[_0x510799(0xdc)]({'path':_0x510799(0x211),'message':_0x510799(0x16b)});return;}!Array['isArray'](_0x2d4ff3[_0x510799(0x10d)])&&_0x25058b['push']({'path':'flowJson.nodes','message':_0x510799(0xbe)});!Array['isArray'](_0x2d4ff3['edges'])&&_0x25058b[_0x510799(0xdc)]({'path':'flowJson.edges','message':_0x510799(0x19d)});Object[_0x510799(0x201)][_0x510799(0x10e)][_0x510799(0x1ff)](_0x2d4ff3,_0x510799(0x11d))&&_0x25058b[_0x510799(0xdc)]({'path':_0x510799(0xfd),'message':'Unsupported\x20schemaVersion:\x20'+String(_0x2d4ff3[_0x510799(0x11d)])+_0x510799(0x177)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x43e1f0 of['formSchema',_0x510799(0x12d),_0x510799(0x1b3)]){Object[_0x510799(0x201)][_0x510799(0x10e)][_0x510799(0x1ff)](_0x2d4ff3,_0x43e1f0)&&_0x25058b[_0x510799(0xdc)]({'path':_0x510799(0x11c)+_0x43e1f0,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x510799(0x21c)](_0x2d4ff3['nodes'])||!Array[_0x510799(0x21c)](_0x2d4ff3[_0x510799(0x1f9)]))return;const _0x5d398e=new Map(),_0x35a05c=[],_0x294eb5=[],_0x50db37=new Map(),_0x294c3d=new Map(),_0x37f6e8=new Set();let _0x2a18dd=0x0;_0x2d4ff3[_0x510799(0x10d)]['forEach']((_0xd4d8c1,_0x512263)=>{const _0x19a1fb=_0x510799,_0x579fee=_0x19a1fb(0x1fe)+_0x512263+']';if(!isRecord(_0xd4d8c1)){_0x25058b['push']({'path':_0x579fee,'message':_0x19a1fb(0x19a)});return;}const _0x5951e5=_0xd4d8c1;if(typeof _0x5951e5['id']!==_0x19a1fb(0x188)||!BPMN_ID_PATTERN['test'](_0x5951e5['id']))_0x25058b['push']({'path':_0x579fee+_0x19a1fb(0x1c0),'message':_0x19a1fb(0x187)});else _0x5d398e[_0x19a1fb(0x1af)](_0x5951e5['id'])?_0x25058b[_0x19a1fb(0xdc)]({'path':_0x579fee+_0x19a1fb(0x1c0),'message':'Duplicate\x20node\x20id:\x20'+_0x5951e5['id']+'.'}):(_0x5d398e[_0x19a1fb(0x175)](_0x5951e5['id'],_0x5951e5),_0x37f6e8[_0x19a1fb(0x154)](_0x5951e5['id']));if(!NODE_TYPES[_0x19a1fb(0x1af)](_0x5951e5[_0x19a1fb(0xce)]))_0x25058b[_0x19a1fb(0xdc)]({'path':_0x579fee+_0x19a1fb(0xc1),'message':_0x19a1fb(0xd3)+String(_0x5951e5[_0x19a1fb(0xce)])+'.'});else{if(_0x5951e5[_0x19a1fb(0xce)]===_0x19a1fb(0xd9))_0x35a05c[_0x19a1fb(0xdc)](_0x5951e5['id']);else _0x5951e5['type']==='END'&&_0x294eb5[_0x19a1fb(0xdc)](_0x5951e5['id']);}_0x5951e5[_0x19a1fb(0xce)]===_0x19a1fb(0xf7)&&(_0x5951e5[_0x19a1fb(0xcf)]===undefined||_0x5951e5[_0x19a1fb(0xcf)]===_0x19a1fb(0xf7))&&(_0x2a18dd+=0x1);validateNode(_0x5951e5,_0x579fee,_0x25058b);if(_0x5951e5['type']===_0x19a1fb(0x14c)){const _0x3797dd=resolveEffectiveResultVariable(_0x5951e5[_0x19a1fb(0x17a)],![]);_0x3797dd&&(registerResultVariableOwner(_0x294c3d,_0x3797dd,_0x5951e5['id'],_0x25058b),!_0x50db37[_0x19a1fb(0x1af)](_0x3797dd)&&_0x50db37['set'](_0x3797dd,_0x5951e5['id']));}if(_0x5951e5[_0x19a1fb(0xce)]===_0x19a1fb(0xf7)&&isRecord(_0x5951e5[_0x19a1fb(0x128)])&&_0x5951e5['timeout'][_0x19a1fb(0x103)]===!![]&&_0x5951e5[_0x19a1fb(0x128)][_0x19a1fb(0xc7)]===_0x19a1fb(0x16a)){const _0x202c2c=resolveEffectiveResultVariable(_0x5951e5[_0x19a1fb(0x128)]['resultVariable'],!![]);_0x202c2c&&registerResultVariableOwner(_0x294c3d,_0x202c2c,_0x5951e5['id']+_0x19a1fb(0x17f),_0x25058b);}});_0x35a05c['length']!==0x1&&_0x25058b[_0x510799(0xdc)]({'path':_0x510799(0xca),'message':_0x510799(0x16f)});_0x294eb5[_0x510799(0x11b)]===0x0&&_0x25058b[_0x510799(0xdc)]({'path':'flowJson.nodes','message':_0x510799(0x219)});const _0x4f57d6=new Map(),_0x569567=new Map(),_0xe5fee5=new Map(),_0x1faa8c=new Set();_0x2d4ff3[_0x510799(0x1f9)][_0x510799(0x215)]((_0x565caa,_0x54c59e)=>{const _0x23478b=_0x510799,_0x3d9a18=_0x23478b(0x224)+_0x54c59e+']';if(!isRecord(_0x565caa)){_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18,'message':_0x23478b(0x1ca)});return;}const _0x3ac843=_0x565caa;_0xe5fee5[_0x23478b(0x175)](_0x3ac843,_0x3d9a18);const _0x19acac=resolveEdgeEndpoint(_0x3ac843[_0x23478b(0x189)],_0x3ac843[_0x23478b(0x111)]),_0x435922=resolveEdgeEndpoint(_0x3ac843[_0x23478b(0x1a0)],_0x3ac843[_0x23478b(0x14b)]);if(!_0x19acac)_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18+'.source','message':_0x23478b(0x21b)});if(!_0x435922)_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18+_0x23478b(0x161),'message':_0x23478b(0xbc)});_0x19acac&&!_0x5d398e['has'](_0x19acac)&&_0x25058b['push']({'path':_0x3d9a18+'.source','message':_0x23478b(0x176)+_0x19acac+'.'});_0x435922&&!_0x5d398e['has'](_0x435922)&&_0x25058b['push']({'path':_0x3d9a18+_0x23478b(0x161),'message':_0x23478b(0x20b)+_0x435922+'.'});if(_0x3ac843['id']!==undefined){if(typeof _0x3ac843['id']!==_0x23478b(0x188)||!BPMN_ID_PATTERN[_0x23478b(0xf9)](_0x3ac843['id']))_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18+_0x23478b(0x1c0),'message':_0x23478b(0x192)});else{if(_0x37f6e8[_0x23478b(0x1af)](_0x3ac843['id']))_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18+'.id','message':_0x23478b(0x164)+_0x3ac843['id']+'.'});else!_0x37f6e8[_0x23478b(0x1af)](_0x3ac843['id'])&&_0x37f6e8[_0x23478b(0x154)](_0x3ac843['id']);}}if(_0x19acac&&_0x435922){const _0x2b270f=_0x19acac+'\x00'+_0x435922+'\x00'+(_0x3ac843[_0x23478b(0xe9)]??_0x23478b(0x143));_0x1faa8c['has'](_0x2b270f)?_0x25058b[_0x23478b(0xdc)]({'path':_0x3d9a18,'message':_0x23478b(0x1a2)+_0x19acac+_0x23478b(0xc5)+_0x435922+'\x20('+(_0x3ac843[_0x23478b(0xe9)]??_0x23478b(0x143))+').'}):_0x1faa8c[_0x23478b(0x154)](_0x2b270f);}validateEdge(_0x3ac843,_0x3d9a18,_0x25058b),_0x19acac&&_0x435922&&(_0x4f57d6[_0x23478b(0x1ee)](_0x19acac)?.['push'](_0x3ac843)??_0x4f57d6[_0x23478b(0x175)](_0x19acac,[_0x3ac843]),_0x569567[_0x23478b(0x1ee)](_0x435922)?.[_0x23478b(0xdc)](_0x3ac843)??_0x569567['set'](_0x435922,[_0x3ac843]));});if(_0x35a05c[_0x510799(0x11b)]!==0x1)return;validateGraphShape(_0x5d398e,_0x35a05c[0x0],_0x294eb5,_0x4f57d6,_0x569567,_0xe5fee5,_0x25058b),validateScriptResultReferences(_0x5d398e,_0x35a05c[0x0],_0x4f57d6,_0x569567,_0xe5fee5,_0x50db37,_0x25058b),validateApprovalResults(_0x5d398e,_0x2a18dd,_0x294eb5,_0x25058b);}function a299_0x3fbc(_0x20ee58,_0x212399){_0x20ee58=_0x20ee58-0xb9;const _0x3f00b1=a299_0x3f00();let _0x3fbcb9=_0x3f00b1[_0x20ee58];return _0x3fbcb9;}function validateNode(_0x277c05,_0x97e08c,_0x5917e9){const _0x2f5560=a299_0x5863df;for(const _0x151a7e of['form',_0x2f5560(0x20f)]){Object[_0x2f5560(0x201)][_0x2f5560(0x10e)][_0x2f5560(0x1ff)](_0x277c05,_0x151a7e)&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+'.'+_0x151a7e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x277c05['type']))return;(typeof _0x277c05[_0x2f5560(0x21d)]!==_0x2f5560(0x188)||_0x277c05[_0x2f5560(0x21d)]['trim']()==='')&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+'.name','message':_0x2f5560(0x1a6)});_0x277c05[_0x2f5560(0x204)]!==undefined&&_0x5917e9['push']({'path':_0x97e08c+_0x2f5560(0xfc),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x277c05[_0x2f5560(0x147)]!==undefined){if(typeof _0x277c05['path']!=='string'||_0x277c05[_0x2f5560(0x147)][_0x2f5560(0x18b)]()==='')_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x12f),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x277c05[_0x2f5560(0xce)]!==_0x2f5560(0xf7)&&_0x277c05['type']!=='END'&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x12f),'message':_0x2f5560(0x12a)});}const _0x35dd20=_0x277c05[_0x2f5560(0x158)];if(!isRecord(_0x35dd20))_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x220),'message':_0x2f5560(0x1e8)});else for(const _0x28100b of['x','y']){const _0x1ff89b=_0x35dd20[_0x28100b];(typeof _0x1ff89b!==_0x2f5560(0x122)||!Number['isFinite'](_0x1ff89b)||_0x1ff89b<0x0)&&_0x5917e9['push']({'path':_0x97e08c+'.position.'+_0x28100b,'message':'position.'+_0x28100b+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x277c05[_0x2f5560(0xce)]===_0x2f5560(0xf7)){const _0x36d4ec=_0x277c05['approvalMode']??'SINGLE',_0x2f447e=_0x277c05[_0x2f5560(0xcf)]??_0x2f5560(0xf7);!APPROVAL_TASK_MODES['has'](_0x2f447e)&&_0x5917e9['push']({'path':_0x97e08c+_0x2f5560(0x21e),'message':_0x2f5560(0x1cb)+String(_0x2f447e)+'.'});!APPROVAL_MODES[_0x2f5560(0x1af)](_0x36d4ec)&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x10b),'message':_0x2f5560(0x225)+String(_0x36d4ec)+'.'});if(!isRecord(_0x277c05[_0x2f5560(0x13a)]))_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x1dc),'message':_0x2f5560(0x120)});else{const _0x48240a=_0x277c05[_0x2f5560(0x13a)]['strategy'];_0x48240a!==_0x2f5560(0x140)&&_0x48240a!=='ROLE'&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x129),'message':_0x2f5560(0x210)});if(_0x48240a==='FIXED'){const _0x38678c=_0x277c05[_0x2f5560(0x13a)][_0x2f5560(0x14e)];if(!Array[_0x2f5560(0x21c)](_0x38678c)||_0x38678c[_0x2f5560(0x11b)]===0x0)_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x1c2),'message':_0x2f5560(0x1bd)});else{const _0xb11556=_0x38678c[_0x2f5560(0x1c6)](_0x413bcb=>!isValidUserId(_0x413bcb));_0xb11556>=0x0&&_0x5917e9['push']({'path':_0x97e08c+'.assignee.userIds['+_0xb11556+']','message':_0x2f5560(0x19f)});const _0x4be0a4=new Set(_0x38678c[_0x2f5560(0x1b8)](isValidUserId)[_0x2f5560(0xf3)](_0x54677b=>String(_0x54677b)[_0x2f5560(0x18b)]()));_0x36d4ec===_0x2f5560(0x228)&&_0x4be0a4[_0x2f5560(0x1d6)]>0x1&&_0x5917e9['push']({'path':_0x97e08c+'.assignee.userIds','message':_0x2f5560(0x1f8)});}}if(_0x48240a===_0x2f5560(0xd2)){const _0x4b5e32=_0x277c05[_0x2f5560(0x13a)][_0x2f5560(0x174)],_0x4b32dd=typeof _0x4b5e32==='number'||typeof _0x4b5e32===_0x2f5560(0x188)?Number(String(_0x4b5e32)[_0x2f5560(0x18b)]()):Number[_0x2f5560(0x162)];(!Number['isSafeInteger'](_0x4b32dd)||_0x4b32dd<=0x0)&&_0x5917e9['push']({'path':_0x97e08c+'.assignee.roleId','message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x277c05['transferCandidates']!==undefined){if(!isRecord(_0x277c05[_0x2f5560(0x198)]))_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0xe7),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x277c05[_0x2f5560(0x198)][_0x2f5560(0x1ac)]!=='FIXED')_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x149),'message':_0x2f5560(0x1d7)});else{const _0x58f36f=_0x277c05['transferCandidates']['userIds'];if(!Array[_0x2f5560(0x21c)](_0x58f36f)||_0x58f36f[_0x2f5560(0x11b)]===0x0)_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x1a9),'message':_0x2f5560(0x21f)});else{const _0xa6a0a6=_0x58f36f[_0x2f5560(0x1c6)](_0xb25b1a=>!isValidUserId(_0xb25b1a));_0xa6a0a6>=0x0&&_0x5917e9['push']({'path':_0x97e08c+'.transferCandidates.userIds['+_0xa6a0a6+']','message':_0x2f5560(0x185)});}}}}}_0x277c05[_0x2f5560(0x152)]!==undefined&&typeof _0x277c05['sequential']!==_0x2f5560(0x167)&&_0x5917e9['push']({'path':_0x97e08c+_0x2f5560(0x17c),'message':_0x2f5560(0x200)});if(_0x277c05['type']==='SCRIPT'){(typeof _0x277c05[_0x2f5560(0x1c9)]!==_0x2f5560(0x188)||_0x277c05[_0x2f5560(0x1c9)]['trim']()==='')&&_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x1fd),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x277c05[_0x2f5560(0x17a)]!==undefined){if(typeof _0x277c05[_0x2f5560(0x17a)]!==_0x2f5560(0x188)||!VARIABLE_PATTERN[_0x2f5560(0xf9)](_0x277c05[_0x2f5560(0x17a)]))_0x5917e9[_0x2f5560(0xdc)]({'path':_0x97e08c+_0x2f5560(0x105),'message':_0x2f5560(0xd0)});else(RESERVED_RESULT_VARIABLES[_0x2f5560(0x1af)](_0x277c05[_0x2f5560(0x17a)])||_0x277c05['resultVariable'][_0x2f5560(0x194)](_0x2f5560(0x1e6)))&&_0x5917e9['push']({'path':_0x97e08c+'.resultVariable','message':_0x2f5560(0x1b6)+_0x277c05[_0x2f5560(0x17a)]+'.'});}}validateAsyncExecution(_0x277c05,_0x97e08c,_0x5917e9),validateApprovalTimeout(_0x277c05,_0x97e08c,_0x5917e9),validateCcConfig(_0x277c05,_0x97e08c,_0x5917e9),_0x277c05[_0x2f5560(0xce)]===_0x2f5560(0x124)&&validateNotificationConfig(_0x277c05[_0x2f5560(0x18e)],_0x97e08c+_0x2f5560(0x123),_0x5917e9);}function validateAsyncExecution(_0x36914a,_0x2ea409,_0x364544){const _0x436966=a299_0x5863df;if(_0x36914a[_0x436966(0x1df)]===undefined)return;if(!isRecord(_0x36914a[_0x436966(0x1df)])){_0x364544[_0x436966(0xdc)]({'path':_0x2ea409+_0x436966(0x214),'message':_0x436966(0x1ef)});return;}if(_0x36914a[_0x436966(0x1df)][_0x436966(0x103)]!==undefined&&typeof _0x36914a['async'][_0x436966(0x103)]!==_0x436966(0x167)){_0x364544[_0x436966(0xdc)]({'path':_0x2ea409+_0x436966(0x1ab),'message':_0x436966(0x173)});return;}if(_0x36914a[_0x436966(0x1df)][_0x436966(0x103)]!==!![])return;_0x36914a[_0x436966(0xce)]!==_0x436966(0x14c)&&_0x364544[_0x436966(0xdc)]({'path':_0x2ea409+_0x436966(0x214),'message':_0x436966(0x20a)});const _0x53c850=_0x36914a[_0x436966(0x1df)][_0x436966(0xda)]??0x3;(!Number[_0x436966(0x1f2)](_0x53c850)||_0x53c850<0x1||_0x53c850>MAX_ASYNC_RETRY_COUNT)&&_0x364544[_0x436966(0xdc)]({'path':_0x2ea409+_0x436966(0x168),'message':_0x436966(0x10f)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x36914a[_0x436966(0x1df)]['retryInterval']!==undefined&&validateTimeAmount(_0x36914a[_0x436966(0x1df)]['retryInterval'],_0x2ea409+_0x436966(0x17d),_0x364544);}function validateApprovalTimeout(_0x10f37d,_0x25f6b4,_0x12026e){const _0x3b4a92=a299_0x5863df;if(_0x10f37d['timeout']===undefined)return;if(!isRecord(_0x10f37d['timeout'])){_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0x17f),'message':_0x3b4a92(0x1bf)});return;}if(_0x10f37d['timeout'][_0x3b4a92(0x103)]!==undefined&&typeof _0x10f37d[_0x3b4a92(0x128)][_0x3b4a92(0x103)]!=='boolean'){_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+'.timeout.enabled','message':_0x3b4a92(0x1bb)});return;}if(_0x10f37d[_0x3b4a92(0x128)][_0x3b4a92(0x103)]!==!![])return;if(_0x10f37d[_0x3b4a92(0x128)]['interrupting']!==undefined&&typeof _0x10f37d[_0x3b4a92(0x128)]['interrupting']!==_0x3b4a92(0x167)){_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0x101),'message':_0x3b4a92(0xbf)});return;}_0x10f37d[_0x3b4a92(0xce)]!==_0x3b4a92(0xf7)&&_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0x17f),'message':_0x3b4a92(0xc8)});validateTimeAmount(_0x10f37d[_0x3b4a92(0x128)]['duration'],_0x25f6b4+_0x3b4a92(0x1a8),_0x12026e);const _0x26ccc3=_0x10f37d[_0x3b4a92(0x128)][_0x3b4a92(0xc7)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x26ccc3)){_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0xed),'message':_0x3b4a92(0xf8)});return;}(_0x10f37d[_0x3b4a92(0xcf)]??_0x3b4a92(0xf7))===_0x3b4a92(0x1be)&&_0x26ccc3!=='EXECUTE_BFF'&&_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0xed),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x54d69c=_0x10f37d[_0x3b4a92(0x128)][_0x3b4a92(0xd6)]??_0x26ccc3!==_0x3b4a92(0x16a);if(_0x26ccc3===_0x3b4a92(0x16a))_0x54d69c&&_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+'.timeout.interrupting','message':_0x3b4a92(0x1de)}),(typeof _0x10f37d['timeout'][_0x3b4a92(0x1c9)]!==_0x3b4a92(0x188)||_0x10f37d[_0x3b4a92(0x128)][_0x3b4a92(0x1c9)]['trim']()==='')&&_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0x18d),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x10f37d[_0x3b4a92(0x128)]['resultVariable'],_0x25f6b4+_0x3b4a92(0x1c4),_0x12026e);else!_0x54d69c&&_0x12026e[_0x3b4a92(0xdc)]({'path':_0x25f6b4+_0x3b4a92(0x101),'message':_0x26ccc3+'\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.'});}function validateTimeAmount(_0x22e144,_0x579d8a,_0x10a7a4){const _0x4e9d6e=a299_0x5863df;if(!isRecord(_0x22e144)){_0x10a7a4['push']({'path':_0x579d8a,'message':_0x4e9d6e(0xdf)});return;}(!Number[_0x4e9d6e(0x1f2)](_0x22e144['value'])||Number(_0x22e144[_0x4e9d6e(0x22b)])<=0x0)&&_0x10a7a4[_0x4e9d6e(0xdc)]({'path':_0x579d8a+_0x4e9d6e(0xbd),'message':_0x4e9d6e(0x17e)}),!FLOW_TIME_UNITS[_0x4e9d6e(0x1af)](_0x22e144[_0x4e9d6e(0x183)])&&_0x10a7a4[_0x4e9d6e(0xdc)]({'path':_0x579d8a+_0x4e9d6e(0x1e3),'message':_0x4e9d6e(0x100)});}function validateOptionalResultVariable(_0x36f15d,_0x18555b,_0x2139d9){const _0x560fbc=a299_0x5863df;if(_0x36f15d===undefined||_0x36f15d===null||_0x36f15d==='')return;if(typeof _0x36f15d!=='string'||!VARIABLE_PATTERN[_0x560fbc(0xf9)](_0x36f15d))_0x2139d9[_0x560fbc(0xdc)]({'path':_0x18555b,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES['has'](_0x36f15d)||_0x36f15d[_0x560fbc(0x194)](_0x560fbc(0x1e6)))&&_0x2139d9['push']({'path':_0x18555b,'message':_0x560fbc(0x1b6)+_0x36f15d+'.'});}function validateCcConfig(_0x2c1303,_0x882ab,_0x11fc48){const _0x79cc69=a299_0x5863df;if(_0x2c1303['cc']===undefined)return;if(!isRecord(_0x2c1303['cc'])){_0x11fc48[_0x79cc69(0xdc)]({'path':_0x882ab+'.cc','message':_0x79cc69(0x160)});return;}_0x2c1303[_0x79cc69(0xce)]!==_0x79cc69(0x159)&&_0x2c1303['type']!=='APPROVAL'&&_0x11fc48[_0x79cc69(0xdc)]({'path':_0x882ab+_0x79cc69(0x1a1),'message':_0x79cc69(0x126)});Object[_0x79cc69(0x201)][_0x79cc69(0x10e)][_0x79cc69(0x1ff)](_0x2c1303['cc'],_0x79cc69(0x125))&&_0x11fc48[_0x79cc69(0xdc)]({'path':_0x882ab+_0x79cc69(0xd7),'message':UNSUPPORTED_FORM_MESSAGE});const _0x299cfc=_0x2c1303['cc']['recipientUserIds'];if(!Array[_0x79cc69(0x21c)](_0x299cfc)||_0x299cfc[_0x79cc69(0x11b)]===0x0)_0x11fc48[_0x79cc69(0xdc)]({'path':_0x882ab+_0x79cc69(0x110),'message':_0x79cc69(0x116)});else{_0x299cfc[_0x79cc69(0x11b)]>MAX_CC_RECIPIENTS&&_0x11fc48[_0x79cc69(0xdc)]({'path':_0x882ab+_0x79cc69(0x110),'message':_0x79cc69(0x226)+MAX_CC_RECIPIENTS+_0x79cc69(0x181)});const _0x5508ca=new Set();_0x299cfc[_0x79cc69(0x215)]((_0x55d98a,_0x3a3df9)=>{const _0x1013ed=_0x79cc69;if(typeof _0x55d98a!==_0x1013ed(0x188)||_0x55d98a[_0x1013ed(0x18b)]()==='')_0x11fc48['push']({'path':_0x882ab+_0x1013ed(0x1ad)+_0x3a3df9+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x5508ca['has'](_0x55d98a['trim']())?_0x11fc48[_0x1013ed(0xdc)]({'path':_0x882ab+_0x1013ed(0x1ad)+_0x3a3df9+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x55d98a['trim']()+'.'}):_0x5508ca[_0x1013ed(0x154)](_0x55d98a[_0x1013ed(0x18b)]());});}validateStringArray(_0x2c1303['cc']['visible'],_0x882ab+_0x79cc69(0x1c7),_0x11fc48);}function a299_0x3f00(){const _0x40190f=['Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Duplicate\x20resultVariable:\x20','startsWith','flowName\x20is\x20required.','waypoint.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','transferCandidates','5343234VrVZrr','node\x20must\x20be\x20an\x20object.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','matchAll','edges\x20must\x20be\x20an\x20array.','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','target','.cc','Duplicate\x20edge\x20route:\x20','136341qMXUdX','REJECTED','FAIL','Every\x20node\x20requires\x20a\x20non-empty\x20name.','approved','.timeout.duration','.transferCandidates.userIds','flowDesc','.async.enabled','strategy','.cc.recipientUserIds[','parse','has','result','metadata','value\x20must\x20be\x20a\x20non-empty\x20string.','formPermissions','AUTO_APPROVE','Notification\x20template.facts\x20must\x20be\x20an\x20array.','Reserved\x20resultVariable:\x20','role','filter','legacy_field_removed','USER','timeout.enabled\x20must\x20be\x20a\x20boolean.','Notification\x20version\x20must\x20be\x20a\x20string.','FIXED\x20assignee\x20requires\x20userIds.','HANDLE','timeout\x20must\x20be\x20an\x20object.','.id','label','.assignee.userIds','BCC','.timeout.resultVariable','object','findIndex','.cc.visible','33SrLcqT','scriptName','edge\x20must\x20be\x20an\x20object.','Unsupported\x20task\x20mode:\x20','SECONDS','expression','recipientUserIds','.waypoints','.role','].taskMode','.expression','Notification\x20fact.','Duplicate\x20value:\x20','isSafeInteger','size','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','INDEPENDENT_FLOW','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','pageMode','AUTO_REJECT','.assignee','Notification\x20recipients\x20must\x20be\x20an\x20array.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','async','waypoints','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','text','.unit','.template','defaultFlow\x20must\x20be\x20a\x20boolean.','approval_sys_','startPath\x20must\x20be\x20a\x20non-empty\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','4806170SCbXET','scriptResult','failurePolicy','\x20must\x20be\x20a\x20finite\x20number.','__rabetbase_local_validation__','get','async\x20must\x20be\x20an\x20object.','message','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','isInteger','\x20was\x20empty\x20and\x20was\x20removed.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','22LAvPaO','url','.facts','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','edges','pageIds','.actions','approval_sys_initiatorUsername','.scriptName','flowJson.nodes[','call','sequential\x20must\x20be\x20a\x20boolean.','prototype','.configCode','CONDITION','pageId','APPROVED','.version','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','toUpperCase','#/$defs/timeAmount','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','Edge\x20target\x20node\x20not\x20found:\x20','DAYS','every','utf8','formPermission','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','flowJson','MINUTES','bindDatasetCode','.async','forEach','Unsupported\x20pageMode:\x20','startPageId','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','edge\x20source\x20is\x20required.','isArray','name','.taskMode','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.position','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','\x20facts.','flowJson.edges[','Unsupported\x20approval\x20mode:\x20','cc.recipientUserIds\x20supports\x20at\x20most\x20','Notification\x20action\x20must\x20be\x20an\x20object.','SINGLE','Node\x20is\x20not\x20reachable\x20from\x20START.','https://lovrabet.com/schema/rabetbase-flow-config.json','value','Node\x20has\x20no\x20outgoing\x20edge.','recipients','array','approval_sys_processInstanceId','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','edge\x20target\x20is\x20required.','.value','nodes\x20must\x20be\x20an\x20array.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','Node\x20cannot\x20reach\x20any\x20END.','.type','isFinite','Notification\x20template.actions\x20must\x20be\x20an\x20array.','#/$defs/flowEdge','\x20->\x20','title','action','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Unsupported\x20notification\x20placeholder:\x20','flowJson.nodes','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','NOTIFICATION\x20node\x20requires\x20template.','9053184VMOftG','type','taskMode','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','ROLE','Unsupported\x20node\x20type:\x20','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','keys','interrupting','.cc.readSources','template','START','retryCount','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','push','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','duration\x20requires\x20value\x20and\x20unit.','HOURS','Notification\x20fact\x20must\x20be\x20an\x20object.','flowDesc\x20must\x20be\x20a\x20string.','Rabetbase\x20FlowConfig','Node\x20has\x20no\x20incoming\x20edge.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','datasetCode','.transferCandidates','#/$defs/userId','conditionType','EXPRESSION','.url','facts','.timeout.action','failurePolicy\x20must\x20be\x20a\x20string.','.detailMarkdown','ANY','Notification\x20template\x20supports\x20at\x20most\x20','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','map','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','approval_sys_dataId','flowName','APPROVAL','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','test','248jiOOvf','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.pageId','flowJson.schemaVersion','entries',',\x20but\x20node\x20','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','.timeout.interrupting','EXPRESSION\x20edge\x20requires\x20expression.','enabled','approval_sys_datasetCode','.resultVariable','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','1807724xBJlPJ','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','.conditionType','empty_metadata_removed','.approvalMode','approval_sys_initiatorUserId','nodes','hasOwnProperty','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','.cc.recipientUserIds','sourceNodeId','integer','flowType\x20is\x20required.','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','flowJson.nodes.','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','flowType','event','flowJson.pageMode','\x20is\x20required.','length','flowJson.','schemaVersion','^[A-Za-z_][A-Za-z0-9_]*$','edge\x20name\x20must\x20be\x20a\x20string.','APPROVAL\x20node\x20requires\x20assignee.','configCode','number','.config','NOTIFICATION','readSources','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','timeout','.assignee.strategy','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','MAX_SAFE_INTEGER','version','formDefinitions','.waypoints[','.path','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','waypoints\x20must\x20be\x20an\x20array.','flowJson.startPageId','context','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','formData','warnings','ALL','PLATFORM_FORM','approval_sys_appCode','assignee','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.defaultFlow','25821vUZzun','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','catch','FIXED','delete','.recipients','ALWAYS','flowKey','6zPWInc','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','path','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.transferCandidates.strategy','Unsupported\x20condition\x20type:\x20','targetNodeId','SCRIPT','6021430tBEqvl','userIds','FORM_FLOW','EMAIL','CUSTOM_PAGE','sequential','detailMarkdown','add','Notification\x20action.url\x20is\x20required.','some','approval_sys_pageId','position','END','flowJson.startPath','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','approval_sys_operationType','flowJson.edges','flowCode','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','cc\x20must\x20be\x20an\x20object.','.target','NaN','].path','Duplicate\x20BPMN\x20element\x20id:\x20','Notification\x20recipient.value\x20is\x20required.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','boolean','.async.retryCount','CONTINUE','EXECUTE_BFF','flowJson\x20must\x20be\x20an\x20object.','defaultFlow','startPath','stringify','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','^[1-9][0-9]*$','variables','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','async.enabled\x20must\x20be\x20a\x20boolean.','roleId','set','Edge\x20source\x20node\x20not\x20found:\x20','.\x20This\x20CLI\x20supports\x20only\x20','mode','Notification\x20recipient.type\x20is\x20required.','resultVariable','templateName','.sequential','.async.retryInterval','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.timeout','.text','\x20users.','Notification\x20configCode\x20is\x20required.','unit','approval.simple-flow.v1','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','slice','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','string','source','join','trim','includes','.timeout.scriptName','config','Notification\x20recipient\x20must\x20be\x20an\x20object.','appCode'];a299_0x3f00=function(){return _0x40190f;};return a299_0x3f00();}function validateStringArray(_0x4cac10,_0x3d2cd8,_0x1e7a91){const _0x1a5b49=a299_0x5863df;if(_0x4cac10===undefined)return;if(!Array[_0x1a5b49(0x21c)](_0x4cac10)){_0x1e7a91[_0x1a5b49(0xdc)]({'path':_0x3d2cd8,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x207d02=new Set();_0x4cac10['forEach']((_0x123517,_0x117ace)=>{const _0x404842=_0x1a5b49;if(typeof _0x123517!==_0x404842(0x188)||_0x123517['trim']()==='')_0x1e7a91[_0x404842(0xdc)]({'path':_0x3d2cd8+'['+_0x117ace+']','message':_0x404842(0x1b2)});else _0x207d02[_0x404842(0x1af)](_0x123517['trim']())?_0x1e7a91[_0x404842(0xdc)]({'path':_0x3d2cd8+'['+_0x117ace+']','message':_0x404842(0x1d4)+_0x123517[_0x404842(0x18b)]()+'.'}):_0x207d02[_0x404842(0x154)](_0x123517[_0x404842(0x18b)]());});}function validateNotificationConfig(_0x116ce4,_0x35390d,_0x202b13){const _0x5db269=a299_0x5863df;if(!isRecord(_0x116ce4)){_0x202b13[_0x5db269(0xdc)]({'path':_0x35390d,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x116ce4[_0x5db269(0x12c)]!==undefined&&_0x116ce4[_0x5db269(0x12c)]!==null){if(typeof _0x116ce4[_0x5db269(0x12c)]!==_0x5db269(0x188))_0x202b13['push']({'path':_0x35390d+_0x5db269(0x206),'message':_0x5db269(0x1bc)});else _0x116ce4['version'][_0x5db269(0x18b)]()&&_0x116ce4['version'][_0x5db269(0x18b)]()!=='v1'&&_0x202b13[_0x5db269(0xdc)]({'path':_0x35390d+_0x5db269(0x206),'message':'Unsupported\x20notification\x20version:\x20'+_0x116ce4[_0x5db269(0x12c)]+'.'});}const _0x1e07f2=requireNotificationString(_0x116ce4[_0x5db269(0x121)],_0x35390d+'.configCode',_0x5db269(0x182),_0x202b13);_0x1e07f2?.[_0x5db269(0x18c)]('${')&&_0x202b13[_0x5db269(0xdc)]({'path':_0x35390d+_0x5db269(0x202),'message':_0x5db269(0x15f)});if(_0x116ce4[_0x5db269(0x1eb)]!==undefined&&_0x116ce4[_0x5db269(0x1eb)]!==null){if(typeof _0x116ce4[_0x5db269(0x1eb)]!==_0x5db269(0x188))_0x202b13['push']({'path':_0x35390d+'.failurePolicy','message':_0x5db269(0xee)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x116ce4['failurePolicy'][_0x5db269(0x18b)]()[_0x5db269(0x208)]())&&_0x202b13[_0x5db269(0xdc)]({'path':_0x35390d+'.failurePolicy','message':_0x5db269(0xe5)});}!isRecord(_0x116ce4[_0x5db269(0xd8)])?_0x202b13[_0x5db269(0xdc)]({'path':_0x35390d+_0x5db269(0x1e4),'message':_0x5db269(0xcc)}):validateNotificationTemplate(_0x116ce4[_0x5db269(0xd8)],_0x35390d+'.template',_0x202b13),validateNotificationRecipients(_0x116ce4[_0x5db269(0x22d)],_0x35390d+_0x5db269(0x142),_0x202b13);}function validateNotificationTemplate(_0x5ac10c,_0x524530,_0x2aaca9){const _0x47fbac=a299_0x5863df;for(const _0x2cf62c of[_0x47fbac(0xc6),'summary']){const _0x2e46f0=requireNotificationString(_0x5ac10c[_0x2cf62c],_0x524530+'.'+_0x2cf62c,'Notification\x20template.'+_0x2cf62c+'\x20is\x20required.',_0x2aaca9);if(_0x2e46f0)validateNotificationPlaceholders(_0x2e46f0,_0x524530+'.'+_0x2cf62c,_0x2aaca9);}_0x5ac10c['detailMarkdown']!==undefined&&_0x5ac10c[_0x47fbac(0x153)]!==null&&(typeof _0x5ac10c[_0x47fbac(0x153)]!==_0x47fbac(0x188)?_0x2aaca9[_0x47fbac(0xdc)]({'path':_0x524530+'.detailMarkdown','message':_0x47fbac(0x207)}):validateNotificationPlaceholders(_0x5ac10c[_0x47fbac(0x153)],_0x524530+_0x47fbac(0xef),_0x2aaca9)),validateNotificationFacts(_0x5ac10c[_0x47fbac(0xec)],_0x524530+_0x47fbac(0x1f7),_0x2aaca9),validateNotificationActions(_0x5ac10c['actions'],_0x524530+_0x47fbac(0x1fb),_0x2aaca9);}function validateNotificationFacts(_0x474c4c,_0x2b7537,_0x3d6f2e){const _0x403b84=a299_0x5863df;if(_0x474c4c===undefined||_0x474c4c===null)return;if(!Array[_0x403b84(0x21c)](_0x474c4c)){_0x3d6f2e[_0x403b84(0xdc)]({'path':_0x2b7537,'message':_0x403b84(0x1b5)});return;}_0x474c4c['length']>MAX_NOTIFICATION_FACTS&&_0x3d6f2e[_0x403b84(0xdc)]({'path':_0x2b7537,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x403b84(0x223)}),_0x474c4c[_0x403b84(0x215)]((_0x1b5b2d,_0x4f0d21)=>{const _0x195666=_0x403b84,_0x2055e0=_0x2b7537+'['+_0x4f0d21+']';if(!isRecord(_0x1b5b2d)){_0x3d6f2e[_0x195666(0xdc)]({'path':_0x2055e0,'message':_0x195666(0xe1)});return;}for(const _0x15eea9 of[_0x195666(0x1c1),_0x195666(0x22b)]){const _0x4fb24d=requireNotificationString(_0x1b5b2d[_0x15eea9],_0x2055e0+'.'+_0x15eea9,_0x195666(0x1d3)+_0x15eea9+_0x195666(0x11a),_0x3d6f2e);_0x4fb24d&&validateNotificationPlaceholders(_0x4fb24d,_0x2055e0+'.'+_0x15eea9,_0x3d6f2e);}});}function validateNotificationActions(_0x382465,_0x39176a,_0x570984){const _0x197a0a=a299_0x5863df;if(_0x382465===undefined||_0x382465===null)return;if(!Array[_0x197a0a(0x21c)](_0x382465)){_0x570984['push']({'path':_0x39176a,'message':_0x197a0a(0xc3)});return;}_0x382465['length']>MAX_NOTIFICATION_ACTIONS&&_0x570984['push']({'path':_0x39176a,'message':_0x197a0a(0xf1)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x382465['forEach']((_0x409e96,_0x4adbb1)=>{const _0x5d278e=_0x197a0a,_0x453f07=_0x39176a+'['+_0x4adbb1+']';if(!isRecord(_0x409e96)){_0x570984['push']({'path':_0x453f07,'message':_0x5d278e(0x227)});return;}const _0x12dcc1=requireNotificationString(_0x409e96[_0x5d278e(0x1e2)],_0x453f07+'.text','Notification\x20action.text\x20is\x20required.',_0x570984);if(_0x12dcc1)validateNotificationPlaceholders(_0x12dcc1,_0x453f07+_0x5d278e(0x180),_0x570984);const _0x57d6f9=requireNotificationString(_0x409e96[_0x5d278e(0x1f6)],_0x453f07+_0x5d278e(0xeb),_0x5d278e(0x155),_0x570984);if(!_0x57d6f9)return;validateNotificationPlaceholders(_0x57d6f9,_0x453f07+_0x5d278e(0xeb),_0x570984),!/^https?:\/\//i[_0x5d278e(0xf9)](_0x57d6f9)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x5d278e(0xf9)](_0x57d6f9)&&_0x570984['push']({'path':_0x453f07+'.url','message':_0x5d278e(0x21a)});});}function validateNotificationRecipients(_0x3dd196,_0x4f56f0,_0x3e5b85){const _0x467a4c=a299_0x5863df;if(_0x3dd196===undefined||_0x3dd196===null)return;if(!Array[_0x467a4c(0x21c)](_0x3dd196)){_0x3e5b85[_0x467a4c(0xdc)]({'path':_0x4f56f0,'message':_0x467a4c(0x1dd)});return;}let _0x6e9034=![];_0x3dd196[_0x467a4c(0x215)]((_0x2aec6b,_0x166d1e)=>{const _0xf74a19=_0x467a4c,_0x2af7ed=_0x4f56f0+'['+_0x166d1e+']';if(!isRecord(_0x2aec6b)){_0x3e5b85[_0xf74a19(0xdc)]({'path':_0x2af7ed,'message':_0xf74a19(0x18f)});return;}const _0x398419=requireNotificationString(_0x2aec6b[_0xf74a19(0xce)],_0x2af7ed+'.type',_0xf74a19(0x179),_0x3e5b85);_0x398419&&!NOTIFICATION_RECIPIENT_TYPES[_0xf74a19(0x1af)](_0x398419[_0xf74a19(0x208)]())&&_0x3e5b85[_0xf74a19(0xdc)]({'path':_0x2af7ed+_0xf74a19(0xc1),'message':_0xf74a19(0xbb)});let _0x54b324='TO';_0x2aec6b[_0xf74a19(0x1b7)]!==undefined&&_0x2aec6b['role']!==null&&(typeof _0x2aec6b[_0xf74a19(0x1b7)]!==_0xf74a19(0x188)?(_0x3e5b85[_0xf74a19(0xdc)]({'path':_0x2af7ed+_0xf74a19(0x1d0),'message':_0xf74a19(0x130)}),_0x54b324=''):(_0x54b324=_0x2aec6b[_0xf74a19(0x1b7)]['trim']()[_0xf74a19(0x208)](),!NOTIFICATION_RECIPIENT_ROLES[_0xf74a19(0x1af)](_0x54b324)&&_0x3e5b85['push']({'path':_0x2af7ed+_0xf74a19(0x1d0),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x54b324==='TO')_0x6e9034=!![];const _0xda29c1=requireNotificationString(_0x2aec6b[_0xf74a19(0x22b)],_0x2af7ed+_0xf74a19(0xbd),_0xf74a19(0x165),_0x3e5b85);_0xda29c1&&validateNotificationPlaceholders(_0xda29c1,_0x2af7ed+_0xf74a19(0xbd),_0x3e5b85);}),_0x3dd196[_0x467a4c(0x11b)]>0x0&&!_0x6e9034&&_0x3e5b85[_0x467a4c(0xdc)]({'path':_0x4f56f0,'message':_0x467a4c(0x127)});}function requireNotificationString(_0x1c7ab5,_0x3bc7d1,_0x242863,_0x181f28){const _0x44c682=a299_0x5863df;if(typeof _0x1c7ab5!==_0x44c682(0x188)||_0x1c7ab5[_0x44c682(0x18b)]()==='')return _0x181f28[_0x44c682(0xdc)]({'path':_0x3bc7d1,'message':_0x242863}),undefined;return _0x1c7ab5[_0x44c682(0x18b)]();}function validateNotificationPlaceholders(_0x5f0c86,_0xf09036,_0x105739){const _0x5c0ca1=a299_0x5863df;for(const _0x283995 of _0x5f0c86[_0x5c0ca1(0x19c)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4bfd6e=_0x283995[0x1]?.[_0x5c0ca1(0x18b)]()??'',_0xea4685=_0x4bfd6e['indexOf']('.'),_0x26be86=_0xea4685>=0x0?_0x4bfd6e[_0x5c0ca1(0x186)](0x0,_0xea4685):_0x4bfd6e,_0x138b0d=_0xea4685>=0x0?_0x4bfd6e[_0x5c0ca1(0x186)](_0xea4685+0x1)['trim']():'';(![_0x5c0ca1(0x118),_0x5c0ca1(0x133),_0x5c0ca1(0x171)][_0x5c0ca1(0x18c)](_0x26be86)||_0x138b0d==='')&&_0x105739[_0x5c0ca1(0xdc)]({'path':_0xf09036,'message':_0x5c0ca1(0xc9)+_0x283995[0x0]+'.'});}_0x5f0c86['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x5c0ca1(0x18c)]('${')&&_0x105739['push']({'path':_0xf09036,'message':_0x5c0ca1(0x191)});}function validateEdge(_0x38c7cb,_0x4444c7,_0x11b6de){const _0x44a00d=a299_0x5863df;_0x38c7cb[_0x44a00d(0x21d)]!==undefined&&typeof _0x38c7cb[_0x44a00d(0x21d)]!==_0x44a00d(0x188)&&_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+'.name','message':_0x44a00d(0x11f)}),_0x38c7cb[_0x44a00d(0x16c)]!==undefined&&typeof _0x38c7cb[_0x44a00d(0x16c)]!==_0x44a00d(0x167)&&_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+_0x44a00d(0x13c),'message':_0x44a00d(0x1e5)}),_0x38c7cb[_0x44a00d(0x1e0)]!==undefined&&(!Array['isArray'](_0x38c7cb[_0x44a00d(0x1e0)])?_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+_0x44a00d(0x1cf),'message':_0x44a00d(0x131)}):_0x38c7cb['waypoints']['forEach']((_0x5b3804,_0x37272f)=>{const _0x1fb912=_0x44a00d;if(!isRecord(_0x5b3804)){_0x11b6de[_0x1fb912(0xdc)]({'path':_0x4444c7+_0x1fb912(0x12e)+_0x37272f+']','message':_0x1fb912(0x1f4)});return;}for(const _0x6b7da of['x','y']){const _0x2feabe=_0x5b3804[_0x6b7da];(typeof _0x2feabe!==_0x1fb912(0x122)||!Number[_0x1fb912(0xc2)](_0x2feabe))&&_0x11b6de[_0x1fb912(0xdc)]({'path':_0x4444c7+_0x1fb912(0x12e)+_0x37272f+'].'+_0x6b7da,'message':_0x1fb912(0x196)+_0x6b7da+_0x1fb912(0x1ec)});}})),_0x38c7cb['conditionType']!==undefined&&!CONDITION_TYPES['has'](_0x38c7cb['conditionType'])&&_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+'.conditionType','message':_0x44a00d(0x14a)+String(_0x38c7cb[_0x44a00d(0xe9)])+'.'}),_0x38c7cb[_0x44a00d(0xe9)]==='EXPRESSION'&&(typeof _0x38c7cb[_0x44a00d(0x1cd)]!==_0x44a00d(0x188)||_0x38c7cb[_0x44a00d(0x1cd)][_0x44a00d(0x18b)]()==='')&&_0x11b6de['push']({'path':_0x4444c7+_0x44a00d(0x1d2),'message':_0x44a00d(0x102)}),_0x38c7cb['defaultFlow']===!![]&&_0x38c7cb[_0x44a00d(0xe9)]!==_0x44a00d(0x143)&&_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+_0x44a00d(0x13c),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x38c7cb['defaultFlow']===!![]&&typeof _0x38c7cb[_0x44a00d(0x1cd)]===_0x44a00d(0x188)&&_0x38c7cb[_0x44a00d(0x1cd)][_0x44a00d(0x18b)]()!==''&&_0x11b6de[_0x44a00d(0xdc)]({'path':_0x4444c7+_0x44a00d(0x1d2),'message':_0x44a00d(0x1d9)});}function validateGraphShape(_0x2c5baa,_0x463953,_0x2a3e36,_0x34714c,_0xcbca1,_0x1fd74d,_0x282dbe){const _0x4e3821=a299_0x5863df;for(const [_0xc8e6ae,_0x46db25]of _0x2c5baa){const _0x17c0d9=_0xcbca1[_0x4e3821(0x1ee)](_0xc8e6ae)??[],_0x1e9a95=_0x34714c['get'](_0xc8e6ae)??[];_0x46db25[_0x4e3821(0xce)]!==_0x4e3821(0xd9)&&_0x17c0d9[_0x4e3821(0x11b)]===0x0&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0xe4)});_0x46db25[_0x4e3821(0xce)]!=='END'&&_0x1e9a95['length']===0x0&&_0x282dbe['push']({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x22c)});_0x46db25[_0x4e3821(0xce)]===_0x4e3821(0xd9)&&_0x17c0d9['length']>0x0&&_0x282dbe[_0x4e3821(0xdc)]({'path':'flowJson.nodes.'+_0xc8e6ae,'message':_0x4e3821(0xf4)});_0x46db25['type']===_0x4e3821(0x159)&&_0x1e9a95['length']>0x0&&_0x282dbe[_0x4e3821(0xdc)]({'path':'flowJson.nodes.'+_0xc8e6ae,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x46db25[_0x4e3821(0xce)]===_0x4e3821(0x203)){_0x1e9a95[_0x4e3821(0x11b)]<0x2&&_0x282dbe['push']({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x221)});const _0x1004d5=_0x1e9a95['filter'](_0x4d1fca=>_0x4d1fca[_0x4e3821(0x16c)]===!![]);_0x1004d5[_0x4e3821(0x11b)]!==0x1&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x19e)});if(_0x1004d5['length']===0x1){const _0x2911bf=_0x1004d5[0x0],_0x3c9b5e=_0x1fd74d[_0x4e3821(0x1ee)](_0x2911bf)??_0x4e3821(0x15d);_0x2911bf[_0x4e3821(0xe9)]!==_0x4e3821(0x143)&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x3c9b5e+_0x4e3821(0x109),'message':_0x4e3821(0x222)});_0x2911bf[_0x4e3821(0x1cd)]!==undefined&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x3c9b5e+_0x4e3821(0x1d2),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x12bedb of _0x1e9a95){if(_0x12bedb===_0x2911bf)continue;const _0x41b942=_0x1fd74d[_0x4e3821(0x1ee)](_0x12bedb)??'flowJson.edges';if(_0x12bedb[_0x4e3821(0xe9)]!==_0x4e3821(0xea))_0x282dbe['push']({'path':_0x41b942+'.conditionType','message':_0x4e3821(0x148)});else(typeof _0x12bedb[_0x4e3821(0x1cd)]!==_0x4e3821(0x188)||_0x12bedb[_0x4e3821(0x1cd)][_0x4e3821(0x18b)]()==='')&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x41b942+_0x4e3821(0x1d2),'message':_0x4e3821(0x218)});}}}if(_0x46db25['type']===_0x4e3821(0xf7)&&(_0x46db25[_0x4e3821(0xcf)]??'APPROVAL')===_0x4e3821(0x1be)){if(_0x1e9a95[_0x4e3821(0x11b)]!==0x1)_0x282dbe[_0x4e3821(0xdc)]({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x1f1)});else{const _0x9a4738=_0x1e9a95[0x0];((_0x9a4738[_0x4e3821(0xe9)]??'ALWAYS')!==_0x4e3821(0x143)||_0x9a4738[_0x4e3821(0x16c)]===!![]||typeof _0x9a4738[_0x4e3821(0x1cd)]===_0x4e3821(0x188)&&_0x9a4738[_0x4e3821(0x1cd)]['trim']()!=='')&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x1fd74d[_0x4e3821(0x1ee)](_0x9a4738)??_0x4e3821(0x15d),'message':_0x4e3821(0xdd)});}}else{if(_0x46db25['type']==='APPROVAL'){const _0x54118d=_0x1e9a95[_0x4e3821(0xf3)](_0x3883f6=>_0x3883f6[_0x4e3821(0xe9)]??'ALWAYS'),_0x2bec15=_0x54118d[_0x4e3821(0x1b8)](_0xf1bebb=>_0xf1bebb!==_0x4e3821(0x205)&&_0xf1bebb!==_0x4e3821(0x1a4));_0x2bec15[_0x4e3821(0x11b)]>0x0&&_0x282dbe['push']({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x15b)}),_0x54118d['filter'](_0x3ded5e=>_0x3ded5e==='APPROVED')[_0x4e3821(0x11b)]!==0x1&&_0x282dbe['push']({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0xdb)}),_0x54118d[_0x4e3821(0x1b8)](_0x14d232=>_0x14d232===_0x4e3821(0x1a4))[_0x4e3821(0x11b)]!==0x1&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x4e3821(0x115)+_0xc8e6ae,'message':_0x4e3821(0x134)}),_0x1e9a95[_0x4e3821(0x156)](_0xbb5956=>_0xbb5956[_0x4e3821(0x16c)]===!![])&&_0x282dbe[_0x4e3821(0xdc)]({'path':'flowJson.nodes.'+_0xc8e6ae,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x276f48=new Set(),_0x23479a=_0x4346f7=>{const _0x5a27b1=_0x4e3821;if(_0x276f48[_0x5a27b1(0x1af)](_0x4346f7))return;_0x276f48['add'](_0x4346f7);for(const _0x11cfc8 of _0x34714c[_0x5a27b1(0x1ee)](_0x4346f7)??[]){const _0x77047b=resolveEdgeEndpoint(_0x11cfc8[_0x5a27b1(0x1a0)],_0x11cfc8[_0x5a27b1(0x14b)]);if(_0x77047b&&_0x2c5baa[_0x5a27b1(0x1af)](_0x77047b))_0x23479a(_0x77047b);}};_0x23479a(_0x463953);for(const _0x251929 of _0x2c5baa[_0x4e3821(0xd5)]()){!_0x276f48[_0x4e3821(0x1af)](_0x251929)&&_0x282dbe[_0x4e3821(0xdc)]({'path':'flowJson.nodes.'+_0x251929,'message':_0x4e3821(0x229)});}const _0x5ca762=_0x2a3e36[_0x4e3821(0x156)](_0x316a70=>_0x276f48['has'](_0x316a70));if(!_0x5ca762){_0x282dbe['push']({'path':_0x4e3821(0x15d),'message':_0x4e3821(0x108)});return;}const _0x470173=new Set(),_0x1dbceb=_0x561454=>{const _0x46025b=_0x4e3821;if(_0x470173[_0x46025b(0x1af)](_0x561454))return;_0x470173[_0x46025b(0x154)](_0x561454);for(const _0x5296e9 of _0xcbca1[_0x46025b(0x1ee)](_0x561454)??[]){const _0x424474=resolveEdgeEndpoint(_0x5296e9[_0x46025b(0x189)],_0x5296e9[_0x46025b(0x111)]);if(_0x424474&&_0x2c5baa[_0x46025b(0x1af)](_0x424474))_0x1dbceb(_0x424474);}};for(const _0x214860 of _0x2a3e36){if(_0x2c5baa[_0x4e3821(0x1af)](_0x214860))_0x1dbceb(_0x214860);}for(const _0x302cab of _0x276f48){!_0x470173[_0x4e3821(0x1af)](_0x302cab)&&_0x282dbe[_0x4e3821(0xdc)]({'path':_0x4e3821(0x115)+_0x302cab,'message':_0x4e3821(0xc0)});}}function validateApprovalResults(_0x1e4b27,_0x5dd5e8,_0x397138,_0x152320){const _0x7a6a5d=a299_0x5863df;if(_0x5dd5e8===0x0)return;const _0x12c0d6=new Set(_0x397138[_0x7a6a5d(0xf3)](_0x533e03=>_0x1e4b27[_0x7a6a5d(0x1ee)](_0x533e03)?.[_0x7a6a5d(0x1b0)])[_0x7a6a5d(0x1b8)](_0x149395=>typeof _0x149395==='string'));for(const _0x2c33dc of['APPROVED',_0x7a6a5d(0x1a4)]){!_0x12c0d6[_0x7a6a5d(0x1af)](_0x2c33dc)&&_0x152320[_0x7a6a5d(0xdc)]({'path':'flowJson.nodes','message':_0x7a6a5d(0xd1)+_0x2c33dc+'.'});}}function validateScriptResultReferences(_0x37da69,_0x5e5790,_0x53c518,_0x3e1707,_0x157967,_0xd106d5,_0x1f5f8f){const _0xaf20a0=a299_0x5863df;if(_0xd106d5['size']===0x0)return;const _0x886f0e=new Set(),_0x5b365e=_0x210475=>{const _0x3b702b=a299_0x3fbc;if(!_0x886f0e[_0x3b702b(0x1af)](_0x210475)&&_0x37da69[_0x3b702b(0x1af)](_0x210475)){_0x886f0e['add'](_0x210475);for(const _0x226868 of _0x53c518[_0x3b702b(0x1ee)](_0x210475)??[]){const _0x4eed33=resolveEdgeEndpoint(_0x226868[_0x3b702b(0x1a0)],_0x226868[_0x3b702b(0x14b)]);if(_0x4eed33)_0x5b365e(_0x4eed33);}}};_0x5b365e(_0x5e5790);const _0x30fe5f=new Map();for(const _0xe8f43c of _0x886f0e){_0x30fe5f['set'](_0xe8f43c,_0xe8f43c===_0x5e5790?new Set([_0x5e5790]):new Set(_0x886f0e));}let _0x1a7111=!![];while(_0x1a7111){_0x1a7111=![];for(const _0x3f3cc5 of _0x886f0e){if(_0x3f3cc5===_0x5e5790)continue;const _0x13c676=(_0x3e1707[_0xaf20a0(0x1ee)](_0x3f3cc5)??[])[_0xaf20a0(0xf3)](_0xc9e91=>resolveEdgeEndpoint(_0xc9e91[_0xaf20a0(0x189)],_0xc9e91['sourceNodeId']))[_0xaf20a0(0x1b8)](_0xfb65c9=>Boolean(_0xfb65c9&&_0x886f0e[_0xaf20a0(0x1af)](_0xfb65c9)));if(_0x13c676[_0xaf20a0(0x11b)]===0x0)continue;const _0x2ce2b3=new Set(_0x30fe5f[_0xaf20a0(0x1ee)](_0x13c676[0x0])??[]);for(const _0x3f6872 of _0x13c676[_0xaf20a0(0x186)](0x1)){const _0x20cc6d=_0x30fe5f['get'](_0x3f6872)??new Set();for(const _0x18ce41 of _0x2ce2b3){if(!_0x20cc6d['has'](_0x18ce41))_0x2ce2b3[_0xaf20a0(0x141)](_0x18ce41);}}_0x2ce2b3[_0xaf20a0(0x154)](_0x3f3cc5);const _0x8ef0=_0x30fe5f[_0xaf20a0(0x1ee)](_0x3f3cc5);!setsEqual(_0x8ef0,_0x2ce2b3)&&(_0x30fe5f[_0xaf20a0(0x175)](_0x3f3cc5,_0x2ce2b3),_0x1a7111=!![]);}}for(const [_0x4eac7b,_0x1fcc0f]of _0x53c518){const _0x4c97b4=_0x30fe5f[_0xaf20a0(0x1ee)](_0x4eac7b);if(!_0x4c97b4)continue;for(const _0x47c649 of _0x1fcc0f){if(_0x47c649['conditionType']!==_0xaf20a0(0xea)||typeof _0x47c649[_0xaf20a0(0x1cd)]!=='string')continue;for(const [_0x547625,_0x544654]of _0xd106d5){expressionReferencesVariable(_0x47c649[_0xaf20a0(0x1cd)],_0x547625)&&!_0x4c97b4[_0xaf20a0(0x1af)](_0x544654)&&_0x1f5f8f['push']({'path':(_0x157967[_0xaf20a0(0x1ee)](_0x47c649)??'flowJson.edges')+_0xaf20a0(0x1d2),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x547625+_0xaf20a0(0xff)+_0x544654+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x4eac7b+'.'});}}}}function expressionReferencesVariable(_0x93c86b,_0x5c5988){const _0x3677e7=a299_0x5863df;let _0x3cbb22=0x0;while(_0x3cbb22<_0x93c86b[_0x3677e7(0x11b)]){const _0x3a4001=_0x93c86b[_0x3cbb22];if(_0x3a4001==='\x27'||_0x3a4001==='\x22'){_0x3cbb22=skipQuotedExpressionSegment(_0x93c86b,_0x3cbb22,_0x3a4001);continue;}if(!/[A-Za-z_]/[_0x3677e7(0xf9)](_0x3a4001)){_0x3cbb22+=0x1;continue;}const _0xe5af54=_0x3cbb22;_0x3cbb22+=0x1;while(_0x3cbb22<_0x93c86b['length']&&/[A-Za-z0-9_]/[_0x3677e7(0xf9)](_0x93c86b[_0x3cbb22])){_0x3cbb22+=0x1;}if(_0x93c86b[_0x3677e7(0x186)](_0xe5af54,_0x3cbb22)!==_0x5c5988)continue;let _0x21c155=_0xe5af54-0x1;while(_0x21c155>=0x0&&/\s/[_0x3677e7(0xf9)](_0x93c86b[_0x21c155])){_0x21c155-=0x1;}if(_0x93c86b[_0x21c155]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x365054,_0x2eda53,_0x54a2ac){let _0x59fecf=_0x2eda53+0x1;while(_0x59fecf<_0x365054['length']){if(_0x365054[_0x59fecf]==='\x5c'){_0x59fecf+=0x2;continue;}if(_0x365054[_0x59fecf]===_0x54a2ac)return _0x59fecf+0x1;_0x59fecf+=0x1;}return _0x59fecf;}function resolveEffectiveResultVariable(_0x434f59,_0x4ef575){const _0x12435a=a299_0x5863df;if(_0x434f59===undefined||_0x434f59===null||_0x4ef575&&_0x434f59==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x434f59!==_0x12435a(0x188)||!VARIABLE_PATTERN['test'](_0x434f59)||RESERVED_RESULT_VARIABLES[_0x12435a(0x1af)](_0x434f59)||_0x434f59[_0x12435a(0x194)](_0x12435a(0x1e6)))return undefined;return _0x434f59;}function registerResultVariableOwner(_0x460c04,_0x3a5fec,_0x5bc37e,_0x17e50b){const _0x530a3b=a299_0x5863df;if(_0x460c04[_0x530a3b(0x1af)](_0x3a5fec)){_0x17e50b[_0x530a3b(0xdc)]({'path':'flowJson.nodes','message':_0x530a3b(0x193)+_0x3a5fec+'.'});return;}_0x460c04[_0x530a3b(0x175)](_0x3a5fec,_0x5bc37e);}function setsEqual(_0x28ec5e,_0x464cbb){const _0x31645c=a299_0x5863df;return _0x28ec5e[_0x31645c(0x1d6)]===_0x464cbb[_0x31645c(0x1d6)]&&[..._0x28ec5e][_0x31645c(0x20d)](_0x1b6ee0=>_0x464cbb[_0x31645c(0x1af)](_0x1b6ee0));}function isValidUserId(_0x54104a){const _0x34712b=a299_0x5863df;if(typeof _0x54104a===_0x34712b(0x188))return _0x54104a['trim']()[_0x34712b(0x11b)]>0x0;return Number[_0x34712b(0x1d5)](_0x54104a)&&Number(_0x54104a)>0x0;}function resolveEdgeEndpoint(_0x5442b0,_0x4b07b4){const _0x5b0935=a299_0x5863df;if(typeof _0x5442b0===_0x5b0935(0x188)&&_0x5442b0[_0x5b0935(0x18b)]())return _0x5442b0[_0x5b0935(0x18b)]();if(typeof _0x4b07b4==='string'&&_0x4b07b4[_0x5b0935(0x18b)]())return _0x4b07b4['trim']();return undefined;}function removeEmptyMetadata(_0x33b906,_0x22a7ba,_0x3a7b13,_0x335ddd){const _0x155de1=a299_0x5863df;if(Array[_0x155de1(0x21c)](_0x33b906)){_0x33b906[_0x155de1(0x215)]((_0x1a19d5,_0x1bd305)=>removeEmptyMetadata(_0x1a19d5,_0x22a7ba+'['+_0x1bd305+']',_0x3a7b13,_0x335ddd));return;}if(!isRecord(_0x33b906))return;for(const [_0x193484,_0x4a69a4]of Object[_0x155de1(0xfe)](_0x33b906)){const _0x100c53=_0x22a7ba+'.'+_0x193484;if(_0x193484===_0x155de1(0x1b1)&&isEmptyJsonValue(_0x4a69a4)){delete _0x33b906[_0x193484],_0x335ddd['push'](_0x100c53),_0x3a7b13[_0x155de1(0xdc)]({'code':_0x155de1(0x10a),'path':_0x100c53,'message':_0x100c53+_0x155de1(0x1f3)});continue;}removeEmptyMetadata(_0x4a69a4,_0x100c53,_0x3a7b13,_0x335ddd);}}function isEmptyJsonValue(_0x3e1bd3){const _0x3bd3c2=a299_0x5863df;if(_0x3e1bd3===null||_0x3e1bd3===undefined)return!![];if(typeof _0x3e1bd3==='string')return _0x3e1bd3[_0x3bd3c2(0x18b)]()==='';if(Array[_0x3bd3c2(0x21c)](_0x3e1bd3))return _0x3e1bd3[_0x3bd3c2(0x11b)]===0x0;return isRecord(_0x3e1bd3)&&Object['keys'](_0x3e1bd3)[_0x3bd3c2(0x11b)]===0x0;}function isRecord(_0x270feb){const _0x1b5965=a299_0x5863df;return typeof _0x270feb===_0x1b5965(0x1c5)&&_0x270feb!==null&&!Array[_0x1b5965(0x21c)](_0x270feb);}function cloneJsonValue(_0x239c57){const _0x1d395d=a299_0x5863df;return JSON[_0x1d395d(0x1ae)](JSON[_0x1d395d(0x16e)](_0x239c57));}export async function readFlowConfigFile(_0x1c5e72){const _0x4e6552=a299_0x5863df,_0x4569cc=await readFile(resolve(_0x1c5e72),'utf8');return JSON[_0x4e6552(0x1ae)](_0x4569cc);}
1
+ const a299_0x2ba7aa=a299_0xf187;(function(_0x104676,_0x3d93f7){const _0x1cd8cc=a299_0xf187,_0x1600c8=_0x104676();while(!![]){try{const _0x3568f3=parseInt(_0x1cd8cc(0x125))/0x1+-parseInt(_0x1cd8cc(0x184))/0x2*(parseInt(_0x1cd8cc(0x129))/0x3)+parseInt(_0x1cd8cc(0x22f))/0x4+-parseInt(_0x1cd8cc(0x1e4))/0x5*(parseInt(_0x1cd8cc(0x1ca))/0x6)+-parseInt(_0x1cd8cc(0x118))/0x7+-parseInt(_0x1cd8cc(0x257))/0x8+parseInt(_0x1cd8cc(0x189))/0x9;if(_0x3568f3===_0x3d93f7)break;else _0x1600c8['push'](_0x1600c8['shift']());}catch(_0x5de68a){_0x1600c8['push'](_0x1600c8['shift']());}}}(a299_0x3e72,0x6953b));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_0x2ba7aa(0x237),'$id':a299_0x2ba7aa(0x21d),'title':'Rabetbase\x20FlowConfig','type':'object','required':[a299_0x2ba7aa(0x112),a299_0x2ba7aa(0x16d),a299_0x2ba7aa(0x153)],'$defs':{'userId':{'anyOf':[{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1}]},'position':{'type':a299_0x2ba7aa(0x1f5),'required':['x','y'],'properties':{'x':{'type':a299_0x2ba7aa(0x264),'minimum':0x0},'y':{'type':a299_0x2ba7aa(0x264),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0x2ba7aa(0x160),a299_0x2ba7aa(0x1bb)],'properties':{'value':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1},'unit':{'enum':[a299_0x2ba7aa(0x1b0),a299_0x2ba7aa(0x126),'HOURS',a299_0x2ba7aa(0x123)]}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id',a299_0x2ba7aa(0x23b),a299_0x2ba7aa(0x11b),a299_0x2ba7aa(0x10c)],'properties':{'id':{'type':a299_0x2ba7aa(0x16f),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a299_0x2ba7aa(0x1c1),a299_0x2ba7aa(0x22d),a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x140),a299_0x2ba7aa(0x243),a299_0x2ba7aa(0x24e)]},'name':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'path':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'position':{'$ref':a299_0x2ba7aa(0x224)},'approvalMode':{'enum':[a299_0x2ba7aa(0x196),'ALL',a299_0x2ba7aa(0x234)]},'taskMode':{'enum':[a299_0x2ba7aa(0x121),'HANDLE']},'assignee':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x1b6)],'properties':{'strategy':{'enum':[a299_0x2ba7aa(0x176),a299_0x2ba7aa(0x171)]},'userIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x17c)}},'roleId':{'anyOf':[{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1},{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x222)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':['strategy',a299_0x2ba7aa(0x261)],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x17c)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0x2ba7aa(0x199),a299_0x2ba7aa(0x262)]},'scriptName':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'resultVariable':{'type':a299_0x2ba7aa(0x16f),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x2ba7aa(0x1f5),'properties':{'enabled':{'type':a299_0x2ba7aa(0x175)},'retryCount':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a299_0x2ba7aa(0x1f5),'properties':{'enabled':{'type':a299_0x2ba7aa(0x175)},'duration':{'$ref':a299_0x2ba7aa(0x113)},'action':{'enum':[a299_0x2ba7aa(0x14c),a299_0x2ba7aa(0x127),a299_0x2ba7aa(0x19c)]},'interrupting':{'type':a299_0x2ba7aa(0x175)},'scriptName':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'resultVariable':{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x219)}},'additionalProperties':!![]},'cc':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x122)],'properties':{'recipientUserIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a299_0x2ba7aa(0x1af),'uniqueItems':!![],'items':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':['configCode',a299_0x2ba7aa(0x1e6)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'failurePolicy':{'enum':[a299_0x2ba7aa(0x21b),a299_0x2ba7aa(0x268)]},'template':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x1ef),a299_0x2ba7aa(0x247)],'properties':{'title':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x2ba7aa(0x16f)},'facts':{'type':a299_0x2ba7aa(0x1af),'maxItems':0x8,'items':{'type':'object','required':['label','value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x2ba7aa(0x1af),'maxItems':0x2,'items':{'type':a299_0x2ba7aa(0x1f5),'required':['text',a299_0x2ba7aa(0x16b)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x2ba7aa(0x1af),'items':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x23b),a299_0x2ba7aa(0x160)],'properties':{'type':{'enum':['USER',a299_0x2ba7aa(0x171),a299_0x2ba7aa(0x15d)]},'value':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x2ba7aa(0x165)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x2ba7aa(0x1f5),'properties':{'id':{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x219)},'source':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'target':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'sourceNodeId':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'targetNodeId':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'conditionType':{'enum':[a299_0x2ba7aa(0x1e1),a299_0x2ba7aa(0x199),a299_0x2ba7aa(0x262),'EXPRESSION']},'expression':{'type':'string'},'defaultFlow':{'type':a299_0x2ba7aa(0x175)},'name':{'type':'string'},'waypoints':{'type':a299_0x2ba7aa(0x1af),'items':{'$ref':a299_0x2ba7aa(0x224)}}},'allOf':[{'anyOf':[{'required':[a299_0x2ba7aa(0x148)]},{'required':[a299_0x2ba7aa(0x229)]}]},{'anyOf':[{'required':[a299_0x2ba7aa(0x22e)]},{'required':[a299_0x2ba7aa(0x15c)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a299_0x2ba7aa(0x16f)},'flowType':{'enum':[a299_0x2ba7aa(0x1c2),a299_0x2ba7aa(0x22c)]},'datasetCode':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'pageId':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':Number[a299_0x2ba7aa(0x259)]},'pageIds':{'type':a299_0x2ba7aa(0x1af),'items':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':Number[a299_0x2ba7aa(0x259)]}},'templateName':![],'flowJson':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x210),'edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x2ba7aa(0x16f),'const':'approval.simple-flow.v1','description':a299_0x2ba7aa(0x137)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x2ba7aa(0x1e2)},'startPageId':![],'startPath':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x206)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x1c5)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x2ba7aa(0x13b),a299_0x2ba7aa(0x112),a299_0x2ba7aa(0x144),a299_0x2ba7aa(0x212),'appCode',a299_0x2ba7aa(0x20d),a299_0x2ba7aa(0x149)],REMOVED_ROOT_FIELDS=['id',a299_0x2ba7aa(0x21f),a299_0x2ba7aa(0x149)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x2ba7aa(0x1e0),NODE_TYPES=new Set(['START',a299_0x2ba7aa(0x22d),a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x140),a299_0x2ba7aa(0x243),a299_0x2ba7aa(0x24e)]),CONDITION_TYPES=new Set([a299_0x2ba7aa(0x1e1),a299_0x2ba7aa(0x199),'REJECTED','EXPRESSION']),APPROVAL_MODES=new Set(['SINGLE',a299_0x2ba7aa(0x24f),a299_0x2ba7aa(0x234)]),APPROVAL_TASK_MODES=new Set([a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x25d)]),FLOW_TIME_UNITS=new Set([a299_0x2ba7aa(0x1b0),a299_0x2ba7aa(0x126),a299_0x2ba7aa(0x15a),a299_0x2ba7aa(0x123)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x2ba7aa(0x14c),a299_0x2ba7aa(0x127),a299_0x2ba7aa(0x19c)]),FLOW_TYPES=new Set(['FORM_FLOW',a299_0x2ba7aa(0x22c)]),FLOW_PAGE_MODES=new Set([a299_0x2ba7aa(0x1e2),a299_0x2ba7aa(0x211)]),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_0x2ba7aa(0x21b),a299_0x2ba7aa(0x268)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x2ba7aa(0x1cc),a299_0x2ba7aa(0x171),a299_0x2ba7aa(0x15d)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x2ba7aa(0x165)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x2ba7aa(0x244),UNSUPPORTED_FORM_MESSAGE=a299_0x2ba7aa(0x161),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x2ba7aa(0x22b),RESERVED_RESULT_VARIABLES=new Set([a299_0x2ba7aa(0x1de),a299_0x2ba7aa(0x1c0),a299_0x2ba7aa(0x1e7),a299_0x2ba7aa(0x1b2),a299_0x2ba7aa(0x1d7),a299_0x2ba7aa(0x1f3),a299_0x2ba7aa(0x11c),a299_0x2ba7aa(0x263),a299_0x2ba7aa(0x16e),a299_0x2ba7aa(0x145)]);function a299_0xf187(_0x3b1fa5,_0x1a20e6){_0x3b1fa5=_0x3b1fa5-0xfe;const _0x3e7227=a299_0x3e72();let _0xf187a1=_0x3e7227[_0x3b1fa5];return _0xf187a1;}export function normalizeFlowConfig(_0x23f046){const _0x53946a=a299_0x2ba7aa;if(!isRecord(_0x23f046))throw new TypeError(_0x53946a(0x173));const _0x3af649=cloneJsonValue(_0x23f046),_0x25ad59=_0x3af649[_0x53946a(0x153)],_0x4f77de=isRecord(_0x25ad59)?cloneJsonValue(_0x25ad59):{},_0x2a3876=[],_0x1a10cd=[];for(const _0x50ec21 of REMOVED_ROOT_FIELDS){if(!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x3af649,_0x50ec21))continue;delete _0x3af649[_0x50ec21],_0x1a10cd[_0x53946a(0x225)](_0x50ec21),_0x2a3876['push']({'code':'legacy_field_removed','path':_0x50ec21,'message':_0x50ec21+_0x53946a(0x24c)});}for(const _0x25b0a8 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x4f77de,_0x25b0a8))continue;const _0x1c1eb4=_0x53946a(0x1ee)+_0x25b0a8;delete _0x4f77de[_0x25b0a8],_0x1a10cd[_0x53946a(0x225)](_0x1c1eb4),_0x2a3876['push']({'code':_0x53946a(0x13a),'path':_0x1c1eb4,'message':_0x1c1eb4+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x53946a(0x13c)]['hasOwnProperty'][_0x53946a(0x231)](_0x4f77de,'schemaVersion')){const _0x2da6e6=_0x4f77de[_0x53946a(0x164)],_0x406323=typeof _0x2da6e6===_0x53946a(0x16f)?_0x2da6e6[_0x53946a(0x1f9)]():_0x2da6e6;if(isEmptyJsonValue(_0x2da6e6)||_0x406323===DEFAULT_FLOW_SCHEMA_VERSION){const _0x7877ca='flowJson.schemaVersion';delete _0x4f77de['schemaVersion'],_0x1a10cd[_0x53946a(0x225)](_0x7877ca),_0x2a3876[_0x53946a(0x225)]({'code':_0x53946a(0x13a),'path':_0x7877ca,'message':_0x7877ca+_0x53946a(0x105)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x4f77de,_0x53946a(0x153),_0x2a3876,_0x1a10cd);_0x3af649['flowType']===_0x53946a(0x22c)&&!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x4f77de,_0x53946a(0x169))&&(_0x4f77de['pageMode']=_0x53946a(0x1e2));_0x3af649['flowJson']=_0x4f77de;if(typeof _0x3af649['flowName']==='string')_0x3af649[_0x53946a(0x112)]=_0x3af649[_0x53946a(0x112)][_0x53946a(0x1f9)]();return{'config':_0x3af649,'warnings':_0x2a3876,'removedPaths':_0x1a10cd};}export function validateFlowConfig(_0x450a87){const _0x1ab808=a299_0x2ba7aa;let _0x17cb99;try{_0x17cb99=normalizeFlowConfig(_0x450a87);}catch(_0x471647){const _0x13c682=_0x471647 instanceof Error?_0x471647[_0x1ab808(0x26d)]:String(_0x471647),_0x649912={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x13c682}],'warnings':[],'normalized':_0x649912,'validationConfig':_0x649912};}const _0x41ca5a=_0x17cb99[_0x1ab808(0x124)],_0xd3ada0=cloneJsonValue(_0x41ca5a),_0x35e13c=_0xd3ada0[_0x1ab808(0x153)];_0x35e13c[_0x1ab808(0x1ad)]=_0x1ab808(0x106),_0x35e13c['flowName']=_0x41ca5a[_0x1ab808(0x112)];typeof _0x41ca5a['datasetCode']===_0x1ab808(0x16f)&&_0x41ca5a['datasetCode'][_0x1ab808(0x1f9)]()&&(_0x35e13c[_0x1ab808(0x144)]=_0x41ca5a[_0x1ab808(0x212)][_0x1ab808(0x1f9)]());const _0x24f992=[];return validateOuterMetadata(_0x41ca5a,_0x24f992),validateFlowClassification(_0x41ca5a,_0x24f992),validateGraph(_0x41ca5a[_0x1ab808(0x153)],_0x24f992),{'valid':_0x24f992[_0x1ab808(0x227)]===0x0,'errors':_0x24f992,'warnings':_0x17cb99[_0x1ab808(0x133)],'normalized':_0x41ca5a,'validationConfig':_0xd3ada0};}function validateFlowClassification(_0x1786e7,_0x11d85f){const _0x558de6=a299_0x2ba7aa;if(!isRecord(_0x1786e7[_0x558de6(0x153)]))return;const _0x4edeba=_0x1786e7[_0x558de6(0x16d)],_0xe2b26d=_0x1786e7[_0x558de6(0x153)]['pageMode'];_0xe2b26d!==undefined&&(typeof _0xe2b26d!==_0x558de6(0x16f)||!FLOW_PAGE_MODES['has'](_0xe2b26d))&&_0x11d85f['push']({'path':_0x558de6(0x172),'message':'Unsupported\x20pageMode:\x20'+String(_0xe2b26d)+'.'});_0x4edeba===_0x558de6(0x1c2)&&_0xe2b26d!==undefined&&_0x11d85f[_0x558de6(0x225)]({'path':_0x558de6(0x172),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0x4edeba===_0x558de6(0x22c)&&_0xe2b26d===_0x558de6(0x211)&&_0x11d85f['push']({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x4edeba==='FORM_FLOW'||_0x4edeba==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0x1786e7,_0x4edeba,_0xe2b26d,_0x11d85f);if(_0x4edeba!=='FORM_FLOW'||!Array[_0x558de6(0x116)](_0x1786e7[_0x558de6(0x153)][_0x558de6(0x210)]))return;_0x1786e7[_0x558de6(0x153)][_0x558de6(0x210)][_0x558de6(0x1f1)]((_0x74ee19,_0x52c84c)=>{const _0x2d444e=_0x558de6;isRecord(_0x74ee19)&&_0x74ee19[_0x2d444e(0x23b)]===_0x2d444e(0x121)&&_0x74ee19['taskMode']==='HANDLE'&&_0x11d85f[_0x2d444e(0x225)]({'path':'flowJson.nodes['+_0x52c84c+_0x2d444e(0x1b5),'message':_0x2d444e(0x168)});});}function validateCustomPageNavigation(_0x4f8c6d,_0x409b6e,_0x324865,_0x4d51ab){const _0x13d0b1=a299_0x2ba7aa,_0x219a46=_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x242)];_0x219a46!==undefined&&_0x4d51ab[_0x13d0b1(0x225)]({'path':_0x13d0b1(0x235),'message':_0x13d0b1(0x1f2)});const _0x1fa056=_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x14a)];_0x1fa056!==undefined&&(typeof _0x1fa056!==_0x13d0b1(0x16f)||_0x1fa056['trim']()==='')&&_0x4d51ab['push']({'path':_0x13d0b1(0x26a),'message':_0x13d0b1(0x179)});const _0x50cc9c=Array[_0x13d0b1(0x116)](_0x4f8c6d['flowJson'][_0x13d0b1(0x210)])?_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x210)][_0x13d0b1(0x1d6)]((_0x57013b,_0x4e54fc)=>({'node':_0x57013b,'index':_0x4e54fc}))[_0x13d0b1(0x1ff)](({node:_0x2e2ff4})=>isRecord(_0x2e2ff4)&&_0x2e2ff4['path']!==undefined):[],_0xf52dee=_0x1fa056!==undefined||_0x50cc9c[_0x13d0b1(0x227)]>0x0,_0x21e6c6=_0x324865===undefined&&_0x409b6e===_0x13d0b1(0x22c)?_0x13d0b1(0x1e2):_0x324865;_0xf52dee&&(_0x409b6e!==_0x13d0b1(0x22c)||_0x21e6c6!=='CUSTOM_PAGE')&&(_0x1fa056!==undefined&&_0x4d51ab['push']({'path':_0x13d0b1(0x26a),'message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x50cc9c[_0x13d0b1(0x1f1)](({index:_0x5def9a})=>{const _0x826d6f=_0x13d0b1;_0x4d51ab['push']({'path':'flowJson.nodes['+_0x5def9a+_0x826d6f(0x12c),'message':_0x826d6f(0x1d9)});}));}export async function writeNormalizedFlowConfig(_0x59ef37,_0x39ac08,_0x5703af={}){const _0x164ef2=a299_0x2ba7aa,_0x114f94=resolve(_0x59ef37),_0x2c7f3d=_0x114f94+'.'+process[_0x164ef2(0x24b)]+'.'+randomUUID()+_0x164ef2(0x142),_0x5a7739=JSON[_0x164ef2(0x12a)](_0x39ac08,null,0x2)+'\x0a';let _0x238f86;try{try{_0x238f86=(await stat(_0x114f94))[_0x164ef2(0x217)]&0x1ff;}catch{_0x238f86=undefined;}await writeFile(_0x2c7f3d,_0x5a7739,{'encoding':_0x164ef2(0x181),'flag':'wx','mode':_0x238f86??0x1a4});if(_0x238f86!==undefined)await chmod(_0x2c7f3d,_0x238f86);_0x5703af[_0x164ef2(0x1f0)]===![]?(await link(_0x2c7f3d,_0x114f94),await unlink(_0x2c7f3d)):await rename(_0x2c7f3d,_0x114f94);}finally{await unlink(_0x2c7f3d)[_0x164ef2(0x23f)](()=>undefined);}}function validateOuterMetadata(_0x76cba,_0x54383e){const _0x5782e0=a299_0x2ba7aa;(typeof _0x76cba[_0x5782e0(0x112)]!=='string'||_0x76cba[_0x5782e0(0x112)][_0x5782e0(0x1f9)]()==='')&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x112),'message':_0x5782e0(0x178)});_0x76cba[_0x5782e0(0x20b)]!==undefined&&typeof _0x76cba[_0x5782e0(0x20b)]!==_0x5782e0(0x16f)&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x20b),'message':_0x5782e0(0x1a6)});if(_0x76cba['flowType']===undefined||_0x76cba[_0x5782e0(0x16d)]===null)_0x54383e[_0x5782e0(0x225)]({'path':'flowType','message':'flowType\x20is\x20required.'});else(typeof _0x76cba[_0x5782e0(0x16d)]!=='string'||!FLOW_TYPES[_0x5782e0(0x1aa)](_0x76cba[_0x5782e0(0x16d)]))&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x16d),'message':_0x5782e0(0x139)+String(_0x76cba[_0x5782e0(0x16d)])+'.'});_0x76cba[_0x5782e0(0x212)]!==undefined&&typeof _0x76cba[_0x5782e0(0x212)]!==_0x5782e0(0x16f)&&_0x54383e['push']({'path':_0x5782e0(0x212),'message':_0x5782e0(0x245)});_0x76cba[_0x5782e0(0x266)]===undefined&&_0x76cba['pageId']!==undefined&&(!Number[_0x5782e0(0x14f)](_0x76cba[_0x5782e0(0x20d)])||_0x76cba['pageId']<=0x0)&&_0x54383e[_0x5782e0(0x225)]({'path':'pageId','message':_0x5782e0(0x240)});if(_0x76cba['pageIds']!==undefined){if(!Array[_0x5782e0(0x116)](_0x76cba[_0x5782e0(0x266)])||_0x76cba['pageIds']['some'](_0x20766c=>!Number[_0x5782e0(0x14f)](_0x20766c)||_0x20766c<=0x0))_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x266),'message':_0x5782e0(0x19e)});else[...new Set(_0x76cba['pageIds'])]['join'](',')[_0x5782e0(0x227)]>0x800&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x266),'message':_0x5782e0(0x252)});_0x76cba[_0x5782e0(0x16d)]===_0x5782e0(0x22c)&&Array[_0x5782e0(0x116)](_0x76cba[_0x5782e0(0x266)])&&_0x76cba[_0x5782e0(0x266)][_0x5782e0(0x227)]>0x0&&_0x54383e['push']({'path':_0x5782e0(0x266),'message':_0x5782e0(0x223)});}_0x76cba[_0x5782e0(0x16d)]==='INDEPENDENT_FLOW'&&_0x76cba[_0x5782e0(0x212)]!==undefined&&_0x54383e['push']({'path':_0x5782e0(0x212),'message':_0x5782e0(0x22a)}),_0x76cba[_0x5782e0(0x16d)]===_0x5782e0(0x22c)&&_0x76cba[_0x5782e0(0x266)]===undefined&&_0x76cba['pageId']!==undefined&&_0x54383e['push']({'path':_0x5782e0(0x20d),'message':_0x5782e0(0x26b)});}function validateGraph(_0xa676ac,_0x154787){const _0x36642e=a299_0x2ba7aa;if(!isRecord(_0xa676ac)){_0x154787['push']({'path':_0x36642e(0x153),'message':_0x36642e(0x25e)});return;}!Array['isArray'](_0xa676ac['nodes'])&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x157)});!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x25a)])&&_0x154787['push']({'path':_0x36642e(0x162),'message':_0x36642e(0x1dc)});Object[_0x36642e(0x13c)][_0x36642e(0x156)][_0x36642e(0x231)](_0xa676ac,_0x36642e(0x164))&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x14d),'message':_0x36642e(0x1f4)+String(_0xa676ac[_0x36642e(0x164)])+_0x36642e(0x26c)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x31648b of[_0x36642e(0x1a4),'formDefinitions',_0x36642e(0x14e)]){Object[_0x36642e(0x13c)][_0x36642e(0x156)][_0x36642e(0x231)](_0xa676ac,_0x31648b)&&_0x154787[_0x36642e(0x225)]({'path':'flowJson.'+_0x31648b,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x210)])||!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x25a)]))return;const _0x5cb19b=new Map(),_0xab5cd=[],_0x2fc0b1=[],_0x14d4aa=new Map(),_0x1249ef=new Map(),_0x47a37a=new Set();let _0x2979ca=0x0;_0xa676ac['nodes'][_0x36642e(0x1f1)]((_0x1a4034,_0x2fdffd)=>{const _0x50a6b0=_0x36642e,_0x2ccbc3=_0x50a6b0(0xfe)+_0x2fdffd+']';if(!isRecord(_0x1a4034)){_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x1132f8=_0x1a4034;if(typeof _0x1132f8['id']!==_0x50a6b0(0x16f)||!BPMN_ID_PATTERN[_0x50a6b0(0x18e)](_0x1132f8['id']))_0x154787['push']({'path':_0x2ccbc3+'.id','message':_0x50a6b0(0x239)});else _0x5cb19b[_0x50a6b0(0x1aa)](_0x1132f8['id'])?_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3+_0x50a6b0(0x213),'message':_0x50a6b0(0x120)+_0x1132f8['id']+'.'}):(_0x5cb19b[_0x50a6b0(0x101)](_0x1132f8['id'],_0x1132f8),_0x47a37a[_0x50a6b0(0x205)](_0x1132f8['id']));if(!NODE_TYPES[_0x50a6b0(0x1aa)](_0x1132f8[_0x50a6b0(0x23b)]))_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3+_0x50a6b0(0x150),'message':_0x50a6b0(0x1c4)+String(_0x1132f8[_0x50a6b0(0x23b)])+'.'});else{if(_0x1132f8['type']==='START')_0xab5cd[_0x50a6b0(0x225)](_0x1132f8['id']);else _0x1132f8['type']===_0x50a6b0(0x22d)&&_0x2fc0b1[_0x50a6b0(0x225)](_0x1132f8['id']);}_0x1132f8[_0x50a6b0(0x23b)]===_0x50a6b0(0x121)&&(_0x1132f8[_0x50a6b0(0x1ea)]===undefined||_0x1132f8[_0x50a6b0(0x1ea)]===_0x50a6b0(0x121))&&(_0x2979ca+=0x1);validateNode(_0x1132f8,_0x2ccbc3,_0x154787);if(_0x1132f8['type']===_0x50a6b0(0x243)){const _0xdf3d41=resolveEffectiveResultVariable(_0x1132f8[_0x50a6b0(0x203)],![]);_0xdf3d41&&(registerResultVariableOwner(_0x1249ef,_0xdf3d41,_0x1132f8['id'],_0x154787),!_0x14d4aa[_0x50a6b0(0x1aa)](_0xdf3d41)&&_0x14d4aa[_0x50a6b0(0x101)](_0xdf3d41,_0x1132f8['id']));}if(_0x1132f8['type']==='APPROVAL'&&isRecord(_0x1132f8[_0x50a6b0(0x19f)])&&_0x1132f8['timeout'][_0x50a6b0(0x13e)]===!![]&&_0x1132f8[_0x50a6b0(0x19f)][_0x50a6b0(0x17b)]===_0x50a6b0(0x19c)){const _0x413175=resolveEffectiveResultVariable(_0x1132f8['timeout']['resultVariable'],!![]);_0x413175&&registerResultVariableOwner(_0x1249ef,_0x413175,_0x1132f8['id']+_0x50a6b0(0x250),_0x154787);}});_0xab5cd[_0x36642e(0x227)]!==0x1&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x158)});_0x2fc0b1[_0x36642e(0x227)]===0x0&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x16c)});const _0x5ab8c9=new Map(),_0x2ebae1=new Map(),_0x3e0307=new Map(),_0x3c6c22=new Set();_0xa676ac[_0x36642e(0x25a)][_0x36642e(0x1f1)]((_0x356979,_0x404d4b)=>{const _0x2b762c=_0x36642e,_0x3fa879=_0x2b762c(0x20e)+_0x404d4b+']';if(!isRecord(_0x356979)){_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879,'message':_0x2b762c(0x183)});return;}const _0x17d4a9=_0x356979;_0x3e0307[_0x2b762c(0x101)](_0x17d4a9,_0x3fa879);const _0x14a543=resolveEdgeEndpoint(_0x17d4a9[_0x2b762c(0x148)],_0x17d4a9[_0x2b762c(0x229)]),_0x4e59e0=resolveEdgeEndpoint(_0x17d4a9[_0x2b762c(0x22e)],_0x17d4a9[_0x2b762c(0x15c)]);if(!_0x14a543)_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+'.source','message':'edge\x20source\x20is\x20required.'});if(!_0x4e59e0)_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+'.target','message':_0x2b762c(0x23d)});_0x14a543&&!_0x5cb19b[_0x2b762c(0x1aa)](_0x14a543)&&_0x154787['push']({'path':_0x3fa879+_0x2b762c(0x17d),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x14a543+'.'});_0x4e59e0&&!_0x5cb19b[_0x2b762c(0x1aa)](_0x4e59e0)&&_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x1ae),'message':_0x2b762c(0x185)+_0x4e59e0+'.'});if(_0x17d4a9['id']!==undefined){if(typeof _0x17d4a9['id']!==_0x2b762c(0x16f)||!BPMN_ID_PATTERN['test'](_0x17d4a9['id']))_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x213),'message':_0x2b762c(0x21a)});else{if(_0x47a37a['has'](_0x17d4a9['id']))_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x213),'message':_0x2b762c(0x265)+_0x17d4a9['id']+'.'});else!_0x47a37a[_0x2b762c(0x1aa)](_0x17d4a9['id'])&&_0x47a37a[_0x2b762c(0x205)](_0x17d4a9['id']);}}if(_0x14a543&&_0x4e59e0){const _0x58fc58=_0x14a543+'\x00'+_0x4e59e0+'\x00'+(_0x17d4a9['conditionType']??_0x2b762c(0x1e1));_0x3c6c22[_0x2b762c(0x1aa)](_0x58fc58)?_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879,'message':_0x2b762c(0x119)+_0x14a543+'\x20->\x20'+_0x4e59e0+'\x20('+(_0x17d4a9[_0x2b762c(0x110)]??_0x2b762c(0x1e1))+').'}):_0x3c6c22['add'](_0x58fc58);}validateEdge(_0x17d4a9,_0x3fa879,_0x154787),_0x14a543&&_0x4e59e0&&(_0x5ab8c9[_0x2b762c(0x216)](_0x14a543)?.[_0x2b762c(0x225)](_0x17d4a9)??_0x5ab8c9[_0x2b762c(0x101)](_0x14a543,[_0x17d4a9]),_0x2ebae1['get'](_0x4e59e0)?.['push'](_0x17d4a9)??_0x2ebae1['set'](_0x4e59e0,[_0x17d4a9]));});if(_0xab5cd[_0x36642e(0x227)]!==0x1)return;validateGraphShape(_0x5cb19b,_0xab5cd[0x0],_0x2fc0b1,_0x5ab8c9,_0x2ebae1,_0x3e0307,_0x154787),validateScriptResultReferences(_0x5cb19b,_0xab5cd[0x0],_0x5ab8c9,_0x2ebae1,_0x3e0307,_0x14d4aa,_0x154787),validateApprovalResults(_0x5cb19b,_0x2979ca,_0x2fc0b1,_0x154787);}function validateNode(_0x48b01a,_0x27a07f,_0x557339){const _0x2b0b69=a299_0x2ba7aa;for(const _0x57068e of[_0x2b0b69(0x248),_0x2b0b69(0x10d)]){Object[_0x2b0b69(0x13c)][_0x2b0b69(0x156)][_0x2b0b69(0x231)](_0x48b01a,_0x57068e)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.'+_0x57068e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x2b0b69(0x1aa)](_0x48b01a[_0x2b0b69(0x23b)]))return;(typeof _0x48b01a[_0x2b0b69(0x11b)]!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x11b)][_0x2b0b69(0x1f9)]()==='')&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x1dd),'message':_0x2b0b69(0x1ac)});_0x48b01a['pageId']!==undefined&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x197),'message':_0x2b0b69(0x104)});if(_0x48b01a['path']!==undefined){if(typeof _0x48b01a['path']!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x1d4)][_0x2b0b69(0x1f9)]()==='')_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1a7),'message':_0x2b0b69(0x1a9)});else _0x48b01a[_0x2b0b69(0x23b)]!==_0x2b0b69(0x121)&&_0x48b01a[_0x2b0b69(0x23b)]!==_0x2b0b69(0x22d)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1a7),'message':_0x2b0b69(0x107)});}const _0x586473=_0x48b01a['position'];if(!isRecord(_0x586473))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x186),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x4b1348 of['x','y']){const _0x4739b6=_0x586473[_0x4b1348];(typeof _0x4739b6!==_0x2b0b69(0x264)||!Number[_0x2b0b69(0x130)](_0x4739b6)||_0x4739b6<0x0)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x114)+_0x4b1348,'message':_0x2b0b69(0x136)+_0x4b1348+_0x2b0b69(0x19d)});}if(_0x48b01a[_0x2b0b69(0x23b)]===_0x2b0b69(0x121)){const _0x3c99c7=_0x48b01a[_0x2b0b69(0x143)]??'SINGLE',_0x5d6ff0=_0x48b01a[_0x2b0b69(0x1ea)]??_0x2b0b69(0x121);!APPROVAL_TASK_MODES[_0x2b0b69(0x1aa)](_0x5d6ff0)&&_0x557339['push']({'path':_0x27a07f+'.taskMode','message':_0x2b0b69(0x1c8)+String(_0x5d6ff0)+'.'});!APPROVAL_MODES['has'](_0x3c99c7)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.approvalMode','message':_0x2b0b69(0x1db)+String(_0x3c99c7)+'.'});if(!isRecord(_0x48b01a[_0x2b0b69(0x269)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1e3),'message':_0x2b0b69(0x159)});else{const _0x155871=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x1b6)];_0x155871!=='FIXED'&&_0x155871!==_0x2b0b69(0x171)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x232),'message':_0x2b0b69(0x1a5)});if(_0x155871===_0x2b0b69(0x176)){const _0x29ed54=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x261)];if(!Array['isArray'](_0x29ed54)||_0x29ed54[_0x2b0b69(0x227)]===0x0)_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x15b),'message':_0x2b0b69(0x1ba)});else{const _0x5a2de0=_0x29ed54['findIndex'](_0x52d9d9=>!isValidUserId(_0x52d9d9));_0x5a2de0>=0x0&&_0x557339['push']({'path':_0x27a07f+'.assignee.userIds['+_0x5a2de0+']','message':_0x2b0b69(0x154)});const _0x22d0e5=new Set(_0x29ed54[_0x2b0b69(0x1ff)](isValidUserId)[_0x2b0b69(0x1d6)](_0x548585=>String(_0x548585)[_0x2b0b69(0x1f9)]()));_0x3c99c7===_0x2b0b69(0x196)&&_0x22d0e5[_0x2b0b69(0x1b9)]>0x1&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x15b),'message':_0x2b0b69(0x11a)});}}if(_0x155871===_0x2b0b69(0x171)){const _0x1eb652=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x11f)],_0x3ae7f1=typeof _0x1eb652===_0x2b0b69(0x264)||typeof _0x1eb652===_0x2b0b69(0x16f)?Number(String(_0x1eb652)['trim']()):Number[_0x2b0b69(0x109)];(!Number[_0x2b0b69(0x14f)](_0x3ae7f1)||_0x3ae7f1<=0x0)&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x102),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x48b01a['transferCandidates']!==undefined){if(!isRecord(_0x48b01a[_0x2b0b69(0x220)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.transferCandidates','message':_0x2b0b69(0x1da)});else{if(_0x48b01a[_0x2b0b69(0x220)][_0x2b0b69(0x1b6)]!==_0x2b0b69(0x176))_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x191),'message':_0x2b0b69(0x12f)});else{const _0x36f28b=_0x48b01a[_0x2b0b69(0x220)][_0x2b0b69(0x261)];if(!Array[_0x2b0b69(0x116)](_0x36f28b)||_0x36f28b[_0x2b0b69(0x227)]===0x0)_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.transferCandidates.userIds','message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x4b9666=_0x36f28b[_0x2b0b69(0x10f)](_0x29d1b4=>!isValidUserId(_0x29d1b4));_0x4b9666>=0x0&&_0x557339['push']({'path':_0x27a07f+'.transferCandidates.userIds['+_0x4b9666+']','message':_0x2b0b69(0x1bf)});}}}}}_0x48b01a['sequential']!==undefined&&typeof _0x48b01a[_0x2b0b69(0x23c)]!==_0x2b0b69(0x175)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x18c),'message':_0x2b0b69(0x1a2)});if(_0x48b01a[_0x2b0b69(0x23b)]===_0x2b0b69(0x243)){(typeof _0x48b01a['scriptName']!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x1b8)]['trim']()==='')&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1c3),'message':_0x2b0b69(0x1a1)});if(_0x48b01a[_0x2b0b69(0x203)]!==undefined){if(typeof _0x48b01a[_0x2b0b69(0x203)]!==_0x2b0b69(0x16f)||!VARIABLE_PATTERN[_0x2b0b69(0x18e)](_0x48b01a[_0x2b0b69(0x203)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x155),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2b0b69(0x1aa)](_0x48b01a[_0x2b0b69(0x203)])||_0x48b01a['resultVariable']['startsWith'](_0x2b0b69(0x1fc)))&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x155),'message':'Reserved\x20resultVariable:\x20'+_0x48b01a[_0x2b0b69(0x203)]+'.'});}}validateAsyncExecution(_0x48b01a,_0x27a07f,_0x557339),validateApprovalTimeout(_0x48b01a,_0x27a07f,_0x557339),validateCcConfig(_0x48b01a,_0x27a07f,_0x557339),_0x48b01a['type']==='NOTIFICATION'&&validateNotificationConfig(_0x48b01a[_0x2b0b69(0x124)],_0x27a07f+'.config',_0x557339);}function validateAsyncExecution(_0x473d6f,_0x2bb8e6,_0x3cf2c0){const _0x4adacc=a299_0x2ba7aa;if(_0x473d6f[_0x4adacc(0x167)]===undefined)return;if(!isRecord(_0x473d6f[_0x4adacc(0x167)])){_0x3cf2c0['push']({'path':_0x2bb8e6+'.async','message':_0x4adacc(0x228)});return;}if(_0x473d6f[_0x4adacc(0x167)][_0x4adacc(0x13e)]!==undefined&&typeof _0x473d6f[_0x4adacc(0x167)]['enabled']!=='boolean'){_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+'.async.enabled','message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x473d6f[_0x4adacc(0x167)][_0x4adacc(0x13e)]!==!![])return;_0x473d6f[_0x4adacc(0x23b)]!==_0x4adacc(0x243)&&_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+'.async','message':_0x4adacc(0x13d)});const _0x2010a2=_0x473d6f[_0x4adacc(0x167)]['retryCount']??0x3;(!Number[_0x4adacc(0xff)](_0x2010a2)||_0x2010a2<0x1||_0x2010a2>MAX_ASYNC_RETRY_COUNT)&&_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+_0x4adacc(0x226),'message':_0x4adacc(0x163)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x473d6f['async'][_0x4adacc(0x10a)]!==undefined&&validateTimeAmount(_0x473d6f[_0x4adacc(0x167)]['retryInterval'],_0x2bb8e6+_0x4adacc(0x151),_0x3cf2c0);}function validateApprovalTimeout(_0x5c8eb2,_0x22506f,_0x149631){const _0x3d9f37=a299_0x2ba7aa;if(_0x5c8eb2[_0x3d9f37(0x19f)]===undefined)return;if(!isRecord(_0x5c8eb2['timeout'])){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout','message':_0x3d9f37(0x20a)});return;}if(_0x5c8eb2[_0x3d9f37(0x19f)]['enabled']!==undefined&&typeof _0x5c8eb2['timeout'][_0x3d9f37(0x13e)]!==_0x3d9f37(0x175)){_0x149631['push']({'path':_0x22506f+'.timeout.enabled','message':_0x3d9f37(0x17a)});return;}if(_0x5c8eb2[_0x3d9f37(0x19f)]['enabled']!==!![])return;if(_0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x1cf)]!==undefined&&typeof _0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x1cf)]!=='boolean'){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x201),'message':_0x3d9f37(0x1a3)});return;}_0x5c8eb2[_0x3d9f37(0x23b)]!=='APPROVAL'&&_0x149631['push']({'path':_0x22506f+'.timeout','message':_0x3d9f37(0x233)});validateTimeAmount(_0x5c8eb2['timeout']['duration'],_0x22506f+_0x3d9f37(0x11d),_0x149631);const _0x574942=_0x5c8eb2[_0x3d9f37(0x19f)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x3d9f37(0x1aa)](_0x574942)){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x193),'message':_0x3d9f37(0x182)});return;}(_0x5c8eb2[_0x3d9f37(0x1ea)]??_0x3d9f37(0x121))==='HANDLE'&&_0x574942!==_0x3d9f37(0x19c)&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x193),'message':_0x3d9f37(0x1bd)});const _0x4fb1d5=_0x5c8eb2['timeout']['interrupting']??_0x574942!=='EXECUTE_BFF';if(_0x574942===_0x3d9f37(0x19c))_0x4fb1d5&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x201),'message':_0x3d9f37(0x187)}),(typeof _0x5c8eb2['timeout'][_0x3d9f37(0x1b8)]!==_0x3d9f37(0x16f)||_0x5c8eb2[_0x3d9f37(0x19f)]['scriptName'][_0x3d9f37(0x1f9)]()==='')&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout.scriptName','message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x203)],_0x22506f+'.timeout.resultVariable',_0x149631);else!_0x4fb1d5&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout.interrupting','message':_0x574942+_0x3d9f37(0x1be)});}function validateTimeAmount(_0x39282,_0x1606e5,_0x1e3b40){const _0x5881ea=a299_0x2ba7aa;if(!isRecord(_0x39282)){_0x1e3b40['push']({'path':_0x1606e5,'message':_0x5881ea(0x18f)});return;}(!Number['isInteger'](_0x39282[_0x5881ea(0x160)])||Number(_0x39282[_0x5881ea(0x160)])<=0x0)&&_0x1e3b40[_0x5881ea(0x225)]({'path':_0x1606e5+_0x5881ea(0x1d0),'message':_0x5881ea(0x190)}),!FLOW_TIME_UNITS['has'](_0x39282[_0x5881ea(0x1bb)])&&_0x1e3b40[_0x5881ea(0x225)]({'path':_0x1606e5+_0x5881ea(0x200),'message':_0x5881ea(0x147)});}function validateOptionalResultVariable(_0x5ef29a,_0x3daa31,_0x442fe3){const _0x33f533=a299_0x2ba7aa;if(_0x5ef29a===undefined||_0x5ef29a===null||_0x5ef29a==='')return;if(typeof _0x5ef29a!==_0x33f533(0x16f)||!VARIABLE_PATTERN[_0x33f533(0x18e)](_0x5ef29a))_0x442fe3[_0x33f533(0x225)]({'path':_0x3daa31,'message':_0x33f533(0x238)});else(RESERVED_RESULT_VARIABLES['has'](_0x5ef29a)||_0x5ef29a[_0x33f533(0x117)](_0x33f533(0x1fc)))&&_0x442fe3[_0x33f533(0x225)]({'path':_0x3daa31,'message':_0x33f533(0x267)+_0x5ef29a+'.'});}function validateCcConfig(_0x585797,_0xed9620,_0x573c0e){const _0x433a8c=a299_0x2ba7aa;if(_0x585797['cc']===undefined)return;if(!isRecord(_0x585797['cc'])){_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x174),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x585797[_0x433a8c(0x23b)]!=='END'&&_0x585797[_0x433a8c(0x23b)]!==_0x433a8c(0x121)&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x174),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x433a8c(0x13c)][_0x433a8c(0x156)][_0x433a8c(0x231)](_0x585797['cc'],'readSources')&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x497413=_0x585797['cc']['recipientUserIds'];if(!Array[_0x433a8c(0x116)](_0x497413)||_0x497413[_0x433a8c(0x227)]===0x0)_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x180),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x497413[_0x433a8c(0x227)]>MAX_CC_RECIPIENTS&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+'.cc.recipientUserIds','message':_0x433a8c(0x177)+MAX_CC_RECIPIENTS+_0x433a8c(0x17e)});const _0x3f4b7e=new Set();_0x497413['forEach']((_0x4de287,_0x173325)=>{const _0x426577=_0x433a8c;if(typeof _0x4de287!==_0x426577(0x16f)||_0x4de287[_0x426577(0x1f9)]()==='')_0x573c0e['push']({'path':_0xed9620+_0x426577(0x195)+_0x173325+']','message':_0x426577(0x146)});else _0x3f4b7e[_0x426577(0x1aa)](_0x4de287[_0x426577(0x1f9)]())?_0x573c0e[_0x426577(0x225)]({'path':_0xed9620+_0x426577(0x195)+_0x173325+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x4de287[_0x426577(0x1f9)]()+'.'}):_0x3f4b7e['add'](_0x4de287[_0x426577(0x1f9)]());});}validateStringArray(_0x585797['cc'][_0x433a8c(0x1cb)],_0xed9620+_0x433a8c(0x1fa),_0x573c0e);}function validateStringArray(_0xb80fca,_0x1ffed8,_0x579323){const _0x3b8880=a299_0x2ba7aa;if(_0xb80fca===undefined)return;if(!Array[_0x3b8880(0x116)](_0xb80fca)){_0x579323['push']({'path':_0x1ffed8,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0xe72a07=new Set();_0xb80fca['forEach']((_0x12479e,_0x3bfcb2)=>{const _0x3ef560=_0x3b8880;if(typeof _0x12479e!==_0x3ef560(0x16f)||_0x12479e[_0x3ef560(0x1f9)]()==='')_0x579323[_0x3ef560(0x225)]({'path':_0x1ffed8+'['+_0x3bfcb2+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0xe72a07[_0x3ef560(0x1aa)](_0x12479e[_0x3ef560(0x1f9)]())?_0x579323[_0x3ef560(0x225)]({'path':_0x1ffed8+'['+_0x3bfcb2+']','message':_0x3ef560(0x221)+_0x12479e[_0x3ef560(0x1f9)]()+'.'}):_0xe72a07[_0x3ef560(0x205)](_0x12479e[_0x3ef560(0x1f9)]());});}function validateNotificationConfig(_0x21d7b6,_0x163992,_0x2874b4){const _0x282789=a299_0x2ba7aa;if(!isRecord(_0x21d7b6)){_0x2874b4[_0x282789(0x225)]({'path':_0x163992,'message':_0x282789(0x166)});return;}if(_0x21d7b6[_0x282789(0x25c)]!==undefined&&_0x21d7b6[_0x282789(0x25c)]!==null){if(typeof _0x21d7b6[_0x282789(0x25c)]!==_0x282789(0x16f))_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x111),'message':_0x282789(0x13f)});else _0x21d7b6[_0x282789(0x25c)][_0x282789(0x1f9)]()&&_0x21d7b6['version'][_0x282789(0x1f9)]()!=='v1'&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x111),'message':_0x282789(0x1e9)+_0x21d7b6[_0x282789(0x25c)]+'.'});}const _0x504074=requireNotificationString(_0x21d7b6[_0x282789(0x14b)],_0x163992+_0x282789(0x1d1),_0x282789(0x103),_0x2874b4);_0x504074?.[_0x282789(0x18b)]('${')&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x1d1),'message':_0x282789(0x135)});if(_0x21d7b6[_0x282789(0x138)]!==undefined&&_0x21d7b6[_0x282789(0x138)]!==null){if(typeof _0x21d7b6[_0x282789(0x138)]!==_0x282789(0x16f))_0x2874b4['push']({'path':_0x163992+_0x282789(0x1ec),'message':_0x282789(0x1d5)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x21d7b6[_0x282789(0x138)]['trim']()[_0x282789(0x260)]())&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+'.failurePolicy','message':_0x282789(0x188)});}!isRecord(_0x21d7b6[_0x282789(0x1e6)])?_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x1e8),'message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x21d7b6[_0x282789(0x1e6)],_0x163992+_0x282789(0x1e8),_0x2874b4),validateNotificationRecipients(_0x21d7b6['recipients'],_0x163992+'.recipients',_0x2874b4);}function validateNotificationTemplate(_0x17be4e,_0x828d0e,_0x47a915){const _0x1d7447=a299_0x2ba7aa;for(const _0x13a855 of['title',_0x1d7447(0x247)]){const _0xa04eeb=requireNotificationString(_0x17be4e[_0x13a855],_0x828d0e+'.'+_0x13a855,_0x1d7447(0x15e)+_0x13a855+_0x1d7447(0x249),_0x47a915);if(_0xa04eeb)validateNotificationPlaceholders(_0xa04eeb,_0x828d0e+'.'+_0x13a855,_0x47a915);}_0x17be4e[_0x1d7447(0x214)]!==undefined&&_0x17be4e[_0x1d7447(0x214)]!==null&&(typeof _0x17be4e[_0x1d7447(0x214)]!==_0x1d7447(0x16f)?_0x47a915[_0x1d7447(0x225)]({'path':_0x828d0e+_0x1d7447(0x1fb),'message':_0x1d7447(0x18a)}):validateNotificationPlaceholders(_0x17be4e[_0x1d7447(0x214)],_0x828d0e+_0x1d7447(0x1fb),_0x47a915)),validateNotificationFacts(_0x17be4e[_0x1d7447(0x12e)],_0x828d0e+_0x1d7447(0x202),_0x47a915),validateNotificationActions(_0x17be4e[_0x1d7447(0x10e)],_0x828d0e+_0x1d7447(0x141),_0x47a915);}function validateNotificationFacts(_0x42d70e,_0x3917ea,_0x2334e3){const _0x1fbefc=a299_0x2ba7aa;if(_0x42d70e===undefined||_0x42d70e===null)return;if(!Array[_0x1fbefc(0x116)](_0x42d70e)){_0x2334e3['push']({'path':_0x3917ea,'message':_0x1fbefc(0x17f)});return;}_0x42d70e[_0x1fbefc(0x227)]>MAX_NOTIFICATION_FACTS&&_0x2334e3['push']({'path':_0x3917ea,'message':_0x1fbefc(0x1fd)+MAX_NOTIFICATION_FACTS+_0x1fbefc(0x1d3)}),_0x42d70e[_0x1fbefc(0x1f1)]((_0x1ba13c,_0x31b012)=>{const _0x567f91=_0x1fbefc,_0x3cdb03=_0x3917ea+'['+_0x31b012+']';if(!isRecord(_0x1ba13c)){_0x2334e3[_0x567f91(0x225)]({'path':_0x3cdb03,'message':_0x567f91(0x1a8)});return;}for(const _0x580ea8 of[_0x567f91(0x1ed),_0x567f91(0x160)]){const _0x34630c=requireNotificationString(_0x1ba13c[_0x580ea8],_0x3cdb03+'.'+_0x580ea8,_0x567f91(0x23a)+_0x580ea8+'\x20is\x20required.',_0x2334e3);_0x34630c&&validateNotificationPlaceholders(_0x34630c,_0x3cdb03+'.'+_0x580ea8,_0x2334e3);}});}function validateNotificationActions(_0x5d2001,_0x14cd4f,_0x37f3b8){const _0x55f754=a299_0x2ba7aa;if(_0x5d2001===undefined||_0x5d2001===null)return;if(!Array[_0x55f754(0x116)](_0x5d2001)){_0x37f3b8[_0x55f754(0x225)]({'path':_0x14cd4f,'message':_0x55f754(0x1ce)});return;}_0x5d2001[_0x55f754(0x227)]>MAX_NOTIFICATION_ACTIONS&&_0x37f3b8[_0x55f754(0x225)]({'path':_0x14cd4f,'message':_0x55f754(0x1fd)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x5d2001[_0x55f754(0x1f1)]((_0x199bd5,_0x57f178)=>{const _0x7191ad=_0x55f754,_0x5f4cdc=_0x14cd4f+'['+_0x57f178+']';if(!isRecord(_0x199bd5)){_0x37f3b8[_0x7191ad(0x225)]({'path':_0x5f4cdc,'message':_0x7191ad(0x246)});return;}const _0x10c465=requireNotificationString(_0x199bd5[_0x7191ad(0x207)],_0x5f4cdc+'.text',_0x7191ad(0x23e),_0x37f3b8);if(_0x10c465)validateNotificationPlaceholders(_0x10c465,_0x5f4cdc+_0x7191ad(0x1ab),_0x37f3b8);const _0x209add=requireNotificationString(_0x199bd5[_0x7191ad(0x16b)],_0x5f4cdc+'.url',_0x7191ad(0x198),_0x37f3b8);if(!_0x209add)return;validateNotificationPlaceholders(_0x209add,_0x5f4cdc+_0x7191ad(0x152),_0x37f3b8),!/^https?:\/\//i[_0x7191ad(0x18e)](_0x209add)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x7191ad(0x18e)](_0x209add)&&_0x37f3b8['push']({'path':_0x5f4cdc+_0x7191ad(0x152),'message':_0x7191ad(0x108)});});}function validateNotificationRecipients(_0x97f410,_0x2bd98e,_0x554c56){const _0x4f05ed=a299_0x2ba7aa;if(_0x97f410===undefined||_0x97f410===null)return;if(!Array[_0x4f05ed(0x116)](_0x97f410)){_0x554c56[_0x4f05ed(0x225)]({'path':_0x2bd98e,'message':_0x4f05ed(0x192)});return;}let _0x4e8310=![];_0x97f410[_0x4f05ed(0x1f1)]((_0x3c943f,_0x4562af)=>{const _0x3d990d=_0x4f05ed,_0x495437=_0x2bd98e+'['+_0x4562af+']';if(!isRecord(_0x3c943f)){_0x554c56[_0x3d990d(0x225)]({'path':_0x495437,'message':_0x3d990d(0x1b1)});return;}const _0xc6e6dc=requireNotificationString(_0x3c943f['type'],_0x495437+_0x3d990d(0x150),'Notification\x20recipient.type\x20is\x20required.',_0x554c56);_0xc6e6dc&&!NOTIFICATION_RECIPIENT_TYPES[_0x3d990d(0x1aa)](_0xc6e6dc[_0x3d990d(0x260)]())&&_0x554c56['push']({'path':_0x495437+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x319425='TO';_0x3c943f[_0x3d990d(0x20f)]!==undefined&&_0x3c943f['role']!==null&&(typeof _0x3c943f[_0x3d990d(0x20f)]!=='string'?(_0x554c56[_0x3d990d(0x225)]({'path':_0x495437+_0x3d990d(0x21e),'message':_0x3d990d(0x128)}),_0x319425=''):(_0x319425=_0x3c943f[_0x3d990d(0x20f)][_0x3d990d(0x1f9)]()[_0x3d990d(0x260)](),!NOTIFICATION_RECIPIENT_ROLES[_0x3d990d(0x1aa)](_0x319425)&&_0x554c56['push']({'path':_0x495437+_0x3d990d(0x21e),'message':_0x3d990d(0x1e5)})));if(_0x319425==='TO')_0x4e8310=!![];const _0x4640a6=requireNotificationString(_0x3c943f[_0x3d990d(0x160)],_0x495437+_0x3d990d(0x1d0),_0x3d990d(0x251),_0x554c56);_0x4640a6&&validateNotificationPlaceholders(_0x4640a6,_0x495437+_0x3d990d(0x1d0),_0x554c56);}),_0x97f410['length']>0x0&&!_0x4e8310&&_0x554c56[_0x4f05ed(0x225)]({'path':_0x2bd98e,'message':_0x4f05ed(0x1bc)});}function requireNotificationString(_0x221540,_0x1177be,_0x45df2c,_0x2ef33d){const _0x232ee2=a299_0x2ba7aa;if(typeof _0x221540!==_0x232ee2(0x16f)||_0x221540[_0x232ee2(0x1f9)]()==='')return _0x2ef33d[_0x232ee2(0x225)]({'path':_0x1177be,'message':_0x45df2c}),undefined;return _0x221540[_0x232ee2(0x1f9)]();}function validateNotificationPlaceholders(_0x3f2085,_0x76f018,_0x2a5704){const _0x5ea186=a299_0x2ba7aa;for(const _0x17bbe5 of _0x3f2085['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3c7f8d=_0x17bbe5[0x1]?.[_0x5ea186(0x1f9)]()??'',_0x5a4bb5=_0x3c7f8d[_0x5ea186(0x194)]('.'),_0x3f6c04=_0x5a4bb5>=0x0?_0x3c7f8d[_0x5ea186(0x20c)](0x0,_0x5a4bb5):_0x3c7f8d,_0x4f42cf=_0x5a4bb5>=0x0?_0x3c7f8d[_0x5ea186(0x20c)](_0x5a4bb5+0x1)[_0x5ea186(0x1f9)]():'';(![_0x5ea186(0x253),'context','variables'][_0x5ea186(0x18b)](_0x3f6c04)||_0x4f42cf==='')&&_0x2a5704[_0x5ea186(0x225)]({'path':_0x76f018,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x17bbe5[0x0]+'.'});}_0x3f2085[_0x5ea186(0x256)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x5ea186(0x18b)]('${')&&_0x2a5704['push']({'path':_0x76f018,'message':_0x5ea186(0x1eb)});}function validateEdge(_0x4d5cb3,_0x1762ee,_0x2c3fbb){const _0x311602=a299_0x2ba7aa;_0x4d5cb3[_0x311602(0x11b)]!==undefined&&typeof _0x4d5cb3[_0x311602(0x11b)]!==_0x311602(0x16f)&&_0x2c3fbb['push']({'path':_0x1762ee+_0x311602(0x1dd),'message':_0x311602(0x24d)}),_0x4d5cb3[_0x311602(0x10b)]!==undefined&&typeof _0x4d5cb3[_0x311602(0x10b)]!==_0x311602(0x175)&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x1c7),'message':_0x311602(0x1c9)}),_0x4d5cb3[_0x311602(0x241)]!==undefined&&(!Array[_0x311602(0x116)](_0x4d5cb3[_0x311602(0x241)])?_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+'.waypoints','message':_0x311602(0x209)}):_0x4d5cb3[_0x311602(0x241)][_0x311602(0x1f1)]((_0x25f320,_0x4904c4)=>{const _0x15b9c4=_0x311602;if(!isRecord(_0x25f320)){_0x2c3fbb[_0x15b9c4(0x225)]({'path':_0x1762ee+'.waypoints['+_0x4904c4+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x4fa220 of['x','y']){const _0x70c4f9=_0x25f320[_0x4fa220];(typeof _0x70c4f9!=='number'||!Number['isFinite'](_0x70c4f9))&&_0x2c3fbb[_0x15b9c4(0x225)]({'path':_0x1762ee+_0x15b9c4(0x12d)+_0x4904c4+'].'+_0x4fa220,'message':_0x15b9c4(0x134)+_0x4fa220+_0x15b9c4(0x218)});}})),_0x4d5cb3[_0x311602(0x110)]!==undefined&&!CONDITION_TYPES[_0x311602(0x1aa)](_0x4d5cb3[_0x311602(0x110)])&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x254),'message':_0x311602(0x255)+String(_0x4d5cb3['conditionType'])+'.'}),_0x4d5cb3[_0x311602(0x110)]===_0x311602(0x170)&&(typeof _0x4d5cb3[_0x311602(0x1df)]!==_0x311602(0x16f)||_0x4d5cb3[_0x311602(0x1df)]['trim']()==='')&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+'.expression','message':_0x311602(0x258)}),_0x4d5cb3[_0x311602(0x10b)]===!![]&&_0x4d5cb3['conditionType']!==_0x311602(0x1e1)&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x1c7),'message':_0x311602(0x100)}),_0x4d5cb3[_0x311602(0x10b)]===!![]&&typeof _0x4d5cb3[_0x311602(0x1df)]==='string'&&_0x4d5cb3[_0x311602(0x1df)][_0x311602(0x1f9)]()!==''&&_0x2c3fbb['push']({'path':_0x1762ee+_0x311602(0x1cd),'message':_0x311602(0x1f7)});}function validateGraphShape(_0x2fcec7,_0x5398d6,_0x3e7a34,_0x3689d2,_0x29a1df,_0x402a0b,_0x16bf5b){const _0x69941=a299_0x2ba7aa;for(const [_0x590b08,_0x4f087c]of _0x2fcec7){const _0x439615=_0x29a1df[_0x69941(0x216)](_0x590b08)??[],_0x173ff3=_0x3689d2[_0x69941(0x216)](_0x590b08)??[];_0x4f087c[_0x69941(0x23b)]!==_0x69941(0x1c1)&&_0x439615[_0x69941(0x227)]===0x0&&_0x16bf5b['push']({'path':'flowJson.nodes.'+_0x590b08,'message':_0x69941(0x11e)});_0x4f087c[_0x69941(0x23b)]!==_0x69941(0x22d)&&_0x173ff3[_0x69941(0x227)]===0x0&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x4f087c['type']==='START'&&_0x439615[_0x69941(0x227)]>0x0&&_0x16bf5b['push']({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x115)});_0x4f087c[_0x69941(0x23b)]===_0x69941(0x22d)&&_0x173ff3[_0x69941(0x227)]>0x0&&_0x16bf5b['push']({'path':'flowJson.nodes.'+_0x590b08,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x140)){_0x173ff3['length']<0x2&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x14e2c5=_0x173ff3[_0x69941(0x1ff)](_0x2a4794=>_0x2a4794[_0x69941(0x10b)]===!![]);_0x14e2c5[_0x69941(0x227)]!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x208)});if(_0x14e2c5[_0x69941(0x227)]===0x1){const _0x5b907a=_0x14e2c5[0x0],_0x12b7b6=_0x402a0b[_0x69941(0x216)](_0x5b907a)??_0x69941(0x162);_0x5b907a['conditionType']!==_0x69941(0x1e1)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x12b7b6+_0x69941(0x254),'message':_0x69941(0x16a)});_0x5b907a[_0x69941(0x1df)]!==undefined&&_0x16bf5b[_0x69941(0x225)]({'path':_0x12b7b6+_0x69941(0x1cd),'message':_0x69941(0x215)});for(const _0x26465c of _0x173ff3){if(_0x26465c===_0x5b907a)continue;const _0x4816df=_0x402a0b['get'](_0x26465c)??'flowJson.edges';if(_0x26465c[_0x69941(0x110)]!==_0x69941(0x170))_0x16bf5b['push']({'path':_0x4816df+'.conditionType','message':_0x69941(0x24a)});else(typeof _0x26465c['expression']!=='string'||_0x26465c['expression'][_0x69941(0x1f9)]()==='')&&_0x16bf5b[_0x69941(0x225)]({'path':_0x4816df+_0x69941(0x1cd),'message':_0x69941(0x12b)});}}}if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x121)&&(_0x4f087c['taskMode']??_0x69941(0x121))===_0x69941(0x25d)){if(_0x173ff3[_0x69941(0x227)]!==0x1)_0x16bf5b[_0x69941(0x225)]({'path':'flowJson.nodes.'+_0x590b08,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x30aa34=_0x173ff3[0x0];((_0x30aa34['conditionType']??_0x69941(0x1e1))!==_0x69941(0x1e1)||_0x30aa34[_0x69941(0x10b)]===!![]||typeof _0x30aa34['expression']===_0x69941(0x16f)&&_0x30aa34[_0x69941(0x1df)][_0x69941(0x1f9)]()!=='')&&_0x16bf5b[_0x69941(0x225)]({'path':_0x402a0b[_0x69941(0x216)](_0x30aa34)??'flowJson.edges','message':_0x69941(0x18d)});}}else{if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x121)){const _0x57f2da=_0x173ff3[_0x69941(0x1d6)](_0x1f207c=>_0x1f207c[_0x69941(0x110)]??_0x69941(0x1e1)),_0x476795=_0x57f2da[_0x69941(0x1ff)](_0x9ffabc=>_0x9ffabc!==_0x69941(0x199)&&_0x9ffabc!==_0x69941(0x262));_0x476795[_0x69941(0x227)]>0x0&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x1f6)}),_0x57f2da['filter'](_0x105077=>_0x105077===_0x69941(0x199))[_0x69941(0x227)]!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x131)}),_0x57f2da['filter'](_0x1f7edc=>_0x1f7edc===_0x69941(0x262))['length']!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x1fe)}),_0x173ff3[_0x69941(0x25b)](_0x3060ab=>_0x3060ab[_0x69941(0x10b)]===!![])&&_0x16bf5b[_0x69941(0x225)]({'path':'flowJson.nodes.'+_0x590b08,'message':_0x69941(0x1b7)});}}}const _0x443dbd=new Set(),_0x558a06=_0x173aa9=>{const _0x5c228b=_0x69941;if(_0x443dbd['has'](_0x173aa9))return;_0x443dbd['add'](_0x173aa9);for(const _0x48047f of _0x3689d2[_0x5c228b(0x216)](_0x173aa9)??[]){const _0x55f759=resolveEdgeEndpoint(_0x48047f[_0x5c228b(0x22e)],_0x48047f[_0x5c228b(0x15c)]);if(_0x55f759&&_0x2fcec7[_0x5c228b(0x1aa)](_0x55f759))_0x558a06(_0x55f759);}};_0x558a06(_0x5398d6);for(const _0x54193f of _0x2fcec7[_0x69941(0x1d2)]()){!_0x443dbd[_0x69941(0x1aa)](_0x54193f)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x54193f,'message':_0x69941(0x204)});}const _0x9b39a8=_0x3e7a34[_0x69941(0x25b)](_0x406692=>_0x443dbd[_0x69941(0x1aa)](_0x406692));if(!_0x9b39a8){_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x162),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x1b6489=new Set(),_0x32769a=_0x4009aa=>{const _0x2dba93=_0x69941;if(_0x1b6489['has'](_0x4009aa))return;_0x1b6489[_0x2dba93(0x205)](_0x4009aa);for(const _0x1c83bf of _0x29a1df[_0x2dba93(0x216)](_0x4009aa)??[]){const _0xbe91a=resolveEdgeEndpoint(_0x1c83bf[_0x2dba93(0x148)],_0x1c83bf[_0x2dba93(0x229)]);if(_0xbe91a&&_0x2fcec7['has'](_0xbe91a))_0x32769a(_0xbe91a);}};for(const _0x359129 of _0x3e7a34){if(_0x2fcec7[_0x69941(0x1aa)](_0x359129))_0x32769a(_0x359129);}for(const _0x2216a4 of _0x443dbd){!_0x1b6489['has'](_0x2216a4)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x2216a4,'message':_0x69941(0x15f)});}}function validateApprovalResults(_0x293558,_0x4d6a7e,_0x5b4114,_0x1edc7a){const _0x35b394=a299_0x2ba7aa;if(_0x4d6a7e===0x0)return;const _0x1bc963=new Set(_0x5b4114['map'](_0x4d60e8=>_0x293558['get'](_0x4d60e8)?.[_0x35b394(0x25f)])[_0x35b394(0x1ff)](_0x3b0a8b=>typeof _0x3b0a8b===_0x35b394(0x16f)));for(const _0x259fa2 of[_0x35b394(0x199),_0x35b394(0x262)]){!_0x1bc963[_0x35b394(0x1aa)](_0x259fa2)&&_0x1edc7a[_0x35b394(0x225)]({'path':_0x35b394(0x236),'message':_0x35b394(0x1c6)+_0x259fa2+'.'});}}function validateScriptResultReferences(_0x23148b,_0x25b1fc,_0x4ee184,_0x1e531f,_0x4e57ba,_0x4e3168,_0x145057){const _0x39b840=a299_0x2ba7aa;if(_0x4e3168[_0x39b840(0x1b9)]===0x0)return;const _0x39ce9b=new Set(),_0x181b85=_0x409b4b=>{const _0x58db4b=_0x39b840;if(!_0x39ce9b[_0x58db4b(0x1aa)](_0x409b4b)&&_0x23148b['has'](_0x409b4b)){_0x39ce9b[_0x58db4b(0x205)](_0x409b4b);for(const _0x31f9f7 of _0x4ee184[_0x58db4b(0x216)](_0x409b4b)??[]){const _0x2bf1e1=resolveEdgeEndpoint(_0x31f9f7[_0x58db4b(0x22e)],_0x31f9f7[_0x58db4b(0x15c)]);if(_0x2bf1e1)_0x181b85(_0x2bf1e1);}}};_0x181b85(_0x25b1fc);const _0x44c8f8=new Map();for(const _0x46453b of _0x39ce9b){_0x44c8f8[_0x39b840(0x101)](_0x46453b,_0x46453b===_0x25b1fc?new Set([_0x25b1fc]):new Set(_0x39ce9b));}let _0x3d82a3=!![];while(_0x3d82a3){_0x3d82a3=![];for(const _0x8527ac of _0x39ce9b){if(_0x8527ac===_0x25b1fc)continue;const _0x42d336=(_0x1e531f[_0x39b840(0x216)](_0x8527ac)??[])[_0x39b840(0x1d6)](_0x4cfb73=>resolveEdgeEndpoint(_0x4cfb73[_0x39b840(0x148)],_0x4cfb73[_0x39b840(0x229)]))[_0x39b840(0x1ff)](_0xb153d0=>Boolean(_0xb153d0&&_0x39ce9b[_0x39b840(0x1aa)](_0xb153d0)));if(_0x42d336[_0x39b840(0x227)]===0x0)continue;const _0x156664=new Set(_0x44c8f8[_0x39b840(0x216)](_0x42d336[0x0])??[]);for(const _0x5bf23e of _0x42d336[_0x39b840(0x20c)](0x1)){const _0x27cbd4=_0x44c8f8[_0x39b840(0x216)](_0x5bf23e)??new Set();for(const _0x45a10c of _0x156664){if(!_0x27cbd4['has'](_0x45a10c))_0x156664[_0x39b840(0x19b)](_0x45a10c);}}_0x156664['add'](_0x8527ac);const _0x5a4ff4=_0x44c8f8[_0x39b840(0x216)](_0x8527ac);!setsEqual(_0x5a4ff4,_0x156664)&&(_0x44c8f8[_0x39b840(0x101)](_0x8527ac,_0x156664),_0x3d82a3=!![]);}}for(const [_0x2e9161,_0x283b0c]of _0x4ee184){const _0x5001d9=_0x44c8f8[_0x39b840(0x216)](_0x2e9161);if(!_0x5001d9)continue;for(const _0x57d8b6 of _0x283b0c){if(_0x57d8b6[_0x39b840(0x110)]!==_0x39b840(0x170)||typeof _0x57d8b6[_0x39b840(0x1df)]!==_0x39b840(0x16f))continue;for(const [_0x321d0a,_0x1a8988]of _0x4e3168){expressionReferencesVariable(_0x57d8b6['expression'],_0x321d0a)&&!_0x5001d9[_0x39b840(0x1aa)](_0x1a8988)&&_0x145057[_0x39b840(0x225)]({'path':(_0x4e57ba[_0x39b840(0x216)](_0x57d8b6)??_0x39b840(0x162))+_0x39b840(0x1cd),'message':_0x39b840(0x1f8)+_0x321d0a+_0x39b840(0x230)+_0x1a8988+_0x39b840(0x21c)+_0x2e9161+'.'});}}}}function expressionReferencesVariable(_0x40e624,_0x1601b7){const _0x489760=a299_0x2ba7aa;let _0x3d52fa=0x0;while(_0x3d52fa<_0x40e624[_0x489760(0x227)]){const _0x19a498=_0x40e624[_0x3d52fa];if(_0x19a498==='\x27'||_0x19a498==='\x22'){_0x3d52fa=skipQuotedExpressionSegment(_0x40e624,_0x3d52fa,_0x19a498);continue;}if(!/[A-Za-z_]/['test'](_0x19a498)){_0x3d52fa+=0x1;continue;}const _0x4c50d7=_0x3d52fa;_0x3d52fa+=0x1;while(_0x3d52fa<_0x40e624[_0x489760(0x227)]&&/[A-Za-z0-9_]/[_0x489760(0x18e)](_0x40e624[_0x3d52fa])){_0x3d52fa+=0x1;}if(_0x40e624[_0x489760(0x20c)](_0x4c50d7,_0x3d52fa)!==_0x1601b7)continue;let _0x41b5e4=_0x4c50d7-0x1;while(_0x41b5e4>=0x0&&/\s/[_0x489760(0x18e)](_0x40e624[_0x41b5e4])){_0x41b5e4-=0x1;}if(_0x40e624[_0x41b5e4]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x29a0b0,_0x1125d1,_0x54ff30){const _0x4a7101=a299_0x2ba7aa;let _0x4a8eda=_0x1125d1+0x1;while(_0x4a8eda<_0x29a0b0[_0x4a7101(0x227)]){if(_0x29a0b0[_0x4a8eda]==='\x5c'){_0x4a8eda+=0x2;continue;}if(_0x29a0b0[_0x4a8eda]===_0x54ff30)return _0x4a8eda+0x1;_0x4a8eda+=0x1;}return _0x4a8eda;}function resolveEffectiveResultVariable(_0x110860,_0x4c4ebd){const _0x1b5086=a299_0x2ba7aa;if(_0x110860===undefined||_0x110860===null||_0x4c4ebd&&_0x110860==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x110860!==_0x1b5086(0x16f)||!VARIABLE_PATTERN[_0x1b5086(0x18e)](_0x110860)||RESERVED_RESULT_VARIABLES['has'](_0x110860)||_0x110860['startsWith'](_0x1b5086(0x1fc)))return undefined;return _0x110860;}function registerResultVariableOwner(_0x1e1c9a,_0x2daeb5,_0x21e442,_0x5f4a14){const _0x302f17=a299_0x2ba7aa;if(_0x1e1c9a[_0x302f17(0x1aa)](_0x2daeb5)){_0x5f4a14[_0x302f17(0x225)]({'path':_0x302f17(0x236),'message':'Duplicate\x20resultVariable:\x20'+_0x2daeb5+'.'});return;}_0x1e1c9a[_0x302f17(0x101)](_0x2daeb5,_0x21e442);}function a299_0x3e72(){const _0x505a8b=['FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.cc','boolean','FIXED','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowName\x20is\x20required.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','timeout.enabled\x20must\x20be\x20a\x20boolean.','action','#/$defs/userId','.source','\x20users.','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.cc.recipientUserIds','utf8','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','edge\x20must\x20be\x20an\x20object.','4YOeRSe','Edge\x20target\x20node\x20not\x20found:\x20','.position','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','16555275OaFTft','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','includes','.sequential','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','test','duration\x20requires\x20value\x20and\x20unit.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.transferCandidates.strategy','Notification\x20recipients\x20must\x20be\x20an\x20array.','.timeout.action','indexOf','.cc.recipientUserIds[','SINGLE','.pageId','Notification\x20action.url\x20is\x20required.','APPROVED','flowJson.nodes.','delete','EXECUTE_BFF','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','timeout','empty_metadata_removed','SCRIPT\x20node\x20requires\x20scriptName.','sequential\x20must\x20be\x20a\x20boolean.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','formSchema','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','flowDesc\x20must\x20be\x20a\x20string.','.path','Notification\x20fact\x20must\x20be\x20an\x20object.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','has','.text','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowKey','.target','array','SECONDS','Notification\x20recipient\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','metadata','parse','].taskMode','strategy','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','scriptName','size','FIXED\x20assignee\x20requires\x20userIds.','unit','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','approved','START','FORM_FLOW','.scriptName','Unsupported\x20node\x20type:\x20','#/$defs/flowEdge','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.defaultFlow','Unsupported\x20task\x20mode:\x20','defaultFlow\x20must\x20be\x20a\x20boolean.','10380DCWigt','visible','USER','.expression','Notification\x20template.actions\x20must\x20be\x20an\x20array.','interrupting','.value','.configCode','keys','\x20facts.','path','failurePolicy\x20must\x20be\x20a\x20string.','map','approval_sys_initiatorUserId','integer','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','transferCandidates\x20must\x20be\x20an\x20object.','Unsupported\x20approval\x20mode:\x20','edges\x20must\x20be\x20an\x20array.','.name','formData','expression','approval.simple-flow.v1','ALWAYS','CUSTOM_PAGE','.assignee','815VBgOKF','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','template','approval_sys_appCode','.template','Unsupported\x20notification\x20version:\x20','taskMode','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.failurePolicy','label','flowJson.','title','overwrite','forEach','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','approval_sys_initiatorUsername','Unsupported\x20schemaVersion:\x20','object','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','trim','.cc.visible','.detailMarkdown','approval_sys_','Notification\x20template\x20supports\x20at\x20most\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','filter','.unit','.timeout.interrupting','.facts','resultVariable','Node\x20is\x20not\x20reachable\x20from\x20START.','add','#/$defs/flowNode','text','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','waypoints\x20must\x20be\x20an\x20array.','timeout\x20must\x20be\x20an\x20object.','flowDesc','slice','pageId','flowJson.edges[','role','nodes','PLATFORM_FORM','datasetCode','.id','detailMarkdown','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','get','mode','\x20must\x20be\x20a\x20finite\x20number.','^[A-Za-z_][A-Za-z0-9_]*$','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','CONTINUE','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','https://lovrabet.com/schema/rabetbase-flow-config.json','.role','appCode','transferCandidates','Duplicate\x20value:\x20','^[1-9][0-9]*$','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','#/$defs/position','push','.async.retryCount','length','async\x20must\x20be\x20an\x20object.','sourceNodeId','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','INDEPENDENT_FLOW','END','target','562588anHPpv',',\x20but\x20node\x20','call','.assignee.strategy','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','ANY','flowJson.startPageId','flowJson.nodes','https://json-schema.org/draft/2020-12/schema','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20fact.','type','sequential','edge\x20target\x20is\x20required.','Notification\x20action.text\x20is\x20required.','catch','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','waypoints','startPageId','SCRIPT','scriptResult','datasetCode\x20must\x20be\x20a\x20string.','Notification\x20action\x20must\x20be\x20an\x20object.','summary','form','\x20is\x20required.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','pid','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','edge\x20name\x20must\x20be\x20a\x20string.','NOTIFICATION','ALL','.timeout','Notification\x20recipient.value\x20is\x20required.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','event','.conditionType','Unsupported\x20condition\x20type:\x20','replace','3563416lwWsQN','EXPRESSION\x20edge\x20requires\x20expression.','MAX_SAFE_INTEGER','edges','some','version','HANDLE','flowJson\x20must\x20be\x20an\x20object.','result','toUpperCase','userIds','REJECTED','approval_sys_pageId','number','Duplicate\x20BPMN\x20element\x20id:\x20','pageIds','Reserved\x20resultVariable:\x20','FAIL','assignee','flowJson.startPath','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','.\x20This\x20CLI\x20supports\x20only\x20','message','flowJson.nodes[','isInteger','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','set','.assignee.roleId','Notification\x20configCode\x20is\x20required.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','__rabetbase_local_validation__','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','NaN','retryInterval','defaultFlow','position','formPermission','actions','findIndex','conditionType','.version','flowName','#/$defs/timeAmount','.position.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','isArray','startsWith','4141235HHIzTU','Duplicate\x20edge\x20route:\x20','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','name','approval_sys_datasetCode','.timeout.duration','Node\x20has\x20no\x20incoming\x20edge.','roleId','Duplicate\x20node\x20id:\x20','APPROVAL','recipientUserIds','DAYS','config','112905nKImNF','MINUTES','AUTO_REJECT','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','513879eIrHMV','stringify','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','].path','.waypoints[','facts','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','isFinite','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','\x20was\x20empty\x20and\x20was\x20removed.','warnings','waypoint.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','position.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','failurePolicy','Unsupported\x20flowType:\x20','legacy_field_removed','flowCode','prototype','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','enabled','Notification\x20version\x20must\x20be\x20a\x20string.','CONDITION','.actions','.tmp','approvalMode','bindDatasetCode','approval_sys_dataId','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','source','templateName','startPath','configCode','AUTO_APPROVE','flowJson.schemaVersion','formPermissions','isSafeInteger','.type','.async.retryInterval','.url','flowJson','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.resultVariable','hasOwnProperty','nodes\x20must\x20be\x20an\x20array.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','APPROVAL\x20node\x20requires\x20assignee.','HOURS','.assignee.userIds','targetNodeId','EMAIL','Notification\x20template.','Node\x20cannot\x20reach\x20any\x20END.','value','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','flowJson.edges','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','schemaVersion','BCC','NOTIFICATION\x20node\x20requires\x20config.','async','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','pageMode','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','url','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','flowType','approval_sys_operationType','string','EXPRESSION','ROLE','flowJson.pageMode'];a299_0x3e72=function(){return _0x505a8b;};return a299_0x3e72();}function setsEqual(_0x1e3e5f,_0x2dd129){const _0x133071=a299_0x2ba7aa;return _0x1e3e5f[_0x133071(0x1b9)]===_0x2dd129[_0x133071(0x1b9)]&&[..._0x1e3e5f]['every'](_0x357af2=>_0x2dd129[_0x133071(0x1aa)](_0x357af2));}function isValidUserId(_0x3a709a){const _0x9da6de=a299_0x2ba7aa;if(typeof _0x3a709a===_0x9da6de(0x16f))return _0x3a709a[_0x9da6de(0x1f9)]()[_0x9da6de(0x227)]>0x0;return Number[_0x9da6de(0x14f)](_0x3a709a)&&Number(_0x3a709a)>0x0;}function resolveEdgeEndpoint(_0x5845d0,_0x455748){const _0x202496=a299_0x2ba7aa;if(typeof _0x5845d0===_0x202496(0x16f)&&_0x5845d0[_0x202496(0x1f9)]())return _0x5845d0[_0x202496(0x1f9)]();if(typeof _0x455748===_0x202496(0x16f)&&_0x455748['trim']())return _0x455748[_0x202496(0x1f9)]();return undefined;}function removeEmptyMetadata(_0x12e1d5,_0x3d4155,_0x262e1a,_0x1204a0){const _0x50c7fa=a299_0x2ba7aa;if(Array['isArray'](_0x12e1d5)){_0x12e1d5[_0x50c7fa(0x1f1)]((_0x5db218,_0x43330b)=>removeEmptyMetadata(_0x5db218,_0x3d4155+'['+_0x43330b+']',_0x262e1a,_0x1204a0));return;}if(!isRecord(_0x12e1d5))return;for(const [_0x149d21,_0x210966]of Object['entries'](_0x12e1d5)){const _0x54b7b0=_0x3d4155+'.'+_0x149d21;if(_0x149d21===_0x50c7fa(0x1b3)&&isEmptyJsonValue(_0x210966)){delete _0x12e1d5[_0x149d21],_0x1204a0[_0x50c7fa(0x225)](_0x54b7b0),_0x262e1a[_0x50c7fa(0x225)]({'code':_0x50c7fa(0x1a0),'path':_0x54b7b0,'message':_0x54b7b0+_0x50c7fa(0x132)});continue;}removeEmptyMetadata(_0x210966,_0x54b7b0,_0x262e1a,_0x1204a0);}}function isEmptyJsonValue(_0x3be9d7){const _0x1753c2=a299_0x2ba7aa;if(_0x3be9d7===null||_0x3be9d7===undefined)return!![];if(typeof _0x3be9d7==='string')return _0x3be9d7[_0x1753c2(0x1f9)]()==='';if(Array[_0x1753c2(0x116)](_0x3be9d7))return _0x3be9d7[_0x1753c2(0x227)]===0x0;return isRecord(_0x3be9d7)&&Object[_0x1753c2(0x1d2)](_0x3be9d7)[_0x1753c2(0x227)]===0x0;}function isRecord(_0x72f334){const _0x384535=a299_0x2ba7aa;return typeof _0x72f334===_0x384535(0x1f5)&&_0x72f334!==null&&!Array['isArray'](_0x72f334);}function cloneJsonValue(_0x2beea9){const _0x27d276=a299_0x2ba7aa;return JSON[_0x27d276(0x1b4)](JSON['stringify'](_0x2beea9));}export async function readFlowConfigFile(_0x19e0b1){const _0x3f4667=a299_0x2ba7aa,_0xec7e1a=await readFile(resolve(_0x19e0b1),_0x3f4667(0x181));return JSON[_0x3f4667(0x1b4)](_0xec7e1a);}
@@ -1 +1 @@
1
- (function(_0x20778f,_0x11a3d5){const _0x27aad1=a300_0xf2fb,_0x2b7085=_0x20778f();while(!![]){try{const _0x469019=parseInt(_0x27aad1(0x9a))/0x1+-parseInt(_0x27aad1(0x99))/0x2+-parseInt(_0x27aad1(0xb0))/0x3+parseInt(_0x27aad1(0x9e))/0x4*(parseInt(_0x27aad1(0xa6))/0x5)+-parseInt(_0x27aad1(0xa8))/0x6+parseInt(_0x27aad1(0x92))/0x7*(parseInt(_0x27aad1(0xaa))/0x8)+parseInt(_0x27aad1(0xac))/0x9*(-parseInt(_0x27aad1(0xc1))/0xa);if(_0x469019===_0x11a3d5)break;else _0x2b7085['push'](_0x2b7085['shift']());}catch(_0x5479bb){_0x2b7085['push'](_0x2b7085['shift']());}}}(a300_0x41b5,0x4609c));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';function a300_0xf2fb(_0x4dbd8f,_0x47cd1f){_0x4dbd8f=_0x4dbd8f-0x8d;const _0x41b530=a300_0x41b5();let _0xf2fb50=_0x41b530[_0x4dbd8f];return _0xf2fb50;}import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x4ea569,_0x19c9ed,_0x24eb42){return new CliError(_0x4ea569,0x1,_0x19c9ed,_0x24eb42);}export function loadInstantApiPolicyLocalConfig(_0x189f89,_0x3b1490){assertSafeAppCode(_0x189f89);const _0x4022a2=resolve(_0x3b1490??findProjectRootDirectory()),_0x18488e=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x189f89+'/'+INSTANT_API_POLICY_FILE_NAME,_0x469038=resolve(_0x4022a2,INSTANT_API_POLICY_RELATIVE_ROOT,_0x189f89),_0x4aa06c=resolve(_0x469038,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x4022a2,'appCode':_0x189f89,'policyRoot':_0x469038,'policyFilePath':_0x4aa06c,'policyRelativePath':_0x18488e};}export function createDefaultInstantApiPolicyConfig(_0x879448,_0x236028='allow'){return assertSafeAppCode(_0x879448),{'version':'2','appCode':_0x879448,'defaults':{'instantApi':_0x236028},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x5e5b55){const _0x277152=a300_0xf2fb;let _0x33084f;try{_0x33084f=await stat(_0x5e5b55['policyFilePath']);}catch(_0x537fb7){throw instantApiPolicyError(_0x277152(0x98),_0x277152(0xba)+_0x5e5b55[_0x277152(0xbc)],_0x277152(0xbb));}if(!_0x33084f[_0x277152(0xa5)]())throw instantApiPolicyError(_0x277152(0xb9),_0x277152(0xb7)+_0x5e5b55[_0x277152(0xbc)]);if(_0x33084f[_0x277152(0xb4)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x277152(0xc5),_0x277152(0x95));let _0xdab240;try{_0xdab240=await readFile(_0x5e5b55[_0x277152(0xbc)]);}catch{throw instantApiPolicyError(_0x277152(0xa3),_0x277152(0xc0)+_0x5e5b55[_0x277152(0xbc)]);}if(_0xdab240[_0x277152(0xae)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x277152(0xc5),_0x277152(0x95));let _0x3aa5d4;try{_0x3aa5d4=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x277152(0xad)](_0xdab240);}catch{throw instantApiPolicyError(_0x277152(0xb9),_0x277152(0xc2)+_0x5e5b55['policyFilePath']);}let _0x196994;try{_0x196994=JSON[_0x277152(0xa7)](_0x3aa5d4);}catch{throw instantApiPolicyError(_0x277152(0x8d),_0x277152(0x9b)+_0x5e5b55['policyFilePath']);}return assertLocalPolicyContract(_0x196994,_0x5e5b55['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x3eed68,_0x5e4c76,_0x4b5483={}){const _0x25e89f=a300_0xf2fb,_0x439ce2=assertLocalPolicyContract(_0x5e4c76,_0x3eed68['appCode']),_0xa78192=JSON[_0x25e89f(0xa9)](_0x439ce2,null,0x2)+'\x0a';if(Buffer[_0x25e89f(0xae)](_0xa78192,_0x25e89f(0x9f))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x25e89f(0xc5),_0x25e89f(0x95));await mkdir(_0x3eed68[_0x25e89f(0x96)],{'recursive':!![]});let _0x155ce;try{_0x155ce=await readFile(_0x3eed68[_0x25e89f(0xbc)],'utf8');}catch(_0x1ffa2c){if(!isMissingFile(_0x1ffa2c))throw instantApiPolicyError(_0x25e89f(0xa3),_0x25e89f(0x9d)+_0x3eed68[_0x25e89f(0xbc)]);}if(_0x155ce===_0xa78192)return{'action':_0x25e89f(0xb3),'filePath':_0x3eed68['policyFilePath']};if(_0x155ce!==undefined&&!_0x4b5483['force'])throw instantApiPolicyError('instant_api_policy_file_exists',_0x25e89f(0xa4)+_0x3eed68[_0x25e89f(0xbc)],_0x25e89f(0x97));if(_0x155ce===undefined)try{return await writeFile(_0x3eed68[_0x25e89f(0xbc)],_0xa78192,{'encoding':_0x25e89f(0x9f),'flag':'wx'}),{'action':'created','filePath':_0x3eed68[_0x25e89f(0xbc)]};}catch(_0x14157b){if(!isAlreadyExists(_0x14157b))throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x3eed68[_0x25e89f(0xbc)]);if(!_0x4b5483[_0x25e89f(0xab)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x25e89f(0xb8)+_0x3eed68[_0x25e89f(0xbc)],'Review\x20the\x20file\x20before\x20retrying.');}const _0x3aaf73=resolve(dirname(_0x3eed68[_0x25e89f(0xbc)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x3aaf73,_0xa78192,{'encoding':_0x25e89f(0x9f),'flag':'wx'}),await rename(_0x3aaf73,_0x3eed68[_0x25e89f(0xbc)]);}catch{await unlink(_0x3aaf73)[_0x25e89f(0xbf)](()=>undefined);throw instantApiPolicyError(_0x25e89f(0xb2),_0x25e89f(0xb1)+_0x3eed68[_0x25e89f(0xbc)]);}return{'action':_0x25e89f(0xa1),'filePath':_0x3eed68[_0x25e89f(0xbc)]};}function assertSafeAppCode(_0x166e56){const _0x104a29=a300_0xf2fb,_0x25ecd1=_0x166e56['trim']();if(!_0x25ecd1||_0x25ecd1!==_0x166e56||_0x25ecd1[_0x104a29(0xa0)]>0x64||_0x25ecd1==='.'||_0x25ecd1==='..'||_0x25ecd1['includes']('/')||_0x25ecd1['includes']('\x5c')||_0x25ecd1[_0x104a29(0xb6)]('\x00'))throw instantApiPolicyError(_0x104a29(0xc8),_0x104a29(0xc4));}function assertLocalPolicyContract(_0x5c2621,_0x2ce2fe){const _0x19a029=a300_0xf2fb;if(!isObject(_0x5c2621))throw instantApiPolicyError('instant_api_policy_json_invalid',_0x19a029(0xbe));if(_0x5c2621['version']!=='1'&&_0x5c2621[_0x19a029(0xc3)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x19a029(0x8f),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x5c2621[_0x19a029(0x93)]!==_0x2ce2fe)throw instantApiPolicyError('instant_api_policy_app_code_mismatch',_0x19a029(0xc6)+_0x2ce2fe+'.');if(!isObject(_0x5c2621[_0x19a029(0xa2)])||typeof _0x5c2621[_0x19a029(0xa2)]['instantApi']!=='string')throw instantApiPolicyError(_0x19a029(0xaf),_0x19a029(0xb5));if(_0x5c2621['rules']!==undefined&&_0x5c2621[_0x19a029(0x9c)]!==null&&!Array[_0x19a029(0xbd)](_0x5c2621[_0x19a029(0x9c)]))throw instantApiPolicyError(_0x19a029(0x90),_0x19a029(0x91));return _0x5c2621;}function a300_0x41b5(){const _0x1e9fb4=['isArray','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','catch','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','130ccpNtF','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_file_too_large','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','code','instant_api_policy_app_code_invalid','instant_api_policy_json_invalid','ENOENT','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_rules_invalid','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','399alhIyK','appCode','object','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','policyRoot','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instant_api_policy_file_missing','453054UEvTyR','483642Svtgft','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','rules','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','716180jCgEML','utf8','length','overwritten','defaults','instant_api_policy_file_unreadable','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','isFile','10fNtGQz','parse','299274MWTEkE','stringify','61688IzHWhd','force','364491volIsm','decode','byteLength','instant_api_policy_defaults_invalid','574470GLoGvk','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_unwritable','unchanged','size','Policy\x20defaults.instantApi\x20is\x20required.','includes','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','policyFilePath'];a300_0x41b5=function(){return _0x1e9fb4;};return a300_0x41b5();}function isObject(_0x56925b){const _0x2367df=a300_0xf2fb;return _0x56925b!==null&&typeof _0x56925b==='object'&&!Array[_0x2367df(0xbd)](_0x56925b);}function isMissingFile(_0x525c3d){const _0x47e490=a300_0xf2fb;return Boolean(_0x525c3d&&typeof _0x525c3d===_0x47e490(0x94)&&_0x525c3d['code']===_0x47e490(0x8e));}function isAlreadyExists(_0x37f79c){const _0x27bc59=a300_0xf2fb;return Boolean(_0x37f79c&&typeof _0x37f79c===_0x27bc59(0x94)&&_0x37f79c[_0x27bc59(0xc7)]==='EEXIST');}
1
+ const a300_0x2efa8b=a300_0x1380;(function(_0x34a899,_0x2c1357){const _0x40acd2=a300_0x1380,_0x68612f=_0x34a899();while(!![]){try{const _0x3c3ac4=parseInt(_0x40acd2(0xa4))/0x1+-parseInt(_0x40acd2(0xa8))/0x2*(parseInt(_0x40acd2(0x78))/0x3)+-parseInt(_0x40acd2(0xa1))/0x4+parseInt(_0x40acd2(0x7a))/0x5+-parseInt(_0x40acd2(0x7f))/0x6*(-parseInt(_0x40acd2(0x8b))/0x7)+parseInt(_0x40acd2(0x95))/0x8*(parseInt(_0x40acd2(0x90))/0x9)+-parseInt(_0x40acd2(0x8d))/0xa*(-parseInt(_0x40acd2(0x7e))/0xb);if(_0x3c3ac4===_0x2c1357)break;else _0x68612f['push'](_0x68612f['shift']());}catch(_0x2975b1){_0x68612f['push'](_0x68612f['shift']());}}}(a300_0x49d2,0x69725));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x2efa8b(0x8f);export const INSTANT_API_POLICY_FILE_NAME=a300_0x2efa8b(0x87);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3d2b40,_0x54343a,_0x5f3855){return new CliError(_0x3d2b40,0x1,_0x54343a,_0x5f3855);}export function loadInstantApiPolicyLocalConfig(_0x4fd59,_0x3f49b3){assertSafeAppCode(_0x4fd59);const _0x34fc20=resolve(_0x3f49b3??findProjectRootDirectory()),_0x3a57e3=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x4fd59+'/'+INSTANT_API_POLICY_FILE_NAME,_0x4bd3c6=resolve(_0x34fc20,INSTANT_API_POLICY_RELATIVE_ROOT,_0x4fd59),_0x2163c2=resolve(_0x4bd3c6,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x34fc20,'appCode':_0x4fd59,'policyRoot':_0x4bd3c6,'policyFilePath':_0x2163c2,'policyRelativePath':_0x3a57e3};}export function createDefaultInstantApiPolicyConfig(_0x210f27,_0x8a0122=a300_0x2efa8b(0x8a)){return assertSafeAppCode(_0x210f27),{'version':'2','appCode':_0x210f27,'defaults':{'instantApi':_0x8a0122},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x408652){const _0x408d7f=a300_0x2efa8b;let _0x4abadf;try{_0x4abadf=await stat(_0x408652['policyFilePath']);}catch(_0x79279){throw instantApiPolicyError(_0x408d7f(0x73),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x408652[_0x408d7f(0x6d)],_0x408d7f(0x97));}if(!_0x4abadf[_0x408d7f(0x6c)]())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x408d7f(0x75)+_0x408652[_0x408d7f(0x6d)]);if(_0x4abadf[_0x408d7f(0x91)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x408d7f(0xa5),_0x408d7f(0x7c));let _0x2acfc0;try{_0x2acfc0=await readFile(_0x408652[_0x408d7f(0x6d)]);}catch{throw instantApiPolicyError(_0x408d7f(0x72),_0x408d7f(0x9b)+_0x408652[_0x408d7f(0x6d)]);}if(_0x2acfc0[_0x408d7f(0x71)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x408d7f(0xa5),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x3522e2;try{_0x3522e2=new TextDecoder(_0x408d7f(0x98),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x2acfc0);}catch{throw instantApiPolicyError(_0x408d7f(0x68),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x408652[_0x408d7f(0x6d)]);}let _0x52e88a;try{_0x52e88a=JSON['parse'](_0x3522e2);}catch{throw instantApiPolicyError(_0x408d7f(0x84),_0x408d7f(0x82)+_0x408652[_0x408d7f(0x6d)]);}return assertLocalPolicyContract(_0x52e88a,_0x408652[_0x408d7f(0x93)]);}export async function writeInstantApiPolicyConfigFile(_0x1d9977,_0x17ecc8,_0x436b6={}){const _0x56c13d=a300_0x2efa8b,_0x2c7268=assertLocalPolicyContract(_0x17ecc8,_0x1d9977['appCode']),_0x281aff=JSON[_0x56c13d(0x99)](_0x2c7268,null,0x2)+'\x0a';if(Buffer[_0x56c13d(0x71)](_0x281aff,_0x56c13d(0x9d))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x56c13d(0x7c));await mkdir(_0x1d9977[_0x56c13d(0xa3)],{'recursive':!![]});let _0x26edfc;try{_0x26edfc=await readFile(_0x1d9977[_0x56c13d(0x6d)],_0x56c13d(0x9d));}catch(_0x4e74c9){if(!isMissingFile(_0x4e74c9))throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x56c13d(0x83)+_0x1d9977[_0x56c13d(0x6d)]);}if(_0x26edfc===_0x281aff)return{'action':_0x56c13d(0x80),'filePath':_0x1d9977[_0x56c13d(0x6d)]};if(_0x26edfc!==undefined&&!_0x436b6[_0x56c13d(0xa7)])throw instantApiPolicyError(_0x56c13d(0x8e),_0x56c13d(0x6e)+_0x1d9977[_0x56c13d(0x6d)],_0x56c13d(0x85));if(_0x26edfc===undefined)try{return await writeFile(_0x1d9977['policyFilePath'],_0x281aff,{'encoding':_0x56c13d(0x9d),'flag':'wx'}),{'action':_0x56c13d(0x70),'filePath':_0x1d9977[_0x56c13d(0x6d)]};}catch(_0x93584e){if(!isAlreadyExists(_0x93584e))throw instantApiPolicyError(_0x56c13d(0x89),_0x56c13d(0x77)+_0x1d9977[_0x56c13d(0x6d)]);if(!_0x436b6['force'])throw instantApiPolicyError(_0x56c13d(0x8e),_0x56c13d(0xa6)+_0x1d9977['policyFilePath'],'Review\x20the\x20file\x20before\x20retrying.');}const _0x65473c=resolve(dirname(_0x1d9977[_0x56c13d(0x6d)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x56c13d(0x81)]+'.'+randomUUID()+_0x56c13d(0x9a));try{await writeFile(_0x65473c,_0x281aff,{'encoding':_0x56c13d(0x9d),'flag':'wx'}),await rename(_0x65473c,_0x1d9977[_0x56c13d(0x6d)]);}catch{await unlink(_0x65473c)['catch'](()=>undefined);throw instantApiPolicyError(_0x56c13d(0x89),_0x56c13d(0x6a)+_0x1d9977[_0x56c13d(0x6d)]);}return{'action':_0x56c13d(0x74),'filePath':_0x1d9977[_0x56c13d(0x6d)]};}function a300_0x49d2(){const _0x47b720=['Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_json_invalid','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','rules','policy.json','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_file_unwritable','allow','12271mphbfM','instant_api_policy_rules_invalid','4490lPegxQ','instant_api_policy_file_exists','.rabetbase/instant-api-policy','3406041AMhgTf','size','ENOENT','appCode','Policy\x20defaults.instantApi\x20is\x20required.','8IQLbxa','code','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','utf-8','stringify','.tmp','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','version','utf8','object','includes','string','771504HFtWSo','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','policyRoot','7731CDKkhX','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','force','859682axsvxc','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_file_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','trim','isFile','policyFilePath','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','created','byteLength','instant_api_policy_file_unreadable','instant_api_policy_file_missing','overwritten','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','length','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','6CAhaDm','instant_api_policy_app_code_invalid','2012260mxrGVy','defaults','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_version_invalid','15587CJMqAM','204Vsyozz','unchanged','pid'];a300_0x49d2=function(){return _0x47b720;};return a300_0x49d2();}function assertSafeAppCode(_0xc938a0){const _0x55405e=a300_0x2efa8b,_0x4c5897=_0xc938a0[_0x55405e(0x6b)]();if(!_0x4c5897||_0x4c5897!==_0xc938a0||_0x4c5897[_0x55405e(0x76)]>0x64||_0x4c5897==='.'||_0x4c5897==='..'||_0x4c5897['includes']('/')||_0x4c5897['includes']('\x5c')||_0x4c5897[_0x55405e(0x9f)]('\x00'))throw instantApiPolicyError(_0x55405e(0x79),_0x55405e(0x69));}function assertLocalPolicyContract(_0x1849a0,_0x434b41){const _0x43861d=a300_0x2efa8b;if(!isObject(_0x1849a0))throw instantApiPolicyError(_0x43861d(0x84),_0x43861d(0x6f));if(_0x1849a0[_0x43861d(0x9c)]!=='1'&&_0x1849a0[_0x43861d(0x9c)]!=='2')throw instantApiPolicyError(_0x43861d(0x7d),_0x43861d(0x88),_0x43861d(0xa9));if(_0x1849a0[_0x43861d(0x93)]!==_0x434b41)throw instantApiPolicyError('instant_api_policy_app_code_mismatch',_0x43861d(0xa2)+_0x434b41+'.');if(!isObject(_0x1849a0['defaults'])||typeof _0x1849a0[_0x43861d(0x7b)]['instantApi']!==_0x43861d(0xa0))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x43861d(0x94));if(_0x1849a0[_0x43861d(0x86)]!==undefined&&_0x1849a0[_0x43861d(0x86)]!==null&&!Array['isArray'](_0x1849a0[_0x43861d(0x86)]))throw instantApiPolicyError(_0x43861d(0x8c),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x1849a0;}function isObject(_0x2d8d99){const _0x1902f0=a300_0x2efa8b;return _0x2d8d99!==null&&typeof _0x2d8d99===_0x1902f0(0x9e)&&!Array['isArray'](_0x2d8d99);}function a300_0x1380(_0xa4a40e,_0x2db33b){_0xa4a40e=_0xa4a40e-0x68;const _0x49d2af=a300_0x49d2();let _0x1380f5=_0x49d2af[_0xa4a40e];return _0x1380f5;}function isMissingFile(_0x4d24c7){const _0x218b78=a300_0x2efa8b;return Boolean(_0x4d24c7&&typeof _0x4d24c7===_0x218b78(0x9e)&&_0x4d24c7['code']===_0x218b78(0x92));}function isAlreadyExists(_0x103589){const _0x221b03=a300_0x2efa8b;return Boolean(_0x103589&&typeof _0x103589==='object'&&_0x103589[_0x221b03(0x96)]==='EEXIST');}
@@ -1 +1 @@
1
- function a301_0x2102(){const _0x3c0974=['1iAIcpZ','/smartapi/instant-api-policy','120372zzlTOU','1327028JtIVtG','/revision','4173132quJlqJ','/rollback','13839632MlLCHB','2770715CBpbve','2430620xaYswS','1215109hSiGti','/current','/publish'];a301_0x2102=function(){return _0x3c0974;};return a301_0x2102();}const a301_0x4e50be=a301_0x5383;function a301_0x5383(_0xa46ab,_0x4c5679){_0xa46ab=_0xa46ab-0x1b5;const _0x2102b3=a301_0x2102();let _0x53830c=_0x2102b3[_0xa46ab];return _0x53830c;}(function(_0x3eb028,_0x47feb1){const _0x5d4dc5=a301_0x5383,_0x1489a5=_0x3eb028();while(!![]){try{const _0x1e2029=parseInt(_0x5d4dc5(0x1bd))/0x1*(parseInt(_0x5d4dc5(0x1c0))/0x2)+-parseInt(_0x5d4dc5(0x1bf))/0x3+parseInt(_0x5d4dc5(0x1b9))/0x4+parseInt(_0x5d4dc5(0x1b8))/0x5+parseInt(_0x5d4dc5(0x1b5))/0x6+-parseInt(_0x5d4dc5(0x1ba))/0x7+-parseInt(_0x5d4dc5(0x1b7))/0x8;if(_0x1e2029===_0x47feb1)break;else _0x1489a5['push'](_0x1489a5['shift']());}catch(_0x5c526c){_0x1489a5['push'](_0x1489a5['shift']());}}}(a301_0x2102,0x8ce91));const base=a301_0x4e50be(0x1be);export const INSTANT_API_POLICY_PATHS=Object['freeze']({'current':base+a301_0x4e50be(0x1bb),'validate':base+'/validate','publish':base+a301_0x4e50be(0x1bc),'revisions':base+'/revisions','revision':base+a301_0x4e50be(0x1c1),'rollback':base+a301_0x4e50be(0x1b6)});
1
+ const a301_0x287f8c=a301_0x5b73;(function(_0x58c9c0,_0xf1da49){const _0x38153e=a301_0x5b73,_0x12a567=_0x58c9c0();while(!![]){try{const _0x28c003=-parseInt(_0x38153e(0x117))/0x1+-parseInt(_0x38153e(0x119))/0x2*(parseInt(_0x38153e(0x11e))/0x3)+-parseInt(_0x38153e(0x11b))/0x4*(-parseInt(_0x38153e(0x11c))/0x5)+-parseInt(_0x38153e(0x11a))/0x6+-parseInt(_0x38153e(0x113))/0x7+parseInt(_0x38153e(0x118))/0x8*(parseInt(_0x38153e(0x116))/0x9)+parseInt(_0x38153e(0x11f))/0xa;if(_0x28c003===_0xf1da49)break;else _0x12a567['push'](_0x12a567['shift']());}catch(_0x17134b){_0x12a567['push'](_0x12a567['shift']());}}}(a301_0x29e9,0x5357c));function a301_0x5b73(_0x3518e4,_0x63c0e){_0x3518e4=_0x3518e4-0x113;const _0x29e9a2=a301_0x29e9();let _0x5b73b6=_0x29e9a2[_0x3518e4];return _0x5b73b6;}const base='/smartapi/instant-api-policy';function a301_0x29e9(){const _0x2b64a6=['freeze','/revisions','1314SzTwkX','540105fDMlfe','13544wiHPvV','1018154VImsam','1268772sPIfIF','48qSqBQE','275815CFvPMN','/revision','3RXebKb','7595050xVCmyI','466361GGbSQZ'];a301_0x29e9=function(){return _0x2b64a6;};return a301_0x29e9();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x287f8c(0x114)]({'current':base+'/current','validate':base+'/validate','publish':base+'/publish','revisions':base+a301_0x287f8c(0x115),'revision':base+a301_0x287f8c(0x11d),'rollback':base+'/rollback'});
@@ -1 +1 @@
1
- function a302_0x3205(){const _0x4b36c7=['authRequired','aborted','status','validation','transportFailure','cancelled','test','message','5009984vUvmBp','1496280WaBcGl','defineProperty','Knowledge\x20management\x20request\x20cancelled.','301087wARnka','auth','signal','data','writeUncertain','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','code','network','3mXESGg','API\x20error\x20code:\x20','trim','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','2583936OrOCah','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','getStore','run','origin','449722AWlbJJ','252946EPIDLF','api_error','pageTooLarge','54iowmUK','remoteErrorCode','9724113TjzbqP','kind','cookie','httpStatus','cli:rabetbase'];a302_0x3205=function(){return _0x4b36c7;};return a302_0x3205();}const a302_0x495f03=a302_0x3ae3;(function(_0x1346cf,_0x4c0065){const _0x236c41=a302_0x3ae3,_0x2bd2e2=_0x1346cf();while(!![]){try{const _0xa59c8b=-parseInt(_0x236c41(0x1e2))/0x1+parseInt(_0x236c41(0x1f4))/0x2+-parseInt(_0x236c41(0x1ea))/0x3*(-parseInt(_0x236c41(0x1ee))/0x4)+parseInt(_0x236c41(0x1df))/0x5+parseInt(_0x236c41(0x1f7))/0x6*(-parseInt(_0x236c41(0x1f3))/0x7)+-parseInt(_0x236c41(0x1de))/0x8+parseInt(_0x236c41(0x1f9))/0x9;if(_0xa59c8b===_0x4c0065)break;else _0x2bd2e2['push'](_0x2bd2e2['shift']());}catch(_0x2afd2d){_0x2bd2e2['push'](_0x2bd2e2['shift']());}}}(a302_0x3205,0x9dddd));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_0x3ae3(_0x2c046a,_0x5a28d3){_0x2c046a=_0x2c046a-0x1d2;const _0x320542=a302_0x3205();let _0x3ae322=_0x320542[_0x2c046a];return _0x3ae322;}import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x495f03(0x1ef),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x495f03(0x1da)];[a302_0x495f03(0x1f8)];[a302_0x495f03(0x1d4)];['pageTooLarge'];constructor(_0x3ca6d2,_0x5d0f22=![],_0x33d88e,_0x261192,_0x40bc51=![]){const _0x4ad075=a302_0x495f03;super(_0x4ad075(0x1f5),0x1,_0x3ca6d2,_0x33d88e?_0x4ad075(0x1eb)+_0x33d88e:undefined),this[_0x4ad075(0x1da)]=_0x5d0f22,this[_0x4ad075(0x1f8)]=_0x33d88e,this[_0x4ad075(0x1d4)]=_0x261192,this['pageTooLarge']=_0x40bc51;if(_0x33d88e)Object[_0x4ad075(0x1e0)](this,_0x4ad075(0x1e5),{'value':{'remoteErrorCode':_0x33d88e},'enumerable':![]});}}function resolveOrigin(){const _0x221ca1=a302_0x495f03,_0x28a094=getKbServiceDomain();if(!_0x28a094)throw CliErrors['validation'](_0x221ca1(0x1e7));try{return normalizeKbServiceOrigin(_0x28a094);}catch{throw CliErrors[_0x221ca1(0x1d9)](_0x221ca1(0x1ed));}}export function withKbManagementSession(_0xea3576,_0x54443b){const _0x502e33=a302_0x495f03;return session[_0x502e33(0x1f1)]({'origin':resolveOrigin(),'signal':_0xea3576},_0x54443b);}export async function withKbManagementClient(_0xdebcb5,_0x31d767,_0x33c822={}){const _0x2275ee=a302_0x495f03,_0x3b0eae=session['getStore']()?.[_0x2275ee(0x1f2)]??resolveOrigin();if(!_0xdebcb5[_0x2275ee(0x1ec)]())throw CliErrors[_0x2275ee(0x1d6)]();const _0x1a2666=_0x33c822[_0x2275ee(0x1e4)]??session[_0x2275ee(0x1f0)]()?.['signal'];if(_0x1a2666?.[_0x2275ee(0x1d7)])throw CliErrors[_0x2275ee(0x1db)](_0x2275ee(0x1e1));try{const _0x449976=createKnowledgeClient({'kbServiceDomain':_0x3b0eae,'authMode':_0x2275ee(0x1d3),'cookie':_0xdebcb5,'invokeSource':_0x2275ee(0x1d5)});return await _0x31d767(_0x449976,{'signal':_0x1a2666});}catch(_0x1d1303){if(!(_0x1d1303 instanceof KnowledgeServiceError))throw _0x1d1303;if(_0x1d1303[_0x2275ee(0x1d2)]===_0x2275ee(0x1e3))throw CliErrors[_0x2275ee(0x1d6)]();if(_0x1d1303[_0x2275ee(0x1d2)]==='validation')throw CliErrors[_0x2275ee(0x1d9)](_0x1d1303[_0x2275ee(0x1dd)]);const _0x31d0c5=_0x1d1303[_0x2275ee(0x1d2)]===_0x2275ee(0x1e9)||_0x1d1303['kind']==='timeout'||_0x1d1303[_0x2275ee(0x1d2)]===_0x2275ee(0x1db);throw new KbManagementError(_0x1d1303[_0x2275ee(0x1dd)]+(_0x1d1303[_0x2275ee(0x1e6)]?WRITE_RECONCILIATION:''),_0x31d0c5,/^\d+$/[_0x2275ee(0x1dc)](_0x1d1303[_0x2275ee(0x1e8)]??'')?_0x1d1303[_0x2275ee(0x1e8)]:undefined,_0x1d1303[_0x2275ee(0x1d8)],_0x1d1303[_0x2275ee(0x1f6)]);}}
1
+ function a302_0x5f39(){const _0x3f534c=['getStore','signal','aborted','network','940qisZjn','auth','11838uDRnrp','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','5918aqQrLF','15lRSWZn','182pdSKvZ','Knowledge\x20management\x20request\x20cancelled.','transportFailure','242096qsHQZy','211216qaxjli','validation','API\x20error\x20code:\x20','2723508TMgPCY','pageTooLarge','code','httpStatus','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','run','560BTrWHG','cancelled','trim','remoteErrorCode','18rVrQyU','authRequired','defineProperty','17028qOoRxW','cli:rabetbase','message','1101aUvuYB','kind','writeUncertain'];a302_0x5f39=function(){return _0x3f534c;};return a302_0x5f39();}const a302_0x15997e=a302_0x14c0;(function(_0x244849,_0x4dc841){const _0x275247=a302_0x14c0,_0x530cf6=_0x244849();while(!![]){try{const _0x54f345=-parseInt(_0x275247(0x144))/0x1+-parseInt(_0x275247(0x14e))/0x2*(-parseInt(_0x275247(0x147))/0x3)+-parseInt(_0x275247(0x158))/0x4*(parseInt(_0x275247(0x153))/0x5)+parseInt(_0x275247(0x150))/0x6*(-parseInt(_0x275247(0x154))/0x7)+-parseInt(_0x275247(0x157))/0x8*(parseInt(_0x275247(0x165))/0x9)+-parseInt(_0x275247(0x161))/0xa*(-parseInt(_0x275247(0x152))/0xb)+parseInt(_0x275247(0x15b))/0xc;if(_0x54f345===_0x4dc841)break;else _0x530cf6['push'](_0x530cf6['shift']());}catch(_0x11fd9c){_0x530cf6['push'](_0x530cf6['shift']());}}}(a302_0x5f39,0x22beb));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';function a302_0x14c0(_0x3973e9,_0x5f508a){_0x3973e9=_0x3973e9-0x144;const _0x5f3972=a302_0x5f39();let _0x14c01a=_0x5f3972[_0x3973e9];return _0x14c01a;}import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x15997e(0x15f),session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];[a302_0x15997e(0x164)];[a302_0x15997e(0x15e)];['pageTooLarge'];constructor(_0x44fa0b,_0x4c37b8=![],_0x2e1bd7,_0x5be0ba,_0x30ea5d=![]){const _0x5cb462=a302_0x15997e;super('api_error',0x1,_0x44fa0b,_0x2e1bd7?_0x5cb462(0x15a)+_0x2e1bd7:undefined),this[_0x5cb462(0x156)]=_0x4c37b8,this[_0x5cb462(0x164)]=_0x2e1bd7,this[_0x5cb462(0x15e)]=_0x5be0ba,this[_0x5cb462(0x15c)]=_0x30ea5d;if(_0x2e1bd7)Object[_0x5cb462(0x167)](this,'data',{'value':{'remoteErrorCode':_0x2e1bd7},'enumerable':![]});}}function resolveOrigin(){const _0x159cb5=a302_0x15997e,_0x302118=getKbServiceDomain();if(!_0x302118)throw CliErrors[_0x159cb5(0x159)](_0x159cb5(0x151));try{return normalizeKbServiceOrigin(_0x302118);}catch{throw CliErrors[_0x159cb5(0x159)]('Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export function withKbManagementSession(_0x2c2070,_0x7118a8){const _0xfc5705=a302_0x15997e;return session[_0xfc5705(0x160)]({'origin':resolveOrigin(),'signal':_0x2c2070},_0x7118a8);}export async function withKbManagementClient(_0x3d3958,_0x2442bf,_0x30a0b4={}){const _0x4cfcd3=a302_0x15997e,_0x1d1bff=session[_0x4cfcd3(0x14a)]()?.['origin']??resolveOrigin();if(!_0x3d3958[_0x4cfcd3(0x163)]())throw CliErrors[_0x4cfcd3(0x166)]();const _0x324000=_0x30a0b4[_0x4cfcd3(0x14b)]??session['getStore']()?.[_0x4cfcd3(0x14b)];if(_0x324000?.[_0x4cfcd3(0x14c)])throw CliErrors[_0x4cfcd3(0x162)](_0x4cfcd3(0x155));try{const _0x42f287=createKnowledgeClient({'kbServiceDomain':_0x1d1bff,'authMode':'cookie','cookie':_0x3d3958,'invokeSource':_0x4cfcd3(0x145)});return await _0x2442bf(_0x42f287,{'signal':_0x324000});}catch(_0xd0c9a8){if(!(_0xd0c9a8 instanceof KnowledgeServiceError))throw _0xd0c9a8;if(_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x14f))throw CliErrors['authRequired']();if(_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x159))throw CliErrors[_0x4cfcd3(0x159)](_0xd0c9a8[_0x4cfcd3(0x146)]);const _0xbe1c5e=_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x14d)||_0xd0c9a8[_0x4cfcd3(0x148)]==='timeout'||_0xd0c9a8[_0x4cfcd3(0x148)]==='cancelled';throw new KbManagementError(_0xd0c9a8[_0x4cfcd3(0x146)]+(_0xd0c9a8[_0x4cfcd3(0x149)]?WRITE_RECONCILIATION:''),_0xbe1c5e,/^\d+$/['test'](_0xd0c9a8[_0x4cfcd3(0x15d)]??'')?_0xd0c9a8['code']:undefined,_0xd0c9a8['status'],_0xd0c9a8[_0x4cfcd3(0x15c)]);}}
@@ -1 +1 @@
1
- (function(_0x3b723b,_0x337258){const _0x139664=a303_0x128e,_0x3e6420=_0x3b723b();while(!![]){try{const _0x280b59=-parseInt(_0x139664(0x127))/0x1*(-parseInt(_0x139664(0x119))/0x2)+parseInt(_0x139664(0x128))/0x3+parseInt(_0x139664(0x126))/0x4+parseInt(_0x139664(0x10d))/0x5+parseInt(_0x139664(0x121))/0x6*(parseInt(_0x139664(0x10b))/0x7)+parseInt(_0x139664(0x135))/0x8*(-parseInt(_0x139664(0x130))/0x9)+-parseInt(_0x139664(0x124))/0xa;if(_0x280b59===_0x337258)break;else _0x3e6420['push'](_0x3e6420['shift']());}catch(_0xfedd3b){_0x3e6420['push'](_0x3e6420['shift']());}}}(a303_0x5323,0x5b011));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x22a061){try{return normalizeKnowledgeServiceOrigin(_0x22a061);}catch{throw CliErrors['validation']('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x464acd){const _0x3b2929=a303_0x128e,_0x2211ed=_0x464acd[_0x3b2929(0x120)][_0x3b2929(0x137)](),_0x3ef579=_0x464acd['query'][_0x3b2929(0x137)]();if(!_0x2211ed)throw CliErrors[_0x3b2929(0x12d)](_0x3b2929(0x117));if(!_0x3ef579)throw CliErrors[_0x3b2929(0x12d)](_0x3b2929(0x118));if(!_0x464acd[_0x3b2929(0x136)][_0x3b2929(0x137)]())throw CliErrors[_0x3b2929(0x11a)]();const _0x4f8c32=normalizeKbServiceOrigin(_0x464acd[_0x3b2929(0x11d)]);try{const _0x11344e=createKnowledgeClient({'kbServiceDomain':_0x4f8c32,'authMode':'cookie','cookie':_0x464acd[_0x3b2929(0x136)],'invokeSource':_0x3b2929(0x113)}),_0x5d539b=await _0x11344e[_0x3b2929(0x10c)]({'appCode':_0x2211ed,'query':_0x3ef579,'scopes':[_0x3b2929(0x111),_0x3b2929(0x114)],..._0x464acd[_0x3b2929(0x12a)]!==undefined?{'topK':_0x464acd[_0x3b2929(0x12a)]}:{}},{'signal':_0x464acd[_0x3b2929(0x115)]});return{..._0x5d539b,'hits':_0x5d539b['hits'],'schemaVersion':0x2,'profile':_0x3b2929(0x123),'total':_0x5d539b['hits'][_0x3b2929(0x11e)]};}catch(_0x453887){if(!(_0x453887 instanceof KnowledgeServiceError))throw _0x453887;if(_0x453887[_0x3b2929(0x11b)]===_0x3b2929(0x131))throw CliErrors['authRequired']();if(_0x453887[_0x3b2929(0x11b)]===_0x3b2929(0x12d))throw CliErrors[_0x3b2929(0x12d)](_0x453887['message']);if(_0x453887[_0x3b2929(0x11b)]===_0x3b2929(0x132))throw new DOMException(_0x3b2929(0x10f),_0x3b2929(0x133));if(_0x453887[_0x3b2929(0x11b)]==='network'||_0x453887['kind']===_0x3b2929(0x134))throw CliErrors[_0x3b2929(0x11f)](_0x453887[_0x3b2929(0x11b)]===_0x3b2929(0x134)?_0x3b2929(0x12c):'KB\x20Service\x20knowledge\x20search\x20request\x20failed.');const _0x48088c=_0x453887['kind']===_0x3b2929(0x129)&&_0x453887[_0x3b2929(0x116)][_0x3b2929(0x110)](_0x3b2929(0x112))?_0x3b2929(0x122):_0x453887[_0x3b2929(0x116)],_0xa68942=CliErrors['apiError'](_0x453887[_0x3b2929(0x138)]!==undefined&&_0x453887[_0x3b2929(0x138)]!==0xc8&&!_0x48088c[_0x3b2929(0x110)](_0x3b2929(0x12b)+_0x453887[_0x3b2929(0x138)])?_0x48088c+_0x3b2929(0x10e)+_0x453887['status']+')':_0x48088c);if(/^\d+$/[_0x3b2929(0x12e)](_0x453887[_0x3b2929(0x125)]??''))Object[_0x3b2929(0x12f)](_0xa68942,_0x3b2929(0x11c),{'value':{'remoteErrorCode':_0x453887[_0x3b2929(0x125)]},'enumerable':![]});throw _0xa68942;}}function a303_0x128e(_0x4f521d,_0xc755c6){_0x4f521d=_0x4f521d-0x10b;const _0x53235e=a303_0x5323();let _0x128ee6=_0x53235e[_0x4f521d];return _0x128ee6;}function a303_0x5323(){const _0x308c3c=['networkError','appCode','256548isTzWZ','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','development','10553960NbNhoG','code','2525940CEdEIe','48827uMjmad','280299rsdIjk','contract','topK','HTTP\x20','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','validation','test','defineProperty','351423MninjO','auth','cancelled','AbortError','timeout','120JqfsGk','cookie','trim','status','105XCFjKr','search','2993695gYbIgR','\x20(HTTP\x20','Knowledge\x20search\x20cancelled.','includes','public','out-of-scope','cli:rabetbase','company','signal','message','Knowledge\x20search\x20appCode\x20is\x20required.','Knowledge\x20search\x20query\x20is\x20required.','2CqXNKG','authRequired','kind','data','serviceUrl','length'];a303_0x5323=function(){return _0x308c3c;};return a303_0x5323();}
1
+ (function(_0x53300a,_0x23ea79){const _0x277bd9=a303_0x2f94,_0x24619a=_0x53300a();while(!![]){try{const _0xdb67bf=parseInt(_0x277bd9(0x8b))/0x1*(parseInt(_0x277bd9(0x93))/0x2)+parseInt(_0x277bd9(0x88))/0x3*(-parseInt(_0x277bd9(0x9e))/0x4)+parseInt(_0x277bd9(0x85))/0x5*(-parseInt(_0x277bd9(0xad))/0x6)+-parseInt(_0x277bd9(0x9c))/0x7+parseInt(_0x277bd9(0x98))/0x8*(-parseInt(_0x277bd9(0x99))/0x9)+-parseInt(_0x277bd9(0x90))/0xa+parseInt(_0x277bd9(0x8d))/0xb;if(_0xdb67bf===_0x23ea79)break;else _0x24619a['push'](_0x24619a['shift']());}catch(_0x23fcc7){_0x24619a['push'](_0x24619a['shift']());}}}(a303_0xd55e,0x88f00));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x47fe9a){try{return normalizeKnowledgeServiceOrigin(_0x47fe9a);}catch{throw CliErrors['validation']('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x830d73){const _0x19accf=a303_0x2f94,_0x37e68c=_0x830d73['appCode'][_0x19accf(0x8c)](),_0x1947ee=_0x830d73[_0x19accf(0x87)]['trim']();if(!_0x37e68c)throw CliErrors[_0x19accf(0x96)](_0x19accf(0x94));if(!_0x1947ee)throw CliErrors[_0x19accf(0x96)](_0x19accf(0x95));if(!_0x830d73[_0x19accf(0x9d)][_0x19accf(0x8c)]())throw CliErrors[_0x19accf(0xae)]();const _0x4ef55e=normalizeKbServiceOrigin(_0x830d73[_0x19accf(0xa8)]);try{const _0x26b860=createKnowledgeClient({'kbServiceDomain':_0x4ef55e,'authMode':_0x19accf(0x9d),'cookie':_0x830d73[_0x19accf(0x9d)],'invokeSource':'cli:rabetbase'}),_0x405fec=await _0x26b860[_0x19accf(0x91)]({'appCode':_0x37e68c,'query':_0x1947ee,'scopes':[_0x19accf(0xa2),_0x19accf(0x89)],..._0x830d73['topK']!==undefined?{'topK':_0x830d73[_0x19accf(0xb0)]}:{}},{'signal':_0x830d73[_0x19accf(0xa0)]});return{..._0x405fec,'hits':_0x405fec[_0x19accf(0x92)],'schemaVersion':0x2,'profile':_0x19accf(0xaa),'total':_0x405fec[_0x19accf(0x92)][_0x19accf(0x84)]};}catch(_0x13ff1c){if(!(_0x13ff1c instanceof KnowledgeServiceError))throw _0x13ff1c;if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0xa3))throw CliErrors[_0x19accf(0xae)]();if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x96))throw CliErrors[_0x19accf(0x96)](_0x13ff1c[_0x19accf(0xa9)]);if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x97))throw new DOMException(_0x19accf(0x8a),'AbortError');if(_0x13ff1c['kind']==='network'||_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x86))throw CliErrors['networkError'](_0x13ff1c['kind']==='timeout'?_0x19accf(0xb1):_0x19accf(0x9a));const _0x286614=_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0xa4)&&_0x13ff1c[_0x19accf(0xa9)]['includes'](_0x19accf(0xa5))?_0x19accf(0xac):_0x13ff1c['message'],_0x2b16a8=CliErrors[_0x19accf(0x8f)](_0x13ff1c['status']!==undefined&&_0x13ff1c['status']!==0xc8&&!_0x286614['includes'](_0x19accf(0x9f)+_0x13ff1c[_0x19accf(0xa6)])?_0x286614+_0x19accf(0x8e)+_0x13ff1c[_0x19accf(0xa6)]+')':_0x286614);if(/^\d+$/[_0x19accf(0xab)](_0x13ff1c[_0x19accf(0x9b)]??''))Object[_0x19accf(0xa7)](_0x2b16a8,_0x19accf(0xa1),{'value':{'remoteErrorCode':_0x13ff1c['code']},'enumerable':![]});throw _0x2b16a8;}}function a303_0x2f94(_0x2d4f24,_0x539f65){_0x2d4f24=_0x2d4f24-0x84;const _0xd55ebe=a303_0xd55e();let _0x2f9413=_0xd55ebe[_0x2d4f24];return _0x2f9413;}function a303_0xd55e(){const _0x4def9b=['KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','length','2610eEsanE','timeout','query','36uhDhGX','company','Knowledge\x20search\x20cancelled.','859KDYbul','trim','30172912Ebvtlb','\x20(HTTP\x20','apiError','2753560hpAULd','search','hits','2098fCkehr','Knowledge\x20search\x20appCode\x20is\x20required.','Knowledge\x20search\x20query\x20is\x20required.','validation','cancelled','7906544pixdIA','9aVLPTV','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','code','2042383cImfyK','cookie','337684pYJGgH','HTTP\x20','signal','data','public','auth','contract','out-of-scope','status','defineProperty','serviceUrl','message','development','test','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','5916ScRJmy','authRequired','kind','topK'];a303_0xd55e=function(){return _0x4def9b;};return a303_0xd55e();}