@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.2

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 (379) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +2 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase-page-generation/SKILL.md +39 -0
  359. package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
  360. package/skills/rabetbase-page-generation/references/generation.md +126 -0
  361. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +48 -0
  362. package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
  363. package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
  364. package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
  365. package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
  366. package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
  367. package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
  368. package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
  369. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +721 -0
  370. package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
  371. package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
  372. package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
  373. package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
  374. package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
  375. package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
  376. package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
  377. package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
  378. package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
  379. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a180_0x5f488b=a180_0x5ce2;function a180_0x5272(){const _0x292012=['hash','get','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','path','modelType','childrenIds','resources','pageType','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','datasetCode','expectedCount','visibility-update','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','high-risk-write','validation','expected-count','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','some','600285HyDBeq','rabetbase\x20menu\x20list\x20--format\x20compress','menu_selector_ambiguous','map','plan','true','requestedVisible','message','byId','recovered','url','2693592QDxeuM','Final\x20menu\x20visibility\x20readback\x20failed.','\x20updated,\x20','paths','isArray','label','update\x20visibility\x20for','set','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','50LtVWPu','isSafeInteger','datasetId','Updated\x20visibility\x20for\x20','\x20menu(s);\x20skipped\x20','update-recovery','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','push','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','\x20skipped,\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20must\x20be\x20true\x20or\x20false.','cookie','string','targets','209476cdXiws','8zJKPui','failed','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','false','menu-ids','menu\x20list','childrenCount','/smartapi/menu/update','expect-visible','menu_expected_count_mismatch','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','flagMissing','values','code','820813fPoXvb','body','number','split','verification','trim','15692gFioKi','129PdcjcE','Would\x20update\x20visibility\x20for\x20','Menu\x20','boolean','sort','visible','menu_verification_failed','updated','menuIds','939719rKyjwy','menu','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Requested\x20menu\x20visibility','\x20menu(s);\x20skip\x20','depth','expectVisible','appCode','menu_selector_not_found','12Wguepk','plannedActions','\x20unchanged\x20menu(s).','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','261142YhQBXp','warnings','update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','before','Menu\x20visibility\x20update\x20completed:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resourcesValid','beforeById','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','length','Selected\x20','stringify','pageId','update-menu-visibility','update\x20menu\x20visibility','num','parentId','\x20failed.','filter'];a180_0x5272=function(){return _0x292012;};return a180_0x5272();}(function(_0x461fde,_0x5d6c27){const _0x606da7=a180_0x5ce2,_0x2a3464=_0x461fde();while(!![]){try{const _0x1fe36b=parseInt(_0x606da7(0x199))/0x1+-parseInt(_0x606da7(0x1c8))/0x2+-parseInt(_0x606da7(0x1b2))/0x3*(parseInt(_0x606da7(0x1b1))/0x4)+parseInt(_0x606da7(0x1f7))/0x5*(parseInt(_0x606da7(0x1c4))/0x6)+-parseInt(_0x606da7(0x1ab))/0x7*(parseInt(_0x606da7(0x19a))/0x8)+-parseInt(_0x606da7(0x202))/0x9+parseInt(_0x606da7(0x20b))/0xa*(parseInt(_0x606da7(0x1bb))/0xb);if(_0x1fe36b===_0x5d6c27)break;else _0x2a3464['push'](_0x2a3464['shift']());}catch(_0x4c7703){_0x2a3464['push'](_0x2a3464['shift']());}}}(a180_0x5272,0x274a0));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a180_0x5ce2(_0x47e5ab,_0x5007b1){_0x47e5ab=_0x47e5ab-0x18d;const _0x5272e7=a180_0x5272();let _0x5ce296=_0x5272e7[_0x47e5ab];return _0x5ce296;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x5f488b(0x1ef),'path':a180_0x5f488b(0x1a1)}];export const menuVisibilityUpdate={'service':a180_0x5f488b(0x1bc),'command':a180_0x5f488b(0x1ec),'description':a180_0x5f488b(0x190),'risk':a180_0x5f488b(0x1f2),'structuredErrors':!![],'flags':[{'name':a180_0x5f488b(0x19e),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1c7)},{'name':a180_0x5f488b(0x205),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1ee)},{'name':a180_0x5f488b(0x1b7),'type':a180_0x5f488b(0x1b5),'required':!![],'description':a180_0x5f488b(0x1be)},{'name':a180_0x5f488b(0x1a2),'type':a180_0x5f488b(0x1b5),'description':a180_0x5f488b(0x1cb)},{'name':a180_0x5f488b(0x1f4),'type':a180_0x5f488b(0x1ad),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x182f42){parseInput(_0x182f42),requireExplicitYes(_0x182f42);},async 'dryRun'(_0x182175){const _0x38645f=a180_0x5f488b,_0x3d3b29=await buildPlan(_0x182175,!![]),_0x391be0=_0x3d3b29[_0x38645f(0x1fb)]['plannedActions']?.[_0x38645f(0x1d4)]??0x0,_0x2a9a4f=_0x3d3b29['plan'][_0x38645f(0x198)][_0x38645f(0x1d4)]-_0x391be0;return menuDryRunResult(_0x3d3b29[_0x38645f(0x1fb)],{'method':_0x38645f(0x1ef),'url':_0x38645f(0x1a1),'body':{'updates':_0x3d3b29[_0x38645f(0x1fb)][_0x38645f(0x1c5)]?.[_0x38645f(0x1fa)](_0x21de81=>_0x21de81[_0x38645f(0x1ac)])??[]},'description':_0x38645f(0x1b3)+_0x391be0+_0x38645f(0x1bf)+_0x2a9a4f+_0x38645f(0x1c6)});},async 'execute'(_0x2cd634){const _0x1c5cc3=a180_0x5f488b;requireExplicitYes(_0x2cd634);const _0x149bd5=await buildPlan(_0x2cd634,![]);await recheckMutationSnapshot(_0x2cd634,_0x149bd5['plan'],_0x1c5cc3(0x1d9));const _0x1f6d5f=[],_0x2d56ba=[],_0x80d278=[];for(const _0x11d387 of _0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]){if(_0x11d387['before'][_0x1c5cc3(0x1b7)]===_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]){_0x1f6d5f['push']({'id':_0x11d387['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634['cookie'],{'id':_0x11d387['id'],'visible':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]}),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'updated':!![],'skipped':![]});}catch(_0x378286){const _0x47b226=mapMenuApiError(_0x378286,_0x1c5cc3(0x208),_0x11d387['id']);if(isMenuResponseLoss(_0x378286)&&_0x47b226[_0x1c5cc3(0x1aa)]!=='menu_permission_denied'){_0x80d278[_0x1c5cc3(0x191)](_0x11d387['id']);continue;}_0x2d56ba[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'stage':_0x1c5cc3(0x1ca),'code':_0x47b226[_0x1c5cc3(0x1aa)],'message':_0x47b226[_0x1c5cc3(0x1fe)]});}}let _0x42f8f8;try{_0x42f8f8=await fetchMenuSnapshot(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634[_0x1c5cc3(0x196)]);}catch(_0xbe09a4){const _0x56a7fb=describeMenuErrorCause(_0xbe09a4,'verify\x20menu\x20visibility\x20update'),_0x4b540b=_0x80d278[_0x1c5cc3(0x1fa)](_0x526d02=>({'id':_0x526d02,'stage':'update-recovery','code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x1e7)+_0x526d02+_0x1c5cc3(0x1e0),'requestedStateConfirmed':![],'recovered':![]})),_0x1cab98={'stage':_0x1c5cc3(0x1af),'code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x203),'targetIds':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]['map'](_0x36c68f=>_0x36c68f['id']),'requestedStateConfirmed':![],..._0x56a7fb};throw menuFailure(asVerificationError(_0xbe09a4,_0x1c5cc3(0x20a)),_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x4b540b,_0x1cab98],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1c5cc3(0x19b),'recoveredCount':0x0,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x46ade6=[];for(const _0x1089ff of _0x1f6d5f){const _0x500ca0=Number(_0x1089ff['id']),_0x3804eb=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x500ca0),_0x42aa06=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x500ca0);try{verifyVisibilityUpdate(_0x3804eb,_0x42aa06,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]);}catch(_0xbb22c4){const _0x5824ed=asVerificationError(_0xbb22c4,'Menu\x20'+_0x500ca0+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x500ca0,'stage':_0x1c5cc3(0x1af),'code':_0x5824ed['code'],'message':_0x5824ed[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![]});}}for(const _0x5b019f of _0x80d278){const _0x4f70c3=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x5b019f),_0xc34f35=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x5b019f);try{verifyVisibilityUpdate(_0x4f70c3,_0xc34f35,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x5b019f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5949b2){const _0x2c3ea5=asVerificationError(_0x5949b2,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x5b019f+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x5b019f,'stage':_0x1c5cc3(0x18f),'code':_0x2c3ea5[_0x1c5cc3(0x1aa)],'message':_0x2c3ea5[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46ade6[_0x1c5cc3(0x1d4)]>0x0){const _0x24d199=_0x46ade6[_0x1c5cc3(0x1fa)](_0x57608d=>Number(_0x57608d['id'])),_0x4bdf26=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x247a71=>_0x247a71[_0x1c5cc3(0x200)]===!![])[_0x1c5cc3(0x1d4)],_0x2fea05=menuError(_0x1c5cc3(0x1b8),_0x1c5cc3(0x1a5)+_0x24d199[_0x1c5cc3(0x1a6)](',\x20')+'.',_0x1c5cc3(0x1f0));throw menuFailure(_0x2fea05,_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x46ade6],'warnings':[_0x1c5cc3(0x19c)],'verification':{'status':_0x1c5cc3(0x19b),..._0x24d199[_0x1c5cc3(0x1d4)]===0x1?{'targetId':_0x24d199[0x0]}:{'targetIds':_0x24d199},'recoveredCount':_0x4bdf26,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x3da9d2=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x366058=>_0x366058[_0x1c5cc3(0x1b9)]===!![])['length'],_0x3b63e9=_0x1f6d5f[_0x1c5cc3(0x1d4)]-_0x3da9d2,_0x30c733={..._0x149bd5[_0x1c5cc3(0x1fb)],'succeeded':_0x1f6d5f,'failed':_0x2d56ba,'warnings':_0x2d56ba[_0x1c5cc3(0x1d4)]>0x0?[..._0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1c9)],_0x1c5cc3(0x1f5)]:_0x149bd5[_0x1c5cc3(0x1fb)]['warnings'],'verification':{'checkedBy':_0x1c5cc3(0x19f),'snapshotHash':_0x42f8f8[_0x1c5cc3(0x1de)],'matchesRequestedState':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'recoveredCount':_0x80d278[_0x1c5cc3(0x1d4)]}};return{'ok':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'data':_0x30c733,'message':_0x2d56ba['length']===0x0?_0x1c5cc3(0x18d)+_0x3da9d2+_0x1c5cc3(0x18e)+_0x3b63e9+_0x1c5cc3(0x1c6):_0x1c5cc3(0x1cf)+_0x3da9d2+_0x1c5cc3(0x204)+_0x3b63e9+_0x1c5cc3(0x193)+_0x2d56ba[_0x1c5cc3(0x1d4)]+_0x1c5cc3(0x1dc)};}};function parseInput(_0x3d30f0){const _0x3176ed=a180_0x5f488b,_0x5632ca=parseMenuIds(_0x3d30f0['str']('menu-ids')),_0x507e78=parseCsv(_0x3d30f0[_0x3176ed(0x1ed)]('paths'));if(_0x5632ca[_0x3176ed(0x1d4)]===0x0&&_0x507e78[_0x3176ed(0x1d4)]===0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x194));const _0x407c16=parseBooleanFlag(_0x3d30f0,'visible',!![]),_0x31a1a9=parseBooleanFlag(_0x3d30f0,_0x3176ed(0x1a2),![]);let _0x5df37a;if(hasFlag(_0x3d30f0,_0x3176ed(0x1f4))){_0x5df37a=_0x3d30f0[_0x3176ed(0x1da)](_0x3176ed(0x1f4));if(!Number[_0x3176ed(0x20c)](_0x5df37a)||_0x5df37a<0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x1bd));}return{'menuIds':_0x5632ca,'paths':_0x507e78,'visible':_0x407c16,'expectVisible':_0x31a1a9,'expectedCount':_0x5df37a};}async function buildPlan(_0x57aff7,_0x4785fb){const _0x42cfa9=a180_0x5f488b,_0x5781aa=parseInput(_0x57aff7),_0x15bdfa=await fetchMutationSnapshot(_0x57aff7,_0x42cfa9(0x1d9)),_0x246f0f=selectTargets(_0x15bdfa['menus'],_0x5781aa[_0x42cfa9(0x1ba)],_0x5781aa['paths']);if(_0x5781aa[_0x42cfa9(0x1eb)]!==undefined&&_0x246f0f[_0x42cfa9(0x1d4)]!==_0x5781aa[_0x42cfa9(0x1eb)])throw menuError(_0x42cfa9(0x1a3),_0x42cfa9(0x1d5)+_0x246f0f['length']+'\x20menu(s),\x20expected\x20'+_0x5781aa[_0x42cfa9(0x1eb)]+'.',_0x42cfa9(0x1cd));if(_0x5781aa[_0x42cfa9(0x1c1)]!==undefined){const _0x1b15c3=_0x246f0f[_0x42cfa9(0x1dd)](_0x174aed=>_0x174aed[_0x42cfa9(0x1b7)]!==_0x5781aa[_0x42cfa9(0x1c1)]);if(_0x1b15c3[_0x42cfa9(0x1d4)]>0x0)throw menuError('menu_state_drift',_0x42cfa9(0x1a7)+_0x1b15c3['map'](_0x27f2f2=>_0x27f2f2['id'])['join'](',\x20')+'.',_0x42cfa9(0x1d0));}const _0x379506=_0x246f0f[_0x42cfa9(0x1fa)](_0x54d057=>({'id':_0x54d057['id'],'label':_0x54d057[_0x42cfa9(0x207)],'path':_0x54d057[_0x42cfa9(0x1e1)],'before':{'visible':_0x54d057['visible']},'after':{'visible':_0x5781aa['visible']}})),_0x3a7553=_0x379506[_0x42cfa9(0x1dd)](_0x27b181=>_0x27b181[_0x42cfa9(0x1ce)][_0x42cfa9(0x1b7)]!==_0x5781aa['visible'])[_0x42cfa9(0x1fa)](_0x3179b6=>({'stage':_0x42cfa9(0x1d8),'method':'POST','path':_0x42cfa9(0x1a1),'body':{'appCode':_0x57aff7[_0x42cfa9(0x1c2)],'id':_0x3179b6['id'],'visible':_0x5781aa[_0x42cfa9(0x1b7)]}})),_0x55c033=mutationResult({'operation':_0x42cfa9(0x1ec),'selector':{'menuIds':_0x5781aa['menuIds'],'paths':_0x5781aa['paths']},'before':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x13c63e=>({'id':_0x13c63e['id'],'path':_0x13c63e['path'],'visible':_0x13c63e['visible']}))},'after':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x230138=>({'id':_0x230138['id'],'path':_0x230138[_0x42cfa9(0x1e1)],'visible':_0x5781aa['visible']}))},'dryRun':_0x4785fb,'backend':[...BACKEND],'plannedActions':_0x3a7553,'snapshotHash':_0x15bdfa['hash'],'warnings':_0x3a7553[_0x42cfa9(0x1d4)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x55c033,'requestedVisible':_0x5781aa[_0x42cfa9(0x1b7)],'targets':_0x379506},'beforeById':new Map(_0x246f0f[_0x42cfa9(0x1fa)](_0x3f9a05=>[_0x3f9a05['id'],_0x3f9a05]))};}function selectTargets(_0x43b413,_0x2b73d9,_0xf86d63){const _0x120f10=a180_0x5f488b,_0x59ca40=new Map(_0x43b413[_0x120f10(0x1fa)](_0x447673=>[_0x447673['id'],_0x447673])),_0x2b2e09=new Map(),_0x3fc3d5=_0x2b73d9[_0x120f10(0x1dd)](_0x17bd47=>!_0x59ca40['has'](_0x17bd47));if(_0x3fc3d5[_0x120f10(0x1d4)]>0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e6)+_0x3fc3d5[_0x120f10(0x1a6)](',\x20')+'.',_0x120f10(0x1a4));for(const _0x4222a6 of _0x2b73d9){_0x2b2e09['set'](_0x4222a6,_0x59ca40[_0x120f10(0x1df)](_0x4222a6));}for(const _0x40c00b of _0xf86d63){const _0x140d93=_0x43b413['filter'](_0x14433d=>_0x14433d['path']===_0x40c00b);if(_0x140d93[_0x120f10(0x1d4)]===0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e8)+JSON['stringify'](_0x40c00b)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x140d93[_0x120f10(0x1d4)]>0x1)throw menuError(_0x120f10(0x1f9),_0x120f10(0x192)+JSON[_0x120f10(0x1d6)](_0x40c00b)+'.',_0x120f10(0x1e9)+_0x140d93['map'](_0x3736bb=>_0x3736bb['id'])['join'](',\x20')+'.');const _0x4011f5=_0x140d93[0x0];_0x2b2e09[_0x120f10(0x209)](_0x4011f5['id'],_0x4011f5);}return[..._0x2b2e09[_0x120f10(0x1a9)]()];}function parseMenuIds(_0x443288){const _0x19439c=a180_0x5f488b,_0x2de016=parseCsv(_0x443288),_0x4f4db9=_0x2de016[_0x19439c(0x1fa)](Number);if(_0x4f4db9[_0x19439c(0x1f6)](_0x482c6b=>!Number[_0x19439c(0x20c)](_0x482c6b)||_0x482c6b<=0x0))throw CliErrors['validation'](_0x19439c(0x1f1));return[...new Set(_0x4f4db9)];}function parseCsv(_0x164021){const _0xcdba5=a180_0x5f488b;return[...new Set(_0x164021[_0xcdba5(0x1ae)](',')[_0xcdba5(0x1fa)](_0x492c5b=>_0x492c5b[_0xcdba5(0x1b0)]())[_0xcdba5(0x1dd)](Boolean))];}function parseBooleanFlag(_0x2fd715,_0x501f2d,_0x25b137){const _0x53cff3=a180_0x5f488b;if(!hasFlag(_0x2fd715,_0x501f2d)){if(_0x25b137)throw CliErrors[_0x53cff3(0x1a8)](_0x501f2d);return undefined;}const _0x8dd4d4=_0x2fd715['rawFlags'][_0x501f2d];if(_0x8dd4d4===!![]||_0x8dd4d4===![])return _0x8dd4d4;if(_0x8dd4d4===_0x53cff3(0x1fc))return!![];if(_0x8dd4d4===_0x53cff3(0x19d))return![];throw CliErrors[_0x53cff3(0x1f3)]('--'+_0x501f2d+_0x53cff3(0x195));}function verifyVisibilityUpdate(_0x4d591a,_0x3d67ce,_0x1aa0a1){const _0x521f2f=a180_0x5f488b;assertVerified(!!_0x3d67ce,'Menu\x20'+_0x4d591a['id']+_0x521f2f(0x1d3)),assertVerified(_0x3d67ce[_0x521f2f(0x1b7)]===_0x1aa0a1,'Menu\x20'+_0x4d591a['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x252051=[['id',_0x3d67ce['id'],_0x4d591a['id']],[_0x521f2f(0x1db),_0x3d67ce['parentId'],_0x4d591a[_0x521f2f(0x1db)]],[_0x521f2f(0x1c0),_0x3d67ce[_0x521f2f(0x1c0)],_0x4d591a[_0x521f2f(0x1c0)]],['label',_0x3d67ce[_0x521f2f(0x207)],_0x4d591a['label']],[_0x521f2f(0x1e1),_0x3d67ce[_0x521f2f(0x1e1)],_0x4d591a[_0x521f2f(0x1e1)]],[_0x521f2f(0x201),_0x3d67ce[_0x521f2f(0x201)],_0x4d591a[_0x521f2f(0x201)]],[_0x521f2f(0x1cc),_0x3d67ce['type'],_0x4d591a['type']],[_0x521f2f(0x1b6),_0x3d67ce[_0x521f2f(0x1b6)],_0x4d591a[_0x521f2f(0x1b6)]],[_0x521f2f(0x1e4),_0x3d67ce[_0x521f2f(0x1e4)],_0x4d591a['resources']],['resourcesValid',_0x3d67ce[_0x521f2f(0x1d1)],_0x4d591a[_0x521f2f(0x1d1)]],[_0x521f2f(0x1e3),_0x3d67ce[_0x521f2f(0x1e3)],_0x4d591a['childrenIds']],[_0x521f2f(0x1a0),_0x3d67ce['childrenCount'],_0x4d591a[_0x521f2f(0x1a0)]],[_0x521f2f(0x1d7),_0x3d67ce[_0x521f2f(0x1d7)],_0x4d591a[_0x521f2f(0x1d7)]],[_0x521f2f(0x1e5),_0x3d67ce[_0x521f2f(0x1e5)],_0x4d591a[_0x521f2f(0x1e5)]],['modelType',_0x3d67ce[_0x521f2f(0x1e2)],_0x4d591a[_0x521f2f(0x1e2)]],['datasetId',_0x3d67ce[_0x521f2f(0x20d)],_0x4d591a[_0x521f2f(0x20d)]],[_0x521f2f(0x1ea),_0x3d67ce[_0x521f2f(0x1ea)],_0x4d591a[_0x521f2f(0x1ea)]]];for(const [_0x45f278,_0x34d223,_0x47b8c5]of _0x252051){assertVerified(sameValue(_0x34d223,_0x47b8c5),_0x521f2f(0x1b4)+_0x4d591a['id']+'\x20'+_0x45f278+'\x20changed\x20unexpectedly.');}}function sameValue(_0x56ec98,_0xd07f8){const _0x165b45=a180_0x5f488b;if(Array[_0x165b45(0x206)](_0x56ec98)||Array['isArray'](_0xd07f8))return JSON['stringify'](_0x56ec98)===JSON['stringify'](_0xd07f8);return _0x56ec98===_0xd07f8;}
1
+ const a180_0x9424d9=a180_0x3179;(function(_0x5d5358,_0x3e308d){const _0x45dd6c=a180_0x3179,_0x4c2d47=_0x5d5358();while(!![]){try{const _0xa5c181=-parseInt(_0x45dd6c(0x1fb))/0x1+-parseInt(_0x45dd6c(0x1be))/0x2*(-parseInt(_0x45dd6c(0x20c))/0x3)+parseInt(_0x45dd6c(0x21c))/0x4+-parseInt(_0x45dd6c(0x215))/0x5*(-parseInt(_0x45dd6c(0x1ec))/0x6)+-parseInt(_0x45dd6c(0x1b9))/0x7+-parseInt(_0x45dd6c(0x221))/0x8*(parseInt(_0x45dd6c(0x1ff))/0x9)+-parseInt(_0x45dd6c(0x216))/0xa;if(_0xa5c181===_0x3e308d)break;else _0x4c2d47['push'](_0x4c2d47['shift']());}catch(_0xdc11e2){_0x4c2d47['push'](_0x4c2d47['shift']());}}}(a180_0x429d,0x4f99a));function a180_0x429d(){const _0x133cf6=['POST','push','\x20menu(s);\x20skip\x20','plan','menu\x20list','menu_permission_denied','menuIds','5164cZcnMq','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','visibility-update','547398VvmXwl','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','datasetId','num','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_expected_count_mismatch','\x20must\x20be\x20true\x20or\x20false.','visible','menu-ids','filter','childrenIds','update-menu-visibility','validation','15TxGCYv','boolean','resourcesValid','modelType','stringify','url','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','/smartapi/menu/update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','5bxHtCd','2304290qSXUit','Menu\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','depth','isArray','childrenCount','1282276LUipxk','beforeById','parentId','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','menu','24AHkSnZ','menu_selector_not_found','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','menu_state_drift','update\x20menu\x20visibility','\x20menu(s);\x20skipped\x20','pageType','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','get','has','\x20unchanged\x20menu(s).','byId','datasetCode','rabetbase\x20menu\x20list\x20--format\x20compress','updated','pageId','Final\x20menu\x20visibility\x20readback\x20failed.','update-recovery','cookie','message','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','3262644vqYXtj','\x20failed.','appCode','Menu\x20id\x20selector(s)\x20not\x20found:\x20','resources','128814IdagSX','false','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','requestedVisible','join','before','sort','update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','paths','targets','recovered','Requested\x20menu\x20visibility','update\x20visibility\x20for','high-risk-write','expected-count','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Selected\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','trim','set','expectVisible','length','flagMissing','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','split','menu_verification_failed','expectedCount','body','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','map','path','string','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20changed\x20unexpectedly.','plannedActions','label','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','type','isSafeInteger','Menu\x20visibility\x20update\x20completed:\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menu_selector_ambiguous','true','Updated\x20visibility\x20for\x20','3405534pMwnDj','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','code','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','hash','number','Menu\x20path\x20selector\x20not\x20found:\x20','verification'];a180_0x429d=function(){return _0x133cf6;};return a180_0x429d();}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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a180_0x3179(_0x2e53b6,_0x4808c4){_0x2e53b6=_0x2e53b6-0x1ac;const _0x429d5d=a180_0x429d();let _0x317932=_0x429d5d[_0x2e53b6];return _0x317932;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x9424d9(0x213)}];export const menuVisibilityUpdate={'service':a180_0x9424d9(0x220),'command':a180_0x9424d9(0x1fe),'description':a180_0x9424d9(0x200),'risk':a180_0x9424d9(0x1cc),'structuredErrors':!![],'flags':[{'name':a180_0x9424d9(0x207),'type':a180_0x9424d9(0x1df),'description':a180_0x9424d9(0x223)},{'name':'paths','type':a180_0x9424d9(0x1df),'description':a180_0x9424d9(0x1d7)},{'name':a180_0x9424d9(0x206),'type':a180_0x9424d9(0x20d),'required':!![],'description':a180_0x9424d9(0x1ca)},{'name':'expect-visible','type':a180_0x9424d9(0x20d),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a180_0x9424d9(0x1cd),'type':a180_0x9424d9(0x1f1),'description':a180_0x9424d9(0x1fc)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c366b){parseInput(_0x4c366b),requireExplicitYes(_0x4c366b);},async 'dryRun'(_0x53dbf9){const _0x389667=a180_0x9424d9,_0x2957e5=await buildPlan(_0x53dbf9,!![]),_0x452ab6=_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1e2)]?.[_0x389667(0x1d4)]??0x0,_0x155e06=_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1c8)]['length']-_0x452ab6;return menuDryRunResult(_0x2957e5[_0x389667(0x1f7)],{'method':_0x389667(0x1f4),'url':_0x389667(0x213),'body':{'updates':_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1e2)]?.[_0x389667(0x1dd)](_0x4b4ff4=>_0x4b4ff4[_0x389667(0x1db)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x452ab6+_0x389667(0x1f6)+_0x155e06+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x1cc320){const _0x579e36=a180_0x9424d9;requireExplicitYes(_0x1cc320);const _0xdd405d=await buildPlan(_0x1cc320,![]);await recheckMutationSnapshot(_0x1cc320,_0xdd405d['plan'],_0x579e36(0x225));const _0x5a8b22=[],_0x34e431=[],_0x48f781=[];for(const _0x57610e of _0xdd405d['plan'][_0x579e36(0x1c8)]){if(_0x57610e[_0x579e36(0x1c3)]['visible']===_0xdd405d['plan'][_0x579e36(0x1c1)]){_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x1cc320['appCode'],_0x1cc320['cookie'],{'id':_0x57610e['id'],'visible':_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c1)]}),_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'updated':!![],'skipped':![]});}catch(_0x514b88){const _0x2c9ad1=mapMenuApiError(_0x514b88,_0x579e36(0x1cb),_0x57610e['id']);if(isMenuResponseLoss(_0x514b88)&&_0x2c9ad1[_0x579e36(0x1ee)]!==_0x579e36(0x1f9)){_0x48f781[_0x579e36(0x1f5)](_0x57610e['id']);continue;}_0x34e431[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'stage':_0x579e36(0x1c5),'code':_0x2c9ad1['code'],'message':_0x2c9ad1[_0x579e36(0x1b7)]});}}let _0x45fd3c;try{_0x45fd3c=await fetchMenuSnapshot(_0x1cc320[_0x579e36(0x1bb)],_0x1cc320[_0x579e36(0x1b6)]);}catch(_0x274e0f){const _0x41055f=describeMenuErrorCause(_0x274e0f,'verify\x20menu\x20visibility\x20update'),_0x2de46a=_0x48f781[_0x579e36(0x1dd)](_0xbe8e35=>({'id':_0xbe8e35,'stage':_0x579e36(0x1b5),'code':_0x579e36(0x1d9),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0xbe8e35+_0x579e36(0x212),'requestedStateConfirmed':![],'recovered':![]})),_0x460155={'stage':_0x579e36(0x1f3),'code':'menu_verification_failed','message':_0x579e36(0x1b4),'targetIds':_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c8)][_0x579e36(0x1dd)](_0x42cb05=>_0x42cb05['id']),'requestedStateConfirmed':![],..._0x41055f};throw menuFailure(asVerificationError(_0x274e0f,_0x579e36(0x1e8)),_0xdd405d[_0x579e36(0x1f7)],{'stage':_0x579e36(0x1f3),'succeeded':_0x5a8b22,'failedRecords':[..._0x34e431,..._0x2de46a,_0x460155],'warnings':[_0x579e36(0x1ed)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x579e36(0x1b1)}});}const _0x1551f0=[];for(const _0x4fac60 of _0x5a8b22){const _0x584d35=Number(_0x4fac60['id']),_0x534afb=_0xdd405d['beforeById']['get'](_0x584d35),_0x4f5371=_0x45fd3c[_0x579e36(0x1af)][_0x579e36(0x1ac)](_0x584d35);try{verifyVisibilityUpdate(_0x534afb,_0x4f5371,_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c1)]);}catch(_0x27359d){const _0x62409d=asVerificationError(_0x27359d,_0x579e36(0x217)+_0x584d35+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x1551f0[_0x579e36(0x1f5)]({'id':_0x584d35,'stage':'verification','code':_0x62409d['code'],'message':_0x62409d[_0x579e36(0x1b7)],'requestedStateConfirmed':![]});}}for(const _0x20534f of _0x48f781){const _0x2809a4=_0xdd405d[_0x579e36(0x21d)]['get'](_0x20534f),_0x5e85c6=_0x45fd3c['byId']['get'](_0x20534f);try{verifyVisibilityUpdate(_0x2809a4,_0x5e85c6,_0xdd405d['plan']['requestedVisible']),_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x20534f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3e245c){const _0x3e438c=asVerificationError(_0x3e245c,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x20534f+_0x579e36(0x1b8));_0x1551f0[_0x579e36(0x1f5)]({'id':_0x20534f,'stage':'update-recovery','code':_0x3e438c['code'],'message':_0x3e438c[_0x579e36(0x1b7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1551f0[_0x579e36(0x1d4)]>0x0){const _0x15b7cf=_0x1551f0['map'](_0x53ff79=>Number(_0x53ff79['id'])),_0x2a0641=_0x5a8b22[_0x579e36(0x208)](_0x33b449=>_0x33b449[_0x579e36(0x1c9)]===!![])[_0x579e36(0x1d4)],_0x4c6021=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x15b7cf[_0x579e36(0x1c2)](',\x20')+'.',_0x579e36(0x228));throw menuFailure(_0x4c6021,_0xdd405d[_0x579e36(0x1f7)],{'stage':_0x579e36(0x1f3),'succeeded':_0x5a8b22,'failedRecords':[..._0x34e431,..._0x1551f0],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x579e36(0x1fd),..._0x15b7cf['length']===0x1?{'targetId':_0x15b7cf[0x0]}:{'targetIds':_0x15b7cf},'recoveredCount':_0x2a0641,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1db0b0=_0x5a8b22['filter'](_0x73679d=>_0x73679d[_0x579e36(0x1b2)]===!![])[_0x579e36(0x1d4)],_0x37400b=_0x5a8b22[_0x579e36(0x1d4)]-_0x1db0b0,_0x126a16={..._0xdd405d[_0x579e36(0x1f7)],'succeeded':_0x5a8b22,'failed':_0x34e431,'warnings':_0x34e431['length']>0x0?[..._0xdd405d[_0x579e36(0x1f7)]['warnings'],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xdd405d[_0x579e36(0x1f7)]['warnings'],'verification':{'checkedBy':_0x579e36(0x1f8),'snapshotHash':_0x45fd3c[_0x579e36(0x1f0)],'matchesRequestedState':_0x34e431[_0x579e36(0x1d4)]===0x0,'recoveredCount':_0x48f781['length']}};return{'ok':_0x34e431[_0x579e36(0x1d4)]===0x0,'data':_0x126a16,'message':_0x34e431[_0x579e36(0x1d4)]===0x0?_0x579e36(0x1eb)+_0x1db0b0+_0x579e36(0x226)+_0x37400b+_0x579e36(0x1ae):_0x579e36(0x1e7)+_0x1db0b0+'\x20updated,\x20'+_0x37400b+'\x20skipped,\x20'+_0x34e431[_0x579e36(0x1d4)]+_0x579e36(0x1ba)};}};function parseInput(_0x3dfd43){const _0x1e64fa=a180_0x9424d9,_0x27a449=parseMenuIds(_0x3dfd43[_0x1e64fa(0x1d6)]('menu-ids')),_0x20c650=parseCsv(_0x3dfd43[_0x1e64fa(0x1d6)](_0x1e64fa(0x1c7)));if(_0x27a449['length']===0x0&&_0x20c650[_0x1e64fa(0x1d4)]===0x0)throw CliErrors[_0x1e64fa(0x20b)](_0x1e64fa(0x203));const _0x4c3aa9=parseBooleanFlag(_0x3dfd43,'visible',!![]),_0xd558b4=parseBooleanFlag(_0x3dfd43,'expect-visible',![]);let _0x17a6ea;if(hasFlag(_0x3dfd43,_0x1e64fa(0x1cd))){_0x17a6ea=_0x3dfd43[_0x1e64fa(0x202)](_0x1e64fa(0x1cd));if(!Number[_0x1e64fa(0x1e6)](_0x17a6ea)||_0x17a6ea<0x0)throw CliErrors[_0x1e64fa(0x20b)](_0x1e64fa(0x218));}return{'menuIds':_0x27a449,'paths':_0x20c650,'visible':_0x4c3aa9,'expectVisible':_0xd558b4,'expectedCount':_0x17a6ea};}async function buildPlan(_0x538206,_0x48f7b7){const _0x4be6a6=a180_0x9424d9,_0x31236a=parseInput(_0x538206),_0x2a2599=await fetchMutationSnapshot(_0x538206,'update\x20menu\x20visibility'),_0x51b68a=selectTargets(_0x2a2599['menus'],_0x31236a[_0x4be6a6(0x1fa)],_0x31236a['paths']);if(_0x31236a[_0x4be6a6(0x1da)]!==undefined&&_0x51b68a[_0x4be6a6(0x1d4)]!==_0x31236a[_0x4be6a6(0x1da)])throw menuError(_0x4be6a6(0x204),_0x4be6a6(0x1cf)+_0x51b68a[_0x4be6a6(0x1d4)]+'\x20menu(s),\x20expected\x20'+_0x31236a[_0x4be6a6(0x1da)]+'.',_0x4be6a6(0x1c0));if(_0x31236a[_0x4be6a6(0x1d3)]!==undefined){const _0x1f2943=_0x51b68a[_0x4be6a6(0x208)](_0x3c988b=>_0x3c988b['visible']!==_0x31236a[_0x4be6a6(0x1d3)]);if(_0x1f2943['length']>0x0)throw menuError(_0x4be6a6(0x224),_0x4be6a6(0x1ce)+_0x1f2943['map'](_0x2d7a75=>_0x2d7a75['id'])[_0x4be6a6(0x1c2)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x1ee73f=_0x51b68a[_0x4be6a6(0x1dd)](_0x137e86=>({'id':_0x137e86['id'],'label':_0x137e86[_0x4be6a6(0x1e3)],'path':_0x137e86['path'],'before':{'visible':_0x137e86[_0x4be6a6(0x206)]},'after':{'visible':_0x31236a[_0x4be6a6(0x206)]}})),_0x1d1713=_0x1ee73f['filter'](_0x31b74=>_0x31b74[_0x4be6a6(0x1c3)][_0x4be6a6(0x206)]!==_0x31236a[_0x4be6a6(0x206)])[_0x4be6a6(0x1dd)](_0x1f5e4c=>({'stage':_0x4be6a6(0x20a),'method':'POST','path':_0x4be6a6(0x213),'body':{'appCode':_0x538206[_0x4be6a6(0x1bb)],'id':_0x1f5e4c['id'],'visible':_0x31236a['visible']}})),_0x459a1e=mutationResult({'operation':_0x4be6a6(0x1fe),'selector':{'menuIds':_0x31236a[_0x4be6a6(0x1fa)],'paths':_0x31236a[_0x4be6a6(0x1c7)]},'before':{'menus':_0x51b68a[_0x4be6a6(0x1dd)](_0x1452bc=>({'id':_0x1452bc['id'],'path':_0x1452bc[_0x4be6a6(0x1de)],'visible':_0x1452bc[_0x4be6a6(0x206)]}))},'after':{'menus':_0x51b68a[_0x4be6a6(0x1dd)](_0x319303=>({'id':_0x319303['id'],'path':_0x319303[_0x4be6a6(0x1de)],'visible':_0x31236a[_0x4be6a6(0x206)]}))},'dryRun':_0x48f7b7,'backend':[...BACKEND],'plannedActions':_0x1d1713,'snapshotHash':_0x2a2599['hash'],'warnings':_0x1d1713[_0x4be6a6(0x1d4)]===0x0?[_0x4be6a6(0x1e0)]:[]});return{'plan':{..._0x459a1e,'requestedVisible':_0x31236a[_0x4be6a6(0x206)],'targets':_0x1ee73f},'beforeById':new Map(_0x51b68a[_0x4be6a6(0x1dd)](_0x5540ac=>[_0x5540ac['id'],_0x5540ac]))};}function selectTargets(_0x463336,_0x101b36,_0x48553c){const _0x262e6e=a180_0x9424d9,_0x405477=new Map(_0x463336[_0x262e6e(0x1dd)](_0x2ab874=>[_0x2ab874['id'],_0x2ab874])),_0x5b0f25=new Map(),_0x473515=_0x101b36[_0x262e6e(0x208)](_0x4071d1=>!_0x405477[_0x262e6e(0x1ad)](_0x4071d1));if(_0x473515[_0x262e6e(0x1d4)]>0x0)throw menuError(_0x262e6e(0x222),_0x262e6e(0x1bc)+_0x473515[_0x262e6e(0x1c2)](',\x20')+'.',_0x262e6e(0x1ef));for(const _0x3c69ac of _0x101b36){_0x5b0f25[_0x262e6e(0x1d2)](_0x3c69ac,_0x405477['get'](_0x3c69ac));}for(const _0x2d1397 of _0x48553c){const _0x4579f4=_0x463336[_0x262e6e(0x208)](_0x4c9f33=>_0x4c9f33[_0x262e6e(0x1de)]===_0x2d1397);if(_0x4579f4[_0x262e6e(0x1d4)]===0x0)throw menuError(_0x262e6e(0x222),_0x262e6e(0x1f2)+JSON[_0x262e6e(0x210)](_0x2d1397)+'.',_0x262e6e(0x1d0));if(_0x4579f4[_0x262e6e(0x1d4)]>0x1)throw menuError(_0x262e6e(0x1e9),_0x262e6e(0x1dc)+JSON[_0x262e6e(0x210)](_0x2d1397)+'.',_0x262e6e(0x21f)+_0x4579f4['map'](_0x166503=>_0x166503['id'])[_0x262e6e(0x1c2)](',\x20')+'.');const _0x1a621b=_0x4579f4[0x0];_0x5b0f25[_0x262e6e(0x1d2)](_0x1a621b['id'],_0x1a621b);}return[..._0x5b0f25['values']()];}function parseMenuIds(_0x4c9dd3){const _0x2af401=a180_0x9424d9,_0x17fbbe=parseCsv(_0x4c9dd3),_0x4d83cc=_0x17fbbe['map'](Number);if(_0x4d83cc['some'](_0x26f6c5=>!Number['isSafeInteger'](_0x26f6c5)||_0x26f6c5<=0x0))throw CliErrors[_0x2af401(0x20b)](_0x2af401(0x214));return[...new Set(_0x4d83cc)];}function parseCsv(_0x4f098b){const _0x4c5be3=a180_0x9424d9;return[...new Set(_0x4f098b[_0x4c5be3(0x1d8)](',')[_0x4c5be3(0x1dd)](_0x1f4d8a=>_0x1f4d8a[_0x4c5be3(0x1d1)]())[_0x4c5be3(0x208)](Boolean))];}function parseBooleanFlag(_0xe9b787,_0x4c096d,_0x346df0){const _0x2d6f4c=a180_0x9424d9;if(!hasFlag(_0xe9b787,_0x4c096d)){if(_0x346df0)throw CliErrors[_0x2d6f4c(0x1d5)](_0x4c096d);return undefined;}const _0x599252=_0xe9b787['rawFlags'][_0x4c096d];if(_0x599252===!![]||_0x599252===![])return _0x599252;if(_0x599252===_0x2d6f4c(0x1ea))return!![];if(_0x599252===_0x2d6f4c(0x1bf))return![];throw CliErrors[_0x2d6f4c(0x20b)]('--'+_0x4c096d+_0x2d6f4c(0x205));}function verifyVisibilityUpdate(_0x2874cc,_0x17acb1,_0x442e9f){const _0x4b4721=a180_0x9424d9;assertVerified(!!_0x17acb1,_0x4b4721(0x217)+_0x2874cc['id']+_0x4b4721(0x1e4)),assertVerified(_0x17acb1[_0x4b4721(0x206)]===_0x442e9f,_0x4b4721(0x217)+_0x2874cc['id']+_0x4b4721(0x1c6));const _0x4bc10f=[['id',_0x17acb1['id'],_0x2874cc['id']],[_0x4b4721(0x21e),_0x17acb1['parentId'],_0x2874cc[_0x4b4721(0x21e)]],['depth',_0x17acb1[_0x4b4721(0x219)],_0x2874cc[_0x4b4721(0x219)]],[_0x4b4721(0x1e3),_0x17acb1['label'],_0x2874cc['label']],[_0x4b4721(0x1de),_0x17acb1[_0x4b4721(0x1de)],_0x2874cc[_0x4b4721(0x1de)]],[_0x4b4721(0x211),_0x17acb1[_0x4b4721(0x211)],_0x2874cc[_0x4b4721(0x211)]],[_0x4b4721(0x1e5),_0x17acb1[_0x4b4721(0x1e5)],_0x2874cc[_0x4b4721(0x1e5)]],[_0x4b4721(0x1c4),_0x17acb1[_0x4b4721(0x1c4)],_0x2874cc[_0x4b4721(0x1c4)]],[_0x4b4721(0x1bd),_0x17acb1[_0x4b4721(0x1bd)],_0x2874cc[_0x4b4721(0x1bd)]],[_0x4b4721(0x20e),_0x17acb1['resourcesValid'],_0x2874cc['resourcesValid']],[_0x4b4721(0x209),_0x17acb1[_0x4b4721(0x209)],_0x2874cc[_0x4b4721(0x209)]],[_0x4b4721(0x21b),_0x17acb1[_0x4b4721(0x21b)],_0x2874cc[_0x4b4721(0x21b)]],['pageId',_0x17acb1['pageId'],_0x2874cc[_0x4b4721(0x1b3)]],[_0x4b4721(0x227),_0x17acb1['pageType'],_0x2874cc[_0x4b4721(0x227)]],[_0x4b4721(0x20f),_0x17acb1['modelType'],_0x2874cc[_0x4b4721(0x20f)]],[_0x4b4721(0x201),_0x17acb1[_0x4b4721(0x201)],_0x2874cc[_0x4b4721(0x201)]],[_0x4b4721(0x1b0),_0x17acb1['datasetCode'],_0x2874cc[_0x4b4721(0x1b0)]]];for(const [_0x4bc93b,_0x3f84c3,_0x4d5118]of _0x4bc10f){assertVerified(sameValue(_0x3f84c3,_0x4d5118),'Menu\x20'+_0x2874cc['id']+'\x20'+_0x4bc93b+_0x4b4721(0x1e1));}}function sameValue(_0x39d7c5,_0x5165c8){const _0x3b15e5=a180_0x9424d9;if(Array[_0x3b15e5(0x21a)](_0x39d7c5)||Array[_0x3b15e5(0x21a)](_0x5165c8))return JSON[_0x3b15e5(0x210)](_0x39d7c5)===JSON[_0x3b15e5(0x210)](_0x5165c8);return _0x39d7c5===_0x5165c8;}
@@ -1 +1 @@
1
- function a181_0x1884(_0x2c4cf1,_0x58b207){_0x2c4cf1=_0x2c4cf1-0xe3;const _0x54fce1=a181_0x54fc();let _0x1884f4=_0x54fce1[_0x2c4cf1];return _0x1884f4;}const a181_0x438801=a181_0x1884;(function(_0x254586,_0x2b8f79){const _0x554f07=a181_0x1884,_0x30480b=_0x254586();while(!![]){try{const _0x34b03e=parseInt(_0x554f07(0x102))/0x1*(-parseInt(_0x554f07(0x106))/0x2)+parseInt(_0x554f07(0xfc))/0x3+-parseInt(_0x554f07(0xfd))/0x4+parseInt(_0x554f07(0xed))/0x5*(-parseInt(_0x554f07(0xf6))/0x6)+parseInt(_0x554f07(0x101))/0x7*(-parseInt(_0x554f07(0xf7))/0x8)+parseInt(_0x554f07(0xec))/0x9+parseInt(_0x554f07(0xe8))/0xa*(parseInt(_0x554f07(0xe7))/0xb);if(_0x34b03e===_0x2b8f79)break;else _0x30480b['push'](_0x30480b['shift']());}catch(_0x2dfcba){_0x30480b['push'](_0x30480b['shift']());}}}(a181_0x54fc,0x8bfcd));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='/notification/channel-config/create';async function prepareCreate(_0x37e2f2){const _0x1496a2=a181_0x1884,_0x5f4aba=await readNotificationDocument(_0x37e2f2,_0x1496a2(0x109)),_0x1f0e47=createMutationInput(_0x37e2f2[_0x1496a2(0xe6)],_0x5f4aba);return{'document':_0x5f4aba,'input':_0x1f0e47,'planned':projectNotificationConfig({'appCode':_0x37e2f2[_0x1496a2(0xe6)],'configName':_0x5f4aba['configName'],'channelType':_0x5f4aba[_0x1496a2(0xee)],'endpointUrl':_0x5f4aba[_0x1496a2(0x108)],'channelConfig':_0x5f4aba[_0x1496a2(0xf8)],'description':_0x5f4aba[_0x1496a2(0x103)],'connectTimeout':_0x5f4aba[_0x1496a2(0xfa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5f4aba[_0x1496a2(0xf0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a181_0x54fc(){const _0x48ce1b=['document','configName','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','verification','write','51186lqhMYc','131296pMrdyV','channelConfig','POST','connectTimeout','notification','1485627KKAKnl','3998168UgACjc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verified','Inspect\x20with\x20','56pMUCvL','2jwMOvb','description','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20do\x20not\x20resubmit.','602872cjaEWD',';\x20do\x20not\x20resubmit\x20automatically.','endpointUrl','create','config-create','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','input','appCode','737GLFHPw','143490jRffHk','mutation','isSafeInteger','Created\x20notification\x20config\x20','9343701XvGByF','110rzuIoD','channelType','planned','readTimeout'];a181_0x54fc=function(){return _0x48ce1b;};return a181_0x54fc();}export const notificationConfigCreate={'service':a181_0x438801(0xfb),'command':a181_0x438801(0x10a),'description':a181_0x438801(0xf3),'risk':a181_0x438801(0xf5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3247a6){assertSingleNotificationSource(_0x3247a6);},async 'dryRun'(_0x1aa369){const _0x944bbb=a181_0x438801,_0x528ac4=await prepareCreate(_0x1aa369),_0x143cc5=notificationLookupCommand(_0x1aa369['appCode'],_0x528ac4[_0x944bbb(0xf1)]['channelType']);return asDryRunResult({'operation':_0x944bbb(0x109),'selector':{'appCode':_0x1aa369[_0x944bbb(0xe6)],'configName':_0x528ac4['document'][_0x944bbb(0xf2)],'channelType':_0x528ac4[_0x944bbb(0xf1)][_0x944bbb(0xee)]},'before':null,'after':_0x528ac4[_0x944bbb(0xef)],'dryRun':!![],'backend':{'method':_0x944bbb(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x944bbb(0xef),'lookupCommand':_0x143cc5}},{'method':_0x944bbb(0xf9),'url':CREATE_PATH});},async 'execute'(_0x5310d2){const _0x55f304=a181_0x438801,_0x290176=await prepareCreate(_0x5310d2),_0x4da242=notificationLookupCommand(_0x5310d2[_0x55f304(0xe6)],_0x290176['document']['channelType']);let _0x1517fb;try{_0x1517fb=await createNotificationChannelConfig(_0x290176[_0x55f304(0xe5)]);}catch(_0x3d4749){if(isPlatformTransportFailure(_0x3d4749))throw notificationError(_0x55f304(0xe3),_0x55f304(0xe4),'Inspect\x20with\x20'+_0x4da242+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xe9),_0x55f304(0x100)+_0x4da242+_0x55f304(0xfe));}if(!Number[_0x55f304(0xea)](_0x1517fb)||_0x1517fb<=0x0)throw notificationError(_0x55f304(0xe3),_0x55f304(0x104),'Inspect\x20with\x20'+_0x4da242+_0x55f304(0x105));let _0x54854a;try{const _0x5c0f2c=await getNotificationChannelConfig(_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);_0x54854a=normalizeExactNotificationConfig(_0x5c0f2c,_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);}catch{throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xf4),_0x55f304(0x100)+_0x4da242+_0x55f304(0x107));}return{'ok':!![],'data':{'operation':_0x55f304(0x109),'selector':{'appCode':_0x54854a[_0x55f304(0xe6)],'id':_0x54854a['id'],'configCode':_0x54854a['configCode'],'configName':_0x54854a['configName'],'channelType':_0x54854a[_0x55f304(0xee)]},'before':null,'after':projectNotificationConfig(_0x54854a),'dryRun':![],'backend':{'method':_0x55f304(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x55f304(0xff),'lookupCommand':_0x4da242}},'message':_0x55f304(0xeb)+_0x54854a['id']};}};
1
+ const a181_0x312354=a181_0x15fc;(function(_0x3be1e3,_0x577039){const _0x288333=a181_0x15fc,_0x27cbe9=_0x3be1e3();while(!![]){try{const _0x402a30=-parseInt(_0x288333(0xc1))/0x1+parseInt(_0x288333(0xb9))/0x2*(parseInt(_0x288333(0xc6))/0x3)+-parseInt(_0x288333(0xc4))/0x4*(-parseInt(_0x288333(0xc5))/0x5)+-parseInt(_0x288333(0xcb))/0x6+-parseInt(_0x288333(0xc7))/0x7*(-parseInt(_0x288333(0xca))/0x8)+-parseInt(_0x288333(0xcd))/0x9*(-parseInt(_0x288333(0xcf))/0xa)+parseInt(_0x288333(0xbb))/0xb;if(_0x402a30===_0x577039)break;else _0x27cbe9['push'](_0x27cbe9['shift']());}catch(_0x42e30b){_0x27cbe9['push'](_0x27cbe9['shift']());}}}(a181_0x1588,0x84be1));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='/notification/channel-config/create';async function prepareCreate(_0x2dddc6){const _0x176ea6=a181_0x15fc,_0x1d6bc0=await readNotificationDocument(_0x2dddc6,'create'),_0x4bec86=createMutationInput(_0x2dddc6[_0x176ea6(0xc8)],_0x1d6bc0);return{'document':_0x1d6bc0,'input':_0x4bec86,'planned':projectNotificationConfig({'appCode':_0x2dddc6[_0x176ea6(0xc8)],'configName':_0x1d6bc0[_0x176ea6(0xad)],'channelType':_0x1d6bc0[_0x176ea6(0xb2)],'endpointUrl':_0x1d6bc0[_0x176ea6(0xb3)],'channelConfig':_0x1d6bc0[_0x176ea6(0xb1)],'description':_0x1d6bc0['description'],'connectTimeout':_0x1d6bc0[_0x176ea6(0xb7)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1d6bc0[_0x176ea6(0xcc)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a181_0x312354(0xae),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4729eb){assertSingleNotificationSource(_0x4729eb);},async 'dryRun'(_0x23b419){const _0x19177e=a181_0x312354,_0x2e294a=await prepareCreate(_0x23b419),_0x51ea4a=notificationLookupCommand(_0x23b419['appCode'],_0x2e294a['document'][_0x19177e(0xb2)]);return asDryRunResult({'operation':_0x19177e(0xbe),'selector':{'appCode':_0x23b419[_0x19177e(0xc8)],'configName':_0x2e294a['document'][_0x19177e(0xad)],'channelType':_0x2e294a[_0x19177e(0xb4)]['channelType']},'before':null,'after':_0x2e294a[_0x19177e(0xc3)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x19177e(0xc3),'lookupCommand':_0x51ea4a}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x4064fc){const _0x3c8c87=a181_0x312354,_0x2acd7c=await prepareCreate(_0x4064fc),_0x11c65a=notificationLookupCommand(_0x4064fc[_0x3c8c87(0xc8)],_0x2acd7c[_0x3c8c87(0xb4)][_0x3c8c87(0xb2)]);let _0xa47637;try{_0xa47637=await createNotificationChannelConfig(_0x2acd7c[_0x3c8c87(0xbf)]);}catch(_0x58e0da){if(isPlatformTransportFailure(_0x58e0da))throw notificationError(_0x3c8c87(0xb0),_0x3c8c87(0xbd),'Inspect\x20with\x20'+_0x11c65a+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x3c8c87(0xbe),_0x3c8c87(0xc9),_0x3c8c87(0xb8)+_0x11c65a+_0x3c8c87(0xba));}if(!Number[_0x3c8c87(0xaf)](_0xa47637)||_0xa47637<=0x0)throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x11c65a+_0x3c8c87(0xbc));let _0x39b6e6;try{const _0x2d5c87=await getNotificationChannelConfig(_0xa47637,_0x4064fc[_0x3c8c87(0xc8)]);_0x39b6e6=normalizeExactNotificationConfig(_0x2d5c87,_0xa47637,_0x4064fc[_0x3c8c87(0xc8)]);}catch{throw safeApiFailure(_0x3c8c87(0xbe),_0x3c8c87(0xce),_0x3c8c87(0xb8)+_0x11c65a+_0x3c8c87(0xb5));}return{'ok':!![],'data':{'operation':_0x3c8c87(0xbe),'selector':{'appCode':_0x39b6e6[_0x3c8c87(0xc8)],'id':_0x39b6e6['id'],'configCode':_0x39b6e6[_0x3c8c87(0xc2)],'configName':_0x39b6e6[_0x3c8c87(0xad)],'channelType':_0x39b6e6['channelType']},'before':null,'after':projectNotificationConfig(_0x39b6e6),'dryRun':![],'backend':{'method':_0x3c8c87(0xb6),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x11c65a}},'message':_0x3c8c87(0xc0)+_0x39b6e6['id']};}};function a181_0x15fc(_0x4bd3c9,_0x4839b0){_0x4bd3c9=_0x4bd3c9-0xad;const _0x158866=a181_0x1588();let _0x15fc15=_0x158866[_0x4bd3c9];return _0x15fc15;}function a181_0x1588(){const _0x591500=['Inspect\x20with\x20','43068gjgsjk',';\x20no\x20automatic\x20retry\x20was\x20attempted.','5164940FLaaNp',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','create','input','Created\x20notification\x20config\x20','1046825hqCXEs','configCode','planned','676132vFxDey','15xJBRGa','45EnGJTx','35RfqjOf','appCode','mutation','307256JxXEOK','4903446ohxYaV','readTimeout','9xNuZZO','verification','9160950PayjhX','configName','write','isSafeInteger','notification_config_create_outcome_unknown','channelConfig','channelType','endpointUrl','document',';\x20do\x20not\x20resubmit\x20automatically.','POST','connectTimeout'];a181_0x1588=function(){return _0x591500;};return a181_0x1588();}
@@ -1 +1 @@
1
- function a182_0x429f(){const _0x11717f=['18729YYUXCt','2uRbSAv','Notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','45858jBYrPg','delete','/notification/channel-config/delete','6503101pzEPsM','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1659834LkPqHj','3340IjTqCl','notification_config_delete_outcome_unknown','before','1340152GdLIUZ','Inspect\x20with\x20','config-delete','planned','some','39010YQwybU','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','unshift','805gvShAq','appCode','notification','POST',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','\x20remains\x20present\x20after\x20delete.','channelType','high-risk-write','324zyFdts','notification_config_delete_verification_failed','600727UXoKmW'];a182_0x429f=function(){return _0x11717f;};return a182_0x429f();}const a182_0xdf5c87=a182_0x1a05;(function(_0x1e5859,_0x245e7d){const _0x8f9f1a=a182_0x1a05,_0x2d1ab1=_0x1e5859();while(!![]){try{const _0x47aac3=parseInt(_0x8f9f1a(0x13a))/0x1*(-parseInt(_0x8f9f1a(0x13c))/0x2)+parseInt(_0x8f9f1a(0x145))/0x3+parseInt(_0x8f9f1a(0x138))/0x4*(-parseInt(_0x8f9f1a(0x14e))/0x5)+-parseInt(_0x8f9f1a(0x13f))/0x6*(-parseInt(_0x8f9f1a(0x151))/0x7)+parseInt(_0x8f9f1a(0x149))/0x8+-parseInt(_0x8f9f1a(0x13b))/0x9*(-parseInt(_0x8f9f1a(0x146))/0xa)+-parseInt(_0x8f9f1a(0x142))/0xb;if(_0x47aac3===_0x245e7d)break;else _0x2d1ab1['push'](_0x2d1ab1['shift']());}catch(_0x14a550){_0x2d1ab1['push'](_0x2d1ab1['shift']());}}}(a182_0x429f,0x72f84));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=a182_0xdf5c87(0x141),REFERENCE_WARNING=a182_0xdf5c87(0x14f);function a182_0x1a05(_0x3dfa14,_0x172681){_0x3dfa14=_0x3dfa14-0x138;const _0x429f74=a182_0x429f();let _0x1a057a=_0x429f74[_0x3dfa14];return _0x1a057a;}async function prepareDelete(_0x159668){const _0x366a4c=a182_0xdf5c87,_0x38f068=readNotificationId(_0x159668),_0x339dc4=await requireExactNotificationConfig(_0x159668[_0x366a4c(0x152)],_0x38f068,'delete');return{'id':_0x38f068,'before':_0x339dc4};}export const notificationConfigDelete={'service':a182_0xdf5c87(0x153),'command':a182_0xdf5c87(0x14b),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a182_0xdf5c87(0x159),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x96cbda){readNotificationId(_0x96cbda),requireNotificationExplicitYes(_0x96cbda);},async 'dryRun'(_0x437ddb){const _0xd486c2=a182_0xdf5c87,_0x54d180=await prepareDelete(_0x437ddb),_0xe315a4=notificationLookupCommand(_0x437ddb[_0xd486c2(0x152)],_0x54d180['before'][_0xd486c2(0x158)]);return asDryRunResult({'operation':_0xd486c2(0x140),'selector':notificationSelector(_0x54d180[_0xd486c2(0x148)]),'before':projectNotificationConfig(_0x54d180[_0xd486c2(0x148)]),'after':null,'dryRun':!![],'backend':{'method':_0xd486c2(0x154),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xd486c2(0x14c),'lookupCommand':_0xe315a4}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2d6c2f){const _0x2b2cae=a182_0xdf5c87;requireNotificationExplicitYes(_0x2d6c2f);const _0x1509c8=await prepareDelete(_0x2d6c2f),_0x25c36a=notificationLookupCommand(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']);let _0x4dbba9=![];try{await deleteNotificationChannelConfig(_0x1509c8['id'],_0x2d6c2f['appCode']);}catch(_0x1941cb){if(!isPlatformTransportFailure(_0x1941cb))throw safeApiFailure(_0x2b2cae(0x140),'mutation',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x144));_0x4dbba9=!![];}let _0x4c66d7;try{_0x4c66d7=await listNotificationChannelConfigs(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']),validateNotificationDeleteReadback(_0x4c66d7,_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8['before'][_0x2b2cae(0x158)]);}catch{throw notificationError(_0x4dbba9?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x2b2cae(0x13d)+_0x1509c8['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));}if(_0x4c66d7[_0x2b2cae(0x14d)](_0x4e7887=>_0x4e7887['id']===_0x1509c8['id']))throw notificationError(_0x4dbba9?_0x2b2cae(0x147):_0x2b2cae(0x139),_0x2b2cae(0x13d)+_0x1509c8['id']+_0x2b2cae(0x157),_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));const _0x3f0c74=[REFERENCE_WARNING];return _0x4dbba9&&_0x3f0c74[_0x2b2cae(0x150)](_0x2b2cae(0x13e)),{'ok':!![],'data':{'operation':_0x2b2cae(0x140),'selector':notificationSelector(_0x1509c8['before']),'before':projectNotificationConfig(_0x1509c8[_0x2b2cae(0x148)]),'after':null,'dryRun':![],'backend':{'method':_0x2b2cae(0x154),'path':DELETE_PATH},'warnings':_0x3f0c74,'verification':{'status':_0x2b2cae(0x143),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4dbba9,'lookupCommand':_0x25c36a}},'message':_0x2b2cae(0x156)+_0x1509c8['id']};}};
1
+ const a182_0x306516=a182_0x11a5;function a182_0x11a5(_0x1d8a2a,_0x532704){_0x1d8a2a=_0x1d8a2a-0x122;const _0x2ed650=a182_0x2ed6();let _0x11a52e=_0x2ed650[_0x1d8a2a];return _0x11a52e;}function a182_0x2ed6(){const _0x3976c0=['297930tnjKaI','36FgtfGI','config-delete','high-risk-write','296981fcGElp','\x20remains\x20present\x20after\x20delete.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','3477474ouoZQi',';\x20do\x20not\x20resubmit\x20automatically.','132188OSQHry','4WcjoGS','before','planned','unshift','channelType','notification_config_delete_verification_unavailable','notification','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','2500845sJqbxD','notification_config_delete_outcome_unknown','some','delete','252Zhvetm','appCode','25865328xYYAiA','/notification/channel-config/delete','351305twlMcB','Inspect\x20with\x20','8lWzrNv','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','POST','verified','Notification\x20config\x20','184KxtQLB'];a182_0x2ed6=function(){return _0x3976c0;};return a182_0x2ed6();}(function(_0x278239,_0x10003f){const _0x1ccb51=a182_0x11a5,_0x53c42f=_0x278239();while(!![]){try{const _0x14b247=parseInt(_0x1ccb51(0x141))/0x1*(-parseInt(_0x1ccb51(0x137))/0x2)+-parseInt(_0x1ccb51(0x12d))/0x3*(-parseInt(_0x1ccb51(0x125))/0x4)+-parseInt(_0x1ccb51(0x135))/0x5*(parseInt(_0x1ccb51(0x13e))/0x6)+parseInt(_0x1ccb51(0x124))/0x7*(parseInt(_0x1ccb51(0x13c))/0x8)+parseInt(_0x1ccb51(0x131))/0x9*(-parseInt(_0x1ccb51(0x13d))/0xa)+-parseInt(_0x1ccb51(0x122))/0xb+parseInt(_0x1ccb51(0x133))/0xc;if(_0x14b247===_0x10003f)break;else _0x53c42f['push'](_0x53c42f['shift']());}catch(_0x3c741a){_0x53c42f['push'](_0x53c42f['shift']());}}}(a182_0x2ed6,0xa200b));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=a182_0x306516(0x134),REFERENCE_WARNING=a182_0x306516(0x12c);async function prepareDelete(_0x254901){const _0x198afb=a182_0x306516,_0x7a9ebc=readNotificationId(_0x254901),_0x1ce169=await requireExactNotificationConfig(_0x254901['appCode'],_0x7a9ebc,_0x198afb(0x130));return{'id':_0x7a9ebc,'before':_0x1ce169};}export const notificationConfigDelete={'service':a182_0x306516(0x12b),'command':a182_0x306516(0x13f),'description':a182_0x306516(0x143),'risk':a182_0x306516(0x140),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xc0b946){readNotificationId(_0xc0b946),requireNotificationExplicitYes(_0xc0b946);},async 'dryRun'(_0x91cca5){const _0x50403e=a182_0x306516,_0x428be1=await prepareDelete(_0x91cca5),_0x12e9d9=notificationLookupCommand(_0x91cca5[_0x50403e(0x132)],_0x428be1[_0x50403e(0x126)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x428be1[_0x50403e(0x126)]),'before':projectNotificationConfig(_0x428be1['before']),'after':null,'dryRun':!![],'backend':{'method':_0x50403e(0x139),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x50403e(0x127),'lookupCommand':_0x12e9d9}},{'method':_0x50403e(0x139),'url':DELETE_PATH});},async 'execute'(_0x235f43){const _0x16697e=a182_0x306516;requireNotificationExplicitYes(_0x235f43);const _0x5caa69=await prepareDelete(_0x235f43),_0x37a5c8=notificationLookupCommand(_0x235f43[_0x16697e(0x132)],_0x5caa69[_0x16697e(0x126)][_0x16697e(0x129)]);let _0x96f8e6=![];try{await deleteNotificationChannelConfig(_0x5caa69['id'],_0x235f43['appCode']);}catch(_0x2be1c6){if(!isPlatformTransportFailure(_0x2be1c6))throw safeApiFailure('delete','mutation',_0x16697e(0x136)+_0x37a5c8+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x96f8e6=!![];}let _0x5a3fc2;try{_0x5a3fc2=await listNotificationChannelConfigs(_0x235f43[_0x16697e(0x132)],_0x5caa69['before'][_0x16697e(0x129)]),validateNotificationDeleteReadback(_0x5a3fc2,_0x235f43[_0x16697e(0x132)],_0x5caa69[_0x16697e(0x126)][_0x16697e(0x129)]);}catch{throw notificationError(_0x96f8e6?_0x16697e(0x12e):_0x16697e(0x12a),_0x16697e(0x13b)+_0x5caa69['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x16697e(0x136)+_0x37a5c8+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x5a3fc2[_0x16697e(0x12f)](_0x5b0676=>_0x5b0676['id']===_0x5caa69['id']))throw notificationError(_0x96f8e6?_0x16697e(0x12e):'notification_config_delete_verification_failed',_0x16697e(0x13b)+_0x5caa69['id']+_0x16697e(0x142),'Inspect\x20with\x20'+_0x37a5c8+_0x16697e(0x123));const _0xff798a=[REFERENCE_WARNING];return _0x96f8e6&&_0xff798a[_0x16697e(0x128)](_0x16697e(0x138)),{'ok':!![],'data':{'operation':_0x16697e(0x130),'selector':notificationSelector(_0x5caa69[_0x16697e(0x126)]),'before':projectNotificationConfig(_0x5caa69[_0x16697e(0x126)]),'after':null,'dryRun':![],'backend':{'method':_0x16697e(0x139),'path':DELETE_PATH},'warnings':_0xff798a,'verification':{'status':_0x16697e(0x13a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x96f8e6,'lookupCommand':_0x37a5c8}},'message':'Deleted\x20notification\x20config\x20'+_0x5caa69['id']};}};
@@ -1 +1 @@
1
- const a183_0x41ab1f=a183_0x5b99;(function(_0xdd5f70,_0x81fda3){const _0x1db4f2=a183_0x5b99,_0x3c9e2e=_0xdd5f70();while(!![]){try{const _0x1b946d=-parseInt(_0x1db4f2(0x1d3))/0x1*(-parseInt(_0x1db4f2(0x1c2))/0x2)+-parseInt(_0x1db4f2(0x1d9))/0x3*(parseInt(_0x1db4f2(0x1d0))/0x4)+parseInt(_0x1db4f2(0x1d4))/0x5*(parseInt(_0x1db4f2(0x1cb))/0x6)+parseInt(_0x1db4f2(0x1de))/0x7*(-parseInt(_0x1db4f2(0x1c5))/0x8)+-parseInt(_0x1db4f2(0x1dc))/0x9*(-parseInt(_0x1db4f2(0x1d2))/0xa)+-parseInt(_0x1db4f2(0x1d7))/0xb*(-parseInt(_0x1db4f2(0x1c1))/0xc)+parseInt(_0x1db4f2(0x1cf))/0xd*(-parseInt(_0x1db4f2(0x1cc))/0xe);if(_0x1b946d===_0x81fda3)break;else _0x3c9e2e['push'](_0x3c9e2e['shift']());}catch(_0x19ccd2){_0x3c9e2e['push'](_0x3c9e2e['shift']());}}}(a183_0x3b82,0x5b28b));function a183_0x3b82(){const _0x2fc499=['28KjIpMF','appCode','431784VDaWph','412304LLgozq','config-list','all','213424VlPmAr','bool','flat','validation','Notification\x20channel\x20type','str','335256VrgxHP','81746IwzkPj','boolean','length','2275seBNIR','5428xcyWoC','notification','56370NOyNYz','3JtGStA','55NknPtj','type','map','33JVJNbZ','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','1227VpSnji','trim','read','1143RimBFC','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a183_0x3b82=function(){return _0x2fc499;};return a183_0x3b82();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x5b99(_0x2204bf,_0x5333d4){_0x2204bf=_0x2204bf-0x1c1;const _0x3b8250=a183_0x3b82();let _0x5b9928=_0x3b8250[_0x2204bf];return _0x5b9928;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x41ab1f(0x1d1),'command':a183_0x41ab1f(0x1c3),'description':a183_0x41ab1f(0x1dd),'risk':a183_0x41ab1f(0x1db),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x41ab1f(0x1d5),'type':'string','description':a183_0x41ab1f(0x1c9),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a183_0x41ab1f(0x1cd),'default':![],'description':a183_0x41ab1f(0x1d8)}],async 'validate'(_0x3289d9){const _0x3b0d2a=a183_0x41ab1f;if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4))&&_0x3289d9[_0x3b0d2a(0x1ca)](_0x3b0d2a(0x1d5))[_0x3b0d2a(0x1da)]())throw CliErrors[_0x3b0d2a(0x1c8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4)))return;readNotificationChannelType(_0x3289d9);},async 'execute'(_0x58849b){const _0xff1ef0=a183_0x41ab1f;if(_0x58849b[_0xff1ef0(0x1c6)](_0xff1ef0(0x1c4))){const _0xa7d716=await Promise[_0xff1ef0(0x1c4)](NOTIFICATION_CHANNEL_TYPES[_0xff1ef0(0x1d6)](_0x55a7aa=>listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x55a7aa))),_0x56e833=_0xa7d716[_0xff1ef0(0x1c7)]()[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x56e833[_0xff1ef0(0x1ce)],'configs':_0x56e833},'message':'Found\x20'+_0x56e833[_0xff1ef0(0x1ce)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x85f6d5=readNotificationChannelType(_0x58849b),_0x392bc1=await listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x85f6d5),_0x13fb65=_0x392bc1[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b[_0xff1ef0(0x1df)],'channelType':_0x85f6d5,'count':_0x13fb65[_0xff1ef0(0x1ce)],'configs':_0x13fb65},'message':'Found\x20'+_0x13fb65['length']+'\x20'+_0x85f6d5+'\x20notification\x20config(s)'};}};
1
+ const a183_0x3cb5bc=a183_0x537e;(function(_0x5a4155,_0x596dd3){const _0x5bb4c9=a183_0x537e,_0x5d963e=_0x5a4155();while(!![]){try{const _0x5ab416=-parseInt(_0x5bb4c9(0x109))/0x1+parseInt(_0x5bb4c9(0xf8))/0x2+-parseInt(_0x5bb4c9(0xf7))/0x3*(-parseInt(_0x5bb4c9(0xfa))/0x4)+-parseInt(_0x5bb4c9(0x10b))/0x5*(-parseInt(_0x5bb4c9(0x110))/0x6)+-parseInt(_0x5bb4c9(0xfd))/0x7+parseInt(_0x5bb4c9(0x10d))/0x8*(parseInt(_0x5bb4c9(0xf5))/0x9)+parseInt(_0x5bb4c9(0x107))/0xa*(-parseInt(_0x5bb4c9(0xfb))/0xb);if(_0x5ab416===_0x596dd3)break;else _0x5d963e['push'](_0x5d963e['shift']());}catch(_0x3bc28b){_0x5d963e['push'](_0x5d963e['shift']());}}}(a183_0x5466,0x49987));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x5466(){const _0x580e1c=['336423JVAvlw','flat','47490jWDAui','Found\x20','15016CcRvMu','\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','330GthtlG','bool','map','notification','1089GGoABW','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','3NCjxmR','243862dppAvr','Notification\x20channel\x20type','2217364GGVIyF','176giXSLn','boolean','3566003dqLkCg','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','length','trim','type','all','appCode','config-list','174050wgTKVG','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.'];a183_0x5466=function(){return _0x580e1c;};return a183_0x5466();}function a183_0x537e(_0x420337,_0x38e655){_0x420337=_0x420337-0xf3;const _0x5466f5=a183_0x5466();let _0x537e47=_0x5466f5[_0x420337];return _0x537e47;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x3cb5bc(0xf4),'command':a183_0x3cb5bc(0x106),'description':a183_0x3cb5bc(0x10f),'risk':a183_0x3cb5bc(0xff),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a183_0x3cb5bc(0xf9),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0x3cb5bc(0x104),'type':a183_0x3cb5bc(0xfc),'default':![],'description':a183_0x3cb5bc(0xf6)}],async 'validate'(_0x355c6c){const _0x23f2cb=a183_0x3cb5bc;if(_0x355c6c[_0x23f2cb(0x111)](_0x23f2cb(0x104))&&_0x355c6c['str'](_0x23f2cb(0x103))[_0x23f2cb(0x102)]())throw CliErrors['validation'](_0x23f2cb(0x100),_0x23f2cb(0x108));if(_0x355c6c[_0x23f2cb(0x111)](_0x23f2cb(0x104)))return;readNotificationChannelType(_0x355c6c);},async 'execute'(_0x395cd0){const _0x8061fd=a183_0x3cb5bc;if(_0x395cd0[_0x8061fd(0x111)](_0x8061fd(0x104))){const _0x9a6500=await Promise[_0x8061fd(0x104)](NOTIFICATION_CHANNEL_TYPES[_0x8061fd(0xf3)](_0x188aa6=>listNotificationChannelConfigs(_0x395cd0[_0x8061fd(0x105)],_0x188aa6))),_0xe24498=_0x9a6500[_0x8061fd(0x10a)]()[_0x8061fd(0xf3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x395cd0[_0x8061fd(0x105)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0xe24498['length'],'configs':_0xe24498},'message':'Found\x20'+_0xe24498[_0x8061fd(0x101)]+_0x8061fd(0xfe)};}const _0x29f6e5=readNotificationChannelType(_0x395cd0),_0x3d0f10=await listNotificationChannelConfigs(_0x395cd0[_0x8061fd(0x105)],_0x29f6e5),_0x193610=_0x3d0f10[_0x8061fd(0xf3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x395cd0[_0x8061fd(0x105)],'channelType':_0x29f6e5,'count':_0x193610['length'],'configs':_0x193610},'message':_0x8061fd(0x10c)+_0x193610['length']+'\x20'+_0x29f6e5+_0x8061fd(0x10e)};}};
@@ -1 +1 @@
1
- const a184_0x5ab877=a184_0x9e1d;function a184_0x4fba(){const _0x4d9bba=['Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','8JcTGes','provesChange','notification_config_update_verification_unavailable','allMatch','payload','488241GXshJx','405076CPFfTP','before','1214017axVkDP','8ZDzZgG','planned','appCode','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','143159nvvteK','high-risk-write','notification_config_update_outcome_unknown','/notification/channel-config/update','POST','verified','364158PBowbE','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verifiedFields','Notification\x20config\x20','update','\x20via\x20','Inspect\x20with\x20--id\x20','\x20with\x20',';\x20do\x20not\x20resubmit\x20automatically.','1525446VxqRYK','427275VOOyuC','Inspect\x20ID\x20','patch'];a184_0x4fba=function(){return _0x4d9bba;};return a184_0x4fba();}(function(_0xaa643a,_0x8310a7){const _0x24ef6a=a184_0x9e1d,_0xbd4727=_0xaa643a();while(!![]){try{const _0x1f51db=-parseInt(_0x24ef6a(0x81))/0x1+parseInt(_0x24ef6a(0x7a))/0x2+parseInt(_0x24ef6a(0x79))/0x3+-parseInt(_0x24ef6a(0x97))/0x4*(-parseInt(_0x24ef6a(0x93))/0x5)+parseInt(_0x24ef6a(0x87))/0x6+-parseInt(_0x24ef6a(0x7c))/0x7+-parseInt(_0x24ef6a(0x7d))/0x8*(parseInt(_0x24ef6a(0x92))/0x9);if(_0x1f51db===_0x8310a7)break;else _0xbd4727['push'](_0xbd4727['shift']());}catch(_0x362613){_0xbd4727['push'](_0xbd4727['shift']());}}}(a184_0x4fba,0x1b0d4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a184_0x9e1d(_0xd4a02,_0x25c4fc){_0xd4a02=_0xd4a02-0x77;const _0x4fba01=a184_0x4fba();let _0x9e1dd5=_0x4fba01[_0xd4a02];return _0x9e1dd5;}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=a184_0x5ab877(0x84);async function prepareUpdate(_0x4bb0fe){const _0x43c7eb=a184_0x5ab877,_0x404365=readNotificationId(_0x4bb0fe),_0x3e9cfb=await readNotificationDocument(_0x4bb0fe,'update'),_0x412cbf=await requireExactNotificationConfig(_0x4bb0fe[_0x43c7eb(0x7f)],_0x404365,_0x43c7eb(0x8d));return{'id':_0x404365,'patch':_0x3e9cfb,'before':_0x412cbf,'payload':mergeUpdateInput(_0x412cbf,_0x3e9cfb),'planned':plannedUpdateProjection(_0x412cbf,_0x3e9cfb)};}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':a184_0x5ab877(0x96),'risk':a184_0x5ab877(0x82),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x513c2e){readNotificationId(_0x513c2e),assertSingleNotificationSource(_0x513c2e),requireNotificationExplicitYes(_0x513c2e);},async 'dryRun'(_0x41b508){const _0x4e7f0c=a184_0x5ab877,_0x2172e5=await prepareUpdate(_0x41b508),_0x4ac1bc=notificationLookupCommand(_0x41b508[_0x4e7f0c(0x7f)],_0x2172e5[_0x4e7f0c(0x7b)]['channelType']);return asDryRunResult({'operation':_0x4e7f0c(0x8d),'selector':notificationSelector(_0x2172e5['before']),'before':projectNotificationConfig(_0x2172e5['before']),'after':_0x2172e5[_0x4e7f0c(0x7e)],'dryRun':!![],'backend':{'method':_0x4e7f0c(0x85),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x4e7f0c(0x7e),'lookupCommand':_0x4ac1bc}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x33441d){const _0x30db91=a184_0x5ab877;requireNotificationExplicitYes(_0x33441d);const _0x1071e2=await prepareUpdate(_0x33441d),_0x232168=notificationLookupCommand(_0x33441d[_0x30db91(0x7f)],_0x1071e2[_0x30db91(0x7b)]['channelType']);let _0x493261=![];try{await updateNotificationChannelConfig(_0x1071e2[_0x30db91(0x78)]);}catch(_0x135ffc){if(!isPlatformTransportFailure(_0x135ffc))throw safeApiFailure('update',_0x30db91(0x88),_0x30db91(0x94)+_0x1071e2['id']+_0x30db91(0x90)+_0x232168+_0x30db91(0x8a));_0x493261=!![];}let _0x1ac8d4;try{const _0x5a91fe=await getNotificationChannelConfig(_0x1071e2['id'],_0x33441d['appCode']);_0x1ac8d4=normalizeExactNotificationConfig(_0x5a91fe,_0x1071e2['id'],_0x33441d[_0x30db91(0x7f)]);}catch{throw notificationError(_0x493261?_0x30db91(0x83):_0x30db91(0x99),_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x80),'Inspect\x20with\x20--id\x20'+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x2b7284=requestedSafeFieldsMatch(_0x1071e2['before'],_0x1ac8d4,_0x1071e2[_0x30db91(0x95)]);if(!_0x2b7284[_0x30db91(0x77)]||_0x493261&&!_0x2b7284[_0x30db91(0x98)])throw notificationError(_0x493261?_0x30db91(0x83):'notification_config_update_verification_failed',_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x89),_0x30db91(0x8f)+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+_0x30db91(0x91));const _0x491479=_0x493261?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x30db91(0x8d),'selector':notificationSelector(_0x1ac8d4),'before':projectNotificationConfig(_0x1071e2['before']),'after':projectNotificationConfig(_0x1ac8d4),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x491479,'verification':{'status':_0x30db91(0x86),'recoveredAfterUnknownResponse':_0x493261,'verifiedFields':_0x2b7284[_0x30db91(0x8b)],'lookupCommand':_0x232168}},'message':'Updated\x20notification\x20config\x20'+_0x1ac8d4['id']};}};
1
+ function a184_0x5c07(_0x52052c,_0x19069){_0x52052c=_0x52052c-0x8c;const _0x47edca=a184_0x47ed();let _0x5c0726=_0x47edca[_0x52052c];return _0x5c0726;}const a184_0x797483=a184_0x5c07;(function(_0x4d65cb,_0x5ea2e6){const _0x281b97=a184_0x5c07,_0xbf4c5=_0x4d65cb();while(!![]){try{const _0x156968=parseInt(_0x281b97(0x99))/0x1*(-parseInt(_0x281b97(0x9d))/0x2)+-parseInt(_0x281b97(0x91))/0x3*(parseInt(_0x281b97(0x94))/0x4)+parseInt(_0x281b97(0xa1))/0x5*(-parseInt(_0x281b97(0xa7))/0x6)+parseInt(_0x281b97(0xae))/0x7*(parseInt(_0x281b97(0xa6))/0x8)+parseInt(_0x281b97(0x96))/0x9+-parseInt(_0x281b97(0x8e))/0xa+parseInt(_0x281b97(0x8f))/0xb*(parseInt(_0x281b97(0x8c))/0xc);if(_0x156968===_0x5ea2e6)break;else _0xbf4c5['push'](_0xbf4c5['shift']());}catch(_0x11f9fb){_0xbf4c5['push'](_0xbf4c5['shift']());}}}(a184_0x47ed,0x8d042));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=a184_0x797483(0xa5);async function prepareUpdate(_0x4f1da3){const _0x363a80=a184_0x797483,_0x320c65=readNotificationId(_0x4f1da3),_0x40e688=await readNotificationDocument(_0x4f1da3,'update'),_0xc3067d=await requireExactNotificationConfig(_0x4f1da3['appCode'],_0x320c65,_0x363a80(0x9f));return{'id':_0x320c65,'patch':_0x40e688,'before':_0xc3067d,'payload':mergeUpdateInput(_0xc3067d,_0x40e688),'planned':plannedUpdateProjection(_0xc3067d,_0x40e688)};}export const notificationConfigUpdate={'service':a184_0x797483(0x92),'command':'config-update','description':a184_0x797483(0x98),'risk':a184_0x797483(0x93),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x6f9dd7){readNotificationId(_0x6f9dd7),assertSingleNotificationSource(_0x6f9dd7),requireNotificationExplicitYes(_0x6f9dd7);},async 'dryRun'(_0x58f5ca){const _0x2fc092=a184_0x797483,_0x4852b7=await prepareUpdate(_0x58f5ca),_0xe4742e=notificationLookupCommand(_0x58f5ca[_0x2fc092(0x9c)],_0x4852b7[_0x2fc092(0xb0)][_0x2fc092(0xa3)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x4852b7[_0x2fc092(0xb0)]),'before':projectNotificationConfig(_0x4852b7[_0x2fc092(0xb0)]),'after':_0x4852b7['planned'],'dryRun':!![],'backend':{'method':_0x2fc092(0xb1),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2fc092(0x90),'lookupCommand':_0xe4742e}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x309fde){const _0x190014=a184_0x797483;requireNotificationExplicitYes(_0x309fde);const _0x2f7ce3=await prepareUpdate(_0x309fde),_0x592981=notificationLookupCommand(_0x309fde[_0x190014(0x9c)],_0x2f7ce3[_0x190014(0xb0)]['channelType']);let _0x32ed57=![];try{await updateNotificationChannelConfig(_0x2f7ce3['payload']);}catch(_0x1585f3){if(!isPlatformTransportFailure(_0x1585f3))throw safeApiFailure(_0x190014(0x9f),_0x190014(0x97),_0x190014(0xa0)+_0x2f7ce3['id']+'\x20with\x20'+_0x592981+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x32ed57=!![];}let _0x5da150;try{const _0x267a31=await getNotificationChannelConfig(_0x2f7ce3['id'],_0x309fde[_0x190014(0x9c)]);_0x5da150=normalizeExactNotificationConfig(_0x267a31,_0x2f7ce3['id'],_0x309fde['appCode']);}catch{throw notificationError(_0x32ed57?_0x190014(0xac):_0x190014(0x95),_0x190014(0xaa)+_0x2f7ce3['id']+_0x190014(0x9e),_0x190014(0xaf)+_0x2f7ce3['id']+'\x20via\x20'+_0x592981+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x15ff68=requestedSafeFieldsMatch(_0x2f7ce3[_0x190014(0xb0)],_0x5da150,_0x2f7ce3[_0x190014(0x8d)]);if(!_0x15ff68['allMatch']||_0x32ed57&&!_0x15ff68[_0x190014(0xa9)])throw notificationError(_0x32ed57?'notification_config_update_outcome_unknown':_0x190014(0xad),_0x190014(0xaa)+_0x2f7ce3['id']+_0x190014(0xa8),_0x190014(0xaf)+_0x2f7ce3['id']+_0x190014(0xa2)+_0x592981+_0x190014(0xa4));const _0x16411a=_0x32ed57?[_0x190014(0xab)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x5da150),'before':projectNotificationConfig(_0x2f7ce3['before']),'after':projectNotificationConfig(_0x5da150),'dryRun':![],'backend':{'method':_0x190014(0xb1),'path':UPDATE_PATH},'warnings':_0x16411a,'verification':{'status':_0x190014(0x9b),'recoveredAfterUnknownResponse':_0x32ed57,'verifiedFields':_0x15ff68['verifiedFields'],'lookupCommand':_0x592981}},'message':_0x190014(0x9a)+_0x5da150['id']};}};function a184_0x47ed(){const _0x3a4638=['patch','1506200vekfuH','11143VnzvVK','planned','1699116bWebkZ','notification','high-risk-write','4vVhNDf','notification_config_update_verification_unavailable','4218858MMjrAu','mutation','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','546887ZXvrvF','Updated\x20notification\x20config\x20','verified','appCode','2sOzXWG','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','update','Inspect\x20ID\x20','161675WhXCyO','\x20via\x20','channelType',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/update','127256aKysFm','90faKxND','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','provesChange','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','notification_config_update_outcome_unknown','notification_config_update_verification_failed','497lXwbJv','Inspect\x20with\x20--id\x20','before','POST','8628KwCMku'];a184_0x47ed=function(){return _0x3a4638;};return a184_0x47ed();}
@@ -1 +1 @@
1
- (function(_0x3826e6,_0x7eb32a){const _0x35a74c=a185_0xc4c5,_0x4f612a=_0x3826e6();while(!![]){try{const _0x23f5de=parseInt(_0x35a74c(0x1c2))/0x1+-parseInt(_0x35a74c(0x1be))/0x2*(-parseInt(_0x35a74c(0x1bc))/0x3)+parseInt(_0x35a74c(0x1bb))/0x4+-parseInt(_0x35a74c(0x1c4))/0x5*(-parseInt(_0x35a74c(0x1bf))/0x6)+parseInt(_0x35a74c(0x1ba))/0x7*(-parseInt(_0x35a74c(0x1bd))/0x8)+parseInt(_0x35a74c(0x1c0))/0x9+parseInt(_0x35a74c(0x1c1))/0xa*(-parseInt(_0x35a74c(0x1c3))/0xb);if(_0x23f5de===_0x7eb32a)break;else _0x4f612a['push'](_0x4f612a['shift']());}catch(_0x28a535){_0x4f612a['push'](_0x4f612a['shift']());}}}(a185_0x5c78,0x6051a));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 a185_0xc4c5(_0x330ec4,_0x3baab1){_0x330ec4=_0x330ec4-0x1ba;const _0x5c782e=a185_0x5c78();let _0xc4c5ab=_0x5c782e[_0x330ec4];return _0xc4c5ab;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a185_0x5c78(){const _0x20f4be=['10XJpLHl','575471luBrNw','9296804nuBWKO','398105pECzXd','22099KYvAXF','3032164gOyyOq','747Xnryha','1168QEmkQP','96iWQoOf','6MRhBTR','2479707LNOGmU'];a185_0x5c78=function(){return _0x20f4be;};return a185_0x5c78();}
1
+ (function(_0xb97d99,_0x4d8ac3){const _0x24c054=a185_0x2fcf,_0x2c2431=_0xb97d99();while(!![]){try{const _0x444fe8=parseInt(_0x24c054(0x188))/0x1+-parseInt(_0x24c054(0x18d))/0x2+parseInt(_0x24c054(0x18b))/0x3+parseInt(_0x24c054(0x187))/0x4*(parseInt(_0x24c054(0x18a))/0x5)+parseInt(_0x24c054(0x189))/0x6+parseInt(_0x24c054(0x18c))/0x7*(-parseInt(_0x24c054(0x185))/0x8)+parseInt(_0x24c054(0x186))/0x9;if(_0x444fe8===_0x4d8ac3)break;else _0x2c2431['push'](_0x2c2431['shift']());}catch(_0x47328e){_0x2c2431['push'](_0x2c2431['shift']());}}}(a185_0x651c,0x25e2d));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a185_0x2fcf(_0x1c2ed2,_0x2b2fd2){_0x1c2ed2=_0x1c2ed2-0x185;const _0x651cea=a185_0x651c();let _0x2fcf50=_0x651cea[_0x1c2ed2];return _0x2fcf50;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a185_0x651c(){const _0x48772f=['548622nQEeTK','43096XXyXdi','105596BiuCqe','1711974sJVJiY','10GeoWlE','83502MubpXj','205786bUIhLm','280596XtbDNI','56fbUUAh'];a185_0x651c=function(){return _0x48772f;};return a185_0x651c();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a186_0x89cf5a=a186_0x1644;(function(_0x1b9854,_0x39e182){const _0x4cf98a=a186_0x1644,_0x2674e2=_0x1b9854();while(!![]){try{const _0x23c79c=-parseInt(_0x4cf98a(0x1b7))/0x1*(parseInt(_0x4cf98a(0x1dc))/0x2)+-parseInt(_0x4cf98a(0x1ac))/0x3*(-parseInt(_0x4cf98a(0x1c5))/0x4)+-parseInt(_0x4cf98a(0x1d5))/0x5*(parseInt(_0x4cf98a(0x1d3))/0x6)+parseInt(_0x4cf98a(0x1f4))/0x7*(parseInt(_0x4cf98a(0x19b))/0x8)+parseInt(_0x4cf98a(0x1f2))/0x9*(-parseInt(_0x4cf98a(0x1de))/0xa)+parseInt(_0x4cf98a(0x1df))/0xb+parseInt(_0x4cf98a(0x1c9))/0xc*(-parseInt(_0x4cf98a(0x198))/0xd);if(_0x23c79c===_0x39e182)break;else _0x2674e2['push'](_0x2674e2['shift']());}catch(_0x1e7ac1){_0x2674e2['push'](_0x2674e2['shift']());}}}(a186_0x34f0,0x93769));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=[a186_0x89cf5a(0x1bf),a186_0x89cf5a(0x1a0),a186_0x89cf5a(0x1ec),a186_0x89cf5a(0x216),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x89cf5a(0x1ba),a186_0x89cf5a(0x1e1),a186_0x89cf5a(0x212),a186_0x89cf5a(0x1b3),'connectTimeout',a186_0x89cf5a(0x1c0)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x89cf5a(0x1ad),a186_0x89cf5a(0x1f0),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x89cf5a(0x1f9),a186_0x89cf5a(0x1a1),a186_0x89cf5a(0x1fd),a186_0x89cf5a(0x1b1),a186_0x89cf5a(0x206),'subjectPrefix',a186_0x89cf5a(0x205),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x89cf5a(0x1cd),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1b8)},{'name':a186_0x89cf5a(0x1a4),'type':a186_0x89cf5a(0x1e3),'required':![],'default':![],'description':a186_0x89cf5a(0x219)},{'name':a186_0x89cf5a(0x1ee),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1ed)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x89cf5a(0x1c7),'required':!![],'description':a186_0x89cf5a(0x197)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a186_0x34f0(){const _0x204a52=['a\x20supported\x20string','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Application-level\x20notification\x20config\x20ID','13DhEUtX','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','dry-run','16PVDYZU','includes','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','preflight','has','FEISHU','recipients','\x22\x20is\x20forbidden.','num','stdin','Invalid\x20notification\x20config\x20response.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20--format\x20compress','\x22configName\x22.','a\x20string\x20or\x20null','name','string','3ixWMHY','appCode','yes','stringify','path','bccList','\x20has\x20invalid\x20field\x20\x22','description','kind','notification_config_field_unknown','notification_config_confirmation_required','383419zWKRjo','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','environment\x20variable\x20','channelType','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','messageTemplate','Item\x20','EMAIL','readTimeout','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Notification\x20JSON\x20field\x20\x22','notification_config_source_unavailable','\x20is\x20invalid.','3900604alDGZq','createTime','number','notification_config_json_invalid','6556692zhrdIL','\x20has\x20an\x20invalid\x20id.','\x22\x20cannot\x20exceed\x20','Create\x20JSON\x20requires\x20field\x20','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','\x20is\x20missing\x20required\x20field\x20\x22','\x20characters.','isSafeInteger','15522JdmKiI','env','455jiLIrR','failed','channelConfigRaw','push','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_required','\x20has\x20an\x20unsupported\x20channelType.','2QoPDJq','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','10110zRLxUD','11434489hTbGRM','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl','endpointUrlRaw','boolean','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','configName','Notification\x20config\x20','_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','object','call','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','notification_config_field_invalid','6138swbCaB','isArray','1554308DWdMuc','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','entries','emailTargets','notification_config_channel_field_forbidden','Allowed\x20values:\x20','bool','ccList','str','notification_config_id_invalid','type','file\x20','updateTime','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','fromName','replyTo','endpointUrl:null','connectTimeout','validation','update','parse','some','setEncoding','Invalid\x20--','join','every','trim','channelConfig','\x22\x20must\x20be\x20a\x20non-empty\x20string.','utf8','notification_config_response_invalid','WECOM','apiError','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_','keys','a\x20JSON\x20object','prototype','notification_config_update_empty','length'];a186_0x34f0=function(){return _0x204a52;};return a186_0x34f0();}export function notificationError(_0x595ee1,_0x1bf6a0,_0x361bf0){return new CliError(_0x595ee1,0x1,_0x1bf6a0,_0x361bf0);}export function readNotificationId(_0x26f95f){const _0x3fccb4=a186_0x89cf5a,_0x23e534=_0x26f95f[_0x3fccb4(0x1a3)]('id');if(!Number[_0x3fccb4(0x1d2)](_0x23e534)||_0x23e534<=0x0)throw notificationError(_0x3fccb4(0x1ff),_0x3fccb4(0x1e0));return _0x23e534;}export function requireNotificationExplicitYes(_0x39c2ca){const _0x572ea6=a186_0x89cf5a;if(_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x19a))||_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x1ae)))return;throw notificationError(_0x572ea6(0x1b6),_0x572ea6(0x199),_0x572ea6(0x19d));}export function readNotificationChannelType(_0x42ac9a,_0x1c234b=a186_0x89cf5a(0x200),_0x321a92=a186_0x89cf5a(0x1bf)){const _0x8f0a82=a186_0x89cf5a,_0x310715=_0x42ac9a[_0x8f0a82(0x1fe)](_0x1c234b)[_0x8f0a82(0x211)]()||_0x321a92;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x310715))throw CliErrors[_0x8f0a82(0x209)](_0x8f0a82(0x20e)+_0x1c234b+':\x20'+_0x310715,_0x8f0a82(0x1fb)+NOTIFICATION_CHANNEL_TYPES[_0x8f0a82(0x20f)](',\x20')+'.');return _0x310715;}export function assertSingleNotificationSource(_0x372dcf){const _0x5044d1=a186_0x89cf5a,_0xdf748f=[],_0x5634db=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1cd))[_0x5044d1(0x211)]();if(_0x5634db)_0xdf748f[_0x5044d1(0x1d8)]({'kind':'file','path':_0x5634db});if(_0x372dcf['bool'](_0x5044d1(0x1a4)))_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1a4)});const _0x5cded7=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1ee))[_0x5044d1(0x211)]();if(_0x5cded7)_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1d4),'name':_0x5cded7});if(_0xdf748f['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5044d1(0x1ef));if(_0xdf748f['length']>0x1)throw CliErrors[_0x5044d1(0x209)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5044d1(0x1ef));return _0xdf748f[0x0];}export async function readNotificationDocument(_0x5d7205,_0x558c35){const _0x45d124=a186_0x89cf5a,_0x2eb963=assertSingleNotificationSource(_0x5d7205),_0x5341e5=_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1cd)?_0x45d124(0x201)+_0x2eb963[_0x45d124(0x1b0)]:_0x2eb963[_0x45d124(0x1b4)]==='env'?_0x45d124(0x1b9)+_0x2eb963[_0x45d124(0x1aa)]:_0x45d124(0x1a4);let _0x4b2c26;try{if(_0x2eb963[_0x45d124(0x1b4)]==='file')_0x4b2c26=await readFile(_0x2eb963[_0x45d124(0x1b0)],_0x45d124(0x214));else{if(_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1d4)){if(!(_0x2eb963[_0x45d124(0x1aa)]in process.env))throw notificationError('notification_config_source_unavailable',_0x45d124(0x1c1)+_0x2eb963[_0x45d124(0x1aa)]);_0x4b2c26=process.env[_0x2eb963.name]??'';}else _0x4b2c26=await readStdin();}}catch(_0x273fdc){if(_0x273fdc instanceof CliError)throw _0x273fdc;throw notificationError(_0x45d124(0x1c3),_0x45d124(0x1dd)+_0x5341e5+'.');}let _0x43caca;try{_0x43caca=JSON[_0x45d124(0x20b)](_0x4b2c26);}catch{throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1c4),_0x45d124(0x1f6));}if(!isJsonObject(_0x43caca))throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1bc));return validateNotificationDocument(_0x43caca,_0x558c35);}export function projectNotificationListConfig(_0x524c3c,_0x534c98){const _0x2309cc=a186_0x89cf5a;return{'id':typeof _0x524c3c['id']===_0x2309cc(0x1c7)?_0x524c3c['id']:null,'configCode':requireResponseString(_0x524c3c[_0x2309cc(0x1f0)],_0x2309cc(0x1f0),_0x534c98),'configName':requireResponseString(_0x524c3c[_0x2309cc(0x1e6)],_0x2309cc(0x1e6),_0x534c98),'channelType':requireResponseString(_0x524c3c['channelType'],'channelType',_0x534c98),'description':normalizeNullableString(_0x524c3c['description']),'createTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x1c6)]),'updateTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x202)])};}export function normalizeExactNotificationConfig(_0x2dbc2a,_0x82b5d2,_0x2b58d3){const _0x6e5fc6=a186_0x89cf5a;if(!Number[_0x6e5fc6(0x1d2)](_0x2dbc2a['id'])||_0x2dbc2a['id']!==_0x82b5d2)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1f5)+_0x82b5d2+'.');if(_0x2dbc2a[_0x6e5fc6(0x1ad)]!==_0x2b58d3)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1a6));const _0x193698=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1e6)],_0x6e5fc6(0x1e6),_0x82b5d2),_0x2ec148=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1f0)],_0x6e5fc6(0x1f0),_0x82b5d2),_0x1bba2c=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1ba)],'channelType',_0x82b5d2);if(!NOTIFICATION_CHANNEL_TYPES[_0x6e5fc6(0x19c)](_0x1bba2c))throw notificationError('notification_config_response_invalid',_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1db));const _0x5f2c0e=responseNullableString(_0x2dbc2a[_0x6e5fc6(0x1e1)],'endpointUrl',_0x82b5d2),_0x304e86=responseNullableString(_0x2dbc2a['channelConfig'],_0x6e5fc6(0x212),_0x82b5d2),_0x1b0900=responseNullableString(_0x2dbc2a['description'],'description',_0x82b5d2),_0x36fea8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x208)],_0x6e5fc6(0x208),_0x82b5d2),_0x5a5dd8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x1c0)],_0x6e5fc6(0x1c0),_0x82b5d2);return{'id':_0x82b5d2,'appCode':_0x2b58d3,'configCode':_0x2ec148,'configName':_0x193698,'channelType':_0x1bba2c,'endpointUrl':redactSensitive(_0x5f2c0e),'channelConfig':redactSensitive(_0x304e86),'description':_0x1b0900,'connectTimeout':_0x36fea8,'readTimeout':_0x5a5dd8,'endpointUrlRaw':_0x5f2c0e,'channelConfigRaw':_0x304e86};}export async function requireExactNotificationConfig(_0x39b1b4,_0x1187e2,_0x453c18){const _0x21cc76=a186_0x89cf5a;let _0x555abe;try{_0x555abe=await getNotificationChannelConfig(_0x1187e2,_0x39b1b4);}catch{throw safeApiFailure(_0x453c18,_0x21cc76(0x19e),_0x21cc76(0x1bb)+_0x39b1b4+_0x21cc76(0x203));}return normalizeExactNotificationConfig(_0x555abe,_0x1187e2,_0x39b1b4);}export function projectNotificationConfig(_0x36eee2){const _0x4ea3c6=a186_0x89cf5a;return{'id':_0x36eee2['id']??null,'appCode':_0x36eee2['appCode'],'configCode':_0x36eee2[_0x4ea3c6(0x1f0)]??null,'configName':_0x36eee2['configName'],'channelType':_0x36eee2[_0x4ea3c6(0x1ba)],'endpointUrl':redactSensitive(_0x36eee2[_0x4ea3c6(0x1e1)]),'channelConfig':redactSensitive(_0x36eee2[_0x4ea3c6(0x212)]),'description':_0x36eee2[_0x4ea3c6(0x1b3)]??null,'connectTimeout':_0x36eee2['connectTimeout']??null,'readTimeout':_0x36eee2['readTimeout']??null};}export function notificationSelector(_0x2af966){const _0x1bcbea=a186_0x89cf5a;return{'appCode':_0x2af966[_0x1bcbea(0x1ad)],'id':_0x2af966['id'],'configCode':_0x2af966[_0x1bcbea(0x1f0)],'configName':_0x2af966[_0x1bcbea(0x1e6)],'channelType':_0x2af966[_0x1bcbea(0x1ba)]};}export function createMutationInput(_0x23ba9e,_0x54a571){const _0x15deed=a186_0x89cf5a;return{'appCode':_0x23ba9e,'configName':_0x54a571[_0x15deed(0x1e6)],'channelType':_0x54a571[_0x15deed(0x1ba)],...hasOwn(_0x54a571,_0x15deed(0x1e1))?{'endpointUrl':_0x54a571[_0x15deed(0x1e1)]}:{},...hasOwn(_0x54a571,_0x15deed(0x212))?{'channelConfig':serializeChannelConfig(_0x54a571[_0x15deed(0x212)])}:{},...hasOwn(_0x54a571,_0x15deed(0x1b3))?{'description':_0x54a571[_0x15deed(0x1b3)]}:{},...hasOwn(_0x54a571,_0x15deed(0x208))?{'connectTimeout':_0x54a571[_0x15deed(0x208)]}:{},...hasOwn(_0x54a571,_0x15deed(0x1c0))?{'readTimeout':_0x54a571[_0x15deed(0x1c0)]}:{}};}function a186_0x1644(_0x34605a,_0x5cd53f){_0x34605a=_0x34605a-0x193;const _0x34f038=a186_0x34f0();let _0x1644d4=_0x34f038[_0x34605a];return _0x1644d4;}export function mergeUpdateInput(_0x5ee2a3,_0x509d79){const _0x39d938=a186_0x89cf5a;return{'id':_0x5ee2a3['id'],'appCode':_0x5ee2a3['appCode'],'configName':_0x509d79[_0x39d938(0x1e6)]??_0x5ee2a3[_0x39d938(0x1e6)],'channelType':_0x509d79['channelType']??_0x5ee2a3['channelType'],'endpointUrl':hasOwn(_0x509d79,_0x39d938(0x1e1))?_0x509d79[_0x39d938(0x1e1)]:_0x5ee2a3[_0x39d938(0x1e2)],'channelConfig':hasOwn(_0x509d79,'channelConfig')?serializeChannelConfig(_0x509d79[_0x39d938(0x212)]):_0x5ee2a3[_0x39d938(0x1d7)],'description':hasOwn(_0x509d79,_0x39d938(0x1b3))?_0x509d79['description']:_0x5ee2a3['description'],'connectTimeout':hasOwn(_0x509d79,_0x39d938(0x208))?_0x509d79[_0x39d938(0x208)]:_0x5ee2a3[_0x39d938(0x208)],'readTimeout':hasOwn(_0x509d79,_0x39d938(0x1c0))?_0x509d79['readTimeout']:_0x5ee2a3[_0x39d938(0x1c0)]};}export function plannedUpdateProjection(_0x2e763d,_0x17e75b){const _0x25e983=a186_0x89cf5a;return projectNotificationConfig({'id':_0x2e763d['id'],'appCode':_0x2e763d['appCode'],'configCode':_0x2e763d['configCode'],'configName':_0x17e75b[_0x25e983(0x1e6)]??_0x2e763d[_0x25e983(0x1e6)],'channelType':_0x17e75b[_0x25e983(0x1ba)]??_0x2e763d[_0x25e983(0x1ba)],'endpointUrl':hasOwn(_0x17e75b,_0x25e983(0x1e1))?_0x17e75b[_0x25e983(0x1e1)]:_0x2e763d['endpointUrlRaw'],'channelConfig':hasOwn(_0x17e75b,'channelConfig')?_0x17e75b[_0x25e983(0x212)]:_0x2e763d[_0x25e983(0x1d7)],'description':hasOwn(_0x17e75b,_0x25e983(0x1b3))?_0x17e75b[_0x25e983(0x1b3)]:_0x2e763d[_0x25e983(0x1b3)],'connectTimeout':hasOwn(_0x17e75b,'connectTimeout')?_0x17e75b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2e763d['connectTimeout'],'readTimeout':hasOwn(_0x17e75b,_0x25e983(0x1c0))?_0x17e75b[_0x25e983(0x1c0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2e763d[_0x25e983(0x1c0)]});}export function requestedSafeFieldsMatch(_0x444618,_0x5bb8c7,_0x4cebf0){const _0x452fcb=a186_0x89cf5a,_0x44f8af=[],_0x69b072=[],_0x5b2739=[];for(const _0x36d011 of['configName',_0x452fcb(0x1ba),'description']){if(!hasOwn(_0x4cebf0,_0x36d011))continue;_0x5b2739[_0x452fcb(0x1d8)](_0x36d011),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x36d011]!==_0x4cebf0[_0x36d011]&&_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]);}for(const _0x80c05c of[_0x452fcb(0x208),_0x452fcb(0x1c0)]){if(!hasOwn(_0x4cebf0,_0x80c05c))continue;const _0x4f1d43=_0x4cebf0[_0x80c05c]??(_0x80c05c===_0x452fcb(0x208)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b2739['push'](_0x80c05c),_0x44f8af['push'](_0x5bb8c7[_0x80c05c]===_0x4f1d43),_0x69b072['push'](_0x444618[_0x80c05c]!==_0x4f1d43&&_0x5bb8c7[_0x80c05c]===_0x4f1d43);}return hasOwn(_0x4cebf0,'endpointUrl')&&_0x4cebf0[_0x452fcb(0x1e1)]===null&&(_0x5b2739['push'](_0x452fcb(0x207)),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x452fcb(0x1e2)]!==null&&_0x444618[_0x452fcb(0x1e2)]!==''&&(_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''))),{'allMatch':_0x44f8af[_0x452fcb(0x210)](Boolean),'provesChange':_0x69b072[_0x452fcb(0x20c)](Boolean),'verifiedFields':_0x5b2739};}export function validateNotificationDeleteReadback(_0xa753db,_0x4e2036,_0x31cd49){const _0x2808bd=a186_0x89cf5a;for(const [_0x46eefd,_0x2eefa9]of _0xa753db[_0x2808bd(0x1f8)]()){if(!Number['isSafeInteger'](_0x2eefa9['id'])||_0x2eefa9['id']<=0x0)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+_0x2808bd(0x1ca));if(_0x2eefa9[_0x2808bd(0x1ad)]!==_0x4e2036)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2eefa9[_0x2808bd(0x1ba)]!==_0x31cd49)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x46eefd+0x1)+_0x2808bd(0x1d9));}}export function safeApiFailure(_0x995fe5,_0x43b38a,_0xa22385){const _0x12ae9d=a186_0x89cf5a;return notificationError(_0x12ae9d(0x21a)+_0x995fe5+'_'+(_0x43b38a==='mutation'?_0x12ae9d(0x1d6):_0x43b38a+_0x12ae9d(0x1e8)),_0x12ae9d(0x1e7)+_0x995fe5+'\x20'+_0x43b38a+'\x20failed.',_0xa22385);}export function notificationLookupCommand(_0x22a3ff,_0x107d79){const _0x973c17=a186_0x89cf5a;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x22a3ff+_0x973c17(0x1cf)+_0x107d79+_0x973c17(0x1a7);}function validateNotificationDocument(_0x4acaf9,_0x10dd20){const _0x505797=a186_0x89cf5a;for(const _0x4aab75 of Object[_0x505797(0x21b)](_0x4acaf9)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4aab75))throw notificationError('notification_config_field_forbidden',_0x505797(0x1c2)+_0x4aab75+_0x505797(0x1ce));if(!ALLOWED_INPUT_FIELDS[_0x505797(0x19f)](_0x4aab75))throw notificationError(_0x505797(0x1b5),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4aab75+'\x22.');}if(_0x10dd20===_0x505797(0x20a)&&Object[_0x505797(0x21b)](_0x4acaf9)['length']===0x0)throw notificationError(_0x505797(0x21e),_0x505797(0x1e4));const _0x438983={};if(hasOwn(_0x4acaf9,'configName'))_0x438983['configName']=validateRequiredString(_0x4acaf9[_0x505797(0x1e6)],_0x505797(0x1e6),0x80);else{if(_0x10dd20===_0x505797(0x218))throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x1a8));}if(hasOwn(_0x4acaf9,'channelType')){if(typeof _0x4acaf9['channelType']!=='string')throw invalidFieldType(_0x505797(0x1ba),_0x505797(0x194));const _0xe72d39=_0x4acaf9[_0x505797(0x1ba)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x505797(0x19c)](_0xe72d39))throw notificationError(_0x505797(0x1f1),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x505797(0x1fb)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x438983['channelType']=_0xe72d39;}else{if(_0x10dd20==='create')throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x195));}for(const [_0xbc68f4,_0xb2f4c3]of[[_0x505797(0x1e1),0x200],['description',0x100]]){if(!hasOwn(_0x4acaf9,_0xbc68f4))continue;const _0x22bb98=_0x4acaf9[_0xbc68f4];if(_0x22bb98!==null&&typeof _0x22bb98!==_0x505797(0x1ab))throw invalidFieldType(_0xbc68f4,_0x505797(0x1a9));if(typeof _0x22bb98===_0x505797(0x1ab)&&_0x22bb98[_0x505797(0x193)]>_0xb2f4c3)throw notificationError('notification_config_field_invalid',_0x505797(0x1c2)+_0xbc68f4+'\x22\x20cannot\x20exceed\x20'+_0xb2f4c3+_0x505797(0x1d1));_0x438983[_0xbc68f4]=_0x22bb98;}if(hasOwn(_0x4acaf9,_0x505797(0x212))){const _0x1578a1=_0x4acaf9[_0x505797(0x212)];if(_0x1578a1===null&&_0x10dd20==='create')throw invalidFieldType('channelConfig',_0x505797(0x21c));if(_0x1578a1!==null&&!isJsonObject(_0x1578a1))throw invalidFieldType(_0x505797(0x212),_0x10dd20==='update'?'a\x20JSON\x20object\x20or\x20null':_0x505797(0x21c));_0x1578a1!==null&&validateChannelConfigFields(_0x438983[_0x505797(0x1ba)],_0x1578a1),_0x438983[_0x505797(0x212)]=_0x1578a1;}for(const _0x1d6bb7 of[_0x505797(0x208),'readTimeout']){if(!hasOwn(_0x4acaf9,_0x1d6bb7))continue;const _0x4dcf85=_0x4acaf9[_0x1d6bb7];if(_0x4dcf85!==null&&(!Number[_0x505797(0x1d2)](_0x4dcf85)||_0x4dcf85<0x0))throw notificationError(_0x505797(0x1f1),_0x505797(0x1c2)+_0x1d6bb7+_0x505797(0x1e9));_0x438983[_0x1d6bb7]=_0x4dcf85;}return _0x438983;}function validateRequiredString(_0x115fd1,_0x548a50,_0x31156d){const _0x46b0b2=a186_0x89cf5a;if(typeof _0x115fd1!=='string')throw invalidFieldType(_0x548a50,'a\x20non-empty\x20string');const _0x5c80d3=_0x115fd1['trim']();if(!_0x5c80d3)throw notificationError(_0x46b0b2(0x1f1),_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x213));if(_0x5c80d3['length']>_0x31156d)throw notificationError('notification_config_field_invalid',_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x1cb)+_0x31156d+_0x46b0b2(0x1d1));return _0x5c80d3;}function validateChannelConfigFields(_0x4edc89,_0x4398da){const _0x843389=a186_0x89cf5a;if(hasOwn(_0x4398da,_0x843389(0x1bd)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4edc89==='EMAIL')for(const _0x9aaf99 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4398da,_0x9aaf99))throw forbiddenChannelConfigField(_0x9aaf99);}}function forbiddenChannelConfigField(_0x4acdfb){const _0x5c7718=a186_0x89cf5a;return notificationError(_0x5c7718(0x1fa),_0x5c7718(0x204)+_0x4acdfb+_0x5c7718(0x1a2));}function invalidFieldType(_0x43f383,_0x25c04a){const _0x3559a0=a186_0x89cf5a;return notificationError(_0x3559a0(0x1f1),_0x3559a0(0x1c2)+_0x43f383+_0x3559a0(0x1f7)+_0x25c04a+'.');}function serializeChannelConfig(_0x1658e1){const _0x341308=a186_0x89cf5a;return _0x1658e1===null||_0x1658e1===undefined?null:JSON[_0x341308(0x1af)](_0x1658e1);}function redactSensitive(_0x2d49b5){const _0x5d8720=a186_0x89cf5a;return _0x2d49b5===null||_0x2d49b5===undefined||_0x2d49b5===''?null:_0x5d8720(0x1e5);}function requireResponseString(_0x255c01,_0x445904,_0x68320a){const _0x5ab0aa=a186_0x89cf5a;if(typeof _0x255c01!=='string'||_0x255c01[_0x5ab0aa(0x211)]()==='')throw CliErrors[_0x5ab0aa(0x217)](_0x5ab0aa(0x1a5),_0x5ab0aa(0x1be)+(_0x68320a+0x1)+_0x5ab0aa(0x1d0)+_0x445904+'\x22.');return _0x255c01[_0x5ab0aa(0x211)]();}function requireExactString(_0x320318,_0x16e049,_0xe70c7c){const _0x1ebfd9=a186_0x89cf5a;if(typeof _0x320318!==_0x1ebfd9(0x1ab)||_0x320318['trim']()==='')throw notificationError('notification_config_response_invalid',_0x1ebfd9(0x1e7)+_0xe70c7c+_0x1ebfd9(0x1d0)+_0x16e049+'\x22.');return _0x320318[_0x1ebfd9(0x211)]();}function responseNullableString(_0x37fe34,_0x113dc3,_0x70de64){const _0x55adaf=a186_0x89cf5a;if(_0x37fe34===undefined||_0x37fe34===null)return null;if(typeof _0x37fe34!==_0x55adaf(0x1ab))throw notificationError(_0x55adaf(0x215),_0x55adaf(0x1e7)+_0x70de64+_0x55adaf(0x1b2)+_0x113dc3+'\x22.');return _0x37fe34;}function responseNullableTimeout(_0x2dfd13,_0x2d5ebd,_0x2503e7){const _0x4b23ce=a186_0x89cf5a;if(_0x2dfd13===undefined||_0x2dfd13===null)return null;if(!Number[_0x4b23ce(0x1d2)](_0x2dfd13)||_0x2dfd13<0x0)throw notificationError(_0x4b23ce(0x215),_0x4b23ce(0x1e7)+_0x2503e7+_0x4b23ce(0x1b2)+_0x2d5ebd+'\x22.');return _0x2dfd13;}function normalizeNullableString(_0x53bb2e){return typeof _0x53bb2e==='string'?_0x53bb2e:null;}function isJsonObject(_0x5e49c4){const _0x116601=a186_0x89cf5a;return _0x5e49c4!==null&&typeof _0x5e49c4===_0x116601(0x1ea)&&!Array[_0x116601(0x1f3)](_0x5e49c4);}function hasOwn(_0x4f0b88,_0x18ec1e){const _0x55c2d5=a186_0x89cf5a;return Object[_0x55c2d5(0x21d)]['hasOwnProperty'][_0x55c2d5(0x1eb)](_0x4f0b88,_0x18ec1e);}async function readStdin(){const _0xbfc55b=a186_0x89cf5a;let _0x48babd='';process[_0xbfc55b(0x1a4)][_0xbfc55b(0x20d)](_0xbfc55b(0x214));for await(const _0x5d4860 of process[_0xbfc55b(0x1a4)])_0x48babd+=_0x5d4860;return _0x48babd;}
1
+ const a186_0x4f40fd=a186_0x3a4e;(function(_0x3ebb90,_0x33bafc){const _0xfd4d1d=a186_0x3a4e,_0x54077c=_0x3ebb90();while(!![]){try{const _0x1b91aa=-parseInt(_0xfd4d1d(0x21a))/0x1+parseInt(_0xfd4d1d(0x1f2))/0x2*(parseInt(_0xfd4d1d(0x251))/0x3)+parseInt(_0xfd4d1d(0x24a))/0x4*(-parseInt(_0xfd4d1d(0x24c))/0x5)+parseInt(_0xfd4d1d(0x23a))/0x6*(parseInt(_0xfd4d1d(0x20a))/0x7)+-parseInt(_0xfd4d1d(0x22c))/0x8*(parseInt(_0xfd4d1d(0x205))/0x9)+-parseInt(_0xfd4d1d(0x1dc))/0xa+parseInt(_0xfd4d1d(0x22e))/0xb*(parseInt(_0xfd4d1d(0x20f))/0xc);if(_0x1b91aa===_0x33bafc)break;else _0x54077c['push'](_0x54077c['shift']());}catch(_0x3d3d28){_0x54077c['push'](_0x54077c['shift']());}}}(a186_0x3a25,0xd9e81));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=[a186_0x4f40fd(0x202),a186_0x4f40fd(0x206),a186_0x4f40fd(0x1e0),a186_0x4f40fd(0x233),a186_0x4f40fd(0x204)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;function a186_0x3a4e(_0x555084,_0x408bed){_0x555084=_0x555084-0x1db;const _0x3a2582=a186_0x3a25();let _0x3a4eb4=_0x3a2582[_0x555084];return _0x3a4eb4;}const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x4f40fd(0x214),a186_0x4f40fd(0x1db),a186_0x4f40fd(0x23f),a186_0x4f40fd(0x255),'connectTimeout',a186_0x4f40fd(0x253)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x4f40fd(0x210),a186_0x4f40fd(0x1ef),a186_0x4f40fd(0x240)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x4f40fd(0x22b),'recipients','ccList','bccList',a186_0x4f40fd(0x23e),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x4f40fd(0x1eb),'type':a186_0x4f40fd(0x219),'required':![],'description':a186_0x4f40fd(0x21c)},{'name':a186_0x4f40fd(0x24b),'type':a186_0x4f40fd(0x216),'required':![],'default':![],'description':a186_0x4f40fd(0x244)},{'name':'from-env','type':'string','required':![],'description':a186_0x4f40fd(0x232)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x4f40fd(0x20d),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5eaa9f,_0x5f093d,_0x22b9f3){return new CliError(_0x5eaa9f,0x1,_0x5f093d,_0x22b9f3);}export function readNotificationId(_0x200be9){const _0xf576fd=a186_0x4f40fd,_0x228e9d=_0x200be9['num']('id');if(!Number[_0xf576fd(0x222)](_0x228e9d)||_0x228e9d<=0x0)throw notificationError(_0xf576fd(0x228),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x228e9d;}export function requireNotificationExplicitYes(_0x31152b){const _0xed7ae7=a186_0x4f40fd;if(_0x31152b[_0xed7ae7(0x1f9)](_0xed7ae7(0x22f))||_0x31152b[_0xed7ae7(0x1f9)](_0xed7ae7(0x1ff)))return;throw notificationError(_0xed7ae7(0x1dd),_0xed7ae7(0x1fe),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x2257cd,_0x2e1abe='type',_0x159663=a186_0x4f40fd(0x202)){const _0x4ed9bb=a186_0x4f40fd,_0x43cef2=_0x2257cd[_0x4ed9bb(0x250)](_0x2e1abe)[_0x4ed9bb(0x1fc)]()||_0x159663;if(!NOTIFICATION_CHANNEL_TYPES[_0x4ed9bb(0x21b)](_0x43cef2))throw CliErrors[_0x4ed9bb(0x23d)](_0x4ed9bb(0x1f7)+_0x2e1abe+':\x20'+_0x43cef2,_0x4ed9bb(0x236)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x43cef2;}export function assertSingleNotificationSource(_0x50273b){const _0x435ae4=a186_0x4f40fd,_0x1025d9=[],_0x3780b2=_0x50273b['str'](_0x435ae4(0x1eb))[_0x435ae4(0x1fc)]();if(_0x3780b2)_0x1025d9[_0x435ae4(0x200)]({'kind':_0x435ae4(0x1eb),'path':_0x3780b2});if(_0x50273b[_0x435ae4(0x1f9)]('stdin'))_0x1025d9[_0x435ae4(0x200)]({'kind':_0x435ae4(0x24b)});const _0xf30dd9=_0x50273b['str'](_0x435ae4(0x225))['trim']();if(_0xf30dd9)_0x1025d9[_0x435ae4(0x200)]({'kind':'env','name':_0xf30dd9});if(_0x1025d9[_0x435ae4(0x1f4)]===0x0)throw CliErrors[_0x435ae4(0x23d)](_0x435ae4(0x21e),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x1025d9['length']>0x1)throw CliErrors[_0x435ae4(0x23d)](_0x435ae4(0x241),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1025d9[0x0];}export async function readNotificationDocument(_0x30588e,_0x5491c5){const _0x37bfdd=a186_0x4f40fd,_0x16b960=assertSingleNotificationSource(_0x30588e),_0x3360e8=_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x1eb)?_0x37bfdd(0x209)+_0x16b960[_0x37bfdd(0x1e6)]:_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x220)?'environment\x20variable\x20'+_0x16b960[_0x37bfdd(0x20b)]:_0x37bfdd(0x24b);let _0x7be519;try{if(_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x1eb))_0x7be519=await readFile(_0x16b960['path'],_0x37bfdd(0x245));else{if(_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x220)){if(!(_0x16b960['name']in process.env))throw notificationError(_0x37bfdd(0x242),_0x37bfdd(0x1fa)+_0x16b960[_0x37bfdd(0x20b)]);_0x7be519=process.env[_0x16b960.name]??'';}else _0x7be519=await readStdin();}}catch(_0x1ebcf9){if(_0x1ebcf9 instanceof CliError)throw _0x1ebcf9;throw notificationError(_0x37bfdd(0x242),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3360e8+'.');}let _0x4b9dab;try{_0x4b9dab=JSON[_0x37bfdd(0x235)](_0x7be519);}catch{throw notificationError(_0x37bfdd(0x1e1),_0x37bfdd(0x1e7)+_0x3360e8+_0x37bfdd(0x1fd),_0x37bfdd(0x1e4));}if(!isJsonObject(_0x4b9dab))throw notificationError(_0x37bfdd(0x1e1),'Notification\x20JSON\x20from\x20'+_0x3360e8+_0x37bfdd(0x1ec));return validateNotificationDocument(_0x4b9dab,_0x5491c5);}export function projectNotificationListConfig(_0x4edd41,_0x240e7c){const _0xa218ca=a186_0x4f40fd;return{'id':typeof _0x4edd41['id']==='number'?_0x4edd41['id']:null,'configCode':requireResponseString(_0x4edd41[_0xa218ca(0x1ef)],_0xa218ca(0x1ef),_0x240e7c),'configName':requireResponseString(_0x4edd41[_0xa218ca(0x1f1)],_0xa218ca(0x1f1),_0x240e7c),'channelType':requireResponseString(_0x4edd41[_0xa218ca(0x214)],_0xa218ca(0x214),_0x240e7c),'description':normalizeNullableString(_0x4edd41[_0xa218ca(0x255)]),'createTime':normalizeNullableString(_0x4edd41[_0xa218ca(0x203)]),'updateTime':normalizeNullableString(_0x4edd41[_0xa218ca(0x1e3)])};}export function normalizeExactNotificationConfig(_0x44ca43,_0x3ed778,_0x327ca4){const _0x31cf81=a186_0x4f40fd;if(!Number[_0x31cf81(0x222)](_0x44ca43['id'])||_0x44ca43['id']!==_0x3ed778)throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x226)+_0x3ed778+'.');if(_0x44ca43[_0x31cf81(0x210)]!==_0x327ca4)throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x207)+_0x3ed778+_0x31cf81(0x22d));const _0x5695e9=requireExactString(_0x44ca43[_0x31cf81(0x1f1)],_0x31cf81(0x1f1),_0x3ed778),_0x43ba52=requireExactString(_0x44ca43[_0x31cf81(0x1ef)],_0x31cf81(0x1ef),_0x3ed778),_0x2158ae=requireExactString(_0x44ca43['channelType'],_0x31cf81(0x214),_0x3ed778);if(!NOTIFICATION_CHANNEL_TYPES[_0x31cf81(0x21b)](_0x2158ae))throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x207)+_0x3ed778+_0x31cf81(0x246));const _0x403320=responseNullableString(_0x44ca43[_0x31cf81(0x1db)],_0x31cf81(0x1db),_0x3ed778),_0x953ca0=responseNullableString(_0x44ca43['channelConfig'],'channelConfig',_0x3ed778),_0x512931=responseNullableString(_0x44ca43[_0x31cf81(0x255)],_0x31cf81(0x255),_0x3ed778),_0x1f47d6=responseNullableTimeout(_0x44ca43['connectTimeout'],_0x31cf81(0x227),_0x3ed778),_0x5d9818=responseNullableTimeout(_0x44ca43[_0x31cf81(0x253)],_0x31cf81(0x253),_0x3ed778);return{'id':_0x3ed778,'appCode':_0x327ca4,'configCode':_0x43ba52,'configName':_0x5695e9,'channelType':_0x2158ae,'endpointUrl':redactSensitive(_0x403320),'channelConfig':redactSensitive(_0x953ca0),'description':_0x512931,'connectTimeout':_0x1f47d6,'readTimeout':_0x5d9818,'endpointUrlRaw':_0x403320,'channelConfigRaw':_0x953ca0};}export async function requireExactNotificationConfig(_0x1f0caf,_0x1374f6,_0x15b4f7){const _0x4208de=a186_0x4f40fd;let _0x880c09;try{_0x880c09=await getNotificationChannelConfig(_0x1374f6,_0x1f0caf);}catch{throw safeApiFailure(_0x15b4f7,'preflight',_0x4208de(0x212)+_0x1f0caf+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x880c09,_0x1374f6,_0x1f0caf);}export function projectNotificationConfig(_0x154645){const _0x255d92=a186_0x4f40fd;return{'id':_0x154645['id']??null,'appCode':_0x154645[_0x255d92(0x210)],'configCode':_0x154645['configCode']??null,'configName':_0x154645[_0x255d92(0x1f1)],'channelType':_0x154645['channelType'],'endpointUrl':redactSensitive(_0x154645[_0x255d92(0x1db)]),'channelConfig':redactSensitive(_0x154645[_0x255d92(0x23f)]),'description':_0x154645[_0x255d92(0x255)]??null,'connectTimeout':_0x154645[_0x255d92(0x227)]??null,'readTimeout':_0x154645[_0x255d92(0x253)]??null};}export function notificationSelector(_0x520aab){const _0x3b7516=a186_0x4f40fd;return{'appCode':_0x520aab[_0x3b7516(0x210)],'id':_0x520aab['id'],'configCode':_0x520aab[_0x3b7516(0x1ef)],'configName':_0x520aab[_0x3b7516(0x1f1)],'channelType':_0x520aab[_0x3b7516(0x214)]};}export function createMutationInput(_0x99f465,_0x3e4c57){const _0x545b24=a186_0x4f40fd;return{'appCode':_0x99f465,'configName':_0x3e4c57[_0x545b24(0x1f1)],'channelType':_0x3e4c57[_0x545b24(0x214)],...hasOwn(_0x3e4c57,_0x545b24(0x1db))?{'endpointUrl':_0x3e4c57['endpointUrl']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x23f))?{'channelConfig':serializeChannelConfig(_0x3e4c57[_0x545b24(0x23f)])}:{},...hasOwn(_0x3e4c57,'description')?{'description':_0x3e4c57['description']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x227))?{'connectTimeout':_0x3e4c57['connectTimeout']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x253))?{'readTimeout':_0x3e4c57['readTimeout']}:{}};}export function mergeUpdateInput(_0x4e8245,_0x32563f){const _0xfe32c2=a186_0x4f40fd;return{'id':_0x4e8245['id'],'appCode':_0x4e8245[_0xfe32c2(0x210)],'configName':_0x32563f[_0xfe32c2(0x1f1)]??_0x4e8245[_0xfe32c2(0x1f1)],'channelType':_0x32563f[_0xfe32c2(0x214)]??_0x4e8245[_0xfe32c2(0x214)],'endpointUrl':hasOwn(_0x32563f,'endpointUrl')?_0x32563f[_0xfe32c2(0x1db)]:_0x4e8245[_0xfe32c2(0x217)],'channelConfig':hasOwn(_0x32563f,_0xfe32c2(0x23f))?serializeChannelConfig(_0x32563f[_0xfe32c2(0x23f)]):_0x4e8245[_0xfe32c2(0x239)],'description':hasOwn(_0x32563f,_0xfe32c2(0x255))?_0x32563f['description']:_0x4e8245[_0xfe32c2(0x255)],'connectTimeout':hasOwn(_0x32563f,_0xfe32c2(0x227))?_0x32563f[_0xfe32c2(0x227)]:_0x4e8245['connectTimeout'],'readTimeout':hasOwn(_0x32563f,'readTimeout')?_0x32563f[_0xfe32c2(0x253)]:_0x4e8245[_0xfe32c2(0x253)]};}export function plannedUpdateProjection(_0x53429e,_0x2cb7c6){const _0x35edce=a186_0x4f40fd;return projectNotificationConfig({'id':_0x53429e['id'],'appCode':_0x53429e['appCode'],'configCode':_0x53429e['configCode'],'configName':_0x2cb7c6[_0x35edce(0x1f1)]??_0x53429e[_0x35edce(0x1f1)],'channelType':_0x2cb7c6[_0x35edce(0x214)]??_0x53429e[_0x35edce(0x214)],'endpointUrl':hasOwn(_0x2cb7c6,_0x35edce(0x1db))?_0x2cb7c6[_0x35edce(0x1db)]:_0x53429e[_0x35edce(0x217)],'channelConfig':hasOwn(_0x2cb7c6,_0x35edce(0x23f))?_0x2cb7c6[_0x35edce(0x23f)]:_0x53429e[_0x35edce(0x239)],'description':hasOwn(_0x2cb7c6,_0x35edce(0x255))?_0x2cb7c6[_0x35edce(0x255)]:_0x53429e[_0x35edce(0x255)],'connectTimeout':hasOwn(_0x2cb7c6,_0x35edce(0x227))?_0x2cb7c6[_0x35edce(0x227)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x53429e[_0x35edce(0x227)],'readTimeout':hasOwn(_0x2cb7c6,_0x35edce(0x253))?_0x2cb7c6['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x53429e[_0x35edce(0x253)]});}export function requestedSafeFieldsMatch(_0x51fac1,_0x419523,_0x33c9bc){const _0x4b34c5=a186_0x4f40fd,_0x3e7a92=[],_0x1c5dfb=[],_0x468b1f=[];for(const _0xf87061 of['configName','channelType',_0x4b34c5(0x255)]){if(!hasOwn(_0x33c9bc,_0xf87061))continue;_0x468b1f[_0x4b34c5(0x200)](_0xf87061),_0x3e7a92[_0x4b34c5(0x200)](_0x419523[_0xf87061]===_0x33c9bc[_0xf87061]),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1[_0xf87061]!==_0x33c9bc[_0xf87061]&&_0x419523[_0xf87061]===_0x33c9bc[_0xf87061]);}for(const _0x42aa95 of[_0x4b34c5(0x227),_0x4b34c5(0x253)]){if(!hasOwn(_0x33c9bc,_0x42aa95))continue;const _0x54e4f1=_0x33c9bc[_0x42aa95]??(_0x42aa95==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x468b1f[_0x4b34c5(0x200)](_0x42aa95),_0x3e7a92['push'](_0x419523[_0x42aa95]===_0x54e4f1),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1[_0x42aa95]!==_0x54e4f1&&_0x419523[_0x42aa95]===_0x54e4f1);}return hasOwn(_0x33c9bc,_0x4b34c5(0x1db))&&_0x33c9bc[_0x4b34c5(0x1db)]===null&&(_0x468b1f['push'](_0x4b34c5(0x238)),_0x3e7a92[_0x4b34c5(0x200)](_0x419523['endpointUrlRaw']===null||_0x419523[_0x4b34c5(0x217)]===''),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1['endpointUrlRaw']!==null&&_0x51fac1[_0x4b34c5(0x217)]!==''&&(_0x419523[_0x4b34c5(0x217)]===null||_0x419523[_0x4b34c5(0x217)]===''))),{'allMatch':_0x3e7a92[_0x4b34c5(0x1f0)](Boolean),'provesChange':_0x1c5dfb['some'](Boolean),'verifiedFields':_0x468b1f};}export function validateNotificationDeleteReadback(_0x101a8b,_0x5925d3,_0xddc298){const _0x44035b=a186_0x4f40fd;for(const [_0x2cd9c7,_0x2b586b]of _0x101a8b[_0x44035b(0x24d)]()){if(!Number[_0x44035b(0x222)](_0x2b586b['id'])||_0x2b586b['id']<=0x0)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x229));if(_0x2b586b['appCode']!==_0x5925d3)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x21f));if(_0x2b586b[_0x44035b(0x214)]!==_0xddc298)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x254));}}export function safeApiFailure(_0x1b1fbd,_0x3904d4,_0x138c4e){const _0x2714bd=a186_0x4f40fd;return notificationError(_0x2714bd(0x249)+_0x1b1fbd+'_'+(_0x3904d4===_0x2714bd(0x1e2)?'failed':_0x3904d4+'_unavailable'),'Notification\x20config\x20'+_0x1b1fbd+'\x20'+_0x3904d4+_0x2714bd(0x211),_0x138c4e);}export function notificationLookupCommand(_0x59ba12,_0x42a17b){const _0x414ce3=a186_0x4f40fd;return _0x414ce3(0x1ed)+_0x59ba12+'\x20--type\x20'+_0x42a17b+'\x20--format\x20compress';}function validateNotificationDocument(_0x5af5d2,_0x2461df){const _0x5bc699=a186_0x4f40fd;for(const _0x20c0c1 of Object[_0x5bc699(0x224)](_0x5af5d2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5bc699(0x218)](_0x20c0c1))throw notificationError(_0x5bc699(0x1ee),_0x5bc699(0x223)+_0x20c0c1+_0x5bc699(0x231));if(!ALLOWED_INPUT_FIELDS[_0x5bc699(0x218)](_0x20c0c1))throw notificationError(_0x5bc699(0x24f),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x20c0c1+'\x22.');}if(_0x2461df===_0x5bc699(0x22a)&&Object['keys'](_0x5af5d2)[_0x5bc699(0x1f4)]===0x0)throw notificationError('notification_config_update_empty',_0x5bc699(0x247));const _0x5e98d0={};if(hasOwn(_0x5af5d2,'configName'))_0x5e98d0['configName']=validateRequiredString(_0x5af5d2['configName'],'configName',0x80);else{if(_0x2461df===_0x5bc699(0x1e9))throw notificationError(_0x5bc699(0x20e),_0x5bc699(0x1fb)+_0x5bc699(0x234));}if(hasOwn(_0x5af5d2,'channelType')){if(typeof _0x5af5d2[_0x5bc699(0x214)]!==_0x5bc699(0x219))throw invalidFieldType('channelType',_0x5bc699(0x1e8));const _0x5b207c=_0x5af5d2[_0x5bc699(0x214)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x5bc699(0x21b)](_0x5b207c))throw notificationError(_0x5bc699(0x248),_0x5bc699(0x230),_0x5bc699(0x236)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5e98d0['channelType']=_0x5b207c;}else{if(_0x2461df===_0x5bc699(0x1e9))throw notificationError(_0x5bc699(0x20e),_0x5bc699(0x1fb)+'\x22channelType\x22.');}for(const [_0x40ba9a,_0x908a16]of[[_0x5bc699(0x1db),0x200],[_0x5bc699(0x255),0x100]]){if(!hasOwn(_0x5af5d2,_0x40ba9a))continue;const _0x1b12bf=_0x5af5d2[_0x40ba9a];if(_0x1b12bf!==null&&typeof _0x1b12bf!==_0x5bc699(0x219))throw invalidFieldType(_0x40ba9a,'a\x20string\x20or\x20null');if(typeof _0x1b12bf==='string'&&_0x1b12bf[_0x5bc699(0x1f4)]>_0x908a16)throw notificationError(_0x5bc699(0x248),_0x5bc699(0x223)+_0x40ba9a+_0x5bc699(0x213)+_0x908a16+_0x5bc699(0x1df));_0x5e98d0[_0x40ba9a]=_0x1b12bf;}if(hasOwn(_0x5af5d2,'channelConfig')){const _0x1b80b0=_0x5af5d2[_0x5bc699(0x23f)];if(_0x1b80b0===null&&_0x2461df===_0x5bc699(0x1e9))throw invalidFieldType(_0x5bc699(0x23f),_0x5bc699(0x208));if(_0x1b80b0!==null&&!isJsonObject(_0x1b80b0))throw invalidFieldType('channelConfig',_0x2461df===_0x5bc699(0x22a)?'a\x20JSON\x20object\x20or\x20null':_0x5bc699(0x208));_0x1b80b0!==null&&validateChannelConfigFields(_0x5e98d0[_0x5bc699(0x214)],_0x1b80b0),_0x5e98d0[_0x5bc699(0x23f)]=_0x1b80b0;}for(const _0x402c0b of[_0x5bc699(0x227),_0x5bc699(0x253)]){if(!hasOwn(_0x5af5d2,_0x402c0b))continue;const _0x1bab6b=_0x5af5d2[_0x402c0b];if(_0x1bab6b!==null&&(!Number['isSafeInteger'](_0x1bab6b)||_0x1bab6b<0x0))throw notificationError(_0x5bc699(0x248),_0x5bc699(0x223)+_0x402c0b+_0x5bc699(0x252));_0x5e98d0[_0x402c0b]=_0x1bab6b;}return _0x5e98d0;}function validateRequiredString(_0x2bf50d,_0xdea884,_0x3e905a){const _0x5b5dd6=a186_0x4f40fd;if(typeof _0x2bf50d!==_0x5b5dd6(0x219))throw invalidFieldType(_0xdea884,_0x5b5dd6(0x1f8));const _0x3b09a4=_0x2bf50d[_0x5b5dd6(0x1fc)]();if(!_0x3b09a4)throw notificationError(_0x5b5dd6(0x248),_0x5b5dd6(0x223)+_0xdea884+_0x5b5dd6(0x243));if(_0x3b09a4[_0x5b5dd6(0x1f4)]>_0x3e905a)throw notificationError(_0x5b5dd6(0x248),_0x5b5dd6(0x223)+_0xdea884+_0x5b5dd6(0x213)+_0x3e905a+'\x20characters.');return _0x3b09a4;}function validateChannelConfigFields(_0x3f8a59,_0x4b73e4){const _0x444abd=a186_0x4f40fd;if(hasOwn(_0x4b73e4,_0x444abd(0x23c)))throw forbiddenChannelConfigField('messageTemplate');if(_0x3f8a59===_0x444abd(0x202))for(const _0x2cc8fa of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4b73e4,_0x2cc8fa))throw forbiddenChannelConfigField(_0x2cc8fa);}}function forbiddenChannelConfigField(_0x522c5f){const _0x5b7577=a186_0x4f40fd;return notificationError(_0x5b7577(0x1de),_0x5b7577(0x215)+_0x522c5f+_0x5b7577(0x1f6));}function invalidFieldType(_0x18b441,_0x440a52){const _0x2d3b21=a186_0x4f40fd;return notificationError(_0x2d3b21(0x248),_0x2d3b21(0x223)+_0x18b441+_0x2d3b21(0x1e5)+_0x440a52+'.');}function serializeChannelConfig(_0x50b339){const _0x40fea0=a186_0x4f40fd;return _0x50b339===null||_0x50b339===undefined?null:JSON[_0x40fea0(0x1f5)](_0x50b339);}function a186_0x3a25(){const _0xb8f915=['file\x20','1021741EdJten','name','Notification\x20config\x20list\x20item\x20','number','notification_config_field_required','44737188udMsvr','appCode','\x20failed.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22\x20cannot\x20exceed\x20','channelType','Notification\x20JSON\x20channelConfig\x20field\x20\x22','boolean','endpointUrlRaw','has','string','911238ffKbqv','includes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','notification_config_response_invalid','Missing\x20notification\x20JSON\x20source.','\x20has\x20an\x20invalid\x20appCode.','env','setEncoding','isSafeInteger','Notification\x20JSON\x20field\x20\x22','keys','from-env','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','connectTimeout','notification_config_id_invalid','\x20has\x20an\x20invalid\x20id.','update','emailTargets','2052328RAItsF','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','11LQjFfK','dry-run','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','WECOM','\x22configName\x22.','parse','Allowed\x20values:\x20','hasOwnProperty','endpointUrl:null','channelConfigRaw','12XYTmtj','kind','messageTemplate','validation','replyTo','channelConfig','channelCode','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_source_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','utf8','\x20has\x20an\x20unsupported\x20channelType.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_invalid','notification_config_','4uUkZfz','stdin','5035705ONpjJX','entries','prototype','notification_config_field_unknown','str','1698141wDuSzI','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','readTimeout','\x20has\x20an\x20invalid\x20channelType.','description','endpointUrl','16245370LreUGk','notification_config_confirmation_required','notification_config_channel_field_forbidden','\x20characters.','DINGTALK','notification_config_json_invalid','mutation','updateTime','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','path','Notification\x20JSON\x20from\x20','a\x20supported\x20string','create','call','file','\x20must\x20be\x20an\x20object.','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_forbidden','configCode','every','configName','6vSyKOo','\x20has\x20invalid\x20field\x20\x22','length','stringify','\x22\x20is\x20forbidden.','Invalid\x20--','a\x20non-empty\x20string','bool','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Create\x20JSON\x20requires\x20field\x20','trim','\x20is\x20invalid.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','yes','push','apiError','EMAIL','createTime','WEBHOOK','45sfWwqO','FEISHU','Notification\x20config\x20','a\x20JSON\x20object'];a186_0x3a25=function(){return _0xb8f915;};return a186_0x3a25();}function redactSensitive(_0x3f017d){return _0x3f017d===null||_0x3f017d===undefined||_0x3f017d===''?null:'<redacted>';}function requireResponseString(_0x125aee,_0x20fee2,_0x2722a6){const _0x568c53=a186_0x4f40fd;if(typeof _0x125aee!==_0x568c53(0x219)||_0x125aee[_0x568c53(0x1fc)]()==='')throw CliErrors[_0x568c53(0x201)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x2722a6+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x20fee2+'\x22.');return _0x125aee[_0x568c53(0x1fc)]();}function requireExactString(_0x1d728b,_0x2525ef,_0x3d970e){const _0x294631=a186_0x4f40fd;if(typeof _0x1d728b!=='string'||_0x1d728b[_0x294631(0x1fc)]()==='')throw notificationError(_0x294631(0x21d),_0x294631(0x207)+_0x3d970e+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2525ef+'\x22.');return _0x1d728b[_0x294631(0x1fc)]();}function responseNullableString(_0x4d3068,_0x17ea6b,_0x259e07){const _0x343167=a186_0x4f40fd;if(_0x4d3068===undefined||_0x4d3068===null)return null;if(typeof _0x4d3068!==_0x343167(0x219))throw notificationError(_0x343167(0x21d),_0x343167(0x207)+_0x259e07+_0x343167(0x1f3)+_0x17ea6b+'\x22.');return _0x4d3068;}function responseNullableTimeout(_0x4c14b6,_0x17daa8,_0x37c60a){const _0x1a395b=a186_0x4f40fd;if(_0x4c14b6===undefined||_0x4c14b6===null)return null;if(!Number['isSafeInteger'](_0x4c14b6)||_0x4c14b6<0x0)throw notificationError(_0x1a395b(0x21d),_0x1a395b(0x207)+_0x37c60a+_0x1a395b(0x1f3)+_0x17daa8+'\x22.');return _0x4c14b6;}function normalizeNullableString(_0x394bd4){const _0x40ea26=a186_0x4f40fd;return typeof _0x394bd4===_0x40ea26(0x219)?_0x394bd4:null;}function isJsonObject(_0x4e66b9){return _0x4e66b9!==null&&typeof _0x4e66b9==='object'&&!Array['isArray'](_0x4e66b9);}function hasOwn(_0x24c879,_0x4bfaa8){const _0x54d634=a186_0x4f40fd;return Object[_0x54d634(0x24e)][_0x54d634(0x237)][_0x54d634(0x1ea)](_0x24c879,_0x4bfaa8);}async function readStdin(){const _0xc88afb=a186_0x4f40fd;let _0x56c4bb='';process['stdin'][_0xc88afb(0x221)](_0xc88afb(0x245));for await(const _0x5a1a22 of process['stdin'])_0x56c4bb+=_0x5a1a22;return _0x56c4bb;}
@@ -1 +1 @@
1
- const a187_0x1915de=a187_0x5797;(function(_0x1d060a,_0x13090d){const _0x5c8b37=a187_0x5797,_0x3a02c5=_0x1d060a();while(!![]){try{const _0x3f185f=-parseInt(_0x5c8b37(0x210))/0x1*(parseInt(_0x5c8b37(0x215))/0x2)+parseInt(_0x5c8b37(0x1fb))/0x3*(parseInt(_0x5c8b37(0x201))/0x4)+parseInt(_0x5c8b37(0x203))/0x5+-parseInt(_0x5c8b37(0x204))/0x6+parseInt(_0x5c8b37(0x1f5))/0x7+parseInt(_0x5c8b37(0x1f6))/0x8*(-parseInt(_0x5c8b37(0x1fe))/0x9)+-parseInt(_0x5c8b37(0x206))/0xa*(parseInt(_0x5c8b37(0x211))/0xb);if(_0x3f185f===_0x13090d)break;else _0x3a02c5['push'](_0x3a02c5['shift']());}catch(_0x15a835){_0x3a02c5['push'](_0x3a02c5['shift']());}}}(a187_0x5658,0x4e11a));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=[a187_0x1915de(0x208),a187_0x1915de(0x213),a187_0x1915de(0x20f),a187_0x1915de(0x20d)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a187_0x1915de(0x217),'idCard':'IdCard'},SCENE_FLAG={'name':a187_0x1915de(0x1ed),'type':a187_0x1915de(0x1fc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x1915de(0x216)},IMAGE_FILE_FLAG={'name':a187_0x1915de(0x1f9),'type':a187_0x1915de(0x1fc),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a187_0x1915de(0x1f8),'type':a187_0x1915de(0x1fc),'description':a187_0x1915de(0x1f2)};function normalizeScene(_0x46d50a){const _0x330558=a187_0x1915de,_0x33b4c3=_0x46d50a[_0x330558(0x1f3)]()[_0x330558(0x20b)]();if(_0x33b4c3===_0x330558(0x21d))return _0x330558(0x20d);if(_0x33b4c3===_0x330558(0x208)||_0x33b4c3===_0x330558(0x213)||_0x33b4c3===_0x330558(0x20f))return _0x33b4c3;throw CliErrors['validation'](_0x330558(0x1eb)+_0x46d50a+_0x330558(0x1f0)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x59d1e4){const _0x4780ab=a187_0x1915de,_0x531c3d=_0x59d1e4[_0x4780ab(0x202)](_0x4780ab(0x1f9))[_0x4780ab(0x1f3)](),_0x337d47=_0x59d1e4['str'](_0x4780ab(0x1f8))[_0x4780ab(0x1f3)]();return{'imageFile':_0x531c3d,'imageUrl':_0x337d47,'count':[_0x531c3d,_0x337d47]['filter'](Boolean)[_0x4780ab(0x207)]};}function validateInputSelection(_0x104d83){const _0x399042=a187_0x1915de,_0x4f2b72=selectedInputs(_0x104d83);if(_0x4f2b72[_0x399042(0x205)]!==0x1)throw CliErrors['validation'](_0x399042(0x1ec));return _0x4f2b72;}function withScene(_0x44cfc0,_0xf41f60,_0x343263){const _0x3d6912=a187_0x1915de;return{..._0x44cfc0,'scene':_0xf41f60,..._0x343263?{'sourceFile':{'fileName':_0x343263['fileName'],'filePath':_0x343263[_0x3d6912(0x200)]}}:{}};}function a187_0x5797(_0x982eb1,_0x314391){_0x982eb1=_0x982eb1-0x1eb;const _0x565886=a187_0x5658();let _0x579732=_0x565886[_0x982eb1];return _0x579732;}const ocrRecognize={'service':a187_0x1915de(0x1f1),'command':'recognize','description':a187_0x1915de(0x21a),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3077e8){const _0x2abb93=a187_0x1915de,_0x10fce4=normalizeScene(_0x3077e8['str'](_0x2abb93(0x1ed))),_0x2e80d1=SCENE_TO_LEGACY_TYPE[_0x10fce4],_0x4e135b=validateInputSelection(_0x3077e8);if(_0x4e135b[_0x2abb93(0x20a)]){const _0x220157=new URLSearchParams({'url':_0x4e135b[_0x2abb93(0x20a)],'type':_0x2e80d1,'appCode':_0x3077e8['appCode']});return{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x1f4)+_0x220157['toString'](),'description':_0x2abb93(0x21c)+_0x10fce4+_0x2abb93(0x20e)};}const _0x144e15=requireDevelopmentUploadFile(_0x4e135b[_0x2abb93(0x1fd)],'image-file');return{'method':_0x2abb93(0x218),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'multipart':{'file':_0x144e15}}},{'method':_0x2abb93(0x218),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x214),'query':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'url':_0x2abb93(0x20c),'type':_0x2e80d1}}]},'description':_0x2abb93(0x212)+_0x10fce4+_0x2abb93(0x209)};},async 'execute'(_0x4666c0){const _0x2c43a9=a187_0x1915de,_0x4d7a76=normalizeScene(_0x4666c0[_0x2c43a9(0x202)](_0x2c43a9(0x1ed))),_0x453c02=SCENE_TO_LEGACY_TYPE[_0x4d7a76],_0x4fd8cd=validateInputSelection(_0x4666c0);if(_0x4fd8cd[_0x2c43a9(0x20a)]){const _0x4e69c1=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x4fd8cd[_0x2c43a9(0x20a)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x4e69c1,_0x4d7a76)};}const _0xa61de=requireDevelopmentUploadFile(_0x4fd8cd[_0x2c43a9(0x1fd)],_0x2c43a9(0x1f9)),_0x441afd=await uploadDevelopmentFile(_0x4666c0[_0x2c43a9(0x1f7)],_0xa61de[_0x2c43a9(0x219)]);if(!_0x441afd[_0x2c43a9(0x200)])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1fa));const _0x201f74=await queryDevelopmentFileUrl(_0x441afd[_0x2c43a9(0x200)],{'download':![]});if(!_0x201f74['fileUrl'])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1ee));const _0x17c967=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x201f74[_0x2c43a9(0x1ff)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x17c967,_0x4d7a76,_0x441afd)};}};export const ocrDefinitions=[ocrRecognize];function a187_0x5658(){const _0x51556a=['8elviCN','str','3002615tTsvhs','786816wDawWc','count','14710EScVnN','length','invoice','\x20OCR','imageUrl','toLowerCase','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','idCard','\x20OCR\x20from\x20URL','form','181mqTXrI','781ELBCme','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','general','/smartapi/ocr/recognize-text','4942rKUJCb','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','POST','path','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','Preview:\x20recognize\x20','idcard','Unsupported\x20OCR\x20scene:\x20','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','scene','File\x20URL\x20response\x20missing\x20fileUrl.','GET','.\x20Supported\x20scenes:\x20','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','/smartapi/ocr/recognize-text?','4043186SgKyRH','8WVlcLg','appCode','image-url','image-file','File\x20upload\x20response\x20missing\x20filePath.','414813CKJEVP','string','imageFile','4068585wZmWpq','fileUrl','filePath'];a187_0x5658=function(){return _0x51556a;};return a187_0x5658();}
1
+ const a187_0x615799=a187_0x4d68;(function(_0x2ce9d0,_0x444759){const _0x213b7b=a187_0x4d68,_0x3c3971=_0x2ce9d0();while(!![]){try{const _0x1272f4=-parseInt(_0x213b7b(0x1ae))/0x1*(-parseInt(_0x213b7b(0x1a1))/0x2)+parseInt(_0x213b7b(0x1a3))/0x3*(parseInt(_0x213b7b(0x1aa))/0x4)+-parseInt(_0x213b7b(0x18c))/0x5*(-parseInt(_0x213b7b(0x1b3))/0x6)+-parseInt(_0x213b7b(0x199))/0x7*(parseInt(_0x213b7b(0x19e))/0x8)+-parseInt(_0x213b7b(0x196))/0x9*(parseInt(_0x213b7b(0x1af))/0xa)+-parseInt(_0x213b7b(0x1a9))/0xb+parseInt(_0x213b7b(0x197))/0xc;if(_0x1272f4===_0x444759)break;else _0x3c3971['push'](_0x3c3971['shift']());}catch(_0x410baa){_0x3c3971['push'](_0x3c3971['shift']());}}}(a187_0x2e2d,0x3ee06));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a187_0x2e2d(){const _0x2198c1=['apiError','639KCAObA','10730208zBZREi','/smartapi/ocr/recognize-text?','246932EorpUo','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','filter','invoice','/smartapi/common/uploadFile','104AZpoTq','Publicly\x20accessible\x20image\x20or\x20file\x20URL','.\x20Supported\x20scenes:\x20','120976Guzxmg','imageUrl','6eSVsEU','Table','general','string','POST','Unsupported\x20OCR\x20scene:\x20','3344396eNbIKH','186936Mdqsjn','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','recognize','idcard','4xUCDEn','50610UQCPov','join','validation','/smartapi/common/queryFileUrl','899358tczsuf','File\x20URL\x20response\x20missing\x20fileUrl.','ocr','Preview:\x20recognize\x20','General','fileName','image-url','Invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','fileUrl','image-file','scene','str','GET','imageFile','File\x20upload\x20response\x20missing\x20filePath.','idCard','5BOXgmJ','length','trim','form','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','IdCard','appCode','filePath','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.'];a187_0x2e2d=function(){return _0x2198c1;};return a187_0x2e2d();}const SUPPORTED_SCENES=[a187_0x615799(0x19c),a187_0x615799(0x1a5),a187_0x615799(0x18f),a187_0x615799(0x18b)],SCENE_TO_LEGACY_TYPE={'invoice':a187_0x615799(0x1ba),'general':a187_0x615799(0x1b7),'form':a187_0x615799(0x1a4),'idCard':a187_0x615799(0x191)},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x615799(0x1bb)},IMAGE_FILE_FLAG={'name':a187_0x615799(0x1bd),'type':a187_0x615799(0x1a6),'description':a187_0x615799(0x19a)},IMAGE_URL_FLAG={'name':a187_0x615799(0x1b9),'type':'string','description':a187_0x615799(0x19f)};function a187_0x4d68(_0x31fa8b,_0x582e2d){_0x31fa8b=_0x31fa8b-0x189;const _0x2e2dc9=a187_0x2e2d();let _0x4d680b=_0x2e2dc9[_0x31fa8b];return _0x4d680b;}function normalizeScene(_0x3b3f0f){const _0x1f7f1f=a187_0x615799,_0x4e4a12=_0x3b3f0f[_0x1f7f1f(0x18e)]()['toLowerCase']();if(_0x4e4a12===_0x1f7f1f(0x1ad))return _0x1f7f1f(0x18b);if(_0x4e4a12===_0x1f7f1f(0x19c)||_0x4e4a12===_0x1f7f1f(0x1a5)||_0x4e4a12==='form')return _0x4e4a12;throw CliErrors[_0x1f7f1f(0x1b1)](_0x1f7f1f(0x1a8)+_0x3b3f0f+_0x1f7f1f(0x1a0)+SUPPORTED_SCENES[_0x1f7f1f(0x1b0)](',\x20'));}function selectedInputs(_0x56aff4){const _0x2bde53=a187_0x615799,_0x3421c6=_0x56aff4['str'](_0x2bde53(0x1bd))[_0x2bde53(0x18e)](),_0x9c7ea8=_0x56aff4[_0x2bde53(0x1bf)](_0x2bde53(0x1b9))['trim']();return{'imageFile':_0x3421c6,'imageUrl':_0x9c7ea8,'count':[_0x3421c6,_0x9c7ea8][_0x2bde53(0x19b)](Boolean)[_0x2bde53(0x18d)]};}function validateInputSelection(_0x5dece6){const _0x5e199d=a187_0x615799,_0x488fbf=selectedInputs(_0x5dece6);if(_0x488fbf['count']!==0x1)throw CliErrors['validation'](_0x5e199d(0x194));return _0x488fbf;}function withScene(_0x312f61,_0x15476f,_0x1b5ae4){const _0x4a7768=a187_0x615799;return{..._0x312f61,'scene':_0x15476f,..._0x1b5ae4?{'sourceFile':{'fileName':_0x1b5ae4[_0x4a7768(0x1b8)],'filePath':_0x1b5ae4[_0x4a7768(0x193)]}}:{}};}const ocrRecognize={'service':a187_0x615799(0x1b5),'command':a187_0x615799(0x1ac),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x34375a){const _0x1372bc=a187_0x615799,_0x4e9790=normalizeScene(_0x34375a['str'](_0x1372bc(0x1be))),_0x3475e7=SCENE_TO_LEGACY_TYPE[_0x4e9790],_0x431826=validateInputSelection(_0x34375a);if(_0x431826[_0x1372bc(0x1a2)]){const _0x12ce58=new URLSearchParams({'url':_0x431826[_0x1372bc(0x1a2)],'type':_0x3475e7,'appCode':_0x34375a[_0x1372bc(0x192)]});return{'method':'GET','url':_0x1372bc(0x198)+_0x12ce58['toString'](),'description':_0x1372bc(0x1b6)+_0x4e9790+'\x20OCR\x20from\x20URL'};}const _0x442e2c=requireDevelopmentUploadFile(_0x431826[_0x1372bc(0x189)],_0x1372bc(0x1bd));return{'method':_0x1372bc(0x1a7),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x1372bc(0x1a7),'url':_0x1372bc(0x19d),'body':{'appCode':_0x34375a[_0x1372bc(0x192)],'multipart':{'file':_0x442e2c}}},{'method':_0x1372bc(0x1a7),'url':_0x1372bc(0x1b2),'body':{'filePath':_0x1372bc(0x190),'downloadFlag':![]}},{'method':_0x1372bc(0x1c0),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x34375a['appCode'],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x3475e7}}]},'description':_0x1372bc(0x1ab)+_0x4e9790+'\x20OCR'};},async 'execute'(_0x22f86e){const _0x277200=a187_0x615799,_0x50bdfa=normalizeScene(_0x22f86e['str'](_0x277200(0x1be))),_0x2d8637=SCENE_TO_LEGACY_TYPE[_0x50bdfa],_0x28244b=validateInputSelection(_0x22f86e);if(_0x28244b[_0x277200(0x1a2)]){const _0x3dadf4=await recognizeDevelopmentOcr(_0x22f86e['appCode'],{'url':_0x28244b[_0x277200(0x1a2)],'type':_0x2d8637});return{'ok':!![],'data':withScene(_0x3dadf4,_0x50bdfa)};}const _0x1ef937=requireDevelopmentUploadFile(_0x28244b[_0x277200(0x189)],'image-file'),_0x28c6d7=await uploadDevelopmentFile(_0x22f86e[_0x277200(0x192)],_0x1ef937['path']);if(!_0x28c6d7['filePath'])throw CliErrors[_0x277200(0x195)](_0x277200(0x18a));const _0x3006ef=await queryDevelopmentFileUrl(_0x28c6d7['filePath'],{'download':![]});if(!_0x3006ef[_0x277200(0x1bc)])throw CliErrors[_0x277200(0x195)](_0x277200(0x1b4));const _0x358552=await recognizeDevelopmentOcr(_0x22f86e[_0x277200(0x192)],{'url':_0x3006ef[_0x277200(0x1bc)],'type':_0x2d8637});return{'ok':!![],'data':withScene(_0x358552,_0x50bdfa,_0x28c6d7)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- function a188_0x14ba(){const _0x2725f9=['trim','version','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isNaN','parent-menu-id','files','write','.json','stringify','string','Would\x20create\x20Custom\x20Page\x20','createMenu','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','5575716iCKpUz','keys','page-pattern','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','DASHBOARD','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','str','create','values','\x20and\x20its\x20menu\x20entry.','isArray','object','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','328114XBKPyp','name','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','page-dir','toLowerCase','ONEPAGE','pageName\x20cannot\x20exceed\x20100\x20characters.','5095235KKxphH','compress','page-content','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','2pHYJOO','74010avenAX','utf8','some','isInteger','38859150dPTkKo','55830zEMWhI','../../../templates/custom-pages','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','/smartapi/webcode/page/create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','CUSTOM','appCode','includes','4zBYwAK','menuPath','7928552ZNJucD','num','parse','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','603NiIBRn','pageName','now','pageId','Custom_page_','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','number','validation','parentMenuId','Created\x20Custom\x20Page\x20','7LbeZsZ','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Custom\x20Page\x20pattern\x20not\x20found:\x20','length','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)'];a188_0x14ba=function(){return _0x2725f9;};return a188_0x14ba();}const a188_0x19fcba=a188_0x2843;(function(_0x2d251d,_0x25a509){const _0x1997f8=a188_0x2843,_0x3bfc94=_0x2d251d();while(!![]){try{const _0x50e6b3=-parseInt(_0x1997f8(0x1de))/0x1*(-parseInt(_0x1997f8(0x1d2))/0x2)+-parseInt(_0x1997f8(0x1df))/0x3*(parseInt(_0x1997f8(0x1ec))/0x4)+-parseInt(_0x1997f8(0x1d9))/0x5+-parseInt(_0x1997f8(0x20e))/0x6+parseInt(_0x1997f8(0x1fc))/0x7*(-parseInt(_0x1997f8(0x1ee))/0x8)+-parseInt(_0x1997f8(0x1f2))/0x9*(parseInt(_0x1997f8(0x1e4))/0xa)+parseInt(_0x1997f8(0x1e3))/0xb;if(_0x50e6b3===_0x25a509)break;else _0x3bfc94['push'](_0x3bfc94['shift']());}catch(_0x2bd450){_0x3bfc94['push'](_0x3bfc94['shift']());}}}(a188_0x14ba,0x7f987));import{readFile}from'node:fs/promises';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 a188_0x2843(_0x5d0413,_0x4928d9){_0x5d0413=_0x5d0413-0x1c9;const _0x14ba5f=a188_0x14ba();let _0x2843e2=_0x14ba5f[_0x5d0413];return _0x2843e2;}const CUSTOM_PAGE_PATTERNS=['BLANK',a188_0x19fcba(0x1d7),a188_0x19fcba(0x1c9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x19fcba(0x1e5));export const pageCreate={'service':'page','command':a188_0x19fcba(0x1cc),'description':a188_0x19fcba(0x1ca),'risk':a188_0x19fcba(0x207),'defaultOutputFormat':a188_0x19fcba(0x1da),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':a188_0x19fcba(0x1db),'message':a188_0x19fcba(0x1f7),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a188_0x19fcba(0x1d3),'type':'string','description':a188_0x19fcba(0x203)},{'name':'parent-menu-id','type':a188_0x19fcba(0x1f8),'description':a188_0x19fcba(0x1e8)},{'name':a188_0x19fcba(0x210),'type':a188_0x19fcba(0x20a),'description':a188_0x19fcba(0x200),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x19fcba(0x1d5),'type':'string','description':a188_0x19fcba(0x1fd)},APPCODE_FLAG],async 'validate'(_0x5dcadc){await readValidatedPageSource(_0x5dcadc);},async 'dryRun'(_0x3f6912){const _0x18e326=a188_0x19fcba,_0x527d9a=readInput(_0x3f6912,await readValidatedPageSource(_0x3f6912));return{'method':'POST','url':_0x18e326(0x1e7),'body':{'appCode':_0x527d9a['appCode'],'pageName':_0x527d9a[_0x18e326(0x1f3)],..._0x527d9a[_0x18e326(0x1fa)]!=null?{'parentMenuId':_0x527d9a[_0x18e326(0x1fa)]}:{},'createMenu':_0x527d9a[_0x18e326(0x20c)],'codeContent':_0x527d9a[_0x18e326(0x206)]},'description':_0x18e326(0x20b)+JSON[_0x18e326(0x209)](_0x527d9a[_0x18e326(0x1f3)])+_0x18e326(0x1ce)};},async 'execute'(_0x492eb6){const _0x182929=a188_0x19fcba,_0x180c99=readInput(_0x492eb6,await readValidatedPageSource(_0x492eb6)),_0x40ebe1=await createCustomPage(_0x180c99);if(!Number[_0x182929(0x1e2)](_0x40ebe1[_0x182929(0x1f5)])||_0x40ebe1[_0x182929(0x1f5)]<=0x0)throw CliErrors[_0x182929(0x1dd)](_0x182929(0x1e6));const _0x11ddb8=buildCustomPageDevelopmentUrl(_0x180c99['appCode'],_0x40ebe1[_0x182929(0x1ed)]),_0x31c5b4=buildCustomPageEditUrl(_0x180c99[_0x182929(0x1ea)],_0x40ebe1[_0x182929(0x1f5)]);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x182929(0x1e9),'pagePattern':readPagePattern(_0x492eb6),'selector':{'appCode':_0x180c99[_0x182929(0x1ea)],'pageName':_0x180c99[_0x182929(0x1f3)]},'before':null,'after':{'pageId':_0x40ebe1[_0x182929(0x1f5)],'pageName':_0x40ebe1[_0x182929(0x1f3)],'appCode':_0x40ebe1['appCode'],'version':_0x40ebe1[_0x182929(0x202)],'menuId':_0x40ebe1['menuId'],'menuPath':_0x40ebe1[_0x182929(0x1ed)],'files':_0x40ebe1[_0x182929(0x206)]??Object[_0x182929(0x20f)](_0x180c99['files'])},'dryRun':![],'request':_0x180c99,..._0x11ddb8?{'pageUrl':_0x11ddb8}:{},..._0x31c5b4?{'editPageUrl':_0x31c5b4}:{},'warnings':_0x11ddb8?[]:[_0x182929(0x1f1)]},'message':_0x182929(0x1fb)+_0x40ebe1[_0x182929(0x1f5)]+'.'};}};function readPagePattern(_0x1c5920){const _0x3f5045=a188_0x19fcba,_0x524b0d=_0x1c5920['str'](_0x3f5045(0x210))[_0x3f5045(0x201)](),_0x1b6be4=_0x1c5920[_0x3f5045(0x1cb)](_0x3f5045(0x1d5))[_0x3f5045(0x201)]();if(_0x524b0d&&_0x1b6be4)throw CliErrors[_0x3f5045(0x1f9)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x1b6be4)return null;if(!_0x524b0d)throw CliErrors['validation'](_0x3f5045(0x20d));if(!CUSTOM_PAGE_PATTERNS[_0x3f5045(0x1eb)](_0x524b0d))throw CliErrors[_0x3f5045(0x1f9)](_0x3f5045(0x1d4));return _0x524b0d;}async function readPageSource(_0x3cbe9){const _0x3489a1=a188_0x19fcba,_0x2bc8da=_0x3cbe9[_0x3489a1(0x1cb)]('page-dir')[_0x3489a1(0x201)](),_0x555a28=readPagePattern(_0x3cbe9);if(_0x555a28===null){const _0x1cf8ab=await readCustomPageDirectory(_0x2bc8da);if(Object[_0x3489a1(0x20f)](_0x1cf8ab)[_0x3489a1(0x1ff)]===0x0)throw CliErrors['validation'](_0x3489a1(0x1d1));return _0x1cf8ab;}let _0xb55eee;try{_0xb55eee=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x555a28[_0x3489a1(0x1d6)]()+_0x3489a1(0x208)),_0x3489a1(0x1e0));}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1fe)+_0x555a28+'.');}let _0x38850e;try{_0x38850e=JSON[_0x3489a1(0x1f0)](_0xb55eee);}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');}if(!_0x38850e||typeof _0x38850e!==_0x3489a1(0x1d0)||Array[_0x3489a1(0x1cf)](_0x38850e)||Object[_0x3489a1(0x1cd)](_0x38850e)[_0x3489a1(0x1e1)](_0x5cf908=>typeof _0x5cf908!==_0x3489a1(0x20a)))throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');return _0x38850e;}async function readValidatedPageSource(_0x2f368f){const _0x5e2a92=await readPageSource(_0x2f368f);return await validateCustomPageContent(_0x5e2a92),_0x5e2a92;}function readInput(_0xf61960,_0x29e63c){const _0x5668ce=a188_0x19fcba,_0x277bc3=_0xf61960[_0x5668ce(0x1cb)](_0x5668ce(0x1d3))[_0x5668ce(0x201)]()||_0x5668ce(0x1f6)+Date[_0x5668ce(0x1f4)]();if(_0x277bc3[_0x5668ce(0x1ff)]>0x64)throw CliErrors['validation'](_0x5668ce(0x1d8));const _0x280b23=_0xf61960[_0x5668ce(0x1ef)](_0x5668ce(0x205),NaN),_0x2fee54=!Number[_0x5668ce(0x204)](_0x280b23);if(_0x2fee54&&(!Number[_0x5668ce(0x1e2)](_0x280b23)||_0x280b23<=0x0))throw CliErrors['validation'](_0x5668ce(0x211));return{'appCode':_0xf61960[_0x5668ce(0x1ea)],'pageName':_0x277bc3,..._0x2fee54?{'parentMenuId':_0x280b23}:{},'createMenu':!![],'files':_0x29e63c};}
1
+ const a188_0x2ef1b4=a188_0x122f;(function(_0x542513,_0x5da137){const _0x45d294=a188_0x122f,_0x507632=_0x542513();while(!![]){try{const _0x380d87=parseInt(_0x45d294(0x1da))/0x1*(-parseInt(_0x45d294(0x1d2))/0x2)+-parseInt(_0x45d294(0x1cf))/0x3+-parseInt(_0x45d294(0x1c0))/0x4*(-parseInt(_0x45d294(0x1ed))/0x5)+-parseInt(_0x45d294(0x1d6))/0x6*(-parseInt(_0x45d294(0x1f0))/0x7)+-parseInt(_0x45d294(0x1c7))/0x8*(-parseInt(_0x45d294(0x1c9))/0x9)+-parseInt(_0x45d294(0x1ee))/0xa*(parseInt(_0x45d294(0x1c1))/0xb)+-parseInt(_0x45d294(0x1dc))/0xc*(parseInt(_0x45d294(0x1e1))/0xd);if(_0x380d87===_0x5da137)break;else _0x507632['push'](_0x507632['shift']());}catch(_0x2a44f0){_0x507632['push'](_0x507632['shift']());}}}(a188_0x1a3d,0x959bb));import{readFile}from'node:fs/promises';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';const CUSTOM_PAGE_PATTERNS=[a188_0x2ef1b4(0x1de),'ONEPAGE',a188_0x2ef1b4(0x1cb)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x2ef1b4(0x1e4));export const pageCreate={'service':a188_0x2ef1b4(0x1c6),'command':a188_0x2ef1b4(0x1c8),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a188_0x2ef1b4(0x1d8),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a188_0x2ef1b4(0x1e8)},{'name':a188_0x2ef1b4(0x1b9),'message':a188_0x2ef1b4(0x1d4),'hint':a188_0x2ef1b4(0x1f1)}],'flags':[{'name':'name','type':a188_0x2ef1b4(0x1d3),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a188_0x2ef1b4(0x1ce),'type':'number','description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a188_0x2ef1b4(0x1cd),'type':a188_0x2ef1b4(0x1d3),'description':a188_0x2ef1b4(0x1b7),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x2ef1b4(0x1e2),'type':'string','description':a188_0x2ef1b4(0x1d7)},APPCODE_FLAG],async 'validate'(_0x43e4ae){await readValidatedPageSource(_0x43e4ae);},async 'dryRun'(_0x38f8c3){const _0x3ddbd3=a188_0x2ef1b4,_0x25f3f7=readInput(_0x38f8c3,await readValidatedPageSource(_0x38f8c3));return{'method':_0x3ddbd3(0x1d0),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x25f3f7['appCode'],'pageName':_0x25f3f7['pageName'],..._0x25f3f7[_0x3ddbd3(0x1e7)]!=null?{'parentMenuId':_0x25f3f7['parentMenuId']}:{},'createMenu':_0x25f3f7[_0x3ddbd3(0x1b1)],'codeContent':_0x25f3f7[_0x3ddbd3(0x1b6)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x3ddbd3(0x1ca)](_0x25f3f7[_0x3ddbd3(0x1b5)])+_0x3ddbd3(0x1e9)};},async 'execute'(_0x557d22){const _0x32f79d=a188_0x2ef1b4,_0x307537=readInput(_0x557d22,await readValidatedPageSource(_0x557d22)),_0x46a97f=await createCustomPage(_0x307537);if(!Number[_0x32f79d(0x1bd)](_0x46a97f[_0x32f79d(0x1bc)])||_0x46a97f['pageId']<=0x0)throw CliErrors[_0x32f79d(0x1f2)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x37091a=buildCustomPageDevelopmentUrl(_0x307537[_0x32f79d(0x1b0)],_0x46a97f[_0x32f79d(0x1bb)]),_0x4f1796=buildCustomPageEditUrl(_0x307537['appCode'],_0x46a97f[_0x32f79d(0x1bc)]);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x32f79d(0x1ea),'pagePattern':readPagePattern(_0x557d22),'selector':{'appCode':_0x307537[_0x32f79d(0x1b0)],'pageName':_0x307537[_0x32f79d(0x1b5)]},'before':null,'after':{'pageId':_0x46a97f['pageId'],'pageName':_0x46a97f[_0x32f79d(0x1b5)],'appCode':_0x46a97f[_0x32f79d(0x1b0)],'version':_0x46a97f[_0x32f79d(0x1af)],'menuId':_0x46a97f[_0x32f79d(0x1c5)],'menuPath':_0x46a97f[_0x32f79d(0x1bb)],'files':_0x46a97f[_0x32f79d(0x1b6)]??Object[_0x32f79d(0x1b2)](_0x307537[_0x32f79d(0x1b6)])},'dryRun':![],'request':_0x307537,..._0x37091a?{'pageUrl':_0x37091a}:{},..._0x4f1796?{'editPageUrl':_0x4f1796}:{},'warnings':_0x37091a?[]:[_0x32f79d(0x1ba)]},'message':_0x32f79d(0x1e5)+_0x46a97f[_0x32f79d(0x1bc)]+'.'};}};function a188_0x122f(_0x358ede,_0x18437e){_0x358ede=_0x358ede-0x1af;const _0x1a3dfd=a188_0x1a3d();let _0x122fbb=_0x1a3dfd[_0x358ede];return _0x122fbb;}function readPagePattern(_0x1e568e){const _0x507e69=a188_0x2ef1b4,_0x3148b6=_0x1e568e[_0x507e69(0x1cc)](_0x507e69(0x1cd))['trim'](),_0x2d390c=_0x1e568e[_0x507e69(0x1cc)]('page-dir')['trim']();if(_0x3148b6&&_0x2d390c)throw CliErrors['validation'](_0x507e69(0x1bf));if(_0x2d390c)return null;if(!_0x3148b6)throw CliErrors[_0x507e69(0x1d1)](_0x507e69(0x1e0));if(!CUSTOM_PAGE_PATTERNS[_0x507e69(0x1dd)](_0x3148b6))throw CliErrors[_0x507e69(0x1d1)](_0x507e69(0x1d5));return _0x3148b6;}async function readPageSource(_0x445d16){const _0xcec344=a188_0x2ef1b4,_0x2bcf9f=_0x445d16[_0xcec344(0x1cc)]('page-dir')[_0xcec344(0x1b4)](),_0x2ea92f=readPagePattern(_0x445d16);if(_0x2ea92f===null){const _0x3b9181=await readCustomPageDirectory(_0x2bcf9f);if(Object['keys'](_0x3b9181)[_0xcec344(0x1c3)]===0x0)throw CliErrors[_0xcec344(0x1d1)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3b9181;}let _0x19b47f;try{_0x19b47f=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2ea92f[_0xcec344(0x1c4)]()+_0xcec344(0x1e6)),_0xcec344(0x1ec));}catch{throw CliErrors['validation'](_0xcec344(0x1b8)+_0x2ea92f+'.');}let _0x1f6395;try{_0x1f6395=JSON[_0xcec344(0x1db)](_0x19b47f);}catch{throw CliErrors[_0xcec344(0x1d1)](_0xcec344(0x1e3)+_0x2ea92f+'.');}if(!_0x1f6395||typeof _0x1f6395!==_0xcec344(0x1d9)||Array[_0xcec344(0x1b3)](_0x1f6395)||Object[_0xcec344(0x1df)](_0x1f6395)['some'](_0x244f97=>typeof _0x244f97!==_0xcec344(0x1d3)))throw CliErrors[_0xcec344(0x1d1)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2ea92f+'.');return _0x1f6395;}function a188_0x1a3d(){const _0xbd7ce=['Custom\x20Page\x20pattern\x20not\x20found:\x20','page-content','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','menuPath','pageId','isInteger','num','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','4JHQTqw','59895oPrqLW','name','length','toLowerCase','menuId','page','6895248rQAbHm','create','9RsGsce','stringify','DASHBOARD','str','page-pattern','parent-menu-id','2879646yJJwGL','POST','validation','2rQNdUf','string','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','150tMcQgR','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','write','object','366305CwAYUM','parse','60nrdNxG','includes','BLANK','values','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','2079142tJgWal','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','../../../templates/custom-pages','Created\x20Custom\x20Page\x20','.json','parentMenuId','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','\x20and\x20its\x20menu\x20entry.','CUSTOM','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','utf8','4977130mjhlkW','290tArguK','now','290983redhKJ','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','apiError','version','appCode','createMenu','keys','isArray','trim','pageName','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)'];a188_0x1a3d=function(){return _0xbd7ce;};return a188_0x1a3d();}async function readValidatedPageSource(_0x142971){const _0x4fd040=await readPageSource(_0x142971);return await validateCustomPageContent(_0x4fd040),_0x4fd040;}function readInput(_0x5aa641,_0x4f612d){const _0x4954b1=a188_0x2ef1b4,_0x2b6d81=_0x5aa641[_0x4954b1(0x1cc)](_0x4954b1(0x1c2))['trim']()||'Custom_page_'+Date[_0x4954b1(0x1ef)]();if(_0x2b6d81[_0x4954b1(0x1c3)]>0x64)throw CliErrors[_0x4954b1(0x1d1)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x46bb7f=_0x5aa641[_0x4954b1(0x1be)]('parent-menu-id',NaN),_0x3cc285=!Number['isNaN'](_0x46bb7f);if(_0x3cc285&&(!Number[_0x4954b1(0x1bd)](_0x46bb7f)||_0x46bb7f<=0x0))throw CliErrors['validation'](_0x4954b1(0x1eb));return{'appCode':_0x5aa641[_0x4954b1(0x1b0)],'pageName':_0x2b6d81,..._0x3cc285?{'parentMenuId':_0x46bb7f}:{},'createMenu':!![],'files':_0x4f612d};}
@@ -1 +1 @@
1
- const a189_0x3cf9fc=a189_0x75a7;(function(_0x267e5e,_0x4c554d){const _0x42d0d7=a189_0x75a7,_0x52a3cc=_0x267e5e();while(!![]){try{const _0x5a8437=parseInt(_0x42d0d7(0x1ca))/0x1+-parseInt(_0x42d0d7(0x1ce))/0x2+parseInt(_0x42d0d7(0x1c0))/0x3+parseInt(_0x42d0d7(0x1bf))/0x4+-parseInt(_0x42d0d7(0x1d5))/0x5*(-parseInt(_0x42d0d7(0x1c4))/0x6)+parseInt(_0x42d0d7(0x1cc))/0x7*(parseInt(_0x42d0d7(0x1d1))/0x8)+-parseInt(_0x42d0d7(0x1cf))/0x9*(parseInt(_0x42d0d7(0x1c8))/0xa);if(_0x5a8437===_0x4c554d)break;else _0x52a3cc['push'](_0x52a3cc['shift']());}catch(_0x1eeb7d){_0x52a3cc['push'](_0x52a3cc['shift']());}}}(a189_0x266a,0x4d5f0));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x3cf9fc(0x1c5),'command':'custom-detail','description':a189_0x3cf9fc(0x1c6),'risk':a189_0x3cf9fc(0x1bc),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e31db){readCustomPageId(_0x2e31db);},async 'execute'(_0x26dbc3){const _0x2f621f=a189_0x3cf9fc,_0x20fc1e=readCustomPageId(_0x26dbc3),_0x31a0da=await getCustomPageSource(_0x20fc1e),{bundle:_0x340d69,createTime:_0x24d930,updateTime:_0x247926,..._0x167afb}=_0x31a0da,_0xdded2e=_0x31a0da['id']??_0x20fc1e,_0x3e1a73=_0x31a0da[_0x2f621f(0x1c3)]?.[_0x2f621f(0x1c2)]()||_0x26dbc3[_0x2f621f(0x1cb)](_0x2f621f(0x1d3))[_0x2f621f(0x1c2)](),_0x280eff=buildCustomPageRuntimeUrl(_0x3e1a73,_0x31a0da[_0x2f621f(0x1d4)]),_0x3d4525=buildCustomPageEditUrl(_0x3e1a73,_0xdded2e),_0x1341cf=await resolveCustomPageDevelopmentUrl(_0x3e1a73,_0xdded2e,_0x26dbc3[_0x2f621f(0x1d7)]);return{'ok':!![],'data':{..._0x167afb,..._0x280eff?{'runtimePageUrl':_0x280eff}:{},..._0x1341cf?{'pageUrl':_0x1341cf}:{},..._0x3d4525?{'editPageUrl':_0x3d4525}:{},..._0x24d930==null?{}:{'createTime':formatTime(_0x24d930)},..._0x247926==null?{}:{'updateTime':formatTime(_0x247926)}},'message':_0x2f621f(0x1ba)+_0x20fc1e+'.'};}};function a189_0x75a7(_0x153d10,_0x63e9b9){_0x153d10=_0x153d10-0x1ba;const _0x266a49=a189_0x266a();let _0x75a73e=_0x266a49[_0x153d10];return _0x75a73e;}function a189_0x266a(){const _0x36e58a=['getMonth','55372tudjxD','1767861NTzJCx','join','trim','appCode','449346Omdraq','page','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getFullYear','20710lhDHLa','getHours','514978dgcZXs','str','189CSQfCT','padStart','180468jFMmgj','7362LetKWN','getSeconds','180344JMFADb','getTime','appcode','pageCode','25dLlwaP','getDate','cookie','Retrieved\x20Custom\x20Page\x20','isNaN','read','getMinutes'];a189_0x266a=function(){return _0x36e58a;};return a189_0x266a();}function formatTime(_0xbb23c9){const _0x10d6bb=a189_0x3cf9fc,_0x14217d=new Date(_0xbb23c9);if(Number[_0x10d6bb(0x1bb)](_0x14217d[_0x10d6bb(0x1d2)]()))return String(_0xbb23c9);const _0x3effa1=[_0x14217d[_0x10d6bb(0x1c7)](),String(_0x14217d[_0x10d6bb(0x1be)]()+0x1)[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d6)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)]('-'),_0x24643a=[String(_0x14217d[_0x10d6bb(0x1c9)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1bd)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d0)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)](':');return _0x3effa1+'\x20'+_0x24643a;}
1
+ const a189_0x4dd5a6=a189_0x28fa;function a189_0x28fa(_0x541014,_0xd266b){_0x541014=_0x541014-0x1ac;const _0x38dfd3=a189_0x38df();let _0x28fac5=_0x38dfd3[_0x541014];return _0x28fac5;}function a189_0x38df(){const _0x2610d1=['str','padStart','page','appCode','custom-detail','getHours','133PRkycW','read','appcode','76qNzSSE','getMonth','27169930DBVsuN','trim','pageCode','2116674MEXlVj','getDate','compress','isNaN','Retrieved\x20Custom\x20Page\x20','getFullYear','2RYfwbL','19254yBZyUa','number','332255nxJowG','getMinutes','cookie','11iObctv','getSeconds','4406439OgICGD','500223OEunfo','join','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getTime','8930128miPPKt'];a189_0x38df=function(){return _0x2610d1;};return a189_0x38df();}(function(_0xd5833,_0x3dd8c6){const _0x10e424=a189_0x28fa,_0x2b3f43=_0xd5833();while(!![]){try{const _0x327494=parseInt(_0x10e424(0x1af))/0x1*(-parseInt(_0x10e424(0x1c8))/0x2)+parseInt(_0x10e424(0x1ae))/0x3+parseInt(_0x10e424(0x1bd))/0x4*(parseInt(_0x10e424(0x1cb))/0x5)+-parseInt(_0x10e424(0x1c9))/0x6*(parseInt(_0x10e424(0x1ba))/0x7)+parseInt(_0x10e424(0x1b3))/0x8+parseInt(_0x10e424(0x1c2))/0x9+-parseInt(_0x10e424(0x1bf))/0xa*(parseInt(_0x10e424(0x1ac))/0xb);if(_0x327494===_0x3dd8c6)break;else _0x2b3f43['push'](_0x2b3f43['shift']());}catch(_0xd995c1){_0x2b3f43['push'](_0x2b3f43['shift']());}}}(a189_0x38df,0xc4727));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x4dd5a6(0x1b6),'command':a189_0x4dd5a6(0x1b8),'description':a189_0x4dd5a6(0x1b1),'risk':a189_0x4dd5a6(0x1bb),'defaultOutputFormat':a189_0x4dd5a6(0x1c4),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x4dd5a6(0x1ca),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3274fd){readCustomPageId(_0x3274fd);},async 'execute'(_0x59f12f){const _0x56b6a4=a189_0x4dd5a6,_0x25c2d7=readCustomPageId(_0x59f12f),_0x1407c7=await getCustomPageSource(_0x25c2d7),{bundle:_0xfa138d,createTime:_0x5b15f2,updateTime:_0x279cc2,..._0x20bcbc}=_0x1407c7,_0x33edcf=_0x1407c7['id']??_0x25c2d7,_0x1d33b4=_0x1407c7[_0x56b6a4(0x1b7)]?.['trim']()||_0x59f12f[_0x56b6a4(0x1b4)](_0x56b6a4(0x1bc))[_0x56b6a4(0x1c0)](),_0x247411=buildCustomPageRuntimeUrl(_0x1d33b4,_0x1407c7[_0x56b6a4(0x1c1)]),_0x148853=buildCustomPageEditUrl(_0x1d33b4,_0x33edcf),_0x27e6d4=await resolveCustomPageDevelopmentUrl(_0x1d33b4,_0x33edcf,_0x59f12f[_0x56b6a4(0x1cd)]);return{'ok':!![],'data':{..._0x20bcbc,..._0x247411?{'runtimePageUrl':_0x247411}:{},..._0x27e6d4?{'pageUrl':_0x27e6d4}:{},..._0x148853?{'editPageUrl':_0x148853}:{},..._0x5b15f2==null?{}:{'createTime':formatTime(_0x5b15f2)},..._0x279cc2==null?{}:{'updateTime':formatTime(_0x279cc2)}},'message':_0x56b6a4(0x1c6)+_0x25c2d7+'.'};}};function formatTime(_0x4ce922){const _0x3281ab=a189_0x4dd5a6,_0x17388a=new Date(_0x4ce922);if(Number[_0x3281ab(0x1c5)](_0x17388a[_0x3281ab(0x1b2)]()))return String(_0x4ce922);const _0x22da9d=[_0x17388a[_0x3281ab(0x1c7)](),String(_0x17388a[_0x3281ab(0x1be)]()+0x1)[_0x3281ab(0x1b5)](0x2,'0'),String(_0x17388a[_0x3281ab(0x1c3)]())[_0x3281ab(0x1b5)](0x2,'0')][_0x3281ab(0x1b0)]('-'),_0x4b26b2=[String(_0x17388a[_0x3281ab(0x1b9)]())[_0x3281ab(0x1b5)](0x2,'0'),String(_0x17388a[_0x3281ab(0x1cc)]())['padStart'](0x2,'0'),String(_0x17388a[_0x3281ab(0x1ad)]())[_0x3281ab(0x1b5)](0x2,'0')][_0x3281ab(0x1b0)](':');return _0x22da9d+'\x20'+_0x4b26b2;}