@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/README.md +10 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +2 -2
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.js +1 -1
  18. package/lib/auth/login-success-html.js +1 -1
  19. package/lib/auth/logout.js +1 -1
  20. package/lib/cli-flags.js +1 -1
  21. package/lib/cli.js +1 -1
  22. package/lib/commands/api/generate.js +1 -1
  23. package/lib/commands/api/index.js +1 -1
  24. package/lib/commands/api/list.js +1 -1
  25. package/lib/commands/api/pull.js +1 -1
  26. package/lib/commands/api/shared.js +1 -1
  27. package/lib/commands/app/detail.js +1 -1
  28. package/lib/commands/app/index.js +1 -1
  29. package/lib/commands/app/list.js +1 -1
  30. package/lib/commands/app/members-list.js +1 -1
  31. package/lib/commands/app/remote-directory.js +1 -1
  32. package/lib/commands/app/shared.js +1 -1
  33. package/lib/commands/app-config/delete.js +1 -1
  34. package/lib/commands/app-config/get.js +1 -1
  35. package/lib/commands/app-config/index.js +1 -1
  36. package/lib/commands/app-config/list.js +1 -1
  37. package/lib/commands/app-config/set.js +1 -1
  38. package/lib/commands/app-config/shared.js +1 -1
  39. package/lib/commands/auth/index.js +1 -1
  40. package/lib/commands/bff/create.js +1 -1
  41. package/lib/commands/bff/delete.js +1 -1
  42. package/lib/commands/bff/detail.js +1 -1
  43. package/lib/commands/bff/index.js +1 -1
  44. package/lib/commands/bff/list.js +1 -1
  45. package/lib/commands/bff/logs.js +1 -1
  46. package/lib/commands/bff/pull.js +1 -1
  47. package/lib/commands/bff/push.js +1 -1
  48. package/lib/commands/bff/status.js +1 -1
  49. package/lib/commands/cli-skill/index.js +1 -1
  50. package/lib/commands/cli-update.js +1 -1
  51. package/lib/commands/codegen/index.js +1 -1
  52. package/lib/commands/codegen/sdk.js +1 -1
  53. package/lib/commands/codegen/sql.js +1 -1
  54. package/lib/commands/common/app-registry.js +1 -1
  55. package/lib/commands/common/app-selector.js +1 -1
  56. package/lib/commands/common/async-task.js +1 -1
  57. package/lib/commands/common/dry-run.js +1 -1
  58. package/lib/commands/common/flags.js +1 -1
  59. package/lib/commands/common/local-file.js +1 -1
  60. package/lib/commands/common/validate.js +1 -1
  61. package/lib/commands/config/delete.js +1 -1
  62. package/lib/commands/config/get.js +1 -1
  63. package/lib/commands/config/index.js +1 -1
  64. package/lib/commands/config/init.js +1 -1
  65. package/lib/commands/config/list.js +1 -1
  66. package/lib/commands/config/set.js +1 -1
  67. package/lib/commands/config/shared.js +1 -1
  68. package/lib/commands/dataset/batch-design.js +1 -1
  69. package/lib/commands/dataset/business-group-update.js +1 -1
  70. package/lib/commands/dataset/business-groups.js +1 -1
  71. package/lib/commands/dataset/capability.js +1 -1
  72. package/lib/commands/dataset/cross-relation-create.js +1 -1
  73. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  74. package/lib/commands/dataset/cross-relation-list.js +1 -1
  75. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  76. package/lib/commands/dataset/cross-relation-update.js +1 -1
  77. package/lib/commands/dataset/delete.js +1 -1
  78. package/lib/commands/dataset/design-context.js +1 -1
  79. package/lib/commands/dataset/design-start.js +1 -1
  80. package/lib/commands/dataset/design-status.js +1 -1
  81. package/lib/commands/dataset/design-sync-retry.js +1 -1
  82. package/lib/commands/dataset/design-sync-status.js +1 -1
  83. package/lib/commands/dataset/design-validate.js +1 -1
  84. package/lib/commands/dataset/detail.js +1 -1
  85. package/lib/commands/dataset/extend-update.js +1 -1
  86. package/lib/commands/dataset/field-restore.js +1 -1
  87. package/lib/commands/dataset/field-update.js +1 -1
  88. package/lib/commands/dataset/generate.js +1 -1
  89. package/lib/commands/dataset/index.js +1 -1
  90. package/lib/commands/dataset/list.js +1 -1
  91. package/lib/commands/dataset/operations.js +1 -1
  92. package/lib/commands/dataset/relation-audit.js +1 -1
  93. package/lib/commands/dataset/relation-create.js +1 -1
  94. package/lib/commands/dataset/relation-delete.js +1 -1
  95. package/lib/commands/dataset/relation-shared.js +1 -1
  96. package/lib/commands/dataset/relation-update.js +1 -1
  97. package/lib/commands/dataset/relations.js +1 -1
  98. package/lib/commands/dataset/rename.js +1 -1
  99. package/lib/commands/dataset/restore.js +1 -1
  100. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  101. package/lib/commands/db/analysis-batching.js +1 -1
  102. package/lib/commands/db/analyze-batch-plan.js +1 -1
  103. package/lib/commands/db/analyze-cancel.js +1 -1
  104. package/lib/commands/db/analyze-start.js +1 -1
  105. package/lib/commands/db/analyze-status.js +1 -1
  106. package/lib/commands/db/create.js +1 -1
  107. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  110. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  111. package/lib/commands/db/delete.js +1 -1
  112. package/lib/commands/db/detail.js +1 -1
  113. package/lib/commands/db/diff-refresh-start.js +1 -1
  114. package/lib/commands/db/diff-refresh-status.js +1 -1
  115. package/lib/commands/db/diff.js +1 -1
  116. package/lib/commands/db/index.js +1 -1
  117. package/lib/commands/db/list.js +1 -1
  118. package/lib/commands/db/shared.js +1 -1
  119. package/lib/commands/db/table-diff-shared.js +1 -1
  120. package/lib/commands/db/tables.js +1 -1
  121. package/lib/commands/db/test.js +1 -1
  122. package/lib/commands/db/update.js +1 -1
  123. package/lib/commands/deployment/index.js +1 -1
  124. package/lib/commands/deployment/sync-all.js +1 -1
  125. package/lib/commands/deployment/sync-jobs.js +1 -1
  126. package/lib/commands/deployment/sync-status.js +1 -1
  127. package/lib/commands/doctor.js +1 -1
  128. package/lib/commands/file/index.js +1 -1
  129. package/lib/commands/flow/create.js +1 -1
  130. package/lib/commands/flow/detail.js +1 -1
  131. package/lib/commands/flow/index.js +1 -1
  132. package/lib/commands/flow/list.js +1 -1
  133. package/lib/commands/flow/page-list.js +1 -1
  134. package/lib/commands/flow/publish.js +1 -1
  135. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  136. package/lib/commands/flow/runtime-role-list.js +1 -1
  137. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  138. package/lib/commands/flow/runtime-user-search.js +1 -1
  139. package/lib/commands/flow/shared.js +1 -1
  140. package/lib/commands/flow/update.js +1 -1
  141. package/lib/commands/flow/validate.js +1 -1
  142. package/lib/commands/instant-api-policy/current.js +1 -1
  143. package/lib/commands/instant-api-policy/index.js +1 -1
  144. package/lib/commands/instant-api-policy/init.js +1 -1
  145. package/lib/commands/instant-api-policy/publish.js +1 -1
  146. package/lib/commands/instant-api-policy/pull.js +1 -1
  147. package/lib/commands/instant-api-policy/revision.js +1 -1
  148. package/lib/commands/instant-api-policy/revisions.js +1 -1
  149. package/lib/commands/instant-api-policy/rollback.js +1 -1
  150. package/lib/commands/instant-api-policy/shared.js +1 -1
  151. package/lib/commands/instant-api-policy/validate.js +1 -1
  152. package/lib/commands/issue/context.d.ts +3 -0
  153. package/lib/commands/issue/context.js +1 -0
  154. package/lib/commands/issue/index.js +1 -1
  155. package/lib/commands/issue/nudge.js +1 -1
  156. package/lib/commands/issue/report.js +1 -1
  157. package/lib/commands/kb/create.js +1 -1
  158. package/lib/commands/kb/delete.js +1 -1
  159. package/lib/commands/kb/detail.js +1 -1
  160. package/lib/commands/kb/index.js +1 -1
  161. package/lib/commands/kb/list.js +1 -1
  162. package/lib/commands/kb/search.js +1 -1
  163. package/lib/commands/kb/shared.js +1 -1
  164. package/lib/commands/kb/update.js +1 -1
  165. package/lib/commands/logs/index.js +1 -1
  166. package/lib/commands/menu/asset-update.js +1 -1
  167. package/lib/commands/menu/delete.js +1 -1
  168. package/lib/commands/menu/external-link-create.js +1 -1
  169. package/lib/commands/menu/external-link-update.js +1 -1
  170. package/lib/commands/menu/group-create.js +1 -1
  171. package/lib/commands/menu/group-update.js +1 -1
  172. package/lib/commands/menu/index.js +1 -1
  173. package/lib/commands/menu/list.js +1 -1
  174. package/lib/commands/menu/move.js +1 -1
  175. package/lib/commands/menu/regroup-start.js +1 -1
  176. package/lib/commands/menu/rename.js +1 -1
  177. package/lib/commands/menu/shared/compare-table.js +1 -1
  178. package/lib/commands/menu/shared/delete-plan.js +1 -1
  179. package/lib/commands/menu/shared/facts.js +1 -1
  180. package/lib/commands/menu/shared/index.js +1 -1
  181. package/lib/commands/menu/shared/inquirer.js +1 -1
  182. package/lib/commands/menu/shared/local-pages.js +1 -1
  183. package/lib/commands/menu/shared/logic.js +1 -1
  184. package/lib/commands/menu/shared/mutations.js +1 -1
  185. package/lib/commands/menu/shared/path.js +1 -1
  186. package/lib/commands/menu/shared/service.js +1 -1
  187. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  188. package/lib/commands/menu/shared/sync-core.js +1 -1
  189. package/lib/commands/menu/shared/update-core.js +1 -1
  190. package/lib/commands/menu/shared/valid-url.js +1 -1
  191. package/lib/commands/menu/subapp-assets-status.js +1 -1
  192. package/lib/commands/menu/subapp-assets-update.js +1 -1
  193. package/lib/commands/menu/sync.js +1 -1
  194. package/lib/commands/menu/visibility-update.js +1 -1
  195. package/lib/commands/notification/config-create.js +1 -1
  196. package/lib/commands/notification/config-delete.js +1 -1
  197. package/lib/commands/notification/config-list.js +1 -1
  198. package/lib/commands/notification/config-update.js +1 -1
  199. package/lib/commands/notification/index.js +1 -1
  200. package/lib/commands/notification/shared.js +1 -1
  201. package/lib/commands/ocr/index.js +1 -1
  202. package/lib/commands/page/create.js +1 -1
  203. package/lib/commands/page/custom/detail.js +1 -1
  204. package/lib/commands/page/custom/list.js +1 -1
  205. package/lib/commands/page/custom/publish.js +1 -1
  206. package/lib/commands/page/custom/shared.js +1 -1
  207. package/lib/commands/page/custom/syntax.js +1 -1
  208. package/lib/commands/page/custom/update.js +1 -1
  209. package/lib/commands/page/data-list-status.js +1 -1
  210. package/lib/commands/page/generate-start.js +1 -1
  211. package/lib/commands/page/generate-status.js +1 -1
  212. package/lib/commands/page/index.js +1 -1
  213. package/lib/commands/page/pull.js +1 -1
  214. package/lib/commands/page/push.js +1 -1
  215. package/lib/commands/page/relation-audit.js +1 -1
  216. package/lib/commands/page/restore.js +1 -1
  217. package/lib/commands/page/shared.js +1 -1
  218. package/lib/commands/page/sync.js +1 -1
  219. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  220. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  221. package/lib/commands/project/create/format-elapsed.js +1 -1
  222. package/lib/commands/project/create/main.js +1 -1
  223. package/lib/commands/project/create/materialize-project-template.js +1 -1
  224. package/lib/commands/project/create/project-name.js +1 -1
  225. package/lib/commands/project/create/project-template-archive.js +1 -1
  226. package/lib/commands/project/create/project-template-path.js +1 -1
  227. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  228. package/lib/commands/project/create/use-format-code.js +1 -1
  229. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  230. package/lib/commands/project/domain-routing-sync.js +1 -1
  231. package/lib/commands/project/index.js +1 -1
  232. package/lib/commands/project/upgrade.js +1 -1
  233. package/lib/commands/registry.js +1 -1
  234. package/lib/commands/role/delete.js +1 -1
  235. package/lib/commands/role/detail.js +1 -1
  236. package/lib/commands/role/index.js +1 -1
  237. package/lib/commands/role/list.js +1 -1
  238. package/lib/commands/role/shared.js +1 -1
  239. package/lib/commands/role/update.js +1 -1
  240. package/lib/commands/role/user-add.js +1 -1
  241. package/lib/commands/role/user-remove.js +1 -1
  242. package/lib/commands/role/user-resolve.js +1 -1
  243. package/lib/commands/rule/get.js +1 -1
  244. package/lib/commands/rule/index.js +1 -1
  245. package/lib/commands/rule/list.js +1 -1
  246. package/lib/commands/rule/set.js +1 -1
  247. package/lib/commands/rule/shared.js +1 -1
  248. package/lib/commands/run/index.js +1 -1
  249. package/lib/commands/schema.js +1 -1
  250. package/lib/commands/sql/create.js +1 -1
  251. package/lib/commands/sql/delete.js +1 -1
  252. package/lib/commands/sql/detail.js +1 -1
  253. package/lib/commands/sql/exec.js +1 -1
  254. package/lib/commands/sql/index.js +1 -1
  255. package/lib/commands/sql/list.js +1 -1
  256. package/lib/commands/sql/pull.js +1 -1
  257. package/lib/commands/sql/push.js +1 -1
  258. package/lib/commands/sql/shared.js +1 -1
  259. package/lib/commands/sql/status.js +1 -1
  260. package/lib/commands/sql/validate.js +1 -1
  261. package/lib/commands/task/index.js +1 -1
  262. package/lib/commands/task/status.js +1 -1
  263. package/lib/commands/tenant/index.js +1 -1
  264. package/lib/commands/tenant/members-list.js +1 -1
  265. package/lib/commands/tenant/shared.js +1 -1
  266. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  267. package/lib/commands/user-account/feishu-bind.js +1 -1
  268. package/lib/commands/user-account/index.js +1 -1
  269. package/lib/commands/workspace/add.js +1 -1
  270. package/lib/commands/workspace/index.js +1 -1
  271. package/lib/commands/workspace/remove.js +1 -1
  272. package/lib/config/domain-config.js +1 -1
  273. package/lib/config/project-domain-routing.js +1 -1
  274. package/lib/config/region-config.js +1 -1
  275. package/lib/config/schema.js +1 -1
  276. package/lib/constant/cdn.js +1 -1
  277. package/lib/constant/cli.js +1 -1
  278. package/lib/constant/defaults.js +1 -1
  279. package/lib/constant/domain.js +1 -1
  280. package/lib/constant/env.js +1 -1
  281. package/lib/constant/output.js +1 -1
  282. package/lib/constant/paths.js +1 -1
  283. package/lib/constant/region.js +1 -1
  284. package/lib/constant/risk.js +1 -1
  285. package/lib/constant/routing-profile.js +1 -1
  286. package/lib/context/app-resolver.js +1 -1
  287. package/lib/context/auth-resolver.js +1 -1
  288. package/lib/context/config-loader.js +1 -1
  289. package/lib/context.js +1 -1
  290. package/lib/core/alias-resolver.js +1 -1
  291. package/lib/core/api-client.js +1 -1
  292. package/lib/core/bff/config.js +1 -1
  293. package/lib/core/bff/file-system.js +1 -1
  294. package/lib/core/bff/hash.js +1 -1
  295. package/lib/core/bff/hook-directory.js +1 -1
  296. package/lib/core/bff/lock.js +1 -1
  297. package/lib/core/bff/utils.js +1 -1
  298. package/lib/core/cross-db-analysis.js +1 -1
  299. package/lib/core/cross-db-relation.js +1 -1
  300. package/lib/core/db-resolver.js +1 -1
  301. package/lib/core/flow-config.js +1 -1
  302. package/lib/core/instant-api-policy/config.js +1 -1
  303. package/lib/core/instant-api-policy/endpoints.js +1 -1
  304. package/lib/core/kb-management-client.js +1 -1
  305. package/lib/core/kb-search-client.js +1 -1
  306. package/lib/core/page/file-system.js +1 -1
  307. package/lib/core/page/hash.js +1 -1
  308. package/lib/core/page/lock.js +1 -1
  309. package/lib/core/page/lr-smart-jsx.js +1 -1
  310. package/lib/core/sql-index-auditor.js +1 -1
  311. package/lib/core/sql-sync/config.js +1 -1
  312. package/lib/core/sql-sync/file-system.js +1 -1
  313. package/lib/core/sql-sync/hash.js +1 -1
  314. package/lib/core/sql-sync/lock.js +1 -1
  315. package/lib/core/sql-sync/utils.js +1 -1
  316. package/lib/core/sql-validator.js +1 -1
  317. package/lib/errors.js +1 -1
  318. package/lib/framework/build-all-flags.js +1 -1
  319. package/lib/framework/error-output.js +1 -1
  320. package/lib/framework/explicit-yes.js +1 -1
  321. package/lib/framework/flags.js +1 -1
  322. package/lib/framework/help.js +1 -1
  323. package/lib/framework/index.js +1 -1
  324. package/lib/framework/output.js +1 -1
  325. package/lib/framework/response.js +1 -1
  326. package/lib/framework/runner-alias.js +1 -1
  327. package/lib/framework/runner.js +1 -1
  328. package/lib/framework/schema-export.js +1 -1
  329. package/lib/framework/supported-flags.js +1 -1
  330. package/lib/framework/types.js +1 -1
  331. package/lib/generated/build-info.d.ts +4 -4
  332. package/lib/generated/build-info.js +1 -1
  333. package/lib/generated/official-routing.js +1 -1
  334. package/lib/generated/routing-contract.js +1 -1
  335. package/lib/help.js +1 -1
  336. package/lib/postinstall.js +1 -1
  337. package/lib/runtime/confirmation.js +1 -1
  338. package/lib/runtime/event.js +1 -1
  339. package/lib/runtime/index.js +1 -1
  340. package/lib/runtime/queue.js +1 -1
  341. package/lib/runtime/resolve.js +1 -1
  342. package/lib/services/dataset-design/checkpoint.js +1 -1
  343. package/lib/services/dataset-design/commands.js +1 -1
  344. package/lib/services/dataset-design/contract.js +1 -1
  345. package/lib/skills/builtin-skill.js +1 -1
  346. package/lib/skills/main.js +1 -1
  347. package/lib/skills/npx-skills-add.js +1 -1
  348. package/lib/skills/skill-presence.js +1 -1
  349. package/lib/telemetry/cli-command-trace.js +1 -1
  350. package/lib/telemetry/cli-help-trace.js +1 -1
  351. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  352. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  353. package/lib/telemetry/send-cli-trace-log.js +1 -1
  354. package/lib/utils/ai_config.js +1 -1
  355. package/lib/utils/apply-jq-filter.js +1 -1
  356. package/lib/utils/cdn-config.js +1 -1
  357. package/lib/utils/check-sdk-version.js +1 -1
  358. package/lib/utils/cli-version-check.js +1 -1
  359. package/lib/utils/cli-version-policy.js +1 -1
  360. package/lib/utils/config.js +1 -1
  361. package/lib/utils/entity-with-id.js +1 -1
  362. package/lib/utils/file-utils.js +1 -1
  363. package/lib/utils/guides-cdn.js +1 -1
  364. package/lib/utils/http-client.js +1 -1
  365. package/lib/utils/is-non-interactive.js +1 -1
  366. package/lib/utils/logger.js +1 -1
  367. package/lib/utils/params.js +1 -1
  368. package/lib/utils/platform.js +1 -1
  369. package/lib/utils/sleep.js +1 -1
  370. package/lib/utils/template-replacer.js +1 -1
  371. package/lib/utils/update-notice.js +1 -1
  372. package/lib/utils/version.js +1 -1
  373. package/lib/utils/with-active-cookie.js +1 -1
  374. package/lib/utils/write-cli-side-channel.js +1 -1
  375. package/package.json +2 -2
  376. package/skills/rabetbase/SKILL.md +2 -2
  377. package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
  378. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  379. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  380. package/skills/rabetbase.manifest.json +3 -3
  381. package/lib/commands/issue/shared.d.ts +0 -32
  382. package/lib/commands/issue/shared.js +0 -1
  383. package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
  384. package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
@@ -1 +1 @@
1
- const a190_0x3ed1cb=a190_0xfe40;(function(_0x4b4323,_0x4c59a7){const _0x3dd4b2=a190_0xfe40,_0x4cd539=_0x4b4323();while(!![]){try{const _0x135850=parseInt(_0x3dd4b2(0x1d2))/0x1*(-parseInt(_0x3dd4b2(0x1b7))/0x2)+parseInt(_0x3dd4b2(0x1a3))/0x3*(parseInt(_0x3dd4b2(0x1e8))/0x4)+-parseInt(_0x3dd4b2(0x1ad))/0x5+parseInt(_0x3dd4b2(0x1e2))/0x6*(-parseInt(_0x3dd4b2(0x1c3))/0x7)+-parseInt(_0x3dd4b2(0x1ab))/0x8*(parseInt(_0x3dd4b2(0x1c0))/0x9)+-parseInt(_0x3dd4b2(0x1e0))/0xa+parseInt(_0x3dd4b2(0x1a8))/0xb*(parseInt(_0x3dd4b2(0x1db))/0xc);if(_0x135850===_0x4c59a7)break;else _0x4cd539['push'](_0x4cd539['shift']());}catch(_0x56b23d){_0x4cd539['push'](_0x4cd539['shift']());}}}(a190_0x29b3,0xc5d65));import a190_0xa3923c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a190_0xfe40(_0x3cd03b,_0x5aee7b){_0x3cd03b=_0x3cd03b-0x1a1;const _0x29b34d=a190_0x29b3();let _0xfe408c=_0x29b34d[_0x3cd03b];return _0xfe408c;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x29b3(){const _0x29f4b2=['\x20menu(s)\x20created','\x20\x20Continue\x20with\x20creation?','map','appcode','Online\x20menu\x20list\x20fetched','onlineMenuList','1DIsHQF','cyan','localPages','\x20menu(s)','gray','\x20failed.','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Menu\x20sync\x20skipped','34908oyxUVV','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20sync\x20completed:\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Would\x20create\x20','3723190RhSeed','message','2373870WhEuqj','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','str','\x20menu(s)\x20bound\x20to\x20','split','paths','2044HfDKYC','onlinePaths','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','params','trim','8610ctveem','sync','targetPages','\x20\x20Cancelled.','size','8668nBrjBf','\x20page(s)','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','32AyCgZr','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','2498205vENPoR','filter','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','skipped','POST','cookie','\x20\x20Create\x20','string','466136vrHJCZ','\x20local\x20microfrontend\x20menu(s).','\x20and\x20CSS:\x20','selectedAppName','write','yes','appCode','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','rawFlags','3257658xLTpvZ','validation','created','7CoLVWZ','flag','appName','\x20\x20✓\x20Selected:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','boolean','✓\x20Menu\x20sync\x20completed:\x20','jsUrl'];a190_0x29b3=function(){return _0x29f4b2;};return a190_0x29b3();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':'menu','command':a190_0x3ed1cb(0x1a4),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x3ed1cb(0x1bb),'flags':[{'name':a190_0x3ed1cb(0x1a1),'type':'string','description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x3ed1cb(0x1e7),'type':a190_0x3ed1cb(0x1b6),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a190_0x3ed1cb(0x1bc),'type':a190_0x3ed1cb(0x1c9),'description':a190_0x3ed1cb(0x1d9)}],async 'dryRun'(_0x577485){const _0x5c1047=a190_0x3ed1cb;ensureRunnableContext(_0x577485[_0x5c1047(0x1bf)],_0x577485[_0x5c1047(0x1ba)]);const _0x376ef9=await runMenuSyncCore(_0x577485[_0x5c1047(0x1bd)],_0x577485[_0x5c1047(0x1b4)],parsePaths(_0x577485['str'](_0x5c1047(0x1e7))),_0x577485[_0x5c1047(0x1e4)](_0x5c1047(0x1a1)),{'dryRun':!![]});return{'method':_0x5c1047(0x1b3),'url':'/smartapi/menu/create','body':_0x376ef9,'description':_0x376ef9['skipped']?_0x5c1047(0x1de):_0x5c1047(0x1df)+_0x376ef9[_0x5c1047(0x1a5)]['length']+_0x5c1047(0x1b8)};},async 'execute'(_0x305109){const _0x5125ff=a190_0x3ed1cb;ensureRunnableContext(_0x305109[_0x5125ff(0x1bf)],_0x305109[_0x5125ff(0x1ba)]);const _0x588a2a=_0x305109[_0x5125ff(0x1c4)](_0x5125ff(0x1bc)),_0x17c51f=_0x305109['str'](_0x5125ff(0x1a1)),_0x1fdbb5=parsePaths(_0x305109[_0x5125ff(0x1e4)](_0x5125ff(0x1e7))),_0x5dc527=parseMenuSyncParams(_0x17c51f);if(_0x588a2a){const _0x29c02e=await runMenuSyncCore(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x1fdbb5,_0x17c51f);if(_0x29c02e[_0x5125ff(0x1b2)]){const _0x15d906=getLocalPages();_0x15d906['length']===0x0?writeCliSideChannelLine(_0x5125ff(0x1b0)):writeCliSideChannelLine(_0x5125ff(0x1e3));}else writeCliSideChannelLine(_0x5125ff(0x1ca)+_0x29c02e[_0x5125ff(0x1c2)]+_0x5125ff(0x1cc));return{'ok':!![],'data':_0x29c02e,'message':_0x29c02e['skipped']?_0x5125ff(0x1da):_0x5125ff(0x1dd)+_0x29c02e[_0x5125ff(0x1c2)]+'\x20created.'};}if(_0x1fdbb5['length']>0x0)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1ea),_0x5125ff(0x1ac));if(!isInteractive()&&_0x17c51f)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1d8),_0x5125ff(0x1ac));requireInteractive(),writeCliSideChannelLine(_0x5125ff(0x1be));const _0x5a103d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1dc110,_0x5b8396,_0x569a15;try{const _0x36db74=await fetchMenuData(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)]);_0x1dc110=_0x36db74[_0x5125ff(0x1d4)],_0x5b8396=_0x36db74[_0x5125ff(0x1e9)],_0x569a15=_0x36db74[_0x5125ff(0x1d1)],stopSpinner(_0x5a103d,_0x5125ff(0x1d0),!![]);}catch(_0x7875de){stopSpinner(_0x5a103d,_0x5125ff(0x1dc),![]);throw CliErrors[_0x5125ff(0x1c1)](_0x7875de instanceof Error?_0x7875de['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x1dc110[_0x5125ff(0x1b1)]===0x0)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1c8)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x333e37=buildCompareRows(_0x1dc110,_0x5b8396);writeCliSideChannelLine(renderCompareTable(_0x333e37)),writeCliSideChannelLine('');const _0x48d176=await selectPages(_0x1dc110,_0x5b8396);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d3)](_0x5125ff(0x1c6)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1a9)));const _0x2277ae=_0x5dc527[_0x5125ff(0x1cb)]&&_0x5dc527['cssUrl'];if(!_0x2277ae){writeCliSideChannelLine(renderSyncSummary(_0x48d176,_0x5b8396[_0x5125ff(0x1a7)]>0x0));const _0x59bfec=await askConfirm(_0x5125ff(0x1cd));if(!_0x59bfec)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2c3fc5=_0x5dc527[_0x5125ff(0x1cb)],_0x427082=_0x5dc527['cssUrl'];!_0x2c3fc5&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x2c3fc5=await askJsUrl());!_0x427082&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x427082=await askCssUrl());const _0x3c0dc3=await askConfirm(_0x5dc527[_0x5125ff(0x1c5)]?_0x5125ff(0x1b5)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1e5)+_0x5dc527[_0x5125ff(0x1c5)]+'?':_0x5125ff(0x1b5)+_0x48d176['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x2c3fc5+_0x5125ff(0x1b9)+_0x427082+'?');if(!_0x3c0dc3)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)](_0x5125ff(0x1a6))),{'ok':!![]};const _0x117864=[_0x2c3fc5,_0x427082][_0x5125ff(0x1ae)](_0x5be1fc=>Boolean(_0x5be1fc));_0x5dc527[_0x5125ff(0x1c5)]&&_0x117864[_0x5125ff(0x1b1)]===0x0&&await assertSharedResourcesConfigured(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x5dc527['appName']);const _0x3b924d=startSpinner('Creating\x20'+_0x48d176[_0x5125ff(0x1b1)]+'\x20menu(s)...');try{const _0x3e3658=_0x48d176[_0x5125ff(0x1ce)](_0x3c9ef2=>resolvePage(_0x3c9ef2,_0x5dc527,_0x569a15)),_0x51a354=await doCreateMenus(_0x305109[_0x5125ff(0x1bd)],_0x305109['cookie'],_0x3e3658,_0x117864,_0x5dc527[_0x5125ff(0x1c5)]?{'appName':_0x5dc527['appName']}:undefined);return stopSpinner(_0x3b924d,'Created\x20'+_0x51a354[_0x5125ff(0x1c2)]+_0x5125ff(0x1d5),!![]),{'ok':!![],'data':_0x51a354,'message':_0x5125ff(0x1dd)+_0x51a354[_0x5125ff(0x1c2)]+'\x20created,\x20'+_0x51a354['failed']+_0x5125ff(0x1d7)};}catch(_0x3b5234){stopSpinner(_0x3b924d,_0x5125ff(0x1af),![]);throw CliErrors['validation'](_0x3b5234 instanceof Error?_0x3b5234[_0x5125ff(0x1e1)]:_0x5125ff(0x1af));}}};function ensureRunnableContext(_0x4e789e,_0x239fe6){const _0x11fb14=a190_0x3ed1cb,_0x1a7b7c=_0x4e789e[_0x11fb14(0x1cf)]?String(_0x4e789e[_0x11fb14(0x1cf)])[_0x11fb14(0x1a2)]():'';if(!isInProject()&&!_0x239fe6&&!_0x1a7b7c)throw CliErrors['validation'](_0x11fb14(0x1c7)+_0x11fb14(0x1aa));}function parsePaths(_0x2b1fed){const _0x1baa46=a190_0x3ed1cb;return[...new Set(_0x2b1fed[_0x1baa46(0x1e6)](',')['map'](_0x56a25f=>_0x56a25f['trim']())[_0x1baa46(0x1ae)](Boolean))];}
1
+ const a190_0x2de04d=a190_0x4e37;(function(_0x31f4be,_0x233059){const _0x382e02=a190_0x4e37,_0x22a4b4=_0x31f4be();while(!![]){try{const _0x4f93e4=-parseInt(_0x382e02(0x21e))/0x1*(parseInt(_0x382e02(0x213))/0x2)+parseInt(_0x382e02(0x1fe))/0x3+-parseInt(_0x382e02(0x20e))/0x4*(parseInt(_0x382e02(0x223))/0x5)+-parseInt(_0x382e02(0x22a))/0x6+-parseInt(_0x382e02(0x203))/0x7+parseInt(_0x382e02(0x211))/0x8+parseInt(_0x382e02(0x237))/0x9;if(_0x4f93e4===_0x233059)break;else _0x22a4b4['push'](_0x22a4b4['shift']());}catch(_0x1044a1){_0x22a4b4['push'](_0x22a4b4['shift']());}}}(a190_0x4e02,0xab76d));import a190_0x574b68 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a190_0x4e02(){const _0x5b1572=['string','12IRuleo','\x20local\x20microfrontend\x20menu(s).','Menu\x20sync\x20skipped','5470968ovBMnk','split','23978pZIcDO','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','str','params','sync','Creating\x20','appName','\x20menu(s)\x20bound\x20to\x20','\x20failed.','\x20\x20✓\x20Selected:\x20','cssUrl','52pmQRQK','Menu\x20creation\x20failed','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Menu\x20sync\x20completed:\x20','\x20menu(s)...','1155260buRJVh','\x20\x20Continue\x20with\x20creation?','cookie','\x20menu(s)','length','message','appcode','5460864pPEKrH','gray','Created\x20','menu','localPages','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','skipped','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','validation','cyan','\x20\x20Create\x20','trim','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','14320764KgwJLT','size','\x20\x20Cancelled.','paths','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','created','appCode','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','\x20and\x20CSS:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','boolean','write','rawFlags','Would\x20create\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','yes','4199775pnepsk','/smartapi/menu/create','selectedAppName','Register\x20local\x20pages\x20as\x20platform\x20menus','filter','5221629mYMxoM','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','onlineMenuList','map','failed','onlinePaths','POST','targetPages','\x20menu(s)\x20created','jsUrl'];a190_0x4e02=function(){return _0x5b1572;};return a190_0x4e02();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a190_0x4e37(_0xf52199,_0x13366a){_0xf52199=_0xf52199-0x1f3;const _0x4e022d=a190_0x4e02();let _0x4e37f1=_0x4e022d[_0xf52199];return _0x4e37f1;}import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x2de04d(0x22d),'command':a190_0x2de04d(0x217),'description':a190_0x2de04d(0x201),'risk':a190_0x2de04d(0x1f8),'flags':[{'name':a190_0x2de04d(0x216),'type':a190_0x2de04d(0x20d),'description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a190_0x2de04d(0x204)},{'name':a190_0x2de04d(0x23a),'type':a190_0x2de04d(0x20d),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a190_0x2de04d(0x1f7),'description':a190_0x2de04d(0x1fb)}],async 'dryRun'(_0x11fcca){const _0x38877b=a190_0x2de04d;ensureRunnableContext(_0x11fcca['rawFlags'],_0x11fcca[_0x38877b(0x200)]);const _0x93de9d=await runMenuSyncCore(_0x11fcca[_0x38877b(0x1f3)],_0x11fcca[_0x38877b(0x225)],parsePaths(_0x11fcca[_0x38877b(0x215)](_0x38877b(0x23a))),_0x11fcca['str'](_0x38877b(0x216)),{'dryRun':!![]});return{'method':_0x38877b(0x209),'url':_0x38877b(0x1ff),'body':_0x93de9d,'description':_0x93de9d[_0x38877b(0x230)]?_0x38877b(0x214):_0x38877b(0x1fa)+_0x93de9d[_0x38877b(0x20a)][_0x38877b(0x227)]+_0x38877b(0x20f)};},async 'execute'(_0x4a00fa){const _0x5f07a7=a190_0x2de04d;ensureRunnableContext(_0x4a00fa[_0x5f07a7(0x1f9)],_0x4a00fa[_0x5f07a7(0x200)]);const _0x334aa9=_0x4a00fa['flag'](_0x5f07a7(0x1fd)),_0x514e5e=_0x4a00fa[_0x5f07a7(0x215)](_0x5f07a7(0x216)),_0x1fbe91=parsePaths(_0x4a00fa[_0x5f07a7(0x215)](_0x5f07a7(0x23a))),_0x2e398d=parseMenuSyncParams(_0x514e5e);if(_0x334aa9){const _0x4130cd=await runMenuSyncCore(_0x4a00fa[_0x5f07a7(0x1f3)],_0x4a00fa['cookie'],_0x1fbe91,_0x514e5e);if(_0x4130cd['skipped']){const _0x5025b9=getLocalPages();_0x5025b9['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5f07a7(0x1f6));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x4130cd[_0x5f07a7(0x23c)]+_0x5f07a7(0x20b));return{'ok':!![],'data':_0x4130cd,'message':_0x4130cd['skipped']?_0x5f07a7(0x210):'Menu\x20sync\x20completed:\x20'+_0x4130cd['created']+'\x20created.'};}if(_0x1fbe91['length']>0x0)throw CliErrors['validation'](_0x5f07a7(0x22f),_0x5f07a7(0x236));if(!isInteractive()&&_0x514e5e)throw CliErrors['validation'](_0x5f07a7(0x220),_0x5f07a7(0x236));requireInteractive(),writeCliSideChannelLine(_0x5f07a7(0x1f4));const _0x37bc4b=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x576467,_0x2a1fba,_0x3ff107;try{const _0x126851=await fetchMenuData(_0x4a00fa[_0x5f07a7(0x1f3)],_0x4a00fa[_0x5f07a7(0x225)]);_0x576467=_0x126851[_0x5f07a7(0x22e)],_0x2a1fba=_0x126851[_0x5f07a7(0x208)],_0x3ff107=_0x126851[_0x5f07a7(0x205)],stopSpinner(_0x37bc4b,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x3182f2){stopSpinner(_0x37bc4b,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x5f07a7(0x232)](_0x3182f2 instanceof Error?_0x3182f2[_0x5f07a7(0x228)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x576467['length']===0x0)return writeCliSideChannelLine(a190_0x574b68['yellow'](_0x5f07a7(0x1fc))),{'ok':!![]};const _0x213ab4=buildCompareRows(_0x576467,_0x2a1fba);writeCliSideChannelLine(renderCompareTable(_0x213ab4)),writeCliSideChannelLine('');const _0x152ff7=await selectPages(_0x576467,_0x2a1fba);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x574b68[_0x5f07a7(0x233)](_0x5f07a7(0x21c)+_0x152ff7['length']+'\x20page(s)'));const _0x4e2745=_0x2e398d['jsUrl']&&_0x2e398d[_0x5f07a7(0x21d)];if(!_0x4e2745){writeCliSideChannelLine(renderSyncSummary(_0x152ff7,_0x2a1fba[_0x5f07a7(0x238)]>0x0));const _0x384803=await askConfirm(_0x5f07a7(0x224));if(!_0x384803)return writeCliSideChannelLine(a190_0x574b68[_0x5f07a7(0x22b)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x214e91=_0x2e398d[_0x5f07a7(0x20c)],_0x56948c=_0x2e398d['cssUrl'];!_0x214e91&&!_0x2e398d[_0x5f07a7(0x219)]&&(_0x214e91=await askJsUrl());!_0x56948c&&!_0x2e398d[_0x5f07a7(0x219)]&&(_0x56948c=await askCssUrl());const _0x1baa05=await askConfirm(_0x2e398d[_0x5f07a7(0x219)]?_0x5f07a7(0x234)+_0x152ff7['length']+_0x5f07a7(0x21a)+_0x2e398d[_0x5f07a7(0x219)]+'?':_0x5f07a7(0x234)+_0x152ff7[_0x5f07a7(0x227)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x214e91+_0x5f07a7(0x1f5)+_0x56948c+'?');if(!_0x1baa05)return writeCliSideChannelLine(a190_0x574b68[_0x5f07a7(0x22b)](_0x5f07a7(0x239))),{'ok':!![]};const _0x2ca560=[_0x214e91,_0x56948c][_0x5f07a7(0x202)](_0x372f3d=>Boolean(_0x372f3d));_0x2e398d['appName']&&_0x2ca560[_0x5f07a7(0x227)]===0x0&&await assertSharedResourcesConfigured(_0x4a00fa[_0x5f07a7(0x1f3)],_0x4a00fa[_0x5f07a7(0x225)],_0x2e398d[_0x5f07a7(0x219)]);const _0x3b3561=startSpinner(_0x5f07a7(0x218)+_0x152ff7[_0x5f07a7(0x227)]+_0x5f07a7(0x222));try{const _0x618d69=_0x152ff7[_0x5f07a7(0x206)](_0xaff607=>resolvePage(_0xaff607,_0x2e398d,_0x3ff107)),_0x5ee567=await doCreateMenus(_0x4a00fa[_0x5f07a7(0x1f3)],_0x4a00fa[_0x5f07a7(0x225)],_0x618d69,_0x2ca560,_0x2e398d['appName']?{'appName':_0x2e398d[_0x5f07a7(0x219)]}:undefined);return stopSpinner(_0x3b3561,_0x5f07a7(0x22c)+_0x5ee567[_0x5f07a7(0x23c)]+_0x5f07a7(0x226),!![]),{'ok':!![],'data':_0x5ee567,'message':_0x5f07a7(0x221)+_0x5ee567[_0x5f07a7(0x23c)]+'\x20created,\x20'+_0x5ee567[_0x5f07a7(0x207)]+_0x5f07a7(0x21b)};}catch(_0x45f06a){stopSpinner(_0x3b3561,_0x5f07a7(0x21f),![]);throw CliErrors[_0x5f07a7(0x232)](_0x45f06a instanceof Error?_0x45f06a['message']:_0x5f07a7(0x21f));}}};function ensureRunnableContext(_0x45c9b1,_0x55f89d){const _0x1e22e0=a190_0x2de04d,_0x543109=_0x45c9b1[_0x1e22e0(0x229)]?String(_0x45c9b1[_0x1e22e0(0x229)])[_0x1e22e0(0x235)]():'';if(!isInProject()&&!_0x55f89d&&!_0x543109)throw CliErrors['validation'](_0x1e22e0(0x23b)+_0x1e22e0(0x231));}function parsePaths(_0x26e24c){const _0x19898b=a190_0x2de04d;return[...new Set(_0x26e24c[_0x19898b(0x212)](',')[_0x19898b(0x206)](_0x474d76=>_0x474d76[_0x19898b(0x235)]())[_0x19898b(0x202)](Boolean))];}
@@ -1 +1 @@
1
- const a191_0x13f24b=a191_0x4f71;(function(_0x346e48,_0x1c1ed4){const _0x15a9ee=a191_0x4f71,_0x5c583c=_0x346e48();while(!![]){try{const _0x4b78e8=parseInt(_0x15a9ee(0x17a))/0x1+-parseInt(_0x15a9ee(0x172))/0x2+parseInt(_0x15a9ee(0x1b8))/0x3+parseInt(_0x15a9ee(0x182))/0x4+-parseInt(_0x15a9ee(0x191))/0x5*(parseInt(_0x15a9ee(0x162))/0x6)+-parseInt(_0x15a9ee(0x192))/0x7*(parseInt(_0x15a9ee(0x160))/0x8)+-parseInt(_0x15a9ee(0x152))/0x9*(-parseInt(_0x15a9ee(0x168))/0xa);if(_0x4b78e8===_0x1c1ed4)break;else _0x5c583c['push'](_0x5c583c['shift']());}catch(_0x230398){_0x5c583c['push'](_0x5c583c['shift']());}}}(a191_0x3401,0x72bba));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x3401(){const _0x4731d7=['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu_state_drift','menu\x20list','paths','targets','resourcesValid','expectVisible','datasetId','1915896naXXAr','expected-count','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20menu(s);\x20skipped\x20','pageType','str','push','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plan','verification','update\x20menu\x20visibility','split','visibility-update','map','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','some','get','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','89577qxLZxC','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','url','menu_verification_failed','/smartapi/menu/update','modelType','num','cookie','true','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','1214296AiUzjY','before','12KyEfIS','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','flagMissing','string','visible','update\x20visibility\x20for','1110neolNr','menuIds','validation','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','label','isArray','datasetCode','sort','body','\x20updated,\x20','1240986HdNJyC','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20failed.','isSafeInteger','byId','number','menu','508857IwPHZr','path','childrenCount','POST','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','menu-ids','720788xNKUKX','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update','filter','parentId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20visibility\x20update\x20completed:\x20','beforeById','length','join','type','Updated\x20visibility\x20for\x20','boolean','update-menu-visibility','1078270OtCUPc','42SacCLt','recovered','set','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','requestedVisible','\x20menu(s),\x20expected\x20','menu_expected_count_mismatch','\x20skipped,\x20','childrenIds','Would\x20update\x20visibility\x20for\x20','menu_permission_denied','Response\x20was\x20lost\x20and\x20menu\x20','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','stringify','expectedCount','resources','pageId','warnings','appCode','depth','message','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20true\x20or\x20false.','\x20unchanged\x20menu(s).','Requested\x20menu\x20visibility','code','Menu\x20','Selected\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified'];a191_0x3401=function(){return _0x4731d7;};return a191_0x3401();}const BACKEND=[{'method':a191_0x13f24b(0x17d),'path':a191_0x13f24b(0x159)}];export const menuVisibilityUpdate={'service':a191_0x13f24b(0x179),'command':'visibility-update','description':a191_0x13f24b(0x183),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x13f24b(0x181),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x163)},{'name':a191_0x13f24b(0x1b3),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x174)},{'name':a191_0x13f24b(0x166),'type':a191_0x13f24b(0x18f),'required':!![],'description':a191_0x13f24b(0x1ab)},{'name':a191_0x13f24b(0x17e),'type':a191_0x13f24b(0x18f),'description':a191_0x13f24b(0x156)},{'name':a191_0x13f24b(0x1b9),'type':a191_0x13f24b(0x178),'description':a191_0x13f24b(0x1ba)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54b88a){parseInput(_0x54b88a);},async 'dryRun'(_0x58c60c){const _0x23cdef=a191_0x13f24b,_0x109a5b=await buildPlan(_0x58c60c,!![]),_0x548f03=_0x109a5b['plan']['plannedActions']?.[_0x23cdef(0x18b)]??0x0,_0xfd382a=_0x109a5b[_0x23cdef(0x1c2)][_0x23cdef(0x1b4)][_0x23cdef(0x18b)]-_0x548f03;return menuDryRunResult(_0x109a5b[_0x23cdef(0x1c2)],{'method':_0x23cdef(0x17d),'url':_0x23cdef(0x159),'body':{'updates':_0x109a5b[_0x23cdef(0x1c2)]['plannedActions']?.[_0x23cdef(0x14a)](_0x4a4e55=>_0x4a4e55[_0x23cdef(0x170)])??[]},'description':_0x23cdef(0x19c)+_0x548f03+'\x20menu(s);\x20skip\x20'+_0xfd382a+_0x23cdef(0x1aa)});},async 'execute'(_0x5f14a0){const _0x5b9142=a191_0x13f24b,_0xf07a94=await buildPlan(_0x5f14a0,![]);await recheckMutationSnapshot(_0x5f14a0,_0xf07a94[_0x5b9142(0x1c2)],_0x5b9142(0x1c4));const _0x3c9a75=[],_0x173688=[],_0x542d1d=[];for(const _0x270627 of _0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)]){if(_0x270627['before'][_0x5b9142(0x166)]===_0xf07a94['plan'][_0x5b9142(0x197)]){_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0['cookie'],{'id':_0x270627['id'],'visible':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]}),_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':!![],'skipped':![]});}catch(_0x5aaeae){const _0x5acb9d=mapMenuApiError(_0x5aaeae,_0x5b9142(0x167),_0x270627['id']);if(isMenuResponseLoss(_0x5aaeae)&&_0x5acb9d['code']!==_0x5b9142(0x19d)){_0x542d1d[_0x5b9142(0x1c0)](_0x270627['id']);continue;}_0x173688[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'stage':_0x5b9142(0x184),'code':_0x5acb9d[_0x5b9142(0x1ac)],'message':_0x5acb9d[_0x5b9142(0x1a7)]});}}let _0x1dea92;try{_0x1dea92=await fetchMenuSnapshot(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0[_0x5b9142(0x15c)]);}catch(_0x17f101){const _0x412536=describeMenuErrorCause(_0x17f101,'verify\x20menu\x20visibility\x20update'),_0x1c57eb=_0x542d1d['map'](_0x56bba0=>({'id':_0x56bba0,'stage':_0x5b9142(0x15e),'code':_0x5b9142(0x158),'message':_0x5b9142(0x196)+_0x56bba0+_0x5b9142(0x14d),'requestedStateConfirmed':![],'recovered':![]})),_0x468f80={'stage':_0x5b9142(0x1c3),'code':_0x5b9142(0x158),'message':_0x5b9142(0x195),'targetIds':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)][_0x5b9142(0x14a)](_0x494c07=>_0x494c07['id']),'requestedStateConfirmed':![],..._0x412536};throw menuFailure(asVerificationError(_0x17f101,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xf07a94[_0x5b9142(0x1c2)],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x1c57eb,_0x468f80],'warnings':[_0x5b9142(0x1b0)],'verification':{'status':_0x5b9142(0x1bb),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x504554=[];for(const _0x10dbb1 of _0x3c9a75){const _0x2a2390=Number(_0x10dbb1['id']),_0x3aa2bd=_0xf07a94[_0x5b9142(0x18a)][_0x5b9142(0x150)](_0x2a2390),_0x233ff9=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x2a2390);try{verifyVisibilityUpdate(_0x3aa2bd,_0x233ff9,_0xf07a94['plan'][_0x5b9142(0x197)]);}catch(_0x4301b7){const _0x2a9b9b=asVerificationError(_0x4301b7,_0x5b9142(0x1ad)+_0x2a2390+_0x5b9142(0x1af));_0x504554['push']({'id':_0x2a2390,'stage':'verification','code':_0x2a9b9b['code'],'message':_0x2a9b9b['message'],'requestedStateConfirmed':![]});}}for(const _0x150dd4 of _0x542d1d){const _0x10dd87=_0xf07a94[_0x5b9142(0x18a)]['get'](_0x150dd4),_0x22bf57=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x150dd4);try{verifyVisibilityUpdate(_0x10dd87,_0x22bf57,_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]),_0x3c9a75['push']({'id':_0x150dd4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1017fd){const _0x2274d9=asVerificationError(_0x1017fd,_0x5b9142(0x19e)+_0x150dd4+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x504554[_0x5b9142(0x1c0)]({'id':_0x150dd4,'stage':_0x5b9142(0x15e),'code':_0x2274d9[_0x5b9142(0x1ac)],'message':_0x2274d9[_0x5b9142(0x1a7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x504554[_0x5b9142(0x18b)]>0x0){const _0x447a21=_0x504554[_0x5b9142(0x14a)](_0x1155d2=>Number(_0x1155d2['id'])),_0x53de4f=_0x3c9a75[_0x5b9142(0x185)](_0x502746=>_0x502746[_0x5b9142(0x193)]===!![])[_0x5b9142(0x18b)],_0x127c24=menuError('menu_verification_failed',_0x5b9142(0x14e)+_0x447a21[_0x5b9142(0x18c)](',\x20')+'.',_0x5b9142(0x188));throw menuFailure(_0x127c24,_0xf07a94['plan'],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x504554],'warnings':[_0x5b9142(0x17f)],'verification':{'status':_0x5b9142(0x1bb),..._0x447a21[_0x5b9142(0x18b)]===0x1?{'targetId':_0x447a21[0x0]}:{'targetIds':_0x447a21},'recoveredCount':_0x53de4f,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xe006bf=_0x3c9a75[_0x5b9142(0x185)](_0x5f0788=>_0x5f0788[_0x5b9142(0x14b)]===!![])[_0x5b9142(0x18b)],_0x681958=_0x3c9a75['length']-_0xe006bf,_0x5e087b={..._0xf07a94[_0x5b9142(0x1c2)],'succeeded':_0x3c9a75,'failed':_0x173688,'warnings':_0x173688['length']>0x0?[..._0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1a4)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xf07a94['plan'][_0x5b9142(0x1a4)],'verification':{'checkedBy':_0x5b9142(0x1b2),'snapshotHash':_0x1dea92['hash'],'matchesRequestedState':_0x173688[_0x5b9142(0x18b)]===0x0,'recoveredCount':_0x542d1d[_0x5b9142(0x18b)]}};return{'ok':_0x173688['length']===0x0,'data':_0x5e087b,'message':_0x173688[_0x5b9142(0x18b)]===0x0?_0x5b9142(0x18e)+_0xe006bf+_0x5b9142(0x1bd)+_0x681958+_0x5b9142(0x1aa):_0x5b9142(0x189)+_0xe006bf+_0x5b9142(0x171)+_0x681958+_0x5b9142(0x19a)+_0x173688[_0x5b9142(0x18b)]+_0x5b9142(0x175)};}};function parseInput(_0x2e57b2){const _0x338fff=a191_0x13f24b,_0x2002fc=parseMenuIds(_0x2e57b2[_0x338fff(0x1bf)](_0x338fff(0x181))),_0x5387f7=parseCsv(_0x2e57b2['str'](_0x338fff(0x1b3)));if(_0x2002fc[_0x338fff(0x18b)]===0x0&&_0x5387f7[_0x338fff(0x18b)]===0x0)throw CliErrors[_0x338fff(0x16a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x716946=parseBooleanFlag(_0x2e57b2,_0x338fff(0x166),!![]),_0x4fffdd=parseBooleanFlag(_0x2e57b2,_0x338fff(0x17e),![]);let _0x29468e;if(hasFlag(_0x2e57b2,'expected-count')){_0x29468e=_0x2e57b2[_0x338fff(0x15b)](_0x338fff(0x1b9));if(!Number[_0x338fff(0x176)](_0x29468e)||_0x29468e<0x0)throw CliErrors['validation'](_0x338fff(0x1a8));}return{'menuIds':_0x2002fc,'paths':_0x5387f7,'visible':_0x716946,'expectVisible':_0x4fffdd,'expectedCount':_0x29468e};}async function buildPlan(_0x475e1a,_0x143b38){const _0x3ffdbe=a191_0x13f24b,_0x4ed40a=parseInput(_0x475e1a),_0x4602de=await fetchMutationSnapshot(_0x475e1a,_0x3ffdbe(0x1c4)),_0x558512=selectTargets(_0x4602de['menus'],_0x4ed40a[_0x3ffdbe(0x169)],_0x4ed40a[_0x3ffdbe(0x1b3)]);if(_0x4ed40a['expectedCount']!==undefined&&_0x558512[_0x3ffdbe(0x18b)]!==_0x4ed40a[_0x3ffdbe(0x1a1)])throw menuError(_0x3ffdbe(0x199),_0x3ffdbe(0x1ae)+_0x558512[_0x3ffdbe(0x18b)]+_0x3ffdbe(0x198)+_0x4ed40a['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ed40a[_0x3ffdbe(0x1b6)]!==undefined){const _0x40f5a8=_0x558512[_0x3ffdbe(0x185)](_0x5c4ab3=>_0x5c4ab3[_0x3ffdbe(0x166)]!==_0x4ed40a[_0x3ffdbe(0x1b6)]);if(_0x40f5a8['length']>0x0)throw menuError(_0x3ffdbe(0x1b1),_0x3ffdbe(0x173)+_0x40f5a8[_0x3ffdbe(0x14a)](_0x2bc045=>_0x2bc045['id'])['join'](',\x20')+'.',_0x3ffdbe(0x14c));}const _0x42e4f4=_0x558512[_0x3ffdbe(0x14a)](_0xe62290=>({'id':_0xe62290['id'],'label':_0xe62290['label'],'path':_0xe62290[_0x3ffdbe(0x17b)],'before':{'visible':_0xe62290['visible']},'after':{'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x3b158c=_0x42e4f4['filter'](_0x270c6e=>_0x270c6e[_0x3ffdbe(0x161)]['visible']!==_0x4ed40a['visible'])[_0x3ffdbe(0x14a)](_0x500bbd=>({'stage':_0x3ffdbe(0x190),'method':_0x3ffdbe(0x17d),'path':_0x3ffdbe(0x159),'body':{'appCode':_0x475e1a[_0x3ffdbe(0x1a5)],'id':_0x500bbd['id'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x4c323d=mutationResult({'operation':_0x3ffdbe(0x1c6),'selector':{'menuIds':_0x4ed40a[_0x3ffdbe(0x169)],'paths':_0x4ed40a[_0x3ffdbe(0x1b3)]},'before':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0xad7fcc=>({'id':_0xad7fcc['id'],'path':_0xad7fcc[_0x3ffdbe(0x17b)],'visible':_0xad7fcc[_0x3ffdbe(0x166)]}))},'after':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0x3f90e9=>({'id':_0x3f90e9['id'],'path':_0x3f90e9['path'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}))},'dryRun':_0x143b38,'backend':[...BACKEND],'plannedActions':_0x3b158c,'snapshotHash':_0x4602de[_0x3ffdbe(0x153)],'warnings':_0x3b158c[_0x3ffdbe(0x18b)]===0x0?[_0x3ffdbe(0x151)]:[]});return{'plan':{..._0x4c323d,'requestedVisible':_0x4ed40a['visible'],'targets':_0x42e4f4},'beforeById':new Map(_0x558512['map'](_0x583210=>[_0x583210['id'],_0x583210]))};}function a191_0x4f71(_0x1bab6c,_0x138bd8){_0x1bab6c=_0x1bab6c-0x14a;const _0x34015d=a191_0x3401();let _0x4f7190=_0x34015d[_0x1bab6c];return _0x4f7190;}function selectTargets(_0x3a798f,_0x536c38,_0x7cfca2){const _0x6df624=a191_0x13f24b,_0x461e57=new Map(_0x3a798f[_0x6df624(0x14a)](_0x4f3179=>[_0x4f3179['id'],_0x4f3179])),_0x21037d=new Map(),_0x2d38ca=_0x536c38[_0x6df624(0x185)](_0x111cf9=>!_0x461e57['has'](_0x111cf9));if(_0x2d38ca['length']>0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x1c1)+_0x2d38ca[_0x6df624(0x18c)](',\x20')+'.',_0x6df624(0x1bc));for(const _0x2886b4 of _0x536c38){_0x21037d['set'](_0x2886b4,_0x461e57[_0x6df624(0x150)](_0x2886b4));}for(const _0x53e51c of _0x7cfca2){const _0x1cb03c=_0x3a798f[_0x6df624(0x185)](_0x3e34bf=>_0x3e34bf['path']===_0x53e51c);if(_0x1cb03c['length']===0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x15f)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x1cb03c[_0x6df624(0x18b)]>0x1)throw menuError('menu_selector_ambiguous',_0x6df624(0x16b)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.',_0x6df624(0x154)+_0x1cb03c[_0x6df624(0x14a)](_0x4c99cc=>_0x4c99cc['id'])[_0x6df624(0x18c)](',\x20')+'.');const _0x5eb279=_0x1cb03c[0x0];_0x21037d[_0x6df624(0x194)](_0x5eb279['id'],_0x5eb279);}return[..._0x21037d[_0x6df624(0x155)]()];}function parseMenuIds(_0x3263c0){const _0x392259=a191_0x13f24b,_0x1e138b=parseCsv(_0x3263c0),_0x20ca4d=_0x1e138b[_0x392259(0x14a)](Number);if(_0x20ca4d[_0x392259(0x14f)](_0x292a23=>!Number['isSafeInteger'](_0x292a23)||_0x292a23<=0x0))throw CliErrors[_0x392259(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x20ca4d)];}function parseCsv(_0x145c20){const _0x10aec4=a191_0x13f24b;return[...new Set(_0x145c20[_0x10aec4(0x1c5)](',')[_0x10aec4(0x14a)](_0x1c665e=>_0x1c665e['trim']())[_0x10aec4(0x185)](Boolean))];}function parseBooleanFlag(_0x29cdb9,_0x1cf487,_0x3ce0f7){const _0x28cdf8=a191_0x13f24b;if(!hasFlag(_0x29cdb9,_0x1cf487)){if(_0x3ce0f7)throw CliErrors[_0x28cdf8(0x164)](_0x1cf487);return undefined;}const _0x1fba93=_0x29cdb9['rawFlags'][_0x1cf487];if(_0x1fba93===!![]||_0x1fba93===![])return _0x1fba93;if(_0x1fba93===_0x28cdf8(0x15d))return!![];if(_0x1fba93==='false')return![];throw CliErrors[_0x28cdf8(0x16a)]('--'+_0x1cf487+_0x28cdf8(0x1a9));}function verifyVisibilityUpdate(_0x4b9ce6,_0x2d5da7,_0x53eedd){const _0x27f823=a191_0x13f24b;assertVerified(!!_0x2d5da7,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x19f)),assertVerified(_0x2d5da7[_0x27f823(0x166)]===_0x53eedd,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x187));const _0x34896a=[['id',_0x2d5da7['id'],_0x4b9ce6['id']],['parentId',_0x2d5da7['parentId'],_0x4b9ce6[_0x27f823(0x186)]],[_0x27f823(0x1a6),_0x2d5da7[_0x27f823(0x1a6)],_0x4b9ce6[_0x27f823(0x1a6)]],[_0x27f823(0x16c),_0x2d5da7[_0x27f823(0x16c)],_0x4b9ce6[_0x27f823(0x16c)]],[_0x27f823(0x17b),_0x2d5da7[_0x27f823(0x17b)],_0x4b9ce6['path']],[_0x27f823(0x157),_0x2d5da7['url'],_0x4b9ce6[_0x27f823(0x157)]],[_0x27f823(0x18d),_0x2d5da7[_0x27f823(0x18d)],_0x4b9ce6['type']],[_0x27f823(0x16f),_0x2d5da7['sort'],_0x4b9ce6['sort']],[_0x27f823(0x1a2),_0x2d5da7[_0x27f823(0x1a2)],_0x4b9ce6[_0x27f823(0x1a2)]],['resourcesValid',_0x2d5da7[_0x27f823(0x1b5)],_0x4b9ce6[_0x27f823(0x1b5)]],[_0x27f823(0x19b),_0x2d5da7[_0x27f823(0x19b)],_0x4b9ce6[_0x27f823(0x19b)]],[_0x27f823(0x17c),_0x2d5da7[_0x27f823(0x17c)],_0x4b9ce6[_0x27f823(0x17c)]],[_0x27f823(0x1a3),_0x2d5da7[_0x27f823(0x1a3)],_0x4b9ce6[_0x27f823(0x1a3)]],['pageType',_0x2d5da7['pageType'],_0x4b9ce6[_0x27f823(0x1be)]],['modelType',_0x2d5da7[_0x27f823(0x15a)],_0x4b9ce6[_0x27f823(0x15a)]],[_0x27f823(0x1b7),_0x2d5da7[_0x27f823(0x1b7)],_0x4b9ce6[_0x27f823(0x1b7)]],[_0x27f823(0x16e),_0x2d5da7[_0x27f823(0x16e)],_0x4b9ce6[_0x27f823(0x16e)]]];for(const [_0x1b0980,_0xcd3d50,_0x41b588]of _0x34896a){assertVerified(sameValue(_0xcd3d50,_0x41b588),_0x27f823(0x1ad)+_0x4b9ce6['id']+'\x20'+_0x1b0980+'\x20changed\x20unexpectedly.');}}function sameValue(_0x497a1d,_0x358ef0){const _0x30ce79=a191_0x13f24b;if(Array[_0x30ce79(0x16d)](_0x497a1d)||Array[_0x30ce79(0x16d)](_0x358ef0))return JSON[_0x30ce79(0x1a0)](_0x497a1d)===JSON['stringify'](_0x358ef0);return _0x497a1d===_0x358ef0;}
1
+ const a191_0x1f9834=a191_0x277d;(function(_0x1d831b,_0x1bad32){const _0x36de3a=a191_0x277d,_0x3b1088=_0x1d831b();while(!![]){try{const _0xe5614=parseInt(_0x36de3a(0x1f0))/0x1+parseInt(_0x36de3a(0x229))/0x2+-parseInt(_0x36de3a(0x24c))/0x3*(parseInt(_0x36de3a(0x1f5))/0x4)+parseInt(_0x36de3a(0x201))/0x5*(-parseInt(_0x36de3a(0x253))/0x6)+parseInt(_0x36de3a(0x22c))/0x7+-parseInt(_0x36de3a(0x1f3))/0x8+parseInt(_0x36de3a(0x23c))/0x9;if(_0xe5614===_0x1bad32)break;else _0x3b1088['push'](_0x3b1088['shift']());}catch(_0x208cd7){_0x3b1088['push'](_0x3b1088['shift']());}}}(a191_0x9265,0x92a6e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a191_0x9265(){const _0x17111e=['type','isArray','Final\x20menu\x20visibility\x20readback\x20failed.','resourcesValid','values','visible','menuIds','296972izFijQ','map','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','4067832JqUkCV','menu_selector_not_found','4hkVNoY','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','path','plan','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20','before','\x20skipped,\x20','\x20failed.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','70OQGtCG','\x20updated,\x20','code','modelType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','beforeById','Menu\x20visibility\x20update\x20completed:\x20','updated','menu','str','push','targets','num','string','\x20menu(s);\x20skipped\x20','update-menu-visibility','sort','Selected\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','expectVisible','Response\x20was\x20lost\x20and\x20menu\x20','validation','rawFlags','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','get','filter','set','expected-count','join','stringify','plannedActions','pageType','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','/smartapi/menu/update','\x20menu(s),\x20expected\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','url','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','menus','1209814ntkMSL','warnings','failed','7302687PZQBrZ','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20unchanged\x20menu(s).','cookie','label','\x20changed\x20unexpectedly.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','paths','split','resources','menu_verification_failed','depth','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','datasetId','update-recovery','flagMissing','10238517IPqCcF','parentId','isSafeInteger','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','appCode','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedVisible','menu_state_drift','message','boolean','verification','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','pageId','body','has','childrenIds','3259164nSfSkW','childrenCount','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','Requested\x20menu\x20visibility','byId','hash','380220FVkTMk','update','expectedCount','expect-visible','update\x20menu\x20visibility','length','Menu\x20path\x20selector\x20not\x20found:\x20','recovered','menu\x20list','true','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','datasetCode','menu_expected_count_mismatch','number','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'];a191_0x9265=function(){return _0x17111e;};return a191_0x9265();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x1f9834(0x1f7),'path':a191_0x1f9834(0x223)}];export const menuVisibilityUpdate={'service':a191_0x1f9834(0x209),'command':'visibility-update','description':a191_0x1f9834(0x1fa),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x1f9834(0x24f),'type':a191_0x1f9834(0x20e),'description':a191_0x1f9834(0x1f2)},{'name':'paths','type':a191_0x1f9834(0x20e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x1f9834(0x1ee),'type':a191_0x1f9834(0x245),'required':!![],'description':a191_0x1f9834(0x250)},{'name':a191_0x1f9834(0x256),'type':a191_0x1f9834(0x245),'description':a191_0x1f9834(0x200)},{'name':a191_0x1f9834(0x21c),'type':a191_0x1f9834(0x260),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xe94008){parseInput(_0xe94008);},async 'dryRun'(_0x4c44e5){const _0x49e60e=a191_0x1f9834,_0x45865e=await buildPlan(_0x4c44e5,!![]),_0x2e3b8a=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x258)]??0x0,_0x187547=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x20c)]['length']-_0x2e3b8a;return menuDryRunResult(_0x45865e[_0x49e60e(0x1f9)],{'method':_0x49e60e(0x1f7),'url':_0x49e60e(0x223),'body':{'updates':_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x1f1)](_0x34f710=>_0x34f710[_0x49e60e(0x249)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x2e3b8a+'\x20menu(s);\x20skip\x20'+_0x187547+_0x49e60e(0x22e)});},async 'execute'(_0x5e63df){const _0x24e40b=a191_0x1f9834,_0x3e5981=await buildPlan(_0x5e63df,![]);await recheckMutationSnapshot(_0x5e63df,_0x3e5981[_0x24e40b(0x1f9)],_0x24e40b(0x257));const _0x2cff58=[],_0x259c05=[],_0xb54b65=[];for(const _0x277678 of _0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)]){if(_0x277678[_0x24e40b(0x1fd)][_0x24e40b(0x1ee)]===_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]){_0x2cff58[_0x24e40b(0x20b)]({'id':_0x277678['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e63df[_0x24e40b(0x240)],_0x5e63df[_0x24e40b(0x22f)],{'id':_0x277678['id'],'visible':_0x3e5981[_0x24e40b(0x1f9)]['requestedVisible']}),_0x2cff58['push']({'id':_0x277678['id'],'updated':!![],'skipped':![]});}catch(_0x51a18b){const _0x56b2e7=mapMenuApiError(_0x51a18b,'update\x20visibility\x20for',_0x277678['id']);if(isMenuResponseLoss(_0x51a18b)&&_0x56b2e7[_0x24e40b(0x203)]!=='menu_permission_denied'){_0xb54b65[_0x24e40b(0x20b)](_0x277678['id']);continue;}_0x259c05[_0x24e40b(0x20b)]({'id':_0x277678['id'],'stage':_0x24e40b(0x254),'code':_0x56b2e7[_0x24e40b(0x203)],'message':_0x56b2e7[_0x24e40b(0x244)]});}}let _0x21f812;try{_0x21f812=await fetchMenuSnapshot(_0x5e63df[_0x24e40b(0x240)],_0x5e63df['cookie']);}catch(_0x113eee){const _0xa33811=describeMenuErrorCause(_0x113eee,'verify\x20menu\x20visibility\x20update'),_0x11c02c=_0xb54b65[_0x24e40b(0x1f1)](_0x58b3b8=>({'id':_0x58b3b8,'stage':'update-recovery','code':_0x24e40b(0x236),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x58b3b8+_0x24e40b(0x241),'requestedStateConfirmed':![],'recovered':![]})),_0x2f7964={'stage':_0x24e40b(0x246),'code':_0x24e40b(0x236),'message':_0x24e40b(0x1eb),'targetIds':_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)][_0x24e40b(0x1f1)](_0x571042=>_0x571042['id']),'requestedStateConfirmed':![],..._0xa33811};throw menuFailure(asVerificationError(_0x113eee,_0x24e40b(0x261)),_0x3e5981['plan'],{'stage':_0x24e40b(0x246),'succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x11c02c,_0x2f7964],'warnings':[_0x24e40b(0x221)],'verification':{'status':_0x24e40b(0x22b),'recoveredCount':0x0,'lookupCommand':_0x24e40b(0x24e)}});}const _0x5a14e8=[];for(const _0x3304ac of _0x2cff58){const _0x3bcc9b=Number(_0x3304ac['id']),_0x2625c6=_0x3e5981[_0x24e40b(0x206)]['get'](_0x3bcc9b),_0x1e5a95=_0x21f812[_0x24e40b(0x251)]['get'](_0x3bcc9b);try{verifyVisibilityUpdate(_0x2625c6,_0x1e5a95,_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]);}catch(_0x3ee1b8){const _0x571e28=asVerificationError(_0x3ee1b8,_0x24e40b(0x1fc)+_0x3bcc9b+_0x24e40b(0x232));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x3bcc9b,'stage':_0x24e40b(0x246),'code':_0x571e28[_0x24e40b(0x203)],'message':_0x571e28[_0x24e40b(0x244)],'requestedStateConfirmed':![]});}}for(const _0x53e5dc of _0xb54b65){const _0x2241b4=_0x3e5981[_0x24e40b(0x206)][_0x24e40b(0x219)](_0x53e5dc),_0x44770d=_0x21f812[_0x24e40b(0x251)]['get'](_0x53e5dc);try{verifyVisibilityUpdate(_0x2241b4,_0x44770d,_0x3e5981['plan'][_0x24e40b(0x242)]),_0x2cff58['push']({'id':_0x53e5dc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x284756){const _0x3cd7c6=asVerificationError(_0x284756,_0x24e40b(0x215)+_0x53e5dc+_0x24e40b(0x22d));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x53e5dc,'stage':_0x24e40b(0x23a),'code':_0x3cd7c6['code'],'message':_0x3cd7c6[_0x24e40b(0x244)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5a14e8[_0x24e40b(0x258)]>0x0){const _0x3418a6=_0x5a14e8[_0x24e40b(0x1f1)](_0x8048fb=>Number(_0x8048fb['id'])),_0x72d303=_0x2cff58[_0x24e40b(0x21a)](_0x56cc5b=>_0x56cc5b[_0x24e40b(0x25a)]===!![])[_0x24e40b(0x258)],_0x2e6ae4=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3418a6['join'](',\x20')+'.',_0x24e40b(0x1fb));throw menuFailure(_0x2e6ae4,_0x3e5981[_0x24e40b(0x1f9)],{'stage':'verification','succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x5a14e8],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x24e40b(0x22b),..._0x3418a6[_0x24e40b(0x258)]===0x1?{'targetId':_0x3418a6[0x0]}:{'targetIds':_0x3418a6},'recoveredCount':_0x72d303,'lookupCommand':_0x24e40b(0x24e)}});}const _0x2dd25a=_0x2cff58[_0x24e40b(0x21a)](_0x1a4173=>_0x1a4173[_0x24e40b(0x208)]===!![])[_0x24e40b(0x258)],_0x2012b5=_0x2cff58[_0x24e40b(0x258)]-_0x2dd25a,_0x5f011c={..._0x3e5981[_0x24e40b(0x1f9)],'succeeded':_0x2cff58,'failed':_0x259c05,'warnings':_0x259c05[_0x24e40b(0x258)]>0x0?[..._0x3e5981['plan'][_0x24e40b(0x22a)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x22a)],'verification':{'checkedBy':_0x24e40b(0x25b),'snapshotHash':_0x21f812[_0x24e40b(0x252)],'matchesRequestedState':_0x259c05[_0x24e40b(0x258)]===0x0,'recoveredCount':_0xb54b65[_0x24e40b(0x258)]}};return{'ok':_0x259c05[_0x24e40b(0x258)]===0x0,'data':_0x5f011c,'message':_0x259c05['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x2dd25a+_0x24e40b(0x20f)+_0x2012b5+_0x24e40b(0x22e):_0x24e40b(0x207)+_0x2dd25a+_0x24e40b(0x202)+_0x2012b5+_0x24e40b(0x1fe)+_0x259c05['length']+_0x24e40b(0x1ff)};}};function parseInput(_0x58a911){const _0x45d9ce=a191_0x1f9834,_0x19128f=parseMenuIds(_0x58a911[_0x45d9ce(0x20a)]('menu-ids')),_0x507f4a=parseCsv(_0x58a911['str'](_0x45d9ce(0x233)));if(_0x19128f[_0x45d9ce(0x258)]===0x0&&_0x507f4a[_0x45d9ce(0x258)]===0x0)throw CliErrors[_0x45d9ce(0x216)](_0x45d9ce(0x213));const _0x3ed17b=parseBooleanFlag(_0x58a911,'visible',!![]),_0x2d2002=parseBooleanFlag(_0x58a911,_0x45d9ce(0x256),![]);let _0x26a327;if(hasFlag(_0x58a911,_0x45d9ce(0x21c))){_0x26a327=_0x58a911[_0x45d9ce(0x20d)]('expected-count');if(!Number['isSafeInteger'](_0x26a327)||_0x26a327<0x0)throw CliErrors['validation'](_0x45d9ce(0x205));}return{'menuIds':_0x19128f,'paths':_0x507f4a,'visible':_0x3ed17b,'expectVisible':_0x2d2002,'expectedCount':_0x26a327};}async function buildPlan(_0x349fb2,_0x445eb9){const _0x38c231=a191_0x1f9834,_0x3c691c=parseInput(_0x349fb2),_0x3e81ef=await fetchMutationSnapshot(_0x349fb2,_0x38c231(0x257)),_0x4c099b=selectTargets(_0x3e81ef[_0x38c231(0x228)],_0x3c691c['menuIds'],_0x3c691c[_0x38c231(0x233)]);if(_0x3c691c['expectedCount']!==undefined&&_0x4c099b[_0x38c231(0x258)]!==_0x3c691c[_0x38c231(0x255)])throw menuError(_0x38c231(0x25f),_0x38c231(0x212)+_0x4c099b[_0x38c231(0x258)]+_0x38c231(0x224)+_0x3c691c[_0x38c231(0x255)]+'.',_0x38c231(0x227));if(_0x3c691c[_0x38c231(0x214)]!==undefined){const _0x55f1f6=_0x4c099b[_0x38c231(0x21a)](_0x3c9430=>_0x3c9430[_0x38c231(0x1ee)]!==_0x3c691c['expectVisible']);if(_0x55f1f6[_0x38c231(0x258)]>0x0)throw menuError(_0x38c231(0x243),_0x38c231(0x25d)+_0x55f1f6[_0x38c231(0x1f1)](_0x394c6e=>_0x394c6e['id'])[_0x38c231(0x21d)](',\x20')+'.',_0x38c231(0x225));}const _0x80f8e6=_0x4c099b[_0x38c231(0x1f1)](_0xd0f184=>({'id':_0xd0f184['id'],'label':_0xd0f184[_0x38c231(0x230)],'path':_0xd0f184[_0x38c231(0x1f8)],'before':{'visible':_0xd0f184['visible']},'after':{'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x48f7ab=_0x80f8e6[_0x38c231(0x21a)](_0x34fc20=>_0x34fc20['before'][_0x38c231(0x1ee)]!==_0x3c691c[_0x38c231(0x1ee)])['map'](_0x47de4a=>({'stage':_0x38c231(0x210),'method':_0x38c231(0x1f7),'path':_0x38c231(0x223),'body':{'appCode':_0x349fb2[_0x38c231(0x240)],'id':_0x47de4a['id'],'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x5c0759=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3c691c[_0x38c231(0x1ef)],'paths':_0x3c691c[_0x38c231(0x233)]},'before':{'menus':_0x4c099b[_0x38c231(0x1f1)](_0x4c2afd=>({'id':_0x4c2afd['id'],'path':_0x4c2afd[_0x38c231(0x1f8)],'visible':_0x4c2afd[_0x38c231(0x1ee)]}))},'after':{'menus':_0x4c099b['map'](_0x5c6354=>({'id':_0x5c6354['id'],'path':_0x5c6354[_0x38c231(0x1f8)],'visible':_0x3c691c[_0x38c231(0x1ee)]}))},'dryRun':_0x445eb9,'backend':[...BACKEND],'plannedActions':_0x48f7ab,'snapshotHash':_0x3e81ef[_0x38c231(0x252)],'warnings':_0x48f7ab[_0x38c231(0x258)]===0x0?[_0x38c231(0x238)]:[]});return{'plan':{..._0x5c0759,'requestedVisible':_0x3c691c[_0x38c231(0x1ee)],'targets':_0x80f8e6},'beforeById':new Map(_0x4c099b[_0x38c231(0x1f1)](_0x13d0ce=>[_0x13d0ce['id'],_0x13d0ce]))};}function a191_0x277d(_0x5a5286,_0x2abb65){_0x5a5286=_0x5a5286-0x1e9;const _0x926569=a191_0x9265();let _0x277d54=_0x926569[_0x5a5286];return _0x277d54;}function selectTargets(_0x12bb9b,_0x158b20,_0x5cebc9){const _0x171ee8=a191_0x1f9834,_0xc795f0=new Map(_0x12bb9b['map'](_0x553ebb=>[_0x553ebb['id'],_0x553ebb])),_0x93ad7d=new Map(),_0x118a06=_0x158b20[_0x171ee8(0x21a)](_0x50d347=>!_0xc795f0[_0x171ee8(0x24a)](_0x50d347));if(_0x118a06[_0x171ee8(0x258)]>0x0)throw menuError(_0x171ee8(0x1f4),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x118a06['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0xd90954 of _0x158b20){_0x93ad7d[_0x171ee8(0x21b)](_0xd90954,_0xc795f0['get'](_0xd90954));}for(const _0x2f5cfd of _0x5cebc9){const _0x4b2472=_0x12bb9b[_0x171ee8(0x21a)](_0x5a30d2=>_0x5a30d2[_0x171ee8(0x1f8)]===_0x2f5cfd);if(_0x4b2472[_0x171ee8(0x258)]===0x0)throw menuError('menu_selector_not_found',_0x171ee8(0x259)+JSON['stringify'](_0x2f5cfd)+'.',_0x171ee8(0x247));if(_0x4b2472['length']>0x1)throw menuError('menu_selector_ambiguous',_0x171ee8(0x218)+JSON[_0x171ee8(0x21e)](_0x2f5cfd)+'.',_0x171ee8(0x222)+_0x4b2472['map'](_0x20aaf9=>_0x20aaf9['id'])[_0x171ee8(0x21d)](',\x20')+'.');const _0x5ae648=_0x4b2472[0x0];_0x93ad7d['set'](_0x5ae648['id'],_0x5ae648);}return[..._0x93ad7d[_0x171ee8(0x1ed)]()];}function parseMenuIds(_0x109c87){const _0x78d233=a191_0x1f9834,_0xa45bf9=parseCsv(_0x109c87),_0x154ad6=_0xa45bf9[_0x78d233(0x1f1)](Number);if(_0x154ad6['some'](_0x199f96=>!Number[_0x78d233(0x23e)](_0x199f96)||_0x199f96<=0x0))throw CliErrors[_0x78d233(0x216)](_0x78d233(0x1f6));return[...new Set(_0x154ad6)];}function parseCsv(_0x15d93e){const _0x2fa172=a191_0x1f9834;return[...new Set(_0x15d93e[_0x2fa172(0x234)](',')['map'](_0x7ce362=>_0x7ce362['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x2a215c,_0x20183e,_0x3f7ca2){const _0x1f03c2=a191_0x1f9834;if(!hasFlag(_0x2a215c,_0x20183e)){if(_0x3f7ca2)throw CliErrors[_0x1f03c2(0x23b)](_0x20183e);return undefined;}const _0x3eace8=_0x2a215c[_0x1f03c2(0x217)][_0x20183e];if(_0x3eace8===!![]||_0x3eace8===![])return _0x3eace8;if(_0x3eace8===_0x1f03c2(0x25c))return!![];if(_0x3eace8==='false')return![];throw CliErrors[_0x1f03c2(0x216)]('--'+_0x20183e+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x51a590,_0xe25d64,_0x4e35fe){const _0x53431f=a191_0x1f9834;assertVerified(!!_0xe25d64,_0x53431f(0x1fc)+_0x51a590['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0xe25d64[_0x53431f(0x1ee)]===_0x4e35fe,'Menu\x20'+_0x51a590['id']+_0x53431f(0x23f));const _0x4392c6=[['id',_0xe25d64['id'],_0x51a590['id']],[_0x53431f(0x23d),_0xe25d64['parentId'],_0x51a590['parentId']],['depth',_0xe25d64[_0x53431f(0x237)],_0x51a590[_0x53431f(0x237)]],[_0x53431f(0x230),_0xe25d64[_0x53431f(0x230)],_0x51a590['label']],[_0x53431f(0x1f8),_0xe25d64[_0x53431f(0x1f8)],_0x51a590[_0x53431f(0x1f8)]],['url',_0xe25d64[_0x53431f(0x226)],_0x51a590[_0x53431f(0x226)]],[_0x53431f(0x1e9),_0xe25d64[_0x53431f(0x1e9)],_0x51a590[_0x53431f(0x1e9)]],['sort',_0xe25d64['sort'],_0x51a590[_0x53431f(0x211)]],['resources',_0xe25d64[_0x53431f(0x235)],_0x51a590[_0x53431f(0x235)]],['resourcesValid',_0xe25d64[_0x53431f(0x1ec)],_0x51a590[_0x53431f(0x1ec)]],[_0x53431f(0x24b),_0xe25d64[_0x53431f(0x24b)],_0x51a590[_0x53431f(0x24b)]],[_0x53431f(0x24d),_0xe25d64[_0x53431f(0x24d)],_0x51a590[_0x53431f(0x24d)]],[_0x53431f(0x248),_0xe25d64[_0x53431f(0x248)],_0x51a590['pageId']],[_0x53431f(0x220),_0xe25d64['pageType'],_0x51a590[_0x53431f(0x220)]],[_0x53431f(0x204),_0xe25d64['modelType'],_0x51a590[_0x53431f(0x204)]],[_0x53431f(0x239),_0xe25d64['datasetId'],_0x51a590[_0x53431f(0x239)]],[_0x53431f(0x25e),_0xe25d64['datasetCode'],_0x51a590[_0x53431f(0x25e)]]];for(const [_0x18e20a,_0x19e288,_0x57820d]of _0x4392c6){assertVerified(sameValue(_0x19e288,_0x57820d),_0x53431f(0x1fc)+_0x51a590['id']+'\x20'+_0x18e20a+_0x53431f(0x231));}}function sameValue(_0x2497d2,_0x271aec){const _0x4ff59c=a191_0x1f9834;if(Array[_0x4ff59c(0x1ea)](_0x2497d2)||Array[_0x4ff59c(0x1ea)](_0x271aec))return JSON[_0x4ff59c(0x21e)](_0x2497d2)===JSON[_0x4ff59c(0x21e)](_0x271aec);return _0x2497d2===_0x271aec;}
@@ -1 +1 @@
1
- const a192_0x10da7f=a192_0x27f2;(function(_0x5c54aa,_0x35efb9){const _0x38dea9=a192_0x27f2,_0x14ae03=_0x5c54aa();while(!![]){try{const _0x397365=parseInt(_0x38dea9(0x1d4))/0x1*(-parseInt(_0x38dea9(0x1ce))/0x2)+parseInt(_0x38dea9(0x1c8))/0x3+parseInt(_0x38dea9(0x1c2))/0x4*(-parseInt(_0x38dea9(0x1db))/0x5)+parseInt(_0x38dea9(0x1d1))/0x6+-parseInt(_0x38dea9(0x1dd))/0x7+-parseInt(_0x38dea9(0x1ba))/0x8*(parseInt(_0x38dea9(0x1d6))/0x9)+parseInt(_0x38dea9(0x1c0))/0xa;if(_0x397365===_0x35efb9)break;else _0x14ae03['push'](_0x14ae03['shift']());}catch(_0x327d30){_0x14ae03['push'](_0x14ae03['shift']());}}}(a192_0x113a,0xc2728));function a192_0x113a(){const _0x2d46fa=['configCode','9512286VXhNls','appCode','config-create','728uOVctP','Inspect\x20with\x20','Created\x20notification\x20config\x20','notification','verified','verification','32067480XojByP','configName','265916UoyaOZ','notification_config_create_outcome_unknown','channelType',';\x20do\x20not\x20resubmit\x20automatically.','input','POST','1973787qhvHGO','/notification/channel-config/create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','endpointUrl','mutation','document','2776718fqyfcf','isSafeInteger',';\x20do\x20not\x20resubmit.','8145816boVPAG','description','write','1FjGFYm','readTimeout','54243CskJmN','create','planned','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','85EIACYU'];a192_0x113a=function(){return _0x2d46fa;};return a192_0x113a();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x10da7f(0x1c9);function a192_0x27f2(_0x90a9c1,_0x3b9c6){_0x90a9c1=_0x90a9c1-0x1b8;const _0x113ae6=a192_0x113a();let _0x27f2dc=_0x113ae6[_0x90a9c1];return _0x27f2dc;}async function prepareCreate(_0x2eaa24){const _0x5b5726=a192_0x10da7f,_0x5efcf1=await readNotificationDocument(_0x2eaa24,_0x5b5726(0x1d7)),_0x2fcb55=createMutationInput(_0x2eaa24[_0x5b5726(0x1b8)],_0x5efcf1);return{'document':_0x5efcf1,'input':_0x2fcb55,'planned':projectNotificationConfig({'appCode':_0x2eaa24[_0x5b5726(0x1b8)],'configName':_0x5efcf1[_0x5b5726(0x1c1)],'channelType':_0x5efcf1[_0x5b5726(0x1c4)],'endpointUrl':_0x5efcf1[_0x5b5726(0x1cb)],'channelConfig':_0x5efcf1['channelConfig'],'description':_0x5efcf1[_0x5b5726(0x1d2)],'connectTimeout':_0x5efcf1['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5efcf1[_0x5b5726(0x1d5)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x10da7f(0x1bd),'command':a192_0x10da7f(0x1b9),'description':a192_0x10da7f(0x1da),'risk':a192_0x10da7f(0x1d3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x87bbd3){assertSingleNotificationSource(_0x87bbd3);},async 'dryRun'(_0x5e0251){const _0x4327c8=a192_0x10da7f,_0xa83e27=await prepareCreate(_0x5e0251),_0x492daf=notificationLookupCommand(_0x5e0251['appCode'],_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c4)]);return asDryRunResult({'operation':_0x4327c8(0x1d7),'selector':{'appCode':_0x5e0251['appCode'],'configName':_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c1)],'channelType':_0xa83e27['document'][_0x4327c8(0x1c4)]},'before':null,'after':_0xa83e27[_0x4327c8(0x1d8)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4327c8(0x1d8),'lookupCommand':_0x492daf}},{'method':_0x4327c8(0x1c7),'url':CREATE_PATH});},async 'execute'(_0x5ecfcc){const _0x308f89=a192_0x10da7f,_0x4931cb=await prepareCreate(_0x5ecfcc),_0x3ba27d=notificationLookupCommand(_0x5ecfcc['appCode'],_0x4931cb[_0x308f89(0x1cd)][_0x308f89(0x1c4)]);let _0x139dff;try{_0x139dff=await createNotificationChannelConfig(_0x4931cb[_0x308f89(0x1c6)]);}catch(_0x53647c){if(isPlatformTransportFailure(_0x53647c))throw notificationError(_0x308f89(0x1c3),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x3ba27d+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1cc),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1ca));}if(!Number[_0x308f89(0x1cf)](_0x139dff)||_0x139dff<=0x0)throw notificationError(_0x308f89(0x1c3),_0x308f89(0x1d9),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1d0));let _0x5d5000;try{const _0x299bc7=await getNotificationChannelConfig(_0x139dff,_0x5ecfcc['appCode']);_0x5d5000=normalizeExactNotificationConfig(_0x299bc7,_0x139dff,_0x5ecfcc[_0x308f89(0x1b8)]);}catch{throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1bf),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1c5));}return{'ok':!![],'data':{'operation':_0x308f89(0x1d7),'selector':{'appCode':_0x5d5000[_0x308f89(0x1b8)],'id':_0x5d5000['id'],'configCode':_0x5d5000[_0x308f89(0x1dc)],'configName':_0x5d5000['configName'],'channelType':_0x5d5000[_0x308f89(0x1c4)]},'before':null,'after':projectNotificationConfig(_0x5d5000),'dryRun':![],'backend':{'method':_0x308f89(0x1c7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x308f89(0x1be),'lookupCommand':_0x3ba27d}},'message':_0x308f89(0x1bc)+_0x5d5000['id']};}};
1
+ const a192_0x4a274a=a192_0x4991;(function(_0x561f4d,_0xf9dd21){const _0x2df071=a192_0x4991,_0x5cf384=_0x561f4d();while(!![]){try{const _0x402329=parseInt(_0x2df071(0x15f))/0x1*(parseInt(_0x2df071(0x14d))/0x2)+-parseInt(_0x2df071(0x147))/0x3+parseInt(_0x2df071(0x158))/0x4*(parseInt(_0x2df071(0x14a))/0x5)+-parseInt(_0x2df071(0x152))/0x6+-parseInt(_0x2df071(0x161))/0x7+parseInt(_0x2df071(0x149))/0x8+-parseInt(_0x2df071(0x14e))/0x9*(-parseInt(_0x2df071(0x15e))/0xa);if(_0x402329===_0xf9dd21)break;else _0x5cf384['push'](_0x5cf384['shift']());}catch(_0x1307fe){_0x5cf384['push'](_0x5cf384['shift']());}}}(a192_0x1e16,0x75a94));function a192_0x1e16(){const _0x5cdccd=['4777434KqToZg','readTimeout','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20','channelConfig','connectTimeout','97408KSTltH','appCode','verification','configName','channelType','planned','30ErBBRT','234659XKbVAc',';\x20do\x20not\x20resubmit\x20automatically.','4734464NXoPHE','endpointUrl','/notification/channel-config/create','configCode','create','POST',';\x20do\x20not\x20resubmit.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','write','2013231vdZvlZ','verified','885744GzJtTG','20MBIZrN','description','Created\x20notification\x20config\x20','4hkkfBy','5844492fXPiYs','notification_config_create_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','document'];a192_0x1e16=function(){return _0x5cdccd;};return a192_0x1e16();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a192_0x4991(_0x5dca52,_0x35d036){_0x5dca52=_0x5dca52-0x144;const _0x1e169a=a192_0x1e16();let _0x49912f=_0x1e169a[_0x5dca52];return _0x49912f;}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x4a274a(0x163);async function prepareCreate(_0x5af498){const _0x19807b=a192_0x4a274a,_0xbf0174=await readNotificationDocument(_0x5af498,_0x19807b(0x165)),_0x579eac=createMutationInput(_0x5af498[_0x19807b(0x159)],_0xbf0174);return{'document':_0xbf0174,'input':_0x579eac,'planned':projectNotificationConfig({'appCode':_0x5af498['appCode'],'configName':_0xbf0174['configName'],'channelType':_0xbf0174[_0x19807b(0x15c)],'endpointUrl':_0xbf0174[_0x19807b(0x162)],'channelConfig':_0xbf0174[_0x19807b(0x156)],'description':_0xbf0174[_0x19807b(0x14b)],'connectTimeout':_0xbf0174[_0x19807b(0x157)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xbf0174[_0x19807b(0x153)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':a192_0x4a274a(0x145),'risk':a192_0x4a274a(0x146),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x29cc81){assertSingleNotificationSource(_0x29cc81);},async 'dryRun'(_0x462138){const _0x2a33ca=a192_0x4a274a,_0x3837cb=await prepareCreate(_0x462138),_0x361d29=notificationLookupCommand(_0x462138[_0x2a33ca(0x159)],_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15c)]);return asDryRunResult({'operation':_0x2a33ca(0x165),'selector':{'appCode':_0x462138[_0x2a33ca(0x159)],'configName':_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15b)],'channelType':_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15c)]},'before':null,'after':_0x3837cb[_0x2a33ca(0x15d)],'dryRun':!![],'backend':{'method':_0x2a33ca(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2a33ca(0x15d),'lookupCommand':_0x361d29}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0xa131dd){const _0x36675d=a192_0x4a274a,_0x5e718b=await prepareCreate(_0xa131dd),_0x56a8b0=notificationLookupCommand(_0xa131dd[_0x36675d(0x159)],_0x5e718b[_0x36675d(0x151)][_0x36675d(0x15c)]);let _0x276366;try{_0x276366=await createNotificationChannelConfig(_0x5e718b['input']);}catch(_0x13de42){if(isPlatformTransportFailure(_0x13de42))throw notificationError(_0x36675d(0x14f),_0x36675d(0x154),'Inspect\x20with\x20'+_0x56a8b0+_0x36675d(0x144));throw safeApiFailure('create','mutation','Inspect\x20with\x20'+_0x56a8b0+_0x36675d(0x150));}if(!Number['isSafeInteger'](_0x276366)||_0x276366<=0x0)throw notificationError(_0x36675d(0x14f),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x36675d(0x155)+_0x56a8b0+';\x20do\x20not\x20resubmit.');let _0x37604a;try{const _0x5b4061=await getNotificationChannelConfig(_0x276366,_0xa131dd[_0x36675d(0x159)]);_0x37604a=normalizeExactNotificationConfig(_0x5b4061,_0x276366,_0xa131dd[_0x36675d(0x159)]);}catch{throw safeApiFailure('create',_0x36675d(0x15a),_0x36675d(0x155)+_0x56a8b0+_0x36675d(0x160));}return{'ok':!![],'data':{'operation':_0x36675d(0x165),'selector':{'appCode':_0x37604a[_0x36675d(0x159)],'id':_0x37604a['id'],'configCode':_0x37604a[_0x36675d(0x164)],'configName':_0x37604a[_0x36675d(0x15b)],'channelType':_0x37604a[_0x36675d(0x15c)]},'before':null,'after':projectNotificationConfig(_0x37604a),'dryRun':![],'backend':{'method':_0x36675d(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x36675d(0x148),'lookupCommand':_0x56a8b0}},'message':_0x36675d(0x14c)+_0x37604a['id']};}};
@@ -1 +1 @@
1
- const a193_0x10b049=a193_0x4957;(function(_0x118da7,_0x1f1a2b){const _0xf33a7b=a193_0x4957,_0x1d09c6=_0x118da7();while(!![]){try{const _0x383e1c=-parseInt(_0xf33a7b(0x100))/0x1+parseInt(_0xf33a7b(0xfa))/0x2*(parseInt(_0xf33a7b(0xff))/0x3)+-parseInt(_0xf33a7b(0xe5))/0x4*(-parseInt(_0xf33a7b(0xfd))/0x5)+parseInt(_0xf33a7b(0xed))/0x6*(parseInt(_0xf33a7b(0xee))/0x7)+-parseInt(_0xf33a7b(0xf4))/0x8*(-parseInt(_0xf33a7b(0xf7))/0x9)+-parseInt(_0xf33a7b(0xe9))/0xa*(parseInt(_0xf33a7b(0xfe))/0xb)+-parseInt(_0xf33a7b(0xfb))/0xc;if(_0x383e1c===_0x1f1a2b)break;else _0x1d09c6['push'](_0x1d09c6['shift']());}catch(_0x2ddd51){_0x1d09c6['push'](_0x1d09c6['shift']());}}}(a193_0x39a8,0xae654));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x4957(_0x951989,_0x13defa){_0x951989=_0x951989-0xdd;const _0x39a817=a193_0x39a8();let _0x495710=_0x39a817[_0x951989];return _0x495710;}function a193_0x39a8(){const _0x365210=['6PEpIfW','12169260iiJSxb','before','85HgvJha','22fPCbTt','949128FmWcUd','574319lrQhYb','Deleted\x20notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','\x20delete\x20could\x20not\x20be\x20verified.',';\x20do\x20not\x20resubmit\x20automatically.','POST','appCode','unshift','planned','11524DQpDZg','channelType','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1452080QNKryu','Inspect\x20with\x20','verified','notification_config_delete_outcome_unknown','68118RRPxOp','371vGeBEi','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','notification_config_delete_verification_unavailable','/notification/channel-config/delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','80GvvUqt','delete','\x20remains\x20present\x20after\x20delete.','894015cQWHTQ','notification_config_delete_verification_failed','Notification\x20config\x20'];a193_0x39a8=function(){return _0x365210;};return a193_0x39a8();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x10b049(0xf2),REFERENCE_WARNING=a193_0x10b049(0xf3);async function prepareDelete(_0x4a2080){const _0x5ddf61=a193_0x10b049,_0x510a35=readNotificationId(_0x4a2080),_0x42234a=await requireExactNotificationConfig(_0x4a2080[_0x5ddf61(0xe2)],_0x510a35,_0x5ddf61(0xf5));return{'id':_0x510a35,'before':_0x42234a};}export const notificationConfigDelete={'service':a193_0x10b049(0xe7),'command':a193_0x10b049(0xf0),'description':a193_0x10b049(0xef),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x354edb){readNotificationId(_0x354edb),requireNotificationExplicitYes(_0x354edb);},async 'dryRun'(_0x5ac8b7){const _0x117496=a193_0x10b049,_0x11d28a=await prepareDelete(_0x5ac8b7),_0x237b5b=notificationLookupCommand(_0x5ac8b7[_0x117496(0xe2)],_0x11d28a[_0x117496(0xfc)][_0x117496(0xe6)]);return asDryRunResult({'operation':_0x117496(0xf5),'selector':notificationSelector(_0x11d28a['before']),'before':projectNotificationConfig(_0x11d28a['before']),'after':null,'dryRun':!![],'backend':{'method':_0x117496(0xe1),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x117496(0xe4),'lookupCommand':_0x237b5b}},{'method':_0x117496(0xe1),'url':DELETE_PATH});},async 'execute'(_0x5e7474){const _0x103306=a193_0x10b049;requireNotificationExplicitYes(_0x5e7474);const _0x5cf558=await prepareDelete(_0x5e7474),_0x4b4334=notificationLookupCommand(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]);let _0x1a0f0f=![];try{await deleteNotificationChannelConfig(_0x5cf558['id'],_0x5e7474[_0x103306(0xe2)]);}catch(_0x18cf0d){if(!isPlatformTransportFailure(_0x18cf0d))throw safeApiFailure(_0x103306(0xf5),'mutation','Inspect\x20with\x20'+_0x4b4334+_0x103306(0xe8));_0x1a0f0f=!![];}let _0x365613;try{_0x365613=await listNotificationChannelConfigs(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]),validateNotificationDeleteReadback(_0x365613,_0x5e7474[_0x103306(0xe2)],_0x5cf558['before'][_0x103306(0xe6)]);}catch{throw notificationError(_0x1a0f0f?_0x103306(0xec):_0x103306(0xf1),_0x103306(0xf9)+_0x5cf558['id']+_0x103306(0xdf),_0x103306(0xea)+_0x4b4334+_0x103306(0xe0));}if(_0x365613['some'](_0x59400a=>_0x59400a['id']===_0x5cf558['id']))throw notificationError(_0x1a0f0f?'notification_config_delete_outcome_unknown':_0x103306(0xf8),'Notification\x20config\x20'+_0x5cf558['id']+_0x103306(0xf6),_0x103306(0xea)+_0x4b4334+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1b3e17=[REFERENCE_WARNING];return _0x1a0f0f&&_0x1b3e17[_0x103306(0xe3)](_0x103306(0xde)),{'ok':!![],'data':{'operation':_0x103306(0xf5),'selector':notificationSelector(_0x5cf558['before']),'before':projectNotificationConfig(_0x5cf558[_0x103306(0xfc)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1b3e17,'verification':{'status':_0x103306(0xeb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1a0f0f,'lookupCommand':_0x4b4334}},'message':_0x103306(0xdd)+_0x5cf558['id']};}};
1
+ function a193_0xf4b8(){const _0x9b8779=['1299516WLOJFR','mutation','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','2599544buwpPT','1944258CgTaEB','planned','3030876BykKpE','Inspect\x20with\x20','6421440LHojft','POST','channelType','before',';\x20do\x20not\x20resubmit\x20automatically.','1116311ArBvaF','Notification\x20config\x20','some','notification','/notification/channel-config/delete','high-risk-write','unshift','appCode','delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3939309jhwyVW','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','notification_config_delete_verification_failed','Deleted\x20notification\x20config\x20'];a193_0xf4b8=function(){return _0x9b8779;};return a193_0xf4b8();}const a193_0x1a52e3=a193_0x3d8e;(function(_0x4efb73,_0x498b3b){const _0x28843b=a193_0x3d8e,_0x42cfb5=_0x4efb73();while(!![]){try{const _0xcc4759=parseInt(_0x28843b(0xdd))/0x1+parseInt(_0x28843b(0xe2))/0x2+-parseInt(_0x28843b(0xd9))/0x3+-parseInt(_0x28843b(0xe1))/0x4+parseInt(_0x28843b(0xe6))/0x5+-parseInt(_0x28843b(0xe4))/0x6+-parseInt(_0x28843b(0xce))/0x7;if(_0xcc4759===_0x498b3b)break;else _0x42cfb5['push'](_0x42cfb5['shift']());}catch(_0x122e33){_0x42cfb5['push'](_0x42cfb5['shift']());}}}(a193_0xf4b8,0xe2a45));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';function a193_0x3d8e(_0x123ac7,_0x40ebe7){_0x123ac7=_0x123ac7-0xca;const _0xf4b864=a193_0xf4b8();let _0x3d8ea6=_0xf4b864[_0x123ac7];return _0x3d8ea6;}const DELETE_PATH=a193_0x1a52e3(0xd2),REFERENCE_WARNING=a193_0x1a52e3(0xda);async function prepareDelete(_0x39eba2){const _0x257976=a193_0x1a52e3,_0x1528b3=readNotificationId(_0x39eba2),_0x136e71=await requireExactNotificationConfig(_0x39eba2[_0x257976(0xd5)],_0x1528b3,'delete');return{'id':_0x1528b3,'before':_0x136e71};}export const notificationConfigDelete={'service':a193_0x1a52e3(0xd1),'command':a193_0x1a52e3(0xe0),'description':a193_0x1a52e3(0xdf),'risk':a193_0x1a52e3(0xd3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x374078){readNotificationId(_0x374078),requireNotificationExplicitYes(_0x374078);},async 'dryRun'(_0x266d1e){const _0x37ee19=a193_0x1a52e3,_0xa9b5e6=await prepareDelete(_0x266d1e),_0x4866d0=notificationLookupCommand(_0x266d1e[_0x37ee19(0xd5)],_0xa9b5e6[_0x37ee19(0xcc)][_0x37ee19(0xcb)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0xa9b5e6[_0x37ee19(0xcc)]),'before':projectNotificationConfig(_0xa9b5e6[_0x37ee19(0xcc)]),'after':null,'dryRun':!![],'backend':{'method':_0x37ee19(0xca),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x37ee19(0xe3),'lookupCommand':_0x4866d0}},{'method':_0x37ee19(0xca),'url':DELETE_PATH});},async 'execute'(_0x36eb35){const _0x364f5d=a193_0x1a52e3;requireNotificationExplicitYes(_0x36eb35);const _0x4e697e=await prepareDelete(_0x36eb35),_0x19f704=notificationLookupCommand(_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)][_0x364f5d(0xcb)]);let _0x2d32f2=![];try{await deleteNotificationChannelConfig(_0x4e697e['id'],_0x36eb35[_0x364f5d(0xd5)]);}catch(_0x12dd65){if(!isPlatformTransportFailure(_0x12dd65))throw safeApiFailure(_0x364f5d(0xd6),_0x364f5d(0xde),_0x364f5d(0xe5)+_0x19f704+_0x364f5d(0xd8));_0x2d32f2=!![];}let _0x2c9a52;try{_0x2c9a52=await listNotificationChannelConfigs(_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)]['channelType']),validateNotificationDeleteReadback(_0x2c9a52,_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)][_0x364f5d(0xcb)]);}catch{throw notificationError(_0x2d32f2?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x364f5d(0xcf)+_0x4e697e['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x364f5d(0xe5)+_0x19f704+_0x364f5d(0xcd));}if(_0x2c9a52[_0x364f5d(0xd0)](_0x1fe4bf=>_0x1fe4bf['id']===_0x4e697e['id']))throw notificationError(_0x2d32f2?'notification_config_delete_outcome_unknown':_0x364f5d(0xdb),_0x364f5d(0xcf)+_0x4e697e['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x19f704+_0x364f5d(0xcd));const _0x290285=[REFERENCE_WARNING];return _0x2d32f2&&_0x290285[_0x364f5d(0xd4)](_0x364f5d(0xd7)),{'ok':!![],'data':{'operation':_0x364f5d(0xd6),'selector':notificationSelector(_0x4e697e[_0x364f5d(0xcc)]),'before':projectNotificationConfig(_0x4e697e[_0x364f5d(0xcc)]),'after':null,'dryRun':![],'backend':{'method':_0x364f5d(0xca),'path':DELETE_PATH},'warnings':_0x290285,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2d32f2,'lookupCommand':_0x19f704}},'message':_0x364f5d(0xdc)+_0x4e697e['id']};}};
@@ -1 +1 @@
1
- function a194_0x51ba(){const _0x5696cb=['809615JByGSt','config-list','appCode','\x20notification\x20config(s)','1909038Glqchx','boolean','length','all','18HYsKID','flat','4768Urhmoj','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','95btFwio','read','Found\x20','2288629fhdvnm','validation','map','9927fSamdt','trim','157844AHsEkg','str','2263408UlNzwx','type','1483955UwLBJf','110cOFXZF','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','string','bool'];a194_0x51ba=function(){return _0x5696cb;};return a194_0x51ba();}const a194_0x50ecd9=a194_0x3e8a;function a194_0x3e8a(_0x37cd52,_0x39cd90){_0x37cd52=_0x37cd52-0xe6;const _0x51baf8=a194_0x51ba();let _0x3e8aec=_0x51baf8[_0x37cd52];return _0x3e8aec;}(function(_0x295769,_0x28eb7c){const _0x5b386b=a194_0x3e8a,_0x32cda9=_0x295769();while(!![]){try{const _0x4903e8=-parseInt(_0x5b386b(0xe7))/0x1+parseInt(_0x5b386b(0xfd))/0x2+-parseInt(_0x5b386b(0xeb))/0x3+parseInt(_0x5b386b(0xfb))/0x4*(parseInt(_0x5b386b(0xf3))/0x5)+-parseInt(_0x5b386b(0xef))/0x6*(-parseInt(_0x5b386b(0xf6))/0x7)+-parseInt(_0x5b386b(0xf1))/0x8*(-parseInt(_0x5b386b(0xf9))/0x9)+-parseInt(_0x5b386b(0x100))/0xa*(parseInt(_0x5b386b(0xff))/0xb);if(_0x4903e8===_0x28eb7c)break;else _0x32cda9['push'](_0x32cda9['shift']());}catch(_0x2719a8){_0x32cda9['push'](_0x32cda9['shift']());}}}(a194_0x51ba,0x8ffd0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a194_0x50ecd9(0xe8),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x50ecd9(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x50ecd9(0x102),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x50ecd9(0xec),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x5ba879){const _0xbb278a=a194_0x50ecd9;if(_0x5ba879[_0xbb278a(0xe6)](_0xbb278a(0xee))&&_0x5ba879[_0xbb278a(0xfc)](_0xbb278a(0xfe))[_0xbb278a(0xfa)]())throw CliErrors[_0xbb278a(0xf7)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0xbb278a(0xf2));if(_0x5ba879[_0xbb278a(0xe6)]('all'))return;readNotificationChannelType(_0x5ba879);},async 'execute'(_0x3b2a91){const _0x36733a=a194_0x50ecd9;if(_0x3b2a91['bool'](_0x36733a(0xee))){const _0x3a9834=await Promise[_0x36733a(0xee)](NOTIFICATION_CHANNEL_TYPES['map'](_0x369515=>listNotificationChannelConfigs(_0x3b2a91[_0x36733a(0xe9)],_0x369515))),_0x33aa5a=_0x3a9834[_0x36733a(0xf0)]()[_0x36733a(0xf8)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x33aa5a[_0x36733a(0xed)],'configs':_0x33aa5a},'message':_0x36733a(0xf5)+_0x33aa5a[_0x36733a(0xed)]+_0x36733a(0x101)};}const _0x23b988=readNotificationChannelType(_0x3b2a91),_0x422b5d=await listNotificationChannelConfigs(_0x3b2a91['appCode'],_0x23b988),_0x531dc1=_0x422b5d['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelType':_0x23b988,'count':_0x531dc1['length'],'configs':_0x531dc1},'message':_0x36733a(0xf5)+_0x531dc1['length']+'\x20'+_0x23b988+_0x36733a(0xea)};}};
1
+ const a194_0x319cca=a194_0x509b;(function(_0x508f6e,_0xe4c34a){const _0x3cbabf=a194_0x509b,_0x2375f2=_0x508f6e();while(!![]){try{const _0x56453f=parseInt(_0x3cbabf(0xae))/0x1+parseInt(_0x3cbabf(0xb7))/0x2+parseInt(_0x3cbabf(0xba))/0x3*(parseInt(_0x3cbabf(0xbb))/0x4)+-parseInt(_0x3cbabf(0xc0))/0x5+-parseInt(_0x3cbabf(0xa9))/0x6+-parseInt(_0x3cbabf(0xaf))/0x7+-parseInt(_0x3cbabf(0xbe))/0x8*(-parseInt(_0x3cbabf(0xab))/0x9);if(_0x56453f===_0xe4c34a)break;else _0x2375f2['push'](_0x2375f2['shift']());}catch(_0xe99db6){_0x2375f2['push'](_0x2375f2['shift']());}}}(a194_0x30e8,0xbf6f5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x509b(_0xdfee80,_0x53b3c0){_0xdfee80=_0xdfee80-0xa8;const _0x30e8da=a194_0x30e8();let _0x509bee=_0x30e8da[_0xdfee80];return _0x509bee;}import{CliErrors}from'../../errors.js';function a194_0x30e8(){const _0x10bdd7=['List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','399192ODpRQB','read','9dOMYym','bool','appCode','1338149CYVEtO','9567159TXVRuN','boolean','str','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','length','config-list','Found\x20','1266728BpAoyS','type','notification','387AnTXhV','11376YHNKGk','flat','all','2361928pUIndg','map','2081220LQVRRt','validation'];a194_0x30e8=function(){return _0x10bdd7;};return a194_0x30e8();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x319cca(0xb9),'command':a194_0x319cca(0xb5),'description':a194_0x319cca(0xa8),'risk':a194_0x319cca(0xaa),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x319cca(0xbd),'type':a194_0x319cca(0xb0),'default':![],'description':a194_0x319cca(0xb2)}],async 'validate'(_0xd28ce6){const _0x1b4a41=a194_0x319cca;if(_0xd28ce6[_0x1b4a41(0xac)](_0x1b4a41(0xbd))&&_0xd28ce6[_0x1b4a41(0xb1)](_0x1b4a41(0xb8))['trim']())throw CliErrors[_0x1b4a41(0xc1)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0xd28ce6[_0x1b4a41(0xac)](_0x1b4a41(0xbd)))return;readNotificationChannelType(_0xd28ce6);},async 'execute'(_0x1ff9e2){const _0x2dd974=a194_0x319cca;if(_0x1ff9e2[_0x2dd974(0xac)]('all')){const _0x30e88a=await Promise[_0x2dd974(0xbd)](NOTIFICATION_CHANNEL_TYPES[_0x2dd974(0xbf)](_0x36253b=>listNotificationChannelConfigs(_0x1ff9e2[_0x2dd974(0xad)],_0x36253b))),_0x3fe446=_0x30e88a[_0x2dd974(0xbc)]()[_0x2dd974(0xbf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1ff9e2['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x3fe446['length'],'configs':_0x3fe446},'message':_0x2dd974(0xb6)+_0x3fe446[_0x2dd974(0xb4)]+_0x2dd974(0xb3)};}const _0x41bca8=readNotificationChannelType(_0x1ff9e2),_0x1cac5b=await listNotificationChannelConfigs(_0x1ff9e2[_0x2dd974(0xad)],_0x41bca8),_0x182ed7=_0x1cac5b['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1ff9e2[_0x2dd974(0xad)],'channelType':_0x41bca8,'count':_0x182ed7[_0x2dd974(0xb4)],'configs':_0x182ed7},'message':_0x2dd974(0xb6)+_0x182ed7[_0x2dd974(0xb4)]+'\x20'+_0x41bca8+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- function a195_0x1e50(_0x101843,_0x2f1927){_0x101843=_0x101843-0x1c9;const _0x4108e1=a195_0x4108();let _0x1e5007=_0x4108e1[_0x101843];return _0x1e5007;}const a195_0x29df98=a195_0x1e50;(function(_0x3d19ff,_0xc97e62){const _0x3dfaaa=a195_0x1e50,_0x19a893=_0x3d19ff();while(!![]){try{const _0x2578a4=parseInt(_0x3dfaaa(0x1e3))/0x1*(parseInt(_0x3dfaaa(0x1cb))/0x2)+parseInt(_0x3dfaaa(0x1e7))/0x3*(-parseInt(_0x3dfaaa(0x1ed))/0x4)+parseInt(_0x3dfaaa(0x1c9))/0x5*(parseInt(_0x3dfaaa(0x1e2))/0x6)+parseInt(_0x3dfaaa(0x1d1))/0x7*(parseInt(_0x3dfaaa(0x1ea))/0x8)+parseInt(_0x3dfaaa(0x1d7))/0x9+parseInt(_0x3dfaaa(0x1db))/0xa*(-parseInt(_0x3dfaaa(0x1da))/0xb)+-parseInt(_0x3dfaaa(0x1e4))/0xc;if(_0x2578a4===_0xc97e62)break;else _0x19a893['push'](_0x19a893['shift']());}catch(_0x34f2ce){_0x19a893['push'](_0x19a893['shift']());}}}(a195_0x4108,0x5b9fd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a195_0x4108(){const _0x10f74a=['notification_config_update_verification_unavailable','/notification/channel-config/update','128895hjycWv','\x20via\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','239352SbHDwb','provesChange','appCode','12vyxxBe','verifiedFields','15MFdXXw','POST','14cEuxlh','notification_config_update_outcome_unknown','high-risk-write','notification',';\x20do\x20not\x20resubmit\x20automatically.','patch','49eNRCjg',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','planned','mutation','allMatch','4961241kCMsRZ','payload','\x20with\x20','43043TrRUML','140KGpDqr','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','channelType','update','Inspect\x20with\x20--id\x20','Inspect\x20ID\x20','before','773754QRMFDa','13251PXFoNZ','8176152knszqR'];a195_0x4108=function(){return _0x10f74a;};return a195_0x4108();}const UPDATE_PATH=a195_0x29df98(0x1e6);async function prepareUpdate(_0x92b0ba){const _0x1ac35f=a195_0x29df98,_0x3ab90d=readNotificationId(_0x92b0ba),_0x5a9f40=await readNotificationDocument(_0x92b0ba,_0x1ac35f(0x1de)),_0x13bf21=await requireExactNotificationConfig(_0x92b0ba[_0x1ac35f(0x1ec)],_0x3ab90d,_0x1ac35f(0x1de));return{'id':_0x3ab90d,'patch':_0x5a9f40,'before':_0x13bf21,'payload':mergeUpdateInput(_0x13bf21,_0x5a9f40),'planned':plannedUpdateProjection(_0x13bf21,_0x5a9f40)};}export const notificationConfigUpdate={'service':a195_0x29df98(0x1ce),'command':'config-update','description':a195_0x29df98(0x1dc),'risk':a195_0x29df98(0x1cd),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e28bd){readNotificationId(_0x4e28bd),assertSingleNotificationSource(_0x4e28bd),requireNotificationExplicitYes(_0x4e28bd);},async 'dryRun'(_0x2aa25f){const _0x2c0907=a195_0x29df98,_0x36372d=await prepareUpdate(_0x2aa25f),_0x53b4f5=notificationLookupCommand(_0x2aa25f[_0x2c0907(0x1ec)],_0x36372d[_0x2c0907(0x1e1)][_0x2c0907(0x1dd)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x36372d[_0x2c0907(0x1e1)]),'before':projectNotificationConfig(_0x36372d[_0x2c0907(0x1e1)]),'after':_0x36372d[_0x2c0907(0x1d4)],'dryRun':!![],'backend':{'method':_0x2c0907(0x1ca),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2c0907(0x1d4),'lookupCommand':_0x53b4f5}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x122a62){const _0x495155=a195_0x29df98;requireNotificationExplicitYes(_0x122a62);const _0x1841ac=await prepareUpdate(_0x122a62),_0x267524=notificationLookupCommand(_0x122a62[_0x495155(0x1ec)],_0x1841ac[_0x495155(0x1e1)][_0x495155(0x1dd)]);let _0x104e65=![];try{await updateNotificationChannelConfig(_0x1841ac[_0x495155(0x1d8)]);}catch(_0x5038f4){if(!isPlatformTransportFailure(_0x5038f4))throw safeApiFailure(_0x495155(0x1de),_0x495155(0x1d5),_0x495155(0x1e0)+_0x1841ac['id']+_0x495155(0x1d9)+_0x267524+_0x495155(0x1d2));_0x104e65=!![];}let _0x1165d8;try{const _0x565425=await getNotificationChannelConfig(_0x1841ac['id'],_0x122a62['appCode']);_0x1165d8=normalizeExactNotificationConfig(_0x565425,_0x1841ac['id'],_0x122a62['appCode']);}catch{throw notificationError(_0x104e65?_0x495155(0x1cc):_0x495155(0x1e5),_0x495155(0x1d3)+_0x1841ac['id']+_0x495155(0x1e9),_0x495155(0x1df)+_0x1841ac['id']+_0x495155(0x1e8)+_0x267524+_0x495155(0x1cf));}const _0x4d4bae=requestedSafeFieldsMatch(_0x1841ac[_0x495155(0x1e1)],_0x1165d8,_0x1841ac[_0x495155(0x1d0)]);if(!_0x4d4bae[_0x495155(0x1d6)]||_0x104e65&&!_0x4d4bae[_0x495155(0x1eb)])throw notificationError(_0x104e65?_0x495155(0x1cc):'notification_config_update_verification_failed',_0x495155(0x1d3)+_0x1841ac['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x495155(0x1df)+_0x1841ac['id']+'\x20via\x20'+_0x267524+';\x20do\x20not\x20resubmit\x20automatically.');const _0x3c6937=_0x104e65?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x1165d8),'before':projectNotificationConfig(_0x1841ac[_0x495155(0x1e1)]),'after':projectNotificationConfig(_0x1165d8),'dryRun':![],'backend':{'method':_0x495155(0x1ca),'path':UPDATE_PATH},'warnings':_0x3c6937,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x104e65,'verifiedFields':_0x4d4bae[_0x495155(0x1ee)],'lookupCommand':_0x267524}},'message':'Updated\x20notification\x20config\x20'+_0x1165d8['id']};}};
1
+ const a195_0x42e126=a195_0x1761;function a195_0x34b0(){const _0x3a8889=['112330URmLue','high-risk-write','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','/notification/channel-config/update','336LYsFfM','8108856bvaBqq','notification_config_update_verification_unavailable','\x20with\x20','Inspect\x20with\x20--id\x20',';\x20do\x20not\x20resubmit\x20automatically.','verified','4mpqVsb','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','7603002wMhboL','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','planned','14816856rdbxSK','update','payload','mutation','config-update','allMatch','channelType','appCode','13MsmkXI','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','provesChange','29588RZDIPQ','30543410sOsRJv','Notification\x20config\x20','patch','11AYSFDA','notification_config_update_outcome_unknown','before','4938549WxTaOc','POST','\x20via\x20'];a195_0x34b0=function(){return _0x3a8889;};return a195_0x34b0();}(function(_0x25b6f9,_0x47fc24){const _0x6f740a=a195_0x1761,_0x11f346=_0x25b6f9();while(!![]){try{const _0x3277e7=parseInt(_0x6f740a(0x190))/0x1*(-parseInt(_0x6f740a(0x193))/0x2)+parseInt(_0x6f740a(0x174))/0x3*(-parseInt(_0x6f740a(0x183))/0x4)+parseInt(_0x6f740a(0x177))/0x5*(parseInt(_0x6f740a(0x17c))/0x6)+parseInt(_0x6f740a(0x17d))/0x7+-parseInt(_0x6f740a(0x188))/0x8+-parseInt(_0x6f740a(0x185))/0x9+-parseInt(_0x6f740a(0x194))/0xa*(-parseInt(_0x6f740a(0x197))/0xb);if(_0x3277e7===_0x47fc24)break;else _0x11f346['push'](_0x11f346['shift']());}catch(_0x110672){_0x11f346['push'](_0x11f346['shift']());}}}(a195_0x34b0,0xe461f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a195_0x1761(_0x14e868,_0x5bc139){_0x14e868=_0x14e868-0x173;const _0x34b019=a195_0x34b0();let _0x17617=_0x34b019[_0x14e868];return _0x17617;}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x42e126(0x17b);async function prepareUpdate(_0x2de4ff){const _0x14cf14=a195_0x42e126,_0x414a53=readNotificationId(_0x2de4ff),_0x21d8bc=await readNotificationDocument(_0x2de4ff,_0x14cf14(0x189)),_0x428083=await requireExactNotificationConfig(_0x2de4ff[_0x14cf14(0x18f)],_0x414a53,_0x14cf14(0x189));return{'id':_0x414a53,'patch':_0x21d8bc,'before':_0x428083,'payload':mergeUpdateInput(_0x428083,_0x21d8bc),'planned':plannedUpdateProjection(_0x428083,_0x21d8bc)};}export const notificationConfigUpdate={'service':a195_0x42e126(0x179),'command':a195_0x42e126(0x18c),'description':a195_0x42e126(0x191),'risk':a195_0x42e126(0x178),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3cd46a){readNotificationId(_0x3cd46a),assertSingleNotificationSource(_0x3cd46a),requireNotificationExplicitYes(_0x3cd46a);},async 'dryRun'(_0x548d5b){const _0x43da8c=a195_0x42e126,_0x5746a1=await prepareUpdate(_0x548d5b),_0x4ccab7=notificationLookupCommand(_0x548d5b[_0x43da8c(0x18f)],_0x5746a1[_0x43da8c(0x173)][_0x43da8c(0x18e)]);return asDryRunResult({'operation':_0x43da8c(0x189),'selector':notificationSelector(_0x5746a1[_0x43da8c(0x173)]),'before':projectNotificationConfig(_0x5746a1['before']),'after':_0x5746a1[_0x43da8c(0x187)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x4ccab7}},{'method':_0x43da8c(0x175),'url':UPDATE_PATH});},async 'execute'(_0x2f4507){const _0x229117=a195_0x42e126;requireNotificationExplicitYes(_0x2f4507);const _0x152505=await prepareUpdate(_0x2f4507),_0x19ec00=notificationLookupCommand(_0x2f4507[_0x229117(0x18f)],_0x152505[_0x229117(0x173)][_0x229117(0x18e)]);let _0x5dcbd4=![];try{await updateNotificationChannelConfig(_0x152505[_0x229117(0x18a)]);}catch(_0x5d955){if(!isPlatformTransportFailure(_0x5d955))throw safeApiFailure(_0x229117(0x189),_0x229117(0x18b),'Inspect\x20ID\x20'+_0x152505['id']+_0x229117(0x17f)+_0x19ec00+_0x229117(0x17a));_0x5dcbd4=!![];}let _0x2d902b;try{const _0x4b376a=await getNotificationChannelConfig(_0x152505['id'],_0x2f4507[_0x229117(0x18f)]);_0x2d902b=normalizeExactNotificationConfig(_0x4b376a,_0x152505['id'],_0x2f4507[_0x229117(0x18f)]);}catch{throw notificationError(_0x5dcbd4?_0x229117(0x198):_0x229117(0x17e),_0x229117(0x195)+_0x152505['id']+_0x229117(0x184),_0x229117(0x180)+_0x152505['id']+'\x20via\x20'+_0x19ec00+_0x229117(0x181));}const _0x4e78c1=requestedSafeFieldsMatch(_0x152505[_0x229117(0x173)],_0x2d902b,_0x152505[_0x229117(0x196)]);if(!_0x4e78c1[_0x229117(0x18d)]||_0x5dcbd4&&!_0x4e78c1[_0x229117(0x192)])throw notificationError(_0x5dcbd4?_0x229117(0x198):'notification_config_update_verification_failed',_0x229117(0x195)+_0x152505['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20with\x20--id\x20'+_0x152505['id']+_0x229117(0x176)+_0x19ec00+_0x229117(0x181));const _0x1a216e=_0x5dcbd4?[_0x229117(0x186)]:[];return{'ok':!![],'data':{'operation':_0x229117(0x189),'selector':notificationSelector(_0x2d902b),'before':projectNotificationConfig(_0x152505[_0x229117(0x173)]),'after':projectNotificationConfig(_0x2d902b),'dryRun':![],'backend':{'method':_0x229117(0x175),'path':UPDATE_PATH},'warnings':_0x1a216e,'verification':{'status':_0x229117(0x182),'recoveredAfterUnknownResponse':_0x5dcbd4,'verifiedFields':_0x4e78c1['verifiedFields'],'lookupCommand':_0x19ec00}},'message':'Updated\x20notification\x20config\x20'+_0x2d902b['id']};}};
@@ -1 +1 @@
1
- function a196_0x8452(){const _0x155964=['202510OQlEjI','2191582fiBUsT','69217RjREBH','1221865tYhRNn','4241392UbulFf','507780XJKcLQ','4PbtOVW','500gcymCD','564ojZIZr','17206LxFmNI','18yHITpc'];a196_0x8452=function(){return _0x155964;};return a196_0x8452();}(function(_0x2a6b09,_0x17e95e){const _0x325a64=a196_0x11e0,_0x92518=_0x2a6b09();while(!![]){try{const _0x38ef92=-parseInt(_0x325a64(0xa8))/0x1+parseInt(_0x325a64(0xa7))/0x2+-parseInt(_0x325a64(0xab))/0x3+parseInt(_0x325a64(0xac))/0x4*(-parseInt(_0x325a64(0xa9))/0x5)+parseInt(_0x325a64(0xae))/0x6*(parseInt(_0x325a64(0xa4))/0x7)+-parseInt(_0x325a64(0xaa))/0x8*(parseInt(_0x325a64(0xa5))/0x9)+-parseInt(_0x325a64(0xad))/0xa*(-parseInt(_0x325a64(0xa6))/0xb);if(_0x38ef92===_0x17e95e)break;else _0x92518['push'](_0x92518['shift']());}catch(_0x59f8b0){_0x92518['push'](_0x92518['shift']());}}}(a196_0x8452,0xabe91));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x11e0(_0x22567e,_0x313dc1){_0x22567e=_0x22567e-0xa4;const _0x845250=a196_0x8452();let _0x11e043=_0x845250[_0x22567e];return _0x11e043;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x3d11b4,_0x342b8f){const _0xa98aa3=a196_0x3f3e,_0x22a4f1=_0x3d11b4();while(!![]){try{const _0xf2e47c=-parseInt(_0xa98aa3(0xf3))/0x1+-parseInt(_0xa98aa3(0xf2))/0x2*(parseInt(_0xa98aa3(0xf9))/0x3)+parseInt(_0xa98aa3(0xf0))/0x4+-parseInt(_0xa98aa3(0xf4))/0x5*(parseInt(_0xa98aa3(0xf8))/0x6)+-parseInt(_0xa98aa3(0xfa))/0x7*(parseInt(_0xa98aa3(0xf5))/0x8)+-parseInt(_0xa98aa3(0xf6))/0x9+-parseInt(_0xa98aa3(0xf7))/0xa*(-parseInt(_0xa98aa3(0xf1))/0xb);if(_0xf2e47c===_0x342b8f)break;else _0x22a4f1['push'](_0x22a4f1['shift']());}catch(_0x305208){_0x22a4f1['push'](_0x22a4f1['shift']());}}}(a196_0x4e50,0xbbcd9));function a196_0x3f3e(_0x43d3c3,_0x197c5b){_0x43d3c3=_0x43d3c3-0xf0;const _0x4e505f=a196_0x4e50();let _0x3f3e7a=_0x4e505f[_0x43d3c3];return _0x3f3e7a;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a196_0x4e50(){const _0x38adb9=['66tEJtVd','3BliYuq','47033uobcBm','2418348ToCXtA','22649XrNBex','2255146NjBNMX','876062atGroN','654745VhJKrY','1576ZnMpGO','6179760SjaoiC','27290JizrEk'];a196_0x4e50=function(){return _0x38adb9;};return a196_0x4e50();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a197_0x168f92=a197_0x3b06;(function(_0xfaaca2,_0x18bce2){const _0x15df05=a197_0x3b06,_0x13741e=_0xfaaca2();while(!![]){try{const _0x27af8f=parseInt(_0x15df05(0x202))/0x1*(parseInt(_0x15df05(0x229))/0x2)+-parseInt(_0x15df05(0x265))/0x3+-parseInt(_0x15df05(0x253))/0x4+-parseInt(_0x15df05(0x221))/0x5*(parseInt(_0x15df05(0x22f))/0x6)+parseInt(_0x15df05(0x203))/0x7+parseInt(_0x15df05(0x216))/0x8*(parseInt(_0x15df05(0x26c))/0x9)+parseInt(_0x15df05(0x239))/0xa*(parseInt(_0x15df05(0x222))/0xb);if(_0x27af8f===_0x18bce2)break;else _0x13741e['push'](_0x13741e['shift']());}catch(_0x28b16d){_0x13741e['push'](_0x13741e['shift']());}}}(a197_0x5a93,0x9f561));function a197_0x3b06(_0x23ca98,_0x320e3e){_0x23ca98=_0x23ca98-0x1f2;const _0x5a9361=a197_0x5a93();let _0x3b06a5=_0x5a9361[_0x23ca98];return _0x3b06a5;}import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x168f92(0x23c),a197_0x168f92(0x242),'DINGTALK',a197_0x168f92(0x256),a197_0x168f92(0x1f7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x168f92(0x20e),a197_0x168f92(0x232),'endpointUrl',a197_0x168f92(0x23d),a197_0x168f92(0x21f),a197_0x168f92(0x204),a197_0x168f92(0x249)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x168f92(0x22b),'configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x168f92(0x266),'recipients',a197_0x168f92(0x25a),a197_0x168f92(0x228),a197_0x168f92(0x225),a197_0x168f92(0x22c),a197_0x168f92(0x22d),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x168f92(0x218),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x248)},{'name':a197_0x168f92(0x205),'type':a197_0x168f92(0x24a),'required':![],'default':![],'description':a197_0x168f92(0x213)},{'name':a197_0x168f92(0x1f6),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x214)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x168f92(0x227),'required':!![],'description':a197_0x168f92(0x23e)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5d8e8a,_0xbaee73,_0x1cfffc){return new CliError(_0x5d8e8a,0x1,_0xbaee73,_0x1cfffc);}export function readNotificationId(_0x5f1b35){const _0x5470a5=a197_0x168f92,_0x5dfcb6=_0x5f1b35[_0x5470a5(0x20a)]('id');if(!Number[_0x5470a5(0x23a)](_0x5dfcb6)||_0x5dfcb6<=0x0)throw notificationError(_0x5470a5(0x224),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x5dfcb6;}export function requireNotificationExplicitYes(_0xc8ed06){const _0x229019=a197_0x168f92;if(_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x208))||_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x243)))return;throw notificationError(_0x229019(0x220),_0x229019(0x233),_0x229019(0x25d));}export function readNotificationChannelType(_0x4fd084,_0x1f2203=a197_0x168f92(0x25c),_0x390988=a197_0x168f92(0x23c)){const _0x2e06e6=a197_0x168f92,_0x26a6c6=_0x4fd084['str'](_0x1f2203)[_0x2e06e6(0x223)]()||_0x390988;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x26a6c6))throw CliErrors[_0x2e06e6(0x245)](_0x2e06e6(0x255)+_0x1f2203+':\x20'+_0x26a6c6,_0x2e06e6(0x1ff)+NOTIFICATION_CHANNEL_TYPES[_0x2e06e6(0x244)](',\x20')+'.');return _0x26a6c6;}export function assertSingleNotificationSource(_0x3aad60){const _0x4b2d26=a197_0x168f92,_0x3aa1dc=[],_0x5646f2=_0x3aad60[_0x4b2d26(0x1f8)]('file')[_0x4b2d26(0x223)]();if(_0x5646f2)_0x3aa1dc[_0x4b2d26(0x247)]({'kind':'file','path':_0x5646f2});if(_0x3aad60[_0x4b2d26(0x1fc)](_0x4b2d26(0x205)))_0x3aa1dc[_0x4b2d26(0x247)]({'kind':_0x4b2d26(0x205)});const _0x41d5d7=_0x3aad60[_0x4b2d26(0x1f8)](_0x4b2d26(0x1f6))[_0x4b2d26(0x223)]();if(_0x41d5d7)_0x3aa1dc['push']({'kind':_0x4b2d26(0x21b),'name':_0x41d5d7});if(_0x3aa1dc['length']===0x0)throw CliErrors[_0x4b2d26(0x245)](_0x4b2d26(0x23b),_0x4b2d26(0x211));if(_0x3aa1dc[_0x4b2d26(0x251)]>0x1)throw CliErrors[_0x4b2d26(0x245)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x4b2d26(0x211));return _0x3aa1dc[0x0];}export async function readNotificationDocument(_0xfe41b3,_0x768cce){const _0x2ede71=a197_0x168f92,_0x45f00e=assertSingleNotificationSource(_0xfe41b3),_0x190890=_0x45f00e[_0x2ede71(0x264)]==='file'?_0x2ede71(0x262)+_0x45f00e['path']:_0x45f00e['kind']===_0x2ede71(0x21b)?_0x2ede71(0x261)+_0x45f00e['name']:_0x2ede71(0x205);let _0x36fbd9;try{if(_0x45f00e['kind']===_0x2ede71(0x218))_0x36fbd9=await readFile(_0x45f00e[_0x2ede71(0x1f9)],_0x2ede71(0x24f));else{if(_0x45f00e[_0x2ede71(0x264)]===_0x2ede71(0x21b)){if(!(_0x45f00e[_0x2ede71(0x246)]in process.env))throw notificationError(_0x2ede71(0x1f2),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x45f00e[_0x2ede71(0x246)]);_0x36fbd9=process.env[_0x45f00e.name]??'';}else _0x36fbd9=await readStdin();}}catch(_0x77b5e0){if(_0x77b5e0 instanceof CliError)throw _0x77b5e0;throw notificationError(_0x2ede71(0x1f2),_0x2ede71(0x20b)+_0x190890+'.');}let _0x2c8a95;try{_0x2c8a95=JSON[_0x2ede71(0x1f5)](_0x36fbd9);}catch{throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+_0x2ede71(0x241),_0x2ede71(0x240));}if(!isJsonObject(_0x2c8a95))throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x2c8a95,_0x768cce);}export function projectNotificationListConfig(_0x533d4b,_0x206d86){const _0x508011=a197_0x168f92;return{'id':typeof _0x533d4b['id']===_0x508011(0x227)?_0x533d4b['id']:null,'configCode':requireResponseString(_0x533d4b[_0x508011(0x24c)],_0x508011(0x24c),_0x206d86),'configName':requireResponseString(_0x533d4b[_0x508011(0x20e)],_0x508011(0x20e),_0x206d86),'channelType':requireResponseString(_0x533d4b[_0x508011(0x232)],_0x508011(0x232),_0x206d86),'description':normalizeNullableString(_0x533d4b['description']),'createTime':normalizeNullableString(_0x533d4b['createTime']),'updateTime':normalizeNullableString(_0x533d4b['updateTime'])};}export function normalizeExactNotificationConfig(_0x120647,_0x3e0abc,_0x23f010){const _0x5d5a0d=a197_0x168f92;if(!Number[_0x5d5a0d(0x23a)](_0x120647['id'])||_0x120647['id']!==_0x3e0abc)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x24d)+_0x3e0abc+'.');if(_0x120647[_0x5d5a0d(0x22b)]!==_0x23f010)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x257)+_0x3e0abc+_0x5d5a0d(0x206));const _0x925337=requireExactString(_0x120647['configName'],_0x5d5a0d(0x20e),_0x3e0abc),_0x3848c5=requireExactString(_0x120647['configCode'],'configCode',_0x3e0abc),_0x5d7b49=requireExactString(_0x120647['channelType'],_0x5d5a0d(0x232),_0x3e0abc);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d5a0d(0x200)](_0x5d7b49))throw notificationError(_0x5d5a0d(0x26f),'Notification\x20config\x20'+_0x3e0abc+'\x20has\x20an\x20unsupported\x20channelType.');const _0x43271c=responseNullableString(_0x120647[_0x5d5a0d(0x1f3)],_0x5d5a0d(0x1f3),_0x3e0abc),_0x165a65=responseNullableString(_0x120647[_0x5d5a0d(0x23d)],'channelConfig',_0x3e0abc),_0x2cc229=responseNullableString(_0x120647[_0x5d5a0d(0x21f)],'description',_0x3e0abc),_0x15e4bf=responseNullableTimeout(_0x120647[_0x5d5a0d(0x204)],_0x5d5a0d(0x204),_0x3e0abc),_0x5bf752=responseNullableTimeout(_0x120647[_0x5d5a0d(0x249)],_0x5d5a0d(0x249),_0x3e0abc);return{'id':_0x3e0abc,'appCode':_0x23f010,'configCode':_0x3848c5,'configName':_0x925337,'channelType':_0x5d7b49,'endpointUrl':redactSensitive(_0x43271c),'channelConfig':redactSensitive(_0x165a65),'description':_0x2cc229,'connectTimeout':_0x15e4bf,'readTimeout':_0x5bf752,'endpointUrlRaw':_0x43271c,'channelConfigRaw':_0x165a65};}export async function requireExactNotificationConfig(_0x216d8b,_0x1f9427,_0x446cef){const _0x4e0c64=a197_0x168f92;let _0x262047;try{_0x262047=await getNotificationChannelConfig(_0x1f9427,_0x216d8b);}catch{throw safeApiFailure(_0x446cef,_0x4e0c64(0x24e),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x216d8b+_0x4e0c64(0x21d));}return normalizeExactNotificationConfig(_0x262047,_0x1f9427,_0x216d8b);}function a197_0x5a93(){const _0x41d83a=['Invalid\x20--','WECOM','Notification\x20config\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','every','ccList','Invalid\x20notification\x20config\x20response.','type','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','channelConfigRaw','\x20--format\x20compress','isArray','environment\x20variable\x20','file\x20','has','kind','2541765NVVwXa','emailTargets','setEncoding','endpointUrl:null','\x20failed.','keys','\x20has\x20an\x20invalid\x20channelType.','869598MuIrAH','a\x20JSON\x20object','\x20--type\x20','notification_config_response_invalid','notification_config_source_unavailable','endpointUrl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','parse','from-env','WEBHOOK','str','path','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-empty\x20string.','bool','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','Allowed\x20values:\x20','includes','prototype','19213ErvCcm','7776419Zgnlea','connectTimeout','stdin','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20is\x20missing\x20required\x20field\x20\x22','dry-run','_unavailable','num','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','stringify','a\x20supported\x20string','configName','\x20has\x20an\x20invalid\x20id.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','<redacted>','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_update_empty','88UAQlII','notification_config_field_required','file','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','env','endpointUrlRaw','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','call','description','notification_config_confirmation_required','388145NmYYRP','2101oJbIym','trim','notification_config_id_invalid','replyTo','notification_config_field_invalid','number','bccList','26fPKZld','messageTemplate','appCode','subjectPrefix','fromName','apiError','90UxVloe','create','notification_config_json_invalid','channelType','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22channelType\x22.','mutation','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20cannot\x20exceed\x20','Notification\x20config\x20list\x20item\x20','60510ObMmWF','isSafeInteger','Missing\x20notification\x20JSON\x20source.','EMAIL','channelConfig','Application-level\x20notification\x20config\x20ID','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20is\x20invalid.','FEISHU','yes','join','validation','name','push','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','readTimeout','boolean','a\x20non-empty\x20string','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','preflight','utf8','\x22configName\x22.','length','object','3659752wCgPbT','\x20characters.'];a197_0x5a93=function(){return _0x41d83a;};return a197_0x5a93();}export function projectNotificationConfig(_0x334c74){const _0x56c538=a197_0x168f92;return{'id':_0x334c74['id']??null,'appCode':_0x334c74[_0x56c538(0x22b)],'configCode':_0x334c74['configCode']??null,'configName':_0x334c74[_0x56c538(0x20e)],'channelType':_0x334c74[_0x56c538(0x232)],'endpointUrl':redactSensitive(_0x334c74['endpointUrl']),'channelConfig':redactSensitive(_0x334c74[_0x56c538(0x23d)]),'description':_0x334c74[_0x56c538(0x21f)]??null,'connectTimeout':_0x334c74[_0x56c538(0x204)]??null,'readTimeout':_0x334c74[_0x56c538(0x249)]??null};}export function notificationSelector(_0x1f3552){const _0x175d08=a197_0x168f92;return{'appCode':_0x1f3552[_0x175d08(0x22b)],'id':_0x1f3552['id'],'configCode':_0x1f3552[_0x175d08(0x24c)],'configName':_0x1f3552[_0x175d08(0x20e)],'channelType':_0x1f3552[_0x175d08(0x232)]};}export function createMutationInput(_0x37d984,_0x4342c5){const _0x20fd67=a197_0x168f92;return{'appCode':_0x37d984,'configName':_0x4342c5[_0x20fd67(0x20e)],'channelType':_0x4342c5[_0x20fd67(0x232)],...hasOwn(_0x4342c5,_0x20fd67(0x1f3))?{'endpointUrl':_0x4342c5[_0x20fd67(0x1f3)]}:{},...hasOwn(_0x4342c5,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4342c5[_0x20fd67(0x23d)])}:{},...hasOwn(_0x4342c5,_0x20fd67(0x21f))?{'description':_0x4342c5[_0x20fd67(0x21f)]}:{},...hasOwn(_0x4342c5,'connectTimeout')?{'connectTimeout':_0x4342c5[_0x20fd67(0x204)]}:{},...hasOwn(_0x4342c5,_0x20fd67(0x249))?{'readTimeout':_0x4342c5[_0x20fd67(0x249)]}:{}};}export function mergeUpdateInput(_0x44d235,_0x585a42){const _0x4ce6ef=a197_0x168f92;return{'id':_0x44d235['id'],'appCode':_0x44d235[_0x4ce6ef(0x22b)],'configName':_0x585a42['configName']??_0x44d235['configName'],'channelType':_0x585a42[_0x4ce6ef(0x232)]??_0x44d235['channelType'],'endpointUrl':hasOwn(_0x585a42,'endpointUrl')?_0x585a42[_0x4ce6ef(0x1f3)]:_0x44d235[_0x4ce6ef(0x21c)],'channelConfig':hasOwn(_0x585a42,_0x4ce6ef(0x23d))?serializeChannelConfig(_0x585a42[_0x4ce6ef(0x23d)]):_0x44d235[_0x4ce6ef(0x25e)],'description':hasOwn(_0x585a42,'description')?_0x585a42[_0x4ce6ef(0x21f)]:_0x44d235[_0x4ce6ef(0x21f)],'connectTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x204))?_0x585a42[_0x4ce6ef(0x204)]:_0x44d235[_0x4ce6ef(0x204)],'readTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x249))?_0x585a42['readTimeout']:_0x44d235[_0x4ce6ef(0x249)]};}export function plannedUpdateProjection(_0x1bef57,_0x23096a){const _0x10960f=a197_0x168f92;return projectNotificationConfig({'id':_0x1bef57['id'],'appCode':_0x1bef57['appCode'],'configCode':_0x1bef57[_0x10960f(0x24c)],'configName':_0x23096a[_0x10960f(0x20e)]??_0x1bef57[_0x10960f(0x20e)],'channelType':_0x23096a[_0x10960f(0x232)]??_0x1bef57['channelType'],'endpointUrl':hasOwn(_0x23096a,_0x10960f(0x1f3))?_0x23096a[_0x10960f(0x1f3)]:_0x1bef57[_0x10960f(0x21c)],'channelConfig':hasOwn(_0x23096a,_0x10960f(0x23d))?_0x23096a[_0x10960f(0x23d)]:_0x1bef57[_0x10960f(0x25e)],'description':hasOwn(_0x23096a,_0x10960f(0x21f))?_0x23096a[_0x10960f(0x21f)]:_0x1bef57[_0x10960f(0x21f)],'connectTimeout':hasOwn(_0x23096a,_0x10960f(0x204))?_0x23096a[_0x10960f(0x204)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1bef57[_0x10960f(0x204)],'readTimeout':hasOwn(_0x23096a,_0x10960f(0x249))?_0x23096a['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1bef57[_0x10960f(0x249)]});}export function requestedSafeFieldsMatch(_0x1b5e84,_0x43ef91,_0x555d7c){const _0x40ebef=a197_0x168f92,_0x18eaf6=[],_0x350fac=[],_0x5b3874=[];for(const _0x2c0b8e of[_0x40ebef(0x20e),'channelType',_0x40ebef(0x21f)]){if(!hasOwn(_0x555d7c,_0x2c0b8e))continue;_0x5b3874['push'](_0x2c0b8e),_0x18eaf6['push'](_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]),_0x350fac['push'](_0x1b5e84[_0x2c0b8e]!==_0x555d7c[_0x2c0b8e]&&_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]);}for(const _0x4e34c5 of['connectTimeout','readTimeout']){if(!hasOwn(_0x555d7c,_0x4e34c5))continue;const _0x304ab5=_0x555d7c[_0x4e34c5]??(_0x4e34c5===_0x40ebef(0x204)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b3874[_0x40ebef(0x247)](_0x4e34c5),_0x18eaf6[_0x40ebef(0x247)](_0x43ef91[_0x4e34c5]===_0x304ab5),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x4e34c5]!==_0x304ab5&&_0x43ef91[_0x4e34c5]===_0x304ab5);}return hasOwn(_0x555d7c,_0x40ebef(0x1f3))&&_0x555d7c[_0x40ebef(0x1f3)]===null&&(_0x5b3874[_0x40ebef(0x247)](_0x40ebef(0x268)),_0x18eaf6['push'](_0x43ef91[_0x40ebef(0x21c)]===null||_0x43ef91[_0x40ebef(0x21c)]===''),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x40ebef(0x21c)]!==null&&_0x1b5e84[_0x40ebef(0x21c)]!==''&&(_0x43ef91['endpointUrlRaw']===null||_0x43ef91[_0x40ebef(0x21c)]===''))),{'allMatch':_0x18eaf6[_0x40ebef(0x259)](Boolean),'provesChange':_0x350fac['some'](Boolean),'verifiedFields':_0x5b3874};}export function validateNotificationDeleteReadback(_0x40d470,_0x56b71f,_0xb543e9){const _0xb4ee89=a197_0x168f92;for(const [_0xebb45f,_0x5cb49f]of _0x40d470['entries']()){if(!Number[_0xb4ee89(0x23a)](_0x5cb49f['id'])||_0x5cb49f['id']<=0x0)throw notificationError(_0xb4ee89(0x26f),_0xb4ee89(0x238)+(_0xebb45f+0x1)+_0xb4ee89(0x20f));if(_0x5cb49f[_0xb4ee89(0x22b)]!==_0x56b71f)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x5cb49f[_0xb4ee89(0x232)]!==_0xb543e9)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+_0xb4ee89(0x26b));}}export function safeApiFailure(_0x29e72c,_0x4500f9,_0x2320c4){const _0x55b59c=a197_0x168f92;return notificationError('notification_config_'+_0x29e72c+'_'+(_0x4500f9===_0x55b59c(0x235)?'failed':_0x4500f9+_0x55b59c(0x209)),'Notification\x20config\x20'+_0x29e72c+'\x20'+_0x4500f9+_0x55b59c(0x269),_0x2320c4);}export function notificationLookupCommand(_0x186924,_0x4d324e){const _0x1ded86=a197_0x168f92;return _0x1ded86(0x219)+_0x186924+_0x1ded86(0x26e)+_0x4d324e+_0x1ded86(0x25f);}function validateNotificationDocument(_0x125aa1,_0x26396e){const _0x41297b=a197_0x168f92;for(const _0x36a61b of Object[_0x41297b(0x26a)](_0x125aa1)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x36a61b))throw notificationError('notification_config_field_forbidden',_0x41297b(0x1fa)+_0x36a61b+_0x41297b(0x210));if(!ALLOWED_INPUT_FIELDS[_0x41297b(0x263)](_0x36a61b))throw notificationError('notification_config_field_unknown','Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x36a61b+'\x22.');}if(_0x26396e==='update'&&Object[_0x41297b(0x26a)](_0x125aa1)[_0x41297b(0x251)]===0x0)throw notificationError(_0x41297b(0x215),_0x41297b(0x1f4));const _0x5351e2={};if(hasOwn(_0x125aa1,'configName'))_0x5351e2['configName']=validateRequiredString(_0x125aa1[_0x41297b(0x20e)],_0x41297b(0x20e),0x80);else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),'Create\x20JSON\x20requires\x20field\x20'+_0x41297b(0x250));}if(hasOwn(_0x125aa1,'channelType')){if(typeof _0x125aa1['channelType']!==_0x41297b(0x23f))throw invalidFieldType(_0x41297b(0x232),_0x41297b(0x20d));const _0xff8ca=_0x125aa1['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x41297b(0x200)](_0xff8ca))throw notificationError(_0x41297b(0x226),_0x41297b(0x236),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5351e2[_0x41297b(0x232)]=_0xff8ca;}else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),_0x41297b(0x1fe)+_0x41297b(0x234));}for(const [_0x5c3c02,_0x2fbe8a]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x125aa1,_0x5c3c02))continue;const _0x5b9266=_0x125aa1[_0x5c3c02];if(_0x5b9266!==null&&typeof _0x5b9266!==_0x41297b(0x23f))throw invalidFieldType(_0x5c3c02,'a\x20string\x20or\x20null');if(typeof _0x5b9266===_0x41297b(0x23f)&&_0x5b9266[_0x41297b(0x251)]>_0x2fbe8a)throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x5c3c02+'\x22\x20cannot\x20exceed\x20'+_0x2fbe8a+_0x41297b(0x254));_0x5351e2[_0x5c3c02]=_0x5b9266;}if(hasOwn(_0x125aa1,_0x41297b(0x23d))){const _0x9aaec=_0x125aa1['channelConfig'];if(_0x9aaec===null&&_0x26396e===_0x41297b(0x230))throw invalidFieldType(_0x41297b(0x23d),_0x41297b(0x26d));if(_0x9aaec!==null&&!isJsonObject(_0x9aaec))throw invalidFieldType('channelConfig',_0x26396e==='update'?'a\x20JSON\x20object\x20or\x20null':_0x41297b(0x26d));_0x9aaec!==null&&validateChannelConfigFields(_0x5351e2[_0x41297b(0x232)],_0x9aaec),_0x5351e2[_0x41297b(0x23d)]=_0x9aaec;}for(const _0x24820f of[_0x41297b(0x204),'readTimeout']){if(!hasOwn(_0x125aa1,_0x24820f))continue;const _0x225d94=_0x125aa1[_0x24820f];if(_0x225d94!==null&&(!Number[_0x41297b(0x23a)](_0x225d94)||_0x225d94<0x0))throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x24820f+_0x41297b(0x258));_0x5351e2[_0x24820f]=_0x225d94;}return _0x5351e2;}function validateRequiredString(_0x238ebf,_0x3d5d90,_0x4dae39){const _0x43c223=a197_0x168f92;if(typeof _0x238ebf!==_0x43c223(0x23f))throw invalidFieldType(_0x3d5d90,_0x43c223(0x24b));const _0x4f54e2=_0x238ebf[_0x43c223(0x223)]();if(!_0x4f54e2)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x1fb));if(_0x4f54e2[_0x43c223(0x251)]>_0x4dae39)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x237)+_0x4dae39+_0x43c223(0x254));return _0x4f54e2;}function validateChannelConfigFields(_0x215925,_0x454dd3){const _0x2663e4=a197_0x168f92;if(hasOwn(_0x454dd3,_0x2663e4(0x22a)))throw forbiddenChannelConfigField(_0x2663e4(0x22a));if(_0x215925===_0x2663e4(0x23c))for(const _0x1ba70d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x454dd3,_0x1ba70d))throw forbiddenChannelConfigField(_0x1ba70d);}}function forbiddenChannelConfigField(_0x15774b){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x15774b+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x59dc13,_0x5835dc){const _0x55e2e8=a197_0x168f92;return notificationError(_0x55e2e8(0x226),_0x55e2e8(0x1fa)+_0x59dc13+'\x22\x20must\x20be\x20'+_0x5835dc+'.');}function serializeChannelConfig(_0x5ecfd0){const _0x55b129=a197_0x168f92;return _0x5ecfd0===null||_0x5ecfd0===undefined?null:JSON[_0x55b129(0x20c)](_0x5ecfd0);}function redactSensitive(_0x377c16){const _0x3945f5=a197_0x168f92;return _0x377c16===null||_0x377c16===undefined||_0x377c16===''?null:_0x3945f5(0x212);}function requireResponseString(_0x178b2e,_0x15cf07,_0x276eff){const _0x94af75=a197_0x168f92;if(typeof _0x178b2e!==_0x94af75(0x23f)||_0x178b2e[_0x94af75(0x223)]()==='')throw CliErrors[_0x94af75(0x22e)](_0x94af75(0x25b),'Item\x20'+(_0x276eff+0x1)+_0x94af75(0x207)+_0x15cf07+'\x22.');return _0x178b2e[_0x94af75(0x223)]();}function requireExactString(_0x55c319,_0x252ed1,_0x2e6df5){const _0x46c759=a197_0x168f92;if(typeof _0x55c319!==_0x46c759(0x23f)||_0x55c319[_0x46c759(0x223)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2e6df5+_0x46c759(0x207)+_0x252ed1+'\x22.');return _0x55c319[_0x46c759(0x223)]();}function responseNullableString(_0x2c1ed6,_0x3aeaa7,_0x418fab){const _0x159e65=a197_0x168f92;if(_0x2c1ed6===undefined||_0x2c1ed6===null)return null;if(typeof _0x2c1ed6!==_0x159e65(0x23f))throw notificationError(_0x159e65(0x26f),_0x159e65(0x257)+_0x418fab+_0x159e65(0x21a)+_0x3aeaa7+'\x22.');return _0x2c1ed6;}function responseNullableTimeout(_0x28b6ad,_0x20cd13,_0x41d0a4){const _0x1f7e21=a197_0x168f92;if(_0x28b6ad===undefined||_0x28b6ad===null)return null;if(!Number[_0x1f7e21(0x23a)](_0x28b6ad)||_0x28b6ad<0x0)throw notificationError(_0x1f7e21(0x26f),'Notification\x20config\x20'+_0x41d0a4+_0x1f7e21(0x21a)+_0x20cd13+'\x22.');return _0x28b6ad;}function normalizeNullableString(_0x3b8422){return typeof _0x3b8422==='string'?_0x3b8422:null;}function isJsonObject(_0x2d5d3c){const _0x36a13d=a197_0x168f92;return _0x2d5d3c!==null&&typeof _0x2d5d3c===_0x36a13d(0x252)&&!Array[_0x36a13d(0x260)](_0x2d5d3c);}function hasOwn(_0x5ddb82,_0x4ab480){const _0x4d18cf=a197_0x168f92;return Object[_0x4d18cf(0x201)]['hasOwnProperty'][_0x4d18cf(0x21e)](_0x5ddb82,_0x4ab480);}async function readStdin(){const _0x5a8adb=a197_0x168f92;let _0x22f386='';process['stdin'][_0x5a8adb(0x267)]('utf8');for await(const _0x41a803 of process['stdin'])_0x22f386+=_0x41a803;return _0x22f386;}
1
+ const a197_0x1e9c36=a197_0x3bdc;function a197_0x3473(){const _0x2574cf=['stringify','Notification\x20JSON\x20field\x20\x22','trim','call','replyTo','channelType','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','isSafeInteger','notification_config_update_empty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22configName\x22.','29170qOmTJk','stdin','update','configName','a\x20string\x20or\x20null','subjectPrefix','notification_config_field_required','ccList','Notification\x20config\x20list\x20item\x20','prototype','push','isArray','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','every','860kzuKJL','channelConfigRaw','name','Allowed\x20values:\x20','notification_config_field_forbidden','32waqnad','from-env','notification_config_confirmation_required','WECOM','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','apiError','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20from\x20','3355rIwwXi','entries','Item\x20','path','description','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','bccList','WEBHOOK','readTimeout','<redacted>','6Ntgult','notification_config_','\x20has\x20an\x20invalid\x20id.','notification_config_source_unavailable','preflight','DINGTALK','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20supported\x20string','FEISHU','\x20is\x20missing\x20required\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','number','channelConfig','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20has\x20an\x20unsupported\x20channelType.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','451535hrQOKP','env','emailTargets','endpointUrl:null','file','notification_config_channel_field_forbidden','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','includes','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','Missing\x20notification\x20JSON\x20source.','\x20characters.','keys','updateTime','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20config\x20','channelCode','Application-level\x20notification\x20config\x20ID','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','784728RirHFN','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','Notification\x20JSON\x20channelConfig\x20field\x20\x22','132828HeSSJd','notification_config_field_invalid','endpointUrlRaw','\x22\x20must\x20be\x20','str','Invalid\x20notification\x20config\x20response.','mutation','boolean','_unavailable','notification_config_id_invalid','EMAIL','Invalid\x20--','has','endpointUrl','connectTimeout','environment\x20variable\x20','configCode','a\x20JSON\x20object','\x22\x20is\x20forbidden.','string','115596JTduCx','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','bool','notification_config_response_invalid','create','utf8','dry-run','4dIlDUp','\x22channelType\x22.','failed','notification_config_json_invalid','validation','Create\x20JSON\x20requires\x20field\x20','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','fromName','kind','4899284NDRngR','num','1544575yMCBxV'];a197_0x3473=function(){return _0x2574cf;};return a197_0x3473();}(function(_0x51b05d,_0x5d493f){const _0x47261f=a197_0x3bdc,_0xac62f0=_0x51b05d();while(!![]){try{const _0x1e3a37=-parseInt(_0x47261f(0x19a))/0x1*(parseInt(_0x47261f(0x1b3))/0x2)+parseInt(_0x47261f(0x17a))/0x3+-parseInt(_0x47261f(0x1a4))/0x4+parseInt(_0x47261f(0x1a6))/0x5*(-parseInt(_0x47261f(0x1db))/0x6)+-parseInt(_0x47261f(0x165))/0x7*(parseInt(_0x47261f(0x1c6))/0x8)+parseInt(_0x47261f(0x192))/0x9*(-parseInt(_0x47261f(0x1c1))/0xa)+parseInt(_0x47261f(0x1d0))/0xb*(parseInt(_0x47261f(0x17e))/0xc);if(_0x1e3a37===_0x5d493f)break;else _0xac62f0['push'](_0xac62f0['shift']());}catch(_0xbf76d7){_0xac62f0['push'](_0xac62f0['shift']());}}}(a197_0x3473,0xa6bbd));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x1e9c36(0x188),a197_0x1e9c36(0x15c),a197_0x1e9c36(0x158),a197_0x1e9c36(0x1c9),a197_0x1e9c36(0x1d8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a197_0x1e9c36(0x18b),a197_0x1e9c36(0x160),a197_0x1e9c36(0x1d4),a197_0x1e9c36(0x18c),a197_0x1e9c36(0x1d9)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x1e9c36(0x1a0),a197_0x1e9c36(0x18e),a197_0x1e9c36(0x177)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x1e9c36(0x167),'recipients',a197_0x1e9c36(0x1ba),a197_0x1e9c36(0x1d7),a197_0x1e9c36(0x1ab),a197_0x1e9c36(0x1b8),a197_0x1e9c36(0x1a2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x1e9c36(0x169),'type':a197_0x1e9c36(0x191),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x1e9c36(0x185),'required':![],'default':![],'description':a197_0x1e9c36(0x1a1)},{'name':a197_0x1e9c36(0x1c7),'type':a197_0x1e9c36(0x191),'required':![],'description':a197_0x1e9c36(0x15a)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x1e9c36(0x15f),'required':!![],'description':a197_0x1e9c36(0x178)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5a63b3,_0x1a5dd9,_0x2c0214){return new CliError(_0x5a63b3,0x1,_0x1a5dd9,_0x2c0214);}export function readNotificationId(_0x58975f){const _0x59eb95=a197_0x1e9c36,_0x14fb36=_0x58975f[_0x59eb95(0x1a5)]('id');if(!Number[_0x59eb95(0x1af)](_0x14fb36)||_0x14fb36<=0x0)throw notificationError(_0x59eb95(0x187),_0x59eb95(0x16b));return _0x14fb36;}export function requireNotificationExplicitYes(_0x13aefe){const _0x5f2d5f=a197_0x1e9c36;if(_0x13aefe[_0x5f2d5f(0x195)](_0x5f2d5f(0x199))||_0x13aefe['bool']('yes'))return;throw notificationError(_0x5f2d5f(0x1c8),_0x5f2d5f(0x1cb),_0x5f2d5f(0x164));}export function readNotificationChannelType(_0x27c422,_0x245650='type',_0x154281=a197_0x1e9c36(0x188)){const _0x4d8d9b=a197_0x1e9c36,_0x42cc1c=_0x27c422[_0x4d8d9b(0x182)](_0x245650)[_0x4d8d9b(0x1a9)]()||_0x154281;if(!NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x16d)](_0x42cc1c))throw CliErrors[_0x4d8d9b(0x19e)](_0x4d8d9b(0x189)+_0x245650+':\x20'+_0x42cc1c,_0x4d8d9b(0x1c4)+NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x1ca)](',\x20')+'.');return _0x42cc1c;}export function assertSingleNotificationSource(_0x3d2774){const _0x58cda9=a197_0x1e9c36,_0x2a5142=[],_0xff3d9b=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x169))['trim']();if(_0xff3d9b)_0x2a5142['push']({'kind':'file','path':_0xff3d9b});if(_0x3d2774[_0x58cda9(0x195)](_0x58cda9(0x1b4)))_0x2a5142[_0x58cda9(0x1bd)]({'kind':_0x58cda9(0x1b4)});const _0x235303=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x1c7))[_0x58cda9(0x1a9)]();if(_0x235303)_0x2a5142['push']({'kind':'env','name':_0x235303});if(_0x2a5142['length']===0x0)throw CliErrors['validation'](_0x58cda9(0x171),_0x58cda9(0x17b));if(_0x2a5142[_0x58cda9(0x159)]>0x1)throw CliErrors['validation'](_0x58cda9(0x175),_0x58cda9(0x17b));return _0x2a5142[0x0];}export async function readNotificationDocument(_0x35f880,_0x4a0031){const _0x289d43=a197_0x1e9c36,_0x3a0fbb=assertSingleNotificationSource(_0x35f880),_0x509991=_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169)?'file\x20'+_0x3a0fbb[_0x289d43(0x1d3)]:_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)?_0x289d43(0x18d)+_0x3a0fbb[_0x289d43(0x1c3)]:_0x289d43(0x1b4);let _0x40b947;try{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169))_0x40b947=await readFile(_0x3a0fbb[_0x289d43(0x1d3)],_0x289d43(0x198));else{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)){if(!(_0x3a0fbb['name']in process.env))throw notificationError(_0x289d43(0x1de),_0x289d43(0x1d5)+_0x3a0fbb['name']);_0x40b947=process.env[_0x3a0fbb.name]??'';}else _0x40b947=await readStdin();}}catch(_0x5b672c){if(_0x5b672c instanceof CliError)throw _0x5b672c;throw notificationError(_0x289d43(0x1de),_0x289d43(0x15e)+_0x509991+'.');}let _0x270284;try{_0x270284=JSON['parse'](_0x40b947);}catch{throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x270284))throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+_0x289d43(0x194));return validateNotificationDocument(_0x270284,_0x4a0031);}export function projectNotificationListConfig(_0x31ba34,_0x15a2a0){const _0x1baa24=a197_0x1e9c36;return{'id':typeof _0x31ba34['id']===_0x1baa24(0x15f)?_0x31ba34['id']:null,'configCode':requireResponseString(_0x31ba34[_0x1baa24(0x18e)],'configCode',_0x15a2a0),'configName':requireResponseString(_0x31ba34['configName'],_0x1baa24(0x1b6),_0x15a2a0),'channelType':requireResponseString(_0x31ba34[_0x1baa24(0x1ac)],_0x1baa24(0x1ac),_0x15a2a0),'description':normalizeNullableString(_0x31ba34[_0x1baa24(0x1d4)]),'createTime':normalizeNullableString(_0x31ba34['createTime']),'updateTime':normalizeNullableString(_0x31ba34[_0x1baa24(0x174)])};}function a197_0x3bdc(_0x49ac77,_0x2ea21a){_0x49ac77=_0x49ac77-0x158;const _0x34730d=a197_0x3473();let _0x3bdcf7=_0x34730d[_0x49ac77];return _0x3bdcf7;}export function normalizeExactNotificationConfig(_0x47c136,_0x3ab9a1,_0x32cc36){const _0x612b13=a197_0x1e9c36;if(!Number[_0x612b13(0x1af)](_0x47c136['id'])||_0x47c136['id']!==_0x3ab9a1)throw notificationError(_0x612b13(0x196),_0x612b13(0x1bf)+_0x3ab9a1+'.');if(_0x47c136['appCode']!==_0x32cc36)throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x1b1));const _0x4f93db=requireExactString(_0x47c136[_0x612b13(0x1b6)],_0x612b13(0x1b6),_0x3ab9a1),_0x3992f2=requireExactString(_0x47c136['configCode'],'configCode',_0x3ab9a1),_0x537ffa=requireExactString(_0x47c136[_0x612b13(0x1ac)],_0x612b13(0x1ac),_0x3ab9a1);if(!NOTIFICATION_CHANNEL_TYPES[_0x612b13(0x16d)](_0x537ffa))throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x163));const _0x4ca14e=responseNullableString(_0x47c136[_0x612b13(0x18b)],_0x612b13(0x18b),_0x3ab9a1),_0x2535a5=responseNullableString(_0x47c136['channelConfig'],_0x612b13(0x160),_0x3ab9a1),_0xced6ae=responseNullableString(_0x47c136[_0x612b13(0x1d4)],_0x612b13(0x1d4),_0x3ab9a1),_0x5b0e08=responseNullableTimeout(_0x47c136[_0x612b13(0x18c)],_0x612b13(0x18c),_0x3ab9a1),_0x46f7ed=responseNullableTimeout(_0x47c136[_0x612b13(0x1d9)],'readTimeout',_0x3ab9a1);return{'id':_0x3ab9a1,'appCode':_0x32cc36,'configCode':_0x3992f2,'configName':_0x4f93db,'channelType':_0x537ffa,'endpointUrl':redactSensitive(_0x4ca14e),'channelConfig':redactSensitive(_0x2535a5),'description':_0xced6ae,'connectTimeout':_0x5b0e08,'readTimeout':_0x46f7ed,'endpointUrlRaw':_0x4ca14e,'channelConfigRaw':_0x2535a5};}export async function requireExactNotificationConfig(_0x292666,_0x5e90e7,_0x3a4146){const _0x26029b=a197_0x1e9c36;let _0x165b01;try{_0x165b01=await getNotificationChannelConfig(_0x5e90e7,_0x292666);}catch{throw safeApiFailure(_0x3a4146,_0x26029b(0x1df),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x292666+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x165b01,_0x5e90e7,_0x292666);}export function projectNotificationConfig(_0x3ca4dd){const _0x11c188=a197_0x1e9c36;return{'id':_0x3ca4dd['id']??null,'appCode':_0x3ca4dd[_0x11c188(0x1a0)],'configCode':_0x3ca4dd['configCode']??null,'configName':_0x3ca4dd[_0x11c188(0x1b6)],'channelType':_0x3ca4dd['channelType'],'endpointUrl':redactSensitive(_0x3ca4dd['endpointUrl']),'channelConfig':redactSensitive(_0x3ca4dd[_0x11c188(0x160)]),'description':_0x3ca4dd['description']??null,'connectTimeout':_0x3ca4dd[_0x11c188(0x18c)]??null,'readTimeout':_0x3ca4dd[_0x11c188(0x1d9)]??null};}export function notificationSelector(_0x42e44b){const _0x87b05a=a197_0x1e9c36;return{'appCode':_0x42e44b[_0x87b05a(0x1a0)],'id':_0x42e44b['id'],'configCode':_0x42e44b[_0x87b05a(0x18e)],'configName':_0x42e44b[_0x87b05a(0x1b6)],'channelType':_0x42e44b[_0x87b05a(0x1ac)]};}export function createMutationInput(_0x3c66a2,_0xa73468){const _0xd7d1e9=a197_0x1e9c36;return{'appCode':_0x3c66a2,'configName':_0xa73468[_0xd7d1e9(0x1b6)],'channelType':_0xa73468[_0xd7d1e9(0x1ac)],...hasOwn(_0xa73468,'endpointUrl')?{'endpointUrl':_0xa73468[_0xd7d1e9(0x18b)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x160))?{'channelConfig':serializeChannelConfig(_0xa73468[_0xd7d1e9(0x160)])}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d4))?{'description':_0xa73468[_0xd7d1e9(0x1d4)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x18c))?{'connectTimeout':_0xa73468['connectTimeout']}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d9))?{'readTimeout':_0xa73468[_0xd7d1e9(0x1d9)]}:{}};}export function mergeUpdateInput(_0xf15ec1,_0x380a5b){const _0x243d05=a197_0x1e9c36;return{'id':_0xf15ec1['id'],'appCode':_0xf15ec1[_0x243d05(0x1a0)],'configName':_0x380a5b[_0x243d05(0x1b6)]??_0xf15ec1['configName'],'channelType':_0x380a5b[_0x243d05(0x1ac)]??_0xf15ec1[_0x243d05(0x1ac)],'endpointUrl':hasOwn(_0x380a5b,_0x243d05(0x18b))?_0x380a5b[_0x243d05(0x18b)]:_0xf15ec1['endpointUrlRaw'],'channelConfig':hasOwn(_0x380a5b,_0x243d05(0x160))?serializeChannelConfig(_0x380a5b[_0x243d05(0x160)]):_0xf15ec1[_0x243d05(0x1c2)],'description':hasOwn(_0x380a5b,_0x243d05(0x1d4))?_0x380a5b['description']:_0xf15ec1[_0x243d05(0x1d4)],'connectTimeout':hasOwn(_0x380a5b,_0x243d05(0x18c))?_0x380a5b[_0x243d05(0x18c)]:_0xf15ec1[_0x243d05(0x18c)],'readTimeout':hasOwn(_0x380a5b,_0x243d05(0x1d9))?_0x380a5b['readTimeout']:_0xf15ec1[_0x243d05(0x1d9)]};}export function plannedUpdateProjection(_0x202927,_0x4b96a5){const _0x4ca9b4=a197_0x1e9c36;return projectNotificationConfig({'id':_0x202927['id'],'appCode':_0x202927[_0x4ca9b4(0x1a0)],'configCode':_0x202927[_0x4ca9b4(0x18e)],'configName':_0x4b96a5['configName']??_0x202927['configName'],'channelType':_0x4b96a5['channelType']??_0x202927['channelType'],'endpointUrl':hasOwn(_0x4b96a5,_0x4ca9b4(0x18b))?_0x4b96a5[_0x4ca9b4(0x18b)]:_0x202927[_0x4ca9b4(0x180)],'channelConfig':hasOwn(_0x4b96a5,_0x4ca9b4(0x160))?_0x4b96a5[_0x4ca9b4(0x160)]:_0x202927[_0x4ca9b4(0x1c2)],'description':hasOwn(_0x4b96a5,'description')?_0x4b96a5[_0x4ca9b4(0x1d4)]:_0x202927[_0x4ca9b4(0x1d4)],'connectTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x18c))?_0x4b96a5[_0x4ca9b4(0x18c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x202927[_0x4ca9b4(0x18c)],'readTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x1d9))?_0x4b96a5['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x202927['readTimeout']});}export function requestedSafeFieldsMatch(_0x47345b,_0x1c36c5,_0x54145e){const _0x19179e=a197_0x1e9c36,_0x4ca850=[],_0x3ebf1c=[],_0x5f7cd4=[];for(const _0x12276b of[_0x19179e(0x1b6),_0x19179e(0x1ac),'description']){if(!hasOwn(_0x54145e,_0x12276b))continue;_0x5f7cd4[_0x19179e(0x1bd)](_0x12276b),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b[_0x12276b]!==_0x54145e[_0x12276b]&&_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]);}for(const _0x3e5f85 of[_0x19179e(0x18c),_0x19179e(0x1d9)]){if(!hasOwn(_0x54145e,_0x3e5f85))continue;const _0x447341=_0x54145e[_0x3e5f85]??(_0x3e5f85===_0x19179e(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5f7cd4[_0x19179e(0x1bd)](_0x3e5f85),_0x4ca850['push'](_0x1c36c5[_0x3e5f85]===_0x447341),_0x3ebf1c['push'](_0x47345b[_0x3e5f85]!==_0x447341&&_0x1c36c5[_0x3e5f85]===_0x447341);}return hasOwn(_0x54145e,_0x19179e(0x18b))&&_0x54145e[_0x19179e(0x18b)]===null&&(_0x5f7cd4[_0x19179e(0x1bd)](_0x19179e(0x168)),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x19179e(0x180)]===null||_0x1c36c5[_0x19179e(0x180)]===''),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b['endpointUrlRaw']!==null&&_0x47345b['endpointUrlRaw']!==''&&(_0x1c36c5['endpointUrlRaw']===null||_0x1c36c5[_0x19179e(0x180)]===''))),{'allMatch':_0x4ca850[_0x19179e(0x1c0)](Boolean),'provesChange':_0x3ebf1c['some'](Boolean),'verifiedFields':_0x5f7cd4};}export function validateNotificationDeleteReadback(_0x3fecd2,_0x3386b6,_0x366f23){const _0x34806e=a197_0x1e9c36;for(const [_0x199df0,_0x2db8e1]of _0x3fecd2[_0x34806e(0x1d1)]()){if(!Number[_0x34806e(0x1af)](_0x2db8e1['id'])||_0x2db8e1['id']<=0x0)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1dd));if(_0x2db8e1[_0x34806e(0x1a0)]!==_0x3386b6)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2db8e1[_0x34806e(0x1ac)]!==_0x366f23)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1ae));}}export function safeApiFailure(_0x791a5e,_0x1d9a64,_0x23faa4){const _0x5ec257=a197_0x1e9c36;return notificationError(_0x5ec257(0x1dc)+_0x791a5e+'_'+(_0x1d9a64===_0x5ec257(0x184)?_0x5ec257(0x19c):_0x1d9a64+_0x5ec257(0x186)),_0x5ec257(0x176)+_0x791a5e+'\x20'+_0x1d9a64+'\x20failed.',_0x23faa4);}export function notificationLookupCommand(_0x33b105,_0x16fce8){const _0x3514be=a197_0x1e9c36;return _0x3514be(0x193)+_0x33b105+_0x3514be(0x161)+_0x16fce8+'\x20--format\x20compress';}function validateNotificationDocument(_0x5bbd30,_0x13a7e8){const _0x8f554d=a197_0x1e9c36;for(const _0x22cdc9 of Object[_0x8f554d(0x173)](_0x5bbd30)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x22cdc9))throw notificationError(_0x8f554d(0x1c5),'Notification\x20JSON\x20field\x20\x22'+_0x22cdc9+_0x8f554d(0x179));if(!ALLOWED_INPUT_FIELDS[_0x8f554d(0x18a)](_0x22cdc9))throw notificationError(_0x8f554d(0x1d6),_0x8f554d(0x16f)+_0x22cdc9+'\x22.');}if(_0x13a7e8===_0x8f554d(0x1b5)&&Object[_0x8f554d(0x173)](_0x5bbd30)['length']===0x0)throw notificationError(_0x8f554d(0x1b0),_0x8f554d(0x16e));const _0x4a888d={};if(hasOwn(_0x5bbd30,_0x8f554d(0x1b6)))_0x4a888d[_0x8f554d(0x1b6)]=validateRequiredString(_0x5bbd30[_0x8f554d(0x1b6)],_0x8f554d(0x1b6),0x80);else{if(_0x13a7e8===_0x8f554d(0x197))throw notificationError(_0x8f554d(0x1b9),_0x8f554d(0x19f)+_0x8f554d(0x1b2));}if(hasOwn(_0x5bbd30,_0x8f554d(0x1ac))){if(typeof _0x5bbd30['channelType']!==_0x8f554d(0x191))throw invalidFieldType(_0x8f554d(0x1ac),_0x8f554d(0x15b));const _0x3b828b=_0x5bbd30[_0x8f554d(0x1ac)][_0x8f554d(0x1a9)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x8f554d(0x16d)](_0x3b828b))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x16c),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x4a888d[_0x8f554d(0x1ac)]=_0x3b828b;}else{if(_0x13a7e8==='create')throw notificationError(_0x8f554d(0x1b9),'Create\x20JSON\x20requires\x20field\x20'+_0x8f554d(0x19b));}for(const [_0x1db835,_0x136ce1]of[[_0x8f554d(0x18b),0x200],[_0x8f554d(0x1d4),0x100]]){if(!hasOwn(_0x5bbd30,_0x1db835))continue;const _0x27a1ea=_0x5bbd30[_0x1db835];if(_0x27a1ea!==null&&typeof _0x27a1ea!==_0x8f554d(0x191))throw invalidFieldType(_0x1db835,_0x8f554d(0x1b7));if(typeof _0x27a1ea===_0x8f554d(0x191)&&_0x27a1ea[_0x8f554d(0x159)]>_0x136ce1)throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x1db835+_0x8f554d(0x1ce)+_0x136ce1+'\x20characters.');_0x4a888d[_0x1db835]=_0x27a1ea;}if(hasOwn(_0x5bbd30,_0x8f554d(0x160))){const _0x5d27d9=_0x5bbd30[_0x8f554d(0x160)];if(_0x5d27d9===null&&_0x13a7e8===_0x8f554d(0x197))throw invalidFieldType(_0x8f554d(0x160),'a\x20JSON\x20object');if(_0x5d27d9!==null&&!isJsonObject(_0x5d27d9))throw invalidFieldType('channelConfig',_0x13a7e8===_0x8f554d(0x1b5)?'a\x20JSON\x20object\x20or\x20null':_0x8f554d(0x18f));_0x5d27d9!==null&&validateChannelConfigFields(_0x4a888d[_0x8f554d(0x1ac)],_0x5d27d9),_0x4a888d['channelConfig']=_0x5d27d9;}for(const _0x3948d2 of['connectTimeout','readTimeout']){if(!hasOwn(_0x5bbd30,_0x3948d2))continue;const _0x17898a=_0x5bbd30[_0x3948d2];if(_0x17898a!==null&&(!Number[_0x8f554d(0x1af)](_0x17898a)||_0x17898a<0x0))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x3948d2+_0x8f554d(0x1cc));_0x4a888d[_0x3948d2]=_0x17898a;}return _0x4a888d;}function validateRequiredString(_0x4bf4fd,_0x54401a,_0x34299c){const _0x24fa61=a197_0x1e9c36;if(typeof _0x4bf4fd!==_0x24fa61(0x191))throw invalidFieldType(_0x54401a,_0x24fa61(0x1ad));const _0x308b04=_0x4bf4fd[_0x24fa61(0x1a9)]();if(!_0x308b04)throw notificationError(_0x24fa61(0x17f),'Notification\x20JSON\x20field\x20\x22'+_0x54401a+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x308b04['length']>_0x34299c)throw notificationError(_0x24fa61(0x17f),_0x24fa61(0x1a8)+_0x54401a+_0x24fa61(0x1ce)+_0x34299c+_0x24fa61(0x172));return _0x308b04;}function validateChannelConfigFields(_0x223b23,_0x1af9b5){const _0x482fe3=a197_0x1e9c36;if(hasOwn(_0x1af9b5,_0x482fe3(0x17c)))throw forbiddenChannelConfigField(_0x482fe3(0x17c));if(_0x223b23==='EMAIL')for(const _0x1195de of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1af9b5,_0x1195de))throw forbiddenChannelConfigField(_0x1195de);}}function forbiddenChannelConfigField(_0x59cf85){const _0x55e0e3=a197_0x1e9c36;return notificationError(_0x55e0e3(0x16a),_0x55e0e3(0x17d)+_0x59cf85+_0x55e0e3(0x190));}function invalidFieldType(_0x4adeb0,_0x405c5b){const _0x395112=a197_0x1e9c36;return notificationError(_0x395112(0x17f),_0x395112(0x1a8)+_0x4adeb0+_0x395112(0x181)+_0x405c5b+'.');}function serializeChannelConfig(_0x2f11a5){const _0x78a205=a197_0x1e9c36;return _0x2f11a5===null||_0x2f11a5===undefined?null:JSON[_0x78a205(0x1a7)](_0x2f11a5);}function redactSensitive(_0x3033fd){const _0x1814f9=a197_0x1e9c36;return _0x3033fd===null||_0x3033fd===undefined||_0x3033fd===''?null:_0x1814f9(0x1da);}function requireResponseString(_0x269978,_0x2d13fc,_0x4fa68b){const _0x4044da=a197_0x1e9c36;if(typeof _0x269978!=='string'||_0x269978[_0x4044da(0x1a9)]()==='')throw CliErrors[_0x4044da(0x1cd)](_0x4044da(0x183),_0x4044da(0x1d2)+(_0x4fa68b+0x1)+_0x4044da(0x15d)+_0x2d13fc+'\x22.');return _0x269978[_0x4044da(0x1a9)]();}function requireExactString(_0x170fdc,_0x22efbe,_0x5eefdc){const _0x14f526=a197_0x1e9c36;if(typeof _0x170fdc!=='string'||_0x170fdc[_0x14f526(0x1a9)]()==='')throw notificationError(_0x14f526(0x196),_0x14f526(0x176)+_0x5eefdc+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x22efbe+'\x22.');return _0x170fdc[_0x14f526(0x1a9)]();}function responseNullableString(_0xff51d2,_0x2ea35,_0x1dc2d8){const _0x3a3c63=a197_0x1e9c36;if(_0xff51d2===undefined||_0xff51d2===null)return null;if(typeof _0xff51d2!==_0x3a3c63(0x191))throw notificationError(_0x3a3c63(0x196),_0x3a3c63(0x176)+_0x1dc2d8+_0x3a3c63(0x162)+_0x2ea35+'\x22.');return _0xff51d2;}function responseNullableTimeout(_0x210b03,_0x2a3ae9,_0x216c8e){const _0x552af7=a197_0x1e9c36;if(_0x210b03===undefined||_0x210b03===null)return null;if(!Number[_0x552af7(0x1af)](_0x210b03)||_0x210b03<0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x216c8e+_0x552af7(0x162)+_0x2a3ae9+'\x22.');return _0x210b03;}function normalizeNullableString(_0x35f11a){const _0x4e3100=a197_0x1e9c36;return typeof _0x35f11a===_0x4e3100(0x191)?_0x35f11a:null;}function isJsonObject(_0x5c98da){const _0x955b81=a197_0x1e9c36;return _0x5c98da!==null&&typeof _0x5c98da==='object'&&!Array[_0x955b81(0x1be)](_0x5c98da);}function hasOwn(_0x3dce21,_0x4bf735){const _0x4820a8=a197_0x1e9c36;return Object[_0x4820a8(0x1bc)]['hasOwnProperty'][_0x4820a8(0x1aa)](_0x3dce21,_0x4bf735);}async function readStdin(){const _0x59c1aa=a197_0x1e9c36;let _0x1f3f6f='';process['stdin'][_0x59c1aa(0x170)](_0x59c1aa(0x198));for await(const _0x3df6eb of process[_0x59c1aa(0x1b4)])_0x1f3f6f+=_0x3df6eb;return _0x1f3f6f;}
@@ -1 +1 @@
1
- const a198_0x1be700=a198_0x25a5;(function(_0x3cd19b,_0x460707){const _0x3ed610=a198_0x25a5,_0x2d290f=_0x3cd19b();while(!![]){try{const _0xb4daf1=-parseInt(_0x3ed610(0x91))/0x1+parseInt(_0x3ed610(0x9b))/0x2*(-parseInt(_0x3ed610(0x74))/0x3)+parseInt(_0x3ed610(0x9d))/0x4*(parseInt(_0x3ed610(0x8f))/0x5)+-parseInt(_0x3ed610(0x71))/0x6+-parseInt(_0x3ed610(0x79))/0x7*(-parseInt(_0x3ed610(0x9e))/0x8)+parseInt(_0x3ed610(0x7e))/0x9+-parseInt(_0x3ed610(0x82))/0xa;if(_0xb4daf1===_0x460707)break;else _0x2d290f['push'](_0x2d290f['shift']());}catch(_0xcb13b3){_0x2d290f['push'](_0x2d290f['shift']());}}}(a198_0x1ee2,0x5ab38));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a198_0x25a5(_0x28eb4d,_0x58ee59){_0x28eb4d=_0x28eb4d-0x6a;const _0x1ee25c=a198_0x1ee2();let _0x25a531=_0x1ee25c[_0x28eb4d];return _0x25a531;}const SUPPORTED_SCENES=[a198_0x1be700(0x6a),'general',a198_0x1be700(0x6b),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x1be700(0x9f),'general':a198_0x1be700(0x8a),'form':a198_0x1be700(0x8d),'idCard':a198_0x1be700(0x78)},SCENE_FLAG={'name':a198_0x1be700(0x88),'type':a198_0x1be700(0x72),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x1be700(0x76)},IMAGE_FILE_FLAG={'name':a198_0x1be700(0x9c),'type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x1be700(0x81),'type':'string','description':a198_0x1be700(0x7a)};function normalizeScene(_0x5c5d8f){const _0x9ad28f=a198_0x1be700,_0x430deb=_0x5c5d8f[_0x9ad28f(0x9a)]()[_0x9ad28f(0x8b)]();if(_0x430deb===_0x9ad28f(0x85))return _0x9ad28f(0x97);if(_0x430deb===_0x9ad28f(0x6a)||_0x430deb===_0x9ad28f(0x73)||_0x430deb===_0x9ad28f(0x6b))return _0x430deb;throw CliErrors[_0x9ad28f(0x87)]('Unsupported\x20OCR\x20scene:\x20'+_0x5c5d8f+_0x9ad28f(0x86)+SUPPORTED_SCENES[_0x9ad28f(0x7f)](',\x20'));}function selectedInputs(_0x4a1a15){const _0x386759=a198_0x1be700,_0x1d8094=_0x4a1a15[_0x386759(0x84)](_0x386759(0x9c))[_0x386759(0x9a)](),_0x195419=_0x4a1a15[_0x386759(0x84)](_0x386759(0x81))[_0x386759(0x9a)]();return{'imageFile':_0x1d8094,'imageUrl':_0x195419,'count':[_0x1d8094,_0x195419][_0x386759(0x95)](Boolean)['length']};}function validateInputSelection(_0x5ef523){const _0x3127a5=a198_0x1be700,_0x2b5e50=selectedInputs(_0x5ef523);if(_0x2b5e50[_0x3127a5(0xa1)]!==0x1)throw CliErrors[_0x3127a5(0x87)](_0x3127a5(0x6e));return _0x2b5e50;}function withScene(_0x8d2196,_0x30e5b0,_0x11fdda){const _0xde9bb4=a198_0x1be700;return{..._0x8d2196,'scene':_0x30e5b0,..._0x11fdda?{'sourceFile':{'fileName':_0x11fdda[_0xde9bb4(0x80)],'filePath':_0x11fdda['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x1be700(0x83),'description':a198_0x1be700(0x6f),'risk':a198_0x1be700(0x75),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xcebf56){const _0x2202a7=a198_0x1be700,_0x10c927=normalizeScene(_0xcebf56[_0x2202a7(0x84)]('scene')),_0x1b7563=SCENE_TO_LEGACY_TYPE[_0x10c927],_0x350daa=validateInputSelection(_0xcebf56);if(_0x350daa[_0x2202a7(0xa0)]){const _0x518510=new URLSearchParams({'url':_0x350daa[_0x2202a7(0xa0)],'type':_0x1b7563,'appCode':_0xcebf56[_0x2202a7(0x89)]});return{'method':_0x2202a7(0x92),'url':'/smartapi/ocr/recognize-text?'+_0x518510[_0x2202a7(0x94)](),'description':_0x2202a7(0x96)+_0x10c927+_0x2202a7(0x99)};}const _0x1816ba=requireDevelopmentUploadFile(_0x350daa[_0x2202a7(0x7c)],_0x2202a7(0x9c));return{'method':_0x2202a7(0x7d),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0xcebf56[_0x2202a7(0x89)],'multipart':{'file':_0x1816ba}}},{'method':_0x2202a7(0x7d),'url':_0x2202a7(0x70),'body':{'filePath':_0x2202a7(0x93),'downloadFlag':![]}},{'method':_0x2202a7(0x92),'url':_0x2202a7(0xa2),'query':{'appCode':_0xcebf56[_0x2202a7(0x89)],'url':_0x2202a7(0x8c),'type':_0x1b7563}}]},'description':_0x2202a7(0x90)+_0x10c927+_0x2202a7(0x7b)};},async 'execute'(_0x4d1fa8){const _0x473fa7=a198_0x1be700,_0x216409=normalizeScene(_0x4d1fa8[_0x473fa7(0x84)]('scene')),_0xb644e0=SCENE_TO_LEGACY_TYPE[_0x216409],_0x43b2f9=validateInputSelection(_0x4d1fa8);if(_0x43b2f9[_0x473fa7(0xa0)]){const _0x2de00e=await recognizeDevelopmentOcr(_0x4d1fa8[_0x473fa7(0x89)],{'url':_0x43b2f9[_0x473fa7(0xa0)],'type':_0xb644e0});return{'ok':!![],'data':withScene(_0x2de00e,_0x216409)};}const _0x45d241=requireDevelopmentUploadFile(_0x43b2f9['imageFile'],'image-file'),_0x3d0b0c=await uploadDevelopmentFile(_0x4d1fa8[_0x473fa7(0x89)],_0x45d241[_0x473fa7(0x6d)]);if(!_0x3d0b0c[_0x473fa7(0x98)])throw CliErrors[_0x473fa7(0x6c)](_0x473fa7(0x77));const _0x43f83c=await queryDevelopmentFileUrl(_0x3d0b0c[_0x473fa7(0x98)],{'download':![]});if(!_0x43f83c['fileUrl'])throw CliErrors['apiError'](_0x473fa7(0x8e));const _0x174c0c=await recognizeDevelopmentOcr(_0x4d1fa8['appCode'],{'url':_0x43f83c['fileUrl'],'type':_0xb644e0});return{'ok':!![],'data':withScene(_0x174c0c,_0x216409,_0x3d0b0c)};}};export const ocrDefinitions=[ocrRecognize];function a198_0x1ee2(){const _0xa12ebe=['general','41859MfNvOF','read','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','File\x20upload\x20response\x20missing\x20filePath.','IdCard','14007FHSsEM','Publicly\x20accessible\x20image\x20or\x20file\x20URL','\x20OCR','imageFile','POST','2719170TbATQt','join','fileName','image-url','221750zYayDp','recognize','str','idcard','.\x20Supported\x20scenes:\x20','validation','scene','appCode','General','toLowerCase','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Table','File\x20URL\x20response\x20missing\x20fileUrl.','221245rLmLEO','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','266339SuRYeH','GET','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','toString','filter','Preview:\x20recognize\x20','idCard','filePath','\x20OCR\x20from\x20URL','trim','12gVtKnw','image-file','28TUIxqy','1288wokEFt','Invoice','imageUrl','count','/smartapi/ocr/recognize-text','invoice','form','apiError','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','/smartapi/common/queryFileUrl','1141740fRCtqi','string'];a198_0x1ee2=function(){return _0xa12ebe;};return a198_0x1ee2();}
1
+ const a198_0x3d14b9=a198_0xcbda;(function(_0x4d967d,_0xe3d2bf){const _0x3b1580=a198_0xcbda,_0x1775b6=_0x4d967d();while(!![]){try{const _0x3fa78b=-parseInt(_0x3b1580(0xc5))/0x1+-parseInt(_0x3b1580(0xc4))/0x2*(parseInt(_0x3b1580(0xa3))/0x3)+-parseInt(_0x3b1580(0xc8))/0x4+parseInt(_0x3b1580(0xa0))/0x5*(parseInt(_0x3b1580(0xae))/0x6)+-parseInt(_0x3b1580(0xc9))/0x7*(parseInt(_0x3b1580(0x9f))/0x8)+parseInt(_0x3b1580(0xbd))/0x9+-parseInt(_0x3b1580(0xb9))/0xa*(-parseInt(_0x3b1580(0xc7))/0xb);if(_0x3fa78b===_0xe3d2bf)break;else _0x1775b6['push'](_0x1775b6['shift']());}catch(_0xc24f36){_0x1775b6['push'](_0x1775b6['shift']());}}}(a198_0x21c2,0x267a2));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a198_0x3d14b9(0xcb),'form',a198_0x3d14b9(0xa1)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x3d14b9(0xad),'general':a198_0x3d14b9(0xab),'form':'Table','idCard':'IdCard'},SCENE_FLAG={'name':a198_0x3d14b9(0x9d),'type':a198_0x3d14b9(0xb4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x3d14b9(0xb7)},IMAGE_FILE_FLAG={'name':a198_0x3d14b9(0xb0),'type':a198_0x3d14b9(0xb4),'description':a198_0x3d14b9(0x99)},IMAGE_URL_FLAG={'name':a198_0x3d14b9(0xcf),'type':'string','description':a198_0x3d14b9(0xc3)};function a198_0xcbda(_0xdaa116,_0x163b6f){_0xdaa116=_0xdaa116-0x97;const _0x21c280=a198_0x21c2();let _0xcbdad0=_0x21c280[_0xdaa116];return _0xcbdad0;}function normalizeScene(_0x25c7d2){const _0x2bd7bb=a198_0x3d14b9,_0x24b3c=_0x25c7d2[_0x2bd7bb(0xaf)]()[_0x2bd7bb(0xcd)]();if(_0x24b3c===_0x2bd7bb(0xa5))return _0x2bd7bb(0xa1);if(_0x24b3c===_0x2bd7bb(0xa2)||_0x24b3c==='general'||_0x24b3c===_0x2bd7bb(0xb3))return _0x24b3c;throw CliErrors[_0x2bd7bb(0xb1)]('Unsupported\x20OCR\x20scene:\x20'+_0x25c7d2+_0x2bd7bb(0xb5)+SUPPORTED_SCENES[_0x2bd7bb(0xbe)](',\x20'));}function a198_0x21c2(){const _0x3afbc7=['.\x20Supported\x20scenes:\x20','\x20OCR\x20from\x20URL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','imageFile','30XtSKtz','POST','length','toString','311553zuXEbu','join','/smartapi/common/queryFileUrl','apiError','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','File\x20URL\x20response\x20missing\x20fileUrl.','Publicly\x20accessible\x20image\x20or\x20file\x20URL','2yNFgqX','148061KiQUxt','fileUrl','1270907cUbDUu','144984hrDHOT','63EvMwgq','imageUrl','general','\x20OCR','toLowerCase','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','image-url','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','str','GET','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','filePath','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','scene','recognize','1464JCCTFr','1390AaFJPS','idCard','invoice','297330JmslPA','fileName','idcard','Preview:\x20recognize\x20','/smartapi/ocr/recognize-text','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','/smartapi/common/uploadFile','path','General','appCode','Invoice','1326BUovBZ','trim','image-file','validation','count','form','string'];a198_0x21c2=function(){return _0x3afbc7;};return a198_0x21c2();}function selectedInputs(_0x37ac5e){const _0xc70d78=a198_0x3d14b9,_0x52f478=_0x37ac5e[_0xc70d78(0x97)](_0xc70d78(0xb0))[_0xc70d78(0xaf)](),_0x3f0d5c=_0x37ac5e[_0xc70d78(0x97)](_0xc70d78(0xcf))['trim']();return{'imageFile':_0x52f478,'imageUrl':_0x3f0d5c,'count':[_0x52f478,_0x3f0d5c]['filter'](Boolean)[_0xc70d78(0xbb)]};}function validateInputSelection(_0x38aaf1){const _0x26a428=a198_0x3d14b9,_0x51131b=selectedInputs(_0x38aaf1);if(_0x51131b[_0x26a428(0xb2)]!==0x1)throw CliErrors[_0x26a428(0xb1)](_0x26a428(0xce));return _0x51131b;}function withScene(_0x59ae64,_0x59e36f,_0x4428ef){const _0xcb9447=a198_0x3d14b9;return{..._0x59ae64,'scene':_0x59e36f,..._0x4428ef?{'sourceFile':{'fileName':_0x4428ef[_0xcb9447(0xa4)],'filePath':_0x4428ef['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x3d14b9(0x9e),'description':a198_0x3d14b9(0x9c),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3ec929){const _0x21ada6=a198_0x3d14b9,_0x1e7190=normalizeScene(_0x3ec929['str'](_0x21ada6(0x9d))),_0x4af3e0=SCENE_TO_LEGACY_TYPE[_0x1e7190],_0x3214e6=validateInputSelection(_0x3ec929);if(_0x3214e6[_0x21ada6(0xca)]){const _0x287dda=new URLSearchParams({'url':_0x3214e6['imageUrl'],'type':_0x4af3e0,'appCode':_0x3ec929[_0x21ada6(0xac)]});return{'method':_0x21ada6(0x98),'url':'/smartapi/ocr/recognize-text?'+_0x287dda[_0x21ada6(0xbc)](),'description':_0x21ada6(0xa6)+_0x1e7190+_0x21ada6(0xb6)};}const _0x310f18=requireDevelopmentUploadFile(_0x3214e6[_0x21ada6(0xb8)],_0x21ada6(0xb0));return{'method':'POST','url':_0x21ada6(0xa9),'body':{'steps':[{'method':_0x21ada6(0xba),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x3ec929[_0x21ada6(0xac)],'multipart':{'file':_0x310f18}}},{'method':'POST','url':_0x21ada6(0xbf),'body':{'filePath':_0x21ada6(0xc1),'downloadFlag':![]}},{'method':'GET','url':_0x21ada6(0xa7),'query':{'appCode':_0x3ec929[_0x21ada6(0xac)],'url':_0x21ada6(0xd0),'type':_0x4af3e0}}]},'description':_0x21ada6(0xa8)+_0x1e7190+_0x21ada6(0xcc)};},async 'execute'(_0x13397a){const _0x53a294=a198_0x3d14b9,_0x2f7ec3=normalizeScene(_0x13397a[_0x53a294(0x97)](_0x53a294(0x9d))),_0x1c9f68=SCENE_TO_LEGACY_TYPE[_0x2f7ec3],_0x1709df=validateInputSelection(_0x13397a);if(_0x1709df[_0x53a294(0xca)]){const _0x4fea02=await recognizeDevelopmentOcr(_0x13397a[_0x53a294(0xac)],{'url':_0x1709df['imageUrl'],'type':_0x1c9f68});return{'ok':!![],'data':withScene(_0x4fea02,_0x2f7ec3)};}const _0x3478d2=requireDevelopmentUploadFile(_0x1709df[_0x53a294(0xb8)],_0x53a294(0xb0)),_0x2afe60=await uploadDevelopmentFile(_0x13397a['appCode'],_0x3478d2[_0x53a294(0xaa)]);if(!_0x2afe60[_0x53a294(0x9b)])throw CliErrors[_0x53a294(0xc0)](_0x53a294(0x9a));const _0x5a4bef=await queryDevelopmentFileUrl(_0x2afe60[_0x53a294(0x9b)],{'download':![]});if(!_0x5a4bef['fileUrl'])throw CliErrors[_0x53a294(0xc0)](_0x53a294(0xc2));const _0x264e77=await recognizeDevelopmentOcr(_0x13397a['appCode'],{'url':_0x5a4bef[_0x53a294(0xc6)],'type':_0x1c9f68});return{'ok':!![],'data':withScene(_0x264e77,_0x2f7ec3,_0x2afe60)};}};export const ocrDefinitions=[ocrRecognize];