@lovrabet/rabetbase-cli 2.5.8 → 2.5.9

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 (384) hide show
  1. package/README.md +6 -6
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.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/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.d.ts +8 -5
  162. package/lib/commands/kb/shared.js +1 -1
  163. package/lib/commands/kb/update.js +1 -1
  164. package/lib/commands/logs/index.js +1 -1
  165. package/lib/commands/menu/asset-update.js +1 -1
  166. package/lib/commands/menu/delete.js +1 -1
  167. package/lib/commands/menu/external-link-create.js +1 -1
  168. package/lib/commands/menu/external-link-update.js +1 -1
  169. package/lib/commands/menu/group-create.js +1 -1
  170. package/lib/commands/menu/group-update.js +1 -1
  171. package/lib/commands/menu/index.js +1 -1
  172. package/lib/commands/menu/list.js +1 -1
  173. package/lib/commands/menu/move.js +1 -1
  174. package/lib/commands/menu/regroup-start.js +1 -1
  175. package/lib/commands/menu/rename.js +1 -1
  176. package/lib/commands/menu/shared/compare-table.js +1 -1
  177. package/lib/commands/menu/shared/delete-plan.js +1 -1
  178. package/lib/commands/menu/shared/facts.js +1 -1
  179. package/lib/commands/menu/shared/index.js +1 -1
  180. package/lib/commands/menu/shared/inquirer.js +1 -1
  181. package/lib/commands/menu/shared/local-pages.js +1 -1
  182. package/lib/commands/menu/shared/logic.js +1 -1
  183. package/lib/commands/menu/shared/mutations.js +1 -1
  184. package/lib/commands/menu/shared/path.js +1 -1
  185. package/lib/commands/menu/shared/service.js +1 -1
  186. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  187. package/lib/commands/menu/shared/sync-core.js +1 -1
  188. package/lib/commands/menu/shared/update-core.js +1 -1
  189. package/lib/commands/menu/shared/valid-url.js +1 -1
  190. package/lib/commands/menu/subapp-assets-status.js +1 -1
  191. package/lib/commands/menu/subapp-assets-update.js +1 -1
  192. package/lib/commands/menu/sync.js +1 -1
  193. package/lib/commands/menu/visibility-update.js +1 -1
  194. package/lib/commands/notification/config-create.js +1 -1
  195. package/lib/commands/notification/config-delete.js +1 -1
  196. package/lib/commands/notification/config-list.js +1 -1
  197. package/lib/commands/notification/config-update.js +1 -1
  198. package/lib/commands/notification/index.js +1 -1
  199. package/lib/commands/notification/shared.js +1 -1
  200. package/lib/commands/ocr/index.js +1 -1
  201. package/lib/commands/page/create.js +1 -1
  202. package/lib/commands/page/custom/detail.js +1 -1
  203. package/lib/commands/page/custom/list.js +1 -1
  204. package/lib/commands/page/custom/publish.js +1 -1
  205. package/lib/commands/page/custom/shared.js +1 -1
  206. package/lib/commands/page/custom/syntax.js +1 -1
  207. package/lib/commands/page/custom/update.js +1 -1
  208. package/lib/commands/page/data-list-status.js +1 -1
  209. package/lib/commands/page/generate-start.js +1 -1
  210. package/lib/commands/page/generate-status.js +1 -1
  211. package/lib/commands/page/index.js +1 -1
  212. package/lib/commands/page/pull.js +1 -1
  213. package/lib/commands/page/push.js +1 -1
  214. package/lib/commands/page/relation-audit.js +1 -1
  215. package/lib/commands/page/restore.js +1 -1
  216. package/lib/commands/page/shared.js +1 -1
  217. package/lib/commands/page/sync.js +1 -1
  218. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  219. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  220. package/lib/commands/project/create/format-elapsed.js +1 -1
  221. package/lib/commands/project/create/main.js +1 -1
  222. package/lib/commands/project/create/materialize-project-template.js +1 -1
  223. package/lib/commands/project/create/project-name.js +1 -1
  224. package/lib/commands/project/create/project-template-archive.js +1 -1
  225. package/lib/commands/project/create/project-template-path.js +1 -1
  226. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  227. package/lib/commands/project/create/use-format-code.js +1 -1
  228. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  229. package/lib/commands/project/domain-routing-sync.js +1 -1
  230. package/lib/commands/project/index.js +1 -1
  231. package/lib/commands/project/upgrade.js +1 -1
  232. package/lib/commands/registry.js +1 -1
  233. package/lib/commands/role/delete.js +1 -1
  234. package/lib/commands/role/detail.js +1 -1
  235. package/lib/commands/role/index.js +1 -1
  236. package/lib/commands/role/list.js +1 -1
  237. package/lib/commands/role/shared.js +1 -1
  238. package/lib/commands/role/update.js +1 -1
  239. package/lib/commands/role/user-add.js +1 -1
  240. package/lib/commands/role/user-remove.js +1 -1
  241. package/lib/commands/role/user-resolve.js +1 -1
  242. package/lib/commands/rule/get.js +1 -1
  243. package/lib/commands/rule/index.js +1 -1
  244. package/lib/commands/rule/list.js +1 -1
  245. package/lib/commands/rule/set.js +1 -1
  246. package/lib/commands/rule/shared.d.ts +5 -3
  247. package/lib/commands/rule/shared.js +1 -1
  248. package/lib/commands/run/index.js +1 -1
  249. package/lib/commands/schema.js +1 -1
  250. package/lib/commands/sql/create.js +1 -1
  251. package/lib/commands/sql/delete.js +1 -1
  252. package/lib/commands/sql/detail.js +1 -1
  253. package/lib/commands/sql/exec.js +1 -1
  254. package/lib/commands/sql/index.js +1 -1
  255. package/lib/commands/sql/list.js +1 -1
  256. package/lib/commands/sql/pull.js +1 -1
  257. package/lib/commands/sql/push.js +1 -1
  258. package/lib/commands/sql/shared.js +1 -1
  259. package/lib/commands/sql/status.js +1 -1
  260. package/lib/commands/sql/validate.js +1 -1
  261. package/lib/commands/task/index.js +1 -1
  262. package/lib/commands/task/status.js +1 -1
  263. package/lib/commands/tenant/index.js +1 -1
  264. package/lib/commands/tenant/members-list.js +1 -1
  265. package/lib/commands/tenant/shared.js +1 -1
  266. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  267. package/lib/commands/user-account/feishu-bind.js +1 -1
  268. package/lib/commands/user-account/index.js +1 -1
  269. package/lib/commands/workspace/add.js +1 -1
  270. package/lib/commands/workspace/index.js +1 -1
  271. package/lib/commands/workspace/remove.js +1 -1
  272. package/lib/config/domain-config.js +1 -1
  273. package/lib/config/project-domain-routing.js +1 -1
  274. package/lib/config/region-config.js +1 -1
  275. package/lib/config/schema.js +1 -1
  276. package/lib/constant/cdn.js +1 -1
  277. package/lib/constant/cli.js +1 -1
  278. package/lib/constant/defaults.js +1 -1
  279. package/lib/constant/domain.js +1 -1
  280. package/lib/constant/env.js +1 -1
  281. package/lib/constant/output.js +1 -1
  282. package/lib/constant/paths.js +1 -1
  283. package/lib/constant/region.js +1 -1
  284. package/lib/constant/risk.js +1 -1
  285. package/lib/constant/routing-profile.js +1 -1
  286. package/lib/context/app-resolver.js +1 -1
  287. package/lib/context/auth-resolver.js +1 -1
  288. package/lib/context/config-loader.js +1 -1
  289. package/lib/context.js +1 -1
  290. package/lib/core/alias-resolver.js +1 -1
  291. package/lib/core/api-client.d.ts +14 -11
  292. package/lib/core/api-client.js +1 -1
  293. package/lib/core/bff/config.js +1 -1
  294. package/lib/core/bff/file-system.js +1 -1
  295. package/lib/core/bff/hash.js +1 -1
  296. package/lib/core/bff/hook-directory.js +1 -1
  297. package/lib/core/bff/lock.js +1 -1
  298. package/lib/core/bff/utils.js +1 -1
  299. package/lib/core/cross-db-analysis.js +1 -1
  300. package/lib/core/cross-db-relation.js +1 -1
  301. package/lib/core/db-resolver.js +1 -1
  302. package/lib/core/flow-config.js +1 -1
  303. package/lib/core/instant-api-policy/config.js +1 -1
  304. package/lib/core/kb-management-client.d.ts +2 -2
  305. package/lib/core/kb-management-client.js +1 -1
  306. package/lib/core/kb-search-client.d.ts +3 -1
  307. package/lib/core/kb-search-client.js +1 -1
  308. package/lib/core/page/file-system.js +1 -1
  309. package/lib/core/page/hash.js +1 -1
  310. package/lib/core/page/lock.js +1 -1
  311. package/lib/core/page/lr-smart-jsx.js +1 -1
  312. package/lib/core/sql-index-auditor.js +1 -1
  313. package/lib/core/sql-sync/config.js +1 -1
  314. package/lib/core/sql-sync/file-system.js +1 -1
  315. package/lib/core/sql-sync/hash.js +1 -1
  316. package/lib/core/sql-sync/lock.js +1 -1
  317. package/lib/core/sql-sync/utils.js +1 -1
  318. package/lib/core/sql-validator.js +1 -1
  319. package/lib/errors.js +1 -1
  320. package/lib/framework/build-all-flags.js +1 -1
  321. package/lib/framework/error-output.js +1 -1
  322. package/lib/framework/explicit-yes.js +1 -1
  323. package/lib/framework/flags.js +1 -1
  324. package/lib/framework/help.js +1 -1
  325. package/lib/framework/index.js +1 -1
  326. package/lib/framework/output.js +1 -1
  327. package/lib/framework/response.js +1 -1
  328. package/lib/framework/runner-alias.js +1 -1
  329. package/lib/framework/runner.js +1 -1
  330. package/lib/framework/schema-export.js +1 -1
  331. package/lib/framework/supported-flags.js +1 -1
  332. package/lib/framework/types.js +1 -1
  333. package/lib/generated/build-info.d.ts +4 -4
  334. package/lib/generated/build-info.js +1 -1
  335. package/lib/generated/official-routing.js +1 -1
  336. package/lib/generated/routing-contract.js +1 -1
  337. package/lib/help.js +1 -1
  338. package/lib/postinstall.js +1 -1
  339. package/lib/runtime/confirmation.js +1 -1
  340. package/lib/runtime/event.js +1 -1
  341. package/lib/runtime/index.js +1 -1
  342. package/lib/runtime/queue.js +1 -1
  343. package/lib/runtime/resolve.js +1 -1
  344. package/lib/services/dataset-design/checkpoint.js +1 -1
  345. package/lib/services/dataset-design/commands.js +1 -1
  346. package/lib/services/dataset-design/contract.js +1 -1
  347. package/lib/skills/builtin-skill.js +1 -1
  348. package/lib/skills/main.js +1 -1
  349. package/lib/skills/npx-skills-add.js +1 -1
  350. package/lib/skills/skill-presence.js +1 -1
  351. package/lib/telemetry/cli-command-trace.js +1 -1
  352. package/lib/telemetry/cli-help-trace.js +1 -1
  353. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  354. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  355. package/lib/telemetry/send-cli-trace-log.js +1 -1
  356. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  357. package/lib/utils/ai_config.js +1 -1
  358. package/lib/utils/apply-jq-filter.js +1 -1
  359. package/lib/utils/cdn-config.js +1 -1
  360. package/lib/utils/check-sdk-version.js +1 -1
  361. package/lib/utils/cli-version-check.js +1 -1
  362. package/lib/utils/cli-version-policy.js +1 -1
  363. package/lib/utils/config.js +1 -1
  364. package/lib/utils/entity-with-id.js +1 -1
  365. package/lib/utils/file-utils.js +1 -1
  366. package/lib/utils/guides-cdn.js +1 -1
  367. package/lib/utils/http-client.js +1 -1
  368. package/lib/utils/is-non-interactive.js +1 -1
  369. package/lib/utils/logger.js +1 -1
  370. package/lib/utils/params.js +1 -1
  371. package/lib/utils/platform.js +1 -1
  372. package/lib/utils/sleep.js +1 -1
  373. package/lib/utils/template-replacer.js +1 -1
  374. package/lib/utils/update-notice.js +1 -1
  375. package/lib/utils/version.js +1 -1
  376. package/lib/utils/with-active-cookie.js +1 -1
  377. package/lib/utils/write-cli-side-channel.js +1 -1
  378. package/package.json +1 -1
  379. package/skills/rabetbase/SKILL.md +1 -1
  380. package/skills/rabetbase/references/rabetbase-kb.md +17 -15
  381. package/skills/rabetbase/references/rabetbase-rule.md +8 -6
  382. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  383. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  384. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a190_0x3ca01a=a190_0x57c1;(function(_0x3748f7,_0x484a53){const _0xcb02dd=a190_0x57c1,_0x424e8f=_0x3748f7();while(!![]){try{const _0x23fc0f=-parseInt(_0xcb02dd(0x202))/0x1*(-parseInt(_0xcb02dd(0x1ca))/0x2)+-parseInt(_0xcb02dd(0x1d0))/0x3*(parseInt(_0xcb02dd(0x203))/0x4)+-parseInt(_0xcb02dd(0x1e4))/0x5*(parseInt(_0xcb02dd(0x1ef))/0x6)+parseInt(_0xcb02dd(0x1d7))/0x7+-parseInt(_0xcb02dd(0x1e2))/0x8+parseInt(_0xcb02dd(0x1dd))/0x9*(parseInt(_0xcb02dd(0x1f1))/0xa)+-parseInt(_0xcb02dd(0x1fe))/0xb*(parseInt(_0xcb02dd(0x204))/0xc);if(_0x23fc0f===_0x484a53)break;else _0x424e8f['push'](_0x424e8f['shift']());}catch(_0x2808ae){_0x424e8f['push'](_0x424e8f['shift']());}}}(a190_0xf6b9,0x704f0));import a190_0x47f50b from'chalk';function a190_0xf6b9(){const _0x3e5934=['Created\x20','filter','\x20\x20✓\x20Selected:\x20','length','localPages','979BXaqpB','message','\x20menu(s)...','\x20menu(s)\x20with\x20JS:\x20','90344oUBZcS','1645516AgBqaZ','11940PnPZOA','selectedAppName','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','menu','appName','yellow','cookie','boolean','\x20\x20Cancelled.','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','string','onlineMenuList','gray','appcode','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)\x20created','8bxuJVP','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Register\x20local\x20pages\x20as\x20platform\x20menus','sync','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','cyan','3dRfblN','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','onlinePaths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','flag','str','failed','3254965HooeuC','jsUrl','created','\x20\x20Create\x20','targetPages','\x20failed.','9EGxtAH','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','yes','validation','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','2815008FGrjgR','Creating\x20','80MGchZH','Menu\x20creation\x20failed','skipped','params','✓\x20Menu\x20sync\x20completed:\x20','Menu\x20sync\x20completed:\x20','trim','\x20page(s)','paths','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','34416lYyxwc','map','5772310JeuybK','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20menu(s)\x20bound\x20to\x20','appCode','Fetching\x20online\x20menu\x20list...','cssUrl','rawFlags'];a190_0xf6b9=function(){return _0x3e5934;};return a190_0xf6b9();}function a190_0x57c1(_0x34bb25,_0x2f9595){_0x34bb25=_0x34bb25-0x1bc;const _0xf6b9b3=a190_0xf6b9();let _0x57c1e0=_0xf6b9b3[_0x34bb25];return _0x57c1e0;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x3ca01a(0x1bd),'command':a190_0x3ca01a(0x1cd),'description':a190_0x3ca01a(0x1cc),'risk':'write','flags':[{'name':a190_0x3ca01a(0x1e7),'type':'string','description':a190_0x3ca01a(0x1de)+a190_0x3ca01a(0x1e1)},{'name':a190_0x3ca01a(0x1ec),'type':a190_0x3ca01a(0x1c4),'description':a190_0x3ca01a(0x1d1)},{'name':a190_0x3ca01a(0x1df),'type':a190_0x3ca01a(0x1c1),'description':a190_0x3ca01a(0x1bc)}],async 'dryRun'(_0x9e7b51){const _0x205bf4=a190_0x3ca01a;ensureRunnableContext(_0x9e7b51['rawFlags'],_0x9e7b51[_0x205bf4(0x205)]);const _0x39e063=await runMenuSyncCore(_0x9e7b51['appCode'],_0x9e7b51['cookie'],parsePaths(_0x9e7b51[_0x205bf4(0x1d5)](_0x205bf4(0x1ec))),_0x9e7b51['str']('params'),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x39e063,'description':_0x39e063[_0x205bf4(0x1e6)]?_0x205bf4(0x1cb):'Would\x20create\x20'+_0x39e063[_0x205bf4(0x1db)]['length']+_0x205bf4(0x1c8)};},async 'execute'(_0x91ce80){const _0x428c29=a190_0x3ca01a;ensureRunnableContext(_0x91ce80[_0x428c29(0x1f8)],_0x91ce80[_0x428c29(0x205)]);const _0x278246=_0x91ce80[_0x428c29(0x1d4)]('yes'),_0x1010fc=_0x91ce80[_0x428c29(0x1d5)](_0x428c29(0x1e7)),_0x5a0977=parsePaths(_0x91ce80[_0x428c29(0x1d5)]('paths')),_0xe9403d=parseMenuSyncParams(_0x1010fc);if(_0x278246){const _0x27d6a6=await runMenuSyncCore(_0x91ce80[_0x428c29(0x1f5)],_0x91ce80['cookie'],_0x5a0977,_0x1010fc);if(_0x27d6a6['skipped']){const _0x148024=getLocalPages();_0x148024[_0x428c29(0x1fc)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x428c29(0x1ee));}else writeCliSideChannelLine(_0x428c29(0x1e8)+_0x27d6a6[_0x428c29(0x1d9)]+_0x428c29(0x1c9));return{'ok':!![],'data':_0x27d6a6,'message':_0x27d6a6['skipped']?'Menu\x20sync\x20skipped':'Menu\x20sync\x20completed:\x20'+_0x27d6a6[_0x428c29(0x1d9)]+'\x20created.'};}if(_0x5a0977[_0x428c29(0x1fc)]>0x0)throw CliErrors['validation'](_0x428c29(0x1f3),_0x428c29(0x1d3));if(!isInteractive()&&_0x1010fc)throw CliErrors[_0x428c29(0x1e0)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x428c29(0x1d3));requireInteractive(),writeCliSideChannelLine(_0x428c29(0x1ce));const _0x1025b7=startSpinner(_0x428c29(0x1f6));let _0x372d07,_0x9480af,_0x334ea8;try{const _0xd18165=await fetchMenuData(_0x91ce80[_0x428c29(0x1f5)],_0x91ce80[_0x428c29(0x1c0)]);_0x372d07=_0xd18165[_0x428c29(0x1fd)],_0x9480af=_0xd18165[_0x428c29(0x1d2)],_0x334ea8=_0xd18165[_0x428c29(0x1c5)],stopSpinner(_0x1025b7,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x1e277b){stopSpinner(_0x1025b7,_0x428c29(0x1f2),![]);throw CliErrors['validation'](_0x1e277b instanceof Error?_0x1e277b[_0x428c29(0x1ff)]:_0x428c29(0x1f2));}if(_0x372d07['length']===0x0)return writeCliSideChannelLine(a190_0x47f50b[_0x428c29(0x1bf)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x5bd618=buildCompareRows(_0x372d07,_0x9480af);writeCliSideChannelLine(renderCompareTable(_0x5bd618)),writeCliSideChannelLine('');const _0x10f2f8=await selectPages(_0x372d07,_0x9480af);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x47f50b[_0x428c29(0x1cf)](_0x428c29(0x1fb)+_0x10f2f8[_0x428c29(0x1fc)]+_0x428c29(0x1eb)));const _0x5421fb=_0xe9403d['jsUrl']&&_0xe9403d[_0x428c29(0x1f7)];if(!_0x5421fb){writeCliSideChannelLine(renderSyncSummary(_0x10f2f8,_0x9480af['size']>0x0));const _0x217347=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x217347)return writeCliSideChannelLine(a190_0x47f50b[_0x428c29(0x1c6)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x3cae72=_0xe9403d[_0x428c29(0x1d8)],_0x41a93f=_0xe9403d[_0x428c29(0x1f7)];!_0x3cae72&&!_0xe9403d['appName']&&(_0x3cae72=await askJsUrl());!_0x41a93f&&!_0xe9403d['appName']&&(_0x41a93f=await askCssUrl());const _0x415a19=await askConfirm(_0xe9403d[_0x428c29(0x1be)]?_0x428c29(0x1da)+_0x10f2f8[_0x428c29(0x1fc)]+_0x428c29(0x1f4)+_0xe9403d['appName']+'?':_0x428c29(0x1da)+_0x10f2f8[_0x428c29(0x1fc)]+_0x428c29(0x201)+_0x3cae72+'\x20and\x20CSS:\x20'+_0x41a93f+'?');if(!_0x415a19)return writeCliSideChannelLine(a190_0x47f50b[_0x428c29(0x1c6)](_0x428c29(0x1c2))),{'ok':!![]};const _0x53f715=[_0x3cae72,_0x41a93f][_0x428c29(0x1fa)](_0x3efe00=>Boolean(_0x3efe00));_0xe9403d['appName']&&_0x53f715[_0x428c29(0x1fc)]===0x0&&await assertSharedResourcesConfigured(_0x91ce80[_0x428c29(0x1f5)],_0x91ce80[_0x428c29(0x1c0)],_0xe9403d[_0x428c29(0x1be)]);const _0x1d450e=startSpinner(_0x428c29(0x1e3)+_0x10f2f8['length']+_0x428c29(0x200));try{const _0x3f1c47=_0x10f2f8[_0x428c29(0x1f0)](_0x14af47=>resolvePage(_0x14af47,_0xe9403d,_0x334ea8)),_0x375aba=await doCreateMenus(_0x91ce80['appCode'],_0x91ce80[_0x428c29(0x1c0)],_0x3f1c47,_0x53f715,_0xe9403d[_0x428c29(0x1be)]?{'appName':_0xe9403d[_0x428c29(0x1be)]}:undefined);return stopSpinner(_0x1d450e,_0x428c29(0x1f9)+_0x375aba[_0x428c29(0x1d9)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x375aba,'message':_0x428c29(0x1e9)+_0x375aba[_0x428c29(0x1d9)]+'\x20created,\x20'+_0x375aba[_0x428c29(0x1d6)]+_0x428c29(0x1dc)};}catch(_0x465fc7){stopSpinner(_0x1d450e,_0x428c29(0x1e5),![]);throw CliErrors[_0x428c29(0x1e0)](_0x465fc7 instanceof Error?_0x465fc7[_0x428c29(0x1ff)]:_0x428c29(0x1e5));}}};function ensureRunnableContext(_0x2362f5,_0x540658){const _0x18dc47=a190_0x3ca01a,_0x573eed=_0x2362f5['appcode']?String(_0x2362f5[_0x18dc47(0x1c7)])[_0x18dc47(0x1ea)]():'';if(!isInProject()&&!_0x540658&&!_0x573eed)throw CliErrors[_0x18dc47(0x1e0)](_0x18dc47(0x1c3)+_0x18dc47(0x1ed));}function parsePaths(_0x5b9a85){const _0x1b4f60=a190_0x3ca01a;return[...new Set(_0x5b9a85['split'](',')[_0x1b4f60(0x1f0)](_0xd88efe=>_0xd88efe[_0x1b4f60(0x1ea)]())[_0x1b4f60(0x1fa)](Boolean))];}
1
+ const a190_0x14f42e=a190_0x3ae0;(function(_0x40fd80,_0x23e3d1){const _0x530ad4=a190_0x3ae0,_0x79333e=_0x40fd80();while(!![]){try{const _0x10f007=-parseInt(_0x530ad4(0xf0))/0x1*(-parseInt(_0x530ad4(0xed))/0x2)+parseInt(_0x530ad4(0x120))/0x3*(parseInt(_0x530ad4(0xf4))/0x4)+-parseInt(_0x530ad4(0x106))/0x5+-parseInt(_0x530ad4(0x117))/0x6+-parseInt(_0x530ad4(0x116))/0x7+-parseInt(_0x530ad4(0x102))/0x8*(-parseInt(_0x530ad4(0xe5))/0x9)+parseInt(_0x530ad4(0x107))/0xa*(parseInt(_0x530ad4(0x122))/0xb);if(_0x10f007===_0x23e3d1)break;else _0x79333e['push'](_0x79333e['shift']());}catch(_0x1491d5){_0x79333e['push'](_0x79333e['shift']());}}}(a190_0x542b,0xae947));import a190_0x93d940 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a190_0x3ae0(_0x1e08d7,_0x356d1a){_0x1e08d7=_0x1e08d7-0xe3;const _0x542be4=a190_0x542b();let _0x3ae0e8=_0x542be4[_0x1e08d7];return _0x3ae0e8;}import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x542b(){const _0x33f8b4=['\x20and\x20CSS:\x20','yes','cookie','12HAuFmr','Fetching\x20online\x20menu\x20list...','\x20menu(s)\x20bound\x20to\x20','207272ROyQrN','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2888308eQrxvr','paths','filter','cyan','split','skipped','menu','rawFlags','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Online\x20menu\x20list\x20fetched','Creating\x20','created','size','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','8rVIpmt','sync','\x20menu(s)\x20created','map','1815FsoVoo','10GZKgGo','Menu\x20sync\x20skipped','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','validation','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','gray','\x20\x20Continue\x20with\x20creation?','\x20page(s)','str','POST','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','appCode','\x20failed.','appcode','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','9440655RySFxG','1392696kgrbqz','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag','length','\x20created,\x20','selectedAppName','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','\x20menu(s)','trim','3qYvQQL','Menu\x20sync\x20completed:\x20','3334133HVxmjw','\x20created.','/smartapi/menu/create','Created\x20','\x20\x20Create\x20','jsUrl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','cssUrl','yellow','onlineMenuList','onlinePaths','Menu\x20creation\x20failed','message','\x20\x20Cancelled.','appName','\x20local\x20microfrontend\x20menu(s).','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','failed','✓\x20Menu\x20sync\x20completed:\x20','246699hSbzSc','params','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','targetPages','\x20menu(s)...'];a190_0x542b=function(){return _0x33f8b4;};return a190_0x542b();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x14f42e(0xfa),'command':a190_0x14f42e(0x103),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a190_0x14f42e(0xe6),'type':'string','description':a190_0x14f42e(0xf1)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x14f42e(0xf5),'type':'string','description':a190_0x14f42e(0x10b)},{'name':'yes','type':'boolean','description':a190_0x14f42e(0x111)}],async 'dryRun'(_0xbd1b90){const _0xca6d4b=a190_0x14f42e;ensureRunnableContext(_0xbd1b90[_0xca6d4b(0xfb)],_0xbd1b90[_0xca6d4b(0x11c)]);const _0x2bdab4=await runMenuSyncCore(_0xbd1b90[_0xca6d4b(0x112)],_0xbd1b90['cookie'],parsePaths(_0xbd1b90[_0xca6d4b(0x10f)](_0xca6d4b(0xf5))),_0xbd1b90['str'](_0xca6d4b(0xe6)),{'dryRun':!![]});return{'method':_0xca6d4b(0x110),'url':_0xca6d4b(0x124),'body':_0x2bdab4,'description':_0x2bdab4[_0xca6d4b(0xf9)]?_0xca6d4b(0x132):'Would\x20create\x20'+_0x2bdab4[_0xca6d4b(0xe8)][_0xca6d4b(0x11a)]+_0xca6d4b(0x131)};},async 'execute'(_0x13665b){const _0x12204c=a190_0x14f42e;ensureRunnableContext(_0x13665b[_0x12204c(0xfb)],_0x13665b[_0x12204c(0x11c)]);const _0x42efe1=_0x13665b[_0x12204c(0x119)](_0x12204c(0xeb)),_0x235af4=_0x13665b[_0x12204c(0x10f)]('params'),_0x5859fd=parsePaths(_0x13665b[_0x12204c(0x10f)](_0x12204c(0xf5))),_0x30b210=parseMenuSyncParams(_0x235af4);if(_0x42efe1){const _0x2553b1=await runMenuSyncCore(_0x13665b[_0x12204c(0x112)],_0x13665b[_0x12204c(0xec)],_0x5859fd,_0x235af4);if(_0x2553b1[_0x12204c(0xf9)]){const _0x4fe871=getLocalPages();_0x4fe871[_0x12204c(0x11a)]===0x0?writeCliSideChannelLine(_0x12204c(0x109)):writeCliSideChannelLine(_0x12204c(0xf3));}else writeCliSideChannelLine(_0x12204c(0xe4)+_0x2553b1['created']+_0x12204c(0x104));return{'ok':!![],'data':_0x2553b1,'message':_0x2553b1['skipped']?_0x12204c(0x108):_0x12204c(0x121)+_0x2553b1[_0x12204c(0xff)]+_0x12204c(0x123)};}if(_0x5859fd['length']>0x0)throw CliErrors['validation'](_0x12204c(0xe7),_0x12204c(0xf2));if(!isInteractive()&&_0x235af4)throw CliErrors['validation'](_0x12204c(0xfc),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x12204c(0x11d));const _0x390f6b=startSpinner(_0x12204c(0xee));let _0x5374a0,_0x423601,_0x1c97f1;try{const _0xd4fc84=await fetchMenuData(_0x13665b[_0x12204c(0x112)],_0x13665b[_0x12204c(0xec)]);_0x5374a0=_0xd4fc84['localPages'],_0x423601=_0xd4fc84[_0x12204c(0x12c)],_0x1c97f1=_0xd4fc84[_0x12204c(0x12b)],stopSpinner(_0x390f6b,_0x12204c(0xfd),!![]);}catch(_0x4ac200){stopSpinner(_0x390f6b,_0x12204c(0x118),![]);throw CliErrors[_0x12204c(0x10a)](_0x4ac200 instanceof Error?_0x4ac200[_0x12204c(0x12e)]:_0x12204c(0x118));}if(_0x5374a0[_0x12204c(0x11a)]===0x0)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x12a)](_0x12204c(0x101))),{'ok':!![]};const _0x2d7d10=buildCompareRows(_0x5374a0,_0x423601);writeCliSideChannelLine(renderCompareTable(_0x2d7d10)),writeCliSideChannelLine('');const _0x25fa96=await selectPages(_0x5374a0,_0x423601);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x93d940[_0x12204c(0xf7)]('\x20\x20✓\x20Selected:\x20'+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0x10e)));const _0x38195d=_0x30b210['jsUrl']&&_0x30b210[_0x12204c(0x129)];if(!_0x38195d){writeCliSideChannelLine(renderSyncSummary(_0x25fa96,_0x423601[_0x12204c(0x100)]>0x0));const _0x305522=await askConfirm(_0x12204c(0x10d));if(!_0x305522)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x10c)](_0x12204c(0x12f))),{'ok':!![]};}let _0x4450fd=_0x30b210[_0x12204c(0x127)],_0x588cce=_0x30b210[_0x12204c(0x129)];!_0x4450fd&&!_0x30b210['appName']&&(_0x4450fd=await askJsUrl());!_0x588cce&&!_0x30b210[_0x12204c(0x130)]&&(_0x588cce=await askCssUrl());const _0x58b33c=await askConfirm(_0x30b210[_0x12204c(0x130)]?'\x20\x20Create\x20'+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0xef)+_0x30b210[_0x12204c(0x130)]+'?':_0x12204c(0x126)+_0x25fa96[_0x12204c(0x11a)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x4450fd+_0x12204c(0xea)+_0x588cce+'?');if(!_0x58b33c)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x10c)](_0x12204c(0x12f))),{'ok':!![]};const _0x16e5c0=[_0x4450fd,_0x588cce]['filter'](_0x1a9ce5=>Boolean(_0x1a9ce5));_0x30b210[_0x12204c(0x130)]&&_0x16e5c0['length']===0x0&&await assertSharedResourcesConfigured(_0x13665b[_0x12204c(0x112)],_0x13665b['cookie'],_0x30b210['appName']);const _0x502842=startSpinner(_0x12204c(0xfe)+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0xe9));try{const _0x27aa96=_0x25fa96[_0x12204c(0x105)](_0x35311d=>resolvePage(_0x35311d,_0x30b210,_0x1c97f1)),_0x3e8d49=await doCreateMenus(_0x13665b['appCode'],_0x13665b[_0x12204c(0xec)],_0x27aa96,_0x16e5c0,_0x30b210[_0x12204c(0x130)]?{'appName':_0x30b210[_0x12204c(0x130)]}:undefined);return stopSpinner(_0x502842,_0x12204c(0x125)+_0x3e8d49[_0x12204c(0xff)]+_0x12204c(0x11e),!![]),{'ok':!![],'data':_0x3e8d49,'message':'Menu\x20sync\x20completed:\x20'+_0x3e8d49['created']+_0x12204c(0x11b)+_0x3e8d49[_0x12204c(0xe3)]+_0x12204c(0x113)};}catch(_0x3df9e6){stopSpinner(_0x502842,_0x12204c(0x12d),![]);throw CliErrors[_0x12204c(0x10a)](_0x3df9e6 instanceof Error?_0x3df9e6[_0x12204c(0x12e)]:_0x12204c(0x12d));}}};function ensureRunnableContext(_0x56b9ce,_0x4bdad5){const _0x14ec82=a190_0x14f42e,_0x2d8745=_0x56b9ce[_0x14ec82(0x114)]?String(_0x56b9ce[_0x14ec82(0x114)])[_0x14ec82(0x11f)]():'';if(!isInProject()&&!_0x4bdad5&&!_0x2d8745)throw CliErrors['validation'](_0x14ec82(0x128)+_0x14ec82(0x115));}function parsePaths(_0xfc6023){const _0x38e40f=a190_0x14f42e;return[...new Set(_0xfc6023[_0x38e40f(0xf8)](',')[_0x38e40f(0x105)](_0x17abb6=>_0x17abb6[_0x38e40f(0x11f)]())[_0x38e40f(0xf6)](Boolean))];}
@@ -1 +1 @@
1
- const a191_0x10de07=a191_0x5d3c;(function(_0x1c4f2e,_0x11f921){const _0x4a1440=a191_0x5d3c,_0xe22af6=_0x1c4f2e();while(!![]){try{const _0x38d4a9=-parseInt(_0x4a1440(0x146))/0x1*(parseInt(_0x4a1440(0x141))/0x2)+parseInt(_0x4a1440(0x15f))/0x3+-parseInt(_0x4a1440(0x117))/0x4+-parseInt(_0x4a1440(0x168))/0x5+parseInt(_0x4a1440(0x12e))/0x6*(-parseInt(_0x4a1440(0x17e))/0x7)+-parseInt(_0x4a1440(0x160))/0x8+parseInt(_0x4a1440(0x10e))/0x9*(parseInt(_0x4a1440(0x137))/0xa);if(_0x38d4a9===_0x11f921)break;else _0xe22af6['push'](_0xe22af6['shift']());}catch(_0x50a46e){_0xe22af6['push'](_0xe22af6['shift']());}}}(a191_0x5a35,0xa5262));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a191_0x5a35(){const _0x37135c=['9399456gbaLcC','isSafeInteger','visibility-update','Menu\x20path\x20selector\x20not\x20found:\x20','menu_verification_failed','Menu\x20','\x20skipped,\x20','get','5042525uOaBSi','update-recovery','Menu\x20visibility\x20update\x20completed:\x20','boolean','Selected\x20','warnings','cookie','expectedCount','Response\x20was\x20lost\x20and\x20menu\x20','recovered','paths','Requested\x20menu\x20visibility','set','\x20updated,\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','expectVisible','validation','\x20visibility\x20update\x20could\x20not\x20be\x20verified','update-menu-visibility','message','requestedVisible','expect-visible','224eBxXFb','byId','\x20menu(s);\x20skipped\x20','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','join','update','menu\x20list','depth','targets','/smartapi/menu/update','flagMissing','rawFlags','menu','values','appCode','45XUiLzD','menu_selector_not_found','menu-ids','verify\x20menu\x20visibility\x20update','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','code','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20for\x20menu\x20','Updated\x20visibility\x20for\x20','2560996QrwHdI','Final\x20menu\x20visibility\x20readback\x20failed.','has','menus','type','menuIds','hash','string','length','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','failed','\x20menu(s),\x20expected\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','false','true','childrenIds','update\x20visibility\x20for','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','path','parentId','rabetbase\x20menu\x20list\x20--format\x20compress','update\x20menu\x20visibility','split','150186pKruRM','push','childrenCount','beforeById','num','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','url','menu_expected_count_mismatch','before','9121550mhUoET','plannedActions','pageId','\x20changed\x20unexpectedly.','sort','menu_selector_ambiguous','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','str','\x20failed.','11156AEPfgC','number','stringify','menu_permission_denied','POST','149GnQxwJ','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','plan','updated','resources','Menu\x20id\x20selector(s)\x20not\x20found:\x20','pageType','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','resourcesValid','menu_state_drift','expected-count','datasetCode','filter','modelType','verification','Would\x20update\x20visibility\x20for\x20','label','trim','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','isArray','datasetId','visible','map','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','1714425hoDGWr'];a191_0x5a35=function(){return _0x37135c;};return a191_0x5a35();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x10de07(0x145),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a191_0x10de07(0x10b),'command':a191_0x10de07(0x162),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x10de07(0x110),'type':a191_0x10de07(0x11e),'description':a191_0x10de07(0x15e)},{'name':'paths','type':a191_0x10de07(0x11e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a191_0x10de07(0x16b),'required':!![],'description':a191_0x10de07(0x173)},{'name':a191_0x10de07(0x17d),'type':'boolean','description':a191_0x10de07(0x14d)},{'name':a191_0x10de07(0x151),'type':a191_0x10de07(0x142),'description':a191_0x10de07(0x128)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2fe318){parseInput(_0x2fe318);},async 'dryRun'(_0x4a2580){const _0x1aec92=a191_0x10de07,_0x136f2a=await buildPlan(_0x4a2580,!![]),_0x523349=_0x136f2a[_0x1aec92(0x148)]['plannedActions']?.[_0x1aec92(0x11f)]??0x0,_0x48c153=_0x136f2a[_0x1aec92(0x148)][_0x1aec92(0x107)][_0x1aec92(0x11f)]-_0x523349;return menuDryRunResult(_0x136f2a[_0x1aec92(0x148)],{'method':_0x1aec92(0x145),'url':_0x1aec92(0x108),'body':{'updates':_0x136f2a[_0x1aec92(0x148)][_0x1aec92(0x138)]?.[_0x1aec92(0x15d)](_0x5a5121=>_0x5a5121['body'])??[]},'description':_0x1aec92(0x156)+_0x523349+'\x20menu(s);\x20skip\x20'+_0x48c153+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x5aa727){const _0x37a0b9=a191_0x10de07,_0x35a03c=await buildPlan(_0x5aa727,![]);await recheckMutationSnapshot(_0x5aa727,_0x35a03c[_0x37a0b9(0x148)],'update\x20menu\x20visibility');const _0x555c48=[],_0x5d573c=[],_0x223be9=[];for(const _0x463a31 of _0x35a03c[_0x37a0b9(0x148)][_0x37a0b9(0x107)]){if(_0x463a31[_0x37a0b9(0x136)]['visible']===_0x35a03c[_0x37a0b9(0x148)][_0x37a0b9(0x17c)]){_0x555c48[_0x37a0b9(0x12f)]({'id':_0x463a31['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5aa727[_0x37a0b9(0x10d)],_0x5aa727[_0x37a0b9(0x16e)],{'id':_0x463a31['id'],'visible':_0x35a03c[_0x37a0b9(0x148)]['requestedVisible']}),_0x555c48[_0x37a0b9(0x12f)]({'id':_0x463a31['id'],'updated':!![],'skipped':![]});}catch(_0x6ea2b1){const _0x541f8e=mapMenuApiError(_0x6ea2b1,_0x37a0b9(0x127),_0x463a31['id']);if(isMenuResponseLoss(_0x6ea2b1)&&_0x541f8e[_0x37a0b9(0x113)]!==_0x37a0b9(0x144)){_0x223be9[_0x37a0b9(0x12f)](_0x463a31['id']);continue;}_0x5d573c[_0x37a0b9(0x12f)]({'id':_0x463a31['id'],'stage':_0x37a0b9(0x104),'code':_0x541f8e['code'],'message':_0x541f8e['message']});}}let _0x49fdc0;try{_0x49fdc0=await fetchMenuSnapshot(_0x5aa727[_0x37a0b9(0x10d)],_0x5aa727[_0x37a0b9(0x16e)]);}catch(_0x3b79eb){const _0x25c599=describeMenuErrorCause(_0x3b79eb,_0x37a0b9(0x111)),_0x9a8ce9=_0x223be9[_0x37a0b9(0x15d)](_0x563bb1=>({'id':_0x563bb1,'stage':_0x37a0b9(0x169),'code':_0x37a0b9(0x164),'message':_0x37a0b9(0x115)+_0x563bb1+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x190620={'stage':'verification','code':_0x37a0b9(0x164),'message':_0x37a0b9(0x118),'targetIds':_0x35a03c['plan']['targets'][_0x37a0b9(0x15d)](_0x52eb1f=>_0x52eb1f['id']),'requestedStateConfirmed':![],..._0x25c599};throw menuFailure(asVerificationError(_0x3b79eb,_0x37a0b9(0x13d)),_0x35a03c[_0x37a0b9(0x148)],{'stage':_0x37a0b9(0x155),'succeeded':_0x555c48,'failedRecords':[..._0x5d573c,..._0x9a8ce9,_0x190620],'warnings':[_0x37a0b9(0x181)],'verification':{'status':_0x37a0b9(0x121),'recoveredCount':0x0,'lookupCommand':_0x37a0b9(0x12b)}});}const _0x372524=[];for(const _0x43d25a of _0x555c48){const _0x7bd1c4=Number(_0x43d25a['id']),_0x1315fb=_0x35a03c['beforeById']['get'](_0x7bd1c4),_0x27c999=_0x49fdc0[_0x37a0b9(0x17f)][_0x37a0b9(0x167)](_0x7bd1c4);try{verifyVisibilityUpdate(_0x1315fb,_0x27c999,_0x35a03c['plan'][_0x37a0b9(0x17c)]);}catch(_0x4497b7){const _0x29b51f=asVerificationError(_0x4497b7,_0x37a0b9(0x165)+_0x7bd1c4+_0x37a0b9(0x179));_0x372524[_0x37a0b9(0x12f)]({'id':_0x7bd1c4,'stage':_0x37a0b9(0x155),'code':_0x29b51f['code'],'message':_0x29b51f[_0x37a0b9(0x17b)],'requestedStateConfirmed':![]});}}for(const _0x48c050 of _0x223be9){const _0x252922=_0x35a03c[_0x37a0b9(0x131)][_0x37a0b9(0x167)](_0x48c050),_0x59bae0=_0x49fdc0[_0x37a0b9(0x17f)][_0x37a0b9(0x167)](_0x48c050);try{verifyVisibilityUpdate(_0x252922,_0x59bae0,_0x35a03c[_0x37a0b9(0x148)]['requestedVisible']),_0x555c48[_0x37a0b9(0x12f)]({'id':_0x48c050,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4699f7){const _0x169f0c=asVerificationError(_0x4699f7,_0x37a0b9(0x170)+_0x48c050+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x372524[_0x37a0b9(0x12f)]({'id':_0x48c050,'stage':_0x37a0b9(0x169),'code':_0x169f0c['code'],'message':_0x169f0c[_0x37a0b9(0x17b)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x372524['length']>0x0){const _0x41f3b2=_0x372524[_0x37a0b9(0x15d)](_0x405ea8=>Number(_0x405ea8['id'])),_0x3bbd4d=_0x555c48['filter'](_0x4f2448=>_0x4f2448[_0x37a0b9(0x171)]===!![])[_0x37a0b9(0x11f)],_0x162f9d=menuError(_0x37a0b9(0x164),_0x37a0b9(0x133)+_0x41f3b2['join'](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x162f9d,_0x35a03c[_0x37a0b9(0x148)],{'stage':_0x37a0b9(0x155),'succeeded':_0x555c48,'failedRecords':[..._0x5d573c,..._0x372524],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x37a0b9(0x121),..._0x41f3b2[_0x37a0b9(0x11f)]===0x1?{'targetId':_0x41f3b2[0x0]}:{'targetIds':_0x41f3b2},'recoveredCount':_0x3bbd4d,'lookupCommand':_0x37a0b9(0x12b)}});}const _0x4e5b0f=_0x555c48[_0x37a0b9(0x153)](_0x4b4e76=>_0x4b4e76[_0x37a0b9(0x149)]===!![])[_0x37a0b9(0x11f)],_0x2a5a9e=_0x555c48[_0x37a0b9(0x11f)]-_0x4e5b0f,_0x491b8d={..._0x35a03c['plan'],'succeeded':_0x555c48,'failed':_0x5d573c,'warnings':_0x5d573c[_0x37a0b9(0x11f)]>0x0?[..._0x35a03c[_0x37a0b9(0x148)][_0x37a0b9(0x16d)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x35a03c['plan'][_0x37a0b9(0x16d)],'verification':{'checkedBy':_0x37a0b9(0x105),'snapshotHash':_0x49fdc0[_0x37a0b9(0x11d)],'matchesRequestedState':_0x5d573c[_0x37a0b9(0x11f)]===0x0,'recoveredCount':_0x223be9[_0x37a0b9(0x11f)]}};return{'ok':_0x5d573c[_0x37a0b9(0x11f)]===0x0,'data':_0x491b8d,'message':_0x5d573c[_0x37a0b9(0x11f)]===0x0?_0x37a0b9(0x116)+_0x4e5b0f+_0x37a0b9(0x180)+_0x2a5a9e+'\x20unchanged\x20menu(s).':_0x37a0b9(0x16a)+_0x4e5b0f+_0x37a0b9(0x175)+_0x2a5a9e+_0x37a0b9(0x166)+_0x5d573c[_0x37a0b9(0x11f)]+_0x37a0b9(0x140)};}};function parseInput(_0x39ec8f){const _0x339647=a191_0x10de07,_0x2d39d9=parseMenuIds(_0x39ec8f[_0x339647(0x13f)](_0x339647(0x110))),_0x557bf4=parseCsv(_0x39ec8f[_0x339647(0x13f)](_0x339647(0x172)));if(_0x2d39d9['length']===0x0&&_0x557bf4[_0x339647(0x11f)]===0x0)throw CliErrors[_0x339647(0x178)](_0x339647(0x14e));const _0x9fa5f0=parseBooleanFlag(_0x39ec8f,_0x339647(0x15c),!![]),_0x1c5709=parseBooleanFlag(_0x39ec8f,_0x339647(0x17d),![]);let _0x3a48d8;if(hasFlag(_0x39ec8f,_0x339647(0x151))){_0x3a48d8=_0x39ec8f[_0x339647(0x132)](_0x339647(0x151));if(!Number[_0x339647(0x161)](_0x3a48d8)||_0x3a48d8<0x0)throw CliErrors[_0x339647(0x178)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x2d39d9,'paths':_0x557bf4,'visible':_0x9fa5f0,'expectVisible':_0x1c5709,'expectedCount':_0x3a48d8};}async function buildPlan(_0xeba4d9,_0x1ed861){const _0x549c91=a191_0x10de07,_0x268216=parseInput(_0xeba4d9),_0x4a23f4=await fetchMutationSnapshot(_0xeba4d9,_0x549c91(0x12c)),_0x3b7c67=selectTargets(_0x4a23f4[_0x549c91(0x11a)],_0x268216['menuIds'],_0x268216[_0x549c91(0x172)]);if(_0x268216['expectedCount']!==undefined&&_0x3b7c67[_0x549c91(0x11f)]!==_0x268216['expectedCount'])throw menuError(_0x549c91(0x135),_0x549c91(0x16c)+_0x3b7c67[_0x549c91(0x11f)]+_0x549c91(0x122)+_0x268216[_0x549c91(0x16f)]+'.',_0x549c91(0x176));if(_0x268216[_0x549c91(0x177)]!==undefined){const _0x56d3e8=_0x3b7c67[_0x549c91(0x153)](_0x4dbb8e=>_0x4dbb8e[_0x549c91(0x15c)]!==_0x268216[_0x549c91(0x177)]);if(_0x56d3e8[_0x549c91(0x11f)]>0x0)throw menuError(_0x549c91(0x150),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x56d3e8['map'](_0x3d0f6f=>_0x3d0f6f['id'])[_0x549c91(0x103)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x30907b=_0x3b7c67[_0x549c91(0x15d)](_0x121bda=>({'id':_0x121bda['id'],'label':_0x121bda['label'],'path':_0x121bda[_0x549c91(0x129)],'before':{'visible':_0x121bda['visible']},'after':{'visible':_0x268216[_0x549c91(0x15c)]}})),_0x2be6d4=_0x30907b[_0x549c91(0x153)](_0x13938d=>_0x13938d[_0x549c91(0x136)][_0x549c91(0x15c)]!==_0x268216[_0x549c91(0x15c)])[_0x549c91(0x15d)](_0x169015=>({'stage':_0x549c91(0x17a),'method':_0x549c91(0x145),'path':'/smartapi/menu/update','body':{'appCode':_0xeba4d9['appCode'],'id':_0x169015['id'],'visible':_0x268216[_0x549c91(0x15c)]}})),_0x4d41e2=mutationResult({'operation':_0x549c91(0x162),'selector':{'menuIds':_0x268216[_0x549c91(0x11c)],'paths':_0x268216['paths']},'before':{'menus':_0x3b7c67['map'](_0x55d202=>({'id':_0x55d202['id'],'path':_0x55d202['path'],'visible':_0x55d202['visible']}))},'after':{'menus':_0x3b7c67[_0x549c91(0x15d)](_0x5e1c5a=>({'id':_0x5e1c5a['id'],'path':_0x5e1c5a[_0x549c91(0x129)],'visible':_0x268216[_0x549c91(0x15c)]}))},'dryRun':_0x1ed861,'backend':[...BACKEND],'plannedActions':_0x2be6d4,'snapshotHash':_0x4a23f4[_0x549c91(0x11d)],'warnings':_0x2be6d4[_0x549c91(0x11f)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x4d41e2,'requestedVisible':_0x268216[_0x549c91(0x15c)],'targets':_0x30907b},'beforeById':new Map(_0x3b7c67[_0x549c91(0x15d)](_0x6ae16=>[_0x6ae16['id'],_0x6ae16]))};}function a191_0x5d3c(_0x1f7cb6,_0x5a6efa){_0x1f7cb6=_0x1f7cb6-0x103;const _0x5a35aa=a191_0x5a35();let _0x5d3cef=_0x5a35aa[_0x1f7cb6];return _0x5d3cef;}function selectTargets(_0x47b866,_0x380f62,_0x2db266){const _0x590009=a191_0x10de07,_0xed68cb=new Map(_0x47b866['map'](_0x368a5d=>[_0x368a5d['id'],_0x368a5d])),_0x2d4856=new Map(),_0x2b98bf=_0x380f62[_0x590009(0x153)](_0x4600af=>!_0xed68cb[_0x590009(0x119)](_0x4600af));if(_0x2b98bf[_0x590009(0x11f)]>0x0)throw menuError(_0x590009(0x10f),_0x590009(0x14b)+_0x2b98bf[_0x590009(0x103)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x1651ae of _0x380f62){_0x2d4856[_0x590009(0x174)](_0x1651ae,_0xed68cb[_0x590009(0x167)](_0x1651ae));}for(const _0x6459a0 of _0x2db266){const _0x20c294=_0x47b866[_0x590009(0x153)](_0x241cd6=>_0x241cd6[_0x590009(0x129)]===_0x6459a0);if(_0x20c294['length']===0x0)throw menuError(_0x590009(0x10f),_0x590009(0x163)+JSON[_0x590009(0x143)](_0x6459a0)+'.',_0x590009(0x147));if(_0x20c294['length']>0x1)throw menuError(_0x590009(0x13c),_0x590009(0x13e)+JSON[_0x590009(0x143)](_0x6459a0)+'.',_0x590009(0x112)+_0x20c294[_0x590009(0x15d)](_0x1385d2=>_0x1385d2['id'])[_0x590009(0x103)](',\x20')+'.');const _0x1f16b7=_0x20c294[0x0];_0x2d4856['set'](_0x1f16b7['id'],_0x1f16b7);}return[..._0x2d4856[_0x590009(0x10c)]()];}function parseMenuIds(_0x52363a){const _0x4e850e=a191_0x10de07,_0x37c182=parseCsv(_0x52363a),_0x2282af=_0x37c182[_0x4e850e(0x15d)](Number);if(_0x2282af['some'](_0x1c81d1=>!Number[_0x4e850e(0x161)](_0x1c81d1)||_0x1c81d1<=0x0))throw CliErrors[_0x4e850e(0x178)](_0x4e850e(0x123));return[...new Set(_0x2282af)];}function parseCsv(_0x2bfc1c){const _0xdd7f93=a191_0x10de07;return[...new Set(_0x2bfc1c[_0xdd7f93(0x12d)](',')[_0xdd7f93(0x15d)](_0x594898=>_0x594898[_0xdd7f93(0x158)]())[_0xdd7f93(0x153)](Boolean))];}function parseBooleanFlag(_0x24e803,_0x262690,_0x205537){const _0x4a7500=a191_0x10de07;if(!hasFlag(_0x24e803,_0x262690)){if(_0x205537)throw CliErrors[_0x4a7500(0x109)](_0x262690);return undefined;}const _0x16b050=_0x24e803[_0x4a7500(0x10a)][_0x262690];if(_0x16b050===!![]||_0x16b050===![])return _0x16b050;if(_0x16b050===_0x4a7500(0x125))return!![];if(_0x16b050===_0x4a7500(0x124))return![];throw CliErrors['validation']('--'+_0x262690+_0x4a7500(0x114));}function verifyVisibilityUpdate(_0x1bc08c,_0x220106,_0x119276){const _0x4c0793=a191_0x10de07;assertVerified(!!_0x220106,_0x4c0793(0x165)+_0x1bc08c['id']+_0x4c0793(0x159)),assertVerified(_0x220106[_0x4c0793(0x15c)]===_0x119276,_0x4c0793(0x165)+_0x1bc08c['id']+_0x4c0793(0x120));const _0x177a78=[['id',_0x220106['id'],_0x1bc08c['id']],[_0x4c0793(0x12a),_0x220106['parentId'],_0x1bc08c[_0x4c0793(0x12a)]],[_0x4c0793(0x106),_0x220106[_0x4c0793(0x106)],_0x1bc08c[_0x4c0793(0x106)]],[_0x4c0793(0x157),_0x220106[_0x4c0793(0x157)],_0x1bc08c[_0x4c0793(0x157)]],[_0x4c0793(0x129),_0x220106[_0x4c0793(0x129)],_0x1bc08c[_0x4c0793(0x129)]],[_0x4c0793(0x134),_0x220106[_0x4c0793(0x134)],_0x1bc08c[_0x4c0793(0x134)]],['type',_0x220106[_0x4c0793(0x11b)],_0x1bc08c[_0x4c0793(0x11b)]],['sort',_0x220106[_0x4c0793(0x13b)],_0x1bc08c[_0x4c0793(0x13b)]],[_0x4c0793(0x14a),_0x220106['resources'],_0x1bc08c[_0x4c0793(0x14a)]],['resourcesValid',_0x220106[_0x4c0793(0x14f)],_0x1bc08c[_0x4c0793(0x14f)]],[_0x4c0793(0x126),_0x220106['childrenIds'],_0x1bc08c[_0x4c0793(0x126)]],[_0x4c0793(0x130),_0x220106[_0x4c0793(0x130)],_0x1bc08c[_0x4c0793(0x130)]],[_0x4c0793(0x139),_0x220106['pageId'],_0x1bc08c[_0x4c0793(0x139)]],[_0x4c0793(0x14c),_0x220106[_0x4c0793(0x14c)],_0x1bc08c[_0x4c0793(0x14c)]],[_0x4c0793(0x154),_0x220106[_0x4c0793(0x154)],_0x1bc08c[_0x4c0793(0x154)]],[_0x4c0793(0x15b),_0x220106[_0x4c0793(0x15b)],_0x1bc08c[_0x4c0793(0x15b)]],[_0x4c0793(0x152),_0x220106[_0x4c0793(0x152)],_0x1bc08c['datasetCode']]];for(const [_0x242abe,_0x354dfa,_0x3e9edb]of _0x177a78){assertVerified(sameValue(_0x354dfa,_0x3e9edb),_0x4c0793(0x165)+_0x1bc08c['id']+'\x20'+_0x242abe+_0x4c0793(0x13a));}}function sameValue(_0x3bae96,_0x1cfdf5){const _0x12dc85=a191_0x10de07;if(Array[_0x12dc85(0x15a)](_0x3bae96)||Array[_0x12dc85(0x15a)](_0x1cfdf5))return JSON[_0x12dc85(0x143)](_0x3bae96)===JSON[_0x12dc85(0x143)](_0x1cfdf5);return _0x3bae96===_0x1cfdf5;}
1
+ const a191_0x785c83=a191_0x3324;(function(_0x5035e7,_0x365cc4){const _0x41c38f=a191_0x3324,_0x2ffc81=_0x5035e7();while(!![]){try{const _0x5c10b3=-parseInt(_0x41c38f(0x1b0))/0x1*(parseInt(_0x41c38f(0x16a))/0x2)+parseInt(_0x41c38f(0x15e))/0x3+-parseInt(_0x41c38f(0x15c))/0x4+parseInt(_0x41c38f(0x168))/0x5*(parseInt(_0x41c38f(0x17d))/0x6)+-parseInt(_0x41c38f(0x192))/0x7*(parseInt(_0x41c38f(0x170))/0x8)+parseInt(_0x41c38f(0x191))/0x9*(-parseInt(_0x41c38f(0x171))/0xa)+-parseInt(_0x41c38f(0x160))/0xb*(-parseInt(_0x41c38f(0x194))/0xc);if(_0x5c10b3===_0x365cc4)break;else _0x2ffc81['push'](_0x2ffc81['shift']());}catch(_0x26bcc2){_0x2ffc81['push'](_0x2ffc81['shift']());}}}(a191_0xac21,0xee26e));function a191_0xac21(){const _0x3886f8=['493218MkBxuI','map','23257289YjgCYx','boolean','write','expectVisible','targets','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_permission_denied','menuIds','5SeJSAt','Response\x20was\x20lost\x20and\x20menu\x20','2dkiZcO','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','trim','byId','pageId','Menu\x20path\x20selector\x20not\x20found:\x20','147552FAbMUL','211160bCORAb','update\x20menu\x20visibility','datasetId','resourcesValid','beforeById','expected-count','expectedCount','childrenIds','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','appCode','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','2192952FZdcPn','sort','menus','code','path','verify\x20menu\x20visibility\x20update','\x20skipped,\x20','pageType','menu','\x20changed\x20unexpectedly.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','Requested\x20menu\x20visibility','stringify','Updated\x20visibility\x20for\x20','flagMissing','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20','validation','update-menu-visibility','414BzXwNs','168RgQEgu','parentId','24HHAnqM','verification','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','label','body','num','menu_verification_failed','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','isArray','visible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_selector_not_found','false','expect-visible','updated','isSafeInteger','length','depth','\x20unchanged\x20menu(s).','update-recovery','some','rawFlags','failed','\x20must\x20be\x20true\x20or\x20false.','resources','\x20menu(s);\x20skipped\x20','Selected\x20','457609aIQGKi','join','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_expected_count_mismatch','plan','number','true','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','filter','push','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','has','menu_selector_ambiguous','get','modelType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','message','POST','hash','type','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','string','cookie','before','url','Would\x20update\x20visibility\x20for\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','requestedVisible','Menu\x20visibility\x20update\x20completed:\x20','values','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','warnings','visibility-update','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Final\x20menu\x20visibility\x20readback\x20failed.','datasetCode','\x20menu(s);\x20skip\x20','paths','set','/smartapi/menu/update','plannedActions','7645700xCEegR','update'];a191_0xac21=function(){return _0x3886f8;};return a191_0xac21();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x785c83(0x144),'path':a191_0x785c83(0x15a)}];export const menuVisibilityUpdate={'service':a191_0x785c83(0x185),'command':a191_0x785c83(0x153),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x785c83(0x162),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x785c83(0x148),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x785c83(0x158),'type':'string','description':a191_0x785c83(0x196)},{'name':a191_0x785c83(0x19e),'type':'boolean','required':!![],'description':a191_0x785c83(0x189)},{'name':a191_0x785c83(0x1a2),'type':a191_0x785c83(0x161),'description':a191_0x785c83(0x17a)},{'name':'expected-count','type':a191_0x785c83(0x1b5),'description':a191_0x785c83(0x1bb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b254e){parseInput(_0x5b254e);},async 'dryRun'(_0x54d03d){const _0x21cd2c=a191_0x785c83,_0x34799e=await buildPlan(_0x54d03d,!![]),_0x57fc7d=_0x34799e[_0x21cd2c(0x1b4)]['plannedActions']?.['length']??0x0,_0x1afc7b=_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x164)][_0x21cd2c(0x1a5)]-_0x57fc7d;return menuDryRunResult(_0x34799e['plan'],{'method':_0x21cd2c(0x144),'url':'/smartapi/menu/update','body':{'updates':_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x15b)]?.['map'](_0x3302bd=>_0x3302bd[_0x21cd2c(0x199)])??[]},'description':_0x21cd2c(0x14c)+_0x57fc7d+_0x21cd2c(0x157)+_0x1afc7b+_0x21cd2c(0x1a7)});},async 'execute'(_0x148cc5){const _0xf5345f=a191_0x785c83,_0x4e2de3=await buildPlan(_0x148cc5,![]);await recheckMutationSnapshot(_0x148cc5,_0x4e2de3[_0xf5345f(0x1b4)],_0xf5345f(0x172));const _0x505e98=[],_0x3bf78d=[],_0x1a7b29=[];for(const _0x32b076 of _0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)]){if(_0x32b076[_0xf5345f(0x14a)]['visible']===_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x14e)]){_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5[_0xf5345f(0x149)],{'id':_0x32b076['id'],'visible':_0x4e2de3['plan'][_0xf5345f(0x14e)]}),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':!![],'skipped':![]});}catch(_0x7a978e){const _0x17e560=mapMenuApiError(_0x7a978e,'update\x20visibility\x20for',_0x32b076['id']);if(isMenuResponseLoss(_0x7a978e)&&_0x17e560[_0xf5345f(0x180)]!==_0xf5345f(0x166)){_0x1a7b29[_0xf5345f(0x1b9)](_0x32b076['id']);continue;}_0x3bf78d[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'stage':_0xf5345f(0x15d),'code':_0x17e560[_0xf5345f(0x180)],'message':_0x17e560[_0xf5345f(0x143)]});}}let _0xa52ab7;try{_0xa52ab7=await fetchMenuSnapshot(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5['cookie']);}catch(_0x49ae4e){const _0x3d4e0b=describeMenuErrorCause(_0x49ae4e,_0xf5345f(0x182)),_0x308759=_0x1a7b29[_0xf5345f(0x15f)](_0x59f889=>({'id':_0x59f889,'stage':_0xf5345f(0x1a8),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x18d)+_0x59f889+_0xf5345f(0x142),'requestedStateConfirmed':![],'recovered':![]})),_0x106404={'stage':_0xf5345f(0x195),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x155),'targetIds':_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)][_0xf5345f(0x15f)](_0x5a4b97=>_0x5a4b97['id']),'requestedStateConfirmed':![],..._0x3d4e0b};throw menuFailure(asVerificationError(_0x49ae4e,_0xf5345f(0x16b)),_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x308759,_0x106404],'warnings':[_0xf5345f(0x17c)],'verification':{'status':_0xf5345f(0x1ab),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4fac0a=[];for(const _0x39256d of _0x505e98){const _0x22c35b=Number(_0x39256d['id']),_0x31508d=_0x4e2de3[_0xf5345f(0x175)][_0xf5345f(0x140)](_0x22c35b),_0x386242=_0xa52ab7[_0xf5345f(0x16d)][_0xf5345f(0x140)](_0x22c35b);try{verifyVisibilityUpdate(_0x31508d,_0x386242,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']);}catch(_0x4a7230){const _0x151444=asVerificationError(_0x4a7230,'Menu\x20'+_0x22c35b+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x22c35b,'stage':_0xf5345f(0x195),'code':_0x151444[_0xf5345f(0x180)],'message':_0x151444[_0xf5345f(0x143)],'requestedStateConfirmed':![]});}}for(const _0x2cde9e of _0x1a7b29){const _0xd59d33=_0x4e2de3[_0xf5345f(0x175)]['get'](_0x2cde9e),_0x24b4d0=_0xa52ab7['byId'][_0xf5345f(0x140)](_0x2cde9e);try{verifyVisibilityUpdate(_0xd59d33,_0x24b4d0,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x45eb8c){const _0x2e99f3=asVerificationError(_0x45eb8c,_0xf5345f(0x169)+_0x2cde9e+_0xf5345f(0x179));_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'stage':_0xf5345f(0x1a8),'code':_0x2e99f3['code'],'message':_0x2e99f3[_0xf5345f(0x143)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4fac0a[_0xf5345f(0x1a5)]>0x0){const _0x4d7aaf=_0x4fac0a[_0xf5345f(0x15f)](_0x541f10=>Number(_0x541f10['id'])),_0x2bfdff=_0x505e98[_0xf5345f(0x1b8)](_0x1d4ba6=>_0x1d4ba6['recovered']===!![])[_0xf5345f(0x1a5)],_0x5312d9=menuError(_0xf5345f(0x19b),_0xf5345f(0x1b2)+_0x4d7aaf['join'](',\x20')+'.',_0xf5345f(0x147));throw menuFailure(_0x5312d9,_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x4fac0a],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xf5345f(0x1ab),..._0x4d7aaf[_0xf5345f(0x1a5)]===0x1?{'targetId':_0x4d7aaf[0x0]}:{'targetIds':_0x4d7aaf},'recoveredCount':_0x2bfdff,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x237c26=_0x505e98[_0xf5345f(0x1b8)](_0x318ef5=>_0x318ef5[_0xf5345f(0x1a3)]===!![])[_0xf5345f(0x1a5)],_0x410f3c=_0x505e98[_0xf5345f(0x1a5)]-_0x237c26,_0x22b7b3={..._0x4e2de3[_0xf5345f(0x1b4)],'succeeded':_0x505e98,'failed':_0x3bf78d,'warnings':_0x3bf78d[_0xf5345f(0x1a5)]>0x0?[..._0x4e2de3['plan'][_0xf5345f(0x152)],_0xf5345f(0x187)]:_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x152)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0xa52ab7[_0xf5345f(0x145)],'matchesRequestedState':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'recoveredCount':_0x1a7b29['length']}};return{'ok':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'data':_0x22b7b3,'message':_0x3bf78d[_0xf5345f(0x1a5)]===0x0?_0xf5345f(0x18b)+_0x237c26+_0xf5345f(0x1ae)+_0x410f3c+_0xf5345f(0x1a7):_0xf5345f(0x14f)+_0x237c26+'\x20updated,\x20'+_0x410f3c+_0xf5345f(0x183)+_0x3bf78d['length']+'\x20failed.'};}};function parseInput(_0x2b8dc5){const _0x29f55b=a191_0x785c83,_0x2bc630=parseMenuIds(_0x2b8dc5['str']('menu-ids')),_0x22ac09=parseCsv(_0x2b8dc5[_0x29f55b(0x188)](_0x29f55b(0x158)));if(_0x2bc630['length']===0x0&&_0x22ac09[_0x29f55b(0x1a5)]===0x0)throw CliErrors['validation'](_0x29f55b(0x19f));const _0x452967=parseBooleanFlag(_0x2b8dc5,_0x29f55b(0x19e),!![]),_0x5ab2f3=parseBooleanFlag(_0x2b8dc5,'expect-visible',![]);let _0x4bb3ec;if(hasFlag(_0x2b8dc5,'expected-count')){_0x4bb3ec=_0x2b8dc5[_0x29f55b(0x19a)](_0x29f55b(0x176));if(!Number[_0x29f55b(0x1a4)](_0x4bb3ec)||_0x4bb3ec<0x0)throw CliErrors[_0x29f55b(0x18f)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x2bc630,'paths':_0x22ac09,'visible':_0x452967,'expectVisible':_0x5ab2f3,'expectedCount':_0x4bb3ec};}async function buildPlan(_0xe7d732,_0x45f47e){const _0x169998=a191_0x785c83,_0x9073df=parseInput(_0xe7d732),_0x1199c6=await fetchMutationSnapshot(_0xe7d732,'update\x20menu\x20visibility'),_0x58dca1=selectTargets(_0x1199c6[_0x169998(0x17f)],_0x9073df[_0x169998(0x167)],_0x9073df[_0x169998(0x158)]);if(_0x9073df[_0x169998(0x177)]!==undefined&&_0x58dca1[_0x169998(0x1a5)]!==_0x9073df[_0x169998(0x177)])throw menuError(_0x169998(0x1b3),_0x169998(0x1af)+_0x58dca1['length']+'\x20menu(s),\x20expected\x20'+_0x9073df['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x9073df[_0x169998(0x163)]!==undefined){const _0x2ee501=_0x58dca1[_0x169998(0x1b8)](_0xcc25c7=>_0xcc25c7['visible']!==_0x9073df[_0x169998(0x163)]);if(_0x2ee501[_0x169998(0x1a5)]>0x0)throw menuError('menu_state_drift',_0x169998(0x154)+_0x2ee501['map'](_0x43b147=>_0x43b147['id'])[_0x169998(0x1b1)](',\x20')+'.',_0x169998(0x151));}const _0x3bb2c3=_0x58dca1[_0x169998(0x15f)](_0x32dec1=>({'id':_0x32dec1['id'],'label':_0x32dec1[_0x169998(0x198)],'path':_0x32dec1['path'],'before':{'visible':_0x32dec1[_0x169998(0x19e)]},'after':{'visible':_0x9073df[_0x169998(0x19e)]}})),_0x1144f2=_0x3bb2c3[_0x169998(0x1b8)](_0x59b08f=>_0x59b08f[_0x169998(0x14a)][_0x169998(0x19e)]!==_0x9073df[_0x169998(0x19e)])['map'](_0x3965cf=>({'stage':_0x169998(0x190),'method':_0x169998(0x144),'path':'/smartapi/menu/update','body':{'appCode':_0xe7d732[_0x169998(0x17b)],'id':_0x3965cf['id'],'visible':_0x9073df[_0x169998(0x19e)]}})),_0x3c703f=mutationResult({'operation':_0x169998(0x153),'selector':{'menuIds':_0x9073df[_0x169998(0x167)],'paths':_0x9073df['paths']},'before':{'menus':_0x58dca1[_0x169998(0x15f)](_0x4c9c14=>({'id':_0x4c9c14['id'],'path':_0x4c9c14[_0x169998(0x181)],'visible':_0x4c9c14[_0x169998(0x19e)]}))},'after':{'menus':_0x58dca1[_0x169998(0x15f)](_0x564155=>({'id':_0x564155['id'],'path':_0x564155[_0x169998(0x181)],'visible':_0x9073df[_0x169998(0x19e)]}))},'dryRun':_0x45f47e,'backend':[...BACKEND],'plannedActions':_0x1144f2,'snapshotHash':_0x1199c6[_0x169998(0x145)],'warnings':_0x1144f2['length']===0x0?[_0x169998(0x1b7)]:[]});return{'plan':{..._0x3c703f,'requestedVisible':_0x9073df[_0x169998(0x19e)],'targets':_0x3bb2c3},'beforeById':new Map(_0x58dca1[_0x169998(0x15f)](_0x13732f=>[_0x13732f['id'],_0x13732f]))};}function selectTargets(_0x33f356,_0x1e2278,_0x4ff601){const _0x552d97=a191_0x785c83,_0x35c4fc=new Map(_0x33f356[_0x552d97(0x15f)](_0xbe594c=>[_0xbe594c['id'],_0xbe594c])),_0x154262=new Map(),_0x34db45=_0x1e2278[_0x552d97(0x1b8)](_0x1efd22=>!_0x35c4fc[_0x552d97(0x1bc)](_0x1efd22));if(_0x34db45[_0x552d97(0x1a5)]>0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x165)+_0x34db45[_0x552d97(0x1b1)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x4ffc30 of _0x1e2278){_0x154262[_0x552d97(0x159)](_0x4ffc30,_0x35c4fc[_0x552d97(0x140)](_0x4ffc30));}for(const _0x876e6f of _0x4ff601){const _0x48a750=_0x33f356['filter'](_0xe40fe6=>_0xe40fe6[_0x552d97(0x181)]===_0x876e6f);if(_0x48a750['length']===0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x16f)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x48a750[_0x552d97(0x1a5)]>0x1)throw menuError(_0x552d97(0x13f),_0x552d97(0x19c)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x48a750['map'](_0x1df89f=>_0x1df89f['id'])[_0x552d97(0x1b1)](',\x20')+'.');const _0x43405d=_0x48a750[0x0];_0x154262['set'](_0x43405d['id'],_0x43405d);}return[..._0x154262[_0x552d97(0x150)]()];}function a191_0x3324(_0x185aaa,_0x479363){_0x185aaa=_0x185aaa-0x13f;const _0xac21e7=a191_0xac21();let _0x3324d4=_0xac21e7[_0x185aaa];return _0x3324d4;}function parseMenuIds(_0x1c1cfb){const _0x98db10=a191_0x785c83,_0x4b9828=parseCsv(_0x1c1cfb),_0x3549b5=_0x4b9828[_0x98db10(0x15f)](Number);if(_0x3549b5[_0x98db10(0x1a9)](_0x52c807=>!Number[_0x98db10(0x1a4)](_0x52c807)||_0x52c807<=0x0))throw CliErrors['validation'](_0x98db10(0x14d));return[...new Set(_0x3549b5)];}function parseCsv(_0x31b253){const _0x360827=a191_0x785c83;return[...new Set(_0x31b253['split'](',')[_0x360827(0x15f)](_0x22303b=>_0x22303b[_0x360827(0x16c)]())[_0x360827(0x1b8)](Boolean))];}function parseBooleanFlag(_0x48c673,_0x3e8030,_0x373c0b){const _0x1db65b=a191_0x785c83;if(!hasFlag(_0x48c673,_0x3e8030)){if(_0x373c0b)throw CliErrors[_0x1db65b(0x18c)](_0x3e8030);return undefined;}const _0xb8d1b1=_0x48c673[_0x1db65b(0x1aa)][_0x3e8030];if(_0xb8d1b1===!![]||_0xb8d1b1===![])return _0xb8d1b1;if(_0xb8d1b1===_0x1db65b(0x1b6))return!![];if(_0xb8d1b1===_0x1db65b(0x1a1))return![];throw CliErrors[_0x1db65b(0x18f)]('--'+_0x3e8030+_0x1db65b(0x1ac));}function verifyVisibilityUpdate(_0x320020,_0x2adf78,_0x505317){const _0x2609ce=a191_0x785c83;assertVerified(!!_0x2adf78,'Menu\x20'+_0x320020['id']+_0x2609ce(0x1ba)),assertVerified(_0x2adf78['visible']===_0x505317,_0x2609ce(0x18e)+_0x320020['id']+_0x2609ce(0x197));const _0x2f7d58=[['id',_0x2adf78['id'],_0x320020['id']],[_0x2609ce(0x193),_0x2adf78[_0x2609ce(0x193)],_0x320020[_0x2609ce(0x193)]],[_0x2609ce(0x1a6),_0x2adf78[_0x2609ce(0x1a6)],_0x320020[_0x2609ce(0x1a6)]],[_0x2609ce(0x198),_0x2adf78[_0x2609ce(0x198)],_0x320020[_0x2609ce(0x198)]],[_0x2609ce(0x181),_0x2adf78['path'],_0x320020[_0x2609ce(0x181)]],[_0x2609ce(0x14b),_0x2adf78['url'],_0x320020['url']],[_0x2609ce(0x146),_0x2adf78[_0x2609ce(0x146)],_0x320020[_0x2609ce(0x146)]],[_0x2609ce(0x17e),_0x2adf78[_0x2609ce(0x17e)],_0x320020[_0x2609ce(0x17e)]],[_0x2609ce(0x1ad),_0x2adf78[_0x2609ce(0x1ad)],_0x320020[_0x2609ce(0x1ad)]],['resourcesValid',_0x2adf78[_0x2609ce(0x174)],_0x320020['resourcesValid']],['childrenIds',_0x2adf78[_0x2609ce(0x178)],_0x320020['childrenIds']],['childrenCount',_0x2adf78['childrenCount'],_0x320020['childrenCount']],[_0x2609ce(0x16e),_0x2adf78[_0x2609ce(0x16e)],_0x320020[_0x2609ce(0x16e)]],[_0x2609ce(0x184),_0x2adf78['pageType'],_0x320020[_0x2609ce(0x184)]],[_0x2609ce(0x141),_0x2adf78['modelType'],_0x320020['modelType']],['datasetId',_0x2adf78['datasetId'],_0x320020[_0x2609ce(0x173)]],[_0x2609ce(0x156),_0x2adf78['datasetCode'],_0x320020['datasetCode']]];for(const [_0x13f6be,_0x54334a,_0x238784]of _0x2f7d58){assertVerified(sameValue(_0x54334a,_0x238784),_0x2609ce(0x18e)+_0x320020['id']+'\x20'+_0x13f6be+_0x2609ce(0x186));}}function sameValue(_0x26adb5,_0x1a9efd){const _0x401e5f=a191_0x785c83;if(Array[_0x401e5f(0x19d)](_0x26adb5)||Array[_0x401e5f(0x19d)](_0x1a9efd))return JSON[_0x401e5f(0x18a)](_0x26adb5)===JSON[_0x401e5f(0x18a)](_0x1a9efd);return _0x26adb5===_0x1a9efd;}
@@ -1 +1 @@
1
- const a192_0x23765b=a192_0x29f7;(function(_0x1d2799,_0x3b3839){const _0x35f3f4=a192_0x29f7,_0x34d52a=_0x1d2799();while(!![]){try{const _0x2f5c5f=-parseInt(_0x35f3f4(0x179))/0x1+-parseInt(_0x35f3f4(0x166))/0x2+-parseInt(_0x35f3f4(0x16a))/0x3*(parseInt(_0x35f3f4(0x172))/0x4)+-parseInt(_0x35f3f4(0x177))/0x5*(-parseInt(_0x35f3f4(0x17b))/0x6)+-parseInt(_0x35f3f4(0x163))/0x7+parseInt(_0x35f3f4(0x16c))/0x8*(parseInt(_0x35f3f4(0x165))/0x9)+parseInt(_0x35f3f4(0x15e))/0xa;if(_0x2f5c5f===_0x3b3839)break;else _0x34d52a['push'](_0x34d52a['shift']());}catch(_0x2f1dde){_0x34d52a['push'](_0x34d52a['shift']());}}}(a192_0x421a,0x2a525));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x23765b(0x16f);async function prepareCreate(_0x7b8577){const _0x9ee4a0=a192_0x23765b,_0x1cd0cc=await readNotificationDocument(_0x7b8577,'create'),_0x207852=createMutationInput(_0x7b8577['appCode'],_0x1cd0cc);return{'document':_0x1cd0cc,'input':_0x207852,'planned':projectNotificationConfig({'appCode':_0x7b8577[_0x9ee4a0(0x176)],'configName':_0x1cd0cc[_0x9ee4a0(0x162)],'channelType':_0x1cd0cc[_0x9ee4a0(0x16e)],'endpointUrl':_0x1cd0cc[_0x9ee4a0(0x168)],'channelConfig':_0x1cd0cc['channelConfig'],'description':_0x1cd0cc['description'],'connectTimeout':_0x1cd0cc[_0x9ee4a0(0x171)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1cd0cc['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x23765b(0x167),'command':a192_0x23765b(0x160),'description':a192_0x23765b(0x170),'risk':a192_0x23765b(0x15d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x359319){assertSingleNotificationSource(_0x359319);},async 'dryRun'(_0x3e6b97){const _0xcd3226=a192_0x23765b,_0x4e8af8=await prepareCreate(_0x3e6b97),_0x3d1f8d=notificationLookupCommand(_0x3e6b97[_0xcd3226(0x176)],_0x4e8af8['document']['channelType']);return asDryRunResult({'operation':_0xcd3226(0x169),'selector':{'appCode':_0x3e6b97['appCode'],'configName':_0x4e8af8['document'][_0xcd3226(0x162)],'channelType':_0x4e8af8[_0xcd3226(0x15b)][_0xcd3226(0x16e)]},'before':null,'after':_0x4e8af8[_0xcd3226(0x175)],'dryRun':!![],'backend':{'method':_0xcd3226(0x16b),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0xcd3226(0x175),'lookupCommand':_0x3d1f8d}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x543334){const _0x2159a1=a192_0x23765b,_0x4bfa1d=await prepareCreate(_0x543334),_0x1c41f4=notificationLookupCommand(_0x543334[_0x2159a1(0x176)],_0x4bfa1d[_0x2159a1(0x15b)][_0x2159a1(0x16e)]);let _0x417e96;try{_0x417e96=await createNotificationChannelConfig(_0x4bfa1d[_0x2159a1(0x174)]);}catch(_0x3226ab){if(isPlatformTransportFailure(_0x3226ab))throw notificationError(_0x2159a1(0x15a),_0x2159a1(0x178),_0x2159a1(0x173)+_0x1c41f4+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x2159a1(0x169),_0x2159a1(0x16d),_0x2159a1(0x173)+_0x1c41f4+_0x2159a1(0x15f));}if(!Number['isSafeInteger'](_0x417e96)||_0x417e96<=0x0)throw notificationError(_0x2159a1(0x15a),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x1c41f4+_0x2159a1(0x15c));let _0x1a7c89;try{const _0x2f9ed6=await getNotificationChannelConfig(_0x417e96,_0x543334[_0x2159a1(0x176)]);_0x1a7c89=normalizeExactNotificationConfig(_0x2f9ed6,_0x417e96,_0x543334[_0x2159a1(0x176)]);}catch{throw safeApiFailure(_0x2159a1(0x169),_0x2159a1(0x17a),'Inspect\x20with\x20'+_0x1c41f4+_0x2159a1(0x164));}return{'ok':!![],'data':{'operation':_0x2159a1(0x169),'selector':{'appCode':_0x1a7c89[_0x2159a1(0x176)],'id':_0x1a7c89['id'],'configCode':_0x1a7c89['configCode'],'configName':_0x1a7c89[_0x2159a1(0x162)],'channelType':_0x1a7c89[_0x2159a1(0x16e)]},'before':null,'after':projectNotificationConfig(_0x1a7c89),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2159a1(0x161),'lookupCommand':_0x1c41f4}},'message':_0x2159a1(0x159)+_0x1a7c89['id']};}};function a192_0x29f7(_0x29505d,_0x3630d1){_0x29505d=_0x29505d-0x159;const _0x421af5=a192_0x421a();let _0x29f72f=_0x421af5[_0x29505d];return _0x29f72f;}function a192_0x421a(){const _0x97c148=['config-create','verified','configName','1854167exqPnA',';\x20do\x20not\x20resubmit\x20automatically.','567441lXPkKV','422500BdmJRY','notification','endpointUrl','create','171489VEQSuL','POST','16zPqeil','mutation','channelType','/notification/channel-config/create','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','connectTimeout','8vqWCCW','Inspect\x20with\x20','input','planned','appCode','49795OUVVbk','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','39494CmofvG','verification','30ndzYLb','Created\x20notification\x20config\x20','notification_config_create_outcome_unknown','document',';\x20do\x20not\x20resubmit.','write','6274070FGTxEB',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a192_0x421a=function(){return _0x97c148;};return a192_0x421a();}
1
+ function a192_0x2305(){const _0x12cfb1=['POST','6176569dfaCnS','channelConfig','endpointUrl','description','3020679yfSHFg','write','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','876KOilpe','62964dIvesv','input','connectTimeout','notification_config_create_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','mutation','verified','document',';\x20do\x20not\x20resubmit.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','10pvYlOB','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','8UoZODx','24840KBXmcg','1775580uOKzUd','config-create','verification','12418893vRUVGr','planned','Inspect\x20with\x20','configName','Created\x20notification\x20config\x20','appCode','readTimeout','channelType','create','configCode','207836KgIigp'];a192_0x2305=function(){return _0x12cfb1;};return a192_0x2305();}const a192_0x1668a7=a192_0xb400;(function(_0x395b0d,_0x118f77){const _0x5a158b=a192_0xb400,_0x3edd12=_0x395b0d();while(!![]){try{const _0x518cfc=parseInt(_0x5a158b(0xc4))/0x1+parseInt(_0x5a158b(0xa9))/0x2+parseInt(_0x5a158b(0xa5))/0x3+-parseInt(_0x5a158b(0xb7))/0x4+parseInt(_0x5a158b(0xb6))/0x5*(-parseInt(_0x5a158b(0xa8))/0x6)+parseInt(_0x5a158b(0xc6))/0x7*(-parseInt(_0x5a158b(0xb5))/0x8)+-parseInt(_0x5a158b(0xba))/0x9*(-parseInt(_0x5a158b(0xb3))/0xa);if(_0x518cfc===_0x118f77)break;else _0x3edd12['push'](_0x3edd12['shift']());}catch(_0xd11270){_0x3edd12['push'](_0x3edd12['shift']());}}}(a192_0x2305,0x8c422));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a192_0xb400(_0x30f19a,_0x49c2e8){_0x30f19a=_0x30f19a-0xa4;const _0x230531=a192_0x2305();let _0xb40050=_0x230531[_0x30f19a];return _0xb40050;}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x1d1867){const _0x36267e=a192_0xb400,_0x1a5cab=await readNotificationDocument(_0x1d1867,_0x36267e(0xc2)),_0x4d4103=createMutationInput(_0x1d1867[_0x36267e(0xbf)],_0x1a5cab);return{'document':_0x1a5cab,'input':_0x4d4103,'planned':projectNotificationConfig({'appCode':_0x1d1867[_0x36267e(0xbf)],'configName':_0x1a5cab[_0x36267e(0xbd)],'channelType':_0x1a5cab[_0x36267e(0xc1)],'endpointUrl':_0x1a5cab[_0x36267e(0xc8)],'channelConfig':_0x1a5cab[_0x36267e(0xc7)],'description':_0x1a5cab[_0x36267e(0xa4)],'connectTimeout':_0x1a5cab[_0x36267e(0xab)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1a5cab[_0x36267e(0xc0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a192_0x1668a7(0xb8),'description':a192_0x1668a7(0xb2),'risk':a192_0x1668a7(0xa6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x59d6ec){assertSingleNotificationSource(_0x59d6ec);},async 'dryRun'(_0x207828){const _0x4d9d03=a192_0x1668a7,_0x41b770=await prepareCreate(_0x207828),_0xf9aeae=notificationLookupCommand(_0x207828['appCode'],_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xc1)]);return asDryRunResult({'operation':_0x4d9d03(0xc2),'selector':{'appCode':_0x207828['appCode'],'configName':_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xbd)],'channelType':_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xc1)]},'before':null,'after':_0x41b770[_0x4d9d03(0xbb)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4d9d03(0xbb),'lookupCommand':_0xf9aeae}},{'method':_0x4d9d03(0xc5),'url':CREATE_PATH});},async 'execute'(_0x281d33){const _0x2b50b0=a192_0x1668a7,_0x125a8d=await prepareCreate(_0x281d33),_0x1ea502=notificationLookupCommand(_0x281d33[_0x2b50b0(0xbf)],_0x125a8d[_0x2b50b0(0xb0)][_0x2b50b0(0xc1)]);let _0x44b35d;try{_0x44b35d=await createNotificationChannelConfig(_0x125a8d[_0x2b50b0(0xaa)]);}catch(_0x3c2c03){if(isPlatformTransportFailure(_0x3c2c03))throw notificationError(_0x2b50b0(0xac),_0x2b50b0(0xa7),_0x2b50b0(0xbc)+_0x1ea502+_0x2b50b0(0xb1));throw safeApiFailure(_0x2b50b0(0xc2),_0x2b50b0(0xae),'Inspect\x20with\x20'+_0x1ea502+_0x2b50b0(0xad));}if(!Number['isSafeInteger'](_0x44b35d)||_0x44b35d<=0x0)throw notificationError(_0x2b50b0(0xac),_0x2b50b0(0xb4),_0x2b50b0(0xbc)+_0x1ea502+_0x2b50b0(0xb1));let _0xf71d6f;try{const _0x58fc0b=await getNotificationChannelConfig(_0x44b35d,_0x281d33[_0x2b50b0(0xbf)]);_0xf71d6f=normalizeExactNotificationConfig(_0x58fc0b,_0x44b35d,_0x281d33[_0x2b50b0(0xbf)]);}catch{throw safeApiFailure(_0x2b50b0(0xc2),_0x2b50b0(0xb9),_0x2b50b0(0xbc)+_0x1ea502+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x2b50b0(0xc2),'selector':{'appCode':_0xf71d6f[_0x2b50b0(0xbf)],'id':_0xf71d6f['id'],'configCode':_0xf71d6f[_0x2b50b0(0xc3)],'configName':_0xf71d6f[_0x2b50b0(0xbd)],'channelType':_0xf71d6f['channelType']},'before':null,'after':projectNotificationConfig(_0xf71d6f),'dryRun':![],'backend':{'method':_0x2b50b0(0xc5),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2b50b0(0xaf),'lookupCommand':_0x1ea502}},'message':_0x2b50b0(0xbe)+_0xf71d6f['id']};}};
@@ -1 +1 @@
1
- const a193_0x1de247=a193_0x387f;(function(_0x474e7f,_0x4db15a){const _0x4f01de=a193_0x387f,_0xba42eb=_0x474e7f();while(!![]){try{const _0x495040=parseInt(_0x4f01de(0xc7))/0x1*(-parseInt(_0x4f01de(0xd2))/0x2)+parseInt(_0x4f01de(0xc8))/0x3*(-parseInt(_0x4f01de(0xd8))/0x4)+parseInt(_0x4f01de(0xdd))/0x5*(-parseInt(_0x4f01de(0xca))/0x6)+-parseInt(_0x4f01de(0xd6))/0x7+-parseInt(_0x4f01de(0xcc))/0x8+parseInt(_0x4f01de(0xc3))/0x9*(-parseInt(_0x4f01de(0xc1))/0xa)+-parseInt(_0x4f01de(0xda))/0xb*(-parseInt(_0x4f01de(0xd5))/0xc);if(_0x495040===_0x4db15a)break;else _0xba42eb['push'](_0xba42eb['shift']());}catch(_0x11aa26){_0xba42eb['push'](_0xba42eb['shift']());}}}(a193_0x3b5c,0x2f7df));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x3b5c(){const _0x3ad2fd=['mutation','unshift','313998juUvpN','channelType',';\x20no\x20automatic\x20retry\x20was\x20attempted.','4428UpbpTL','2582223EEOCdS','appCode','8732AFeSoa','high-risk-write','46431zWVQQd','\x20delete\x20could\x20not\x20be\x20verified.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','7505ATiWzc','notification_config_delete_outcome_unknown','Notification\x20config\x20','/notification/channel-config/delete','planned','some','config-delete','notification','10avcITu','verified','686133NRrPzv','POST',';\x20do\x20not\x20resubmit\x20automatically.','delete','1wKgrET','381YxaqGc','Inspect\x20with\x20','996FwbqbF','\x20remains\x20present\x20after\x20delete.','1875920ndeTQZ','notification_config_delete_verification_unavailable','before','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'];a193_0x3b5c=function(){return _0x3ad2fd;};return a193_0x3b5c();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x1de247(0xe0),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x1a97b5){const _0x4a6ead=a193_0x1de247,_0xfea6cd=readNotificationId(_0x1a97b5),_0x34311a=await requireExactNotificationConfig(_0x1a97b5[_0x4a6ead(0xd7)],_0xfea6cd,_0x4a6ead(0xc6));return{'id':_0xfea6cd,'before':_0x34311a};}function a193_0x387f(_0x4650a0,_0x243cdb){_0x4650a0=_0x4650a0-0xbf;const _0x3b5c52=a193_0x3b5c();let _0x387fa7=_0x3b5c52[_0x4650a0];return _0x387fa7;}export const notificationConfigDelete={'service':a193_0x1de247(0xc0),'command':a193_0x1de247(0xbf),'description':a193_0x1de247(0xdc),'risk':a193_0x1de247(0xd9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x10d214){readNotificationId(_0x10d214),requireNotificationExplicitYes(_0x10d214);},async 'dryRun'(_0x11fa61){const _0x36c49d=a193_0x1de247,_0x546f6b=await prepareDelete(_0x11fa61),_0x413336=notificationLookupCommand(_0x11fa61[_0x36c49d(0xd7)],_0x546f6b['before'][_0x36c49d(0xd3)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x546f6b[_0x36c49d(0xce)]),'before':projectNotificationConfig(_0x546f6b[_0x36c49d(0xce)]),'after':null,'dryRun':!![],'backend':{'method':_0x36c49d(0xc4),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x36c49d(0xe1),'lookupCommand':_0x413336}},{'method':_0x36c49d(0xc4),'url':DELETE_PATH});},async 'execute'(_0x19dc9a){const _0x501d60=a193_0x1de247;requireNotificationExplicitYes(_0x19dc9a);const _0x5f3c6c=await prepareDelete(_0x19dc9a),_0x44c34f=notificationLookupCommand(_0x19dc9a[_0x501d60(0xd7)],_0x5f3c6c[_0x501d60(0xce)][_0x501d60(0xd3)]);let _0x3d90d5=![];try{await deleteNotificationChannelConfig(_0x5f3c6c['id'],_0x19dc9a[_0x501d60(0xd7)]);}catch(_0x2f418f){if(!isPlatformTransportFailure(_0x2f418f))throw safeApiFailure(_0x501d60(0xc6),_0x501d60(0xd0),'Inspect\x20with\x20'+_0x44c34f+_0x501d60(0xd4));_0x3d90d5=!![];}let _0x2b0d42;try{_0x2b0d42=await listNotificationChannelConfigs(_0x19dc9a['appCode'],_0x5f3c6c[_0x501d60(0xce)][_0x501d60(0xd3)]),validateNotificationDeleteReadback(_0x2b0d42,_0x19dc9a[_0x501d60(0xd7)],_0x5f3c6c[_0x501d60(0xce)][_0x501d60(0xd3)]);}catch{throw notificationError(_0x3d90d5?_0x501d60(0xde):_0x501d60(0xcd),_0x501d60(0xdf)+_0x5f3c6c['id']+_0x501d60(0xdb),_0x501d60(0xc9)+_0x44c34f+_0x501d60(0xc5));}if(_0x2b0d42[_0x501d60(0xe2)](_0x5e9b81=>_0x5e9b81['id']===_0x5f3c6c['id']))throw notificationError(_0x3d90d5?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_failed',_0x501d60(0xdf)+_0x5f3c6c['id']+_0x501d60(0xcb),_0x501d60(0xc9)+_0x44c34f+_0x501d60(0xc5));const _0x4185bf=[REFERENCE_WARNING];return _0x3d90d5&&_0x4185bf[_0x501d60(0xd1)](_0x501d60(0xcf)),{'ok':!![],'data':{'operation':_0x501d60(0xc6),'selector':notificationSelector(_0x5f3c6c[_0x501d60(0xce)]),'before':projectNotificationConfig(_0x5f3c6c[_0x501d60(0xce)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x4185bf,'verification':{'status':_0x501d60(0xc2),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3d90d5,'lookupCommand':_0x44c34f}},'message':'Deleted\x20notification\x20config\x20'+_0x5f3c6c['id']};}};
1
+ const a193_0x3df647=a193_0x54d0;(function(_0x1275f1,_0x59dc75){const _0x4caf36=a193_0x54d0,_0x58feeb=_0x1275f1();while(!![]){try{const _0x3c7684=parseInt(_0x4caf36(0x1e8))/0x1+parseInt(_0x4caf36(0x1da))/0x2*(parseInt(_0x4caf36(0x1d5))/0x3)+-parseInt(_0x4caf36(0x1e2))/0x4+-parseInt(_0x4caf36(0x1d4))/0x5*(-parseInt(_0x4caf36(0x1ef))/0x6)+-parseInt(_0x4caf36(0x1ee))/0x7*(parseInt(_0x4caf36(0x1dd))/0x8)+parseInt(_0x4caf36(0x1d9))/0x9*(parseInt(_0x4caf36(0x1f0))/0xa)+-parseInt(_0x4caf36(0x1e0))/0xb;if(_0x3c7684===_0x59dc75)break;else _0x58feeb['push'](_0x58feeb['shift']());}catch(_0x3d6d97){_0x58feeb['push'](_0x58feeb['shift']());}}}(a193_0x3ebc,0xf15d2));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x3ebc(){const _0x514bf6=[';\x20no\x20automatic\x20retry\x20was\x20attempted.','4304671piexJY','1818ZCkWwE','17636110IaCsvS','verified','POST','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_outcome_unknown','2720McayQK','136443aaiTpi','Deleted\x20notification\x20config\x20','notification','config-delete','9hdTjsC','2PVykJK','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','16wihQfx','Inspect\x20with\x20','notification_config_delete_verification_unavailable','4202770ijEyOo','before','1368668cTIsKN','notification_config_delete_verification_failed','high-risk-write','some','planned','\x20delete\x20could\x20not\x20be\x20verified.','968845gZAOko','\x20remains\x20present\x20after\x20delete.','channelType','delete','appCode'];a193_0x3ebc=function(){return _0x514bf6;};return a193_0x3ebc();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a193_0x54d0(_0x1db138,_0x3aa4e7){_0x1db138=_0x1db138-0x1cf;const _0x3ebccd=a193_0x3ebc();let _0x54d0cd=_0x3ebccd[_0x1db138];return _0x54d0cd;}const DELETE_PATH=a193_0x3df647(0x1d1),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x48234e){const _0x553518=a193_0x3df647,_0x2720c3=readNotificationId(_0x48234e),_0x42a77b=await requireExactNotificationConfig(_0x48234e[_0x553518(0x1ec)],_0x2720c3,'delete');return{'id':_0x2720c3,'before':_0x42a77b};}export const notificationConfigDelete={'service':a193_0x3df647(0x1d7),'command':a193_0x3df647(0x1d8),'description':a193_0x3df647(0x1db),'risk':a193_0x3df647(0x1e4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x2c9092){readNotificationId(_0x2c9092),requireNotificationExplicitYes(_0x2c9092);},async 'dryRun'(_0x1d07ed){const _0x4e6994=a193_0x3df647,_0x3fe3f3=await prepareDelete(_0x1d07ed),_0x2dd4df=notificationLookupCommand(_0x1d07ed[_0x4e6994(0x1ec)],_0x3fe3f3[_0x4e6994(0x1e1)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x3fe3f3[_0x4e6994(0x1e1)]),'before':projectNotificationConfig(_0x3fe3f3['before']),'after':null,'dryRun':!![],'backend':{'method':_0x4e6994(0x1d0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4e6994(0x1e6),'lookupCommand':_0x2dd4df}},{'method':_0x4e6994(0x1d0),'url':DELETE_PATH});},async 'execute'(_0xc435f){const _0x8859dd=a193_0x3df647;requireNotificationExplicitYes(_0xc435f);const _0x2b5415=await prepareDelete(_0xc435f),_0x3e6ec1=notificationLookupCommand(_0xc435f[_0x8859dd(0x1ec)],_0x2b5415[_0x8859dd(0x1e1)]['channelType']);let _0x22ac07=![];try{await deleteNotificationChannelConfig(_0x2b5415['id'],_0xc435f[_0x8859dd(0x1ec)]);}catch(_0x1d4859){if(!isPlatformTransportFailure(_0x1d4859))throw safeApiFailure(_0x8859dd(0x1eb),'mutation',_0x8859dd(0x1de)+_0x3e6ec1+_0x8859dd(0x1ed));_0x22ac07=!![];}let _0x79981c;try{_0x79981c=await listNotificationChannelConfigs(_0xc435f['appCode'],_0x2b5415[_0x8859dd(0x1e1)][_0x8859dd(0x1ea)]),validateNotificationDeleteReadback(_0x79981c,_0xc435f[_0x8859dd(0x1ec)],_0x2b5415[_0x8859dd(0x1e1)][_0x8859dd(0x1ea)]);}catch{throw notificationError(_0x22ac07?'notification_config_delete_outcome_unknown':_0x8859dd(0x1df),'Notification\x20config\x20'+_0x2b5415['id']+_0x8859dd(0x1e7),_0x8859dd(0x1de)+_0x3e6ec1+_0x8859dd(0x1dc));}if(_0x79981c[_0x8859dd(0x1e5)](_0xbb9f40=>_0xbb9f40['id']===_0x2b5415['id']))throw notificationError(_0x22ac07?_0x8859dd(0x1d3):_0x8859dd(0x1e3),'Notification\x20config\x20'+_0x2b5415['id']+_0x8859dd(0x1e9),'Inspect\x20with\x20'+_0x3e6ec1+';\x20do\x20not\x20resubmit\x20automatically.');const _0x401956=[REFERENCE_WARNING];return _0x22ac07&&_0x401956['unshift'](_0x8859dd(0x1d2)),{'ok':!![],'data':{'operation':_0x8859dd(0x1eb),'selector':notificationSelector(_0x2b5415[_0x8859dd(0x1e1)]),'before':projectNotificationConfig(_0x2b5415[_0x8859dd(0x1e1)]),'after':null,'dryRun':![],'backend':{'method':_0x8859dd(0x1d0),'path':DELETE_PATH},'warnings':_0x401956,'verification':{'status':_0x8859dd(0x1cf),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x22ac07,'lookupCommand':_0x3e6ec1}},'message':_0x8859dd(0x1d6)+_0x2b5415['id']};}};
@@ -1 +1 @@
1
- const a194_0x2665d8=a194_0x49a3;function a194_0x49a3(_0x342abf,_0x72b832){_0x342abf=_0x342abf-0x165;const _0x2fce47=a194_0x2fce();let _0x49a384=_0x2fce47[_0x342abf];return _0x49a384;}(function(_0x1b2f01,_0x295665){const _0x349b66=a194_0x49a3,_0x1acbca=_0x1b2f01();while(!![]){try{const _0x3f65e7=parseInt(_0x349b66(0x178))/0x1*(parseInt(_0x349b66(0x17c))/0x2)+parseInt(_0x349b66(0x17a))/0x3*(-parseInt(_0x349b66(0x16a))/0x4)+parseInt(_0x349b66(0x16b))/0x5*(-parseInt(_0x349b66(0x17e))/0x6)+parseInt(_0x349b66(0x168))/0x7+parseInt(_0x349b66(0x16c))/0x8*(-parseInt(_0x349b66(0x177))/0x9)+-parseInt(_0x349b66(0x167))/0xa+parseInt(_0x349b66(0x170))/0xb;if(_0x3f65e7===_0x295665)break;else _0x1acbca['push'](_0x1acbca['shift']());}catch(_0x2d11f8){_0x1acbca['push'](_0x1acbca['shift']());}}}(a194_0x2fce,0x9dd6e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a194_0x2fce(){const _0x18a9e2=['trim','all','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','appCode','length','bool','477boifSn','7KRxZfr','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','9pCksKF','\x20notification\x20config(s)','185066HrIfoC','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','17526WzluKk','Found\x20','map','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','4809720CMlBKe','6166181kevaNN','type','1020716AuizzH','5ptDdMy','99832WAhKgP','Notification\x20channel\x20type','boolean','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','11315843CoMhVB'];a194_0x2fce=function(){return _0x18a9e2;};return a194_0x2fce();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':'config-list','description':a194_0x2665d8(0x166),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x2665d8(0x169),'type':'string','description':a194_0x2665d8(0x16d),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x2665d8(0x172),'type':a194_0x2665d8(0x16e),'default':![],'description':a194_0x2665d8(0x17d)}],async 'validate'(_0x5e318f){const _0x331ac4=a194_0x2665d8;if(_0x5e318f['bool'](_0x331ac4(0x172))&&_0x5e318f['str'](_0x331ac4(0x169))[_0x331ac4(0x171)]())throw CliErrors['validation'](_0x331ac4(0x173),_0x331ac4(0x16f));if(_0x5e318f[_0x331ac4(0x176)](_0x331ac4(0x172)))return;readNotificationChannelType(_0x5e318f);},async 'execute'(_0x5f5252){const _0x507cfa=a194_0x2665d8;if(_0x5f5252[_0x507cfa(0x176)](_0x507cfa(0x172))){const _0x5e26fb=await Promise[_0x507cfa(0x172)](NOTIFICATION_CHANNEL_TYPES[_0x507cfa(0x165)](_0x409708=>listNotificationChannelConfigs(_0x5f5252[_0x507cfa(0x174)],_0x409708))),_0x345544=_0x5e26fb['flat']()[_0x507cfa(0x165)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5f5252[_0x507cfa(0x174)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x345544[_0x507cfa(0x175)],'configs':_0x345544},'message':'Found\x20'+_0x345544[_0x507cfa(0x175)]+_0x507cfa(0x179)};}const _0xfecf2a=readNotificationChannelType(_0x5f5252),_0x1ee54b=await listNotificationChannelConfigs(_0x5f5252['appCode'],_0xfecf2a),_0x3d0d5c=_0x1ee54b[_0x507cfa(0x165)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5f5252[_0x507cfa(0x174)],'channelType':_0xfecf2a,'count':_0x3d0d5c[_0x507cfa(0x175)],'configs':_0x3d0d5c},'message':_0x507cfa(0x17f)+_0x3d0d5c[_0x507cfa(0x175)]+'\x20'+_0xfecf2a+_0x507cfa(0x17b)};}};
1
+ function a194_0x372e(_0x644eae,_0x125c7a){_0x644eae=_0x644eae-0x173;const _0x46003c=a194_0x4600();let _0x372e5e=_0x46003c[_0x644eae];return _0x372e5e;}const a194_0x4c469e=a194_0x372e;function a194_0x4600(){const _0x2cda5d=['Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','boolean','string','84707WFZfTI','config-list','notification','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','type','bool','8344vdgMga','1641576omsCrR','\x20notification\x20config(s)','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','length','3498030zBJRMf','map','472IWvKEg','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','11038878ZCpgXo','trim','453FeTjgL','4446492stQina','Found\x20','appCode','all','429114VfZFVg','str'];a194_0x4600=function(){return _0x2cda5d;};return a194_0x4600();}(function(_0xdb14b0,_0x2b39ec){const _0x1d9bb3=a194_0x372e,_0x5967f2=_0xdb14b0();while(!![]){try{const _0x4471bf=-parseInt(_0x1d9bb3(0x17b))/0x1+-parseInt(_0x1d9bb3(0x187))/0x2+parseInt(_0x1d9bb3(0x176))/0x3*(-parseInt(_0x1d9bb3(0x186))/0x4)+-parseInt(_0x1d9bb3(0x18b))/0x5+parseInt(_0x1d9bb3(0x177))/0x6+parseInt(_0x1d9bb3(0x180))/0x7*(parseInt(_0x1d9bb3(0x18d))/0x8)+parseInt(_0x1d9bb3(0x174))/0x9;if(_0x4471bf===_0x2b39ec)break;else _0x5967f2['push'](_0x5967f2['shift']());}catch(_0x285b66){_0x5967f2['push'](_0x5967f2['shift']());}}}(a194_0x4600,0x65d41));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x4c469e(0x182),'command':a194_0x4c469e(0x181),'description':a194_0x4c469e(0x183),'risk':a194_0x4c469e(0x18f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x4c469e(0x184),'type':a194_0x4c469e(0x17f),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x4c469e(0x17e),'default':![],'description':a194_0x4c469e(0x189)}],async 'validate'(_0x32047f){const _0x527c33=a194_0x4c469e;if(_0x32047f[_0x527c33(0x185)](_0x527c33(0x17a))&&_0x32047f[_0x527c33(0x17c)]('type')[_0x527c33(0x175)]())throw CliErrors['validation'](_0x527c33(0x173),_0x527c33(0x17d));if(_0x32047f[_0x527c33(0x185)](_0x527c33(0x17a)))return;readNotificationChannelType(_0x32047f);},async 'execute'(_0x2a4c0b){const _0x43068c=a194_0x4c469e;if(_0x2a4c0b['bool'](_0x43068c(0x17a))){const _0x1aac67=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x43068c(0x18c)](_0x4dee2e=>listNotificationChannelConfigs(_0x2a4c0b[_0x43068c(0x179)],_0x4dee2e))),_0x59527e=_0x1aac67['flat']()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a4c0b[_0x43068c(0x179)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x59527e[_0x43068c(0x18a)],'configs':_0x59527e},'message':'Found\x20'+_0x59527e[_0x43068c(0x18a)]+_0x43068c(0x18e)};}const _0x5a682f=readNotificationChannelType(_0x2a4c0b),_0x1e13bf=await listNotificationChannelConfigs(_0x2a4c0b[_0x43068c(0x179)],_0x5a682f),_0x5c7632=_0x1e13bf[_0x43068c(0x18c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a4c0b[_0x43068c(0x179)],'channelType':_0x5a682f,'count':_0x5c7632[_0x43068c(0x18a)],'configs':_0x5c7632},'message':_0x43068c(0x178)+_0x5c7632[_0x43068c(0x18a)]+'\x20'+_0x5a682f+_0x43068c(0x188)};}};
@@ -1 +1 @@
1
- function a195_0x4f2f(_0x11614c,_0x38ef58){_0x11614c=_0x11614c-0x1d7;const _0x1412cf=a195_0x1412();let _0x4f2fa7=_0x1412cf[_0x11614c];return _0x4f2fa7;}function a195_0x1412(){const _0x466ebb=['18nhqIJx','mutation','238562RbKeQC','\x20via\x20','appCode','5226UpFvQo','Inspect\x20with\x20--id\x20','4243294eynryw',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/update','payload','POST','Inspect\x20ID\x20','128429yPutyl','verified','Notification\x20config\x20','high-risk-write','planned','2132220MjWypQ','notification_config_update_verification_failed',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_update_outcome_unknown','before','patch','142327vgKPRE','10pBZfBD','333010UYizNP','verifiedFields','channelType','provesChange','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','8CGvyfa','update','notification_config_update_verification_unavailable','allMatch','9kPLRfT','notification','\x20with\x20'];a195_0x1412=function(){return _0x466ebb;};return a195_0x1412();}const a195_0x4d8736=a195_0x4f2f;(function(_0x1561ec,_0x24c254){const _0x7c4fa3=a195_0x4f2f,_0x34f4ea=_0x1561ec();while(!![]){try{const _0x199ed5=-parseInt(_0x7c4fa3(0x1dc))/0x1+-parseInt(_0x7c4fa3(0x1ec))/0x2*(parseInt(_0x7c4fa3(0x1e7))/0x3)+parseInt(_0x7c4fa3(0x1fc))/0x4+-parseInt(_0x7c4fa3(0x1dd))/0x5*(parseInt(_0x7c4fa3(0x1ef))/0x6)+parseInt(_0x7c4fa3(0x1f7))/0x7*(parseInt(_0x7c4fa3(0x1e3))/0x8)+-parseInt(_0x7c4fa3(0x1ea))/0x9*(parseInt(_0x7c4fa3(0x1de))/0xa)+parseInt(_0x7c4fa3(0x1f1))/0xb;if(_0x199ed5===_0x24c254)break;else _0x34f4ea['push'](_0x34f4ea['shift']());}catch(_0x1960a4){_0x34f4ea['push'](_0x34f4ea['shift']());}}}(a195_0x1412,0x5a002));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x4d8736(0x1f3);async function prepareUpdate(_0x27c91e){const _0x538bd0=a195_0x4d8736,_0x19656e=readNotificationId(_0x27c91e),_0x5cb3fd=await readNotificationDocument(_0x27c91e,_0x538bd0(0x1e4)),_0xc7f24=await requireExactNotificationConfig(_0x27c91e['appCode'],_0x19656e,_0x538bd0(0x1e4));return{'id':_0x19656e,'patch':_0x5cb3fd,'before':_0xc7f24,'payload':mergeUpdateInput(_0xc7f24,_0x5cb3fd),'planned':plannedUpdateProjection(_0xc7f24,_0x5cb3fd)};}export const notificationConfigUpdate={'service':a195_0x4d8736(0x1e8),'command':'config-update','description':a195_0x4d8736(0x1e2),'risk':a195_0x4d8736(0x1fa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5a4863){readNotificationId(_0x5a4863),assertSingleNotificationSource(_0x5a4863),requireNotificationExplicitYes(_0x5a4863);},async 'dryRun'(_0x46e8d8){const _0x1993d9=a195_0x4d8736,_0x54905e=await prepareUpdate(_0x46e8d8),_0x8e5c91=notificationLookupCommand(_0x46e8d8['appCode'],_0x54905e[_0x1993d9(0x1da)][_0x1993d9(0x1e0)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x54905e[_0x1993d9(0x1da)]),'before':projectNotificationConfig(_0x54905e[_0x1993d9(0x1da)]),'after':_0x54905e['planned'],'dryRun':!![],'backend':{'method':_0x1993d9(0x1f5),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1993d9(0x1fb),'lookupCommand':_0x8e5c91}},{'method':_0x1993d9(0x1f5),'url':UPDATE_PATH});},async 'execute'(_0x47e54c){const _0x137779=a195_0x4d8736;requireNotificationExplicitYes(_0x47e54c);const _0x282dc9=await prepareUpdate(_0x47e54c),_0x58c27e=notificationLookupCommand(_0x47e54c[_0x137779(0x1ee)],_0x282dc9[_0x137779(0x1da)]['channelType']);let _0x40e7a4=![];try{await updateNotificationChannelConfig(_0x282dc9[_0x137779(0x1f4)]);}catch(_0x596205){if(!isPlatformTransportFailure(_0x596205))throw safeApiFailure('update',_0x137779(0x1eb),_0x137779(0x1f6)+_0x282dc9['id']+_0x137779(0x1e9)+_0x58c27e+_0x137779(0x1d8));_0x40e7a4=!![];}let _0x34a920;try{const _0x1a1773=await getNotificationChannelConfig(_0x282dc9['id'],_0x47e54c[_0x137779(0x1ee)]);_0x34a920=normalizeExactNotificationConfig(_0x1a1773,_0x282dc9['id'],_0x47e54c['appCode']);}catch{throw notificationError(_0x40e7a4?_0x137779(0x1d9):_0x137779(0x1e5),_0x137779(0x1f9)+_0x282dc9['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x137779(0x1f0)+_0x282dc9['id']+_0x137779(0x1ed)+_0x58c27e+_0x137779(0x1f2));}const _0x10621d=requestedSafeFieldsMatch(_0x282dc9['before'],_0x34a920,_0x282dc9[_0x137779(0x1db)]);if(!_0x10621d[_0x137779(0x1e6)]||_0x40e7a4&&!_0x10621d[_0x137779(0x1e1)])throw notificationError(_0x40e7a4?_0x137779(0x1d9):_0x137779(0x1d7),_0x137779(0x1f9)+_0x282dc9['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x137779(0x1f0)+_0x282dc9['id']+'\x20via\x20'+_0x58c27e+_0x137779(0x1f2));const _0x253737=_0x40e7a4?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x137779(0x1e4),'selector':notificationSelector(_0x34a920),'before':projectNotificationConfig(_0x282dc9[_0x137779(0x1da)]),'after':projectNotificationConfig(_0x34a920),'dryRun':![],'backend':{'method':_0x137779(0x1f5),'path':UPDATE_PATH},'warnings':_0x253737,'verification':{'status':_0x137779(0x1f8),'recoveredAfterUnknownResponse':_0x40e7a4,'verifiedFields':_0x10621d[_0x137779(0x1df)],'lookupCommand':_0x58c27e}},'message':'Updated\x20notification\x20config\x20'+_0x34a920['id']};}};
1
+ const a195_0x398059=a195_0x6ebc;function a195_0x3ee1(){const _0xc6b99f=['notification_config_update_outcome_unknown','appCode','high-risk-write','verifiedFields','payload','1113375sXpfyQ','allMatch','planned','399606zXskbz','1154692ihJbEB','7479567FQKnbO','49iIXjNf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Updated\x20notification\x20config\x20','/notification/channel-config/update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_update_verification_unavailable','Inspect\x20with\x20--id\x20','1UZIljf','before','patch','update',';\x20do\x20not\x20resubmit\x20automatically.','config-update','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','195186FwtvDf','verified','\x20via\x20','\x20with\x20','POST','notification','provesChange','notification_config_update_verification_failed','365074HFJLvT','2504032eJfQeb','channelType'];a195_0x3ee1=function(){return _0xc6b99f;};return a195_0x3ee1();}function a195_0x6ebc(_0x3aee0f,_0x738eae){_0x3aee0f=_0x3aee0f-0x126;const _0x3ee18e=a195_0x3ee1();let _0x6ebc42=_0x3ee18e[_0x3aee0f];return _0x6ebc42;}(function(_0x417a95,_0xcd9ddb){const _0x3fb7df=a195_0x6ebc,_0x26494f=_0x417a95();while(!![]){try{const _0x195de8=parseInt(_0x3fb7df(0x13a))/0x1*(-parseInt(_0x3fb7df(0x14a))/0x2)+parseInt(_0x3fb7df(0x130))/0x3+parseInt(_0x3fb7df(0x131))/0x4+-parseInt(_0x3fb7df(0x12d))/0x5+-parseInt(_0x3fb7df(0x142))/0x6*(parseInt(_0x3fb7df(0x133))/0x7)+-parseInt(_0x3fb7df(0x126))/0x8+parseInt(_0x3fb7df(0x132))/0x9;if(_0x195de8===_0xcd9ddb)break;else _0x26494f['push'](_0x26494f['shift']());}catch(_0x482f32){_0x26494f['push'](_0x26494f['shift']());}}}(a195_0x3ee1,0x4af3d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x398059(0x136);async function prepareUpdate(_0x45c17b){const _0x1a0225=a195_0x398059,_0xe451a6=readNotificationId(_0x45c17b),_0x12a584=await readNotificationDocument(_0x45c17b,_0x1a0225(0x13d)),_0x37f0f8=await requireExactNotificationConfig(_0x45c17b[_0x1a0225(0x129)],_0xe451a6,_0x1a0225(0x13d));return{'id':_0xe451a6,'patch':_0x12a584,'before':_0x37f0f8,'payload':mergeUpdateInput(_0x37f0f8,_0x12a584),'planned':plannedUpdateProjection(_0x37f0f8,_0x12a584)};}export const notificationConfigUpdate={'service':a195_0x398059(0x147),'command':a195_0x398059(0x13f),'description':a195_0x398059(0x134),'risk':a195_0x398059(0x12a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x14ef75){readNotificationId(_0x14ef75),assertSingleNotificationSource(_0x14ef75),requireNotificationExplicitYes(_0x14ef75);},async 'dryRun'(_0x17a019){const _0x1af411=a195_0x398059,_0x4097b2=await prepareUpdate(_0x17a019),_0x56982b=notificationLookupCommand(_0x17a019['appCode'],_0x4097b2[_0x1af411(0x13b)][_0x1af411(0x127)]);return asDryRunResult({'operation':_0x1af411(0x13d),'selector':notificationSelector(_0x4097b2[_0x1af411(0x13b)]),'before':projectNotificationConfig(_0x4097b2[_0x1af411(0x13b)]),'after':_0x4097b2[_0x1af411(0x12f)],'dryRun':!![],'backend':{'method':_0x1af411(0x146),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1af411(0x12f),'lookupCommand':_0x56982b}},{'method':_0x1af411(0x146),'url':UPDATE_PATH});},async 'execute'(_0x220de1){const _0x311295=a195_0x398059;requireNotificationExplicitYes(_0x220de1);const _0x246eb7=await prepareUpdate(_0x220de1),_0x430430=notificationLookupCommand(_0x220de1[_0x311295(0x129)],_0x246eb7[_0x311295(0x13b)][_0x311295(0x127)]);let _0x1e800b=![];try{await updateNotificationChannelConfig(_0x246eb7[_0x311295(0x12c)]);}catch(_0xd7ad8e){if(!isPlatformTransportFailure(_0xd7ad8e))throw safeApiFailure(_0x311295(0x13d),'mutation','Inspect\x20ID\x20'+_0x246eb7['id']+_0x311295(0x145)+_0x430430+_0x311295(0x137));_0x1e800b=!![];}let _0x2f3ad7;try{const _0x44768d=await getNotificationChannelConfig(_0x246eb7['id'],_0x220de1[_0x311295(0x129)]);_0x2f3ad7=normalizeExactNotificationConfig(_0x44768d,_0x246eb7['id'],_0x220de1[_0x311295(0x129)]);}catch{throw notificationError(_0x1e800b?_0x311295(0x128):_0x311295(0x138),_0x311295(0x140)+_0x246eb7['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x311295(0x139)+_0x246eb7['id']+'\x20via\x20'+_0x430430+_0x311295(0x13e));}const _0x812f63=requestedSafeFieldsMatch(_0x246eb7[_0x311295(0x13b)],_0x2f3ad7,_0x246eb7[_0x311295(0x13c)]);if(!_0x812f63[_0x311295(0x12e)]||_0x1e800b&&!_0x812f63[_0x311295(0x148)])throw notificationError(_0x1e800b?'notification_config_update_outcome_unknown':_0x311295(0x149),_0x311295(0x140)+_0x246eb7['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x311295(0x139)+_0x246eb7['id']+_0x311295(0x144)+_0x430430+_0x311295(0x13e));const _0x547cb9=_0x1e800b?[_0x311295(0x141)]:[];return{'ok':!![],'data':{'operation':_0x311295(0x13d),'selector':notificationSelector(_0x2f3ad7),'before':projectNotificationConfig(_0x246eb7[_0x311295(0x13b)]),'after':projectNotificationConfig(_0x2f3ad7),'dryRun':![],'backend':{'method':_0x311295(0x146),'path':UPDATE_PATH},'warnings':_0x547cb9,'verification':{'status':_0x311295(0x143),'recoveredAfterUnknownResponse':_0x1e800b,'verifiedFields':_0x812f63[_0x311295(0x12b)],'lookupCommand':_0x430430}},'message':_0x311295(0x135)+_0x2f3ad7['id']};}};
@@ -1 +1 @@
1
- function a196_0x67b1(){const _0x1a18d5=['2515702varPyi','81NKxnQy','8TdCSfg','6tdIiLb','3322737LTANZk','436120vHJkSZ','1958316huzeEK','658366fbDSWQ','1wjcRdE','463108heRcbN','1415LEIsgP','5214CqlQYU'];a196_0x67b1=function(){return _0x1a18d5;};return a196_0x67b1();}(function(_0x4e8c55,_0x4304ba){const _0x2d31d8=a196_0x31db,_0x30e78a=_0x4e8c55();while(!![]){try{const _0x590cd4=parseInt(_0x2d31d8(0x11e))/0x1*(parseInt(_0x2d31d8(0x129))/0x2)+-parseInt(_0x2d31d8(0x125))/0x3*(parseInt(_0x2d31d8(0x11f))/0x4)+parseInt(_0x2d31d8(0x120))/0x5*(parseInt(_0x2d31d8(0x121))/0x6)+parseInt(_0x2d31d8(0x122))/0x7*(-parseInt(_0x2d31d8(0x124))/0x8)+-parseInt(_0x2d31d8(0x123))/0x9*(-parseInt(_0x2d31d8(0x127))/0xa)+-parseInt(_0x2d31d8(0x126))/0xb+parseInt(_0x2d31d8(0x128))/0xc;if(_0x590cd4===_0x4304ba)break;else _0x30e78a['push'](_0x30e78a['shift']());}catch(_0x57103a){_0x30e78a['push'](_0x30e78a['shift']());}}}(a196_0x67b1,0x3a0ec));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a196_0x31db(_0x45eb76,_0x409ae9){_0x45eb76=_0x45eb76-0x11e;const _0x67b18d=a196_0x67b1();let _0x31dba5=_0x67b18d[_0x45eb76];return _0x31dba5;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0xb6ffbb,_0x578cda){const _0x553c04=a196_0x2821,_0x25345b=_0xb6ffbb();while(!![]){try{const _0x591e98=-parseInt(_0x553c04(0x97))/0x1+-parseInt(_0x553c04(0x99))/0x2*(-parseInt(_0x553c04(0x9b))/0x3)+parseInt(_0x553c04(0x9c))/0x4*(parseInt(_0x553c04(0x9d))/0x5)+parseInt(_0x553c04(0x98))/0x6*(-parseInt(_0x553c04(0x94))/0x7)+parseInt(_0x553c04(0x9e))/0x8*(-parseInt(_0x553c04(0x9a))/0x9)+parseInt(_0x553c04(0x95))/0xa*(-parseInt(_0x553c04(0x92))/0xb)+-parseInt(_0x553c04(0x93))/0xc*(-parseInt(_0x553c04(0x96))/0xd);if(_0x591e98===_0x578cda)break;else _0x25345b['push'](_0x25345b['shift']());}catch(_0x2c1daa){_0x25345b['push'](_0x25345b['shift']());}}}(a196_0x37f1,0xc96d7));function a196_0x37f1(){const _0x2e525e=['2631672DZBgac','11hAYVaE','120AtVhYV','321069vDFJrL','9304030WxdPEG','1118221YpEMWc','1208854fDSoPl','48svVJQA','158iMXFPR','18nrJLXy','58521ENfqhj','4VRBywH','7939675Vzzxdh'];a196_0x37f1=function(){return _0x2e525e;};return a196_0x37f1();}import{notificationConfigList}from'../../commands/notification/config-list.js';function a196_0x2821(_0x5d5b78,_0x2ef7aa){_0x5d5b78=_0x5d5b78-0x92;const _0x37f1dc=a196_0x37f1();let _0x282112=_0x37f1dc[_0x5d5b78];return _0x282112;}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a197_0x486777=a197_0x2b62;(function(_0x121134,_0xbbeef3){const _0x16bad9=a197_0x2b62,_0x29a295=_0x121134();while(!![]){try{const _0xbbcd63=-parseInt(_0x16bad9(0x1d3))/0x1+parseInt(_0x16bad9(0x1d5))/0x2*(-parseInt(_0x16bad9(0x1be))/0x3)+parseInt(_0x16bad9(0x1b1))/0x4+-parseInt(_0x16bad9(0x1de))/0x5+parseInt(_0x16bad9(0x1b4))/0x6+-parseInt(_0x16bad9(0x203))/0x7+-parseInt(_0x16bad9(0x216))/0x8*(-parseInt(_0x16bad9(0x1b8))/0x9);if(_0xbbcd63===_0xbbeef3)break;else _0x29a295['push'](_0x29a295['shift']());}catch(_0x1b4ade){_0x29a295['push'](_0x29a295['shift']());}}}(a197_0x1bd4,0x70849));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a197_0x486777(0x1f6),'WECOM',a197_0x486777(0x1e3)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a197_0x486777(0x217),'endpointUrl',a197_0x486777(0x1ca),a197_0x486777(0x201),a197_0x486777(0x20e),a197_0x486777(0x1bb)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x486777(0x1af),'configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x486777(0x1f9),a197_0x486777(0x1a7),a197_0x486777(0x1ee),a197_0x486777(0x1ba),'replyTo','subjectPrefix',a197_0x486777(0x21a),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x486777(0x1c8),'type':a197_0x486777(0x1d9),'required':![],'description':a197_0x486777(0x1b2)},{'name':a197_0x486777(0x219),'type':a197_0x486777(0x1f2),'required':![],'default':![],'description':a197_0x486777(0x1fd)},{'name':a197_0x486777(0x1a4),'type':a197_0x486777(0x1d9),'required':![],'description':a197_0x486777(0x1ab)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3f3527,_0x409fb9,_0xe550b5){return new CliError(_0x3f3527,0x1,_0x409fb9,_0xe550b5);}export function readNotificationId(_0x3f8a77){const _0x2134b0=a197_0x486777,_0x1df013=_0x3f8a77[_0x2134b0(0x213)]('id');if(!Number[_0x2134b0(0x1db)](_0x1df013)||_0x1df013<=0x0)throw notificationError(_0x2134b0(0x209),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x1df013;}export function requireNotificationExplicitYes(_0xe09f0c){const _0x35569f=a197_0x486777;if(_0xe09f0c[_0x35569f(0x211)](_0x35569f(0x21b))||_0xe09f0c[_0x35569f(0x211)](_0x35569f(0x1c5)))return;throw notificationError('notification_config_confirmation_required','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x35569f(0x1d1));}export function readNotificationChannelType(_0x17c151,_0x179c31=a197_0x486777(0x1c7),_0x2d7887=a197_0x486777(0x1a9)){const _0x1a1074=a197_0x486777,_0x21aaf1=_0x17c151[_0x1a1074(0x1f3)](_0x179c31)['trim']()||_0x2d7887;if(!NOTIFICATION_CHANNEL_TYPES[_0x1a1074(0x1f4)](_0x21aaf1))throw CliErrors[_0x1a1074(0x208)](_0x1a1074(0x1d7)+_0x179c31+':\x20'+_0x21aaf1,_0x1a1074(0x1a0)+NOTIFICATION_CHANNEL_TYPES[_0x1a1074(0x1e5)](',\x20')+'.');return _0x21aaf1;}export function assertSingleNotificationSource(_0x589bed){const _0x457a53=a197_0x486777,_0x950b56=[],_0xedfb28=_0x589bed[_0x457a53(0x1f3)]('file')[_0x457a53(0x218)]();if(_0xedfb28)_0x950b56[_0x457a53(0x21e)]({'kind':'file','path':_0xedfb28});if(_0x589bed[_0x457a53(0x211)](_0x457a53(0x219)))_0x950b56[_0x457a53(0x21e)]({'kind':'stdin'});const _0x40e459=_0x589bed[_0x457a53(0x1f3)](_0x457a53(0x1a4))['trim']();if(_0x40e459)_0x950b56[_0x457a53(0x21e)]({'kind':_0x457a53(0x1b7),'name':_0x40e459});if(_0x950b56[_0x457a53(0x1bd)]===0x0)throw CliErrors[_0x457a53(0x208)](_0x457a53(0x1b5),_0x457a53(0x1fe));if(_0x950b56['length']>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x457a53(0x1fe));return _0x950b56[0x0];}function a197_0x2b62(_0x555876,_0x120faa){_0x555876=_0x555876-0x1a0;const _0x1bd49e=a197_0x1bd4();let _0x2b6229=_0x1bd49e[_0x555876];return _0x2b6229;}export async function readNotificationDocument(_0xcf5f5c,_0x2b7b95){const _0x4d7838=a197_0x486777,_0x563799=assertSingleNotificationSource(_0xcf5f5c),_0x5cd193=_0x563799[_0x4d7838(0x1bf)]==='file'?_0x4d7838(0x1a8)+_0x563799[_0x4d7838(0x1ce)]:_0x563799[_0x4d7838(0x1bf)]==='env'?_0x4d7838(0x202)+_0x563799[_0x4d7838(0x215)]:_0x4d7838(0x219);let _0x214195;try{if(_0x563799['kind']===_0x4d7838(0x1c8))_0x214195=await readFile(_0x563799[_0x4d7838(0x1ce)],_0x4d7838(0x1e4));else{if(_0x563799[_0x4d7838(0x1bf)]===_0x4d7838(0x1b7)){if(!(_0x563799[_0x4d7838(0x215)]in process.env))throw notificationError(_0x4d7838(0x1fc),_0x4d7838(0x1b0)+_0x563799[_0x4d7838(0x215)]);_0x214195=process.env[_0x563799.name]??'';}else _0x214195=await readStdin();}}catch(_0xd5e3d4){if(_0xd5e3d4 instanceof CliError)throw _0xd5e3d4;throw notificationError('notification_config_source_unavailable','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x5cd193+'.');}let _0x7b5253;try{_0x7b5253=JSON['parse'](_0x214195);}catch{throw notificationError(_0x4d7838(0x1c4),'Notification\x20JSON\x20from\x20'+_0x5cd193+_0x4d7838(0x1e0),_0x4d7838(0x1e6));}if(!isJsonObject(_0x7b5253))throw notificationError(_0x4d7838(0x1c4),'Notification\x20JSON\x20from\x20'+_0x5cd193+_0x4d7838(0x1f1));return validateNotificationDocument(_0x7b5253,_0x2b7b95);}export function projectNotificationListConfig(_0x23f115,_0x11a0d1){const _0x278fa9=a197_0x486777;return{'id':typeof _0x23f115['id']===_0x278fa9(0x204)?_0x23f115['id']:null,'configCode':requireResponseString(_0x23f115['configCode'],_0x278fa9(0x1ad),_0x11a0d1),'configName':requireResponseString(_0x23f115['configName'],_0x278fa9(0x1d2),_0x11a0d1),'channelType':requireResponseString(_0x23f115[_0x278fa9(0x217)],_0x278fa9(0x217),_0x11a0d1),'description':normalizeNullableString(_0x23f115[_0x278fa9(0x201)]),'createTime':normalizeNullableString(_0x23f115[_0x278fa9(0x1f8)]),'updateTime':normalizeNullableString(_0x23f115[_0x278fa9(0x1d4)])};}export function normalizeExactNotificationConfig(_0x5c0bb9,_0x46f40a,_0x575346){const _0x32c2f2=a197_0x486777;if(!Number[_0x32c2f2(0x1db)](_0x5c0bb9['id'])||_0x5c0bb9['id']!==_0x46f40a)throw notificationError(_0x32c2f2(0x1c3),_0x32c2f2(0x1e7)+_0x46f40a+'.');if(_0x5c0bb9[_0x32c2f2(0x1af)]!==_0x575346)throw notificationError(_0x32c2f2(0x1c3),'Notification\x20config\x20'+_0x46f40a+_0x32c2f2(0x1ea));const _0x2df053=requireExactString(_0x5c0bb9[_0x32c2f2(0x1d2)],'configName',_0x46f40a),_0x5a2622=requireExactString(_0x5c0bb9[_0x32c2f2(0x1ad)],_0x32c2f2(0x1ad),_0x46f40a),_0x2e949b=requireExactString(_0x5c0bb9[_0x32c2f2(0x217)],_0x32c2f2(0x217),_0x46f40a);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2e949b))throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x46f40a+_0x32c2f2(0x21f));const _0x3e98b6=responseNullableString(_0x5c0bb9[_0x32c2f2(0x200)],_0x32c2f2(0x200),_0x46f40a),_0x5b6653=responseNullableString(_0x5c0bb9[_0x32c2f2(0x1ca)],'channelConfig',_0x46f40a),_0xb12ef1=responseNullableString(_0x5c0bb9[_0x32c2f2(0x201)],_0x32c2f2(0x201),_0x46f40a),_0x3ca85f=responseNullableTimeout(_0x5c0bb9[_0x32c2f2(0x20e)],_0x32c2f2(0x20e),_0x46f40a),_0x1e961d=responseNullableTimeout(_0x5c0bb9[_0x32c2f2(0x1bb)],_0x32c2f2(0x1bb),_0x46f40a);return{'id':_0x46f40a,'appCode':_0x575346,'configCode':_0x5a2622,'configName':_0x2df053,'channelType':_0x2e949b,'endpointUrl':redactSensitive(_0x3e98b6),'channelConfig':redactSensitive(_0x5b6653),'description':_0xb12ef1,'connectTimeout':_0x3ca85f,'readTimeout':_0x1e961d,'endpointUrlRaw':_0x3e98b6,'channelConfigRaw':_0x5b6653};}export async function requireExactNotificationConfig(_0x5889bb,_0x4d9229,_0x1acc1a){const _0x5b69b5=a197_0x486777;let _0xdbcbe5;try{_0xdbcbe5=await getNotificationChannelConfig(_0x4d9229,_0x5889bb);}catch{throw safeApiFailure(_0x1acc1a,'preflight',_0x5b69b5(0x1dd)+_0x5889bb+_0x5b69b5(0x1c0));}return normalizeExactNotificationConfig(_0xdbcbe5,_0x4d9229,_0x5889bb);}export function projectNotificationConfig(_0x238667){const _0x33bd72=a197_0x486777;return{'id':_0x238667['id']??null,'appCode':_0x238667[_0x33bd72(0x1af)],'configCode':_0x238667[_0x33bd72(0x1ad)]??null,'configName':_0x238667['configName'],'channelType':_0x238667[_0x33bd72(0x217)],'endpointUrl':redactSensitive(_0x238667[_0x33bd72(0x200)]),'channelConfig':redactSensitive(_0x238667[_0x33bd72(0x1ca)]),'description':_0x238667['description']??null,'connectTimeout':_0x238667[_0x33bd72(0x20e)]??null,'readTimeout':_0x238667[_0x33bd72(0x1bb)]??null};}export function notificationSelector(_0x69bd57){const _0x517815=a197_0x486777;return{'appCode':_0x69bd57[_0x517815(0x1af)],'id':_0x69bd57['id'],'configCode':_0x69bd57[_0x517815(0x1ad)],'configName':_0x69bd57[_0x517815(0x1d2)],'channelType':_0x69bd57['channelType']};}export function createMutationInput(_0x2cb5cb,_0x35b003){const _0x47c012=a197_0x486777;return{'appCode':_0x2cb5cb,'configName':_0x35b003[_0x47c012(0x1d2)],'channelType':_0x35b003[_0x47c012(0x217)],...hasOwn(_0x35b003,_0x47c012(0x200))?{'endpointUrl':_0x35b003['endpointUrl']}:{},...hasOwn(_0x35b003,_0x47c012(0x1ca))?{'channelConfig':serializeChannelConfig(_0x35b003[_0x47c012(0x1ca)])}:{},...hasOwn(_0x35b003,'description')?{'description':_0x35b003[_0x47c012(0x201)]}:{},...hasOwn(_0x35b003,_0x47c012(0x20e))?{'connectTimeout':_0x35b003['connectTimeout']}:{},...hasOwn(_0x35b003,'readTimeout')?{'readTimeout':_0x35b003[_0x47c012(0x1bb)]}:{}};}export function mergeUpdateInput(_0x2419b8,_0x170dff){const _0x529a28=a197_0x486777;return{'id':_0x2419b8['id'],'appCode':_0x2419b8['appCode'],'configName':_0x170dff[_0x529a28(0x1d2)]??_0x2419b8['configName'],'channelType':_0x170dff[_0x529a28(0x217)]??_0x2419b8[_0x529a28(0x217)],'endpointUrl':hasOwn(_0x170dff,_0x529a28(0x200))?_0x170dff[_0x529a28(0x200)]:_0x2419b8[_0x529a28(0x1d0)],'channelConfig':hasOwn(_0x170dff,_0x529a28(0x1ca))?serializeChannelConfig(_0x170dff[_0x529a28(0x1ca)]):_0x2419b8[_0x529a28(0x1da)],'description':hasOwn(_0x170dff,_0x529a28(0x201))?_0x170dff[_0x529a28(0x201)]:_0x2419b8[_0x529a28(0x201)],'connectTimeout':hasOwn(_0x170dff,'connectTimeout')?_0x170dff[_0x529a28(0x20e)]:_0x2419b8[_0x529a28(0x20e)],'readTimeout':hasOwn(_0x170dff,_0x529a28(0x1bb))?_0x170dff['readTimeout']:_0x2419b8['readTimeout']};}export function plannedUpdateProjection(_0x4fdf46,_0x45747a){const _0x3a63d7=a197_0x486777;return projectNotificationConfig({'id':_0x4fdf46['id'],'appCode':_0x4fdf46['appCode'],'configCode':_0x4fdf46['configCode'],'configName':_0x45747a['configName']??_0x4fdf46[_0x3a63d7(0x1d2)],'channelType':_0x45747a[_0x3a63d7(0x217)]??_0x4fdf46[_0x3a63d7(0x217)],'endpointUrl':hasOwn(_0x45747a,_0x3a63d7(0x200))?_0x45747a['endpointUrl']:_0x4fdf46[_0x3a63d7(0x1d0)],'channelConfig':hasOwn(_0x45747a,_0x3a63d7(0x1ca))?_0x45747a['channelConfig']:_0x4fdf46[_0x3a63d7(0x1da)],'description':hasOwn(_0x45747a,_0x3a63d7(0x201))?_0x45747a[_0x3a63d7(0x201)]:_0x4fdf46[_0x3a63d7(0x201)],'connectTimeout':hasOwn(_0x45747a,_0x3a63d7(0x20e))?_0x45747a[_0x3a63d7(0x20e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4fdf46[_0x3a63d7(0x20e)],'readTimeout':hasOwn(_0x45747a,_0x3a63d7(0x1bb))?_0x45747a[_0x3a63d7(0x1bb)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4fdf46[_0x3a63d7(0x1bb)]});}export function requestedSafeFieldsMatch(_0x4764c3,_0x3370a5,_0xda619d){const _0x4205cc=a197_0x486777,_0x5820c2=[],_0x4a9d2c=[],_0x125cf8=[];for(const _0x315b72 of[_0x4205cc(0x1d2),_0x4205cc(0x217),_0x4205cc(0x201)]){if(!hasOwn(_0xda619d,_0x315b72))continue;_0x125cf8['push'](_0x315b72),_0x5820c2[_0x4205cc(0x21e)](_0x3370a5[_0x315b72]===_0xda619d[_0x315b72]),_0x4a9d2c[_0x4205cc(0x21e)](_0x4764c3[_0x315b72]!==_0xda619d[_0x315b72]&&_0x3370a5[_0x315b72]===_0xda619d[_0x315b72]);}for(const _0x191f46 of[_0x4205cc(0x20e),_0x4205cc(0x1bb)]){if(!hasOwn(_0xda619d,_0x191f46))continue;const _0x107f62=_0xda619d[_0x191f46]??(_0x191f46===_0x4205cc(0x20e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x125cf8[_0x4205cc(0x21e)](_0x191f46),_0x5820c2['push'](_0x3370a5[_0x191f46]===_0x107f62),_0x4a9d2c[_0x4205cc(0x21e)](_0x4764c3[_0x191f46]!==_0x107f62&&_0x3370a5[_0x191f46]===_0x107f62);}return hasOwn(_0xda619d,_0x4205cc(0x200))&&_0xda619d[_0x4205cc(0x200)]===null&&(_0x125cf8['push'](_0x4205cc(0x1ed)),_0x5820c2[_0x4205cc(0x21e)](_0x3370a5[_0x4205cc(0x1d0)]===null||_0x3370a5[_0x4205cc(0x1d0)]===''),_0x4a9d2c[_0x4205cc(0x21e)](_0x4764c3[_0x4205cc(0x1d0)]!==null&&_0x4764c3[_0x4205cc(0x1d0)]!==''&&(_0x3370a5[_0x4205cc(0x1d0)]===null||_0x3370a5[_0x4205cc(0x1d0)]===''))),{'allMatch':_0x5820c2[_0x4205cc(0x1a3)](Boolean),'provesChange':_0x4a9d2c['some'](Boolean),'verifiedFields':_0x125cf8};}export function validateNotificationDeleteReadback(_0x199e6b,_0x270414,_0x281979){const _0x2f05da=a197_0x486777;for(const [_0x49a439,_0x82824e]of _0x199e6b['entries']()){if(!Number[_0x2f05da(0x1db)](_0x82824e['id'])||_0x82824e['id']<=0x0)throw notificationError(_0x2f05da(0x1c3),_0x2f05da(0x1dc)+(_0x49a439+0x1)+_0x2f05da(0x1fa));if(_0x82824e[_0x2f05da(0x1af)]!==_0x270414)throw notificationError('notification_config_response_invalid',_0x2f05da(0x1dc)+(_0x49a439+0x1)+_0x2f05da(0x222));if(_0x82824e[_0x2f05da(0x217)]!==_0x281979)throw notificationError(_0x2f05da(0x1c3),'Notification\x20config\x20list\x20item\x20'+(_0x49a439+0x1)+_0x2f05da(0x210));}}function a197_0x1bd4(){const _0x2c02e5=['\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','recipients','file\x20','EMAIL','Notification\x20JSON\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','configCode','apiError','appCode','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','3045204yafAlj','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','object','2155008eeoUbF','Missing\x20notification\x20JSON\x20source.','stringify','env','153pxRkVA','setEncoding','bccList','readTimeout','<redacted>','length','3IzBuNg','kind','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','a\x20supported\x20string','Notification\x20config\x20','notification_config_response_invalid','notification_config_json_invalid','yes','notification_config_','type','file','_unavailable','channelConfig','\x22\x20must\x20be\x20','Create\x20JSON\x20requires\x20field\x20','a\x20string\x20or\x20null','path','messageTemplate','endpointUrlRaw','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','configName','47178NEUVZz','updateTime','1680054qhMTwT','create','Invalid\x20--','call','string','channelConfigRaw','isSafeInteger','Notification\x20config\x20list\x20item\x20','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','3806310vtbwJw','a\x20non-empty\x20string','\x20is\x20invalid.','\x22channelType\x22.','\x20--format\x20compress','WEBHOOK','utf8','join','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','has','\x22\x20is\x20forbidden.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','update','\x20characters.','endpointUrl:null','ccList','keys','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','boolean','str','includes','mutation','DINGTALK','prototype','createTime','emailTargets','\x20has\x20an\x20invalid\x20id.','Unknown\x20notification\x20JSON\x20field\x20\x22','notification_config_source_unavailable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','endpointUrl','description','environment\x20variable\x20','1531068VxrYlW','number','notification_config_field_invalid','notification_config_field_forbidden','hasOwnProperty','validation','notification_config_id_invalid','\x22\x20cannot\x20exceed\x20','notification_config_channel_field_forbidden','\x20--type\x20','\x22configName\x22.','connectTimeout','\x20failed.','\x20has\x20an\x20invalid\x20channelType.','bool','Notification\x20JSON\x20channelConfig\x20field\x20\x22','num','isArray','name','568280nLBaVi','channelType','trim','stdin','fromName','dry-run','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_required','push','\x20has\x20an\x20unsupported\x20channelType.','notification_config_update_empty','\x20has\x20invalid\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','Allowed\x20values:\x20','a\x20JSON\x20object','notification_config_field_unknown','every','from-env','\x22\x20must\x20be\x20a\x20non-empty\x20string.'];a197_0x1bd4=function(){return _0x2c02e5;};return a197_0x1bd4();}export function safeApiFailure(_0x50255c,_0x45b446,_0x29ffa0){const _0x1aaf09=a197_0x486777;return notificationError(_0x1aaf09(0x1c6)+_0x50255c+'_'+(_0x45b446===_0x1aaf09(0x1f5)?'failed':_0x45b446+_0x1aaf09(0x1c9)),_0x1aaf09(0x1c2)+_0x50255c+'\x20'+_0x45b446+_0x1aaf09(0x20f),_0x29ffa0);}export function notificationLookupCommand(_0x5cfa01,_0x46b474){const _0x38267e=a197_0x486777;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x5cfa01+_0x38267e(0x20c)+_0x46b474+_0x38267e(0x1e2);}function validateNotificationDocument(_0x5013f4,_0x4089f1){const _0x28a3a8=a197_0x486777;for(const _0x48e4d6 of Object[_0x28a3a8(0x1ef)](_0x5013f4)){if(FORBIDDEN_IDENTITY_FIELDS[_0x28a3a8(0x1e8)](_0x48e4d6))throw notificationError(_0x28a3a8(0x206),_0x28a3a8(0x1aa)+_0x48e4d6+_0x28a3a8(0x1a6));if(!ALLOWED_INPUT_FIELDS[_0x28a3a8(0x1e8)](_0x48e4d6))throw notificationError(_0x28a3a8(0x1a2),_0x28a3a8(0x1fb)+_0x48e4d6+'\x22.');}if(_0x4089f1===_0x28a3a8(0x1eb)&&Object['keys'](_0x5013f4)[_0x28a3a8(0x1bd)]===0x0)throw notificationError(_0x28a3a8(0x220),_0x28a3a8(0x21c));const _0x1d1a47={};if(hasOwn(_0x5013f4,'configName'))_0x1d1a47[_0x28a3a8(0x1d2)]=validateRequiredString(_0x5013f4[_0x28a3a8(0x1d2)],_0x28a3a8(0x1d2),0x80);else{if(_0x4089f1===_0x28a3a8(0x1d6))throw notificationError(_0x28a3a8(0x21d),_0x28a3a8(0x1cc)+_0x28a3a8(0x20d));}if(hasOwn(_0x5013f4,_0x28a3a8(0x217))){if(typeof _0x5013f4['channelType']!==_0x28a3a8(0x1d9))throw invalidFieldType(_0x28a3a8(0x217),_0x28a3a8(0x1c1));const _0x47fb3e=_0x5013f4[_0x28a3a8(0x217)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x28a3a8(0x1f4)](_0x47fb3e))throw notificationError(_0x28a3a8(0x205),_0x28a3a8(0x1ac),_0x28a3a8(0x1a0)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x1d1a47[_0x28a3a8(0x217)]=_0x47fb3e;}else{if(_0x4089f1===_0x28a3a8(0x1d6))throw notificationError(_0x28a3a8(0x21d),'Create\x20JSON\x20requires\x20field\x20'+_0x28a3a8(0x1e1));}for(const [_0x1d7578,_0x3297b7]of[[_0x28a3a8(0x200),0x200],[_0x28a3a8(0x201),0x100]]){if(!hasOwn(_0x5013f4,_0x1d7578))continue;const _0xa53e8f=_0x5013f4[_0x1d7578];if(_0xa53e8f!==null&&typeof _0xa53e8f!==_0x28a3a8(0x1d9))throw invalidFieldType(_0x1d7578,_0x28a3a8(0x1cd));if(typeof _0xa53e8f===_0x28a3a8(0x1d9)&&_0xa53e8f[_0x28a3a8(0x1bd)]>_0x3297b7)throw notificationError(_0x28a3a8(0x205),_0x28a3a8(0x1aa)+_0x1d7578+_0x28a3a8(0x20a)+_0x3297b7+_0x28a3a8(0x1ec));_0x1d1a47[_0x1d7578]=_0xa53e8f;}if(hasOwn(_0x5013f4,_0x28a3a8(0x1ca))){const _0x3641c3=_0x5013f4[_0x28a3a8(0x1ca)];if(_0x3641c3===null&&_0x4089f1===_0x28a3a8(0x1d6))throw invalidFieldType(_0x28a3a8(0x1ca),_0x28a3a8(0x1a1));if(_0x3641c3!==null&&!isJsonObject(_0x3641c3))throw invalidFieldType(_0x28a3a8(0x1ca),_0x4089f1===_0x28a3a8(0x1eb)?'a\x20JSON\x20object\x20or\x20null':'a\x20JSON\x20object');_0x3641c3!==null&&validateChannelConfigFields(_0x1d1a47[_0x28a3a8(0x217)],_0x3641c3),_0x1d1a47[_0x28a3a8(0x1ca)]=_0x3641c3;}for(const _0x474852 of[_0x28a3a8(0x20e),_0x28a3a8(0x1bb)]){if(!hasOwn(_0x5013f4,_0x474852))continue;const _0x91de13=_0x5013f4[_0x474852];if(_0x91de13!==null&&(!Number['isSafeInteger'](_0x91de13)||_0x91de13<0x0))throw notificationError(_0x28a3a8(0x205),_0x28a3a8(0x1aa)+_0x474852+_0x28a3a8(0x1ff));_0x1d1a47[_0x474852]=_0x91de13;}return _0x1d1a47;}function validateRequiredString(_0x184984,_0x16b038,_0xb6c6c5){const _0x90c380=a197_0x486777;if(typeof _0x184984!==_0x90c380(0x1d9))throw invalidFieldType(_0x16b038,_0x90c380(0x1df));const _0x509703=_0x184984[_0x90c380(0x218)]();if(!_0x509703)throw notificationError(_0x90c380(0x205),_0x90c380(0x1aa)+_0x16b038+_0x90c380(0x1a5));if(_0x509703['length']>_0xb6c6c5)throw notificationError('notification_config_field_invalid',_0x90c380(0x1aa)+_0x16b038+'\x22\x20cannot\x20exceed\x20'+_0xb6c6c5+_0x90c380(0x1ec));return _0x509703;}function validateChannelConfigFields(_0x3b4fc0,_0x519b89){const _0x24d5a9=a197_0x486777;if(hasOwn(_0x519b89,_0x24d5a9(0x1cf)))throw forbiddenChannelConfigField('messageTemplate');if(_0x3b4fc0==='EMAIL')for(const _0xd5bdfd of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x519b89,_0xd5bdfd))throw forbiddenChannelConfigField(_0xd5bdfd);}}function forbiddenChannelConfigField(_0x31bd83){const _0x27188f=a197_0x486777;return notificationError(_0x27188f(0x20b),_0x27188f(0x212)+_0x31bd83+_0x27188f(0x1e9));}function invalidFieldType(_0x5a5d1a,_0x10bcdd){const _0x59b024=a197_0x486777;return notificationError(_0x59b024(0x205),_0x59b024(0x1aa)+_0x5a5d1a+_0x59b024(0x1cb)+_0x10bcdd+'.');}function serializeChannelConfig(_0x1718de){const _0xb908b9=a197_0x486777;return _0x1718de===null||_0x1718de===undefined?null:JSON[_0xb908b9(0x1b6)](_0x1718de);}function redactSensitive(_0x296579){const _0x424b03=a197_0x486777;return _0x296579===null||_0x296579===undefined||_0x296579===''?null:_0x424b03(0x1bc);}function requireResponseString(_0x3a7a0b,_0x472dbf,_0x3ea233){const _0x38b4ef=a197_0x486777;if(typeof _0x3a7a0b!==_0x38b4ef(0x1d9)||_0x3a7a0b[_0x38b4ef(0x218)]()==='')throw CliErrors[_0x38b4ef(0x1ae)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x3ea233+0x1)+_0x38b4ef(0x1f0)+_0x472dbf+'\x22.');return _0x3a7a0b['trim']();}function requireExactString(_0x4e6b28,_0xddd6ce,_0x12343f){const _0x598d01=a197_0x486777;if(typeof _0x4e6b28!==_0x598d01(0x1d9)||_0x4e6b28['trim']()==='')throw notificationError(_0x598d01(0x1c3),'Notification\x20config\x20'+_0x12343f+_0x598d01(0x1f0)+_0xddd6ce+'\x22.');return _0x4e6b28[_0x598d01(0x218)]();}function responseNullableString(_0x590bf7,_0x143a31,_0x3ad1ce){const _0x30d7c3=a197_0x486777;if(_0x590bf7===undefined||_0x590bf7===null)return null;if(typeof _0x590bf7!==_0x30d7c3(0x1d9))throw notificationError(_0x30d7c3(0x1c3),_0x30d7c3(0x1c2)+_0x3ad1ce+_0x30d7c3(0x221)+_0x143a31+'\x22.');return _0x590bf7;}function responseNullableTimeout(_0x25ad7,_0x27f0c4,_0x1d57ba){const _0x33bbdc=a197_0x486777;if(_0x25ad7===undefined||_0x25ad7===null)return null;if(!Number[_0x33bbdc(0x1db)](_0x25ad7)||_0x25ad7<0x0)throw notificationError(_0x33bbdc(0x1c3),_0x33bbdc(0x1c2)+_0x1d57ba+_0x33bbdc(0x221)+_0x27f0c4+'\x22.');return _0x25ad7;}function normalizeNullableString(_0x5c5162){return typeof _0x5c5162==='string'?_0x5c5162:null;}function isJsonObject(_0x30628c){const _0x32284d=a197_0x486777;return _0x30628c!==null&&typeof _0x30628c===_0x32284d(0x1b3)&&!Array[_0x32284d(0x214)](_0x30628c);}function hasOwn(_0x33cf09,_0x181b3a){const _0x4633e0=a197_0x486777;return Object[_0x4633e0(0x1f7)][_0x4633e0(0x207)][_0x4633e0(0x1d8)](_0x33cf09,_0x181b3a);}async function readStdin(){const _0x1310b9=a197_0x486777;let _0x1ecc3b='';process[_0x1310b9(0x219)][_0x1310b9(0x1b9)](_0x1310b9(0x1e4));for await(const _0x4fb393 of process[_0x1310b9(0x219)])_0x1ecc3b+=_0x4fb393;return _0x1ecc3b;}
1
+ const a197_0x9e5f21=a197_0x17a4;(function(_0x5b8ed1,_0x45ca63){const _0x328567=a197_0x17a4,_0x43730f=_0x5b8ed1();while(!![]){try{const _0x3101b2=parseInt(_0x328567(0x206))/0x1+-parseInt(_0x328567(0x217))/0x2*(parseInt(_0x328567(0x1c5))/0x3)+-parseInt(_0x328567(0x1d0))/0x4*(-parseInt(_0x328567(0x1e9))/0x5)+-parseInt(_0x328567(0x1e5))/0x6+parseInt(_0x328567(0x1cb))/0x7*(-parseInt(_0x328567(0x1e0))/0x8)+parseInt(_0x328567(0x1ae))/0x9*(parseInt(_0x328567(0x1fd))/0xa)+-parseInt(_0x328567(0x1be))/0xb*(parseInt(_0x328567(0x204))/0xc);if(_0x3101b2===_0x45ca63)break;else _0x43730f['push'](_0x43730f['shift']());}catch(_0x396060){_0x43730f['push'](_0x43730f['shift']());}}}(a197_0xd86e,0x1c4ef));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x9e5f21(0x1ba),a197_0x9e5f21(0x1f3),a197_0x9e5f21(0x214),a197_0x9e5f21(0x1d8),a197_0x9e5f21(0x1e8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x9e5f21(0x1f5),a197_0x9e5f21(0x1e6),a197_0x9e5f21(0x1f0),a197_0x9e5f21(0x1d4),a197_0x9e5f21(0x1b5),'connectTimeout',a197_0x9e5f21(0x1ce)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x9e5f21(0x19d),a197_0x9e5f21(0x200)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x9e5f21(0x1ca),a197_0x9e5f21(0x1bf),a197_0x9e5f21(0x209),a197_0x9e5f21(0x1c1),a197_0x9e5f21(0x1cd),'subjectPrefix',a197_0x9e5f21(0x1de),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x9e5f21(0x1b0),'type':a197_0x9e5f21(0x1f4),'required':![],'description':a197_0x9e5f21(0x199)},{'name':a197_0x9e5f21(0x1bc),'type':a197_0x9e5f21(0x1a9),'required':![],'default':![],'description':a197_0x9e5f21(0x1a7)},{'name':a197_0x9e5f21(0x1b4),'type':a197_0x9e5f21(0x1f4),'required':![],'description':a197_0x9e5f21(0x1c6)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x9e5f21(0x20b),'required':!![],'description':a197_0x9e5f21(0x19a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3a94be,_0x38d424,_0x265274){return new CliError(_0x3a94be,0x1,_0x38d424,_0x265274);}export function readNotificationId(_0x4c8074){const _0x5b6c14=a197_0x9e5f21,_0x3077d6=_0x4c8074['num']('id');if(!Number['isSafeInteger'](_0x3077d6)||_0x3077d6<=0x0)throw notificationError(_0x5b6c14(0x1af),_0x5b6c14(0x1b2));return _0x3077d6;}export function requireNotificationExplicitYes(_0x5009d7){const _0x4923c0=a197_0x9e5f21;if(_0x5009d7[_0x4923c0(0x1c7)](_0x4923c0(0x1fb))||_0x5009d7[_0x4923c0(0x1c7)](_0x4923c0(0x19c)))return;throw notificationError(_0x4923c0(0x215),_0x4923c0(0x1b6),_0x4923c0(0x1aa));}export function readNotificationChannelType(_0x467785,_0xb3299c=a197_0x9e5f21(0x1d5),_0x4f2170=a197_0x9e5f21(0x1ba)){const _0x513019=a197_0x9e5f21,_0x1fdbd1=_0x467785['str'](_0xb3299c)[_0x513019(0x207)]()||_0x4f2170;if(!NOTIFICATION_CHANNEL_TYPES[_0x513019(0x1d7)](_0x1fdbd1))throw CliErrors['validation']('Invalid\x20--'+_0xb3299c+':\x20'+_0x1fdbd1,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x513019(0x1a2)](',\x20')+'.');return _0x1fdbd1;}export function assertSingleNotificationSource(_0x40f7a5){const _0x549824=a197_0x9e5f21,_0x54831c=[],_0x413d40=_0x40f7a5['str'](_0x549824(0x1b0))[_0x549824(0x207)]();if(_0x413d40)_0x54831c[_0x549824(0x216)]({'kind':_0x549824(0x1b0),'path':_0x413d40});if(_0x40f7a5[_0x549824(0x1c7)](_0x549824(0x1bc)))_0x54831c['push']({'kind':_0x549824(0x1bc)});const _0x1edfb2=_0x40f7a5[_0x549824(0x1b7)](_0x549824(0x1b4))[_0x549824(0x207)]();if(_0x1edfb2)_0x54831c[_0x549824(0x216)]({'kind':_0x549824(0x1fe),'name':_0x1edfb2});if(_0x54831c[_0x549824(0x1d6)]===0x0)throw CliErrors['validation'](_0x549824(0x1ed),_0x549824(0x1ac));if(_0x54831c['length']>0x1)throw CliErrors['validation'](_0x549824(0x1f7),_0x549824(0x1ac));return _0x54831c[0x0];}export async function readNotificationDocument(_0x5d3cba,_0x42f469){const _0x3165fd=a197_0x9e5f21,_0x4da6d5=assertSingleNotificationSource(_0x5d3cba),_0x44cf9b=_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1b0)?'file\x20'+_0x4da6d5[_0x3165fd(0x203)]:_0x4da6d5['kind']===_0x3165fd(0x1fe)?_0x3165fd(0x19e)+_0x4da6d5[_0x3165fd(0x1ee)]:'stdin';let _0x854c98;try{if(_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1b0))_0x854c98=await readFile(_0x4da6d5[_0x3165fd(0x203)],_0x3165fd(0x1ea));else{if(_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1fe)){if(!(_0x4da6d5[_0x3165fd(0x1ee)]in process.env))throw notificationError(_0x3165fd(0x20e),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x4da6d5[_0x3165fd(0x1ee)]);_0x854c98=process.env[_0x4da6d5.name]??'';}else _0x854c98=await readStdin();}}catch(_0x3af68d){if(_0x3af68d instanceof CliError)throw _0x3af68d;throw notificationError(_0x3165fd(0x20e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x44cf9b+'.');}let _0x1a6239;try{_0x1a6239=JSON[_0x3165fd(0x1bb)](_0x854c98);}catch{throw notificationError(_0x3165fd(0x1ad),_0x3165fd(0x1f2)+_0x44cf9b+_0x3165fd(0x1e2),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1a6239))throw notificationError('notification_config_json_invalid',_0x3165fd(0x1f2)+_0x44cf9b+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x1a6239,_0x42f469);}export function projectNotificationListConfig(_0x29bd44,_0x97cf0c){const _0x4454ed=a197_0x9e5f21;return{'id':typeof _0x29bd44['id']===_0x4454ed(0x20b)?_0x29bd44['id']:null,'configCode':requireResponseString(_0x29bd44['configCode'],_0x4454ed(0x19d),_0x97cf0c),'configName':requireResponseString(_0x29bd44[_0x4454ed(0x1f5)],_0x4454ed(0x1f5),_0x97cf0c),'channelType':requireResponseString(_0x29bd44[_0x4454ed(0x1e6)],_0x4454ed(0x1e6),_0x97cf0c),'description':normalizeNullableString(_0x29bd44[_0x4454ed(0x1b5)]),'createTime':normalizeNullableString(_0x29bd44[_0x4454ed(0x201)]),'updateTime':normalizeNullableString(_0x29bd44['updateTime'])};}export function normalizeExactNotificationConfig(_0x2ce591,_0x5a4629,_0x5a4123){const _0x39c6a0=a197_0x9e5f21;if(!Number[_0x39c6a0(0x1c3)](_0x2ce591['id'])||_0x2ce591['id']!==_0x5a4629)throw notificationError(_0x39c6a0(0x213),_0x39c6a0(0x205)+_0x5a4629+'.');if(_0x2ce591[_0x39c6a0(0x1c9)]!==_0x5a4123)throw notificationError(_0x39c6a0(0x213),_0x39c6a0(0x20d)+_0x5a4629+_0x39c6a0(0x208));const _0xeda50b=requireExactString(_0x2ce591[_0x39c6a0(0x1f5)],_0x39c6a0(0x1f5),_0x5a4629),_0x2f5240=requireExactString(_0x2ce591[_0x39c6a0(0x19d)],_0x39c6a0(0x19d),_0x5a4629),_0x2c67a1=requireExactString(_0x2ce591[_0x39c6a0(0x1e6)],_0x39c6a0(0x1e6),_0x5a4629);if(!NOTIFICATION_CHANNEL_TYPES[_0x39c6a0(0x1d7)](_0x2c67a1))throw notificationError(_0x39c6a0(0x213),'Notification\x20config\x20'+_0x5a4629+'\x20has\x20an\x20unsupported\x20channelType.');const _0x38e999=responseNullableString(_0x2ce591[_0x39c6a0(0x1f0)],_0x39c6a0(0x1f0),_0x5a4629),_0x5312ed=responseNullableString(_0x2ce591[_0x39c6a0(0x1d4)],'channelConfig',_0x5a4629),_0x4181cb=responseNullableString(_0x2ce591[_0x39c6a0(0x1b5)],_0x39c6a0(0x1b5),_0x5a4629),_0x4876b6=responseNullableTimeout(_0x2ce591[_0x39c6a0(0x1fa)],_0x39c6a0(0x1fa),_0x5a4629),_0x529685=responseNullableTimeout(_0x2ce591[_0x39c6a0(0x1ce)],_0x39c6a0(0x1ce),_0x5a4629);return{'id':_0x5a4629,'appCode':_0x5a4123,'configCode':_0x2f5240,'configName':_0xeda50b,'channelType':_0x2c67a1,'endpointUrl':redactSensitive(_0x38e999),'channelConfig':redactSensitive(_0x5312ed),'description':_0x4181cb,'connectTimeout':_0x4876b6,'readTimeout':_0x529685,'endpointUrlRaw':_0x38e999,'channelConfigRaw':_0x5312ed};}function a197_0x17a4(_0x11061d,_0x475e0d){_0x11061d=_0x11061d-0x197;const _0xd86ea8=a197_0xd86e();let _0x17a432=_0xd86ea8[_0x11061d];return _0x17a432;}export async function requireExactNotificationConfig(_0x51ae55,_0x4d9e84,_0x4f9c64){const _0x147840=a197_0x9e5f21;let _0x54a7a7;try{_0x54a7a7=await getNotificationChannelConfig(_0x4d9e84,_0x51ae55);}catch{throw safeApiFailure(_0x4f9c64,_0x147840(0x1c4),_0x147840(0x1ec)+_0x51ae55+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x54a7a7,_0x4d9e84,_0x51ae55);}export function projectNotificationConfig(_0x182a3a){const _0x21ca67=a197_0x9e5f21;return{'id':_0x182a3a['id']??null,'appCode':_0x182a3a[_0x21ca67(0x1c9)],'configCode':_0x182a3a[_0x21ca67(0x19d)]??null,'configName':_0x182a3a[_0x21ca67(0x1f5)],'channelType':_0x182a3a[_0x21ca67(0x1e6)],'endpointUrl':redactSensitive(_0x182a3a[_0x21ca67(0x1f0)]),'channelConfig':redactSensitive(_0x182a3a[_0x21ca67(0x1d4)]),'description':_0x182a3a['description']??null,'connectTimeout':_0x182a3a[_0x21ca67(0x1fa)]??null,'readTimeout':_0x182a3a[_0x21ca67(0x1ce)]??null};}export function notificationSelector(_0x1b68e4){const _0x5381d2=a197_0x9e5f21;return{'appCode':_0x1b68e4[_0x5381d2(0x1c9)],'id':_0x1b68e4['id'],'configCode':_0x1b68e4[_0x5381d2(0x19d)],'configName':_0x1b68e4[_0x5381d2(0x1f5)],'channelType':_0x1b68e4[_0x5381d2(0x1e6)]};}export function createMutationInput(_0x3ffdbd,_0x1dbe7a){const _0x53acfa=a197_0x9e5f21;return{'appCode':_0x3ffdbd,'configName':_0x1dbe7a[_0x53acfa(0x1f5)],'channelType':_0x1dbe7a[_0x53acfa(0x1e6)],...hasOwn(_0x1dbe7a,'endpointUrl')?{'endpointUrl':_0x1dbe7a[_0x53acfa(0x1f0)]}:{},...hasOwn(_0x1dbe7a,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x1dbe7a['channelConfig'])}:{},...hasOwn(_0x1dbe7a,_0x53acfa(0x1b5))?{'description':_0x1dbe7a[_0x53acfa(0x1b5)]}:{},...hasOwn(_0x1dbe7a,_0x53acfa(0x1fa))?{'connectTimeout':_0x1dbe7a[_0x53acfa(0x1fa)]}:{},...hasOwn(_0x1dbe7a,'readTimeout')?{'readTimeout':_0x1dbe7a[_0x53acfa(0x1ce)]}:{}};}export function mergeUpdateInput(_0x25f852,_0x257018){const _0x56f476=a197_0x9e5f21;return{'id':_0x25f852['id'],'appCode':_0x25f852['appCode'],'configName':_0x257018['configName']??_0x25f852[_0x56f476(0x1f5)],'channelType':_0x257018[_0x56f476(0x1e6)]??_0x25f852[_0x56f476(0x1e6)],'endpointUrl':hasOwn(_0x257018,'endpointUrl')?_0x257018[_0x56f476(0x1f0)]:_0x25f852['endpointUrlRaw'],'channelConfig':hasOwn(_0x257018,_0x56f476(0x1d4))?serializeChannelConfig(_0x257018['channelConfig']):_0x25f852[_0x56f476(0x1e4)],'description':hasOwn(_0x257018,'description')?_0x257018['description']:_0x25f852[_0x56f476(0x1b5)],'connectTimeout':hasOwn(_0x257018,'connectTimeout')?_0x257018['connectTimeout']:_0x25f852[_0x56f476(0x1fa)],'readTimeout':hasOwn(_0x257018,'readTimeout')?_0x257018[_0x56f476(0x1ce)]:_0x25f852[_0x56f476(0x1ce)]};}export function plannedUpdateProjection(_0x227731,_0x16fbfa){const _0x4668c6=a197_0x9e5f21;return projectNotificationConfig({'id':_0x227731['id'],'appCode':_0x227731[_0x4668c6(0x1c9)],'configCode':_0x227731[_0x4668c6(0x19d)],'configName':_0x16fbfa['configName']??_0x227731[_0x4668c6(0x1f5)],'channelType':_0x16fbfa[_0x4668c6(0x1e6)]??_0x227731[_0x4668c6(0x1e6)],'endpointUrl':hasOwn(_0x16fbfa,_0x4668c6(0x1f0))?_0x16fbfa[_0x4668c6(0x1f0)]:_0x227731['endpointUrlRaw'],'channelConfig':hasOwn(_0x16fbfa,_0x4668c6(0x1d4))?_0x16fbfa[_0x4668c6(0x1d4)]:_0x227731['channelConfigRaw'],'description':hasOwn(_0x16fbfa,_0x4668c6(0x1b5))?_0x16fbfa[_0x4668c6(0x1b5)]:_0x227731[_0x4668c6(0x1b5)],'connectTimeout':hasOwn(_0x16fbfa,_0x4668c6(0x1fa))?_0x16fbfa[_0x4668c6(0x1fa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x227731[_0x4668c6(0x1fa)],'readTimeout':hasOwn(_0x16fbfa,_0x4668c6(0x1ce))?_0x16fbfa[_0x4668c6(0x1ce)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x227731[_0x4668c6(0x1ce)]});}export function requestedSafeFieldsMatch(_0x2d0f4b,_0x3502cd,_0xc4395f){const _0x5183c4=a197_0x9e5f21,_0x1562bd=[],_0x2fe65d=[],_0x43bef4=[];for(const _0x4b8987 of[_0x5183c4(0x1f5),_0x5183c4(0x1e6),'description']){if(!hasOwn(_0xc4395f,_0x4b8987))continue;_0x43bef4['push'](_0x4b8987),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x4b8987]===_0xc4395f[_0x4b8987]),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x4b8987]!==_0xc4395f[_0x4b8987]&&_0x3502cd[_0x4b8987]===_0xc4395f[_0x4b8987]);}for(const _0x1d9406 of[_0x5183c4(0x1fa),'readTimeout']){if(!hasOwn(_0xc4395f,_0x1d9406))continue;const _0x57bb36=_0xc4395f[_0x1d9406]??(_0x1d9406===_0x5183c4(0x1fa)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x43bef4['push'](_0x1d9406),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x1d9406]===_0x57bb36),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x1d9406]!==_0x57bb36&&_0x3502cd[_0x1d9406]===_0x57bb36);}return hasOwn(_0xc4395f,_0x5183c4(0x1f0))&&_0xc4395f[_0x5183c4(0x1f0)]===null&&(_0x43bef4[_0x5183c4(0x216)](_0x5183c4(0x1cf)),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x5183c4(0x210)]===null||_0x3502cd[_0x5183c4(0x210)]===''),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x5183c4(0x210)]!==null&&_0x2d0f4b[_0x5183c4(0x210)]!==''&&(_0x3502cd[_0x5183c4(0x210)]===null||_0x3502cd[_0x5183c4(0x210)]===''))),{'allMatch':_0x1562bd[_0x5183c4(0x20c)](Boolean),'provesChange':_0x2fe65d[_0x5183c4(0x1c2)](Boolean),'verifiedFields':_0x43bef4};}export function validateNotificationDeleteReadback(_0x2fadd2,_0x53321b,_0x14d942){const _0x5a78d2=a197_0x9e5f21;for(const [_0x427e01,_0x532373]of _0x2fadd2['entries']()){if(!Number[_0x5a78d2(0x1c3)](_0x532373['id'])||_0x532373['id']<=0x0)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x532373[_0x5a78d2(0x1c9)]!==_0x53321b)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x532373[_0x5a78d2(0x1e6)]!==_0x14d942)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x1bbd0b,_0x47f1b9,_0x79c9b3){const _0x42721a=a197_0x9e5f21;return notificationError(_0x42721a(0x1e7)+_0x1bbd0b+'_'+(_0x47f1b9==='mutation'?'failed':_0x47f1b9+'_unavailable'),_0x42721a(0x20d)+_0x1bbd0b+'\x20'+_0x47f1b9+'\x20failed.',_0x79c9b3);}export function notificationLookupCommand(_0x2a6354,_0x151896){const _0xa99376=a197_0x9e5f21;return _0xa99376(0x1a1)+_0x2a6354+_0xa99376(0x211)+_0x151896+_0xa99376(0x1e1);}function validateNotificationDocument(_0xcf8858,_0x18a308){const _0x487462=a197_0x9e5f21;for(const _0x40d563 of Object[_0x487462(0x1b3)](_0xcf8858)){if(FORBIDDEN_IDENTITY_FIELDS[_0x487462(0x1eb)](_0x40d563))throw notificationError(_0x487462(0x197),'Notification\x20JSON\x20field\x20\x22'+_0x40d563+_0x487462(0x1ab));if(!ALLOWED_INPUT_FIELDS['has'](_0x40d563))throw notificationError('notification_config_field_unknown',_0x487462(0x1bd)+_0x40d563+'\x22.');}if(_0x18a308===_0x487462(0x20f)&&Object[_0x487462(0x1b3)](_0xcf8858)[_0x487462(0x1d6)]===0x0)throw notificationError('notification_config_update_empty',_0x487462(0x218));const _0x584749={};if(hasOwn(_0xcf8858,_0x487462(0x1f5)))_0x584749[_0x487462(0x1f5)]=validateRequiredString(_0xcf8858[_0x487462(0x1f5)],_0x487462(0x1f5),0x80);else{if(_0x18a308===_0x487462(0x19b))throw notificationError(_0x487462(0x1ef),_0x487462(0x1d1)+_0x487462(0x1f1));}if(hasOwn(_0xcf8858,_0x487462(0x1e6))){if(typeof _0xcf8858[_0x487462(0x1e6)]!==_0x487462(0x1f4))throw invalidFieldType(_0x487462(0x1e6),_0x487462(0x1b9));const _0x57adb7=_0xcf8858['channelType'][_0x487462(0x207)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x487462(0x1d7)](_0x57adb7))throw notificationError(_0x487462(0x1b8),_0x487462(0x1a3),_0x487462(0x1a5)+NOTIFICATION_CHANNEL_TYPES[_0x487462(0x1a2)](',\x20')+'.');_0x584749[_0x487462(0x1e6)]=_0x57adb7;}else{if(_0x18a308===_0x487462(0x19b))throw notificationError('notification_config_field_required',_0x487462(0x1d1)+_0x487462(0x198));}for(const [_0x3ae85d,_0x3bece3]of[['endpointUrl',0x200],[_0x487462(0x1b5),0x100]]){if(!hasOwn(_0xcf8858,_0x3ae85d))continue;const _0x119e6b=_0xcf8858[_0x3ae85d];if(_0x119e6b!==null&&typeof _0x119e6b!==_0x487462(0x1f4))throw invalidFieldType(_0x3ae85d,_0x487462(0x1a8));if(typeof _0x119e6b===_0x487462(0x1f4)&&_0x119e6b[_0x487462(0x1d6)]>_0x3bece3)throw notificationError(_0x487462(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x3ae85d+_0x487462(0x1cc)+_0x3bece3+_0x487462(0x1c8));_0x584749[_0x3ae85d]=_0x119e6b;}if(hasOwn(_0xcf8858,_0x487462(0x1d4))){const _0x18e919=_0xcf8858[_0x487462(0x1d4)];if(_0x18e919===null&&_0x18a308===_0x487462(0x19b))throw invalidFieldType(_0x487462(0x1d4),_0x487462(0x1c0));if(_0x18e919!==null&&!isJsonObject(_0x18e919))throw invalidFieldType(_0x487462(0x1d4),_0x18a308===_0x487462(0x20f)?_0x487462(0x1d9):'a\x20JSON\x20object');_0x18e919!==null&&validateChannelConfigFields(_0x584749[_0x487462(0x1e6)],_0x18e919),_0x584749[_0x487462(0x1d4)]=_0x18e919;}for(const _0x18ce02 of[_0x487462(0x1fa),'readTimeout']){if(!hasOwn(_0xcf8858,_0x18ce02))continue;const _0x53d93a=_0xcf8858[_0x18ce02];if(_0x53d93a!==null&&(!Number[_0x487462(0x1c3)](_0x53d93a)||_0x53d93a<0x0))throw notificationError('notification_config_field_invalid',_0x487462(0x1a0)+_0x18ce02+_0x487462(0x1df));_0x584749[_0x18ce02]=_0x53d93a;}return _0x584749;}function validateRequiredString(_0x266b16,_0x59a418,_0x97c762){const _0x1c3370=a197_0x9e5f21;if(typeof _0x266b16!==_0x1c3370(0x1f4))throw invalidFieldType(_0x59a418,_0x1c3370(0x1da));const _0x2e2eda=_0x266b16['trim']();if(!_0x2e2eda)throw notificationError('notification_config_field_invalid',_0x1c3370(0x1a0)+_0x59a418+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x2e2eda[_0x1c3370(0x1d6)]>_0x97c762)throw notificationError(_0x1c3370(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x59a418+'\x22\x20cannot\x20exceed\x20'+_0x97c762+_0x1c3370(0x1c8));return _0x2e2eda;}function validateChannelConfigFields(_0x55bcb2,_0x2e61f3){const _0x53e7c3=a197_0x9e5f21;if(hasOwn(_0x2e61f3,_0x53e7c3(0x1a6)))throw forbiddenChannelConfigField(_0x53e7c3(0x1a6));if(_0x55bcb2==='EMAIL')for(const _0x244c18 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2e61f3,_0x244c18))throw forbiddenChannelConfigField(_0x244c18);}}function forbiddenChannelConfigField(_0x85bfff){const _0x4aeecf=a197_0x9e5f21;return notificationError('notification_config_channel_field_forbidden',_0x4aeecf(0x1d3)+_0x85bfff+_0x4aeecf(0x1db));}function invalidFieldType(_0x1cdf54,_0x53b48c){const _0xa550b1=a197_0x9e5f21;return notificationError(_0xa550b1(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x1cdf54+_0xa550b1(0x1fc)+_0x53b48c+'.');}function serializeChannelConfig(_0x37220c){const _0x4e1beb=a197_0x9e5f21;return _0x37220c===null||_0x37220c===undefined?null:JSON[_0x4e1beb(0x1e3)](_0x37220c);}function redactSensitive(_0x4f1678){const _0x4e2e43=a197_0x9e5f21;return _0x4f1678===null||_0x4f1678===undefined||_0x4f1678===''?null:_0x4e2e43(0x19f);}function requireResponseString(_0x5a1326,_0x540477,_0x5c766c){const _0x6733f4=a197_0x9e5f21;if(typeof _0x5a1326!==_0x6733f4(0x1f4)||_0x5a1326[_0x6733f4(0x207)]()==='')throw CliErrors[_0x6733f4(0x1f6)](_0x6733f4(0x20a),_0x6733f4(0x1f9)+(_0x5c766c+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x540477+'\x22.');return _0x5a1326[_0x6733f4(0x207)]();}function requireExactString(_0x777ad,_0x597868,_0xf96b5e){const _0x4a8b10=a197_0x9e5f21;if(typeof _0x777ad!=='string'||_0x777ad[_0x4a8b10(0x207)]()==='')throw notificationError('notification_config_response_invalid',_0x4a8b10(0x20d)+_0xf96b5e+_0x4a8b10(0x1a4)+_0x597868+'\x22.');return _0x777ad[_0x4a8b10(0x207)]();}function responseNullableString(_0xc40670,_0x2c8e32,_0x381ac4){const _0x237c41=a197_0x9e5f21;if(_0xc40670===undefined||_0xc40670===null)return null;if(typeof _0xc40670!=='string')throw notificationError(_0x237c41(0x213),_0x237c41(0x20d)+_0x381ac4+_0x237c41(0x1d2)+_0x2c8e32+'\x22.');return _0xc40670;}function responseNullableTimeout(_0x35fee,_0x21765f,_0x3d09b3){const _0x1cb6d7=a197_0x9e5f21;if(_0x35fee===undefined||_0x35fee===null)return null;if(!Number[_0x1cb6d7(0x1c3)](_0x35fee)||_0x35fee<0x0)throw notificationError(_0x1cb6d7(0x213),_0x1cb6d7(0x20d)+_0x3d09b3+_0x1cb6d7(0x1d2)+_0x21765f+'\x22.');return _0x35fee;}function normalizeNullableString(_0x3fa8f1){return typeof _0x3fa8f1==='string'?_0x3fa8f1:null;}function isJsonObject(_0x3e4410){const _0x464364=a197_0x9e5f21;return _0x3e4410!==null&&typeof _0x3e4410===_0x464364(0x1dc)&&!Array[_0x464364(0x212)](_0x3e4410);}function a197_0xd86e(){const _0xa8ff02=['5975KjqaXb','utf8','has','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Missing\x20notification\x20JSON\x20source.','name','notification_config_field_required','endpointUrl','\x22configName\x22.','Notification\x20JSON\x20from\x20','FEISHU','string','configName','apiError','Notification\x20JSON\x20source\x20is\x20ambiguous.','prototype','Item\x20','connectTimeout','dry-run','\x22\x20must\x20be\x20','10XnfaDQ','env','Notification\x20config\x20list\x20item\x20','channelCode','createTime','hasOwnProperty','path','6636MmdUNm','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','222106nyjMFQ','trim','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','ccList','Invalid\x20notification\x20config\x20response.','number','every','Notification\x20config\x20','notification_config_source_unavailable','update','endpointUrlRaw','\x20--type\x20','isArray','notification_config_response_invalid','DINGTALK','notification_config_confirmation_required','push','2atMjql','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_forbidden','\x22channelType\x22.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Application-level\x20notification\x20config\x20ID','create','yes','configCode','environment\x20variable\x20','<redacted>','Notification\x20JSON\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','join','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20is\x20missing\x20required\x20field\x20\x22','Allowed\x20values:\x20','messageTemplate','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','a\x20string\x20or\x20null','boolean','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_json_invalid','710901CVwKjq','notification_config_id_invalid','file','setEncoding','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','keys','from-env','description','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','str','notification_config_field_invalid','a\x20supported\x20string','EMAIL','parse','stdin','Unknown\x20notification\x20JSON\x20field\x20\x22','1111GqFtxJ','recipients','a\x20JSON\x20object','bccList','some','isSafeInteger','preflight','447999ClJLut','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','bool','\x20characters.','appCode','emailTargets','14224upGuRT','\x22\x20cannot\x20exceed\x20','replyTo','readTimeout','endpointUrl:null','352OHKAYy','Create\x20JSON\x20requires\x20field\x20','\x20has\x20invalid\x20field\x20\x22','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfig','type','length','includes','WECOM','a\x20JSON\x20object\x20or\x20null','a\x20non-empty\x20string','\x22\x20is\x20forbidden.','object','kind','fromName','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','288enoSVb','\x20--format\x20compress','\x20is\x20invalid.','stringify','channelConfigRaw','71796Qyxfac','channelType','notification_config_','WEBHOOK'];a197_0xd86e=function(){return _0xa8ff02;};return a197_0xd86e();}function hasOwn(_0x4808c2,_0x4a56fe){const _0x2241d4=a197_0x9e5f21;return Object[_0x2241d4(0x1f8)][_0x2241d4(0x202)]['call'](_0x4808c2,_0x4a56fe);}async function readStdin(){const _0x27dce0=a197_0x9e5f21;let _0x19646a='';process[_0x27dce0(0x1bc)][_0x27dce0(0x1b1)](_0x27dce0(0x1ea));for await(const _0x551fab of process[_0x27dce0(0x1bc)])_0x19646a+=_0x551fab;return _0x19646a;}
@@ -1 +1 @@
1
- const a198_0x1ed9f7=a198_0x3db1;(function(_0x3f0a0e,_0x2a3cab){const _0x353912=a198_0x3db1,_0x15f199=_0x3f0a0e();while(!![]){try{const _0x289740=parseInt(_0x353912(0x7a))/0x1+parseInt(_0x353912(0x8b))/0x2+-parseInt(_0x353912(0x8d))/0x3+parseInt(_0x353912(0x90))/0x4*(-parseInt(_0x353912(0xa2))/0x5)+-parseInt(_0x353912(0xa6))/0x6+-parseInt(_0x353912(0x9e))/0x7*(parseInt(_0x353912(0xa9))/0x8)+-parseInt(_0x353912(0x84))/0x9*(-parseInt(_0x353912(0x92))/0xa);if(_0x289740===_0x2a3cab)break;else _0x15f199['push'](_0x15f199['shift']());}catch(_0x5c9914){_0x15f199['push'](_0x15f199['shift']());}}}(a198_0x2b85,0x20f55));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x1ed9f7(0xa8),a198_0x1ed9f7(0xa7),a198_0x1ed9f7(0xa4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x1ed9f7(0x82),'general':a198_0x1ed9f7(0x96),'form':a198_0x1ed9f7(0x93),'idCard':a198_0x1ed9f7(0x98)},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x1ed9f7(0x7c)},IMAGE_FILE_FLAG={'name':a198_0x1ed9f7(0x78),'type':a198_0x1ed9f7(0x85),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x1ed9f7(0x9b),'type':a198_0x1ed9f7(0x85),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0xe3c85c){const _0x18e600=a198_0x1ed9f7,_0x4426e4=_0xe3c85c[_0x18e600(0x9a)]()[_0x18e600(0x97)]();if(_0x4426e4===_0x18e600(0x95))return _0x18e600(0xa1);if(_0x4426e4===_0x18e600(0xa8)||_0x4426e4===_0x18e600(0xa7)||_0x4426e4===_0x18e600(0xa4))return _0x4426e4;throw CliErrors[_0x18e600(0x83)](_0x18e600(0xa3)+_0xe3c85c+_0x18e600(0x89)+SUPPORTED_SCENES[_0x18e600(0x9d)](',\x20'));}function a198_0x2b85(){const _0x4e4cbb=['Table','POST','idcard','General','toLowerCase','IdCard','Preview:\x20recognize\x20','trim','image-url','read','join','7bAZinL','/smartapi/ocr/recognize-text?','scene','idCard','710520biZuzd','Unsupported\x20OCR\x20scene:\x20','form','filePath','1544436DsSRqV','general','invoice','1712768LFNXOj','File\x20upload\x20response\x20missing\x20filePath.','filter','str','\x20OCR','/smartapi/common/uploadFile','image-file','appCode','240450KWjlmL','GET','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','\x20OCR\x20from\x20URL','imageFile','fileUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Invoice','validation','117BOiDMo','string','imageUrl','ocr','apiError','.\x20Supported\x20scenes:\x20','/smartapi/ocr/recognize-text','313886fdxAon','toString','654960oYSrYg','/smartapi/common/queryFileUrl','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','4bOTSDC','fileName','438100Xolyaq'];a198_0x2b85=function(){return _0x4e4cbb;};return a198_0x2b85();}function selectedInputs(_0x22cd9a){const _0x42cdcf=a198_0x1ed9f7,_0x218547=_0x22cd9a[_0x42cdcf(0xac)]('image-file')['trim'](),_0x46c216=_0x22cd9a[_0x42cdcf(0xac)](_0x42cdcf(0x9b))[_0x42cdcf(0x9a)]();return{'imageFile':_0x218547,'imageUrl':_0x46c216,'count':[_0x218547,_0x46c216][_0x42cdcf(0xab)](Boolean)['length']};}function validateInputSelection(_0x29a354){const _0x18fa2b=a198_0x1ed9f7,_0x12cf38=selectedInputs(_0x29a354);if(_0x12cf38['count']!==0x1)throw CliErrors[_0x18fa2b(0x83)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x12cf38;}function withScene(_0x348557,_0x1566ab,_0x472e5d){const _0x2daec3=a198_0x1ed9f7;return{..._0x348557,'scene':_0x1566ab,..._0x472e5d?{'sourceFile':{'fileName':_0x472e5d[_0x2daec3(0x91)],'filePath':_0x472e5d[_0x2daec3(0xa5)]}}:{}};}const ocrRecognize={'service':a198_0x1ed9f7(0x87),'command':'recognize','description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a198_0x1ed9f7(0x9c),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5a9038){const _0x9d2c2b=a198_0x1ed9f7,_0x461103=normalizeScene(_0x5a9038['str'](_0x9d2c2b(0xa0))),_0x162a81=SCENE_TO_LEGACY_TYPE[_0x461103],_0x283d15=validateInputSelection(_0x5a9038);if(_0x283d15[_0x9d2c2b(0x86)]){const _0x560448=new URLSearchParams({'url':_0x283d15[_0x9d2c2b(0x86)],'type':_0x162a81,'appCode':_0x5a9038['appCode']});return{'method':_0x9d2c2b(0x7b),'url':_0x9d2c2b(0x9f)+_0x560448[_0x9d2c2b(0x8c)](),'description':_0x9d2c2b(0x99)+_0x461103+_0x9d2c2b(0x7d)};}const _0x32aa14=requireDevelopmentUploadFile(_0x283d15[_0x9d2c2b(0x7e)],_0x9d2c2b(0x78));return{'method':_0x9d2c2b(0x94),'url':_0x9d2c2b(0x77),'body':{'steps':[{'method':'POST','url':_0x9d2c2b(0x77),'body':{'appCode':_0x5a9038[_0x9d2c2b(0x79)],'multipart':{'file':_0x32aa14}}},{'method':_0x9d2c2b(0x94),'url':_0x9d2c2b(0x8e),'body':{'filePath':_0x9d2c2b(0x8f),'downloadFlag':![]}},{'method':_0x9d2c2b(0x7b),'url':_0x9d2c2b(0x8a),'query':{'appCode':_0x5a9038['appCode'],'url':_0x9d2c2b(0x81),'type':_0x162a81}}]},'description':_0x9d2c2b(0x80)+_0x461103+_0x9d2c2b(0x76)};},async 'execute'(_0x3b53dc){const _0x5c979d=a198_0x1ed9f7,_0x422d59=normalizeScene(_0x3b53dc[_0x5c979d(0xac)]('scene')),_0x5a17b0=SCENE_TO_LEGACY_TYPE[_0x422d59],_0x275f1f=validateInputSelection(_0x3b53dc);if(_0x275f1f['imageUrl']){const _0x49bc5f=await recognizeDevelopmentOcr(_0x3b53dc[_0x5c979d(0x79)],{'url':_0x275f1f[_0x5c979d(0x86)],'type':_0x5a17b0});return{'ok':!![],'data':withScene(_0x49bc5f,_0x422d59)};}const _0x3101d2=requireDevelopmentUploadFile(_0x275f1f[_0x5c979d(0x7e)],_0x5c979d(0x78)),_0x470b0b=await uploadDevelopmentFile(_0x3b53dc['appCode'],_0x3101d2['path']);if(!_0x470b0b[_0x5c979d(0xa5)])throw CliErrors['apiError'](_0x5c979d(0xaa));const _0x44813f=await queryDevelopmentFileUrl(_0x470b0b['filePath'],{'download':![]});if(!_0x44813f[_0x5c979d(0x7f)])throw CliErrors[_0x5c979d(0x88)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x55f6c6=await recognizeDevelopmentOcr(_0x3b53dc[_0x5c979d(0x79)],{'url':_0x44813f[_0x5c979d(0x7f)],'type':_0x5a17b0});return{'ok':!![],'data':withScene(_0x55f6c6,_0x422d59,_0x470b0b)};}};function a198_0x3db1(_0x28a8c9,_0x422f21){_0x28a8c9=_0x28a8c9-0x76;const _0x2b852c=a198_0x2b85();let _0x3db1b0=_0x2b852c[_0x28a8c9];return _0x3db1b0;}export const ocrDefinitions=[ocrRecognize];
1
+ const a198_0xd72ddb=a198_0x26ab;(function(_0x33ff5a,_0x42d983){const _0x24eab1=a198_0x26ab,_0x3eb6ec=_0x33ff5a();while(!![]){try{const _0x155e68=-parseInt(_0x24eab1(0x1e5))/0x1+-parseInt(_0x24eab1(0x1d1))/0x2+parseInt(_0x24eab1(0x1dc))/0x3+-parseInt(_0x24eab1(0x1cb))/0x4*(-parseInt(_0x24eab1(0x1de))/0x5)+-parseInt(_0x24eab1(0x1c4))/0x6+-parseInt(_0x24eab1(0x1c6))/0x7*(-parseInt(_0x24eab1(0x1e9))/0x8)+parseInt(_0x24eab1(0x1d7))/0x9;if(_0x155e68===_0x42d983)break;else _0x3eb6ec['push'](_0x3eb6ec['shift']());}catch(_0x1b47df){_0x3eb6ec['push'](_0x3eb6ec['shift']());}}}(a198_0x3fe4,0xd3606));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0xd72ddb(0x1f4),a198_0xd72ddb(0x1da),'form',a198_0xd72ddb(0x1e6)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a198_0xd72ddb(0x1cc),'form':a198_0xd72ddb(0x1db),'idCard':a198_0xd72ddb(0x1f5)},SCENE_FLAG={'name':a198_0xd72ddb(0x1c2),'type':a198_0xd72ddb(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0xd72ddb(0x1f2)},IMAGE_FILE_FLAG={'name':a198_0xd72ddb(0x1c9),'type':a198_0xd72ddb(0x1d0),'description':a198_0xd72ddb(0x1cf)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0xb3b609){const _0x6e445d=a198_0xd72ddb,_0x57480f=_0xb3b609[_0x6e445d(0x1d6)]()[_0x6e445d(0x1d3)]();if(_0x57480f==='idcard')return _0x6e445d(0x1e6);if(_0x57480f===_0x6e445d(0x1f4)||_0x57480f===_0x6e445d(0x1da)||_0x57480f===_0x6e445d(0x1ef))return _0x57480f;throw CliErrors[_0x6e445d(0x1e4)](_0x6e445d(0x1f1)+_0xb3b609+_0x6e445d(0x1ea)+SUPPORTED_SCENES[_0x6e445d(0x1eb)](',\x20'));}function a198_0x3fe4(){const _0x2bf3d7=['filePath','toLowerCase','/smartapi/common/uploadFile','recognize','trim','1582767XUYGMG','File\x20URL\x20response\x20missing\x20fileUrl.','filter','general','Table','3742347ITNNZo','fileUrl','1465kVFuly','ocr','File\x20upload\x20response\x20missing\x20filePath.','path','/smartapi/ocr/recognize-text','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','validation','761297jBuKmB','idCard','Preview:\x20recognize\x20','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','607864uURlTi','.\x20Supported\x20scenes:\x20','join','/smartapi/ocr/recognize-text?','apiError','imageFile','form','GET','Unsupported\x20OCR\x20scene:\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','invoice','IdCard','fileName','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','scene','toString','617046DUhVal','appCode','14bylhlf','length','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','image-file','str','22444ZedkXv','General','image-url','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','string','2978730aNHDIo'];a198_0x3fe4=function(){return _0x2bf3d7;};return a198_0x3fe4();}function a198_0x26ab(_0x550c32,_0x1c9ca8){_0x550c32=_0x550c32-0x1c2;const _0x3fe48b=a198_0x3fe4();let _0x26abac=_0x3fe48b[_0x550c32];return _0x26abac;}function selectedInputs(_0x3aea16){const _0x49375e=a198_0xd72ddb,_0x1f6c30=_0x3aea16[_0x49375e(0x1ca)](_0x49375e(0x1c9))[_0x49375e(0x1d6)](),_0x135ee2=_0x3aea16[_0x49375e(0x1ca)](_0x49375e(0x1cd))['trim']();return{'imageFile':_0x1f6c30,'imageUrl':_0x135ee2,'count':[_0x1f6c30,_0x135ee2][_0x49375e(0x1d9)](Boolean)[_0x49375e(0x1c7)]};}function validateInputSelection(_0x139aea){const _0x45125f=a198_0xd72ddb,_0x3987ca=selectedInputs(_0x139aea);if(_0x3987ca['count']!==0x1)throw CliErrors['validation'](_0x45125f(0x1e3));return _0x3987ca;}function withScene(_0x53eb62,_0x352a9c,_0x70fc6d){const _0x3791da=a198_0xd72ddb;return{..._0x53eb62,'scene':_0x352a9c,..._0x70fc6d?{'sourceFile':{'fileName':_0x70fc6d[_0x3791da(0x1f6)],'filePath':_0x70fc6d[_0x3791da(0x1d2)]}}:{}};}const ocrRecognize={'service':a198_0xd72ddb(0x1df),'command':a198_0xd72ddb(0x1d5),'description':a198_0xd72ddb(0x1c8),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3650af){const _0xe74f14=a198_0xd72ddb,_0xedc24d=normalizeScene(_0x3650af[_0xe74f14(0x1ca)](_0xe74f14(0x1c2))),_0x2339de=SCENE_TO_LEGACY_TYPE[_0xedc24d],_0x4b52d4=validateInputSelection(_0x3650af);if(_0x4b52d4[_0xe74f14(0x1f7)]){const _0xdf6f6f=new URLSearchParams({'url':_0x4b52d4['imageUrl'],'type':_0x2339de,'appCode':_0x3650af[_0xe74f14(0x1c5)]});return{'method':'GET','url':_0xe74f14(0x1ec)+_0xdf6f6f[_0xe74f14(0x1c3)](),'description':_0xe74f14(0x1e7)+_0xedc24d+'\x20OCR\x20from\x20URL'};}const _0x1c3980=requireDevelopmentUploadFile(_0x4b52d4['imageFile'],_0xe74f14(0x1c9));return{'method':_0xe74f14(0x1f3),'url':_0xe74f14(0x1d4),'body':{'steps':[{'method':_0xe74f14(0x1f3),'url':_0xe74f14(0x1d4),'body':{'appCode':_0x3650af['appCode'],'multipart':{'file':_0x1c3980}}},{'method':_0xe74f14(0x1f3),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0xe74f14(0x1e8),'downloadFlag':![]}},{'method':_0xe74f14(0x1f0),'url':_0xe74f14(0x1e2),'query':{'appCode':_0x3650af[_0xe74f14(0x1c5)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2339de}}]},'description':_0xe74f14(0x1f8)+_0xedc24d+_0xe74f14(0x1ce)};},async 'execute'(_0xdf4ad3){const _0x3cfc91=a198_0xd72ddb,_0x560d94=normalizeScene(_0xdf4ad3[_0x3cfc91(0x1ca)](_0x3cfc91(0x1c2))),_0x5e3c77=SCENE_TO_LEGACY_TYPE[_0x560d94],_0x2ac2c5=validateInputSelection(_0xdf4ad3);if(_0x2ac2c5['imageUrl']){const _0x381413=await recognizeDevelopmentOcr(_0xdf4ad3[_0x3cfc91(0x1c5)],{'url':_0x2ac2c5[_0x3cfc91(0x1f7)],'type':_0x5e3c77});return{'ok':!![],'data':withScene(_0x381413,_0x560d94)};}const _0xecda31=requireDevelopmentUploadFile(_0x2ac2c5[_0x3cfc91(0x1ee)],'image-file'),_0x5dbfb1=await uploadDevelopmentFile(_0xdf4ad3['appCode'],_0xecda31[_0x3cfc91(0x1e1)]);if(!_0x5dbfb1[_0x3cfc91(0x1d2)])throw CliErrors[_0x3cfc91(0x1ed)](_0x3cfc91(0x1e0));const _0x484eaa=await queryDevelopmentFileUrl(_0x5dbfb1[_0x3cfc91(0x1d2)],{'download':![]});if(!_0x484eaa[_0x3cfc91(0x1dd)])throw CliErrors[_0x3cfc91(0x1ed)](_0x3cfc91(0x1d8));const _0x59fec8=await recognizeDevelopmentOcr(_0xdf4ad3[_0x3cfc91(0x1c5)],{'url':_0x484eaa[_0x3cfc91(0x1dd)],'type':_0x5e3c77});return{'ok':!![],'data':withScene(_0x59fec8,_0x560d94,_0x5dbfb1)};}};export const ocrDefinitions=[ocrRecognize];