@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4

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 (358) 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/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a287_0x42ed67=a287_0x2794;(function(_0x214dc0,_0x1e6ec2){const _0x39e569=a287_0x2794,_0x42f740=_0x214dc0();while(!![]){try{const _0x14af4e=-parseInt(_0x39e569(0x198))/0x1+parseInt(_0x39e569(0x1a3))/0x2+parseInt(_0x39e569(0x14b))/0x3*(-parseInt(_0x39e569(0x10c))/0x4)+-parseInt(_0x39e569(0x1c2))/0x5+parseInt(_0x39e569(0x164))/0x6*(parseInt(_0x39e569(0x1f3))/0x7)+parseInt(_0x39e569(0x249))/0x8*(-parseInt(_0x39e569(0x182))/0x9)+parseInt(_0x39e569(0x180))/0xa*(parseInt(_0x39e569(0x1ee))/0xb);if(_0x14af4e===_0x1e6ec2)break;else _0x42f740['push'](_0x42f740['shift']());}catch(_0xf755cd){_0x42f740['push'](_0x42f740['shift']());}}}(a287_0x4293,0xb4d64));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x42ed67(0x21c),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':'Rabetbase\x20FlowConfig','type':'object','required':[a287_0x42ed67(0x1d4),'flowType',a287_0x42ed67(0x25c)],'$defs':{'userId':{'anyOf':[{'type':a287_0x42ed67(0x129),'minLength':0x1},{'type':a287_0x42ed67(0x147),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a287_0x42ed67(0x227),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x169),a287_0x42ed67(0x15e)],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a287_0x42ed67(0x138),a287_0x42ed67(0x172),a287_0x42ed67(0x115),a287_0x42ed67(0x245)]}},'additionalProperties':!![]},'flowNode':{'type':a287_0x42ed67(0x241),'required':['id',a287_0x42ed67(0x14f),a287_0x42ed67(0x1e5),a287_0x42ed67(0x11d)],'properties':{'id':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)},'type':{'enum':[a287_0x42ed67(0x243),'END','APPROVAL',a287_0x42ed67(0x1b2),a287_0x42ed67(0x12e),a287_0x42ed67(0x256)]},'name':{'type':a287_0x42ed67(0x129),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a287_0x42ed67(0x236),a287_0x42ed67(0x1cd),'ANY']},'taskMode':{'enum':[a287_0x42ed67(0x196),a287_0x42ed67(0x23a)]},'assignee':{'type':'object','required':[a287_0x42ed67(0x12f)],'properties':{'strategy':{'enum':[a287_0x42ed67(0x18c),a287_0x42ed67(0x1d1)]},'userIds':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':a287_0x42ed67(0x174)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a287_0x42ed67(0x1a7)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a287_0x42ed67(0x12f),a287_0x42ed67(0x116)],'properties':{'strategy':{'const':a287_0x42ed67(0x18c)},'userIds':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a287_0x42ed67(0x1db)},'result':{'enum':[a287_0x42ed67(0x1e0),a287_0x42ed67(0x144)]},'scriptName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'resultVariable':{'type':a287_0x42ed67(0x129),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a287_0x42ed67(0x241),'properties':{'enabled':{'type':a287_0x42ed67(0x1db)},'retryCount':{'type':a287_0x42ed67(0x147),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a287_0x42ed67(0x1db)},'duration':{'$ref':a287_0x42ed67(0x1d6)},'action':{'enum':['AUTO_APPROVE',a287_0x42ed67(0x17c),a287_0x42ed67(0x12d)]},'interrupting':{'type':a287_0x42ed67(0x1db)},'scriptName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'resultVariable':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)}},'additionalProperties':!![]},'cc':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x1c5)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'visible':{'type':a287_0x42ed67(0x1ba),'uniqueItems':!![],'items':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x255),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x42ed67(0x129),'minLength':0x1},'failurePolicy':{'enum':[a287_0x42ed67(0x231),a287_0x42ed67(0x244)]},'template':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x163),a287_0x42ed67(0x207)],'properties':{'title':{'type':a287_0x42ed67(0x129),'minLength':0x1},'summary':{'type':a287_0x42ed67(0x129),'minLength':0x1},'detailMarkdown':{'type':a287_0x42ed67(0x129)},'facts':{'type':a287_0x42ed67(0x1ba),'maxItems':0x8,'items':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x15b),'value'],'properties':{'label':{'type':a287_0x42ed67(0x129),'minLength':0x1},'value':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x42ed67(0x1ba),'maxItems':0x2,'items':{'type':a287_0x42ed67(0x241),'required':['text',a287_0x42ed67(0x185)],'properties':{'text':{'type':a287_0x42ed67(0x129),'minLength':0x1},'url':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x42ed67(0x1ba),'items':{'type':a287_0x42ed67(0x241),'required':['type',a287_0x42ed67(0x169)],'properties':{'type':{'enum':['USER',a287_0x42ed67(0x1d1),'EMAIL']},'value':{'type':a287_0x42ed67(0x129),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x42ed67(0x241),'properties':{'id':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)},'source':{'type':'string','minLength':0x1},'target':{'type':a287_0x42ed67(0x129),'minLength':0x1},'sourceNodeId':{'type':a287_0x42ed67(0x129),'minLength':0x1},'targetNodeId':{'type':a287_0x42ed67(0x129),'minLength':0x1},'conditionType':{'enum':['ALWAYS','APPROVED','REJECTED',a287_0x42ed67(0x1de)]},'expression':{'type':a287_0x42ed67(0x129)},'defaultFlow':{'type':a287_0x42ed67(0x1db)},'name':{'type':a287_0x42ed67(0x129)},'waypoints':{'type':a287_0x42ed67(0x1ba),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a287_0x42ed67(0x125)]},{'required':[a287_0x42ed67(0x10f)]}]},{'anyOf':[{'required':[a287_0x42ed67(0x197)]},{'required':[a287_0x42ed67(0x259)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a287_0x42ed67(0x135),a287_0x42ed67(0x1bd)]},'datasetCode':{'type':a287_0x42ed67(0x129),'minLength':0x1},'pageId':{'type':a287_0x42ed67(0x147)},'templateName':![],'flowJson':{'type':a287_0x42ed67(0x241),'required':['nodes',a287_0x42ed67(0x14c)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a287_0x42ed67(0x129),'const':'approval.simple-flow.v1','description':a287_0x42ed67(0x23d)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':a287_0x42ed67(0x156)}},'edges':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x42ed67(0x141),a287_0x42ed67(0x260),'flowName',a287_0x42ed67(0x218),a287_0x42ed67(0x1f0),a287_0x42ed67(0xff),'pageId',a287_0x42ed67(0x1e8)],REMOVED_ROOT_FIELDS=['id',a287_0x42ed67(0xff),a287_0x42ed67(0x1e8)],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x42ed67(0x132),NODE_TYPES=new Set([a287_0x42ed67(0x243),a287_0x42ed67(0x232),a287_0x42ed67(0x196),'CONDITION',a287_0x42ed67(0x12e),a287_0x42ed67(0x256)]),CONDITION_TYPES=new Set([a287_0x42ed67(0x12b),a287_0x42ed67(0x1e0),a287_0x42ed67(0x144),a287_0x42ed67(0x1de)]),APPROVAL_MODES=new Set(['SINGLE',a287_0x42ed67(0x1cd),'ANY']),APPROVAL_TASK_MODES=new Set([a287_0x42ed67(0x196),'HANDLE']),FLOW_TIME_UNITS=new Set([a287_0x42ed67(0x138),'MINUTES',a287_0x42ed67(0x115),a287_0x42ed67(0x245)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a287_0x42ed67(0x120),'AUTO_REJECT',a287_0x42ed67(0x12d)]),FLOW_TYPES=new Set(['FORM_FLOW','INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a287_0x42ed67(0x24b),a287_0x42ed67(0x151)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x42ed67(0x231),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x42ed67(0x119),a287_0x42ed67(0x1d1),a287_0x42ed67(0x22a)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x42ed67(0x1d5)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x42ed67(0x18e),UNSUPPORTED_FORM_MESSAGE=a287_0x42ed67(0x15c),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x42ed67(0x22b),RESERVED_RESULT_VARIABLES=new Set([a287_0x42ed67(0x114),'approved',a287_0x42ed67(0x1a2),a287_0x42ed67(0x1b5),a287_0x42ed67(0x1eb),'approval_sys_initiatorUsername',a287_0x42ed67(0x155),a287_0x42ed67(0x13c),a287_0x42ed67(0x252),a287_0x42ed67(0x203)]);export function normalizeFlowConfig(_0x3dfaa4){const _0x4dcf27=a287_0x42ed67;if(!isRecord(_0x3dfaa4))throw new TypeError(_0x4dcf27(0x128));const _0x2c2302=cloneJsonValue(_0x3dfaa4),_0x37f439=_0x2c2302[_0x4dcf27(0x25c)],_0x372f56=isRecord(_0x37f439)?cloneJsonValue(_0x37f439):{},_0x4e5447=[],_0x3b6b96=[];for(const _0xa7de4b of REMOVED_ROOT_FIELDS){if(!Object[_0x4dcf27(0x192)][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x2c2302,_0xa7de4b))continue;delete _0x2c2302[_0xa7de4b],_0x3b6b96['push'](_0xa7de4b),_0x4e5447['push']({'code':_0x4dcf27(0x170),'path':_0xa7de4b,'message':_0xa7de4b+_0x4dcf27(0x230)});}for(const _0x33e384 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x4dcf27(0x192)]['hasOwnProperty'][_0x4dcf27(0x189)](_0x372f56,_0x33e384))continue;const _0x354c31=_0x4dcf27(0x1b6)+_0x33e384;delete _0x372f56[_0x33e384],_0x3b6b96[_0x4dcf27(0x1fb)](_0x354c31),_0x4e5447['push']({'code':'legacy_field_removed','path':_0x354c31,'message':_0x354c31+_0x4dcf27(0x230)});}if(Object['prototype'][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x372f56,_0x4dcf27(0x1ec))){const _0x1b6f63=_0x372f56[_0x4dcf27(0x1ec)],_0x476247=typeof _0x1b6f63==='string'?_0x1b6f63['trim']():_0x1b6f63;if(isEmptyJsonValue(_0x1b6f63)||_0x476247===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4df545='flowJson.schemaVersion';delete _0x372f56['schemaVersion'],_0x3b6b96[_0x4dcf27(0x1fb)](_0x4df545),_0x4e5447[_0x4dcf27(0x1fb)]({'code':'legacy_field_removed','path':_0x4df545,'message':_0x4df545+_0x4dcf27(0x211)+DEFAULT_FLOW_SCHEMA_VERSION+_0x4dcf27(0x167)});}}removeEmptyMetadata(_0x372f56,_0x4dcf27(0x25c),_0x4e5447,_0x3b6b96);_0x2c2302['flowType']===_0x4dcf27(0x1bd)&&!Object[_0x4dcf27(0x192)][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x372f56,_0x4dcf27(0x254))&&(_0x372f56[_0x4dcf27(0x254)]=_0x4dcf27(0x24b));_0x2c2302['flowJson']=_0x372f56;if(typeof _0x2c2302['flowName']===_0x4dcf27(0x129))_0x2c2302[_0x4dcf27(0x1d4)]=_0x2c2302['flowName'][_0x4dcf27(0x1dd)]();return{'config':_0x2c2302,'warnings':_0x4e5447,'removedPaths':_0x3b6b96};}export function validateFlowConfig(_0x2a1aad){const _0x13514b=a287_0x42ed67;let _0x3197a1;try{_0x3197a1=normalizeFlowConfig(_0x2a1aad);}catch(_0x17ddb8){const _0x278e05=_0x17ddb8 instanceof Error?_0x17ddb8[_0x13514b(0x205)]:String(_0x17ddb8),_0x1d2207={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x278e05}],'warnings':[],'normalized':_0x1d2207,'validationConfig':_0x1d2207};}const _0x13a588=_0x3197a1[_0x13514b(0x242)],_0x2ca4f6=cloneJsonValue(_0x13a588),_0x3931ba=_0x2ca4f6['flowJson'];_0x3931ba[_0x13514b(0x141)]='__rabetbase_local_validation__',_0x3931ba[_0x13514b(0x1d4)]=_0x13a588[_0x13514b(0x1d4)];typeof _0x13a588[_0x13514b(0x1f0)]===_0x13514b(0x129)&&_0x13a588[_0x13514b(0x1f0)][_0x13514b(0x1dd)]()&&(_0x3931ba[_0x13514b(0x218)]=_0x13a588['datasetCode']['trim']());const _0x1006cc=[];return validateOuterMetadata(_0x13a588,_0x1006cc),validateFlowClassification(_0x13a588,_0x1006cc),validateGraph(_0x13a588[_0x13514b(0x25c)],_0x1006cc),{'valid':_0x1006cc['length']===0x0,'errors':_0x1006cc,'warnings':_0x3197a1[_0x13514b(0x1da)],'normalized':_0x13a588,'validationConfig':_0x2ca4f6};}function validateFlowClassification(_0x2b97fb,_0x230871){const _0x58f48d=a287_0x42ed67;if(!isRecord(_0x2b97fb[_0x58f48d(0x25c)]))return;const _0xd56326=_0x2b97fb[_0x58f48d(0x210)],_0x2c6e39=_0x2b97fb['flowJson'][_0x58f48d(0x254)];_0x2c6e39!==undefined&&(typeof _0x2c6e39!=='string'||!FLOW_PAGE_MODES[_0x58f48d(0x18b)](_0x2c6e39))&&_0x230871['push']({'path':'flowJson.pageMode','message':_0x58f48d(0x21e)+String(_0x2c6e39)+'.'});_0xd56326===_0x58f48d(0x135)&&_0x2c6e39!==undefined&&_0x230871[_0x58f48d(0x1fb)]({'path':'flowJson.pageMode','message':_0x58f48d(0x17d)});_0xd56326==='INDEPENDENT_FLOW'&&_0x2c6e39===_0x58f48d(0x151)&&_0x230871['push']({'path':_0x58f48d(0x224),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xd56326===_0x58f48d(0x135)||_0xd56326===_0x58f48d(0x1bd))&&validateCustomPageNavigation(_0x2b97fb,_0xd56326,_0x2c6e39,_0x230871);if(_0xd56326!==_0x58f48d(0x135)||!Array[_0x58f48d(0x186)](_0x2b97fb['flowJson'][_0x58f48d(0x1c1)]))return;_0x2b97fb[_0x58f48d(0x25c)][_0x58f48d(0x1c1)][_0x58f48d(0x204)]((_0x3ac150,_0x54571d)=>{const _0x342ee3=_0x58f48d;isRecord(_0x3ac150)&&_0x3ac150['type']==='APPROVAL'&&_0x3ac150[_0x342ee3(0x166)]===_0x342ee3(0x23a)&&_0x230871[_0x342ee3(0x1fb)]({'path':'flowJson.nodes['+_0x54571d+'].taskMode','message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x7c65e7,_0x17ac96,_0x31f76d,_0x2debfe){const _0x370543=a287_0x42ed67,_0x3bf695=_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1dc)];_0x3bf695!==undefined&&_0x2debfe['push']({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x51ff2c=_0x7c65e7[_0x370543(0x25c)][_0x370543(0x20c)];_0x51ff2c!==undefined&&(typeof _0x51ff2c!==_0x370543(0x129)||_0x51ff2c[_0x370543(0x1dd)]()==='')&&_0x2debfe['push']({'path':'flowJson.startPath','message':_0x370543(0x25f)});const _0xef691=Array[_0x370543(0x186)](_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1c1)])?_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1c1)][_0x370543(0x19d)]((_0x1ab21e,_0x4f7c07)=>({'node':_0x1ab21e,'index':_0x4f7c07}))['filter'](({node:_0x468312})=>isRecord(_0x468312)&&_0x468312[_0x370543(0x1ce)]!==undefined):[],_0x213d7d=_0x51ff2c!==undefined||_0xef691[_0x370543(0x16c)]>0x0,_0x4032eb=_0x31f76d===undefined&&_0x17ac96===_0x370543(0x1bd)?_0x370543(0x24b):_0x31f76d;_0x213d7d&&(_0x17ac96!==_0x370543(0x1bd)||_0x4032eb!==_0x370543(0x24b))&&(_0x51ff2c!==undefined&&_0x2debfe['push']({'path':_0x370543(0x17a),'message':_0x370543(0x110)}),_0xef691[_0x370543(0x204)](({index:_0x388530})=>{const _0x30bedc=_0x370543;_0x2debfe[_0x30bedc(0x1fb)]({'path':_0x30bedc(0x18d)+_0x388530+_0x30bedc(0x19b),'message':_0x30bedc(0x1a9)});}));}export async function writeNormalizedFlowConfig(_0x3b3488,_0x360de4,_0x57f3f1={}){const _0x6ec0eb=a287_0x42ed67,_0x5cb599=resolve(_0x3b3488),_0x8a94cc=_0x5cb599+'.'+process[_0x6ec0eb(0x1fe)]+'.'+randomUUID()+_0x6ec0eb(0xfd),_0x446343=JSON[_0x6ec0eb(0x157)](_0x360de4,null,0x2)+'\x0a';let _0x4eead0;try{try{_0x4eead0=(await stat(_0x5cb599))['mode']&0x1ff;}catch{_0x4eead0=undefined;}await writeFile(_0x8a94cc,_0x446343,{'encoding':_0x6ec0eb(0x102),'flag':'wx','mode':_0x4eead0??0x1a4});if(_0x4eead0!==undefined)await chmod(_0x8a94cc,_0x4eead0);_0x57f3f1[_0x6ec0eb(0xfe)]===![]?(await link(_0x8a94cc,_0x5cb599),await unlink(_0x8a94cc)):await rename(_0x8a94cc,_0x5cb599);}finally{await unlink(_0x8a94cc)[_0x6ec0eb(0x1c4)](()=>undefined);}}function validateOuterMetadata(_0x4a4682,_0x264c8c){const _0xb6c7f2=a287_0x42ed67;(typeof _0x4a4682[_0xb6c7f2(0x1d4)]!==_0xb6c7f2(0x129)||_0x4a4682[_0xb6c7f2(0x1d4)][_0xb6c7f2(0x1dd)]()==='')&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1d4),'message':_0xb6c7f2(0x190)});_0x4a4682['flowDesc']!==undefined&&typeof _0x4a4682[_0xb6c7f2(0x24a)]!==_0xb6c7f2(0x129)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x24a),'message':_0xb6c7f2(0x1ca)});if(_0x4a4682[_0xb6c7f2(0x210)]===undefined||_0x4a4682['flowType']===null)_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x210),'message':_0xb6c7f2(0x24f)});else(typeof _0x4a4682['flowType']!==_0xb6c7f2(0x129)||!FLOW_TYPES[_0xb6c7f2(0x18b)](_0x4a4682[_0xb6c7f2(0x210)]))&&_0x264c8c['push']({'path':_0xb6c7f2(0x210),'message':_0xb6c7f2(0x216)+String(_0x4a4682[_0xb6c7f2(0x210)])+'.'});_0x4a4682[_0xb6c7f2(0x1f0)]!==undefined&&typeof _0x4a4682[_0xb6c7f2(0x1f0)]!==_0xb6c7f2(0x129)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1f0),'message':_0xb6c7f2(0x1c8)}),_0x4a4682['pageId']!==undefined&&(!Number[_0xb6c7f2(0x176)](_0x4a4682[_0xb6c7f2(0x19c)])||_0x4a4682['pageId']<0x0)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x19c),'message':_0xb6c7f2(0x25a)}),_0x4a4682[_0xb6c7f2(0x210)]===_0xb6c7f2(0x1bd)&&_0x4a4682[_0xb6c7f2(0x1f0)]!==undefined&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1f0),'message':_0xb6c7f2(0x159)}),_0x4a4682['flowType']===_0xb6c7f2(0x1bd)&&_0x4a4682[_0xb6c7f2(0x19c)]!==undefined&&_0x264c8c['push']({'path':_0xb6c7f2(0x19c),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x5c3e03,_0x4ffc07){const _0x34d978=a287_0x42ed67;if(!isRecord(_0x5c3e03)){_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x25c),'message':_0x34d978(0xfc)});return;}!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x1c1)])&&_0x4ffc07['push']({'path':'flowJson.nodes','message':_0x34d978(0x1f8)});!Array['isArray'](_0x5c3e03[_0x34d978(0x14c)])&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x193),'message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x34d978(0x192)][_0x34d978(0x127)]['call'](_0x5c3e03,_0x34d978(0x1ec))&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x109),'message':_0x34d978(0x134)+String(_0x5c3e03[_0x34d978(0x1ec)])+_0x34d978(0x11b)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0xb114da of[_0x34d978(0xfb),_0x34d978(0x20e),_0x34d978(0x148)]){Object[_0x34d978(0x192)][_0x34d978(0x127)]['call'](_0x5c3e03,_0xb114da)&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x1b6)+_0xb114da,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x1c1)])||!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x14c)]))return;const _0x1e0943=new Map(),_0x3ee53b=[],_0x7b660=[],_0x4ddd20=new Map(),_0x51961b=new Map(),_0x55683d=new Set();let _0x4710ef=0x0;_0x5c3e03['nodes'][_0x34d978(0x204)]((_0x7cbad5,_0x2e2a80)=>{const _0x53df62=_0x34d978,_0x21bb99=_0x53df62(0x18d)+_0x2e2a80+']';if(!isRecord(_0x7cbad5)){_0x4ffc07['push']({'path':_0x21bb99,'message':_0x53df62(0x13a)});return;}const _0x472528=_0x7cbad5;if(typeof _0x472528['id']!==_0x53df62(0x129)||!BPMN_ID_PATTERN['test'](_0x472528['id']))_0x4ffc07['push']({'path':_0x21bb99+_0x53df62(0x1f7),'message':_0x53df62(0x257)});else _0x1e0943['has'](_0x472528['id'])?_0x4ffc07['push']({'path':_0x21bb99+'.id','message':_0x53df62(0x22c)+_0x472528['id']+'.'}):(_0x1e0943[_0x53df62(0x237)](_0x472528['id'],_0x472528),_0x55683d[_0x53df62(0x168)](_0x472528['id']));if(!NODE_TYPES['has'](_0x472528[_0x53df62(0x14f)]))_0x4ffc07[_0x53df62(0x1fb)]({'path':_0x21bb99+_0x53df62(0x20a),'message':_0x53df62(0x1ed)+String(_0x472528[_0x53df62(0x14f)])+'.'});else{if(_0x472528[_0x53df62(0x14f)]===_0x53df62(0x243))_0x3ee53b[_0x53df62(0x1fb)](_0x472528['id']);else _0x472528[_0x53df62(0x14f)]===_0x53df62(0x232)&&_0x7b660[_0x53df62(0x1fb)](_0x472528['id']);}_0x472528[_0x53df62(0x14f)]===_0x53df62(0x196)&&(_0x472528[_0x53df62(0x166)]===undefined||_0x472528[_0x53df62(0x166)]===_0x53df62(0x196))&&(_0x4710ef+=0x1);validateNode(_0x472528,_0x21bb99,_0x4ffc07);if(_0x472528['type']===_0x53df62(0x12e)){const _0x47dd1a=resolveEffectiveResultVariable(_0x472528[_0x53df62(0x1d8)],![]);_0x47dd1a&&(registerResultVariableOwner(_0x51961b,_0x47dd1a,_0x472528['id'],_0x4ffc07),!_0x4ddd20[_0x53df62(0x18b)](_0x47dd1a)&&_0x4ddd20[_0x53df62(0x237)](_0x47dd1a,_0x472528['id']));}if(_0x472528[_0x53df62(0x14f)]==='APPROVAL'&&isRecord(_0x472528['timeout'])&&_0x472528['timeout'][_0x53df62(0xfa)]===!![]&&_0x472528[_0x53df62(0x222)]['action']==='EXECUTE_BFF'){const _0x2d2ef1=resolveEffectiveResultVariable(_0x472528[_0x53df62(0x222)]['resultVariable'],!![]);_0x2d2ef1&&registerResultVariableOwner(_0x51961b,_0x2d2ef1,_0x472528['id']+'.timeout',_0x4ffc07);}});_0x3ee53b['length']!==0x1&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x226),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x7b660[_0x34d978(0x16c)]===0x0&&_0x4ffc07[_0x34d978(0x1fb)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x46781c=new Map(),_0x152e06=new Map(),_0x4ee49e=new Map(),_0x10add0=new Set();_0x5c3e03[_0x34d978(0x14c)]['forEach']((_0x5e2bd4,_0x2a7af8)=>{const _0x33d995=_0x34d978,_0x4b9b5f=_0x33d995(0x1be)+_0x2a7af8+']';if(!isRecord(_0x5e2bd4)){_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f,'message':_0x33d995(0x12a)});return;}const _0x44cc72=_0x5e2bd4;_0x4ee49e[_0x33d995(0x237)](_0x44cc72,_0x4b9b5f);const _0x4cf2bf=resolveEdgeEndpoint(_0x44cc72[_0x33d995(0x125)],_0x44cc72[_0x33d995(0x10f)]),_0x269ff1=resolveEdgeEndpoint(_0x44cc72[_0x33d995(0x197)],_0x44cc72[_0x33d995(0x259)]);if(!_0x4cf2bf)_0x4ffc07['push']({'path':_0x4b9b5f+_0x33d995(0x1a4),'message':_0x33d995(0x1f2)});if(!_0x269ff1)_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1c7),'message':_0x33d995(0x23c)});_0x4cf2bf&&!_0x1e0943[_0x33d995(0x18b)](_0x4cf2bf)&&_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1a4),'message':_0x33d995(0x139)+_0x4cf2bf+'.'});_0x269ff1&&!_0x1e0943[_0x33d995(0x18b)](_0x269ff1)&&_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+'.target','message':_0x33d995(0x248)+_0x269ff1+'.'});if(_0x44cc72['id']!==undefined){if(typeof _0x44cc72['id']!==_0x33d995(0x129)||!BPMN_ID_PATTERN[_0x33d995(0x240)](_0x44cc72['id']))_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1f7),'message':_0x33d995(0x1a5)});else{if(_0x55683d[_0x33d995(0x18b)](_0x44cc72['id']))_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1f7),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x44cc72['id']+'.'});else!_0x55683d['has'](_0x44cc72['id'])&&_0x55683d[_0x33d995(0x168)](_0x44cc72['id']);}}if(_0x4cf2bf&&_0x269ff1){const _0x4ec7ec=_0x4cf2bf+'\x00'+_0x269ff1+'\x00'+(_0x44cc72[_0x33d995(0x11c)]??_0x33d995(0x12b));_0x10add0[_0x33d995(0x18b)](_0x4ec7ec)?_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f,'message':'Duplicate\x20edge\x20route:\x20'+_0x4cf2bf+_0x33d995(0x118)+_0x269ff1+'\x20('+(_0x44cc72[_0x33d995(0x11c)]??_0x33d995(0x12b))+').'}):_0x10add0[_0x33d995(0x168)](_0x4ec7ec);}validateEdge(_0x44cc72,_0x4b9b5f,_0x4ffc07),_0x4cf2bf&&_0x269ff1&&(_0x46781c['get'](_0x4cf2bf)?.[_0x33d995(0x1fb)](_0x44cc72)??_0x46781c[_0x33d995(0x237)](_0x4cf2bf,[_0x44cc72]),_0x152e06[_0x33d995(0x1e3)](_0x269ff1)?.[_0x33d995(0x1fb)](_0x44cc72)??_0x152e06['set'](_0x269ff1,[_0x44cc72]));});if(_0x3ee53b[_0x34d978(0x16c)]!==0x1)return;validateGraphShape(_0x1e0943,_0x3ee53b[0x0],_0x7b660,_0x46781c,_0x152e06,_0x4ee49e,_0x4ffc07),validateScriptResultReferences(_0x1e0943,_0x3ee53b[0x0],_0x46781c,_0x152e06,_0x4ee49e,_0x4ddd20,_0x4ffc07),validateApprovalResults(_0x1e0943,_0x4710ef,_0x7b660,_0x4ffc07);}function validateNode(_0x553a0a,_0x29714d,_0x31cbea){const _0xfbc7d2=a287_0x42ed67;for(const _0x1cb648 of['form','formPermission']){Object[_0xfbc7d2(0x192)][_0xfbc7d2(0x127)]['call'](_0x553a0a,_0x1cb648)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.'+_0x1cb648,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0xfbc7d2(0x18b)](_0x553a0a[_0xfbc7d2(0x14f)]))return;(typeof _0x553a0a[_0xfbc7d2(0x1e5)]!==_0xfbc7d2(0x129)||_0x553a0a[_0xfbc7d2(0x1e5)][_0xfbc7d2(0x1dd)]()==='')&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x10b),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x553a0a['pageId']!==undefined&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x234),'message':_0xfbc7d2(0x13f)});if(_0x553a0a['path']!==undefined){if(typeof _0x553a0a['path']!==_0xfbc7d2(0x129)||_0x553a0a[_0xfbc7d2(0x1ce)][_0xfbc7d2(0x1dd)]()==='')_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x111),'message':_0xfbc7d2(0x160)});else _0x553a0a[_0xfbc7d2(0x14f)]!==_0xfbc7d2(0x196)&&_0x553a0a[_0xfbc7d2(0x14f)]!=='END'&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x111),'message':_0xfbc7d2(0x140)});}const _0x32ce6f=_0x553a0a[_0xfbc7d2(0x11d)];if(!isRecord(_0x32ce6f))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x219),'message':_0xfbc7d2(0x17b)});else for(const _0x4bf6cb of['x','y']){const _0x1d3b87=_0x32ce6f[_0x4bf6cb];(typeof _0x1d3b87!==_0xfbc7d2(0x227)||!Number['isFinite'](_0x1d3b87)||_0x1d3b87<0x0)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x208)+_0x4bf6cb,'message':_0xfbc7d2(0x24d)+_0x4bf6cb+_0xfbc7d2(0x1b9)});}if(_0x553a0a[_0xfbc7d2(0x14f)]===_0xfbc7d2(0x196)){const _0x314470=_0x553a0a['approvalMode']??_0xfbc7d2(0x236),_0x52bb32=_0x553a0a['taskMode']??_0xfbc7d2(0x196);!APPROVAL_TASK_MODES[_0xfbc7d2(0x18b)](_0x52bb32)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x1e6),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x52bb32)+'.'});!APPROVAL_MODES[_0xfbc7d2(0x18b)](_0x314470)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.approvalMode','message':_0xfbc7d2(0x220)+String(_0x314470)+'.'});if(!isRecord(_0x553a0a[_0xfbc7d2(0x107)]))_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x137),'message':_0xfbc7d2(0x1b1)});else{const _0x2a634d=_0x553a0a[_0xfbc7d2(0x107)][_0xfbc7d2(0x12f)];_0x2a634d!==_0xfbc7d2(0x18c)&&_0x2a634d!=='ROLE'&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x13d),'message':_0xfbc7d2(0x223)});if(_0x2a634d===_0xfbc7d2(0x18c)){const _0x1cbb66=_0x553a0a[_0xfbc7d2(0x107)]['userIds'];if(!Array[_0xfbc7d2(0x186)](_0x1cbb66)||_0x1cbb66[_0xfbc7d2(0x16c)]===0x0)_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x1a1),'message':_0xfbc7d2(0x14e)});else{const _0x34031b=_0x1cbb66['findIndex'](_0x1bbcd7=>!isValidUserId(_0x1bbcd7));_0x34031b>=0x0&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x1cf)+_0x34031b+']','message':_0xfbc7d2(0x1f6)});const _0x23ebf6=new Set(_0x1cbb66[_0xfbc7d2(0x17e)](isValidUserId)[_0xfbc7d2(0x19d)](_0x4c90cb=>String(_0x4c90cb)[_0xfbc7d2(0x1dd)]()));_0x314470===_0xfbc7d2(0x236)&&_0x23ebf6[_0xfbc7d2(0x21d)]>0x1&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.assignee.userIds','message':_0xfbc7d2(0x1d3)});}}if(_0x2a634d===_0xfbc7d2(0x1d1)){const _0x173674=_0x553a0a[_0xfbc7d2(0x107)][_0xfbc7d2(0x1cb)],_0x3924de=typeof _0x173674===_0xfbc7d2(0x227)||typeof _0x173674==='string'?Number(String(_0x173674)[_0xfbc7d2(0x1dd)]()):Number[_0xfbc7d2(0x20b)];(!Number[_0xfbc7d2(0x1ae)](_0x3924de)||_0x3924de<=0x0)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x22e),'message':_0xfbc7d2(0x13e)});}}if(_0x553a0a[_0xfbc7d2(0x11f)]!==undefined){if(!isRecord(_0x553a0a[_0xfbc7d2(0x11f)]))_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x152),'message':_0xfbc7d2(0x25b)});else{if(_0x553a0a[_0xfbc7d2(0x11f)][_0xfbc7d2(0x12f)]!==_0xfbc7d2(0x18c))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x24e),'message':_0xfbc7d2(0x1c0)});else{const _0x241d10=_0x553a0a[_0xfbc7d2(0x11f)][_0xfbc7d2(0x116)];if(!Array[_0xfbc7d2(0x186)](_0x241d10)||_0x241d10[_0xfbc7d2(0x16c)]===0x0)_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x195),'message':_0xfbc7d2(0x1b7)});else{const _0x20513d=_0x241d10[_0xfbc7d2(0x238)](_0x300202=>!isValidUserId(_0x300202));_0x20513d>=0x0&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x1ef)+_0x20513d+']','message':_0xfbc7d2(0x21b)});}}}}}_0x553a0a[_0xfbc7d2(0x15a)]!==undefined&&typeof _0x553a0a['sequential']!==_0xfbc7d2(0x1db)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x131),'message':_0xfbc7d2(0x175)});if(_0x553a0a[_0xfbc7d2(0x14f)]==='SCRIPT'){(typeof _0x553a0a[_0xfbc7d2(0x122)]!=='string'||_0x553a0a['scriptName'][_0xfbc7d2(0x1dd)]()==='')&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.scriptName','message':_0xfbc7d2(0x179)});if(_0x553a0a[_0xfbc7d2(0x1d8)]!==undefined){if(typeof _0x553a0a[_0xfbc7d2(0x1d8)]!=='string'||!VARIABLE_PATTERN[_0xfbc7d2(0x240)](_0x553a0a['resultVariable']))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.resultVariable','message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0xfbc7d2(0x18b)](_0x553a0a[_0xfbc7d2(0x1d8)])||_0x553a0a[_0xfbc7d2(0x1d8)][_0xfbc7d2(0x16e)](_0xfbc7d2(0x161)))&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x19a),'message':_0xfbc7d2(0x1ad)+_0x553a0a[_0xfbc7d2(0x1d8)]+'.'});}}validateAsyncExecution(_0x553a0a,_0x29714d,_0x31cbea),validateApprovalTimeout(_0x553a0a,_0x29714d,_0x31cbea),validateCcConfig(_0x553a0a,_0x29714d,_0x31cbea),_0x553a0a[_0xfbc7d2(0x14f)]===_0xfbc7d2(0x256)&&validateNotificationConfig(_0x553a0a['config'],_0x29714d+_0xfbc7d2(0x108),_0x31cbea);}function validateAsyncExecution(_0x43f368,_0x5a4f77,_0x428a26){const _0x3081d0=a287_0x42ed67;if(_0x43f368[_0x3081d0(0x10e)]===undefined)return;if(!isRecord(_0x43f368[_0x3081d0(0x10e)])){_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+'.async','message':_0x3081d0(0x19e)});return;}if(_0x43f368['async'][_0x3081d0(0xfa)]!==undefined&&typeof _0x43f368[_0x3081d0(0x10e)]['enabled']!==_0x3081d0(0x1db)){_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+_0x3081d0(0x258),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x43f368[_0x3081d0(0x10e)][_0x3081d0(0xfa)]!==!![])return;_0x43f368[_0x3081d0(0x14f)]!==_0x3081d0(0x12e)&&_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+_0x3081d0(0x173),'message':_0x3081d0(0x199)});const _0x4bf636=_0x43f368['async']['retryCount']??0x3;(!Number['isInteger'](_0x4bf636)||_0x4bf636<0x1||_0x4bf636>MAX_ASYNC_RETRY_COUNT)&&_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+'.async.retryCount','message':_0x3081d0(0x183)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x43f368['async']['retryInterval']!==undefined&&validateTimeAmount(_0x43f368[_0x3081d0(0x10e)]['retryInterval'],_0x5a4f77+_0x3081d0(0x106),_0x428a26);}function validateApprovalTimeout(_0x53683e,_0x9341f4,_0x180d00){const _0xb47829=a287_0x42ed67;if(_0x53683e['timeout']===undefined)return;if(!isRecord(_0x53683e['timeout'])){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x239),'message':'timeout\x20must\x20be\x20an\x20object.'});return;}if(_0x53683e[_0xb47829(0x222)]['enabled']!==undefined&&typeof _0x53683e['timeout'][_0xb47829(0xfa)]!=='boolean'){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x12c),'message':_0xb47829(0x209)});return;}if(_0x53683e[_0xb47829(0x222)][_0xb47829(0xfa)]!==!![])return;if(_0x53683e[_0xb47829(0x222)]['interrupting']!==undefined&&typeof _0x53683e[_0xb47829(0x222)][_0xb47829(0x22d)]!==_0xb47829(0x1db)){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+'.timeout.interrupting','message':_0xb47829(0x221)});return;}_0x53683e['type']!==_0xb47829(0x196)&&_0x180d00['push']({'path':_0x9341f4+_0xb47829(0x239),'message':_0xb47829(0x229)});validateTimeAmount(_0x53683e[_0xb47829(0x222)][_0xb47829(0x191)],_0x9341f4+_0xb47829(0x16b),_0x180d00);const _0x1e9ee8=_0x53683e[_0xb47829(0x222)][_0xb47829(0x146)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x1e9ee8)){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x1f9),'message':'timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.'});return;}(_0x53683e['taskMode']??_0xb47829(0x196))===_0xb47829(0x23a)&&_0x1e9ee8!==_0xb47829(0x12d)&&_0x180d00['push']({'path':_0x9341f4+'.timeout.action','message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x50afb8=_0x53683e[_0xb47829(0x222)]['interrupting']??_0x1e9ee8!==_0xb47829(0x12d);if(_0x1e9ee8==='EXECUTE_BFF')_0x50afb8&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+'.timeout.interrupting','message':_0xb47829(0x235)}),(typeof _0x53683e['timeout'][_0xb47829(0x122)]!==_0xb47829(0x129)||_0x53683e[_0xb47829(0x222)]['scriptName'][_0xb47829(0x1dd)]()==='')&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x11a),'message':_0xb47829(0x1d7)}),validateOptionalResultVariable(_0x53683e['timeout'][_0xb47829(0x1d8)],_0x9341f4+'.timeout.resultVariable',_0x180d00);else!_0x50afb8&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x1c9),'message':_0x1e9ee8+_0xb47829(0x18f)});}function validateTimeAmount(_0x166dd8,_0x2f4735,_0x3dfdf7){const _0x2e8c56=a287_0x42ed67;if(!isRecord(_0x166dd8)){_0x3dfdf7[_0x2e8c56(0x1fb)]({'path':_0x2f4735,'message':_0x2e8c56(0x1b3)});return;}(!Number['isInteger'](_0x166dd8[_0x2e8c56(0x169)])||Number(_0x166dd8[_0x2e8c56(0x169)])<=0x0)&&_0x3dfdf7[_0x2e8c56(0x1fb)]({'path':_0x2f4735+_0x2e8c56(0x181),'message':_0x2e8c56(0x225)}),!FLOW_TIME_UNITS[_0x2e8c56(0x18b)](_0x166dd8['unit'])&&_0x3dfdf7['push']({'path':_0x2f4735+_0x2e8c56(0x253),'message':_0x2e8c56(0x1ea)});}function validateOptionalResultVariable(_0x3b3ff2,_0x12bf7e,_0x2b40a4){const _0x5004b6=a287_0x42ed67;if(_0x3b3ff2===undefined||_0x3b3ff2===null||_0x3b3ff2==='')return;if(typeof _0x3b3ff2!=='string'||!VARIABLE_PATTERN[_0x5004b6(0x240)](_0x3b3ff2))_0x2b40a4[_0x5004b6(0x1fb)]({'path':_0x12bf7e,'message':_0x5004b6(0x19f)});else(RESERVED_RESULT_VARIABLES[_0x5004b6(0x18b)](_0x3b3ff2)||_0x3b3ff2['startsWith']('approval_sys_'))&&_0x2b40a4[_0x5004b6(0x1fb)]({'path':_0x12bf7e,'message':_0x5004b6(0x1ad)+_0x3b3ff2+'.'});}function validateCcConfig(_0x4f6999,_0x10ce86,_0x48d71c){const _0xaa5a94=a287_0x42ed67;if(_0x4f6999['cc']===undefined)return;if(!isRecord(_0x4f6999['cc'])){_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x14d),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x4f6999['type']!=='END'&&_0x4f6999['type']!=='APPROVAL'&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+'.cc','message':_0xaa5a94(0x16a)});Object['prototype'][_0xaa5a94(0x127)][_0xaa5a94(0x189)](_0x4f6999['cc'],'readSources')&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x113),'message':UNSUPPORTED_FORM_MESSAGE});const _0x59506e=_0x4f6999['cc'][_0xaa5a94(0x1c5)];if(!Array['isArray'](_0x59506e)||_0x59506e[_0xaa5a94(0x16c)]===0x0)_0x48d71c['push']({'path':_0x10ce86+_0xaa5a94(0x136),'message':_0xaa5a94(0x228)});else{_0x59506e[_0xaa5a94(0x16c)]>MAX_CC_RECIPIENTS&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x136),'message':_0xaa5a94(0x194)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x27169a=new Set();_0x59506e['forEach']((_0x433589,_0x3bb0c8)=>{const _0x1a6a32=_0xaa5a94;if(typeof _0x433589!=='string'||_0x433589[_0x1a6a32(0x1dd)]()==='')_0x48d71c['push']({'path':_0x10ce86+_0x1a6a32(0x1cc)+_0x3bb0c8+']','message':_0x1a6a32(0x16d)});else _0x27169a[_0x1a6a32(0x18b)](_0x433589[_0x1a6a32(0x1dd)]())?_0x48d71c['push']({'path':_0x10ce86+_0x1a6a32(0x1cc)+_0x3bb0c8+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x433589[_0x1a6a32(0x1dd)]()+'.'}):_0x27169a[_0x1a6a32(0x168)](_0x433589[_0x1a6a32(0x1dd)]());});}validateStringArray(_0x4f6999['cc'][_0xaa5a94(0x1a8)],_0x10ce86+_0xaa5a94(0x1d0),_0x48d71c);}function validateStringArray(_0x2d54a9,_0x416bf6,_0x4210e8){const _0x31adce=a287_0x42ed67;if(_0x2d54a9===undefined)return;if(!Array[_0x31adce(0x186)](_0x2d54a9)){_0x4210e8[_0x31adce(0x1fb)]({'path':_0x416bf6,'message':_0x31adce(0x247)});return;}const _0xc31f28=new Set();_0x2d54a9[_0x31adce(0x204)]((_0x2ddb71,_0xf3ada6)=>{const _0x1273ce=_0x31adce;if(typeof _0x2ddb71!=='string'||_0x2ddb71[_0x1273ce(0x1dd)]()==='')_0x4210e8[_0x1273ce(0x1fb)]({'path':_0x416bf6+'['+_0xf3ada6+']','message':_0x1273ce(0x21f)});else _0xc31f28[_0x1273ce(0x18b)](_0x2ddb71['trim']())?_0x4210e8['push']({'path':_0x416bf6+'['+_0xf3ada6+']','message':_0x1273ce(0x162)+_0x2ddb71[_0x1273ce(0x1dd)]()+'.'}):_0xc31f28['add'](_0x2ddb71[_0x1273ce(0x1dd)]());});}function validateNotificationConfig(_0x926648,_0x20c89a,_0xa6c5b3){const _0x1c84f2=a287_0x42ed67;if(!isRecord(_0x926648)){_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a,'message':_0x1c84f2(0x25d)});return;}if(_0x926648[_0x1c84f2(0x1a6)]!==undefined&&_0x926648[_0x1c84f2(0x1a6)]!==null){if(typeof _0x926648[_0x1c84f2(0x1a6)]!==_0x1c84f2(0x129))_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x105),'message':_0x1c84f2(0x1f4)});else _0x926648[_0x1c84f2(0x1a6)][_0x1c84f2(0x1dd)]()&&_0x926648[_0x1c84f2(0x1a6)][_0x1c84f2(0x1dd)]()!=='v1'&&_0xa6c5b3['push']({'path':_0x20c89a+_0x1c84f2(0x105),'message':_0x1c84f2(0x246)+_0x926648['version']+'.'});}const _0x2c82fc=requireNotificationString(_0x926648['configCode'],_0x20c89a+_0x1c84f2(0x23b),_0x1c84f2(0x22f),_0xa6c5b3);_0x2c82fc?.[_0x1c84f2(0x165)]('${')&&_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x23b),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x926648[_0x1c84f2(0x1bc)]!==undefined&&_0x926648[_0x1c84f2(0x1bc)]!==null){if(typeof _0x926648[_0x1c84f2(0x1bc)]!==_0x1c84f2(0x129))_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+'.failurePolicy','message':_0x1c84f2(0x21a)});else!NOTIFICATION_FAILURE_POLICIES[_0x1c84f2(0x18b)](_0x926648[_0x1c84f2(0x1bc)][_0x1c84f2(0x1dd)]()[_0x1c84f2(0x158)]())&&_0xa6c5b3['push']({'path':_0x20c89a+_0x1c84f2(0x187),'message':_0x1c84f2(0x215)});}!isRecord(_0x926648[_0x1c84f2(0x124)])?_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x130),'message':_0x1c84f2(0x133)}):validateNotificationTemplate(_0x926648['template'],_0x20c89a+_0x1c84f2(0x130),_0xa6c5b3),validateNotificationRecipients(_0x926648[_0x1c84f2(0x1ac)],_0x20c89a+_0x1c84f2(0x251),_0xa6c5b3);}function validateNotificationTemplate(_0x5db74a,_0x5c2658,_0x1498a2){const _0x49f82c=a287_0x42ed67;for(const _0x4d632a of[_0x49f82c(0x163),_0x49f82c(0x207)]){const _0x34cab5=requireNotificationString(_0x5db74a[_0x4d632a],_0x5c2658+'.'+_0x4d632a,_0x49f82c(0x117)+_0x4d632a+'\x20is\x20required.',_0x1498a2);if(_0x34cab5)validateNotificationPlaceholders(_0x34cab5,_0x5c2658+'.'+_0x4d632a,_0x1498a2);}_0x5db74a[_0x49f82c(0x1bf)]!==undefined&&_0x5db74a[_0x49f82c(0x1bf)]!==null&&(typeof _0x5db74a[_0x49f82c(0x1bf)]!=='string'?_0x1498a2[_0x49f82c(0x1fb)]({'path':_0x5c2658+_0x49f82c(0x13b),'message':_0x49f82c(0x1bb)}):validateNotificationPlaceholders(_0x5db74a[_0x49f82c(0x1bf)],_0x5c2658+'.detailMarkdown',_0x1498a2)),validateNotificationFacts(_0x5db74a[_0x49f82c(0x16f)],_0x5c2658+_0x49f82c(0x1b8),_0x1498a2),validateNotificationActions(_0x5db74a[_0x49f82c(0x1b4)],_0x5c2658+_0x49f82c(0x1b0),_0x1498a2);}function validateNotificationFacts(_0x4cd85b,_0x3ea9cd,_0x4d4084){const _0x4dd596=a287_0x42ed67;if(_0x4cd85b===undefined||_0x4cd85b===null)return;if(!Array['isArray'](_0x4cd85b)){_0x4d4084[_0x4dd596(0x1fb)]({'path':_0x3ea9cd,'message':_0x4dd596(0x1e7)});return;}_0x4cd85b[_0x4dd596(0x16c)]>MAX_NOTIFICATION_FACTS&&_0x4d4084[_0x4dd596(0x1fb)]({'path':_0x3ea9cd,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x4dd596(0x104)}),_0x4cd85b[_0x4dd596(0x204)]((_0x51b4cb,_0x1631e5)=>{const _0x3f7975=_0x4dd596,_0x8c47ac=_0x3ea9cd+'['+_0x1631e5+']';if(!isRecord(_0x51b4cb)){_0x4d4084[_0x3f7975(0x1fb)]({'path':_0x8c47ac,'message':_0x3f7975(0x217)});return;}for(const _0x17e7a8 of[_0x3f7975(0x15b),_0x3f7975(0x169)]){const _0x33cce9=requireNotificationString(_0x51b4cb[_0x17e7a8],_0x8c47ac+'.'+_0x17e7a8,_0x3f7975(0x213)+_0x17e7a8+'\x20is\x20required.',_0x4d4084);_0x33cce9&&validateNotificationPlaceholders(_0x33cce9,_0x8c47ac+'.'+_0x17e7a8,_0x4d4084);}});}function validateNotificationActions(_0x1c8751,_0x4681ce,_0x3d08de){const _0x597e73=a287_0x42ed67;if(_0x1c8751===undefined||_0x1c8751===null)return;if(!Array['isArray'](_0x1c8751)){_0x3d08de['push']({'path':_0x4681ce,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1c8751['length']>MAX_NOTIFICATION_ACTIONS&&_0x3d08de[_0x597e73(0x1fb)]({'path':_0x4681ce,'message':_0x597e73(0x200)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x1c8751[_0x597e73(0x204)]((_0x36e72b,_0x565559)=>{const _0x554fa3=_0x597e73,_0x5b404f=_0x4681ce+'['+_0x565559+']';if(!isRecord(_0x36e72b)){_0x3d08de[_0x554fa3(0x1fb)]({'path':_0x5b404f,'message':_0x554fa3(0x10d)});return;}const _0x2c37b8=requireNotificationString(_0x36e72b[_0x554fa3(0x1d9)],_0x5b404f+'.text',_0x554fa3(0x20d),_0x3d08de);if(_0x2c37b8)validateNotificationPlaceholders(_0x2c37b8,_0x5b404f+'.text',_0x3d08de);const _0x583bcc=requireNotificationString(_0x36e72b[_0x554fa3(0x185)],_0x5b404f+_0x554fa3(0x121),'Notification\x20action.url\x20is\x20required.',_0x3d08de);if(!_0x583bcc)return;validateNotificationPlaceholders(_0x583bcc,_0x5b404f+_0x554fa3(0x121),_0x3d08de),!/^https?:\/\//i[_0x554fa3(0x240)](_0x583bcc)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x554fa3(0x240)](_0x583bcc)&&_0x3d08de[_0x554fa3(0x1fb)]({'path':_0x5b404f+_0x554fa3(0x121),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function a287_0x4293(){const _0x21d3d6=['assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','flowJson.pageMode','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','flowJson.nodes','number','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','EMAIL','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Duplicate\x20node\x20id:\x20','interrupting','.assignee.roleId','Notification\x20configCode\x20is\x20required.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','CONTINUE','END','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','.pageId','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','SINGLE','set','findIndex','.timeout','HANDLE','.configCode','edge\x20target\x20is\x20required.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','Notification\x20recipient.value\x20is\x20required.','test','object','config','START','FAIL','DAYS','Unsupported\x20notification\x20version:\x20','value\x20must\x20be\x20an\x20array.','Edge\x20target\x20node\x20not\x20found:\x20','1300504BzVXUe','flowDesc','CUSTOM_PAGE','result','position.','.transferCandidates.strategy','flowType\x20is\x20required.','metadata','.recipients','approval_sys_operationType','.unit','pageMode','configCode','NOTIFICATION','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.async.enabled','targetNodeId','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','transferCandidates\x20must\x20be\x20an\x20object.','flowJson','NOTIFICATION\x20node\x20requires\x20config.','entries','startPath\x20must\x20be\x20a\x20non-empty\x20string.','flowCode','enabled','formSchema','flowJson\x20must\x20be\x20an\x20object.','.tmp','overwrite','appCode','isFinite','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','utf8','Unsupported\x20notification\x20placeholder:\x20','\x20facts.','.version','.async.retryInterval','assignee','.config','flowJson.schemaVersion','^[A-Za-z_][A-Za-z0-9_]*$','.name','8DLUkDe','Notification\x20action\x20must\x20be\x20an\x20object.','async','sourceNodeId','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.path','.expression','.cc.readSources','formData','HOURS','userIds','Notification\x20template.','\x20->\x20','USER','.timeout.scriptName','.\x20This\x20CLI\x20supports\x20only\x20','conditionType','position','Notification\x20recipient.type\x20is\x20required.','transferCandidates','AUTO_APPROVE','.url','scriptName','.waypoints[','template','source','Node\x20is\x20not\x20reachable\x20from\x20START.','hasOwnProperty','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','string','edge\x20must\x20be\x20an\x20object.','ALWAYS','.timeout.enabled','EXECUTE_BFF','SCRIPT','strategy','.template','.sequential','approval.simple-flow.v1','NOTIFICATION\x20node\x20requires\x20template.','Unsupported\x20schemaVersion:\x20','FORM_FLOW','.cc.recipientUserIds','.assignee','SECONDS','Edge\x20source\x20node\x20not\x20found:\x20','node\x20must\x20be\x20an\x20object.','.detailMarkdown','approval_sys_pageId','.assignee.strategy','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','flowKey','role','replace','REJECTED','Node\x20cannot\x20reach\x20any\x20END.','action','integer','formPermissions','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','838461QlYbbb','edges','.cc','FIXED\x20assignee\x20requires\x20userIds.','type','EXPRESSION\x20edge\x20requires\x20expression.','PLATFORM_FORM','.transferCandidates','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','Node\x20has\x20no\x20incoming\x20edge.','approval_sys_datasetCode','#/$defs/flowNode','stringify','toUpperCase','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','sequential','label','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','\x20was\x20empty\x20and\x20was\x20removed.','unit','parse','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','approval_sys_','Duplicate\x20value:\x20','title','834sBFOaI','includes','taskMode','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','add','value','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.timeout.duration','length','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','startsWith','facts','legacy_field_removed','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','MINUTES','.async','#/$defs/userId','sequential\x20must\x20be\x20a\x20boolean.','isInteger','waypoints','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','SCRIPT\x20node\x20requires\x20scriptName.','flowJson.startPath','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','AUTO_REJECT','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','filter','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','91820OHPDbR','.value','27eRBqva','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','url','isArray','.failurePolicy','keys','call','slice','has','FIXED','flowJson.nodes[','scriptResult','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','flowName\x20is\x20required.','duration','prototype','flowJson.edges','cc.recipientUserIds\x20supports\x20at\x20most\x20','.transferCandidates.userIds','APPROVAL','target','449330LvaQYR','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.resultVariable','].path','pageId','map','async\x20must\x20be\x20an\x20object.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20recipient\x20must\x20be\x20an\x20object.','.assignee.userIds','approval_sys_appCode','1963398EdPrEq','.source','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','version','^[1-9][0-9]*$','visible','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','defaultFlow','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','recipients','Reserved\x20resultVariable:\x20','isSafeInteger','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.actions','APPROVAL\x20node\x20requires\x20assignee.','CONDITION','duration\x20requires\x20value\x20and\x20unit.','actions','approval_sys_processInstanceId','flowJson.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.facts','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','array','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','failurePolicy','INDEPENDENT_FLOW','flowJson.edges[','detailMarkdown','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','nodes','4933435CuuAxv','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','catch','recipientUserIds','context','.target','datasetCode\x20must\x20be\x20a\x20string.','.timeout.interrupting','flowDesc\x20must\x20be\x20a\x20string.','roleId','.cc.recipientUserIds[','ALL','path','.assignee.userIds[','.cc.visible','ROLE','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','flowName','BCC','#/$defs/timeAmount','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','resultVariable','text','warnings','boolean','startPageId','trim','EXPRESSION','.waypoints','APPROVED','Duplicate\x20resultVariable:\x20','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','get','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','name','.taskMode','Notification\x20template.facts\x20must\x20be\x20an\x20array.','templateName','some','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','approval_sys_initiatorUserId','schemaVersion','Unsupported\x20node\x20type:\x20','2343cslewx','.transferCandidates.userIds[','datasetCode','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','edge\x20source\x20is\x20required.','14399EImkSW','Notification\x20version\x20must\x20be\x20a\x20string.','.defaultFlow','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.id','nodes\x20must\x20be\x20an\x20array.','.timeout.action','.role','push','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','pid','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Notification\x20template\x20supports\x20at\x20most\x20','expression','.conditionType','approval_sys_dataId','forEach','message','waypoint.','summary','.position.','timeout.enabled\x20must\x20be\x20a\x20boolean.','.type','NaN','startPath','Notification\x20action.text\x20is\x20required.','formDefinitions','flowJson.nodes.','flowType','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20fact.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Unsupported\x20flowType:\x20','Notification\x20fact\x20must\x20be\x20an\x20object.','bindDatasetCode','.position','failurePolicy\x20must\x20be\x20a\x20string.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','https://json-schema.org/draft/2020-12/schema','size','Unsupported\x20pageMode:\x20','value\x20must\x20be\x20a\x20non-empty\x20string.','Unsupported\x20approval\x20mode:\x20','timeout.interrupting\x20must\x20be\x20a\x20boolean.','timeout'];a287_0x4293=function(){return _0x21d3d6;};return a287_0x4293();}function validateNotificationRecipients(_0x1f2a50,_0x59ffba,_0x50da0d){const _0xd52054=a287_0x42ed67;if(_0x1f2a50===undefined||_0x1f2a50===null)return;if(!Array[_0xd52054(0x186)](_0x1f2a50)){_0x50da0d[_0xd52054(0x1fb)]({'path':_0x59ffba,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x15c3d4=![];_0x1f2a50[_0xd52054(0x204)]((_0x324d87,_0x458dfd)=>{const _0xb075c6=_0xd52054,_0x18c5f1=_0x59ffba+'['+_0x458dfd+']';if(!isRecord(_0x324d87)){_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1,'message':_0xb075c6(0x1a0)});return;}const _0x2a786f=requireNotificationString(_0x324d87[_0xb075c6(0x14f)],_0x18c5f1+_0xb075c6(0x20a),_0xb075c6(0x11e),_0x50da0d);_0x2a786f&&!NOTIFICATION_RECIPIENT_TYPES[_0xb075c6(0x18b)](_0x2a786f[_0xb075c6(0x158)]())&&_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x1ae413='TO';_0x324d87[_0xb075c6(0x142)]!==undefined&&_0x324d87[_0xb075c6(0x142)]!==null&&(typeof _0x324d87['role']!=='string'?(_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+'.role','message':_0xb075c6(0x14a)}),_0x1ae413=''):(_0x1ae413=_0x324d87[_0xb075c6(0x142)]['trim']()[_0xb075c6(0x158)](),!NOTIFICATION_RECIPIENT_ROLES[_0xb075c6(0x18b)](_0x1ae413)&&_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+_0xb075c6(0x1fa),'message':_0xb075c6(0x1ab)})));if(_0x1ae413==='TO')_0x15c3d4=!![];const _0x412e03=requireNotificationString(_0x324d87[_0xb075c6(0x169)],_0x18c5f1+'.value',_0xb075c6(0x23f),_0x50da0d);_0x412e03&&validateNotificationPlaceholders(_0x412e03,_0x18c5f1+'.value',_0x50da0d);}),_0x1f2a50[_0xd52054(0x16c)]>0x0&&!_0x15c3d4&&_0x50da0d[_0xd52054(0x1fb)]({'path':_0x59ffba,'message':_0xd52054(0x1e2)});}function requireNotificationString(_0x1af8ec,_0x55d4e1,_0xa64955,_0x491430){const _0xb74828=a287_0x42ed67;if(typeof _0x1af8ec!=='string'||_0x1af8ec['trim']()==='')return _0x491430[_0xb74828(0x1fb)]({'path':_0x55d4e1,'message':_0xa64955}),undefined;return _0x1af8ec[_0xb74828(0x1dd)]();}function validateNotificationPlaceholders(_0x1f1def,_0x3bff26,_0x3c61f9){const _0x152cf6=a287_0x42ed67;for(const _0x320068 of _0x1f1def['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0xfee8e=_0x320068[0x1]?.[_0x152cf6(0x1dd)]()??'',_0x58786f=_0xfee8e['indexOf']('.'),_0x3a282b=_0x58786f>=0x0?_0xfee8e[_0x152cf6(0x18a)](0x0,_0x58786f):_0xfee8e,_0x36d8bb=_0x58786f>=0x0?_0xfee8e[_0x152cf6(0x18a)](_0x58786f+0x1)['trim']():'';(!['event',_0x152cf6(0x1c6),'variables'][_0x152cf6(0x165)](_0x3a282b)||_0x36d8bb==='')&&_0x3c61f9['push']({'path':_0x3bff26,'message':_0x152cf6(0x103)+_0x320068[0x0]+'.'});}_0x1f1def[_0x152cf6(0x143)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x152cf6(0x165)]('${')&&_0x3c61f9[_0x152cf6(0x1fb)]({'path':_0x3bff26,'message':_0x152cf6(0x214)});}function validateEdge(_0x45e9aa,_0xd0dc00,_0x244315){const _0x248443=a287_0x42ed67;_0x45e9aa[_0x248443(0x1e5)]!==undefined&&typeof _0x45e9aa['name']!==_0x248443(0x129)&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x10b),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x45e9aa['defaultFlow']!==undefined&&typeof _0x45e9aa['defaultFlow']!=='boolean'&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1f5),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x45e9aa[_0x248443(0x177)]!==undefined&&(!Array[_0x248443(0x186)](_0x45e9aa[_0x248443(0x177)])?_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1df),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x45e9aa[_0x248443(0x177)][_0x248443(0x204)]((_0x479e28,_0x349615)=>{const _0x3cc128=_0x248443;if(!isRecord(_0x479e28)){_0x244315[_0x3cc128(0x1fb)]({'path':_0xd0dc00+_0x3cc128(0x123)+_0x349615+']','message':_0x3cc128(0x233)});return;}for(const _0x4a0754 of['x','y']){const _0x4c709b=_0x479e28[_0x4a0754];(typeof _0x4c709b!==_0x3cc128(0x227)||!Number[_0x3cc128(0x100)](_0x4c709b))&&_0x244315[_0x3cc128(0x1fb)]({'path':_0xd0dc00+_0x3cc128(0x123)+_0x349615+'].'+_0x4a0754,'message':_0x3cc128(0x206)+_0x4a0754+_0x3cc128(0x149)});}})),_0x45e9aa[_0x248443(0x11c)]!==undefined&&!CONDITION_TYPES['has'](_0x45e9aa[_0x248443(0x11c)])&&_0x244315['push']({'path':_0xd0dc00+_0x248443(0x202),'message':'Unsupported\x20condition\x20type:\x20'+String(_0x45e9aa[_0x248443(0x11c)])+'.'}),_0x45e9aa[_0x248443(0x11c)]==='EXPRESSION'&&(typeof _0x45e9aa[_0x248443(0x201)]!==_0x248443(0x129)||_0x45e9aa[_0x248443(0x201)]['trim']()==='')&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x112),'message':_0x248443(0x150)}),_0x45e9aa[_0x248443(0x1aa)]===!![]&&_0x45e9aa['conditionType']!==_0x248443(0x12b)&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1f5),'message':_0x248443(0x171)}),_0x45e9aa[_0x248443(0x1aa)]===!![]&&typeof _0x45e9aa['expression']===_0x248443(0x129)&&_0x45e9aa[_0x248443(0x201)][_0x248443(0x1dd)]()!==''&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+'.expression','message':_0x248443(0x1d2)});}function validateGraphShape(_0x8c733,_0x2fa3d9,_0x3ba089,_0x5cdf9f,_0x139585,_0x418542,_0x2863e6){const _0x183717=a287_0x42ed67;for(const [_0x40d866,_0x1177e8]of _0x8c733){const _0x2faa9c=_0x139585['get'](_0x40d866)??[],_0x32014f=_0x5cdf9f['get'](_0x40d866)??[];_0x1177e8['type']!==_0x183717(0x243)&&_0x2faa9c['length']===0x0&&_0x2863e6['push']({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x154)});_0x1177e8[_0x183717(0x14f)]!=='END'&&_0x32014f[_0x183717(0x16c)]===0x0&&_0x2863e6['push']({'path':'flowJson.nodes.'+_0x40d866,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x1177e8[_0x183717(0x14f)]===_0x183717(0x243)&&_0x2faa9c['length']>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1f1)});_0x1177e8[_0x183717(0x14f)]===_0x183717(0x232)&&_0x32014f[_0x183717(0x16c)]>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x1177e8[_0x183717(0x14f)]==='CONDITION'){_0x32014f[_0x183717(0x16c)]<0x2&&_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.nodes.'+_0x40d866,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x1a420b=_0x32014f['filter'](_0x4669f6=>_0x4669f6[_0x183717(0x1aa)]===!![]);_0x1a420b[_0x183717(0x16c)]!==0x1&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x153)});if(_0x1a420b[_0x183717(0x16c)]===0x1){const _0xef9c28=_0x1a420b[0x0],_0x94c4fe=_0x418542['get'](_0xef9c28)??_0x183717(0x193);_0xef9c28[_0x183717(0x11c)]!==_0x183717(0x12b)&&_0x2863e6['push']({'path':_0x94c4fe+'.conditionType','message':_0x183717(0x1c3)});_0xef9c28[_0x183717(0x201)]!==undefined&&_0x2863e6['push']({'path':_0x94c4fe+_0x183717(0x112),'message':_0x183717(0x23e)});for(const _0x5be15f of _0x32014f){if(_0x5be15f===_0xef9c28)continue;const _0x436c82=_0x418542['get'](_0x5be15f)??_0x183717(0x193);if(_0x5be15f[_0x183717(0x11c)]!=='EXPRESSION')_0x2863e6['push']({'path':_0x436c82+'.conditionType','message':_0x183717(0x1fd)});else(typeof _0x5be15f['expression']!==_0x183717(0x129)||_0x5be15f[_0x183717(0x201)][_0x183717(0x1dd)]()==='')&&_0x2863e6['push']({'path':_0x436c82+_0x183717(0x112),'message':_0x183717(0x17f)});}}}if(_0x1177e8[_0x183717(0x14f)]===_0x183717(0x196)&&(_0x1177e8[_0x183717(0x166)]??_0x183717(0x196))===_0x183717(0x23a)){if(_0x32014f[_0x183717(0x16c)]!==0x1)_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1e4)});else{const _0x2ea0a0=_0x32014f[0x0];((_0x2ea0a0[_0x183717(0x11c)]??_0x183717(0x12b))!==_0x183717(0x12b)||_0x2ea0a0['defaultFlow']===!![]||typeof _0x2ea0a0[_0x183717(0x201)]===_0x183717(0x129)&&_0x2ea0a0['expression']['trim']()!=='')&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x418542['get'](_0x2ea0a0)??_0x183717(0x193),'message':_0x183717(0x1ff)});}}else{if(_0x1177e8[_0x183717(0x14f)]===_0x183717(0x196)){const _0xedd219=_0x32014f[_0x183717(0x19d)](_0x27baa8=>_0x27baa8[_0x183717(0x11c)]??'ALWAYS'),_0x2fe32e=_0xedd219[_0x183717(0x17e)](_0xe7e243=>_0xe7e243!==_0x183717(0x1e0)&&_0xe7e243!==_0x183717(0x144));_0x2fe32e[_0x183717(0x16c)]>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1fc)}),_0xedd219[_0x183717(0x17e)](_0xee2c14=>_0xee2c14===_0x183717(0x1e0))[_0x183717(0x16c)]!==0x1&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x184)}),_0xedd219['filter'](_0x38bcd3=>_0x38bcd3===_0x183717(0x144))[_0x183717(0x16c)]!==0x1&&_0x2863e6['push']({'path':'flowJson.nodes.'+_0x40d866,'message':_0x183717(0x101)}),_0x32014f[_0x183717(0x1e9)](_0x40ea44=>_0x40ea44['defaultFlow']===!![])&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1af)});}}}const _0x39d4f8=new Set(),_0xda4d2a=_0x40eaf9=>{const _0x560676=_0x183717;if(_0x39d4f8[_0x560676(0x18b)](_0x40eaf9))return;_0x39d4f8['add'](_0x40eaf9);for(const _0x2298f6 of _0x5cdf9f[_0x560676(0x1e3)](_0x40eaf9)??[]){const _0x88bf39=resolveEdgeEndpoint(_0x2298f6['target'],_0x2298f6[_0x560676(0x259)]);if(_0x88bf39&&_0x8c733['has'](_0x88bf39))_0xda4d2a(_0x88bf39);}};_0xda4d2a(_0x2fa3d9);for(const _0x46df7a of _0x8c733[_0x183717(0x188)]()){!_0x39d4f8[_0x183717(0x18b)](_0x46df7a)&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x46df7a,'message':_0x183717(0x126)});}const _0x53c7a9=_0x3ba089[_0x183717(0x1e9)](_0x439c20=>_0x39d4f8[_0x183717(0x18b)](_0x439c20));if(!_0x53c7a9){_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.edges','message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x2ed5ac=new Set(),_0x10d968=_0x48d1d0=>{const _0x157245=_0x183717;if(_0x2ed5ac[_0x157245(0x18b)](_0x48d1d0))return;_0x2ed5ac['add'](_0x48d1d0);for(const _0x5ef43d of _0x139585[_0x157245(0x1e3)](_0x48d1d0)??[]){const _0x6f6f97=resolveEdgeEndpoint(_0x5ef43d['source'],_0x5ef43d[_0x157245(0x10f)]);if(_0x6f6f97&&_0x8c733[_0x157245(0x18b)](_0x6f6f97))_0x10d968(_0x6f6f97);}};for(const _0x285593 of _0x3ba089){if(_0x8c733[_0x183717(0x18b)](_0x285593))_0x10d968(_0x285593);}for(const _0x2000a6 of _0x39d4f8){!_0x2ed5ac['has'](_0x2000a6)&&_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.nodes.'+_0x2000a6,'message':_0x183717(0x145)});}}function validateApprovalResults(_0x12c17c,_0x1a3082,_0x2f6ca6,_0x5995e2){const _0x2d26bc=a287_0x42ed67;if(_0x1a3082===0x0)return;const _0x2058f8=new Set(_0x2f6ca6[_0x2d26bc(0x19d)](_0x511a62=>_0x12c17c[_0x2d26bc(0x1e3)](_0x511a62)?.[_0x2d26bc(0x24c)])[_0x2d26bc(0x17e)](_0x24e42e=>typeof _0x24e42e===_0x2d26bc(0x129)));for(const _0x2389e6 of[_0x2d26bc(0x1e0),_0x2d26bc(0x144)]){!_0x2058f8[_0x2d26bc(0x18b)](_0x2389e6)&&_0x5995e2['push']({'path':_0x2d26bc(0x226),'message':_0x2d26bc(0x178)+_0x2389e6+'.'});}}function validateScriptResultReferences(_0x1f984d,_0x286519,_0x24d302,_0x46e11e,_0x298619,_0xcadf79,_0x469838){const _0x506e0b=a287_0x42ed67;if(_0xcadf79['size']===0x0)return;const _0x3220f1=new Set(),_0x2305b6=_0x340023=>{const _0x4f2a3d=a287_0x2794;if(!_0x3220f1['has'](_0x340023)&&_0x1f984d[_0x4f2a3d(0x18b)](_0x340023)){_0x3220f1['add'](_0x340023);for(const _0x37c415 of _0x24d302['get'](_0x340023)??[]){const _0x48de67=resolveEdgeEndpoint(_0x37c415[_0x4f2a3d(0x197)],_0x37c415[_0x4f2a3d(0x259)]);if(_0x48de67)_0x2305b6(_0x48de67);}}};_0x2305b6(_0x286519);const _0x28931b=new Map();for(const _0x13a022 of _0x3220f1){_0x28931b[_0x506e0b(0x237)](_0x13a022,_0x13a022===_0x286519?new Set([_0x286519]):new Set(_0x3220f1));}let _0x21e0e7=!![];while(_0x21e0e7){_0x21e0e7=![];for(const _0x2c7c25 of _0x3220f1){if(_0x2c7c25===_0x286519)continue;const _0x4ce30a=(_0x46e11e[_0x506e0b(0x1e3)](_0x2c7c25)??[])[_0x506e0b(0x19d)](_0x3391bd=>resolveEdgeEndpoint(_0x3391bd[_0x506e0b(0x125)],_0x3391bd[_0x506e0b(0x10f)]))['filter'](_0x1c3bfd=>Boolean(_0x1c3bfd&&_0x3220f1[_0x506e0b(0x18b)](_0x1c3bfd)));if(_0x4ce30a[_0x506e0b(0x16c)]===0x0)continue;const _0x3c6e90=new Set(_0x28931b[_0x506e0b(0x1e3)](_0x4ce30a[0x0])??[]);for(const _0x5de646 of _0x4ce30a['slice'](0x1)){const _0x51c8b5=_0x28931b[_0x506e0b(0x1e3)](_0x5de646)??new Set();for(const _0x59a251 of _0x3c6e90){if(!_0x51c8b5[_0x506e0b(0x18b)](_0x59a251))_0x3c6e90['delete'](_0x59a251);}}_0x3c6e90[_0x506e0b(0x168)](_0x2c7c25);const _0x30b9ae=_0x28931b['get'](_0x2c7c25);!setsEqual(_0x30b9ae,_0x3c6e90)&&(_0x28931b['set'](_0x2c7c25,_0x3c6e90),_0x21e0e7=!![]);}}for(const [_0x178fa9,_0x1f005b]of _0x24d302){const _0x5b69d8=_0x28931b['get'](_0x178fa9);if(!_0x5b69d8)continue;for(const _0x37fe6 of _0x1f005b){if(_0x37fe6['conditionType']!==_0x506e0b(0x1de)||typeof _0x37fe6[_0x506e0b(0x201)]!==_0x506e0b(0x129))continue;for(const [_0x2f7f72,_0x26a5c1]of _0xcadf79){expressionReferencesVariable(_0x37fe6['expression'],_0x2f7f72)&&!_0x5b69d8[_0x506e0b(0x18b)](_0x26a5c1)&&_0x469838[_0x506e0b(0x1fb)]({'path':(_0x298619[_0x506e0b(0x1e3)](_0x37fe6)??_0x506e0b(0x193))+'.expression','message':_0x506e0b(0x212)+_0x2f7f72+',\x20but\x20node\x20'+_0x26a5c1+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x178fa9+'.'});}}}}function a287_0x2794(_0x1ecf13,_0x540b67){_0x1ecf13=_0x1ecf13-0xfa;const _0x429382=a287_0x4293();let _0x279430=_0x429382[_0x1ecf13];return _0x279430;}function expressionReferencesVariable(_0x24271d,_0x2f0491){const _0x3f3764=a287_0x42ed67;let _0xb32e21=0x0;while(_0xb32e21<_0x24271d[_0x3f3764(0x16c)]){const _0x281fff=_0x24271d[_0xb32e21];if(_0x281fff==='\x27'||_0x281fff==='\x22'){_0xb32e21=skipQuotedExpressionSegment(_0x24271d,_0xb32e21,_0x281fff);continue;}if(!/[A-Za-z_]/[_0x3f3764(0x240)](_0x281fff)){_0xb32e21+=0x1;continue;}const _0x4a1d9f=_0xb32e21;_0xb32e21+=0x1;while(_0xb32e21<_0x24271d[_0x3f3764(0x16c)]&&/[A-Za-z0-9_]/['test'](_0x24271d[_0xb32e21])){_0xb32e21+=0x1;}if(_0x24271d['slice'](_0x4a1d9f,_0xb32e21)!==_0x2f0491)continue;let _0x3e6d83=_0x4a1d9f-0x1;while(_0x3e6d83>=0x0&&/\s/['test'](_0x24271d[_0x3e6d83])){_0x3e6d83-=0x1;}if(_0x24271d[_0x3e6d83]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x5528e3,_0x31060f,_0x26e604){const _0x33f1ec=a287_0x42ed67;let _0x33cb75=_0x31060f+0x1;while(_0x33cb75<_0x5528e3[_0x33f1ec(0x16c)]){if(_0x5528e3[_0x33cb75]==='\x5c'){_0x33cb75+=0x2;continue;}if(_0x5528e3[_0x33cb75]===_0x26e604)return _0x33cb75+0x1;_0x33cb75+=0x1;}return _0x33cb75;}function resolveEffectiveResultVariable(_0x48525f,_0x48ce4e){const _0xd596ff=a287_0x42ed67;if(_0x48525f===undefined||_0x48525f===null||_0x48ce4e&&_0x48525f==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x48525f!==_0xd596ff(0x129)||!VARIABLE_PATTERN['test'](_0x48525f)||RESERVED_RESULT_VARIABLES['has'](_0x48525f)||_0x48525f[_0xd596ff(0x16e)]('approval_sys_'))return undefined;return _0x48525f;}function registerResultVariableOwner(_0x1adfbe,_0x2d7327,_0x16ddb1,_0x59e6c6){const _0x142222=a287_0x42ed67;if(_0x1adfbe[_0x142222(0x18b)](_0x2d7327)){_0x59e6c6[_0x142222(0x1fb)]({'path':'flowJson.nodes','message':_0x142222(0x1e1)+_0x2d7327+'.'});return;}_0x1adfbe[_0x142222(0x237)](_0x2d7327,_0x16ddb1);}function setsEqual(_0x195c40,_0x348a21){const _0x4ca7b2=a287_0x42ed67;return _0x195c40[_0x4ca7b2(0x21d)]===_0x348a21[_0x4ca7b2(0x21d)]&&[..._0x195c40]['every'](_0x56107e=>_0x348a21['has'](_0x56107e));}function isValidUserId(_0x34a972){const _0x2ad2b7=a287_0x42ed67;if(typeof _0x34a972===_0x2ad2b7(0x129))return _0x34a972[_0x2ad2b7(0x1dd)]()['length']>0x0;return Number[_0x2ad2b7(0x1ae)](_0x34a972)&&Number(_0x34a972)>0x0;}function resolveEdgeEndpoint(_0xb3cac,_0x42902a){const _0x3884ef=a287_0x42ed67;if(typeof _0xb3cac===_0x3884ef(0x129)&&_0xb3cac[_0x3884ef(0x1dd)]())return _0xb3cac[_0x3884ef(0x1dd)]();if(typeof _0x42902a==='string'&&_0x42902a[_0x3884ef(0x1dd)]())return _0x42902a[_0x3884ef(0x1dd)]();return undefined;}function removeEmptyMetadata(_0x551e3e,_0x320be7,_0x57d9e3,_0x2bd202){const _0x2dc2a7=a287_0x42ed67;if(Array[_0x2dc2a7(0x186)](_0x551e3e)){_0x551e3e['forEach']((_0x4fe9c7,_0xa47a0)=>removeEmptyMetadata(_0x4fe9c7,_0x320be7+'['+_0xa47a0+']',_0x57d9e3,_0x2bd202));return;}if(!isRecord(_0x551e3e))return;for(const [_0x5d7098,_0x562482]of Object[_0x2dc2a7(0x25e)](_0x551e3e)){const _0x160b0f=_0x320be7+'.'+_0x5d7098;if(_0x5d7098===_0x2dc2a7(0x250)&&isEmptyJsonValue(_0x562482)){delete _0x551e3e[_0x5d7098],_0x2bd202['push'](_0x160b0f),_0x57d9e3[_0x2dc2a7(0x1fb)]({'code':'empty_metadata_removed','path':_0x160b0f,'message':_0x160b0f+_0x2dc2a7(0x15d)});continue;}removeEmptyMetadata(_0x562482,_0x160b0f,_0x57d9e3,_0x2bd202);}}function isEmptyJsonValue(_0x5ee825){const _0x3e7f2a=a287_0x42ed67;if(_0x5ee825===null||_0x5ee825===undefined)return!![];if(typeof _0x5ee825===_0x3e7f2a(0x129))return _0x5ee825[_0x3e7f2a(0x1dd)]()==='';if(Array[_0x3e7f2a(0x186)](_0x5ee825))return _0x5ee825['length']===0x0;return isRecord(_0x5ee825)&&Object[_0x3e7f2a(0x188)](_0x5ee825)[_0x3e7f2a(0x16c)]===0x0;}function isRecord(_0x5b123b){const _0x2d4f2f=a287_0x42ed67;return typeof _0x5b123b===_0x2d4f2f(0x241)&&_0x5b123b!==null&&!Array[_0x2d4f2f(0x186)](_0x5b123b);}function cloneJsonValue(_0x127a49){const _0x58f05d=a287_0x42ed67;return JSON[_0x58f05d(0x15f)](JSON[_0x58f05d(0x157)](_0x127a49));}export async function readFlowConfigFile(_0x1c7247){const _0x437ca8=await readFile(resolve(_0x1c7247),'utf8');return JSON['parse'](_0x437ca8);}
1
+ const a287_0x571368=a287_0x2b53;(function(_0x349b65,_0x45948c){const _0x598157=a287_0x2b53,_0x2b96ff=_0x349b65();while(!![]){try{const _0x1b6114=-parseInt(_0x598157(0x203))/0x1*(parseInt(_0x598157(0x168))/0x2)+-parseInt(_0x598157(0x1ce))/0x3+parseInt(_0x598157(0x1f1))/0x4+parseInt(_0x598157(0x18c))/0x5*(-parseInt(_0x598157(0x142))/0x6)+-parseInt(_0x598157(0x1e9))/0x7+-parseInt(_0x598157(0x1c1))/0x8+parseInt(_0x598157(0x1db))/0x9;if(_0x1b6114===_0x45948c)break;else _0x2b96ff['push'](_0x2b96ff['shift']());}catch(_0x27c619){_0x2b96ff['push'](_0x2b96ff['shift']());}}}(a287_0x4097,0x6d5ec));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';function a287_0x4097(){const _0x3c8b08=['Notification\x20recipient.role\x20must\x20be\x20a\x20string.','template','SCRIPT\x20node\x20requires\x20scriptName.','.cc','3405208hQfEdW','flowJson.','.template','object','duration','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','formPermissions','appCode','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Notification\x20fact\x20must\x20be\x20an\x20object.','Rabetbase\x20FlowConfig','visible','2476257oztNdv','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Notification\x20template.','mode','flowJson.nodes.','.name','trim','edge\x20source\x20is\x20required.','formPermission','path','edge\x20must\x20be\x20an\x20object.','Notification\x20action\x20must\x20be\x20an\x20object.','CONTINUE','14694813rhQDHb','.role','BCC','FIXED','.timeout.action','EMAIL','.text','startPageId','stringify','SINGLE','push','version','slice','utf8','1688785kUQrFk','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','keys','approval_sys_dataId','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','AUTO_APPROVE','detailMarkdown','metadata','1949648ndcKvI','every','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','Node\x20has\x20no\x20incoming\x20edge.','\x20is\x20required.','isFinite','map','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Unsupported\x20node\x20type:\x20','Edge\x20target\x20node\x20not\x20found:\x20','flowJson.edges','CONDITION','.cc.readSources','position','edges\x20must\x20be\x20an\x20array.','replace','flowJson','isSafeInteger','35514JbrpTA','.async','flowKey','.tmp','warnings','resultVariable',',\x20but\x20node\x20','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','templateName','retryInterval','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','defaultFlow','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','pageId','NOTIFICATION','EXPRESSION\x20edge\x20requires\x20expression.','HANDLE','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','configCode','FORM_FLOW','bindDatasetCode','node\x20must\x20be\x20an\x20object.','value\x20must\x20be\x20a\x20non-empty\x20string.','PLATFORM_FORM','Notification\x20recipient.value\x20is\x20required.','add','.expression','Notification\x20template.facts\x20must\x20be\x20an\x20array.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','unit','actions','MINUTES','has','.waypoints[','EXPRESSION','flowJson.pageMode','.waypoints','approval_sys_initiatorUserId','.approvalMode','START','https://lovrabet.com/schema/rabetbase-flow-config.json','nodes','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','isInteger','https://json-schema.org/draft/2020-12/schema','facts','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.startPath','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','retryCount','expression','Unsupported\x20schemaVersion:\x20','conditionType','indexOf','#/$defs/timeAmount','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.transferCandidates.userIds[','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','value\x20must\x20be\x20an\x20array.','timeout\x20must\x20be\x20an\x20object.','flowJson.startPageId','.type','targetNodeId','sequential\x20must\x20be\x20a\x20boolean.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.cc.recipientUserIds','.cc.recipientUserIds[','.timeout.interrupting','flowJson.nodes','config','approval_sys_appCode','length','userIds','timeout','^[A-Za-z_][A-Za-z0-9_]*$','toUpperCase','Notification\x20template.actions\x20must\x20be\x20an\x20array.','failurePolicy\x20must\x20be\x20a\x20string.','catch','AUTO_REJECT','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','array','\x20was\x20empty\x20and\x20was\x20removed.','END','sequential','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','Duplicate\x20edge\x20route:\x20','.timeout.enabled','Notification\x20template\x20supports\x20at\x20most\x20','APPROVED','.config','title','Reserved\x20resultVariable:\x20','Duplicate\x20node\x20id:\x20','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','^[1-9][0-9]*$','string','approvalMode','strategy','size','.failurePolicy','Unsupported\x20notification\x20version:\x20','recipientUserIds','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','sourceNodeId','Node\x20cannot\x20reach\x20any\x20END.','EXECUTE_BFF','roleId','flowJson.nodes[','.detailMarkdown','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','flowCode','CUSTOM_PAGE','.value','scriptName','formDefinitions','interrupting','delete','\x20->\x20','filter','ANY','.version','APPROVAL','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','cc.recipientUserIds\x20supports\x20at\x20most\x20','name','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Unsupported\x20approval\x20mode:\x20','context','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','waypoint.','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.transferCandidates.strategy','position.','async.enabled\x20must\x20be\x20a\x20boolean.','.timeout.duration','readSources','label','edges','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.configCode','integer','.timeout.scriptName','event','isArray','waypoints\x20must\x20be\x20an\x20array.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','url','flowName','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20fact.','\x20facts.','204JSdsEh','form','transferCandidates','Node\x20has\x20no\x20outgoing\x20edge.','hasOwnProperty','edge\x20name\x20must\x20be\x20a\x20string.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.resultVariable','Notification\x20recipient.type\x20is\x20required.','NOTIFICATION\x20node\x20requires\x20config.','ROLE','datasetCode','flowDesc','__rabetbase_local_validation__','Duplicate\x20BPMN\x20element\x20id:\x20','target','FIXED\x20assignee\x20requires\x20userIds.','Notification\x20recipient\x20must\x20be\x20an\x20object.','call','flowType','set','flowJson\x20must\x20be\x20an\x20object.','findIndex','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','includes','assignee','.scriptName','.source','number','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.async.retryCount','Notification\x20recipients\x20must\x20be\x20an\x20array.','#/$defs/position','.unit','duration\x20requires\x20value\x20and\x20unit.','role','prototype','8dyFdAK','REJECTED','.position','.url','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','source','boolean','.id','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','].taskMode','test','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','recipients','.transferCandidates.userIds','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','ALL','.defaultFlow','cc\x20must\x20be\x20an\x20object.','USER','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','NOTIFICATION\x20node\x20requires\x20template.','APPROVAL\x20node\x20requires\x20assignee.','some','flowDesc\x20must\x20be\x20a\x20string.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','pageMode','waypoints','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','.target','FAIL','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','nodes\x20must\x20be\x20an\x20array.','approved','ALWAYS','async','5560pCUdvn','Unsupported\x20flowType:\x20','forEach','#/$defs/userId','value','taskMode','Duplicate\x20value:\x20','async\x20must\x20be\x20an\x20object.','formData','approval_sys_datasetCode','.timeout','type','DAYS','startsWith','.conditionType','Notification\x20version\x20must\x20be\x20a\x20string.','failurePolicy','INDEPENDENT_FLOW','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','get','.timeout.resultVariable','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','startPath','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','approval_sys_','NaN','approval_sys_pageId','summary','.assignee.userIds[','.assignee.userIds','SECONDS','text','#/$defs/flowNode','scriptResult','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','action','enabled','SCRIPT','.path','Unsupported\x20condition\x20type:\x20','Duplicate\x20cc\x20recipient\x20userId:\x20','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','legacy_field_removed','schemaVersion','flowJson.schemaVersion','parse','\x20must\x20be\x20a\x20finite\x20number.','datasetCode\x20must\x20be\x20a\x20string.','message'];a287_0x4097=function(){return _0x3c8b08;};return a287_0x4097();}export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x571368(0x22f),'$id':a287_0x571368(0x22b),'title':a287_0x571368(0x1cc),'type':'object','required':[a287_0x571368(0x13e),a287_0x571368(0x155),a287_0x571368(0x201)],'$defs':{'userId':{'anyOf':[{'type':a287_0x571368(0x10a),'minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':a287_0x571368(0x1c4),'required':['x','y'],'properties':{'x':{'type':a287_0x571368(0x15f),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x190),a287_0x571368(0x220)],'properties':{'value':{'type':a287_0x571368(0x137),'minimum':0x1},'unit':{'enum':['SECONDS',a287_0x571368(0x222),'HOURS',a287_0x571368(0x198)]}},'additionalProperties':!![]},'flowNode':{'type':a287_0x571368(0x1c4),'required':['id',a287_0x571368(0x197),a287_0x571368(0x127),'position'],'properties':{'id':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)},'type':{'enum':[a287_0x571368(0x22a),a287_0x571368(0xfc),a287_0x571368(0x124),a287_0x571368(0x1fc),'SCRIPT',a287_0x571368(0x211)]},'name':{'type':a287_0x571368(0x10a),'minLength':0x1},'path':{'type':a287_0x571368(0x10a),'minLength':0x1},'position':{'$ref':a287_0x571368(0x163)},'approvalMode':{'enum':[a287_0x571368(0x1e4),a287_0x571368(0x177),a287_0x571368(0x122)]},'taskMode':{'enum':[a287_0x571368(0x124),a287_0x571368(0x213)]},'assignee':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x10c)],'properties':{'strategy':{'enum':['FIXED',a287_0x571368(0x14c)]},'userIds':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':a287_0x571368(0x18f)}},'roleId':{'anyOf':[{'type':a287_0x571368(0x137),'minimum':0x1},{'type':'string','pattern':a287_0x571368(0x109)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a287_0x571368(0x1c4),'required':['strategy','userIds'],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a287_0x571368(0x18f)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a287_0x571368(0x102),a287_0x571368(0x169)]},'scriptName':{'type':a287_0x571368(0x10a),'minLength':0x1},'resultVariable':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)},'async':{'type':a287_0x571368(0x1c4),'properties':{'enabled':{'type':a287_0x571368(0x16e)},'retryCount':{'type':a287_0x571368(0x137),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a287_0x571368(0x23d)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a287_0x571368(0x16e)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a287_0x571368(0x1ee),a287_0x571368(0xf8),a287_0x571368(0x114)]},'interrupting':{'type':'boolean'},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a287_0x571368(0x10a),'pattern':a287_0x571368(0x254)}},'additionalProperties':!![]},'cc':{'type':a287_0x571368(0x1c4),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a287_0x571368(0xfa),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x571368(0x10a),'minLength':0x1}},'visible':{'type':a287_0x571368(0xfa),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x571368(0x1c4),'required':['configCode',a287_0x571368(0x1be)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a287_0x571368(0x185)]},'template':{'type':'object','required':[a287_0x571368(0x104),'summary'],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a287_0x571368(0x10a),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':'array','maxItems':0x8,'items':{'type':a287_0x571368(0x1c4),'required':['label','value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a287_0x571368(0x10a),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x571368(0xfa),'maxItems':0x2,'items':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x1ab),a287_0x571368(0x13d)],'properties':{'text':{'type':a287_0x571368(0x10a),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x571368(0xfa),'items':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x197),a287_0x571368(0x190)],'properties':{'type':{'enum':[a287_0x571368(0x17a),a287_0x571368(0x14c),a287_0x571368(0x1e0)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a287_0x571368(0x1dd)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x571368(0x1c4),'properties':{'id':{'type':a287_0x571368(0x10a),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':'string','minLength':0x1},'target':{'type':a287_0x571368(0x10a),'minLength':0x1},'sourceNodeId':{'type':a287_0x571368(0x10a),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':['ALWAYS',a287_0x571368(0x102),a287_0x571368(0x169),a287_0x571368(0x225)]},'expression':{'type':'string'},'defaultFlow':{'type':a287_0x571368(0x16e)},'name':{'type':a287_0x571368(0x10a)},'waypoints':{'type':a287_0x571368(0xfa),'items':{'$ref':a287_0x571368(0x163)}}},'allOf':[{'anyOf':[{'required':[a287_0x571368(0x16d)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a287_0x571368(0x151)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x571368(0x10a),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':['FORM_FLOW',a287_0x571368(0x19d)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a287_0x571368(0x137)},'templateName':![],'flowJson':{'type':a287_0x571368(0x1c4),'required':[a287_0x571368(0x22c),a287_0x571368(0x134)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':'approval.simple-flow.v1','description':a287_0x571368(0x1ea)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':a287_0x571368(0x1ac)}},'edges':{'type':a287_0x571368(0xfa),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x571368(0x205),a287_0x571368(0x119),a287_0x571368(0x13e),a287_0x571368(0x217),a287_0x571368(0x14d),a287_0x571368(0x1c9),a287_0x571368(0x210),a287_0x571368(0x20b)],REMOVED_ROOT_FIELDS=['id',a287_0x571368(0x1c9),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set([a287_0x571368(0x22a),a287_0x571368(0xfc),a287_0x571368(0x124),a287_0x571368(0x1fc),a287_0x571368(0x1b1),'NOTIFICATION']),CONDITION_TYPES=new Set([a287_0x571368(0x18a),'APPROVED','REJECTED',a287_0x571368(0x225)]),APPROVAL_MODES=new Set([a287_0x571368(0x1e4),a287_0x571368(0x177),a287_0x571368(0x122)]),APPROVAL_TASK_MODES=new Set([a287_0x571368(0x124),a287_0x571368(0x213)]),FLOW_TIME_UNITS=new Set([a287_0x571368(0x1aa),a287_0x571368(0x222),'HOURS',a287_0x571368(0x198)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a287_0x571368(0xf8),a287_0x571368(0x114)]),FLOW_TYPES=new Set([a287_0x571368(0x216),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a287_0x571368(0x21a)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x571368(0x1da),a287_0x571368(0x185)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x571368(0x17a),'ROLE',a287_0x571368(0x1e0)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x571368(0x1dd)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x571368(0x1ad),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a287_0x571368(0x194),a287_0x571368(0x189),a287_0x571368(0x250),'approval_sys_processInstanceId',a287_0x571368(0x228),'approval_sys_initiatorUsername',a287_0x571368(0x195),a287_0x571368(0x1a6),'approval_sys_operationType',a287_0x571368(0x1ec)]);export function normalizeFlowConfig(_0x4ebe55){const _0x29b6e3=a287_0x571368;if(!isRecord(_0x4ebe55))throw new TypeError(_0x29b6e3(0x1b5));const _0x2b182e=cloneJsonValue(_0x4ebe55),_0xa8a781=_0x2b182e['flowJson'],_0x1d785c=isRecord(_0xa8a781)?cloneJsonValue(_0xa8a781):{},_0x1b43b7=[],_0x540fff=[];for(const _0x1a5afe of REMOVED_ROOT_FIELDS){if(!Object[_0x29b6e3(0x167)]['hasOwnProperty']['call'](_0x2b182e,_0x1a5afe))continue;delete _0x2b182e[_0x1a5afe],_0x540fff['push'](_0x1a5afe),_0x1b43b7[_0x29b6e3(0x1e5)]({'code':'legacy_field_removed','path':_0x1a5afe,'message':_0x1a5afe+_0x29b6e3(0x1a1)});}for(const _0x51496e of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0x29b6e3(0x146)]['call'](_0x1d785c,_0x51496e))continue;const _0x5af604='flowJson.'+_0x51496e;delete _0x1d785c[_0x51496e],_0x540fff[_0x29b6e3(0x1e5)](_0x5af604),_0x1b43b7['push']({'code':_0x29b6e3(0x1b6),'path':_0x5af604,'message':_0x5af604+_0x29b6e3(0x1a1)});}if(Object[_0x29b6e3(0x167)][_0x29b6e3(0x146)][_0x29b6e3(0x154)](_0x1d785c,_0x29b6e3(0x1b7))){const _0x258ddc=_0x1d785c[_0x29b6e3(0x1b7)],_0x369d15=typeof _0x258ddc===_0x29b6e3(0x10a)?_0x258ddc[_0x29b6e3(0x1d4)]():_0x258ddc;if(isEmptyJsonValue(_0x258ddc)||_0x369d15===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5a15e9=_0x29b6e3(0x1b8);delete _0x1d785c[_0x29b6e3(0x1b7)],_0x540fff[_0x29b6e3(0x1e5)](_0x5a15e9),_0x1b43b7[_0x29b6e3(0x1e5)]({'code':_0x29b6e3(0x1b6),'path':_0x5a15e9,'message':_0x5a15e9+_0x29b6e3(0x148)+DEFAULT_FLOW_SCHEMA_VERSION+_0x29b6e3(0x1ed)});}}removeEmptyMetadata(_0x1d785c,_0x29b6e3(0x201),_0x1b43b7,_0x540fff);_0x2b182e['flowType']===_0x29b6e3(0x19d)&&!Object[_0x29b6e3(0x167)][_0x29b6e3(0x146)]['call'](_0x1d785c,_0x29b6e3(0x181))&&(_0x1d785c['pageMode']=_0x29b6e3(0x11a));_0x2b182e[_0x29b6e3(0x201)]=_0x1d785c;if(typeof _0x2b182e[_0x29b6e3(0x13e)]===_0x29b6e3(0x10a))_0x2b182e[_0x29b6e3(0x13e)]=_0x2b182e[_0x29b6e3(0x13e)][_0x29b6e3(0x1d4)]();return{'config':_0x2b182e,'warnings':_0x1b43b7,'removedPaths':_0x540fff};}function a287_0x2b53(_0x37c8db,_0x1b11d1){_0x37c8db=_0x37c8db-0xf5;const _0x4097f9=a287_0x4097();let _0x2b5337=_0x4097f9[_0x37c8db];return _0x2b5337;}export function validateFlowConfig(_0x1af917){const _0x5697e6=a287_0x571368;let _0x2ff934;try{_0x2ff934=normalizeFlowConfig(_0x1af917);}catch(_0x3945c0){const _0x4166b4=_0x3945c0 instanceof Error?_0x3945c0[_0x5697e6(0x1bc)]:String(_0x3945c0),_0x4d11fe={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x4166b4}],'warnings':[],'normalized':_0x4d11fe,'validationConfig':_0x4d11fe};}const _0x19e30e=_0x2ff934['config'],_0x202c89=cloneJsonValue(_0x19e30e),_0x34486e=_0x202c89[_0x5697e6(0x201)];_0x34486e['flowKey']=_0x5697e6(0x14f),_0x34486e[_0x5697e6(0x13e)]=_0x19e30e[_0x5697e6(0x13e)];typeof _0x19e30e[_0x5697e6(0x14d)]===_0x5697e6(0x10a)&&_0x19e30e['datasetCode'][_0x5697e6(0x1d4)]()&&(_0x34486e['bindDatasetCode']=_0x19e30e[_0x5697e6(0x14d)][_0x5697e6(0x1d4)]());const _0x16f512=[];return validateOuterMetadata(_0x19e30e,_0x16f512),validateFlowClassification(_0x19e30e,_0x16f512),validateGraph(_0x19e30e[_0x5697e6(0x201)],_0x16f512),{'valid':_0x16f512[_0x5697e6(0x251)]===0x0,'errors':_0x16f512,'warnings':_0x2ff934[_0x5697e6(0x207)],'normalized':_0x19e30e,'validationConfig':_0x202c89};}function validateFlowClassification(_0x2540ac,_0x105eae){const _0x3dcca8=a287_0x571368;if(!isRecord(_0x2540ac[_0x3dcca8(0x201)]))return;const _0x22899e=_0x2540ac[_0x3dcca8(0x155)],_0xcca33c=_0x2540ac[_0x3dcca8(0x201)][_0x3dcca8(0x181)];_0xcca33c!==undefined&&(typeof _0xcca33c!=='string'||!FLOW_PAGE_MODES[_0x3dcca8(0x223)](_0xcca33c))&&_0x105eae[_0x3dcca8(0x1e5)]({'path':_0x3dcca8(0x226),'message':'Unsupported\x20pageMode:\x20'+String(_0xcca33c)+'.'});_0x22899e==='FORM_FLOW'&&_0xcca33c!==undefined&&_0x105eae['push']({'path':'flowJson.pageMode','message':_0x3dcca8(0x1f3)});_0x22899e==='INDEPENDENT_FLOW'&&_0xcca33c==='PLATFORM_FORM'&&_0x105eae['push']({'path':_0x3dcca8(0x226),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x22899e===_0x3dcca8(0x216)||_0x22899e==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0x2540ac,_0x22899e,_0xcca33c,_0x105eae);if(_0x22899e!==_0x3dcca8(0x216)||!Array[_0x3dcca8(0x13a)](_0x2540ac[_0x3dcca8(0x201)][_0x3dcca8(0x22c)]))return;_0x2540ac['flowJson'][_0x3dcca8(0x22c)][_0x3dcca8(0x18e)]((_0x24458a,_0x3ee65a)=>{const _0x320f31=_0x3dcca8;isRecord(_0x24458a)&&_0x24458a['type']==='APPROVAL'&&_0x24458a['taskMode']===_0x320f31(0x213)&&_0x105eae['push']({'path':_0x320f31(0x116)+_0x3ee65a+_0x320f31(0x171),'message':_0x320f31(0x1a3)});});}function validateCustomPageNavigation(_0x1dbe34,_0x5056a3,_0x30e102,_0x2766aa){const _0x543afd=a287_0x571368,_0x4321b5=_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x1e2)];_0x4321b5!==undefined&&_0x2766aa['push']({'path':_0x543afd(0x243),'message':_0x543afd(0x237)});const _0x1c77dd=_0x1dbe34['flowJson'][_0x543afd(0x1a2)];_0x1c77dd!==undefined&&(typeof _0x1c77dd!==_0x543afd(0x10a)||_0x1c77dd['trim']()==='')&&_0x2766aa[_0x543afd(0x1e5)]({'path':_0x543afd(0x236),'message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x57abc7=Array['isArray'](_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x22c)])?_0x1dbe34[_0x543afd(0x201)][_0x543afd(0x22c)][_0x543afd(0x1f7)]((_0xc44b8c,_0x1b4962)=>({'node':_0xc44b8c,'index':_0x1b4962}))[_0x543afd(0x121)](({node:_0x4c2d43})=>isRecord(_0x4c2d43)&&_0x4c2d43[_0x543afd(0x1d7)]!==undefined):[],_0x8720ca=_0x1c77dd!==undefined||_0x57abc7[_0x543afd(0x251)]>0x0,_0x1d44db=_0x30e102===undefined&&_0x5056a3===_0x543afd(0x19d)?_0x543afd(0x11a):_0x30e102;_0x8720ca&&(_0x5056a3!==_0x543afd(0x19d)||_0x1d44db!==_0x543afd(0x11a))&&(_0x1c77dd!==undefined&&_0x2766aa['push']({'path':_0x543afd(0x236),'message':_0x543afd(0x240)}),_0x57abc7['forEach'](({index:_0x2c7a19})=>{const _0x1ea220=_0x543afd;_0x2766aa[_0x1ea220(0x1e5)]({'path':'flowJson.nodes['+_0x2c7a19+'].path','message':_0x1ea220(0x1c7)});}));}export async function writeNormalizedFlowConfig(_0x2112b1,_0x5410b0,_0x20a723={}){const _0x290e48=a287_0x571368,_0x3e9c9b=resolve(_0x2112b1),_0x2f5ef1=_0x3e9c9b+'.'+process['pid']+'.'+randomUUID()+_0x290e48(0x206),_0x79c502=JSON[_0x290e48(0x1e3)](_0x5410b0,null,0x2)+'\x0a';let _0x15781d;try{try{_0x15781d=(await stat(_0x3e9c9b))[_0x290e48(0x1d1)]&0x1ff;}catch{_0x15781d=undefined;}await writeFile(_0x2f5ef1,_0x79c502,{'encoding':'utf8','flag':'wx','mode':_0x15781d??0x1a4});if(_0x15781d!==undefined)await chmod(_0x2f5ef1,_0x15781d);_0x20a723['overwrite']===![]?(await link(_0x2f5ef1,_0x3e9c9b),await unlink(_0x2f5ef1)):await rename(_0x2f5ef1,_0x3e9c9b);}finally{await unlink(_0x2f5ef1)[_0x290e48(0xf7)](()=>undefined);}}function validateOuterMetadata(_0x4812d9,_0xb358ed){const _0x4745aa=a287_0x571368;(typeof _0x4812d9[_0x4745aa(0x13e)]!==_0x4745aa(0x10a)||_0x4812d9[_0x4745aa(0x13e)][_0x4745aa(0x1d4)]()==='')&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x13e),'message':'flowName\x20is\x20required.'});_0x4812d9[_0x4745aa(0x14e)]!==undefined&&typeof _0x4812d9['flowDesc']!==_0x4745aa(0x10a)&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14e),'message':_0x4745aa(0x17f)});if(_0x4812d9[_0x4745aa(0x155)]===undefined||_0x4812d9['flowType']===null)_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x155),'message':'flowType\x20is\x20required.'});else(typeof _0x4812d9[_0x4745aa(0x155)]!==_0x4745aa(0x10a)||!FLOW_TYPES[_0x4745aa(0x223)](_0x4812d9[_0x4745aa(0x155)]))&&_0xb358ed['push']({'path':'flowType','message':_0x4745aa(0x18d)+String(_0x4812d9['flowType'])+'.'});_0x4812d9['datasetCode']!==undefined&&typeof _0x4812d9[_0x4745aa(0x14d)]!=='string'&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14d),'message':_0x4745aa(0x1bb)}),_0x4812d9[_0x4745aa(0x210)]!==undefined&&(!Number['isInteger'](_0x4812d9[_0x4745aa(0x210)])||_0x4812d9['pageId']<0x0)&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x210),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x4812d9[_0x4745aa(0x155)]===_0x4745aa(0x19d)&&_0x4812d9[_0x4745aa(0x14d)]!==undefined&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x14d),'message':_0x4745aa(0x1ae)}),_0x4812d9['flowType']==='INDEPENDENT_FLOW'&&_0x4812d9[_0x4745aa(0x210)]!==undefined&&_0xb358ed[_0x4745aa(0x1e5)]({'path':_0x4745aa(0x210),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x4d8347,_0x49cf12){const _0x3d4d01=a287_0x571368;if(!isRecord(_0x4d8347)){_0x49cf12['push']({'path':'flowJson','message':_0x3d4d01(0x157)});return;}!Array[_0x3d4d01(0x13a)](_0x4d8347['nodes'])&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':'flowJson.nodes','message':_0x3d4d01(0x188)});!Array[_0x3d4d01(0x13a)](_0x4d8347[_0x3d4d01(0x134)])&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1fb),'message':_0x3d4d01(0x1ff)});Object[_0x3d4d01(0x167)][_0x3d4d01(0x146)][_0x3d4d01(0x154)](_0x4d8347,_0x3d4d01(0x1b7))&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1b8),'message':_0x3d4d01(0x23a)+String(_0x4d8347[_0x3d4d01(0x1b7)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x52e84c of['formSchema',_0x3d4d01(0x11d),_0x3d4d01(0x1c8)]){Object[_0x3d4d01(0x167)]['hasOwnProperty'][_0x3d4d01(0x154)](_0x4d8347,_0x52e84c)&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x1c2)+_0x52e84c,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x3d4d01(0x13a)](_0x4d8347['nodes'])||!Array['isArray'](_0x4d8347[_0x3d4d01(0x134)]))return;const _0x2d3c44=new Map(),_0xcb1e73=[],_0xb839ea=[],_0x38a3ad=new Map(),_0x55db1b=new Map(),_0x4a5345=new Set();let _0x7c278d=0x0;_0x4d8347['nodes'][_0x3d4d01(0x18e)]((_0x238f01,_0x535cb4)=>{const _0x268424=_0x3d4d01,_0x585cde=_0x268424(0x116)+_0x535cb4+']';if(!isRecord(_0x238f01)){_0x49cf12[_0x268424(0x1e5)]({'path':_0x585cde,'message':_0x268424(0x218)});return;}const _0x21a110=_0x238f01;if(typeof _0x21a110['id']!==_0x268424(0x10a)||!BPMN_ID_PATTERN[_0x268424(0x172)](_0x21a110['id']))_0x49cf12['push']({'path':_0x585cde+_0x268424(0x16f),'message':_0x268424(0x159)});else _0x2d3c44[_0x268424(0x223)](_0x21a110['id'])?_0x49cf12['push']({'path':_0x585cde+_0x268424(0x16f),'message':_0x268424(0x106)+_0x21a110['id']+'.'}):(_0x2d3c44['set'](_0x21a110['id'],_0x21a110),_0x4a5345[_0x268424(0x21c)](_0x21a110['id']));if(!NODE_TYPES[_0x268424(0x223)](_0x21a110[_0x268424(0x197)]))_0x49cf12[_0x268424(0x1e5)]({'path':_0x585cde+'.type','message':_0x268424(0x1f9)+String(_0x21a110['type'])+'.'});else{if(_0x21a110[_0x268424(0x197)]===_0x268424(0x22a))_0xcb1e73['push'](_0x21a110['id']);else _0x21a110['type']===_0x268424(0xfc)&&_0xb839ea[_0x268424(0x1e5)](_0x21a110['id']);}_0x21a110[_0x268424(0x197)]===_0x268424(0x124)&&(_0x21a110[_0x268424(0x191)]===undefined||_0x21a110['taskMode']===_0x268424(0x124))&&(_0x7c278d+=0x1);validateNode(_0x21a110,_0x585cde,_0x49cf12);if(_0x21a110[_0x268424(0x197)]===_0x268424(0x1b1)){const _0x5d4887=resolveEffectiveResultVariable(_0x21a110[_0x268424(0x208)],![]);_0x5d4887&&(registerResultVariableOwner(_0x55db1b,_0x5d4887,_0x21a110['id'],_0x49cf12),!_0x38a3ad['has'](_0x5d4887)&&_0x38a3ad[_0x268424(0x156)](_0x5d4887,_0x21a110['id']));}if(_0x21a110[_0x268424(0x197)]==='APPROVAL'&&isRecord(_0x21a110[_0x268424(0x253)])&&_0x21a110[_0x268424(0x253)]['enabled']===!![]&&_0x21a110['timeout'][_0x268424(0x1af)]===_0x268424(0x114)){const _0x443ba1=resolveEffectiveResultVariable(_0x21a110[_0x268424(0x253)][_0x268424(0x208)],!![]);_0x443ba1&&registerResultVariableOwner(_0x55db1b,_0x443ba1,_0x21a110['id']+'.timeout',_0x49cf12);}});_0xcb1e73[_0x3d4d01(0x251)]!==0x1&&_0x49cf12[_0x3d4d01(0x1e5)]({'path':_0x3d4d01(0x24e),'message':_0x3d4d01(0x108)});_0xb839ea[_0x3d4d01(0x251)]===0x0&&_0x49cf12['push']({'path':'flowJson.nodes','message':_0x3d4d01(0x214)});const _0x1ca070=new Map(),_0x15fe0e=new Map(),_0x3e0a65=new Map(),_0x44089c=new Set();_0x4d8347['edges'][_0x3d4d01(0x18e)]((_0x1305dd,_0x1f14cf)=>{const _0x10b54d=_0x3d4d01,_0x1067fb='flowJson.edges['+_0x1f14cf+']';if(!isRecord(_0x1305dd)){_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb,'message':_0x10b54d(0x1d8)});return;}const _0x1130d1=_0x1305dd;_0x3e0a65['set'](_0x1130d1,_0x1067fb);const _0x4ef417=resolveEdgeEndpoint(_0x1130d1[_0x10b54d(0x16d)],_0x1130d1[_0x10b54d(0x112)]),_0x1ceb56=resolveEdgeEndpoint(_0x1130d1[_0x10b54d(0x151)],_0x1130d1['targetNodeId']);if(!_0x4ef417)_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x15e),'message':_0x10b54d(0x1d5)});if(!_0x1ceb56)_0x49cf12['push']({'path':_0x1067fb+_0x10b54d(0x184),'message':'edge\x20target\x20is\x20required.'});_0x4ef417&&!_0x2d3c44[_0x10b54d(0x223)](_0x4ef417)&&_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x15e),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x4ef417+'.'});_0x1ceb56&&!_0x2d3c44['has'](_0x1ceb56)&&_0x49cf12['push']({'path':_0x1067fb+_0x10b54d(0x184),'message':_0x10b54d(0x1fa)+_0x1ceb56+'.'});if(_0x1130d1['id']!==undefined){if(typeof _0x1130d1['id']!==_0x10b54d(0x10a)||!BPMN_ID_PATTERN['test'](_0x1130d1['id']))_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x16f),'message':_0x10b54d(0x17b)});else{if(_0x4a5345[_0x10b54d(0x223)](_0x1130d1['id']))_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb+_0x10b54d(0x16f),'message':_0x10b54d(0x150)+_0x1130d1['id']+'.'});else!_0x4a5345[_0x10b54d(0x223)](_0x1130d1['id'])&&_0x4a5345[_0x10b54d(0x21c)](_0x1130d1['id']);}}if(_0x4ef417&&_0x1ceb56){const _0x542f1c=_0x4ef417+'\x00'+_0x1ceb56+'\x00'+(_0x1130d1[_0x10b54d(0x23b)]??_0x10b54d(0x18a));_0x44089c[_0x10b54d(0x223)](_0x542f1c)?_0x49cf12[_0x10b54d(0x1e5)]({'path':_0x1067fb,'message':_0x10b54d(0xff)+_0x4ef417+_0x10b54d(0x120)+_0x1ceb56+'\x20('+(_0x1130d1[_0x10b54d(0x23b)]??'ALWAYS')+').'}):_0x44089c[_0x10b54d(0x21c)](_0x542f1c);}validateEdge(_0x1130d1,_0x1067fb,_0x49cf12),_0x4ef417&&_0x1ceb56&&(_0x1ca070[_0x10b54d(0x19f)](_0x4ef417)?.[_0x10b54d(0x1e5)](_0x1130d1)??_0x1ca070['set'](_0x4ef417,[_0x1130d1]),_0x15fe0e[_0x10b54d(0x19f)](_0x1ceb56)?.[_0x10b54d(0x1e5)](_0x1130d1)??_0x15fe0e[_0x10b54d(0x156)](_0x1ceb56,[_0x1130d1]));});if(_0xcb1e73[_0x3d4d01(0x251)]!==0x1)return;validateGraphShape(_0x2d3c44,_0xcb1e73[0x0],_0xb839ea,_0x1ca070,_0x15fe0e,_0x3e0a65,_0x49cf12),validateScriptResultReferences(_0x2d3c44,_0xcb1e73[0x0],_0x1ca070,_0x15fe0e,_0x3e0a65,_0x38a3ad,_0x49cf12),validateApprovalResults(_0x2d3c44,_0x7c278d,_0xb839ea,_0x49cf12);}function validateNode(_0x34b384,_0x2e9598,_0x180b59){const _0x54bbb3=a287_0x571368;for(const _0x4e2fa0 of[_0x54bbb3(0x143),_0x54bbb3(0x1d6)]){Object[_0x54bbb3(0x167)][_0x54bbb3(0x146)][_0x54bbb3(0x154)](_0x34b384,_0x4e2fa0)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.'+_0x4e2fa0,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x54bbb3(0x223)](_0x34b384[_0x54bbb3(0x197)]))return;(typeof _0x34b384[_0x54bbb3(0x127)]!=='string'||_0x34b384[_0x54bbb3(0x127)][_0x54bbb3(0x1d4)]()==='')&&_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x1d3),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x34b384['pageId']!==undefined&&_0x180b59['push']({'path':_0x2e9598+'.pageId','message':_0x54bbb3(0xf9)});if(_0x34b384['path']!==undefined){if(typeof _0x34b384[_0x54bbb3(0x1d7)]!==_0x54bbb3(0x10a)||_0x34b384[_0x54bbb3(0x1d7)][_0x54bbb3(0x1d4)]()==='')_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1b2),'message':_0x54bbb3(0x15a)});else _0x34b384['type']!==_0x54bbb3(0x124)&&_0x34b384[_0x54bbb3(0x197)]!==_0x54bbb3(0xfc)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1b2),'message':_0x54bbb3(0x234)});}const _0x37da25=_0x34b384[_0x54bbb3(0x1fe)];if(!isRecord(_0x37da25))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x16a),'message':_0x54bbb3(0x125)});else for(const _0x54db46 of['x','y']){const _0x180c1d=_0x37da25[_0x54db46];(typeof _0x180c1d!==_0x54bbb3(0x15f)||!Number[_0x54bbb3(0x1f6)](_0x180c1d)||_0x180c1d<0x0)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.position.'+_0x54db46,'message':_0x54bbb3(0x12f)+_0x54db46+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x34b384['type']===_0x54bbb3(0x124)){const _0x439764=_0x34b384[_0x54bbb3(0x10b)]??_0x54bbb3(0x1e4),_0x299213=_0x34b384[_0x54bbb3(0x191)]??_0x54bbb3(0x124);!APPROVAL_TASK_MODES[_0x54bbb3(0x223)](_0x299213)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x299213)+'.'});!APPROVAL_MODES[_0x54bbb3(0x223)](_0x439764)&&_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x229),'message':_0x54bbb3(0x129)+String(_0x439764)+'.'});if(!isRecord(_0x34b384[_0x54bbb3(0x15c)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.assignee','message':_0x54bbb3(0x17d)});else{const _0x583161=_0x34b384[_0x54bbb3(0x15c)][_0x54bbb3(0x10c)];_0x583161!==_0x54bbb3(0x1de)&&_0x583161!==_0x54bbb3(0x14c)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.assignee.strategy','message':_0x54bbb3(0x233)});if(_0x583161===_0x54bbb3(0x1de)){const _0x51fcd0=_0x34b384[_0x54bbb3(0x15c)]['userIds'];if(!Array[_0x54bbb3(0x13a)](_0x51fcd0)||_0x51fcd0[_0x54bbb3(0x251)]===0x0)_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a9),'message':_0x54bbb3(0x152)});else{const _0x2447ce=_0x51fcd0[_0x54bbb3(0x158)](_0x5a26b0=>!isValidUserId(_0x5a26b0));_0x2447ce>=0x0&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a8)+_0x2447ce+']','message':_0x54bbb3(0x173)});const _0x2a94b8=new Set(_0x51fcd0[_0x54bbb3(0x121)](isValidUserId)[_0x54bbb3(0x1f7)](_0x10c011=>String(_0x10c011)[_0x54bbb3(0x1d4)]()));_0x439764===_0x54bbb3(0x1e4)&&_0x2a94b8['size']>0x1&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x1a9),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x583161===_0x54bbb3(0x14c)){const _0x5f0ca3=_0x34b384['assignee'][_0x54bbb3(0x115)],_0xbcf82e=typeof _0x5f0ca3===_0x54bbb3(0x15f)||typeof _0x5f0ca3===_0x54bbb3(0x10a)?Number(String(_0x5f0ca3)['trim']()):Number[_0x54bbb3(0x1a5)];(!Number[_0x54bbb3(0x202)](_0xbcf82e)||_0xbcf82e<=0x0)&&_0x180b59['push']({'path':_0x2e9598+'.assignee.roleId','message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x34b384['transferCandidates']!==undefined){if(!isRecord(_0x34b384[_0x54bbb3(0x144)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.transferCandidates','message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x34b384[_0x54bbb3(0x144)]['strategy']!==_0x54bbb3(0x1de))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x12e),'message':_0x54bbb3(0x107)});else{const _0x3346f3=_0x34b384[_0x54bbb3(0x144)][_0x54bbb3(0x252)];if(!Array[_0x54bbb3(0x13a)](_0x3346f3)||_0x3346f3[_0x54bbb3(0x251)]===0x0)_0x180b59['push']({'path':_0x2e9598+_0x54bbb3(0x175),'message':_0x54bbb3(0x19e)});else{const _0x37b49f=_0x3346f3[_0x54bbb3(0x158)](_0xe50e06=>!isValidUserId(_0xe50e06));_0x37b49f>=0x0&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x23f)+_0x37b49f+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x34b384[_0x54bbb3(0xfd)]!==undefined&&typeof _0x34b384[_0x54bbb3(0xfd)]!==_0x54bbb3(0x16e)&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+'.sequential','message':_0x54bbb3(0x246)});if(_0x34b384[_0x54bbb3(0x197)]===_0x54bbb3(0x1b1)){(typeof _0x34b384[_0x54bbb3(0x11c)]!=='string'||_0x34b384['scriptName'][_0x54bbb3(0x1d4)]()==='')&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x15d),'message':_0x54bbb3(0x1bf)});if(_0x34b384[_0x54bbb3(0x208)]!==undefined){if(typeof _0x34b384[_0x54bbb3(0x208)]!==_0x54bbb3(0x10a)||!VARIABLE_PATTERN[_0x54bbb3(0x172)](_0x34b384[_0x54bbb3(0x208)]))_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x149),'message':_0x54bbb3(0x1f8)});else(RESERVED_RESULT_VARIABLES[_0x54bbb3(0x223)](_0x34b384[_0x54bbb3(0x208)])||_0x34b384['resultVariable'][_0x54bbb3(0x199)](_0x54bbb3(0x1a4)))&&_0x180b59[_0x54bbb3(0x1e5)]({'path':_0x2e9598+_0x54bbb3(0x149),'message':_0x54bbb3(0x105)+_0x34b384['resultVariable']+'.'});}}validateAsyncExecution(_0x34b384,_0x2e9598,_0x180b59),validateApprovalTimeout(_0x34b384,_0x2e9598,_0x180b59),validateCcConfig(_0x34b384,_0x2e9598,_0x180b59),_0x34b384[_0x54bbb3(0x197)]===_0x54bbb3(0x211)&&validateNotificationConfig(_0x34b384[_0x54bbb3(0x24f)],_0x2e9598+_0x54bbb3(0x103),_0x180b59);}function validateAsyncExecution(_0xf81579,_0x1d1372,_0x18801b){const _0xf70028=a287_0x571368;if(_0xf81579[_0xf70028(0x18b)]===undefined)return;if(!isRecord(_0xf81579[_0xf70028(0x18b)])){_0x18801b['push']({'path':_0x1d1372+_0xf70028(0x204),'message':_0xf70028(0x193)});return;}if(_0xf81579[_0xf70028(0x18b)]['enabled']!==undefined&&typeof _0xf81579[_0xf70028(0x18b)][_0xf70028(0x1b0)]!=='boolean'){_0x18801b[_0xf70028(0x1e5)]({'path':_0x1d1372+'.async.enabled','message':_0xf70028(0x130)});return;}if(_0xf81579[_0xf70028(0x18b)][_0xf70028(0x1b0)]!==!![])return;_0xf81579[_0xf70028(0x197)]!==_0xf70028(0x1b1)&&_0x18801b['push']({'path':_0x1d1372+_0xf70028(0x204),'message':_0xf70028(0x22d)});const _0x2e2869=_0xf81579[_0xf70028(0x18b)][_0xf70028(0x238)]??0x3;(!Number['isInteger'](_0x2e2869)||_0x2e2869<0x1||_0x2e2869>MAX_ASYNC_RETRY_COUNT)&&_0x18801b[_0xf70028(0x1e5)]({'path':_0x1d1372+_0xf70028(0x161),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0xf81579[_0xf70028(0x18b)][_0xf70028(0x20c)]!==undefined&&validateTimeAmount(_0xf81579[_0xf70028(0x18b)][_0xf70028(0x20c)],_0x1d1372+'.async.retryInterval',_0x18801b);}function validateApprovalTimeout(_0x7d778d,_0x361af4,_0xb1c558){const _0x5532e8=a287_0x571368;if(_0x7d778d['timeout']===undefined)return;if(!isRecord(_0x7d778d[_0x5532e8(0x253)])){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x196),'message':_0x5532e8(0x242)});return;}if(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1b0)]!==undefined&&typeof _0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1b0)]!==_0x5532e8(0x16e)){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x100),'message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x7d778d['timeout'][_0x5532e8(0x1b0)]!==!![])return;if(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]!==undefined&&typeof _0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]!=='boolean'){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.interrupting','message':_0x5532e8(0x249)});return;}_0x7d778d['type']!==_0x5532e8(0x124)&&_0xb1c558['push']({'path':_0x361af4+_0x5532e8(0x196),'message':_0x5532e8(0x1cf)});validateTimeAmount(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x1c5)],_0x361af4+_0x5532e8(0x131),_0xb1c558);const _0x23c0ed=_0x7d778d['timeout'][_0x5532e8(0x1af)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x23c0ed)){_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.action','message':_0x5532e8(0x20d)});return;}(_0x7d778d[_0x5532e8(0x191)]??_0x5532e8(0x124))===_0x5532e8(0x213)&&_0x23c0ed!=='EXECUTE_BFF'&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x1df),'message':_0x5532e8(0x186)});const _0x26091c=_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x11e)]??_0x23c0ed!=='EXECUTE_BFF';if(_0x23c0ed===_0x5532e8(0x114))_0x26091c&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+'.timeout.interrupting','message':_0x5532e8(0x1ca)}),(typeof _0x7d778d[_0x5532e8(0x253)]['scriptName']!==_0x5532e8(0x10a)||_0x7d778d['timeout'][_0x5532e8(0x11c)]['trim']()==='')&&_0xb1c558[_0x5532e8(0x1e5)]({'path':_0x361af4+_0x5532e8(0x138),'message':_0x5532e8(0x118)}),validateOptionalResultVariable(_0x7d778d[_0x5532e8(0x253)][_0x5532e8(0x208)],_0x361af4+_0x5532e8(0x1a0),_0xb1c558);else!_0x26091c&&_0xb1c558['push']({'path':_0x361af4+_0x5532e8(0x24d),'message':_0x23c0ed+_0x5532e8(0x176)});}function validateTimeAmount(_0x5e2733,_0x4557d0,_0x207d76){const _0x2e0ec8=a287_0x571368;if(!isRecord(_0x5e2733)){_0x207d76[_0x2e0ec8(0x1e5)]({'path':_0x4557d0,'message':_0x2e0ec8(0x165)});return;}(!Number[_0x2e0ec8(0x22e)](_0x5e2733[_0x2e0ec8(0x190)])||Number(_0x5e2733['value'])<=0x0)&&_0x207d76['push']({'path':_0x4557d0+_0x2e0ec8(0x11b),'message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x2e0ec8(0x223)](_0x5e2733[_0x2e0ec8(0x220)])&&_0x207d76[_0x2e0ec8(0x1e5)]({'path':_0x4557d0+_0x2e0ec8(0x164),'message':_0x2e0ec8(0x21f)});}function validateOptionalResultVariable(_0x145817,_0x4318fc,_0x1dc2db){const _0x32e7c5=a287_0x571368;if(_0x145817===undefined||_0x145817===null||_0x145817==='')return;if(typeof _0x145817!=='string'||!VARIABLE_PATTERN[_0x32e7c5(0x172)](_0x145817))_0x1dc2db[_0x32e7c5(0x1e5)]({'path':_0x4318fc,'message':_0x32e7c5(0x1f8)});else(RESERVED_RESULT_VARIABLES[_0x32e7c5(0x223)](_0x145817)||_0x145817[_0x32e7c5(0x199)](_0x32e7c5(0x1a4)))&&_0x1dc2db[_0x32e7c5(0x1e5)]({'path':_0x4318fc,'message':_0x32e7c5(0x105)+_0x145817+'.'});}function validateCcConfig(_0x285cd7,_0x583be8,_0x386bcf){const _0x95d910=a287_0x571368;if(_0x285cd7['cc']===undefined)return;if(!isRecord(_0x285cd7['cc'])){_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x1c0),'message':_0x95d910(0x179)});return;}_0x285cd7[_0x95d910(0x197)]!=='END'&&_0x285cd7[_0x95d910(0x197)]!==_0x95d910(0x124)&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+'.cc','message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x95d910(0x167)][_0x95d910(0x146)][_0x95d910(0x154)](_0x285cd7['cc'],_0x95d910(0x132))&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x1fd),'message':UNSUPPORTED_FORM_MESSAGE});const _0x23792f=_0x285cd7['cc'][_0x95d910(0x110)];if(!Array[_0x95d910(0x13a)](_0x23792f)||_0x23792f[_0x95d910(0x251)]===0x0)_0x386bcf['push']({'path':_0x583be8+_0x95d910(0x24b),'message':_0x95d910(0x183)});else{_0x23792f['length']>MAX_CC_RECIPIENTS&&_0x386bcf[_0x95d910(0x1e5)]({'path':_0x583be8+_0x95d910(0x24b),'message':_0x95d910(0x126)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x4999ae=new Set();_0x23792f[_0x95d910(0x18e)]((_0x123fc3,_0x145ad1)=>{const _0x58637d=_0x95d910;if(typeof _0x123fc3!==_0x58637d(0x10a)||_0x123fc3[_0x58637d(0x1d4)]()==='')_0x386bcf[_0x58637d(0x1e5)]({'path':_0x583be8+_0x58637d(0x24c)+_0x145ad1+']','message':_0x58637d(0x20a)});else _0x4999ae[_0x58637d(0x223)](_0x123fc3[_0x58637d(0x1d4)]())?_0x386bcf[_0x58637d(0x1e5)]({'path':_0x583be8+_0x58637d(0x24c)+_0x145ad1+']','message':_0x58637d(0x1b4)+_0x123fc3[_0x58637d(0x1d4)]()+'.'}):_0x4999ae['add'](_0x123fc3['trim']());});}validateStringArray(_0x285cd7['cc'][_0x95d910(0x1cd)],_0x583be8+'.cc.visible',_0x386bcf);}function validateStringArray(_0x4d66cb,_0x540796,_0x40c35f){const _0x3ab9e6=a287_0x571368;if(_0x4d66cb===undefined)return;if(!Array[_0x3ab9e6(0x13a)](_0x4d66cb)){_0x40c35f[_0x3ab9e6(0x1e5)]({'path':_0x540796,'message':_0x3ab9e6(0x241)});return;}const _0x1199f2=new Set();_0x4d66cb[_0x3ab9e6(0x18e)]((_0x1067e6,_0x4c7d7f)=>{const _0x5921c2=_0x3ab9e6;if(typeof _0x1067e6!=='string'||_0x1067e6[_0x5921c2(0x1d4)]()==='')_0x40c35f[_0x5921c2(0x1e5)]({'path':_0x540796+'['+_0x4c7d7f+']','message':_0x5921c2(0x219)});else _0x1199f2[_0x5921c2(0x223)](_0x1067e6[_0x5921c2(0x1d4)]())?_0x40c35f[_0x5921c2(0x1e5)]({'path':_0x540796+'['+_0x4c7d7f+']','message':_0x5921c2(0x192)+_0x1067e6[_0x5921c2(0x1d4)]()+'.'}):_0x1199f2[_0x5921c2(0x21c)](_0x1067e6[_0x5921c2(0x1d4)]());});}function validateNotificationConfig(_0x2200b6,_0x3295c9,_0x28a022){const _0x5f3d2c=a287_0x571368;if(!isRecord(_0x2200b6)){_0x28a022['push']({'path':_0x3295c9,'message':_0x5f3d2c(0x14b)});return;}if(_0x2200b6[_0x5f3d2c(0x1e6)]!==undefined&&_0x2200b6[_0x5f3d2c(0x1e6)]!==null){if(typeof _0x2200b6['version']!==_0x5f3d2c(0x10a))_0x28a022['push']({'path':_0x3295c9+'.version','message':_0x5f3d2c(0x19b)});else _0x2200b6[_0x5f3d2c(0x1e6)][_0x5f3d2c(0x1d4)]()&&_0x2200b6[_0x5f3d2c(0x1e6)][_0x5f3d2c(0x1d4)]()!=='v1'&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x123),'message':_0x5f3d2c(0x10f)+_0x2200b6[_0x5f3d2c(0x1e6)]+'.'});}const _0x3caf32=requireNotificationString(_0x2200b6[_0x5f3d2c(0x215)],_0x3295c9+_0x5f3d2c(0x136),'Notification\x20configCode\x20is\x20required.',_0x28a022);_0x3caf32?.['includes']('${')&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x136),'message':_0x5f3d2c(0x170)});if(_0x2200b6[_0x5f3d2c(0x19c)]!==undefined&&_0x2200b6[_0x5f3d2c(0x19c)]!==null){if(typeof _0x2200b6[_0x5f3d2c(0x19c)]!==_0x5f3d2c(0x10a))_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x10e),'message':_0x5f3d2c(0xf6)});else!NOTIFICATION_FAILURE_POLICIES[_0x5f3d2c(0x223)](_0x2200b6[_0x5f3d2c(0x19c)]['trim']()[_0x5f3d2c(0x255)]())&&_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x10e),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x2200b6[_0x5f3d2c(0x1be)])?_0x28a022[_0x5f3d2c(0x1e5)]({'path':_0x3295c9+_0x5f3d2c(0x1c3),'message':_0x5f3d2c(0x17c)}):validateNotificationTemplate(_0x2200b6['template'],_0x3295c9+_0x5f3d2c(0x1c3),_0x28a022),validateNotificationRecipients(_0x2200b6[_0x5f3d2c(0x174)],_0x3295c9+'.recipients',_0x28a022);}function validateNotificationTemplate(_0x2900d7,_0x17412e,_0x3f3730){const _0x2807b7=a287_0x571368;for(const _0x5c2d72 of[_0x2807b7(0x104),_0x2807b7(0x1a7)]){const _0x1c9281=requireNotificationString(_0x2900d7[_0x5c2d72],_0x17412e+'.'+_0x5c2d72,_0x2807b7(0x1d0)+_0x5c2d72+_0x2807b7(0x1f5),_0x3f3730);if(_0x1c9281)validateNotificationPlaceholders(_0x1c9281,_0x17412e+'.'+_0x5c2d72,_0x3f3730);}_0x2900d7[_0x2807b7(0x1ef)]!==undefined&&_0x2900d7[_0x2807b7(0x1ef)]!==null&&(typeof _0x2900d7[_0x2807b7(0x1ef)]!=='string'?_0x3f3730['push']({'path':_0x17412e+'.detailMarkdown','message':_0x2807b7(0x135)}):validateNotificationPlaceholders(_0x2900d7['detailMarkdown'],_0x17412e+_0x2807b7(0x117),_0x3f3730)),validateNotificationFacts(_0x2900d7[_0x2807b7(0x230)],_0x17412e+'.facts',_0x3f3730),validateNotificationActions(_0x2900d7[_0x2807b7(0x221)],_0x17412e+'.actions',_0x3f3730);}function validateNotificationFacts(_0x4ed697,_0x3791dd,_0x35a76c){const _0x1404ff=a287_0x571368;if(_0x4ed697===undefined||_0x4ed697===null)return;if(!Array[_0x1404ff(0x13a)](_0x4ed697)){_0x35a76c[_0x1404ff(0x1e5)]({'path':_0x3791dd,'message':_0x1404ff(0x21e)});return;}_0x4ed697[_0x1404ff(0x251)]>MAX_NOTIFICATION_FACTS&&_0x35a76c[_0x1404ff(0x1e5)]({'path':_0x3791dd,'message':_0x1404ff(0x101)+MAX_NOTIFICATION_FACTS+_0x1404ff(0x141)}),_0x4ed697[_0x1404ff(0x18e)]((_0x165663,_0x3a3df2)=>{const _0x1056cd=_0x1404ff,_0xd6a11a=_0x3791dd+'['+_0x3a3df2+']';if(!isRecord(_0x165663)){_0x35a76c['push']({'path':_0xd6a11a,'message':_0x1056cd(0x1cb)});return;}for(const _0xc8bbc8 of[_0x1056cd(0x133),'value']){const _0x4f5779=requireNotificationString(_0x165663[_0xc8bbc8],_0xd6a11a+'.'+_0xc8bbc8,_0x1056cd(0x140)+_0xc8bbc8+_0x1056cd(0x1f5),_0x35a76c);_0x4f5779&&validateNotificationPlaceholders(_0x4f5779,_0xd6a11a+'.'+_0xc8bbc8,_0x35a76c);}});}function validateNotificationActions(_0x28e142,_0x506a0a,_0x54960c){const _0x5ba567=a287_0x571368;if(_0x28e142===undefined||_0x28e142===null)return;if(!Array[_0x5ba567(0x13a)](_0x28e142)){_0x54960c[_0x5ba567(0x1e5)]({'path':_0x506a0a,'message':_0x5ba567(0xf5)});return;}_0x28e142[_0x5ba567(0x251)]>MAX_NOTIFICATION_ACTIONS&&_0x54960c[_0x5ba567(0x1e5)]({'path':_0x506a0a,'message':_0x5ba567(0x101)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x28e142['forEach']((_0x23395f,_0x56b422)=>{const _0x51620f=_0x5ba567,_0x303f06=_0x506a0a+'['+_0x56b422+']';if(!isRecord(_0x23395f)){_0x54960c[_0x51620f(0x1e5)]({'path':_0x303f06,'message':_0x51620f(0x1d9)});return;}const _0x1686d2=requireNotificationString(_0x23395f['text'],_0x303f06+_0x51620f(0x1e1),'Notification\x20action.text\x20is\x20required.',_0x54960c);if(_0x1686d2)validateNotificationPlaceholders(_0x1686d2,_0x303f06+_0x51620f(0x1e1),_0x54960c);const _0x385f17=requireNotificationString(_0x23395f[_0x51620f(0x13d)],_0x303f06+_0x51620f(0x16b),'Notification\x20action.url\x20is\x20required.',_0x54960c);if(!_0x385f17)return;validateNotificationPlaceholders(_0x385f17,_0x303f06+_0x51620f(0x16b),_0x54960c),!/^https?:\/\//i[_0x51620f(0x172)](_0x385f17)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x51620f(0x172)](_0x385f17)&&_0x54960c[_0x51620f(0x1e5)]({'path':_0x303f06+_0x51620f(0x16b),'message':_0x51620f(0x20f)});});}function validateNotificationRecipients(_0x586410,_0x31c45e,_0x4310ff){const _0x2642d4=a287_0x571368;if(_0x586410===undefined||_0x586410===null)return;if(!Array['isArray'](_0x586410)){_0x4310ff[_0x2642d4(0x1e5)]({'path':_0x31c45e,'message':_0x2642d4(0x162)});return;}let _0x29c700=![];_0x586410['forEach']((_0x484320,_0x5b05e6)=>{const _0x3cec7e=_0x2642d4,_0x51b351=_0x31c45e+'['+_0x5b05e6+']';if(!isRecord(_0x484320)){_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351,'message':_0x3cec7e(0x153)});return;}const _0x278ca1=requireNotificationString(_0x484320[_0x3cec7e(0x197)],_0x51b351+_0x3cec7e(0x244),_0x3cec7e(0x14a),_0x4310ff);_0x278ca1&&!NOTIFICATION_RECIPIENT_TYPES[_0x3cec7e(0x223)](_0x278ca1['toUpperCase']())&&_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x244),'message':_0x3cec7e(0x12d)});let _0x351bc5='TO';_0x484320[_0x3cec7e(0x166)]!==undefined&&_0x484320['role']!==null&&(typeof _0x484320[_0x3cec7e(0x166)]!==_0x3cec7e(0x10a)?(_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x1dc),'message':_0x3cec7e(0x1bd)}),_0x351bc5=''):(_0x351bc5=_0x484320['role'][_0x3cec7e(0x1d4)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x3cec7e(0x223)](_0x351bc5)&&_0x4310ff[_0x3cec7e(0x1e5)]({'path':_0x51b351+_0x3cec7e(0x1dc),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x351bc5==='TO')_0x29c700=!![];const _0x5c720e=requireNotificationString(_0x484320['value'],_0x51b351+_0x3cec7e(0x11b),_0x3cec7e(0x21b),_0x4310ff);_0x5c720e&&validateNotificationPlaceholders(_0x5c720e,_0x51b351+_0x3cec7e(0x11b),_0x4310ff);}),_0x586410['length']>0x0&&!_0x29c700&&_0x4310ff[_0x2642d4(0x1e5)]({'path':_0x31c45e,'message':_0x2642d4(0x187)});}function requireNotificationString(_0x4f29d5,_0x48a9e8,_0x58b439,_0x5e4320){const _0x3765b9=a287_0x571368;if(typeof _0x4f29d5!==_0x3765b9(0x10a)||_0x4f29d5[_0x3765b9(0x1d4)]()==='')return _0x5e4320[_0x3765b9(0x1e5)]({'path':_0x48a9e8,'message':_0x58b439}),undefined;return _0x4f29d5['trim']();}function validateNotificationPlaceholders(_0x33006d,_0xac492b,_0x16dea7){const _0xd2de64=a287_0x571368;for(const _0x2bd9c5 of _0x33006d['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4e76eb=_0x2bd9c5[0x1]?.['trim']()??'',_0x2aaf8e=_0x4e76eb[_0xd2de64(0x23c)]('.'),_0x4a396c=_0x2aaf8e>=0x0?_0x4e76eb['slice'](0x0,_0x2aaf8e):_0x4e76eb,_0xc29e2e=_0x2aaf8e>=0x0?_0x4e76eb[_0xd2de64(0x1e7)](_0x2aaf8e+0x1)[_0xd2de64(0x1d4)]():'';(![_0xd2de64(0x139),_0xd2de64(0x12a),'variables'][_0xd2de64(0x15b)](_0x4a396c)||_0xc29e2e==='')&&_0x16dea7[_0xd2de64(0x1e5)]({'path':_0xac492b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x2bd9c5[0x0]+'.'});}_0x33006d[_0xd2de64(0x200)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0xd2de64(0x15b)]('${')&&_0x16dea7['push']({'path':_0xac492b,'message':_0xd2de64(0x180)});}function validateEdge(_0x20d935,_0x5b1ef0,_0x418a1c){const _0x502fa7=a287_0x571368;_0x20d935[_0x502fa7(0x127)]!==undefined&&typeof _0x20d935[_0x502fa7(0x127)]!==_0x502fa7(0x10a)&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x1d3),'message':_0x502fa7(0x147)}),_0x20d935[_0x502fa7(0x20e)]!==undefined&&typeof _0x20d935[_0x502fa7(0x20e)]!==_0x502fa7(0x16e)&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x178),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x20d935[_0x502fa7(0x182)]!==undefined&&(!Array[_0x502fa7(0x13a)](_0x20d935[_0x502fa7(0x182)])?_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x227),'message':_0x502fa7(0x13b)}):_0x20d935[_0x502fa7(0x182)][_0x502fa7(0x18e)]((_0x232bdf,_0x153858)=>{const _0x2b59de=_0x502fa7;if(!isRecord(_0x232bdf)){_0x418a1c['push']({'path':_0x5b1ef0+_0x2b59de(0x224)+_0x153858+']','message':_0x2b59de(0x232)});return;}for(const _0x3633c6 of['x','y']){const _0x583a23=_0x232bdf[_0x3633c6];(typeof _0x583a23!==_0x2b59de(0x15f)||!Number[_0x2b59de(0x1f6)](_0x583a23))&&_0x418a1c[_0x2b59de(0x1e5)]({'path':_0x5b1ef0+'.waypoints['+_0x153858+'].'+_0x3633c6,'message':_0x2b59de(0x12c)+_0x3633c6+_0x2b59de(0x1ba)});}})),_0x20d935['conditionType']!==undefined&&!CONDITION_TYPES[_0x502fa7(0x223)](_0x20d935[_0x502fa7(0x23b)])&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x19a),'message':_0x502fa7(0x1b3)+String(_0x20d935['conditionType'])+'.'}),_0x20d935[_0x502fa7(0x23b)]===_0x502fa7(0x225)&&(typeof _0x20d935['expression']!==_0x502fa7(0x10a)||_0x20d935[_0x502fa7(0x239)]['trim']()==='')&&_0x418a1c[_0x502fa7(0x1e5)]({'path':_0x5b1ef0+_0x502fa7(0x21d),'message':_0x502fa7(0x212)}),_0x20d935[_0x502fa7(0x20e)]===!![]&&_0x20d935['conditionType']!==_0x502fa7(0x18a)&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x178),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x20d935[_0x502fa7(0x20e)]===!![]&&typeof _0x20d935[_0x502fa7(0x239)]===_0x502fa7(0x10a)&&_0x20d935[_0x502fa7(0x239)][_0x502fa7(0x1d4)]()!==''&&_0x418a1c['push']({'path':_0x5b1ef0+_0x502fa7(0x21d),'message':_0x502fa7(0x16c)});}function validateGraphShape(_0x32d509,_0x140a86,_0x297484,_0x14e133,_0x2c7499,_0x4497b9,_0x355590){const _0x3ffe76=a287_0x571368;for(const [_0x4fce7f,_0x47af26]of _0x32d509){const _0x272608=_0x2c7499['get'](_0x4fce7f)??[],_0x32456a=_0x14e133[_0x3ffe76(0x19f)](_0x4fce7f)??[];_0x47af26[_0x3ffe76(0x197)]!==_0x3ffe76(0x22a)&&_0x272608[_0x3ffe76(0x251)]===0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x1f4)});_0x47af26[_0x3ffe76(0x197)]!==_0x3ffe76(0xfc)&&_0x32456a[_0x3ffe76(0x251)]===0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x145)});_0x47af26[_0x3ffe76(0x197)]===_0x3ffe76(0x22a)&&_0x272608['length']>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x4fce7f,'message':_0x3ffe76(0x160)});_0x47af26[_0x3ffe76(0x197)]==='END'&&_0x32456a[_0x3ffe76(0x251)]>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x47af26['type']===_0x3ffe76(0x1fc)){_0x32456a[_0x3ffe76(0x251)]<0x2&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x23e)});const _0x5e2e7=_0x32456a['filter'](_0x4f3950=>_0x4f3950[_0x3ffe76(0x20e)]===!![]);_0x5e2e7[_0x3ffe76(0x251)]!==0x1&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x111)});if(_0x5e2e7[_0x3ffe76(0x251)]===0x1){const _0xc637ac=_0x5e2e7[0x0],_0x46d407=_0x4497b9['get'](_0xc637ac)??_0x3ffe76(0x1fb);_0xc637ac[_0x3ffe76(0x23b)]!==_0x3ffe76(0x18a)&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x46d407+'.conditionType','message':_0x3ffe76(0x231)});_0xc637ac[_0x3ffe76(0x239)]!==undefined&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x46d407+'.expression','message':_0x3ffe76(0x1c6)});for(const _0x2cbb86 of _0x32456a){if(_0x2cbb86===_0xc637ac)continue;const _0x1196fa=_0x4497b9[_0x3ffe76(0x19f)](_0x2cbb86)??'flowJson.edges';if(_0x2cbb86[_0x3ffe76(0x23b)]!==_0x3ffe76(0x225))_0x355590[_0x3ffe76(0x1e5)]({'path':_0x1196fa+_0x3ffe76(0x19a),'message':_0x3ffe76(0x248)});else(typeof _0x2cbb86[_0x3ffe76(0x239)]!=='string'||_0x2cbb86['expression'][_0x3ffe76(0x1d4)]()==='')&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x1196fa+_0x3ffe76(0x21d),'message':_0x3ffe76(0x24a)});}}}if(_0x47af26[_0x3ffe76(0x197)]===_0x3ffe76(0x124)&&(_0x47af26[_0x3ffe76(0x191)]??_0x3ffe76(0x124))===_0x3ffe76(0x213)){if(_0x32456a[_0x3ffe76(0x251)]!==0x1)_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x194328=_0x32456a[0x0];((_0x194328[_0x3ffe76(0x23b)]??'ALWAYS')!==_0x3ffe76(0x18a)||_0x194328[_0x3ffe76(0x20e)]===!![]||typeof _0x194328['expression']==='string'&&_0x194328[_0x3ffe76(0x239)]['trim']()!=='')&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x4497b9[_0x3ffe76(0x19f)](_0x194328)??_0x3ffe76(0x1fb),'message':_0x3ffe76(0x235)});}}else{if(_0x47af26[_0x3ffe76(0x197)]==='APPROVAL'){const _0x14bcc6=_0x32456a[_0x3ffe76(0x1f7)](_0x33382a=>_0x33382a[_0x3ffe76(0x23b)]??_0x3ffe76(0x18a)),_0x43d282=_0x14bcc6['filter'](_0x8003a5=>_0x8003a5!==_0x3ffe76(0x102)&&_0x8003a5!==_0x3ffe76(0x169));_0x43d282['length']>0x0&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x4fce7f,'message':_0x3ffe76(0x128)}),_0x14bcc6['filter'](_0x2e8a5e=>_0x2e8a5e===_0x3ffe76(0x102))[_0x3ffe76(0x251)]!==0x1&&_0x355590[_0x3ffe76(0x1e5)]({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':_0x3ffe76(0x12b)}),_0x14bcc6[_0x3ffe76(0x121)](_0x4da2d9=>_0x4da2d9===_0x3ffe76(0x169))['length']!==0x1&&_0x355590['push']({'path':_0x3ffe76(0x1d2)+_0x4fce7f,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x32456a[_0x3ffe76(0x17e)](_0x4a0b7f=>_0x4a0b7f['defaultFlow']===!![])&&_0x355590['push']({'path':'flowJson.nodes.'+_0x4fce7f,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x3bb34c=new Set(),_0x105d4b=_0x3412d4=>{const _0x5be179=_0x3ffe76;if(_0x3bb34c[_0x5be179(0x223)](_0x3412d4))return;_0x3bb34c[_0x5be179(0x21c)](_0x3412d4);for(const _0x36217b of _0x14e133[_0x5be179(0x19f)](_0x3412d4)??[]){const _0x4b2bf1=resolveEdgeEndpoint(_0x36217b[_0x5be179(0x151)],_0x36217b[_0x5be179(0x245)]);if(_0x4b2bf1&&_0x32d509[_0x5be179(0x223)](_0x4b2bf1))_0x105d4b(_0x4b2bf1);}};_0x105d4b(_0x140a86);for(const _0x3e0b1d of _0x32d509[_0x3ffe76(0x1eb)]()){!_0x3bb34c[_0x3ffe76(0x223)](_0x3e0b1d)&&_0x355590['push']({'path':'flowJson.nodes.'+_0x3e0b1d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x543591=_0x297484[_0x3ffe76(0x17e)](_0x310c0c=>_0x3bb34c[_0x3ffe76(0x223)](_0x310c0c));if(!_0x543591){_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.edges','message':_0x3ffe76(0x13c)});return;}const _0x36ceb3=new Set(),_0x3962b8=_0x560df4=>{const _0x2d9793=_0x3ffe76;if(_0x36ceb3[_0x2d9793(0x223)](_0x560df4))return;_0x36ceb3[_0x2d9793(0x21c)](_0x560df4);for(const _0x3d567f of _0x2c7499['get'](_0x560df4)??[]){const _0x5cc4cf=resolveEdgeEndpoint(_0x3d567f[_0x2d9793(0x16d)],_0x3d567f[_0x2d9793(0x112)]);if(_0x5cc4cf&&_0x32d509['has'](_0x5cc4cf))_0x3962b8(_0x5cc4cf);}};for(const _0x5e4a3d of _0x297484){if(_0x32d509[_0x3ffe76(0x223)](_0x5e4a3d))_0x3962b8(_0x5e4a3d);}for(const _0x115f22 of _0x3bb34c){!_0x36ceb3[_0x3ffe76(0x223)](_0x115f22)&&_0x355590[_0x3ffe76(0x1e5)]({'path':'flowJson.nodes.'+_0x115f22,'message':_0x3ffe76(0x113)});}}function validateApprovalResults(_0xfef2df,_0x2ffcab,_0x3ad10,_0x5dced3){const _0x3cbf0a=a287_0x571368;if(_0x2ffcab===0x0)return;const _0x33768f=new Set(_0x3ad10[_0x3cbf0a(0x1f7)](_0x1bd9fd=>_0xfef2df[_0x3cbf0a(0x19f)](_0x1bd9fd)?.['result'])[_0x3cbf0a(0x121)](_0x31b81e=>typeof _0x31b81e===_0x3cbf0a(0x10a)));for(const _0x390aa6 of[_0x3cbf0a(0x102),_0x3cbf0a(0x169)]){!_0x33768f[_0x3cbf0a(0x223)](_0x390aa6)&&_0x5dced3['push']({'path':_0x3cbf0a(0x24e),'message':_0x3cbf0a(0x247)+_0x390aa6+'.'});}}function validateScriptResultReferences(_0x4f570d,_0x52fc0c,_0x155434,_0x8a5f1f,_0x45af32,_0x3ff6a2,_0x2c39b8){const _0x1c1bcb=a287_0x571368;if(_0x3ff6a2[_0x1c1bcb(0x10d)]===0x0)return;const _0x452865=new Set(),_0x23d376=_0x4e4c01=>{const _0x3d5733=_0x1c1bcb;if(!_0x452865[_0x3d5733(0x223)](_0x4e4c01)&&_0x4f570d[_0x3d5733(0x223)](_0x4e4c01)){_0x452865[_0x3d5733(0x21c)](_0x4e4c01);for(const _0x58d4c7 of _0x155434[_0x3d5733(0x19f)](_0x4e4c01)??[]){const _0xc62f70=resolveEdgeEndpoint(_0x58d4c7[_0x3d5733(0x151)],_0x58d4c7['targetNodeId']);if(_0xc62f70)_0x23d376(_0xc62f70);}}};_0x23d376(_0x52fc0c);const _0x23dcb4=new Map();for(const _0x3d80a3 of _0x452865){_0x23dcb4['set'](_0x3d80a3,_0x3d80a3===_0x52fc0c?new Set([_0x52fc0c]):new Set(_0x452865));}let _0x227059=!![];while(_0x227059){_0x227059=![];for(const _0x2ed395 of _0x452865){if(_0x2ed395===_0x52fc0c)continue;const _0x30c7b3=(_0x8a5f1f[_0x1c1bcb(0x19f)](_0x2ed395)??[])[_0x1c1bcb(0x1f7)](_0x59a2b9=>resolveEdgeEndpoint(_0x59a2b9['source'],_0x59a2b9['sourceNodeId']))[_0x1c1bcb(0x121)](_0xb85d47=>Boolean(_0xb85d47&&_0x452865[_0x1c1bcb(0x223)](_0xb85d47)));if(_0x30c7b3[_0x1c1bcb(0x251)]===0x0)continue;const _0x6dfc42=new Set(_0x23dcb4[_0x1c1bcb(0x19f)](_0x30c7b3[0x0])??[]);for(const _0x516d6e of _0x30c7b3['slice'](0x1)){const _0x5b29f5=_0x23dcb4[_0x1c1bcb(0x19f)](_0x516d6e)??new Set();for(const _0x2cb75c of _0x6dfc42){if(!_0x5b29f5[_0x1c1bcb(0x223)](_0x2cb75c))_0x6dfc42[_0x1c1bcb(0x11f)](_0x2cb75c);}}_0x6dfc42[_0x1c1bcb(0x21c)](_0x2ed395);const _0x326a3a=_0x23dcb4[_0x1c1bcb(0x19f)](_0x2ed395);!setsEqual(_0x326a3a,_0x6dfc42)&&(_0x23dcb4[_0x1c1bcb(0x156)](_0x2ed395,_0x6dfc42),_0x227059=!![]);}}for(const [_0x26df53,_0x1cd992]of _0x155434){const _0x1162e4=_0x23dcb4[_0x1c1bcb(0x19f)](_0x26df53);if(!_0x1162e4)continue;for(const _0x53dd95 of _0x1cd992){if(_0x53dd95[_0x1c1bcb(0x23b)]!==_0x1c1bcb(0x225)||typeof _0x53dd95['expression']!==_0x1c1bcb(0x10a))continue;for(const [_0x2d5fc7,_0x4969da]of _0x3ff6a2){expressionReferencesVariable(_0x53dd95[_0x1c1bcb(0x239)],_0x2d5fc7)&&!_0x1162e4['has'](_0x4969da)&&_0x2c39b8['push']({'path':(_0x45af32[_0x1c1bcb(0x19f)](_0x53dd95)??_0x1c1bcb(0x1fb))+_0x1c1bcb(0x21d),'message':_0x1c1bcb(0x13f)+_0x2d5fc7+_0x1c1bcb(0x209)+_0x4969da+_0x1c1bcb(0xfe)+_0x26df53+'.'});}}}}function expressionReferencesVariable(_0x30c3e3,_0x39fb70){const _0x4600f3=a287_0x571368;let _0x18743f=0x0;while(_0x18743f<_0x30c3e3[_0x4600f3(0x251)]){const _0x25c972=_0x30c3e3[_0x18743f];if(_0x25c972==='\x27'||_0x25c972==='\x22'){_0x18743f=skipQuotedExpressionSegment(_0x30c3e3,_0x18743f,_0x25c972);continue;}if(!/[A-Za-z_]/[_0x4600f3(0x172)](_0x25c972)){_0x18743f+=0x1;continue;}const _0x47211c=_0x18743f;_0x18743f+=0x1;while(_0x18743f<_0x30c3e3['length']&&/[A-Za-z0-9_]/[_0x4600f3(0x172)](_0x30c3e3[_0x18743f])){_0x18743f+=0x1;}if(_0x30c3e3[_0x4600f3(0x1e7)](_0x47211c,_0x18743f)!==_0x39fb70)continue;let _0x3141ec=_0x47211c-0x1;while(_0x3141ec>=0x0&&/\s/[_0x4600f3(0x172)](_0x30c3e3[_0x3141ec])){_0x3141ec-=0x1;}if(_0x30c3e3[_0x3141ec]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x42db57,_0x480125,_0x140080){const _0x2342e6=a287_0x571368;let _0x30af34=_0x480125+0x1;while(_0x30af34<_0x42db57[_0x2342e6(0x251)]){if(_0x42db57[_0x30af34]==='\x5c'){_0x30af34+=0x2;continue;}if(_0x42db57[_0x30af34]===_0x140080)return _0x30af34+0x1;_0x30af34+=0x1;}return _0x30af34;}function resolveEffectiveResultVariable(_0x9a91b6,_0x4a0f05){const _0x58cfad=a287_0x571368;if(_0x9a91b6===undefined||_0x9a91b6===null||_0x4a0f05&&_0x9a91b6==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x9a91b6!==_0x58cfad(0x10a)||!VARIABLE_PATTERN[_0x58cfad(0x172)](_0x9a91b6)||RESERVED_RESULT_VARIABLES[_0x58cfad(0x223)](_0x9a91b6)||_0x9a91b6[_0x58cfad(0x199)](_0x58cfad(0x1a4)))return undefined;return _0x9a91b6;}function registerResultVariableOwner(_0x512dc1,_0x313a25,_0x59a6e4,_0x1f2489){const _0x46f3d4=a287_0x571368;if(_0x512dc1[_0x46f3d4(0x223)](_0x313a25)){_0x1f2489[_0x46f3d4(0x1e5)]({'path':'flowJson.nodes','message':'Duplicate\x20resultVariable:\x20'+_0x313a25+'.'});return;}_0x512dc1[_0x46f3d4(0x156)](_0x313a25,_0x59a6e4);}function setsEqual(_0x22dbb8,_0x404a19){const _0x11b838=a287_0x571368;return _0x22dbb8[_0x11b838(0x10d)]===_0x404a19[_0x11b838(0x10d)]&&[..._0x22dbb8][_0x11b838(0x1f2)](_0x1683b8=>_0x404a19[_0x11b838(0x223)](_0x1683b8));}function isValidUserId(_0x60b95e){const _0x530bea=a287_0x571368;if(typeof _0x60b95e===_0x530bea(0x10a))return _0x60b95e[_0x530bea(0x1d4)]()['length']>0x0;return Number[_0x530bea(0x202)](_0x60b95e)&&Number(_0x60b95e)>0x0;}function resolveEdgeEndpoint(_0x5e6d08,_0x1c8707){const _0x29f639=a287_0x571368;if(typeof _0x5e6d08==='string'&&_0x5e6d08[_0x29f639(0x1d4)]())return _0x5e6d08[_0x29f639(0x1d4)]();if(typeof _0x1c8707==='string'&&_0x1c8707[_0x29f639(0x1d4)]())return _0x1c8707[_0x29f639(0x1d4)]();return undefined;}function removeEmptyMetadata(_0x332a7a,_0x116f54,_0x4afbb1,_0x19560e){const _0x5491a1=a287_0x571368;if(Array[_0x5491a1(0x13a)](_0x332a7a)){_0x332a7a[_0x5491a1(0x18e)]((_0x2c6f28,_0x2b2b3f)=>removeEmptyMetadata(_0x2c6f28,_0x116f54+'['+_0x2b2b3f+']',_0x4afbb1,_0x19560e));return;}if(!isRecord(_0x332a7a))return;for(const [_0x474167,_0x5d8026]of Object['entries'](_0x332a7a)){const _0x3093f4=_0x116f54+'.'+_0x474167;if(_0x474167===_0x5491a1(0x1f0)&&isEmptyJsonValue(_0x5d8026)){delete _0x332a7a[_0x474167],_0x19560e[_0x5491a1(0x1e5)](_0x3093f4),_0x4afbb1['push']({'code':'empty_metadata_removed','path':_0x3093f4,'message':_0x3093f4+_0x5491a1(0xfb)});continue;}removeEmptyMetadata(_0x5d8026,_0x3093f4,_0x4afbb1,_0x19560e);}}function isEmptyJsonValue(_0x28a594){const _0x2e02be=a287_0x571368;if(_0x28a594===null||_0x28a594===undefined)return!![];if(typeof _0x28a594==='string')return _0x28a594[_0x2e02be(0x1d4)]()==='';if(Array[_0x2e02be(0x13a)](_0x28a594))return _0x28a594[_0x2e02be(0x251)]===0x0;return isRecord(_0x28a594)&&Object[_0x2e02be(0x1eb)](_0x28a594)[_0x2e02be(0x251)]===0x0;}function isRecord(_0x20b865){const _0x594ffc=a287_0x571368;return typeof _0x20b865===_0x594ffc(0x1c4)&&_0x20b865!==null&&!Array[_0x594ffc(0x13a)](_0x20b865);}function cloneJsonValue(_0x5f5190){const _0x1328bb=a287_0x571368;return JSON['parse'](JSON[_0x1328bb(0x1e3)](_0x5f5190));}export async function readFlowConfigFile(_0x4e6e2e){const _0xd5e296=a287_0x571368,_0x3e0dd1=await readFile(resolve(_0x4e6e2e),_0xd5e296(0x1e8));return JSON[_0xd5e296(0x1b9)](_0x3e0dd1);}
@@ -1 +1 @@
1
- const a288_0x19ee56=a288_0x2cc1;(function(_0x33c054,_0x2809a3){const _0x40a1e6=a288_0x2cc1,_0x53da08=_0x33c054();while(!![]){try{const _0x171d95=parseInt(_0x40a1e6(0x1ac))/0x1*(-parseInt(_0x40a1e6(0x1d3))/0x2)+parseInt(_0x40a1e6(0x1bf))/0x3*(-parseInt(_0x40a1e6(0x199))/0x4)+-parseInt(_0x40a1e6(0x1d2))/0x5+parseInt(_0x40a1e6(0x1c9))/0x6*(parseInt(_0x40a1e6(0x192))/0x7)+-parseInt(_0x40a1e6(0x1b8))/0x8+-parseInt(_0x40a1e6(0x1d1))/0x9*(-parseInt(_0x40a1e6(0x1a4))/0xa)+parseInt(_0x40a1e6(0x1a1))/0xb*(parseInt(_0x40a1e6(0x1ca))/0xc);if(_0x171d95===_0x2809a3)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0xa95792){_0x53da08['push'](_0x53da08['shift']());}}}(a288_0x45d9,0xe0a2e));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';function a288_0x45d9(){const _0x47f3ec=['113QNlZFF','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','force','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','policyRoot','allow','decode','rules','code','utf8','pid','defaults','8490296YJYdvv','policy.json','includes','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','string','Review\x20the\x20file\x20before\x20retrying.','6LiTnOp','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','unchanged','instantApi','object','trim','overwritten','instant_api_policy_file_unwritable','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_file_invalid','6vqOilM','2664beEpzJ','instant_api_policy_file_missing','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version','instant_api_policy_file_unreadable','instant_api_policy_file_too_large','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','935433fcgZQt','1895195WcDuBz','20066PzgFzP','instant_api_policy_rules_invalid','3060743ifXpPa','length','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','EEXIST','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_version_invalid','policyFilePath','2144172ChduEV','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','catch','isArray','.tmp','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_app_code_invalid','byteLength','173690MDQNZJ','parse','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','60auhWCE','instant_api_policy_file_exists','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','stringify','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','utf-8','appCode','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'];a288_0x45d9=function(){return _0x47f3ec;};return a288_0x45d9();}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=a288_0x19ee56(0x1b9);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x227888,_0xc909e2,_0x53fa81){return new CliError(_0x227888,0x1,_0xc909e2,_0x53fa81);}export function loadInstantApiPolicyLocalConfig(_0x507f64,_0x4de7d8){assertSafeAppCode(_0x507f64);const _0x969514=resolve(_0x4de7d8??findProjectRootDirectory()),_0x11c5db=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x507f64+'/'+INSTANT_API_POLICY_FILE_NAME,_0x301dca=resolve(_0x969514,INSTANT_API_POLICY_RELATIVE_ROOT,_0x507f64),_0xf021ca=resolve(_0x301dca,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x969514,'appCode':_0x507f64,'policyRoot':_0x301dca,'policyFilePath':_0xf021ca,'policyRelativePath':_0x11c5db};}export function createDefaultInstantApiPolicyConfig(_0x57f8de,_0x35688f=a288_0x19ee56(0x1b1)){return assertSafeAppCode(_0x57f8de),{'version':'2','appCode':_0x57f8de,'defaults':{'instantApi':_0x35688f},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0xe20ef0){const _0x9c1d08=a288_0x19ee56;let _0x133530;try{_0x133530=await stat(_0xe20ef0[_0x9c1d08(0x198)]);}catch(_0x584e49){throw instantApiPolicyError(_0x9c1d08(0x1cb),_0x9c1d08(0x1ab)+_0xe20ef0[_0x9c1d08(0x198)],_0x9c1d08(0x1d0));}if(!_0x133530['isFile']())throw instantApiPolicyError(_0x9c1d08(0x1c8),_0x9c1d08(0x1a3)+_0xe20ef0[_0x9c1d08(0x198)]);if(_0x133530['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x9c1d08(0x1cf),_0x9c1d08(0x1ad));let _0x3e1b44;try{_0x3e1b44=await readFile(_0xe20ef0['policyFilePath']);}catch{throw instantApiPolicyError(_0x9c1d08(0x1ce),'Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0xe20ef0[_0x9c1d08(0x198)]);}if(_0x3e1b44[_0x9c1d08(0x1a0)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x9c1d08(0x1ad));let _0x1c4d4a;try{_0x1c4d4a=new TextDecoder(_0x9c1d08(0x1a9),{'fatal':!![],'ignoreBOM':!![]})[_0x9c1d08(0x1b2)](_0x3e1b44);}catch{throw instantApiPolicyError(_0x9c1d08(0x1c8),_0x9c1d08(0x1cc)+_0xe20ef0[_0x9c1d08(0x198)]);}let _0x9d9baa;try{_0x9d9baa=JSON[_0x9c1d08(0x1a2)](_0x1c4d4a);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x9c1d08(0x1bb)+_0xe20ef0[_0x9c1d08(0x198)]);}return assertLocalPolicyContract(_0x9d9baa,_0xe20ef0[_0x9c1d08(0x1aa)]);}export async function writeInstantApiPolicyConfigFile(_0x23243a,_0x4a6232,_0x42ed75={}){const _0x1e49fe=a288_0x19ee56,_0x5d0361=assertLocalPolicyContract(_0x4a6232,_0x23243a[_0x1e49fe(0x1aa)]),_0x751ed9=JSON[_0x1e49fe(0x1a7)](_0x5d0361,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x751ed9,_0x1e49fe(0x1b5))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1e49fe(0x1cf),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x23243a[_0x1e49fe(0x1b0)],{'recursive':!![]});let _0x3c743d;try{_0x3c743d=await readFile(_0x23243a['policyFilePath'],_0x1e49fe(0x1b5));}catch(_0x3e9206){if(!isMissingFile(_0x3e9206))throw instantApiPolicyError(_0x1e49fe(0x1ce),_0x1e49fe(0x194)+_0x23243a[_0x1e49fe(0x198)]);}if(_0x3c743d===_0x751ed9)return{'action':_0x1e49fe(0x1c1),'filePath':_0x23243a[_0x1e49fe(0x198)]};if(_0x3c743d!==undefined&&!_0x42ed75[_0x1e49fe(0x1ae)])throw instantApiPolicyError(_0x1e49fe(0x1a5),_0x1e49fe(0x1c0)+_0x23243a[_0x1e49fe(0x198)],_0x1e49fe(0x1af));if(_0x3c743d===undefined)try{return await writeFile(_0x23243a['policyFilePath'],_0x751ed9,{'encoding':_0x1e49fe(0x1b5),'flag':'wx'}),{'action':'created','filePath':_0x23243a[_0x1e49fe(0x198)]};}catch(_0x299878){if(!isAlreadyExists(_0x299878))throw instantApiPolicyError(_0x1e49fe(0x1c6),_0x1e49fe(0x1a6)+_0x23243a[_0x1e49fe(0x198)]);if(!_0x42ed75['force'])throw instantApiPolicyError(_0x1e49fe(0x1a5),_0x1e49fe(0x1a8)+_0x23243a['policyFilePath'],_0x1e49fe(0x1be));}const _0x5c74b6=resolve(dirname(_0x23243a[_0x1e49fe(0x198)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x1e49fe(0x1b6)]+'.'+randomUUID()+_0x1e49fe(0x19d));try{await writeFile(_0x5c74b6,_0x751ed9,{'encoding':_0x1e49fe(0x1b5),'flag':'wx'}),await rename(_0x5c74b6,_0x23243a['policyFilePath']);}catch{await unlink(_0x5c74b6)[_0x1e49fe(0x19b)](()=>undefined);throw instantApiPolicyError(_0x1e49fe(0x1c6),_0x1e49fe(0x196)+_0x23243a[_0x1e49fe(0x198)]);}return{'action':_0x1e49fe(0x1c5),'filePath':_0x23243a[_0x1e49fe(0x198)]};}function assertSafeAppCode(_0x4159e2){const _0x5e37a4=a288_0x19ee56,_0x506744=_0x4159e2[_0x5e37a4(0x1c4)]();if(!_0x506744||_0x506744!==_0x4159e2||_0x506744[_0x5e37a4(0x193)]>0x64||_0x506744==='.'||_0x506744==='..'||_0x506744[_0x5e37a4(0x1ba)]('/')||_0x506744['includes']('\x5c')||_0x506744[_0x5e37a4(0x1ba)]('\x00'))throw instantApiPolicyError(_0x5e37a4(0x19f),_0x5e37a4(0x1c7));}function assertLocalPolicyContract(_0x4055bf,_0x20150b){const _0x5c59bc=a288_0x19ee56;if(!isObject(_0x4055bf))throw instantApiPolicyError(_0x5c59bc(0x1bc),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x4055bf['version']!=='1'&&_0x4055bf[_0x5c59bc(0x1cd)]!=='2')throw instantApiPolicyError(_0x5c59bc(0x197),_0x5c59bc(0x19a),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x4055bf[_0x5c59bc(0x1aa)]!==_0x20150b)throw instantApiPolicyError('instant_api_policy_app_code_mismatch','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x20150b+'.');if(!isObject(_0x4055bf['defaults'])||typeof _0x4055bf[_0x5c59bc(0x1b7)][_0x5c59bc(0x1c2)]!==_0x5c59bc(0x1bd))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x5c59bc(0x19e));if(_0x4055bf['rules']!==undefined&&_0x4055bf['rules']!==null&&!Array[_0x5c59bc(0x19c)](_0x4055bf[_0x5c59bc(0x1b3)]))throw instantApiPolicyError(_0x5c59bc(0x191),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x4055bf;}function a288_0x2cc1(_0x356583,_0x4af705){_0x356583=_0x356583-0x191;const _0x45d9f8=a288_0x45d9();let _0x2cc1c2=_0x45d9f8[_0x356583];return _0x2cc1c2;}function isObject(_0x5377d1){const _0x5c06a4=a288_0x19ee56;return _0x5377d1!==null&&typeof _0x5377d1===_0x5c06a4(0x1c3)&&!Array[_0x5c06a4(0x19c)](_0x5377d1);}function isMissingFile(_0x2529b8){const _0x1961d4=a288_0x19ee56;return Boolean(_0x2529b8&&typeof _0x2529b8===_0x1961d4(0x1c3)&&_0x2529b8[_0x1961d4(0x1b4)]==='ENOENT');}function isAlreadyExists(_0x33658b){const _0x334d92=a288_0x19ee56;return Boolean(_0x33658b&&typeof _0x33658b==='object'&&_0x33658b[_0x334d92(0x1b4)]===_0x334d92(0x195));}
1
+ const a288_0x303e43=a288_0x1290;function a288_0xe25c(){const _0x3f2d95=['instant_api_policy_file_unwritable','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_app_code_mismatch','instant_api_policy_file_exists','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_file_missing','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','10CebXxP','pid','stringify','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','925ZxcZgC','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','2cvLdkA','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_unreadable','created','decode','object','version','unchanged','477211qOXeFO','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','policyRoot','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','policyFilePath','force','utf8','instant_api_policy_json_invalid','4852PxXFnb','Review\x20the\x20file\x20before\x20retrying.','appCode','rules','.rabetbase/instant-api-policy','byteLength','1641891mLzUWd','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','defaults','isArray','parse','isFile','instant_api_policy_rules_invalid','instant_api_policy_app_code_invalid','738948SNafkj','641276cSkCSq','string','catch','size','8IEFCyT','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','6139926dgFdwg','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','ENOENT','instant_api_policy_file_too_large','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_version_invalid','allow','code','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','length','trim','instant_api_policy_defaults_invalid','includes','24186701ENkTsF','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','instant_api_policy_file_invalid','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.'];a288_0xe25c=function(){return _0x3f2d95;};return a288_0xe25c();}(function(_0x3a4dc8,_0x5a0b77){const _0x284da0=a288_0x1290,_0x42ed1c=_0x3a4dc8();while(!![]){try{const _0x1b7217=parseInt(_0x284da0(0xc5))/0x1*(-parseInt(_0x284da0(0xe5))/0x2)+-parseInt(_0x284da0(0xdc))/0x3+-parseInt(_0x284da0(0xd6))/0x4*(-parseInt(_0x284da0(0xc3))/0x5)+-parseInt(_0x284da0(0xe4))/0x6+parseInt(_0x284da0(0xce))/0x7+-parseInt(_0x284da0(0xe9))/0x8*(parseInt(_0x284da0(0xeb))/0x9)+-parseInt(_0x284da0(0xbf))/0xa*(-parseInt(_0x284da0(0xb4))/0xb);if(_0x1b7217===_0x5a0b77)break;else _0x42ed1c['push'](_0x42ed1c['shift']());}catch(_0x4a58d6){_0x42ed1c['push'](_0x42ed1c['shift']());}}}(a288_0xe25c,0x79710));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=a288_0x303e43(0xda);function a288_0x1290(_0x3b5cb4,_0x3d506b){_0x3b5cb4=_0x3b5cb4-0xb3;const _0xe25c7f=a288_0xe25c();let _0x1290a9=_0xe25c7f[_0x3b5cb4];return _0x1290a9;}export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x30ff75,_0x282836,_0x12b0e6){return new CliError(_0x30ff75,0x1,_0x282836,_0x12b0e6);}export function loadInstantApiPolicyLocalConfig(_0x8ddcc6,_0x3cd2ae){assertSafeAppCode(_0x8ddcc6);const _0xa7b046=resolve(_0x3cd2ae??findProjectRootDirectory()),_0x41d0e9=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x8ddcc6+'/'+INSTANT_API_POLICY_FILE_NAME,_0x1d8c4a=resolve(_0xa7b046,INSTANT_API_POLICY_RELATIVE_ROOT,_0x8ddcc6),_0x8e8dd0=resolve(_0x1d8c4a,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0xa7b046,'appCode':_0x8ddcc6,'policyRoot':_0x1d8c4a,'policyFilePath':_0x8e8dd0,'policyRelativePath':_0x41d0e9};}export function createDefaultInstantApiPolicyConfig(_0x176917,_0x3eb673=a288_0x303e43(0xf1)){return assertSafeAppCode(_0x176917),{'version':'2','appCode':_0x176917,'defaults':{'instantApi':_0x3eb673},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x48d778){const _0x5b99ea=a288_0x303e43;let _0x1f15c5;try{_0x1f15c5=await stat(_0x48d778['policyFilePath']);}catch(_0x48992b){throw instantApiPolicyError(_0x5b99ea(0xbd),_0x5b99ea(0xf3)+_0x48d778[_0x5b99ea(0xd2)],_0x5b99ea(0xb7));}if(!_0x1f15c5[_0x5b99ea(0xe1)]())throw instantApiPolicyError(_0x5b99ea(0xb6),_0x5b99ea(0xdd)+_0x48d778[_0x5b99ea(0xd2)]);if(_0x1f15c5[_0x5b99ea(0xe8)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5b99ea(0xee),_0x5b99ea(0xea));let _0x205d95;try{_0x205d95=await readFile(_0x48d778[_0x5b99ea(0xd2)]);}catch{throw instantApiPolicyError(_0x5b99ea(0xc8),_0x5b99ea(0xc2)+_0x48d778[_0x5b99ea(0xd2)]);}if(_0x205d95[_0x5b99ea(0xdb)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5b99ea(0xee),_0x5b99ea(0xea));let _0xb21ad4;try{_0xb21ad4=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x5b99ea(0xca)](_0x205d95);}catch{throw instantApiPolicyError(_0x5b99ea(0xb6),_0x5b99ea(0xb5)+_0x48d778['policyFilePath']);}let _0x363ada;try{_0x363ada=JSON[_0x5b99ea(0xe0)](_0xb21ad4);}catch{throw instantApiPolicyError(_0x5b99ea(0xd5),_0x5b99ea(0xbe)+_0x48d778['policyFilePath']);}return assertLocalPolicyContract(_0x363ada,_0x48d778[_0x5b99ea(0xd8)]);}export async function writeInstantApiPolicyConfigFile(_0x5d56d5,_0x1be406,_0x4ae92c={}){const _0x3e4948=a288_0x303e43,_0x147174=assertLocalPolicyContract(_0x1be406,_0x5d56d5[_0x3e4948(0xd8)]),_0x3754ef=JSON[_0x3e4948(0xc1)](_0x147174,null,0x2)+'\x0a';if(Buffer[_0x3e4948(0xdb)](_0x3754ef,_0x3e4948(0xd4))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x3e4948(0xee),_0x3e4948(0xea));await mkdir(_0x5d56d5[_0x3e4948(0xd0)],{'recursive':!![]});let _0x3ed9d6;try{_0x3ed9d6=await readFile(_0x5d56d5[_0x3e4948(0xd2)],'utf8');}catch(_0x3eae0e){if(!isMissingFile(_0x3eae0e))throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x5d56d5['policyFilePath']);}if(_0x3ed9d6===_0x3754ef)return{'action':_0x3e4948(0xcd),'filePath':_0x5d56d5[_0x3e4948(0xd2)]};if(_0x3ed9d6!==undefined&&!_0x4ae92c[_0x3e4948(0xd3)])throw instantApiPolicyError(_0x3e4948(0xbb),_0x3e4948(0xb9)+_0x5d56d5[_0x3e4948(0xd2)],_0x3e4948(0xc6));if(_0x3ed9d6===undefined)try{return await writeFile(_0x5d56d5[_0x3e4948(0xd2)],_0x3754ef,{'encoding':_0x3e4948(0xd4),'flag':'wx'}),{'action':_0x3e4948(0xc9),'filePath':_0x5d56d5[_0x3e4948(0xd2)]};}catch(_0xbefd3a){if(!isAlreadyExists(_0xbefd3a))throw instantApiPolicyError(_0x3e4948(0xb8),_0x3e4948(0xec)+_0x5d56d5[_0x3e4948(0xd2)]);if(!_0x4ae92c[_0x3e4948(0xd3)])throw instantApiPolicyError(_0x3e4948(0xbb),_0x3e4948(0xd1)+_0x5d56d5[_0x3e4948(0xd2)],_0x3e4948(0xd7));}const _0x37f9fa=resolve(dirname(_0x5d56d5[_0x3e4948(0xd2)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x3e4948(0xc0)]+'.'+randomUUID()+'.tmp');try{await writeFile(_0x37f9fa,_0x3754ef,{'encoding':'utf8','flag':'wx'}),await rename(_0x37f9fa,_0x5d56d5[_0x3e4948(0xd2)]);}catch{await unlink(_0x37f9fa)[_0x3e4948(0xe7)](()=>undefined);throw instantApiPolicyError(_0x3e4948(0xb8),_0x3e4948(0xc7)+_0x5d56d5['policyFilePath']);}return{'action':'overwritten','filePath':_0x5d56d5[_0x3e4948(0xd2)]};}function assertSafeAppCode(_0x1e9f9e){const _0x4c6c84=a288_0x303e43,_0x5a4697=_0x1e9f9e[_0x4c6c84(0xf5)]();if(!_0x5a4697||_0x5a4697!==_0x1e9f9e||_0x5a4697[_0x4c6c84(0xf4)]>0x64||_0x5a4697==='.'||_0x5a4697==='..'||_0x5a4697[_0x4c6c84(0xb3)]('/')||_0x5a4697[_0x4c6c84(0xb3)]('\x5c')||_0x5a4697[_0x4c6c84(0xb3)]('\x00'))throw instantApiPolicyError(_0x4c6c84(0xe3),_0x4c6c84(0xef));}function assertLocalPolicyContract(_0x196d8e,_0x1b84d4){const _0x42c21b=a288_0x303e43;if(!isObject(_0x196d8e))throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x196d8e[_0x42c21b(0xcc)]!=='1'&&_0x196d8e[_0x42c21b(0xcc)]!=='2')throw instantApiPolicyError(_0x42c21b(0xf0),'Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x196d8e['appCode']!==_0x1b84d4)throw instantApiPolicyError(_0x42c21b(0xba),_0x42c21b(0xcf)+_0x1b84d4+'.');if(!isObject(_0x196d8e[_0x42c21b(0xde)])||typeof _0x196d8e[_0x42c21b(0xde)]['instantApi']!==_0x42c21b(0xe6))throw instantApiPolicyError(_0x42c21b(0xf6),_0x42c21b(0xbc));if(_0x196d8e[_0x42c21b(0xd9)]!==undefined&&_0x196d8e[_0x42c21b(0xd9)]!==null&&!Array['isArray'](_0x196d8e[_0x42c21b(0xd9)]))throw instantApiPolicyError(_0x42c21b(0xe2),_0x42c21b(0xc4));return _0x196d8e;}function isObject(_0x27e2cc){const _0x5dada1=a288_0x303e43;return _0x27e2cc!==null&&typeof _0x27e2cc===_0x5dada1(0xcb)&&!Array[_0x5dada1(0xdf)](_0x27e2cc);}function isMissingFile(_0x51991e){const _0x174603=a288_0x303e43;return Boolean(_0x51991e&&typeof _0x51991e===_0x174603(0xcb)&&_0x51991e[_0x174603(0xf2)]===_0x174603(0xed));}function isAlreadyExists(_0x59548b){const _0x46fa64=a288_0x303e43;return Boolean(_0x59548b&&typeof _0x59548b===_0x46fa64(0xcb)&&_0x59548b['code']==='EEXIST');}
@@ -1 +1 @@
1
- const a289_0x1df4cf=a289_0x11c9;function a289_0x11c9(_0xe7f1cb,_0x38c8bc){_0xe7f1cb=_0xe7f1cb-0x11f;const _0x13de66=a289_0x13de();let _0x11c9a4=_0x13de66[_0xe7f1cb];return _0x11c9a4;}(function(_0x42d8c8,_0x3c2004){const _0x5ad8e8=a289_0x11c9,_0x491962=_0x42d8c8();while(!![]){try{const _0x320aa3=parseInt(_0x5ad8e8(0x164))/0x1*(-parseInt(_0x5ad8e8(0x161))/0x2)+parseInt(_0x5ad8e8(0x14c))/0x3*(parseInt(_0x5ad8e8(0x16b))/0x4)+parseInt(_0x5ad8e8(0x15a))/0x5+-parseInt(_0x5ad8e8(0x131))/0x6+-parseInt(_0x5ad8e8(0x16f))/0x7+-parseInt(_0x5ad8e8(0x159))/0x8*(-parseInt(_0x5ad8e8(0x142))/0x9)+-parseInt(_0x5ad8e8(0x134))/0xa*(-parseInt(_0x5ad8e8(0x145))/0xb);if(_0x320aa3===_0x3c2004)break;else _0x491962['push'](_0x491962['shift']());}catch(_0xf07ff5){_0x491962['push'](_0x491962['shift']());}}}(a289_0x13de,0x6a1f6));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x1df4cf(0x15c),a289_0x1df4cf(0x15d),'total','hits',a289_0x1df4cf(0x143),a289_0x1df4cf(0x173)],HIT_KEYS=[a289_0x1df4cf(0x171),a289_0x1df4cf(0x12f),a289_0x1df4cf(0x150),a289_0x1df4cf(0x15e),a289_0x1df4cf(0x165),a289_0x1df4cf(0x170),a289_0x1df4cf(0x154),a289_0x1df4cf(0x16d),'rawScore',a289_0x1df4cf(0x14f),'scoreKind'];export function normalizeKbServiceOrigin(_0x4eb303){const _0x335053=a289_0x1df4cf,_0x5d3e4d=()=>CliErrors[_0x335053(0x127)](_0x335053(0x125)),_0x3bb0fb=_0x4eb303?.[_0x335053(0x148)]();if(!_0x3bb0fb||/[\u0000-\u0020\u007f]/[_0x335053(0x178)](_0x3bb0fb)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x335053(0x178)](_0x3bb0fb))throw _0x5d3e4d();let _0x330910;try{_0x330910=new URL(_0x3bb0fb);}catch{throw _0x5d3e4d();}if(_0x330910[_0x335053(0x15f)]!==_0x335053(0x153)||!_0x330910['hostname']||_0x330910[_0x335053(0x132)]||_0x330910[_0x335053(0x15b)]||_0x330910[_0x335053(0x158)]!=='/'||_0x330910[_0x335053(0x157)]||_0x330910[_0x335053(0x130)])throw _0x5d3e4d();return _0x330910[_0x335053(0x168)];}export async function searchDirectKnowledge(_0x25dccb){const _0x336401=a289_0x1df4cf,_0x30f732=_0x25dccb[_0x336401(0x155)][_0x336401(0x148)](),_0x5ad898=_0x25dccb[_0x336401(0x12c)][_0x336401(0x148)]();if(!_0x30f732)throw CliErrors[_0x336401(0x127)](_0x336401(0x12b));if(!_0x25dccb[_0x336401(0x16a)][_0x336401(0x148)]())throw CliErrors['authRequired']();if(!_0x5ad898)throw CliErrors['validation']('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x25dccb[_0x336401(0x14e)]);const _0x5d9ea1=normalizeKbServiceOrigin(_0x25dccb[_0x336401(0x137)]),_0x5288d8=AbortSignal[_0x336401(0x13b)](0xea60),_0x168105=_0x25dccb[_0x336401(0x152)]?AbortSignal[_0x336401(0x122)]([_0x25dccb[_0x336401(0x152)],_0x5288d8]):_0x5288d8;let _0x58c646;try{_0x58c646=await fetch(_0x5d9ea1+'/v2/development/apps/'+encodeURIComponent(_0x30f732)+'/knowledge/search',{'method':_0x336401(0x139),'redirect':_0x336401(0x175),'headers':{'Content-Type':_0x336401(0x13d),'Cookie':_0x25dccb[_0x336401(0x16a)],'X-Invoke-Source':'cli:rabetbase'},'body':JSON[_0x336401(0x16c)]({'query':_0x5ad898,..._0x25dccb[_0x336401(0x14e)]!==undefined?{'topK':_0x25dccb[_0x336401(0x14e)]}:{}}),'signal':_0x168105});}catch(_0x4943e9){if(_0x25dccb[_0x336401(0x152)]?.[_0x336401(0x120)])throw new DOMException(_0x336401(0x147),_0x336401(0x149));if(_0x4943e9 instanceof Error&&_0x4943e9['name']===_0x336401(0x160))throw CliErrors[_0x336401(0x13f)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x336401(0x13f)](_0x336401(0x12a));}if(_0x58c646['status']===0x191)throw CliErrors[_0x336401(0x126)]();if(_0x58c646['status']===0x1ad)throw CliErrors[_0x336401(0x141)](_0x336401(0x14d));if(!_0x58c646['ok'])throw CliErrors[_0x336401(0x141)](_0x336401(0x129)+_0x58c646[_0x336401(0x174)]+').');if(!hasNoStore(_0x58c646[_0x336401(0x13c)]))throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x58c646['headers'][_0x336401(0x179)](_0x336401(0x163))??'')[_0x336401(0x162)]()['includes']('application/json'))throw CliErrors[_0x336401(0x141)](_0x336401(0x140));let _0x4fdfa3;try{_0x4fdfa3=await _0x58c646[_0x336401(0x133)]();}catch(_0x1f773d){if(_0x25dccb[_0x336401(0x152)]?.[_0x336401(0x120)])throw new DOMException(_0x336401(0x147),'AbortError');if(_0x5288d8[_0x336401(0x120)]||_0x1f773d instanceof Error&&_0x1f773d[_0x336401(0x12e)]===_0x336401(0x160))throw CliErrors[_0x336401(0x13f)](_0x336401(0x166));throw CliErrors[_0x336401(0x141)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x5dc917=requireExactRecord(_0x4fdfa3,[_0x336401(0x176),_0x336401(0x143),'timingsMs'],_0x336401(0x177));if(!Array[_0x336401(0x156)](_0x5dc917['hits']))throw invalidContract(_0x336401(0x176));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x336401(0x14a),'total':_0x5dc917[_0x336401(0x176)][_0x336401(0x167)],'hits':_0x5dc917[_0x336401(0x176)],'strategyFingerprint':_0x5dc917['strategyFingerprint'],'timingsMs':_0x5dc917[_0x336401(0x173)]},_0x25dccb[_0x336401(0x14e)]??0xa);}catch(_0x23782e){if(_0x23782e instanceof CliError)throw CliErrors['apiError'](_0x336401(0x121));throw _0x23782e;}}function validateTopK(_0x42cf18){const _0x7cd4a5=a289_0x1df4cf;if(_0x42cf18!==undefined&&(!Number[_0x7cd4a5(0x172)](_0x42cf18)||_0x42cf18<0x1||_0x42cf18>0x32))throw CliErrors[_0x7cd4a5(0x127)](_0x7cd4a5(0x144));}function a289_0x13de(){const _0x4a8115=['chunkId','object','signal','https:','tags','appCode','isArray','search','pathname','232OpIrCl','926720VdhvMc','password','schemaVersion','profile','scope','protocol','TimeoutError','2HfjTnQ','toLowerCase','content-type','670974XLgCfg','title','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','length','origin','cache-control','cookie','4QWsyRH','stringify','rank','hits[','1061774EArNaO','text','documentId','isSafeInteger','timingsMs','status','error','hits','response','test','get','isFinite','aborted','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','any','split','rawScore','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','validation','no-store','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','Knowledge\x20search\x20appCode\x20is\x20required.','query','string','name','revision','hash','3408456WsSWUt','username','json','910790MeyGSU','total','map','serviceUrl','\x20contract.','POST','scoreKind','timeout','headers','application/json','entries','networkError','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','apiError','228564iPUQbv','strategyFingerprint','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','11jeGfsC','some','Knowledge\x20search\x20cancelled.','trim','AbortError','development','sort','2437509kKIfnv','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','topK','finalScore'];a289_0x13de=function(){return _0x4a8115;};return a289_0x13de();}function hasNoStore(_0x589b1c){const _0x1acd59=a289_0x1df4cf;return(_0x589b1c[_0x1acd59(0x179)](_0x1acd59(0x169))??'')[_0x1acd59(0x123)](',')[_0x1acd59(0x146)](_0x5c4489=>_0x5c4489[_0x1acd59(0x148)]()[_0x1acd59(0x162)]()===_0x1acd59(0x128));}function parseDevelopmentSearchResponse(_0x1f74f2,_0x20ac59){const _0x50fe4b=a289_0x1df4cf,_0x125da4=requireExactRecord(_0x1f74f2,RESPONSE_KEYS,_0x50fe4b(0x177));if(_0x125da4['schemaVersion']!==0x2||_0x125da4[_0x50fe4b(0x15d)]!==_0x50fe4b(0x14a))throw invalidContract(_0x50fe4b(0x15d));if(!Array['isArray'](_0x125da4[_0x50fe4b(0x176)])||_0x125da4[_0x50fe4b(0x176)][_0x50fe4b(0x167)]>(_0x20ac59??0x32))throw invalidContract('hits');if(typeof _0x125da4['strategyFingerprint']!==_0x50fe4b(0x12d)||!/^sha256:[0-9a-f]{64}$/['test'](_0x125da4['strategyFingerprint']))throw invalidContract('strategyFingerprint');const _0x53764f=requireRecord(_0x125da4[_0x50fe4b(0x173)],_0x50fe4b(0x173)),_0xd090fb={};for(const [_0x4f7b59,_0xd88340]of Object[_0x50fe4b(0x13e)](_0x53764f)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x50fe4b(0x178)](_0x4f7b59)||typeof _0xd88340!=='number'||!Number[_0x50fe4b(0x11f)](_0xd88340)||_0xd88340<0x0)throw invalidContract(_0x50fe4b(0x173));_0xd090fb[_0x4f7b59]=_0xd88340;}const _0x1a902c=_0x125da4['hits'][_0x50fe4b(0x136)]((_0x1c0a3e,_0x431654)=>parseHit(_0x1c0a3e,_0x431654));if(!Number['isSafeInteger'](_0x125da4['total'])||_0x125da4[_0x50fe4b(0x135)]!==_0x1a902c[_0x50fe4b(0x167)])throw invalidContract('total');return{'schemaVersion':_0x125da4['schemaVersion'],'profile':_0x125da4[_0x50fe4b(0x15d)],'total':_0x125da4[_0x50fe4b(0x135)],'strategyFingerprint':_0x125da4[_0x50fe4b(0x143)],'timingsMs':_0xd090fb,'hits':_0x1a902c};}function parseHit(_0x25ac5c,_0x43c344){const _0x2c49ec=a289_0x1df4cf,_0x279716=requireExactRecord(_0x25ac5c,HIT_KEYS,_0x2c49ec(0x16e)+_0x43c344+']'),_0x555a4b=_0x28aeb1=>{const _0x4b42bc=_0x2c49ec,_0x24994d=_0x279716[_0x28aeb1];if(typeof _0x24994d!==_0x4b42bc(0x12d)||!_0x24994d)throw invalidContract(_0x28aeb1);return _0x24994d;};if(!Number[_0x2c49ec(0x172)](_0x279716[_0x2c49ec(0x12f)])||_0x279716[_0x2c49ec(0x12f)]<0x1)throw invalidContract('revision');if(_0x279716['scope']!=='public'&&_0x279716[_0x2c49ec(0x15e)]!=='company')throw invalidContract(_0x2c49ec(0x15e));if(typeof _0x279716['title']!==_0x2c49ec(0x12d)||typeof _0x279716[_0x2c49ec(0x170)]!==_0x2c49ec(0x12d))throw invalidContract(_0x2c49ec(0x170));if(!Array[_0x2c49ec(0x156)](_0x279716[_0x2c49ec(0x154)])||_0x279716['tags'][_0x2c49ec(0x146)](_0xcdcc88=>typeof _0xcdcc88!=='string'))throw invalidContract(_0x2c49ec(0x154));if(!Number[_0x2c49ec(0x172)](_0x279716[_0x2c49ec(0x16d)])||_0x279716[_0x2c49ec(0x16d)]!==_0x43c344+0x1)throw invalidContract(_0x2c49ec(0x16d));if(!isFiniteNumber(_0x279716[_0x2c49ec(0x124)])||!isFiniteNumber(_0x279716[_0x2c49ec(0x14f)]))throw invalidContract('score');return{'documentId':_0x555a4b(_0x2c49ec(0x171)),'revision':_0x279716[_0x2c49ec(0x12f)],'chunkId':_0x555a4b(_0x2c49ec(0x150)),'scope':_0x279716['scope'],'title':_0x279716[_0x2c49ec(0x165)],'text':_0x279716['text'],'tags':[..._0x279716[_0x2c49ec(0x154)]],'rank':_0x279716['rank'],'rawScore':_0x279716['rawScore'],'finalScore':_0x279716[_0x2c49ec(0x14f)],'scoreKind':_0x555a4b(_0x2c49ec(0x13a))};}function requireExactRecord(_0x4d9aa1,_0x13d788,_0x23dc0d){const _0x178f20=a289_0x1df4cf,_0x35fd7c=requireRecord(_0x4d9aa1,_0x23dc0d),_0x119c33=Object['keys'](_0x35fd7c)['sort'](),_0x580d13=[..._0x13d788][_0x178f20(0x14b)]();if(_0x119c33[_0x178f20(0x167)]!==_0x580d13['length']||_0x119c33[_0x178f20(0x146)]((_0x329c2f,_0x3e69ff)=>_0x329c2f!==_0x580d13[_0x3e69ff]))throw invalidContract(_0x23dc0d);return _0x35fd7c;}function requireRecord(_0x532583,_0x2e1010){const _0x3f435f=a289_0x1df4cf;if(!_0x532583||typeof _0x532583!==_0x3f435f(0x151)||Array[_0x3f435f(0x156)](_0x532583))throw invalidContract(_0x2e1010);return _0x532583;}function isFiniteNumber(_0x263809){const _0x2c4688=a289_0x1df4cf;return typeof _0x263809==='number'&&Number[_0x2c4688(0x11f)](_0x263809);}function invalidContract(_0x1575bb){const _0x171d8c=a289_0x1df4cf;return CliErrors[_0x171d8c(0x141)]('SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20'+_0x1575bb+_0x171d8c(0x138));}
1
+ const a289_0x5eb872=a289_0x35b7;(function(_0x44b15e,_0x56af98){const _0x16f705=a289_0x35b7,_0x36db3f=_0x44b15e();while(!![]){try{const _0x25c89c=parseInt(_0x16f705(0x187))/0x1*(-parseInt(_0x16f705(0x174))/0x2)+-parseInt(_0x16f705(0x186))/0x3+parseInt(_0x16f705(0x166))/0x4*(-parseInt(_0x16f705(0x165))/0x5)+-parseInt(_0x16f705(0x157))/0x6*(-parseInt(_0x16f705(0x170))/0x7)+-parseInt(_0x16f705(0x14f))/0x8*(parseInt(_0x16f705(0x16a))/0x9)+-parseInt(_0x16f705(0x184))/0xa+parseInt(_0x16f705(0x164))/0xb;if(_0x25c89c===_0x56af98)break;else _0x36db3f['push'](_0x36db3f['shift']());}catch(_0x654b0a){_0x36db3f['push'](_0x36db3f['shift']());}}}(a289_0x1be6,0x8d05e));function a289_0x1be6(){const _0x193b63=['signal','no-store','headers','timingsMs','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Knowledge\x20search\x20query\x20is\x20required.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','rawScore','/v2/development/apps/','Knowledge\x20search\x20appCode\x20is\x20required.','profile','apiError','content-type','search','scope','test','topK','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','status','text','map','total','schemaVersion','keys','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','tags','application/json','origin','networkError','pathname','entries','rank','serviceUrl','development','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','104oUXTYM','title','isArray','password','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','cookie','validation','username','6aKjltN','Knowledge\x20search\x20cancelled.','https:','hits','revision','query','chunkId','score','string','documentId','hash','number','cache-control','31564203gzSbFj','55cSiJwB','164812yaYwtd','isFinite','error','isSafeInteger','117081FYEJhE','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','AbortError','protocol','appCode','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','907431imLaad','public','some','TimeoutError','27674mGlTpm','company','cli:rabetbase','get','aborted','finalScore','authRequired','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','response','split','object','strategyFingerprint','name','timeout','includes','length','5045240mFWgTN','trim','1019547CYzDyD','69UtFozG'];a289_0x1be6=function(){return _0x193b63;};return a289_0x1be6();}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x5eb872(0x19f),a289_0x5eb872(0x192),'total',a289_0x5eb872(0x15a),a289_0x5eb872(0x17f),a289_0x5eb872(0x18b)],HIT_KEYS=[a289_0x5eb872(0x160),a289_0x5eb872(0x15b),a289_0x5eb872(0x15d),'scope',a289_0x5eb872(0x150),a289_0x5eb872(0x19c),a289_0x5eb872(0x1a2),'rank','rawScore',a289_0x5eb872(0x179),'scoreKind'];export function normalizeKbServiceOrigin(_0x3b27ee){const _0x1eca01=a289_0x5eb872,_0x4c9759=()=>CliErrors[_0x1eca01(0x155)](_0x1eca01(0x1ab)),_0x5347d5=_0x3b27ee?.[_0x1eca01(0x185)]();if(!_0x5347d5||/[\u0000-\u0020\u007f]/['test'](_0x5347d5)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x1eca01(0x197)](_0x5347d5))throw _0x4c9759();let _0x3ebeb8;try{_0x3ebeb8=new URL(_0x5347d5);}catch{throw _0x4c9759();}if(_0x3ebeb8[_0x1eca01(0x16d)]!==_0x1eca01(0x159)||!_0x3ebeb8['hostname']||_0x3ebeb8[_0x1eca01(0x156)]||_0x3ebeb8[_0x1eca01(0x152)]||_0x3ebeb8[_0x1eca01(0x1a6)]!=='/'||_0x3ebeb8[_0x1eca01(0x195)]||_0x3ebeb8[_0x1eca01(0x161)])throw _0x4c9759();return _0x3ebeb8[_0x1eca01(0x1a4)];}export async function searchDirectKnowledge(_0x2f03e8){const _0x298308=a289_0x5eb872,_0x4b0328=_0x2f03e8[_0x298308(0x16e)][_0x298308(0x185)](),_0x38efd3=_0x2f03e8[_0x298308(0x15c)]['trim']();if(!_0x4b0328)throw CliErrors[_0x298308(0x155)](_0x298308(0x191));if(!_0x2f03e8[_0x298308(0x154)][_0x298308(0x185)]())throw CliErrors[_0x298308(0x17a)]();if(!_0x38efd3)throw CliErrors[_0x298308(0x155)](_0x298308(0x18d));validateTopK(_0x2f03e8[_0x298308(0x198)]);const _0x15efa1=normalizeKbServiceOrigin(_0x2f03e8[_0x298308(0x1a9)]),_0x348ca4=AbortSignal[_0x298308(0x181)](0xea60),_0x545abb=_0x2f03e8[_0x298308(0x188)]?AbortSignal['any']([_0x2f03e8[_0x298308(0x188)],_0x348ca4]):_0x348ca4;let _0x30eebf;try{_0x30eebf=await fetch(_0x15efa1+_0x298308(0x190)+encodeURIComponent(_0x4b0328)+'/knowledge/search',{'method':'POST','redirect':_0x298308(0x168),'headers':{'Content-Type':'application/json','Cookie':_0x2f03e8['cookie'],'X-Invoke-Source':_0x298308(0x176)},'body':JSON['stringify']({'query':_0x38efd3,..._0x2f03e8[_0x298308(0x198)]!==undefined?{'topK':_0x2f03e8[_0x298308(0x198)]}:{}}),'signal':_0x545abb});}catch(_0xe9a3e9){if(_0x2f03e8[_0x298308(0x188)]?.['aborted'])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x298308(0x16c));if(_0xe9a3e9 instanceof Error&&_0xe9a3e9[_0x298308(0x180)]===_0x298308(0x173))throw CliErrors[_0x298308(0x1a5)](_0x298308(0x1a1));throw CliErrors[_0x298308(0x1a5)](_0x298308(0x18e));}if(_0x30eebf[_0x298308(0x19b)]===0x191)throw CliErrors[_0x298308(0x17a)]();if(_0x30eebf[_0x298308(0x19b)]===0x1ad)throw CliErrors[_0x298308(0x193)](_0x298308(0x16f));if(!_0x30eebf['ok'])throw CliErrors['apiError'](_0x298308(0x17b)+_0x30eebf['status']+').');if(!hasNoStore(_0x30eebf[_0x298308(0x18a)]))throw CliErrors['apiError'](_0x298308(0x153));if(!(_0x30eebf['headers']['get'](_0x298308(0x194))??'')['toLowerCase']()[_0x298308(0x182)](_0x298308(0x1a3)))throw CliErrors[_0x298308(0x193)](_0x298308(0x19a));let _0x1c7dc7;try{_0x1c7dc7=await _0x30eebf['json']();}catch(_0x5be7e3){if(_0x2f03e8[_0x298308(0x188)]?.['aborted'])throw new DOMException(_0x298308(0x158),_0x298308(0x16c));if(_0x348ca4[_0x298308(0x178)]||_0x5be7e3 instanceof Error&&_0x5be7e3[_0x298308(0x180)]===_0x298308(0x173))throw CliErrors[_0x298308(0x1a5)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x298308(0x193)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x72b1f8=requireExactRecord(_0x1c7dc7,[_0x298308(0x15a),_0x298308(0x17f),_0x298308(0x18b)],_0x298308(0x17c));if(!Array[_0x298308(0x151)](_0x72b1f8[_0x298308(0x15a)]))throw invalidContract(_0x298308(0x15a));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x298308(0x1aa),'total':_0x72b1f8[_0x298308(0x15a)][_0x298308(0x183)],'hits':_0x72b1f8[_0x298308(0x15a)],'strategyFingerprint':_0x72b1f8[_0x298308(0x17f)],'timingsMs':_0x72b1f8[_0x298308(0x18b)]},_0x2f03e8[_0x298308(0x198)]??0xa);}catch(_0x3048f9){if(_0x3048f9 instanceof CliError)throw CliErrors[_0x298308(0x193)](_0x298308(0x16b));throw _0x3048f9;}}function validateTopK(_0x43c6e8){const _0xe039ae=a289_0x5eb872;if(_0x43c6e8!==undefined&&(!Number['isSafeInteger'](_0x43c6e8)||_0x43c6e8<0x1||_0x43c6e8>0x32))throw CliErrors['validation'](_0xe039ae(0x18c));}function hasNoStore(_0x1e616b){const _0x1bf471=a289_0x5eb872;return(_0x1e616b[_0x1bf471(0x177)](_0x1bf471(0x163))??'')[_0x1bf471(0x17d)](',')[_0x1bf471(0x172)](_0x4744b5=>_0x4744b5[_0x1bf471(0x185)]()['toLowerCase']()===_0x1bf471(0x189));}function parseDevelopmentSearchResponse(_0x2552d4,_0x17bb3f){const _0x2d4f8c=a289_0x5eb872,_0x5cbfc6=requireExactRecord(_0x2552d4,RESPONSE_KEYS,_0x2d4f8c(0x17c));if(_0x5cbfc6[_0x2d4f8c(0x19f)]!==0x2||_0x5cbfc6[_0x2d4f8c(0x192)]!==_0x2d4f8c(0x1aa))throw invalidContract(_0x2d4f8c(0x192));if(!Array[_0x2d4f8c(0x151)](_0x5cbfc6[_0x2d4f8c(0x15a)])||_0x5cbfc6['hits']['length']>(_0x17bb3f??0x32))throw invalidContract(_0x2d4f8c(0x15a));if(typeof _0x5cbfc6[_0x2d4f8c(0x17f)]!==_0x2d4f8c(0x15f)||!/^sha256:[0-9a-f]{64}$/['test'](_0x5cbfc6[_0x2d4f8c(0x17f)]))throw invalidContract(_0x2d4f8c(0x17f));const _0x4dcd32=requireRecord(_0x5cbfc6[_0x2d4f8c(0x18b)],_0x2d4f8c(0x18b)),_0x369915={};for(const [_0x3f6116,_0x48f7d5]of Object[_0x2d4f8c(0x1a7)](_0x4dcd32)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2d4f8c(0x197)](_0x3f6116)||typeof _0x48f7d5!=='number'||!Number[_0x2d4f8c(0x167)](_0x48f7d5)||_0x48f7d5<0x0)throw invalidContract('timingsMs');_0x369915[_0x3f6116]=_0x48f7d5;}const _0x5a2ccc=_0x5cbfc6[_0x2d4f8c(0x15a)][_0x2d4f8c(0x19d)]((_0x430f04,_0x336ef4)=>parseHit(_0x430f04,_0x336ef4));if(!Number['isSafeInteger'](_0x5cbfc6['total'])||_0x5cbfc6[_0x2d4f8c(0x19e)]!==_0x5a2ccc[_0x2d4f8c(0x183)])throw invalidContract(_0x2d4f8c(0x19e));return{'schemaVersion':_0x5cbfc6[_0x2d4f8c(0x19f)],'profile':_0x5cbfc6[_0x2d4f8c(0x192)],'total':_0x5cbfc6[_0x2d4f8c(0x19e)],'strategyFingerprint':_0x5cbfc6[_0x2d4f8c(0x17f)],'timingsMs':_0x369915,'hits':_0x5a2ccc};}function parseHit(_0x818a08,_0x33eed9){const _0x37a1bf=a289_0x5eb872,_0x7548e5=requireExactRecord(_0x818a08,HIT_KEYS,'hits['+_0x33eed9+']'),_0x1aeb0b=_0x53b24d=>{const _0x16b3a6=a289_0x35b7,_0x5da062=_0x7548e5[_0x53b24d];if(typeof _0x5da062!==_0x16b3a6(0x15f)||!_0x5da062)throw invalidContract(_0x53b24d);return _0x5da062;};if(!Number[_0x37a1bf(0x169)](_0x7548e5[_0x37a1bf(0x15b)])||_0x7548e5[_0x37a1bf(0x15b)]<0x1)throw invalidContract('revision');if(_0x7548e5[_0x37a1bf(0x196)]!==_0x37a1bf(0x171)&&_0x7548e5['scope']!==_0x37a1bf(0x175))throw invalidContract(_0x37a1bf(0x196));if(typeof _0x7548e5['title']!==_0x37a1bf(0x15f)||typeof _0x7548e5[_0x37a1bf(0x19c)]!==_0x37a1bf(0x15f))throw invalidContract('text');if(!Array[_0x37a1bf(0x151)](_0x7548e5[_0x37a1bf(0x1a2)])||_0x7548e5[_0x37a1bf(0x1a2)][_0x37a1bf(0x172)](_0x521c6f=>typeof _0x521c6f!==_0x37a1bf(0x15f)))throw invalidContract('tags');if(!Number[_0x37a1bf(0x169)](_0x7548e5[_0x37a1bf(0x1a8)])||_0x7548e5[_0x37a1bf(0x1a8)]!==_0x33eed9+0x1)throw invalidContract(_0x37a1bf(0x1a8));if(!isFiniteNumber(_0x7548e5['rawScore'])||!isFiniteNumber(_0x7548e5['finalScore']))throw invalidContract(_0x37a1bf(0x15e));return{'documentId':_0x1aeb0b(_0x37a1bf(0x160)),'revision':_0x7548e5['revision'],'chunkId':_0x1aeb0b(_0x37a1bf(0x15d)),'scope':_0x7548e5['scope'],'title':_0x7548e5[_0x37a1bf(0x150)],'text':_0x7548e5[_0x37a1bf(0x19c)],'tags':[..._0x7548e5[_0x37a1bf(0x1a2)]],'rank':_0x7548e5[_0x37a1bf(0x1a8)],'rawScore':_0x7548e5[_0x37a1bf(0x18f)],'finalScore':_0x7548e5[_0x37a1bf(0x179)],'scoreKind':_0x1aeb0b('scoreKind')};}function requireExactRecord(_0x39727d,_0x14e2d8,_0x5556c6){const _0x55a2f7=a289_0x5eb872,_0x3ed79e=requireRecord(_0x39727d,_0x5556c6),_0x3aa4ce=Object[_0x55a2f7(0x1a0)](_0x3ed79e)['sort'](),_0xa8a013=[..._0x14e2d8]['sort']();if(_0x3aa4ce[_0x55a2f7(0x183)]!==_0xa8a013[_0x55a2f7(0x183)]||_0x3aa4ce[_0x55a2f7(0x172)]((_0x5bdbe5,_0x2482ab)=>_0x5bdbe5!==_0xa8a013[_0x2482ab]))throw invalidContract(_0x5556c6);return _0x3ed79e;}function requireRecord(_0x4639d5,_0x252702){const _0xda8dea=a289_0x5eb872;if(!_0x4639d5||typeof _0x4639d5!==_0xda8dea(0x17e)||Array['isArray'](_0x4639d5))throw invalidContract(_0x252702);return _0x4639d5;}function a289_0x35b7(_0x5f1ef2,_0x270099){_0x5f1ef2=_0x5f1ef2-0x14f;const _0x1be6d5=a289_0x1be6();let _0x35b7e8=_0x1be6d5[_0x5f1ef2];return _0x35b7e8;}function isFiniteNumber(_0x594edb){const _0x212181=a289_0x5eb872;return typeof _0x594edb===_0x212181(0x162)&&Number['isFinite'](_0x594edb);}function invalidContract(_0x5b0e51){const _0x3afe02=a289_0x5eb872;return CliErrors[_0x3afe02(0x193)](_0x3afe02(0x199)+_0x5b0e51+'\x20contract.');}
@@ -1 +1 @@
1
- (function(_0x2ea2aa,_0xe2d1cf){const _0x3dc8f0=a290_0x22ac,_0x556e7f=_0x2ea2aa();while(!![]){try{const _0x29b713=-parseInt(_0x3dc8f0(0x198))/0x1*(-parseInt(_0x3dc8f0(0x18d))/0x2)+parseInt(_0x3dc8f0(0x18a))/0x3+parseInt(_0x3dc8f0(0x193))/0x4+parseInt(_0x3dc8f0(0x194))/0x5*(parseInt(_0x3dc8f0(0x187))/0x6)+-parseInt(_0x3dc8f0(0x18b))/0x7*(parseInt(_0x3dc8f0(0x188))/0x8)+-parseInt(_0x3dc8f0(0x183))/0x9+-parseInt(_0x3dc8f0(0x180))/0xa;if(_0x29b713===_0xe2d1cf)break;else _0x556e7f['push'](_0x556e7f['shift']());}catch(_0x94192d){_0x556e7f['push'](_0x556e7f['shift']());}}}(a290_0x529e,0xdae7b));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x20c7f8,_0x141502=process['cwd']()){const _0x412f70=a290_0x22ac,_0x289668=resolve(_0x141502),_0x4b0c11=join(_0x289668,'.rabetbase','page');return{'projectRoot':_0x289668,'pagesBaseDir':_0x4b0c11,'appPagesDir':join(_0x4b0c11,_0x20c7f8),'lockFilePath':join(_0x289668,_0x412f70(0x189),_0x412f70(0x18f))};}export function buildPageFileName(_0x28d3ef,_0x4a0473){const _0x33053e=a290_0x22ac;return _0x28d3ef+'-'+_0x4a0473[_0x33053e(0x18e)]()+_0x33053e(0x181);}function a290_0x22ac(_0x2f7492,_0x3ab336){_0x2f7492=_0x2f7492-0x17f;const _0x529e96=a290_0x529e();let _0x22ac7a=_0x529e96[_0x2f7492];return _0x22ac7a;}function a290_0x529e(){const _0xe4cf67=['12dKLrUC','14301088wyzltE','.rabetbase','1250526XAhCSE','7qTkbIv','flagMissing','8dEsZWO','toUpperCase','page.lock.json','localeCompare','appPagesDir','split','4054424HNMdsi','3664410pfDLic','validation','Unsupported\x20file\x20in\x20page\x20directory:\x20','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','349603xNThPK','trim','name','page-dir','9590660VTvwgi','.json','utf8','5861583gcHYAy','isDirectory','F_OK','sort'];a290_0x529e=function(){return _0xe4cf67;};return a290_0x529e();}export function resolvePageFilePath(_0x44e909,_0xeb8fc3,_0x239e88){const _0x46e870=a290_0x22ac;return join(_0x44e909[_0x46e870(0x191)],buildPageFileName(_0xeb8fc3,_0x239e88));}export async function ensureParentDirectory(_0x8c3a03){await mkdir(dirname(_0x8c3a03),{'recursive':!![]});}export async function fileExists(_0x454d65){const _0x3167bd=a290_0x22ac;try{return await access(_0x454d65,constants[_0x3167bd(0x185)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x12127a){const _0x21a8be=a290_0x22ac,_0x4c6e05=_0x12127a[_0x21a8be(0x199)]();if(!_0x4c6e05)throw CliErrors[_0x21a8be(0x18c)](_0x21a8be(0x17f));const _0x54fa4f=resolve(_0x4c6e05);let _0x82a34a;try{_0x82a34a=await lstat(_0x54fa4f);}catch{throw CliErrors[_0x21a8be(0x195)]('Page\x20directory\x20not\x20found:\x20'+_0x4c6e05);}if(!_0x82a34a[_0x21a8be(0x184)]())throw CliErrors[_0x21a8be(0x195)](_0x21a8be(0x197)+_0x4c6e05);const _0x3510bb={};return await readDirectory(_0x54fa4f,_0x54fa4f,_0x3510bb),_0x3510bb;}async function readDirectory(_0x3b9014,_0x3e5059,_0x3bc4a9){const _0x199143=a290_0x22ac,_0x23f552=await readdir(_0x3e5059,{'withFileTypes':!![]});for(const _0x7c9c13 of _0x23f552[_0x199143(0x186)]((_0x116671,_0x489510)=>_0x116671[_0x199143(0x19a)][_0x199143(0x190)](_0x489510[_0x199143(0x19a)]))){const _0x67b601=join(_0x3e5059,_0x7c9c13['name']);if(_0x7c9c13[_0x199143(0x184)]()){await readDirectory(_0x3b9014,_0x67b601,_0x3bc4a9);continue;}if(!_0x7c9c13['isFile']())throw CliErrors[_0x199143(0x195)](_0x199143(0x196)+_0x67b601);_0x3bc4a9[relative(_0x3b9014,_0x67b601)[_0x199143(0x192)](sep)['join']('/')]=await readFile(_0x67b601,_0x199143(0x182));}}
1
+ const a290_0x5bacf7=a290_0x585f;(function(_0x5ac6ac,_0xc8cdbd){const _0x3dcd3e=a290_0x585f,_0x211537=_0x5ac6ac();while(!![]){try{const _0x433431=-parseInt(_0x3dcd3e(0xd9))/0x1+-parseInt(_0x3dcd3e(0xea))/0x2+-parseInt(_0x3dcd3e(0xd8))/0x3+-parseInt(_0x3dcd3e(0xe9))/0x4*(-parseInt(_0x3dcd3e(0xe7))/0x5)+-parseInt(_0x3dcd3e(0xe5))/0x6+parseInt(_0x3dcd3e(0xdb))/0x7+-parseInt(_0x3dcd3e(0xde))/0x8;if(_0x433431===_0xc8cdbd)break;else _0x211537['push'](_0x211537['shift']());}catch(_0x124e6e){_0x211537['push'](_0x211537['shift']());}}}(a290_0x1d52,0x9d2ca));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x34c954,_0x1c6c61=process[a290_0x5bacf7(0xe8)]()){const _0x109788=a290_0x5bacf7,_0x4fe5ec=resolve(_0x1c6c61),_0x15199f=join(_0x4fe5ec,_0x109788(0xd7),_0x109788(0xdf));return{'projectRoot':_0x4fe5ec,'pagesBaseDir':_0x15199f,'appPagesDir':join(_0x15199f,_0x34c954),'lockFilePath':join(_0x4fe5ec,_0x109788(0xd7),_0x109788(0xe0))};}export function buildPageFileName(_0xcfc96a,_0x57d54f){const _0x317693=a290_0x5bacf7;return _0xcfc96a+'-'+_0x57d54f[_0x317693(0xe4)]()+_0x317693(0xed);}function a290_0x585f(_0x3a0503,_0x7db27d){_0x3a0503=_0x3a0503-0xd6;const _0x1d520d=a290_0x1d52();let _0x585f6b=_0x1d520d[_0x3a0503];return _0x585f6b;}export function resolvePageFilePath(_0x4f0915,_0x353811,_0x465133){const _0x21e1d2=a290_0x5bacf7;return join(_0x4f0915[_0x21e1d2(0xdc)],buildPageFileName(_0x353811,_0x465133));}export async function ensureParentDirectory(_0x1dd35d){await mkdir(dirname(_0x1dd35d),{'recursive':!![]});}export async function fileExists(_0xe1424d){try{return await access(_0xe1424d,constants['F_OK']),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x392f05){const _0x3bd776=a290_0x5bacf7,_0x3efa74=_0x392f05[_0x3bd776(0xec)]();if(!_0x3efa74)throw CliErrors['flagMissing'](_0x3bd776(0xe1));const _0x22d46c=resolve(_0x3efa74);let _0x54d637;try{_0x54d637=await lstat(_0x22d46c);}catch{throw CliErrors['validation']('Page\x20directory\x20not\x20found:\x20'+_0x3efa74);}if(!_0x54d637[_0x3bd776(0xda)]())throw CliErrors[_0x3bd776(0xdd)](_0x3bd776(0xd6)+_0x3efa74);const _0x2dfc65={};return await readDirectory(_0x22d46c,_0x22d46c,_0x2dfc65),_0x2dfc65;}function a290_0x1d52(){const _0x1260cf=['page','page.lock.json','page-dir','utf8','Unsupported\x20file\x20in\x20page\x20directory:\x20','toUpperCase','1823670JQgWBD','join','1364855mWewtW','cwd','12RMboBC','162114ddLDEg','name','trim','.json','sort','split','localeCompare','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.rabetbase','290697kEvquF','674032cEGuSf','isDirectory','6968668TXPFKL','appPagesDir','validation','117744fwngLB'];a290_0x1d52=function(){return _0x1260cf;};return a290_0x1d52();}async function readDirectory(_0x4409b6,_0x12fd8d,_0x103de8){const _0x2dd8b3=a290_0x5bacf7,_0x561f3c=await readdir(_0x12fd8d,{'withFileTypes':!![]});for(const _0x383590 of _0x561f3c[_0x2dd8b3(0xee)]((_0x11aa02,_0x597bb8)=>_0x11aa02['name'][_0x2dd8b3(0xf0)](_0x597bb8[_0x2dd8b3(0xeb)]))){const _0x47b564=join(_0x12fd8d,_0x383590['name']);if(_0x383590[_0x2dd8b3(0xda)]()){await readDirectory(_0x4409b6,_0x47b564,_0x103de8);continue;}if(!_0x383590['isFile']())throw CliErrors[_0x2dd8b3(0xdd)](_0x2dd8b3(0xe3)+_0x47b564);_0x103de8[relative(_0x4409b6,_0x47b564)[_0x2dd8b3(0xef)](sep)[_0x2dd8b3(0xe6)]('/')]=await readFile(_0x47b564,_0x2dd8b3(0xe2));}}
@@ -1 +1 @@
1
- function a291_0x2b0b(_0x5aeb23,_0x115b84){_0x5aeb23=_0x5aeb23-0xe6;const _0x27fba1=a291_0x27fb();let _0x2b0bfa=_0x27fba1[_0x5aeb23];return _0x2b0bfa;}(function(_0x2389f2,_0x1822dc){const _0x836c8a=a291_0x2b0b,_0x594831=_0x2389f2();while(!![]){try{const _0x18a534=-parseInt(_0x836c8a(0xef))/0x1+parseInt(_0x836c8a(0xed))/0x2+parseInt(_0x836c8a(0xf0))/0x3+-parseInt(_0x836c8a(0xeb))/0x4+parseInt(_0x836c8a(0xe6))/0x5+-parseInt(_0x836c8a(0xf1))/0x6*(-parseInt(_0x836c8a(0xee))/0x7)+-parseInt(_0x836c8a(0xe9))/0x8;if(_0x18a534===_0x1822dc)break;else _0x594831['push'](_0x594831['shift']());}catch(_0x17e3e7){_0x594831['push'](_0x594831['shift']());}}}(a291_0x27fb,0x6bd1f));import a291_0x3989fd from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x16c78b){const _0x540408=a291_0x2b0b;return JSON[_0x540408(0xec)](JSON[_0x540408(0xea)](_0x16c78b),null,0x2)+'\x0a';}export function computePageContentHash(_0x4e05d0){const _0x108d3c=a291_0x2b0b;return a291_0x3989fd['createHash'](_0x108d3c(0xf2))[_0x108d3c(0xe8)](_0x4e05d0)[_0x108d3c(0xe7)]('hex');}export function computeSerializedSchemaHash(_0x2d7e91){return computePageContentHash(serializePageSchemaForFile(_0x2d7e91));}export async function computePageFileHash(_0x48e83d){const _0x1008d3=await readFile(_0x48e83d,'utf8');return computePageContentHash(_0x1008d3);}function a291_0x27fb(){const _0x54b380=['105574ZCfNYE','798900IZjkXu','473808shhUaB','186xeGrVz','md5','2323155eIOtEO','digest','update','148816EgiWIz','parse','2338788ddTDUD','stringify','1507442TXuktx'];a291_0x27fb=function(){return _0x54b380;};return a291_0x27fb();}
1
+ (function(_0x5a6a9d,_0x495a7f){const _0x4ee34d=a291_0x30c6,_0x63969b=_0x5a6a9d();while(!![]){try{const _0x49904c=parseInt(_0x4ee34d(0x1c6))/0x1*(parseInt(_0x4ee34d(0x1d2))/0x2)+parseInt(_0x4ee34d(0x1ce))/0x3+-parseInt(_0x4ee34d(0x1c9))/0x4+-parseInt(_0x4ee34d(0x1cb))/0x5+parseInt(_0x4ee34d(0x1cd))/0x6*(parseInt(_0x4ee34d(0x1d0))/0x7)+-parseInt(_0x4ee34d(0x1d1))/0x8+-parseInt(_0x4ee34d(0x1d3))/0x9*(-parseInt(_0x4ee34d(0x1c5))/0xa);if(_0x49904c===_0x495a7f)break;else _0x63969b['push'](_0x63969b['shift']());}catch(_0x2a5a6e){_0x63969b['push'](_0x63969b['shift']());}}}(a291_0x5627,0x2fcbc));import a291_0xc3f568 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x303682){const _0xe0529d=a291_0x30c6;return JSON[_0xe0529d(0x1c7)](JSON[_0xe0529d(0x1cc)](_0x303682),null,0x2)+'\x0a';}function a291_0x30c6(_0x11d06a,_0xcc4fa1){_0x11d06a=_0x11d06a-0x1c5;const _0x562740=a291_0x5627();let _0x30c6e9=_0x562740[_0x11d06a];return _0x30c6e9;}export function computePageContentHash(_0x33d564){const _0x29800e=a291_0x30c6;return a291_0xc3f568['createHash'](_0x29800e(0x1c8))[_0x29800e(0x1d4)](_0x33d564)[_0x29800e(0x1ca)](_0x29800e(0x1cf));}function a291_0x5627(){const _0x573e9b=['558234UMwSrE','hex','7qKcBbC','47192wrDQbE','2QMTLpi','2755953wAXFfe','update','10nwjKPm','162634IAlcYZ','stringify','md5','1378048eBJBww','digest','1068595tLdygz','parse','629838RBitgF'];a291_0x5627=function(){return _0x573e9b;};return a291_0x5627();}export function computeSerializedSchemaHash(_0x55c3e8){return computePageContentHash(serializePageSchemaForFile(_0x55c3e8));}export async function computePageFileHash(_0x25f0bf){const _0x377545=await readFile(_0x25f0bf,'utf8');return computePageContentHash(_0x377545);}