@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.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 (355) 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/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/feishu-bind.js +1 -1
  249. package/lib/commands/user-account/index.js +1 -1
  250. package/lib/commands/workspace/add.js +1 -1
  251. package/lib/commands/workspace/index.js +1 -1
  252. package/lib/commands/workspace/remove.js +1 -1
  253. package/lib/config/domain-config.js +1 -1
  254. package/lib/config/project-domain-routing.js +1 -1
  255. package/lib/config/region-config.js +1 -1
  256. package/lib/config/schema.js +1 -1
  257. package/lib/constant/cdn.js +1 -1
  258. package/lib/constant/cli.js +1 -1
  259. package/lib/constant/defaults.js +1 -1
  260. package/lib/constant/domain.js +1 -1
  261. package/lib/constant/env.js +1 -1
  262. package/lib/constant/output.js +1 -1
  263. package/lib/constant/paths.js +1 -1
  264. package/lib/constant/region.js +1 -1
  265. package/lib/constant/risk.js +1 -1
  266. package/lib/constant/routing-profile.js +1 -1
  267. package/lib/context/app-resolver.js +1 -1
  268. package/lib/context/auth-resolver.js +1 -1
  269. package/lib/context/config-loader.js +1 -1
  270. package/lib/context.js +1 -1
  271. package/lib/core/alias-resolver.js +1 -1
  272. package/lib/core/api-client.d.ts +1 -1
  273. package/lib/core/api-client.js +1 -1
  274. package/lib/core/bff/config.js +1 -1
  275. package/lib/core/bff/file-system.js +1 -1
  276. package/lib/core/bff/hash.js +1 -1
  277. package/lib/core/bff/hook-directory.js +1 -1
  278. package/lib/core/bff/lock.js +1 -1
  279. package/lib/core/bff/utils.js +1 -1
  280. package/lib/core/cross-db-relation.js +1 -1
  281. package/lib/core/db-resolver.js +1 -1
  282. package/lib/core/flow-config.js +1 -1
  283. package/lib/core/instant-api-policy/config.js +1 -1
  284. package/lib/core/kb-search-client.js +1 -1
  285. package/lib/core/page/file-system.js +1 -1
  286. package/lib/core/page/hash.js +1 -1
  287. package/lib/core/page/lock.js +1 -1
  288. package/lib/core/page/lr-smart-jsx.js +1 -1
  289. package/lib/core/sql-index-auditor.js +1 -1
  290. package/lib/core/sql-sync/config.js +1 -1
  291. package/lib/core/sql-sync/file-system.js +1 -1
  292. package/lib/core/sql-sync/hash.js +1 -1
  293. package/lib/core/sql-sync/lock.js +1 -1
  294. package/lib/core/sql-sync/utils.js +1 -1
  295. package/lib/core/sql-validator.js +1 -1
  296. package/lib/errors.js +1 -1
  297. package/lib/framework/build-all-flags.js +1 -1
  298. package/lib/framework/error-output.js +1 -1
  299. package/lib/framework/explicit-yes.js +1 -1
  300. package/lib/framework/flags.js +1 -1
  301. package/lib/framework/help.js +1 -1
  302. package/lib/framework/index.js +1 -1
  303. package/lib/framework/output.js +1 -1
  304. package/lib/framework/response.js +1 -1
  305. package/lib/framework/runner-alias.js +1 -1
  306. package/lib/framework/runner.js +1 -1
  307. package/lib/framework/schema-export.js +1 -1
  308. package/lib/framework/supported-flags.js +1 -1
  309. package/lib/framework/types.js +1 -1
  310. package/lib/generated/build-info.d.ts +4 -4
  311. package/lib/generated/build-info.js +1 -1
  312. package/lib/generated/official-routing.js +1 -1
  313. package/lib/generated/routing-contract.js +1 -1
  314. package/lib/help.js +1 -1
  315. package/lib/postinstall.js +1 -1
  316. package/lib/runtime/confirmation.js +1 -1
  317. package/lib/runtime/event.js +1 -1
  318. package/lib/runtime/index.js +1 -1
  319. package/lib/runtime/queue.js +1 -1
  320. package/lib/runtime/resolve.js +1 -1
  321. package/lib/skills/builtin-skill.js +1 -1
  322. package/lib/skills/main.js +1 -1
  323. package/lib/skills/npx-skills-add.js +1 -1
  324. package/lib/skills/skill-presence.js +1 -1
  325. package/lib/telemetry/cli-command-trace.js +1 -1
  326. package/lib/telemetry/cli-help-trace.js +1 -1
  327. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  328. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  329. package/lib/telemetry/send-cli-trace-log.js +1 -1
  330. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  331. package/lib/utils/ai_config.js +1 -1
  332. package/lib/utils/apply-jq-filter.js +1 -1
  333. package/lib/utils/cdn-config.js +1 -1
  334. package/lib/utils/check-sdk-version.js +1 -1
  335. package/lib/utils/cli-version-check.js +1 -1
  336. package/lib/utils/cli-version-policy.js +1 -1
  337. package/lib/utils/config.js +1 -1
  338. package/lib/utils/entity-with-id.js +1 -1
  339. package/lib/utils/file-utils.js +1 -1
  340. package/lib/utils/guides-cdn.js +1 -1
  341. package/lib/utils/http-client.js +1 -1
  342. package/lib/utils/is-non-interactive.js +1 -1
  343. package/lib/utils/logger.js +1 -1
  344. package/lib/utils/params.js +1 -1
  345. package/lib/utils/platform.js +1 -1
  346. package/lib/utils/sleep.js +1 -1
  347. package/lib/utils/template-replacer.js +1 -1
  348. package/lib/utils/update-notice.js +1 -1
  349. package/lib/utils/version.js +1 -1
  350. package/lib/utils/with-active-cookie.js +1 -1
  351. package/lib/utils/write-cli-side-channel.js +1 -1
  352. package/package.json +1 -1
  353. package/skills/rabetbase/SKILL.md +2 -2
  354. package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
  355. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a282_0x1fda(_0x42b5c5,_0x20e0da){_0x42b5c5=_0x42b5c5-0xbd;const _0x55a9a0=a282_0x55a9();let _0x1fda97=_0x55a9a0[_0x42b5c5];return _0x1fda97;}const a282_0x13f12c=a282_0x1fda;(function(_0x565795,_0x9b2f45){const _0x226088=a282_0x1fda,_0x5021a8=_0x565795();while(!![]){try{const _0x11afa8=parseInt(_0x226088(0xf2))/0x1*(parseInt(_0x226088(0xd7))/0x2)+parseInt(_0x226088(0x166))/0x3*(parseInt(_0x226088(0x15a))/0x4)+parseInt(_0x226088(0x118))/0x5*(-parseInt(_0x226088(0x1a1))/0x6)+-parseInt(_0x226088(0xf4))/0x7*(parseInt(_0x226088(0x1a2))/0x8)+-parseInt(_0x226088(0xff))/0x9+parseInt(_0x226088(0x1e7))/0xa+-parseInt(_0x226088(0x20e))/0xb*(-parseInt(_0x226088(0xdb))/0xc);if(_0x11afa8===_0x9b2f45)break;else _0x5021a8['push'](_0x5021a8['shift']());}catch(_0x159a48){_0x5021a8['push'](_0x5021a8['shift']());}}}(a282_0x55a9,0x326d8));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':a282_0x13f12c(0x1ff),'$id':a282_0x13f12c(0xfb),'title':a282_0x13f12c(0x1c4),'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x19f),a282_0x13f12c(0x148),a282_0x13f12c(0xfd)],'$defs':{'userId':{'anyOf':[{'type':a282_0x13f12c(0xd2),'minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a282_0x13f12c(0x1fa),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x1a9),'unit'],'properties':{'value':{'type':a282_0x13f12c(0x112),'minimum':0x1},'unit':{'enum':[a282_0x13f12c(0x205),'MINUTES',a282_0x13f12c(0x10a),a282_0x13f12c(0x1d9)]}},'additionalProperties':!![]},'flowNode':{'type':a282_0x13f12c(0x1ea),'required':['id',a282_0x13f12c(0x199),a282_0x13f12c(0x15e),a282_0x13f12c(0x109)],'properties':{'id':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)},'type':{'enum':[a282_0x13f12c(0x158),'END',a282_0x13f12c(0x196),a282_0x13f12c(0x1aa),a282_0x13f12c(0xc9),a282_0x13f12c(0x18c)]},'name':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'path':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a282_0x13f12c(0x124),a282_0x13f12c(0x16d),a282_0x13f12c(0x1cf)]},'taskMode':{'enum':['APPROVAL',a282_0x13f12c(0xf9)]},'assignee':{'type':'object','required':[a282_0x13f12c(0x188)],'properties':{'strategy':{'enum':[a282_0x13f12c(0x143),a282_0x13f12c(0x1f4)]},'userIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':a282_0x13f12c(0x1b0)}},'roleId':{'anyOf':[{'type':a282_0x13f12c(0x112),'minimum':0x1},{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x142)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a282_0x13f12c(0x188),a282_0x13f12c(0x15c)],'properties':{'strategy':{'const':a282_0x13f12c(0x143)},'userIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':a282_0x13f12c(0x1b0)}}},'additionalProperties':!![]},'sequential':{'type':a282_0x13f12c(0xf3)},'result':{'enum':['APPROVED','REJECTED']},'scriptName':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'resultVariable':{'type':'string','pattern':a282_0x13f12c(0x17f)},'async':{'type':a282_0x13f12c(0x1ea),'properties':{'enabled':{'type':a282_0x13f12c(0xf3)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a282_0x13f12c(0x1ea),'properties':{'enabled':{'type':a282_0x13f12c(0xf3)},'duration':{'$ref':a282_0x13f12c(0x18f)},'action':{'enum':[a282_0x13f12c(0x1e4),a282_0x13f12c(0x21d),a282_0x13f12c(0x13e)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'resultVariable':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)}},'additionalProperties':!![]},'cc':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0xea)],'properties':{'recipientUserIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'visible':{'type':a282_0x13f12c(0x210),'uniqueItems':!![],'items':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a282_0x13f12c(0xee),a282_0x13f12c(0x15f)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a282_0x13f12c(0x1e1)]},'template':{'type':'object','required':['title',a282_0x13f12c(0x115)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'detailMarkdown':{'type':a282_0x13f12c(0xd2)},'facts':{'type':a282_0x13f12c(0x210),'maxItems':0x8,'items':{'type':'object','required':[a282_0x13f12c(0xe2),a282_0x13f12c(0x1a9)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x181),a282_0x13f12c(0x1d3)],'properties':{'text':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'url':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a282_0x13f12c(0x210),'items':{'type':a282_0x13f12c(0x1ea),'required':['type','value'],'properties':{'type':{'enum':[a282_0x13f12c(0x1e5),a282_0x13f12c(0x1f4),a282_0x13f12c(0x182)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a282_0x13f12c(0x150)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)},'source':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'target':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'sourceNodeId':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a282_0x13f12c(0x198),a282_0x13f12c(0x1b8),a282_0x13f12c(0x1db),'EXPRESSION']},'expression':{'type':a282_0x13f12c(0xd2)},'defaultFlow':{'type':a282_0x13f12c(0xf3)},'name':{'type':'string'},'waypoints':{'type':a282_0x13f12c(0x210),'items':{'$ref':a282_0x13f12c(0x1df)}}},'allOf':[{'anyOf':[{'required':[a282_0x13f12c(0x19a)]},{'required':[a282_0x13f12c(0x170)]}]},{'anyOf':[{'required':['target']},{'required':[a282_0x13f12c(0x165)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a282_0x13f12c(0x197),'INDEPENDENT_FLOW']},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':'integer'},'templateName':![],'flowJson':{'type':a282_0x13f12c(0x1ea),'required':['nodes',a282_0x13f12c(0x1a8)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a282_0x13f12c(0xd2),'const':a282_0x13f12c(0x204),'description':a282_0x13f12c(0x141)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a282_0x13f12c(0x1f5)},'startPageId':![],'startPath':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'nodes':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode','flowName',a282_0x13f12c(0x1a4),a282_0x13f12c(0x164),'appCode','pageId',a282_0x13f12c(0x1d4)],REMOVED_ROOT_FIELDS=['id',a282_0x13f12c(0x11f),a282_0x13f12c(0x1d4)],DEFAULT_FLOW_SCHEMA_VERSION=a282_0x13f12c(0x204),NODE_TYPES=new Set([a282_0x13f12c(0x158),a282_0x13f12c(0x207),a282_0x13f12c(0x196),a282_0x13f12c(0x1aa),'SCRIPT',a282_0x13f12c(0x18c)]),CONDITION_TYPES=new Set([a282_0x13f12c(0x198),a282_0x13f12c(0x1b8),a282_0x13f12c(0x1db),'EXPRESSION']),APPROVAL_MODES=new Set([a282_0x13f12c(0x124),a282_0x13f12c(0x16d),a282_0x13f12c(0x1cf)]),APPROVAL_TASK_MODES=new Set(['APPROVAL',a282_0x13f12c(0xf9)]),FLOW_TIME_UNITS=new Set([a282_0x13f12c(0x205),'MINUTES','HOURS','DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a282_0x13f12c(0x21d),a282_0x13f12c(0x13e)]),FLOW_TYPES=new Set([a282_0x13f12c(0x197),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a282_0x13f12c(0x1f5),a282_0x13f12c(0xbf)]),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([a282_0x13f12c(0x173),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a282_0x13f12c(0x1e5),'ROLE',a282_0x13f12c(0x182)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a282_0x13f12c(0x1fe),UNSUPPORTED_FORM_MESSAGE=a282_0x13f12c(0x192),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a282_0x13f12c(0x127),RESERVED_RESULT_VARIABLES=new Set([a282_0x13f12c(0x105),a282_0x13f12c(0x1c9),a282_0x13f12c(0xe4),'approval_sys_processInstanceId',a282_0x13f12c(0xcb),a282_0x13f12c(0x221),a282_0x13f12c(0x160),a282_0x13f12c(0x10f),a282_0x13f12c(0x1c2),a282_0x13f12c(0x1ad)]);export function normalizeFlowConfig(_0x264a22){const _0x66bd2d=a282_0x13f12c;if(!isRecord(_0x264a22))throw new TypeError(_0x66bd2d(0x14f));const _0x52f682=cloneJsonValue(_0x264a22),_0x167483=_0x52f682[_0x66bd2d(0xfd)],_0x46a934=isRecord(_0x167483)?cloneJsonValue(_0x167483):{},_0x140028=[],_0x17a1d9=[];for(const _0x19c39d of REMOVED_ROOT_FIELDS){if(!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x52f682,_0x19c39d))continue;delete _0x52f682[_0x19c39d],_0x17a1d9[_0x66bd2d(0x1ba)](_0x19c39d),_0x140028[_0x66bd2d(0x1ba)]({'code':_0x66bd2d(0x11c),'path':_0x19c39d,'message':_0x19c39d+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x50b260 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x46a934,_0x50b260))continue;const _0x2f8c9f=_0x66bd2d(0x1c3)+_0x50b260;delete _0x46a934[_0x50b260],_0x17a1d9[_0x66bd2d(0x1ba)](_0x2f8c9f),_0x140028[_0x66bd2d(0x1ba)]({'code':_0x66bd2d(0x11c),'path':_0x2f8c9f,'message':_0x2f8c9f+_0x66bd2d(0xc4)});}if(Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)]['call'](_0x46a934,_0x66bd2d(0x1ce))){const _0x11abc6=_0x46a934[_0x66bd2d(0x1ce)],_0x233ff7=typeof _0x11abc6===_0x66bd2d(0xd2)?_0x11abc6['trim']():_0x11abc6;if(isEmptyJsonValue(_0x11abc6)||_0x233ff7===DEFAULT_FLOW_SCHEMA_VERSION){const _0x2aefc9=_0x66bd2d(0xc0);delete _0x46a934[_0x66bd2d(0x1ce)],_0x17a1d9[_0x66bd2d(0x1ba)](_0x2aefc9),_0x140028['push']({'code':_0x66bd2d(0x11c),'path':_0x2aefc9,'message':_0x2aefc9+_0x66bd2d(0x161)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x46a934,'flowJson',_0x140028,_0x17a1d9);_0x52f682[_0x66bd2d(0x148)]===_0x66bd2d(0x209)&&!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x46a934,_0x66bd2d(0xef))&&(_0x46a934['pageMode']=_0x66bd2d(0x1f5));_0x52f682[_0x66bd2d(0xfd)]=_0x46a934;if(typeof _0x52f682['flowName']===_0x66bd2d(0xd2))_0x52f682[_0x66bd2d(0x19f)]=_0x52f682[_0x66bd2d(0x19f)]['trim']();return{'config':_0x52f682,'warnings':_0x140028,'removedPaths':_0x17a1d9};}export function validateFlowConfig(_0x2a714c){const _0x511052=a282_0x13f12c;let _0x38fff1;try{_0x38fff1=normalizeFlowConfig(_0x2a714c);}catch(_0xd95f0f){const _0x3679b2=_0xd95f0f instanceof Error?_0xd95f0f[_0x511052(0x1e3)]:String(_0xd95f0f),_0x495f26={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x3679b2}],'warnings':[],'normalized':_0x495f26,'validationConfig':_0x495f26};}const _0xbc02f1=_0x38fff1[_0x511052(0x14b)],_0x4db239=cloneJsonValue(_0xbc02f1),_0x1ca089=_0x4db239[_0x511052(0xfd)];_0x1ca089[_0x511052(0xf6)]=_0x511052(0x19b),_0x1ca089['flowName']=_0xbc02f1['flowName'];typeof _0xbc02f1['datasetCode']===_0x511052(0xd2)&&_0xbc02f1[_0x511052(0x164)][_0x511052(0x216)]()&&(_0x1ca089[_0x511052(0x1a4)]=_0xbc02f1[_0x511052(0x164)][_0x511052(0x216)]());const _0x4135f3=[];return validateOuterMetadata(_0xbc02f1,_0x4135f3),validateFlowClassification(_0xbc02f1,_0x4135f3),validateGraph(_0xbc02f1[_0x511052(0xfd)],_0x4135f3),{'valid':_0x4135f3[_0x511052(0x1dc)]===0x0,'errors':_0x4135f3,'warnings':_0x38fff1[_0x511052(0x21f)],'normalized':_0xbc02f1,'validationConfig':_0x4db239};}function validateFlowClassification(_0xc39f85,_0xf58fd7){const _0x452633=a282_0x13f12c;if(!isRecord(_0xc39f85[_0x452633(0xfd)]))return;const _0x55f9d0=_0xc39f85[_0x452633(0x148)],_0xecdee3=_0xc39f85['flowJson'][_0x452633(0xef)];_0xecdee3!==undefined&&(typeof _0xecdee3!=='string'||!FLOW_PAGE_MODES[_0x452633(0x212)](_0xecdee3))&&_0xf58fd7[_0x452633(0x1ba)]({'path':_0x452633(0x1bb),'message':_0x452633(0x125)+String(_0xecdee3)+'.'});_0x55f9d0===_0x452633(0x197)&&_0xecdee3!==undefined&&_0xf58fd7['push']({'path':_0x452633(0x1bb),'message':_0x452633(0x185)});_0x55f9d0===_0x452633(0x209)&&_0xecdee3===_0x452633(0xbf)&&_0xf58fd7[_0x452633(0x1ba)]({'path':_0x452633(0x1bb),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x55f9d0===_0x452633(0x197)||_0x55f9d0==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0xc39f85,_0x55f9d0,_0xecdee3,_0xf58fd7);if(_0x55f9d0!==_0x452633(0x197)||!Array[_0x452633(0x126)](_0xc39f85[_0x452633(0xfd)][_0x452633(0x138)]))return;_0xc39f85[_0x452633(0xfd)][_0x452633(0x138)]['forEach']((_0x5daf0f,_0x37d3cb)=>{const _0x37306e=_0x452633;isRecord(_0x5daf0f)&&_0x5daf0f[_0x37306e(0x199)]==='APPROVAL'&&_0x5daf0f[_0x37306e(0x1d1)]===_0x37306e(0xf9)&&_0xf58fd7[_0x37306e(0x1ba)]({'path':_0x37306e(0x1c1)+_0x37d3cb+_0x37306e(0x10c),'message':_0x37306e(0x113)});});}function validateCustomPageNavigation(_0x9571f1,_0x30ecbd,_0x463bae,_0x5e6473){const _0x2735c7=a282_0x13f12c,_0x4c0c44=_0x9571f1[_0x2735c7(0xfd)]['startPageId'];_0x4c0c44!==undefined&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xdd),'message':_0x2735c7(0x11d)});const _0x1a41ce=_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x12f)];_0x1a41ce!==undefined&&(typeof _0x1a41ce!==_0x2735c7(0xd2)||_0x1a41ce['trim']()==='')&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xce),'message':_0x2735c7(0xdf)});const _0x5b808d=Array[_0x2735c7(0x126)](_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x138)])?_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x138)][_0x2735c7(0xe0)]((_0x4ec1ca,_0x4a80a5)=>({'node':_0x4ec1ca,'index':_0x4a80a5}))[_0x2735c7(0x226)](({node:_0x5f466c})=>isRecord(_0x5f466c)&&_0x5f466c[_0x2735c7(0xd8)]!==undefined):[],_0x36d68e=_0x1a41ce!==undefined||_0x5b808d['length']>0x0,_0x5e60aa=_0x463bae===undefined&&_0x30ecbd==='INDEPENDENT_FLOW'?'CUSTOM_PAGE':_0x463bae;_0x36d68e&&(_0x30ecbd!=='INDEPENDENT_FLOW'||_0x5e60aa!==_0x2735c7(0x1f5))&&(_0x1a41ce!==undefined&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xce),'message':_0x2735c7(0x123)}),_0x5b808d[_0x2735c7(0x1f2)](({index:_0x2d52ce})=>{const _0x17fdb4=_0x2735c7;_0x5e6473['push']({'path':'flowJson.nodes['+_0x2d52ce+'].path','message':_0x17fdb4(0x151)});}));}export async function writeNormalizedFlowConfig(_0x331d31,_0x175420,_0x404326={}){const _0x1205a7=a282_0x13f12c,_0xb0f143=resolve(_0x331d31),_0x27412b=_0xb0f143+'.'+process[_0x1205a7(0x190)]+'.'+randomUUID()+_0x1205a7(0x1bc),_0x49bfb6=JSON['stringify'](_0x175420,null,0x2)+'\x0a';let _0xde774a;try{try{_0xde774a=(await stat(_0xb0f143))[_0x1205a7(0x134)]&0x1ff;}catch{_0xde774a=undefined;}await writeFile(_0x27412b,_0x49bfb6,{'encoding':'utf8','flag':'wx','mode':_0xde774a??0x1a4});if(_0xde774a!==undefined)await chmod(_0x27412b,_0xde774a);_0x404326[_0x1205a7(0xd5)]===![]?(await link(_0x27412b,_0xb0f143),await unlink(_0x27412b)):await rename(_0x27412b,_0xb0f143);}finally{await unlink(_0x27412b)[_0x1205a7(0x1dd)](()=>undefined);}}function validateOuterMetadata(_0xc5c097,_0x396c9c){const _0x1d88a8=a282_0x13f12c;(typeof _0xc5c097[_0x1d88a8(0x19f)]!==_0x1d88a8(0xd2)||_0xc5c097[_0x1d88a8(0x19f)][_0x1d88a8(0x216)]()==='')&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x19f),'message':_0x1d88a8(0x1d8)});_0xc5c097[_0x1d88a8(0x22b)]!==undefined&&typeof _0xc5c097[_0x1d88a8(0x22b)]!==_0x1d88a8(0xd2)&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x22b),'message':_0x1d88a8(0xc8)});if(_0xc5c097[_0x1d88a8(0x148)]===undefined||_0xc5c097[_0x1d88a8(0x148)]===null)_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x148),'message':_0x1d88a8(0x1ec)});else(typeof _0xc5c097['flowType']!==_0x1d88a8(0xd2)||!FLOW_TYPES['has'](_0xc5c097[_0x1d88a8(0x148)]))&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x148),'message':'Unsupported\x20flowType:\x20'+String(_0xc5c097[_0x1d88a8(0x148)])+'.'});_0xc5c097[_0x1d88a8(0x164)]!==undefined&&typeof _0xc5c097[_0x1d88a8(0x164)]!==_0x1d88a8(0xd2)&&_0x396c9c['push']({'path':_0x1d88a8(0x164),'message':'datasetCode\x20must\x20be\x20a\x20string.'}),_0xc5c097[_0x1d88a8(0x13a)]!==undefined&&(!Number[_0x1d88a8(0x16a)](_0xc5c097['pageId'])||_0xc5c097[_0x1d88a8(0x13a)]<0x0)&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x13a),'message':_0x1d88a8(0x12a)}),_0xc5c097['flowType']===_0x1d88a8(0x209)&&_0xc5c097['datasetCode']!==undefined&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x164),'message':_0x1d88a8(0x21b)}),_0xc5c097[_0x1d88a8(0x148)]==='INDEPENDENT_FLOW'&&_0xc5c097[_0x1d88a8(0x13a)]!==undefined&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x13a),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x349e9c,_0x38411a){const _0x2b5b42=a282_0x13f12c;if(!isRecord(_0x349e9c)){_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0xfd),'message':_0x2b5b42(0x104)});return;}!Array['isArray'](_0x349e9c['nodes'])&&_0x38411a['push']({'path':_0x2b5b42(0x228),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x2b5b42(0x126)](_0x349e9c['edges'])&&_0x38411a[_0x2b5b42(0x1ba)]({'path':'flowJson.edges','message':_0x2b5b42(0x21a)});Object[_0x2b5b42(0x110)][_0x2b5b42(0x21e)][_0x2b5b42(0x13b)](_0x349e9c,_0x2b5b42(0x1ce))&&_0x38411a[_0x2b5b42(0x1ba)]({'path':'flowJson.schemaVersion','message':_0x2b5b42(0x140)+String(_0x349e9c[_0x2b5b42(0x1ce)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0xeea4f of[_0x2b5b42(0x1a7),'formDefinitions',_0x2b5b42(0xf7)]){Object['prototype'][_0x2b5b42(0x21e)][_0x2b5b42(0x13b)](_0x349e9c,_0xeea4f)&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x1c3)+_0xeea4f,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2b5b42(0x126)](_0x349e9c[_0x2b5b42(0x138)])||!Array['isArray'](_0x349e9c[_0x2b5b42(0x1a8)]))return;const _0x2e30c6=new Map(),_0x3d4cbe=[],_0x4bfd48=[],_0x36bd5b=new Map(),_0x3b3056=new Map(),_0x2b02d1=new Set();let _0x3d2689=0x0;_0x349e9c[_0x2b5b42(0x138)][_0x2b5b42(0x1f2)]((_0x232d29,_0x2052f4)=>{const _0x355580=_0x2b5b42,_0x26724d=_0x355580(0x1c1)+_0x2052f4+']';if(!isRecord(_0x232d29)){_0x38411a['push']({'path':_0x26724d,'message':_0x355580(0x102)});return;}const _0x2535ab=_0x232d29;if(typeof _0x2535ab['id']!=='string'||!BPMN_ID_PATTERN[_0x355580(0x154)](_0x2535ab['id']))_0x38411a['push']({'path':_0x26724d+_0x355580(0x177),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x2e30c6[_0x355580(0x212)](_0x2535ab['id'])?_0x38411a[_0x355580(0x1ba)]({'path':_0x26724d+_0x355580(0x177),'message':_0x355580(0x187)+_0x2535ab['id']+'.'}):(_0x2e30c6['set'](_0x2535ab['id'],_0x2535ab),_0x2b02d1[_0x355580(0x203)](_0x2535ab['id']));if(!NODE_TYPES[_0x355580(0x212)](_0x2535ab[_0x355580(0x199)]))_0x38411a[_0x355580(0x1ba)]({'path':_0x26724d+_0x355580(0x1fc),'message':_0x355580(0x13d)+String(_0x2535ab['type'])+'.'});else{if(_0x2535ab['type']==='START')_0x3d4cbe[_0x355580(0x1ba)](_0x2535ab['id']);else _0x2535ab[_0x355580(0x199)]===_0x355580(0x207)&&_0x4bfd48[_0x355580(0x1ba)](_0x2535ab['id']);}_0x2535ab[_0x355580(0x199)]===_0x355580(0x196)&&(_0x2535ab[_0x355580(0x1d1)]===undefined||_0x2535ab[_0x355580(0x1d1)]===_0x355580(0x196))&&(_0x3d2689+=0x1);validateNode(_0x2535ab,_0x26724d,_0x38411a);if(_0x2535ab[_0x355580(0x199)]===_0x355580(0xc9)){const _0x384a3b=resolveEffectiveResultVariable(_0x2535ab[_0x355580(0x223)],![]);_0x384a3b&&(registerResultVariableOwner(_0x3b3056,_0x384a3b,_0x2535ab['id'],_0x38411a),!_0x36bd5b[_0x355580(0x212)](_0x384a3b)&&_0x36bd5b['set'](_0x384a3b,_0x2535ab['id']));}if(_0x2535ab['type']===_0x355580(0x196)&&isRecord(_0x2535ab['timeout'])&&_0x2535ab[_0x355580(0x1b9)][_0x355580(0x1b5)]===!![]&&_0x2535ab[_0x355580(0x1b9)]['action']===_0x355580(0x13e)){const _0xb60562=resolveEffectiveResultVariable(_0x2535ab['timeout'][_0x355580(0x223)],!![]);_0xb60562&&registerResultVariableOwner(_0x3b3056,_0xb60562,_0x2535ab['id']+'.timeout',_0x38411a);}});_0x3d4cbe[_0x2b5b42(0x1dc)]!==0x1&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x228),'message':_0x2b5b42(0x1f0)});_0x4bfd48[_0x2b5b42(0x1dc)]===0x0&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x228),'message':_0x2b5b42(0x100)});const _0x33926c=new Map(),_0x215856=new Map(),_0x18f67c=new Map(),_0x4c17d7=new Set();_0x349e9c[_0x2b5b42(0x1a8)][_0x2b5b42(0x1f2)]((_0x214357,_0xadf3e3)=>{const _0x5b3155=_0x2b5b42,_0x671c8f='flowJson.edges['+_0xadf3e3+']';if(!isRecord(_0x214357)){_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f,'message':_0x5b3155(0x186)});return;}const _0x588230=_0x214357;_0x18f67c[_0x5b3155(0x1af)](_0x588230,_0x671c8f);const _0x27d58b=resolveEdgeEndpoint(_0x588230[_0x5b3155(0x19a)],_0x588230[_0x5b3155(0x170)]),_0x369851=resolveEdgeEndpoint(_0x588230[_0x5b3155(0xc2)],_0x588230[_0x5b3155(0x165)]);if(!_0x27d58b)_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x189),'message':_0x5b3155(0x15b)});if(!_0x369851)_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x130),'message':_0x5b3155(0x191)});_0x27d58b&&!_0x2e30c6['has'](_0x27d58b)&&_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x189),'message':_0x5b3155(0x1a6)+_0x27d58b+'.'});_0x369851&&!_0x2e30c6['has'](_0x369851)&&_0x38411a['push']({'path':_0x671c8f+_0x5b3155(0x130),'message':_0x5b3155(0x135)+_0x369851+'.'});if(_0x588230['id']!==undefined){if(typeof _0x588230['id']!==_0x5b3155(0xd2)||!BPMN_ID_PATTERN['test'](_0x588230['id']))_0x38411a['push']({'path':_0x671c8f+_0x5b3155(0x177),'message':_0x5b3155(0xca)});else{if(_0x2b02d1[_0x5b3155(0x212)](_0x588230['id']))_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x177),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x588230['id']+'.'});else!_0x2b02d1[_0x5b3155(0x212)](_0x588230['id'])&&_0x2b02d1[_0x5b3155(0x203)](_0x588230['id']);}}if(_0x27d58b&&_0x369851){const _0x2995eb=_0x27d58b+'\x00'+_0x369851+'\x00'+(_0x588230['conditionType']??'ALWAYS');_0x4c17d7['has'](_0x2995eb)?_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f,'message':_0x5b3155(0x19e)+_0x27d58b+_0x5b3155(0x1de)+_0x369851+'\x20('+(_0x588230[_0x5b3155(0x20a)]??_0x5b3155(0x198))+').'}):_0x4c17d7['add'](_0x2995eb);}validateEdge(_0x588230,_0x671c8f,_0x38411a),_0x27d58b&&_0x369851&&(_0x33926c['get'](_0x27d58b)?.['push'](_0x588230)??_0x33926c[_0x5b3155(0x1af)](_0x27d58b,[_0x588230]),_0x215856[_0x5b3155(0x13c)](_0x369851)?.[_0x5b3155(0x1ba)](_0x588230)??_0x215856[_0x5b3155(0x1af)](_0x369851,[_0x588230]));});if(_0x3d4cbe[_0x2b5b42(0x1dc)]!==0x1)return;validateGraphShape(_0x2e30c6,_0x3d4cbe[0x0],_0x4bfd48,_0x33926c,_0x215856,_0x18f67c,_0x38411a),validateScriptResultReferences(_0x2e30c6,_0x3d4cbe[0x0],_0x33926c,_0x215856,_0x18f67c,_0x36bd5b,_0x38411a),validateApprovalResults(_0x2e30c6,_0x3d2689,_0x4bfd48,_0x38411a);}function validateNode(_0x4c5950,_0x46031c,_0x2d9dd7){const _0x161983=a282_0x13f12c;for(const _0x32e36e of['form',_0x161983(0x1d2)]){Object['prototype'][_0x161983(0x21e)][_0x161983(0x13b)](_0x4c5950,_0x32e36e)&&_0x2d9dd7['push']({'path':_0x46031c+'.'+_0x32e36e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x161983(0x212)](_0x4c5950['type']))return;(typeof _0x4c5950['name']!==_0x161983(0xd2)||_0x4c5950[_0x161983(0x15e)][_0x161983(0x216)]()==='')&&_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0x15d),'message':_0x161983(0xcc)});_0x4c5950['pageId']!==undefined&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.pageId','message':_0x161983(0x1a3)});if(_0x4c5950[_0x161983(0xd8)]!==undefined){if(typeof _0x4c5950['path']!==_0x161983(0xd2)||_0x4c5950[_0x161983(0xd8)][_0x161983(0x216)]()==='')_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x175),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x4c5950[_0x161983(0x199)]!=='APPROVAL'&&_0x4c5950[_0x161983(0x199)]!==_0x161983(0x207)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x4d75b1=_0x4c5950[_0x161983(0x109)];if(!isRecord(_0x4d75b1))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x176),'message':_0x161983(0x184)});else for(const _0xa7204d of['x','y']){const _0x3fa761=_0x4d75b1[_0xa7204d];(typeof _0x3fa761!==_0x161983(0x1fa)||!Number[_0x161983(0x16e)](_0x3fa761)||_0x3fa761<0x0)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.position.'+_0xa7204d,'message':'position.'+_0xa7204d+_0x161983(0x10e)});}if(_0x4c5950[_0x161983(0x199)]===_0x161983(0x196)){const _0x13ef78=_0x4c5950[_0x161983(0x229)]??_0x161983(0x124),_0x159d4b=_0x4c5950[_0x161983(0x1d1)]??_0x161983(0x196);!APPROVAL_TASK_MODES[_0x161983(0x212)](_0x159d4b)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0xe7),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x159d4b)+'.'});!APPROVAL_MODES[_0x161983(0x212)](_0x13ef78)&&_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0xeb),'message':_0x161983(0x1f1)+String(_0x13ef78)+'.'});if(!isRecord(_0x4c5950['assignee']))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x116),'message':_0x161983(0x180)});else{const _0x1888bc=_0x4c5950[_0x161983(0x119)][_0x161983(0x188)];_0x1888bc!==_0x161983(0x143)&&_0x1888bc!==_0x161983(0x1f4)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x167),'message':_0x161983(0x224)});if(_0x1888bc===_0x161983(0x143)){const _0x438072=_0x4c5950[_0x161983(0x119)][_0x161983(0x15c)];if(!Array[_0x161983(0x126)](_0x438072)||_0x438072[_0x161983(0x1dc)]===0x0)_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0xd0),'message':_0x161983(0xbd)});else{const _0x515c29=_0x438072[_0x161983(0x12c)](_0x78be62=>!isValidUserId(_0x78be62));_0x515c29>=0x0&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1b7)+_0x515c29+']','message':_0x161983(0x1fd)});const _0x236948=new Set(_0x438072[_0x161983(0x226)](isValidUserId)[_0x161983(0xe0)](_0x1c33fb=>String(_0x1c33fb)['trim']()));_0x13ef78==='SINGLE'&&_0x236948[_0x161983(0x10d)]>0x1&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.assignee.userIds','message':_0x161983(0xda)});}}if(_0x1888bc===_0x161983(0x1f4)){const _0x1a3439=_0x4c5950[_0x161983(0x119)][_0x161983(0x1bd)],_0x4368d6=typeof _0x1a3439==='number'||typeof _0x1a3439==='string'?Number(String(_0x1a3439)[_0x161983(0x216)]()):Number[_0x161983(0x1b3)];(!Number['isSafeInteger'](_0x4368d6)||_0x4368d6<=0x0)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.assignee.roleId','message':_0x161983(0x145)});}}if(_0x4c5950[_0x161983(0xd6)]!==undefined){if(!isRecord(_0x4c5950[_0x161983(0xd6)]))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x218),'message':_0x161983(0x1b1)});else{if(_0x4c5950[_0x161983(0xd6)][_0x161983(0x188)]!=='FIXED')_0x2d9dd7['push']({'path':_0x46031c+'.transferCandidates.strategy','message':_0x161983(0x17b)});else{const _0x49d211=_0x4c5950[_0x161983(0xd6)]['userIds'];if(!Array[_0x161983(0x126)](_0x49d211)||_0x49d211[_0x161983(0x1dc)]===0x0)_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0x215),'message':_0x161983(0x162)});else{const _0x4089c2=_0x49d211['findIndex'](_0xa857ba=>!isValidUserId(_0xa857ba));_0x4089c2>=0x0&&_0x2d9dd7['push']({'path':_0x46031c+'.transferCandidates.userIds['+_0x4089c2+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x4c5950[_0x161983(0x1e2)]!==undefined&&typeof _0x4c5950[_0x161983(0x1e2)]!==_0x161983(0xf3)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x149),'message':_0x161983(0x22a)});if(_0x4c5950[_0x161983(0x199)]===_0x161983(0xc9)){(typeof _0x4c5950[_0x161983(0xe5)]!==_0x161983(0xd2)||_0x4c5950[_0x161983(0xe5)][_0x161983(0x216)]()==='')&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x16b),'message':_0x161983(0x219)});if(_0x4c5950[_0x161983(0x223)]!==undefined){if(typeof _0x4c5950[_0x161983(0x223)]!=='string'||!VARIABLE_PATTERN[_0x161983(0x154)](_0x4c5950[_0x161983(0x223)]))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1be),'message':_0x161983(0x214)});else(RESERVED_RESULT_VARIABLES[_0x161983(0x212)](_0x4c5950[_0x161983(0x223)])||_0x4c5950[_0x161983(0x223)][_0x161983(0x1f9)](_0x161983(0x131)))&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1be),'message':_0x161983(0x156)+_0x4c5950[_0x161983(0x223)]+'.'});}}validateAsyncExecution(_0x4c5950,_0x46031c,_0x2d9dd7),validateApprovalTimeout(_0x4c5950,_0x46031c,_0x2d9dd7),validateCcConfig(_0x4c5950,_0x46031c,_0x2d9dd7),_0x4c5950[_0x161983(0x199)]===_0x161983(0x18c)&&validateNotificationConfig(_0x4c5950[_0x161983(0x14b)],_0x46031c+_0x161983(0x1cc),_0x2d9dd7);}function validateAsyncExecution(_0x5981f8,_0x5929a7,_0x171fef){const _0x5a1312=a282_0x13f12c;if(_0x5981f8[_0x5a1312(0x1e0)]===undefined)return;if(!isRecord(_0x5981f8[_0x5a1312(0x1e0)])){_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+_0x5a1312(0x1c7),'message':_0x5a1312(0x16f)});return;}if(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!==undefined&&typeof _0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!=='boolean'){_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+'.async.enabled','message':_0x5a1312(0x1c0)});return;}if(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!==!![])return;_0x5981f8[_0x5a1312(0x199)]!==_0x5a1312(0xc9)&&_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+_0x5a1312(0x1c7),'message':_0x5a1312(0x20b)});const _0x271049=_0x5981f8['async'][_0x5a1312(0xd4)]??0x3;(!Number[_0x5a1312(0x16a)](_0x271049)||_0x271049<0x1||_0x271049>MAX_ASYNC_RETRY_COUNT)&&_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+'.async.retryCount','message':_0x5a1312(0x144)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x111)]!==undefined&&validateTimeAmount(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x111)],_0x5929a7+_0x5a1312(0x146),_0x171fef);}function validateApprovalTimeout(_0x43f3fd,_0x188953,_0x408dee){const _0x25b49a=a282_0x13f12c;if(_0x43f3fd[_0x25b49a(0x1b9)]===undefined)return;if(!isRecord(_0x43f3fd[_0x25b49a(0x1b9)])){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout','message':_0x25b49a(0xd1)});return;}if(_0x43f3fd['timeout']['enabled']!==undefined&&typeof _0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x1b5)]!==_0x25b49a(0xf3)){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x1ef),'message':_0x25b49a(0x1a5)});return;}if(_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x1b5)]!==!![])return;if(_0x43f3fd[_0x25b49a(0x1b9)]['interrupting']!==undefined&&typeof _0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x178)]!=='boolean'){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout.interrupting','message':_0x25b49a(0x1f3)});return;}_0x43f3fd['type']!==_0x25b49a(0x196)&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x157),'message':_0x25b49a(0x206)});validateTimeAmount(_0x43f3fd['timeout']['duration'],_0x188953+_0x25b49a(0x1b4),_0x408dee);const _0x4ec34c=_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0xe9)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x25b49a(0x212)](_0x4ec34c)){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout.action','message':_0x25b49a(0x195)});return;}(_0x43f3fd[_0x25b49a(0x1d1)]??_0x25b49a(0x196))==='HANDLE'&&_0x4ec34c!==_0x25b49a(0x13e)&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x227),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x1a8515=_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x178)]??_0x4ec34c!=='EXECUTE_BFF';if(_0x4ec34c==='EXECUTE_BFF')_0x1a8515&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x171),'message':_0x25b49a(0x14a)}),(typeof _0x43f3fd[_0x25b49a(0x1b9)]['scriptName']!=='string'||_0x43f3fd['timeout'][_0x25b49a(0xe5)][_0x25b49a(0x216)]()==='')&&_0x408dee['push']({'path':_0x188953+_0x25b49a(0x106),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x43f3fd['timeout'][_0x25b49a(0x223)],_0x188953+_0x25b49a(0x1f6),_0x408dee);else!_0x1a8515&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x171),'message':_0x4ec34c+_0x25b49a(0x202)});}function validateTimeAmount(_0x1cf87d,_0x3ab03a,_0x529fae){const _0x1809b5=a282_0x13f12c;if(!isRecord(_0x1cf87d)){_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a,'message':_0x1809b5(0x129)});return;}(!Number[_0x1809b5(0x16a)](_0x1cf87d['value'])||Number(_0x1cf87d[_0x1809b5(0x1a9)])<=0x0)&&_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a+'.value','message':_0x1809b5(0x220)}),!FLOW_TIME_UNITS[_0x1809b5(0x212)](_0x1cf87d[_0x1809b5(0x1ed)])&&_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a+_0x1809b5(0x13f),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0xb368af,_0x10c6a7,_0x26145d){const _0x472f47=a282_0x13f12c;if(_0xb368af===undefined||_0xb368af===null||_0xb368af==='')return;if(typeof _0xb368af!=='string'||!VARIABLE_PATTERN['test'](_0xb368af))_0x26145d[_0x472f47(0x1ba)]({'path':_0x10c6a7,'message':_0x472f47(0x214)});else(RESERVED_RESULT_VARIABLES['has'](_0xb368af)||_0xb368af[_0x472f47(0x1f9)]('approval_sys_'))&&_0x26145d['push']({'path':_0x10c6a7,'message':_0x472f47(0x156)+_0xb368af+'.'});}function validateCcConfig(_0x5a87f6,_0x2ffa37,_0x3237b7){const _0x3b6d68=a282_0x13f12c;if(_0x5a87f6['cc']===undefined)return;if(!isRecord(_0x5a87f6['cc'])){_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+'.cc','message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x5a87f6[_0x3b6d68(0x199)]!==_0x3b6d68(0x207)&&_0x5a87f6[_0x3b6d68(0x199)]!=='APPROVAL'&&_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+_0x3b6d68(0x1c8),'message':_0x3b6d68(0x133)});Object[_0x3b6d68(0x110)][_0x3b6d68(0x21e)]['call'](_0x5a87f6['cc'],_0x3b6d68(0x1a0))&&_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x32166b=_0x5a87f6['cc']['recipientUserIds'];if(!Array[_0x3b6d68(0x126)](_0x32166b)||_0x32166b[_0x3b6d68(0x1dc)]===0x0)_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+_0x3b6d68(0x20c),'message':_0x3b6d68(0xde)});else{_0x32166b[_0x3b6d68(0x1dc)]>MAX_CC_RECIPIENTS&&_0x3237b7['push']({'path':_0x2ffa37+_0x3b6d68(0x20c),'message':_0x3b6d68(0x1eb)+MAX_CC_RECIPIENTS+_0x3b6d68(0x17d)});const _0x3f9b53=new Set();_0x32166b[_0x3b6d68(0x1f2)]((_0x38d38e,_0x50a9cb)=>{const _0x42ae6b=_0x3b6d68;if(typeof _0x38d38e!==_0x42ae6b(0xd2)||_0x38d38e['trim']()==='')_0x3237b7[_0x42ae6b(0x1ba)]({'path':_0x2ffa37+_0x42ae6b(0x20f)+_0x50a9cb+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x3f9b53[_0x42ae6b(0x212)](_0x38d38e[_0x42ae6b(0x216)]())?_0x3237b7[_0x42ae6b(0x1ba)]({'path':_0x2ffa37+_0x42ae6b(0x20f)+_0x50a9cb+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x38d38e[_0x42ae6b(0x216)]()+'.'}):_0x3f9b53['add'](_0x38d38e['trim']());});}validateStringArray(_0x5a87f6['cc'][_0x3b6d68(0x147)],_0x2ffa37+_0x3b6d68(0x18e),_0x3237b7);}function validateStringArray(_0x424026,_0x4a472e,_0x39fd64){const _0x17aaef=a282_0x13f12c;if(_0x424026===undefined)return;if(!Array[_0x17aaef(0x126)](_0x424026)){_0x39fd64[_0x17aaef(0x1ba)]({'path':_0x4a472e,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0xe1c7f=new Set();_0x424026[_0x17aaef(0x1f2)]((_0x4c9e4e,_0x3fbbba)=>{const _0x2da070=_0x17aaef;if(typeof _0x4c9e4e!==_0x2da070(0xd2)||_0x4c9e4e[_0x2da070(0x216)]()==='')_0x39fd64[_0x2da070(0x1ba)]({'path':_0x4a472e+'['+_0x3fbbba+']','message':_0x2da070(0xf8)});else _0xe1c7f[_0x2da070(0x212)](_0x4c9e4e[_0x2da070(0x216)]())?_0x39fd64[_0x2da070(0x1ba)]({'path':_0x4a472e+'['+_0x3fbbba+']','message':'Duplicate\x20value:\x20'+_0x4c9e4e[_0x2da070(0x216)]()+'.'}):_0xe1c7f['add'](_0x4c9e4e[_0x2da070(0x216)]());});}function validateNotificationConfig(_0x50b9bc,_0x236827,_0x35357f){const _0x519cbf=a282_0x13f12c;if(!isRecord(_0x50b9bc)){_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827,'message':_0x519cbf(0xf5)});return;}if(_0x50b9bc[_0x519cbf(0xec)]!==undefined&&_0x50b9bc['version']!==null){if(typeof _0x50b9bc['version']!==_0x519cbf(0xd2))_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0xdc),'message':_0x519cbf(0x19d)});else _0x50b9bc[_0x519cbf(0xec)][_0x519cbf(0x216)]()&&_0x50b9bc[_0x519cbf(0xec)]['trim']()!=='v1'&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0xdc),'message':_0x519cbf(0x1f8)+_0x50b9bc['version']+'.'});}const _0x2f2937=requireNotificationString(_0x50b9bc[_0x519cbf(0xee)],_0x236827+'.configCode',_0x519cbf(0xf0),_0x35357f);_0x2f2937?.[_0x519cbf(0x1da)]('${')&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x201),'message':_0x519cbf(0x225)});if(_0x50b9bc[_0x519cbf(0x14e)]!==undefined&&_0x50b9bc[_0x519cbf(0x14e)]!==null){if(typeof _0x50b9bc[_0x519cbf(0x14e)]!==_0x519cbf(0xd2))_0x35357f['push']({'path':_0x236827+_0x519cbf(0x194),'message':_0x519cbf(0x17c)});else!NOTIFICATION_FAILURE_POLICIES[_0x519cbf(0x212)](_0x50b9bc['failurePolicy'][_0x519cbf(0x216)]()['toUpperCase']())&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x194),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x50b9bc[_0x519cbf(0x15f)])?_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x18a),'message':_0x519cbf(0x1ca)}):validateNotificationTemplate(_0x50b9bc[_0x519cbf(0x15f)],_0x236827+_0x519cbf(0x18a),_0x35357f),validateNotificationRecipients(_0x50b9bc[_0x519cbf(0x193)],_0x236827+_0x519cbf(0x117),_0x35357f);}function a282_0x55a9(){const _0xf81405=['INDEPENDENT_FLOW','conditionType','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.cc.recipientUserIds','isSafeInteger','357401TBZRCL','.cc.recipientUserIds[','array','.detailMarkdown','has','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.transferCandidates.userIds','trim','Duplicate\x20resultVariable:\x20','.transferCandidates','SCRIPT\x20node\x20requires\x20scriptName.','edges\x20must\x20be\x20an\x20array.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','AUTO_REJECT','hasOwnProperty','warnings','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','approval_sys_initiatorUsername','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','resultVariable','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','filter','.timeout.action','flowJson.nodes','approvalMode','sequential\x20must\x20be\x20a\x20boolean.','flowDesc','FIXED\x20assignee\x20requires\x20userIds.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','PLATFORM_FORM','flowJson.schemaVersion','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','target','Notification\x20template\x20supports\x20at\x20most\x20','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','.url','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.waypoints[','flowDesc\x20must\x20be\x20a\x20string.','SCRIPT','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','approval_sys_initiatorUserId','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowJson.nodes.','flowJson.startPath','.waypoints','.assignee.userIds','timeout\x20must\x20be\x20an\x20object.','string','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','retryCount','overwrite','transferCandidates','60Oslfxa','path','flowJson.edges','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','12MBDSHk','.version','flowJson.startPageId','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','map','detailMarkdown','label','title','approval_sys_appCode','scriptName','matchAll','.taskMode','Node\x20has\x20no\x20outgoing\x20edge.','action','recipientUserIds','.approvalMode','version','replace','configCode','pageMode','Notification\x20configCode\x20is\x20required.','facts','11087NPQIXf','boolean','7AclZTC','NOTIFICATION\x20node\x20requires\x20config.','flowKey','formPermissions','value\x20must\x20be\x20a\x20non-empty\x20string.','HANDLE','entries','https://lovrabet.com/schema/rabetbase-flow-config.json','Notification\x20recipients\x20must\x20be\x20an\x20array.','flowJson','waypoints','2144025eVOqkQ','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Node\x20is\x20not\x20reachable\x20from\x20START.','node\x20must\x20be\x20an\x20object.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','flowJson\x20must\x20be\x20an\x20object.','formData','.timeout.scriptName','Unsupported\x20notification\x20placeholder:\x20','delete','position','HOURS','.expression','].taskMode','size','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','approval_sys_pageId','prototype','retryInterval','integer','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','summary','.assignee','.recipients','2013115jfgfUW','assignee','toUpperCase','EXPRESSION\x20edge\x20requires\x20expression.','legacy_field_removed','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.',',\x20but\x20node\x20','appCode','Notification\x20action.url\x20is\x20required.','waypoint.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','SINGLE','Unsupported\x20pageMode:\x20','isArray','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','duration\x20requires\x20value\x20and\x20unit.','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','findIndex','Notification\x20recipient.type\x20is\x20required.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','startPath','.target','approval_sys_','waypoints\x20must\x20be\x20an\x20array.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','mode','Edge\x20target\x20node\x20not\x20found:\x20','defaultFlow\x20must\x20be\x20a\x20boolean.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','nodes','indexOf','pageId','call','get','Unsupported\x20node\x20type:\x20','EXECUTE_BFF','.unit','Unsupported\x20schemaVersion:\x20','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','^[1-9][0-9]*$','FIXED','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','.async.retryInterval','visible','flowType','.sequential','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','config','actions','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','failurePolicy','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','BCC','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','variables','\x20facts.','test','slice','Reserved\x20resultVariable:\x20','.timeout','START','\x20is\x20required.','1265324RGPtzN','edge\x20source\x20is\x20required.','userIds','.name','name','template','approval_sys_datasetCode','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','result','datasetCode','targetNodeId','3JtbYzr','.assignee.strategy','Notification\x20fact.','metadata','isInteger','.scriptName','Notification\x20action.text\x20is\x20required.','ALL','isFinite','async\x20must\x20be\x20an\x20object.','sourceNodeId','.timeout.interrupting','keys','CONTINUE','empty_metadata_removed','.path','.position','.id','interrupting','.defaultFlow','every','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','failurePolicy\x20must\x20be\x20a\x20string.','\x20users.','event','^[A-Za-z_][A-Za-z0-9_]*$','APPROVAL\x20node\x20requires\x20assignee.','text','EMAIL','utf8','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','edge\x20must\x20be\x20an\x20object.','Duplicate\x20node\x20id:\x20','strategy','.source','.template','\x20actions.','NOTIFICATION','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','.cc.visible','#/$defs/timeAmount','pid','edge\x20target\x20is\x20required.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','recipients','.failurePolicy','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','APPROVAL','FORM_FLOW','ALWAYS','type','source','__rabetbase_local_validation__','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20version\x20must\x20be\x20a\x20string.','Duplicate\x20edge\x20route:\x20','flowName','readSources','6IQvQSM','891544entzgk','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','bindDatasetCode','timeout.enabled\x20must\x20be\x20a\x20boolean.','Edge\x20source\x20node\x20not\x20found:\x20','formSchema','edges','value','CONDITION','some','expression','approval_sys_dataId','Unsupported\x20condition\x20type:\x20','set','#/$defs/userId','transferCandidates\x20must\x20be\x20an\x20object.','EXPRESSION','NaN','.timeout.duration','enabled','Notification\x20recipient.value\x20is\x20required.','.assignee.userIds[','APPROVED','timeout','push','flowJson.pageMode','.tmp','roleId','.resultVariable','parse','async.enabled\x20must\x20be\x20a\x20boolean.','flowJson.nodes[','approval_sys_operationType','flowJson.','Rabetbase\x20FlowConfig','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.async','.cc','approved','NOTIFICATION\x20node\x20requires\x20template.','defaultFlow','.config','edge\x20name\x20must\x20be\x20a\x20string.','schemaVersion','ANY','role','taskMode','formPermission','url','templateName','Notification\x20fact\x20must\x20be\x20an\x20object.','.value','.conditionType','flowName\x20is\x20required.','DAYS','includes','REJECTED','length','catch','\x20->\x20','#/$defs/position','async','FAIL','sequential','message','AUTO_APPROVE','USER','stringify','2774110KuXIfy','Notification\x20template.','Notification\x20recipient\x20must\x20be\x20an\x20object.','object','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowType\x20is\x20required.','unit','Notification\x20action\x20must\x20be\x20an\x20object.','.timeout.enabled','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Unsupported\x20approval\x20mode:\x20','forEach','timeout.interrupting\x20must\x20be\x20a\x20boolean.','ROLE','CUSTOM_PAGE','.timeout.resultVariable','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Unsupported\x20notification\x20version:\x20','startsWith','number','.role','.type','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','scriptResult','https://json-schema.org/draft/2020-12/schema','Node\x20cannot\x20reach\x20any\x20END.','.configCode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','add','approval.simple-flow.v1','SECONDS','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','END','\x20was\x20empty\x20and\x20was\x20removed.'];a282_0x55a9=function(){return _0xf81405;};return a282_0x55a9();}function validateNotificationTemplate(_0x164065,_0x1a50d3,_0x2b526d){const _0x55bb2b=a282_0x13f12c;for(const _0xf91927 of[_0x55bb2b(0xe3),'summary']){const _0x6116cc=requireNotificationString(_0x164065[_0xf91927],_0x1a50d3+'.'+_0xf91927,_0x55bb2b(0x1e8)+_0xf91927+_0x55bb2b(0x159),_0x2b526d);if(_0x6116cc)validateNotificationPlaceholders(_0x6116cc,_0x1a50d3+'.'+_0xf91927,_0x2b526d);}_0x164065['detailMarkdown']!==undefined&&_0x164065[_0x55bb2b(0xe1)]!==null&&(typeof _0x164065[_0x55bb2b(0xe1)]!==_0x55bb2b(0xd2)?_0x2b526d['push']({'path':_0x1a50d3+_0x55bb2b(0x211),'message':_0x55bb2b(0x114)}):validateNotificationPlaceholders(_0x164065[_0x55bb2b(0xe1)],_0x1a50d3+_0x55bb2b(0x211),_0x2b526d)),validateNotificationFacts(_0x164065[_0x55bb2b(0xf1)],_0x1a50d3+'.facts',_0x2b526d),validateNotificationActions(_0x164065[_0x55bb2b(0x14c)],_0x1a50d3+'.actions',_0x2b526d);}function validateNotificationFacts(_0x5328b0,_0x131dc4,_0x394eb3){const _0x2dfcdd=a282_0x13f12c;if(_0x5328b0===undefined||_0x5328b0===null)return;if(!Array['isArray'](_0x5328b0)){_0x394eb3[_0x2dfcdd(0x1ba)]({'path':_0x131dc4,'message':_0x2dfcdd(0x1c6)});return;}_0x5328b0[_0x2dfcdd(0x1dc)]>MAX_NOTIFICATION_FACTS&&_0x394eb3[_0x2dfcdd(0x1ba)]({'path':_0x131dc4,'message':_0x2dfcdd(0xc3)+MAX_NOTIFICATION_FACTS+_0x2dfcdd(0x153)}),_0x5328b0['forEach']((_0x2c076b,_0x3be4fc)=>{const _0x1d4305=_0x2dfcdd,_0x2723a8=_0x131dc4+'['+_0x3be4fc+']';if(!isRecord(_0x2c076b)){_0x394eb3[_0x1d4305(0x1ba)]({'path':_0x2723a8,'message':_0x1d4305(0x1d5)});return;}for(const _0x5674cb of[_0x1d4305(0xe2),_0x1d4305(0x1a9)]){const _0x5d95ab=requireNotificationString(_0x2c076b[_0x5674cb],_0x2723a8+'.'+_0x5674cb,_0x1d4305(0x168)+_0x5674cb+_0x1d4305(0x159),_0x394eb3);_0x5d95ab&&validateNotificationPlaceholders(_0x5d95ab,_0x2723a8+'.'+_0x5674cb,_0x394eb3);}});}function validateNotificationActions(_0x1d0932,_0x4cd20b,_0x25b502){const _0x2cba42=a282_0x13f12c;if(_0x1d0932===undefined||_0x1d0932===null)return;if(!Array[_0x2cba42(0x126)](_0x1d0932)){_0x25b502[_0x2cba42(0x1ba)]({'path':_0x4cd20b,'message':_0x2cba42(0x12e)});return;}_0x1d0932[_0x2cba42(0x1dc)]>MAX_NOTIFICATION_ACTIONS&&_0x25b502['push']({'path':_0x4cd20b,'message':_0x2cba42(0xc3)+MAX_NOTIFICATION_ACTIONS+_0x2cba42(0x18b)}),_0x1d0932[_0x2cba42(0x1f2)]((_0xa59ad8,_0x17af71)=>{const _0xe7ed65=_0x2cba42,_0x4fdc65=_0x4cd20b+'['+_0x17af71+']';if(!isRecord(_0xa59ad8)){_0x25b502['push']({'path':_0x4fdc65,'message':_0xe7ed65(0x1ee)});return;}const _0x33c039=requireNotificationString(_0xa59ad8[_0xe7ed65(0x181)],_0x4fdc65+'.text',_0xe7ed65(0x16c),_0x25b502);if(_0x33c039)validateNotificationPlaceholders(_0x33c039,_0x4fdc65+'.text',_0x25b502);const _0x2dab18=requireNotificationString(_0xa59ad8[_0xe7ed65(0x1d3)],_0x4fdc65+'.url',_0xe7ed65(0x120),_0x25b502);if(!_0x2dab18)return;validateNotificationPlaceholders(_0x2dab18,_0x4fdc65+_0xe7ed65(0xc5),_0x25b502),!/^https?:\/\//i['test'](_0x2dab18)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xe7ed65(0x154)](_0x2dab18)&&_0x25b502[_0xe7ed65(0x1ba)]({'path':_0x4fdc65+_0xe7ed65(0xc5),'message':_0xe7ed65(0xbe)});});}function validateNotificationRecipients(_0x18e173,_0x5beab5,_0x175500){const _0x5828c5=a282_0x13f12c;if(_0x18e173===undefined||_0x18e173===null)return;if(!Array[_0x5828c5(0x126)](_0x18e173)){_0x175500[_0x5828c5(0x1ba)]({'path':_0x5beab5,'message':_0x5828c5(0xfc)});return;}let _0x2c729a=![];_0x18e173[_0x5828c5(0x1f2)]((_0x57f0ec,_0x4d6d09)=>{const _0x251a77=_0x5828c5,_0x238c3a=_0x5beab5+'['+_0x4d6d09+']';if(!isRecord(_0x57f0ec)){_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a,'message':_0x251a77(0x1e9)});return;}const _0x478d80=requireNotificationString(_0x57f0ec[_0x251a77(0x199)],_0x238c3a+_0x251a77(0x1fc),_0x251a77(0x12d),_0x175500);_0x478d80&&!NOTIFICATION_RECIPIENT_TYPES[_0x251a77(0x212)](_0x478d80['toUpperCase']())&&_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a+_0x251a77(0x1fc),'message':_0x251a77(0x1c5)});let _0x2e82fe='TO';_0x57f0ec[_0x251a77(0x1d0)]!==undefined&&_0x57f0ec[_0x251a77(0x1d0)]!==null&&(typeof _0x57f0ec['role']!==_0x251a77(0xd2)?(_0x175500['push']({'path':_0x238c3a+_0x251a77(0x1fb),'message':_0x251a77(0xc1)}),_0x2e82fe=''):(_0x2e82fe=_0x57f0ec['role']['trim']()[_0x251a77(0x11a)](),!NOTIFICATION_RECIPIENT_ROLES[_0x251a77(0x212)](_0x2e82fe)&&_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a+'.role','message':_0x251a77(0x213)})));if(_0x2e82fe==='TO')_0x2c729a=!![];const _0x4eaf2f=requireNotificationString(_0x57f0ec[_0x251a77(0x1a9)],_0x238c3a+_0x251a77(0x1d6),_0x251a77(0x1b6),_0x175500);_0x4eaf2f&&validateNotificationPlaceholders(_0x4eaf2f,_0x238c3a+_0x251a77(0x1d6),_0x175500);}),_0x18e173['length']>0x0&&!_0x2c729a&&_0x175500[_0x5828c5(0x1ba)]({'path':_0x5beab5,'message':_0x5828c5(0x222)});}function requireNotificationString(_0x57c4e7,_0x4320a8,_0x1831c6,_0x32bac1){const _0x7e747a=a282_0x13f12c;if(typeof _0x57c4e7!==_0x7e747a(0xd2)||_0x57c4e7[_0x7e747a(0x216)]()==='')return _0x32bac1['push']({'path':_0x4320a8,'message':_0x1831c6}),undefined;return _0x57c4e7[_0x7e747a(0x216)]();}function validateNotificationPlaceholders(_0x4142b6,_0x5c8941,_0x194a74){const _0x200556=a282_0x13f12c;for(const _0x21f3b2 of _0x4142b6[_0x200556(0xe6)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4b2e33=_0x21f3b2[0x1]?.[_0x200556(0x216)]()??'',_0x413223=_0x4b2e33[_0x200556(0x139)]('.'),_0x3b44db=_0x413223>=0x0?_0x4b2e33['slice'](0x0,_0x413223):_0x4b2e33,_0x42df75=_0x413223>=0x0?_0x4b2e33['slice'](_0x413223+0x1)['trim']():'';(![_0x200556(0x17e),'context',_0x200556(0x152)][_0x200556(0x1da)](_0x3b44db)||_0x42df75==='')&&_0x194a74[_0x200556(0x1ba)]({'path':_0x5c8941,'message':_0x200556(0x107)+_0x21f3b2[0x0]+'.'});}_0x4142b6[_0x200556(0xed)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x200556(0x1da)]('${')&&_0x194a74['push']({'path':_0x5c8941,'message':_0x200556(0xc6)});}function validateEdge(_0x217907,_0xdb29db,_0x2bdd5e){const _0x2ee75c=a282_0x13f12c;_0x217907[_0x2ee75c(0x15e)]!==undefined&&typeof _0x217907[_0x2ee75c(0x15e)]!==_0x2ee75c(0xd2)&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x15d),'message':_0x2ee75c(0x1cd)}),_0x217907['defaultFlow']!==undefined&&typeof _0x217907[_0x2ee75c(0x1cb)]!=='boolean'&&_0x2bdd5e['push']({'path':_0xdb29db+'.defaultFlow','message':_0x2ee75c(0x136)}),_0x217907['waypoints']!==undefined&&(!Array[_0x2ee75c(0x126)](_0x217907[_0x2ee75c(0xfe)])?_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0xcf),'message':_0x2ee75c(0x132)}):_0x217907[_0x2ee75c(0xfe)][_0x2ee75c(0x1f2)]((_0x5d3033,_0x413991)=>{const _0x1f208e=_0x2ee75c;if(!isRecord(_0x5d3033)){_0x2bdd5e[_0x1f208e(0x1ba)]({'path':_0xdb29db+'.waypoints['+_0x413991+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x4175ac of['x','y']){const _0xc2748c=_0x5d3033[_0x4175ac];(typeof _0xc2748c!=='number'||!Number['isFinite'](_0xc2748c))&&_0x2bdd5e['push']({'path':_0xdb29db+_0x1f208e(0xc7)+_0x413991+'].'+_0x4175ac,'message':_0x1f208e(0x121)+_0x4175ac+'\x20must\x20be\x20a\x20finite\x20number.'});}})),_0x217907['conditionType']!==undefined&&!CONDITION_TYPES[_0x2ee75c(0x212)](_0x217907[_0x2ee75c(0x20a)])&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+'.conditionType','message':_0x2ee75c(0x1ae)+String(_0x217907[_0x2ee75c(0x20a)])+'.'}),_0x217907[_0x2ee75c(0x20a)]===_0x2ee75c(0x1b2)&&(typeof _0x217907[_0x2ee75c(0x1ac)]!==_0x2ee75c(0xd2)||_0x217907[_0x2ee75c(0x1ac)][_0x2ee75c(0x216)]()==='')&&_0x2bdd5e['push']({'path':_0xdb29db+_0x2ee75c(0x10b),'message':_0x2ee75c(0x11b)}),_0x217907[_0x2ee75c(0x1cb)]===!![]&&_0x217907['conditionType']!==_0x2ee75c(0x198)&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x179),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x217907[_0x2ee75c(0x1cb)]===!![]&&typeof _0x217907[_0x2ee75c(0x1ac)]===_0x2ee75c(0xd2)&&_0x217907[_0x2ee75c(0x1ac)][_0x2ee75c(0x216)]()!==''&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x10b),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x50c80d,_0x5973c4,_0x13656c,_0x3bf33f,_0x446649,_0x495a57,_0x5d05bb){const _0x22b28c=a282_0x13f12c;for(const [_0xc8d519,_0x3515d4]of _0x50c80d){const _0x4e8cd8=_0x446649['get'](_0xc8d519)??[],_0x3de100=_0x3bf33f['get'](_0xc8d519)??[];_0x3515d4[_0x22b28c(0x199)]!==_0x22b28c(0x158)&&_0x4e8cd8['length']===0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x3515d4[_0x22b28c(0x199)]!=='END'&&_0x3de100[_0x22b28c(0x1dc)]===0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0xe8)});_0x3515d4[_0x22b28c(0x199)]==='START'&&_0x4e8cd8['length']>0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x3515d4[_0x22b28c(0x199)]===_0x22b28c(0x207)&&_0x3de100[_0x22b28c(0x1dc)]>0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':_0x22b28c(0x103)});if(_0x3515d4['type']===_0x22b28c(0x1aa)){_0x3de100[_0x22b28c(0x1dc)]<0x2&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x44de89=_0x3de100[_0x22b28c(0x226)](_0x3d3330=>_0x3d3330[_0x22b28c(0x1cb)]===!![]);_0x44de89[_0x22b28c(0x1dc)]!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':_0x22b28c(0xd3)});if(_0x44de89['length']===0x1){const _0x16b26b=_0x44de89[0x0],_0xf352d1=_0x495a57[_0x22b28c(0x13c)](_0x16b26b)??'flowJson.edges';_0x16b26b[_0x22b28c(0x20a)]!==_0x22b28c(0x198)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0xf352d1+_0x22b28c(0x1d7),'message':_0x22b28c(0x12b)});_0x16b26b[_0x22b28c(0x1ac)]!==undefined&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0xf352d1+'.expression','message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0xf89b48 of _0x3de100){if(_0xf89b48===_0x16b26b)continue;const _0x4989d1=_0x495a57[_0x22b28c(0x13c)](_0xf89b48)??_0x22b28c(0xd9);if(_0xf89b48[_0x22b28c(0x20a)]!==_0x22b28c(0x1b2))_0x5d05bb['push']({'path':_0x4989d1+_0x22b28c(0x1d7),'message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0xf89b48[_0x22b28c(0x1ac)]!=='string'||_0xf89b48['expression']['trim']()==='')&&_0x5d05bb['push']({'path':_0x4989d1+'.expression','message':_0x22b28c(0x21c)});}}}if(_0x3515d4[_0x22b28c(0x199)]==='APPROVAL'&&(_0x3515d4['taskMode']??_0x22b28c(0x196))==='HANDLE'){if(_0x3de100[_0x22b28c(0x1dc)]!==0x1)_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x128)});else{const _0x2ff72c=_0x3de100[0x0];((_0x2ff72c[_0x22b28c(0x20a)]??'ALWAYS')!==_0x22b28c(0x198)||_0x2ff72c['defaultFlow']===!![]||typeof _0x2ff72c['expression']===_0x22b28c(0xd2)&&_0x2ff72c['expression']['trim']()!=='')&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x495a57[_0x22b28c(0x13c)](_0x2ff72c)??_0x22b28c(0xd9),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x3515d4['type']===_0x22b28c(0x196)){const _0x32f3e1=_0x3de100[_0x22b28c(0xe0)](_0x5401a1=>_0x5401a1['conditionType']??_0x22b28c(0x198)),_0x4bd193=_0x32f3e1[_0x22b28c(0x226)](_0x3f7532=>_0x3f7532!==_0x22b28c(0x1b8)&&_0x3f7532!==_0x22b28c(0x1db));_0x4bd193[_0x22b28c(0x1dc)]>0x0&&_0x5d05bb['push']({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x18d)}),_0x32f3e1[_0x22b28c(0x226)](_0x31a252=>_0x31a252===_0x22b28c(0x1b8))[_0x22b28c(0x1dc)]!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x137)}),_0x32f3e1[_0x22b28c(0x226)](_0x2621b9=>_0x2621b9==='REJECTED')['length']!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x122)}),_0x3de100[_0x22b28c(0x1ab)](_0x34b692=>_0x34b692[_0x22b28c(0x1cb)]===!![])&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x3212c6=new Set(),_0x3fdb14=_0x1b5dd7=>{const _0xc7916b=_0x22b28c;if(_0x3212c6[_0xc7916b(0x212)](_0x1b5dd7))return;_0x3212c6[_0xc7916b(0x203)](_0x1b5dd7);for(const _0x4c2beb of _0x3bf33f[_0xc7916b(0x13c)](_0x1b5dd7)??[]){const _0x7e2c17=resolveEdgeEndpoint(_0x4c2beb[_0xc7916b(0xc2)],_0x4c2beb[_0xc7916b(0x165)]);if(_0x7e2c17&&_0x50c80d[_0xc7916b(0x212)](_0x7e2c17))_0x3fdb14(_0x7e2c17);}};_0x3fdb14(_0x5973c4);for(const _0x1acd5d of _0x50c80d[_0x22b28c(0x172)]()){!_0x3212c6[_0x22b28c(0x212)](_0x1acd5d)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0x1acd5d,'message':_0x22b28c(0x101)});}const _0x274ef0=_0x13656c[_0x22b28c(0x1ab)](_0x3db954=>_0x3212c6[_0x22b28c(0x212)](_0x3db954));if(!_0x274ef0){_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xd9),'message':_0x22b28c(0x14d)});return;}const _0x38d1ef=new Set(),_0xddb9ce=_0x412b38=>{const _0x564005=_0x22b28c;if(_0x38d1ef[_0x564005(0x212)](_0x412b38))return;_0x38d1ef[_0x564005(0x203)](_0x412b38);for(const _0x2636b2 of _0x446649[_0x564005(0x13c)](_0x412b38)??[]){const _0x496ce8=resolveEdgeEndpoint(_0x2636b2[_0x564005(0x19a)],_0x2636b2[_0x564005(0x170)]);if(_0x496ce8&&_0x50c80d[_0x564005(0x212)](_0x496ce8))_0xddb9ce(_0x496ce8);}};for(const _0x19b873 of _0x13656c){if(_0x50c80d['has'](_0x19b873))_0xddb9ce(_0x19b873);}for(const _0x304c40 of _0x3212c6){!_0x38d1ef[_0x22b28c(0x212)](_0x304c40)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0x304c40,'message':_0x22b28c(0x200)});}}function validateApprovalResults(_0x12e26c,_0x337e3e,_0x38a4ec,_0x4b6aae){const _0x96c54a=a282_0x13f12c;if(_0x337e3e===0x0)return;const _0x123c29=new Set(_0x38a4ec[_0x96c54a(0xe0)](_0x2dbd83=>_0x12e26c[_0x96c54a(0x13c)](_0x2dbd83)?.[_0x96c54a(0x163)])[_0x96c54a(0x226)](_0x3663bd=>typeof _0x3663bd===_0x96c54a(0xd2)));for(const _0x1acd6a of[_0x96c54a(0x1b8),_0x96c54a(0x1db)]){!_0x123c29[_0x96c54a(0x212)](_0x1acd6a)&&_0x4b6aae[_0x96c54a(0x1ba)]({'path':_0x96c54a(0x228),'message':_0x96c54a(0x1f7)+_0x1acd6a+'.'});}}function validateScriptResultReferences(_0x38b26c,_0x1b4dea,_0x1af10b,_0x2b4c82,_0x4990ec,_0x38de67,_0x3d7bff){const _0x4e1051=a282_0x13f12c;if(_0x38de67[_0x4e1051(0x10d)]===0x0)return;const _0x3ab23a=new Set(),_0x4cf2e3=_0x39e763=>{const _0x333995=_0x4e1051;if(!_0x3ab23a['has'](_0x39e763)&&_0x38b26c[_0x333995(0x212)](_0x39e763)){_0x3ab23a['add'](_0x39e763);for(const _0xa9da9b of _0x1af10b[_0x333995(0x13c)](_0x39e763)??[]){const _0x4b1f58=resolveEdgeEndpoint(_0xa9da9b[_0x333995(0xc2)],_0xa9da9b[_0x333995(0x165)]);if(_0x4b1f58)_0x4cf2e3(_0x4b1f58);}}};_0x4cf2e3(_0x1b4dea);const _0x3fb307=new Map();for(const _0x5307c2 of _0x3ab23a){_0x3fb307[_0x4e1051(0x1af)](_0x5307c2,_0x5307c2===_0x1b4dea?new Set([_0x1b4dea]):new Set(_0x3ab23a));}let _0x683a25=!![];while(_0x683a25){_0x683a25=![];for(const _0x40096a of _0x3ab23a){if(_0x40096a===_0x1b4dea)continue;const _0x5f1f72=(_0x2b4c82['get'](_0x40096a)??[])[_0x4e1051(0xe0)](_0x48193f=>resolveEdgeEndpoint(_0x48193f[_0x4e1051(0x19a)],_0x48193f[_0x4e1051(0x170)]))['filter'](_0x17e3c6=>Boolean(_0x17e3c6&&_0x3ab23a[_0x4e1051(0x212)](_0x17e3c6)));if(_0x5f1f72[_0x4e1051(0x1dc)]===0x0)continue;const _0x4620d5=new Set(_0x3fb307[_0x4e1051(0x13c)](_0x5f1f72[0x0])??[]);for(const _0x129e70 of _0x5f1f72['slice'](0x1)){const _0x3cf12c=_0x3fb307[_0x4e1051(0x13c)](_0x129e70)??new Set();for(const _0xe80323 of _0x4620d5){if(!_0x3cf12c[_0x4e1051(0x212)](_0xe80323))_0x4620d5[_0x4e1051(0x108)](_0xe80323);}}_0x4620d5['add'](_0x40096a);const _0x506add=_0x3fb307['get'](_0x40096a);!setsEqual(_0x506add,_0x4620d5)&&(_0x3fb307['set'](_0x40096a,_0x4620d5),_0x683a25=!![]);}}for(const [_0xb4a7c0,_0x466de8]of _0x1af10b){const _0x4fbfda=_0x3fb307[_0x4e1051(0x13c)](_0xb4a7c0);if(!_0x4fbfda)continue;for(const _0x348de0 of _0x466de8){if(_0x348de0[_0x4e1051(0x20a)]!==_0x4e1051(0x1b2)||typeof _0x348de0[_0x4e1051(0x1ac)]!=='string')continue;for(const [_0x259ca2,_0x431078]of _0x38de67){expressionReferencesVariable(_0x348de0[_0x4e1051(0x1ac)],_0x259ca2)&&!_0x4fbfda[_0x4e1051(0x212)](_0x431078)&&_0x3d7bff[_0x4e1051(0x1ba)]({'path':(_0x4990ec[_0x4e1051(0x13c)](_0x348de0)??'flowJson.edges')+_0x4e1051(0x10b),'message':_0x4e1051(0x19c)+_0x259ca2+_0x4e1051(0x11e)+_0x431078+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0xb4a7c0+'.'});}}}}function expressionReferencesVariable(_0x419b08,_0x1a0242){const _0x3f389f=a282_0x13f12c;let _0x485660=0x0;while(_0x485660<_0x419b08['length']){const _0x5335fc=_0x419b08[_0x485660];if(_0x5335fc==='\x27'||_0x5335fc==='\x22'){_0x485660=skipQuotedExpressionSegment(_0x419b08,_0x485660,_0x5335fc);continue;}if(!/[A-Za-z_]/[_0x3f389f(0x154)](_0x5335fc)){_0x485660+=0x1;continue;}const _0x536da9=_0x485660;_0x485660+=0x1;while(_0x485660<_0x419b08[_0x3f389f(0x1dc)]&&/[A-Za-z0-9_]/[_0x3f389f(0x154)](_0x419b08[_0x485660])){_0x485660+=0x1;}if(_0x419b08[_0x3f389f(0x155)](_0x536da9,_0x485660)!==_0x1a0242)continue;let _0x2ae3f9=_0x536da9-0x1;while(_0x2ae3f9>=0x0&&/\s/['test'](_0x419b08[_0x2ae3f9])){_0x2ae3f9-=0x1;}if(_0x419b08[_0x2ae3f9]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x57fff3,_0x5b33ac,_0x28645d){const _0x5b0baf=a282_0x13f12c;let _0x1f91d4=_0x5b33ac+0x1;while(_0x1f91d4<_0x57fff3[_0x5b0baf(0x1dc)]){if(_0x57fff3[_0x1f91d4]==='\x5c'){_0x1f91d4+=0x2;continue;}if(_0x57fff3[_0x1f91d4]===_0x28645d)return _0x1f91d4+0x1;_0x1f91d4+=0x1;}return _0x1f91d4;}function resolveEffectiveResultVariable(_0x4bbdcd,_0xb6b34b){const _0x5d56e3=a282_0x13f12c;if(_0x4bbdcd===undefined||_0x4bbdcd===null||_0xb6b34b&&_0x4bbdcd==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x4bbdcd!==_0x5d56e3(0xd2)||!VARIABLE_PATTERN[_0x5d56e3(0x154)](_0x4bbdcd)||RESERVED_RESULT_VARIABLES[_0x5d56e3(0x212)](_0x4bbdcd)||_0x4bbdcd[_0x5d56e3(0x1f9)](_0x5d56e3(0x131)))return undefined;return _0x4bbdcd;}function registerResultVariableOwner(_0x1d57bc,_0x547e67,_0x329590,_0x52190b){const _0x38ba9f=a282_0x13f12c;if(_0x1d57bc[_0x38ba9f(0x212)](_0x547e67)){_0x52190b[_0x38ba9f(0x1ba)]({'path':'flowJson.nodes','message':_0x38ba9f(0x217)+_0x547e67+'.'});return;}_0x1d57bc[_0x38ba9f(0x1af)](_0x547e67,_0x329590);}function setsEqual(_0x4b7968,_0xb8b808){const _0x2d793a=a282_0x13f12c;return _0x4b7968[_0x2d793a(0x10d)]===_0xb8b808[_0x2d793a(0x10d)]&&[..._0x4b7968][_0x2d793a(0x17a)](_0x6c930d=>_0xb8b808[_0x2d793a(0x212)](_0x6c930d));}function isValidUserId(_0x57281b){const _0x37dea6=a282_0x13f12c;if(typeof _0x57281b===_0x37dea6(0xd2))return _0x57281b['trim']()[_0x37dea6(0x1dc)]>0x0;return Number[_0x37dea6(0x20d)](_0x57281b)&&Number(_0x57281b)>0x0;}function resolveEdgeEndpoint(_0x133631,_0x3700a9){const _0xa39d6e=a282_0x13f12c;if(typeof _0x133631===_0xa39d6e(0xd2)&&_0x133631['trim']())return _0x133631['trim']();if(typeof _0x3700a9===_0xa39d6e(0xd2)&&_0x3700a9[_0xa39d6e(0x216)]())return _0x3700a9[_0xa39d6e(0x216)]();return undefined;}function removeEmptyMetadata(_0x2bd840,_0x504730,_0x2c4ec0,_0x590ad2){const _0x3df664=a282_0x13f12c;if(Array[_0x3df664(0x126)](_0x2bd840)){_0x2bd840[_0x3df664(0x1f2)]((_0x387483,_0x4a9469)=>removeEmptyMetadata(_0x387483,_0x504730+'['+_0x4a9469+']',_0x2c4ec0,_0x590ad2));return;}if(!isRecord(_0x2bd840))return;for(const [_0x16bdfe,_0x25513d]of Object[_0x3df664(0xfa)](_0x2bd840)){const _0x238525=_0x504730+'.'+_0x16bdfe;if(_0x16bdfe===_0x3df664(0x169)&&isEmptyJsonValue(_0x25513d)){delete _0x2bd840[_0x16bdfe],_0x590ad2['push'](_0x238525),_0x2c4ec0[_0x3df664(0x1ba)]({'code':_0x3df664(0x174),'path':_0x238525,'message':_0x238525+_0x3df664(0x208)});continue;}removeEmptyMetadata(_0x25513d,_0x238525,_0x2c4ec0,_0x590ad2);}}function isEmptyJsonValue(_0x4b3e51){const _0x990f46=a282_0x13f12c;if(_0x4b3e51===null||_0x4b3e51===undefined)return!![];if(typeof _0x4b3e51===_0x990f46(0xd2))return _0x4b3e51[_0x990f46(0x216)]()==='';if(Array[_0x990f46(0x126)](_0x4b3e51))return _0x4b3e51[_0x990f46(0x1dc)]===0x0;return isRecord(_0x4b3e51)&&Object['keys'](_0x4b3e51)[_0x990f46(0x1dc)]===0x0;}function isRecord(_0x12b2bb){return typeof _0x12b2bb==='object'&&_0x12b2bb!==null&&!Array['isArray'](_0x12b2bb);}function cloneJsonValue(_0x298573){const _0xc96de3=a282_0x13f12c;return JSON[_0xc96de3(0x1bf)](JSON[_0xc96de3(0x1e6)](_0x298573));}export async function readFlowConfigFile(_0x12bdd4){const _0x24a2ae=a282_0x13f12c,_0x58dceb=await readFile(resolve(_0x12bdd4),_0x24a2ae(0x183));return JSON['parse'](_0x58dceb);}
1
+ function a282_0x2222(){const _0x38777f=['INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.failurePolicy','flowName','9reNkSh','FIXED\x20assignee\x20requires\x20userIds.','.expression','NOTIFICATION\x20node\x20requires\x20config.','get','conditionType','message','cc.recipientUserIds\x20supports\x20at\x20most\x20','.async','replace','.configCode','.scriptName','approval_sys_initiatorUserId','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','.timeout.resultVariable','INDEPENDENT_FLOW','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','CONDITION','Duplicate\x20BPMN\x20element\x20id:\x20','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','result','approval_sys_processInstanceId','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','.value','parse','.recipients','.cc.recipientUserIds[','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','approvalMode','nodes\x20must\x20be\x20an\x20array.','template','value\x20must\x20be\x20a\x20non-empty\x20string.','edges','\x20facts.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20approval\x20mode:\x20','EXECUTE_BFF','name','detailMarkdown','.approvalMode','defaultFlow','^[A-Za-z_][A-Za-z0-9_]*$','delete','recipientUserIds','pageMode','array','scriptName','FIXED','variables','Notification\x20recipients\x20must\x20be\x20an\x20array.','approval.simple-flow.v1','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','Notification\x20recipient\x20must\x20be\x20an\x20object.','flowJson\x20must\x20be\x20an\x20object.','mode','bindDatasetCode','version','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','metadata','failurePolicy','value','.url','Edge\x20target\x20node\x20not\x20found:\x20','schemaVersion','Node\x20has\x20no\x20outgoing\x20edge.','2435870eEeZXE','AUTO_APPROVE','recipients','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.assignee.userIds[',',\x20but\x20node\x20','Notification\x20template.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','1469615pBHkls','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.assignee.roleId','edge\x20target\x20is\x20required.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','6efGqov','#/$defs/position','formDefinitions','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20action.url\x20is\x20required.','templateName','.text','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.assignee.strategy','number','flowJson.nodes','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','\x20was\x20empty\x20and\x20was\x20removed.','edge\x20source\x20is\x20required.','defaultFlow\x20must\x20be\x20a\x20boolean.','AUTO_REJECT','appCode','.timeout','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','indexOf','.template','type','585957HLNoMT','Unsupported\x20schemaVersion:\x20','assignee','timeout\x20must\x20be\x20an\x20object.','.version','keys','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','flowJson.startPageId','utf8','add','size','START','.cc.visible','\x20->\x20','MINUTES','.timeout.duration','Notification\x20fact.','isSafeInteger','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','call','Duplicate\x20value:\x20','length','every','.cc.recipientUserIds','position.','.resultVariable','overwrite','forEach','PLATFORM_FORM','boolean','unit','text','sourceNodeId','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','has','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','includes','timeout.interrupting\x20must\x20be\x20a\x20boolean.','END','map','.target','NaN','edges\x20must\x20be\x20an\x20array.','startsWith','NOTIFICATION\x20node\x20requires\x20template.','.cc','transferCandidates','.source','toUpperCase','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','target','.tmp','flowJson.','.timeout.action','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','roleId','interrupting','.timeout.scriptName','approval_sys_operationType','flowDesc','context','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','flowJson.startPath','pid','slice','approval_sys_datasetCode','200RqLqLm','APPROVAL','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','.id','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','Unsupported\x20pageMode:\x20','DAYS','Duplicate\x20cc\x20recipient\x20userId:\x20','Duplicate\x20resultVariable:\x20','131540JyQQIu','approval_sys_pageId','.conditionType','.facts','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','14765RCEHjU','flowType','filter','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','Notification\x20template\x20supports\x20at\x20most\x20','FAIL','Every\x20node\x20requires\x20a\x20non-empty\x20name.','SCRIPT','HANDLE','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','cc\x20must\x20be\x20an\x20object.','USER','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','role','].taskMode','expression','url','integer','FORM_FLOW','configCode','.transferCandidates.userIds','waypoint.','SECONDS','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','targetNodeId','.cc.readSources','https://json-schema.org/draft/2020-12/schema','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','retryInterval','failurePolicy\x20must\x20be\x20a\x20string.','Unsupported\x20notification\x20version:\x20','flowKey','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','value\x20must\x20be\x20an\x20array.','timeout.enabled\x20must\x20be\x20a\x20boolean.','warnings','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','retryCount','flowJson.nodes.','async\x20must\x20be\x20an\x20object.','config','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','catch','object','#/$defs/userId','isInteger','SINGLE','Duplicate\x20edge\x20route:\x20','readSources','some','REJECTED','approval_sys_','ROLE','.waypoints','.role','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','isArray','https://lovrabet.com/schema/rabetbase-flow-config.json','transferCandidates\x20must\x20be\x20an\x20object.','empty_metadata_removed','strategy','flowName\x20is\x20required.','legacy_field_removed','datasetCode\x20must\x20be\x20a\x20string.','Node\x20has\x20no\x20incoming\x20edge.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','nodes','approval_sys_dataId','pageId','ANY','path','APPROVED','NOTIFICATION','Notification\x20action.text\x20is\x20required.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','action','Notification\x20fact\x20must\x20be\x20an\x20object.','actions','.async.retryInterval','stringify','timeout','prototype','userIds','Notification\x20template.facts\x20must\x20be\x20an\x20array.','test','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','470352ejWJvq','#/$defs/timeAmount','.path','.assignee.userIds','flowJson.schemaVersion','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','.type','1998096qZIBpz','taskMode','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.edges','event','.taskMode','.transferCandidates.userIds[','flowDesc\x20must\x20be\x20a\x20string.','formSchema','formPermission','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Notification\x20action\x20must\x20be\x20an\x20object.','string','flowJson.pageMode','.actions','CUSTOM_PAGE','.unit','Node\x20is\x20not\x20reachable\x20from\x20START.','^[1-9][0-9]*$','.pageId','Notification\x20recipient.type\x20is\x20required.','.name','sequential','trim','\x20must\x20be\x20a\x20finite\x20number.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.defaultFlow','startPageId','async','ALWAYS','enabled','label','.transferCandidates.strategy','push','resultVariable','hasOwnProperty','HOURS','scriptResult','startPath','edge\x20must\x20be\x20an\x20object.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','findIndex','Notification\x20template.actions\x20must\x20be\x20an\x20array.','.timeout.interrupting','position','.position.','.\x20This\x20CLI\x20supports\x20only\x20','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','waypoints','flowJson','.async.enabled','datasetCode','\x20actions.','isFinite','.detailMarkdown','source','ALL','EXPRESSION','Unsupported\x20condition\x20type:\x20','flowJson.nodes[','set','.waypoints[','entries'];a282_0x2222=function(){return _0x38777f;};return a282_0x2222();}const a282_0x44ca9e=a282_0x58dc;(function(_0x1fbedd,_0x328008){const _0x54e919=a282_0x58dc,_0x57b1c2=_0x1fbedd();while(!![]){try{const _0x402ad2=-parseInt(_0x54e919(0x1b5))/0x1+parseInt(_0x54e919(0xb3))/0x2+parseInt(_0x54e919(0x164))/0x3+parseInt(_0x54e919(0x1aa))/0x4*(parseInt(_0x54e919(0x1ba))/0x5)+-parseInt(_0x54e919(0x14d))/0x6*(-parseInt(_0x54e919(0x148))/0x7)+-parseInt(_0x54e919(0xba))/0x8*(parseInt(_0x54e919(0xff))/0x9)+-parseInt(_0x54e919(0x140))/0xa;if(_0x402ad2===_0x328008)break;else _0x57b1c2['push'](_0x57b1c2['shift']());}catch(_0x19acf4){_0x57b1c2['push'](_0x57b1c2['shift']());}}}(a282_0x2222,0x27d81));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':a282_0x44ca9e(0x1d5),'$id':a282_0x44ca9e(0x1f8),'title':'Rabetbase\x20FlowConfig','type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xfe),a282_0x44ca9e(0x1bb),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a282_0x44ca9e(0xc7),'minLength':0x1},{'type':a282_0x44ca9e(0x1cb),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a282_0x44ca9e(0x157),'minimum':0x0},'y':{'type':a282_0x44ca9e(0x157),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a282_0x44ca9e(0x13b),'unit'],'properties':{'value':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},'unit':{'enum':[a282_0x44ca9e(0x1d0),a282_0x44ca9e(0x173),a282_0x44ca9e(0xe0),a282_0x44ca9e(0x1b2)]}},'additionalProperties':!![]},'flowNode':{'type':a282_0x44ca9e(0x1ea),'required':['id',a282_0x44ca9e(0x163),'name',a282_0x44ca9e(0xe9)],'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'type':{'enum':[a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),'APPROVAL',a282_0x44ca9e(0x110),a282_0x44ca9e(0x1c1),'NOTIFICATION']},'name':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':a282_0x44ca9e(0x14e)},'approvalMode':{'enum':[a282_0x44ca9e(0x1ed),a282_0x44ca9e(0xf5),a282_0x44ca9e(0xa2)]},'taskMode':{'enum':[a282_0x44ca9e(0x1ab),a282_0x44ca9e(0x1c2)]},'assignee':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x1fb)],'properties':{'strategy':{'enum':[a282_0x44ca9e(0x12e),a282_0x44ca9e(0x1f3)]},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}},'roleId':{'anyOf':[{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0xcd)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a282_0x44ca9e(0x1fb),a282_0x44ca9e(0xaf)],'properties':{'strategy':{'const':a282_0x44ca9e(0x12e)},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1)]},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'retryCount':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a282_0x44ca9e(0xb4)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'duration':{'$ref':a282_0x44ca9e(0xb4)},'action':{'enum':[a282_0x44ca9e(0x141),a282_0x44ca9e(0x15d),'EXECUTE_BFF']},'interrupting':{'type':a282_0x44ca9e(0x183)},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x12a)],'properties':{'recipientUserIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'visible':{'type':a282_0x44ca9e(0x12c),'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':['configCode','template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a282_0x44ca9e(0x1bf)]},'template':{'type':a282_0x44ca9e(0x1ea),'required':['title','summary'],'properties':{'title':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'summary':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'detailMarkdown':{'type':a282_0x44ca9e(0xc7)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xdb),a282_0x44ca9e(0x13b)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a282_0x44ca9e(0x12c),'maxItems':0x2,'items':{'type':'object','required':[a282_0x44ca9e(0x185),a282_0x44ca9e(0x1ca)],'properties':{'text':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'url':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a282_0x44ca9e(0x12c),'items':{'type':'object','required':[a282_0x44ca9e(0x163),a282_0x44ca9e(0x13b)],'properties':{'type':{'enum':['USER',a282_0x44ca9e(0x1f3),'EMAIL']},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a282_0x44ca9e(0x1ea),'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'source':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a282_0x44ca9e(0xd9),a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]},'expression':{'type':a282_0x44ca9e(0xc7)},'defaultFlow':{'type':'boolean'},'name':{'type':a282_0x44ca9e(0xc7)},'waypoints':{'type':a282_0x44ca9e(0x12c),'items':{'$ref':a282_0x44ca9e(0x14e)}}},'allOf':[{'anyOf':[{'required':[a282_0x44ca9e(0xf4)]},{'required':[a282_0x44ca9e(0x186)]}]},{'anyOf':[{'required':['target']},{'required':[a282_0x44ca9e(0x1d3)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'flowDesc':{'type':a282_0x44ca9e(0xc7)},'flowType':{'enum':[a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]},'datasetCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'pageId':{'type':a282_0x44ca9e(0x1cb)},'templateName':![],'flowJson':{'type':'object','required':['nodes','edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a282_0x44ca9e(0xc7),'const':'approval.simple-flow.v1','description':a282_0x44ca9e(0x16a)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a282_0x44ca9e(0xca)},'startPageId':![],'startPath':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'nodes':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a282_0x44ca9e(0xfe),a282_0x44ca9e(0x136),a282_0x44ca9e(0xf0),a282_0x44ca9e(0x15e),'pageId','templateName'],REMOVED_ROOT_FIELDS=['id',a282_0x44ca9e(0x15e),a282_0x44ca9e(0x152)],DEFAULT_FLOW_SCHEMA_VERSION=a282_0x44ca9e(0x131),NODE_TYPES=new Set([a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),a282_0x44ca9e(0x1ab),'CONDITION',a282_0x44ca9e(0x1c1),a282_0x44ca9e(0xa5)]),CONDITION_TYPES=new Set(['ALWAYS',a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]),APPROVAL_MODES=new Set([a282_0x44ca9e(0x1ed),'ALL',a282_0x44ca9e(0xa2)]),APPROVAL_TASK_MODES=new Set([a282_0x44ca9e(0x1ab),'HANDLE']),FLOW_TIME_UNITS=new Set(['SECONDS',a282_0x44ca9e(0x173),'HOURS',a282_0x44ca9e(0x1b2)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a282_0x44ca9e(0x141),'AUTO_REJECT',a282_0x44ca9e(0x123)]),FLOW_TYPES=new Set([a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]),FLOW_PAGE_MODES=new Set([a282_0x44ca9e(0xca),a282_0x44ca9e(0x182)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set(['CONTINUE',a282_0x44ca9e(0x1bf)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a282_0x44ca9e(0x1c5),a282_0x44ca9e(0x1f3),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a282_0x44ca9e(0xe1),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a282_0x44ca9e(0x198),RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a282_0x44ca9e(0x114),a282_0x44ca9e(0x10b),'approval_sys_initiatorUsername',a282_0x44ca9e(0x1a9),a282_0x44ca9e(0x1b6),a282_0x44ca9e(0x1a1),a282_0x44ca9e(0xa0)]);export function normalizeFlowConfig(_0x1a6b2b){const _0x32dd02=a282_0x44ca9e;if(!isRecord(_0x1a6b2b))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0xa83fea=cloneJsonValue(_0x1a6b2b),_0x5b0cb0=_0xa83fea[_0x32dd02(0xee)],_0x546436=isRecord(_0x5b0cb0)?cloneJsonValue(_0x5b0cb0):{},_0x350418=[],_0x8afb47=[];for(const _0x47ff01 of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x32dd02(0xdf)][_0x32dd02(0x179)](_0xa83fea,_0x47ff01))continue;delete _0xa83fea[_0x47ff01],_0x8afb47[_0x32dd02(0xdd)](_0x47ff01),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x47ff01,'message':_0x47ff01+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x299d14 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype']['hasOwnProperty']['call'](_0x546436,_0x299d14))continue;const _0x4aa000=_0x32dd02(0x19b)+_0x299d14;delete _0x546436[_0x299d14],_0x8afb47[_0x32dd02(0xdd)](_0x4aa000),_0x350418[_0x32dd02(0xdd)]({'code':'legacy_field_removed','path':_0x4aa000,'message':_0x4aa000+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x32dd02(0xae)]['hasOwnProperty']['call'](_0x546436,'schemaVersion')){const _0x41d63a=_0x546436['schemaVersion'],_0x3b943b=typeof _0x41d63a===_0x32dd02(0xc7)?_0x41d63a[_0x32dd02(0xd2)]():_0x41d63a;if(isEmptyJsonValue(_0x41d63a)||_0x3b943b===DEFAULT_FLOW_SCHEMA_VERSION){const _0x448990=_0x32dd02(0xb7);delete _0x546436[_0x32dd02(0x13e)],_0x8afb47['push'](_0x448990),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x448990,'message':_0x448990+_0x32dd02(0x160)+DEFAULT_FLOW_SCHEMA_VERSION+_0x32dd02(0x1c6)});}}removeEmptyMetadata(_0x546436,_0x32dd02(0xee),_0x350418,_0x8afb47);_0xa83fea['flowType']===_0x32dd02(0x10e)&&!Object['prototype'][_0x32dd02(0xdf)]['call'](_0x546436,'pageMode')&&(_0x546436[_0x32dd02(0x12b)]=_0x32dd02(0xca));_0xa83fea[_0x32dd02(0xee)]=_0x546436;if(typeof _0xa83fea[_0x32dd02(0xfe)]==='string')_0xa83fea[_0x32dd02(0xfe)]=_0xa83fea[_0x32dd02(0xfe)][_0x32dd02(0xd2)]();return{'config':_0xa83fea,'warnings':_0x350418,'removedPaths':_0x8afb47};}export function validateFlowConfig(_0x34c344){const _0x204d9c=a282_0x44ca9e;let _0x27d439;try{_0x27d439=normalizeFlowConfig(_0x34c344);}catch(_0x36a913){const _0x5d0cd0=_0x36a913 instanceof Error?_0x36a913[_0x204d9c(0x105)]:String(_0x36a913),_0x1ed424={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5d0cd0}],'warnings':[],'normalized':_0x1ed424,'validationConfig':_0x1ed424};}const _0x12fbbb=_0x27d439[_0x204d9c(0x1e7)],_0x162cd3=cloneJsonValue(_0x12fbbb),_0x481a46=_0x162cd3[_0x204d9c(0xee)];_0x481a46[_0x204d9c(0x1da)]='__rabetbase_local_validation__',_0x481a46['flowName']=_0x12fbbb[_0x204d9c(0xfe)];typeof _0x12fbbb[_0x204d9c(0xf0)]===_0x204d9c(0xc7)&&_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]()&&(_0x481a46[_0x204d9c(0x136)]=_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]());const _0x2a1f3c=[];return validateOuterMetadata(_0x12fbbb,_0x2a1f3c),validateFlowClassification(_0x12fbbb,_0x2a1f3c),validateGraph(_0x12fbbb[_0x204d9c(0xee)],_0x2a1f3c),{'valid':_0x2a1f3c[_0x204d9c(0x17b)]===0x0,'errors':_0x2a1f3c,'warnings':_0x27d439[_0x204d9c(0x1e1)],'normalized':_0x12fbbb,'validationConfig':_0x162cd3};}function validateFlowClassification(_0x46f08b,_0x1e4372){const _0x19d50c=a282_0x44ca9e;if(!isRecord(_0x46f08b[_0x19d50c(0xee)]))return;const _0x514561=_0x46f08b[_0x19d50c(0x1bb)],_0x2b04f2=_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x12b)];_0x2b04f2!==undefined&&(typeof _0x2b04f2!==_0x19d50c(0xc7)||!FLOW_PAGE_MODES[_0x19d50c(0x188)](_0x2b04f2))&&_0x1e4372[_0x19d50c(0xdd)]({'path':_0x19d50c(0xc8),'message':_0x19d50c(0x1b1)+String(_0x2b04f2)+'.'});_0x514561===_0x19d50c(0x1cc)&&_0x2b04f2!==undefined&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':_0x19d50c(0xc4)});_0x514561===_0x19d50c(0x10e)&&_0x2b04f2===_0x19d50c(0x182)&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x514561===_0x19d50c(0x1cc)||_0x514561===_0x19d50c(0x10e))&&validateCustomPageNavigation(_0x46f08b,_0x514561,_0x2b04f2,_0x1e4372);if(_0x514561!==_0x19d50c(0x1cc)||!Array['isArray'](_0x46f08b['flowJson']['nodes']))return;_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x9f)][_0x19d50c(0x181)]((_0xcfa2c9,_0x48dac0)=>{const _0x3b537b=_0x19d50c;isRecord(_0xcfa2c9)&&_0xcfa2c9['type']===_0x3b537b(0x1ab)&&_0xcfa2c9[_0x3b537b(0xbb)]===_0x3b537b(0x1c2)&&_0x1e4372[_0x3b537b(0xdd)]({'path':'flowJson.nodes['+_0x48dac0+_0x3b537b(0x1c8),'message':_0x3b537b(0xa7)});});}function validateCustomPageNavigation(_0x344448,_0x391fb4,_0x32c1a8,_0x1e418c){const _0x3b02ea=a282_0x44ca9e,_0xf4117=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xd7)];_0xf4117!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x16c),'message':_0x3b02ea(0x9e)});const _0x47dabe=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xe2)];_0x47dabe!==undefined&&(typeof _0x47dabe!==_0x3b02ea(0xc7)||_0x47dabe[_0x3b02ea(0xd2)]()==='')&&_0x1e418c['push']({'path':'flowJson.startPath','message':_0x3b02ea(0x1de)});const _0x32fcea=Array[_0x3b02ea(0x1f7)](_0x344448['flowJson'][_0x3b02ea(0x9f)])?_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0x9f)][_0x3b02ea(0x18d)]((_0xb0bc1a,_0x9fd931)=>({'node':_0xb0bc1a,'index':_0x9fd931}))[_0x3b02ea(0x1bc)](({node:_0x11b98b})=>isRecord(_0x11b98b)&&_0x11b98b[_0x3b02ea(0xa3)]!==undefined):[],_0x48cae3=_0x47dabe!==undefined||_0x32fcea[_0x3b02ea(0x17b)]>0x0,_0x6c29d8=_0x32c1a8===undefined&&_0x391fb4===_0x3b02ea(0x10e)?'CUSTOM_PAGE':_0x32c1a8;_0x48cae3&&(_0x391fb4!==_0x3b02ea(0x10e)||_0x6c29d8!==_0x3b02ea(0xca))&&(_0x47dabe!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x1a6),'message':_0x3b02ea(0xec)}),_0x32fcea['forEach'](({index:_0x5f0851})=>{const _0x550511=_0x3b02ea;_0x1e418c['push']({'path':_0x550511(0xf8)+_0x5f0851+'].path','message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x4efa75,_0x50a932,_0x43ff06={}){const _0x240f0b=a282_0x44ca9e,_0x32ee04=resolve(_0x4efa75),_0x2c0a11=_0x32ee04+'.'+process[_0x240f0b(0x1a7)]+'.'+randomUUID()+_0x240f0b(0x19a),_0x300b5d=JSON[_0x240f0b(0xac)](_0x50a932,null,0x2)+'\x0a';let _0x5b1f90;try{try{_0x5b1f90=(await stat(_0x32ee04))[_0x240f0b(0x135)]&0x1ff;}catch{_0x5b1f90=undefined;}await writeFile(_0x2c0a11,_0x300b5d,{'encoding':_0x240f0b(0x16d),'flag':'wx','mode':_0x5b1f90??0x1a4});if(_0x5b1f90!==undefined)await chmod(_0x2c0a11,_0x5b1f90);_0x43ff06[_0x240f0b(0x180)]===![]?(await link(_0x2c0a11,_0x32ee04),await unlink(_0x2c0a11)):await rename(_0x2c0a11,_0x32ee04);}finally{await unlink(_0x2c0a11)[_0x240f0b(0x1e9)](()=>undefined);}}function validateOuterMetadata(_0x183a88,_0x23b78f){const _0x4d360f=a282_0x44ca9e;(typeof _0x183a88[_0x4d360f(0xfe)]!==_0x4d360f(0xc7)||_0x183a88[_0x4d360f(0xfe)][_0x4d360f(0xd2)]()==='')&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xfe),'message':_0x4d360f(0x1fc)});_0x183a88[_0x4d360f(0x1a2)]!==undefined&&typeof _0x183a88['flowDesc']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1a2),'message':_0x4d360f(0xc1)});if(_0x183a88['flowType']===undefined||_0x183a88[_0x4d360f(0x1bb)]===null)_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'flowType\x20is\x20required.'});else(typeof _0x183a88[_0x4d360f(0x1bb)]!==_0x4d360f(0xc7)||!FLOW_TYPES[_0x4d360f(0x188)](_0x183a88[_0x4d360f(0x1bb)]))&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'Unsupported\x20flowType:\x20'+String(_0x183a88[_0x4d360f(0x1bb)])+'.'});_0x183a88[_0x4d360f(0xf0)]!==undefined&&typeof _0x183a88['datasetCode']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xf0),'message':_0x4d360f(0x9c)}),_0x183a88[_0x4d360f(0xa1)]!==undefined&&(!Number[_0x4d360f(0x1ec)](_0x183a88[_0x4d360f(0xa1)])||_0x183a88['pageId']<0x0)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x10c)}),_0x183a88[_0x4d360f(0x1bb)]==='INDEPENDENT_FLOW'&&_0x183a88[_0x4d360f(0xf0)]!==undefined&&_0x23b78f['push']({'path':_0x4d360f(0xf0),'message':_0x4d360f(0xfc)}),_0x183a88[_0x4d360f(0x1bb)]===_0x4d360f(0x10e)&&_0x183a88[_0x4d360f(0xa1)]!==undefined&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x16b)});}function validateGraph(_0x39ff9b,_0x6d3cbb){const _0x2f0cfd=a282_0x44ca9e;if(!isRecord(_0x39ff9b)){_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xee),'message':_0x2f0cfd(0x134)});return;}!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x9f)])&&_0x6d3cbb['push']({'path':_0x2f0cfd(0x158),'message':_0x2f0cfd(0x11c)});!Array['isArray'](_0x39ff9b[_0x2f0cfd(0x11f)])&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xbd),'message':_0x2f0cfd(0x190)});Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x2f0cfd(0x13e))&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xb7),'message':_0x2f0cfd(0x165)+String(_0x39ff9b[_0x2f0cfd(0x13e)])+_0x2f0cfd(0xeb)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x594c13 of[_0x2f0cfd(0xc2),_0x2f0cfd(0x14f),'formPermissions']){Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x594c13)&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.'+_0x594c13,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2f0cfd(0x1f7)](_0x39ff9b['nodes'])||!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x11f)]))return;const _0xe9542a=new Map(),_0x1a4671=[],_0xd48d93=[],_0x44d2f9=new Map(),_0x25b2c1=new Map(),_0x4a7eae=new Set();let _0x3476b5=0x0;_0x39ff9b[_0x2f0cfd(0x9f)][_0x2f0cfd(0x181)]((_0x190fd4,_0xbfb73a)=>{const _0xf472da=_0x2f0cfd,_0x3c9e14=_0xf472da(0xf8)+_0xbfb73a+']';if(!isRecord(_0x190fd4)){_0x6d3cbb['push']({'path':_0x3c9e14,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x3d82a7=_0x190fd4;if(typeof _0x3d82a7['id']!=='string'||!BPMN_ID_PATTERN[_0xf472da(0xb1)](_0x3d82a7['id']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':_0xf472da(0x143)});else _0xe9542a[_0xf472da(0x188)](_0x3d82a7['id'])?_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':'Duplicate\x20node\x20id:\x20'+_0x3d82a7['id']+'.'}):(_0xe9542a[_0xf472da(0xf9)](_0x3d82a7['id'],_0x3d82a7),_0x4a7eae['add'](_0x3d82a7['id']));if(!NODE_TYPES['has'](_0x3d82a7['type']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x3d82a7[_0xf472da(0x163)])+'.'});else{if(_0x3d82a7[_0xf472da(0x163)]==='START')_0x1a4671[_0xf472da(0xdd)](_0x3d82a7['id']);else _0x3d82a7['type']===_0xf472da(0x18c)&&_0xd48d93[_0xf472da(0xdd)](_0x3d82a7['id']);}_0x3d82a7[_0xf472da(0x163)]===_0xf472da(0x1ab)&&(_0x3d82a7['taskMode']===undefined||_0x3d82a7[_0xf472da(0xbb)]==='APPROVAL')&&(_0x3476b5+=0x1);validateNode(_0x3d82a7,_0x3c9e14,_0x6d3cbb);if(_0x3d82a7[_0xf472da(0x163)]==='SCRIPT'){const _0x36d259=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xde)],![]);_0x36d259&&(registerResultVariableOwner(_0x25b2c1,_0x36d259,_0x3d82a7['id'],_0x6d3cbb),!_0x44d2f9[_0xf472da(0x188)](_0x36d259)&&_0x44d2f9[_0xf472da(0xf9)](_0x36d259,_0x3d82a7['id']));}if(_0x3d82a7[_0xf472da(0x163)]==='APPROVAL'&&isRecord(_0x3d82a7[_0xf472da(0xad)])&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xda)]===!![]&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xa8)]===_0xf472da(0x123)){const _0x5e0d94=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xad)]['resultVariable'],!![]);_0x5e0d94&&registerResultVariableOwner(_0x25b2c1,_0x5e0d94,_0x3d82a7['id']+_0xf472da(0x15f),_0x6d3cbb);}});_0x1a4671[_0x2f0cfd(0x17b)]!==0x1&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0x158),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0xd48d93[_0x2f0cfd(0x17b)]===0x0&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.nodes','message':_0x2f0cfd(0xd4)});const _0x226ddb=new Map(),_0xb5e6dc=new Map(),_0x5cfebb=new Map(),_0x111bf1=new Set();_0x39ff9b[_0x2f0cfd(0x11f)]['forEach']((_0x57211f,_0xfe5934)=>{const _0x154c03=_0x2f0cfd,_0x249c61='flowJson.edges['+_0xfe5934+']';if(!isRecord(_0x57211f)){_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0xe3)});return;}const _0xc34e99=_0x57211f;_0x5cfebb[_0x154c03(0xf9)](_0xc34e99,_0x249c61);const _0x509e11=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0xf4)],_0xc34e99[_0x154c03(0x186)]),_0x234a2a=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0x199)],_0xc34e99[_0x154c03(0x1d3)]);if(!_0x509e11)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x15b)});if(!_0x234a2a)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+'.target','message':_0x154c03(0x14b)});_0x509e11&&!_0xe9542a[_0x154c03(0x188)](_0x509e11)&&_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x1a4)+_0x509e11+'.'});_0x234a2a&&!_0xe9542a[_0x154c03(0x188)](_0x234a2a)&&_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x18e),'message':_0x154c03(0x13d)+_0x234a2a+'.'});if(_0xc34e99['id']!==undefined){if(typeof _0xc34e99['id']!==_0x154c03(0xc7)||!BPMN_ID_PATTERN[_0x154c03(0xb1)](_0xc34e99['id']))_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x1ad)});else{if(_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id']))_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x111)+_0xc34e99['id']+'.'});else!_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id'])&&_0x4a7eae[_0x154c03(0x16e)](_0xc34e99['id']);}}if(_0x509e11&&_0x234a2a){const _0x1e0dca=_0x509e11+'\x00'+_0x234a2a+'\x00'+(_0xc34e99[_0x154c03(0x104)]??_0x154c03(0xd9));_0x111bf1[_0x154c03(0x188)](_0x1e0dca)?_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0x1ee)+_0x509e11+_0x154c03(0x172)+_0x234a2a+'\x20('+(_0xc34e99['conditionType']??'ALWAYS')+').'}):_0x111bf1['add'](_0x1e0dca);}validateEdge(_0xc34e99,_0x249c61,_0x6d3cbb),_0x509e11&&_0x234a2a&&(_0x226ddb['get'](_0x509e11)?.[_0x154c03(0xdd)](_0xc34e99)??_0x226ddb[_0x154c03(0xf9)](_0x509e11,[_0xc34e99]),_0xb5e6dc[_0x154c03(0x103)](_0x234a2a)?.['push'](_0xc34e99)??_0xb5e6dc[_0x154c03(0xf9)](_0x234a2a,[_0xc34e99]));});if(_0x1a4671[_0x2f0cfd(0x17b)]!==0x1)return;validateGraphShape(_0xe9542a,_0x1a4671[0x0],_0xd48d93,_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x6d3cbb),validateScriptResultReferences(_0xe9542a,_0x1a4671[0x0],_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x44d2f9,_0x6d3cbb),validateApprovalResults(_0xe9542a,_0x3476b5,_0xd48d93,_0x6d3cbb);}function validateNode(_0x639431,_0xc67069,_0xc908b7){const _0x4ce6e1=a282_0x44ca9e;for(const _0x1869e8 of['form',_0x4ce6e1(0xc3)]){Object[_0x4ce6e1(0xae)][_0x4ce6e1(0xdf)][_0x4ce6e1(0x179)](_0x639431,_0x1869e8)&&_0xc908b7['push']({'path':_0xc67069+'.'+_0x1869e8,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x4ce6e1(0x188)](_0x639431[_0x4ce6e1(0x163)]))return;(typeof _0x639431[_0x4ce6e1(0x124)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0x124)][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xd0),'message':_0x4ce6e1(0x1c0)});_0x639431['pageId']!==undefined&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xce),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x639431[_0x4ce6e1(0xa3)]!==undefined){if(typeof _0x639431[_0x4ce6e1(0xa3)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0xa3)][_0x4ce6e1(0xd2)]()==='')_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb5),'message':_0x4ce6e1(0x1d2)});else _0x639431['type']!==_0x4ce6e1(0x1ab)&&_0x639431[_0x4ce6e1(0x163)]!=='END'&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x35eed3=_0x639431['position'];if(!isRecord(_0x35eed3))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.position','message':_0x4ce6e1(0x1e2)});else for(const _0x9540f0 of['x','y']){const _0x1fc672=_0x35eed3[_0x9540f0];(typeof _0x1fc672!==_0x4ce6e1(0x157)||!Number['isFinite'](_0x1fc672)||_0x1fc672<0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xea)+_0x9540f0,'message':_0x4ce6e1(0x17e)+_0x9540f0+_0x4ce6e1(0x1d6)});}if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1ab)){const _0x3cf992=_0x639431[_0x4ce6e1(0x11b)]??_0x4ce6e1(0x1ed),_0x2d36c0=_0x639431['taskMode']??_0x4ce6e1(0x1ab);!APPROVAL_TASK_MODES['has'](_0x2d36c0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xbf),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x2d36c0)+'.'});!APPROVAL_MODES['has'](_0x3cf992)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x126),'message':_0x4ce6e1(0x122)+String(_0x3cf992)+'.'});if(!isRecord(_0x639431[_0x4ce6e1(0x166)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee','message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x4bcba5=_0x639431['assignee'][_0x4ce6e1(0x1fb)];_0x4bcba5!==_0x4ce6e1(0x12e)&&_0x4bcba5!==_0x4ce6e1(0x1f3)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x156),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x4bcba5===_0x4ce6e1(0x12e)){const _0x16d844=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x16d844)||_0x16d844['length']===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee.userIds','message':_0x4ce6e1(0x100)});else{const _0x1d5206=_0x16d844[_0x4ce6e1(0xe6)](_0x2f4735=>!isValidUserId(_0x2f4735));_0x1d5206>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x144)+_0x1d5206+']','message':_0x4ce6e1(0x147)});const _0x5f2892=new Set(_0x16d844[_0x4ce6e1(0x1bc)](isValidUserId)[_0x4ce6e1(0x18d)](_0x333595=>String(_0x333595)[_0x4ce6e1(0xd2)]()));_0x3cf992===_0x4ce6e1(0x1ed)&&_0x5f2892[_0x4ce6e1(0x16f)]>0x1&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb6),'message':_0x4ce6e1(0x1ae)});}}if(_0x4bcba5===_0x4ce6e1(0x1f3)){const _0x199595=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0x19e)],_0x270eca=typeof _0x199595==='number'||typeof _0x199595===_0x4ce6e1(0xc7)?Number(String(_0x199595)[_0x4ce6e1(0xd2)]()):Number[_0x4ce6e1(0x18f)];(!Number[_0x4ce6e1(0x176)](_0x270eca)||_0x270eca<=0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x14a),'message':_0x4ce6e1(0x112)});}}if(_0x639431[_0x4ce6e1(0x194)]!==undefined){if(!isRecord(_0x639431['transferCandidates']))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.transferCandidates','message':_0x4ce6e1(0x1f9)});else{if(_0x639431[_0x4ce6e1(0x194)]['strategy']!=='FIXED')_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0xdc),'message':_0x4ce6e1(0x149)});else{const _0x9d3fdc=_0x639431['transferCandidates'][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x9d3fdc)||_0x9d3fdc[_0x4ce6e1(0x17b)]===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x1ce),'message':_0x4ce6e1(0x1dc)});else{const _0x4bd278=_0x9d3fdc[_0x4ce6e1(0xe6)](_0x4e3054=>!isValidUserId(_0x4e3054));_0x4bd278>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xc0)+_0x4bd278+']','message':_0x4ce6e1(0x155)});}}}}}_0x639431[_0x4ce6e1(0xd1)]!==undefined&&typeof _0x639431[_0x4ce6e1(0xd1)]!==_0x4ce6e1(0x183)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.sequential','message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1c1)){(typeof _0x639431[_0x4ce6e1(0x12d)]!=='string'||_0x639431['scriptName'][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0x10a),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x639431[_0x4ce6e1(0xde)]!==undefined){if(typeof _0x639431['resultVariable']!==_0x4ce6e1(0xc7)||!VARIABLE_PATTERN[_0x4ce6e1(0xb1)](_0x639431[_0x4ce6e1(0xde)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x4ce6e1(0x188)](_0x639431['resultVariable'])||_0x639431[_0x4ce6e1(0xde)][_0x4ce6e1(0x191)](_0x4ce6e1(0x1f2)))&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'Reserved\x20resultVariable:\x20'+_0x639431[_0x4ce6e1(0xde)]+'.'});}}validateAsyncExecution(_0x639431,_0xc67069,_0xc908b7),validateApprovalTimeout(_0x639431,_0xc67069,_0xc908b7),validateCcConfig(_0x639431,_0xc67069,_0xc908b7),_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0xa5)&&validateNotificationConfig(_0x639431['config'],_0xc67069+'.config',_0xc908b7);}function validateAsyncExecution(_0x5f0bd3,_0xb8d003,_0x2e65bc){const _0x1aac89=a282_0x44ca9e;if(_0x5f0bd3['async']===undefined)return;if(!isRecord(_0x5f0bd3['async'])){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0x107),'message':_0x1aac89(0x1e6)});return;}if(_0x5f0bd3['async'][_0x1aac89(0xda)]!==undefined&&typeof _0x5f0bd3[_0x1aac89(0xd8)]['enabled']!=='boolean'){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0xef),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0xda)]!==!![])return;_0x5f0bd3['type']!==_0x1aac89(0x1c1)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async','message':_0x1aac89(0x10f)});const _0x13848d=_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1e4)]??0x3;(!Number[_0x1aac89(0x1ec)](_0x13848d)||_0x13848d<0x1||_0x13848d>MAX_ASYNC_RETRY_COUNT)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async.retryCount','message':_0x1aac89(0x150)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)]!==undefined&&validateTimeAmount(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)],_0xb8d003+_0x1aac89(0xab),_0x2e65bc);}function validateApprovalTimeout(_0x958645,_0x4ba496,_0x1566c1){const _0xb3b0e2=a282_0x44ca9e;if(_0x958645['timeout']===undefined)return;if(!isRecord(_0x958645[_0xb3b0e2(0xad)])){_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x167)});return;}if(_0x958645[_0xb3b0e2(0xad)]['enabled']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)]['enabled']!==_0xb3b0e2(0x183)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.enabled','message':_0xb3b0e2(0x1e0)});return;}if(_0x958645['timeout']['enabled']!==!![])return;if(_0x958645[_0xb3b0e2(0xad)]['interrupting']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]!=='boolean'){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0xb3b0e2(0x18b)});return;}_0x958645['type']!=='APPROVAL'&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x1b9)});validateTimeAmount(_0x958645[_0xb3b0e2(0xad)]['duration'],_0x4ba496+_0xb3b0e2(0x174),_0x1566c1);const _0x3645d2=_0x958645[_0xb3b0e2(0xad)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0xb3b0e2(0x188)](_0x3645d2)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x14c)});return;}(_0x958645[_0xb3b0e2(0xbb)]??_0xb3b0e2(0x1ab))===_0xb3b0e2(0x1c2)&&_0x3645d2!==_0xb3b0e2(0x123)&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x177)});const _0x217eab=_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]??_0x3645d2!==_0xb3b0e2(0x123);if(_0x3645d2===_0xb3b0e2(0x123))_0x217eab&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.interrupting','message':_0xb3b0e2(0x121)}),(typeof _0x958645[_0xb3b0e2(0xad)]['scriptName']!=='string'||_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x12d)][_0xb3b0e2(0xd2)]()==='')&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x1a0),'message':_0xb3b0e2(0x1c3)}),validateOptionalResultVariable(_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0xde)],_0x4ba496+_0xb3b0e2(0x10d),_0x1566c1);else!_0x217eab&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0x3645d2+_0xb3b0e2(0x1e3)});}function validateTimeAmount(_0x5a15c2,_0x8205be,_0x31b775){const _0x599ce9=a282_0x44ca9e;if(!isRecord(_0x5a15c2)){_0x31b775['push']({'path':_0x8205be,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x599ce9(0x1ec)](_0x5a15c2['value'])||Number(_0x5a15c2[_0x599ce9(0x13b)])<=0x0)&&_0x31b775[_0x599ce9(0xdd)]({'path':_0x8205be+'.value','message':_0x599ce9(0x1bd)}),!FLOW_TIME_UNITS[_0x599ce9(0x188)](_0x5a15c2[_0x599ce9(0x184)])&&_0x31b775['push']({'path':_0x8205be+_0x599ce9(0xcb),'message':_0x599ce9(0x1dd)});}function validateOptionalResultVariable(_0x1f620a,_0x319809,_0xbdcc52){const _0x59a2ca=a282_0x44ca9e;if(_0x1f620a===undefined||_0x1f620a===null||_0x1f620a==='')return;if(typeof _0x1f620a!==_0x59a2ca(0xc7)||!VARIABLE_PATTERN[_0x59a2ca(0xb1)](_0x1f620a))_0xbdcc52[_0x59a2ca(0xdd)]({'path':_0x319809,'message':_0x59a2ca(0xb2)});else(RESERVED_RESULT_VARIABLES[_0x59a2ca(0x188)](_0x1f620a)||_0x1f620a[_0x59a2ca(0x191)](_0x59a2ca(0x1f2)))&&_0xbdcc52['push']({'path':_0x319809,'message':'Reserved\x20resultVariable:\x20'+_0x1f620a+'.'});}function validateCcConfig(_0x22f5b2,_0x537b3e,_0x32808c){const _0x2a8001=a282_0x44ca9e;if(_0x22f5b2['cc']===undefined)return;if(!isRecord(_0x22f5b2['cc'])){_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0x1c4)});return;}_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x18c)&&_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x1ab)&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0xd5)});Object[_0x2a8001(0xae)][_0x2a8001(0xdf)][_0x2a8001(0x179)](_0x22f5b2['cc'],_0x2a8001(0x1ef))&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x1d4),'message':UNSUPPORTED_FORM_MESSAGE});const _0x48f2a6=_0x22f5b2['cc'][_0x2a8001(0x12a)];if(!Array['isArray'](_0x48f2a6)||_0x48f2a6[_0x2a8001(0x17b)]===0x0)_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x1ac)});else{_0x48f2a6[_0x2a8001(0x17b)]>MAX_CC_RECIPIENTS&&_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x106)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x6ffab=new Set();_0x48f2a6[_0x2a8001(0x181)]((_0x600924,_0x3a4ea1)=>{const _0xd8c4d8=_0x2a8001;if(typeof _0x600924!=='string'||_0x600924['trim']()==='')_0x32808c[_0xd8c4d8(0xdd)]({'path':_0x537b3e+_0xd8c4d8(0x119)+_0x3a4ea1+']','message':_0xd8c4d8(0x1b0)});else _0x6ffab[_0xd8c4d8(0x188)](_0x600924[_0xd8c4d8(0xd2)]())?_0x32808c['push']({'path':_0x537b3e+'.cc.recipientUserIds['+_0x3a4ea1+']','message':_0xd8c4d8(0x1b3)+_0x600924['trim']()+'.'}):_0x6ffab[_0xd8c4d8(0x16e)](_0x600924[_0xd8c4d8(0xd2)]());});}validateStringArray(_0x22f5b2['cc']['visible'],_0x537b3e+_0x2a8001(0x171),_0x32808c);}function validateStringArray(_0x2e5122,_0x1349e4,_0x1022f0){const _0xaea9b7=a282_0x44ca9e;if(_0x2e5122===undefined)return;if(!Array[_0xaea9b7(0x1f7)](_0x2e5122)){_0x1022f0[_0xaea9b7(0xdd)]({'path':_0x1349e4,'message':_0xaea9b7(0x1df)});return;}const _0x1ca7f5=new Set();_0x2e5122[_0xaea9b7(0x181)]((_0x4e4513,_0x429b61)=>{const _0x4f1a55=_0xaea9b7;if(typeof _0x4e4513!=='string'||_0x4e4513[_0x4f1a55(0xd2)]()==='')_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x11e)});else _0x1ca7f5[_0x4f1a55(0x188)](_0x4e4513[_0x4f1a55(0xd2)]())?_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x17a)+_0x4e4513[_0x4f1a55(0xd2)]()+'.'}):_0x1ca7f5[_0x4f1a55(0x16e)](_0x4e4513[_0x4f1a55(0xd2)]());});}function validateNotificationConfig(_0x515411,_0x33c19d,_0x4a6805){const _0x1cb913=a282_0x44ca9e;if(!isRecord(_0x515411)){_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d,'message':_0x1cb913(0x102)});return;}if(_0x515411['version']!==undefined&&_0x515411[_0x1cb913(0x137)]!==null){if(typeof _0x515411['version']!==_0x1cb913(0xc7))_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()&&_0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()!=='v1'&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0x168),'message':_0x1cb913(0x1d9)+_0x515411[_0x1cb913(0x137)]+'.'});}const _0xa3243d=requireNotificationString(_0x515411[_0x1cb913(0x1cd)],_0x33c19d+_0x1cb913(0x109),'Notification\x20configCode\x20is\x20required.',_0x4a6805);_0xa3243d?.[_0x1cb913(0x18a)]('${')&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.configCode','message':_0x1cb913(0x178)});if(_0x515411[_0x1cb913(0x13a)]!==undefined&&_0x515411[_0x1cb913(0x13a)]!==null){if(typeof _0x515411[_0x1cb913(0x13a)]!=='string')_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.failurePolicy','message':_0x1cb913(0x1d8)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x515411[_0x1cb913(0x13a)]['trim']()[_0x1cb913(0x196)]())&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0xfd),'message':_0x1cb913(0x159)});}!isRecord(_0x515411[_0x1cb913(0x11d)])?_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.template','message':_0x1cb913(0x192)}):validateNotificationTemplate(_0x515411['template'],_0x33c19d+_0x1cb913(0x162),_0x4a6805),validateNotificationRecipients(_0x515411[_0x1cb913(0x142)],_0x33c19d+_0x1cb913(0x118),_0x4a6805);}function validateNotificationTemplate(_0x2359a2,_0x26d9c7,_0x185ddf){const _0x50a9cb=a282_0x44ca9e;for(const _0x10bd4f of['title','summary']){const _0x5ecd79=requireNotificationString(_0x2359a2[_0x10bd4f],_0x26d9c7+'.'+_0x10bd4f,_0x50a9cb(0x146)+_0x10bd4f+'\x20is\x20required.',_0x185ddf);if(_0x5ecd79)validateNotificationPlaceholders(_0x5ecd79,_0x26d9c7+'.'+_0x10bd4f,_0x185ddf);}_0x2359a2['detailMarkdown']!==undefined&&_0x2359a2[_0x50a9cb(0x125)]!==null&&(typeof _0x2359a2[_0x50a9cb(0x125)]!==_0x50a9cb(0xc7)?_0x185ddf['push']({'path':_0x26d9c7+_0x50a9cb(0xf3),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x2359a2[_0x50a9cb(0x125)],_0x26d9c7+_0x50a9cb(0xf3),_0x185ddf)),validateNotificationFacts(_0x2359a2['facts'],_0x26d9c7+_0x50a9cb(0x1b8),_0x185ddf),validateNotificationActions(_0x2359a2[_0x50a9cb(0xaa)],_0x26d9c7+_0x50a9cb(0xc9),_0x185ddf);}function validateNotificationFacts(_0xe051ac,_0x1c36e5,_0x5754f4){const _0x31ac3c=a282_0x44ca9e;if(_0xe051ac===undefined||_0xe051ac===null)return;if(!Array[_0x31ac3c(0x1f7)](_0xe051ac)){_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0xb0)});return;}_0xe051ac[_0x31ac3c(0x17b)]>MAX_NOTIFICATION_FACTS&&_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0x1be)+MAX_NOTIFICATION_FACTS+_0x31ac3c(0x120)}),_0xe051ac[_0x31ac3c(0x181)]((_0x22f3f4,_0x39d9b3)=>{const _0x4fecbf=_0x31ac3c,_0x53a908=_0x1c36e5+'['+_0x39d9b3+']';if(!isRecord(_0x22f3f4)){_0x5754f4['push']({'path':_0x53a908,'message':_0x4fecbf(0xa9)});return;}for(const _0x1ae849 of[_0x4fecbf(0xdb),'value']){const _0x72ef69=requireNotificationString(_0x22f3f4[_0x1ae849],_0x53a908+'.'+_0x1ae849,_0x4fecbf(0x175)+_0x1ae849+'\x20is\x20required.',_0x5754f4);_0x72ef69&&validateNotificationPlaceholders(_0x72ef69,_0x53a908+'.'+_0x1ae849,_0x5754f4);}});}function validateNotificationActions(_0x3799d3,_0x13d61b,_0x3b2200){const _0x4b4e6c=a282_0x44ca9e;if(_0x3799d3===undefined||_0x3799d3===null)return;if(!Array['isArray'](_0x3799d3)){_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':_0x4b4e6c(0xe7)});return;}_0x3799d3[_0x4b4e6c(0x17b)]>MAX_NOTIFICATION_ACTIONS&&_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x4b4e6c(0xf1)}),_0x3799d3[_0x4b4e6c(0x181)]((_0x587369,_0x2e8e76)=>{const _0x767aad=_0x4b4e6c,_0x2c9ac3=_0x13d61b+'['+_0x2e8e76+']';if(!isRecord(_0x587369)){_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3,'message':_0x767aad(0xc6)});return;}const _0x512f5f=requireNotificationString(_0x587369[_0x767aad(0x185)],_0x2c9ac3+_0x767aad(0x153),_0x767aad(0xa6),_0x3b2200);if(_0x512f5f)validateNotificationPlaceholders(_0x512f5f,_0x2c9ac3+_0x767aad(0x153),_0x3b2200);const _0x9ec75e=requireNotificationString(_0x587369[_0x767aad(0x1ca)],_0x2c9ac3+_0x767aad(0x13c),_0x767aad(0x151),_0x3b2200);if(!_0x9ec75e)return;validateNotificationPlaceholders(_0x9ec75e,_0x2c9ac3+_0x767aad(0x13c),_0x3b2200),!/^https?:\/\//i[_0x767aad(0xb1)](_0x9ec75e)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x9ec75e)&&_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3+_0x767aad(0x13c),'message':_0x767aad(0x19d)});});}function validateNotificationRecipients(_0xa608a1,_0x3a777d,_0x20bdb6){const _0x1003f3=a282_0x44ca9e;if(_0xa608a1===undefined||_0xa608a1===null)return;if(!Array['isArray'](_0xa608a1)){_0x20bdb6[_0x1003f3(0xdd)]({'path':_0x3a777d,'message':_0x1003f3(0x130)});return;}let _0x1eac07=![];_0xa608a1[_0x1003f3(0x181)]((_0x25b419,_0x42d603)=>{const _0x31c582=_0x1003f3,_0x35c0b1=_0x3a777d+'['+_0x42d603+']';if(!isRecord(_0x25b419)){_0x20bdb6['push']({'path':_0x35c0b1,'message':_0x31c582(0x133)});return;}const _0x276525=requireNotificationString(_0x25b419[_0x31c582(0x163)],_0x35c0b1+_0x31c582(0xb9),_0x31c582(0xcf),_0x20bdb6);_0x276525&&!NOTIFICATION_RECIPIENT_TYPES[_0x31c582(0x188)](_0x276525[_0x31c582(0x196)]())&&_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0xb9),'message':_0x31c582(0x154)});let _0x58cdab='TO';_0x25b419['role']!==undefined&&_0x25b419[_0x31c582(0x1c7)]!==null&&(typeof _0x25b419[_0x31c582(0x1c7)]!==_0x31c582(0xc7)?(_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1db)}),_0x58cdab=''):(_0x58cdab=_0x25b419[_0x31c582(0x1c7)]['trim']()[_0x31c582(0x196)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x58cdab)&&_0x20bdb6['push']({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1e8)})));if(_0x58cdab==='TO')_0x1eac07=!![];const _0x13b3aa=requireNotificationString(_0x25b419[_0x31c582(0x13b)],_0x35c0b1+'.value','Notification\x20recipient.value\x20is\x20required.',_0x20bdb6);_0x13b3aa&&validateNotificationPlaceholders(_0x13b3aa,_0x35c0b1+_0x31c582(0x116),_0x20bdb6);}),_0xa608a1[_0x1003f3(0x17b)]>0x0&&!_0x1eac07&&_0x20bdb6['push']({'path':_0x3a777d,'message':_0x1003f3(0x11a)});}function requireNotificationString(_0x5767a2,_0x1529f5,_0x1443b5,_0x2bc8e2){const _0x33df3d=a282_0x44ca9e;if(typeof _0x5767a2!==_0x33df3d(0xc7)||_0x5767a2[_0x33df3d(0xd2)]()==='')return _0x2bc8e2['push']({'path':_0x1529f5,'message':_0x1443b5}),undefined;return _0x5767a2[_0x33df3d(0xd2)]();}function validateNotificationPlaceholders(_0x3db46c,_0x4fca05,_0x440be0){const _0x4f5040=a282_0x44ca9e;for(const _0x285f4f of _0x3db46c['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x250e8f=_0x285f4f[0x1]?.[_0x4f5040(0xd2)]()??'',_0x283d4d=_0x250e8f[_0x4f5040(0x161)]('.'),_0x224b40=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](0x0,_0x283d4d):_0x250e8f,_0x2e1d4b=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](_0x283d4d+0x1)[_0x4f5040(0xd2)]():'';(![_0x4f5040(0xbe),_0x4f5040(0x1a3),_0x4f5040(0x12f)][_0x4f5040(0x18a)](_0x224b40)||_0x2e1d4b==='')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x285f4f[0x0]+'.'});}_0x3db46c[_0x4f5040(0x108)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x1c96cc,_0x267a4e,_0x40c8db){const _0x47458=a282_0x44ca9e;_0x1c96cc['name']!==undefined&&typeof _0x1c96cc['name']!=='string'&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd0),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x1c96cc[_0x47458(0x127)]!==undefined&&typeof _0x1c96cc[_0x47458(0x127)]!==_0x47458(0x183)&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0x15c)}),_0x1c96cc[_0x47458(0xed)]!==undefined&&(!Array[_0x47458(0x1f7)](_0x1c96cc[_0x47458(0xed)])?_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x1f4),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x1c96cc[_0x47458(0xed)][_0x47458(0x181)]((_0x111de2,_0x191000)=>{const _0xd29851=_0x47458;if(!isRecord(_0x111de2)){_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x9c9f8e of['x','y']){const _0x21dc87=_0x111de2[_0x9c9f8e];(typeof _0x21dc87!==_0xd29851(0x157)||!Number[_0xd29851(0xf2)](_0x21dc87))&&_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+'].'+_0x9c9f8e,'message':_0xd29851(0x1cf)+_0x9c9f8e+_0xd29851(0xd3)});}})),_0x1c96cc['conditionType']!==undefined&&!CONDITION_TYPES[_0x47458(0x188)](_0x1c96cc[_0x47458(0x104)])&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0x1b7),'message':_0x47458(0xf7)+String(_0x1c96cc[_0x47458(0x104)])+'.'}),_0x1c96cc[_0x47458(0x104)]===_0x47458(0xf6)&&(typeof _0x1c96cc[_0x47458(0x1c9)]!==_0x47458(0xc7)||_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()==='')&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x101),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x1c96cc[_0x47458(0x127)]===!![]&&_0x1c96cc[_0x47458(0x104)]!==_0x47458(0xd9)&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0xb8)}),_0x1c96cc[_0x47458(0x127)]===!![]&&typeof _0x1c96cc['expression']===_0x47458(0xc7)&&_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()!==''&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+'.expression','message':_0x47458(0x115)});}function validateGraphShape(_0x2273f9,_0xd59304,_0x434c71,_0x4d921d,_0x2ee086,_0x14576a,_0x5d5206){const _0x10ff0c=a282_0x44ca9e;for(const [_0x4507b2,_0x1f955e]of _0x2273f9){const _0x273838=_0x2ee086[_0x10ff0c(0x103)](_0x4507b2)??[],_0xb7a3bd=_0x4d921d[_0x10ff0c(0x103)](_0x4507b2)??[];_0x1f955e[_0x10ff0c(0x163)]!==_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x9d)});_0x1f955e[_0x10ff0c(0x163)]!=='END'&&_0xb7a3bd[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x13f)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]>0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x132)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x18c)&&_0xb7a3bd['length']>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x1f955e['type']===_0x10ff0c(0x110)){_0xb7a3bd['length']<0x2&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xe5)});const _0x12347d=_0xb7a3bd['filter'](_0x53b50d=>_0x53b50d[_0x10ff0c(0x127)]===!![]);_0x12347d[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x1d1)});if(_0x12347d[_0x10ff0c(0x17b)]===0x1){const _0x2fdb26=_0x12347d[0x0],_0x2da5bd=_0x14576a[_0x10ff0c(0x103)](_0x2fdb26)??'flowJson.edges';_0x2fdb26[_0x10ff0c(0x104)]!==_0x10ff0c(0xd9)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x1f6)});_0x2fdb26[_0x10ff0c(0x1c9)]!==undefined&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x101),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2cf26e of _0xb7a3bd){if(_0x2cf26e===_0x2fdb26)continue;const _0x3d1bbc=_0x14576a[_0x10ff0c(0x103)](_0x2cf26e)??'flowJson.edges';if(_0x2cf26e[_0x10ff0c(0x104)]!==_0x10ff0c(0xf6))_0x5d5206['push']({'path':_0x3d1bbc+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x189)});else(typeof _0x2cf26e['expression']!==_0x10ff0c(0xc7)||_0x2cf26e[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()==='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x3d1bbc+'.expression','message':_0x10ff0c(0x1a5)});}}}if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'&&(_0x1f955e[_0x10ff0c(0xbb)]??_0x10ff0c(0x1ab))===_0x10ff0c(0x1c2)){if(_0xb7a3bd[_0x10ff0c(0x17b)]!==0x1)_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x138)});else{const _0xdd8e84=_0xb7a3bd[0x0];((_0xdd8e84['conditionType']??_0x10ff0c(0xd9))!=='ALWAYS'||_0xdd8e84[_0x10ff0c(0x127)]===!![]||typeof _0xdd8e84['expression']===_0x10ff0c(0xc7)&&_0xdd8e84[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()!=='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x14576a['get'](_0xdd8e84)??'flowJson.edges','message':_0x10ff0c(0xbc)});}}else{if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'){const _0xe5906e=_0xb7a3bd[_0x10ff0c(0x18d)](_0x25dac8=>_0x25dac8['conditionType']??_0x10ff0c(0xd9)),_0x3df4ce=_0xe5906e['filter'](_0x17f62a=>_0x17f62a!==_0x10ff0c(0xa4)&&_0x17f62a!==_0x10ff0c(0x1f1));_0x3df4ce[_0x10ff0c(0x17b)]>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xc5)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x3660d1=>_0x3660d1===_0x10ff0c(0xa4))[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':_0x10ff0c(0x187)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x30c6d8=>_0x30c6d8===_0x10ff0c(0x1f1))['length']!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0xb7a3bd[_0x10ff0c(0x1f0)](_0x471913=>_0x471913[_0x10ff0c(0x127)]===!![])&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0xfa2c63=new Set(),_0xe33385=_0x4bdae6=>{const _0x5b9046=_0x10ff0c;if(_0xfa2c63['has'](_0x4bdae6))return;_0xfa2c63[_0x5b9046(0x16e)](_0x4bdae6);for(const _0x520f65 of _0x4d921d[_0x5b9046(0x103)](_0x4bdae6)??[]){const _0x21986e=resolveEdgeEndpoint(_0x520f65[_0x5b9046(0x199)],_0x520f65[_0x5b9046(0x1d3)]);if(_0x21986e&&_0x2273f9['has'](_0x21986e))_0xe33385(_0x21986e);}};_0xe33385(_0xd59304);for(const _0x370c64 of _0x2273f9['keys']()){!_0xfa2c63[_0x10ff0c(0x188)](_0x370c64)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x370c64,'message':_0x10ff0c(0xcc)});}const _0x4403f2=_0x434c71[_0x10ff0c(0x1f0)](_0x3071cb=>_0xfa2c63[_0x10ff0c(0x188)](_0x3071cb));if(!_0x4403f2){_0x5d5206['push']({'path':_0x10ff0c(0xbd),'message':_0x10ff0c(0x197)});return;}const _0x485d3e=new Set(),_0x2851d7=_0x2b39e9=>{const _0x24b729=_0x10ff0c;if(_0x485d3e['has'](_0x2b39e9))return;_0x485d3e[_0x24b729(0x16e)](_0x2b39e9);for(const _0x5151ab of _0x2ee086['get'](_0x2b39e9)??[]){const _0x29dd96=resolveEdgeEndpoint(_0x5151ab['source'],_0x5151ab[_0x24b729(0x186)]);if(_0x29dd96&&_0x2273f9[_0x24b729(0x188)](_0x29dd96))_0x2851d7(_0x29dd96);}};for(const _0xb2d6fd of _0x434c71){if(_0x2273f9[_0x10ff0c(0x188)](_0xb2d6fd))_0x2851d7(_0xb2d6fd);}for(const _0xcdfa75 of _0xfa2c63){!_0x485d3e[_0x10ff0c(0x188)](_0xcdfa75)&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0xcdfa75,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x5e6865,_0xfb3456,_0x2dd74e,_0x2c2f2f){const _0x46885f=a282_0x44ca9e;if(_0xfb3456===0x0)return;const _0x3ef91d=new Set(_0x2dd74e['map'](_0x26ef9b=>_0x5e6865[_0x46885f(0x103)](_0x26ef9b)?.[_0x46885f(0x113)])[_0x46885f(0x1bc)](_0x54f100=>typeof _0x54f100===_0x46885f(0xc7)));for(const _0x2f1888 of[_0x46885f(0xa4),_0x46885f(0x1f1)]){!_0x3ef91d[_0x46885f(0x188)](_0x2f1888)&&_0x2c2f2f[_0x46885f(0xdd)]({'path':_0x46885f(0x158),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x2f1888+'.'});}}function validateScriptResultReferences(_0x533ae9,_0x1e4085,_0xc7240d,_0x26b9b3,_0xa9bd61,_0x2fe80f,_0x274148){const _0x5b160e=a282_0x44ca9e;if(_0x2fe80f[_0x5b160e(0x16f)]===0x0)return;const _0x40d8f2=new Set(),_0x1c8aca=_0x3863b7=>{const _0x58abb6=_0x5b160e;if(!_0x40d8f2[_0x58abb6(0x188)](_0x3863b7)&&_0x533ae9['has'](_0x3863b7)){_0x40d8f2[_0x58abb6(0x16e)](_0x3863b7);for(const _0x5b3bf3 of _0xc7240d[_0x58abb6(0x103)](_0x3863b7)??[]){const _0x1f9d82=resolveEdgeEndpoint(_0x5b3bf3['target'],_0x5b3bf3[_0x58abb6(0x1d3)]);if(_0x1f9d82)_0x1c8aca(_0x1f9d82);}}};_0x1c8aca(_0x1e4085);const _0x3e0650=new Map();for(const _0x2c64c9 of _0x40d8f2){_0x3e0650['set'](_0x2c64c9,_0x2c64c9===_0x1e4085?new Set([_0x1e4085]):new Set(_0x40d8f2));}let _0x158bdc=!![];while(_0x158bdc){_0x158bdc=![];for(const _0x57a16c of _0x40d8f2){if(_0x57a16c===_0x1e4085)continue;const _0x384444=(_0x26b9b3[_0x5b160e(0x103)](_0x57a16c)??[])[_0x5b160e(0x18d)](_0xde7470=>resolveEdgeEndpoint(_0xde7470['source'],_0xde7470[_0x5b160e(0x186)]))[_0x5b160e(0x1bc)](_0xafe7d5=>Boolean(_0xafe7d5&&_0x40d8f2[_0x5b160e(0x188)](_0xafe7d5)));if(_0x384444['length']===0x0)continue;const _0xfa9745=new Set(_0x3e0650[_0x5b160e(0x103)](_0x384444[0x0])??[]);for(const _0x504708 of _0x384444[_0x5b160e(0x1a8)](0x1)){const _0x32c1c8=_0x3e0650[_0x5b160e(0x103)](_0x504708)??new Set();for(const _0x3b0c8b of _0xfa9745){if(!_0x32c1c8['has'](_0x3b0c8b))_0xfa9745[_0x5b160e(0x129)](_0x3b0c8b);}}_0xfa9745['add'](_0x57a16c);const _0x308868=_0x3e0650['get'](_0x57a16c);!setsEqual(_0x308868,_0xfa9745)&&(_0x3e0650[_0x5b160e(0xf9)](_0x57a16c,_0xfa9745),_0x158bdc=!![]);}}for(const [_0x1aaa11,_0x4cb60c]of _0xc7240d){const _0x38ef9b=_0x3e0650['get'](_0x1aaa11);if(!_0x38ef9b)continue;for(const _0x1ad4c7 of _0x4cb60c){if(_0x1ad4c7[_0x5b160e(0x104)]!=='EXPRESSION'||typeof _0x1ad4c7[_0x5b160e(0x1c9)]!==_0x5b160e(0xc7))continue;for(const [_0x4f0223,_0x52a91a]of _0x2fe80f){expressionReferencesVariable(_0x1ad4c7[_0x5b160e(0x1c9)],_0x4f0223)&&!_0x38ef9b[_0x5b160e(0x188)](_0x52a91a)&&_0x274148[_0x5b160e(0xdd)]({'path':(_0xa9bd61['get'](_0x1ad4c7)??_0x5b160e(0xbd))+_0x5b160e(0x101),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x4f0223+_0x5b160e(0x145)+_0x52a91a+_0x5b160e(0xe4)+_0x1aaa11+'.'});}}}}function expressionReferencesVariable(_0x46b0d0,_0x33bfd5){const _0x3bffab=a282_0x44ca9e;let _0x68fb2d=0x0;while(_0x68fb2d<_0x46b0d0['length']){const _0xbf53cf=_0x46b0d0[_0x68fb2d];if(_0xbf53cf==='\x27'||_0xbf53cf==='\x22'){_0x68fb2d=skipQuotedExpressionSegment(_0x46b0d0,_0x68fb2d,_0xbf53cf);continue;}if(!/[A-Za-z_]/[_0x3bffab(0xb1)](_0xbf53cf)){_0x68fb2d+=0x1;continue;}const _0x2f920c=_0x68fb2d;_0x68fb2d+=0x1;while(_0x68fb2d<_0x46b0d0[_0x3bffab(0x17b)]&&/[A-Za-z0-9_]/['test'](_0x46b0d0[_0x68fb2d])){_0x68fb2d+=0x1;}if(_0x46b0d0[_0x3bffab(0x1a8)](_0x2f920c,_0x68fb2d)!==_0x33bfd5)continue;let _0x52514d=_0x2f920c-0x1;while(_0x52514d>=0x0&&/\s/[_0x3bffab(0xb1)](_0x46b0d0[_0x52514d])){_0x52514d-=0x1;}if(_0x46b0d0[_0x52514d]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x2403f1,_0x4398a7,_0x3b0a40){let _0xfb1a5a=_0x4398a7+0x1;while(_0xfb1a5a<_0x2403f1['length']){if(_0x2403f1[_0xfb1a5a]==='\x5c'){_0xfb1a5a+=0x2;continue;}if(_0x2403f1[_0xfb1a5a]===_0x3b0a40)return _0xfb1a5a+0x1;_0xfb1a5a+=0x1;}return _0xfb1a5a;}function resolveEffectiveResultVariable(_0x54c1ab,_0x5656d8){const _0x5f40a3=a282_0x44ca9e;if(_0x54c1ab===undefined||_0x54c1ab===null||_0x5656d8&&_0x54c1ab==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x54c1ab!==_0x5f40a3(0xc7)||!VARIABLE_PATTERN[_0x5f40a3(0xb1)](_0x54c1ab)||RESERVED_RESULT_VARIABLES[_0x5f40a3(0x188)](_0x54c1ab)||_0x54c1ab['startsWith'](_0x5f40a3(0x1f2)))return undefined;return _0x54c1ab;}function registerResultVariableOwner(_0x21ddf1,_0x37bd94,_0x35a1bd,_0x9d2d65){const _0x2d0618=a282_0x44ca9e;if(_0x21ddf1['has'](_0x37bd94)){_0x9d2d65[_0x2d0618(0xdd)]({'path':'flowJson.nodes','message':_0x2d0618(0x1b4)+_0x37bd94+'.'});return;}_0x21ddf1[_0x2d0618(0xf9)](_0x37bd94,_0x35a1bd);}function setsEqual(_0x2f4c2a,_0x37279b){const _0x41b3b6=a282_0x44ca9e;return _0x2f4c2a[_0x41b3b6(0x16f)]===_0x37279b[_0x41b3b6(0x16f)]&&[..._0x2f4c2a][_0x41b3b6(0x17c)](_0x3a5389=>_0x37279b['has'](_0x3a5389));}function isValidUserId(_0x1fa315){const _0x5a735d=a282_0x44ca9e;if(typeof _0x1fa315===_0x5a735d(0xc7))return _0x1fa315[_0x5a735d(0xd2)]()['length']>0x0;return Number[_0x5a735d(0x176)](_0x1fa315)&&Number(_0x1fa315)>0x0;}function a282_0x58dc(_0x2f0180,_0x4dd807){_0x2f0180=_0x2f0180-0x9c;const _0x222247=a282_0x2222();let _0x58dcb3=_0x222247[_0x2f0180];return _0x58dcb3;}function resolveEdgeEndpoint(_0x278376,_0x2d452f){const _0x31afcd=a282_0x44ca9e;if(typeof _0x278376===_0x31afcd(0xc7)&&_0x278376[_0x31afcd(0xd2)]())return _0x278376[_0x31afcd(0xd2)]();if(typeof _0x2d452f===_0x31afcd(0xc7)&&_0x2d452f[_0x31afcd(0xd2)]())return _0x2d452f[_0x31afcd(0xd2)]();return undefined;}function removeEmptyMetadata(_0x4b9398,_0x5cee1c,_0x5ce9a2,_0x4f049e){const _0x3a8832=a282_0x44ca9e;if(Array[_0x3a8832(0x1f7)](_0x4b9398)){_0x4b9398[_0x3a8832(0x181)]((_0x24667a,_0x534136)=>removeEmptyMetadata(_0x24667a,_0x5cee1c+'['+_0x534136+']',_0x5ce9a2,_0x4f049e));return;}if(!isRecord(_0x4b9398))return;for(const [_0x6b5891,_0x3a49a4]of Object[_0x3a8832(0xfb)](_0x4b9398)){const _0x27d985=_0x5cee1c+'.'+_0x6b5891;if(_0x6b5891===_0x3a8832(0x139)&&isEmptyJsonValue(_0x3a49a4)){delete _0x4b9398[_0x6b5891],_0x4f049e['push'](_0x27d985),_0x5ce9a2['push']({'code':_0x3a8832(0x1fa),'path':_0x27d985,'message':_0x27d985+_0x3a8832(0x15a)});continue;}removeEmptyMetadata(_0x3a49a4,_0x27d985,_0x5ce9a2,_0x4f049e);}}function isEmptyJsonValue(_0x5b74c9){const _0x4a764f=a282_0x44ca9e;if(_0x5b74c9===null||_0x5b74c9===undefined)return!![];if(typeof _0x5b74c9===_0x4a764f(0xc7))return _0x5b74c9[_0x4a764f(0xd2)]()==='';if(Array['isArray'](_0x5b74c9))return _0x5b74c9[_0x4a764f(0x17b)]===0x0;return isRecord(_0x5b74c9)&&Object[_0x4a764f(0x169)](_0x5b74c9)['length']===0x0;}function isRecord(_0x64b9a5){return typeof _0x64b9a5==='object'&&_0x64b9a5!==null&&!Array['isArray'](_0x64b9a5);}function cloneJsonValue(_0x8fd739){const _0xd7e738=a282_0x44ca9e;return JSON[_0xd7e738(0x117)](JSON[_0xd7e738(0xac)](_0x8fd739));}export async function readFlowConfigFile(_0x34cc9c){const _0x52b419=a282_0x44ca9e,_0xa77295=await readFile(resolve(_0x34cc9c),_0x52b419(0x16d));return JSON['parse'](_0xa77295);}
@@ -1 +1 @@
1
- const a283_0x21af2d=a283_0xe959;function a283_0x4bb4(){const _0x1525b2=['instant_api_policy_app_code_mismatch','policyFilePath','instant_api_policy_app_code_invalid','instant_api_policy_file_missing','.tmp','454569yLTKGN','byteLength','object','instant_api_policy_json_invalid','4DVQvHz','instant_api_policy_file_exists','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','rules','catch','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','length','trim','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','allow','15666yXYmgu','instant_api_policy_file_invalid','isArray','72170IgsdKg','policyRoot','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_file_unwritable','instant_api_policy_version_invalid','445DqnsRH','defaults','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_file_unreadable','pid','instant_api_policy_defaults_invalid','utf8','Review\x20the\x20file\x20before\x20retrying.','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','480990qBcDWz','instant_api_policy_file_too_large','force','1030683YzekLO','EEXIST','.rabetbase/instant-api-policy','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','code','183176zojCEm','policy.json','instantApi','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','includes','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','appCode','version','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','stringify','2301784JLvbUN','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','ENOENT','18nErAnZ'];a283_0x4bb4=function(){return _0x1525b2;};return a283_0x4bb4();}(function(_0x5c06ed,_0xe9b595){const _0x531431=a283_0xe959,_0x18b9b5=_0x5c06ed();while(!![]){try{const _0x34582d=parseInt(_0x531431(0x1b4))/0x1+parseInt(_0x531431(0x1d4))/0x2+parseInt(_0x531431(0x1d7))/0x3*(-parseInt(_0x531431(0x1b8))/0x4)+-parseInt(_0x531431(0x1cb))/0x5*(-parseInt(_0x531431(0x1c2))/0x6)+-parseInt(_0x531431(0x1dd))/0x7+-parseInt(_0x531431(0x1ab))/0x8+parseInt(_0x531431(0x1ae))/0x9*(-parseInt(_0x531431(0x1c5))/0xa);if(_0x34582d===_0xe9b595)break;else _0x18b9b5['push'](_0x18b9b5['shift']());}catch(_0x444cee){_0x18b9b5['push'](_0x18b9b5['shift']());}}}(a283_0x4bb4,0x3e645));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=a283_0x21af2d(0x1d9);export const INSTANT_API_POLICY_FILE_NAME=a283_0x21af2d(0x1a0);function a283_0xe959(_0x2882f9,_0x285a60){_0x2882f9=_0x2882f9-0x1a0;const _0x4bb418=a283_0x4bb4();let _0xe9596=_0x4bb418[_0x2882f9];return _0xe9596;}export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x10b9da,_0x571e24,_0x578b60){return new CliError(_0x10b9da,0x1,_0x571e24,_0x578b60);}export function loadInstantApiPolicyLocalConfig(_0x5d77a2,_0x3bf5c7){assertSafeAppCode(_0x5d77a2);const _0xacd10f=resolve(_0x3bf5c7??findProjectRootDirectory()),_0x4f1026=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x5d77a2+'/'+INSTANT_API_POLICY_FILE_NAME,_0x36521a=resolve(_0xacd10f,INSTANT_API_POLICY_RELATIVE_ROOT,_0x5d77a2),_0x470f36=resolve(_0x36521a,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0xacd10f,'appCode':_0x5d77a2,'policyRoot':_0x36521a,'policyFilePath':_0x470f36,'policyRelativePath':_0x4f1026};}export function createDefaultInstantApiPolicyConfig(_0x3e983b,_0x371920=a283_0x21af2d(0x1c1)){return assertSafeAppCode(_0x3e983b),{'version':'2','appCode':_0x3e983b,'defaults':{'instantApi':_0x371920},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x130ee6){const _0x2f9547=a283_0x21af2d;let _0x1d8688;try{_0x1d8688=await stat(_0x130ee6[_0x2f9547(0x1b0)]);}catch(_0x58b064){throw instantApiPolicyError(_0x2f9547(0x1b2),_0x2f9547(0x1a3)+_0x130ee6[_0x2f9547(0x1b0)],_0x2f9547(0x1a5));}if(!_0x1d8688['isFile']())throw instantApiPolicyError(_0x2f9547(0x1c3),_0x2f9547(0x1db)+_0x130ee6[_0x2f9547(0x1b0)]);if(_0x1d8688['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x2f9547(0x1d5),_0x2f9547(0x1c0));let _0x28e6ac;try{_0x28e6ac=await readFile(_0x130ee6['policyFilePath']);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x2f9547(0x1a8)+_0x130ee6[_0x2f9547(0x1b0)]);}if(_0x28e6ac[_0x2f9547(0x1b5)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x2f9547(0x1c0));let _0x4ea3b4;try{_0x4ea3b4=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x28e6ac);}catch{throw instantApiPolicyError('instant_api_policy_file_invalid',_0x2f9547(0x1d3)+_0x130ee6['policyFilePath']);}let _0x191417;try{_0x191417=JSON['parse'](_0x4ea3b4);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x2f9547(0x1da)+_0x130ee6['policyFilePath']);}return assertLocalPolicyContract(_0x191417,_0x130ee6[_0x2f9547(0x1a6)]);}export async function writeInstantApiPolicyConfigFile(_0x1268d1,_0x223622,_0xf5bfe4={}){const _0x56f494=a283_0x21af2d,_0x358a93=assertLocalPolicyContract(_0x223622,_0x1268d1['appCode']),_0xa8e02=JSON[_0x56f494(0x1aa)](_0x358a93,null,0x2)+'\x0a';if(Buffer['byteLength'](_0xa8e02,_0x56f494(0x1d1))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x56f494(0x1d5),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x1268d1[_0x56f494(0x1c6)],{'recursive':!![]});let _0x352627;try{_0x352627=await readFile(_0x1268d1[_0x56f494(0x1b0)],'utf8');}catch(_0x421406){if(!isMissingFile(_0x421406))throw instantApiPolicyError(_0x56f494(0x1ce),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x1268d1['policyFilePath']);}if(_0x352627===_0xa8e02)return{'action':'unchanged','filePath':_0x1268d1[_0x56f494(0x1b0)]};if(_0x352627!==undefined&&!_0xf5bfe4[_0x56f494(0x1d6)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x56f494(0x1cd)+_0x1268d1[_0x56f494(0x1b0)],_0x56f494(0x1a9));if(_0x352627===undefined)try{return await writeFile(_0x1268d1[_0x56f494(0x1b0)],_0xa8e02,{'encoding':_0x56f494(0x1d1),'flag':'wx'}),{'action':'created','filePath':_0x1268d1['policyFilePath']};}catch(_0x4e0011){if(!isAlreadyExists(_0x4e0011))throw instantApiPolicyError(_0x56f494(0x1c9),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x1268d1['policyFilePath']);if(!_0xf5bfe4[_0x56f494(0x1d6)])throw instantApiPolicyError(_0x56f494(0x1b9),_0x56f494(0x1c7)+_0x1268d1[_0x56f494(0x1b0)],_0x56f494(0x1d2));}const _0x298fec=resolve(dirname(_0x1268d1['policyFilePath']),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x56f494(0x1cf)]+'.'+randomUUID()+_0x56f494(0x1b3));try{await writeFile(_0x298fec,_0xa8e02,{'encoding':_0x56f494(0x1d1),'flag':'wx'}),await rename(_0x298fec,_0x1268d1['policyFilePath']);}catch{await unlink(_0x298fec)[_0x56f494(0x1bc)](()=>undefined);throw instantApiPolicyError(_0x56f494(0x1c9),_0x56f494(0x1a2)+_0x1268d1['policyFilePath']);}return{'action':'overwritten','filePath':_0x1268d1[_0x56f494(0x1b0)]};}function assertSafeAppCode(_0x3477ed){const _0xa7084e=a283_0x21af2d,_0x5cf81b=_0x3477ed[_0xa7084e(0x1bf)]();if(!_0x5cf81b||_0x5cf81b!==_0x3477ed||_0x5cf81b[_0xa7084e(0x1be)]>0x64||_0x5cf81b==='.'||_0x5cf81b==='..'||_0x5cf81b[_0xa7084e(0x1a4)]('/')||_0x5cf81b[_0xa7084e(0x1a4)]('\x5c')||_0x5cf81b[_0xa7084e(0x1a4)]('\x00'))throw instantApiPolicyError(_0xa7084e(0x1b1),_0xa7084e(0x1ba));}function assertLocalPolicyContract(_0x9ef1e2,_0x27d8e9){const _0x3a33c5=a283_0x21af2d;if(!isObject(_0x9ef1e2))throw instantApiPolicyError(_0x3a33c5(0x1b7),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x9ef1e2['version']!=='1'&&_0x9ef1e2[_0x3a33c5(0x1a7)]!=='2')throw instantApiPolicyError(_0x3a33c5(0x1ca),_0x3a33c5(0x1bd),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x9ef1e2[_0x3a33c5(0x1a6)]!==_0x27d8e9)throw instantApiPolicyError(_0x3a33c5(0x1af),_0x3a33c5(0x1c8)+_0x27d8e9+'.');if(!isObject(_0x9ef1e2[_0x3a33c5(0x1cc)])||typeof _0x9ef1e2[_0x3a33c5(0x1cc)][_0x3a33c5(0x1a1)]!=='string')throw instantApiPolicyError(_0x3a33c5(0x1d0),'Policy\x20defaults.instantApi\x20is\x20required.');if(_0x9ef1e2[_0x3a33c5(0x1bb)]!==undefined&&_0x9ef1e2[_0x3a33c5(0x1bb)]!==null&&!Array[_0x3a33c5(0x1c4)](_0x9ef1e2[_0x3a33c5(0x1bb)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x3a33c5(0x1ac));return _0x9ef1e2;}function isObject(_0x3ef4e8){const _0x2ac13b=a283_0x21af2d;return _0x3ef4e8!==null&&typeof _0x3ef4e8===_0x2ac13b(0x1b6)&&!Array['isArray'](_0x3ef4e8);}function isMissingFile(_0x34871f){const _0x5e297c=a283_0x21af2d;return Boolean(_0x34871f&&typeof _0x34871f===_0x5e297c(0x1b6)&&_0x34871f['code']===_0x5e297c(0x1ad));}function isAlreadyExists(_0x575c81){const _0x5bed22=a283_0x21af2d;return Boolean(_0x575c81&&typeof _0x575c81===_0x5bed22(0x1b6)&&_0x575c81[_0x5bed22(0x1dc)]===_0x5bed22(0x1d8));}
1
+ const a283_0x44e1f6=a283_0xba14;(function(_0x306a11,_0xb8c1cc){const _0x31b4fd=a283_0xba14,_0x103fed=_0x306a11();while(!![]){try{const _0x284456=parseInt(_0x31b4fd(0x1d3))/0x1+-parseInt(_0x31b4fd(0x1ce))/0x2*(-parseInt(_0x31b4fd(0x1e1))/0x3)+-parseInt(_0x31b4fd(0x1ec))/0x4+parseInt(_0x31b4fd(0x1e8))/0x5+-parseInt(_0x31b4fd(0x1c7))/0x6+parseInt(_0x31b4fd(0x1d5))/0x7+-parseInt(_0x31b4fd(0x1c1))/0x8;if(_0x284456===_0xb8c1cc)break;else _0x103fed['push'](_0x103fed['shift']());}catch(_0x5c3bd8){_0x103fed['push'](_0x103fed['shift']());}}}(a283_0x42fe,0x5ec7f));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 a283_0xba14(_0x333d36,_0x378a4c){_0x333d36=_0x333d36-0x1bf;const _0x42fec9=a283_0x42fe();let _0xba1426=_0x42fec9[_0x333d36];return _0xba1426;}import{findProjectRootDirectory}from'../../context.js';function a283_0x42fe(){const _0x429a07=['includes','byteLength','appCode','force','size','instant_api_policy_version_invalid','1257573vFozdK','instant_api_policy_defaults_invalid','instant_api_policy_file_too_large','Policy\x20defaults.instantApi\x20is\x20required.','stringify','code','instant_api_policy_app_code_mismatch','104190KkbTSV','instant_api_policy_rules_invalid','allow','instant_api_policy_file_exists','2857548JsUQeo','Review\x20the\x20file\x20before\x20retrying.','ENOENT','policy.json','isFile','version','.rabetbase/instant-api-policy','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','instant_api_policy_file_unreadable','rules','overwritten','utf-8','isArray','pid','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','defaults','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','policyRoot','string','848296bnATxc','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_app_code_invalid','decode','769386zsEMMQ','instant_api_policy_file_unwritable','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','trim','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','2zvBwiN','instant_api_policy_file_invalid','unchanged','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instantApi','251823YrdPFb','policyFilePath','4515182dJoqwG','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','utf8','instant_api_policy_json_invalid','object','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.'];a283_0x42fe=function(){return _0x429a07;};return a283_0x42fe();}import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a283_0x44e1f6(0x1f2);export const INSTANT_API_POLICY_FILE_NAME=a283_0x44e1f6(0x1ef);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x14faa5,_0x144b60,_0x35193d){return new CliError(_0x14faa5,0x1,_0x144b60,_0x35193d);}export function loadInstantApiPolicyLocalConfig(_0x4ddd0b,_0x123d7b){assertSafeAppCode(_0x4ddd0b);const _0x12ba1a=resolve(_0x123d7b??findProjectRootDirectory()),_0xe57e65=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x4ddd0b+'/'+INSTANT_API_POLICY_FILE_NAME,_0x33ba28=resolve(_0x12ba1a,INSTANT_API_POLICY_RELATIVE_ROOT,_0x4ddd0b),_0xbf7be0=resolve(_0x33ba28,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x12ba1a,'appCode':_0x4ddd0b,'policyRoot':_0x33ba28,'policyFilePath':_0xbf7be0,'policyRelativePath':_0xe57e65};}export function createDefaultInstantApiPolicyConfig(_0x310c8f,_0x164dcc=a283_0x44e1f6(0x1ea)){return assertSafeAppCode(_0x310c8f),{'version':'2','appCode':_0x310c8f,'defaults':{'instantApi':_0x164dcc},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x4a9105){const _0x2aa2de=a283_0x44e1f6;let _0x3e5208;try{_0x3e5208=await stat(_0x4a9105[_0x2aa2de(0x1d4)]);}catch(_0x3962a9){throw instantApiPolicyError('instant_api_policy_file_missing',_0x2aa2de(0x1fb)+_0x4a9105['policyFilePath'],_0x2aa2de(0x1cb));}if(!_0x3e5208[_0x2aa2de(0x1f0)]())throw instantApiPolicyError(_0x2aa2de(0x1cf),_0x2aa2de(0x1f3)+_0x4a9105[_0x2aa2de(0x1d4)]);if(_0x3e5208[_0x2aa2de(0x1df)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x2aa2de(0x1e3),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0xc50e96;try{_0xc50e96=await readFile(_0x4a9105[_0x2aa2de(0x1d4)]);}catch{throw instantApiPolicyError(_0x2aa2de(0x1f4),'Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0x4a9105[_0x2aa2de(0x1d4)]);}if(_0xc50e96[_0x2aa2de(0x1dc)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x2aa2de(0x1e3),_0x2aa2de(0x1c9));let _0x5d6e67;try{_0x5d6e67=new TextDecoder(_0x2aa2de(0x1f7),{'fatal':!![],'ignoreBOM':!![]})[_0x2aa2de(0x1c6)](_0xc50e96);}catch{throw instantApiPolicyError(_0x2aa2de(0x1cf),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x4a9105[_0x2aa2de(0x1d4)]);}let _0x2485a5;try{_0x2485a5=JSON['parse'](_0x5d6e67);}catch{throw instantApiPolicyError(_0x2aa2de(0x1d8),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x4a9105[_0x2aa2de(0x1d4)]);}return assertLocalPolicyContract(_0x2485a5,_0x4a9105[_0x2aa2de(0x1dd)]);}export async function writeInstantApiPolicyConfigFile(_0x582136,_0x1eb6dc,_0x2841bf={}){const _0x40cee5=a283_0x44e1f6,_0x5e85a3=assertLocalPolicyContract(_0x1eb6dc,_0x582136[_0x40cee5(0x1dd)]),_0x236b31=JSON[_0x40cee5(0x1e5)](_0x5e85a3,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x236b31,_0x40cee5(0x1d7))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x40cee5(0x1e3),_0x40cee5(0x1c9));await mkdir(_0x582136[_0x40cee5(0x1bf)],{'recursive':!![]});let _0x36faf6;try{_0x36faf6=await readFile(_0x582136[_0x40cee5(0x1d4)],'utf8');}catch(_0x33a383){if(!isMissingFile(_0x33a383))throw instantApiPolicyError(_0x40cee5(0x1f4),_0x40cee5(0x1fa)+_0x582136[_0x40cee5(0x1d4)]);}if(_0x36faf6===_0x236b31)return{'action':_0x40cee5(0x1d0),'filePath':_0x582136[_0x40cee5(0x1d4)]};if(_0x36faf6!==undefined&&!_0x2841bf[_0x40cee5(0x1de)])throw instantApiPolicyError(_0x40cee5(0x1eb),_0x40cee5(0x1ca)+_0x582136[_0x40cee5(0x1d4)],_0x40cee5(0x1cd));if(_0x36faf6===undefined)try{return await writeFile(_0x582136[_0x40cee5(0x1d4)],_0x236b31,{'encoding':_0x40cee5(0x1d7),'flag':'wx'}),{'action':'created','filePath':_0x582136[_0x40cee5(0x1d4)]};}catch(_0x5ba401){if(!isAlreadyExists(_0x5ba401))throw instantApiPolicyError(_0x40cee5(0x1c8),_0x40cee5(0x1fe)+_0x582136[_0x40cee5(0x1d4)]);if(!_0x2841bf[_0x40cee5(0x1de)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x40cee5(0x1c2)+_0x582136[_0x40cee5(0x1d4)],_0x40cee5(0x1ed));}const _0x56bfe8=resolve(dirname(_0x582136[_0x40cee5(0x1d4)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x40cee5(0x1f9)]+'.'+randomUUID()+'.tmp');try{await writeFile(_0x56bfe8,_0x236b31,{'encoding':_0x40cee5(0x1d7),'flag':'wx'}),await rename(_0x56bfe8,_0x582136[_0x40cee5(0x1d4)]);}catch{await unlink(_0x56bfe8)['catch'](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x40cee5(0x1c3)+_0x582136[_0x40cee5(0x1d4)]);}return{'action':_0x40cee5(0x1f6),'filePath':_0x582136[_0x40cee5(0x1d4)]};}function assertSafeAppCode(_0x4b2d10){const _0x3a6299=a283_0x44e1f6,_0x4053c3=_0x4b2d10[_0x3a6299(0x1cc)]();if(!_0x4053c3||_0x4053c3!==_0x4b2d10||_0x4053c3['length']>0x64||_0x4053c3==='.'||_0x4053c3==='..'||_0x4053c3['includes']('/')||_0x4053c3[_0x3a6299(0x1db)]('\x5c')||_0x4053c3['includes']('\x00'))throw instantApiPolicyError(_0x3a6299(0x1c5),_0x3a6299(0x1fd));}function assertLocalPolicyContract(_0xf6cd61,_0x137f33){const _0x2e5d4e=a283_0x44e1f6;if(!isObject(_0xf6cd61))throw instantApiPolicyError(_0x2e5d4e(0x1d8),_0x2e5d4e(0x1d1));if(_0xf6cd61['version']!=='1'&&_0xf6cd61[_0x2e5d4e(0x1f1)]!=='2')throw instantApiPolicyError(_0x2e5d4e(0x1e0),_0x2e5d4e(0x1d6),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0xf6cd61[_0x2e5d4e(0x1dd)]!==_0x137f33)throw instantApiPolicyError(_0x2e5d4e(0x1e7),_0x2e5d4e(0x1c4)+_0x137f33+'.');if(!isObject(_0xf6cd61[_0x2e5d4e(0x1fc)])||typeof _0xf6cd61['defaults'][_0x2e5d4e(0x1d2)]!==_0x2e5d4e(0x1c0))throw instantApiPolicyError(_0x2e5d4e(0x1e2),_0x2e5d4e(0x1e4));if(_0xf6cd61['rules']!==undefined&&_0xf6cd61['rules']!==null&&!Array[_0x2e5d4e(0x1f8)](_0xf6cd61[_0x2e5d4e(0x1f5)]))throw instantApiPolicyError(_0x2e5d4e(0x1e9),_0x2e5d4e(0x1da));return _0xf6cd61;}function isObject(_0x2c7e98){const _0x44cb9e=a283_0x44e1f6;return _0x2c7e98!==null&&typeof _0x2c7e98==='object'&&!Array[_0x44cb9e(0x1f8)](_0x2c7e98);}function isMissingFile(_0x570746){const _0x1f200f=a283_0x44e1f6;return Boolean(_0x570746&&typeof _0x570746===_0x1f200f(0x1d9)&&_0x570746[_0x1f200f(0x1e6)]===_0x1f200f(0x1ee));}function isAlreadyExists(_0xcd92ef){const _0x254f9d=a283_0x44e1f6;return Boolean(_0xcd92ef&&typeof _0xcd92ef===_0x254f9d(0x1d9)&&_0xcd92ef[_0x254f9d(0x1e6)]==='EEXIST');}
@@ -1 +1 @@
1
- const a284_0x14a355=a284_0x338d;(function(_0x4eed81,_0x126f67){const _0xfdd0db=a284_0x338d,_0x3e0597=_0x4eed81();while(!![]){try{const _0x2643aa=parseInt(_0xfdd0db(0x158))/0x1*(-parseInt(_0xfdd0db(0x16c))/0x2)+parseInt(_0xfdd0db(0x18b))/0x3+parseInt(_0xfdd0db(0x14c))/0x4+parseInt(_0xfdd0db(0x163))/0x5+-parseInt(_0xfdd0db(0x194))/0x6*(-parseInt(_0xfdd0db(0x17c))/0x7)+-parseInt(_0xfdd0db(0x159))/0x8+-parseInt(_0xfdd0db(0x14e))/0x9*(-parseInt(_0xfdd0db(0x18f))/0xa);if(_0x2643aa===_0x126f67)break;else _0x3e0597['push'](_0x3e0597['shift']());}catch(_0xf3c66e){_0x3e0597['push'](_0x3e0597['shift']());}}}(a284_0x3bdf,0x56712));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a284_0x14a355(0x197),a284_0x14a355(0x16b),a284_0x14a355(0x15e),a284_0x14a355(0x190),a284_0x14a355(0x19b),a284_0x14a355(0x18d)],HIT_KEYS=[a284_0x14a355(0x145),a284_0x14a355(0x18c),a284_0x14a355(0x184),a284_0x14a355(0x18a),a284_0x14a355(0x164),a284_0x14a355(0x189),a284_0x14a355(0x161),a284_0x14a355(0x154),'rawScore',a284_0x14a355(0x17d),a284_0x14a355(0x17e)];export function normalizeKbServiceOrigin(_0x2ab3e9){const _0x2573ba=a284_0x14a355,_0x565f77=()=>CliErrors[_0x2573ba(0x153)](_0x2573ba(0x176)),_0x31ac8e=_0x2ab3e9?.[_0x2573ba(0x14f)]();if(!_0x31ac8e||/[\u0000-\u0020\u007f]/[_0x2573ba(0x193)](_0x31ac8e)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x2573ba(0x193)](_0x31ac8e))throw _0x565f77();let _0x4c6c7e;try{_0x4c6c7e=new URL(_0x31ac8e);}catch{throw _0x565f77();}if(_0x4c6c7e[_0x2573ba(0x192)]!==_0x2573ba(0x178)||!_0x4c6c7e[_0x2573ba(0x172)]||_0x4c6c7e[_0x2573ba(0x18e)]||_0x4c6c7e[_0x2573ba(0x173)]||_0x4c6c7e[_0x2573ba(0x170)]!=='/'||_0x4c6c7e[_0x2573ba(0x19c)]||_0x4c6c7e[_0x2573ba(0x182)])throw _0x565f77();return _0x4c6c7e[_0x2573ba(0x15c)];}export async function searchDirectKnowledge(_0x1638a2){const _0x22bfc8=a284_0x14a355,_0x24044c=_0x1638a2[_0x22bfc8(0x15d)]['trim'](),_0x3ab6c5=_0x1638a2[_0x22bfc8(0x14b)][_0x22bfc8(0x14f)]();if(!_0x24044c)throw CliErrors[_0x22bfc8(0x153)](_0x22bfc8(0x17b));if(!_0x1638a2[_0x22bfc8(0x14a)][_0x22bfc8(0x14f)]())throw CliErrors[_0x22bfc8(0x162)]();if(!_0x3ab6c5)throw CliErrors[_0x22bfc8(0x153)](_0x22bfc8(0x171));validateTopK(_0x1638a2['topK']);const _0x565980=normalizeKbServiceOrigin(_0x1638a2[_0x22bfc8(0x169)]),_0x34e0b6=AbortSignal[_0x22bfc8(0x148)](0xea60),_0x2751ea=_0x1638a2[_0x22bfc8(0x147)]?AbortSignal['any']([_0x1638a2[_0x22bfc8(0x147)],_0x34e0b6]):_0x34e0b6;let _0x597a27;try{_0x597a27=await fetch(_0x565980+_0x22bfc8(0x181)+encodeURIComponent(_0x24044c)+'/knowledge/search',{'method':_0x22bfc8(0x160),'redirect':'error','headers':{'Content-Type':'application/json','Cookie':_0x1638a2[_0x22bfc8(0x14a)],'X-Invoke-Source':_0x22bfc8(0x174)},'body':JSON[_0x22bfc8(0x188)]({'query':_0x3ab6c5,..._0x1638a2['topK']!==undefined?{'topK':_0x1638a2[_0x22bfc8(0x157)]}:{}}),'signal':_0x2751ea});}catch(_0x4d44af){if(_0x1638a2[_0x22bfc8(0x147)]?.[_0x22bfc8(0x14d)])throw new DOMException(_0x22bfc8(0x191),_0x22bfc8(0x151));if(_0x4d44af instanceof Error&&_0x4d44af['name']==='TimeoutError')throw CliErrors['networkError'](_0x22bfc8(0x15b));throw CliErrors['networkError']('KB\x20Service\x20knowledge\x20search\x20request\x20failed.');}if(_0x597a27[_0x22bfc8(0x180)]===0x191)throw CliErrors['authRequired']();if(_0x597a27['status']===0x1ad)throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x597a27['ok'])throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'+_0x597a27['status']+').');if(!hasNoStore(_0x597a27['headers']))throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x597a27[_0x22bfc8(0x19a)][_0x22bfc8(0x16a)](_0x22bfc8(0x199))??'')[_0x22bfc8(0x156)]()[_0x22bfc8(0x19e)](_0x22bfc8(0x168)))throw CliErrors['apiError'](_0x22bfc8(0x187));let _0x3328a3;try{_0x3328a3=await _0x597a27[_0x22bfc8(0x155)]();}catch(_0x3b0587){if(_0x1638a2[_0x22bfc8(0x147)]?.[_0x22bfc8(0x14d)])throw new DOMException(_0x22bfc8(0x191),_0x22bfc8(0x151));if(_0x34e0b6[_0x22bfc8(0x14d)]||_0x3b0587 instanceof Error&&_0x3b0587['name']===_0x22bfc8(0x152))throw CliErrors[_0x22bfc8(0x198)](_0x22bfc8(0x15b));throw CliErrors['apiError'](_0x22bfc8(0x16e));}try{const _0x3fbff3=requireExactRecord(_0x3328a3,[_0x22bfc8(0x190),_0x22bfc8(0x19b),_0x22bfc8(0x18d)],'response');if(!Array['isArray'](_0x3fbff3[_0x22bfc8(0x190)]))throw invalidContract(_0x22bfc8(0x190));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x22bfc8(0x167),'total':_0x3fbff3[_0x22bfc8(0x190)]['length'],'hits':_0x3fbff3[_0x22bfc8(0x190)],'strategyFingerprint':_0x3fbff3[_0x22bfc8(0x19b)],'timingsMs':_0x3fbff3['timingsMs']},_0x1638a2[_0x22bfc8(0x157)]??0xa);}catch(_0x5e5748){if(_0x5e5748 instanceof CliError)throw CliErrors[_0x22bfc8(0x17f)](_0x22bfc8(0x149));throw _0x5e5748;}}function validateTopK(_0x1a06b0){const _0x5e5270=a284_0x14a355;if(_0x1a06b0!==undefined&&(!Number[_0x5e5270(0x195)](_0x1a06b0)||_0x1a06b0<0x1||_0x1a06b0>0x32))throw CliErrors[_0x5e5270(0x153)]('Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');}function a284_0x338d(_0x1930ef,_0x3f70c8){_0x1930ef=_0x1930ef-0x145;const _0x3bdffc=a284_0x3bdf();let _0x338d63=_0x3bdffc[_0x1930ef];return _0x338d63;}function hasNoStore(_0x5ad713){const _0x4a54f6=a284_0x14a355;return(_0x5ad713[_0x4a54f6(0x16a)](_0x4a54f6(0x16f))??'')[_0x4a54f6(0x15f)](',')[_0x4a54f6(0x186)](_0xd0825a=>_0xd0825a[_0x4a54f6(0x14f)]()[_0x4a54f6(0x156)]()==='no-store');}function parseDevelopmentSearchResponse(_0x2c4f52,_0x37598c){const _0xbbd0e6=a284_0x14a355,_0x2da629=requireExactRecord(_0x2c4f52,RESPONSE_KEYS,_0xbbd0e6(0x17a));if(_0x2da629['schemaVersion']!==0x2||_0x2da629[_0xbbd0e6(0x16b)]!==_0xbbd0e6(0x167))throw invalidContract('profile');if(!Array[_0xbbd0e6(0x16d)](_0x2da629[_0xbbd0e6(0x190)])||_0x2da629[_0xbbd0e6(0x190)][_0xbbd0e6(0x165)]>(_0x37598c??0x32))throw invalidContract(_0xbbd0e6(0x190));if(typeof _0x2da629[_0xbbd0e6(0x19b)]!==_0xbbd0e6(0x185)||!/^sha256:[0-9a-f]{64}$/['test'](_0x2da629[_0xbbd0e6(0x19b)]))throw invalidContract(_0xbbd0e6(0x19b));const _0x1622b2=requireRecord(_0x2da629[_0xbbd0e6(0x18d)],'timingsMs'),_0x4eefdd={};for(const [_0x4ae7df,_0x17bebb]of Object['entries'](_0x1622b2)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xbbd0e6(0x193)](_0x4ae7df)||typeof _0x17bebb!==_0xbbd0e6(0x177)||!Number['isFinite'](_0x17bebb)||_0x17bebb<0x0)throw invalidContract(_0xbbd0e6(0x18d));_0x4eefdd[_0x4ae7df]=_0x17bebb;}const _0xfd002c=_0x2da629[_0xbbd0e6(0x190)]['map']((_0xfbb4f4,_0x571076)=>parseHit(_0xfbb4f4,_0x571076));if(!Number[_0xbbd0e6(0x195)](_0x2da629[_0xbbd0e6(0x15e)])||_0x2da629['total']!==_0xfd002c[_0xbbd0e6(0x165)])throw invalidContract(_0xbbd0e6(0x15e));return{'schemaVersion':_0x2da629[_0xbbd0e6(0x197)],'profile':_0x2da629[_0xbbd0e6(0x16b)],'total':_0x2da629[_0xbbd0e6(0x15e)],'strategyFingerprint':_0x2da629[_0xbbd0e6(0x19b)],'timingsMs':_0x4eefdd,'hits':_0xfd002c};}function parseHit(_0x34434d,_0x213286){const _0x54c29c=a284_0x14a355,_0x4e939b=requireExactRecord(_0x34434d,HIT_KEYS,'hits['+_0x213286+']'),_0x450c3d=_0x3c2f5d=>{const _0x3616ac=a284_0x338d,_0xb93a6a=_0x4e939b[_0x3c2f5d];if(typeof _0xb93a6a!==_0x3616ac(0x185)||!_0xb93a6a)throw invalidContract(_0x3c2f5d);return _0xb93a6a;};if(!Number[_0x54c29c(0x195)](_0x4e939b['revision'])||_0x4e939b[_0x54c29c(0x18c)]<0x1)throw invalidContract(_0x54c29c(0x18c));if(_0x4e939b[_0x54c29c(0x18a)]!==_0x54c29c(0x196)&&_0x4e939b[_0x54c29c(0x18a)]!==_0x54c29c(0x183))throw invalidContract(_0x54c29c(0x18a));if(typeof _0x4e939b[_0x54c29c(0x164)]!==_0x54c29c(0x185)||typeof _0x4e939b[_0x54c29c(0x189)]!==_0x54c29c(0x185))throw invalidContract(_0x54c29c(0x189));if(!Array['isArray'](_0x4e939b[_0x54c29c(0x161)])||_0x4e939b[_0x54c29c(0x161)][_0x54c29c(0x186)](_0x48f18a=>typeof _0x48f18a!=='string'))throw invalidContract(_0x54c29c(0x161));if(!Number[_0x54c29c(0x195)](_0x4e939b[_0x54c29c(0x154)])||_0x4e939b[_0x54c29c(0x154)]!==_0x213286+0x1)throw invalidContract(_0x54c29c(0x154));if(!isFiniteNumber(_0x4e939b['rawScore'])||!isFiniteNumber(_0x4e939b[_0x54c29c(0x17d)]))throw invalidContract(_0x54c29c(0x166));return{'documentId':_0x450c3d(_0x54c29c(0x145)),'revision':_0x4e939b[_0x54c29c(0x18c)],'chunkId':_0x450c3d(_0x54c29c(0x184)),'scope':_0x4e939b[_0x54c29c(0x18a)],'title':_0x4e939b['title'],'text':_0x4e939b[_0x54c29c(0x189)],'tags':[..._0x4e939b[_0x54c29c(0x161)]],'rank':_0x4e939b[_0x54c29c(0x154)],'rawScore':_0x4e939b['rawScore'],'finalScore':_0x4e939b[_0x54c29c(0x17d)],'scoreKind':_0x450c3d(_0x54c29c(0x17e))};}function requireExactRecord(_0x59a549,_0x40614d,_0x2c5c88){const _0x2f1205=a284_0x14a355,_0x25473d=requireRecord(_0x59a549,_0x2c5c88),_0x6ca0a3=Object[_0x2f1205(0x15a)](_0x25473d)[_0x2f1205(0x175)](),_0x101c31=[..._0x40614d][_0x2f1205(0x175)]();if(_0x6ca0a3['length']!==_0x101c31[_0x2f1205(0x165)]||_0x6ca0a3[_0x2f1205(0x186)]((_0xa6ff0e,_0x57e9b9)=>_0xa6ff0e!==_0x101c31[_0x57e9b9]))throw invalidContract(_0x2c5c88);return _0x25473d;}function a284_0x3bdf(){const _0x32fb75=['username','30gVcFXA','hits','Knowledge\x20search\x20cancelled.','protocol','test','6hoTFWT','isSafeInteger','public','schemaVersion','networkError','content-type','headers','strategyFingerprint','search','\x20contract.','includes','documentId','object','signal','timeout','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','cookie','query','1285068mlvOeg','aborted','224244HclZUM','trim','isFinite','AbortError','TimeoutError','validation','rank','json','toLowerCase','topK','65383sudCfH','2764520ZfauYG','keys','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','origin','appCode','total','split','POST','tags','authRequired','1766175kenspX','title','length','score','development','application/json','serviceUrl','get','profile','8LeIYCb','isArray','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','cache-control','pathname','Knowledge\x20search\x20query\x20is\x20required.','hostname','password','cli:rabetbase','sort','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','number','https:','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','response','Knowledge\x20search\x20appCode\x20is\x20required.','1440782YHbcIj','finalScore','scoreKind','apiError','status','/v2/development/apps/','hash','company','chunkId','string','some','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','stringify','text','scope','18261EZKZXI','revision','timingsMs'];a284_0x3bdf=function(){return _0x32fb75;};return a284_0x3bdf();}function requireRecord(_0x3f39c8,_0x126e7d){const _0x3e5a69=a284_0x14a355;if(!_0x3f39c8||typeof _0x3f39c8!==_0x3e5a69(0x146)||Array[_0x3e5a69(0x16d)](_0x3f39c8))throw invalidContract(_0x126e7d);return _0x3f39c8;}function isFiniteNumber(_0x599285){const _0x4f45c3=a284_0x14a355;return typeof _0x599285==='number'&&Number[_0x4f45c3(0x150)](_0x599285);}function invalidContract(_0x5ec168){const _0x11f1e7=a284_0x14a355;return CliErrors[_0x11f1e7(0x17f)](_0x11f1e7(0x179)+_0x5ec168+_0x11f1e7(0x19d));}
1
+ const a284_0x9d2c59=a284_0x3a85;(function(_0x569b3c,_0x5c1cd5){const _0x250843=a284_0x3a85,_0x1a2334=_0x569b3c();while(!![]){try{const _0x3b26b3=-parseInt(_0x250843(0xf1))/0x1*(parseInt(_0x250843(0xc5))/0x2)+parseInt(_0x250843(0xc7))/0x3*(-parseInt(_0x250843(0xb3))/0x4)+parseInt(_0x250843(0xfb))/0x5+-parseInt(_0x250843(0xc0))/0x6*(-parseInt(_0x250843(0xed))/0x7)+parseInt(_0x250843(0xc9))/0x8*(parseInt(_0x250843(0xf6))/0x9)+-parseInt(_0x250843(0xa7))/0xa*(-parseInt(_0x250843(0xa3))/0xb)+parseInt(_0x250843(0xda))/0xc*(-parseInt(_0x250843(0xd2))/0xd);if(_0x3b26b3===_0x5c1cd5)break;else _0x1a2334['push'](_0x1a2334['shift']());}catch(_0x37f61e){_0x1a2334['push'](_0x1a2334['shift']());}}}(a284_0x3fec,0x67768));function a284_0x3a85(_0x481708,_0x44d3da){_0x481708=_0x481708-0xa3;const _0x3fec19=a284_0x3fec();let _0x3a85b5=_0x3fec19[_0x481708];return _0x3a85b5;}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a284_0x9d2c59(0xb7),'profile',a284_0x9d2c59(0xc1),a284_0x9d2c59(0xf2),a284_0x9d2c59(0xfc),'timingsMs'],HIT_KEYS=[a284_0x9d2c59(0xc3),a284_0x9d2c59(0xb8),a284_0x9d2c59(0xc4),'scope',a284_0x9d2c59(0xe1),a284_0x9d2c59(0xcf),a284_0x9d2c59(0xd7),a284_0x9d2c59(0xb9),a284_0x9d2c59(0xab),'finalScore',a284_0x9d2c59(0xe5)];export function normalizeKbServiceOrigin(_0x39a02e){const _0x2165c1=a284_0x9d2c59,_0x4f9457=()=>CliErrors[_0x2165c1(0xd1)](_0x2165c1(0xdb)),_0x196110=_0x39a02e?.[_0x2165c1(0xd0)]();if(!_0x196110||/[\u0000-\u0020\u007f]/[_0x2165c1(0xfe)](_0x196110)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x2165c1(0xfe)](_0x196110))throw _0x4f9457();let _0x430a78;try{_0x430a78=new URL(_0x196110);}catch{throw _0x4f9457();}if(_0x430a78['protocol']!==_0x2165c1(0xd8)||!_0x430a78['hostname']||_0x430a78[_0x2165c1(0xdc)]||_0x430a78['password']||_0x430a78[_0x2165c1(0xe8)]!=='/'||_0x430a78[_0x2165c1(0xae)]||_0x430a78[_0x2165c1(0xdf)])throw _0x4f9457();return _0x430a78[_0x2165c1(0xea)];}export async function searchDirectKnowledge(_0x3bab89){const _0x56a339=a284_0x9d2c59,_0x2a82ac=_0x3bab89[_0x56a339(0xb1)][_0x56a339(0xd0)](),_0x471497=_0x3bab89[_0x56a339(0xf4)]['trim']();if(!_0x2a82ac)throw CliErrors[_0x56a339(0xd1)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0x3bab89[_0x56a339(0xe6)]['trim']())throw CliErrors[_0x56a339(0xf9)]();if(!_0x471497)throw CliErrors['validation'](_0x56a339(0xc8));validateTopK(_0x3bab89['topK']);const _0x3a652a=normalizeKbServiceOrigin(_0x3bab89[_0x56a339(0xce)]),_0x2977bb=AbortSignal[_0x56a339(0xac)](0xea60),_0x487092=_0x3bab89['signal']?AbortSignal[_0x56a339(0xe3)]([_0x3bab89[_0x56a339(0xb2)],_0x2977bb]):_0x2977bb;let _0xd49c0c;try{_0xd49c0c=await fetch(_0x3a652a+_0x56a339(0xbd)+encodeURIComponent(_0x2a82ac)+_0x56a339(0xfd),{'method':'POST','redirect':_0x56a339(0xf8),'headers':{'Content-Type':_0x56a339(0xf7),'Cookie':_0x3bab89[_0x56a339(0xe6)],'X-Invoke-Source':_0x56a339(0xeb)},'body':JSON[_0x56a339(0xbe)]({'query':_0x471497,..._0x3bab89[_0x56a339(0xcb)]!==undefined?{'topK':_0x3bab89[_0x56a339(0xcb)]}:{}}),'signal':_0x487092});}catch(_0x4bfa46){if(_0x3bab89[_0x56a339(0xb2)]?.[_0x56a339(0xa8)])throw new DOMException(_0x56a339(0xec),_0x56a339(0xd5));if(_0x4bfa46 instanceof Error&&_0x4bfa46[_0x56a339(0xbb)]===_0x56a339(0xf3))throw CliErrors[_0x56a339(0xef)](_0x56a339(0xaa));throw CliErrors[_0x56a339(0xef)](_0x56a339(0xe2));}if(_0xd49c0c['status']===0x191)throw CliErrors[_0x56a339(0xf9)]();if(_0xd49c0c['status']===0x1ad)throw CliErrors['apiError'](_0x56a339(0xee));if(!_0xd49c0c['ok'])throw CliErrors[_0x56a339(0xff)]('KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'+_0xd49c0c[_0x56a339(0xde)]+').');if(!hasNoStore(_0xd49c0c['headers']))throw CliErrors[_0x56a339(0xff)](_0x56a339(0xe9));if(!(_0xd49c0c['headers'][_0x56a339(0xe7)](_0x56a339(0xc2))??'')['toLowerCase']()[_0x56a339(0xa4)](_0x56a339(0xf7)))throw CliErrors[_0x56a339(0xff)](_0x56a339(0xb0));let _0x182411;try{_0x182411=await _0xd49c0c['json']();}catch(_0x1d9c0d){if(_0x3bab89[_0x56a339(0xb2)]?.[_0x56a339(0xa8)])throw new DOMException(_0x56a339(0xec),_0x56a339(0xd5));if(_0x2977bb[_0x56a339(0xa8)]||_0x1d9c0d instanceof Error&&_0x1d9c0d[_0x56a339(0xbb)]===_0x56a339(0xf3))throw CliErrors[_0x56a339(0xef)](_0x56a339(0xaa));throw CliErrors['apiError'](_0x56a339(0xa6));}try{const _0xf1d3a5=requireExactRecord(_0x182411,['hits','strategyFingerprint',_0x56a339(0xb6)],_0x56a339(0xb5));if(!Array['isArray'](_0xf1d3a5[_0x56a339(0xf2)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':'development','total':_0xf1d3a5['hits'][_0x56a339(0xd6)],'hits':_0xf1d3a5['hits'],'strategyFingerprint':_0xf1d3a5[_0x56a339(0xfc)],'timingsMs':_0xf1d3a5[_0x56a339(0xb6)]},_0x3bab89['topK']??0xa);}catch(_0x5e2859){if(_0x5e2859 instanceof CliError)throw CliErrors['apiError'](_0x56a339(0xf0));throw _0x5e2859;}}function a284_0x3fec(){const _0x3cad23=['Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','2337144nUAqjx','Knowledge\x20search\x20query\x20is\x20required.','24pVQqKG','isArray','topK','toLowerCase','no-store','serviceUrl','text','trim','validation','299HdnGiC','string','finalScore','AbortError','length','tags','https:','number','52788VzKAjz','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','username','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','status','hash','sort','title','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','any','keys','scoreKind','cookie','get','pathname','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','origin','cli:rabetbase','Knowledge\x20search\x20cancelled.','15981vgpsVl','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','networkError','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','146vjEQYM','hits','TimeoutError','query','map','1162899lxhXjz','application/json','error','authRequired','isSafeInteger','1886015zklFYC','strategyFingerprint','/knowledge/search','test','apiError','2211oJTkCL','includes','some','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','23020wLtzQO','aborted','public','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','rawScore','timeout','development','search','scope','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','appCode','signal','4tEQrpd','profile','response','timingsMs','schemaVersion','revision','rank','object','name','entries','/v2/development/apps/','stringify','company','450MkvUIk','total','content-type','documentId','chunkId','1298mxyRVh'];a284_0x3fec=function(){return _0x3cad23;};return a284_0x3fec();}function validateTopK(_0x2573e0){const _0x1cc1f0=a284_0x9d2c59;if(_0x2573e0!==undefined&&(!Number[_0x1cc1f0(0xfa)](_0x2573e0)||_0x2573e0<0x1||_0x2573e0>0x32))throw CliErrors[_0x1cc1f0(0xd1)](_0x1cc1f0(0xc6));}function hasNoStore(_0x38616f){const _0x9b47ee=a284_0x9d2c59;return(_0x38616f[_0x9b47ee(0xe7)]('cache-control')??'')['split'](',')['some'](_0x3435f3=>_0x3435f3[_0x9b47ee(0xd0)]()[_0x9b47ee(0xcc)]()===_0x9b47ee(0xcd));}function parseDevelopmentSearchResponse(_0xcdd559,_0x38f371){const _0xfd5702=a284_0x9d2c59,_0x45ceb6=requireExactRecord(_0xcdd559,RESPONSE_KEYS,_0xfd5702(0xb5));if(_0x45ceb6['schemaVersion']!==0x2||_0x45ceb6[_0xfd5702(0xb4)]!==_0xfd5702(0xad))throw invalidContract(_0xfd5702(0xb4));if(!Array['isArray'](_0x45ceb6[_0xfd5702(0xf2)])||_0x45ceb6[_0xfd5702(0xf2)][_0xfd5702(0xd6)]>(_0x38f371??0x32))throw invalidContract(_0xfd5702(0xf2));if(typeof _0x45ceb6[_0xfd5702(0xfc)]!==_0xfd5702(0xd3)||!/^sha256:[0-9a-f]{64}$/[_0xfd5702(0xfe)](_0x45ceb6['strategyFingerprint']))throw invalidContract(_0xfd5702(0xfc));const _0x48a1fd=requireRecord(_0x45ceb6['timingsMs'],_0xfd5702(0xb6)),_0x328550={};for(const [_0x1a68cf,_0xf21910]of Object[_0xfd5702(0xbc)](_0x48a1fd)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xfd5702(0xfe)](_0x1a68cf)||typeof _0xf21910!==_0xfd5702(0xd9)||!Number['isFinite'](_0xf21910)||_0xf21910<0x0)throw invalidContract(_0xfd5702(0xb6));_0x328550[_0x1a68cf]=_0xf21910;}const _0x5530c6=_0x45ceb6[_0xfd5702(0xf2)][_0xfd5702(0xf5)]((_0x299553,_0x817503)=>parseHit(_0x299553,_0x817503));if(!Number['isSafeInteger'](_0x45ceb6[_0xfd5702(0xc1)])||_0x45ceb6[_0xfd5702(0xc1)]!==_0x5530c6[_0xfd5702(0xd6)])throw invalidContract(_0xfd5702(0xc1));return{'schemaVersion':_0x45ceb6[_0xfd5702(0xb7)],'profile':_0x45ceb6[_0xfd5702(0xb4)],'total':_0x45ceb6[_0xfd5702(0xc1)],'strategyFingerprint':_0x45ceb6[_0xfd5702(0xfc)],'timingsMs':_0x328550,'hits':_0x5530c6};}function parseHit(_0x2e1836,_0x4ca4b4){const _0x501747=a284_0x9d2c59,_0x4f2b79=requireExactRecord(_0x2e1836,HIT_KEYS,'hits['+_0x4ca4b4+']'),_0xb0716=_0x469af7=>{const _0x4eb373=a284_0x3a85,_0x166cd0=_0x4f2b79[_0x469af7];if(typeof _0x166cd0!==_0x4eb373(0xd3)||!_0x166cd0)throw invalidContract(_0x469af7);return _0x166cd0;};if(!Number['isSafeInteger'](_0x4f2b79['revision'])||_0x4f2b79[_0x501747(0xb8)]<0x1)throw invalidContract('revision');if(_0x4f2b79[_0x501747(0xaf)]!==_0x501747(0xa9)&&_0x4f2b79[_0x501747(0xaf)]!==_0x501747(0xbf))throw invalidContract(_0x501747(0xaf));if(typeof _0x4f2b79[_0x501747(0xe1)]!==_0x501747(0xd3)||typeof _0x4f2b79['text']!==_0x501747(0xd3))throw invalidContract(_0x501747(0xcf));if(!Array[_0x501747(0xca)](_0x4f2b79[_0x501747(0xd7)])||_0x4f2b79[_0x501747(0xd7)][_0x501747(0xa5)](_0x11faa6=>typeof _0x11faa6!=='string'))throw invalidContract(_0x501747(0xd7));if(!Number[_0x501747(0xfa)](_0x4f2b79['rank'])||_0x4f2b79[_0x501747(0xb9)]!==_0x4ca4b4+0x1)throw invalidContract(_0x501747(0xb9));if(!isFiniteNumber(_0x4f2b79[_0x501747(0xab)])||!isFiniteNumber(_0x4f2b79[_0x501747(0xd4)]))throw invalidContract('score');return{'documentId':_0xb0716(_0x501747(0xc3)),'revision':_0x4f2b79[_0x501747(0xb8)],'chunkId':_0xb0716(_0x501747(0xc4)),'scope':_0x4f2b79[_0x501747(0xaf)],'title':_0x4f2b79[_0x501747(0xe1)],'text':_0x4f2b79['text'],'tags':[..._0x4f2b79['tags']],'rank':_0x4f2b79[_0x501747(0xb9)],'rawScore':_0x4f2b79['rawScore'],'finalScore':_0x4f2b79[_0x501747(0xd4)],'scoreKind':_0xb0716(_0x501747(0xe5))};}function requireExactRecord(_0x3bc5ec,_0x3f29bd,_0x12e3db){const _0x1b026e=a284_0x9d2c59,_0x2ddbc9=requireRecord(_0x3bc5ec,_0x12e3db),_0x1dd943=Object[_0x1b026e(0xe4)](_0x2ddbc9)[_0x1b026e(0xe0)](),_0x5e1e83=[..._0x3f29bd][_0x1b026e(0xe0)]();if(_0x1dd943[_0x1b026e(0xd6)]!==_0x5e1e83[_0x1b026e(0xd6)]||_0x1dd943[_0x1b026e(0xa5)]((_0x528083,_0x1f4a3f)=>_0x528083!==_0x5e1e83[_0x1f4a3f]))throw invalidContract(_0x12e3db);return _0x2ddbc9;}function requireRecord(_0x3f233d,_0x143d2b){const _0x28ea5a=a284_0x9d2c59;if(!_0x3f233d||typeof _0x3f233d!==_0x28ea5a(0xba)||Array[_0x28ea5a(0xca)](_0x3f233d))throw invalidContract(_0x143d2b);return _0x3f233d;}function isFiniteNumber(_0x339523){return typeof _0x339523==='number'&&Number['isFinite'](_0x339523);}function invalidContract(_0x2cc7a9){const _0x1eed13=a284_0x9d2c59;return CliErrors[_0x1eed13(0xff)](_0x1eed13(0xdd)+_0x2cc7a9+'\x20contract.');}
@@ -1 +1 @@
1
- const a285_0x2d86d7=a285_0x3aab;(function(_0x461ee2,_0x93e6eb){const _0x158251=a285_0x3aab,_0x3a34c5=_0x461ee2();while(!![]){try{const _0x4ffa28=parseInt(_0x158251(0xa2))/0x1*(-parseInt(_0x158251(0x97))/0x2)+parseInt(_0x158251(0x93))/0x3+-parseInt(_0x158251(0x9c))/0x4+parseInt(_0x158251(0x95))/0x5+-parseInt(_0x158251(0x98))/0x6*(parseInt(_0x158251(0x9d))/0x7)+-parseInt(_0x158251(0xa8))/0x8*(-parseInt(_0x158251(0xa7))/0x9)+-parseInt(_0x158251(0xa5))/0xa*(-parseInt(_0x158251(0xab))/0xb);if(_0x4ffa28===_0x93e6eb)break;else _0x3a34c5['push'](_0x3a34c5['shift']());}catch(_0xd10757){_0x3a34c5['push'](_0x3a34c5['shift']());}}}(a285_0x1c36,0xab97a));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';function a285_0x1c36(){const _0x46ab73=['page','name','utf8','1yWbMHE','localeCompare','page.lock.json','9240570VLlzQE','join','1702836mAbdJd','24ZxlCDy','Unsupported\x20file\x20in\x20page\x20directory:\x20','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','11TvQIzm','cwd','isFile','920823lIhuTa','appPagesDir','1952860PpqTkb','validation','712954ILUCpj','6zPkULR','trim','isDirectory','.json','3874088jDaTpK','1129387byhYCP','F_OK'];a285_0x1c36=function(){return _0x46ab73;};return a285_0x1c36();}export function loadPageProjectConfig(_0x2db17a,_0x341dd0=process[a285_0x2d86d7(0xac)]()){const _0x21cb72=a285_0x2d86d7,_0xbc1196=resolve(_0x341dd0),_0x210a7c=join(_0xbc1196,'.rabetbase',_0x21cb72(0x9f));return{'projectRoot':_0xbc1196,'pagesBaseDir':_0x210a7c,'appPagesDir':join(_0x210a7c,_0x2db17a),'lockFilePath':join(_0xbc1196,'.rabetbase',_0x21cb72(0xa4))};}export function buildPageFileName(_0x590844,_0x518454){const _0x4a6f34=a285_0x2d86d7;return _0x590844+'-'+_0x518454['toUpperCase']()+_0x4a6f34(0x9b);}export function resolvePageFilePath(_0x268b15,_0x4bcd0b,_0x3f3b83){const _0x246cdc=a285_0x2d86d7;return join(_0x268b15[_0x246cdc(0x94)],buildPageFileName(_0x4bcd0b,_0x3f3b83));}export async function ensureParentDirectory(_0x3d67e3){await mkdir(dirname(_0x3d67e3),{'recursive':!![]});}export async function fileExists(_0x1f9d76){const _0x205bf8=a285_0x2d86d7;try{return await access(_0x1f9d76,constants[_0x205bf8(0x9e)]),!![];}catch{return![];}}function a285_0x3aab(_0x394cb2,_0x4a6d08){_0x394cb2=_0x394cb2-0x92;const _0x1c3693=a285_0x1c36();let _0x3aab91=_0x1c3693[_0x394cb2];return _0x3aab91;}export async function readCustomPageDirectory(_0x5942ea){const _0x5cca4d=a285_0x2d86d7,_0x418b76=_0x5942ea[_0x5cca4d(0x99)]();if(!_0x418b76)throw CliErrors['flagMissing']('page-dir');const _0x4dc091=resolve(_0x418b76);let _0x3d9446;try{_0x3d9446=await lstat(_0x4dc091);}catch{throw CliErrors[_0x5cca4d(0x96)]('Page\x20directory\x20not\x20found:\x20'+_0x418b76);}if(!_0x3d9446[_0x5cca4d(0x9a)]())throw CliErrors[_0x5cca4d(0x96)](_0x5cca4d(0xaa)+_0x418b76);const _0x1d52d2={};return await readDirectory(_0x4dc091,_0x4dc091,_0x1d52d2),_0x1d52d2;}async function readDirectory(_0x46650b,_0x50949e,_0x301783){const _0x147881=a285_0x2d86d7,_0x36b294=await readdir(_0x50949e,{'withFileTypes':!![]});for(const _0x2a1ecc of _0x36b294['sort']((_0x1137f5,_0x66947d)=>_0x1137f5[_0x147881(0xa0)][_0x147881(0xa3)](_0x66947d['name']))){const _0x3ce617=join(_0x50949e,_0x2a1ecc[_0x147881(0xa0)]);if(_0x2a1ecc[_0x147881(0x9a)]()){await readDirectory(_0x46650b,_0x3ce617,_0x301783);continue;}if(!_0x2a1ecc[_0x147881(0x92)]())throw CliErrors[_0x147881(0x96)](_0x147881(0xa9)+_0x3ce617);_0x301783[relative(_0x46650b,_0x3ce617)['split'](sep)[_0x147881(0xa6)]('/')]=await readFile(_0x3ce617,_0x147881(0xa1));}}
1
+ (function(_0x1cf186,_0x2894bb){const _0x586757=a285_0x3635,_0x3f795d=_0x1cf186();while(!![]){try{const _0x2257d0=-parseInt(_0x586757(0x194))/0x1+parseInt(_0x586757(0x19a))/0x2+parseInt(_0x586757(0x19d))/0x3+-parseInt(_0x586757(0x1a0))/0x4*(-parseInt(_0x586757(0x1a1))/0x5)+parseInt(_0x586757(0x1a4))/0x6*(parseInt(_0x586757(0x1a2))/0x7)+parseInt(_0x586757(0x196))/0x8+-parseInt(_0x586757(0x195))/0x9;if(_0x2257d0===_0x2894bb)break;else _0x3f795d['push'](_0x3f795d['shift']());}catch(_0x200bcd){_0x3f795d['push'](_0x3f795d['shift']());}}}(a285_0x1ea9,0x460b5));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(_0x2022c9,_0x221422=process['cwd']()){const _0x395fd5=a285_0x3635,_0x4faa90=resolve(_0x221422),_0x36671a=join(_0x4faa90,'.rabetbase',_0x395fd5(0x198));return{'projectRoot':_0x4faa90,'pagesBaseDir':_0x36671a,'appPagesDir':join(_0x36671a,_0x2022c9),'lockFilePath':join(_0x4faa90,_0x395fd5(0x199),_0x395fd5(0x1ae))};}export function buildPageFileName(_0x9d7936,_0x265082){const _0x284708=a285_0x3635;return _0x9d7936+'-'+_0x265082[_0x284708(0x197)]()+_0x284708(0x1aa);}function a285_0x3635(_0x52530c,_0x144252){_0x52530c=_0x52530c-0x193;const _0x1ea96f=a285_0x1ea9();let _0x363596=_0x1ea96f[_0x52530c];return _0x363596;}function a285_0x1ea9(){const _0x78102a=['appPagesDir','join','utf8','page.lock.json','split','279687OZEboC','13104054GjzOFw','3903192DozotK','toUpperCase','page','.rabetbase','1067790gxVait','page-dir','isDirectory','453561VCRiLG','sort','name','4lcssXs','1755095ayGuiP','966tIvjyW','localeCompare','21678yXxQwB','validation','Unsupported\x20file\x20in\x20page\x20directory:\x20','isFile','F_OK','Page\x20directory\x20not\x20found:\x20','.json'];a285_0x1ea9=function(){return _0x78102a;};return a285_0x1ea9();}export function resolvePageFilePath(_0x511348,_0xb34691,_0x54dea7){const _0x43afad=a285_0x3635;return join(_0x511348[_0x43afad(0x1ab)],buildPageFileName(_0xb34691,_0x54dea7));}export async function ensureParentDirectory(_0x27ee85){await mkdir(dirname(_0x27ee85),{'recursive':!![]});}export async function fileExists(_0x1aefca){const _0x32db6a=a285_0x3635;try{return await access(_0x1aefca,constants[_0x32db6a(0x1a8)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x1ebae8){const _0x226099=a285_0x3635,_0x3534c2=_0x1ebae8['trim']();if(!_0x3534c2)throw CliErrors['flagMissing'](_0x226099(0x19b));const _0x1306a1=resolve(_0x3534c2);let _0x182536;try{_0x182536=await lstat(_0x1306a1);}catch{throw CliErrors[_0x226099(0x1a5)](_0x226099(0x1a9)+_0x3534c2);}if(!_0x182536[_0x226099(0x19c)]())throw CliErrors[_0x226099(0x1a5)]('Page\x20directory\x20is\x20not\x20a\x20directory:\x20'+_0x3534c2);const _0x2bd29b={};return await readDirectory(_0x1306a1,_0x1306a1,_0x2bd29b),_0x2bd29b;}async function readDirectory(_0x3a5ba1,_0x242eac,_0x2831df){const _0x24415a=a285_0x3635,_0x1fc9a3=await readdir(_0x242eac,{'withFileTypes':!![]});for(const _0x10ab4c of _0x1fc9a3[_0x24415a(0x19e)]((_0x2cc7d9,_0xf1168c)=>_0x2cc7d9[_0x24415a(0x19f)][_0x24415a(0x1a3)](_0xf1168c[_0x24415a(0x19f)]))){const _0x5144a6=join(_0x242eac,_0x10ab4c[_0x24415a(0x19f)]);if(_0x10ab4c['isDirectory']()){await readDirectory(_0x3a5ba1,_0x5144a6,_0x2831df);continue;}if(!_0x10ab4c[_0x24415a(0x1a7)]())throw CliErrors[_0x24415a(0x1a5)](_0x24415a(0x1a6)+_0x5144a6);_0x2831df[relative(_0x3a5ba1,_0x5144a6)[_0x24415a(0x193)](sep)[_0x24415a(0x1ac)]('/')]=await readFile(_0x5144a6,_0x24415a(0x1ad));}}
@@ -1 +1 @@
1
- function a286_0x53f1(_0x1311f8,_0x3dff6a){_0x1311f8=_0x1311f8-0x183;const _0x37bac0=a286_0x37ba();let _0x53f1fd=_0x37bac0[_0x1311f8];return _0x53f1fd;}(function(_0x2f098c,_0x27e2e9){const _0x1c1a94=a286_0x53f1,_0x2a0d61=_0x2f098c();while(!![]){try{const _0x19da21=parseInt(_0x1c1a94(0x183))/0x1+-parseInt(_0x1c1a94(0x18b))/0x2+-parseInt(_0x1c1a94(0x188))/0x3+parseInt(_0x1c1a94(0x18e))/0x4*(parseInt(_0x1c1a94(0x193))/0x5)+-parseInt(_0x1c1a94(0x189))/0x6*(-parseInt(_0x1c1a94(0x186))/0x7)+parseInt(_0x1c1a94(0x18c))/0x8*(parseInt(_0x1c1a94(0x18f))/0x9)+-parseInt(_0x1c1a94(0x187))/0xa;if(_0x19da21===_0x27e2e9)break;else _0x2a0d61['push'](_0x2a0d61['shift']());}catch(_0x3ef124){_0x2a0d61['push'](_0x2a0d61['shift']());}}}(a286_0x37ba,0x75c4b));import a286_0xa60a19 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x55a712){const _0x4f0fc2=a286_0x53f1;return JSON[_0x4f0fc2(0x185)](JSON[_0x4f0fc2(0x191)](_0x55a712),null,0x2)+'\x0a';}export function computePageContentHash(_0x4a0828){const _0x487062=a286_0x53f1;return a286_0xa60a19[_0x487062(0x18d)](_0x487062(0x192))[_0x487062(0x190)](_0x4a0828)[_0x487062(0x18a)]('hex');}function a286_0x37ba(){const _0x3e54a2=['37470mengFh','318933ZRfYqy','utf8','stringify','7EvddbT','6558530DOoiOJ','1664604ZWXNhq','4419534nfDSSu','digest','542950cbVYMF','8bQLqcI','createHash','180WymIJG','5146407DePnRe','update','parse','md5'];a286_0x37ba=function(){return _0x3e54a2;};return a286_0x37ba();}export function computeSerializedSchemaHash(_0x3b95a2){return computePageContentHash(serializePageSchemaForFile(_0x3b95a2));}export async function computePageFileHash(_0x38d708){const _0x39dc1b=a286_0x53f1,_0x2bf56a=await readFile(_0x38d708,_0x39dc1b(0x184));return computePageContentHash(_0x2bf56a);}
1
+ function a286_0x1c62(_0xcdf8c8,_0x182af5){_0xcdf8c8=_0xcdf8c8-0x100;const _0x1570a3=a286_0x1570();let _0x1c62d3=_0x1570a3[_0xcdf8c8];return _0x1c62d3;}function a286_0x1570(){const _0x2e934d=['9874440FCRVom','2418450bBQFWE','md5','1197OpeXhz','48YXrbNj','18608fEvDPY','stringify','519906zLcegF','digest','421902Ueejut','125195YoXRTQ','hex','87762icWNQi','createHash','utf8'];a286_0x1570=function(){return _0x2e934d;};return a286_0x1570();}(function(_0x25ca25,_0x29c338){const _0x47a7c2=a286_0x1c62,_0x22e62f=_0x25ca25();while(!![]){try{const _0x7cdd68=parseInt(_0x47a7c2(0x103))/0x1+-parseInt(_0x47a7c2(0x108))/0x2+-parseInt(_0x47a7c2(0x105))/0x3+-parseInt(_0x47a7c2(0x100))/0x4*(parseInt(_0x47a7c2(0x106))/0x5)+-parseInt(_0x47a7c2(0x10c))/0x6+-parseInt(_0x47a7c2(0x10e))/0x7*(parseInt(_0x47a7c2(0x101))/0x8)+parseInt(_0x47a7c2(0x10b))/0x9;if(_0x7cdd68===_0x29c338)break;else _0x22e62f['push'](_0x22e62f['shift']());}catch(_0x17e749){_0x22e62f['push'](_0x22e62f['shift']());}}}(a286_0x1570,0x50dfe));import a286_0x5749a9 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3bbdd9){const _0x1607f1=a286_0x1c62;return JSON[_0x1607f1(0x102)](JSON['parse'](_0x3bbdd9),null,0x2)+'\x0a';}export function computePageContentHash(_0x1a8ca2){const _0x282039=a286_0x1c62;return a286_0x5749a9[_0x282039(0x109)](_0x282039(0x10d))['update'](_0x1a8ca2)[_0x282039(0x104)](_0x282039(0x107));}export function computeSerializedSchemaHash(_0x56a6d9){return computePageContentHash(serializePageSchemaForFile(_0x56a6d9));}export async function computePageFileHash(_0x4a081b){const _0xaa8203=a286_0x1c62,_0x3df031=await readFile(_0x4a081b,_0xaa8203(0x10a));return computePageContentHash(_0x3df031);}