@lovrabet/rabetbase-cli 2.5.10-beta.3 → 2.5.10-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +4 -4
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a191_0x17acb3=a191_0x41a0;(function(_0x3b0c82,_0x255b75){const _0x4eae5e=a191_0x41a0,_0x1bdf9f=_0x3b0c82();while(!![]){try{const _0x9ede61=-parseInt(_0x4eae5e(0xd3))/0x1+-parseInt(_0x4eae5e(0xed))/0x2*(parseInt(_0x4eae5e(0xf6))/0x3)+-parseInt(_0x4eae5e(0x11b))/0x4+-parseInt(_0x4eae5e(0xe6))/0x5+-parseInt(_0x4eae5e(0x120))/0x6+parseInt(_0x4eae5e(0x10b))/0x7+-parseInt(_0x4eae5e(0xc1))/0x8*(-parseInt(_0x4eae5e(0x137))/0x9);if(_0x9ede61===_0x255b75)break;else _0x1bdf9f['push'](_0x1bdf9f['shift']());}catch(_0x365c48){_0x1bdf9f['push'](_0x1bdf9f['shift']());}}}(a191_0x3101,0xb4340));function a191_0x3101(){const _0x1d1e6e=['Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','warnings','verification','\x20updated,\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','set','Selected\x20','POST','has','resources','validation','parentId','visibility-update','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','expected-count','datasetCode','menu','3582050PjoYFE','filter','update-recovery','boolean','trim','\x20failed.','rawFlags','28382AZnNkE','url','Would\x20update\x20visibility\x20for\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu_permission_denied','menu_selector_ambiguous','values','get','39cIxJKo','expect-visible','/smartapi/menu/update','string','menus','updated','write','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s);\x20skipped\x20','message','label','pageType','before','update-menu-visibility','plannedActions','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','failed','modelType','flagMissing','172214ypjAOm','push','paths','\x20unchanged\x20menu(s).','menu_expected_count_mismatch','Menu\x20visibility\x20update\x20completed:\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expectVisible','isArray','type','plan','Requested\x20menu\x20visibility','sort','1414764tQTMWc','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','targets','datasetId','menu\x20list','4234962ivugNb','code','expectedCount','num','update\x20visibility\x20for','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','visible','join','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_verification_failed','path','body','split','childrenIds','update','map','recovered','Response\x20was\x20lost\x20for\x20menu\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','childrenCount','\x20must\x20be\x20true\x20or\x20false.','hash','rabetbase\x20menu\x20list\x20--format\x20compress','873HnIBxq','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','\x20menu(s);\x20skip\x20','some','resourcesValid','beforeById','update\x20menu\x20visibility','length','232128mETXIH','pageId','\x20changed\x20unexpectedly.','menuIds','requestedVisible','cookie','str','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','menu-ids','false','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','true','appCode','menu_state_drift','isSafeInteger','depth','140631ncFAHl','stringify'];a191_0x3101=function(){return _0x1d1e6e;};return a191_0x3101();}function a191_0x41a0(_0x2ccaef,_0x5c907a){_0x2ccaef=_0x2ccaef-0xc0;const _0x310156=a191_0x3101();let _0x41a052=_0x310156[_0x2ccaef];return _0x41a052;}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':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a191_0x17acb3(0xe5),'command':'visibility-update','description':a191_0x17acb3(0x107),'risk':a191_0x17acb3(0xfc),'structuredErrors':!![],'flags':[{'name':a191_0x17acb3(0xcb),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0xc9)},{'name':a191_0x17acb3(0x10d),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0x125)},{'name':a191_0x17acb3(0x126),'type':a191_0x17acb3(0xe9),'required':!![],'description':a191_0x17acb3(0x119)},{'name':a191_0x17acb3(0xf7),'type':a191_0x17acb3(0xe9),'description':a191_0x17acb3(0xca)},{'name':'expected-count','type':'number','description':a191_0x17acb3(0xc8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29f14f){parseInput(_0x29f14f);},async 'dryRun'(_0x4975f){const _0x33efdb=a191_0x17acb3,_0x5cc447=await buildPlan(_0x4975f,!![]),_0x3a0bba=_0x5cc447[_0x33efdb(0x118)]['plannedActions']?.['length']??0x0,_0x33e107=_0x5cc447['plan'][_0x33efdb(0x11d)][_0x33efdb(0xc0)]-_0x3a0bba;return menuDryRunResult(_0x5cc447[_0x33efdb(0x118)],{'method':_0x33efdb(0xdc),'url':'/smartapi/menu/update','body':{'updates':_0x5cc447[_0x33efdb(0x118)][_0x33efdb(0x106)]?.[_0x33efdb(0x12f)](_0x2fa9e5=>_0x2fa9e5[_0x33efdb(0x12b)])??[]},'description':_0x33efdb(0xef)+_0x3a0bba+_0x33efdb(0x13a)+_0x33e107+_0x33efdb(0x10e)});},async 'execute'(_0x3345e0){const _0x3512e2=a191_0x17acb3,_0x1dfa8f=await buildPlan(_0x3345e0,![]);await recheckMutationSnapshot(_0x3345e0,_0x1dfa8f[_0x3512e2(0x118)],'update\x20menu\x20visibility');const _0x4be46b=[],_0x2c021d=[],_0x15c557=[];for(const _0x314691 of _0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]){if(_0x314691[_0x3512e2(0x104)][_0x3512e2(0x126)]===_0x1dfa8f['plan'][_0x3512e2(0xc5)]){_0x4be46b['push']({'id':_0x314691['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0['cookie'],{'id':_0x314691['id'],'visible':_0x1dfa8f['plan'][_0x3512e2(0xc5)]}),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x314691['id'],'updated':!![],'skipped':![]});}catch(_0x1e9958){const _0x3ca188=mapMenuApiError(_0x1e9958,_0x3512e2(0x124),_0x314691['id']);if(isMenuResponseLoss(_0x1e9958)&&_0x3ca188[_0x3512e2(0x121)]!==_0x3512e2(0xf2)){_0x15c557[_0x3512e2(0x10c)](_0x314691['id']);continue;}_0x2c021d[_0x3512e2(0x10c)]({'id':_0x314691['id'],'stage':_0x3512e2(0x12e),'code':_0x3ca188[_0x3512e2(0x121)],'message':_0x3ca188[_0x3512e2(0x101)]});}}let _0x63b3cf;try{_0x63b3cf=await fetchMenuSnapshot(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0[_0x3512e2(0xc6)]);}catch(_0x10535a){const _0x482585=describeMenuErrorCause(_0x10535a,'verify\x20menu\x20visibility\x20update'),_0xed3081=_0x15c557[_0x3512e2(0x12f)](_0x51dbae=>({'id':_0x51dbae,'stage':_0x3512e2(0xe8),'code':'menu_verification_failed','message':_0x3512e2(0x131)+_0x51dbae+_0x3512e2(0xd9),'requestedStateConfirmed':![],'recovered':![]})),_0x318d04={'stage':_0x3512e2(0xd7),'code':_0x3512e2(0x129),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]['map'](_0x4e5d34=>_0x4e5d34['id']),'requestedStateConfirmed':![],..._0x482585};throw menuFailure(asVerificationError(_0x10535a,_0x3512e2(0x11c)),_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0xed3081,_0x318d04],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),'recoveredCount':0x0,'lookupCommand':_0x3512e2(0x136)}});}const _0x4614d9=[];for(const _0x48f559 of _0x4be46b){const _0x18161a=Number(_0x48f559['id']),_0x64c6b9=_0x1dfa8f[_0x3512e2(0x13d)][_0x3512e2(0xf5)](_0x18161a),_0x22242e=_0x63b3cf['byId'][_0x3512e2(0xf5)](_0x18161a);try{verifyVisibilityUpdate(_0x64c6b9,_0x22242e,_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0xc5)]);}catch(_0x20e1cd){const _0x6cddd1=asVerificationError(_0x20e1cd,_0x3512e2(0xfd)+_0x18161a+_0x3512e2(0xff));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x18161a,'stage':_0x3512e2(0xd7),'code':_0x6cddd1[_0x3512e2(0x121)],'message':_0x6cddd1[_0x3512e2(0x101)],'requestedStateConfirmed':![]});}}for(const _0x14dff9 of _0x15c557){const _0x1423eb=_0x1dfa8f[_0x3512e2(0x13d)]['get'](_0x14dff9),_0x14ea40=_0x63b3cf['byId']['get'](_0x14dff9);try{verifyVisibilityUpdate(_0x1423eb,_0x14ea40,_0x1dfa8f['plan']['requestedVisible']),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x14dff9,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x44fc3a){const _0x5610ed=asVerificationError(_0x44fc3a,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x14dff9+_0x3512e2(0xfe));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x14dff9,'stage':'update-recovery','code':_0x5610ed[_0x3512e2(0x121)],'message':_0x5610ed[_0x3512e2(0x101)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4614d9[_0x3512e2(0xc0)]>0x0){const _0x2222ca=_0x4614d9[_0x3512e2(0x12f)](_0x5ea7ba=>Number(_0x5ea7ba['id'])),_0x35acc7=_0x4be46b['filter'](_0x2da73c=>_0x2da73c[_0x3512e2(0x130)]===!![])[_0x3512e2(0xc0)],_0x5c491a=menuError(_0x3512e2(0x129),_0x3512e2(0x138)+_0x2222ca[_0x3512e2(0x127)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x5c491a,_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0x4614d9],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),..._0x2222ca[_0x3512e2(0xc0)]===0x1?{'targetId':_0x2222ca[0x0]}:{'targetIds':_0x2222ca},'recoveredCount':_0x35acc7,'lookupCommand':_0x3512e2(0x136)}});}const _0x5b9dd7=_0x4be46b[_0x3512e2(0xe7)](_0x2edf80=>_0x2edf80[_0x3512e2(0xfb)]===!![])['length'],_0xa883bc=_0x4be46b[_0x3512e2(0xc0)]-_0x5b9dd7,_0x91ef90={..._0x1dfa8f[_0x3512e2(0x118)],'succeeded':_0x4be46b,'failed':_0x2c021d,'warnings':_0x2c021d[_0x3512e2(0xc0)]>0x0?[..._0x1dfa8f['plan'][_0x3512e2(0xd6)],_0x3512e2(0x111)]:_0x1dfa8f['plan']['warnings'],'verification':{'checkedBy':_0x3512e2(0x11f),'snapshotHash':_0x63b3cf[_0x3512e2(0x135)],'matchesRequestedState':_0x2c021d[_0x3512e2(0xc0)]===0x0,'recoveredCount':_0x15c557[_0x3512e2(0xc0)]}};return{'ok':_0x2c021d[_0x3512e2(0xc0)]===0x0,'data':_0x91ef90,'message':_0x2c021d[_0x3512e2(0xc0)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5b9dd7+_0x3512e2(0x100)+_0xa883bc+_0x3512e2(0x10e):_0x3512e2(0x110)+_0x5b9dd7+_0x3512e2(0xd8)+_0xa883bc+'\x20skipped,\x20'+_0x2c021d[_0x3512e2(0xc0)]+_0x3512e2(0xeb)};}};function parseInput(_0xa9e99f){const _0x3228bf=a191_0x17acb3,_0x3c87ee=parseMenuIds(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0xcb))),_0x530f56=parseCsv(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0x10d)));if(_0x3c87ee[_0x3228bf(0xc0)]===0x0&&_0x530f56[_0x3228bf(0xc0)]===0x0)throw CliErrors['validation'](_0x3228bf(0x128));const _0x28a16b=parseBooleanFlag(_0xa9e99f,_0x3228bf(0x126),!![]),_0x325738=parseBooleanFlag(_0xa9e99f,_0x3228bf(0xf7),![]);let _0x3a4bb9;if(hasFlag(_0xa9e99f,_0x3228bf(0xe3))){_0x3a4bb9=_0xa9e99f[_0x3228bf(0x123)](_0x3228bf(0xe3));if(!Number[_0x3228bf(0xd1)](_0x3a4bb9)||_0x3a4bb9<0x0)throw CliErrors[_0x3228bf(0xdf)](_0x3228bf(0x132));}return{'menuIds':_0x3c87ee,'paths':_0x530f56,'visible':_0x28a16b,'expectVisible':_0x325738,'expectedCount':_0x3a4bb9};}async function buildPlan(_0x4558e1,_0x32f57c){const _0x47b41f=a191_0x17acb3,_0x5d3921=parseInput(_0x4558e1),_0x17c6b2=await fetchMutationSnapshot(_0x4558e1,_0x47b41f(0x13e)),_0x10e1d8=selectTargets(_0x17c6b2[_0x47b41f(0xfa)],_0x5d3921[_0x47b41f(0xc4)],_0x5d3921[_0x47b41f(0x10d)]);if(_0x5d3921[_0x47b41f(0x122)]!==undefined&&_0x10e1d8[_0x47b41f(0xc0)]!==_0x5d3921[_0x47b41f(0x122)])throw menuError(_0x47b41f(0x10f),_0x47b41f(0xdb)+_0x10e1d8['length']+_0x47b41f(0x139)+_0x5d3921[_0x47b41f(0x122)]+'.',_0x47b41f(0xcd));if(_0x5d3921[_0x47b41f(0x115)]!==undefined){const _0x3b61cb=_0x10e1d8[_0x47b41f(0xe7)](_0x80fe42=>_0x80fe42[_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x115)]);if(_0x3b61cb[_0x47b41f(0xc0)]>0x0)throw menuError(_0x47b41f(0xd0),_0x47b41f(0x112)+_0x3b61cb[_0x47b41f(0x12f)](_0x53fa04=>_0x53fa04['id'])[_0x47b41f(0x127)](',\x20')+'.',_0x47b41f(0xf0));}const _0x222b96=_0x10e1d8[_0x47b41f(0x12f)](_0x59cd76=>({'id':_0x59cd76['id'],'label':_0x59cd76[_0x47b41f(0x102)],'path':_0x59cd76['path'],'before':{'visible':_0x59cd76[_0x47b41f(0x126)]},'after':{'visible':_0x5d3921['visible']}})),_0xa7f309=_0x222b96[_0x47b41f(0xe7)](_0x14e3e5=>_0x14e3e5[_0x47b41f(0x104)][_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x126)])[_0x47b41f(0x12f)](_0xc8ce3a=>({'stage':_0x47b41f(0x105),'method':'POST','path':_0x47b41f(0xf8),'body':{'appCode':_0x4558e1[_0x47b41f(0xcf)],'id':_0xc8ce3a['id'],'visible':_0x5d3921['visible']}})),_0x33857b=mutationResult({'operation':_0x47b41f(0xe1),'selector':{'menuIds':_0x5d3921[_0x47b41f(0xc4)],'paths':_0x5d3921[_0x47b41f(0x10d)]},'before':{'menus':_0x10e1d8['map'](_0x5818ef=>({'id':_0x5818ef['id'],'path':_0x5818ef['path'],'visible':_0x5818ef[_0x47b41f(0x126)]}))},'after':{'menus':_0x10e1d8['map'](_0x1a7d04=>({'id':_0x1a7d04['id'],'path':_0x1a7d04[_0x47b41f(0x12a)],'visible':_0x5d3921[_0x47b41f(0x126)]}))},'dryRun':_0x32f57c,'backend':[...BACKEND],'plannedActions':_0xa7f309,'snapshotHash':_0x17c6b2[_0x47b41f(0x135)],'warnings':_0xa7f309[_0x47b41f(0xc0)]===0x0?[_0x47b41f(0xe2)]:[]});return{'plan':{..._0x33857b,'requestedVisible':_0x5d3921[_0x47b41f(0x126)],'targets':_0x222b96},'beforeById':new Map(_0x10e1d8['map'](_0x50146e=>[_0x50146e['id'],_0x50146e]))};}function selectTargets(_0xf8fb3,_0x14cc36,_0x12ebfa){const _0x218f0e=a191_0x17acb3,_0x59c35f=new Map(_0xf8fb3['map'](_0x316a51=>[_0x316a51['id'],_0x316a51])),_0x4ce445=new Map(),_0x3a8cb3=_0x14cc36[_0x218f0e(0xe7)](_0x22fea5=>!_0x59c35f[_0x218f0e(0xdd)](_0x22fea5));if(_0x3a8cb3[_0x218f0e(0xc0)]>0x0)throw menuError('menu_selector_not_found','Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x3a8cb3['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15ab6f of _0x14cc36){_0x4ce445[_0x218f0e(0xda)](_0x15ab6f,_0x59c35f[_0x218f0e(0xf5)](_0x15ab6f));}for(const _0x165997 of _0x12ebfa){const _0x10f49b=_0xf8fb3['filter'](_0xcda646=>_0xcda646[_0x218f0e(0x12a)]===_0x165997);if(_0x10f49b[_0x218f0e(0xc0)]===0x0)throw menuError('menu_selector_not_found',_0x218f0e(0x113)+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0x114));if(_0x10f49b[_0x218f0e(0xc0)]>0x1)throw menuError(_0x218f0e(0xf3),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0xd5)+_0x10f49b['map'](_0x4bd042=>_0x4bd042['id'])[_0x218f0e(0x127)](',\x20')+'.');const _0x526ac0=_0x10f49b[0x0];_0x4ce445['set'](_0x526ac0['id'],_0x526ac0);}return[..._0x4ce445[_0x218f0e(0xf4)]()];}function parseMenuIds(_0x22a159){const _0x10d138=a191_0x17acb3,_0x3968ec=parseCsv(_0x22a159),_0x4d156e=_0x3968ec['map'](Number);if(_0x4d156e[_0x10d138(0x13b)](_0x2ea8d6=>!Number['isSafeInteger'](_0x2ea8d6)||_0x2ea8d6<=0x0))throw CliErrors[_0x10d138(0xdf)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x4d156e)];}function parseCsv(_0xcb8005){const _0x43affe=a191_0x17acb3;return[...new Set(_0xcb8005[_0x43affe(0x12c)](',')[_0x43affe(0x12f)](_0x4de1b3=>_0x4de1b3[_0x43affe(0xea)]())[_0x43affe(0xe7)](Boolean))];}function parseBooleanFlag(_0x8e14e7,_0x4600d2,_0x10158e){const _0x259196=a191_0x17acb3;if(!hasFlag(_0x8e14e7,_0x4600d2)){if(_0x10158e)throw CliErrors[_0x259196(0x10a)](_0x4600d2);return undefined;}const _0xf6f7b0=_0x8e14e7[_0x259196(0xec)][_0x4600d2];if(_0xf6f7b0===!![]||_0xf6f7b0===![])return _0xf6f7b0;if(_0xf6f7b0===_0x259196(0xce))return!![];if(_0xf6f7b0===_0x259196(0xcc))return![];throw CliErrors[_0x259196(0xdf)]('--'+_0x4600d2+_0x259196(0x134));}function verifyVisibilityUpdate(_0x3e024c,_0x363391,_0x51bc34){const _0x23db95=a191_0x17acb3;assertVerified(!!_0x363391,_0x23db95(0xfd)+_0x3e024c['id']+_0x23db95(0xf1)),assertVerified(_0x363391[_0x23db95(0x126)]===_0x51bc34,_0x23db95(0xfd)+_0x3e024c['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0xe5a2af=[['id',_0x363391['id'],_0x3e024c['id']],[_0x23db95(0xe0),_0x363391[_0x23db95(0xe0)],_0x3e024c[_0x23db95(0xe0)]],['depth',_0x363391[_0x23db95(0xd2)],_0x3e024c[_0x23db95(0xd2)]],['label',_0x363391['label'],_0x3e024c[_0x23db95(0x102)]],['path',_0x363391[_0x23db95(0x12a)],_0x3e024c['path']],[_0x23db95(0xee),_0x363391[_0x23db95(0xee)],_0x3e024c[_0x23db95(0xee)]],[_0x23db95(0x117),_0x363391[_0x23db95(0x117)],_0x3e024c[_0x23db95(0x117)]],[_0x23db95(0x11a),_0x363391[_0x23db95(0x11a)],_0x3e024c['sort']],[_0x23db95(0xde),_0x363391[_0x23db95(0xde)],_0x3e024c[_0x23db95(0xde)]],[_0x23db95(0x13c),_0x363391[_0x23db95(0x13c)],_0x3e024c[_0x23db95(0x13c)]],['childrenIds',_0x363391['childrenIds'],_0x3e024c[_0x23db95(0x12d)]],['childrenCount',_0x363391[_0x23db95(0x133)],_0x3e024c[_0x23db95(0x133)]],[_0x23db95(0xc2),_0x363391[_0x23db95(0xc2)],_0x3e024c['pageId']],['pageType',_0x363391[_0x23db95(0x103)],_0x3e024c['pageType']],[_0x23db95(0x109),_0x363391[_0x23db95(0x109)],_0x3e024c[_0x23db95(0x109)]],[_0x23db95(0x11e),_0x363391[_0x23db95(0x11e)],_0x3e024c[_0x23db95(0x11e)]],['datasetCode',_0x363391[_0x23db95(0xe4)],_0x3e024c[_0x23db95(0xe4)]]];for(const [_0x49a27a,_0x4764f0,_0x2b93f0]of _0xe5a2af){assertVerified(sameValue(_0x4764f0,_0x2b93f0),_0x23db95(0xfd)+_0x3e024c['id']+'\x20'+_0x49a27a+_0x23db95(0xc3));}}function sameValue(_0x1afcf2,_0x1a8da6){const _0x14c264=a191_0x17acb3;if(Array['isArray'](_0x1afcf2)||Array[_0x14c264(0x116)](_0x1a8da6))return JSON[_0x14c264(0xd4)](_0x1afcf2)===JSON[_0x14c264(0xd4)](_0x1a8da6);return _0x1afcf2===_0x1a8da6;}
1
+ const a191_0x553e7a=a191_0x17ed;(function(_0x25bf04,_0x5c7c37){const _0x3b9b00=a191_0x17ed,_0x41800c=_0x25bf04();while(!![]){try{const _0x31f4f4=-parseInt(_0x3b9b00(0xf0))/0x1*(parseInt(_0x3b9b00(0xb7))/0x2)+parseInt(_0x3b9b00(0xfd))/0x3+parseInt(_0x3b9b00(0xb1))/0x4+parseInt(_0x3b9b00(0xc3))/0x5+parseInt(_0x3b9b00(0xe5))/0x6+parseInt(_0x3b9b00(0xf1))/0x7*(-parseInt(_0x3b9b00(0x101))/0x8)+parseInt(_0x3b9b00(0xbc))/0x9*(-parseInt(_0x3b9b00(0xf7))/0xa);if(_0x31f4f4===_0x5c7c37)break;else _0x41800c['push'](_0x41800c['shift']());}catch(_0x440543){_0x41800c['push'](_0x41800c['shift']());}}}(a191_0x3b68,0x59462));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_0x553e7a(0xb2),'path':a191_0x553e7a(0x12f)}];export const menuVisibilityUpdate={'service':a191_0x553e7a(0x112),'command':a191_0x553e7a(0x117),'description':a191_0x553e7a(0xff),'risk':a191_0x553e7a(0xf2),'structuredErrors':!![],'flags':[{'name':a191_0x553e7a(0xd4),'type':'string','description':a191_0x553e7a(0xbb)},{'name':a191_0x553e7a(0xcc),'type':a191_0x553e7a(0x103),'description':a191_0x553e7a(0x131)},{'name':a191_0x553e7a(0xe1),'type':a191_0x553e7a(0x121),'required':!![],'description':a191_0x553e7a(0xf5)},{'name':a191_0x553e7a(0xe6),'type':a191_0x553e7a(0x121),'description':a191_0x553e7a(0xe2)},{'name':a191_0x553e7a(0x110),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc8280e){parseInput(_0xc8280e);},async 'dryRun'(_0x5a5b81){const _0xa917c2=a191_0x553e7a,_0x4ab707=await buildPlan(_0x5a5b81,!![]),_0x1a1b68=_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.['length']??0x0,_0x4cfdc6=_0x4ab707['plan'][_0xa917c2(0x127)]['length']-_0x1a1b68;return menuDryRunResult(_0x4ab707[_0xa917c2(0x126)],{'method':_0xa917c2(0xb2),'url':'/smartapi/menu/update','body':{'updates':_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.[_0xa917c2(0x122)](_0xff1fb6=>_0xff1fb6[_0xa917c2(0xe0)])??[]},'description':_0xa917c2(0xb8)+_0x1a1b68+_0xa917c2(0x104)+_0x4cfdc6+_0xa917c2(0x120)});},async 'execute'(_0x332c9d){const _0x1dd85b=a191_0x553e7a,_0x1d22f1=await buildPlan(_0x332c9d,![]);await recheckMutationSnapshot(_0x332c9d,_0x1d22f1[_0x1dd85b(0x126)],_0x1dd85b(0x12e));const _0x564fd5=[],_0x12b34d=[],_0x1b0c5d=[];for(const _0x2f1975 of _0x1d22f1['plan'][_0x1dd85b(0x127)]){if(_0x2f1975[_0x1dd85b(0xeb)][_0x1dd85b(0xe1)]===_0x1d22f1[_0x1dd85b(0x126)]['requestedVisible']){_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d['cookie'],{'id':_0x2f1975['id'],'visible':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]}),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':!![],'skipped':![]});}catch(_0x5fdbaa){const _0x23200c=mapMenuApiError(_0x5fdbaa,_0x1dd85b(0xdb),_0x2f1975['id']);if(isMenuResponseLoss(_0x5fdbaa)&&_0x23200c['code']!==_0x1dd85b(0x118)){_0x1b0c5d[_0x1dd85b(0xef)](_0x2f1975['id']);continue;}_0x12b34d['push']({'id':_0x2f1975['id'],'stage':_0x1dd85b(0xe3),'code':_0x23200c['code'],'message':_0x23200c[_0x1dd85b(0xfc)]});}}let _0x33b473;try{_0x33b473=await fetchMenuSnapshot(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d[_0x1dd85b(0xcd)]);}catch(_0x47e230){const _0x8ac113=describeMenuErrorCause(_0x47e230,_0x1dd85b(0x132)),_0x30c9ab=_0x1b0c5d[_0x1dd85b(0x122)](_0x21ad01=>({'id':_0x21ad01,'stage':_0x1dd85b(0x102),'code':_0x1dd85b(0xc4),'message':_0x1dd85b(0x12c)+_0x21ad01+_0x1dd85b(0xdc),'requestedStateConfirmed':![],'recovered':![]})),_0x36c9ad={'stage':'verification','code':_0x1dd85b(0xc4),'message':_0x1dd85b(0xd6),'targetIds':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x127)][_0x1dd85b(0x122)](_0xf786dd=>_0xf786dd['id']),'requestedStateConfirmed':![],..._0x8ac113};throw menuFailure(asVerificationError(_0x47e230,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x1d22f1[_0x1dd85b(0x126)],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x30c9ab,_0x36c9ad],'warnings':[_0x1dd85b(0x12b)],'verification':{'status':_0x1dd85b(0x10b),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3bb3a9=[];for(const _0x2efef7 of _0x564fd5){const _0x4e1bc1=Number(_0x2efef7['id']),_0x54e1c6=_0x1d22f1['beforeById'][_0x1dd85b(0xc8)](_0x4e1bc1),_0x1c0927=_0x33b473[_0x1dd85b(0x11e)]['get'](_0x4e1bc1);try{verifyVisibilityUpdate(_0x54e1c6,_0x1c0927,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]);}catch(_0x3eeb87){const _0x144822=asVerificationError(_0x3eeb87,_0x1dd85b(0x129)+_0x4e1bc1+_0x1dd85b(0x11b));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x4e1bc1,'stage':'verification','code':_0x144822[_0x1dd85b(0xca)],'message':_0x144822[_0x1dd85b(0xfc)],'requestedStateConfirmed':![]});}}for(const _0x2723f5 of _0x1b0c5d){const _0x2ea9a0=_0x1d22f1[_0x1dd85b(0xe8)][_0x1dd85b(0xc8)](_0x2723f5),_0xc8d215=_0x33b473[_0x1dd85b(0x11e)][_0x1dd85b(0xc8)](_0x2723f5);try{verifyVisibilityUpdate(_0x2ea9a0,_0xc8d215,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2723f5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5907d5){const _0xd72dfc=asVerificationError(_0x5907d5,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2723f5+_0x1dd85b(0x11d));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x2723f5,'stage':_0x1dd85b(0x102),'code':_0xd72dfc[_0x1dd85b(0xca)],'message':_0xd72dfc[_0x1dd85b(0xfc)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3bb3a9[_0x1dd85b(0xc2)]>0x0){const _0x5ef956=_0x3bb3a9[_0x1dd85b(0x122)](_0x595645=>Number(_0x595645['id'])),_0x4f1fd0=_0x564fd5['filter'](_0x5a6290=>_0x5a6290[_0x1dd85b(0xfa)]===!![])['length'],_0x498e52=menuError('menu_verification_failed',_0x1dd85b(0xc9)+_0x5ef956['join'](',\x20')+'.',_0x1dd85b(0xf6));throw menuFailure(_0x498e52,_0x1d22f1['plan'],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x3bb3a9],'warnings':[_0x1dd85b(0x113)],'verification':{'status':'failed',..._0x5ef956[_0x1dd85b(0xc2)]===0x1?{'targetId':_0x5ef956[0x0]}:{'targetIds':_0x5ef956},'recoveredCount':_0x4f1fd0,'lookupCommand':_0x1dd85b(0xea)}});}const _0x77da19=_0x564fd5[_0x1dd85b(0xe7)](_0x4336f2=>_0x4336f2[_0x1dd85b(0xd0)]===!![])[_0x1dd85b(0xc2)],_0x4ae214=_0x564fd5[_0x1dd85b(0xc2)]-_0x77da19,_0x2425e9={..._0x1d22f1[_0x1dd85b(0x126)],'succeeded':_0x564fd5,'failed':_0x12b34d,'warnings':_0x12b34d[_0x1dd85b(0xc2)]>0x0?[..._0x1d22f1['plan'][_0x1dd85b(0xde)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0xde)],'verification':{'checkedBy':_0x1dd85b(0xf9),'snapshotHash':_0x33b473[_0x1dd85b(0x125)],'matchesRequestedState':_0x12b34d['length']===0x0,'recoveredCount':_0x1b0c5d[_0x1dd85b(0xc2)]}};return{'ok':_0x12b34d[_0x1dd85b(0xc2)]===0x0,'data':_0x2425e9,'message':_0x12b34d[_0x1dd85b(0xc2)]===0x0?_0x1dd85b(0x10c)+_0x77da19+_0x1dd85b(0x111)+_0x4ae214+_0x1dd85b(0x120):_0x1dd85b(0xf3)+_0x77da19+_0x1dd85b(0x10d)+_0x4ae214+'\x20skipped,\x20'+_0x12b34d[_0x1dd85b(0xc2)]+_0x1dd85b(0x108)};}};function parseInput(_0x37d528){const _0x20d0f7=a191_0x553e7a,_0x4ee462=parseMenuIds(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xd4))),_0x58024a=parseCsv(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xcc)));if(_0x4ee462[_0x20d0f7(0xc2)]===0x0&&_0x58024a[_0x20d0f7(0xc2)]===0x0)throw CliErrors['validation'](_0x20d0f7(0x12a));const _0x3bb244=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe1),!![]),_0x471dad=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe6),![]);let _0x4729a3;if(hasFlag(_0x37d528,_0x20d0f7(0x110))){_0x4729a3=_0x37d528[_0x20d0f7(0xbd)](_0x20d0f7(0x110));if(!Number[_0x20d0f7(0xf4)](_0x4729a3)||_0x4729a3<0x0)throw CliErrors[_0x20d0f7(0xfe)](_0x20d0f7(0x124));}return{'menuIds':_0x4ee462,'paths':_0x58024a,'visible':_0x3bb244,'expectVisible':_0x471dad,'expectedCount':_0x4729a3};}function a191_0x3b68(){const _0x79cf56=['datasetCode','update-menu-visibility','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','type','update\x20visibility\x20for','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','resourcesValid','warnings','label','body','visible','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','update','Selected\x20','4242030qRQJdV','expect-visible','filter','beforeById','\x20must\x20be\x20true\x20or\x20false.','rabetbase\x20menu\x20list\x20--format\x20compress','before','flagMissing','pageId','datasetId','push','13576ULXGbl','288631zKJDNK','write','Menu\x20visibility\x20update\x20completed:\x20','isSafeInteger','Requested\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','37780oXArcR','appCode','menu\x20list','recovered','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','716991AaJulq','validation','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','sort','24ZHeeFc','update-recovery','string','\x20menu(s);\x20skip\x20','url','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20failed.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_selector_not_found','failed','Updated\x20visibility\x20for\x20','\x20updated,\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','expected-count','\x20menu(s);\x20skipped\x20','menu','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','requestedVisible','modelType','menus','visibility-update','menu_permission_denied','path','some','\x20visibility\x20update\x20could\x20not\x20be\x20verified','parentId','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','byId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20unchanged\x20menu(s).','boolean','map','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','hash','plan','targets','join','Menu\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Response\x20was\x20lost\x20for\x20menu\x20','true','update\x20menu\x20visibility','/smartapi/menu/update','menu_state_drift','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','verify\x20menu\x20visibility\x20update','false','pageType','2306832QXfgoE','POST','set','menu_expected_count_mismatch','expectedCount','has','64Pnktxd','Would\x20update\x20visibility\x20for\x20','depth','menuIds','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','1836kAaUrm','num','stringify','split','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','str','length','858995gQXpJR','menu_verification_failed','rawFlags','verification','expectVisible','get','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','code','resources','paths','cookie','childrenIds','values','updated','menu_selector_ambiguous','childrenCount','trim','menu-ids','isArray','Final\x20menu\x20visibility\x20readback\x20failed.'];a191_0x3b68=function(){return _0x79cf56;};return a191_0x3b68();}async function buildPlan(_0x15381b,_0x3fccd9){const _0x4ac765=a191_0x553e7a,_0x264498=parseInput(_0x15381b),_0x3fcb45=await fetchMutationSnapshot(_0x15381b,'update\x20menu\x20visibility'),_0x2d78a1=selectTargets(_0x3fcb45[_0x4ac765(0x116)],_0x264498['menuIds'],_0x264498[_0x4ac765(0xcc)]);if(_0x264498[_0x4ac765(0xb5)]!==undefined&&_0x2d78a1[_0x4ac765(0xc2)]!==_0x264498[_0x4ac765(0xb5)])throw menuError(_0x4ac765(0xb4),_0x4ac765(0xe4)+_0x2d78a1['length']+'\x20menu(s),\x20expected\x20'+_0x264498['expectedCount']+'.',_0x4ac765(0x10f));if(_0x264498[_0x4ac765(0xc7)]!==undefined){const _0x493dfb=_0x2d78a1[_0x4ac765(0xe7)](_0x2c209b=>_0x2c209b[_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xc7)]);if(_0x493dfb[_0x4ac765(0xc2)]>0x0)throw menuError(_0x4ac765(0x130),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x493dfb['map'](_0x3bc694=>_0x3bc694['id'])['join'](',\x20')+'.',_0x4ac765(0x123));}const _0xff84e3=_0x2d78a1[_0x4ac765(0x122)](_0x2d3b89=>({'id':_0x2d3b89['id'],'label':_0x2d3b89[_0x4ac765(0xdf)],'path':_0x2d3b89[_0x4ac765(0x119)],'before':{'visible':_0x2d3b89[_0x4ac765(0xe1)]},'after':{'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x26cfd2=_0xff84e3[_0x4ac765(0xe7)](_0x4115c4=>_0x4115c4['before'][_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xe1)])[_0x4ac765(0x122)](_0x5a888c=>({'stage':_0x4ac765(0xd8),'method':_0x4ac765(0xb2),'path':_0x4ac765(0x12f),'body':{'appCode':_0x15381b[_0x4ac765(0xf8)],'id':_0x5a888c['id'],'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x19d598=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x264498[_0x4ac765(0xba)],'paths':_0x264498[_0x4ac765(0xcc)]},'before':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x5794fa=>({'id':_0x5794fa['id'],'path':_0x5794fa[_0x4ac765(0x119)],'visible':_0x5794fa[_0x4ac765(0xe1)]}))},'after':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x3f9d37=>({'id':_0x3f9d37['id'],'path':_0x3f9d37[_0x4ac765(0x119)],'visible':_0x264498[_0x4ac765(0xe1)]}))},'dryRun':_0x3fccd9,'backend':[...BACKEND],'plannedActions':_0x26cfd2,'snapshotHash':_0x3fcb45[_0x4ac765(0x125)],'warnings':_0x26cfd2[_0x4ac765(0xc2)]===0x0?[_0x4ac765(0x11f)]:[]});return{'plan':{..._0x19d598,'requestedVisible':_0x264498['visible'],'targets':_0xff84e3},'beforeById':new Map(_0x2d78a1[_0x4ac765(0x122)](_0xf2112c=>[_0xf2112c['id'],_0xf2112c]))};}function selectTargets(_0x72796d,_0x2666ff,_0x5b38a9){const _0x73dbb4=a191_0x553e7a,_0x39b7c6=new Map(_0x72796d[_0x73dbb4(0x122)](_0x628689=>[_0x628689['id'],_0x628689])),_0x5922eb=new Map(),_0x23ebe1=_0x2666ff[_0x73dbb4(0xe7)](_0x4ed564=>!_0x39b7c6[_0x73dbb4(0xb6)](_0x4ed564));if(_0x23ebe1['length']>0x0)throw menuError(_0x73dbb4(0x10a),_0x73dbb4(0x107)+_0x23ebe1['join'](',\x20')+'.',_0x73dbb4(0x106));for(const _0x3922b8 of _0x2666ff){_0x5922eb[_0x73dbb4(0xb3)](_0x3922b8,_0x39b7c6[_0x73dbb4(0xc8)](_0x3922b8));}for(const _0x4a450e of _0x5b38a9){const _0x33e215=_0x72796d['filter'](_0x578f32=>_0x578f32[_0x73dbb4(0x119)]===_0x4a450e);if(_0x33e215['length']===0x0)throw menuError(_0x73dbb4(0x10a),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x73dbb4(0xbe)](_0x4a450e)+'.',_0x73dbb4(0xc0));if(_0x33e215[_0x73dbb4(0xc2)]>0x1)throw menuError(_0x73dbb4(0xd1),_0x73dbb4(0x10e)+JSON['stringify'](_0x4a450e)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x33e215[_0x73dbb4(0x122)](_0x57b9b7=>_0x57b9b7['id'])[_0x73dbb4(0x128)](',\x20')+'.');const _0xe7ce04=_0x33e215[0x0];_0x5922eb['set'](_0xe7ce04['id'],_0xe7ce04);}return[..._0x5922eb[_0x73dbb4(0xcf)]()];}function a191_0x17ed(_0x5b87ea,_0x5c6016){_0x5b87ea=_0x5b87ea-0xb0;const _0x3b680d=a191_0x3b68();let _0x17ed3f=_0x3b680d[_0x5b87ea];return _0x17ed3f;}function parseMenuIds(_0x23626e){const _0x297234=a191_0x553e7a,_0xba6181=parseCsv(_0x23626e),_0x114795=_0xba6181[_0x297234(0x122)](Number);if(_0x114795[_0x297234(0x11a)](_0x907f2b=>!Number[_0x297234(0xf4)](_0x907f2b)||_0x907f2b<=0x0))throw CliErrors['validation'](_0x297234(0xd9));return[...new Set(_0x114795)];}function parseCsv(_0x21db59){const _0x4cb54d=a191_0x553e7a;return[...new Set(_0x21db59[_0x4cb54d(0xbf)](',')[_0x4cb54d(0x122)](_0x2275af=>_0x2275af[_0x4cb54d(0xd3)]())[_0x4cb54d(0xe7)](Boolean))];}function parseBooleanFlag(_0x46ecb2,_0x207600,_0x16be88){const _0x3e65e9=a191_0x553e7a;if(!hasFlag(_0x46ecb2,_0x207600)){if(_0x16be88)throw CliErrors[_0x3e65e9(0xec)](_0x207600);return undefined;}const _0x4793db=_0x46ecb2[_0x3e65e9(0xc5)][_0x207600];if(_0x4793db===!![]||_0x4793db===![])return _0x4793db;if(_0x4793db===_0x3e65e9(0x12d))return!![];if(_0x4793db===_0x3e65e9(0x133))return![];throw CliErrors['validation']('--'+_0x207600+_0x3e65e9(0xe9));}function verifyVisibilityUpdate(_0x3dbb98,_0x54a0ef,_0x5de3f6){const _0x4d9b9e=a191_0x553e7a;assertVerified(!!_0x54a0ef,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0xfb)),assertVerified(_0x54a0ef[_0x4d9b9e(0xe1)]===_0x5de3f6,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0x109));const _0x495e85=[['id',_0x54a0ef['id'],_0x3dbb98['id']],[_0x4d9b9e(0x11c),_0x54a0ef[_0x4d9b9e(0x11c)],_0x3dbb98[_0x4d9b9e(0x11c)]],[_0x4d9b9e(0xb9),_0x54a0ef[_0x4d9b9e(0xb9)],_0x3dbb98['depth']],['label',_0x54a0ef[_0x4d9b9e(0xdf)],_0x3dbb98[_0x4d9b9e(0xdf)]],[_0x4d9b9e(0x119),_0x54a0ef[_0x4d9b9e(0x119)],_0x3dbb98[_0x4d9b9e(0x119)]],['url',_0x54a0ef[_0x4d9b9e(0x105)],_0x3dbb98[_0x4d9b9e(0x105)]],[_0x4d9b9e(0xda),_0x54a0ef[_0x4d9b9e(0xda)],_0x3dbb98[_0x4d9b9e(0xda)]],[_0x4d9b9e(0x100),_0x54a0ef[_0x4d9b9e(0x100)],_0x3dbb98[_0x4d9b9e(0x100)]],[_0x4d9b9e(0xcb),_0x54a0ef[_0x4d9b9e(0xcb)],_0x3dbb98[_0x4d9b9e(0xcb)]],[_0x4d9b9e(0xdd),_0x54a0ef[_0x4d9b9e(0xdd)],_0x3dbb98['resourcesValid']],[_0x4d9b9e(0xce),_0x54a0ef['childrenIds'],_0x3dbb98['childrenIds']],[_0x4d9b9e(0xd2),_0x54a0ef[_0x4d9b9e(0xd2)],_0x3dbb98[_0x4d9b9e(0xd2)]],[_0x4d9b9e(0xed),_0x54a0ef['pageId'],_0x3dbb98[_0x4d9b9e(0xed)]],[_0x4d9b9e(0xb0),_0x54a0ef['pageType'],_0x3dbb98[_0x4d9b9e(0xb0)]],[_0x4d9b9e(0x115),_0x54a0ef[_0x4d9b9e(0x115)],_0x3dbb98[_0x4d9b9e(0x115)]],[_0x4d9b9e(0xee),_0x54a0ef['datasetId'],_0x3dbb98[_0x4d9b9e(0xee)]],[_0x4d9b9e(0xd7),_0x54a0ef[_0x4d9b9e(0xd7)],_0x3dbb98[_0x4d9b9e(0xd7)]]];for(const [_0x305775,_0x41389f,_0x47cbb5]of _0x495e85){assertVerified(sameValue(_0x41389f,_0x47cbb5),'Menu\x20'+_0x3dbb98['id']+'\x20'+_0x305775+'\x20changed\x20unexpectedly.');}}function sameValue(_0x3a1ef2,_0x1e36f6){const _0x206137=a191_0x553e7a;if(Array[_0x206137(0xd5)](_0x3a1ef2)||Array[_0x206137(0xd5)](_0x1e36f6))return JSON[_0x206137(0xbe)](_0x3a1ef2)===JSON['stringify'](_0x1e36f6);return _0x3a1ef2===_0x1e36f6;}
@@ -1 +1 @@
1
- const a192_0x40e158=a192_0xfef7;(function(_0x2370f0,_0x3ec76b){const _0x29a1c6=a192_0xfef7,_0x4a71a6=_0x2370f0();while(!![]){try{const _0xc0556f=parseInt(_0x29a1c6(0x19e))/0x1+parseInt(_0x29a1c6(0x1b3))/0x2+-parseInt(_0x29a1c6(0x1a5))/0x3*(parseInt(_0x29a1c6(0x1b5))/0x4)+parseInt(_0x29a1c6(0x1ad))/0x5+parseInt(_0x29a1c6(0x1ae))/0x6+-parseInt(_0x29a1c6(0x1a9))/0x7*(-parseInt(_0x29a1c6(0x198))/0x8)+-parseInt(_0x29a1c6(0x19f))/0x9;if(_0xc0556f===_0x3ec76b)break;else _0x4a71a6['push'](_0x4a71a6['shift']());}catch(_0x3862a5){_0x4a71a6['push'](_0x4a71a6['shift']());}}}(a192_0x4283,0x2950c));function a192_0xfef7(_0x21f3c2,_0x41ecda){_0x21f3c2=_0x21f3c2-0x196;const _0x4283ec=a192_0x4283();let _0xfef70f=_0x4283ec[_0x21f3c2];return _0xfef70f;}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_0x40e158(0x19a);async function prepareCreate(_0x383e66){const _0x1abfc3=a192_0x40e158,_0x27327b=await readNotificationDocument(_0x383e66,_0x1abfc3(0x199)),_0x45bfe7=createMutationInput(_0x383e66[_0x1abfc3(0x1a0)],_0x27327b);return{'document':_0x27327b,'input':_0x45bfe7,'planned':projectNotificationConfig({'appCode':_0x383e66[_0x1abfc3(0x1a0)],'configName':_0x27327b['configName'],'channelType':_0x27327b[_0x1abfc3(0x1ac)],'endpointUrl':_0x27327b['endpointUrl'],'channelConfig':_0x27327b['channelConfig'],'description':_0x27327b['description'],'connectTimeout':_0x27327b[_0x1abfc3(0x1a4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x27327b['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x4283(){const _0x2ad6dc=['notification_config_create_outcome_unknown','config-create',';\x20do\x20not\x20resubmit.','POST','184126qIamzt','Created\x20notification\x20config\x20','5732RqsyQh','notification','input','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2728HxsCuJ','create','/notification/channel-config/create','verification','document','Inspect\x20with\x20','76010RYByQd','2996847QusJwC','appCode','verified','write','configName','connectTimeout','81OtGdtj','isSafeInteger','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','mutation','917rEtfOp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configCode','channelType','272225bbJjnR','1642278bgbFCm'];a192_0x4283=function(){return _0x2ad6dc;};return a192_0x4283();}export const notificationConfigCreate={'service':a192_0x40e158(0x1b6),'command':a192_0x40e158(0x1b0),'description':a192_0x40e158(0x1a7),'risk':a192_0x40e158(0x1a2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x53fd4e){assertSingleNotificationSource(_0x53fd4e);},async 'dryRun'(_0x563b98){const _0x5448c7=a192_0x40e158,_0x2887a9=await prepareCreate(_0x563b98),_0x3097c3=notificationLookupCommand(_0x563b98[_0x5448c7(0x1a0)],_0x2887a9['document'][_0x5448c7(0x1ac)]);return asDryRunResult({'operation':_0x5448c7(0x199),'selector':{'appCode':_0x563b98[_0x5448c7(0x1a0)],'configName':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1a3)],'channelType':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1ac)]},'before':null,'after':_0x2887a9[_0x5448c7(0x196)],'dryRun':!![],'backend':{'method':_0x5448c7(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5448c7(0x196),'lookupCommand':_0x3097c3}},{'method':_0x5448c7(0x1b2),'url':CREATE_PATH});},async 'execute'(_0xdf93c){const _0x3f0325=a192_0x40e158,_0x299d8d=await prepareCreate(_0xdf93c),_0x855c5e=notificationLookupCommand(_0xdf93c['appCode'],_0x299d8d[_0x3f0325(0x19c)][_0x3f0325(0x1ac)]);let _0x1e3b2c;try{_0x1e3b2c=await createNotificationChannelConfig(_0x299d8d[_0x3f0325(0x1b7)]);}catch(_0x7ae5){if(isPlatformTransportFailure(_0x7ae5))throw notificationError(_0x3f0325(0x1af),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));throw safeApiFailure('create',_0x3f0325(0x1a8),'Inspect\x20with\x20'+_0x855c5e+_0x3f0325(0x197));}if(!Number[_0x3f0325(0x1a6)](_0x1e3b2c)||_0x1e3b2c<=0x0)throw notificationError(_0x3f0325(0x1af),_0x3f0325(0x1aa),_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));let _0x289d2d;try{const _0x5d1b52=await getNotificationChannelConfig(_0x1e3b2c,_0xdf93c['appCode']);_0x289d2d=normalizeExactNotificationConfig(_0x5d1b52,_0x1e3b2c,_0xdf93c['appCode']);}catch{throw safeApiFailure(_0x3f0325(0x199),_0x3f0325(0x19b),_0x3f0325(0x19d)+_0x855c5e+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x3f0325(0x199),'selector':{'appCode':_0x289d2d[_0x3f0325(0x1a0)],'id':_0x289d2d['id'],'configCode':_0x289d2d[_0x3f0325(0x1ab)],'configName':_0x289d2d['configName'],'channelType':_0x289d2d[_0x3f0325(0x1ac)]},'before':null,'after':projectNotificationConfig(_0x289d2d),'dryRun':![],'backend':{'method':_0x3f0325(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3f0325(0x1a1),'lookupCommand':_0x855c5e}},'message':_0x3f0325(0x1b4)+_0x289d2d['id']};}};
1
+ const a192_0x5d2ac0=a192_0x4b1c;(function(_0x6e4eb2,_0x479475){const _0x4085db=a192_0x4b1c,_0x331977=_0x6e4eb2();while(!![]){try{const _0x15e3fd=-parseInt(_0x4085db(0xc8))/0x1*(-parseInt(_0x4085db(0xe4))/0x2)+parseInt(_0x4085db(0xda))/0x3+parseInt(_0x4085db(0xd8))/0x4+-parseInt(_0x4085db(0xd0))/0x5*(-parseInt(_0x4085db(0xd6))/0x6)+parseInt(_0x4085db(0xc4))/0x7+parseInt(_0x4085db(0xe3))/0x8*(parseInt(_0x4085db(0xc7))/0x9)+-parseInt(_0x4085db(0xdb))/0xa;if(_0x15e3fd===_0x479475)break;else _0x331977['push'](_0x331977['shift']());}catch(_0x41e05e){_0x331977['push'](_0x331977['shift']());}}}(a192_0x21ab,0xc503d));function a192_0x4b1c(_0x38f6c5,_0x49ed0d){_0x38f6c5=_0x38f6c5-0xc3;const _0x21aba6=a192_0x21ab();let _0x4b1c25=_0x21aba6[_0x38f6c5];return _0x4b1c25;}function a192_0x21ab(){const _0xe9be6e=['document',';\x20do\x20not\x20resubmit.','notification_config_create_outcome_unknown','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5537334oJywGI','description','3304108UcmpsQ','planned','596253HRuSTw','33340540onYMWt','verification','input','create','isSafeInteger','mutation','Inspect\x20with\x20','channelType','5917456emRdMm','308kQumwz','endpointUrl','configCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.','configName','9486904oiwXyD','verified','/notification/channel-config/create','9NlYKKF','639vPnXal','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','write','channelConfig','config-create','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','POST','notification','5ZhqQxL','appCode'];a192_0x21ab=function(){return _0xe9be6e;};return a192_0x21ab();}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_0x5d2ac0(0xc6);async function prepareCreate(_0x5b5c8a){const _0x4ae673=a192_0x5d2ac0,_0x21c353=await readNotificationDocument(_0x5b5c8a,_0x4ae673(0xde)),_0x2b3ef4=createMutationInput(_0x5b5c8a[_0x4ae673(0xd1)],_0x21c353);return{'document':_0x21c353,'input':_0x2b3ef4,'planned':projectNotificationConfig({'appCode':_0x5b5c8a['appCode'],'configName':_0x21c353[_0x4ae673(0xc3)],'channelType':_0x21c353[_0x4ae673(0xe2)],'endpointUrl':_0x21c353[_0x4ae673(0xe5)],'channelConfig':_0x21c353[_0x4ae673(0xcb)],'description':_0x21c353[_0x4ae673(0xd7)],'connectTimeout':_0x21c353['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x21c353['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x5d2ac0(0xcf),'command':a192_0x5d2ac0(0xcc),'description':a192_0x5d2ac0(0xd5),'risk':a192_0x5d2ac0(0xca),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x32e5ee){assertSingleNotificationSource(_0x32e5ee);},async 'dryRun'(_0x535a76){const _0x1da145=a192_0x5d2ac0,_0x9a9b61=await prepareCreate(_0x535a76),_0x5eb47b=notificationLookupCommand(_0x535a76[_0x1da145(0xd1)],_0x9a9b61[_0x1da145(0xd2)][_0x1da145(0xe2)]);return asDryRunResult({'operation':_0x1da145(0xde),'selector':{'appCode':_0x535a76[_0x1da145(0xd1)],'configName':_0x9a9b61[_0x1da145(0xd2)][_0x1da145(0xc3)],'channelType':_0x9a9b61['document'][_0x1da145(0xe2)]},'before':null,'after':_0x9a9b61[_0x1da145(0xd9)],'dryRun':!![],'backend':{'method':_0x1da145(0xce),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1da145(0xd9),'lookupCommand':_0x5eb47b}},{'method':_0x1da145(0xce),'url':CREATE_PATH});},async 'execute'(_0x4f16cd){const _0x30c2f6=a192_0x5d2ac0,_0x3f81dc=await prepareCreate(_0x4f16cd),_0x19a75b=notificationLookupCommand(_0x4f16cd[_0x30c2f6(0xd1)],_0x3f81dc[_0x30c2f6(0xd2)][_0x30c2f6(0xe2)]);let _0xe89021;try{_0xe89021=await createNotificationChannelConfig(_0x3f81dc[_0x30c2f6(0xdd)]);}catch(_0x4acbe3){if(isPlatformTransportFailure(_0x4acbe3))throw notificationError(_0x30c2f6(0xd4),_0x30c2f6(0xc9),_0x30c2f6(0xe1)+_0x19a75b+_0x30c2f6(0xd3));throw safeApiFailure('create',_0x30c2f6(0xe0),_0x30c2f6(0xe1)+_0x19a75b+_0x30c2f6(0xe7));}if(!Number[_0x30c2f6(0xdf)](_0xe89021)||_0xe89021<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x30c2f6(0xcd),'Inspect\x20with\x20'+_0x19a75b+_0x30c2f6(0xd3));let _0x1e49cc;try{const _0x15181e=await getNotificationChannelConfig(_0xe89021,_0x4f16cd[_0x30c2f6(0xd1)]);_0x1e49cc=normalizeExactNotificationConfig(_0x15181e,_0xe89021,_0x4f16cd[_0x30c2f6(0xd1)]);}catch{throw safeApiFailure(_0x30c2f6(0xde),_0x30c2f6(0xdc),_0x30c2f6(0xe1)+_0x19a75b+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x30c2f6(0xde),'selector':{'appCode':_0x1e49cc['appCode'],'id':_0x1e49cc['id'],'configCode':_0x1e49cc[_0x30c2f6(0xe6)],'configName':_0x1e49cc[_0x30c2f6(0xc3)],'channelType':_0x1e49cc[_0x30c2f6(0xe2)]},'before':null,'after':projectNotificationConfig(_0x1e49cc),'dryRun':![],'backend':{'method':_0x30c2f6(0xce),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x30c2f6(0xc5),'lookupCommand':_0x19a75b}},'message':'Created\x20notification\x20config\x20'+_0x1e49cc['id']};}};
@@ -1 +1 @@
1
- const a193_0x30b77c=a193_0x3c83;(function(_0x33000b,_0x13ad34){const _0x543c65=a193_0x3c83,_0x4119ed=_0x33000b();while(!![]){try{const _0x2bae8b=-parseInt(_0x543c65(0x119))/0x1+parseInt(_0x543c65(0x10b))/0x2*(-parseInt(_0x543c65(0x114))/0x3)+-parseInt(_0x543c65(0x11b))/0x4*(-parseInt(_0x543c65(0x111))/0x5)+-parseInt(_0x543c65(0x10a))/0x6*(-parseInt(_0x543c65(0x10d))/0x7)+-parseInt(_0x543c65(0x107))/0x8*(-parseInt(_0x543c65(0x117))/0x9)+-parseInt(_0x543c65(0x10e))/0xa*(parseInt(_0x543c65(0x11c))/0xb)+parseInt(_0x543c65(0x108))/0xc;if(_0x2bae8b===_0x13ad34)break;else _0x4119ed['push'](_0x4119ed['shift']());}catch(_0x3a437c){_0x4119ed['push'](_0x4119ed['shift']());}}}(a193_0x2147,0x6cb04));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x2147(){const _0xd5f8ff=['Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','35645BZRiaX','Inspect\x20with\x20','POST','890952nfqAid','some','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','9wLaEwy','mutation','412996SuxMqT','appCode','460XIOYGK','44pKVEdO','verified',';\x20do\x20not\x20resubmit\x20automatically.','before','delete','/notification/channel-config/delete','\x20delete\x20could\x20not\x20be\x20verified.','planned','config-delete','Notification\x20config\x20','notification_config_delete_verification_failed','notification','channelType','3862024fTirqg','314940WQaUsw','high-risk-write','18UnDmZr','2LjHDfv','notification_config_delete_outcome_unknown','1378979UoJXjf','1911640tIdzOg'];a193_0x2147=function(){return _0xd5f8ff;};return a193_0x2147();}function a193_0x3c83(_0x5cab02,_0x3138a6){_0x5cab02=_0x5cab02-0x100;const _0x214710=a193_0x2147();let _0x3c8392=_0x214710[_0x5cab02];return _0x3c8392;}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';const DELETE_PATH=a193_0x30b77c(0x121),REFERENCE_WARNING=a193_0x30b77c(0x10f);async function prepareDelete(_0x2cd978){const _0x41fb82=a193_0x30b77c,_0x5ede00=readNotificationId(_0x2cd978),_0x2ee5b8=await requireExactNotificationConfig(_0x2cd978['appCode'],_0x5ede00,_0x41fb82(0x120));return{'id':_0x5ede00,'before':_0x2ee5b8};}export const notificationConfigDelete={'service':a193_0x30b77c(0x105),'command':a193_0x30b77c(0x102),'description':a193_0x30b77c(0x110),'risk':a193_0x30b77c(0x109),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5f497e){readNotificationId(_0x5f497e),requireNotificationExplicitYes(_0x5f497e);},async 'dryRun'(_0x2ac991){const _0x50fe80=a193_0x30b77c,_0x194873=await prepareDelete(_0x2ac991),_0x14eae0=notificationLookupCommand(_0x2ac991[_0x50fe80(0x11a)],_0x194873[_0x50fe80(0x11f)][_0x50fe80(0x106)]);return asDryRunResult({'operation':_0x50fe80(0x120),'selector':notificationSelector(_0x194873['before']),'before':projectNotificationConfig(_0x194873['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x50fe80(0x101),'lookupCommand':_0x14eae0}},{'method':_0x50fe80(0x113),'url':DELETE_PATH});},async 'execute'(_0x2d9cf8){const _0x2c121a=a193_0x30b77c;requireNotificationExplicitYes(_0x2d9cf8);const _0x560809=await prepareDelete(_0x2d9cf8),_0x2cd576=notificationLookupCommand(_0x2d9cf8['appCode'],_0x560809['before']['channelType']);let _0x1cf451=![];try{await deleteNotificationChannelConfig(_0x560809['id'],_0x2d9cf8[_0x2c121a(0x11a)]);}catch(_0x171f5f){if(!isPlatformTransportFailure(_0x171f5f))throw safeApiFailure(_0x2c121a(0x120),_0x2c121a(0x118),'Inspect\x20with\x20'+_0x2cd576+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1cf451=!![];}let _0x47c43e;try{_0x47c43e=await listNotificationChannelConfigs(_0x2d9cf8['appCode'],_0x560809['before'][_0x2c121a(0x106)]),validateNotificationDeleteReadback(_0x47c43e,_0x2d9cf8[_0x2c121a(0x11a)],_0x560809[_0x2c121a(0x11f)][_0x2c121a(0x106)]);}catch{throw notificationError(_0x1cf451?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x560809['id']+_0x2c121a(0x100),_0x2c121a(0x112)+_0x2cd576+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x47c43e[_0x2c121a(0x115)](_0x597219=>_0x597219['id']===_0x560809['id']))throw notificationError(_0x1cf451?_0x2c121a(0x10c):_0x2c121a(0x104),_0x2c121a(0x103)+_0x560809['id']+'\x20remains\x20present\x20after\x20delete.',_0x2c121a(0x112)+_0x2cd576+_0x2c121a(0x11e));const _0x31af3c=[REFERENCE_WARNING];return _0x1cf451&&_0x31af3c['unshift'](_0x2c121a(0x116)),{'ok':!![],'data':{'operation':_0x2c121a(0x120),'selector':notificationSelector(_0x560809[_0x2c121a(0x11f)]),'before':projectNotificationConfig(_0x560809[_0x2c121a(0x11f)]),'after':null,'dryRun':![],'backend':{'method':_0x2c121a(0x113),'path':DELETE_PATH},'warnings':_0x31af3c,'verification':{'status':_0x2c121a(0x11d),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1cf451,'lookupCommand':_0x2cd576}},'message':'Deleted\x20notification\x20config\x20'+_0x560809['id']};}};
1
+ const a193_0x57d6d1=a193_0x2cd4;(function(_0x12e500,_0xa0075b){const _0x4ec66b=a193_0x2cd4,_0x175ec2=_0x12e500();while(!![]){try{const _0x25d1fd=parseInt(_0x4ec66b(0x197))/0x1*(-parseInt(_0x4ec66b(0x190))/0x2)+parseInt(_0x4ec66b(0x17b))/0x3+parseInt(_0x4ec66b(0x174))/0x4*(parseInt(_0x4ec66b(0x18a))/0x5)+-parseInt(_0x4ec66b(0x188))/0x6*(parseInt(_0x4ec66b(0x182))/0x7)+-parseInt(_0x4ec66b(0x178))/0x8*(parseInt(_0x4ec66b(0x17d))/0x9)+-parseInt(_0x4ec66b(0x183))/0xa+parseInt(_0x4ec66b(0x177))/0xb*(parseInt(_0x4ec66b(0x18b))/0xc);if(_0x25d1fd===_0xa0075b)break;else _0x175ec2['push'](_0x175ec2['shift']());}catch(_0x829ccf){_0x175ec2['push'](_0x175ec2['shift']());}}}(a193_0x10e6,0xa64cc));import{asDryRunResult}from'../../commands/common/dry-run.js';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';const DELETE_PATH=a193_0x57d6d1(0x187),REFERENCE_WARNING=a193_0x57d6d1(0x186);function a193_0x2cd4(_0xed9bb3,_0x51a221){_0xed9bb3=_0xed9bb3-0x174;const _0x10e67a=a193_0x10e6();let _0x2cd46a=_0x10e67a[_0xed9bb3];return _0x2cd46a;}async function prepareDelete(_0x18f915){const _0x109ceb=a193_0x57d6d1,_0x458ef7=readNotificationId(_0x18f915),_0x56978a=await requireExactNotificationConfig(_0x18f915['appCode'],_0x458ef7,_0x109ceb(0x195));return{'id':_0x458ef7,'before':_0x56978a};}export const notificationConfigDelete={'service':a193_0x57d6d1(0x17a),'command':'config-delete','description':a193_0x57d6d1(0x196),'risk':a193_0x57d6d1(0x181),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5c963f){readNotificationId(_0x5c963f),requireNotificationExplicitYes(_0x5c963f);},async 'dryRun'(_0x5958a5){const _0x4c14f8=a193_0x57d6d1,_0x2c8d01=await prepareDelete(_0x5958a5),_0x4c95f1=notificationLookupCommand(_0x5958a5[_0x4c14f8(0x191)],_0x2c8d01[_0x4c14f8(0x192)]['channelType']);return asDryRunResult({'operation':_0x4c14f8(0x195),'selector':notificationSelector(_0x2c8d01[_0x4c14f8(0x192)]),'before':projectNotificationConfig(_0x2c8d01['before']),'after':null,'dryRun':!![],'backend':{'method':_0x4c14f8(0x184),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4c14f8(0x193),'lookupCommand':_0x4c95f1}},{'method':_0x4c14f8(0x184),'url':DELETE_PATH});},async 'execute'(_0x459002){const _0x298ede=a193_0x57d6d1;requireNotificationExplicitYes(_0x459002);const _0x2a758b=await prepareDelete(_0x459002),_0x23511c=notificationLookupCommand(_0x459002['appCode'],_0x2a758b[_0x298ede(0x192)]['channelType']);let _0x2db9bc=![];try{await deleteNotificationChannelConfig(_0x2a758b['id'],_0x459002['appCode']);}catch(_0x48afb3){if(!isPlatformTransportFailure(_0x48afb3))throw safeApiFailure(_0x298ede(0x195),'mutation','Inspect\x20with\x20'+_0x23511c+_0x298ede(0x179));_0x2db9bc=!![];}let _0x1d9f3f;try{_0x1d9f3f=await listNotificationChannelConfigs(_0x459002[_0x298ede(0x191)],_0x2a758b[_0x298ede(0x192)][_0x298ede(0x194)]),validateNotificationDeleteReadback(_0x1d9f3f,_0x459002[_0x298ede(0x191)],_0x2a758b[_0x298ede(0x192)][_0x298ede(0x194)]);}catch{throw notificationError(_0x2db9bc?'notification_config_delete_outcome_unknown':_0x298ede(0x18f),'Notification\x20config\x20'+_0x2a758b['id']+_0x298ede(0x185),_0x298ede(0x18d)+_0x23511c+_0x298ede(0x180));}if(_0x1d9f3f[_0x298ede(0x17c)](_0x2c658d=>_0x2c658d['id']===_0x2a758b['id']))throw notificationError(_0x2db9bc?_0x298ede(0x17f):_0x298ede(0x18e),_0x298ede(0x17e)+_0x2a758b['id']+_0x298ede(0x18c),'Inspect\x20with\x20'+_0x23511c+';\x20do\x20not\x20resubmit\x20automatically.');const _0x5eb949=[REFERENCE_WARNING];return _0x2db9bc&&_0x5eb949[_0x298ede(0x189)](_0x298ede(0x176)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x2a758b[_0x298ede(0x192)]),'before':projectNotificationConfig(_0x2a758b[_0x298ede(0x192)]),'after':null,'dryRun':![],'backend':{'method':_0x298ede(0x184),'path':DELETE_PATH},'warnings':_0x5eb949,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2db9bc,'lookupCommand':_0x23511c}},'message':_0x298ede(0x175)+_0x2a758b['id']};}};function a193_0x10e6(){const _0x1b660d=['10287280lULOii','POST','\x20delete\x20could\x20not\x20be\x20verified.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','/notification/channel-config/delete','6KjDCBq','unshift','1357415wFoSZE','160548sjqpfN','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','notification_config_delete_verification_failed','notification_config_delete_verification_unavailable','8SBcHwr','appCode','before','planned','channelType','delete','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','25903lpEfIb','20drzFye','Deleted\x20notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','121sWRjyt','150312OWIYYX',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification','3036201jbILUM','some','18SYxQbM','Notification\x20config\x20','notification_config_delete_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','high-risk-write','4658983whNSTG'];a193_0x10e6=function(){return _0x1b660d;};return a193_0x10e6();}
@@ -1 +1 @@
1
- const a194_0x1772bc=a194_0x5d1c;(function(_0x2841ae,_0x33e840){const _0x26dcf5=a194_0x5d1c,_0x358599=_0x2841ae();while(!![]){try{const _0x3bb9d5=parseInt(_0x26dcf5(0xb7))/0x1+-parseInt(_0x26dcf5(0xa3))/0x2+-parseInt(_0x26dcf5(0xa1))/0x3*(-parseInt(_0x26dcf5(0xb8))/0x4)+-parseInt(_0x26dcf5(0x9f))/0x5+parseInt(_0x26dcf5(0xa4))/0x6+-parseInt(_0x26dcf5(0xbb))/0x7+parseInt(_0x26dcf5(0xac))/0x8;if(_0x3bb9d5===_0x33e840)break;else _0x358599['push'](_0x358599['shift']());}catch(_0x116f7e){_0x358599['push'](_0x358599['shift']());}}}(a194_0x36d8,0x9b24f));function a194_0x36d8(){const _0x473f96=['flat','boolean','length','appCode','\x20notification\x20config(s)','read','string','all','1225568qGrUQL','1750628JTRyfA','bool','map','3126039dVVYRs','1291955eqwuVx','notification','3TdXtTb','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','1233058yCOxMi','1757064WhjECT','type','Found\x20','trim','validation','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','7192pFsIFH','Notification\x20channel\x20type','config-list'];a194_0x36d8=function(){return _0x473f96;};return a194_0x36d8();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a194_0x5d1c(_0x3930c6,_0x49ab9c){_0x3930c6=_0x3930c6-0x9f;const _0x36d89d=a194_0x36d8();let _0x5d1c63=_0x36d89d[_0x3930c6];return _0x5d1c63;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x1772bc(0xa0),'command':a194_0x1772bc(0xae),'description':a194_0x1772bc(0xaa),'risk':a194_0x1772bc(0xb4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x1772bc(0xa5),'type':a194_0x1772bc(0xb5),'description':a194_0x1772bc(0xad),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x1772bc(0xb0),'default':![],'description':a194_0x1772bc(0xa9)}],async 'validate'(_0x29cd5d){const _0x25f3a5=a194_0x1772bc;if(_0x29cd5d[_0x25f3a5(0xb9)](_0x25f3a5(0xb6))&&_0x29cd5d['str'](_0x25f3a5(0xa5))[_0x25f3a5(0xa7)]())throw CliErrors[_0x25f3a5(0xa8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x25f3a5(0xa2));if(_0x29cd5d['bool'](_0x25f3a5(0xb6)))return;readNotificationChannelType(_0x29cd5d);},async 'execute'(_0x1f0033){const _0x472587=a194_0x1772bc;if(_0x1f0033[_0x472587(0xb9)](_0x472587(0xb6))){const _0x535b41=await Promise[_0x472587(0xb6)](NOTIFICATION_CHANNEL_TYPES[_0x472587(0xba)](_0x321aa4=>listNotificationChannelConfigs(_0x1f0033[_0x472587(0xb2)],_0x321aa4))),_0x5dea53=_0x535b41[_0x472587(0xaf)]()[_0x472587(0xba)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5dea53['length'],'configs':_0x5dea53},'message':'Found\x20'+_0x5dea53[_0x472587(0xb1)]+_0x472587(0xab)};}const _0x35925e=readNotificationChannelType(_0x1f0033),_0x7ac7e1=await listNotificationChannelConfigs(_0x1f0033['appCode'],_0x35925e),_0x557050=_0x7ac7e1['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelType':_0x35925e,'count':_0x557050[_0x472587(0xb1)],'configs':_0x557050},'message':_0x472587(0xa6)+_0x557050[_0x472587(0xb1)]+'\x20'+_0x35925e+_0x472587(0xb3)};}};
1
+ const a194_0x1ec2f9=a194_0x16b1;function a194_0x16b1(_0x1d70d0,_0x533dac){_0x1d70d0=_0x1d70d0-0x6f;const _0x44fecf=a194_0x44fe();let _0x16b12d=_0x44fecf[_0x1d70d0];return _0x16b12d;}(function(_0x4b4101,_0x5bf9fc){const _0x3327c8=a194_0x16b1,_0x220c73=_0x4b4101();while(!![]){try{const _0x17ef06=-parseInt(_0x3327c8(0x72))/0x1+-parseInt(_0x3327c8(0x8c))/0x2*(parseInt(_0x3327c8(0x80))/0x3)+parseInt(_0x3327c8(0x79))/0x4+parseInt(_0x3327c8(0x75))/0x5+parseInt(_0x3327c8(0x82))/0x6*(-parseInt(_0x3327c8(0x89))/0x7)+-parseInt(_0x3327c8(0x85))/0x8*(parseInt(_0x3327c8(0x77))/0x9)+parseInt(_0x3327c8(0x76))/0xa*(parseInt(_0x3327c8(0x70))/0xb);if(_0x17ef06===_0x5bf9fc)break;else _0x220c73['push'](_0x220c73['shift']());}catch(_0x3e8ae7){_0x220c73['push'](_0x220c73['shift']());}}}(a194_0x44fe,0x1eaa8));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_0x1ec2f9(0x8a),'command':a194_0x1ec2f9(0x71),'description':a194_0x1ec2f9(0x87),'risk':a194_0x1ec2f9(0x8b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x1ec2f9(0x81),'type':a194_0x1ec2f9(0x7d),'description':a194_0x1ec2f9(0x7e),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x1ec2f9(0x78),'type':a194_0x1ec2f9(0x83),'default':![],'description':a194_0x1ec2f9(0x74)}],async 'validate'(_0x2a271a){const _0x2bd6da=a194_0x1ec2f9;if(_0x2a271a[_0x2bd6da(0x7a)]('all')&&_0x2a271a['str'](_0x2bd6da(0x81))['trim']())throw CliErrors[_0x2bd6da(0x88)](_0x2bd6da(0x7b),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x2a271a[_0x2bd6da(0x7a)](_0x2bd6da(0x78)))return;readNotificationChannelType(_0x2a271a);},async 'execute'(_0x577023){const _0x102fb8=a194_0x1ec2f9;if(_0x577023[_0x102fb8(0x7a)]('all')){const _0x9bda68=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x102fb8(0x73)](_0x43ef2f=>listNotificationChannelConfigs(_0x577023[_0x102fb8(0x86)],_0x43ef2f))),_0x4d1e18=_0x9bda68[_0x102fb8(0x7c)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x577023[_0x102fb8(0x86)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x4d1e18[_0x102fb8(0x6f)],'configs':_0x4d1e18},'message':_0x102fb8(0x7f)+_0x4d1e18[_0x102fb8(0x6f)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0xc095c9=readNotificationChannelType(_0x577023),_0x71383d=await listNotificationChannelConfigs(_0x577023[_0x102fb8(0x86)],_0xc095c9),_0x24c146=_0x71383d['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x577023[_0x102fb8(0x86)],'channelType':_0xc095c9,'count':_0x24c146[_0x102fb8(0x6f)],'configs':_0x24c146},'message':'Found\x20'+_0x24c146[_0x102fb8(0x6f)]+'\x20'+_0xc095c9+_0x102fb8(0x84)};}};function a194_0x44fe(){const _0x2f5f63=['flat','string','Notification\x20channel\x20type','Found\x20','75PaciHq','type','18sesVLT','boolean','\x20notification\x20config(s)','24Juzzam','appCode','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','validation','533393WKihQs','notification','read','11124aXIljm','length','96657uDzNMI','config-list','222067DdDDjl','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','1193185iXRrww','450YoOSpz','39609SrdNRq','all','377892cIsDmF','bool','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.'];a194_0x44fe=function(){return _0x2f5f63;};return a194_0x44fe();}
@@ -1 +1 @@
1
- function a195_0x3d4c(_0x4127f1,_0x36dff6){_0x4127f1=_0x4127f1-0x126;const _0x5514d9=a195_0x5514();let _0x3d4cbf=_0x5514d9[_0x4127f1];return _0x3d4cbf;}const a195_0x4a21e9=a195_0x3d4c;(function(_0x3c4865,_0x1bedeb){const _0x45aac8=a195_0x3d4c,_0x4d54e4=_0x3c4865();while(!![]){try{const _0x1b4235=parseInt(_0x45aac8(0x134))/0x1+parseInt(_0x45aac8(0x144))/0x2*(parseInt(_0x45aac8(0x127))/0x3)+-parseInt(_0x45aac8(0x13b))/0x4+parseInt(_0x45aac8(0x12c))/0x5*(-parseInt(_0x45aac8(0x13e))/0x6)+parseInt(_0x45aac8(0x13d))/0x7+-parseInt(_0x45aac8(0x138))/0x8*(-parseInt(_0x45aac8(0x133))/0x9)+parseInt(_0x45aac8(0x142))/0xa;if(_0x1b4235===_0x1bedeb)break;else _0x4d54e4['push'](_0x4d54e4['shift']());}catch(_0x5bbe0e){_0x4d54e4['push'](_0x4d54e4['shift']());}}}(a195_0x5514,0xbaf04));function a195_0x5514(){const _0x5bbb62=['provesChange','16NIZBMD','Inspect\x20with\x20--id\x20','before','3491680lJQjFf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','4809889UZqfLh','462Dxtuqs','appCode','Updated\x20notification\x20config\x20','notification_config_update_outcome_unknown','3146730ixKTSM','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1094NVErfz','config-update','/notification/channel-config/update','verified',';\x20do\x20not\x20resubmit\x20automatically.','POST','planned','1857cVfynz','channelType','update','notification_config_update_verification_unavailable','payload','51725ZtzGzz','\x20via\x20','high-risk-write','notification','Inspect\x20ID\x20','allMatch','Notification\x20config\x20','4608594bLUWBM','70660VBoMqB','mutation','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.'];a195_0x5514=function(){return _0x5bbb62;};return a195_0x5514();}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_0x4a21e9(0x146);async function prepareUpdate(_0xf6f835){const _0x2ff391=a195_0x4a21e9,_0x5615ff=readNotificationId(_0xf6f835),_0x5a8703=await readNotificationDocument(_0xf6f835,_0x2ff391(0x129)),_0x28344a=await requireExactNotificationConfig(_0xf6f835[_0x2ff391(0x13f)],_0x5615ff,_0x2ff391(0x129));return{'id':_0x5615ff,'patch':_0x5a8703,'before':_0x28344a,'payload':mergeUpdateInput(_0x28344a,_0x5a8703),'planned':plannedUpdateProjection(_0x28344a,_0x5a8703)};}export const notificationConfigUpdate={'service':a195_0x4a21e9(0x12f),'command':a195_0x4a21e9(0x145),'description':a195_0x4a21e9(0x13c),'risk':a195_0x4a21e9(0x12e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e5809){readNotificationId(_0x4e5809),assertSingleNotificationSource(_0x4e5809),requireNotificationExplicitYes(_0x4e5809);},async 'dryRun'(_0x46d7e7){const _0x5bb89f=a195_0x4a21e9,_0x4587f1=await prepareUpdate(_0x46d7e7),_0x8042c=notificationLookupCommand(_0x46d7e7[_0x5bb89f(0x13f)],_0x4587f1[_0x5bb89f(0x13a)][_0x5bb89f(0x128)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x4587f1[_0x5bb89f(0x13a)]),'before':projectNotificationConfig(_0x4587f1[_0x5bb89f(0x13a)]),'after':_0x4587f1[_0x5bb89f(0x126)],'dryRun':!![],'backend':{'method':_0x5bb89f(0x149),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5bb89f(0x126),'lookupCommand':_0x8042c}},{'method':_0x5bb89f(0x149),'url':UPDATE_PATH});},async 'execute'(_0xabfb49){const _0x212ad4=a195_0x4a21e9;requireNotificationExplicitYes(_0xabfb49);const _0x3c909f=await prepareUpdate(_0xabfb49),_0x293168=notificationLookupCommand(_0xabfb49[_0x212ad4(0x13f)],_0x3c909f[_0x212ad4(0x13a)][_0x212ad4(0x128)]);let _0x2ea8e0=![];try{await updateNotificationChannelConfig(_0x3c909f[_0x212ad4(0x12b)]);}catch(_0x13cce6){if(!isPlatformTransportFailure(_0x13cce6))throw safeApiFailure(_0x212ad4(0x129),_0x212ad4(0x135),_0x212ad4(0x130)+_0x3c909f['id']+'\x20with\x20'+_0x293168+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2ea8e0=!![];}let _0x49baf1;try{const _0x4a821e=await getNotificationChannelConfig(_0x3c909f['id'],_0xabfb49[_0x212ad4(0x13f)]);_0x49baf1=normalizeExactNotificationConfig(_0x4a821e,_0x3c909f['id'],_0xabfb49['appCode']);}catch{throw notificationError(_0x2ea8e0?_0x212ad4(0x141):_0x212ad4(0x12a),_0x212ad4(0x132)+_0x3c909f['id']+_0x212ad4(0x136),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));}const _0x3965b7=requestedSafeFieldsMatch(_0x3c909f[_0x212ad4(0x13a)],_0x49baf1,_0x3c909f['patch']);if(!_0x3965b7[_0x212ad4(0x131)]||_0x2ea8e0&&!_0x3965b7[_0x212ad4(0x137)])throw notificationError(_0x2ea8e0?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3c909f['id']+_0x212ad4(0x143),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));const _0x4a84e8=_0x2ea8e0?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x212ad4(0x129),'selector':notificationSelector(_0x49baf1),'before':projectNotificationConfig(_0x3c909f['before']),'after':projectNotificationConfig(_0x49baf1),'dryRun':![],'backend':{'method':_0x212ad4(0x149),'path':UPDATE_PATH},'warnings':_0x4a84e8,'verification':{'status':_0x212ad4(0x147),'recoveredAfterUnknownResponse':_0x2ea8e0,'verifiedFields':_0x3965b7['verifiedFields'],'lookupCommand':_0x293168}},'message':_0x212ad4(0x140)+_0x49baf1['id']};}};
1
+ const a195_0x37b934=a195_0x2696;function a195_0x3fe4(){const _0x1a15a8=['high-risk-write','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Notification\x20config\x20','notification_config_update_outcome_unknown','notification_config_update_verification_failed','3029724JuRMtC','update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','mutation','Inspect\x20ID\x20','65901snFHVq','provesChange','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','1633660wOlhvl','notification_config_update_verification_unavailable','POST','\x20with\x20','\x20via\x20','patch','verified','284130aExCKT','59967fDfHya','notification','Inspect\x20with\x20--id\x20',';\x20do\x20not\x20resubmit\x20automatically.','before','2424275SXkJhj','appCode','1893712AGWABz'];a195_0x3fe4=function(){return _0x1a15a8;};return a195_0x3fe4();}(function(_0x59e40d,_0xfa68ab){const _0x14f425=a195_0x2696,_0x48f200=_0x59e40d();while(!![]){try{const _0x2b54ab=-parseInt(_0x14f425(0x148))/0x1+parseInt(_0x14f425(0x147))/0x2+-parseInt(_0x14f425(0x13d))/0x3+parseInt(_0x14f425(0x14f))/0x4+parseInt(_0x14f425(0x14d))/0x5+-parseInt(_0x14f425(0x155))/0x6+-parseInt(_0x14f425(0x140))/0x7;if(_0x2b54ab===_0xfa68ab)break;else _0x48f200['push'](_0x48f200['shift']());}catch(_0x3de4c3){_0x48f200['push'](_0x48f200['shift']());}}}(a195_0x3fe4,0x44610));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';function a195_0x2696(_0x3a2815,_0x32f657){_0x3a2815=_0x3a2815-0x13c;const _0x3fe46a=a195_0x3fe4();let _0x269699=_0x3fe46a[_0x3a2815];return _0x269699;}const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x5a6b97){const _0x103781=a195_0x2696,_0x43efce=readNotificationId(_0x5a6b97),_0x261c9b=await readNotificationDocument(_0x5a6b97,_0x103781(0x156)),_0x4c24dd=await requireExactNotificationConfig(_0x5a6b97[_0x103781(0x14e)],_0x43efce,_0x103781(0x156));return{'id':_0x43efce,'patch':_0x261c9b,'before':_0x4c24dd,'payload':mergeUpdateInput(_0x4c24dd,_0x261c9b),'planned':plannedUpdateProjection(_0x4c24dd,_0x261c9b)};}export const notificationConfigUpdate={'service':a195_0x37b934(0x149),'command':'config-update','description':a195_0x37b934(0x151),'risk':a195_0x37b934(0x150),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2b6199){readNotificationId(_0x2b6199),assertSingleNotificationSource(_0x2b6199),requireNotificationExplicitYes(_0x2b6199);},async 'dryRun'(_0x4122e7){const _0xff4659=a195_0x37b934,_0x5b95aa=await prepareUpdate(_0x4122e7),_0x3ed795=notificationLookupCommand(_0x4122e7['appCode'],_0x5b95aa[_0xff4659(0x14c)]['channelType']);return asDryRunResult({'operation':_0xff4659(0x156),'selector':notificationSelector(_0x5b95aa[_0xff4659(0x14c)]),'before':projectNotificationConfig(_0x5b95aa[_0xff4659(0x14c)]),'after':_0x5b95aa['planned'],'dryRun':!![],'backend':{'method':_0xff4659(0x142),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x3ed795}},{'method':_0xff4659(0x142),'url':UPDATE_PATH});},async 'execute'(_0x3b9117){const _0x4a9f4b=a195_0x37b934;requireNotificationExplicitYes(_0x3b9117);const _0x84244e=await prepareUpdate(_0x3b9117),_0x33e173=notificationLookupCommand(_0x3b9117[_0x4a9f4b(0x14e)],_0x84244e['before']['channelType']);let _0x175bb1=![];try{await updateNotificationChannelConfig(_0x84244e['payload']);}catch(_0x4a2cdc){if(!isPlatformTransportFailure(_0x4a2cdc))throw safeApiFailure(_0x4a9f4b(0x156),_0x4a9f4b(0x158),_0x4a9f4b(0x13c)+_0x84244e['id']+_0x4a9f4b(0x143)+_0x33e173+_0x4a9f4b(0x157));_0x175bb1=!![];}let _0xb62d48;try{const _0x57f571=await getNotificationChannelConfig(_0x84244e['id'],_0x3b9117[_0x4a9f4b(0x14e)]);_0xb62d48=normalizeExactNotificationConfig(_0x57f571,_0x84244e['id'],_0x3b9117[_0x4a9f4b(0x14e)]);}catch{throw notificationError(_0x175bb1?'notification_config_update_outcome_unknown':_0x4a9f4b(0x141),_0x4a9f4b(0x152)+_0x84244e['id']+_0x4a9f4b(0x13f),'Inspect\x20with\x20--id\x20'+_0x84244e['id']+_0x4a9f4b(0x144)+_0x33e173+_0x4a9f4b(0x14b));}const _0x48f947=requestedSafeFieldsMatch(_0x84244e[_0x4a9f4b(0x14c)],_0xb62d48,_0x84244e[_0x4a9f4b(0x145)]);if(!_0x48f947['allMatch']||_0x175bb1&&!_0x48f947[_0x4a9f4b(0x13e)])throw notificationError(_0x175bb1?_0x4a9f4b(0x153):_0x4a9f4b(0x154),_0x4a9f4b(0x152)+_0x84244e['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x4a9f4b(0x14a)+_0x84244e['id']+_0x4a9f4b(0x144)+_0x33e173+_0x4a9f4b(0x14b));const _0x3c5679=_0x175bb1?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0xb62d48),'before':projectNotificationConfig(_0x84244e[_0x4a9f4b(0x14c)]),'after':projectNotificationConfig(_0xb62d48),'dryRun':![],'backend':{'method':_0x4a9f4b(0x142),'path':UPDATE_PATH},'warnings':_0x3c5679,'verification':{'status':_0x4a9f4b(0x146),'recoveredAfterUnknownResponse':_0x175bb1,'verifiedFields':_0x48f947['verifiedFields'],'lookupCommand':_0x33e173}},'message':'Updated\x20notification\x20config\x20'+_0xb62d48['id']};}};
@@ -1 +1 @@
1
- function a196_0x358e(_0x2c9d34,_0x72a0c0){_0x2c9d34=_0x2c9d34-0x111;const _0x33b194=a196_0x33b1();let _0x358ef2=_0x33b194[_0x2c9d34];return _0x358ef2;}(function(_0x565e47,_0x1574ca){const _0x212183=a196_0x358e,_0x21af23=_0x565e47();while(!![]){try{const _0x163e23=parseInt(_0x212183(0x118))/0x1*(parseInt(_0x212183(0x119))/0x2)+-parseInt(_0x212183(0x114))/0x3+-parseInt(_0x212183(0x116))/0x4+-parseInt(_0x212183(0x112))/0x5*(parseInt(_0x212183(0x117))/0x6)+-parseInt(_0x212183(0x11a))/0x7*(-parseInt(_0x212183(0x113))/0x8)+parseInt(_0x212183(0x115))/0x9+-parseInt(_0x212183(0x111))/0xa*(-parseInt(_0x212183(0x11b))/0xb);if(_0x163e23===_0x1574ca)break;else _0x21af23['push'](_0x21af23['shift']());}catch(_0x1f0458){_0x21af23['push'](_0x21af23['shift']());}}}(a196_0x33b1,0x36e36));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x33b1(){const _0x507c9f=['7tiwwaW','33JmnczD','923090JMPpEn','15cezWzi','920048kwTeLu','259809KvQvtr','1217007fMQEkh','529268sjeZAD','295578tsBYnh','64375jhubPR','2OpqHcp'];a196_0x33b1=function(){return _0x507c9f;};return a196_0x33b1();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x2e0575,_0x60fbe1){const _0x309515=a196_0x2c5f,_0x596e2d=_0x2e0575();while(!![]){try{const _0x16d1d0=parseInt(_0x309515(0xeb))/0x1*(parseInt(_0x309515(0xef))/0x2)+-parseInt(_0x309515(0xea))/0x3*(parseInt(_0x309515(0xe8))/0x4)+-parseInt(_0x309515(0xed))/0x5+-parseInt(_0x309515(0xf0))/0x6+parseInt(_0x309515(0xe9))/0x7+parseInt(_0x309515(0xf1))/0x8*(parseInt(_0x309515(0xec))/0x9)+-parseInt(_0x309515(0xee))/0xa;if(_0x16d1d0===_0x60fbe1)break;else _0x596e2d['push'](_0x596e2d['shift']());}catch(_0x48b44b){_0x596e2d['push'](_0x596e2d['shift']());}}}(a196_0x1fd0,0x663e4));function a196_0x2c5f(_0x6d7a8f,_0x9ae4d8){_0x6d7a8f=_0x6d7a8f-0xe8;const _0x1fd0b5=a196_0x1fd0();let _0x2c5fb4=_0x1fd0b5[_0x6d7a8f];return _0x2c5fb4;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x1fd0(){const _0x5c39b4=['434580wPKpNM','4647170riEBYF','2BQuuGA','1075866UDiMVm','184NbAPVl','4IJteZb','4508595KmlcWY','1162371XGmcOP','428711kuZFCR','181719JurDHR'];a196_0x1fd0=function(){return _0x5c39b4;};return a196_0x1fd0();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a197_0x3209b2=a197_0x4922;(function(_0x11cf14,_0x2c8f39){const _0x267c78=a197_0x4922,_0x2af69d=_0x11cf14();while(!![]){try{const _0x4bf867=parseInt(_0x267c78(0xf7))/0x1+-parseInt(_0x267c78(0xc7))/0x2*(-parseInt(_0x267c78(0xfb))/0x3)+parseInt(_0x267c78(0x10b))/0x4+parseInt(_0x267c78(0xf0))/0x5*(-parseInt(_0x267c78(0x10e))/0x6)+parseInt(_0x267c78(0x111))/0x7+parseInt(_0x267c78(0xd0))/0x8*(-parseInt(_0x267c78(0xf8))/0x9)+parseInt(_0x267c78(0xdf))/0xa;if(_0x4bf867===_0x2c8f39)break;else _0x2af69d['push'](_0x2af69d['shift']());}catch(_0x3d7c44){_0x2af69d['push'](_0x2af69d['shift']());}}}(a197_0x357c,0x87ff4));import{readFile}from'node:fs/promises';function a197_0x4922(_0x5637cb,_0xcb3be3){_0x5637cb=_0x5637cb-0xc6;const _0x357c6e=a197_0x357c();let _0x4922ef=_0x357c6e[_0x5637cb];return _0x4922ef;}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_0x3209b2(0x137),a197_0x3209b2(0x10c),'DINGTALK',a197_0x3209b2(0xe5),a197_0x3209b2(0xf3)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3209b2(0xd8),a197_0x3209b2(0x142),'endpointUrl',a197_0x3209b2(0xf5),a197_0x3209b2(0xd2),a197_0x3209b2(0x103),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x3209b2(0x12a),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3209b2(0xc8),a197_0x3209b2(0xeb),a197_0x3209b2(0x146),'bccList','replyTo',a197_0x3209b2(0xd3),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3209b2(0x135),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0xe3)},{'name':a197_0x3209b2(0x10d),'type':a197_0x3209b2(0x145),'required':![],'default':![],'description':a197_0x3209b2(0xdb)},{'name':a197_0x3209b2(0xd4),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0x112)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3209b2(0xcc),'required':!![],'description':a197_0x3209b2(0x116)};function a197_0x357c(){const _0x5f3e05=['utf8','isSafeInteger','notification_config_field_invalid','notification_config_update_empty','yes','997576sKRUyf','FEISHU','stdin','1379688ulplqV','\x20has\x20an\x20invalid\x20appCode.','Unknown\x20notification\x20JSON\x20field\x20\x22','4282957mxWeSn','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','environment\x20variable\x20','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','Notification\x20config\x20list\x20item\x20','\x20has\x20an\x20invalid\x20channelType.','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','readTimeout','string','\x22\x20must\x20be\x20','str','preflight','\x20characters.','channelConfigRaw','appCode','apiError','dry-run','isArray','Create\x20JSON\x20requires\x20field\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20failed.','configCode','Notification\x20config\x20','keys','a\x20non-empty\x20string','notification_config_confirmation_required','name','includes','endpointUrl','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','setEncoding','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','EMAIL','kind','call','notification_config_source_unavailable','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','path','failed','notification_config_field_unknown','channelType','updateTime','file\x20','boolean','ccList','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','trim','4652nJlfSc','emailTargets','notification_config_field_forbidden','\x22\x20is\x20forbidden.','every','number','endpointUrl:null','prototype','object','387848bEVAPy','parse','description','subjectPrefix','from-env','has','length','Notification\x20JSON\x20from\x20','configName','hasOwnProperty','\x20must\x20be\x20an\x20object.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20JSON\x20object','351470sJADcL','a\x20supported\x20string','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22channelType\x22.','WECOM','env','Invalid\x20--','validation','messageTemplate','push','recipients','a\x20JSON\x20object\x20or\x20null','bool','join','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','15QaBmmY','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','channelConfig','stringify','575889iLmTnX','63voRRgr','Item\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','147ObwPtf','\x20--type\x20','notification_config_id_invalid','num','endpointUrlRaw','Allowed\x20values:\x20','create','notification_config_','connectTimeout','a\x20string\x20or\x20null','type'];a197_0x357c=function(){return _0x5f3e05;};return a197_0x357c();}export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x6859df,_0x25db86,_0x4802bd){return new CliError(_0x6859df,0x1,_0x25db86,_0x4802bd);}export function readNotificationId(_0x2ab48f){const _0x33ae6c=a197_0x3209b2,_0x2669e8=_0x2ab48f[_0x33ae6c(0xfe)]('id');if(!Number[_0x33ae6c(0x107)](_0x2669e8)||_0x2669e8<=0x0)throw notificationError(_0x33ae6c(0xfd),_0x33ae6c(0x128));return _0x2669e8;}export function requireNotificationExplicitYes(_0x24f58f){const _0x42e5f8=a197_0x3209b2;if(_0x24f58f['bool'](_0x42e5f8(0x125))||_0x24f58f[_0x42e5f8(0xed)](_0x42e5f8(0x10a)))return;throw notificationError(_0x42e5f8(0x12e),_0x42e5f8(0xdc),_0x42e5f8(0x148));}export function readNotificationChannelType(_0x54c40c,_0x4c1dab=a197_0x3209b2(0x105),_0x54edb3=a197_0x3209b2(0x137)){const _0x17eb0b=a197_0x3209b2,_0x32c39b=_0x54c40c[_0x17eb0b(0x11f)](_0x4c1dab)[_0x17eb0b(0xc6)]()||_0x54edb3;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x32c39b))throw CliErrors['validation'](_0x17eb0b(0xe7)+_0x4c1dab+':\x20'+_0x32c39b,_0x17eb0b(0x100)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x32c39b;}export function assertSingleNotificationSource(_0x3f372d){const _0x24e148=a197_0x3209b2,_0x32135a=[],_0x2ad923=_0x3f372d[_0x24e148(0x11f)]('file')['trim']();if(_0x2ad923)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0x135),'path':_0x2ad923});if(_0x3f372d['bool']('stdin'))_0x32135a['push']({'kind':_0x24e148(0x10d)});const _0x33aa75=_0x3f372d[_0x24e148(0x11f)]('from-env')[_0x24e148(0xc6)]();if(_0x33aa75)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0xe6),'name':_0x33aa75});if(_0x32135a[_0x24e148(0xd6)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x32135a['length']>0x1)throw CliErrors[_0x24e148(0xe8)](_0x24e148(0xfa),_0x24e148(0x13c));return _0x32135a[0x0];}export async function readNotificationDocument(_0x582c59,_0x38aa77){const _0x2029a2=a197_0x3209b2,_0x5c02a5=assertSingleNotificationSource(_0x582c59),_0xa93d18=_0x5c02a5[_0x2029a2(0x138)]==='file'?_0x2029a2(0x144)+_0x5c02a5[_0x2029a2(0x13f)]:_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)?_0x2029a2(0x115)+_0x5c02a5[_0x2029a2(0x12f)]:'stdin';let _0x4d2944;try{if(_0x5c02a5[_0x2029a2(0x138)]==='file')_0x4d2944=await readFile(_0x5c02a5[_0x2029a2(0x13f)],'utf8');else{if(_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)){if(!(_0x5c02a5[_0x2029a2(0x12f)]in process.env))throw notificationError(_0x2029a2(0x13a),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5c02a5[_0x2029a2(0x12f)]);_0x4d2944=process.env[_0x5c02a5.name]??'';}else _0x4d2944=await readStdin();}}catch(_0x365ebf){if(_0x365ebf instanceof CliError)throw _0x365ebf;throw notificationError(_0x2029a2(0x13a),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xa93d18+'.');}let _0x1ebd47;try{_0x1ebd47=JSON[_0x2029a2(0xd1)](_0x4d2944);}catch{throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1ebd47))throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+_0x2029a2(0xda));return validateNotificationDocument(_0x1ebd47,_0x38aa77);}export function projectNotificationListConfig(_0x2fe0fa,_0x393dce){const _0x2052df=a197_0x3209b2;return{'id':typeof _0x2fe0fa['id']===_0x2052df(0xcc)?_0x2fe0fa['id']:null,'configCode':requireResponseString(_0x2fe0fa[_0x2052df(0x12a)],_0x2052df(0x12a),_0x393dce),'configName':requireResponseString(_0x2fe0fa[_0x2052df(0xd8)],_0x2052df(0xd8),_0x393dce),'channelType':requireResponseString(_0x2fe0fa[_0x2052df(0x142)],_0x2052df(0x142),_0x393dce),'description':normalizeNullableString(_0x2fe0fa[_0x2052df(0xd2)]),'createTime':normalizeNullableString(_0x2fe0fa['createTime']),'updateTime':normalizeNullableString(_0x2fe0fa[_0x2052df(0x143)])};}export function normalizeExactNotificationConfig(_0x20b57d,_0x2b5882,_0x10fb4f){const _0x5e6597=a197_0x3209b2;if(!Number[_0x5e6597(0x107)](_0x20b57d['id'])||_0x20b57d['id']!==_0x2b5882)throw notificationError(_0x5e6597(0x117),_0x5e6597(0x133)+_0x2b5882+'.');if(_0x20b57d[_0x5e6597(0x123)]!==_0x10fb4f)throw notificationError('notification_config_response_invalid',_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0x147));const _0x302781=requireExactString(_0x20b57d['configName'],_0x5e6597(0xd8),_0x2b5882),_0xe5177a=requireExactString(_0x20b57d['configCode'],_0x5e6597(0x12a),_0x2b5882),_0x542ca0=requireExactString(_0x20b57d[_0x5e6597(0x142)],_0x5e6597(0x142),_0x2b5882);if(!NOTIFICATION_CHANNEL_TYPES[_0x5e6597(0x130)](_0x542ca0))throw notificationError(_0x5e6597(0x117),_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0xf4));const _0x27c405=responseNullableString(_0x20b57d[_0x5e6597(0x131)],'endpointUrl',_0x2b5882),_0x33c726=responseNullableString(_0x20b57d[_0x5e6597(0xf5)],_0x5e6597(0xf5),_0x2b5882),_0x2d2e70=responseNullableString(_0x20b57d['description'],'description',_0x2b5882),_0xeaa1bb=responseNullableTimeout(_0x20b57d[_0x5e6597(0x103)],_0x5e6597(0x103),_0x2b5882),_0x2e7a78=responseNullableTimeout(_0x20b57d['readTimeout'],_0x5e6597(0x11c),_0x2b5882);return{'id':_0x2b5882,'appCode':_0x10fb4f,'configCode':_0xe5177a,'configName':_0x302781,'channelType':_0x542ca0,'endpointUrl':redactSensitive(_0x27c405),'channelConfig':redactSensitive(_0x33c726),'description':_0x2d2e70,'connectTimeout':_0xeaa1bb,'readTimeout':_0x2e7a78,'endpointUrlRaw':_0x27c405,'channelConfigRaw':_0x33c726};}export async function requireExactNotificationConfig(_0x202d83,_0x5de416,_0x1e5cdf){const _0x310f5e=a197_0x3209b2;let _0x2ee5ec;try{_0x2ee5ec=await getNotificationChannelConfig(_0x5de416,_0x202d83);}catch{throw safeApiFailure(_0x1e5cdf,_0x310f5e(0x120),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x202d83+_0x310f5e(0xe1));}return normalizeExactNotificationConfig(_0x2ee5ec,_0x5de416,_0x202d83);}export function projectNotificationConfig(_0x14ac34){const _0x5eb727=a197_0x3209b2;return{'id':_0x14ac34['id']??null,'appCode':_0x14ac34[_0x5eb727(0x123)],'configCode':_0x14ac34[_0x5eb727(0x12a)]??null,'configName':_0x14ac34[_0x5eb727(0xd8)],'channelType':_0x14ac34['channelType'],'endpointUrl':redactSensitive(_0x14ac34[_0x5eb727(0x131)]),'channelConfig':redactSensitive(_0x14ac34[_0x5eb727(0xf5)]),'description':_0x14ac34[_0x5eb727(0xd2)]??null,'connectTimeout':_0x14ac34[_0x5eb727(0x103)]??null,'readTimeout':_0x14ac34[_0x5eb727(0x11c)]??null};}export function notificationSelector(_0x2c0df1){const _0x4083ae=a197_0x3209b2;return{'appCode':_0x2c0df1[_0x4083ae(0x123)],'id':_0x2c0df1['id'],'configCode':_0x2c0df1[_0x4083ae(0x12a)],'configName':_0x2c0df1[_0x4083ae(0xd8)],'channelType':_0x2c0df1[_0x4083ae(0x142)]};}export function createMutationInput(_0x361f39,_0x7ae4d2){const _0x371758=a197_0x3209b2;return{'appCode':_0x361f39,'configName':_0x7ae4d2['configName'],'channelType':_0x7ae4d2[_0x371758(0x142)],...hasOwn(_0x7ae4d2,_0x371758(0x131))?{'endpointUrl':_0x7ae4d2[_0x371758(0x131)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0xf5))?{'channelConfig':serializeChannelConfig(_0x7ae4d2[_0x371758(0xf5)])}:{},...hasOwn(_0x7ae4d2,_0x371758(0xd2))?{'description':_0x7ae4d2[_0x371758(0xd2)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x103))?{'connectTimeout':_0x7ae4d2[_0x371758(0x103)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x11c))?{'readTimeout':_0x7ae4d2['readTimeout']}:{}};}export function mergeUpdateInput(_0xf536d2,_0x44c7d5){const _0x121b06=a197_0x3209b2;return{'id':_0xf536d2['id'],'appCode':_0xf536d2[_0x121b06(0x123)],'configName':_0x44c7d5['configName']??_0xf536d2[_0x121b06(0xd8)],'channelType':_0x44c7d5[_0x121b06(0x142)]??_0xf536d2[_0x121b06(0x142)],'endpointUrl':hasOwn(_0x44c7d5,_0x121b06(0x131))?_0x44c7d5['endpointUrl']:_0xf536d2['endpointUrlRaw'],'channelConfig':hasOwn(_0x44c7d5,'channelConfig')?serializeChannelConfig(_0x44c7d5[_0x121b06(0xf5)]):_0xf536d2[_0x121b06(0x122)],'description':hasOwn(_0x44c7d5,_0x121b06(0xd2))?_0x44c7d5[_0x121b06(0xd2)]:_0xf536d2[_0x121b06(0xd2)],'connectTimeout':hasOwn(_0x44c7d5,_0x121b06(0x103))?_0x44c7d5['connectTimeout']:_0xf536d2[_0x121b06(0x103)],'readTimeout':hasOwn(_0x44c7d5,_0x121b06(0x11c))?_0x44c7d5[_0x121b06(0x11c)]:_0xf536d2[_0x121b06(0x11c)]};}export function plannedUpdateProjection(_0x275523,_0x100705){const _0x12c09a=a197_0x3209b2;return projectNotificationConfig({'id':_0x275523['id'],'appCode':_0x275523[_0x12c09a(0x123)],'configCode':_0x275523['configCode'],'configName':_0x100705[_0x12c09a(0xd8)]??_0x275523['configName'],'channelType':_0x100705[_0x12c09a(0x142)]??_0x275523[_0x12c09a(0x142)],'endpointUrl':hasOwn(_0x100705,_0x12c09a(0x131))?_0x100705[_0x12c09a(0x131)]:_0x275523['endpointUrlRaw'],'channelConfig':hasOwn(_0x100705,_0x12c09a(0xf5))?_0x100705[_0x12c09a(0xf5)]:_0x275523[_0x12c09a(0x122)],'description':hasOwn(_0x100705,_0x12c09a(0xd2))?_0x100705[_0x12c09a(0xd2)]:_0x275523[_0x12c09a(0xd2)],'connectTimeout':hasOwn(_0x100705,_0x12c09a(0x103))?_0x100705['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x275523[_0x12c09a(0x103)],'readTimeout':hasOwn(_0x100705,'readTimeout')?_0x100705[_0x12c09a(0x11c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x275523[_0x12c09a(0x11c)]});}export function requestedSafeFieldsMatch(_0x58bc18,_0x339ba8,_0x3ceaef){const _0x2cd6c0=a197_0x3209b2,_0x21dcb3=[],_0x232aea=[],_0x54d0cc=[];for(const _0x308176 of[_0x2cd6c0(0xd8),_0x2cd6c0(0x142),_0x2cd6c0(0xd2)]){if(!hasOwn(_0x3ceaef,_0x308176))continue;_0x54d0cc[_0x2cd6c0(0xea)](_0x308176),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x308176]!==_0x3ceaef[_0x308176]&&_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]);}for(const _0xf75f of['connectTimeout',_0x2cd6c0(0x11c)]){if(!hasOwn(_0x3ceaef,_0xf75f))continue;const _0x1c7437=_0x3ceaef[_0xf75f]??(_0xf75f===_0x2cd6c0(0x103)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x54d0cc[_0x2cd6c0(0xea)](_0xf75f),_0x21dcb3['push'](_0x339ba8[_0xf75f]===_0x1c7437),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0xf75f]!==_0x1c7437&&_0x339ba8[_0xf75f]===_0x1c7437);}return hasOwn(_0x3ceaef,_0x2cd6c0(0x131))&&_0x3ceaef[_0x2cd6c0(0x131)]===null&&(_0x54d0cc[_0x2cd6c0(0xea)](_0x2cd6c0(0xcd)),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x2cd6c0(0xff)]===null||_0x339ba8[_0x2cd6c0(0xff)]===''),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x2cd6c0(0xff)]!==null&&_0x58bc18['endpointUrlRaw']!==''&&(_0x339ba8['endpointUrlRaw']===null||_0x339ba8['endpointUrlRaw']===''))),{'allMatch':_0x21dcb3[_0x2cd6c0(0xcb)](Boolean),'provesChange':_0x232aea['some'](Boolean),'verifiedFields':_0x54d0cc};}export function validateNotificationDeleteReadback(_0x278c15,_0x18d618,_0x1bd804){const _0x364fad=a197_0x3209b2;for(const [_0x5dfb3b,_0x4e859d]of _0x278c15['entries']()){if(!Number[_0x364fad(0x107)](_0x4e859d['id'])||_0x4e859d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x13d));if(_0x4e859d[_0x364fad(0x123)]!==_0x18d618)throw notificationError(_0x364fad(0x117),'Notification\x20config\x20list\x20item\x20'+(_0x5dfb3b+0x1)+_0x364fad(0x10f));if(_0x4e859d[_0x364fad(0x142)]!==_0x1bd804)throw notificationError(_0x364fad(0x117),_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x119));}}export function safeApiFailure(_0x8dde09,_0x10b39b,_0x1f66bd){const _0x52cd0a=a197_0x3209b2;return notificationError(_0x52cd0a(0x102)+_0x8dde09+'_'+(_0x10b39b==='mutation'?_0x52cd0a(0x140):_0x10b39b+'_unavailable'),'Notification\x20config\x20'+_0x8dde09+'\x20'+_0x10b39b+_0x52cd0a(0x129),_0x1f66bd);}export function notificationLookupCommand(_0x4154b2,_0x55c40d){const _0xbbac73=a197_0x3209b2;return _0xbbac73(0xdd)+_0x4154b2+_0xbbac73(0xfc)+_0x55c40d+_0xbbac73(0x13e);}function validateNotificationDocument(_0x188129,_0x348f27){const _0x460018=a197_0x3209b2;for(const _0x571680 of Object[_0x460018(0x12c)](_0x188129)){if(FORBIDDEN_IDENTITY_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0xc9),_0x460018(0x132)+_0x571680+_0x460018(0x136));if(!ALLOWED_INPUT_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0x141),_0x460018(0x110)+_0x571680+'\x22.');}if(_0x348f27===_0x460018(0xf1)&&Object['keys'](_0x188129)['length']===0x0)throw notificationError(_0x460018(0x109),_0x460018(0xef));const _0x45441b={};if(hasOwn(_0x188129,_0x460018(0xd8)))_0x45441b[_0x460018(0xd8)]=validateRequiredString(_0x188129[_0x460018(0xd8)],_0x460018(0xd8),0x80);else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),_0x460018(0x127)+'\x22configName\x22.');}if(hasOwn(_0x188129,'channelType')){if(typeof _0x188129[_0x460018(0x142)]!==_0x460018(0x11d))throw invalidFieldType(_0x460018(0x142),_0x460018(0xe0));const _0x43a60e=_0x188129[_0x460018(0x142)][_0x460018(0xc6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x460018(0x130)](_0x43a60e))throw notificationError('notification_config_field_invalid',_0x460018(0xe2),_0x460018(0x100)+NOTIFICATION_CHANNEL_TYPES[_0x460018(0xee)](',\x20')+'.');_0x45441b[_0x460018(0x142)]=_0x43a60e;}else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),'Create\x20JSON\x20requires\x20field\x20'+_0x460018(0xe4));}for(const [_0x1a50cc,_0x491096]of[[_0x460018(0x131),0x200],[_0x460018(0xd2),0x100]]){if(!hasOwn(_0x188129,_0x1a50cc))continue;const _0x223f1a=_0x188129[_0x1a50cc];if(_0x223f1a!==null&&typeof _0x223f1a!=='string')throw invalidFieldType(_0x1a50cc,_0x460018(0x104));if(typeof _0x223f1a===_0x460018(0x11d)&&_0x223f1a['length']>_0x491096)throw notificationError(_0x460018(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x1a50cc+_0x460018(0x113)+_0x491096+_0x460018(0x121));_0x45441b[_0x1a50cc]=_0x223f1a;}if(hasOwn(_0x188129,_0x460018(0xf5))){const _0x431459=_0x188129[_0x460018(0xf5)];if(_0x431459===null&&_0x348f27===_0x460018(0x101))throw invalidFieldType(_0x460018(0xf5),_0x460018(0xde));if(_0x431459!==null&&!isJsonObject(_0x431459))throw invalidFieldType(_0x460018(0xf5),_0x348f27==='update'?_0x460018(0xec):_0x460018(0xde));_0x431459!==null&&validateChannelConfigFields(_0x45441b[_0x460018(0x142)],_0x431459),_0x45441b[_0x460018(0xf5)]=_0x431459;}for(const _0xba149d of[_0x460018(0x103),_0x460018(0x11c)]){if(!hasOwn(_0x188129,_0xba149d))continue;const _0x38567b=_0x188129[_0xba149d];if(_0x38567b!==null&&(!Number[_0x460018(0x107)](_0x38567b)||_0x38567b<0x0))throw notificationError(_0x460018(0x108),_0x460018(0x132)+_0xba149d+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x45441b[_0xba149d]=_0x38567b;}return _0x45441b;}function validateRequiredString(_0x4fcfa2,_0x392bba,_0x4a7d26){const _0x2fafa7=a197_0x3209b2;if(typeof _0x4fcfa2!==_0x2fafa7(0x11d))throw invalidFieldType(_0x392bba,_0x2fafa7(0x12d));const _0x1fe1db=_0x4fcfa2[_0x2fafa7(0xc6)]();if(!_0x1fe1db)throw notificationError(_0x2fafa7(0x108),_0x2fafa7(0x132)+_0x392bba+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1fe1db[_0x2fafa7(0xd6)]>_0x4a7d26)throw notificationError(_0x2fafa7(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x392bba+'\x22\x20cannot\x20exceed\x20'+_0x4a7d26+_0x2fafa7(0x121));return _0x1fe1db;}function validateChannelConfigFields(_0x2d5236,_0x118e16){const _0x4a7d71=a197_0x3209b2;if(hasOwn(_0x118e16,'messageTemplate'))throw forbiddenChannelConfigField(_0x4a7d71(0xe9));if(_0x2d5236==='EMAIL')for(const _0x1e3dec of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x118e16,_0x1e3dec))throw forbiddenChannelConfigField(_0x1e3dec);}}function forbiddenChannelConfigField(_0x678632){const _0x10f172=a197_0x3209b2;return notificationError('notification_config_channel_field_forbidden',_0x10f172(0xf2)+_0x678632+_0x10f172(0xca));}function invalidFieldType(_0x47d859,_0x4b2d57){const _0x4adecb=a197_0x3209b2;return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x47d859+_0x4adecb(0x11e)+_0x4b2d57+'.');}function serializeChannelConfig(_0x2a16c5){const _0x2417b3=a197_0x3209b2;return _0x2a16c5===null||_0x2a16c5===undefined?null:JSON[_0x2417b3(0xf6)](_0x2a16c5);}function redactSensitive(_0x154098){return _0x154098===null||_0x154098===undefined||_0x154098===''?null:'<redacted>';}function requireResponseString(_0x1b4d51,_0x394b99,_0x36af23){const _0x3b0cc5=a197_0x3209b2;if(typeof _0x1b4d51!==_0x3b0cc5(0x11d)||_0x1b4d51[_0x3b0cc5(0xc6)]()==='')throw CliErrors[_0x3b0cc5(0x124)]('Invalid\x20notification\x20config\x20response.',_0x3b0cc5(0xf9)+(_0x36af23+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x394b99+'\x22.');return _0x1b4d51[_0x3b0cc5(0xc6)]();}function requireExactString(_0x2a1d23,_0x28ac4c,_0x1a6a7d){const _0x57d729=a197_0x3209b2;if(typeof _0x2a1d23!==_0x57d729(0x11d)||_0x2a1d23[_0x57d729(0xc6)]()==='')throw notificationError(_0x57d729(0x117),_0x57d729(0x12b)+_0x1a6a7d+_0x57d729(0x11a)+_0x28ac4c+'\x22.');return _0x2a1d23[_0x57d729(0xc6)]();}function responseNullableString(_0x4dd0be,_0x49df5f,_0x135597){const _0x1407e2=a197_0x3209b2;if(_0x4dd0be===undefined||_0x4dd0be===null)return null;if(typeof _0x4dd0be!=='string')throw notificationError(_0x1407e2(0x117),'Notification\x20config\x20'+_0x135597+_0x1407e2(0x11b)+_0x49df5f+'\x22.');return _0x4dd0be;}function responseNullableTimeout(_0x3a8cc8,_0x164802,_0x39da20){const _0x414a78=a197_0x3209b2;if(_0x3a8cc8===undefined||_0x3a8cc8===null)return null;if(!Number[_0x414a78(0x107)](_0x3a8cc8)||_0x3a8cc8<0x0)throw notificationError(_0x414a78(0x117),_0x414a78(0x12b)+_0x39da20+_0x414a78(0x11b)+_0x164802+'\x22.');return _0x3a8cc8;}function normalizeNullableString(_0x3f0698){const _0x45e409=a197_0x3209b2;return typeof _0x3f0698===_0x45e409(0x11d)?_0x3f0698:null;}function isJsonObject(_0x56c353){const _0x35c57f=a197_0x3209b2;return _0x56c353!==null&&typeof _0x56c353===_0x35c57f(0xcf)&&!Array[_0x35c57f(0x126)](_0x56c353);}function hasOwn(_0x27fb40,_0x316d16){const _0xba6762=a197_0x3209b2;return Object[_0xba6762(0xce)][_0xba6762(0xd9)][_0xba6762(0x139)](_0x27fb40,_0x316d16);}async function readStdin(){const _0x4ae6be=a197_0x3209b2;let _0x20e592='';process[_0x4ae6be(0x10d)][_0x4ae6be(0x134)](_0x4ae6be(0x106));for await(const _0x58436a of process['stdin'])_0x20e592+=_0x58436a;return _0x20e592;}
1
+ const a197_0x2dbda0=a197_0x3912;(function(_0x316b49,_0x59d4ea){const _0x31ca29=a197_0x3912,_0xaf00fa=_0x316b49();while(!![]){try{const _0x35604f=-parseInt(_0x31ca29(0x153))/0x1+-parseInt(_0x31ca29(0x15c))/0x2+parseInt(_0x31ca29(0x1b4))/0x3+parseInt(_0x31ca29(0x142))/0x4*(parseInt(_0x31ca29(0x141))/0x5)+parseInt(_0x31ca29(0x14e))/0x6+parseInt(_0x31ca29(0x18a))/0x7*(parseInt(_0x31ca29(0x13c))/0x8)+-parseInt(_0x31ca29(0x17a))/0x9*(parseInt(_0x31ca29(0x14c))/0xa);if(_0x35604f===_0x59d4ea)break;else _0xaf00fa['push'](_0xaf00fa['shift']());}catch(_0x88915){_0xaf00fa['push'](_0xaf00fa['shift']());}}}(a197_0x1c41,0xc7874));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_0x2dbda0(0x172),a197_0x2dbda0(0x17d),'DINGTALK',a197_0x2dbda0(0x167),a197_0x2dbda0(0x1ae)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2dbda0(0x155),a197_0x2dbda0(0x1a2),'endpointUrl',a197_0x2dbda0(0x13a),a197_0x2dbda0(0x18b),'connectTimeout',a197_0x2dbda0(0x180)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2dbda0(0x164),a197_0x2dbda0(0x185),a197_0x2dbda0(0x17e)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x2dbda0(0x186),a197_0x2dbda0(0x14d),'ccList',a197_0x2dbda0(0x154),a197_0x2dbda0(0x1a6),a197_0x2dbda0(0x1b6),a197_0x2dbda0(0x1a4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2dbda0(0x168),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x16b)},{'name':a197_0x2dbda0(0x152),'type':a197_0x2dbda0(0x147),'required':![],'default':![],'description':a197_0x2dbda0(0x16e)},{'name':a197_0x2dbda0(0x16a),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x18f)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2dbda0(0x156),'required':!![],'description':a197_0x2dbda0(0x137)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xdfed52,_0x33371b,_0x1b42bb){return new CliError(_0xdfed52,0x1,_0x33371b,_0x1b42bb);}export function readNotificationId(_0x565a76){const _0x405fb3=a197_0x2dbda0,_0x84affa=_0x565a76[_0x405fb3(0x17c)]('id');if(!Number[_0x405fb3(0x196)](_0x84affa)||_0x84affa<=0x0)throw notificationError('notification_config_id_invalid',_0x405fb3(0x1af));return _0x84affa;}export function requireNotificationExplicitYes(_0x34ad57){const _0x1ebd45=a197_0x2dbda0;if(_0x34ad57['bool']('dry-run')||_0x34ad57[_0x1ebd45(0x13d)](_0x1ebd45(0x170)))return;throw notificationError(_0x1ebd45(0x199),_0x1ebd45(0x192),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x49f00c,_0x19c9a7=a197_0x2dbda0(0x17b),_0x56de0d=a197_0x2dbda0(0x172)){const _0x28b6fa=a197_0x2dbda0,_0x5697c9=_0x49f00c['str'](_0x19c9a7)['trim']()||_0x56de0d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5697c9))throw CliErrors['validation'](_0x28b6fa(0x1b2)+_0x19c9a7+':\x20'+_0x5697c9,_0x28b6fa(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x28b6fa(0x15d)](',\x20')+'.');return _0x5697c9;}export function assertSingleNotificationSource(_0x1a5660){const _0x1dc5a7=a197_0x2dbda0,_0x3ad262=[],_0x5330ab=_0x1a5660[_0x1dc5a7(0x1b1)](_0x1dc5a7(0x168))[_0x1dc5a7(0x1a3)]();if(_0x5330ab)_0x3ad262['push']({'kind':_0x1dc5a7(0x168),'path':_0x5330ab});if(_0x1a5660['bool']('stdin'))_0x3ad262[_0x1dc5a7(0x19d)]({'kind':'stdin'});const _0x13248f=_0x1a5660[_0x1dc5a7(0x1b1)]('from-env')[_0x1dc5a7(0x1a3)]();if(_0x13248f)_0x3ad262[_0x1dc5a7(0x19d)]({'kind':_0x1dc5a7(0x177),'name':_0x13248f});if(_0x3ad262[_0x1dc5a7(0x171)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x1dc5a7(0x146));if(_0x3ad262[_0x1dc5a7(0x171)]>0x1)throw CliErrors['validation'](_0x1dc5a7(0x14b),_0x1dc5a7(0x146));return _0x3ad262[0x0];}export async function readNotificationDocument(_0xa6c5cd,_0x4e7e35){const _0x497dde=a197_0x2dbda0,_0x37ae7e=assertSingleNotificationSource(_0xa6c5cd),_0x5f095e=_0x37ae7e['kind']===_0x497dde(0x168)?_0x497dde(0x19f)+_0x37ae7e[_0x497dde(0x1b5)]:_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)?_0x497dde(0x191)+_0x37ae7e[_0x497dde(0x144)]:'stdin';let _0x5106dc;try{if(_0x37ae7e[_0x497dde(0x178)]==='file')_0x5106dc=await readFile(_0x37ae7e[_0x497dde(0x1b5)],_0x497dde(0x182));else{if(_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)){if(!(_0x37ae7e['name']in process.env))throw notificationError(_0x497dde(0x18c),_0x497dde(0x1b7)+_0x37ae7e['name']);_0x5106dc=process.env[_0x37ae7e.name]??'';}else _0x5106dc=await readStdin();}}catch(_0x28a59f){if(_0x28a59f instanceof CliError)throw _0x28a59f;throw notificationError(_0x497dde(0x18c),_0x497dde(0x1a1)+_0x5f095e+'.');}let _0x274715;try{_0x274715=JSON[_0x497dde(0x161)](_0x5106dc);}catch{throw notificationError(_0x497dde(0x173),_0x497dde(0x1ac)+_0x5f095e+'\x20is\x20invalid.',_0x497dde(0x195));}if(!isJsonObject(_0x274715))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x5f095e+_0x497dde(0x187));return validateNotificationDocument(_0x274715,_0x4e7e35);}export function projectNotificationListConfig(_0xcf98b7,_0x428ff0){const _0x3c0dab=a197_0x2dbda0;return{'id':typeof _0xcf98b7['id']==='number'?_0xcf98b7['id']:null,'configCode':requireResponseString(_0xcf98b7[_0x3c0dab(0x185)],_0x3c0dab(0x185),_0x428ff0),'configName':requireResponseString(_0xcf98b7[_0x3c0dab(0x155)],'configName',_0x428ff0),'channelType':requireResponseString(_0xcf98b7['channelType'],_0x3c0dab(0x1a2),_0x428ff0),'description':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x18b)]),'createTime':normalizeNullableString(_0xcf98b7['createTime']),'updateTime':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x190)])};}export function normalizeExactNotificationConfig(_0x454308,_0x2aaa52,_0x400b50){const _0x38bdd9=a197_0x2dbda0;if(!Number[_0x38bdd9(0x196)](_0x454308['id'])||_0x454308['id']!==_0x2aaa52)throw notificationError(_0x38bdd9(0x143),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aaa52+'.');if(_0x454308['appCode']!==_0x400b50)throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+_0x38bdd9(0x181));const _0x262a8f=requireExactString(_0x454308[_0x38bdd9(0x155)],_0x38bdd9(0x155),_0x2aaa52),_0xccac33=requireExactString(_0x454308[_0x38bdd9(0x185)],'configCode',_0x2aaa52),_0x2a62a1=requireExactString(_0x454308['channelType'],_0x38bdd9(0x1a2),_0x2aaa52);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2a62a1))throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+'\x20has\x20an\x20unsupported\x20channelType.');const _0x5ba12f=responseNullableString(_0x454308[_0x38bdd9(0x1ab)],_0x38bdd9(0x1ab),_0x2aaa52),_0x43c280=responseNullableString(_0x454308[_0x38bdd9(0x13a)],_0x38bdd9(0x13a),_0x2aaa52),_0xf7456e=responseNullableString(_0x454308[_0x38bdd9(0x18b)],'description',_0x2aaa52),_0x44daa2=responseNullableTimeout(_0x454308['connectTimeout'],_0x38bdd9(0x194),_0x2aaa52),_0x385fa8=responseNullableTimeout(_0x454308[_0x38bdd9(0x180)],_0x38bdd9(0x180),_0x2aaa52);return{'id':_0x2aaa52,'appCode':_0x400b50,'configCode':_0xccac33,'configName':_0x262a8f,'channelType':_0x2a62a1,'endpointUrl':redactSensitive(_0x5ba12f),'channelConfig':redactSensitive(_0x43c280),'description':_0xf7456e,'connectTimeout':_0x44daa2,'readTimeout':_0x385fa8,'endpointUrlRaw':_0x5ba12f,'channelConfigRaw':_0x43c280};}export async function requireExactNotificationConfig(_0x446e43,_0x2ccd02,_0x49d478){const _0x28ab44=a197_0x2dbda0;let _0x420cf2;try{_0x420cf2=await getNotificationChannelConfig(_0x2ccd02,_0x446e43);}catch{throw safeApiFailure(_0x49d478,_0x28ab44(0x1a5),_0x28ab44(0x14f)+_0x446e43+_0x28ab44(0x18d));}return normalizeExactNotificationConfig(_0x420cf2,_0x2ccd02,_0x446e43);}export function projectNotificationConfig(_0x36e34d){const _0x2fb358=a197_0x2dbda0;return{'id':_0x36e34d['id']??null,'appCode':_0x36e34d[_0x2fb358(0x164)],'configCode':_0x36e34d[_0x2fb358(0x185)]??null,'configName':_0x36e34d[_0x2fb358(0x155)],'channelType':_0x36e34d[_0x2fb358(0x1a2)],'endpointUrl':redactSensitive(_0x36e34d['endpointUrl']),'channelConfig':redactSensitive(_0x36e34d[_0x2fb358(0x13a)]),'description':_0x36e34d['description']??null,'connectTimeout':_0x36e34d[_0x2fb358(0x194)]??null,'readTimeout':_0x36e34d['readTimeout']??null};}function a197_0x3912(_0x14aaeb,_0x151c11){_0x14aaeb=_0x14aaeb-0x136;const _0x1c41ee=a197_0x1c41();let _0x391221=_0x1c41ee[_0x14aaeb];return _0x391221;}export function notificationSelector(_0x48b4ac){const _0x14e018=a197_0x2dbda0;return{'appCode':_0x48b4ac[_0x14e018(0x164)],'id':_0x48b4ac['id'],'configCode':_0x48b4ac['configCode'],'configName':_0x48b4ac['configName'],'channelType':_0x48b4ac['channelType']};}export function createMutationInput(_0x1d2397,_0x3152c5){const _0x505a47=a197_0x2dbda0;return{'appCode':_0x1d2397,'configName':_0x3152c5['configName'],'channelType':_0x3152c5[_0x505a47(0x1a2)],...hasOwn(_0x3152c5,_0x505a47(0x1ab))?{'endpointUrl':_0x3152c5[_0x505a47(0x1ab)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x13a))?{'channelConfig':serializeChannelConfig(_0x3152c5[_0x505a47(0x13a)])}:{},...hasOwn(_0x3152c5,_0x505a47(0x18b))?{'description':_0x3152c5[_0x505a47(0x18b)]}:{},...hasOwn(_0x3152c5,'connectTimeout')?{'connectTimeout':_0x3152c5[_0x505a47(0x194)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x180))?{'readTimeout':_0x3152c5[_0x505a47(0x180)]}:{}};}export function mergeUpdateInput(_0x423cc7,_0x200094){const _0xe5b08a=a197_0x2dbda0;return{'id':_0x423cc7['id'],'appCode':_0x423cc7['appCode'],'configName':_0x200094['configName']??_0x423cc7[_0xe5b08a(0x155)],'channelType':_0x200094[_0xe5b08a(0x1a2)]??_0x423cc7[_0xe5b08a(0x1a2)],'endpointUrl':hasOwn(_0x200094,_0xe5b08a(0x1ab))?_0x200094['endpointUrl']:_0x423cc7['endpointUrlRaw'],'channelConfig':hasOwn(_0x200094,_0xe5b08a(0x13a))?serializeChannelConfig(_0x200094[_0xe5b08a(0x13a)]):_0x423cc7[_0xe5b08a(0x16c)],'description':hasOwn(_0x200094,_0xe5b08a(0x18b))?_0x200094[_0xe5b08a(0x18b)]:_0x423cc7['description'],'connectTimeout':hasOwn(_0x200094,'connectTimeout')?_0x200094['connectTimeout']:_0x423cc7[_0xe5b08a(0x194)],'readTimeout':hasOwn(_0x200094,_0xe5b08a(0x180))?_0x200094[_0xe5b08a(0x180)]:_0x423cc7[_0xe5b08a(0x180)]};}export function plannedUpdateProjection(_0x3b3822,_0x53331a){const _0x585411=a197_0x2dbda0;return projectNotificationConfig({'id':_0x3b3822['id'],'appCode':_0x3b3822[_0x585411(0x164)],'configCode':_0x3b3822[_0x585411(0x185)],'configName':_0x53331a[_0x585411(0x155)]??_0x3b3822[_0x585411(0x155)],'channelType':_0x53331a[_0x585411(0x1a2)]??_0x3b3822['channelType'],'endpointUrl':hasOwn(_0x53331a,_0x585411(0x1ab))?_0x53331a[_0x585411(0x1ab)]:_0x3b3822['endpointUrlRaw'],'channelConfig':hasOwn(_0x53331a,_0x585411(0x13a))?_0x53331a['channelConfig']:_0x3b3822[_0x585411(0x16c)],'description':hasOwn(_0x53331a,'description')?_0x53331a[_0x585411(0x18b)]:_0x3b3822[_0x585411(0x18b)],'connectTimeout':hasOwn(_0x53331a,_0x585411(0x194))?_0x53331a[_0x585411(0x194)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3b3822['connectTimeout'],'readTimeout':hasOwn(_0x53331a,'readTimeout')?_0x53331a[_0x585411(0x180)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3b3822[_0x585411(0x180)]});}export function requestedSafeFieldsMatch(_0x4bafc5,_0x1e14d5,_0x15587f){const _0x129932=a197_0x2dbda0,_0x429128=[],_0x2cac1a=[],_0x2faaaf=[];for(const _0x135294 of[_0x129932(0x155),_0x129932(0x1a2),_0x129932(0x18b)]){if(!hasOwn(_0x15587f,_0x135294))continue;_0x2faaaf[_0x129932(0x19d)](_0x135294),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x135294]===_0x15587f[_0x135294]),_0x2cac1a['push'](_0x4bafc5[_0x135294]!==_0x15587f[_0x135294]&&_0x1e14d5[_0x135294]===_0x15587f[_0x135294]);}for(const _0x557e4e of[_0x129932(0x194),_0x129932(0x180)]){if(!hasOwn(_0x15587f,_0x557e4e))continue;const _0x208c76=_0x15587f[_0x557e4e]??(_0x557e4e===_0x129932(0x194)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2faaaf['push'](_0x557e4e),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x557e4e]===_0x208c76),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x557e4e]!==_0x208c76&&_0x1e14d5[_0x557e4e]===_0x208c76);}return hasOwn(_0x15587f,_0x129932(0x1ab))&&_0x15587f[_0x129932(0x1ab)]===null&&(_0x2faaaf['push'](_0x129932(0x184)),_0x429128['push'](_0x1e14d5['endpointUrlRaw']===null||_0x1e14d5[_0x129932(0x19e)]===''),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x129932(0x19e)]!==null&&_0x4bafc5[_0x129932(0x19e)]!==''&&(_0x1e14d5[_0x129932(0x19e)]===null||_0x1e14d5[_0x129932(0x19e)]===''))),{'allMatch':_0x429128['every'](Boolean),'provesChange':_0x2cac1a[_0x129932(0x13e)](Boolean),'verifiedFields':_0x2faaaf};}export function validateNotificationDeleteReadback(_0x20a187,_0x20abaf,_0xe0042a){const _0x475461=a197_0x2dbda0;for(const [_0x1de155,_0x387062]of _0x20a187[_0x475461(0x174)]()){if(!Number[_0x475461(0x196)](_0x387062['id'])||_0x387062['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x387062[_0x475461(0x164)]!==_0x20abaf)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x387062[_0x475461(0x1a2)]!==_0xe0042a)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+_0x475461(0x158));}}export function safeApiFailure(_0xfaef3e,_0x5eb1be,_0xcd20aa){const _0x681ec4=a197_0x2dbda0;return notificationError(_0x681ec4(0x15e)+_0xfaef3e+'_'+(_0x5eb1be===_0x681ec4(0x159)?_0x681ec4(0x1a7):_0x5eb1be+_0x681ec4(0x198)),'Notification\x20config\x20'+_0xfaef3e+'\x20'+_0x5eb1be+'\x20failed.',_0xcd20aa);}export function notificationLookupCommand(_0x36dcf5,_0x4a1421){const _0x2b2eed=a197_0x2dbda0;return _0x2b2eed(0x19c)+_0x36dcf5+_0x2b2eed(0x139)+_0x4a1421+_0x2b2eed(0x149);}function validateNotificationDocument(_0x53d031,_0x261880){const _0x58d214=a197_0x2dbda0;for(const _0x3b7332 of Object['keys'](_0x53d031)){if(FORBIDDEN_IDENTITY_FIELDS[_0x58d214(0x140)](_0x3b7332))throw notificationError(_0x58d214(0x1a8),'Notification\x20JSON\x20field\x20\x22'+_0x3b7332+_0x58d214(0x157));if(!ALLOWED_INPUT_FIELDS['has'](_0x3b7332))throw notificationError(_0x58d214(0x145),_0x58d214(0x136)+_0x3b7332+'\x22.');}if(_0x261880===_0x58d214(0x1a9)&&Object[_0x58d214(0x166)](_0x53d031)[_0x58d214(0x171)]===0x0)throw notificationError('notification_config_update_empty','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x12f17b={};if(hasOwn(_0x53d031,_0x58d214(0x155)))_0x12f17b['configName']=validateRequiredString(_0x53d031['configName'],'configName',0x80);else{if(_0x261880===_0x58d214(0x175))throw notificationError(_0x58d214(0x18e),_0x58d214(0x1ad)+_0x58d214(0x17f));}if(hasOwn(_0x53d031,'channelType')){if(typeof _0x53d031['channelType']!=='string')throw invalidFieldType(_0x58d214(0x1a2),_0x58d214(0x15a));const _0x52ad94=_0x53d031[_0x58d214(0x1a2)][_0x58d214(0x1a3)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x193)](_0x52ad94))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x58d214(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x15d)](',\x20')+'.');_0x12f17b[_0x58d214(0x1a2)]=_0x52ad94;}else{if(_0x261880==='create')throw notificationError(_0x58d214(0x18e),'Create\x20JSON\x20requires\x20field\x20'+_0x58d214(0x163));}for(const [_0x519829,_0x1d88f1]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x53d031,_0x519829))continue;const _0x3a6fc5=_0x53d031[_0x519829];if(_0x3a6fc5!==null&&typeof _0x3a6fc5!==_0x58d214(0x169))throw invalidFieldType(_0x519829,_0x58d214(0x14a));if(typeof _0x3a6fc5===_0x58d214(0x169)&&_0x3a6fc5[_0x58d214(0x171)]>_0x1d88f1)throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x519829+'\x22\x20cannot\x20exceed\x20'+_0x1d88f1+_0x58d214(0x189));_0x12f17b[_0x519829]=_0x3a6fc5;}if(hasOwn(_0x53d031,_0x58d214(0x13a))){const _0x201722=_0x53d031[_0x58d214(0x13a)];if(_0x201722===null&&_0x261880===_0x58d214(0x175))throw invalidFieldType(_0x58d214(0x13a),_0x58d214(0x15b));if(_0x201722!==null&&!isJsonObject(_0x201722))throw invalidFieldType(_0x58d214(0x13a),_0x261880===_0x58d214(0x1a9)?_0x58d214(0x1b3):_0x58d214(0x15b));_0x201722!==null&&validateChannelConfigFields(_0x12f17b['channelType'],_0x201722),_0x12f17b['channelConfig']=_0x201722;}for(const _0x1d324c of[_0x58d214(0x194),_0x58d214(0x180)]){if(!hasOwn(_0x53d031,_0x1d324c))continue;const _0x374937=_0x53d031[_0x1d324c];if(_0x374937!==null&&(!Number[_0x58d214(0x196)](_0x374937)||_0x374937<0x0))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d324c+_0x58d214(0x19b));_0x12f17b[_0x1d324c]=_0x374937;}return _0x12f17b;}function validateRequiredString(_0x2ba5c0,_0x1d78d0,_0x564c0b){const _0x131e4d=a197_0x2dbda0;if(typeof _0x2ba5c0!==_0x131e4d(0x169))throw invalidFieldType(_0x1d78d0,'a\x20non-empty\x20string');const _0x55dbd3=_0x2ba5c0[_0x131e4d(0x1a3)]();if(!_0x55dbd3)throw notificationError(_0x131e4d(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d78d0+_0x131e4d(0x160));if(_0x55dbd3[_0x131e4d(0x171)]>_0x564c0b)throw notificationError('notification_config_field_invalid',_0x131e4d(0x151)+_0x1d78d0+'\x22\x20cannot\x20exceed\x20'+_0x564c0b+'\x20characters.');return _0x55dbd3;}function validateChannelConfigFields(_0x4b486d,_0x262812){const _0x1d68f6=a197_0x2dbda0;if(hasOwn(_0x262812,_0x1d68f6(0x138)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4b486d==='EMAIL')for(const _0x1d51f1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x262812,_0x1d51f1))throw forbiddenChannelConfigField(_0x1d51f1);}}function a197_0x1c41(){const _0x1b8ec8=['\x22\x20must\x20be\x20a\x20non-empty\x20string.','parse','<redacted>','\x22channelType\x22.','appCode','\x22\x20must\x20be\x20','keys','WECOM','file','string','from-env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20config\x20list\x20item\x20','yes','length','EMAIL','notification_config_json_invalid','entries','create','Notification\x20config\x20','env','kind','call','9aHqtFK','type','num','FEISHU','channelCode','\x22configName\x22.','readTimeout','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','utf8','\x22\x20is\x20forbidden.','endpointUrl:null','configCode','emailTargets','\x20must\x20be\x20an\x20object.','stringify','\x20characters.','1134jNqPBq','description','notification_config_source_unavailable','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','notification_config_field_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','updateTime','environment\x20variable\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','includes','connectTimeout','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','isSafeInteger','object','_unavailable','notification_config_confirmation_required','isArray','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','rabetbase\x20notification\x20config-list\x20--appcode\x20','push','endpointUrlRaw','file\x20','prototype','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','channelType','trim','fromName','preflight','replyTo','failed','notification_config_field_forbidden','update','\x20has\x20invalid\x20field\x20\x22','endpointUrl','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','WEBHOOK','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_field_invalid','str','Invalid\x20--','a\x20JSON\x20object\x20or\x20null','3384966BjtFHo','path','subjectPrefix','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','messageTemplate','\x20--type\x20','channelConfig','setEncoding','73240TnsnXf','bool','some','hasOwnProperty','has','1130WEvKDg','13868dnzPfV','notification_config_response_invalid','name','notification_config_field_unknown','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','boolean','\x20is\x20missing\x20required\x20field\x20\x22','\x20--format\x20compress','a\x20string\x20or\x20null','Notification\x20JSON\x20source\x20is\x20ambiguous.','5352610ktdemL','recipients','674436Ntijfd','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','Notification\x20JSON\x20field\x20\x22','stdin','677348ZmjmGL','bccList','configName','number','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20has\x20an\x20invalid\x20channelType.','mutation','a\x20supported\x20string','a\x20JSON\x20object','2955006rvEtxK','join','notification_config_','Allowed\x20values:\x20'];a197_0x1c41=function(){return _0x1b8ec8;};return a197_0x1c41();}function forbiddenChannelConfigField(_0x52380e){const _0x23f64d=a197_0x2dbda0;return notificationError('notification_config_channel_field_forbidden',_0x23f64d(0x16d)+_0x52380e+_0x23f64d(0x183));}function invalidFieldType(_0x2197bd,_0x420851){const _0x41a078=a197_0x2dbda0;return notificationError('notification_config_field_invalid',_0x41a078(0x151)+_0x2197bd+_0x41a078(0x165)+_0x420851+'.');}function serializeChannelConfig(_0x17650b){const _0x8b2f7b=a197_0x2dbda0;return _0x17650b===null||_0x17650b===undefined?null:JSON[_0x8b2f7b(0x188)](_0x17650b);}function redactSensitive(_0x355649){const _0x222615=a197_0x2dbda0;return _0x355649===null||_0x355649===undefined||_0x355649===''?null:_0x222615(0x162);}function requireResponseString(_0x508b67,_0x4be3f7,_0x1b06c2){const _0x5845ba=a197_0x2dbda0;if(typeof _0x508b67!=='string'||_0x508b67['trim']()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x5845ba(0x150)+(_0x1b06c2+0x1)+_0x5845ba(0x148)+_0x4be3f7+'\x22.');return _0x508b67['trim']();}function requireExactString(_0x544061,_0x4665cc,_0x16fc61){const _0x560585=a197_0x2dbda0;if(typeof _0x544061!==_0x560585(0x169)||_0x544061['trim']()==='')throw notificationError(_0x560585(0x143),'Notification\x20config\x20'+_0x16fc61+_0x560585(0x148)+_0x4665cc+'\x22.');return _0x544061[_0x560585(0x1a3)]();}function responseNullableString(_0x47797a,_0x9fc50e,_0x181df1){const _0x1d95e5=a197_0x2dbda0;if(_0x47797a===undefined||_0x47797a===null)return null;if(typeof _0x47797a!==_0x1d95e5(0x169))throw notificationError(_0x1d95e5(0x143),_0x1d95e5(0x176)+_0x181df1+_0x1d95e5(0x1aa)+_0x9fc50e+'\x22.');return _0x47797a;}function responseNullableTimeout(_0x3f2735,_0x147877,_0x1e389b){const _0x3b2ab4=a197_0x2dbda0;if(_0x3f2735===undefined||_0x3f2735===null)return null;if(!Number[_0x3b2ab4(0x196)](_0x3f2735)||_0x3f2735<0x0)throw notificationError(_0x3b2ab4(0x143),'Notification\x20config\x20'+_0x1e389b+_0x3b2ab4(0x1aa)+_0x147877+'\x22.');return _0x3f2735;}function normalizeNullableString(_0x29fbe1){const _0x18e687=a197_0x2dbda0;return typeof _0x29fbe1===_0x18e687(0x169)?_0x29fbe1:null;}function isJsonObject(_0x16bf1d){const _0x42798c=a197_0x2dbda0;return _0x16bf1d!==null&&typeof _0x16bf1d===_0x42798c(0x197)&&!Array[_0x42798c(0x19a)](_0x16bf1d);}function hasOwn(_0x3f4308,_0x1943b8){const _0x4a005d=a197_0x2dbda0;return Object[_0x4a005d(0x1a0)][_0x4a005d(0x13f)][_0x4a005d(0x179)](_0x3f4308,_0x1943b8);}async function readStdin(){const _0x10dd63=a197_0x2dbda0;let _0x461995='';process['stdin'][_0x10dd63(0x13b)](_0x10dd63(0x182));for await(const _0x59a155 of process[_0x10dd63(0x152)])_0x461995+=_0x59a155;return _0x461995;}
@@ -1 +1 @@
1
- const a198_0x1ec9d9=a198_0x4480;(function(_0x536008,_0x508a95){const _0x17b0b0=a198_0x4480,_0x176209=_0x536008();while(!![]){try{const _0x187323=-parseInt(_0x17b0b0(0x19b))/0x1+parseInt(_0x17b0b0(0x198))/0x2*(parseInt(_0x17b0b0(0x191))/0x3)+parseInt(_0x17b0b0(0x19d))/0x4+parseInt(_0x17b0b0(0x1a8))/0x5*(-parseInt(_0x17b0b0(0x1ac))/0x6)+parseInt(_0x17b0b0(0x197))/0x7+-parseInt(_0x17b0b0(0x18f))/0x8+parseInt(_0x17b0b0(0x199))/0x9;if(_0x187323===_0x508a95)break;else _0x176209['push'](_0x176209['shift']());}catch(_0x147e67){_0x176209['push'](_0x176209['shift']());}}}(a198_0x3be2,0xd9752));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=['invoice',a198_0x1ec9d9(0x190),a198_0x1ec9d9(0x1b1),a198_0x1ec9d9(0x18a)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x1ec9d9(0x1bd),'general':a198_0x1ec9d9(0x1ab),'form':a198_0x1ec9d9(0x18d),'idCard':a198_0x1ec9d9(0x1a4)},SCENE_FLAG={'name':a198_0x1ec9d9(0x1b7),'type':a198_0x1ec9d9(0x19f),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x1ec9d9(0x19f),'description':a198_0x1ec9d9(0x1a6)},IMAGE_URL_FLAG={'name':'image-url','type':a198_0x1ec9d9(0x19f),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function a198_0x3be2(){const _0x552ee1=['<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','11306505DQoSkE','495376XQvwpg','12776976qrYFzq','str','742491xzljOW','GET','1924028ynMqFI','image-url','string','validation','image-file','invoice','apiError','IdCard','fileName','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Preview:\x20recognize\x20','41755zSfMAC','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','General','1074ZdIOnb','File\x20upload\x20response\x20missing\x20filePath.','filter','appCode','POST','form','recognize','.\x20Supported\x20scenes:\x20','imageUrl','read','/smartapi/common/queryFileUrl','scene','File\x20URL\x20response\x20missing\x20fileUrl.','/smartapi/common/uploadFile','trim','Unsupported\x20OCR\x20scene:\x20','imageFile','Invoice','fileUrl','idCard','filePath','count','Table','/smartapi/ocr/recognize-text','11028896GBIDKp','general','12VAFrBh','idcard','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','toString'];a198_0x3be2=function(){return _0x552ee1;};return a198_0x3be2();}function normalizeScene(_0x50c9da){const _0x30addd=a198_0x1ec9d9,_0xc85269=_0x50c9da[_0x30addd(0x1ba)]()['toLowerCase']();if(_0xc85269===_0x30addd(0x192))return _0x30addd(0x18a);if(_0xc85269===_0x30addd(0x1a2)||_0xc85269===_0x30addd(0x190)||_0xc85269===_0x30addd(0x1b1))return _0xc85269;throw CliErrors[_0x30addd(0x1a0)](_0x30addd(0x1bb)+_0x50c9da+_0x30addd(0x1b3)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3daf74){const _0x34e5ac=a198_0x1ec9d9,_0x475d04=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x1a1))[_0x34e5ac(0x1ba)](),_0x562d22=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x19e))['trim']();return{'imageFile':_0x475d04,'imageUrl':_0x562d22,'count':[_0x475d04,_0x562d22][_0x34e5ac(0x1ae)](Boolean)['length']};}function validateInputSelection(_0x4cc9ed){const _0x452667=a198_0x1ec9d9,_0x66aba6=selectedInputs(_0x4cc9ed);if(_0x66aba6[_0x452667(0x18c)]!==0x1)throw CliErrors[_0x452667(0x1a0)](_0x452667(0x194));return _0x66aba6;}function withScene(_0xcc5bb4,_0x45cac6,_0x3fa7e6){const _0x28ee6e=a198_0x1ec9d9;return{..._0xcc5bb4,'scene':_0x45cac6,..._0x3fa7e6?{'sourceFile':{'fileName':_0x3fa7e6[_0x28ee6e(0x1a5)],'filePath':_0x3fa7e6[_0x28ee6e(0x18b)]}}:{}};}function a198_0x4480(_0x1884f3,_0x31eecc){_0x1884f3=_0x1884f3-0x18a;const _0x3be29b=a198_0x3be2();let _0x448031=_0x3be29b[_0x1884f3];return _0x448031;}const ocrRecognize={'service':'ocr','command':a198_0x1ec9d9(0x1b2),'description':a198_0x1ec9d9(0x1a9),'risk':a198_0x1ec9d9(0x1b5),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f9e64){const _0x2f520f=a198_0x1ec9d9,_0x4a9636=normalizeScene(_0x3f9e64[_0x2f520f(0x19a)]('scene')),_0xc61171=SCENE_TO_LEGACY_TYPE[_0x4a9636],_0x132922=validateInputSelection(_0x3f9e64);if(_0x132922['imageUrl']){const _0xd09fe2=new URLSearchParams({'url':_0x132922[_0x2f520f(0x1b4)],'type':_0xc61171,'appCode':_0x3f9e64['appCode']});return{'method':_0x2f520f(0x19c),'url':'/smartapi/ocr/recognize-text?'+_0xd09fe2[_0x2f520f(0x195)](),'description':_0x2f520f(0x1a7)+_0x4a9636+'\x20OCR\x20from\x20URL'};}const _0x15bfb7=requireDevelopmentUploadFile(_0x132922[_0x2f520f(0x1bc)],_0x2f520f(0x1a1));return{'method':'POST','url':_0x2f520f(0x1b9),'body':{'steps':[{'method':'POST','url':_0x2f520f(0x1b9),'body':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'multipart':{'file':_0x15bfb7}}},{'method':_0x2f520f(0x1b0),'url':_0x2f520f(0x1b6),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2f520f(0x19c),'url':_0x2f520f(0x18e),'query':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'url':_0x2f520f(0x196),'type':_0xc61171}}]},'description':_0x2f520f(0x1aa)+_0x4a9636+'\x20OCR'};},async 'execute'(_0x5c11a7){const _0x35d8da=a198_0x1ec9d9,_0x485fa7=normalizeScene(_0x5c11a7[_0x35d8da(0x19a)](_0x35d8da(0x1b7))),_0x22ece3=SCENE_TO_LEGACY_TYPE[_0x485fa7],_0x57edb0=validateInputSelection(_0x5c11a7);if(_0x57edb0['imageUrl']){const _0x4c6989=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x57edb0[_0x35d8da(0x1b4)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x4c6989,_0x485fa7)};}const _0x357db9=requireDevelopmentUploadFile(_0x57edb0[_0x35d8da(0x1bc)],'image-file'),_0x5a536f=await uploadDevelopmentFile(_0x5c11a7[_0x35d8da(0x1af)],_0x357db9[_0x35d8da(0x193)]);if(!_0x5a536f[_0x35d8da(0x18b)])throw CliErrors['apiError'](_0x35d8da(0x1ad));const _0x257ece=await queryDevelopmentFileUrl(_0x5a536f[_0x35d8da(0x18b)],{'download':![]});if(!_0x257ece[_0x35d8da(0x1be)])throw CliErrors[_0x35d8da(0x1a3)](_0x35d8da(0x1b8));const _0x1b8fa1=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x257ece[_0x35d8da(0x1be)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x1b8fa1,_0x485fa7,_0x5a536f)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a198_0x19e7b1=a198_0x5c92;(function(_0x4356f3,_0x2f21cd){const _0x1ee404=a198_0x5c92,_0x2d2469=_0x4356f3();while(!![]){try{const _0x48723b=parseInt(_0x1ee404(0x1be))/0x1*(-parseInt(_0x1ee404(0x1bd))/0x2)+parseInt(_0x1ee404(0x1c6))/0x3+parseInt(_0x1ee404(0x1c5))/0x4*(-parseInt(_0x1ee404(0x1cc))/0x5)+-parseInt(_0x1ee404(0x1e8))/0x6+parseInt(_0x1ee404(0x1da))/0x7+-parseInt(_0x1ee404(0x1d6))/0x8*(parseInt(_0x1ee404(0x1bc))/0x9)+parseInt(_0x1ee404(0x1e5))/0xa*(parseInt(_0x1ee404(0x1b8))/0xb);if(_0x48723b===_0x2f21cd)break;else _0x2d2469['push'](_0x2d2469['shift']());}catch(_0x128d09){_0x2d2469['push'](_0x2d2469['shift']());}}}(a198_0x40cc,0xb0c7f));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=['invoice',a198_0x19e7b1(0x1dd),a198_0x19e7b1(0x1d4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x19e7b1(0x1e3),'general':a198_0x19e7b1(0x1db),'form':a198_0x19e7b1(0x1b5),'idCard':a198_0x19e7b1(0x1d5)},SCENE_FLAG={'name':'scene','type':a198_0x19e7b1(0x1dc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x19e7b1(0x1cb)},IMAGE_FILE_FLAG={'name':a198_0x19e7b1(0x1cf),'type':a198_0x19e7b1(0x1dc),'description':a198_0x19e7b1(0x1e7)},IMAGE_URL_FLAG={'name':a198_0x19e7b1(0x1c3),'type':'string','description':a198_0x19e7b1(0x1d1)};function normalizeScene(_0x10776f){const _0x4cbfe5=a198_0x19e7b1,_0x40c63c=_0x10776f['trim']()[_0x4cbfe5(0x1c4)]();if(_0x40c63c==='idcard')return _0x4cbfe5(0x1ed);if(_0x40c63c===_0x4cbfe5(0x1c8)||_0x40c63c===_0x4cbfe5(0x1dd)||_0x40c63c===_0x4cbfe5(0x1d4))return _0x40c63c;throw CliErrors[_0x4cbfe5(0x1e4)](_0x4cbfe5(0x1c2)+_0x10776f+_0x4cbfe5(0x1c7)+SUPPORTED_SCENES[_0x4cbfe5(0x1ec)](',\x20'));}function a198_0x5c92(_0x6838dc,_0x2756d1){_0x6838dc=_0x6838dc-0x1b4;const _0x40cc7d=a198_0x40cc();let _0x5c92a5=_0x40cc7d[_0x6838dc];return _0x5c92a5;}function selectedInputs(_0x48d76e){const _0x5cca4a=a198_0x19e7b1,_0x548cb9=_0x48d76e[_0x5cca4a(0x1c9)](_0x5cca4a(0x1cf))[_0x5cca4a(0x1eb)](),_0x14ea67=_0x48d76e[_0x5cca4a(0x1c9)](_0x5cca4a(0x1c3))[_0x5cca4a(0x1eb)]();return{'imageFile':_0x548cb9,'imageUrl':_0x14ea67,'count':[_0x548cb9,_0x14ea67][_0x5cca4a(0x1b4)](Boolean)['length']};}function validateInputSelection(_0x483855){const _0x414d31=a198_0x19e7b1,_0x5758f0=selectedInputs(_0x483855);if(_0x5758f0['count']!==0x1)throw CliErrors[_0x414d31(0x1e4)](_0x414d31(0x1d9));return _0x5758f0;}function withScene(_0x288675,_0x1af3b2,_0x19dfa0){const _0x4abd62=a198_0x19e7b1;return{..._0x288675,'scene':_0x1af3b2,..._0x19dfa0?{'sourceFile':{'fileName':_0x19dfa0[_0x4abd62(0x1ca)],'filePath':_0x19dfa0[_0x4abd62(0x1e0)]}}:{}};}function a198_0x40cc(){const _0x1c24eb=['4rgHxxv','965124JJBmFb','.\x20Supported\x20scenes:\x20','invoice','str','fileName','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','4466940HFnlOp','appCode','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','image-file','imageFile','Publicly\x20accessible\x20image\x20or\x20file\x20URL','fileUrl','toString','form','IdCard','1014344TlMkZi','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','ocr','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3135342hXTgma','General','string','general','imageUrl','apiError','filePath','/smartapi/ocr/recognize-text?','path','Invoice','validation','10WPkEvx','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','3760548gOZJDv','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','trim','join','idCard','filter','Table','POST','recognize','28352951akebuj','GET','Preview:\x20recognize\x20','/smartapi/common/queryFileUrl','63FLpkRO','430726TgUjUF','1pMKkpX','/smartapi/common/uploadFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','File\x20URL\x20response\x20missing\x20fileUrl.','Unsupported\x20OCR\x20scene:\x20','image-url','toLowerCase'];a198_0x40cc=function(){return _0x1c24eb;};return a198_0x40cc();}const ocrRecognize={'service':a198_0x19e7b1(0x1d8),'command':a198_0x19e7b1(0x1b7),'description':a198_0x19e7b1(0x1e9),'risk':a198_0x19e7b1(0x1ea),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3a9c4a){const _0x18a127=a198_0x19e7b1,_0x1f0b8f=normalizeScene(_0x3a9c4a['str']('scene')),_0x28d483=SCENE_TO_LEGACY_TYPE[_0x1f0b8f],_0x2919a1=validateInputSelection(_0x3a9c4a);if(_0x2919a1['imageUrl']){const _0xb89477=new URLSearchParams({'url':_0x2919a1[_0x18a127(0x1de)],'type':_0x28d483,'appCode':_0x3a9c4a[_0x18a127(0x1cd)]});return{'method':_0x18a127(0x1b9),'url':_0x18a127(0x1e1)+_0xb89477[_0x18a127(0x1d3)](),'description':_0x18a127(0x1ba)+_0x1f0b8f+'\x20OCR\x20from\x20URL'};}const _0xe8eef0=requireDevelopmentUploadFile(_0x2919a1[_0x18a127(0x1d0)],'image-file');return{'method':_0x18a127(0x1b6),'url':_0x18a127(0x1bf),'body':{'steps':[{'method':'POST','url':_0x18a127(0x1bf),'body':{'appCode':_0x3a9c4a['appCode'],'multipart':{'file':_0xe8eef0}}},{'method':'POST','url':_0x18a127(0x1bb),'body':{'filePath':_0x18a127(0x1ce),'downloadFlag':![]}},{'method':_0x18a127(0x1b9),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3a9c4a['appCode'],'url':_0x18a127(0x1d7),'type':_0x28d483}}]},'description':_0x18a127(0x1c0)+_0x1f0b8f+_0x18a127(0x1e6)};},async 'execute'(_0x1b6d65){const _0xe70723=a198_0x19e7b1,_0x22946=normalizeScene(_0x1b6d65['str']('scene')),_0x13caad=SCENE_TO_LEGACY_TYPE[_0x22946],_0x21a383=validateInputSelection(_0x1b6d65);if(_0x21a383[_0xe70723(0x1de)]){const _0xa2320a=await recognizeDevelopmentOcr(_0x1b6d65[_0xe70723(0x1cd)],{'url':_0x21a383[_0xe70723(0x1de)],'type':_0x13caad});return{'ok':!![],'data':withScene(_0xa2320a,_0x22946)};}const _0x18be78=requireDevelopmentUploadFile(_0x21a383[_0xe70723(0x1d0)],_0xe70723(0x1cf)),_0x416483=await uploadDevelopmentFile(_0x1b6d65[_0xe70723(0x1cd)],_0x18be78[_0xe70723(0x1e2)]);if(!_0x416483[_0xe70723(0x1e0)])throw CliErrors[_0xe70723(0x1df)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x377c0e=await queryDevelopmentFileUrl(_0x416483[_0xe70723(0x1e0)],{'download':![]});if(!_0x377c0e[_0xe70723(0x1d2)])throw CliErrors[_0xe70723(0x1df)](_0xe70723(0x1c1));const _0x29478f=await recognizeDevelopmentOcr(_0x1b6d65['appCode'],{'url':_0x377c0e[_0xe70723(0x1d2)],'type':_0x13caad});return{'ok':!![],'data':withScene(_0x29478f,_0x22946,_0x416483)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a199_0x502dee=a199_0x3004;(function(_0x139ab3,_0x25cfdb){const _0x5e5b65=a199_0x3004,_0x3b1966=_0x139ab3();while(!![]){try{const _0x53aba0=parseInt(_0x5e5b65(0x1f6))/0x1+-parseInt(_0x5e5b65(0x21f))/0x2+-parseInt(_0x5e5b65(0x1e5))/0x3+-parseInt(_0x5e5b65(0x1f2))/0x4+parseInt(_0x5e5b65(0x1ec))/0x5*(parseInt(_0x5e5b65(0x20b))/0x6)+-parseInt(_0x5e5b65(0x1e9))/0x7*(-parseInt(_0x5e5b65(0x1fe))/0x8)+-parseInt(_0x5e5b65(0x1eb))/0x9;if(_0x53aba0===_0x25cfdb)break;else _0x3b1966['push'](_0x3b1966['shift']());}catch(_0x3cb3ce){_0x3b1966['push'](_0x3b1966['shift']());}}}(a199_0x5311,0x651a9));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a199_0x5311(){const _0x9a183d=['str','28gilnaP','page-type','5283108cRiCqF','1212385SuyVVw','name','Invalid\x20Custom\x20Page\x20pattern:\x20','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','CUSTOM','1456612mvDyQz','page.create','pageName','page-dir','212455WEWAkV','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','string','now','length','isArray','menuId','1655560qfEQsw','stringify','POST','\x20and\x20its\x20menu\x20entry.','page','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','keys','Created\x20Custom\x20Page\x20','pageName\x20cannot\x20exceed\x20100\x20characters.','trim','validation','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','18meEIMM','page-pattern','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parent-menu-id','version','num','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','parse','appCode','../../../templates/custom-pages','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','includes','isInteger','ONEPAGE','pageId','menuPath','some','page\x20create\x20does\x20not\x20accept\x20--page-type.','object','parentMenuId','803110uHPteu','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','Custom_page_','utf8','.json','create','Custom\x20Page\x20pattern\x20not\x20found:\x20','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','2475OUXyrL','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','DASHBOARD'];a199_0x5311=function(){return _0x9a183d;};return a199_0x5311();}function a199_0x3004(_0x1db273,_0x1de00d){_0x1db273=_0x1db273-0x1dd;const _0x5311b1=a199_0x5311();let _0x300487=_0x5311b1[_0x1db273];return _0x300487;}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a199_0x502dee(0x218),a199_0x502dee(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x502dee(0x214));export const pageCreate={'service':a199_0x502dee(0x202),'command':a199_0x502dee(0x1e1),'description':a199_0x502dee(0x211),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a199_0x502dee(0x1ea),'message':a199_0x502dee(0x21c),'hint':a199_0x502dee(0x203)},{'name':a199_0x502dee(0x1e3),'message':a199_0x502dee(0x209),'hint':a199_0x502dee(0x1e4)}],'flags':[{'name':a199_0x502dee(0x1ed),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x20d)},{'name':a199_0x502dee(0x20e),'type':'number','description':a199_0x502dee(0x1dd)},{'name':a199_0x502dee(0x20c),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x1f8),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x502dee(0x1f5),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x20a)},APPCODE_FLAG],async 'validate'(_0x341637){await readValidatedPageSource(_0x341637);},async 'dryRun'(_0x47dfbe){const _0x45b393=a199_0x502dee,_0x5409ef=readInput(_0x47dfbe,await readValidatedPageSource(_0x47dfbe));return{'method':_0x45b393(0x200),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x5409ef['appCode'],'pageName':_0x5409ef[_0x45b393(0x1f4)],..._0x5409ef[_0x45b393(0x21e)]!=null?{'parentMenuId':_0x5409ef[_0x45b393(0x21e)]}:{},'createMenu':_0x5409ef['createMenu'],'codeContent':_0x5409ef[_0x45b393(0x1f7)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x45b393(0x1ff)](_0x5409ef['pageName'])+_0x45b393(0x201)};},async 'execute'(_0x2c5f0e){const _0x5a89d9=a199_0x502dee,_0x4d5aba=readInput(_0x2c5f0e,await readValidatedPageSource(_0x2c5f0e)),_0x118bf0=await createCustomPage(_0x4d5aba);if(!Number[_0x5a89d9(0x217)](_0x118bf0[_0x5a89d9(0x219)])||_0x118bf0[_0x5a89d9(0x219)]<=0x0)throw CliErrors['apiError'](_0x5a89d9(0x1ef));const _0x4effba=buildCustomPageDevelopmentUrl(_0x4d5aba['appCode'],_0x118bf0[_0x5a89d9(0x21a)]),_0x157999=buildCustomPageEditUrl(_0x4d5aba[_0x5a89d9(0x213)],_0x118bf0[_0x5a89d9(0x219)]);return{'ok':!![],'data':{'operation':_0x5a89d9(0x1f3),'pageType':_0x5a89d9(0x1f1),'pagePattern':readPagePattern(_0x2c5f0e),'selector':{'appCode':_0x4d5aba['appCode'],'pageName':_0x4d5aba[_0x5a89d9(0x1f4)]},'before':null,'after':{'pageId':_0x118bf0[_0x5a89d9(0x219)],'pageName':_0x118bf0['pageName'],'appCode':_0x118bf0[_0x5a89d9(0x213)],'version':_0x118bf0[_0x5a89d9(0x20f)],'menuId':_0x118bf0[_0x5a89d9(0x1fd)],'menuPath':_0x118bf0['menuPath'],'files':_0x118bf0[_0x5a89d9(0x1f7)]??Object[_0x5a89d9(0x204)](_0x4d5aba[_0x5a89d9(0x1f7)])},'dryRun':![],'request':_0x4d5aba,..._0x4effba?{'pageUrl':_0x4effba}:{},..._0x157999?{'editPageUrl':_0x157999}:{},'warnings':_0x4effba?[]:[_0x5a89d9(0x215)]},'message':_0x5a89d9(0x205)+_0x118bf0[_0x5a89d9(0x219)]+'.'};}};function readPagePattern(_0x208b83){const _0x4f3934=a199_0x502dee,_0x34348c=_0x208b83['str'](_0x4f3934(0x20c))['trim'](),_0x65e982=_0x208b83['str'](_0x4f3934(0x1f5))[_0x4f3934(0x207)]();if(_0x34348c&&_0x65e982)throw CliErrors[_0x4f3934(0x208)](_0x4f3934(0x1e6));if(_0x65e982)return null;if(!_0x34348c)throw CliErrors[_0x4f3934(0x208)](_0x4f3934(0x1f0));if(!CUSTOM_PAGE_PATTERNS[_0x4f3934(0x216)](_0x34348c))throw CliErrors[_0x4f3934(0x208)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x34348c;}async function readPageSource(_0x26b147){const _0x55004e=a199_0x502dee,_0x1b402f=_0x26b147[_0x55004e(0x1e8)](_0x55004e(0x1f5))[_0x55004e(0x207)](),_0x5a486c=readPagePattern(_0x26b147);if(_0x5a486c===null){const _0x3b9c28=await readCustomPageDirectory(_0x1b402f);if(Object[_0x55004e(0x204)](_0x3b9c28)[_0x55004e(0x1fb)]===0x0)throw CliErrors[_0x55004e(0x208)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3b9c28;}let _0x4af731;try{_0x4af731=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x5a486c['toLowerCase']()+_0x55004e(0x1e0)),_0x55004e(0x1df));}catch{throw CliErrors[_0x55004e(0x208)](_0x55004e(0x1e2)+_0x5a486c+'.');}let _0x4b4837;try{_0x4b4837=JSON[_0x55004e(0x212)](_0x4af731);}catch{throw CliErrors[_0x55004e(0x208)](_0x55004e(0x1ee)+_0x5a486c+'.');}if(!_0x4b4837||typeof _0x4b4837!==_0x55004e(0x21d)||Array[_0x55004e(0x1fc)](_0x4b4837)||Object['values'](_0x4b4837)[_0x55004e(0x21b)](_0x26f1a6=>typeof _0x26f1a6!=='string'))throw CliErrors[_0x55004e(0x208)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x5a486c+'.');return _0x4b4837;}async function readValidatedPageSource(_0x4d3746){const _0x3e2fca=await readPageSource(_0x4d3746);return await validateCustomPageContent(_0x3e2fca),_0x3e2fca;}function readInput(_0xa85f67,_0x259865){const _0x4edff8=a199_0x502dee,_0x229cfa=_0xa85f67[_0x4edff8(0x1e8)]('name')['trim']()||_0x4edff8(0x1de)+Date[_0x4edff8(0x1fa)]();if(_0x229cfa[_0x4edff8(0x1fb)]>0x64)throw CliErrors[_0x4edff8(0x208)](_0x4edff8(0x206));const _0x2d3a40=_0xa85f67[_0x4edff8(0x210)]('parent-menu-id',NaN),_0xc8b259=!Number['isNaN'](_0x2d3a40);if(_0xc8b259&&(!Number[_0x4edff8(0x217)](_0x2d3a40)||_0x2d3a40<=0x0))throw CliErrors[_0x4edff8(0x208)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0xa85f67[_0x4edff8(0x213)],'pageName':_0x229cfa,..._0xc8b259?{'parentMenuId':_0x2d3a40}:{},'createMenu':!![],'files':_0x259865};}
1
+ const a199_0x2be3bc=a199_0x24fd;(function(_0xaa4e9,_0x3e1750){const _0x19ab2b=a199_0x24fd,_0x257b1f=_0xaa4e9();while(!![]){try{const _0x33ffa4=-parseInt(_0x19ab2b(0x13a))/0x1*(parseInt(_0x19ab2b(0x15c))/0x2)+parseInt(_0x19ab2b(0x147))/0x3+-parseInt(_0x19ab2b(0x143))/0x4+-parseInt(_0x19ab2b(0x155))/0x5+parseInt(_0x19ab2b(0x164))/0x6+parseInt(_0x19ab2b(0x14a))/0x7+-parseInt(_0x19ab2b(0x12f))/0x8*(-parseInt(_0x19ab2b(0x15e))/0x9);if(_0x33ffa4===_0x3e1750)break;else _0x257b1f['push'](_0x257b1f['shift']());}catch(_0x2b3e14){_0x257b1f['push'](_0x257b1f['shift']());}}}(a199_0x1e22,0x2e3f9));import{readFile}from'node:fs/promises';function a199_0x1e22(){const _0x29d499=['pageName\x20cannot\x20exceed\x20100\x20characters.','trim','menuId','BLANK','keys','isInteger','menuPath','ONEPAGE','write','files','includes','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','784rYBzNr','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','POST','/smartapi/webcode/page/create','Created\x20Custom\x20Page\x20','Custom\x20Page\x20pattern\x20not\x20found:\x20','string','page-content','../../../templates/custom-pages','parse','apiError','1OKKWkj','compress','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','parent-menu-id','version','DASHBOARD','str','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','1382768AUcPYA','name','pageId','Would\x20create\x20Custom\x20Page\x20','451368XVHlTi','utf8','CUSTOM','617239GmupqQ','create','object','appCode','some','parentMenuId','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','page-dir','isArray','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page-type','1435585uveRyc','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','validation','values','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','374966NDsnkP','page-pattern','57906CiOScZ','isNaN','number','stringify','pageName','page\x20create\x20does\x20not\x20accept\x20--page-type.','843360IWgunt','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','num','page.create','\x20and\x20its\x20menu\x20entry.'];a199_0x1e22=function(){return _0x29d499;};return a199_0x1e22();}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a199_0x24fd(_0xc4b3da,_0x3a7fcd){_0xc4b3da=_0xc4b3da-0x12f;const _0x1e22f6=a199_0x1e22();let _0x24fd20=_0x1e22f6[_0xc4b3da];return _0x24fd20;}const CUSTOM_PAGE_PATTERNS=[a199_0x2be3bc(0x16c),a199_0x2be3bc(0x170),a199_0x2be3bc(0x13f)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x2be3bc(0x137));export const pageCreate={'service':'page','command':a199_0x2be3bc(0x14b),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a199_0x2be3bc(0x171),'defaultOutputFormat':a199_0x2be3bc(0x13b),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x2be3bc(0x154),'message':a199_0x2be3bc(0x163),'hint':a199_0x2be3bc(0x130)},{'name':a199_0x2be3bc(0x136),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a199_0x2be3bc(0x15b)}],'flags':[{'name':a199_0x2be3bc(0x144),'type':a199_0x2be3bc(0x135),'description':a199_0x2be3bc(0x157)},{'name':a199_0x2be3bc(0x13d),'type':a199_0x2be3bc(0x160),'description':a199_0x2be3bc(0x15a)},{'name':a199_0x2be3bc(0x15d),'type':a199_0x2be3bc(0x135),'description':a199_0x2be3bc(0x141),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x2be3bc(0x151),'type':a199_0x2be3bc(0x135),'description':a199_0x2be3bc(0x165)},APPCODE_FLAG],async 'validate'(_0x418eb1){await readValidatedPageSource(_0x418eb1);},async 'dryRun'(_0xa92cc7){const _0x3cf2c0=a199_0x2be3bc,_0x415243=readInput(_0xa92cc7,await readValidatedPageSource(_0xa92cc7));return{'method':_0x3cf2c0(0x131),'url':_0x3cf2c0(0x132),'body':{'appCode':_0x415243[_0x3cf2c0(0x14d)],'pageName':_0x415243[_0x3cf2c0(0x162)],..._0x415243['parentMenuId']!=null?{'parentMenuId':_0x415243[_0x3cf2c0(0x14f)]}:{},'createMenu':_0x415243['createMenu'],'codeContent':_0x415243[_0x3cf2c0(0x172)]},'description':_0x3cf2c0(0x146)+JSON[_0x3cf2c0(0x161)](_0x415243['pageName'])+_0x3cf2c0(0x168)};},async 'execute'(_0x1c93a7){const _0x4066a0=a199_0x2be3bc,_0x44d47d=readInput(_0x1c93a7,await readValidatedPageSource(_0x1c93a7)),_0x58af4c=await createCustomPage(_0x44d47d);if(!Number[_0x4066a0(0x16e)](_0x58af4c[_0x4066a0(0x145)])||_0x58af4c['pageId']<=0x0)throw CliErrors[_0x4066a0(0x139)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x229417=buildCustomPageDevelopmentUrl(_0x44d47d[_0x4066a0(0x14d)],_0x58af4c['menuPath']),_0x2294e6=buildCustomPageEditUrl(_0x44d47d['appCode'],_0x58af4c[_0x4066a0(0x145)]);return{'ok':!![],'data':{'operation':_0x4066a0(0x167),'pageType':_0x4066a0(0x149),'pagePattern':readPagePattern(_0x1c93a7),'selector':{'appCode':_0x44d47d[_0x4066a0(0x14d)],'pageName':_0x44d47d['pageName']},'before':null,'after':{'pageId':_0x58af4c['pageId'],'pageName':_0x58af4c[_0x4066a0(0x162)],'appCode':_0x58af4c[_0x4066a0(0x14d)],'version':_0x58af4c[_0x4066a0(0x13e)],'menuId':_0x58af4c[_0x4066a0(0x16b)],'menuPath':_0x58af4c[_0x4066a0(0x16f)],'files':_0x58af4c[_0x4066a0(0x172)]??Object[_0x4066a0(0x16d)](_0x44d47d[_0x4066a0(0x172)])},'dryRun':![],'request':_0x44d47d,..._0x229417?{'pageUrl':_0x229417}:{},..._0x2294e6?{'editPageUrl':_0x2294e6}:{},'warnings':_0x229417?[]:[_0x4066a0(0x153)]},'message':_0x4066a0(0x133)+_0x58af4c[_0x4066a0(0x145)]+'.'};}};function readPagePattern(_0x33e939){const _0xd2fd75=a199_0x2be3bc,_0x4d9a92=_0x33e939[_0xd2fd75(0x140)](_0xd2fd75(0x15d))[_0xd2fd75(0x16a)](),_0x49b204=_0x33e939[_0xd2fd75(0x140)](_0xd2fd75(0x151))[_0xd2fd75(0x16a)]();if(_0x4d9a92&&_0x49b204)throw CliErrors[_0xd2fd75(0x158)](_0xd2fd75(0x150));if(_0x49b204)return null;if(!_0x4d9a92)throw CliErrors[_0xd2fd75(0x158)](_0xd2fd75(0x156));if(!CUSTOM_PAGE_PATTERNS[_0xd2fd75(0x173)](_0x4d9a92))throw CliErrors[_0xd2fd75(0x158)](_0xd2fd75(0x142));return _0x4d9a92;}async function readPageSource(_0x266a7a){const _0x15f205=a199_0x2be3bc,_0x3fba72=_0x266a7a[_0x15f205(0x140)]('page-dir')[_0x15f205(0x16a)](),_0x28c3a2=readPagePattern(_0x266a7a);if(_0x28c3a2===null){const _0x4f695f=await readCustomPageDirectory(_0x3fba72);if(Object['keys'](_0x4f695f)[_0x15f205(0x175)]===0x0)throw CliErrors[_0x15f205(0x158)](_0x15f205(0x13c));return _0x4f695f;}let _0x402975;try{_0x402975=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x28c3a2['toLowerCase']()+'.json'),_0x15f205(0x148));}catch{throw CliErrors['validation'](_0x15f205(0x134)+_0x28c3a2+'.');}let _0x51d79f;try{_0x51d79f=JSON[_0x15f205(0x138)](_0x402975);}catch{throw CliErrors[_0x15f205(0x158)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x28c3a2+'.');}if(!_0x51d79f||typeof _0x51d79f!==_0x15f205(0x14c)||Array[_0x15f205(0x152)](_0x51d79f)||Object[_0x15f205(0x159)](_0x51d79f)[_0x15f205(0x14e)](_0x513d33=>typeof _0x513d33!==_0x15f205(0x135)))throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x28c3a2+'.');return _0x51d79f;}async function readValidatedPageSource(_0x5627f2){const _0x44b427=await readPageSource(_0x5627f2);return await validateCustomPageContent(_0x44b427),_0x44b427;}function readInput(_0x28eb09,_0x54c7bf){const _0x5f507b=a199_0x2be3bc,_0x568343=_0x28eb09[_0x5f507b(0x140)](_0x5f507b(0x144))[_0x5f507b(0x16a)]()||'Custom_page_'+Date['now']();if(_0x568343[_0x5f507b(0x175)]>0x64)throw CliErrors[_0x5f507b(0x158)](_0x5f507b(0x169));const _0x5d32d7=_0x28eb09[_0x5f507b(0x166)](_0x5f507b(0x13d),NaN),_0xabbc8f=!Number[_0x5f507b(0x15f)](_0x5d32d7);if(_0xabbc8f&&(!Number[_0x5f507b(0x16e)](_0x5d32d7)||_0x5d32d7<=0x0))throw CliErrors['validation'](_0x5f507b(0x174));return{'appCode':_0x28eb09['appCode'],'pageName':_0x568343,..._0xabbc8f?{'parentMenuId':_0x5d32d7}:{},'createMenu':!![],'files':_0x54c7bf};}
@@ -1 +1 @@
1
- const a200_0xc60ee6=a200_0x408f;function a200_0x287c(){const _0x23bf8a=['getHours','9044VWNPdv','getSeconds','page','appCode','join','pageCode','36ieAkoF','str','getMinutes','getMonth','trim','getDate','Custom\x20Page\x20ID','12392655ULuCFP','getFullYear','getTime','36rRBzwc','read','4747260lAiVpB','number','compress','222236dNUbkT','154408vYGhqw','10399250eOXhSE','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','padStart','isNaN','112wRAZuU','84etHbjB','1776616aSUNSA'];a200_0x287c=function(){return _0x23bf8a;};return a200_0x287c();}function a200_0x408f(_0x27ec92,_0x5b11b2){_0x27ec92=_0x27ec92-0x168;const _0x287cff=a200_0x287c();let _0x408f10=_0x287cff[_0x27ec92];return _0x408f10;}(function(_0x3c6de1,_0x387afa){const _0x5bd502=a200_0x408f,_0x23b617=_0x3c6de1();while(!![]){try{const _0x47c2=-parseInt(_0x5bd502(0x175))/0x1*(-parseInt(_0x5bd502(0x171))/0x2)+parseInt(_0x5bd502(0x185))/0x3*(parseInt(_0x5bd502(0x16c))/0x4)+-parseInt(_0x5bd502(0x168))/0x5+-parseInt(_0x5bd502(0x172))/0x6*(parseInt(_0x5bd502(0x16b))/0x7)+-parseInt(_0x5bd502(0x173))/0x8*(-parseInt(_0x5bd502(0x17b))/0x9)+-parseInt(_0x5bd502(0x16d))/0xa+parseInt(_0x5bd502(0x182))/0xb;if(_0x47c2===_0x387afa)break;else _0x23b617['push'](_0x23b617['shift']());}catch(_0x4146fd){_0x23b617['push'](_0x23b617['shift']());}}}(a200_0x287c,0x86760));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0xc60ee6(0x177),'command':'custom-detail','description':a200_0xc60ee6(0x16e),'risk':a200_0xc60ee6(0x186),'defaultOutputFormat':a200_0xc60ee6(0x16a),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0xc60ee6(0x169),'required':!![],'description':a200_0xc60ee6(0x181)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c6693){readCustomPageId(_0x4c6693);},async 'execute'(_0x483814){const _0x1d736a=a200_0xc60ee6,_0x1188c7=readCustomPageId(_0x483814),_0x2b7150=await getCustomPageSource(_0x1188c7),{bundle:_0x1482cb,createTime:_0x7ca2d,updateTime:_0x9e3969,..._0xed6dbf}=_0x2b7150,_0x8a8233=_0x2b7150['id']??_0x1188c7,_0x43c5b7=_0x2b7150[_0x1d736a(0x178)]?.[_0x1d736a(0x17f)]()||_0x483814[_0x1d736a(0x17c)]('appcode')[_0x1d736a(0x17f)](),_0x2cc567=buildCustomPageRuntimeUrl(_0x43c5b7,_0x2b7150[_0x1d736a(0x17a)]),_0xa9912c=buildCustomPageEditUrl(_0x43c5b7,_0x8a8233),_0x17432e=await resolveCustomPageDevelopmentUrl(_0x43c5b7,_0x8a8233,_0x483814['cookie']);return{'ok':!![],'data':{..._0xed6dbf,..._0x2cc567?{'runtimePageUrl':_0x2cc567}:{},..._0x17432e?{'pageUrl':_0x17432e}:{},..._0xa9912c?{'editPageUrl':_0xa9912c}:{},..._0x7ca2d==null?{}:{'createTime':formatTime(_0x7ca2d)},..._0x9e3969==null?{}:{'updateTime':formatTime(_0x9e3969)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x1188c7+'.'};}};function formatTime(_0x4d3eb8){const _0x4d0263=a200_0xc60ee6,_0x3341de=new Date(_0x4d3eb8);if(Number[_0x4d0263(0x170)](_0x3341de[_0x4d0263(0x184)]()))return String(_0x4d3eb8);const _0x3d4cbf=[_0x3341de[_0x4d0263(0x183)](),String(_0x3341de[_0x4d0263(0x17e)]()+0x1)[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x180)]())[_0x4d0263(0x16f)](0x2,'0')]['join']('-'),_0x53fdbb=[String(_0x3341de[_0x4d0263(0x174)]())[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x17d)]())[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x176)]())[_0x4d0263(0x16f)](0x2,'0')][_0x4d0263(0x179)](':');return _0x3d4cbf+'\x20'+_0x53fdbb;}
1
+ const a200_0x184157=a200_0x201b;function a200_0x53a1(){const _0x2209ae=['getHours','getDate','685355IFoZWX','27ixeXRS','285486AGAjGS','getSeconds','Custom\x20Page\x20ID','str','getTime','join','4585630tLeXfX','padStart','pageCode','1121528NsCzCr','custom-detail','24wuNQNs','getMinutes','5svfInX','10mzQwtE','getFullYear','50818IkccYU','829884XjrRqb','trim','number','7WJGpCN','isNaN','Retrieved\x20Custom\x20Page\x20','20191776JVSnUr'];a200_0x53a1=function(){return _0x2209ae;};return a200_0x53a1();}(function(_0x8fa69c,_0x5d141e){const _0x5e653a=a200_0x201b,_0x291d1d=_0x8fa69c();while(!![]){try{const _0x1b2b22=parseInt(_0x5e653a(0x172))/0x1*(parseInt(_0x5e653a(0x16e))/0x2)+-parseInt(_0x5e653a(0x17a))/0x3*(-parseInt(_0x5e653a(0x169))/0x4)+parseInt(_0x5e653a(0x16b))/0x5*(parseInt(_0x5e653a(0x16f))/0x6)+parseInt(_0x5e653a(0x180))/0x7+parseInt(_0x5e653a(0x183))/0x8*(parseInt(_0x5e653a(0x179))/0x9)+-parseInt(_0x5e653a(0x16c))/0xa*(-parseInt(_0x5e653a(0x178))/0xb)+-parseInt(_0x5e653a(0x175))/0xc;if(_0x1b2b22===_0x5d141e)break;else _0x291d1d['push'](_0x291d1d['shift']());}catch(_0x39a5d9){_0x291d1d['push'](_0x291d1d['shift']());}}}(a200_0x53a1,0x539c5));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x201b(_0x4b9540,_0xc1a0d5){_0x4b9540=_0x4b9540-0x168;const _0x53a1c8=a200_0x53a1();let _0x201bc7=_0x53a1c8[_0x4b9540];return _0x201bc7;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a200_0x184157(0x168),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x184157(0x171),'required':!![],'description':a200_0x184157(0x17c)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23177a){readCustomPageId(_0x23177a);},async 'execute'(_0x57f443){const _0x3867bd=a200_0x184157,_0x5df6c5=readCustomPageId(_0x57f443),_0x4665f6=await getCustomPageSource(_0x5df6c5),{bundle:_0x3d0668,createTime:_0x5a3259,updateTime:_0x3ba28c,..._0x41ae58}=_0x4665f6,_0x1ad03b=_0x4665f6['id']??_0x5df6c5,_0x534f41=_0x4665f6['appCode']?.['trim']()||_0x57f443[_0x3867bd(0x17d)]('appcode')[_0x3867bd(0x170)](),_0xa8113=buildCustomPageRuntimeUrl(_0x534f41,_0x4665f6[_0x3867bd(0x182)]),_0x309c40=buildCustomPageEditUrl(_0x534f41,_0x1ad03b),_0x145a3f=await resolveCustomPageDevelopmentUrl(_0x534f41,_0x1ad03b,_0x57f443['cookie']);return{'ok':!![],'data':{..._0x41ae58,..._0xa8113?{'runtimePageUrl':_0xa8113}:{},..._0x145a3f?{'pageUrl':_0x145a3f}:{},..._0x309c40?{'editPageUrl':_0x309c40}:{},..._0x5a3259==null?{}:{'createTime':formatTime(_0x5a3259)},..._0x3ba28c==null?{}:{'updateTime':formatTime(_0x3ba28c)}},'message':_0x3867bd(0x174)+_0x5df6c5+'.'};}};function formatTime(_0x229910){const _0x3542be=a200_0x184157,_0x16967a=new Date(_0x229910);if(Number[_0x3542be(0x173)](_0x16967a[_0x3542be(0x17e)]()))return String(_0x229910);const _0x53967e=[_0x16967a[_0x3542be(0x16d)](),String(_0x16967a['getMonth']()+0x1)['padStart'](0x2,'0'),String(_0x16967a[_0x3542be(0x177)]())[_0x3542be(0x181)](0x2,'0')][_0x3542be(0x17f)]('-'),_0xcab20d=[String(_0x16967a[_0x3542be(0x176)]())[_0x3542be(0x181)](0x2,'0'),String(_0x16967a[_0x3542be(0x16a)]())[_0x3542be(0x181)](0x2,'0'),String(_0x16967a[_0x3542be(0x17b)]())[_0x3542be(0x181)](0x2,'0')][_0x3542be(0x17f)](':');return _0x53967e+'\x20'+_0xcab20d;}