@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.3

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 (387) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.d.ts +22 -0
  3. package/lib/api/api-group.js +1 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +18 -2
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/generate-sdk-config-file.js +1 -1
  8. package/lib/api/legacy-api-file.d.ts +11 -0
  9. package/lib/api/legacy-api-file.js +1 -0
  10. package/lib/api/model-registry-file.d.ts +36 -0
  11. package/lib/api/model-registry-file.js +1 -0
  12. package/lib/api/model-registry-scaffold.d.ts +7 -0
  13. package/lib/api/model-registry-scaffold.js +1 -0
  14. package/lib/api/model-source.d.ts +6 -0
  15. package/lib/api/model-source.js +1 -0
  16. package/lib/auth/auth-server-ui.js +1 -1
  17. package/lib/auth/auth-server.js +1 -1
  18. package/lib/auth/constant.js +1 -1
  19. package/lib/auth/get-cookie.js +1 -1
  20. package/lib/auth/get-session-user.js +1 -1
  21. package/lib/auth/is-session-valid.js +1 -1
  22. package/lib/auth/login-success-html.js +1 -1
  23. package/lib/auth/logout.js +1 -1
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.js +1 -1
  26. package/lib/commands/api/generate.js +1 -1
  27. package/lib/commands/api/index.js +1 -1
  28. package/lib/commands/api/list.js +1 -1
  29. package/lib/commands/api/pull.js +1 -1
  30. package/lib/commands/api/shared.js +1 -1
  31. package/lib/commands/app/index.js +1 -1
  32. package/lib/commands/app/list.js +1 -1
  33. package/lib/commands/app/members-list.js +1 -1
  34. package/lib/commands/app/remote-directory.js +1 -1
  35. package/lib/commands/app/shared.js +1 -1
  36. package/lib/commands/app-config/delete.js +1 -1
  37. package/lib/commands/app-config/get.js +1 -1
  38. package/lib/commands/app-config/index.js +1 -1
  39. package/lib/commands/app-config/list.js +1 -1
  40. package/lib/commands/app-config/set.js +1 -1
  41. package/lib/commands/app-config/shared.js +1 -1
  42. package/lib/commands/auth/index.js +1 -1
  43. package/lib/commands/bff/create.js +1 -1
  44. package/lib/commands/bff/delete.js +1 -1
  45. package/lib/commands/bff/detail.js +1 -1
  46. package/lib/commands/bff/index.js +1 -1
  47. package/lib/commands/bff/list.js +1 -1
  48. package/lib/commands/bff/logs.js +1 -1
  49. package/lib/commands/bff/pull.js +1 -1
  50. package/lib/commands/bff/push.js +1 -1
  51. package/lib/commands/bff/status.js +1 -1
  52. package/lib/commands/cli-skill/index.js +1 -1
  53. package/lib/commands/cli-update.js +1 -1
  54. package/lib/commands/codegen/index.js +1 -1
  55. package/lib/commands/codegen/sdk.js +1 -1
  56. package/lib/commands/codegen/sql.js +1 -1
  57. package/lib/commands/common/app-registry.js +1 -1
  58. package/lib/commands/common/app-selector.js +1 -1
  59. package/lib/commands/common/async-task.js +1 -1
  60. package/lib/commands/common/dry-run.js +1 -1
  61. package/lib/commands/common/flags.d.ts +7 -0
  62. package/lib/commands/common/flags.js +1 -1
  63. package/lib/commands/common/local-file.js +1 -1
  64. package/lib/commands/common/validate.js +1 -1
  65. package/lib/commands/config/delete.js +1 -1
  66. package/lib/commands/config/get.js +1 -1
  67. package/lib/commands/config/index.js +1 -1
  68. package/lib/commands/config/init.js +1 -1
  69. package/lib/commands/config/list.js +1 -1
  70. package/lib/commands/config/set.js +1 -1
  71. package/lib/commands/config/shared.js +1 -1
  72. package/lib/commands/dataset/batch-design.js +1 -1
  73. package/lib/commands/dataset/business-group-update.js +1 -1
  74. package/lib/commands/dataset/business-groups.js +1 -1
  75. package/lib/commands/dataset/capability.js +1 -1
  76. package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
  77. package/lib/commands/dataset/cross-relation-create.js +1 -0
  78. package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
  79. package/lib/commands/dataset/cross-relation-delete.js +1 -0
  80. package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
  81. package/lib/commands/dataset/cross-relation-list.js +1 -0
  82. package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
  83. package/lib/commands/dataset/cross-relation-shared.js +1 -0
  84. package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
  85. package/lib/commands/dataset/cross-relation-update.js +1 -0
  86. package/lib/commands/dataset/delete.js +1 -1
  87. package/lib/commands/dataset/detail.js +1 -1
  88. package/lib/commands/dataset/extend-update.js +1 -1
  89. package/lib/commands/dataset/field-restore.js +1 -1
  90. package/lib/commands/dataset/field-update.js +1 -1
  91. package/lib/commands/dataset/generate.js +1 -1
  92. package/lib/commands/dataset/index.js +1 -1
  93. package/lib/commands/dataset/list.js +1 -1
  94. package/lib/commands/dataset/operations.js +1 -1
  95. package/lib/commands/dataset/relation-audit.js +1 -1
  96. package/lib/commands/dataset/relation-create.js +1 -1
  97. package/lib/commands/dataset/relation-delete.js +1 -1
  98. package/lib/commands/dataset/relation-shared.js +1 -1
  99. package/lib/commands/dataset/relation-update.js +1 -1
  100. package/lib/commands/dataset/relations.js +1 -1
  101. package/lib/commands/dataset/rename.js +1 -1
  102. package/lib/commands/dataset/restore.js +1 -1
  103. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  104. package/lib/commands/db/analysis-batching.js +1 -1
  105. package/lib/commands/db/analyze-batch-plan.js +1 -1
  106. package/lib/commands/db/analyze-cancel.js +1 -1
  107. package/lib/commands/db/analyze-start.js +1 -1
  108. package/lib/commands/db/analyze-status.js +1 -1
  109. package/lib/commands/db/create.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/service.js +1 -1
  183. package/lib/commands/menu/shared/sync-core.js +1 -1
  184. package/lib/commands/menu/shared/update-core.js +1 -1
  185. package/lib/commands/menu/shared/valid-url.js +1 -1
  186. package/lib/commands/menu/sync.js +1 -1
  187. package/lib/commands/menu/visibility-update.js +1 -1
  188. package/lib/commands/notification/config-create.js +1 -1
  189. package/lib/commands/notification/config-delete.js +1 -1
  190. package/lib/commands/notification/config-list.js +1 -1
  191. package/lib/commands/notification/config-update.js +1 -1
  192. package/lib/commands/notification/index.js +1 -1
  193. package/lib/commands/notification/shared.js +1 -1
  194. package/lib/commands/ocr/index.js +1 -1
  195. package/lib/commands/page/create.js +1 -1
  196. package/lib/commands/page/custom/detail.js +1 -1
  197. package/lib/commands/page/custom/list.js +1 -1
  198. package/lib/commands/page/custom/publish.js +1 -1
  199. package/lib/commands/page/custom/shared.js +1 -1
  200. package/lib/commands/page/custom/syntax.js +1 -1
  201. package/lib/commands/page/custom/update.js +1 -1
  202. package/lib/commands/page/data-list-status.js +1 -1
  203. package/lib/commands/page/generate-start.js +1 -1
  204. package/lib/commands/page/generate-status.js +1 -1
  205. package/lib/commands/page/index.js +1 -1
  206. package/lib/commands/page/pull.js +1 -1
  207. package/lib/commands/page/push.js +1 -1
  208. package/lib/commands/page/relation-audit.js +1 -1
  209. package/lib/commands/page/restore.js +1 -1
  210. package/lib/commands/page/shared.js +1 -1
  211. package/lib/commands/page/sync.js +1 -1
  212. package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
  213. package/lib/commands/project/api-architecture-upgrade.js +1 -0
  214. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  215. package/lib/commands/project/create/format-elapsed.js +1 -1
  216. package/lib/commands/project/create/main.js +1 -1
  217. package/lib/commands/project/create/materialize-project-template.js +1 -1
  218. package/lib/commands/project/create/project-name.js +1 -1
  219. package/lib/commands/project/create/project-template-archive.js +1 -1
  220. package/lib/commands/project/create/project-template-path.js +1 -1
  221. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  222. package/lib/commands/project/create/use-format-code.js +1 -1
  223. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  224. package/lib/commands/project/domain-routing-sync.js +1 -1
  225. package/lib/commands/project/index.js +1 -1
  226. package/lib/commands/project/upgrade.d.ts +30 -1
  227. package/lib/commands/project/upgrade.js +1 -1
  228. package/lib/commands/registry.js +1 -1
  229. package/lib/commands/role/delete.js +1 -1
  230. package/lib/commands/role/detail.js +1 -1
  231. package/lib/commands/role/index.js +1 -1
  232. package/lib/commands/role/list.js +1 -1
  233. package/lib/commands/role/shared.js +1 -1
  234. package/lib/commands/role/update.js +1 -1
  235. package/lib/commands/role/user-add.js +1 -1
  236. package/lib/commands/role/user-remove.js +1 -1
  237. package/lib/commands/role/user-resolve.js +1 -1
  238. package/lib/commands/rule/get.js +1 -1
  239. package/lib/commands/rule/index.js +1 -1
  240. package/lib/commands/rule/list.js +1 -1
  241. package/lib/commands/rule/set.js +1 -1
  242. package/lib/commands/rule/shared.js +1 -1
  243. package/lib/commands/run/index.js +1 -1
  244. package/lib/commands/schema.js +1 -1
  245. package/lib/commands/sql/create.js +1 -1
  246. package/lib/commands/sql/delete.js +1 -1
  247. package/lib/commands/sql/detail.js +1 -1
  248. package/lib/commands/sql/exec.js +1 -1
  249. package/lib/commands/sql/index.js +1 -1
  250. package/lib/commands/sql/list.js +1 -1
  251. package/lib/commands/sql/pull.js +1 -1
  252. package/lib/commands/sql/push.js +1 -1
  253. package/lib/commands/sql/shared.js +1 -1
  254. package/lib/commands/sql/status.js +1 -1
  255. package/lib/commands/sql/validate.js +1 -1
  256. package/lib/commands/task/index.js +1 -1
  257. package/lib/commands/task/status.js +1 -1
  258. package/lib/commands/tenant/index.js +1 -1
  259. package/lib/commands/tenant/members-list.js +1 -1
  260. package/lib/commands/tenant/shared.js +1 -1
  261. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  262. package/lib/commands/user-account/index.js +1 -1
  263. package/lib/commands/workspace/add.js +1 -1
  264. package/lib/commands/workspace/index.js +1 -1
  265. package/lib/commands/workspace/remove.js +1 -1
  266. package/lib/config/domain-config.js +1 -1
  267. package/lib/config/project-domain-routing.js +1 -1
  268. package/lib/config/region-config.js +1 -1
  269. package/lib/config/schema.js +1 -1
  270. package/lib/constant/cdn.js +1 -1
  271. package/lib/constant/cli.js +1 -1
  272. package/lib/constant/defaults.js +1 -1
  273. package/lib/constant/domain.js +1 -1
  274. package/lib/constant/env.js +1 -1
  275. package/lib/constant/output.js +1 -1
  276. package/lib/constant/paths.js +1 -1
  277. package/lib/constant/region.js +1 -1
  278. package/lib/constant/risk.js +1 -1
  279. package/lib/constant/routing-profile.js +1 -1
  280. package/lib/context/app-resolver.d.ts +2 -0
  281. package/lib/context/app-resolver.js +1 -1
  282. package/lib/context/auth-resolver.js +1 -1
  283. package/lib/context/config-loader.js +1 -1
  284. package/lib/context.d.ts +2 -1
  285. package/lib/context.js +1 -1
  286. package/lib/core/alias-resolver.d.ts +13 -17
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.d.ts +6 -0
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-relation.d.ts +41 -0
  297. package/lib/core/cross-db-relation.js +1 -0
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.js +1 -1
  301. package/lib/core/kb-search-client.js +1 -1
  302. package/lib/core/page/file-system.js +1 -1
  303. package/lib/core/page/hash.js +1 -1
  304. package/lib/core/page/lock.js +1 -1
  305. package/lib/core/page/lr-smart-jsx.js +1 -1
  306. package/lib/core/sql-index-auditor.js +1 -1
  307. package/lib/core/sql-sync/config.js +1 -1
  308. package/lib/core/sql-sync/file-system.js +1 -1
  309. package/lib/core/sql-sync/hash.js +1 -1
  310. package/lib/core/sql-sync/lock.js +1 -1
  311. package/lib/core/sql-sync/utils.js +1 -1
  312. package/lib/core/sql-validator.js +1 -1
  313. package/lib/errors.js +1 -1
  314. package/lib/framework/build-all-flags.js +1 -1
  315. package/lib/framework/error-output.js +1 -1
  316. package/lib/framework/explicit-yes.js +1 -1
  317. package/lib/framework/flags.js +1 -1
  318. package/lib/framework/help.js +1 -1
  319. package/lib/framework/index.js +1 -1
  320. package/lib/framework/output.js +1 -1
  321. package/lib/framework/response.js +1 -1
  322. package/lib/framework/runner-alias.d.ts +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/skills/builtin-skill.js +1 -1
  340. package/lib/skills/main.js +1 -1
  341. package/lib/skills/npx-skills-add.d.ts +0 -10
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/types/index.d.ts +11 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.d.ts +12 -0
  357. package/lib/utils/cli-version-policy.js +1 -1
  358. package/lib/utils/config.js +1 -1
  359. package/lib/utils/entity-with-id.js +1 -1
  360. package/lib/utils/file-utils.js +1 -1
  361. package/lib/utils/guides-cdn.js +1 -1
  362. package/lib/utils/http-client.js +1 -1
  363. package/lib/utils/is-non-interactive.js +1 -1
  364. package/lib/utils/logger.js +1 -1
  365. package/lib/utils/params.js +1 -1
  366. package/lib/utils/platform.js +1 -1
  367. package/lib/utils/sleep.js +1 -1
  368. package/lib/utils/template-replacer.js +1 -1
  369. package/lib/utils/update-notice.js +1 -1
  370. package/lib/utils/version.js +1 -1
  371. package/lib/utils/with-active-cookie.js +1 -1
  372. package/lib/utils/write-cli-side-channel.js +1 -1
  373. package/package.json +4 -1
  374. package/skills/rabetbase/SKILL.md +10 -6
  375. package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
  376. package/skills/rabetbase/guides/typescript-sdk.md +9 -0
  377. package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
  378. package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
  379. package/skills/rabetbase/references/rabetbase-config.md +2 -1
  380. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
  381. package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
  382. package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
  383. package/skills/rabetbase.manifest.json +4 -3
  384. package/templates/README.md +16 -4
  385. package/templates/generate-api/model-runtime.ts.tpl +101 -0
  386. package/templates/generate-api/profile-api.ts.tpl +21 -0
  387. package/templates/generate-api/profile-client.ts.tpl +14 -0
@@ -1 +1 @@
1
- const a269_0x1c57b2=a269_0x40e0;(function(_0x35e9c6,_0xfe5dc3){const _0x47dd27=a269_0x40e0,_0x3d2c22=_0x35e9c6();while(!![]){try{const _0x573c1b=-parseInt(_0x47dd27(0x222))/0x1*(parseInt(_0x47dd27(0x2cd))/0x2)+parseInt(_0x47dd27(0x182))/0x3+-parseInt(_0x47dd27(0x2ca))/0x4*(-parseInt(_0x47dd27(0x208))/0x5)+parseInt(_0x47dd27(0x237))/0x6*(-parseInt(_0x47dd27(0x2e5))/0x7)+parseInt(_0x47dd27(0x1dd))/0x8+parseInt(_0x47dd27(0x1f3))/0x9*(parseInt(_0x47dd27(0x1e6))/0xa)+-parseInt(_0x47dd27(0x2bf))/0xb*(parseInt(_0x47dd27(0x1c9))/0xc);if(_0x573c1b===_0xfe5dc3)break;else _0x3d2c22['push'](_0x3d2c22['shift']());}catch(_0x4a8232){_0x3d2c22['push'](_0x3d2c22['shift']());}}}(a269_0x5923,0xd3d2f));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':'https://json-schema.org/draft/2020-12/schema','$id':a269_0x1c57b2(0x181),'title':a269_0x1c57b2(0x25b),'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x1a1),a269_0x1c57b2(0x261),a269_0x1c57b2(0x1e0)],'$defs':{'userId':{'anyOf':[{'type':a269_0x1c57b2(0x27d),'minLength':0x1},{'type':a269_0x1c57b2(0x28f),'minimum':0x1}]},'position':{'type':a269_0x1c57b2(0x23f),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a269_0x1c57b2(0x295),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x212),a269_0x1c57b2(0x1ad)],'properties':{'value':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'unit':{'enum':[a269_0x1c57b2(0x272),a269_0x1c57b2(0x203),'HOURS',a269_0x1c57b2(0x17a)]}},'additionalProperties':!![]},'flowNode':{'type':a269_0x1c57b2(0x23f),'required':['id',a269_0x1c57b2(0x174),a269_0x1c57b2(0x233),'position'],'properties':{'id':{'type':a269_0x1c57b2(0x27d),'pattern':a269_0x1c57b2(0x196)},'type':{'enum':[a269_0x1c57b2(0x19f),a269_0x1c57b2(0x290),'APPROVAL',a269_0x1c57b2(0x1e3),a269_0x1c57b2(0x1e2),a269_0x1c57b2(0x2da)]},'name':{'type':'string','minLength':0x1},'pageId':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'position':{'$ref':a269_0x1c57b2(0x287)},'approvalMode':{'enum':[a269_0x1c57b2(0x2d6),a269_0x1c57b2(0x23d),a269_0x1c57b2(0x298)]},'taskMode':{'enum':['APPROVAL',a269_0x1c57b2(0x263)]},'assignee':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x229)],'properties':{'strategy':{'enum':[a269_0x1c57b2(0x256),'ROLE']},'userIds':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1e8)}},'roleId':{'anyOf':[{'type':a269_0x1c57b2(0x28f),'minimum':0x1},{'type':a269_0x1c57b2(0x27d),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a269_0x1c57b2(0x229),'userIds'],'properties':{'strategy':{'const':a269_0x1c57b2(0x256)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1e8)}}},'additionalProperties':!![]},'sequential':{'type':a269_0x1c57b2(0x1af)},'result':{'enum':[a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180)]},'scriptName':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'resultVariable':{'type':a269_0x1c57b2(0x27d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a269_0x1c57b2(0x23f),'properties':{'enabled':{'type':a269_0x1c57b2(0x1af)},'retryCount':{'type':a269_0x1c57b2(0x28f),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a269_0x1c57b2(0x23f),'properties':{'enabled':{'type':a269_0x1c57b2(0x1af)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a269_0x1c57b2(0x20f),a269_0x1c57b2(0x1c5),a269_0x1c57b2(0x266)]},'interrupting':{'type':a269_0x1c57b2(0x1af)},'scriptName':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'resultVariable':{'type':a269_0x1c57b2(0x27d),'pattern':a269_0x1c57b2(0x196)}},'additionalProperties':!![]},'cc':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x251)],'properties':{'recipientUserIds':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'visible':{'type':a269_0x1c57b2(0x1e7),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a269_0x1c57b2(0x2c0),a269_0x1c57b2(0x1b8)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a269_0x1c57b2(0x17e),a269_0x1c57b2(0x1c1)]},'template':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x183),a269_0x1c57b2(0x241)],'properties':{'title':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'summary':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'detailMarkdown':{'type':a269_0x1c57b2(0x27d)},'facts':{'type':a269_0x1c57b2(0x1e7),'maxItems':0x8,'items':{'type':'object','required':[a269_0x1c57b2(0x284),a269_0x1c57b2(0x212)],'properties':{'label':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'value':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a269_0x1c57b2(0x1e7),'maxItems':0x2,'items':{'type':a269_0x1c57b2(0x23f),'required':[a269_0x1c57b2(0x2b3),a269_0x1c57b2(0x1ac)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a269_0x1c57b2(0x27d),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':'object','required':[a269_0x1c57b2(0x174),a269_0x1c57b2(0x212)],'properties':{'type':{'enum':['USER',a269_0x1c57b2(0x1b5),a269_0x1c57b2(0x2ad)]},'value':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a269_0x1c57b2(0x23f),'properties':{'id':{'type':a269_0x1c57b2(0x27d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'targetNodeId':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'conditionType':{'enum':[a269_0x1c57b2(0x1a8),a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180),a269_0x1c57b2(0x277)]},'expression':{'type':'string'},'defaultFlow':{'type':a269_0x1c57b2(0x1af)},'name':{'type':a269_0x1c57b2(0x27d)},'waypoints':{'type':'array','items':{'$ref':a269_0x1c57b2(0x287)}}},'allOf':[{'anyOf':[{'required':[a269_0x1c57b2(0x259)]},{'required':[a269_0x1c57b2(0x201)]}]},{'anyOf':[{'required':[a269_0x1c57b2(0x1ae)]},{'required':[a269_0x1c57b2(0x22e)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a269_0x1c57b2(0x194),a269_0x1c57b2(0x22a)]},'datasetCode':{'type':a269_0x1c57b2(0x27d),'minLength':0x1},'pageId':{'type':a269_0x1c57b2(0x28f)},'templateName':![],'flowJson':{'type':a269_0x1c57b2(0x23f),'required':['nodes',a269_0x1c57b2(0x23a)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a269_0x1c57b2(0x27d),'const':a269_0x1c57b2(0x22c),'description':a269_0x1c57b2(0x25e)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a269_0x1c57b2(0x218)},'startPageId':{'type':a269_0x1c57b2(0x28f),'minimum':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x209)}},'edges':{'type':a269_0x1c57b2(0x1e7),'minItems':0x1,'items':{'$ref':a269_0x1c57b2(0x1a6)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a269_0x1c57b2(0x2bd),a269_0x1c57b2(0x1df),a269_0x1c57b2(0x1a1),a269_0x1c57b2(0x24d),a269_0x1c57b2(0x2e3),a269_0x1c57b2(0x189),a269_0x1c57b2(0x207),a269_0x1c57b2(0x271)],REMOVED_ROOT_FIELDS=['id',a269_0x1c57b2(0x189),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a269_0x1c57b2(0x22c),NODE_TYPES=new Set([a269_0x1c57b2(0x19f),a269_0x1c57b2(0x290),a269_0x1c57b2(0x179),'CONDITION',a269_0x1c57b2(0x1e2),a269_0x1c57b2(0x2da)]),CONDITION_TYPES=new Set(['ALWAYS',a269_0x1c57b2(0x1f2),a269_0x1c57b2(0x180),a269_0x1c57b2(0x277)]),APPROVAL_MODES=new Set([a269_0x1c57b2(0x2d6),a269_0x1c57b2(0x23d),a269_0x1c57b2(0x298)]),APPROVAL_TASK_MODES=new Set([a269_0x1c57b2(0x179),a269_0x1c57b2(0x263)]),FLOW_TIME_UNITS=new Set([a269_0x1c57b2(0x272),a269_0x1c57b2(0x203),'HOURS',a269_0x1c57b2(0x17a)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a269_0x1c57b2(0x1c5),a269_0x1c57b2(0x266)]),FLOW_TYPES=new Set([a269_0x1c57b2(0x194),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a269_0x1c57b2(0x21d)]),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([a269_0x1c57b2(0x17e),a269_0x1c57b2(0x1c1)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a269_0x1c57b2(0x1f1),a269_0x1c57b2(0x1b5),a269_0x1c57b2(0x2ad)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a269_0x1c57b2(0x1fa)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a269_0x1c57b2(0x257),UNSUPPORTED_FORM_MESSAGE=a269_0x1c57b2(0x2a4),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a269_0x1c57b2(0x187),RESERVED_RESULT_VARIABLES=new Set(['formData',a269_0x1c57b2(0x1be),a269_0x1c57b2(0x20b),a269_0x1c57b2(0x2bb),a269_0x1c57b2(0x1d6),'approval_sys_initiatorUsername',a269_0x1c57b2(0x18e),'approval_sys_pageId',a269_0x1c57b2(0x231),'approval_sys_dataId']);export function normalizeFlowConfig(_0x56da4c){const _0xc60646=a269_0x1c57b2;if(!isRecord(_0x56da4c))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x2fe3fe=cloneJsonValue(_0x56da4c),_0x142e7e=_0x2fe3fe['flowJson'],_0x54982=isRecord(_0x142e7e)?cloneJsonValue(_0x142e7e):{},_0x35e595=[],_0x51e078=[];for(const _0x5f23be of REMOVED_ROOT_FIELDS){if(!Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x2fe3fe,_0x5f23be))continue;delete _0x2fe3fe[_0x5f23be],_0x51e078[_0xc60646(0x24b)](_0x5f23be),_0x35e595['push']({'code':_0xc60646(0x1d1),'path':_0x5f23be,'message':_0x5f23be+_0xc60646(0x2d7)});}for(const _0x2f45c8 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x54982,_0x2f45c8))continue;const _0x275bd5=_0xc60646(0x17b)+_0x2f45c8;delete _0x54982[_0x2f45c8],_0x51e078[_0xc60646(0x24b)](_0x275bd5),_0x35e595[_0xc60646(0x24b)]({'code':_0xc60646(0x1d1),'path':_0x275bd5,'message':_0x275bd5+_0xc60646(0x2d7)});}if(Object[_0xc60646(0x19c)][_0xc60646(0x242)][_0xc60646(0x2bc)](_0x54982,'schemaVersion')){const _0x226e77=_0x54982[_0xc60646(0x2e6)],_0x64c80b=typeof _0x226e77===_0xc60646(0x27d)?_0x226e77[_0xc60646(0x2d3)]():_0x226e77;if(isEmptyJsonValue(_0x226e77)||_0x64c80b===DEFAULT_FLOW_SCHEMA_VERSION){const _0x260a82='flowJson.schemaVersion';delete _0x54982[_0xc60646(0x2e6)],_0x51e078[_0xc60646(0x24b)](_0x260a82),_0x35e595[_0xc60646(0x24b)]({'code':_0xc60646(0x1d1),'path':_0x260a82,'message':_0x260a82+_0xc60646(0x1cf)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x54982,_0xc60646(0x1e0),_0x35e595,_0x51e078);_0x2fe3fe['flowType']===_0xc60646(0x22a)&&!Object['prototype'][_0xc60646(0x242)]['call'](_0x54982,_0xc60646(0x265))&&(_0x54982[_0xc60646(0x265)]=_0xc60646(0x218));_0x2fe3fe[_0xc60646(0x1e0)]=_0x54982;if(typeof _0x2fe3fe[_0xc60646(0x1a1)]===_0xc60646(0x27d))_0x2fe3fe[_0xc60646(0x1a1)]=_0x2fe3fe[_0xc60646(0x1a1)][_0xc60646(0x2d3)]();return{'config':_0x2fe3fe,'warnings':_0x35e595,'removedPaths':_0x51e078};}export function validateFlowConfig(_0x52b913){const _0xba3904=a269_0x1c57b2;let _0x39d2f5;try{_0x39d2f5=normalizeFlowConfig(_0x52b913);}catch(_0xbc8440){const _0x15b808=_0xbc8440 instanceof Error?_0xbc8440[_0xba3904(0x23e)]:String(_0xbc8440),_0x47e1e0={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x15b808}],'warnings':[],'normalized':_0x47e1e0,'validationConfig':_0x47e1e0};}const _0x5b7c77=_0x39d2f5[_0xba3904(0x288)],_0x19552d=cloneJsonValue(_0x5b7c77),_0x2f026e=_0x19552d[_0xba3904(0x1e0)];_0x2f026e[_0xba3904(0x2bd)]=_0xba3904(0x175),_0x2f026e[_0xba3904(0x1a1)]=_0x5b7c77['flowName'];typeof _0x5b7c77[_0xba3904(0x2e3)]===_0xba3904(0x27d)&&_0x5b7c77[_0xba3904(0x2e3)][_0xba3904(0x2d3)]()&&(_0x2f026e[_0xba3904(0x24d)]=_0x5b7c77[_0xba3904(0x2e3)][_0xba3904(0x2d3)]());const _0x405358=[];return validateOuterMetadata(_0x5b7c77,_0x405358),validateFlowClassification(_0x5b7c77,_0x405358),validateGraph(_0x5b7c77[_0xba3904(0x1e0)],_0x405358),{'valid':_0x405358[_0xba3904(0x2cc)]===0x0,'errors':_0x405358,'warnings':_0x39d2f5[_0xba3904(0x1c3)],'normalized':_0x5b7c77,'validationConfig':_0x19552d};}function validateFlowClassification(_0x302ede,_0x45789d){const _0xa6e484=a269_0x1c57b2;if(!isRecord(_0x302ede[_0xa6e484(0x1e0)]))return;const _0x1f8202=_0x302ede[_0xa6e484(0x261)],_0x4ce3e6=_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x265)];_0x4ce3e6!==undefined&&(typeof _0x4ce3e6!=='string'||!FLOW_PAGE_MODES['has'](_0x4ce3e6))&&_0x45789d[_0xa6e484(0x24b)]({'path':'flowJson.pageMode','message':_0xa6e484(0x2be)+String(_0x4ce3e6)+'.'});_0x1f8202===_0xa6e484(0x194)&&_0x4ce3e6!==undefined&&_0x45789d[_0xa6e484(0x24b)]({'path':_0xa6e484(0x245),'message':_0xa6e484(0x2e2)});_0x1f8202===_0xa6e484(0x22a)&&_0x4ce3e6===_0xa6e484(0x21d)&&_0x45789d[_0xa6e484(0x24b)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x1f8202===_0xa6e484(0x194)||_0x1f8202===_0xa6e484(0x22a))&&validateCustomPageNavigation(_0x302ede,_0x1f8202,_0x4ce3e6,_0x45789d);if(_0x1f8202!==_0xa6e484(0x194)||!Array['isArray'](_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x214)]))return;_0x302ede[_0xa6e484(0x1e0)][_0xa6e484(0x214)][_0xa6e484(0x197)]((_0x426cc7,_0x1606dd)=>{const _0x3d0e02=_0xa6e484;isRecord(_0x426cc7)&&_0x426cc7[_0x3d0e02(0x174)]===_0x3d0e02(0x179)&&_0x426cc7[_0x3d0e02(0x279)]===_0x3d0e02(0x263)&&_0x45789d['push']({'path':'flowJson.nodes['+_0x1606dd+_0x3d0e02(0x269),'message':_0x3d0e02(0x27f)});});}function validateCustomPageNavigation(_0x158344,_0x12ad17,_0x4626d8,_0x24ea95){const _0x2c9699=a269_0x1c57b2,_0x5f5bf9=_0x158344['flowJson'][_0x2c9699(0x224)];_0x5f5bf9!==undefined&&(!Number[_0x2c9699(0x1ab)](_0x5f5bf9)||_0x5f5bf9<=0x0)&&_0x24ea95['push']({'path':_0x2c9699(0x27b),'message':'startPageId\x20must\x20be\x20a\x20positive\x20integer.'});const _0x2b3d1f=Array[_0x2c9699(0x230)](_0x158344['flowJson'][_0x2c9699(0x214)])?_0x158344[_0x2c9699(0x1e0)]['nodes'][_0x2c9699(0x1bb)]((_0x38dcf8,_0x4ef581)=>({'node':_0x38dcf8,'index':_0x4ef581}))[_0x2c9699(0x20c)](({node:_0x1beaa9})=>isRecord(_0x1beaa9)&&_0x1beaa9['pageId']!==undefined):[],_0x1cf3b2=_0x5f5bf9!==undefined||_0x2b3d1f['length']>0x0,_0xe3b227=_0x4626d8===undefined&&_0x12ad17===_0x2c9699(0x22a)?_0x2c9699(0x218):_0x4626d8;_0x1cf3b2&&(_0x12ad17!==_0x2c9699(0x22a)||_0xe3b227!=='CUSTOM_PAGE')&&(_0x5f5bf9!==undefined&&_0x24ea95[_0x2c9699(0x24b)]({'path':'flowJson.startPageId','message':_0x2c9699(0x27e)}),_0x2b3d1f[_0x2c9699(0x197)](({index:_0x4d93a5})=>{const _0x1e07a2=_0x2c9699;_0x24ea95['push']({'path':_0x1e07a2(0x217)+_0x4d93a5+_0x1e07a2(0x2af),'message':_0x1e07a2(0x226)});}));}export async function writeNormalizedFlowConfig(_0xaa7b56,_0x19a1bc,_0x402b79={}){const _0x1d6688=a269_0x1c57b2,_0x140306=resolve(_0xaa7b56),_0x26580f=_0x140306+'.'+process[_0x1d6688(0x280)]+'.'+randomUUID()+_0x1d6688(0x1bd),_0x510d93=JSON[_0x1d6688(0x293)](_0x19a1bc,null,0x2)+'\x0a';let _0x3e38d5;try{try{_0x3e38d5=(await stat(_0x140306))[_0x1d6688(0x1a5)]&0x1ff;}catch{_0x3e38d5=undefined;}await writeFile(_0x26580f,_0x510d93,{'encoding':'utf8','flag':'wx','mode':_0x3e38d5??0x1a4});if(_0x3e38d5!==undefined)await chmod(_0x26580f,_0x3e38d5);_0x402b79[_0x1d6688(0x1cb)]===![]?(await link(_0x26580f,_0x140306),await unlink(_0x26580f)):await rename(_0x26580f,_0x140306);}finally{await unlink(_0x26580f)[_0x1d6688(0x1b6)](()=>undefined);}}function validateOuterMetadata(_0x4c0f4d,_0x2ca220){const _0x31d82a=a269_0x1c57b2;(typeof _0x4c0f4d['flowName']!=='string'||_0x4c0f4d['flowName']['trim']()==='')&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x1a1),'message':_0x31d82a(0x24c)});_0x4c0f4d[_0x31d82a(0x228)]!==undefined&&typeof _0x4c0f4d['flowDesc']!==_0x31d82a(0x27d)&&_0x2ca220['push']({'path':_0x31d82a(0x228),'message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x4c0f4d[_0x31d82a(0x261)]===undefined||_0x4c0f4d['flowType']===null)_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x261),'message':_0x31d82a(0x2d5)});else(typeof _0x4c0f4d['flowType']!==_0x31d82a(0x27d)||!FLOW_TYPES[_0x31d82a(0x29d)](_0x4c0f4d[_0x31d82a(0x261)]))&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x261),'message':_0x31d82a(0x2a9)+String(_0x4c0f4d[_0x31d82a(0x261)])+'.'});_0x4c0f4d[_0x31d82a(0x2e3)]!==undefined&&typeof _0x4c0f4d[_0x31d82a(0x2e3)]!==_0x31d82a(0x27d)&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x2e3),'message':_0x31d82a(0x291)}),_0x4c0f4d[_0x31d82a(0x207)]!==undefined&&(!Number['isInteger'](_0x4c0f4d[_0x31d82a(0x207)])||_0x4c0f4d[_0x31d82a(0x207)]<0x0)&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x207),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x4c0f4d[_0x31d82a(0x261)]===_0x31d82a(0x22a)&&_0x4c0f4d['datasetCode']!==undefined&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x2e3),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x4c0f4d[_0x31d82a(0x261)]===_0x31d82a(0x22a)&&_0x4c0f4d[_0x31d82a(0x207)]!==undefined&&_0x2ca220[_0x31d82a(0x24b)]({'path':_0x31d82a(0x207),'message':_0x31d82a(0x221)});}function validateGraph(_0x441721,_0x81fa6e){const _0x28a70f=a269_0x1c57b2;if(!isRecord(_0x441721)){_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x1e0),'message':_0x28a70f(0x18a)});return;}!Array[_0x28a70f(0x230)](_0x441721[_0x28a70f(0x214)])&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array['isArray'](_0x441721[_0x28a70f(0x23a)])&&_0x81fa6e['push']({'path':'flowJson.edges','message':_0x28a70f(0x2c7)});Object['prototype'][_0x28a70f(0x242)][_0x28a70f(0x2bc)](_0x441721,'schemaVersion')&&_0x81fa6e[_0x28a70f(0x24b)]({'path':'flowJson.schemaVersion','message':_0x28a70f(0x216)+String(_0x441721['schemaVersion'])+_0x28a70f(0x247)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x5e726d of[_0x28a70f(0x2b1),_0x28a70f(0x188),_0x28a70f(0x2a8)]){Object[_0x28a70f(0x19c)][_0x28a70f(0x242)]['call'](_0x441721,_0x5e726d)&&_0x81fa6e[_0x28a70f(0x24b)]({'path':'flowJson.'+_0x5e726d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x28a70f(0x230)](_0x441721['nodes'])||!Array[_0x28a70f(0x230)](_0x441721['edges']))return;const _0x3b2f97=new Map(),_0x5397ce=[],_0x547efe=[],_0x84de6e=new Map(),_0x566dd9=new Map(),_0x1569a7=new Set();let _0xdfc8c3=0x0;_0x441721[_0x28a70f(0x214)][_0x28a70f(0x197)]((_0x16432f,_0x38880c)=>{const _0xd0e0e1=_0x28a70f,_0x5ec72d=_0xd0e0e1(0x217)+_0x38880c+']';if(!isRecord(_0x16432f)){_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d,'message':_0xd0e0e1(0x2ba)});return;}const _0xacd034=_0x16432f;if(typeof _0xacd034['id']!==_0xd0e0e1(0x27d)||!BPMN_ID_PATTERN[_0xd0e0e1(0x2dc)](_0xacd034['id']))_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+'.id','message':_0xd0e0e1(0x23b)});else _0x3b2f97[_0xd0e0e1(0x29d)](_0xacd034['id'])?_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+_0xd0e0e1(0x1c7),'message':'Duplicate\x20node\x20id:\x20'+_0xacd034['id']+'.'}):(_0x3b2f97['set'](_0xacd034['id'],_0xacd034),_0x1569a7[_0xd0e0e1(0x26d)](_0xacd034['id']));if(!NODE_TYPES[_0xd0e0e1(0x29d)](_0xacd034['type']))_0x81fa6e[_0xd0e0e1(0x24b)]({'path':_0x5ec72d+_0xd0e0e1(0x268),'message':_0xd0e0e1(0x1dc)+String(_0xacd034[_0xd0e0e1(0x174)])+'.'});else{if(_0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x19f))_0x5397ce['push'](_0xacd034['id']);else _0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x290)&&_0x547efe[_0xd0e0e1(0x24b)](_0xacd034['id']);}_0xacd034[_0xd0e0e1(0x174)]===_0xd0e0e1(0x179)&&(_0xacd034['taskMode']===undefined||_0xacd034[_0xd0e0e1(0x279)]==='APPROVAL')&&(_0xdfc8c3+=0x1);validateNode(_0xacd034,_0x5ec72d,_0x81fa6e);if(_0xacd034[_0xd0e0e1(0x174)]==='SCRIPT'){const _0x1f61c1=resolveEffectiveResultVariable(_0xacd034[_0xd0e0e1(0x20d)],![]);_0x1f61c1&&(registerResultVariableOwner(_0x566dd9,_0x1f61c1,_0xacd034['id'],_0x81fa6e),!_0x84de6e['has'](_0x1f61c1)&&_0x84de6e['set'](_0x1f61c1,_0xacd034['id']));}if(_0xacd034['type']==='APPROVAL'&&isRecord(_0xacd034['timeout'])&&_0xacd034[_0xd0e0e1(0x2d0)][_0xd0e0e1(0x1b2)]===!![]&&_0xacd034[_0xd0e0e1(0x2d0)][_0xd0e0e1(0x29b)]==='EXECUTE_BFF'){const _0x5ab932=resolveEffectiveResultVariable(_0xacd034['timeout']['resultVariable'],!![]);_0x5ab932&&registerResultVariableOwner(_0x566dd9,_0x5ab932,_0xacd034['id']+_0xd0e0e1(0x192),_0x81fa6e);}});_0x5397ce['length']!==0x1&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':_0x28a70f(0x193)});_0x547efe['length']===0x0&&_0x81fa6e[_0x28a70f(0x24b)]({'path':_0x28a70f(0x2a2),'message':_0x28a70f(0x278)});const _0xf76529=new Map(),_0x4141c=new Map(),_0x137dbf=new Map(),_0x2291ed=new Set();_0x441721[_0x28a70f(0x23a)][_0x28a70f(0x197)]((_0x4b343c,_0x256391)=>{const _0x409736=_0x28a70f,_0x297a6f=_0x409736(0x1f4)+_0x256391+']';if(!isRecord(_0x4b343c)){_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f,'message':_0x409736(0x1c8)});return;}const _0x398808=_0x4b343c;_0x137dbf[_0x409736(0x294)](_0x398808,_0x297a6f);const _0x402225=resolveEdgeEndpoint(_0x398808[_0x409736(0x259)],_0x398808['sourceNodeId']),_0x1ef0c3=resolveEdgeEndpoint(_0x398808['target'],_0x398808['targetNodeId']);if(!_0x402225)_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1b9),'message':_0x409736(0x213)});if(!_0x1ef0c3)_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1ee),'message':_0x409736(0x26f)});_0x402225&&!_0x3b2f97[_0x409736(0x29d)](_0x402225)&&_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1b9),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x402225+'.'});_0x1ef0c3&&!_0x3b2f97[_0x409736(0x29d)](_0x1ef0c3)&&_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1ee),'message':_0x409736(0x1ba)+_0x1ef0c3+'.'});if(_0x398808['id']!==undefined){if(typeof _0x398808['id']!==_0x409736(0x27d)||!BPMN_ID_PATTERN[_0x409736(0x2dc)](_0x398808['id']))_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+'.id','message':_0x409736(0x273)});else{if(_0x1569a7[_0x409736(0x29d)](_0x398808['id']))_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f+_0x409736(0x1c7),'message':_0x409736(0x270)+_0x398808['id']+'.'});else!_0x1569a7[_0x409736(0x29d)](_0x398808['id'])&&_0x1569a7[_0x409736(0x26d)](_0x398808['id']);}}if(_0x402225&&_0x1ef0c3){const _0x354c44=_0x402225+'\x00'+_0x1ef0c3+'\x00'+(_0x398808[_0x409736(0x18c)]??_0x409736(0x1a8));_0x2291ed[_0x409736(0x29d)](_0x354c44)?_0x81fa6e[_0x409736(0x24b)]({'path':_0x297a6f,'message':_0x409736(0x1b4)+_0x402225+_0x409736(0x1cc)+_0x1ef0c3+'\x20('+(_0x398808[_0x409736(0x18c)]??_0x409736(0x1a8))+').'}):_0x2291ed[_0x409736(0x26d)](_0x354c44);}validateEdge(_0x398808,_0x297a6f,_0x81fa6e),_0x402225&&_0x1ef0c3&&(_0xf76529[_0x409736(0x28e)](_0x402225)?.['push'](_0x398808)??_0xf76529[_0x409736(0x294)](_0x402225,[_0x398808]),_0x4141c[_0x409736(0x28e)](_0x1ef0c3)?.['push'](_0x398808)??_0x4141c[_0x409736(0x294)](_0x1ef0c3,[_0x398808]));});if(_0x5397ce['length']!==0x1)return;validateGraphShape(_0x3b2f97,_0x5397ce[0x0],_0x547efe,_0xf76529,_0x4141c,_0x137dbf,_0x81fa6e),validateScriptResultReferences(_0x3b2f97,_0x5397ce[0x0],_0xf76529,_0x4141c,_0x137dbf,_0x84de6e,_0x81fa6e),validateApprovalResults(_0x3b2f97,_0xdfc8c3,_0x547efe,_0x81fa6e);}function validateNode(_0x23fd6c,_0x50ca2e,_0xfe53bb){const _0x242d1c=a269_0x1c57b2;for(const _0x248a29 of[_0x242d1c(0x276),_0x242d1c(0x2a6)]){Object[_0x242d1c(0x19c)][_0x242d1c(0x242)][_0x242d1c(0x2bc)](_0x23fd6c,_0x248a29)&&_0xfe53bb['push']({'path':_0x50ca2e+'.'+_0x248a29,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x242d1c(0x29d)](_0x23fd6c[_0x242d1c(0x174)]))return;(typeof _0x23fd6c['name']!==_0x242d1c(0x27d)||_0x23fd6c[_0x242d1c(0x233)][_0x242d1c(0x2d3)]()==='')&&_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x2aa),'message':_0x242d1c(0x2b0)});if(_0x23fd6c[_0x242d1c(0x207)]!==undefined){if(!Number[_0x242d1c(0x1ab)](_0x23fd6c[_0x242d1c(0x207)])||_0x23fd6c[_0x242d1c(0x207)]<=0x0)_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2df),'message':_0x242d1c(0x1b1)});else _0x23fd6c['type']!==_0x242d1c(0x179)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.pageId','message':'node\x20pageId\x20is\x20supported\x20only\x20on\x20APPROVAL\x20user\x20tasks.'});}const _0x6b5cfe=_0x23fd6c[_0x242d1c(0x2c1)];if(!isRecord(_0x6b5cfe))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1aa),'message':_0x242d1c(0x27a)});else for(const _0x5a6240 of['x','y']){const _0x1d0237=_0x6b5cfe[_0x5a6240];(typeof _0x1d0237!==_0x242d1c(0x295)||!Number[_0x242d1c(0x28d)](_0x1d0237)||_0x1d0237<0x0)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x186)+_0x5a6240,'message':_0x242d1c(0x235)+_0x5a6240+_0x242d1c(0x274)});}if(_0x23fd6c[_0x242d1c(0x174)]==='APPROVAL'){const _0x14ccca=_0x23fd6c[_0x242d1c(0x25d)]??'SINGLE',_0x3439b5=_0x23fd6c[_0x242d1c(0x279)]??_0x242d1c(0x179);!APPROVAL_TASK_MODES[_0x242d1c(0x29d)](_0x3439b5)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2e7),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x3439b5)+'.'});!APPROVAL_MODES[_0x242d1c(0x29d)](_0x14ccca)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x19d),'message':_0x242d1c(0x19e)+String(_0x14ccca)+'.'});if(!isRecord(_0x23fd6c[_0x242d1c(0x24f)]))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x199),'message':_0x242d1c(0x2e0)});else{const _0x213e6d=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x229)];_0x213e6d!==_0x242d1c(0x256)&&_0x213e6d!=='ROLE'&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1e5),'message':_0x242d1c(0x21a)});if(_0x213e6d===_0x242d1c(0x256)){const _0x51e971=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x249)];if(!Array[_0x242d1c(0x230)](_0x51e971)||_0x51e971[_0x242d1c(0x2cc)]===0x0)_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2d8),'message':_0x242d1c(0x24a)});else{const _0x39819f=_0x51e971[_0x242d1c(0x21e)](_0x1eeff7=>!isValidUserId(_0x1eeff7));_0x39819f>=0x0&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x219)+_0x39819f+']','message':_0x242d1c(0x285)});const _0x1e296b=new Set(_0x51e971['filter'](isValidUserId)[_0x242d1c(0x1bb)](_0x53431d=>String(_0x53431d)[_0x242d1c(0x2d3)]()));_0x14ccca===_0x242d1c(0x2d6)&&_0x1e296b[_0x242d1c(0x27c)]>0x1&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2d8),'message':_0x242d1c(0x2db)});}}if(_0x213e6d===_0x242d1c(0x1b5)){const _0x4b6b97=_0x23fd6c[_0x242d1c(0x24f)][_0x242d1c(0x1a7)],_0x14c26e=typeof _0x4b6b97===_0x242d1c(0x295)||typeof _0x4b6b97==='string'?Number(String(_0x4b6b97)[_0x242d1c(0x2d3)]()):Number[_0x242d1c(0x25a)];(!Number['isSafeInteger'](_0x14c26e)||_0x14c26e<=0x0)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.assignee.roleId','message':_0x242d1c(0x236)});}}if(_0x23fd6c[_0x242d1c(0x255)]!==undefined){if(!isRecord(_0x23fd6c['transferCandidates']))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1f8),'message':_0x242d1c(0x2ce)});else{if(_0x23fd6c[_0x242d1c(0x255)][_0x242d1c(0x229)]!==_0x242d1c(0x256))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x2a7),'message':_0x242d1c(0x264)});else{const _0x6d92ed=_0x23fd6c[_0x242d1c(0x255)][_0x242d1c(0x249)];if(!Array['isArray'](_0x6d92ed)||_0x6d92ed[_0x242d1c(0x2cc)]===0x0)_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x2c8),'message':_0x242d1c(0x2c9)});else{const _0x1c4835=_0x6d92ed[_0x242d1c(0x21e)](_0x346841=>!isValidUserId(_0x346841));_0x1c4835>=0x0&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x1c2)+_0x1c4835+']','message':_0x242d1c(0x299)});}}}}}_0x23fd6c[_0x242d1c(0x26e)]!==undefined&&typeof _0x23fd6c['sequential']!==_0x242d1c(0x1af)&&_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+_0x242d1c(0x26b),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x23fd6c[_0x242d1c(0x174)]===_0x242d1c(0x1e2)){(typeof _0x23fd6c[_0x242d1c(0x191)]!==_0x242d1c(0x27d)||_0x23fd6c['scriptName'][_0x242d1c(0x2d3)]()==='')&&_0xfe53bb['push']({'path':_0x50ca2e+_0x242d1c(0x211),'message':_0x242d1c(0x1ca)});if(_0x23fd6c['resultVariable']!==undefined){if(typeof _0x23fd6c[_0x242d1c(0x20d)]!==_0x242d1c(0x27d)||!VARIABLE_PATTERN[_0x242d1c(0x2dc)](_0x23fd6c[_0x242d1c(0x20d)]))_0xfe53bb[_0x242d1c(0x24b)]({'path':_0x50ca2e+'.resultVariable','message':_0x242d1c(0x1ea)});else(RESERVED_RESULT_VARIABLES[_0x242d1c(0x29d)](_0x23fd6c[_0x242d1c(0x20d)])||_0x23fd6c[_0x242d1c(0x20d)]['startsWith'](_0x242d1c(0x253)))&&_0xfe53bb['push']({'path':_0x50ca2e+'.resultVariable','message':_0x242d1c(0x18f)+_0x23fd6c['resultVariable']+'.'});}}validateAsyncExecution(_0x23fd6c,_0x50ca2e,_0xfe53bb),validateApprovalTimeout(_0x23fd6c,_0x50ca2e,_0xfe53bb),validateCcConfig(_0x23fd6c,_0x50ca2e,_0xfe53bb),_0x23fd6c[_0x242d1c(0x174)]===_0x242d1c(0x2da)&&validateNotificationConfig(_0x23fd6c[_0x242d1c(0x288)],_0x50ca2e+_0x242d1c(0x2ae),_0xfe53bb);}function validateAsyncExecution(_0x16306e,_0x591914,_0x351d07){const _0x32a796=a269_0x1c57b2;if(_0x16306e[_0x32a796(0x1d8)]===undefined)return;if(!isRecord(_0x16306e[_0x32a796(0x1d8)])){_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+'.async','message':_0x32a796(0x21f)});return;}if(_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==undefined&&typeof _0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==_0x32a796(0x1af)){_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x185),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1b2)]!==!![])return;_0x16306e[_0x32a796(0x174)]!==_0x32a796(0x1e2)&&_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x1e1),'message':_0x32a796(0x1c4)});const _0xe84fe7=_0x16306e[_0x32a796(0x1d8)][_0x32a796(0x1f0)]??0x3;(!Number[_0x32a796(0x1f6)](_0xe84fe7)||_0xe84fe7<0x1||_0xe84fe7>MAX_ASYNC_RETRY_COUNT)&&_0x351d07[_0x32a796(0x24b)]({'path':_0x591914+_0x32a796(0x19a),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x16306e['async'][_0x32a796(0x29f)]!==undefined&&validateTimeAmount(_0x16306e[_0x32a796(0x1d8)]['retryInterval'],_0x591914+_0x32a796(0x1fe),_0x351d07);}function validateApprovalTimeout(_0x11b101,_0x2764c1,_0x3892d7){const _0x1a4375=a269_0x1c57b2;if(_0x11b101[_0x1a4375(0x2d0)]===undefined)return;if(!isRecord(_0x11b101[_0x1a4375(0x2d0)])){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x192),'message':_0x1a4375(0x2b8)});return;}if(_0x11b101['timeout'][_0x1a4375(0x1b2)]!==undefined&&typeof _0x11b101['timeout'][_0x1a4375(0x1b2)]!==_0x1a4375(0x1af)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x238),'message':_0x1a4375(0x1e4)});return;}if(_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x1b2)]!==!![])return;if(_0x11b101['timeout'][_0x1a4375(0x2ab)]!==undefined&&typeof _0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x2ab)]!==_0x1a4375(0x1af)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout.interrupting','message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x11b101['type']!==_0x1a4375(0x179)&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout','message':_0x1a4375(0x202)});validateTimeAmount(_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x1db)],_0x2764c1+_0x1a4375(0x204),_0x3892d7);const _0x59e688=_0x11b101['timeout'][_0x1a4375(0x29b)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x1a4375(0x29d)](_0x59e688)){_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+'.timeout.action','message':_0x1a4375(0x1c0)});return;}(_0x11b101[_0x1a4375(0x279)]??_0x1a4375(0x179))==='HANDLE'&&_0x59e688!==_0x1a4375(0x266)&&_0x3892d7['push']({'path':_0x2764c1+'.timeout.action','message':_0x1a4375(0x2d1)});const _0x3bd6b2=_0x11b101[_0x1a4375(0x2d0)]['interrupting']??_0x59e688!==_0x1a4375(0x266);if(_0x59e688===_0x1a4375(0x266))_0x3bd6b2&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x1b7),'message':_0x1a4375(0x2b9)}),(typeof _0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x191)]!==_0x1a4375(0x27d)||_0x11b101[_0x1a4375(0x2d0)][_0x1a4375(0x191)][_0x1a4375(0x2d3)]()==='')&&_0x3892d7['push']({'path':_0x2764c1+'.timeout.scriptName','message':_0x1a4375(0x1ff)}),validateOptionalResultVariable(_0x11b101['timeout']['resultVariable'],_0x2764c1+_0x1a4375(0x29c),_0x3892d7);else!_0x3bd6b2&&_0x3892d7[_0x1a4375(0x24b)]({'path':_0x2764c1+_0x1a4375(0x1b7),'message':_0x59e688+_0x1a4375(0x2e8)});}function validateTimeAmount(_0x5350a9,_0x2ef3bd,_0x39c02f){const _0x4749c1=a269_0x1c57b2;if(!isRecord(_0x5350a9)){_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x4749c1(0x1f6)](_0x5350a9[_0x4749c1(0x212)])||Number(_0x5350a9[_0x4749c1(0x212)])<=0x0)&&_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd+_0x4749c1(0x2a0),'message':_0x4749c1(0x267)}),!FLOW_TIME_UNITS[_0x4749c1(0x29d)](_0x5350a9[_0x4749c1(0x1ad)])&&_0x39c02f[_0x4749c1(0x24b)]({'path':_0x2ef3bd+_0x4749c1(0x2c6),'message':_0x4749c1(0x17c)});}function validateOptionalResultVariable(_0x107e60,_0x7e08e2,_0x4e156e){const _0x2f699e=a269_0x1c57b2;if(_0x107e60===undefined||_0x107e60===null||_0x107e60==='')return;if(typeof _0x107e60!=='string'||!VARIABLE_PATTERN[_0x2f699e(0x2dc)](_0x107e60))_0x4e156e[_0x2f699e(0x24b)]({'path':_0x7e08e2,'message':_0x2f699e(0x1ea)});else(RESERVED_RESULT_VARIABLES[_0x2f699e(0x29d)](_0x107e60)||_0x107e60[_0x2f699e(0x262)](_0x2f699e(0x253)))&&_0x4e156e['push']({'path':_0x7e08e2,'message':_0x2f699e(0x18f)+_0x107e60+'.'});}function validateCcConfig(_0xc39b0e,_0x1bf2fd,_0x10c9b9){const _0x5c173e=a269_0x1c57b2;if(_0xc39b0e['cc']===undefined)return;if(!isRecord(_0xc39b0e['cc'])){_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x292),'message':_0x5c173e(0x177)});return;}_0xc39b0e[_0x5c173e(0x174)]!==_0x5c173e(0x290)&&_0xc39b0e[_0x5c173e(0x174)]!==_0x5c173e(0x179)&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+'.cc','message':_0x5c173e(0x225)});Object['prototype'][_0x5c173e(0x242)][_0x5c173e(0x2bc)](_0xc39b0e['cc'],_0x5c173e(0x1d4))&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x28a),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3700ef=_0xc39b0e['cc']['recipientUserIds'];if(!Array[_0x5c173e(0x230)](_0x3700ef)||_0x3700ef['length']===0x0)_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x2b5),'message':_0x5c173e(0x215)});else{_0x3700ef[_0x5c173e(0x2cc)]>MAX_CC_RECIPIENTS&&_0x10c9b9[_0x5c173e(0x24b)]({'path':_0x1bf2fd+_0x5c173e(0x2b5),'message':_0x5c173e(0x1a0)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x50c5a4=new Set();_0x3700ef['forEach']((_0xf08839,_0x5ccd44)=>{const _0x5eefe2=_0x5c173e;if(typeof _0xf08839!==_0x5eefe2(0x27d)||_0xf08839[_0x5eefe2(0x2d3)]()==='')_0x10c9b9['push']({'path':_0x1bf2fd+_0x5eefe2(0x1f7)+_0x5ccd44+']','message':_0x5eefe2(0x1fb)});else _0x50c5a4['has'](_0xf08839[_0x5eefe2(0x2d3)]())?_0x10c9b9[_0x5eefe2(0x24b)]({'path':_0x1bf2fd+_0x5eefe2(0x1f7)+_0x5ccd44+']','message':_0x5eefe2(0x1d3)+_0xf08839['trim']()+'.'}):_0x50c5a4[_0x5eefe2(0x26d)](_0xf08839[_0x5eefe2(0x2d3)]());});}validateStringArray(_0xc39b0e['cc'][_0x5c173e(0x25c)],_0x1bf2fd+_0x5c173e(0x297),_0x10c9b9);}function a269_0x40e0(_0x55d8a4,_0x47a25e){_0x55d8a4=_0x55d8a4-0x172;const _0x592307=a269_0x5923();let _0x40e0af=_0x592307[_0x55d8a4];return _0x40e0af;}function validateStringArray(_0x7cc5aa,_0x1efc5a,_0x2c98c6){const _0x9fd95d=a269_0x1c57b2;if(_0x7cc5aa===undefined)return;if(!Array[_0x9fd95d(0x230)](_0x7cc5aa)){_0x2c98c6[_0x9fd95d(0x24b)]({'path':_0x1efc5a,'message':_0x9fd95d(0x29e)});return;}const _0x2292e3=new Set();_0x7cc5aa[_0x9fd95d(0x197)]((_0x2d2642,_0x1cba82)=>{const _0x37e32a=_0x9fd95d;if(typeof _0x2d2642!==_0x37e32a(0x27d)||_0x2d2642[_0x37e32a(0x2d3)]()==='')_0x2c98c6[_0x37e32a(0x24b)]({'path':_0x1efc5a+'['+_0x1cba82+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x2292e3[_0x37e32a(0x29d)](_0x2d2642[_0x37e32a(0x2d3)]())?_0x2c98c6[_0x37e32a(0x24b)]({'path':_0x1efc5a+'['+_0x1cba82+']','message':_0x37e32a(0x17f)+_0x2d2642[_0x37e32a(0x2d3)]()+'.'}):_0x2292e3[_0x37e32a(0x26d)](_0x2d2642['trim']());});}function validateNotificationConfig(_0x22c18d,_0x1fa62e,_0x2daa21){const _0x42bb99=a269_0x1c57b2;if(!isRecord(_0x22c18d)){_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e,'message':_0x42bb99(0x1cd)});return;}if(_0x22c18d[_0x42bb99(0x1b0)]!==undefined&&_0x22c18d['version']!==null){if(typeof _0x22c18d[_0x42bb99(0x1b0)]!==_0x42bb99(0x27d))_0x2daa21['push']({'path':_0x1fa62e+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x22c18d[_0x42bb99(0x1b0)][_0x42bb99(0x2d3)]()&&_0x22c18d['version'][_0x42bb99(0x2d3)]()!=='v1'&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x1d2),'message':_0x42bb99(0x1ed)+_0x22c18d[_0x42bb99(0x1b0)]+'.'});}const _0x2ebf06=requireNotificationString(_0x22c18d[_0x42bb99(0x2c0)],_0x1fa62e+_0x42bb99(0x2d4),_0x42bb99(0x289),_0x2daa21);_0x2ebf06?.[_0x42bb99(0x29a)]('${')&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x2d4),'message':_0x42bb99(0x260)});if(_0x22c18d[_0x42bb99(0x2d2)]!==undefined&&_0x22c18d['failurePolicy']!==null){if(typeof _0x22c18d[_0x42bb99(0x2d2)]!==_0x42bb99(0x27d))_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x22b),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x42bb99(0x29d)](_0x22c18d['failurePolicy'][_0x42bb99(0x2d3)]()['toUpperCase']())&&_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x22b),'message':_0x42bb99(0x2d9)});}!isRecord(_0x22c18d[_0x42bb99(0x1b8)])?_0x2daa21[_0x42bb99(0x24b)]({'path':_0x1fa62e+_0x42bb99(0x1eb),'message':_0x42bb99(0x28c)}):validateNotificationTemplate(_0x22c18d[_0x42bb99(0x1b8)],_0x1fa62e+_0x42bb99(0x1eb),_0x2daa21),validateNotificationRecipients(_0x22c18d['recipients'],_0x1fa62e+'.recipients',_0x2daa21);}function validateNotificationTemplate(_0x195dd6,_0x158bda,_0x4c6fbe){const _0x46220e=a269_0x1c57b2;for(const _0x3e91db of['title','summary']){const _0x248fe8=requireNotificationString(_0x195dd6[_0x3e91db],_0x158bda+'.'+_0x3e91db,_0x46220e(0x2c3)+_0x3e91db+_0x46220e(0x18b),_0x4c6fbe);if(_0x248fe8)validateNotificationPlaceholders(_0x248fe8,_0x158bda+'.'+_0x3e91db,_0x4c6fbe);}_0x195dd6[_0x46220e(0x244)]!==undefined&&_0x195dd6[_0x46220e(0x244)]!==null&&(typeof _0x195dd6[_0x46220e(0x244)]!=='string'?_0x4c6fbe[_0x46220e(0x24b)]({'path':_0x158bda+_0x46220e(0x2b6),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x195dd6[_0x46220e(0x244)],_0x158bda+'.detailMarkdown',_0x4c6fbe)),validateNotificationFacts(_0x195dd6[_0x46220e(0x190)],_0x158bda+_0x46220e(0x23c),_0x4c6fbe),validateNotificationActions(_0x195dd6[_0x46220e(0x200)],_0x158bda+_0x46220e(0x198),_0x4c6fbe);}function a269_0x5923(){const _0x227234=['targetNodeId','waypoint.','isArray','approval_sys_operationType','.url','name','(?![A-Za-z0-9_])','position.','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','195606BYuADo','.timeout.enabled','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','edges','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.facts','ALL','message','object','Duplicate\x20resultVariable:\x20','summary','hasOwnProperty','.waypoints','detailMarkdown','flowJson.pageMode','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.\x20This\x20CLI\x20supports\x20only\x20','matchAll','userIds','FIXED\x20assignee\x20requires\x20userIds.','push','flowName\x20is\x20required.','bindDatasetCode','flowJson.nodes.','assignee','Notification\x20template.actions\x20must\x20be\x20an\x20array.','recipientUserIds','.role','approval_sys_','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','transferCandidates','FIXED','scriptResult','indexOf','source','NaN','Rabetbase\x20FlowConfig','visible','approvalMode','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','expression','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','flowType','startsWith','HANDLE','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','pageMode','EXECUTE_BFF','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.type','].taskMode','result','.sequential','Notification\x20fact.','add','sequential','edge\x20target\x20is\x20required.','Duplicate\x20BPMN\x20element\x20id:\x20','templateName','SECONDS','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','form','EXPRESSION','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','taskMode','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','flowJson.startPageId','size','string','startPageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','pid','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','slice',',\x20but\x20node\x20','label','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','#/$defs/position','config','Notification\x20configCode\x20is\x20required.','.cc.readSources','.conditionType','NOTIFICATION\x20node\x20requires\x20template.','isFinite','get','integer','END','datasetCode\x20must\x20be\x20a\x20string.','.cc','stringify','set','number','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.cc.visible','ANY','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','includes','action','.timeout.resultVariable','has','value\x20must\x20be\x20an\x20array.','retryInterval','.value','Node\x20has\x20no\x20incoming\x20edge.','flowJson.nodes','Node\x20cannot\x20reach\x20any\x20END.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','Unsupported\x20notification\x20placeholder:\x20','formPermission','.transferCandidates.strategy','formPermissions','Unsupported\x20flowType:\x20','.name','interrupting','metadata','EMAIL','.config','].pageId','Every\x20node\x20requires\x20a\x20non-empty\x20name.','formSchema','waypoints\x20must\x20be\x20an\x20array.','text','role','.cc.recipientUserIds','.detailMarkdown','replace','timeout\x20must\x20be\x20an\x20object.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','node\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','call','flowKey','Unsupported\x20pageMode:\x20','3911413ZkqOpQ','configCode','position','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20template.','\x20was\x20empty\x20and\x20was\x20removed.','Notification\x20template\x20supports\x20at\x20most\x20','.unit','edges\x20must\x20be\x20an\x20array.','.transferCandidates.userIds','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','945492FJNsJh','Notification\x20action.url\x20is\x20required.','length','2ZWYFSA','transferCandidates\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','timeout','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','failurePolicy','trim','.configCode','flowType\x20is\x20required.','SINGLE','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','.assignee.userIds','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','NOTIFICATION','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','test','toUpperCase','context','.pageId','APPROVAL\x20node\x20requires\x20assignee.','empty_metadata_removed','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','datasetCode','Node\x20has\x20no\x20outgoing\x20edge.','147HrtKJb','schemaVersion','.taskMode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','\x20actions.','type','__rabetbase_local_validation__','flowJson.edges','cc\x20must\x20be\x20an\x20object.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','APPROVAL','DAYS','flowJson.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','CONTINUE','Duplicate\x20value:\x20','REJECTED','https://lovrabet.com/schema/rabetbase-flow-config.json','3782862MsUGYP','title','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','.async.enabled','.position.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','formDefinitions','appCode','flowJson\x20must\x20be\x20an\x20object.','\x20is\x20required.','conditionType','Notification\x20recipient.value\x20is\x20required.','approval_sys_datasetCode','Reserved\x20resultVariable:\x20','facts','scriptName','.timeout','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','FORM_FLOW','waypoints','^[A-Za-z_][A-Za-z0-9_]*$','forEach','.actions','.assignee','.async.retryCount','.expression','prototype','.approvalMode','Unsupported\x20approval\x20mode:\x20','START','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowName','.waypoints[','\x5c$&','Notification\x20fact\x20must\x20be\x20an\x20object.','mode','#/$defs/flowEdge','roleId','ALWAYS','Unsupported\x20condition\x20type:\x20','.position','isSafeInteger','url','unit','target','boolean','version','node\x20pageId\x20must\x20be\x20a\x20positive\x20integer.','enabled','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','Duplicate\x20edge\x20route:\x20','ROLE','catch','.timeout.interrupting','template','.source','Edge\x20target\x20node\x20not\x20found:\x20','map','some','.tmp','approved','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','FAIL','.transferCandidates.userIds[','warnings','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','AUTO_REJECT','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.id','edge\x20must\x20be\x20an\x20object.','96HqgFKV','SCRIPT\x20node\x20requires\x20scriptName.','overwrite','\x20->\x20','NOTIFICATION\x20node\x20requires\x20config.','parse','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','legacy_field_removed','.version','Duplicate\x20cc\x20recipient\x20userId:\x20','readSources','Node\x20is\x20not\x20reachable\x20from\x20START.','approval_sys_initiatorUserId','utf8','async','delete','every','duration','Unsupported\x20node\x20type:\x20','3593032oeLddZ','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','flowCode','flowJson','.async','SCRIPT','CONDITION','timeout.enabled\x20must\x20be\x20a\x20boolean.','.assignee.strategy','40qqvWTU','array','#/$defs/userId','Notification\x20recipient.type\x20is\x20required.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.template','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','Unsupported\x20notification\x20version:\x20','.target','(?<![A-Za-z0-9_])','retryCount','USER','APPROVED','3186873EUfcGi','flowJson.edges[','defaultFlow','isInteger','.cc.recipientUserIds[','.transferCandidates','\x20facts.','BCC','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','defaultFlow\x20must\x20be\x20a\x20boolean.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.async.retryInterval','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','actions','sourceNodeId','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','MINUTES','.timeout.duration','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','Notification\x20recipients\x20must\x20be\x20an\x20array.','pageId','30KwLyWl','#/$defs/flowNode','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','approval_sys_appCode','filter','resultVariable','.text','AUTO_APPROVE','variables','.scriptName','value','edge\x20source\x20is\x20required.','nodes','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','Unsupported\x20schemaVersion:\x20','flowJson.nodes[','CUSTOM_PAGE','.assignee.userIds[','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','edge\x20name\x20must\x20be\x20a\x20string.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','PLATFORM_FORM','findIndex','async\x20must\x20be\x20an\x20object.','keys','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','147793yBakAE','.defaultFlow','startPageId','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','node\x20pageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20recipient\x20must\x20be\x20an\x20object.','flowDesc','strategy','INDEPENDENT_FLOW','.failurePolicy','approval.simple-flow.v1','No\x20END\x20node\x20is\x20reachable\x20from\x20START.'];a269_0x5923=function(){return _0x227234;};return a269_0x5923();}function validateNotificationFacts(_0x193d1e,_0x436896,_0x24bf57){const _0x1c34a5=a269_0x1c57b2;if(_0x193d1e===undefined||_0x193d1e===null)return;if(!Array[_0x1c34a5(0x230)](_0x193d1e)){_0x24bf57['push']({'path':_0x436896,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x193d1e[_0x1c34a5(0x2cc)]>MAX_NOTIFICATION_FACTS&&_0x24bf57[_0x1c34a5(0x24b)]({'path':_0x436896,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x1c34a5(0x1f9)}),_0x193d1e[_0x1c34a5(0x197)]((_0x4239d0,_0x942ab0)=>{const _0x7b530a=_0x1c34a5,_0x135c73=_0x436896+'['+_0x942ab0+']';if(!isRecord(_0x4239d0)){_0x24bf57[_0x7b530a(0x24b)]({'path':_0x135c73,'message':_0x7b530a(0x1a4)});return;}for(const _0x387943 of[_0x7b530a(0x284),'value']){const _0x68426e=requireNotificationString(_0x4239d0[_0x387943],_0x135c73+'.'+_0x387943,_0x7b530a(0x26c)+_0x387943+'\x20is\x20required.',_0x24bf57);_0x68426e&&validateNotificationPlaceholders(_0x68426e,_0x135c73+'.'+_0x387943,_0x24bf57);}});}function validateNotificationActions(_0x28e8ef,_0x2d9bbb,_0x54a3ff){const _0x188794=a269_0x1c57b2;if(_0x28e8ef===undefined||_0x28e8ef===null)return;if(!Array['isArray'](_0x28e8ef)){_0x54a3ff[_0x188794(0x24b)]({'path':_0x2d9bbb,'message':_0x188794(0x250)});return;}_0x28e8ef['length']>MAX_NOTIFICATION_ACTIONS&&_0x54a3ff['push']({'path':_0x2d9bbb,'message':_0x188794(0x2c5)+MAX_NOTIFICATION_ACTIONS+_0x188794(0x173)}),_0x28e8ef[_0x188794(0x197)]((_0x394846,_0x36e0f4)=>{const _0x23b56d=_0x188794,_0x3a99b2=_0x2d9bbb+'['+_0x36e0f4+']';if(!isRecord(_0x394846)){_0x54a3ff[_0x23b56d(0x24b)]({'path':_0x3a99b2,'message':'Notification\x20action\x20must\x20be\x20an\x20object.'});return;}const _0x493a10=requireNotificationString(_0x394846[_0x23b56d(0x2b3)],_0x3a99b2+_0x23b56d(0x20e),'Notification\x20action.text\x20is\x20required.',_0x54a3ff);if(_0x493a10)validateNotificationPlaceholders(_0x493a10,_0x3a99b2+_0x23b56d(0x20e),_0x54a3ff);const _0x2f0f0a=requireNotificationString(_0x394846[_0x23b56d(0x1ac)],_0x3a99b2+_0x23b56d(0x232),_0x23b56d(0x2cb),_0x54a3ff);if(!_0x2f0f0a)return;validateNotificationPlaceholders(_0x2f0f0a,_0x3a99b2+_0x23b56d(0x232),_0x54a3ff),!/^https?:\/\//i['test'](_0x2f0f0a)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x23b56d(0x2dc)](_0x2f0f0a)&&_0x54a3ff[_0x23b56d(0x24b)]({'path':_0x3a99b2+_0x23b56d(0x232),'message':_0x23b56d(0x1bf)});});}function validateNotificationRecipients(_0x1d716d,_0x3b01e2,_0x1bac25){const _0x5e21c0=a269_0x1c57b2;if(_0x1d716d===undefined||_0x1d716d===null)return;if(!Array[_0x5e21c0(0x230)](_0x1d716d)){_0x1bac25[_0x5e21c0(0x24b)]({'path':_0x3b01e2,'message':_0x5e21c0(0x206)});return;}let _0x33f0f6=![];_0x1d716d[_0x5e21c0(0x197)]((_0xd61705,_0xa94566)=>{const _0x13fadf=_0x5e21c0,_0x254aff=_0x3b01e2+'['+_0xa94566+']';if(!isRecord(_0xd61705)){_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff,'message':_0x13fadf(0x227)});return;}const _0x50c5c2=requireNotificationString(_0xd61705[_0x13fadf(0x174)],_0x254aff+_0x13fadf(0x268),_0x13fadf(0x1e9),_0x1bac25);_0x50c5c2&&!NOTIFICATION_RECIPIENT_TYPES[_0x13fadf(0x29d)](_0x50c5c2[_0x13fadf(0x2dd)]())&&_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x268),'message':_0x13fadf(0x20a)});let _0x265288='TO';_0xd61705['role']!==undefined&&_0xd61705[_0x13fadf(0x2b4)]!==null&&(typeof _0xd61705[_0x13fadf(0x2b4)]!==_0x13fadf(0x27d)?(_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x252),'message':_0x13fadf(0x21c)}),_0x265288=''):(_0x265288=_0xd61705[_0x13fadf(0x2b4)]['trim']()[_0x13fadf(0x2dd)](),!NOTIFICATION_RECIPIENT_ROLES[_0x13fadf(0x29d)](_0x265288)&&_0x1bac25[_0x13fadf(0x24b)]({'path':_0x254aff+_0x13fadf(0x252),'message':_0x13fadf(0x286)})));if(_0x265288==='TO')_0x33f0f6=!![];const _0x5f22b8=requireNotificationString(_0xd61705[_0x13fadf(0x212)],_0x254aff+_0x13fadf(0x2a0),_0x13fadf(0x18d),_0x1bac25);_0x5f22b8&&validateNotificationPlaceholders(_0x5f22b8,_0x254aff+_0x13fadf(0x2a0),_0x1bac25);}),_0x1d716d[_0x5e21c0(0x2cc)]>0x0&&!_0x33f0f6&&_0x1bac25[_0x5e21c0(0x24b)]({'path':_0x3b01e2,'message':_0x5e21c0(0x172)});}function requireNotificationString(_0x3fac3a,_0x33aaba,_0x644aec,_0x1f29c5){const _0x1f86ba=a269_0x1c57b2;if(typeof _0x3fac3a!==_0x1f86ba(0x27d)||_0x3fac3a['trim']()==='')return _0x1f29c5[_0x1f86ba(0x24b)]({'path':_0x33aaba,'message':_0x644aec}),undefined;return _0x3fac3a[_0x1f86ba(0x2d3)]();}function validateNotificationPlaceholders(_0x390db3,_0x2adb53,_0x4d348c){const _0x32b36d=a269_0x1c57b2;for(const _0x1dce13 of _0x390db3[_0x32b36d(0x248)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x434281=_0x1dce13[0x1]?.['trim']()??'',_0x3d5488=_0x434281[_0x32b36d(0x258)]('.'),_0x5e54b2=_0x3d5488>=0x0?_0x434281[_0x32b36d(0x282)](0x0,_0x3d5488):_0x434281,_0x21e2e7=_0x3d5488>=0x0?_0x434281[_0x32b36d(0x282)](_0x3d5488+0x1)[_0x32b36d(0x2d3)]():'';(!['event',_0x32b36d(0x2de),_0x32b36d(0x210)][_0x32b36d(0x29a)](_0x5e54b2)||_0x21e2e7==='')&&_0x4d348c['push']({'path':_0x2adb53,'message':_0x32b36d(0x2a5)+_0x1dce13[0x0]+'.'});}_0x390db3[_0x32b36d(0x2b7)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x32b36d(0x29a)]('${')&&_0x4d348c['push']({'path':_0x2adb53,'message':_0x32b36d(0x2cf)});}function validateEdge(_0x161b0c,_0x5067e8,_0x3b0508){const _0x22e370=a269_0x1c57b2;_0x161b0c[_0x22e370(0x233)]!==undefined&&typeof _0x161b0c[_0x22e370(0x233)]!==_0x22e370(0x27d)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.name','message':_0x22e370(0x21b)}),_0x161b0c[_0x22e370(0x1f5)]!==undefined&&typeof _0x161b0c['defaultFlow']!==_0x22e370(0x1af)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.defaultFlow','message':_0x22e370(0x1fc)}),_0x161b0c['waypoints']!==undefined&&(!Array[_0x22e370(0x230)](_0x161b0c[_0x22e370(0x195)])?_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x243),'message':_0x22e370(0x2b2)}):_0x161b0c[_0x22e370(0x195)][_0x22e370(0x197)]((_0x54a93e,_0x179b90)=>{const _0x4afbfc=_0x22e370;if(!isRecord(_0x54a93e)){_0x3b0508['push']({'path':_0x5067e8+'.waypoints['+_0x179b90+']','message':_0x4afbfc(0x1b3)});return;}for(const _0x5f531f of['x','y']){const _0x502655=_0x54a93e[_0x5f531f];(typeof _0x502655!==_0x4afbfc(0x295)||!Number[_0x4afbfc(0x28d)](_0x502655))&&_0x3b0508['push']({'path':_0x5067e8+_0x4afbfc(0x1a2)+_0x179b90+'].'+_0x5f531f,'message':_0x4afbfc(0x22f)+_0x5f531f+_0x4afbfc(0x2c2)});}})),_0x161b0c[_0x22e370(0x18c)]!==undefined&&!CONDITION_TYPES[_0x22e370(0x29d)](_0x161b0c[_0x22e370(0x18c)])&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+'.conditionType','message':_0x22e370(0x1a9)+String(_0x161b0c['conditionType'])+'.'}),_0x161b0c[_0x22e370(0x18c)]===_0x22e370(0x277)&&(typeof _0x161b0c[_0x22e370(0x25f)]!==_0x22e370(0x27d)||_0x161b0c[_0x22e370(0x25f)]['trim']()==='')&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x19b),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x161b0c[_0x22e370(0x1f5)]===!![]&&_0x161b0c[_0x22e370(0x18c)]!==_0x22e370(0x1a8)&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x223),'message':_0x22e370(0x254)}),_0x161b0c[_0x22e370(0x1f5)]===!![]&&typeof _0x161b0c[_0x22e370(0x25f)]===_0x22e370(0x27d)&&_0x161b0c[_0x22e370(0x25f)]['trim']()!==''&&_0x3b0508[_0x22e370(0x24b)]({'path':_0x5067e8+_0x22e370(0x19b),'message':_0x22e370(0x205)});}function validateGraphShape(_0x5acdec,_0x1eec3a,_0x50793b,_0x213d34,_0x5de0ae,_0x2b77c1,_0x4a272b){const _0x2412e2=a269_0x1c57b2;for(const [_0xfb24c1,_0x24a7b2]of _0x5acdec){const _0x18a559=_0x5de0ae[_0x2412e2(0x28e)](_0xfb24c1)??[],_0xdfeda3=_0x213d34['get'](_0xfb24c1)??[];_0x24a7b2[_0x2412e2(0x174)]!==_0x2412e2(0x19f)&&_0x18a559['length']===0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x2a1)});_0x24a7b2['type']!=='END'&&_0xdfeda3['length']===0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x2e4)});_0x24a7b2['type']===_0x2412e2(0x19f)&&_0x18a559[_0x2412e2(0x2cc)]>0x0&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x296)});_0x24a7b2[_0x2412e2(0x174)]==='END'&&_0xdfeda3['length']>0x0&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x281)});if(_0x24a7b2[_0x2412e2(0x174)]===_0x2412e2(0x1e3)){_0xdfeda3[_0x2412e2(0x2cc)]<0x2&&_0x4a272b[_0x2412e2(0x24b)]({'path':'flowJson.nodes.'+_0xfb24c1,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0xad5e62=_0xdfeda3['filter'](_0x47d16d=>_0x47d16d[_0x2412e2(0x1f5)]===!![]);_0xad5e62[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x239)});if(_0xad5e62[_0x2412e2(0x2cc)]===0x1){const _0x838a10=_0xad5e62[0x0],_0x553b1d=_0x2b77c1[_0x2412e2(0x28e)](_0x838a10)??'flowJson.edges';_0x838a10[_0x2412e2(0x18c)]!==_0x2412e2(0x1a8)&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x553b1d+_0x2412e2(0x28b),'message':_0x2412e2(0x178)});_0x838a10['expression']!==undefined&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x553b1d+_0x2412e2(0x19b),'message':_0x2412e2(0x1de)});for(const _0x57aa05 of _0xdfeda3){if(_0x57aa05===_0x838a10)continue;const _0x123786=_0x2b77c1[_0x2412e2(0x28e)](_0x57aa05)??'flowJson.edges';if(_0x57aa05[_0x2412e2(0x18c)]!=='EXPRESSION')_0x4a272b[_0x2412e2(0x24b)]({'path':_0x123786+'.conditionType','message':_0x2412e2(0x1fd)});else(typeof _0x57aa05[_0x2412e2(0x25f)]!==_0x2412e2(0x27d)||_0x57aa05[_0x2412e2(0x25f)][_0x2412e2(0x2d3)]()==='')&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x123786+'.expression','message':_0x2412e2(0x275)});}}}if(_0x24a7b2[_0x2412e2(0x174)]===_0x2412e2(0x179)&&(_0x24a7b2['taskMode']??_0x2412e2(0x179))===_0x2412e2(0x263)){if(_0xdfeda3[_0x2412e2(0x2cc)]!==0x1)_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x1ec)});else{const _0x409820=_0xdfeda3[0x0];((_0x409820[_0x2412e2(0x18c)]??_0x2412e2(0x1a8))!==_0x2412e2(0x1a8)||_0x409820[_0x2412e2(0x1f5)]===!![]||typeof _0x409820[_0x2412e2(0x25f)]===_0x2412e2(0x27d)&&_0x409820[_0x2412e2(0x25f)][_0x2412e2(0x2d3)]()!=='')&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2b77c1[_0x2412e2(0x28e)](_0x409820)??'flowJson.edges','message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x24a7b2['type']==='APPROVAL'){const _0xf7b05a=_0xdfeda3[_0x2412e2(0x1bb)](_0x443087=>_0x443087['conditionType']??_0x2412e2(0x1a8)),_0x1bbde3=_0xf7b05a[_0x2412e2(0x20c)](_0x48d85f=>_0x48d85f!==_0x2412e2(0x1f2)&&_0x48d85f!==_0x2412e2(0x180));_0x1bbde3[_0x2412e2(0x2cc)]>0x0&&_0x4a272b['push']({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x184)}),_0xf7b05a['filter'](_0x546bb2=>_0x546bb2===_0x2412e2(0x1f2))[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0xf7b05a[_0x2412e2(0x20c)](_0x2e18ac=>_0x2e18ac===_0x2412e2(0x180))[_0x2412e2(0x2cc)]!==0x1&&_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x24e)+_0xfb24c1,'message':_0x2412e2(0x17d)}),_0xdfeda3['some'](_0x58e39a=>_0x58e39a[_0x2412e2(0x1f5)]===!![])&&_0x4a272b['push']({'path':'flowJson.nodes.'+_0xfb24c1,'message':_0x2412e2(0x246)});}}}const _0x64e4da=new Set(),_0x1ff0d6=_0x4acdc4=>{const _0x2c8a97=_0x2412e2;if(_0x64e4da[_0x2c8a97(0x29d)](_0x4acdc4))return;_0x64e4da['add'](_0x4acdc4);for(const _0x1f91d6 of _0x213d34[_0x2c8a97(0x28e)](_0x4acdc4)??[]){const _0x338b4c=resolveEdgeEndpoint(_0x1f91d6[_0x2c8a97(0x1ae)],_0x1f91d6[_0x2c8a97(0x22e)]);if(_0x338b4c&&_0x5acdec[_0x2c8a97(0x29d)](_0x338b4c))_0x1ff0d6(_0x338b4c);}};_0x1ff0d6(_0x1eec3a);for(const _0x4c5e1c of _0x5acdec[_0x2412e2(0x220)]()){!_0x64e4da['has'](_0x4c5e1c)&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0x4c5e1c,'message':_0x2412e2(0x1d5)});}const _0x5be168=_0x50793b[_0x2412e2(0x1bc)](_0x3f587f=>_0x64e4da[_0x2412e2(0x29d)](_0x3f587f));if(!_0x5be168){_0x4a272b[_0x2412e2(0x24b)]({'path':_0x2412e2(0x176),'message':_0x2412e2(0x22d)});return;}const _0x2cbd29=new Set(),_0x2b5837=_0x57e996=>{const _0x29972e=_0x2412e2;if(_0x2cbd29[_0x29972e(0x29d)](_0x57e996))return;_0x2cbd29[_0x29972e(0x26d)](_0x57e996);for(const _0x1da578 of _0x5de0ae['get'](_0x57e996)??[]){const _0x25e328=resolveEdgeEndpoint(_0x1da578['source'],_0x1da578[_0x29972e(0x201)]);if(_0x25e328&&_0x5acdec[_0x29972e(0x29d)](_0x25e328))_0x2b5837(_0x25e328);}};for(const _0x17be6d of _0x50793b){if(_0x5acdec[_0x2412e2(0x29d)](_0x17be6d))_0x2b5837(_0x17be6d);}for(const _0x5100f7 of _0x64e4da){!_0x2cbd29[_0x2412e2(0x29d)](_0x5100f7)&&_0x4a272b['push']({'path':_0x2412e2(0x24e)+_0x5100f7,'message':_0x2412e2(0x2a3)});}}function validateApprovalResults(_0x272e45,_0xa56415,_0x5adb93,_0x11e2de){const _0xfe57f4=a269_0x1c57b2;if(_0xa56415===0x0)return;const _0xd1e671=new Set(_0x5adb93[_0xfe57f4(0x1bb)](_0x4c570d=>_0x272e45['get'](_0x4c570d)?.[_0xfe57f4(0x26a)])[_0xfe57f4(0x20c)](_0x1e6a66=>typeof _0x1e6a66===_0xfe57f4(0x27d)));for(const _0x31c5f0 of[_0xfe57f4(0x1f2),_0xfe57f4(0x180)]){!_0xd1e671[_0xfe57f4(0x29d)](_0x31c5f0)&&_0x11e2de['push']({'path':_0xfe57f4(0x2a2),'message':_0xfe57f4(0x1c6)+_0x31c5f0+'.'});}}function validateScriptResultReferences(_0x1a0a00,_0xb3b1db,_0x1148d9,_0x5a3336,_0x25f1b5,_0x8027d0,_0x27fe15){const _0x3b26ba=a269_0x1c57b2;if(_0x8027d0[_0x3b26ba(0x27c)]===0x0)return;const _0x1f71b7=new Set(),_0x13aa02=_0x57e2d2=>{const _0x3b6d7c=_0x3b26ba;if(!_0x1f71b7['has'](_0x57e2d2)&&_0x1a0a00[_0x3b6d7c(0x29d)](_0x57e2d2)){_0x1f71b7[_0x3b6d7c(0x26d)](_0x57e2d2);for(const _0x5d62ab of _0x1148d9[_0x3b6d7c(0x28e)](_0x57e2d2)??[]){const _0x3abf83=resolveEdgeEndpoint(_0x5d62ab[_0x3b6d7c(0x1ae)],_0x5d62ab[_0x3b6d7c(0x22e)]);if(_0x3abf83)_0x13aa02(_0x3abf83);}}};_0x13aa02(_0xb3b1db);const _0x49e5f4=new Map();for(const _0x3000fd of _0x1f71b7){_0x49e5f4[_0x3b26ba(0x294)](_0x3000fd,_0x3000fd===_0xb3b1db?new Set([_0xb3b1db]):new Set(_0x1f71b7));}let _0x3fa5ec=!![];while(_0x3fa5ec){_0x3fa5ec=![];for(const _0x1c4e02 of _0x1f71b7){if(_0x1c4e02===_0xb3b1db)continue;const _0x3bdcdd=(_0x5a3336[_0x3b26ba(0x28e)](_0x1c4e02)??[])['map'](_0x457635=>resolveEdgeEndpoint(_0x457635[_0x3b26ba(0x259)],_0x457635[_0x3b26ba(0x201)]))[_0x3b26ba(0x20c)](_0x533e9d=>Boolean(_0x533e9d&&_0x1f71b7[_0x3b26ba(0x29d)](_0x533e9d)));if(_0x3bdcdd[_0x3b26ba(0x2cc)]===0x0)continue;const _0x13020b=new Set(_0x49e5f4[_0x3b26ba(0x28e)](_0x3bdcdd[0x0])??[]);for(const _0x1cf6fb of _0x3bdcdd[_0x3b26ba(0x282)](0x1)){const _0x36fd72=_0x49e5f4[_0x3b26ba(0x28e)](_0x1cf6fb)??new Set();for(const _0x5d87aa of _0x13020b){if(!_0x36fd72[_0x3b26ba(0x29d)](_0x5d87aa))_0x13020b[_0x3b26ba(0x1d9)](_0x5d87aa);}}_0x13020b['add'](_0x1c4e02);const _0x4ca209=_0x49e5f4[_0x3b26ba(0x28e)](_0x1c4e02);!setsEqual(_0x4ca209,_0x13020b)&&(_0x49e5f4[_0x3b26ba(0x294)](_0x1c4e02,_0x13020b),_0x3fa5ec=!![]);}}for(const [_0x5490a3,_0x547943]of _0x1148d9){const _0x16e8a8=_0x49e5f4[_0x3b26ba(0x28e)](_0x5490a3);if(!_0x16e8a8)continue;for(const _0x211c63 of _0x547943){if(_0x211c63[_0x3b26ba(0x18c)]!==_0x3b26ba(0x277)||typeof _0x211c63[_0x3b26ba(0x25f)]!==_0x3b26ba(0x27d))continue;for(const [_0x4eefe3,_0x43e8db]of _0x8027d0){expressionReferencesVariable(_0x211c63[_0x3b26ba(0x25f)],_0x4eefe3)&&!_0x16e8a8[_0x3b26ba(0x29d)](_0x43e8db)&&_0x27fe15['push']({'path':(_0x25f1b5[_0x3b26ba(0x28e)](_0x211c63)??_0x3b26ba(0x176))+_0x3b26ba(0x19b),'message':_0x3b26ba(0x1d0)+_0x4eefe3+_0x3b26ba(0x283)+_0x43e8db+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x5490a3+'.'});}}}}function expressionReferencesVariable(_0x15b614,_0x1404d1){const _0x2812bb=a269_0x1c57b2,_0x211b1c=_0x1404d1[_0x2812bb(0x2b7)](/[.*+?^${}()|[\]\\]/g,_0x2812bb(0x1a3));return new RegExp(_0x2812bb(0x1ef)+_0x211b1c+_0x2812bb(0x234))[_0x2812bb(0x2dc)](_0x15b614);}function resolveEffectiveResultVariable(_0x2f22e5,_0x294737){const _0x25a831=a269_0x1c57b2;if(_0x2f22e5===undefined||_0x2f22e5===null||_0x294737&&_0x2f22e5==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x2f22e5!==_0x25a831(0x27d)||!VARIABLE_PATTERN[_0x25a831(0x2dc)](_0x2f22e5)||RESERVED_RESULT_VARIABLES[_0x25a831(0x29d)](_0x2f22e5)||_0x2f22e5['startsWith'](_0x25a831(0x253)))return undefined;return _0x2f22e5;}function registerResultVariableOwner(_0x18c643,_0x373c17,_0x2aa6c4,_0x523a40){const _0x4bb8d0=a269_0x1c57b2;if(_0x18c643[_0x4bb8d0(0x29d)](_0x373c17)){_0x523a40[_0x4bb8d0(0x24b)]({'path':'flowJson.nodes','message':_0x4bb8d0(0x240)+_0x373c17+'.'});return;}_0x18c643[_0x4bb8d0(0x294)](_0x373c17,_0x2aa6c4);}function setsEqual(_0x1d5e57,_0x80aefe){const _0x1187ce=a269_0x1c57b2;return _0x1d5e57[_0x1187ce(0x27c)]===_0x80aefe[_0x1187ce(0x27c)]&&[..._0x1d5e57][_0x1187ce(0x1da)](_0x2b357b=>_0x80aefe[_0x1187ce(0x29d)](_0x2b357b));}function isValidUserId(_0x3889ba){const _0x442fa2=a269_0x1c57b2;if(typeof _0x3889ba===_0x442fa2(0x27d))return _0x3889ba['trim']()[_0x442fa2(0x2cc)]>0x0;return Number[_0x442fa2(0x1ab)](_0x3889ba)&&Number(_0x3889ba)>0x0;}function resolveEdgeEndpoint(_0x14e724,_0x3ab808){const _0x46ede3=a269_0x1c57b2;if(typeof _0x14e724===_0x46ede3(0x27d)&&_0x14e724[_0x46ede3(0x2d3)]())return _0x14e724[_0x46ede3(0x2d3)]();if(typeof _0x3ab808==='string'&&_0x3ab808[_0x46ede3(0x2d3)]())return _0x3ab808[_0x46ede3(0x2d3)]();return undefined;}function removeEmptyMetadata(_0x3914c2,_0x30586a,_0x1a46e5,_0x5b97e4){const _0x3dcc45=a269_0x1c57b2;if(Array[_0x3dcc45(0x230)](_0x3914c2)){_0x3914c2[_0x3dcc45(0x197)]((_0x685ba,_0x5e32b9)=>removeEmptyMetadata(_0x685ba,_0x30586a+'['+_0x5e32b9+']',_0x1a46e5,_0x5b97e4));return;}if(!isRecord(_0x3914c2))return;for(const [_0x166a86,_0x353d24]of Object['entries'](_0x3914c2)){const _0x15d4e9=_0x30586a+'.'+_0x166a86;if(_0x166a86===_0x3dcc45(0x2ac)&&isEmptyJsonValue(_0x353d24)){delete _0x3914c2[_0x166a86],_0x5b97e4[_0x3dcc45(0x24b)](_0x15d4e9),_0x1a46e5[_0x3dcc45(0x24b)]({'code':_0x3dcc45(0x2e1),'path':_0x15d4e9,'message':_0x15d4e9+_0x3dcc45(0x2c4)});continue;}removeEmptyMetadata(_0x353d24,_0x15d4e9,_0x1a46e5,_0x5b97e4);}}function isEmptyJsonValue(_0x183ab0){const _0x306d2e=a269_0x1c57b2;if(_0x183ab0===null||_0x183ab0===undefined)return!![];if(typeof _0x183ab0===_0x306d2e(0x27d))return _0x183ab0[_0x306d2e(0x2d3)]()==='';if(Array[_0x306d2e(0x230)](_0x183ab0))return _0x183ab0['length']===0x0;return isRecord(_0x183ab0)&&Object[_0x306d2e(0x220)](_0x183ab0)[_0x306d2e(0x2cc)]===0x0;}function isRecord(_0x20e523){const _0x221c54=a269_0x1c57b2;return typeof _0x20e523===_0x221c54(0x23f)&&_0x20e523!==null&&!Array[_0x221c54(0x230)](_0x20e523);}function cloneJsonValue(_0x2f6335){const _0x3a74be=a269_0x1c57b2;return JSON[_0x3a74be(0x1ce)](JSON[_0x3a74be(0x293)](_0x2f6335));}export async function readFlowConfigFile(_0x18ef00){const _0x2b3c25=a269_0x1c57b2,_0x7a9706=await readFile(resolve(_0x18ef00),_0x2b3c25(0x1d7));return JSON['parse'](_0x7a9706);}
1
+ const a281_0x358266=a281_0x4a08;(function(_0x255704,_0x1e7c19){const _0x11d309=a281_0x4a08,_0x335f09=_0x255704();while(!![]){try{const _0x4bed74=-parseInt(_0x11d309(0x250))/0x1+parseInt(_0x11d309(0x171))/0x2+-parseInt(_0x11d309(0x117))/0x3+-parseInt(_0x11d309(0x148))/0x4+-parseInt(_0x11d309(0x17d))/0x5+parseInt(_0x11d309(0x1bb))/0x6*(-parseInt(_0x11d309(0x164))/0x7)+parseInt(_0x11d309(0x16f))/0x8;if(_0x4bed74===_0x1e7c19)break;else _0x335f09['push'](_0x335f09['shift']());}catch(_0x24fc17){_0x335f09['push'](_0x335f09['shift']());}}}(a281_0x445b,0x39853));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':a281_0x358266(0x1e9),'$id':a281_0x358266(0x260),'title':a281_0x358266(0x136),'type':'object','required':[a281_0x358266(0x1e6),a281_0x358266(0x177),a281_0x358266(0x1fb)],'$defs':{'userId':{'anyOf':[{'type':a281_0x358266(0x19d),'minLength':0x1},{'type':a281_0x358266(0x221),'minimum':0x1}]},'position':{'type':a281_0x358266(0x1c7),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a281_0x358266(0x1f8),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x114),a281_0x358266(0x161)],'properties':{'value':{'type':a281_0x358266(0x221),'minimum':0x1},'unit':{'enum':[a281_0x358266(0x21a),a281_0x358266(0x113),'HOURS',a281_0x358266(0x120)]}},'additionalProperties':!![]},'flowNode':{'type':a281_0x358266(0x1c7),'required':['id','type','name',a281_0x358266(0x208)],'properties':{'id':{'type':a281_0x358266(0x19d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':['START',a281_0x358266(0x207),a281_0x358266(0x1a8),a281_0x358266(0x20c),'SCRIPT',a281_0x358266(0x251)]},'name':{'type':a281_0x358266(0x19d),'minLength':0x1},'pageId':{'type':a281_0x358266(0x221),'minimum':0x1},'position':{'$ref':a281_0x358266(0x144)},'approvalMode':{'enum':[a281_0x358266(0x15f),a281_0x358266(0x110),a281_0x358266(0x10c)]},'taskMode':{'enum':[a281_0x358266(0x1a8),a281_0x358266(0x17a)]},'assignee':{'type':'object','required':[a281_0x358266(0x1a9)],'properties':{'strategy':{'enum':[a281_0x358266(0x1f6),a281_0x358266(0x191)]},'userIds':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x1c4)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a281_0x358266(0x14f)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x1a9),a281_0x358266(0x1b4)],'properties':{'strategy':{'const':a281_0x358266(0x1f6)},'userIds':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x1c4)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a281_0x358266(0x1cc),a281_0x358266(0x1a1)]},'scriptName':{'type':a281_0x358266(0x19d),'minLength':0x1},'resultVariable':{'type':a281_0x358266(0x19d),'pattern':a281_0x358266(0x149)},'async':{'type':a281_0x358266(0x1c7),'properties':{'enabled':{'type':a281_0x358266(0x13b)},'retryCount':{'type':a281_0x358266(0x221),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a281_0x358266(0x1d9)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a281_0x358266(0x13b)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':['AUTO_APPROVE',a281_0x358266(0x175),a281_0x358266(0x12f)]},'interrupting':{'type':a281_0x358266(0x13b)},'scriptName':{'type':a281_0x358266(0x19d),'minLength':0x1},'resultVariable':{'type':'string','pattern':a281_0x358266(0x149)}},'additionalProperties':!![]},'cc':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x24c)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a281_0x358266(0x199),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a281_0x358266(0x1c2),a281_0x358266(0x1e0)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a281_0x358266(0x19d),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a281_0x358266(0x1f2)]},'template':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x128),a281_0x358266(0x26e)],'properties':{'title':{'type':a281_0x358266(0x19d),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a281_0x358266(0x19d)},'facts':{'type':'array','maxItems':0x8,'items':{'type':'object','required':[a281_0x358266(0x198),a281_0x358266(0x114)],'properties':{'label':{'type':a281_0x358266(0x19d),'minLength':0x1},'value':{'type':a281_0x358266(0x19d),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a281_0x358266(0x199),'maxItems':0x2,'items':{'type':'object','required':['text',a281_0x358266(0x259)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a281_0x358266(0x19d),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a281_0x358266(0x199),'items':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x1ed),a281_0x358266(0x114)],'properties':{'type':{'enum':[a281_0x358266(0x232),'ROLE',a281_0x358266(0x1d0)]},'value':{'type':a281_0x358266(0x19d),'minLength':0x1},'role':{'enum':['TO','CC',a281_0x358266(0x262)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a281_0x358266(0x1c7),'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':'string','minLength':0x1},'target':{'type':a281_0x358266(0x19d),'minLength':0x1},'sourceNodeId':{'type':a281_0x358266(0x19d),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a281_0x358266(0x184),a281_0x358266(0x1cc),a281_0x358266(0x1a1),a281_0x358266(0x150)]},'expression':{'type':a281_0x358266(0x19d)},'defaultFlow':{'type':a281_0x358266(0x13b)},'name':{'type':a281_0x358266(0x19d)},'waypoints':{'type':'array','items':{'$ref':a281_0x358266(0x144)}}},'allOf':[{'anyOf':[{'required':[a281_0x358266(0x166)]},{'required':[a281_0x358266(0x1ca)]}]},{'anyOf':[{'required':[a281_0x358266(0x17b)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a281_0x358266(0x19d),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a281_0x358266(0x21d),a281_0x358266(0x15d)]},'datasetCode':{'type':a281_0x358266(0x19d),'minLength':0x1},'pageId':{'type':a281_0x358266(0x221)},'templateName':![],'flowJson':{'type':a281_0x358266(0x1c7),'required':[a281_0x358266(0x216),a281_0x358266(0x1af)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a281_0x358266(0x19d),'const':'approval.simple-flow.v1','description':a281_0x358266(0x1e5)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a281_0x358266(0x23e)},'startPageId':{'type':a281_0x358266(0x221),'minimum':0x1},'nodes':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x14d)}},'edges':{'type':a281_0x358266(0x199),'minItems':0x1,'items':{'$ref':a281_0x358266(0x26b)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a281_0x358266(0x1a6),a281_0x358266(0x1e6),a281_0x358266(0x190),a281_0x358266(0x269),a281_0x358266(0x20e),a281_0x358266(0x160),a281_0x358266(0x11e)],REMOVED_ROOT_FIELDS=['id',a281_0x358266(0x20e),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a281_0x358266(0x1e3),NODE_TYPES=new Set(['START','END',a281_0x358266(0x1a8),a281_0x358266(0x20c),a281_0x358266(0x10d),a281_0x358266(0x251)]),CONDITION_TYPES=new Set([a281_0x358266(0x184),a281_0x358266(0x1cc),a281_0x358266(0x1a1),a281_0x358266(0x150)]),APPROVAL_MODES=new Set([a281_0x358266(0x15f),a281_0x358266(0x110),a281_0x358266(0x10c)]),APPROVAL_TASK_MODES=new Set([a281_0x358266(0x1a8),a281_0x358266(0x17a)]),FLOW_TIME_UNITS=new Set([a281_0x358266(0x21a),'MINUTES',a281_0x358266(0x242),a281_0x358266(0x120)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a281_0x358266(0x11a),a281_0x358266(0x175),a281_0x358266(0x12f)]),FLOW_TYPES=new Set([a281_0x358266(0x21d),a281_0x358266(0x15d)]),FLOW_PAGE_MODES=new Set([a281_0x358266(0x23e),a281_0x358266(0x1ba)]),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([a281_0x358266(0x23d),a281_0x358266(0x1f2)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a281_0x358266(0x232),a281_0x358266(0x191),a281_0x358266(0x1d0)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a281_0x358266(0x262)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a281_0x358266(0x11d),UNSUPPORTED_FORM_MESSAGE=a281_0x358266(0x24d),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a281_0x358266(0x133),RESERVED_RESULT_VARIABLES=new Set([a281_0x358266(0x25a),'approved',a281_0x358266(0x1ec),a281_0x358266(0x212),a281_0x358266(0x215),a281_0x358266(0x267),a281_0x358266(0x209),'approval_sys_pageId',a281_0x358266(0x222),'approval_sys_dataId']);export function normalizeFlowConfig(_0x31ab34){const _0x539b4e=a281_0x358266;if(!isRecord(_0x31ab34))throw new TypeError(_0x539b4e(0x21c));const _0x5bc527=cloneJsonValue(_0x31ab34),_0x1712de=_0x5bc527[_0x539b4e(0x1fb)],_0x1a8e1b=isRecord(_0x1712de)?cloneJsonValue(_0x1712de):{},_0x5bc5ae=[],_0x34ee5a=[];for(const _0x1ca2b2 of REMOVED_ROOT_FIELDS){if(!Object[_0x539b4e(0x169)]['hasOwnProperty']['call'](_0x5bc527,_0x1ca2b2))continue;delete _0x5bc527[_0x1ca2b2],_0x34ee5a[_0x539b4e(0x1be)](_0x1ca2b2),_0x5bc5ae['push']({'code':_0x539b4e(0x1b5),'path':_0x1ca2b2,'message':_0x1ca2b2+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x729f43 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x539b4e(0x169)]['hasOwnProperty'][_0x539b4e(0x21f)](_0x1a8e1b,_0x729f43))continue;const _0x305b4=_0x539b4e(0x1cb)+_0x729f43;delete _0x1a8e1b[_0x729f43],_0x34ee5a[_0x539b4e(0x1be)](_0x305b4),_0x5bc5ae[_0x539b4e(0x1be)]({'code':_0x539b4e(0x1b5),'path':_0x305b4,'message':_0x305b4+_0x539b4e(0x167)});}if(Object[_0x539b4e(0x169)][_0x539b4e(0x1b2)][_0x539b4e(0x21f)](_0x1a8e1b,_0x539b4e(0x12d))){const _0x430972=_0x1a8e1b[_0x539b4e(0x12d)],_0x2c64c3=typeof _0x430972===_0x539b4e(0x19d)?_0x430972[_0x539b4e(0x1cf)]():_0x430972;if(isEmptyJsonValue(_0x430972)||_0x2c64c3===DEFAULT_FLOW_SCHEMA_VERSION){const _0x249550='flowJson.schemaVersion';delete _0x1a8e1b['schemaVersion'],_0x34ee5a[_0x539b4e(0x1be)](_0x249550),_0x5bc5ae[_0x539b4e(0x1be)]({'code':_0x539b4e(0x1b5),'path':_0x249550,'message':_0x249550+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x539b4e(0x202)});}}removeEmptyMetadata(_0x1a8e1b,_0x539b4e(0x1fb),_0x5bc5ae,_0x34ee5a);_0x5bc527[_0x539b4e(0x177)]===_0x539b4e(0x15d)&&!Object[_0x539b4e(0x169)][_0x539b4e(0x1b2)]['call'](_0x1a8e1b,_0x539b4e(0x241))&&(_0x1a8e1b[_0x539b4e(0x241)]=_0x539b4e(0x23e));_0x5bc527[_0x539b4e(0x1fb)]=_0x1a8e1b;if(typeof _0x5bc527[_0x539b4e(0x1e6)]===_0x539b4e(0x19d))_0x5bc527[_0x539b4e(0x1e6)]=_0x5bc527[_0x539b4e(0x1e6)][_0x539b4e(0x1cf)]();return{'config':_0x5bc527,'warnings':_0x5bc5ae,'removedPaths':_0x34ee5a};}export function validateFlowConfig(_0x299b0f){const _0x67f54b=a281_0x358266;let _0x32b1a2;try{_0x32b1a2=normalizeFlowConfig(_0x299b0f);}catch(_0x34f619){const _0x567ebd=_0x34f619 instanceof Error?_0x34f619[_0x67f54b(0x14c)]:String(_0x34f619),_0x4e21bc={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x567ebd}],'warnings':[],'normalized':_0x4e21bc,'validationConfig':_0x4e21bc};}const _0x132ada=_0x32b1a2[_0x67f54b(0x13c)],_0x2b9189=cloneJsonValue(_0x132ada),_0x437af6=_0x2b9189[_0x67f54b(0x1fb)];_0x437af6[_0x67f54b(0x234)]='__rabetbase_local_validation__',_0x437af6['flowName']=_0x132ada[_0x67f54b(0x1e6)];typeof _0x132ada[_0x67f54b(0x269)]==='string'&&_0x132ada[_0x67f54b(0x269)][_0x67f54b(0x1cf)]()&&(_0x437af6[_0x67f54b(0x190)]=_0x132ada[_0x67f54b(0x269)][_0x67f54b(0x1cf)]());const _0x5c734f=[];return validateOuterMetadata(_0x132ada,_0x5c734f),validateFlowClassification(_0x132ada,_0x5c734f),validateGraph(_0x132ada['flowJson'],_0x5c734f),{'valid':_0x5c734f[_0x67f54b(0x1bf)]===0x0,'errors':_0x5c734f,'warnings':_0x32b1a2[_0x67f54b(0x151)],'normalized':_0x132ada,'validationConfig':_0x2b9189};}function validateFlowClassification(_0x1b4411,_0x15c56c){const _0x5e49f2=a281_0x358266;if(!isRecord(_0x1b4411[_0x5e49f2(0x1fb)]))return;const _0x1c5dce=_0x1b4411[_0x5e49f2(0x177)],_0x46cb01=_0x1b4411['flowJson'][_0x5e49f2(0x241)];_0x46cb01!==undefined&&(typeof _0x46cb01!==_0x5e49f2(0x19d)||!FLOW_PAGE_MODES[_0x5e49f2(0x1f9)](_0x46cb01))&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':_0x5e49f2(0x1f4)+String(_0x46cb01)+'.'});_0x1c5dce==='FORM_FLOW'&&_0x46cb01!==undefined&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':_0x5e49f2(0x263)});_0x1c5dce===_0x5e49f2(0x15d)&&_0x46cb01===_0x5e49f2(0x1ba)&&_0x15c56c[_0x5e49f2(0x1be)]({'path':_0x5e49f2(0x1dc),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x1c5dce===_0x5e49f2(0x21d)||_0x1c5dce===_0x5e49f2(0x15d))&&validateCustomPageNavigation(_0x1b4411,_0x1c5dce,_0x46cb01,_0x15c56c);if(_0x1c5dce!==_0x5e49f2(0x21d)||!Array[_0x5e49f2(0x121)](_0x1b4411[_0x5e49f2(0x1fb)][_0x5e49f2(0x216)]))return;_0x1b4411[_0x5e49f2(0x1fb)]['nodes'][_0x5e49f2(0x1d2)]((_0xc32cca,_0x381a45)=>{const _0x4859eb=_0x5e49f2;isRecord(_0xc32cca)&&_0xc32cca[_0x4859eb(0x1ed)]==='APPROVAL'&&_0xc32cca[_0x4859eb(0x231)]===_0x4859eb(0x17a)&&_0x15c56c[_0x4859eb(0x1be)]({'path':_0x4859eb(0x1b6)+_0x381a45+_0x4859eb(0x1cd),'message':_0x4859eb(0x20a)});});}function validateCustomPageNavigation(_0x8fe0b7,_0x20e27d,_0x45c734,_0x2b3e49){const _0x49673b=a281_0x358266,_0x3a000b=_0x8fe0b7[_0x49673b(0x1fb)]['startPageId'];_0x3a000b!==undefined&&(!Number[_0x49673b(0x1f5)](_0x3a000b)||_0x3a000b<=0x0)&&_0x2b3e49[_0x49673b(0x1be)]({'path':_0x49673b(0x19f),'message':_0x49673b(0x1d4)});const _0x3a6d27=Array[_0x49673b(0x121)](_0x8fe0b7[_0x49673b(0x1fb)]['nodes'])?_0x8fe0b7[_0x49673b(0x1fb)][_0x49673b(0x216)][_0x49673b(0x261)]((_0x1f46ca,_0x2132e4)=>({'node':_0x1f46ca,'index':_0x2132e4}))[_0x49673b(0x226)](({node:_0x4ad8c2})=>isRecord(_0x4ad8c2)&&_0x4ad8c2['pageId']!==undefined):[],_0x1c01b0=_0x3a000b!==undefined||_0x3a6d27[_0x49673b(0x1bf)]>0x0,_0x37c2b2=_0x45c734===undefined&&_0x20e27d===_0x49673b(0x15d)?_0x49673b(0x23e):_0x45c734;_0x1c01b0&&(_0x20e27d!==_0x49673b(0x15d)||_0x37c2b2!==_0x49673b(0x23e))&&(_0x3a000b!==undefined&&_0x2b3e49[_0x49673b(0x1be)]({'path':_0x49673b(0x19f),'message':'startPageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x3a6d27[_0x49673b(0x1d2)](({index:_0x323cf1})=>{const _0x55b630=_0x49673b;_0x2b3e49[_0x55b630(0x1be)]({'path':_0x55b630(0x1b6)+_0x323cf1+'].pageId','message':_0x55b630(0x181)});}));}export async function writeNormalizedFlowConfig(_0x13057b,_0x5cc175,_0x554e48={}){const _0x2832a6=a281_0x358266,_0xb46651=resolve(_0x13057b),_0x32049f=_0xb46651+'.'+process[_0x2832a6(0x1e4)]+'.'+randomUUID()+_0x2832a6(0x17c),_0x223f3e=JSON[_0x2832a6(0x194)](_0x5cc175,null,0x2)+'\x0a';let _0x42a365;try{try{_0x42a365=(await stat(_0xb46651))[_0x2832a6(0x122)]&0x1ff;}catch{_0x42a365=undefined;}await writeFile(_0x32049f,_0x223f3e,{'encoding':_0x2832a6(0x138),'flag':'wx','mode':_0x42a365??0x1a4});if(_0x42a365!==undefined)await chmod(_0x32049f,_0x42a365);_0x554e48[_0x2832a6(0x16a)]===![]?(await link(_0x32049f,_0xb46651),await unlink(_0x32049f)):await rename(_0x32049f,_0xb46651);}finally{await unlink(_0x32049f)[_0x2832a6(0x132)](()=>undefined);}}function validateOuterMetadata(_0x1f4f7c,_0x69f7e2){const _0x386935=a281_0x358266;(typeof _0x1f4f7c[_0x386935(0x1e6)]!==_0x386935(0x19d)||_0x1f4f7c[_0x386935(0x1e6)][_0x386935(0x1cf)]()==='')&&_0x69f7e2['push']({'path':_0x386935(0x1e6),'message':_0x386935(0x1ae)});_0x1f4f7c['flowDesc']!==undefined&&typeof _0x1f4f7c[_0x386935(0x246)]!==_0x386935(0x19d)&&_0x69f7e2['push']({'path':_0x386935(0x246),'message':_0x386935(0x213)});if(_0x1f4f7c['flowType']===undefined||_0x1f4f7c[_0x386935(0x177)]===null)_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x177),'message':_0x386935(0x12b)});else(typeof _0x1f4f7c[_0x386935(0x177)]!==_0x386935(0x19d)||!FLOW_TYPES[_0x386935(0x1f9)](_0x1f4f7c[_0x386935(0x177)]))&&_0x69f7e2['push']({'path':_0x386935(0x177),'message':_0x386935(0x15c)+String(_0x1f4f7c[_0x386935(0x177)])+'.'});_0x1f4f7c[_0x386935(0x269)]!==undefined&&typeof _0x1f4f7c['datasetCode']!=='string'&&_0x69f7e2['push']({'path':'datasetCode','message':_0x386935(0x116)}),_0x1f4f7c['pageId']!==undefined&&(!Number['isInteger'](_0x1f4f7c['pageId'])||_0x1f4f7c[_0x386935(0x160)]<0x0)&&_0x69f7e2[_0x386935(0x1be)]({'path':'pageId','message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x1f4f7c[_0x386935(0x177)]==='INDEPENDENT_FLOW'&&_0x1f4f7c['datasetCode']!==undefined&&_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x269),'message':_0x386935(0x205)}),_0x1f4f7c[_0x386935(0x177)]==='INDEPENDENT_FLOW'&&_0x1f4f7c['pageId']!==undefined&&_0x69f7e2[_0x386935(0x1be)]({'path':_0x386935(0x160),'message':_0x386935(0x1a7)});}function validateGraph(_0x3f0b7e,_0x8d9cd1){const _0x9bfbeb=a281_0x358266;if(!isRecord(_0x3f0b7e)){_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':'flowJson','message':_0x9bfbeb(0x1f7)});return;}!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x216)])&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x192)});!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x1af)])&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x17e),'message':_0x9bfbeb(0x1d3)});Object[_0x9bfbeb(0x169)][_0x9bfbeb(0x1b2)][_0x9bfbeb(0x21f)](_0x3f0b7e,_0x9bfbeb(0x12d))&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x203),'message':_0x9bfbeb(0x200)+String(_0x3f0b7e[_0x9bfbeb(0x12d)])+_0x9bfbeb(0x143)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x218cfb of[_0x9bfbeb(0x1c9),'formDefinitions',_0x9bfbeb(0x1ef)]){Object['prototype'][_0x9bfbeb(0x1b2)][_0x9bfbeb(0x21f)](_0x3f0b7e,_0x218cfb)&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1cb)+_0x218cfb,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x216)])||!Array[_0x9bfbeb(0x121)](_0x3f0b7e[_0x9bfbeb(0x1af)]))return;const _0x5e5b89=new Map(),_0x25f793=[],_0x1077b7=[],_0xd31a83=new Map(),_0x2e5606=new Map(),_0x707960=new Set();let _0x3bbbeb=0x0;_0x3f0b7e[_0x9bfbeb(0x216)][_0x9bfbeb(0x1d2)]((_0x235197,_0x158832)=>{const _0x385f17=_0x9bfbeb,_0x274162=_0x385f17(0x1b6)+_0x158832+']';if(!isRecord(_0x235197)){_0x8d9cd1['push']({'path':_0x274162,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x5cf5bf=_0x235197;if(typeof _0x5cf5bf['id']!=='string'||!BPMN_ID_PATTERN[_0x385f17(0x26d)](_0x5cf5bf['id']))_0x8d9cd1['push']({'path':_0x274162+'.id','message':_0x385f17(0x14e)});else _0x5e5b89['has'](_0x5cf5bf['id'])?_0x8d9cd1['push']({'path':_0x274162+_0x385f17(0x142),'message':_0x385f17(0x1fc)+_0x5cf5bf['id']+'.'}):(_0x5e5b89[_0x385f17(0x1ce)](_0x5cf5bf['id'],_0x5cf5bf),_0x707960[_0x385f17(0x18d)](_0x5cf5bf['id']));if(!NODE_TYPES[_0x385f17(0x1f9)](_0x5cf5bf[_0x385f17(0x1ed)]))_0x8d9cd1['push']({'path':_0x274162+'.type','message':_0x385f17(0x170)+String(_0x5cf5bf[_0x385f17(0x1ed)])+'.'});else{if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x126))_0x25f793[_0x385f17(0x1be)](_0x5cf5bf['id']);else _0x5cf5bf['type']===_0x385f17(0x207)&&_0x1077b7[_0x385f17(0x1be)](_0x5cf5bf['id']);}_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x1a8)&&(_0x5cf5bf[_0x385f17(0x231)]===undefined||_0x5cf5bf['taskMode']==='APPROVAL')&&(_0x3bbbeb+=0x1);validateNode(_0x5cf5bf,_0x274162,_0x8d9cd1);if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x10d)){const _0x58b590=resolveEffectiveResultVariable(_0x5cf5bf[_0x385f17(0x1c5)],![]);_0x58b590&&(registerResultVariableOwner(_0x2e5606,_0x58b590,_0x5cf5bf['id'],_0x8d9cd1),!_0xd31a83['has'](_0x58b590)&&_0xd31a83[_0x385f17(0x1ce)](_0x58b590,_0x5cf5bf['id']));}if(_0x5cf5bf[_0x385f17(0x1ed)]===_0x385f17(0x1a8)&&isRecord(_0x5cf5bf[_0x385f17(0x23f)])&&_0x5cf5bf['timeout'][_0x385f17(0x1f0)]===!![]&&_0x5cf5bf[_0x385f17(0x23f)][_0x385f17(0x238)]===_0x385f17(0x12f)){const _0x6f3415=resolveEffectiveResultVariable(_0x5cf5bf[_0x385f17(0x23f)]['resultVariable'],!![]);_0x6f3415&&registerResultVariableOwner(_0x2e5606,_0x6f3415,_0x5cf5bf['id']+_0x385f17(0x15b),_0x8d9cd1);}});_0x25f793[_0x9bfbeb(0x1bf)]!==0x1&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x1ad)});_0x1077b7['length']===0x0&&_0x8d9cd1[_0x9bfbeb(0x1be)]({'path':_0x9bfbeb(0x1ac),'message':_0x9bfbeb(0x16c)});const _0x10fe98=new Map(),_0x2ab481=new Map(),_0xa13df3=new Map(),_0x32611d=new Set();_0x3f0b7e[_0x9bfbeb(0x1af)][_0x9bfbeb(0x1d2)]((_0x5afae7,_0x545cdc)=>{const _0x20fe32=_0x9bfbeb,_0x56782a=_0x20fe32(0x22a)+_0x545cdc+']';if(!isRecord(_0x5afae7)){_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a,'message':_0x20fe32(0x229)});return;}const _0xd8b1ae=_0x5afae7;_0xa13df3[_0x20fe32(0x1ce)](_0xd8b1ae,_0x56782a);const _0x19ae2d=resolveEdgeEndpoint(_0xd8b1ae[_0x20fe32(0x166)],_0xd8b1ae[_0x20fe32(0x1ca)]),_0x2e7d06=resolveEdgeEndpoint(_0xd8b1ae[_0x20fe32(0x17b)],_0xd8b1ae['targetNodeId']);if(!_0x19ae2d)_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a+_0x20fe32(0x1bd),'message':_0x20fe32(0x153)});if(!_0x2e7d06)_0x8d9cd1['push']({'path':_0x56782a+_0x20fe32(0x1ee),'message':'edge\x20target\x20is\x20required.'});_0x19ae2d&&!_0x5e5b89[_0x20fe32(0x1f9)](_0x19ae2d)&&_0x8d9cd1['push']({'path':_0x56782a+'.source','message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x19ae2d+'.'});_0x2e7d06&&!_0x5e5b89[_0x20fe32(0x1f9)](_0x2e7d06)&&_0x8d9cd1['push']({'path':_0x56782a+_0x20fe32(0x1ee),'message':_0x20fe32(0x14b)+_0x2e7d06+'.'});if(_0xd8b1ae['id']!==undefined){if(typeof _0xd8b1ae['id']!=='string'||!BPMN_ID_PATTERN[_0x20fe32(0x26d)](_0xd8b1ae['id']))_0x8d9cd1['push']({'path':_0x56782a+'.id','message':_0x20fe32(0x1b8)});else{if(_0x707960[_0x20fe32(0x1f9)](_0xd8b1ae['id']))_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a+_0x20fe32(0x142),'message':_0x20fe32(0x15a)+_0xd8b1ae['id']+'.'});else!_0x707960[_0x20fe32(0x1f9)](_0xd8b1ae['id'])&&_0x707960[_0x20fe32(0x18d)](_0xd8b1ae['id']);}}if(_0x19ae2d&&_0x2e7d06){const _0x485acb=_0x19ae2d+'\x00'+_0x2e7d06+'\x00'+(_0xd8b1ae['conditionType']??_0x20fe32(0x184));_0x32611d['has'](_0x485acb)?_0x8d9cd1[_0x20fe32(0x1be)]({'path':_0x56782a,'message':_0x20fe32(0x26c)+_0x19ae2d+_0x20fe32(0x10f)+_0x2e7d06+'\x20('+(_0xd8b1ae['conditionType']??_0x20fe32(0x184))+').'}):_0x32611d[_0x20fe32(0x18d)](_0x485acb);}validateEdge(_0xd8b1ae,_0x56782a,_0x8d9cd1),_0x19ae2d&&_0x2e7d06&&(_0x10fe98[_0x20fe32(0x1b3)](_0x19ae2d)?.[_0x20fe32(0x1be)](_0xd8b1ae)??_0x10fe98['set'](_0x19ae2d,[_0xd8b1ae]),_0x2ab481['get'](_0x2e7d06)?.[_0x20fe32(0x1be)](_0xd8b1ae)??_0x2ab481[_0x20fe32(0x1ce)](_0x2e7d06,[_0xd8b1ae]));});if(_0x25f793[_0x9bfbeb(0x1bf)]!==0x1)return;validateGraphShape(_0x5e5b89,_0x25f793[0x0],_0x1077b7,_0x10fe98,_0x2ab481,_0xa13df3,_0x8d9cd1),validateScriptResultReferences(_0x5e5b89,_0x25f793[0x0],_0x10fe98,_0x2ab481,_0xa13df3,_0xd31a83,_0x8d9cd1),validateApprovalResults(_0x5e5b89,_0x3bbbeb,_0x1077b7,_0x8d9cd1);}function validateNode(_0x3272f4,_0x430f12,_0x334fd2){const _0x2041a6=a281_0x358266;for(const _0x1fb263 of[_0x2041a6(0x147),'formPermission']){Object[_0x2041a6(0x169)]['hasOwnProperty']['call'](_0x3272f4,_0x1fb263)&&_0x334fd2['push']({'path':_0x430f12+'.'+_0x1fb263,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x2041a6(0x1f9)](_0x3272f4['type']))return;(typeof _0x3272f4[_0x2041a6(0x193)]!==_0x2041a6(0x19d)||_0x3272f4['name'][_0x2041a6(0x1cf)]()==='')&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x24b),'message':_0x2041a6(0x146)});if(_0x3272f4[_0x2041a6(0x160)]!==undefined){if(!Number['isSafeInteger'](_0x3272f4[_0x2041a6(0x160)])||_0x3272f4['pageId']<=0x0)_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x239),'message':_0x2041a6(0x1e8)});else _0x3272f4[_0x2041a6(0x1ed)]!==_0x2041a6(0x1a8)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x239),'message':'node\x20pageId\x20is\x20supported\x20only\x20on\x20APPROVAL\x20user\x20tasks.'});}const _0x1665c1=_0x3272f4[_0x2041a6(0x208)];if(!isRecord(_0x1665c1))_0x334fd2['push']({'path':_0x430f12+'.position','message':_0x2041a6(0x187)});else for(const _0x4542c8 of['x','y']){const _0x4e1518=_0x1665c1[_0x4542c8];(typeof _0x4e1518!==_0x2041a6(0x1f8)||!Number[_0x2041a6(0x19e)](_0x4e1518)||_0x4e1518<0x0)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.position.'+_0x4542c8,'message':'position.'+_0x4542c8+_0x2041a6(0x1fa)});}if(_0x3272f4[_0x2041a6(0x1ed)]===_0x2041a6(0x1a8)){const _0x2cfa42=_0x3272f4['approvalMode']??'SINGLE',_0x5091d5=_0x3272f4[_0x2041a6(0x231)]??_0x2041a6(0x1a8);!APPROVAL_TASK_MODES['has'](_0x5091d5)&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x264),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x5091d5)+'.'});!APPROVAL_MODES[_0x2041a6(0x1f9)](_0x2cfa42)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x256),'message':_0x2041a6(0x25d)+String(_0x2cfa42)+'.'});if(!isRecord(_0x3272f4['assignee']))_0x334fd2['push']({'path':_0x430f12+'.assignee','message':_0x2041a6(0x228)});else{const _0x461756=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1a9)];_0x461756!=='FIXED'&&_0x461756!==_0x2041a6(0x191)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.assignee.strategy','message':_0x2041a6(0x22c)});if(_0x461756==='FIXED'){const _0x3b7895=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1b4)];if(!Array['isArray'](_0x3b7895)||_0x3b7895[_0x2041a6(0x1bf)]===0x0)_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x1a5),'message':_0x2041a6(0x266)});else{const _0x110cfd=_0x3b7895[_0x2041a6(0x254)](_0x3e3ed5=>!isValidUserId(_0x3e3ed5));_0x110cfd>=0x0&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x1c1)+_0x110cfd+']','message':_0x2041a6(0x1e1)});const _0xcdf586=new Set(_0x3b7895['filter'](isValidUserId)[_0x2041a6(0x261)](_0x2cb883=>String(_0x2cb883)['trim']()));_0x2cfa42===_0x2041a6(0x15f)&&_0xcdf586[_0x2041a6(0x134)]>0x1&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x1a5),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x461756===_0x2041a6(0x191)){const _0x4e7f3a=_0x3272f4[_0x2041a6(0x1d6)][_0x2041a6(0x1c8)],_0x3a0927=typeof _0x4e7f3a===_0x2041a6(0x1f8)||typeof _0x4e7f3a==='string'?Number(String(_0x4e7f3a)[_0x2041a6(0x1cf)]()):Number[_0x2041a6(0x13d)];(!Number[_0x2041a6(0x1f5)](_0x3a0927)||_0x3a0927<=0x0)&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.assignee.roleId','message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x3272f4[_0x2041a6(0x219)]!==undefined){if(!isRecord(_0x3272f4[_0x2041a6(0x219)]))_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x220),'message':_0x2041a6(0x227)});else{if(_0x3272f4[_0x2041a6(0x219)][_0x2041a6(0x1a9)]!=='FIXED')_0x334fd2['push']({'path':_0x430f12+'.transferCandidates.strategy','message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x5cd958=_0x3272f4[_0x2041a6(0x219)][_0x2041a6(0x1b4)];if(!Array[_0x2041a6(0x121)](_0x5cd958)||_0x5cd958['length']===0x0)_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x182),'message':_0x2041a6(0x25b)});else{const _0x419bd4=_0x5cd958[_0x2041a6(0x254)](_0x110a09=>!isValidUserId(_0x110a09));_0x419bd4>=0x0&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x22d)+_0x419bd4+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x3272f4[_0x2041a6(0x18f)]!==undefined&&typeof _0x3272f4[_0x2041a6(0x18f)]!==_0x2041a6(0x13b)&&_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x16e),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x3272f4[_0x2041a6(0x1ed)]==='SCRIPT'){(typeof _0x3272f4[_0x2041a6(0x253)]!==_0x2041a6(0x19d)||_0x3272f4['scriptName'][_0x2041a6(0x1cf)]()==='')&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+'.scriptName','message':_0x2041a6(0x235)});if(_0x3272f4[_0x2041a6(0x1c5)]!==undefined){if(typeof _0x3272f4['resultVariable']!==_0x2041a6(0x19d)||!VARIABLE_PATTERN[_0x2041a6(0x26d)](_0x3272f4[_0x2041a6(0x1c5)]))_0x334fd2['push']({'path':_0x430f12+_0x2041a6(0x24e),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2041a6(0x1f9)](_0x3272f4[_0x2041a6(0x1c5)])||_0x3272f4[_0x2041a6(0x1c5)][_0x2041a6(0x1d7)](_0x2041a6(0x139)))&&_0x334fd2[_0x2041a6(0x1be)]({'path':_0x430f12+_0x2041a6(0x24e),'message':'Reserved\x20resultVariable:\x20'+_0x3272f4[_0x2041a6(0x1c5)]+'.'});}}validateAsyncExecution(_0x3272f4,_0x430f12,_0x334fd2),validateApprovalTimeout(_0x3272f4,_0x430f12,_0x334fd2),validateCcConfig(_0x3272f4,_0x430f12,_0x334fd2),_0x3272f4[_0x2041a6(0x1ed)]===_0x2041a6(0x251)&&validateNotificationConfig(_0x3272f4[_0x2041a6(0x13c)],_0x430f12+'.config',_0x334fd2);}function validateAsyncExecution(_0x58e15f,_0x2a7aab,_0x2c0b5a){const _0x5790a6=a281_0x358266;if(_0x58e15f[_0x5790a6(0x162)]===undefined)return;if(!isRecord(_0x58e15f['async'])){_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1a3),'message':_0x5790a6(0x248)});return;}if(_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x1f0)]!==undefined&&typeof _0x58e15f[_0x5790a6(0x162)]['enabled']!==_0x5790a6(0x13b)){_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1c0),'message':_0x5790a6(0x115)});return;}if(_0x58e15f['async']['enabled']!==!![])return;_0x58e15f[_0x5790a6(0x1ed)]!==_0x5790a6(0x10d)&&_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x1a3),'message':_0x5790a6(0x1bc)});const _0x34b8fa=_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x20b)]??0x3;(!Number[_0x5790a6(0x168)](_0x34b8fa)||_0x34b8fa<0x1||_0x34b8fa>MAX_ASYNC_RETRY_COUNT)&&_0x2c0b5a[_0x5790a6(0x1be)]({'path':_0x2a7aab+_0x5790a6(0x11b),'message':_0x5790a6(0x195)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x58e15f[_0x5790a6(0x162)][_0x5790a6(0x206)]!==undefined&&validateTimeAmount(_0x58e15f[_0x5790a6(0x162)]['retryInterval'],_0x2a7aab+'.async.retryInterval',_0x2c0b5a);}function validateApprovalTimeout(_0x21fa98,_0x48e6c0,_0x3d77c8){const _0x7a469=a281_0x358266;if(_0x21fa98[_0x7a469(0x23f)]===undefined)return;if(!isRecord(_0x21fa98[_0x7a469(0x23f)])){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x15b),'message':_0x7a469(0x127)});return;}if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1f0)]!==undefined&&typeof _0x21fa98['timeout'][_0x7a469(0x1f0)]!==_0x7a469(0x13b)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+'.timeout.enabled','message':_0x7a469(0x141)});return;}if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1f0)]!==!![])return;if(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x13a)]!==undefined&&typeof _0x21fa98[_0x7a469(0x23f)][_0x7a469(0x13a)]!==_0x7a469(0x13b)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x240),'message':_0x7a469(0x19a)});return;}_0x21fa98[_0x7a469(0x1ed)]!==_0x7a469(0x1a8)&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+'.timeout','message':_0x7a469(0x18c)});validateTimeAmount(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1ff)],_0x48e6c0+'.timeout.duration',_0x3d77c8);const _0xe4bdff=_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x238)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x7a469(0x1f9)](_0xe4bdff)){_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x22b),'message':_0x7a469(0x123)});return;}(_0x21fa98['taskMode']??_0x7a469(0x1a8))===_0x7a469(0x17a)&&_0xe4bdff!=='EXECUTE_BFF'&&_0x3d77c8['push']({'path':_0x48e6c0+_0x7a469(0x22b),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x184b8b=_0x21fa98['timeout'][_0x7a469(0x13a)]??_0xe4bdff!==_0x7a469(0x12f);if(_0xe4bdff===_0x7a469(0x12f))_0x184b8b&&_0x3d77c8['push']({'path':_0x48e6c0+_0x7a469(0x240),'message':_0x7a469(0x245)}),(typeof _0x21fa98[_0x7a469(0x23f)][_0x7a469(0x253)]!==_0x7a469(0x19d)||_0x21fa98['timeout'][_0x7a469(0x253)]['trim']()==='')&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x174),'message':_0x7a469(0x159)}),validateOptionalResultVariable(_0x21fa98[_0x7a469(0x23f)][_0x7a469(0x1c5)],_0x48e6c0+_0x7a469(0x233),_0x3d77c8);else!_0x184b8b&&_0x3d77c8[_0x7a469(0x1be)]({'path':_0x48e6c0+_0x7a469(0x240),'message':_0xe4bdff+_0x7a469(0x265)});}function validateTimeAmount(_0x7b10bb,_0x13c963,_0x393879){const _0x946b25=a281_0x358266;if(!isRecord(_0x7b10bb)){_0x393879[_0x946b25(0x1be)]({'path':_0x13c963,'message':_0x946b25(0x236)});return;}(!Number[_0x946b25(0x168)](_0x7b10bb[_0x946b25(0x114)])||Number(_0x7b10bb[_0x946b25(0x114)])<=0x0)&&_0x393879[_0x946b25(0x1be)]({'path':_0x13c963+'.value','message':_0x946b25(0x26a)}),!FLOW_TIME_UNITS[_0x946b25(0x1f9)](_0x7b10bb['unit'])&&_0x393879['push']({'path':_0x13c963+_0x946b25(0x14a),'message':_0x946b25(0x158)});}function validateOptionalResultVariable(_0x4021e3,_0x59779a,_0x1fa597){const _0x1fbd82=a281_0x358266;if(_0x4021e3===undefined||_0x4021e3===null||_0x4021e3==='')return;if(typeof _0x4021e3!==_0x1fbd82(0x19d)||!VARIABLE_PATTERN[_0x1fbd82(0x26d)](_0x4021e3))_0x1fa597[_0x1fbd82(0x1be)]({'path':_0x59779a,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x1fbd82(0x1f9)](_0x4021e3)||_0x4021e3[_0x1fbd82(0x1d7)](_0x1fbd82(0x139)))&&_0x1fa597[_0x1fbd82(0x1be)]({'path':_0x59779a,'message':'Reserved\x20resultVariable:\x20'+_0x4021e3+'.'});}function validateCcConfig(_0x550bb3,_0x1d95e8,_0x3c6dd9){const _0xa97f0a=a281_0x358266;if(_0x550bb3['cc']===undefined)return;if(!isRecord(_0x550bb3['cc'])){_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x13e),'message':_0xa97f0a(0x15e)});return;}_0x550bb3[_0xa97f0a(0x1ed)]!==_0xa97f0a(0x207)&&_0x550bb3[_0xa97f0a(0x1ed)]!==_0xa97f0a(0x1a8)&&_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x13e),'message':_0xa97f0a(0x16b)});Object[_0xa97f0a(0x169)][_0xa97f0a(0x1b2)]['call'](_0x550bb3['cc'],'readSources')&&_0x3c6dd9['push']({'path':_0x1d95e8+_0xa97f0a(0x1e7),'message':UNSUPPORTED_FORM_MESSAGE});const _0x278171=_0x550bb3['cc']['recipientUserIds'];if(!Array[_0xa97f0a(0x121)](_0x278171)||_0x278171[_0xa97f0a(0x1bf)]===0x0)_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x21b),'message':_0xa97f0a(0x225)});else{_0x278171['length']>MAX_CC_RECIPIENTS&&_0x3c6dd9[_0xa97f0a(0x1be)]({'path':_0x1d95e8+_0xa97f0a(0x21b),'message':_0xa97f0a(0x19b)+MAX_CC_RECIPIENTS+_0xa97f0a(0x137)});const _0x12e08a=new Set();_0x278171['forEach']((_0x2440e7,_0x180b09)=>{const _0x1ad520=_0xa97f0a;if(typeof _0x2440e7!==_0x1ad520(0x19d)||_0x2440e7[_0x1ad520(0x1cf)]()==='')_0x3c6dd9[_0x1ad520(0x1be)]({'path':_0x1d95e8+_0x1ad520(0x224)+_0x180b09+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x12e08a[_0x1ad520(0x1f9)](_0x2440e7[_0x1ad520(0x1cf)]())?_0x3c6dd9[_0x1ad520(0x1be)]({'path':_0x1d95e8+_0x1ad520(0x224)+_0x180b09+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x2440e7[_0x1ad520(0x1cf)]()+'.'}):_0x12e08a[_0x1ad520(0x18d)](_0x2440e7[_0x1ad520(0x1cf)]());});}validateStringArray(_0x550bb3['cc'][_0xa97f0a(0x1ea)],_0x1d95e8+_0xa97f0a(0x17f),_0x3c6dd9);}function validateStringArray(_0xcdeaf1,_0x3fd1ac,_0x3e0dec){const _0x5e3aec=a281_0x358266;if(_0xcdeaf1===undefined)return;if(!Array['isArray'](_0xcdeaf1)){_0x3e0dec[_0x5e3aec(0x1be)]({'path':_0x3fd1ac,'message':_0x5e3aec(0x1f3)});return;}const _0x3f2da1=new Set();_0xcdeaf1['forEach']((_0x59ad86,_0x250f62)=>{const _0xf7cc76=_0x5e3aec;if(typeof _0x59ad86!==_0xf7cc76(0x19d)||_0x59ad86['trim']()==='')_0x3e0dec[_0xf7cc76(0x1be)]({'path':_0x3fd1ac+'['+_0x250f62+']','message':_0xf7cc76(0x197)});else _0x3f2da1['has'](_0x59ad86[_0xf7cc76(0x1cf)]())?_0x3e0dec[_0xf7cc76(0x1be)]({'path':_0x3fd1ac+'['+_0x250f62+']','message':_0xf7cc76(0x1f1)+_0x59ad86['trim']()+'.'}):_0x3f2da1[_0xf7cc76(0x18d)](_0x59ad86[_0xf7cc76(0x1cf)]());});}function validateNotificationConfig(_0x2df2f1,_0x2a1c90,_0x184abd){const _0x100be1=a281_0x358266;if(!isRecord(_0x2df2f1)){_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90,'message':_0x100be1(0x201)});return;}if(_0x2df2f1[_0x100be1(0x1c3)]!==undefined&&_0x2df2f1[_0x100be1(0x1c3)]!==null){if(typeof _0x2df2f1[_0x100be1(0x1c3)]!=='string')_0x184abd['push']({'path':_0x2a1c90+_0x100be1(0x1fe),'message':_0x100be1(0x1d8)});else _0x2df2f1[_0x100be1(0x1c3)][_0x100be1(0x1cf)]()&&_0x2df2f1[_0x100be1(0x1c3)]['trim']()!=='v1'&&_0x184abd['push']({'path':_0x2a1c90+'.version','message':_0x100be1(0x255)+_0x2df2f1['version']+'.'});}const _0x44c72e=requireNotificationString(_0x2df2f1[_0x100be1(0x1c2)],_0x2a1c90+'.configCode','Notification\x20configCode\x20is\x20required.',_0x184abd);_0x44c72e?.[_0x100be1(0x173)]('${')&&_0x184abd['push']({'path':_0x2a1c90+'.configCode','message':_0x100be1(0x10e)});if(_0x2df2f1[_0x100be1(0x23c)]!==undefined&&_0x2df2f1[_0x100be1(0x23c)]!==null){if(typeof _0x2df2f1[_0x100be1(0x23c)]!==_0x100be1(0x19d))_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+_0x100be1(0x118),'message':_0x100be1(0x135)});else!NOTIFICATION_FAILURE_POLICIES[_0x100be1(0x1f9)](_0x2df2f1[_0x100be1(0x23c)][_0x100be1(0x1cf)]()[_0x100be1(0x1a2)]())&&_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+_0x100be1(0x118),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x2df2f1[_0x100be1(0x1e0)])?_0x184abd[_0x100be1(0x1be)]({'path':_0x2a1c90+'.template','message':_0x100be1(0x214)}):validateNotificationTemplate(_0x2df2f1[_0x100be1(0x1e0)],_0x2a1c90+'.template',_0x184abd),validateNotificationRecipients(_0x2df2f1[_0x100be1(0x196)],_0x2a1c90+_0x100be1(0x218),_0x184abd);}function validateNotificationTemplate(_0xf210b5,_0x2c9e98,_0x5f2e30){const _0x51a17b=a281_0x358266;for(const _0x5850b8 of[_0x51a17b(0x128),_0x51a17b(0x26e)]){const _0x47b7c9=requireNotificationString(_0xf210b5[_0x5850b8],_0x2c9e98+'.'+_0x5850b8,'Notification\x20template.'+_0x5850b8+_0x51a17b(0x145),_0x5f2e30);if(_0x47b7c9)validateNotificationPlaceholders(_0x47b7c9,_0x2c9e98+'.'+_0x5850b8,_0x5f2e30);}_0xf210b5[_0x51a17b(0x11c)]!==undefined&&_0xf210b5[_0x51a17b(0x11c)]!==null&&(typeof _0xf210b5[_0x51a17b(0x11c)]!=='string'?_0x5f2e30[_0x51a17b(0x1be)]({'path':_0x2c9e98+'.detailMarkdown','message':_0x51a17b(0x130)}):validateNotificationPlaceholders(_0xf210b5['detailMarkdown'],_0x2c9e98+_0x51a17b(0x189),_0x5f2e30)),validateNotificationFacts(_0xf210b5[_0x51a17b(0x1d1)],_0x2c9e98+_0x51a17b(0x16d),_0x5f2e30),validateNotificationActions(_0xf210b5[_0x51a17b(0x18e)],_0x2c9e98+_0x51a17b(0x11f),_0x5f2e30);}function validateNotificationFacts(_0x442059,_0x373ed4,_0x386f23){const _0x4ea0c8=a281_0x358266;if(_0x442059===undefined||_0x442059===null)return;if(!Array[_0x4ea0c8(0x121)](_0x442059)){_0x386f23[_0x4ea0c8(0x1be)]({'path':_0x373ed4,'message':_0x4ea0c8(0x119)});return;}_0x442059['length']>MAX_NOTIFICATION_FACTS&&_0x386f23['push']({'path':_0x373ed4,'message':_0x4ea0c8(0x247)+MAX_NOTIFICATION_FACTS+_0x4ea0c8(0x112)}),_0x442059[_0x4ea0c8(0x1d2)]((_0xef3393,_0x4378bf)=>{const _0x35869b=_0x4ea0c8,_0xed7b6f=_0x373ed4+'['+_0x4378bf+']';if(!isRecord(_0xef3393)){_0x386f23[_0x35869b(0x1be)]({'path':_0xed7b6f,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x18af34 of[_0x35869b(0x198),_0x35869b(0x114)]){const _0x4c1f0d=requireNotificationString(_0xef3393[_0x18af34],_0xed7b6f+'.'+_0x18af34,_0x35869b(0x18a)+_0x18af34+'\x20is\x20required.',_0x386f23);_0x4c1f0d&&validateNotificationPlaceholders(_0x4c1f0d,_0xed7b6f+'.'+_0x18af34,_0x386f23);}});}function validateNotificationActions(_0x11378a,_0x575261,_0x4a1bbf){const _0x1ad07a=a281_0x358266;if(_0x11378a===undefined||_0x11378a===null)return;if(!Array[_0x1ad07a(0x121)](_0x11378a)){_0x4a1bbf['push']({'path':_0x575261,'message':_0x1ad07a(0x180)});return;}_0x11378a[_0x1ad07a(0x1bf)]>MAX_NOTIFICATION_ACTIONS&&_0x4a1bbf['push']({'path':_0x575261,'message':_0x1ad07a(0x247)+MAX_NOTIFICATION_ACTIONS+_0x1ad07a(0x230)}),_0x11378a[_0x1ad07a(0x1d2)]((_0x5925e8,_0x1a4fe3)=>{const _0x17a5e2=_0x1ad07a,_0x97600e=_0x575261+'['+_0x1a4fe3+']';if(!isRecord(_0x5925e8)){_0x4a1bbf[_0x17a5e2(0x1be)]({'path':_0x97600e,'message':_0x17a5e2(0x165)});return;}const _0x49a59e=requireNotificationString(_0x5925e8[_0x17a5e2(0x243)],_0x97600e+_0x17a5e2(0x210),_0x17a5e2(0x223),_0x4a1bbf);if(_0x49a59e)validateNotificationPlaceholders(_0x49a59e,_0x97600e+_0x17a5e2(0x210),_0x4a1bbf);const _0xf15f28=requireNotificationString(_0x5925e8[_0x17a5e2(0x259)],_0x97600e+'.url',_0x17a5e2(0x1b0),_0x4a1bbf);if(!_0xf15f28)return;validateNotificationPlaceholders(_0xf15f28,_0x97600e+'.url',_0x4a1bbf),!/^https?:\/\//i[_0x17a5e2(0x26d)](_0xf15f28)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x17a5e2(0x26d)](_0xf15f28)&&_0x4a1bbf['push']({'path':_0x97600e+_0x17a5e2(0x155),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x568603,_0x3cd88a,_0x2c3cb1){const _0x220b1e=a281_0x358266;if(_0x568603===undefined||_0x568603===null)return;if(!Array[_0x220b1e(0x121)](_0x568603)){_0x2c3cb1[_0x220b1e(0x1be)]({'path':_0x3cd88a,'message':_0x220b1e(0x1e2)});return;}let _0x2d42c2=![];_0x568603[_0x220b1e(0x1d2)]((_0x2a4a66,_0x2ac3c3)=>{const _0x358d61=_0x220b1e,_0x3d64fc=_0x3cd88a+'['+_0x2ac3c3+']';if(!isRecord(_0x2a4a66)){_0x2c3cb1['push']({'path':_0x3d64fc,'message':_0x358d61(0x1df)});return;}const _0x4625b4=requireNotificationString(_0x2a4a66[_0x358d61(0x1ed)],_0x3d64fc+_0x358d61(0x172),'Notification\x20recipient.type\x20is\x20required.',_0x2c3cb1);_0x4625b4&&!NOTIFICATION_RECIPIENT_TYPES[_0x358d61(0x1f9)](_0x4625b4[_0x358d61(0x1a2)]())&&_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x172),'message':_0x358d61(0x1b7)});let _0x1f3c39='TO';_0x2a4a66[_0x358d61(0x111)]!==undefined&&_0x2a4a66[_0x358d61(0x111)]!==null&&(typeof _0x2a4a66[_0x358d61(0x111)]!==_0x358d61(0x19d)?(_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x1c6),'message':_0x358d61(0x252)}),_0x1f3c39=''):(_0x1f3c39=_0x2a4a66[_0x358d61(0x111)][_0x358d61(0x1cf)]()[_0x358d61(0x1a2)](),!NOTIFICATION_RECIPIENT_ROLES[_0x358d61(0x1f9)](_0x1f3c39)&&_0x2c3cb1[_0x358d61(0x1be)]({'path':_0x3d64fc+_0x358d61(0x1c6),'message':_0x358d61(0x22e)})));if(_0x1f3c39==='TO')_0x2d42c2=!![];const _0x504b23=requireNotificationString(_0x2a4a66[_0x358d61(0x114)],_0x3d64fc+_0x358d61(0x1ab),_0x358d61(0x211),_0x2c3cb1);_0x504b23&&validateNotificationPlaceholders(_0x504b23,_0x3d64fc+_0x358d61(0x1ab),_0x2c3cb1);}),_0x568603[_0x220b1e(0x1bf)]>0x0&&!_0x2d42c2&&_0x2c3cb1[_0x220b1e(0x1be)]({'path':_0x3cd88a,'message':_0x220b1e(0x185)});}function requireNotificationString(_0x7f7619,_0x12b68e,_0x5a86a2,_0x3b2a61){const _0x4a4aa2=a281_0x358266;if(typeof _0x7f7619!==_0x4a4aa2(0x19d)||_0x7f7619[_0x4a4aa2(0x1cf)]()==='')return _0x3b2a61[_0x4a4aa2(0x1be)]({'path':_0x12b68e,'message':_0x5a86a2}),undefined;return _0x7f7619['trim']();}function validateNotificationPlaceholders(_0x3ce85b,_0x523152,_0x1a2956){const _0x225742=a281_0x358266;for(const _0x146f38 of _0x3ce85b[_0x225742(0x154)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x2498ab=_0x146f38[0x1]?.[_0x225742(0x1cf)]()??'',_0x49c4d7=_0x2498ab[_0x225742(0x25e)]('.'),_0xc22032=_0x49c4d7>=0x0?_0x2498ab[_0x225742(0x257)](0x0,_0x49c4d7):_0x2498ab,_0x203705=_0x49c4d7>=0x0?_0x2498ab[_0x225742(0x257)](_0x49c4d7+0x1)[_0x225742(0x1cf)]():'';(![_0x225742(0x152),_0x225742(0x24a),'variables'][_0x225742(0x173)](_0xc22032)||_0x203705==='')&&_0x1a2956[_0x225742(0x1be)]({'path':_0x523152,'message':_0x225742(0x12a)+_0x146f38[0x0]+'.'});}_0x3ce85b[_0x225742(0x23a)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x225742(0x173)]('${')&&_0x1a2956['push']({'path':_0x523152,'message':_0x225742(0x179)});}function a281_0x4a08(_0x2e8347,_0x5d60f5){_0x2e8347=_0x2e8347-0x10c;const _0x445b87=a281_0x445b();let _0x4a0873=_0x445b87[_0x2e8347];return _0x4a0873;}function validateEdge(_0x3e8401,_0x33c02b,_0x3e80ac){const _0x4ea97c=a281_0x358266;_0x3e8401[_0x4ea97c(0x193)]!==undefined&&typeof _0x3e8401[_0x4ea97c(0x193)]!==_0x4ea97c(0x19d)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+'.name','message':_0x4ea97c(0x244)}),_0x3e8401['defaultFlow']!==undefined&&typeof _0x3e8401[_0x4ea97c(0x12c)]!==_0x4ea97c(0x13b)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x129),'message':_0x4ea97c(0x25f)}),_0x3e8401[_0x4ea97c(0x258)]!==undefined&&(!Array[_0x4ea97c(0x121)](_0x3e8401[_0x4ea97c(0x258)])?_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x20f),'message':_0x4ea97c(0x1de)}):_0x3e8401['waypoints']['forEach']((_0x2376db,_0x54f002)=>{const _0x40f371=_0x4ea97c;if(!isRecord(_0x2376db)){_0x3e80ac[_0x40f371(0x1be)]({'path':_0x33c02b+_0x40f371(0x237)+_0x54f002+']','message':_0x40f371(0x125)});return;}for(const _0x576c36 of['x','y']){const _0x281f97=_0x2376db[_0x576c36];(typeof _0x281f97!==_0x40f371(0x1f8)||!Number[_0x40f371(0x19e)](_0x281f97))&&_0x3e80ac[_0x40f371(0x1be)]({'path':_0x33c02b+'.waypoints['+_0x54f002+'].'+_0x576c36,'message':_0x40f371(0x20d)+_0x576c36+_0x40f371(0x217)});}})),_0x3e8401['conditionType']!==undefined&&!CONDITION_TYPES[_0x4ea97c(0x1f9)](_0x3e8401[_0x4ea97c(0x1dd)])&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+'.conditionType','message':'Unsupported\x20condition\x20type:\x20'+String(_0x3e8401['conditionType'])+'.'}),_0x3e8401[_0x4ea97c(0x1dd)]===_0x4ea97c(0x150)&&(typeof _0x3e8401[_0x4ea97c(0x178)]!=='string'||_0x3e8401[_0x4ea97c(0x178)][_0x4ea97c(0x1cf)]()==='')&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x23b),'message':_0x4ea97c(0x21e)}),_0x3e8401[_0x4ea97c(0x12c)]===!![]&&_0x3e8401[_0x4ea97c(0x1dd)]!==_0x4ea97c(0x184)&&_0x3e80ac[_0x4ea97c(0x1be)]({'path':_0x33c02b+_0x4ea97c(0x129),'message':_0x4ea97c(0x12e)}),_0x3e8401['defaultFlow']===!![]&&typeof _0x3e8401['expression']==='string'&&_0x3e8401[_0x4ea97c(0x178)][_0x4ea97c(0x1cf)]()!==''&&_0x3e80ac['push']({'path':_0x33c02b+_0x4ea97c(0x23b),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x4a9068,_0x407ac9,_0x5555a3,_0x56ee08,_0x501f84,_0x4841cb,_0x3ec318){const _0x5c1327=a281_0x358266;for(const [_0x3e9066,_0x4e3966]of _0x4a9068){const _0x5f1f34=_0x501f84['get'](_0x3e9066)??[],_0x47e4ac=_0x56ee08[_0x5c1327(0x1b3)](_0x3e9066)??[];_0x4e3966[_0x5c1327(0x1ed)]!==_0x5c1327(0x126)&&_0x5f1f34['length']===0x0&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x22f)});_0x4e3966[_0x5c1327(0x1ed)]!==_0x5c1327(0x207)&&_0x47e4ac[_0x5c1327(0x1bf)]===0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x126)&&_0x5f1f34[_0x5c1327(0x1bf)]>0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x207)&&_0x47e4ac[_0x5c1327(0x1bf)]>0x0&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x4e3966['type']===_0x5c1327(0x20c)){_0x47e4ac[_0x5c1327(0x1bf)]<0x2&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x31f86e=_0x47e4ac[_0x5c1327(0x226)](_0x3c70df=>_0x3c70df[_0x5c1327(0x12c)]===!![]);_0x31f86e[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318[_0x5c1327(0x1be)]({'path':'flowJson.nodes.'+_0x3e9066,'message':_0x5c1327(0x1a0)});if(_0x31f86e['length']===0x1){const _0x223fe0=_0x31f86e[0x0],_0x13e9c4=_0x4841cb[_0x5c1327(0x1b3)](_0x223fe0)??_0x5c1327(0x17e);_0x223fe0[_0x5c1327(0x1dd)]!==_0x5c1327(0x184)&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x13e9c4+_0x5c1327(0x24f),'message':'CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.'});_0x223fe0['expression']!==undefined&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x13e9c4+_0x5c1327(0x23b),'message':_0x5c1327(0x1fd)});for(const _0x351c58 of _0x47e4ac){if(_0x351c58===_0x223fe0)continue;const _0x282ba2=_0x4841cb[_0x5c1327(0x1b3)](_0x351c58)??_0x5c1327(0x17e);if(_0x351c58[_0x5c1327(0x1dd)]!==_0x5c1327(0x150))_0x3ec318[_0x5c1327(0x1be)]({'path':_0x282ba2+_0x5c1327(0x24f),'message':_0x5c1327(0x1aa)});else(typeof _0x351c58[_0x5c1327(0x178)]!=='string'||_0x351c58['expression']['trim']()==='')&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x282ba2+_0x5c1327(0x23b),'message':_0x5c1327(0x124)});}}}if(_0x4e3966[_0x5c1327(0x1ed)]===_0x5c1327(0x1a8)&&(_0x4e3966['taskMode']??_0x5c1327(0x1a8))===_0x5c1327(0x17a)){if(_0x47e4ac[_0x5c1327(0x1bf)]!==0x1)_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x140)});else{const _0x1119d6=_0x47e4ac[0x0];((_0x1119d6[_0x5c1327(0x1dd)]??'ALWAYS')!=='ALWAYS'||_0x1119d6[_0x5c1327(0x12c)]===!![]||typeof _0x1119d6[_0x5c1327(0x178)]==='string'&&_0x1119d6[_0x5c1327(0x178)][_0x5c1327(0x1cf)]()!=='')&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x4841cb[_0x5c1327(0x1b3)](_0x1119d6)??_0x5c1327(0x17e),'message':_0x5c1327(0x163)});}}else{if(_0x4e3966['type']===_0x5c1327(0x1a8)){const _0x494d45=_0x47e4ac['map'](_0x346fd8=>_0x346fd8[_0x5c1327(0x1dd)]??_0x5c1327(0x184)),_0x2beecd=_0x494d45[_0x5c1327(0x226)](_0x31daa9=>_0x31daa9!==_0x5c1327(0x1cc)&&_0x31daa9!==_0x5c1327(0x1a1));_0x2beecd[_0x5c1327(0x1bf)]>0x0&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x494d45[_0x5c1327(0x226)](_0x326f81=>_0x326f81===_0x5c1327(0x1cc))[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x249)}),_0x494d45[_0x5c1327(0x226)](_0x28d341=>_0x28d341===_0x5c1327(0x1a1))[_0x5c1327(0x1bf)]!==0x1&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x1eb)}),_0x47e4ac['some'](_0x1e6998=>_0x1e6998['defaultFlow']===!![])&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e9066,'message':_0x5c1327(0x176)});}}}const _0x91fb54=new Set(),_0x46e52b=_0x36a11d=>{const _0x300810=_0x5c1327;if(_0x91fb54[_0x300810(0x1f9)](_0x36a11d))return;_0x91fb54['add'](_0x36a11d);for(const _0x58b48e of _0x56ee08[_0x300810(0x1b3)](_0x36a11d)??[]){const _0x8cdfdd=resolveEdgeEndpoint(_0x58b48e[_0x300810(0x17b)],_0x58b48e[_0x300810(0x131)]);if(_0x8cdfdd&&_0x4a9068[_0x300810(0x1f9)](_0x8cdfdd))_0x46e52b(_0x8cdfdd);}};_0x46e52b(_0x407ac9);for(const _0x3e163e of _0x4a9068[_0x5c1327(0x188)]()){!_0x91fb54['has'](_0x3e163e)&&_0x3ec318['push']({'path':_0x5c1327(0x183)+_0x3e163e,'message':_0x5c1327(0x204)});}const _0x72ea60=_0x5555a3['some'](_0x30f295=>_0x91fb54[_0x5c1327(0x1f9)](_0x30f295));if(!_0x72ea60){_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x17e),'message':_0x5c1327(0x1b1)});return;}const _0x5ba59e=new Set(),_0xf8c635=_0x19cf3c=>{const _0x9d8504=_0x5c1327;if(_0x5ba59e[_0x9d8504(0x1f9)](_0x19cf3c))return;_0x5ba59e[_0x9d8504(0x18d)](_0x19cf3c);for(const _0x4815dd of _0x501f84[_0x9d8504(0x1b3)](_0x19cf3c)??[]){const _0x3e734f=resolveEdgeEndpoint(_0x4815dd[_0x9d8504(0x166)],_0x4815dd['sourceNodeId']);if(_0x3e734f&&_0x4a9068[_0x9d8504(0x1f9)](_0x3e734f))_0xf8c635(_0x3e734f);}};for(const _0xa0f7cd of _0x5555a3){if(_0x4a9068[_0x5c1327(0x1f9)](_0xa0f7cd))_0xf8c635(_0xa0f7cd);}for(const _0x39e410 of _0x91fb54){!_0x5ba59e[_0x5c1327(0x1f9)](_0x39e410)&&_0x3ec318[_0x5c1327(0x1be)]({'path':_0x5c1327(0x183)+_0x39e410,'message':_0x5c1327(0x25c)});}}function validateApprovalResults(_0x2ca2d0,_0x1d166e,_0x141682,_0x422021){const _0x5547aa=a281_0x358266;if(_0x1d166e===0x0)return;const _0xf378af=new Set(_0x141682[_0x5547aa(0x261)](_0x52a0e9=>_0x2ca2d0[_0x5547aa(0x1b3)](_0x52a0e9)?.[_0x5547aa(0x157)])['filter'](_0x3fa018=>typeof _0x3fa018==='string'));for(const _0x1f4136 of[_0x5547aa(0x1cc),'REJECTED']){!_0xf378af[_0x5547aa(0x1f9)](_0x1f4136)&&_0x422021[_0x5547aa(0x1be)]({'path':_0x5547aa(0x1ac),'message':_0x5547aa(0x1db)+_0x1f4136+'.'});}}function validateScriptResultReferences(_0x23d4a8,_0x3a24dd,_0x50cc99,_0x1fce89,_0x4c9bd1,_0x39a11e,_0x10de83){const _0x57a274=a281_0x358266;if(_0x39a11e['size']===0x0)return;const _0x20aac9=new Set(),_0x29e80e=_0x1faf67=>{const _0x49d197=a281_0x4a08;if(!_0x20aac9['has'](_0x1faf67)&&_0x23d4a8[_0x49d197(0x1f9)](_0x1faf67)){_0x20aac9[_0x49d197(0x18d)](_0x1faf67);for(const _0x5bbb06 of _0x50cc99['get'](_0x1faf67)??[]){const _0x54e299=resolveEdgeEndpoint(_0x5bbb06['target'],_0x5bbb06[_0x49d197(0x131)]);if(_0x54e299)_0x29e80e(_0x54e299);}}};_0x29e80e(_0x3a24dd);const _0x35daee=new Map();for(const _0x362cfa of _0x20aac9){_0x35daee[_0x57a274(0x1ce)](_0x362cfa,_0x362cfa===_0x3a24dd?new Set([_0x3a24dd]):new Set(_0x20aac9));}let _0x4d6a2f=!![];while(_0x4d6a2f){_0x4d6a2f=![];for(const _0x2372d5 of _0x20aac9){if(_0x2372d5===_0x3a24dd)continue;const _0x910c37=(_0x1fce89[_0x57a274(0x1b3)](_0x2372d5)??[])[_0x57a274(0x261)](_0x1b6aa3=>resolveEdgeEndpoint(_0x1b6aa3[_0x57a274(0x166)],_0x1b6aa3[_0x57a274(0x1ca)]))[_0x57a274(0x226)](_0x365804=>Boolean(_0x365804&&_0x20aac9[_0x57a274(0x1f9)](_0x365804)));if(_0x910c37[_0x57a274(0x1bf)]===0x0)continue;const _0x5f3cc5=new Set(_0x35daee[_0x57a274(0x1b3)](_0x910c37[0x0])??[]);for(const _0x1d3aa0 of _0x910c37[_0x57a274(0x257)](0x1)){const _0x519530=_0x35daee[_0x57a274(0x1b3)](_0x1d3aa0)??new Set();for(const _0x540090 of _0x5f3cc5){if(!_0x519530[_0x57a274(0x1f9)](_0x540090))_0x5f3cc5[_0x57a274(0x156)](_0x540090);}}_0x5f3cc5['add'](_0x2372d5);const _0x515389=_0x35daee[_0x57a274(0x1b3)](_0x2372d5);!setsEqual(_0x515389,_0x5f3cc5)&&(_0x35daee[_0x57a274(0x1ce)](_0x2372d5,_0x5f3cc5),_0x4d6a2f=!![]);}}for(const [_0x481968,_0x16fceb]of _0x50cc99){const _0x405800=_0x35daee[_0x57a274(0x1b3)](_0x481968);if(!_0x405800)continue;for(const _0x68cf63 of _0x16fceb){if(_0x68cf63[_0x57a274(0x1dd)]!==_0x57a274(0x150)||typeof _0x68cf63[_0x57a274(0x178)]!==_0x57a274(0x19d))continue;for(const [_0x54d01d,_0x3fd427]of _0x39a11e){expressionReferencesVariable(_0x68cf63[_0x57a274(0x178)],_0x54d01d)&&!_0x405800[_0x57a274(0x1f9)](_0x3fd427)&&_0x10de83[_0x57a274(0x1be)]({'path':(_0x4c9bd1[_0x57a274(0x1b3)](_0x68cf63)??_0x57a274(0x17e))+_0x57a274(0x23b),'message':_0x57a274(0x19c)+_0x54d01d+_0x57a274(0x268)+_0x3fd427+_0x57a274(0x18b)+_0x481968+'.'});}}}}function expressionReferencesVariable(_0x2aa5ad,_0x3682b0){const _0x5aa9ff=a281_0x358266,_0x530b71=_0x3682b0[_0x5aa9ff(0x23a)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp('(?<![A-Za-z0-9_])'+_0x530b71+_0x5aa9ff(0x1da))[_0x5aa9ff(0x26d)](_0x2aa5ad);}function resolveEffectiveResultVariable(_0x136abb,_0x24553a){const _0xc0e130=a281_0x358266;if(_0x136abb===undefined||_0x136abb===null||_0x24553a&&_0x136abb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x136abb!==_0xc0e130(0x19d)||!VARIABLE_PATTERN[_0xc0e130(0x26d)](_0x136abb)||RESERVED_RESULT_VARIABLES[_0xc0e130(0x1f9)](_0x136abb)||_0x136abb[_0xc0e130(0x1d7)]('approval_sys_'))return undefined;return _0x136abb;}function registerResultVariableOwner(_0x4a884f,_0x130bd6,_0x2413d5,_0x35bdc7){const _0x48205d=a281_0x358266;if(_0x4a884f[_0x48205d(0x1f9)](_0x130bd6)){_0x35bdc7['push']({'path':_0x48205d(0x1ac),'message':_0x48205d(0x1a4)+_0x130bd6+'.'});return;}_0x4a884f['set'](_0x130bd6,_0x2413d5);}function setsEqual(_0x3dcfc3,_0x39679b){const _0x4439c3=a281_0x358266;return _0x3dcfc3['size']===_0x39679b[_0x4439c3(0x134)]&&[..._0x3dcfc3]['every'](_0x3efc0a=>_0x39679b[_0x4439c3(0x1f9)](_0x3efc0a));}function isValidUserId(_0x1ce12b){const _0x2384eb=a281_0x358266;if(typeof _0x1ce12b==='string')return _0x1ce12b[_0x2384eb(0x1cf)]()[_0x2384eb(0x1bf)]>0x0;return Number[_0x2384eb(0x1f5)](_0x1ce12b)&&Number(_0x1ce12b)>0x0;}function resolveEdgeEndpoint(_0x5722a2,_0x359821){const _0x50770d=a281_0x358266;if(typeof _0x5722a2==='string'&&_0x5722a2[_0x50770d(0x1cf)]())return _0x5722a2[_0x50770d(0x1cf)]();if(typeof _0x359821===_0x50770d(0x19d)&&_0x359821[_0x50770d(0x1cf)]())return _0x359821['trim']();return undefined;}function removeEmptyMetadata(_0x5a6c3f,_0xc98b02,_0x303cc9,_0x426d0c){const _0x43dcd2=a281_0x358266;if(Array['isArray'](_0x5a6c3f)){_0x5a6c3f['forEach']((_0x5341b7,_0x596e7a)=>removeEmptyMetadata(_0x5341b7,_0xc98b02+'['+_0x596e7a+']',_0x303cc9,_0x426d0c));return;}if(!isRecord(_0x5a6c3f))return;for(const [_0x40a35b,_0x52bf29]of Object[_0x43dcd2(0x13f)](_0x5a6c3f)){const _0x33ca04=_0xc98b02+'.'+_0x40a35b;if(_0x40a35b==='metadata'&&isEmptyJsonValue(_0x52bf29)){delete _0x5a6c3f[_0x40a35b],_0x426d0c[_0x43dcd2(0x1be)](_0x33ca04),_0x303cc9[_0x43dcd2(0x1be)]({'code':_0x43dcd2(0x1b9),'path':_0x33ca04,'message':_0x33ca04+_0x43dcd2(0x186)});continue;}removeEmptyMetadata(_0x52bf29,_0x33ca04,_0x303cc9,_0x426d0c);}}function isEmptyJsonValue(_0x1d4311){const _0x15c81e=a281_0x358266;if(_0x1d4311===null||_0x1d4311===undefined)return!![];if(typeof _0x1d4311===_0x15c81e(0x19d))return _0x1d4311[_0x15c81e(0x1cf)]()==='';if(Array['isArray'](_0x1d4311))return _0x1d4311[_0x15c81e(0x1bf)]===0x0;return isRecord(_0x1d4311)&&Object['keys'](_0x1d4311)['length']===0x0;}function isRecord(_0xf3e7b1){return typeof _0xf3e7b1==='object'&&_0xf3e7b1!==null&&!Array['isArray'](_0xf3e7b1);}function cloneJsonValue(_0x204da6){const _0x5a47af=a281_0x358266;return JSON[_0x5a47af(0x1d5)](JSON[_0x5a47af(0x194)](_0x204da6));}export async function readFlowConfigFile(_0xa3d935){const _0x33d496=await readFile(resolve(_0xa3d935),'utf8');return JSON['parse'](_0x33d496);}function a281_0x445b(){const _0x271a8c=['includes','.timeout.scriptName','AUTO_REJECT','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','flowType','expression','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','HANDLE','target','.tmp','297140YCsDUI','flowJson.edges','.cc.visible','Notification\x20template.actions\x20must\x20be\x20an\x20array.','node\x20pageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.transferCandidates.userIds','flowJson.nodes.','ALWAYS','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','\x20was\x20empty\x20and\x20was\x20removed.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','keys','.detailMarkdown','Notification\x20fact.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','add','actions','sequential','bindDatasetCode','ROLE','nodes\x20must\x20be\x20an\x20array.','name','stringify','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','recipients','value\x20must\x20be\x20a\x20non-empty\x20string.','label','array','timeout.interrupting\x20must\x20be\x20a\x20boolean.','cc.recipientUserIds\x20supports\x20at\x20most\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','string','isFinite','flowJson.startPageId','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','REJECTED','toUpperCase','.async','Duplicate\x20resultVariable:\x20','.assignee.userIds','flowCode','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','APPROVAL','strategy','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.value','flowJson.nodes','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','flowName\x20is\x20required.','edges','Notification\x20action.url\x20is\x20required.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','hasOwnProperty','get','userIds','legacy_field_removed','flowJson.nodes[','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','empty_metadata_removed','PLATFORM_FORM','2310684YiUmEY','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.source','push','length','.async.enabled','.assignee.userIds[','configCode','version','#/$defs/userId','resultVariable','.role','object','roleId','formSchema','sourceNodeId','flowJson.','APPROVED','].taskMode','set','trim','EMAIL','facts','forEach','edges\x20must\x20be\x20an\x20array.','startPageId\x20must\x20be\x20a\x20positive\x20integer.','parse','assignee','startsWith','Notification\x20version\x20must\x20be\x20a\x20string.','#/$defs/timeAmount','(?![A-Za-z0-9_])','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','flowJson.pageMode','conditionType','waypoints\x20must\x20be\x20an\x20array.','Notification\x20recipient\x20must\x20be\x20an\x20object.','template','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20recipients\x20must\x20be\x20an\x20array.','approval.simple-flow.v1','pid','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','flowName','.cc.readSources','node\x20pageId\x20must\x20be\x20a\x20positive\x20integer.','https://json-schema.org/draft/2020-12/schema','visible','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','approval_sys_appCode','type','.target','formPermissions','enabled','Duplicate\x20value:\x20','FAIL','value\x20must\x20be\x20an\x20array.','Unsupported\x20pageMode:\x20','isSafeInteger','FIXED','flowJson\x20must\x20be\x20an\x20object.','number','has','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson','Duplicate\x20node\x20id:\x20','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','.version','duration','Unsupported\x20schemaVersion:\x20','NOTIFICATION\x20node\x20requires\x20config.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','flowJson.schemaVersion','Node\x20is\x20not\x20reachable\x20from\x20START.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','retryInterval','END','position','approval_sys_datasetCode','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','retryCount','CONDITION','waypoint.','appCode','.waypoints','.text','Notification\x20recipient.value\x20is\x20required.','approval_sys_processInstanceId','flowDesc\x20must\x20be\x20a\x20string.','NOTIFICATION\x20node\x20requires\x20template.','approval_sys_initiatorUserId','nodes','\x20must\x20be\x20a\x20finite\x20number.','.recipients','transferCandidates','SECONDS','.cc.recipientUserIds','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','FORM_FLOW','EXPRESSION\x20edge\x20requires\x20expression.','call','.transferCandidates','integer','approval_sys_operationType','Notification\x20action.text\x20is\x20required.','.cc.recipientUserIds[','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','filter','transferCandidates\x20must\x20be\x20an\x20object.','APPROVAL\x20node\x20requires\x20assignee.','edge\x20must\x20be\x20an\x20object.','flowJson.edges[','.timeout.action','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','.transferCandidates.userIds[','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','Node\x20has\x20no\x20incoming\x20edge.','\x20actions.','taskMode','USER','.timeout.resultVariable','flowKey','SCRIPT\x20node\x20requires\x20scriptName.','duration\x20requires\x20value\x20and\x20unit.','.waypoints[','action','.pageId','replace','.expression','failurePolicy','CONTINUE','CUSTOM_PAGE','timeout','.timeout.interrupting','pageMode','HOURS','text','edge\x20name\x20must\x20be\x20a\x20string.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','flowDesc','Notification\x20template\x20supports\x20at\x20most\x20','async\x20must\x20be\x20an\x20object.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','context','.name','recipientUserIds','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.resultVariable','.conditionType','9467AWlsUq','NOTIFICATION','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','scriptName','findIndex','Unsupported\x20notification\x20version:\x20','.approvalMode','slice','waypoints','url','formData','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','Node\x20cannot\x20reach\x20any\x20END.','Unsupported\x20approval\x20mode:\x20','indexOf','defaultFlow\x20must\x20be\x20a\x20boolean.','https://lovrabet.com/schema/rabetbase-flow-config.json','map','BCC','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','.taskMode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','FIXED\x20assignee\x20requires\x20userIds.','approval_sys_initiatorUsername',',\x20but\x20node\x20','datasetCode','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','#/$defs/flowEdge','Duplicate\x20edge\x20route:\x20','test','summary','ANY','SCRIPT','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','\x20->\x20','ALL','role','\x20facts.','MINUTES','value','async.enabled\x20must\x20be\x20a\x20boolean.','datasetCode\x20must\x20be\x20a\x20string.','528414vNzzHL','.failurePolicy','Notification\x20template.facts\x20must\x20be\x20an\x20array.','AUTO_APPROVE','.async.retryCount','detailMarkdown','scriptResult','templateName','.actions','DAYS','isArray','mode','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','START','timeout\x20must\x20be\x20an\x20object.','title','.defaultFlow','Unsupported\x20notification\x20placeholder:\x20','flowType\x20is\x20required.','defaultFlow','schemaVersion','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','EXECUTE_BFF','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','targetNodeId','catch','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','size','failurePolicy\x20must\x20be\x20a\x20string.','Rabetbase\x20FlowConfig','\x20users.','utf8','approval_sys_','interrupting','boolean','config','NaN','.cc','entries','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','timeout.enabled\x20must\x20be\x20a\x20boolean.','.id','.\x20This\x20CLI\x20supports\x20only\x20','#/$defs/position','\x20is\x20required.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','form','1725684YHTUaY','^[A-Za-z_][A-Za-z0-9_]*$','.unit','Edge\x20target\x20node\x20not\x20found:\x20','message','#/$defs/flowNode','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','^[1-9][0-9]*$','EXPRESSION','warnings','event','edge\x20source\x20is\x20required.','matchAll','.url','delete','result','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','Duplicate\x20BPMN\x20element\x20id:\x20','.timeout','Unsupported\x20flowType:\x20','INDEPENDENT_FLOW','cc\x20must\x20be\x20an\x20object.','SINGLE','pageId','unit','async','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','7yHZoql','Notification\x20action\x20must\x20be\x20an\x20object.','source','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','isInteger','prototype','overwrite','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','.facts','.sequential','9817144XESyhT','Unsupported\x20node\x20type:\x20','140056IAwIfG','.type'];a281_0x445b=function(){return _0x271a8c;};return a281_0x445b();}
@@ -1 +1 @@
1
- const a270_0x1f8aad=a270_0x5451;(function(_0x5cb298,_0x36e845){const _0x3dc9df=a270_0x5451,_0x1f0407=_0x5cb298();while(!![]){try{const _0x480d2c=parseInt(_0x3dc9df(0xb2))/0x1+parseInt(_0x3dc9df(0xb7))/0x2*(-parseInt(_0x3dc9df(0xb5))/0x3)+-parseInt(_0x3dc9df(0xc6))/0x4*(parseInt(_0x3dc9df(0xd6))/0x5)+parseInt(_0x3dc9df(0xb0))/0x6*(-parseInt(_0x3dc9df(0xde))/0x7)+-parseInt(_0x3dc9df(0xaf))/0x8+-parseInt(_0x3dc9df(0xd4))/0x9+parseInt(_0x3dc9df(0xe1))/0xa;if(_0x480d2c===_0x36e845)break;else _0x1f0407['push'](_0x1f0407['shift']());}catch(_0x1cb717){_0x1f0407['push'](_0x1f0407['shift']());}}}(a270_0x4101,0x476f6));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';function a270_0x4101(){const _0x12ed40=['decode','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_version_invalid','instant_api_policy_file_exists','instant_api_policy_file_invalid','catch','string','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','1218735voDxuK','rules','1950565EVxYVH','appCode','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','policyFilePath','object','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','byteLength','length','1071MpEKGU','pid','created','15188170WxRzfk','size','ENOENT','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','EEXIST','code','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','instant_api_policy_app_code_invalid','parse','3583104hLaWDd','4116Kwtdjv','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','386541UaDRfh','force','isArray','1603158xnXtNe','utf-8','2OtjsGh','.rabetbase/instant-api-policy','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_file_unreadable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_app_code_mismatch','stringify','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_defaults_invalid','.tmp','includes','instant_api_policy_file_missing','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version','instant_api_policy_file_unwritable','4TmVbEZ','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_too_large','defaults','utf8'];a270_0x4101=function(){return _0x12ed40;};return a270_0x4101();}import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a270_0x1f8aad(0xb8);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x299d7d,_0xadeb24,_0x44adc7){return new CliError(_0x299d7d,0x1,_0xadeb24,_0x44adc7);}export function loadInstantApiPolicyLocalConfig(_0x375869,_0x54f98a){assertSafeAppCode(_0x375869);const _0x41bf01=resolve(_0x54f98a??findProjectRootDirectory()),_0xa1fb48=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x375869+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3c74aa=resolve(_0x41bf01,INSTANT_API_POLICY_RELATIVE_ROOT,_0x375869),_0x1698a0=resolve(_0x3c74aa,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x41bf01,'appCode':_0x375869,'policyRoot':_0x3c74aa,'policyFilePath':_0x1698a0,'policyRelativePath':_0xa1fb48};}export function createDefaultInstantApiPolicyConfig(_0x164550,_0x56e808='allow'){return assertSafeAppCode(_0x164550),{'version':'2','appCode':_0x164550,'defaults':{'instantApi':_0x56e808},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x3befe3){const _0x5349de=a270_0x1f8aad;let _0x20c05f;try{_0x20c05f=await stat(_0x3befe3['policyFilePath']);}catch(_0x366837){throw instantApiPolicyError(_0x5349de(0xc2),_0x5349de(0xb1)+_0x3befe3['policyFilePath'],_0x5349de(0xcd));}if(!_0x20c05f['isFile']())throw instantApiPolicyError(_0x5349de(0xd0),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3befe3[_0x5349de(0xd9)]);if(_0x20c05f[_0x5349de(0xe2)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x5349de(0xd3));let _0x26ad43;try{_0x26ad43=await readFile(_0x3befe3[_0x5349de(0xd9)]);}catch{throw instantApiPolicyError(_0x5349de(0xba),_0x5349de(0xcc)+_0x3befe3[_0x5349de(0xd9)]);}if(_0x26ad43[_0x5349de(0xdc)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5349de(0xc8),_0x5349de(0xd3));let _0x37df45;try{_0x37df45=new TextDecoder(_0x5349de(0xb6),{'fatal':!![],'ignoreBOM':!![]})[_0x5349de(0xcb)](_0x26ad43);}catch{throw instantApiPolicyError(_0x5349de(0xd0),_0x5349de(0xc3)+_0x3befe3['policyFilePath']);}let _0x474bee;try{_0x474bee=JSON[_0x5349de(0xae)](_0x37df45);}catch{throw instantApiPolicyError(_0x5349de(0xac),_0x5349de(0xe7)+_0x3befe3[_0x5349de(0xd9)]);}return assertLocalPolicyContract(_0x474bee,_0x3befe3[_0x5349de(0xd7)]);}export async function writeInstantApiPolicyConfigFile(_0x12379a,_0x3f7747,_0x277bb1={}){const _0x390dd8=a270_0x1f8aad,_0x5d7aaa=assertLocalPolicyContract(_0x3f7747,_0x12379a['appCode']),_0x35cb16=JSON[_0x390dd8(0xbd)](_0x5d7aaa,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x35cb16,_0x390dd8(0xca))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x390dd8(0xc8),_0x390dd8(0xd3));await mkdir(_0x12379a['policyRoot'],{'recursive':!![]});let _0x36b22a;try{_0x36b22a=await readFile(_0x12379a[_0x390dd8(0xd9)],_0x390dd8(0xca));}catch(_0x1bab6a){if(!isMissingFile(_0x1bab6a))throw instantApiPolicyError(_0x390dd8(0xba),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x12379a['policyFilePath']);}if(_0x36b22a===_0x35cb16)return{'action':'unchanged','filePath':_0x12379a[_0x390dd8(0xd9)]};if(_0x36b22a!==undefined&&!_0x277bb1[_0x390dd8(0xb3)])throw instantApiPolicyError(_0x390dd8(0xcf),'Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x12379a[_0x390dd8(0xd9)],_0x390dd8(0xe4));if(_0x36b22a===undefined)try{return await writeFile(_0x12379a[_0x390dd8(0xd9)],_0x35cb16,{'encoding':_0x390dd8(0xca),'flag':'wx'}),{'action':_0x390dd8(0xe0),'filePath':_0x12379a[_0x390dd8(0xd9)]};}catch(_0x46bfdf){if(!isAlreadyExists(_0x46bfdf))throw instantApiPolicyError(_0x390dd8(0xc5),_0x390dd8(0xc7)+_0x12379a[_0x390dd8(0xd9)]);if(!_0x277bb1[_0x390dd8(0xb3)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x390dd8(0xd8)+_0x12379a['policyFilePath'],'Review\x20the\x20file\x20before\x20retrying.');}const _0x22c4cf=resolve(dirname(_0x12379a[_0x390dd8(0xd9)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x390dd8(0xdf)]+'.'+randomUUID()+_0x390dd8(0xc0));try{await writeFile(_0x22c4cf,_0x35cb16,{'encoding':_0x390dd8(0xca),'flag':'wx'}),await rename(_0x22c4cf,_0x12379a[_0x390dd8(0xd9)]);}catch{await unlink(_0x22c4cf)[_0x390dd8(0xd1)](()=>undefined);throw instantApiPolicyError(_0x390dd8(0xc5),_0x390dd8(0xbb)+_0x12379a[_0x390dd8(0xd9)]);}return{'action':'overwritten','filePath':_0x12379a[_0x390dd8(0xd9)]};}function assertSafeAppCode(_0x2ded5c){const _0x1ee506=a270_0x1f8aad,_0x2c66f5=_0x2ded5c['trim']();if(!_0x2c66f5||_0x2c66f5!==_0x2ded5c||_0x2c66f5[_0x1ee506(0xdd)]>0x64||_0x2c66f5==='.'||_0x2c66f5==='..'||_0x2c66f5[_0x1ee506(0xc1)]('/')||_0x2c66f5[_0x1ee506(0xc1)]('\x5c')||_0x2c66f5[_0x1ee506(0xc1)]('\x00'))throw instantApiPolicyError(_0x1ee506(0xad),'appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x5f1fc7,_0x12879a){const _0x464f7e=a270_0x1f8aad;if(!isObject(_0x5f1fc7))throw instantApiPolicyError(_0x464f7e(0xac),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x5f1fc7[_0x464f7e(0xc4)]!=='1'&&_0x5f1fc7[_0x464f7e(0xc4)]!=='2')throw instantApiPolicyError(_0x464f7e(0xce),'Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.',_0x464f7e(0xbe));if(_0x5f1fc7['appCode']!==_0x12879a)throw instantApiPolicyError(_0x464f7e(0xbc),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x12879a+'.');if(!isObject(_0x5f1fc7['defaults'])||typeof _0x5f1fc7[_0x464f7e(0xc9)]['instantApi']!==_0x464f7e(0xd2))throw instantApiPolicyError(_0x464f7e(0xbf),_0x464f7e(0xb9));if(_0x5f1fc7[_0x464f7e(0xd5)]!==undefined&&_0x5f1fc7[_0x464f7e(0xd5)]!==null&&!Array[_0x464f7e(0xb4)](_0x5f1fc7[_0x464f7e(0xd5)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x464f7e(0xdb));return _0x5f1fc7;}function a270_0x5451(_0x3d66f2,_0x3e2c2e){_0x3d66f2=_0x3d66f2-0xac;const _0x4101a2=a270_0x4101();let _0x545187=_0x4101a2[_0x3d66f2];return _0x545187;}function isObject(_0x22e319){const _0x43a8d0=a270_0x1f8aad;return _0x22e319!==null&&typeof _0x22e319===_0x43a8d0(0xda)&&!Array[_0x43a8d0(0xb4)](_0x22e319);}function isMissingFile(_0x2cee5a){const _0xc1d957=a270_0x1f8aad;return Boolean(_0x2cee5a&&typeof _0x2cee5a===_0xc1d957(0xda)&&_0x2cee5a[_0xc1d957(0xe6)]===_0xc1d957(0xe3));}function isAlreadyExists(_0x163527){const _0x5b3025=a270_0x1f8aad;return Boolean(_0x163527&&typeof _0x163527===_0x5b3025(0xda)&&_0x163527[_0x5b3025(0xe6)]===_0x5b3025(0xe5));}
1
+ const a282_0x58b8a3=a282_0x5e02;(function(_0x594159,_0x24c9af){const _0xde3e9a=a282_0x5e02,_0x331b77=_0x594159();while(!![]){try{const _0x2d7b41=parseInt(_0xde3e9a(0x170))/0x1*(-parseInt(_0xde3e9a(0x156))/0x2)+parseInt(_0xde3e9a(0x182))/0x3+-parseInt(_0xde3e9a(0x18d))/0x4+-parseInt(_0xde3e9a(0x171))/0x5*(parseInt(_0xde3e9a(0x16d))/0x6)+-parseInt(_0xde3e9a(0x16e))/0x7*(-parseInt(_0xde3e9a(0x193))/0x8)+-parseInt(_0xde3e9a(0x163))/0x9*(-parseInt(_0xde3e9a(0x159))/0xa)+parseInt(_0xde3e9a(0x172))/0xb;if(_0x2d7b41===_0x24c9af)break;else _0x331b77['push'](_0x331b77['shift']());}catch(_0x40da08){_0x331b77['push'](_0x331b77['shift']());}}}(a282_0x5827,0xc6fb3));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=a282_0x58b8a3(0x16b);function a282_0x5e02(_0x5664e5,_0x2c1bb6){_0x5664e5=_0x5664e5-0x155;const _0x582753=a282_0x5827();let _0x5e02e0=_0x582753[_0x5664e5];return _0x5e02e0;}export const INSTANT_API_POLICY_FILE_NAME=a282_0x58b8a3(0x179);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0xdbaa11,_0x5e9f9c,_0x3ba012){return new CliError(_0xdbaa11,0x1,_0x5e9f9c,_0x3ba012);}export function loadInstantApiPolicyLocalConfig(_0x3b61a6,_0xf24d94){assertSafeAppCode(_0x3b61a6);const _0x2420e8=resolve(_0xf24d94??findProjectRootDirectory()),_0x177fd5=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x3b61a6+'/'+INSTANT_API_POLICY_FILE_NAME,_0xf356b8=resolve(_0x2420e8,INSTANT_API_POLICY_RELATIVE_ROOT,_0x3b61a6),_0x1a5b81=resolve(_0xf356b8,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x2420e8,'appCode':_0x3b61a6,'policyRoot':_0xf356b8,'policyFilePath':_0x1a5b81,'policyRelativePath':_0x177fd5};}export function createDefaultInstantApiPolicyConfig(_0x35b8d7,_0x63269e=a282_0x58b8a3(0x180)){return assertSafeAppCode(_0x35b8d7),{'version':'2','appCode':_0x35b8d7,'defaults':{'instantApi':_0x63269e},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x13d0eb){const _0x5e06f4=a282_0x58b8a3;let _0x3c2dea;try{_0x3c2dea=await stat(_0x13d0eb[_0x5e06f4(0x173)]);}catch(_0x29f537){throw instantApiPolicyError(_0x5e06f4(0x15d),_0x5e06f4(0x189)+_0x13d0eb[_0x5e06f4(0x173)],_0x5e06f4(0x16a));}if(!_0x3c2dea['isFile']())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x5e06f4(0x177)+_0x13d0eb[_0x5e06f4(0x173)]);if(_0x3c2dea['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5e06f4(0x188),_0x5e06f4(0x157));let _0x508b89;try{_0x508b89=await readFile(_0x13d0eb[_0x5e06f4(0x173)]);}catch{throw instantApiPolicyError(_0x5e06f4(0x15f),_0x5e06f4(0x18c)+_0x13d0eb[_0x5e06f4(0x173)]);}if(_0x508b89[_0x5e06f4(0x169)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x5e06f4(0x157));let _0x365c84;try{_0x365c84=new TextDecoder(_0x5e06f4(0x166),{'fatal':!![],'ignoreBOM':!![]})[_0x5e06f4(0x178)](_0x508b89);}catch{throw instantApiPolicyError(_0x5e06f4(0x161),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x13d0eb[_0x5e06f4(0x173)]);}let _0x4f0b8d;try{_0x4f0b8d=JSON['parse'](_0x365c84);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x13d0eb[_0x5e06f4(0x173)]);}return assertLocalPolicyContract(_0x4f0b8d,_0x13d0eb[_0x5e06f4(0x167)]);}export async function writeInstantApiPolicyConfigFile(_0xb4c534,_0x26eb75,_0x430f39={}){const _0x1ccf3e=a282_0x58b8a3,_0x3007e1=assertLocalPolicyContract(_0x26eb75,_0xb4c534[_0x1ccf3e(0x167)]),_0x5c7643=JSON[_0x1ccf3e(0x15c)](_0x3007e1,null,0x2)+'\x0a';if(Buffer[_0x1ccf3e(0x169)](_0x5c7643,_0x1ccf3e(0x165))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1ccf3e(0x188),_0x1ccf3e(0x157));await mkdir(_0xb4c534[_0x1ccf3e(0x195)],{'recursive':!![]});let _0x517997;try{_0x517997=await readFile(_0xb4c534[_0x1ccf3e(0x173)],'utf8');}catch(_0x171aa6){if(!isMissingFile(_0x171aa6))throw instantApiPolicyError(_0x1ccf3e(0x15f),_0x1ccf3e(0x174)+_0xb4c534[_0x1ccf3e(0x173)]);}if(_0x517997===_0x5c7643)return{'action':_0x1ccf3e(0x17d),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};if(_0x517997!==undefined&&!_0x430f39['force'])throw instantApiPolicyError(_0x1ccf3e(0x17f),_0x1ccf3e(0x18a)+_0xb4c534['policyFilePath'],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x517997===undefined)try{return await writeFile(_0xb4c534[_0x1ccf3e(0x173)],_0x5c7643,{'encoding':_0x1ccf3e(0x165),'flag':'wx'}),{'action':_0x1ccf3e(0x15a),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};}catch(_0x197c2b){if(!isAlreadyExists(_0x197c2b))throw instantApiPolicyError(_0x1ccf3e(0x18f),_0x1ccf3e(0x15e)+_0xb4c534['policyFilePath']);if(!_0x430f39[_0x1ccf3e(0x18b)])throw instantApiPolicyError(_0x1ccf3e(0x17f),_0x1ccf3e(0x16f)+_0xb4c534[_0x1ccf3e(0x173)],_0x1ccf3e(0x184));}const _0x474ce6=resolve(dirname(_0xb4c534[_0x1ccf3e(0x173)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x1ccf3e(0x17a)]+'.'+randomUUID()+_0x1ccf3e(0x168));try{await writeFile(_0x474ce6,_0x5c7643,{'encoding':'utf8','flag':'wx'}),await rename(_0x474ce6,_0xb4c534['policyFilePath']);}catch{await unlink(_0x474ce6)[_0x1ccf3e(0x15b)](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x1ccf3e(0x160)+_0xb4c534['policyFilePath']);}return{'action':_0x1ccf3e(0x158),'filePath':_0xb4c534[_0x1ccf3e(0x173)]};}function assertSafeAppCode(_0x2a9a2b){const _0x307080=a282_0x58b8a3,_0x2b49f9=_0x2a9a2b[_0x307080(0x186)]();if(!_0x2b49f9||_0x2b49f9!==_0x2a9a2b||_0x2b49f9['length']>0x64||_0x2b49f9==='.'||_0x2b49f9==='..'||_0x2b49f9[_0x307080(0x175)]('/')||_0x2b49f9[_0x307080(0x175)]('\x5c')||_0x2b49f9[_0x307080(0x175)]('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid',_0x307080(0x17c));}function assertLocalPolicyContract(_0x26be5f,_0x2336ad){const _0x46f0d7=a282_0x58b8a3;if(!isObject(_0x26be5f))throw instantApiPolicyError(_0x46f0d7(0x164),_0x46f0d7(0x16c));if(_0x26be5f[_0x46f0d7(0x183)]!=='1'&&_0x26be5f[_0x46f0d7(0x183)]!=='2')throw instantApiPolicyError(_0x46f0d7(0x176),_0x46f0d7(0x187),_0x46f0d7(0x194));if(_0x26be5f['appCode']!==_0x2336ad)throw instantApiPolicyError(_0x46f0d7(0x17e),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x2336ad+'.');if(!isObject(_0x26be5f[_0x46f0d7(0x155)])||typeof _0x26be5f[_0x46f0d7(0x155)][_0x46f0d7(0x192)]!==_0x46f0d7(0x181))throw instantApiPolicyError(_0x46f0d7(0x17b),_0x46f0d7(0x162));if(_0x26be5f[_0x46f0d7(0x190)]!==undefined&&_0x26be5f[_0x46f0d7(0x190)]!==null&&!Array['isArray'](_0x26be5f[_0x46f0d7(0x190)]))throw instantApiPolicyError(_0x46f0d7(0x185),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x26be5f;}function isObject(_0x246734){const _0x14438d=a282_0x58b8a3;return _0x246734!==null&&typeof _0x246734==='object'&&!Array[_0x14438d(0x191)](_0x246734);}function isMissingFile(_0x2ffb5c){const _0x1af9da=a282_0x58b8a3;return Boolean(_0x2ffb5c&&typeof _0x2ffb5c==='object'&&_0x2ffb5c[_0x1af9da(0x18e)]==='ENOENT');}function a282_0x5827(){const _0x210539=['policyRoot','defaults','24xvQpbo','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','overwritten','2320gZINgP','created','catch','stringify','instant_api_policy_file_missing','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_unreadable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_invalid','Policy\x20defaults.instantApi\x20is\x20required.','16236SSVrHZ','instant_api_policy_json_invalid','utf8','utf-8','appCode','.tmp','byteLength','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','.rabetbase/instant-api-policy','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','5547480eMasCI','4713877WJTmze','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','23953YofBmJ','5bpcJtE','5306664Chalme','policyFilePath','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','includes','instant_api_policy_version_invalid','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','decode','policy.json','pid','instant_api_policy_defaults_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','unchanged','instant_api_policy_app_code_mismatch','instant_api_policy_file_exists','allow','string','2945232hjmWiB','version','Review\x20the\x20file\x20before\x20retrying.','instant_api_policy_rules_invalid','trim','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','force','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','4809900BpzWiS','code','instant_api_policy_file_unwritable','rules','isArray','instantApi','16nSQpQI','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.'];a282_0x5827=function(){return _0x210539;};return a282_0x5827();}function isAlreadyExists(_0x18a63e){const _0x3b1642=a282_0x58b8a3;return Boolean(_0x18a63e&&typeof _0x18a63e==='object'&&_0x18a63e[_0x3b1642(0x18e)]==='EEXIST');}
@@ -1 +1 @@
1
- const a271_0x46bd27=a271_0x514d;(function(_0x4551a0,_0x2da9c4){const _0x414b74=a271_0x514d,_0x111f1b=_0x4551a0();while(!![]){try{const _0x13053f=parseInt(_0x414b74(0x183))/0x1+parseInt(_0x414b74(0x155))/0x2+-parseInt(_0x414b74(0x18d))/0x3*(-parseInt(_0x414b74(0x150))/0x4)+-parseInt(_0x414b74(0x156))/0x5*(parseInt(_0x414b74(0x17e))/0x6)+-parseInt(_0x414b74(0x170))/0x7*(-parseInt(_0x414b74(0x152))/0x8)+parseInt(_0x414b74(0x146))/0x9*(parseInt(_0x414b74(0x166))/0xa)+-parseInt(_0x414b74(0x16f))/0xb;if(_0x13053f===_0x2da9c4)break;else _0x111f1b['push'](_0x111f1b['shift']());}catch(_0x4186c2){_0x111f1b['push'](_0x111f1b['shift']());}}}(a271_0x4495,0xaa985));import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';function a271_0x4495(){const _0x31f5c8=['topK','entries','rawScore','length','246QXoRHa','POST','headers','query','data','850099MjVGlj','stringify','toLowerCase','finalScore','success','trim','string','Knowledge\x20search\x20appCode\x20is\x20required.','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','no-store','39UYabWU','split','revision','name','signal','243BQeLvo','isArray','isSafeInteger','map','timingsMs','score','chunkId','test','isFinite','authRequired','171692CJoLMn','documentId','1802144sReryv','appCode','cache-control','45552ihZkVh','17735nbkzGm','development','scope','public','SmartCode\x20knowledge\x20search\x20request\x20failed.','hits[','strategyFingerprint','status','number','schemaVersion','content-type','rank','tags','get','scoreKind','apiError','39290GCYMCM','sort','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','application/json','some','company','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','cookie','15054347mXrJvs','21NSSOKM','hits','Knowledge\x20search\x20query\x20is\x20required.','title','includes','profile','SmartCode\x20knowledge\x20search\x20failed.','text','validation','total'];a271_0x4495=function(){return _0x31f5c8;};return a271_0x4495();}const RESPONSE_KEYS=[a271_0x46bd27(0x15f),a271_0x46bd27(0x175),'total','hits','strategyFingerprint',a271_0x46bd27(0x14a)],HIT_KEYS=[a271_0x46bd27(0x151),a271_0x46bd27(0x18f),'chunkId','scope',a271_0x46bd27(0x173),a271_0x46bd27(0x177),a271_0x46bd27(0x162),a271_0x46bd27(0x161),'rawScore','finalScore',a271_0x46bd27(0x164)];export async function searchDevelopmentKnowledge(_0x13dafa){const _0x2de33d=a271_0x46bd27,_0x3f4f73=_0x13dafa[_0x2de33d(0x153)][_0x2de33d(0x188)](),_0x2bbf1e=_0x13dafa[_0x2de33d(0x181)]['trim']();if(!_0x3f4f73)throw CliErrors[_0x2de33d(0x178)](_0x2de33d(0x18a));if(!_0x13dafa[_0x2de33d(0x16e)][_0x2de33d(0x188)]())throw CliErrors['authRequired']();if(!_0x2bbf1e)throw CliErrors[_0x2de33d(0x178)](_0x2de33d(0x172));validateTopK(_0x13dafa[_0x2de33d(0x17a)]);const _0x599e6d=getKbDomain()+'/smartapi/knowledge/company-public/search';let _0x4afc24;try{_0x4afc24=await fetch(_0x599e6d,{'method':_0x2de33d(0x17f),'headers':{'Content-Type':_0x2de33d(0x169),'Cookie':_0x13dafa[_0x2de33d(0x16e)],'X-Invoke-Source':'cli:rabetbase'},'body':JSON[_0x2de33d(0x184)]({'appCode':_0x3f4f73,'query':_0x2bbf1e,..._0x13dafa[_0x2de33d(0x17a)]!==undefined?{'topK':_0x13dafa['topK']}:{}}),'signal':_0x13dafa[_0x2de33d(0x145)]});}catch(_0x2af111){if(_0x2af111 instanceof CliError)throw _0x2af111;if(_0x2af111 instanceof Error&&_0x2af111[_0x2de33d(0x190)]==='AbortError')throw _0x2af111;throw CliErrors['networkError'](_0x2de33d(0x15a));}if(!hasNoStore(_0x4afc24[_0x2de33d(0x180)]))throw CliErrors[_0x2de33d(0x165)](_0x2de33d(0x168));if(_0x4afc24[_0x2de33d(0x15d)]===0x191)throw CliErrors[_0x2de33d(0x14f)]();if(!_0x4afc24['ok'])throw CliErrors['apiError'](_0x2de33d(0x16d)+_0x4afc24[_0x2de33d(0x15d)]+').');if(!(_0x4afc24[_0x2de33d(0x180)][_0x2de33d(0x163)](_0x2de33d(0x160))??'')[_0x2de33d(0x185)]()[_0x2de33d(0x174)](_0x2de33d(0x169)))throw CliErrors[_0x2de33d(0x165)](_0x2de33d(0x16c));let _0x4fd160;try{_0x4fd160=await _0x4afc24['json']();}catch{throw CliErrors[_0x2de33d(0x165)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0x4fd160),_0x13dafa[_0x2de33d(0x17a)]);}function readEnvelopeData(_0x17fab1){const _0x56e3af=a271_0x46bd27,_0x5a5031=requireRecord(_0x17fab1,'response\x20envelope');if(_0x5a5031[_0x56e3af(0x187)]===![])throw CliErrors[_0x56e3af(0x165)](_0x56e3af(0x176));if(!(_0x56e3af(0x182)in _0x5a5031))throw invalidContract('response\x20envelope');return _0x5a5031[_0x56e3af(0x182)];}function validateTopK(_0x3b548){const _0x1c2dcf=a271_0x46bd27;if(_0x3b548!==undefined&&(!Number[_0x1c2dcf(0x148)](_0x3b548)||_0x3b548<0x1||_0x3b548>0x32))throw CliErrors[_0x1c2dcf(0x178)](_0x1c2dcf(0x18b));}function hasNoStore(_0x5304c2){const _0x1eec1f=a271_0x46bd27;return(_0x5304c2['get'](_0x1eec1f(0x154))??'')[_0x1eec1f(0x18e)](',')[_0x1eec1f(0x16a)](_0x22d18f=>_0x22d18f[_0x1eec1f(0x188)]()[_0x1eec1f(0x185)]()===_0x1eec1f(0x18c));}function parseDevelopmentSearchResponse(_0x300241,_0x3b23d7){const _0x4f5195=a271_0x46bd27,_0x191328=requireExactRecord(_0x300241,RESPONSE_KEYS,'response');if(_0x191328[_0x4f5195(0x15f)]!==0x2||_0x191328['profile']!==_0x4f5195(0x157))throw invalidContract(_0x4f5195(0x175));if(!Array['isArray'](_0x191328[_0x4f5195(0x171)])||_0x191328[_0x4f5195(0x171)][_0x4f5195(0x17d)]>(_0x3b23d7??0x32))throw invalidContract('hits');if(typeof _0x191328['strategyFingerprint']!==_0x4f5195(0x189)||!/^sha256:[0-9a-f]{64}$/[_0x4f5195(0x14d)](_0x191328[_0x4f5195(0x15c)]))throw invalidContract('strategyFingerprint');const _0x353e43=requireRecord(_0x191328[_0x4f5195(0x14a)],_0x4f5195(0x14a)),_0xc46ebf={};for(const [_0x4dc512,_0xe47465]of Object[_0x4f5195(0x17b)](_0x353e43)){if(!/^[A-Za-z][A-Za-z0-9]*$/['test'](_0x4dc512)||typeof _0xe47465!==_0x4f5195(0x15e)||!Number[_0x4f5195(0x14e)](_0xe47465)||_0xe47465<0x0)throw invalidContract(_0x4f5195(0x14a));_0xc46ebf[_0x4dc512]=_0xe47465;}const _0x38dd5b=_0x191328['hits'][_0x4f5195(0x149)]((_0x11bb56,_0x5b34c3)=>parseHit(_0x11bb56,_0x5b34c3));if(!Number['isSafeInteger'](_0x191328['total'])||_0x191328[_0x4f5195(0x179)]!==_0x38dd5b['length'])throw invalidContract('total');return{'schemaVersion':_0x191328[_0x4f5195(0x15f)],'profile':_0x191328['profile'],'total':_0x191328[_0x4f5195(0x179)],'strategyFingerprint':_0x191328[_0x4f5195(0x15c)],'timingsMs':_0xc46ebf,'hits':_0x38dd5b};}function parseHit(_0x146075,_0x17d182){const _0x4fb114=a271_0x46bd27,_0x4b7525=requireExactRecord(_0x146075,HIT_KEYS,_0x4fb114(0x15b)+_0x17d182+']'),_0xf3c2c8=_0x19cf6f=>{const _0x515f2e=_0x4b7525[_0x19cf6f];if(typeof _0x515f2e!=='string'||!_0x515f2e)throw invalidContract(_0x19cf6f);return _0x515f2e;};if(!Number[_0x4fb114(0x148)](_0x4b7525[_0x4fb114(0x18f)])||_0x4b7525[_0x4fb114(0x18f)]<0x1)throw invalidContract(_0x4fb114(0x18f));if(_0x4b7525[_0x4fb114(0x158)]!==_0x4fb114(0x159)&&_0x4b7525[_0x4fb114(0x158)]!==_0x4fb114(0x16b))throw invalidContract(_0x4fb114(0x158));if(typeof _0x4b7525[_0x4fb114(0x173)]!==_0x4fb114(0x189)||typeof _0x4b7525[_0x4fb114(0x177)]!=='string')throw invalidContract(_0x4fb114(0x177));if(!Array[_0x4fb114(0x147)](_0x4b7525[_0x4fb114(0x162)])||_0x4b7525[_0x4fb114(0x162)][_0x4fb114(0x16a)](_0x10a29d=>typeof _0x10a29d!=='string'))throw invalidContract(_0x4fb114(0x162));if(!Number[_0x4fb114(0x148)](_0x4b7525[_0x4fb114(0x161)])||_0x4b7525[_0x4fb114(0x161)]!==_0x17d182+0x1)throw invalidContract(_0x4fb114(0x161));if(!isFiniteNumber(_0x4b7525[_0x4fb114(0x17c)])||!isFiniteNumber(_0x4b7525[_0x4fb114(0x186)]))throw invalidContract(_0x4fb114(0x14b));return{'documentId':_0xf3c2c8(_0x4fb114(0x151)),'revision':_0x4b7525['revision'],'chunkId':_0xf3c2c8(_0x4fb114(0x14c)),'scope':_0x4b7525[_0x4fb114(0x158)],'title':_0x4b7525[_0x4fb114(0x173)],'text':_0x4b7525[_0x4fb114(0x177)],'tags':[..._0x4b7525[_0x4fb114(0x162)]],'rank':_0x4b7525['rank'],'rawScore':_0x4b7525['rawScore'],'finalScore':_0x4b7525[_0x4fb114(0x186)],'scoreKind':_0xf3c2c8(_0x4fb114(0x164))};}function requireExactRecord(_0x3533b8,_0x2dcdcd,_0x3740df){const _0x1293bb=a271_0x46bd27,_0x43528e=requireRecord(_0x3533b8,_0x3740df),_0x5e1586=Object['keys'](_0x43528e)[_0x1293bb(0x167)](),_0x333cef=[..._0x2dcdcd]['sort']();if(_0x5e1586[_0x1293bb(0x17d)]!==_0x333cef['length']||_0x5e1586[_0x1293bb(0x16a)]((_0x173130,_0xfb8e13)=>_0x173130!==_0x333cef[_0xfb8e13]))throw invalidContract(_0x3740df);return _0x43528e;}function a271_0x514d(_0x29b086,_0x402ba2){_0x29b086=_0x29b086-0x145;const _0x44953=a271_0x4495();let _0x514d1b=_0x44953[_0x29b086];return _0x514d1b;}function requireRecord(_0x313a43,_0x566ad4){if(!_0x313a43||typeof _0x313a43!=='object'||Array['isArray'](_0x313a43))throw invalidContract(_0x566ad4);return _0x313a43;}function isFiniteNumber(_0x530f15){const _0x2f6d84=a271_0x46bd27;return typeof _0x530f15===_0x2f6d84(0x15e)&&Number[_0x2f6d84(0x14e)](_0x530f15);}function invalidContract(_0x513736){return CliErrors['apiError']('SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20'+_0x513736+'\x20contract.');}
1
+ const a283_0x1ee16c=a283_0x219b;(function(_0x41af40,_0x1873eb){const _0x414f63=a283_0x219b,_0x16d286=_0x41af40();while(!![]){try{const _0x1b299d=parseInt(_0x414f63(0x198))/0x1*(parseInt(_0x414f63(0x194))/0x2)+parseInt(_0x414f63(0x1bc))/0x3*(-parseInt(_0x414f63(0x1b4))/0x4)+-parseInt(_0x414f63(0x1d6))/0x5*(-parseInt(_0x414f63(0x1a9))/0x6)+parseInt(_0x414f63(0x1c4))/0x7+parseInt(_0x414f63(0x19b))/0x8+-parseInt(_0x414f63(0x1bb))/0x9+-parseInt(_0x414f63(0x1a1))/0xa;if(_0x1b299d===_0x1873eb)break;else _0x16d286['push'](_0x16d286['shift']());}catch(_0x3f68db){_0x16d286['push'](_0x16d286['shift']());}}}(a283_0xa71f,0xf2381));function a283_0xa71f(){const _0x55bbda=['authRequired','name','isSafeInteger','scope','rank','134335PfTVTH','scoreKind','data','AbortError','object','Knowledge\x20search\x20query\x20is\x20required.','text','application/json','profile','total','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','apiError','/smartapi/knowledge/company-public/search','public','map','19678syCCQh','get','success','strategyFingerprint','109xbDNVY','documentId','revision','7933296JpXUCd','entries','chunkId','validation','split','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','6627450wFFkrK','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','\x20contract.','hits','isArray','signal','finalScore','POST','48FrJPZR','content-type','appCode','stringify','schemaVersion','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','topK','SmartCode\x20knowledge\x20search\x20failed.','company','no-store','cookie','3792SxUooo','cache-control','cli:rabetbase','timingsMs','networkError','headers','test','8304570maHgkK','1338bEBxgK','toLowerCase','title','sort','some','isFinite','rawScore','development','5049541HvzJtR','string','length','json','number','SmartCode\x20knowledge\x20search\x20request\x20failed.','tags','hits[','trim','includes','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','response\x20envelope','score'];a283_0xa71f=function(){return _0x55bbda;};return a283_0xa71f();}import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x1ee16c(0x1ad),'profile',a283_0x1ee16c(0x18e),a283_0x1ee16c(0x1a4),'strategyFingerprint',a283_0x1ee16c(0x1b7)],HIT_KEYS=['documentId',a283_0x1ee16c(0x19a),a283_0x1ee16c(0x19d),a283_0x1ee16c(0x1d4),a283_0x1ee16c(0x1be),a283_0x1ee16c(0x18b),a283_0x1ee16c(0x1ca),a283_0x1ee16c(0x1d5),a283_0x1ee16c(0x1c2),a283_0x1ee16c(0x1a7),a283_0x1ee16c(0x186)];export async function searchDevelopmentKnowledge(_0xc6a4a){const _0x37eedc=a283_0x1ee16c,_0x5b6239=_0xc6a4a[_0x37eedc(0x1ab)][_0x37eedc(0x1cc)](),_0x59c373=_0xc6a4a['query']['trim']();if(!_0x5b6239)throw CliErrors['validation']('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0xc6a4a[_0x37eedc(0x1b3)][_0x37eedc(0x1cc)]())throw CliErrors[_0x37eedc(0x1d1)]();if(!_0x59c373)throw CliErrors['validation'](_0x37eedc(0x18a));validateTopK(_0xc6a4a[_0x37eedc(0x1af)]);const _0x44de8e=getKbDomain()+_0x37eedc(0x191);let _0x3f3c75;try{_0x3f3c75=await fetch(_0x44de8e,{'method':_0x37eedc(0x1a8),'headers':{'Content-Type':_0x37eedc(0x18c),'Cookie':_0xc6a4a['cookie'],'X-Invoke-Source':_0x37eedc(0x1b6)},'body':JSON[_0x37eedc(0x1ac)]({'appCode':_0x5b6239,'query':_0x59c373,..._0xc6a4a[_0x37eedc(0x1af)]!==undefined?{'topK':_0xc6a4a[_0x37eedc(0x1af)]}:{}}),'signal':_0xc6a4a[_0x37eedc(0x1a6)]});}catch(_0x173145){if(_0x173145 instanceof CliError)throw _0x173145;if(_0x173145 instanceof Error&&_0x173145[_0x37eedc(0x1d2)]===_0x37eedc(0x188))throw _0x173145;throw CliErrors[_0x37eedc(0x1b8)](_0x37eedc(0x1c9));}if(!hasNoStore(_0x3f3c75[_0x37eedc(0x1b9)]))throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1ce));if(_0x3f3c75['status']===0x191)throw CliErrors['authRequired']();if(!_0x3f3c75['ok'])throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1a2)+_0x3f3c75['status']+').');if(!(_0x3f3c75[_0x37eedc(0x1b9)]['get'](_0x37eedc(0x1aa))??'')[_0x37eedc(0x1bd)]()[_0x37eedc(0x1cd)](_0x37eedc(0x18c)))throw CliErrors[_0x37eedc(0x190)](_0x37eedc(0x1ae));let _0xe72405;try{_0xe72405=await _0x3f3c75[_0x37eedc(0x1c7)]();}catch{throw CliErrors[_0x37eedc(0x190)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0xe72405),_0xc6a4a['topK']);}function readEnvelopeData(_0x41a0f1){const _0x221e12=a283_0x1ee16c,_0x36e0da=requireRecord(_0x41a0f1,_0x221e12(0x1cf));if(_0x36e0da[_0x221e12(0x196)]===![])throw CliErrors['apiError'](_0x221e12(0x1b0));if(!(_0x221e12(0x187)in _0x36e0da))throw invalidContract(_0x221e12(0x1cf));return _0x36e0da[_0x221e12(0x187)];}function validateTopK(_0x3b1e97){const _0x38ec2e=a283_0x1ee16c;if(_0x3b1e97!==undefined&&(!Number['isSafeInteger'](_0x3b1e97)||_0x3b1e97<0x1||_0x3b1e97>0x32))throw CliErrors[_0x38ec2e(0x19e)](_0x38ec2e(0x1a0));}function hasNoStore(_0xc9b444){const _0x1e8ffd=a283_0x1ee16c;return(_0xc9b444[_0x1e8ffd(0x195)](_0x1e8ffd(0x1b5))??'')[_0x1e8ffd(0x19f)](',')[_0x1e8ffd(0x1c0)](_0x57bb48=>_0x57bb48[_0x1e8ffd(0x1cc)]()[_0x1e8ffd(0x1bd)]()===_0x1e8ffd(0x1b2));}function parseDevelopmentSearchResponse(_0xe9d42c,_0x12ab03){const _0x39736c=a283_0x1ee16c,_0x304deb=requireExactRecord(_0xe9d42c,RESPONSE_KEYS,'response');if(_0x304deb['schemaVersion']!==0x2||_0x304deb[_0x39736c(0x18d)]!==_0x39736c(0x1c3))throw invalidContract(_0x39736c(0x18d));if(!Array['isArray'](_0x304deb[_0x39736c(0x1a4)])||_0x304deb[_0x39736c(0x1a4)][_0x39736c(0x1c6)]>(_0x12ab03??0x32))throw invalidContract(_0x39736c(0x1a4));if(typeof _0x304deb['strategyFingerprint']!=='string'||!/^sha256:[0-9a-f]{64}$/['test'](_0x304deb[_0x39736c(0x197)]))throw invalidContract(_0x39736c(0x197));const _0xa2bca7=requireRecord(_0x304deb[_0x39736c(0x1b7)],_0x39736c(0x1b7)),_0x39c845={};for(const [_0x536bd7,_0x33c5f5]of Object[_0x39736c(0x19c)](_0xa2bca7)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x39736c(0x1ba)](_0x536bd7)||typeof _0x33c5f5!=='number'||!Number[_0x39736c(0x1c1)](_0x33c5f5)||_0x33c5f5<0x0)throw invalidContract(_0x39736c(0x1b7));_0x39c845[_0x536bd7]=_0x33c5f5;}const _0x172b98=_0x304deb[_0x39736c(0x1a4)][_0x39736c(0x193)]((_0x8981f3,_0x1369a0)=>parseHit(_0x8981f3,_0x1369a0));if(!Number['isSafeInteger'](_0x304deb[_0x39736c(0x18e)])||_0x304deb[_0x39736c(0x18e)]!==_0x172b98[_0x39736c(0x1c6)])throw invalidContract(_0x39736c(0x18e));return{'schemaVersion':_0x304deb[_0x39736c(0x1ad)],'profile':_0x304deb['profile'],'total':_0x304deb[_0x39736c(0x18e)],'strategyFingerprint':_0x304deb[_0x39736c(0x197)],'timingsMs':_0x39c845,'hits':_0x172b98};}function a283_0x219b(_0x283963,_0x1aa114){_0x283963=_0x283963-0x186;const _0xa71f44=a283_0xa71f();let _0x219b2c=_0xa71f44[_0x283963];return _0x219b2c;}function parseHit(_0x501e14,_0x250eb2){const _0x100d81=a283_0x1ee16c,_0x21d316=requireExactRecord(_0x501e14,HIT_KEYS,_0x100d81(0x1cb)+_0x250eb2+']'),_0x104a0a=_0x313329=>{const _0x2b9df9=_0x100d81,_0x3ca309=_0x21d316[_0x313329];if(typeof _0x3ca309!==_0x2b9df9(0x1c5)||!_0x3ca309)throw invalidContract(_0x313329);return _0x3ca309;};if(!Number[_0x100d81(0x1d3)](_0x21d316[_0x100d81(0x19a)])||_0x21d316['revision']<0x1)throw invalidContract(_0x100d81(0x19a));if(_0x21d316[_0x100d81(0x1d4)]!==_0x100d81(0x192)&&_0x21d316[_0x100d81(0x1d4)]!==_0x100d81(0x1b1))throw invalidContract(_0x100d81(0x1d4));if(typeof _0x21d316[_0x100d81(0x1be)]!==_0x100d81(0x1c5)||typeof _0x21d316['text']!==_0x100d81(0x1c5))throw invalidContract(_0x100d81(0x18b));if(!Array[_0x100d81(0x1a5)](_0x21d316['tags'])||_0x21d316[_0x100d81(0x1ca)][_0x100d81(0x1c0)](_0x13e8e7=>typeof _0x13e8e7!==_0x100d81(0x1c5)))throw invalidContract(_0x100d81(0x1ca));if(!Number[_0x100d81(0x1d3)](_0x21d316[_0x100d81(0x1d5)])||_0x21d316[_0x100d81(0x1d5)]!==_0x250eb2+0x1)throw invalidContract(_0x100d81(0x1d5));if(!isFiniteNumber(_0x21d316[_0x100d81(0x1c2)])||!isFiniteNumber(_0x21d316['finalScore']))throw invalidContract(_0x100d81(0x1d0));return{'documentId':_0x104a0a(_0x100d81(0x199)),'revision':_0x21d316[_0x100d81(0x19a)],'chunkId':_0x104a0a(_0x100d81(0x19d)),'scope':_0x21d316[_0x100d81(0x1d4)],'title':_0x21d316['title'],'text':_0x21d316['text'],'tags':[..._0x21d316[_0x100d81(0x1ca)]],'rank':_0x21d316[_0x100d81(0x1d5)],'rawScore':_0x21d316['rawScore'],'finalScore':_0x21d316[_0x100d81(0x1a7)],'scoreKind':_0x104a0a(_0x100d81(0x186))};}function requireExactRecord(_0x4e2947,_0x488db1,_0x18ca05){const _0x182f65=a283_0x1ee16c,_0x50708b=requireRecord(_0x4e2947,_0x18ca05),_0x4fe5c2=Object['keys'](_0x50708b)[_0x182f65(0x1bf)](),_0x32c8fa=[..._0x488db1]['sort']();if(_0x4fe5c2[_0x182f65(0x1c6)]!==_0x32c8fa[_0x182f65(0x1c6)]||_0x4fe5c2['some']((_0x10f161,_0x3606d8)=>_0x10f161!==_0x32c8fa[_0x3606d8]))throw invalidContract(_0x18ca05);return _0x50708b;}function requireRecord(_0x522b90,_0x563d20){const _0x40c706=a283_0x1ee16c;if(!_0x522b90||typeof _0x522b90!==_0x40c706(0x189)||Array[_0x40c706(0x1a5)](_0x522b90))throw invalidContract(_0x563d20);return _0x522b90;}function isFiniteNumber(_0x45babe){const _0x5853af=a283_0x1ee16c;return typeof _0x45babe===_0x5853af(0x1c8)&&Number[_0x5853af(0x1c1)](_0x45babe);}function invalidContract(_0x368371){const _0x194f01=a283_0x1ee16c;return CliErrors[_0x194f01(0x190)](_0x194f01(0x18f)+_0x368371+_0x194f01(0x1a3));}
@@ -1 +1 @@
1
- function a272_0x5416(){const _0x4000c8=['4130xFoeBJ','56106TJuVsY','isDirectory','split','6ZXDiSY','2635616iJDOVm','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.rabetbase','page-dir','4342765CwTaIb','8277512ClGkWi','page.lock.json','sort','name','F_OK','999034jnJNxA','appPagesDir','trim','2024049VCGsIe','join','validation','6338038DaQkgI','.json','4pXSWYy'];a272_0x5416=function(){return _0x4000c8;};return a272_0x5416();}(function(_0x21973f,_0x1148dc){const _0x1413bd=a272_0x4c9f,_0x5eaca3=_0x21973f();while(!![]){try{const _0x238f50=parseInt(_0x1413bd(0x1f4))/0x1+-parseInt(_0x1413bd(0x1fc))/0x2*(parseInt(_0x1413bd(0x1f7))/0x3)+-parseInt(_0x1413bd(0x1ea))/0x4+parseInt(_0x1413bd(0x1ee))/0x5*(-parseInt(_0x1413bd(0x201))/0x6)+-parseInt(_0x1413bd(0x1fa))/0x7+parseInt(_0x1413bd(0x1ef))/0x8+-parseInt(_0x1413bd(0x1fe))/0x9*(-parseInt(_0x1413bd(0x1fd))/0xa);if(_0x238f50===_0x1148dc)break;else _0x5eaca3['push'](_0x5eaca3['shift']());}catch(_0x48b1a5){_0x5eaca3['push'](_0x5eaca3['shift']());}}}(a272_0x5416,0xc9afc));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a272_0x4c9f(_0x52f260,_0x25395d){_0x52f260=_0x52f260-0x1ea;const _0x5416d4=a272_0x5416();let _0x4c9f4f=_0x5416d4[_0x52f260];return _0x4c9f4f;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x358b8b,_0x312a2a=process['cwd']()){const _0x53b381=a272_0x4c9f,_0x588b64=resolve(_0x312a2a),_0xf30ece=join(_0x588b64,'.rabetbase','page');return{'projectRoot':_0x588b64,'pagesBaseDir':_0xf30ece,'appPagesDir':join(_0xf30ece,_0x358b8b),'lockFilePath':join(_0x588b64,_0x53b381(0x1ec),_0x53b381(0x1f0))};}export function buildPageFileName(_0x482748,_0x49c114){const _0x55825b=a272_0x4c9f;return _0x482748+'-'+_0x49c114['toUpperCase']()+_0x55825b(0x1fb);}export function resolvePageFilePath(_0x2a197f,_0x507c5b,_0x7e51e0){const _0x2ec33f=a272_0x4c9f;return join(_0x2a197f[_0x2ec33f(0x1f5)],buildPageFileName(_0x507c5b,_0x7e51e0));}export async function ensureParentDirectory(_0x550525){await mkdir(dirname(_0x550525),{'recursive':!![]});}export async function fileExists(_0x3cb1e8){const _0x4bdf5d=a272_0x4c9f;try{return await access(_0x3cb1e8,constants[_0x4bdf5d(0x1f3)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x1ef5d3){const _0x11061e=a272_0x4c9f,_0x173d7f=_0x1ef5d3[_0x11061e(0x1f6)]();if(!_0x173d7f)throw CliErrors['flagMissing'](_0x11061e(0x1ed));const _0x472bec=resolve(_0x173d7f);let _0x1568f7;try{_0x1568f7=await lstat(_0x472bec);}catch{throw CliErrors[_0x11061e(0x1f9)]('Page\x20directory\x20not\x20found:\x20'+_0x173d7f);}if(!_0x1568f7[_0x11061e(0x1ff)]())throw CliErrors['validation'](_0x11061e(0x1eb)+_0x173d7f);const _0x2765bb={};return await readDirectory(_0x472bec,_0x472bec,_0x2765bb),_0x2765bb;}async function readDirectory(_0x363d5d,_0x44e602,_0xae1156){const _0x389ec5=a272_0x4c9f,_0x110468=await readdir(_0x44e602,{'withFileTypes':!![]});for(const _0x503894 of _0x110468[_0x389ec5(0x1f1)]((_0x50ff0d,_0x5abe40)=>_0x50ff0d[_0x389ec5(0x1f2)]['localeCompare'](_0x5abe40[_0x389ec5(0x1f2)]))){const _0x26e204=join(_0x44e602,_0x503894['name']);if(_0x503894[_0x389ec5(0x1ff)]()){await readDirectory(_0x363d5d,_0x26e204,_0xae1156);continue;}if(!_0x503894['isFile']())throw CliErrors['validation']('Unsupported\x20file\x20in\x20page\x20directory:\x20'+_0x26e204);_0xae1156[relative(_0x363d5d,_0x26e204)[_0x389ec5(0x200)](sep)[_0x389ec5(0x1f8)]('/')]=await readFile(_0x26e204,'utf8');}}
1
+ const a284_0x22dd40=a284_0x3324;(function(_0x5d1407,_0x2e203c){const _0x5d51c6=a284_0x3324,_0x2ac933=_0x5d1407();while(!![]){try{const _0x44d5b7=-parseInt(_0x5d51c6(0x173))/0x1+-parseInt(_0x5d51c6(0x18b))/0x2*(parseInt(_0x5d51c6(0x17f))/0x3)+parseInt(_0x5d51c6(0x18d))/0x4+parseInt(_0x5d51c6(0x176))/0x5+parseInt(_0x5d51c6(0x16f))/0x6*(parseInt(_0x5d51c6(0x17d))/0x7)+-parseInt(_0x5d51c6(0x17c))/0x8*(-parseInt(_0x5d51c6(0x18c))/0x9)+-parseInt(_0x5d51c6(0x175))/0xa;if(_0x44d5b7===_0x2e203c)break;else _0x2ac933['push'](_0x2ac933['shift']());}catch(_0x21310d){_0x2ac933['push'](_0x2ac933['shift']());}}}(a284_0x1120,0x90bc2));function a284_0x3324(_0x430c1d,_0x168fdd){_0x430c1d=_0x430c1d-0x16f;const _0x112050=a284_0x1120();let _0x33246d=_0x112050[_0x430c1d];return _0x33246d;}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(_0x1f8935,_0x2c129d=process[a284_0x22dd40(0x177)]()){const _0x34051e=a284_0x22dd40,_0x495ccf=resolve(_0x2c129d),_0x53eb96=join(_0x495ccf,_0x34051e(0x189),_0x34051e(0x17b));return{'projectRoot':_0x495ccf,'pagesBaseDir':_0x53eb96,'appPagesDir':join(_0x53eb96,_0x1f8935),'lockFilePath':join(_0x495ccf,_0x34051e(0x189),_0x34051e(0x179))};}export function buildPageFileName(_0x344b54,_0x2b62dd){const _0x193dbc=a284_0x22dd40;return _0x344b54+'-'+_0x2b62dd[_0x193dbc(0x174)]()+_0x193dbc(0x181);}export function resolvePageFilePath(_0x5948cf,_0xb7e1e6,_0x574cde){const _0x4b4a72=a284_0x22dd40;return join(_0x5948cf[_0x4b4a72(0x188)],buildPageFileName(_0xb7e1e6,_0x574cde));}export async function ensureParentDirectory(_0x37d6cd){await mkdir(dirname(_0x37d6cd),{'recursive':!![]});}function a284_0x1120(){const _0x3abc5e=['9OICQTZ','4736756mYHWfY','48VZWloe','isDirectory','sort','localeCompare','25397UbjiKY','toUpperCase','21026240tJetWv','3303080FWAiPH','cwd','validation','page.lock.json','flagMissing','page','1756984rxSvnN','659554EDKMrZ','trim','21fSNwDg','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.json','name','utf8','Page\x20directory\x20not\x20found:\x20','F_OK','split','Unsupported\x20file\x20in\x20page\x20directory:\x20','appPagesDir','.rabetbase','isFile','27814orwKVY'];a284_0x1120=function(){return _0x3abc5e;};return a284_0x1120();}export async function fileExists(_0x57b2e0){const _0x364284=a284_0x22dd40;try{return await access(_0x57b2e0,constants[_0x364284(0x185)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0xae5e5a){const _0x129603=a284_0x22dd40,_0x4e41c4=_0xae5e5a[_0x129603(0x17e)]();if(!_0x4e41c4)throw CliErrors[_0x129603(0x17a)]('page-dir');const _0x3bc4e3=resolve(_0x4e41c4);let _0x5bef15;try{_0x5bef15=await lstat(_0x3bc4e3);}catch{throw CliErrors[_0x129603(0x178)](_0x129603(0x184)+_0x4e41c4);}if(!_0x5bef15[_0x129603(0x170)]())throw CliErrors[_0x129603(0x178)](_0x129603(0x180)+_0x4e41c4);const _0x23d3c7={};return await readDirectory(_0x3bc4e3,_0x3bc4e3,_0x23d3c7),_0x23d3c7;}async function readDirectory(_0x6c0d20,_0x28721e,_0x5bd5e5){const _0xa0ec59=a284_0x22dd40,_0x417e0f=await readdir(_0x28721e,{'withFileTypes':!![]});for(const _0x37de45 of _0x417e0f[_0xa0ec59(0x171)]((_0x3bee52,_0x2e8696)=>_0x3bee52[_0xa0ec59(0x182)][_0xa0ec59(0x172)](_0x2e8696[_0xa0ec59(0x182)]))){const _0x4b3998=join(_0x28721e,_0x37de45[_0xa0ec59(0x182)]);if(_0x37de45[_0xa0ec59(0x170)]()){await readDirectory(_0x6c0d20,_0x4b3998,_0x5bd5e5);continue;}if(!_0x37de45[_0xa0ec59(0x18a)]())throw CliErrors[_0xa0ec59(0x178)](_0xa0ec59(0x187)+_0x4b3998);_0x5bd5e5[relative(_0x6c0d20,_0x4b3998)[_0xa0ec59(0x186)](sep)['join']('/')]=await readFile(_0x4b3998,_0xa0ec59(0x183));}}
@@ -1 +1 @@
1
- (function(_0x10a722,_0x488b64){const _0x182ff7=a273_0x1bfd,_0x515a1b=_0x10a722();while(!![]){try{const _0xfad90a=-parseInt(_0x182ff7(0xfa))/0x1+parseInt(_0x182ff7(0xf1))/0x2+parseInt(_0x182ff7(0xf3))/0x3+-parseInt(_0x182ff7(0xf8))/0x4*(-parseInt(_0x182ff7(0xed))/0x5)+parseInt(_0x182ff7(0xeb))/0x6*(-parseInt(_0x182ff7(0xf2))/0x7)+-parseInt(_0x182ff7(0xf7))/0x8+parseInt(_0x182ff7(0xf4))/0x9*(-parseInt(_0x182ff7(0xee))/0xa);if(_0xfad90a===_0x488b64)break;else _0x515a1b['push'](_0x515a1b['shift']());}catch(_0x31ad40){_0x515a1b['push'](_0x515a1b['shift']());}}}(a273_0xbea6,0xcdb65));import a273_0x1cc093 from'node:crypto';function a273_0xbea6(){const _0xfeb57b=['utf8','6336840axyOmw','2261108AEVgcC','stringify','615167zEKnpx','3876996CzoCud','md5','10GOGVtS','290zOqyrs','createHash','hex','2190422XiBfPU','7omgcBJ','2385171gloajV','38727dKMNAn','parse'];a273_0xbea6=function(){return _0xfeb57b;};return a273_0xbea6();}import{readFile}from'node:fs/promises';function a273_0x1bfd(_0x663881,_0x35316f){_0x663881=_0x663881-0xeb;const _0xbea657=a273_0xbea6();let _0x1bfd22=_0xbea657[_0x663881];return _0x1bfd22;}export function serializePageSchemaForFile(_0x1c99f1){const _0x27d47c=a273_0x1bfd;return JSON[_0x27d47c(0xf9)](JSON[_0x27d47c(0xf5)](_0x1c99f1),null,0x2)+'\x0a';}export function computePageContentHash(_0x213a28){const _0x2c20c1=a273_0x1bfd;return a273_0x1cc093[_0x2c20c1(0xef)](_0x2c20c1(0xec))['update'](_0x213a28)['digest'](_0x2c20c1(0xf0));}export function computeSerializedSchemaHash(_0x3c7029){return computePageContentHash(serializePageSchemaForFile(_0x3c7029));}export async function computePageFileHash(_0x520ade){const _0xa4f909=a273_0x1bfd,_0x52a540=await readFile(_0x520ade,_0xa4f909(0xf6));return computePageContentHash(_0x52a540);}
1
+ function a285_0x5e68(_0x1e0984,_0x1d092b){_0x1e0984=_0x1e0984-0x86;const _0x2e2792=a285_0x2e27();let _0x5e686d=_0x2e2792[_0x1e0984];return _0x5e686d;}(function(_0x2c4614,_0x137cba){const _0x37ed7a=a285_0x5e68,_0x1fcc3c=_0x2c4614();while(!![]){try{const _0x554703=parseInt(_0x37ed7a(0x8e))/0x1*(-parseInt(_0x37ed7a(0x8a))/0x2)+parseInt(_0x37ed7a(0x8b))/0x3+-parseInt(_0x37ed7a(0x86))/0x4*(-parseInt(_0x37ed7a(0x8f))/0x5)+-parseInt(_0x37ed7a(0x8c))/0x6+parseInt(_0x37ed7a(0x91))/0x7+parseInt(_0x37ed7a(0x90))/0x8+parseInt(_0x37ed7a(0x88))/0x9;if(_0x554703===_0x137cba)break;else _0x1fcc3c['push'](_0x1fcc3c['shift']());}catch(_0x3085f3){_0x1fcc3c['push'](_0x1fcc3c['shift']());}}}(a285_0x2e27,0x2f060));import a285_0x2581bd from'node:crypto';import{readFile}from'node:fs/promises';function a285_0x2e27(){const _0x3f30be=['2PCTNCn','468159XbsWqw','210030ugeQOI','utf8','342407etqIkD','9995pFDpLT','235352qSYlCv','1143198DsTefs','update','20khsmId','hex','1901151hwYpJh','createHash'];a285_0x2e27=function(){return _0x3f30be;};return a285_0x2e27();}export function serializePageSchemaForFile(_0x5f4059){return JSON['stringify'](JSON['parse'](_0x5f4059),null,0x2)+'\x0a';}export function computePageContentHash(_0x121c81){const _0xf9cc63=a285_0x5e68;return a285_0x2581bd[_0xf9cc63(0x89)]('md5')[_0xf9cc63(0x92)](_0x121c81)['digest'](_0xf9cc63(0x87));}export function computeSerializedSchemaHash(_0xd8c2cf){return computePageContentHash(serializePageSchemaForFile(_0xd8c2cf));}export async function computePageFileHash(_0x473a48){const _0x4e3c88=a285_0x5e68,_0x5f4f0e=await readFile(_0x473a48,_0x4e3c88(0x8d));return computePageContentHash(_0x5f4f0e);}