@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-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 (355) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/feishu-bind.js +1 -1
  249. package/lib/commands/user-account/index.js +1 -1
  250. package/lib/commands/workspace/add.js +1 -1
  251. package/lib/commands/workspace/index.js +1 -1
  252. package/lib/commands/workspace/remove.js +1 -1
  253. package/lib/config/domain-config.js +1 -1
  254. package/lib/config/project-domain-routing.js +1 -1
  255. package/lib/config/region-config.js +1 -1
  256. package/lib/config/schema.js +1 -1
  257. package/lib/constant/cdn.js +1 -1
  258. package/lib/constant/cli.js +1 -1
  259. package/lib/constant/defaults.js +1 -1
  260. package/lib/constant/domain.js +1 -1
  261. package/lib/constant/env.js +1 -1
  262. package/lib/constant/output.js +1 -1
  263. package/lib/constant/paths.js +1 -1
  264. package/lib/constant/region.js +1 -1
  265. package/lib/constant/risk.js +1 -1
  266. package/lib/constant/routing-profile.js +1 -1
  267. package/lib/context/app-resolver.js +1 -1
  268. package/lib/context/auth-resolver.js +1 -1
  269. package/lib/context/config-loader.js +1 -1
  270. package/lib/context.js +1 -1
  271. package/lib/core/alias-resolver.js +1 -1
  272. package/lib/core/api-client.d.ts +1 -1
  273. package/lib/core/api-client.js +1 -1
  274. package/lib/core/bff/config.js +1 -1
  275. package/lib/core/bff/file-system.js +1 -1
  276. package/lib/core/bff/hash.js +1 -1
  277. package/lib/core/bff/hook-directory.js +1 -1
  278. package/lib/core/bff/lock.js +1 -1
  279. package/lib/core/bff/utils.js +1 -1
  280. package/lib/core/cross-db-relation.js +1 -1
  281. package/lib/core/db-resolver.js +1 -1
  282. package/lib/core/flow-config.js +1 -1
  283. package/lib/core/instant-api-policy/config.js +1 -1
  284. package/lib/core/kb-search-client.js +1 -1
  285. package/lib/core/page/file-system.js +1 -1
  286. package/lib/core/page/hash.js +1 -1
  287. package/lib/core/page/lock.js +1 -1
  288. package/lib/core/page/lr-smart-jsx.js +1 -1
  289. package/lib/core/sql-index-auditor.js +1 -1
  290. package/lib/core/sql-sync/config.js +1 -1
  291. package/lib/core/sql-sync/file-system.js +1 -1
  292. package/lib/core/sql-sync/hash.js +1 -1
  293. package/lib/core/sql-sync/lock.js +1 -1
  294. package/lib/core/sql-sync/utils.js +1 -1
  295. package/lib/core/sql-validator.js +1 -1
  296. package/lib/errors.js +1 -1
  297. package/lib/framework/build-all-flags.js +1 -1
  298. package/lib/framework/error-output.js +1 -1
  299. package/lib/framework/explicit-yes.js +1 -1
  300. package/lib/framework/flags.js +1 -1
  301. package/lib/framework/help.js +1 -1
  302. package/lib/framework/index.js +1 -1
  303. package/lib/framework/output.js +1 -1
  304. package/lib/framework/response.js +1 -1
  305. package/lib/framework/runner-alias.js +1 -1
  306. package/lib/framework/runner.js +1 -1
  307. package/lib/framework/schema-export.js +1 -1
  308. package/lib/framework/supported-flags.js +1 -1
  309. package/lib/framework/types.js +1 -1
  310. package/lib/generated/build-info.d.ts +4 -4
  311. package/lib/generated/build-info.js +1 -1
  312. package/lib/generated/official-routing.js +1 -1
  313. package/lib/generated/routing-contract.js +1 -1
  314. package/lib/help.js +1 -1
  315. package/lib/postinstall.js +1 -1
  316. package/lib/runtime/confirmation.js +1 -1
  317. package/lib/runtime/event.js +1 -1
  318. package/lib/runtime/index.js +1 -1
  319. package/lib/runtime/queue.js +1 -1
  320. package/lib/runtime/resolve.js +1 -1
  321. package/lib/skills/builtin-skill.js +1 -1
  322. package/lib/skills/main.js +1 -1
  323. package/lib/skills/npx-skills-add.js +1 -1
  324. package/lib/skills/skill-presence.js +1 -1
  325. package/lib/telemetry/cli-command-trace.js +1 -1
  326. package/lib/telemetry/cli-help-trace.js +1 -1
  327. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  328. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  329. package/lib/telemetry/send-cli-trace-log.js +1 -1
  330. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  331. package/lib/utils/ai_config.js +1 -1
  332. package/lib/utils/apply-jq-filter.js +1 -1
  333. package/lib/utils/cdn-config.js +1 -1
  334. package/lib/utils/check-sdk-version.js +1 -1
  335. package/lib/utils/cli-version-check.js +1 -1
  336. package/lib/utils/cli-version-policy.js +1 -1
  337. package/lib/utils/config.js +1 -1
  338. package/lib/utils/entity-with-id.js +1 -1
  339. package/lib/utils/file-utils.js +1 -1
  340. package/lib/utils/guides-cdn.js +1 -1
  341. package/lib/utils/http-client.js +1 -1
  342. package/lib/utils/is-non-interactive.js +1 -1
  343. package/lib/utils/logger.js +1 -1
  344. package/lib/utils/params.js +1 -1
  345. package/lib/utils/platform.js +1 -1
  346. package/lib/utils/sleep.js +1 -1
  347. package/lib/utils/template-replacer.js +1 -1
  348. package/lib/utils/update-notice.js +1 -1
  349. package/lib/utils/version.js +1 -1
  350. package/lib/utils/with-active-cookie.js +1 -1
  351. package/lib/utils/write-cli-side-channel.js +1 -1
  352. package/package.json +1 -1
  353. package/skills/rabetbase/SKILL.md +2 -2
  354. package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
  355. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x4a9474,_0x128a98){const _0x471123=a169_0x272a,_0x500f29=_0x4a9474();while(!![]){try{const _0x4dcae8=-parseInt(_0x471123(0x1ad))/0x1+-parseInt(_0x471123(0x192))/0x2+parseInt(_0x471123(0x1a7))/0x3+parseInt(_0x471123(0x187))/0x4+-parseInt(_0x471123(0x195))/0x5*(parseInt(_0x471123(0x1ab))/0x6)+parseInt(_0x471123(0x18b))/0x7*(parseInt(_0x471123(0x1a1))/0x8)+parseInt(_0x471123(0x1a9))/0x9;if(_0x4dcae8===_0x128a98)break;else _0x500f29['push'](_0x500f29['shift']());}catch(_0x41f451){_0x500f29['push'](_0x500f29['shift']());}}}(a169_0x52a1,0x7c54d));import{getEnv,isProduction}from'../../../constant/env.js';function a169_0x272a(_0x32310b,_0x395e12){_0x32310b=_0x32310b-0x187;const _0x52a1b2=a169_0x52a1();let _0x272a74=_0x52a1b2[_0x32310b];return _0x272a74;}import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x354787,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x287277,_0x5d59c4){const _0x1b0cfc=a169_0x272a,_0x330b2c=getEnv();logger['info'](_0x1b0cfc(0x196),isProduction(_0x330b2c)?_0x1b0cfc(0x193)+_0x287277+')':_0x1b0cfc(0x1a2)+_0x287277+')');const _0x98498f=await fetchMenuSnapshot(_0x287277,_0x5d59c4,{'verbose':!![]});return logger[_0x1b0cfc(0x197)](_0x1b0cfc(0x196),'Fetched\x20'+_0x98498f[_0x1b0cfc(0x1a5)]+'\x20online\x20menus\x20successfully'),_0x98498f['menus'][_0x1b0cfc(0x18e)](toProcessedMenuItem);}export async function createMenu(_0x1c1cc7,_0x214a76,_0x5e3930){const _0x5c8b5f=a169_0x272a;logger[_0x5c8b5f(0x197)](_0x5c8b5f(0x19c),'Creating\x20menu:\x20'+_0x5e3930[_0x5c8b5f(0x18c)]+'\x20('+_0x5e3930[_0x5c8b5f(0x1a4)]+')');const _0xa9b1eb={'appCode':_0x1c1cc7,'type':_0x5c8b5f(0x189),'sort':0x0,'extend':{'loadScriptMode':_0x5c8b5f(0x188),'resources':_0x5e3930[_0x5c8b5f(0x199)]?JSON[_0x5c8b5f(0x1a3)](_0x5e3930[_0x5c8b5f(0x199)]):undefined},..._0x5e3930},_0x1868d2=await createMenuRecord(_0xa9b1eb,_0x214a76,'Create\x20menu\x20\x22'+_0x5e3930[_0x5c8b5f(0x18c)]+'\x22');return logger['info'](_0x5c8b5f(0x19c),'Menu\x20created\x20successfully:\x20'+_0x5e3930[_0x5c8b5f(0x18c)]),_0x1868d2;}function a169_0x52a1(){const _0x87166d=['info','Update\x20menu\x20assets\x20\x22','resources','extend','Update\x20menu\x20','create-menu','all','Delete\x20','create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20','704CefOTW','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','stringify','path','total','update-menu-cdn-url','1080219qealvL','Updating\x20menu\x20asset\x20links:\x20','4473621mxuNbB','Menu\x20created\x20successfully:\x20','30RLLYgy','Regroup\x20','725865ZCwYaP','3266576KxwoFM','import','procode','Batch\x20menu\x20creation\x20completed,\x20total\x20','32011YhjsrB','label','length','map','loadScriptMode','Create\x20menu\x20\x22','\x20menu\x20group(s)','199648iMYWZY','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','\x20menu','741260CdyvKn','get-online-menu-list'];a169_0x52a1=function(){return _0x87166d;};return a169_0x52a1();}async function createSingleMenu(_0x34ab99,_0x3a9040,_0x2a0cf4,_0x10b890){const _0x220378=a169_0x272a,_0x37b710={'appCode':_0x34ab99,'type':_0x220378(0x189),'sort':0x0,'extend':{'loadScriptMode':_0x220378(0x188),'resources':_0x10b890?JSON[_0x220378(0x1a3)](_0x10b890):undefined},'label':_0x2a0cf4[_0x220378(0x18c)],'path':_0x2a0cf4['path']},_0x28310e=await createMenuRecord(_0x37b710,_0x3a9040,_0x220378(0x190)+_0x2a0cf4[_0x220378(0x18c)]+'\x22');return logger['info'](_0x220378(0x19c),_0x220378(0x1aa)+_0x2a0cf4[_0x220378(0x18c)]),_0x28310e;}export async function createMenus(_0x2f5ee6,_0x3719b9,_0x4c5e85,_0x5d6e10){const _0x1761b7=a169_0x272a;logger['info'](_0x1761b7(0x19f),_0x1761b7(0x1a0)+_0x4c5e85[_0x1761b7(0x18d)]);const _0x59ac34=await Promise[_0x1761b7(0x19d)](_0x4c5e85['map'](_0x47ec14=>createSingleMenu(_0x2f5ee6,_0x3719b9,_0x47ec14,_0x5d6e10)));return logger[_0x1761b7(0x197)](_0x1761b7(0x19f),_0x1761b7(0x18a)+_0x4c5e85[_0x1761b7(0x18d)]),_0x59ac34;}export async function updateMenuCdnUrl(_0x46d78a,_0x1a4a11,_0x2192cc){const _0x515a3d=a169_0x272a;logger[_0x515a3d(0x197)](_0x515a3d(0x1a6),_0x515a3d(0x1a8)+_0x2192cc[_0x515a3d(0x18c)]+'\x20('+_0x2192cc[_0x515a3d(0x1a4)]+')');const _0x5307df={'id':_0x2192cc['id'],'appCode':_0x46d78a,'extend':{..._0x2192cc[_0x515a3d(0x19a)]??{},..._0x2192cc[_0x515a3d(0x18f)]?{'loadScriptMode':_0x2192cc['loadScriptMode']}:{},'resources':_0x2192cc[_0x515a3d(0x199)]?JSON[_0x515a3d(0x1a3)](_0x2192cc[_0x515a3d(0x199)]):undefined}},_0x592a37=await updateMenuRecord(_0x5307df,_0x1a4a11,_0x515a3d(0x198)+_0x2192cc[_0x515a3d(0x18c)]+'\x22');return logger[_0x515a3d(0x197)](_0x515a3d(0x1a6),'Menu\x20assets\x20synced:\x20'+_0x2192cc[_0x515a3d(0x18c)],undefined),_0x592a37;}export async function createMenuEntity(_0x5edccb,_0x12b551,_0x5bee38){return createMenuRecord({'appCode':_0x5edccb,..._0x5bee38},_0x12b551,'Create\x20menu\x20\x22'+_0x5bee38['label']+'\x22');}export async function updateMenuEntity(_0x7c7eca,_0x1e64d6,_0x12b474){const _0x525104=a169_0x272a;return updateMenuRecord({'appCode':_0x7c7eca,..._0x12b474},_0x1e64d6,_0x525104(0x19b)+_0x12b474['id']);}export async function batchDeleteMenuEntities(_0x3fdb7b,_0x8fc797){const _0x17a9ba=a169_0x272a;return batchDeleteMenuRecords(_0x8fc797,_0x3fdb7b,_0x17a9ba(0x19e)+_0x8fc797[_0x17a9ba(0x18d)]+_0x17a9ba(0x194)+(_0x8fc797['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x1c3f99,_0x3ae546){const _0x347dce=a169_0x272a;return a169_0x354787(_0x3ae546,_0x1c3f99,_0x347dce(0x1ac)+_0x3ae546['menuGroups'][_0x347dce(0x18d)]+_0x347dce(0x191));}
1
+ (function(_0x2e07fa,_0x5e174b){const _0x3b9ae6=a169_0x51af,_0x4f6636=_0x2e07fa();while(!![]){try{const _0x321ba6=parseInt(_0x3b9ae6(0x15b))/0x1+-parseInt(_0x3b9ae6(0x151))/0x2+-parseInt(_0x3b9ae6(0x16d))/0x3+parseInt(_0x3b9ae6(0x14e))/0x4+parseInt(_0x3b9ae6(0x161))/0x5*(parseInt(_0x3b9ae6(0x163))/0x6)+-parseInt(_0x3b9ae6(0x16b))/0x7+parseInt(_0x3b9ae6(0x155))/0x8*(parseInt(_0x3b9ae6(0x168))/0x9);if(_0x321ba6===_0x5e174b)break;else _0x4f6636['push'](_0x4f6636['shift']());}catch(_0x1406b8){_0x4f6636['push'](_0x4f6636['shift']());}}}(a169_0x29b0,0x933ab));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x3085e9,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x16fa23,_0x112291){const _0x46981c=a169_0x51af,_0x2f0916=getEnv();logger[_0x46981c(0x164)](_0x46981c(0x149),isProduction(_0x2f0916)?_0x46981c(0x14d)+_0x16fa23+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x16fa23+')');const _0x62352d=await fetchMenuSnapshot(_0x16fa23,_0x112291,{'verbose':!![]});return logger[_0x46981c(0x164)](_0x46981c(0x149),_0x46981c(0x158)+_0x62352d['total']+_0x46981c(0x160)),_0x62352d[_0x46981c(0x15e)][_0x46981c(0x14f)](toProcessedMenuItem);}export async function createMenu(_0x139065,_0x3e3c1d,_0x322025){const _0x467976=a169_0x51af;logger[_0x467976(0x164)](_0x467976(0x15d),_0x467976(0x166)+_0x322025['label']+'\x20('+_0x322025[_0x467976(0x15a)]+')');const _0x4e27b1={'appCode':_0x139065,'type':_0x467976(0x162),'sort':0x0,'extend':{'loadScriptMode':_0x467976(0x150),'resources':_0x322025[_0x467976(0x14c)]?JSON['stringify'](_0x322025[_0x467976(0x14c)]):undefined},..._0x322025},_0x2bfc65=await createMenuRecord(_0x4e27b1,_0x3e3c1d,_0x467976(0x157)+_0x322025[_0x467976(0x154)]+'\x22');return logger[_0x467976(0x164)](_0x467976(0x15d),_0x467976(0x16a)+_0x322025[_0x467976(0x154)]),_0x2bfc65;}async function createSingleMenu(_0x60e22e,_0x39b2e9,_0xa53ca2,_0x1adfd4){const _0x149eeb=a169_0x51af,_0x212d73={'appCode':_0x60e22e,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x149eeb(0x150),'resources':_0x1adfd4?JSON[_0x149eeb(0x14b)](_0x1adfd4):undefined},'label':_0xa53ca2[_0x149eeb(0x154)],'path':_0xa53ca2[_0x149eeb(0x15a)]},_0x511c55=await createMenuRecord(_0x212d73,_0x39b2e9,'Create\x20menu\x20\x22'+_0xa53ca2['label']+'\x22');return logger[_0x149eeb(0x164)](_0x149eeb(0x15d),_0x149eeb(0x16a)+_0xa53ca2[_0x149eeb(0x154)]),_0x511c55;}export async function createMenus(_0x1e2325,_0x2dda23,_0x479a77,_0x5e2ada){const _0x856301=a169_0x51af;logger[_0x856301(0x164)]('create-menus',_0x856301(0x156)+_0x479a77[_0x856301(0x169)]);const _0x3afb40=await Promise[_0x856301(0x152)](_0x479a77['map'](_0x49121a=>createSingleMenu(_0x1e2325,_0x2dda23,_0x49121a,_0x5e2ada)));return logger[_0x856301(0x164)](_0x856301(0x15c),_0x856301(0x16c)+_0x479a77['length']),_0x3afb40;}function a169_0x29b0(){const _0x31349e=['Update\x20menu\x20assets\x20\x22','\x20online\x20menus\x20successfully','25QuzBYS','procode','281514jcaBVh','info','update-menu-cdn-url','Creating\x20menu:\x20','Menu\x20assets\x20synced:\x20','25902NkuRTD','length','Menu\x20created\x20successfully:\x20','7157094tKaSwS','Batch\x20menu\x20creation\x20completed,\x20total\x20','1843725QrkUBl','get-online-menu-list','Update\x20menu\x20','stringify','resources','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','313260hfiCSs','map','import','1535246ETeAkU','all','menuGroups','label','5208yVBxtt','Start\x20batch\x20menu\x20creation,\x20total\x20','Create\x20menu\x20\x22','Fetched\x20','Delete\x20','path','821203lnInXz','create-menus','create-menu','menus'];a169_0x29b0=function(){return _0x31349e;};return a169_0x29b0();}function a169_0x51af(_0x4760ca,_0x229d02){_0x4760ca=_0x4760ca-0x149;const _0x29b0c9=a169_0x29b0();let _0x51afc1=_0x29b0c9[_0x4760ca];return _0x51afc1;}export async function updateMenuCdnUrl(_0x1464b3,_0x38b0c6,_0x25637a){const _0x488f0f=a169_0x51af;logger['info'](_0x488f0f(0x165),'Updating\x20menu\x20asset\x20links:\x20'+_0x25637a[_0x488f0f(0x154)]+'\x20('+_0x25637a[_0x488f0f(0x15a)]+')');const _0x222d25={'id':_0x25637a['id'],'appCode':_0x1464b3,'extend':{..._0x25637a['extend']??{},..._0x25637a['loadScriptMode']?{'loadScriptMode':_0x25637a['loadScriptMode']}:{},'resources':_0x25637a[_0x488f0f(0x14c)]?JSON['stringify'](_0x25637a[_0x488f0f(0x14c)]):undefined}},_0x3e66e6=await updateMenuRecord(_0x222d25,_0x38b0c6,_0x488f0f(0x15f)+_0x25637a[_0x488f0f(0x154)]+'\x22');return logger['info'](_0x488f0f(0x165),_0x488f0f(0x167)+_0x25637a[_0x488f0f(0x154)],undefined),_0x3e66e6;}export async function createMenuEntity(_0x573a8d,_0x1a5ca1,_0x165761){return createMenuRecord({'appCode':_0x573a8d,..._0x165761},_0x1a5ca1,'Create\x20menu\x20\x22'+_0x165761['label']+'\x22');}export async function updateMenuEntity(_0x531445,_0x4f56dd,_0x52e4eb){const _0x321664=a169_0x51af;return updateMenuRecord({'appCode':_0x531445,..._0x52e4eb},_0x4f56dd,_0x321664(0x14a)+_0x52e4eb['id']);}export async function batchDeleteMenuEntities(_0x2fa3d7,_0x281b95){const _0x160d02=a169_0x51af;return batchDeleteMenuRecords(_0x281b95,_0x2fa3d7,_0x160d02(0x159)+_0x281b95[_0x160d02(0x169)]+'\x20menu'+(_0x281b95[_0x160d02(0x169)]===0x1?'':'s'));}export async function startMenuRegroup(_0x35c59f,_0x3d2267){const _0x3c1fec=a169_0x51af;return a169_0x3085e9(_0x3d2267,_0x35c59f,'Regroup\x20'+_0x3d2267[_0x3c1fec(0x153)][_0x3c1fec(0x169)]+'\x20menu\x20group(s)');}
@@ -1 +1 @@
1
- const a170_0x4da4d8=a170_0x21bd;(function(_0x5110b2,_0x48352f){const _0x46c834=a170_0x21bd,_0x41e234=_0x5110b2();while(!![]){try{const _0x282575=-parseInt(_0x46c834(0xec))/0x1*(parseInt(_0x46c834(0xe3))/0x2)+-parseInt(_0x46c834(0xed))/0x3*(parseInt(_0x46c834(0xe4))/0x4)+-parseInt(_0x46c834(0xe5))/0x5*(-parseInt(_0x46c834(0xff))/0x6)+-parseInt(_0x46c834(0xd7))/0x7*(-parseInt(_0x46c834(0xf2))/0x8)+parseInt(_0x46c834(0xdb))/0x9+-parseInt(_0x46c834(0xd6))/0xa+parseInt(_0x46c834(0xe1))/0xb*(parseInt(_0x46c834(0xe9))/0xc);if(_0x282575===_0x48352f)break;else _0x41e234['push'](_0x41e234['shift']());}catch(_0x1d3411){_0x41e234['push'](_0x41e234['shift']());}}}(a170_0x52df,0x90881));function a170_0x52df(){const _0x4e969a=['2142639LzoGLU','Invalid\x20--params\x20JSON.','string','menu-sync','Start\x20non-interactive\x20menu\x20sync',':\x20expected\x20a\x20non-empty\x20string.','248633fuditm','cssUrl','2260788FUkVfP','3941508YVlFIa','5wcMfBS','jsUrl','has','length','1224xvQSAN','info','trim','1ASCbwd','3pXCgTn','hasOwn','setLogPath','get','message','16616stvwmE','parse','Invalid\x20--params\x20fields:\x20','filter','import','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','No\x20local\x20pages\x20matched\x20paths:\x20','dryRun','path','join','map','--params.','push','3014250LcImlk','Menu\x20sync\x20completed','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','4482610HbjSHw','371gkWhTt','Invalid\x20--params.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x0a\x20\x20Available\x20local\x20paths:\x20'];a170_0x52df=function(){return _0x4e969a;};return a170_0x52df();}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x4da4d8(0xe6),a170_0x4da4d8(0xe2)]);function a170_0x21bd(_0x1eb8fb,_0x284202){_0x1eb8fb=_0x1eb8fb-0xd3;const _0x52df86=a170_0x52df();let _0x21bd67=_0x52df86[_0x1eb8fb];return _0x21bd67;}function validateParams(_0x31aa3e){const _0x1e1e65=a170_0x4da4d8,_0xe1e66a=[];return _0x31aa3e[_0x1e1e65(0xe6)]&&!isValidJsHttpsUrl(_0x31aa3e[_0x1e1e65(0xe6)])&&_0xe1e66a[_0x1e1e65(0xfe)]({'field':_0x1e1e65(0xe6),'message':_0x1e1e65(0xd4)}),_0x31aa3e['cssUrl']&&!isValidCssHttpsUrl(_0x31aa3e['cssUrl'])&&_0xe1e66a[_0x1e1e65(0xfe)]({'field':_0x1e1e65(0xe2),'message':_0x1e1e65(0xd9)}),_0xe1e66a;}export async function runMenuSyncCore(_0x11fb57,_0x2070ad,_0x406e88=[],_0x4e09fc,_0x5862a4={}){const _0x419ca7=a170_0x4da4d8,_0x4eba04=parseMenuSyncParams(_0x4e09fc),_0xa14f22=[...new Set(_0x406e88[_0x419ca7(0xfc)](_0xc8b0c7=>_0xc8b0c7[_0x419ca7(0xeb)]())[_0x419ca7(0xf5)](Boolean))],_0x15d5ac=_0x4eba04[_0x419ca7(0xe6)],_0x46c0db=_0x4eba04['cssUrl'],_0x49d8b5=[];if(_0x15d5ac)_0x49d8b5[_0x419ca7(0xfe)](_0x15d5ac);if(_0x46c0db)_0x49d8b5[_0x419ca7(0xfe)](_0x46c0db);const _0x279f9c=validateParams(_0x4eba04);if(_0x279f9c[_0x419ca7(0xe8)]>0x0){const _0x3f974e=_0x279f9c[_0x419ca7(0xfc)](_0x2de6fe=>_0x419ca7(0xfd)+_0x2de6fe['field']+':\x20'+_0x2de6fe[_0x419ca7(0xf1)])[_0x419ca7(0xfb)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3f974e);}logger[_0x419ca7(0xef)](process['cwd']()),logger[_0x419ca7(0xea)](_0x419ca7(0xde),_0x419ca7(0xdf),{'appCode':_0x11fb57,'selectedCount':_0xa14f22[_0x419ca7(0xe8)],'jsUrl':_0x15d5ac,'cssUrl':_0x46c0db});if(_0x15d5ac){const _0x15bdf0=await isUrlReachable(_0x15d5ac);if(!_0x15bdf0)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x15d5ac);}if(_0x46c0db){const _0x4f4748=await isUrlReachable(_0x46c0db);if(!_0x4f4748)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x46c0db);}const _0x202c8e=getLocalPages();if(_0x202c8e['length']===0x0){if(_0xa14f22[_0x419ca7(0xe8)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0xa14f22[_0x419ca7(0xfb)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5862a4[_0x419ca7(0xf9)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x562f3c=await getOnlineMenuList(_0x11fb57,_0x2070ad),_0x14c620=new Set(_0x562f3c[_0x419ca7(0xfc)](_0x17794f=>_0x17794f[_0x419ca7(0xfa)]));let _0x9dbbb6;if(_0xa14f22[_0x419ca7(0xe8)]>0x0){const _0x48079d=new Map(_0x202c8e[_0x419ca7(0xfc)](_0x182683=>[_0x182683[_0x419ca7(0xfa)],_0x182683])),_0x2b11f6=_0xa14f22[_0x419ca7(0xf5)](_0x128127=>!_0x48079d[_0x419ca7(0xe7)](_0x128127));if(_0x2b11f6[_0x419ca7(0xe8)]>0x0){const _0x2be4b8=_0x202c8e['map'](_0x36c686=>_0x36c686[_0x419ca7(0xfa)])[_0x419ca7(0xfb)](',\x20');throw new Error(_0x419ca7(0xf8)+_0x2b11f6['join'](',\x20')+_0x419ca7(0xda)+_0x2be4b8);}const _0x52e25a=_0xa14f22[_0x419ca7(0xf5)](_0x4332e2=>_0x14c620[_0x419ca7(0xe7)](_0x4332e2));if(_0x52e25a['length']>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x52e25a['join'](',\x20'));_0x9dbbb6=_0xa14f22[_0x419ca7(0xfc)](_0x1ddc3a=>_0x48079d[_0x419ca7(0xf0)](_0x1ddc3a));}else _0x9dbbb6=_0x202c8e['filter'](_0xe61e76=>!_0x14c620[_0x419ca7(0xe7)](_0xe61e76['path']));if(_0x9dbbb6[_0x419ca7(0xe8)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5862a4[_0x419ca7(0xf9)]===!![],'targetPages':[],'plannedMenus':[]};const _0x10757c=_0x9dbbb6[_0x419ca7(0xfc)](_0x3858b6=>({'type':'procode','path':_0x3858b6[_0x419ca7(0xfa)],'label':_0x3858b6['label'],'loadScriptMode':_0x419ca7(0xf6),'resources':[..._0x49d8b5]}));if(_0x5862a4[_0x419ca7(0xf9)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x9dbbb6,'plannedMenus':_0x10757c};const _0x5030c6=await createMenus(_0x11fb57,_0x2070ad,_0x9dbbb6,_0x49d8b5[_0x419ca7(0xe8)]>0x0?_0x49d8b5:undefined);return logger[_0x419ca7(0xea)](_0x419ca7(0xde),_0x419ca7(0xd3),{'count':_0x9dbbb6['length'],'resources':_0x49d8b5}),{'created':_0x5030c6[_0x419ca7(0xe8)],'skipped':![],'dryRun':![],'targetPages':_0x9dbbb6,'plannedMenus':_0x10757c,'menus':_0x5030c6};}export function parseMenuSyncParams(_0x25f5c4){const _0x3715eb=a170_0x4da4d8;if(!_0x25f5c4||typeof _0x25f5c4!==_0x3715eb(0xdd))return{};let _0x27f74a;try{_0x27f74a=JSON[_0x3715eb(0xf3)](_0x25f5c4);}catch{throw new Error(_0x3715eb(0xdc));}if(typeof _0x27f74a!=='object'||_0x27f74a===null||Array[_0x3715eb(0xd5)](_0x27f74a))throw new Error(_0x3715eb(0xf7));const _0x3fed5e=_0x27f74a;if(Object[_0x3715eb(0xee)](_0x3fed5e,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x3bbd42=Object['keys'](_0x3fed5e)[_0x3715eb(0xf5)](_0x267947=>!MENU_SYNC_PARAM_KEYS[_0x3715eb(0xe7)](_0x267947));if(_0x3bbd42[_0x3715eb(0xe8)]>0x0)throw new Error(_0x3715eb(0xf4)+_0x3bbd42[_0x3715eb(0xfb)](',\x20')+'.');for(const _0x2f6aa3 of MENU_SYNC_PARAM_KEYS){const _0xc0fdbc=_0x3fed5e[_0x2f6aa3];if(_0xc0fdbc!==undefined&&(typeof _0xc0fdbc!==_0x3715eb(0xdd)||_0xc0fdbc['trim']()===''))throw new Error(_0x3715eb(0xd8)+_0x2f6aa3+_0x3715eb(0xe0));}return{'jsUrl':typeof _0x3fed5e[_0x3715eb(0xe6)]===_0x3715eb(0xdd)?_0x3fed5e[_0x3715eb(0xe6)][_0x3715eb(0xeb)]():undefined,'cssUrl':typeof _0x3fed5e[_0x3715eb(0xe2)]===_0x3715eb(0xdd)?_0x3fed5e[_0x3715eb(0xe2)][_0x3715eb(0xeb)]():undefined};}
1
+ const a170_0x34ce01=a170_0x509a;function a170_0x37c3(){const _0xb200cf=['1457218XRPNii','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','hasOwn','Invalid\x20--params\x20JSON.','Invalid\x20--params:\x20','push','253284lcYBHV','isArray','3320XDpmhL','No\x20local\x20pages\x20matched\x20paths:\x20','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','3079470Zpetvm','CSS\x20URL\x20is\x20unreachable:\x20','keys','jsUrl','get','Invalid\x20--params.','length','cwd','object','3807ujJBfO','trim','cssUrl','Menu\x20sync\x20completed','path','procode','pages','menu-sync','dryRun','57960wcZctc','JS\x20URL\x20is\x20unreachable:\x20','\x0a\x20\x20Available\x20local\x20paths:\x20','has','Start\x20non-interactive\x20menu\x20sync','filter','setLogPath','map','string','65154KNdgMN','16FeuESB','50DZhglq','join','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','info','parse','274296vFTFNb','import'];a170_0x37c3=function(){return _0xb200cf;};return a170_0x37c3();}(function(_0x5abb24,_0x34b926){const _0x35d6b2=a170_0x509a,_0x7560d6=_0x5abb24();while(!![]){try{const _0x389923=parseInt(_0x35d6b2(0x14d))/0x1+parseInt(_0x35d6b2(0x145))/0x2+-parseInt(_0x35d6b2(0x135))/0x3*(parseInt(_0x35d6b2(0x13f))/0x4)+-parseInt(_0x35d6b2(0x140))/0x5*(parseInt(_0x35d6b2(0x13e))/0x6)+-parseInt(_0x35d6b2(0x147))/0x7+parseInt(_0x35d6b2(0x14f))/0x8*(-parseInt(_0x35d6b2(0x12c))/0x9)+parseInt(_0x35d6b2(0x152))/0xa;if(_0x389923===_0x34b926)break;else _0x7560d6['push'](_0x7560d6['shift']());}catch(_0x3bae64){_0x7560d6['push'](_0x7560d6['shift']());}}}(a170_0x37c3,0x1f716));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x34ce01(0x155),a170_0x34ce01(0x12e)]);function validateParams(_0xa5eaf0){const _0x19358a=a170_0x34ce01,_0x3584c8=[];return _0xa5eaf0['jsUrl']&&!isValidJsHttpsUrl(_0xa5eaf0['jsUrl'])&&_0x3584c8[_0x19358a(0x14c)]({'field':_0x19358a(0x155),'message':_0x19358a(0x142)}),_0xa5eaf0[_0x19358a(0x12e)]&&!isValidCssHttpsUrl(_0xa5eaf0[_0x19358a(0x12e)])&&_0x3584c8[_0x19358a(0x14c)]({'field':_0x19358a(0x12e),'message':_0x19358a(0x148)}),_0x3584c8;}function a170_0x509a(_0x461ce0,_0x153ad3){_0x461ce0=_0x461ce0-0x12b;const _0x37c3c4=a170_0x37c3();let _0x509a1a=_0x37c3c4[_0x461ce0];return _0x509a1a;}export async function runMenuSyncCore(_0x1f4a77,_0x327e07,_0x36182f=[],_0x4a56cb,_0x41b038={}){const _0x14b7ce=a170_0x34ce01,_0x88eece=parseMenuSyncParams(_0x4a56cb),_0x291af8=[...new Set(_0x36182f[_0x14b7ce(0x13c)](_0x33f010=>_0x33f010[_0x14b7ce(0x12d)]())[_0x14b7ce(0x13a)](Boolean))],_0x2b1cd5=_0x88eece[_0x14b7ce(0x155)],_0x552c20=_0x88eece[_0x14b7ce(0x12e)],_0x253c4d=[];if(_0x2b1cd5)_0x253c4d['push'](_0x2b1cd5);if(_0x552c20)_0x253c4d['push'](_0x552c20);const _0x444ab5=validateParams(_0x88eece);if(_0x444ab5[_0x14b7ce(0x158)]>0x0){const _0x33f0ed=_0x444ab5[_0x14b7ce(0x13c)](_0x3806c6=>'--params.'+_0x3806c6['field']+':\x20'+_0x3806c6['message'])[_0x14b7ce(0x141)](';\x20');throw new Error(_0x14b7ce(0x14b)+_0x33f0ed);}logger[_0x14b7ce(0x13b)](process[_0x14b7ce(0x159)]()),logger[_0x14b7ce(0x143)](_0x14b7ce(0x133),_0x14b7ce(0x139),{'appCode':_0x1f4a77,'selectedCount':_0x291af8[_0x14b7ce(0x158)],'jsUrl':_0x2b1cd5,'cssUrl':_0x552c20});if(_0x2b1cd5){const _0x2c619f=await isUrlReachable(_0x2b1cd5);if(!_0x2c619f)throw new Error(_0x14b7ce(0x136)+_0x2b1cd5);}if(_0x552c20){const _0x58e946=await isUrlReachable(_0x552c20);if(!_0x58e946)throw new Error(_0x14b7ce(0x153)+_0x552c20);}const _0x522b1b=getLocalPages();if(_0x522b1b[_0x14b7ce(0x158)]===0x0){if(_0x291af8[_0x14b7ce(0x158)]>0x0)throw new Error(_0x14b7ce(0x150)+_0x291af8['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x41b038[_0x14b7ce(0x134)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x1d0a0f=await getOnlineMenuList(_0x1f4a77,_0x327e07),_0x284b50=new Set(_0x1d0a0f[_0x14b7ce(0x13c)](_0x1d7cbc=>_0x1d7cbc[_0x14b7ce(0x130)]));let _0x19d5f0;if(_0x291af8[_0x14b7ce(0x158)]>0x0){const _0x130198=new Map(_0x522b1b[_0x14b7ce(0x13c)](_0x224b4c=>[_0x224b4c[_0x14b7ce(0x130)],_0x224b4c])),_0xe2abf7=_0x291af8[_0x14b7ce(0x13a)](_0x4106a7=>!_0x130198[_0x14b7ce(0x138)](_0x4106a7));if(_0xe2abf7[_0x14b7ce(0x158)]>0x0){const _0x3c307c=_0x522b1b[_0x14b7ce(0x13c)](_0x22578a=>_0x22578a[_0x14b7ce(0x130)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0xe2abf7[_0x14b7ce(0x141)](',\x20')+_0x14b7ce(0x137)+_0x3c307c);}const _0x48d7f9=_0x291af8['filter'](_0x10dbc6=>_0x284b50['has'](_0x10dbc6));if(_0x48d7f9[_0x14b7ce(0x158)]>0x0)throw new Error(_0x14b7ce(0x151)+_0x48d7f9[_0x14b7ce(0x141)](',\x20'));_0x19d5f0=_0x291af8[_0x14b7ce(0x13c)](_0x48f27d=>_0x130198[_0x14b7ce(0x156)](_0x48f27d));}else _0x19d5f0=_0x522b1b[_0x14b7ce(0x13a)](_0x33f4b3=>!_0x284b50[_0x14b7ce(0x138)](_0x33f4b3[_0x14b7ce(0x130)]));if(_0x19d5f0['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x41b038[_0x14b7ce(0x134)]===!![],'targetPages':[],'plannedMenus':[]};const _0x5f373f=_0x19d5f0['map'](_0x32f01=>({'type':_0x14b7ce(0x131),'path':_0x32f01[_0x14b7ce(0x130)],'label':_0x32f01['label'],'loadScriptMode':_0x14b7ce(0x146),'resources':[..._0x253c4d]}));if(_0x41b038[_0x14b7ce(0x134)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x19d5f0,'plannedMenus':_0x5f373f};const _0x4cd962=await createMenus(_0x1f4a77,_0x327e07,_0x19d5f0,_0x253c4d[_0x14b7ce(0x158)]>0x0?_0x253c4d:undefined);return logger[_0x14b7ce(0x143)](_0x14b7ce(0x133),_0x14b7ce(0x12f),{'count':_0x19d5f0[_0x14b7ce(0x158)],'resources':_0x253c4d}),{'created':_0x4cd962[_0x14b7ce(0x158)],'skipped':![],'dryRun':![],'targetPages':_0x19d5f0,'plannedMenus':_0x5f373f,'menus':_0x4cd962};}export function parseMenuSyncParams(_0x5badb3){const _0x29e9b8=a170_0x34ce01;if(!_0x5badb3||typeof _0x5badb3!==_0x29e9b8(0x13d))return{};let _0x1aeb00;try{_0x1aeb00=JSON[_0x29e9b8(0x144)](_0x5badb3);}catch{throw new Error(_0x29e9b8(0x14a));}if(typeof _0x1aeb00!==_0x29e9b8(0x12b)||_0x1aeb00===null||Array[_0x29e9b8(0x14e)](_0x1aeb00))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x3f061c=_0x1aeb00;if(Object[_0x29e9b8(0x149)](_0x3f061c,_0x29e9b8(0x132)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x19334d=Object[_0x29e9b8(0x154)](_0x3f061c)[_0x29e9b8(0x13a)](_0x32e7fb=>!MENU_SYNC_PARAM_KEYS[_0x29e9b8(0x138)](_0x32e7fb));if(_0x19334d['length']>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x19334d['join'](',\x20')+'.');for(const _0x4b7466 of MENU_SYNC_PARAM_KEYS){const _0x113aba=_0x3f061c[_0x4b7466];if(_0x113aba!==undefined&&(typeof _0x113aba!==_0x29e9b8(0x13d)||_0x113aba[_0x29e9b8(0x12d)]()===''))throw new Error(_0x29e9b8(0x157)+_0x4b7466+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x3f061c['jsUrl']===_0x29e9b8(0x13d)?_0x3f061c[_0x29e9b8(0x155)][_0x29e9b8(0x12d)]():undefined,'cssUrl':typeof _0x3f061c['cssUrl']===_0x29e9b8(0x13d)?_0x3f061c[_0x29e9b8(0x12e)][_0x29e9b8(0x12d)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x5badfe,_0x4d8e6b){const _0x1e0299=a172_0x32f2,_0x3eaa90=_0x5badfe();while(!![]){try{const _0x4aa1ed=-parseInt(_0x1e0299(0x117))/0x1*(-parseInt(_0x1e0299(0x128))/0x2)+-parseInt(_0x1e0299(0x113))/0x3*(-parseInt(_0x1e0299(0x134))/0x4)+parseInt(_0x1e0299(0xf9))/0x5+-parseInt(_0x1e0299(0x111))/0x6+-parseInt(_0x1e0299(0xf3))/0x7+parseInt(_0x1e0299(0x10e))/0x8*(parseInt(_0x1e0299(0xf7))/0x9)+parseInt(_0x1e0299(0x104))/0xa*(-parseInt(_0x1e0299(0x100))/0xb);if(_0x4aa1ed===_0x4d8e6b)break;else _0x3eaa90['push'](_0x3eaa90['shift']());}catch(_0x3c3981){_0x3eaa90['push'](_0x3eaa90['shift']());}}}(a172_0x13e6,0x9874d));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4cc996){const _0x339ef4=a172_0x32f2,_0x20afb3=[];return _0x4cc996[_0x339ef4(0x10d)]&&!isValidJsHttpsUrl(_0x4cc996[_0x339ef4(0x10d)])&&_0x20afb3[_0x339ef4(0xf1)]({'field':'jsUrl','message':_0x339ef4(0x118)}),_0x4cc996['cssUrl']&&!isValidCssHttpsUrl(_0x4cc996['cssUrl'])&&_0x20afb3[_0x339ef4(0xf1)]({'field':_0x339ef4(0x125),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x20afb3;}function a172_0x32f2(_0x33fbb5,_0x1b835e){_0x33fbb5=_0x33fbb5-0xee;const _0x13e637=a172_0x13e6();let _0x32f2aa=_0x13e637[_0x33fbb5];return _0x32f2aa;}export async function runMenuUpdateCore(_0x4cb311,_0x2f9ed7,_0x2ce061,_0x465fe3={}){const _0x3e4877=a172_0x32f2,_0xdf8441=parseUpdateParamsFlag(_0x2ce061),_0x12e983=normalizeMode(_0x465fe3['mode']);validateSelection(_0x465fe3['selection']);const _0x5e6cd0=[];if(_0xdf8441[_0x3e4877(0x10d)])_0x5e6cd0['push'](_0xdf8441[_0x3e4877(0x10d)]);if(_0xdf8441['cssUrl'])_0x5e6cd0[_0x3e4877(0xf1)](_0xdf8441[_0x3e4877(0x125)]);const _0x18c6d8=validateParams(_0xdf8441);if(_0x18c6d8[_0x3e4877(0x105)]>0x0){const _0x4179f1=_0x18c6d8['map'](_0xc4b907=>'--params.'+_0xc4b907[_0x3e4877(0x123)]+':\x20'+_0xc4b907[_0x3e4877(0xf6)])[_0x3e4877(0x12b)](';\x20');throw new Error(_0x3e4877(0x131)+_0x4179f1);}if(_0x5e6cd0[_0x3e4877(0x105)]===0x0)throw new Error(_0x3e4877(0x11b)+_0x3e4877(0x133));logger[_0x3e4877(0xfa)](process[_0x3e4877(0x11a)]()),logger[_0x3e4877(0x11d)]('menu-asset-update',_0x3e4877(0x124),{'appCode':_0x4cb311,'jsUrl':_0xdf8441[_0x3e4877(0x10d)],'cssUrl':_0xdf8441['cssUrl'],'mode':_0x12e983,'dryRun':_0x465fe3[_0x3e4877(0x121)]===!![]});if(_0xdf8441['jsUrl']){const _0x3c6d68=await isUrlReachable(_0xdf8441[_0x3e4877(0x10d)]);if(!_0x3c6d68)throw new Error(_0x3e4877(0x120)+_0xdf8441[_0x3e4877(0x10d)]);}if(_0xdf8441['cssUrl']){const _0x2e29f7=await isUrlReachable(_0xdf8441[_0x3e4877(0x125)]);if(!_0x2e29f7)throw new Error(_0x3e4877(0x115)+_0xdf8441[_0x3e4877(0x125)]);}const _0x121a51=await getOnlineMenuList(_0x4cb311,_0x2f9ed7),_0x1a89a3=_0x121a51[_0x3e4877(0xf4)](_0x9f1a2c=>_0x9f1a2c['resources'][_0x3e4877(0x105)]>0x0),_0x138f59=selectMenusForUpdate(_0x1a89a3,_0x465fe3[_0x3e4877(0x109)]);if(_0x138f59['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x465fe3['dryRun']===!![]};const _0x59c47e=_0x138f59[_0x3e4877(0xfc)](_0xe2dccc=>buildMenuUpdateDiff(_0xe2dccc,_0xdf8441,_0x12e983,_0x465fe3[_0x3e4877(0x102)]===!![],_0x465fe3[_0x3e4877(0xfe)]));if(_0x465fe3[_0x3e4877(0x121)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x59c47e};const _0x4f1488=await Promise[_0x3e4877(0x127)](_0x138f59['map']((_0x499434,_0x450890)=>updateMenuCdnUrl(_0x4cb311,_0x2f9ed7,{'id':_0x499434['id'],'label':_0x499434[_0x3e4877(0xf8)],'path':_0x499434[_0x3e4877(0x132)],'resources':_0x59c47e[_0x450890][_0x3e4877(0x12d)][_0x3e4877(0x12f)],'extend':_0x499434[_0x3e4877(0x11f)]??null,'loadScriptMode':_0x465fe3[_0x3e4877(0xfe)]}))),_0xe9faff=_0x4f1488[_0x3e4877(0xf4)](_0x2794de=>_0x2794de[_0x3e4877(0x12c)]==='fulfilled')[_0x3e4877(0xfc)](_0x4a3cd8=>_0x4a3cd8[_0x3e4877(0xff)]),_0x29d041=_0x4f1488['filter'](_0x4ae004=>_0x4ae004[_0x3e4877(0x12c)]==='rejected')[_0x3e4877(0x105)];return logger[_0x3e4877(0x11d)]('menu-asset-update','Menu\x20asset\x20update\x20completed',{'count':_0x138f59['length'],'resources':_0x5e6cd0}),{'updated':_0xe9faff[_0x3e4877(0x105)],'failed':_0x29d041,'skipped':![],'menus':_0xe9faff};}function validateSelection(_0x17f305){const _0x5cb8b3=a172_0x32f2;if(!_0x17f305)throw new Error(_0x5cb8b3(0xef));if(_0x17f305['all']&&(_0x17f305['menuIds']['length']>0x0||_0x17f305['paths']['length']>0x0))throw new Error(_0x5cb8b3(0xfd));if(!_0x17f305[_0x5cb8b3(0x11e)]&&_0x17f305[_0x5cb8b3(0x114)][_0x5cb8b3(0x105)]===0x0&&_0x17f305[_0x5cb8b3(0xf5)][_0x5cb8b3(0x105)]===0x0)throw new Error(_0x5cb8b3(0xef));}export function selectMenusForUpdate(_0x4a5e72,_0x56a08a){const _0x13e963=a172_0x32f2;validateSelection(_0x56a08a);if(_0x56a08a[_0x13e963(0x11e)])return _0x4a5e72;const _0x1a8fdc=new Set(_0x4a5e72[_0x13e963(0xfc)](_0x3bb10e=>_0x3bb10e['id'])),_0x129b98=new Set(_0x4a5e72[_0x13e963(0xfc)](_0x3d9748=>_0x3d9748[_0x13e963(0x132)])),_0x498a65=_0x56a08a[_0x13e963(0x114)]['filter'](_0x1c2220=>!_0x1a8fdc[_0x13e963(0x10b)](_0x1c2220)),_0x3a42e4=_0x56a08a['paths'][_0x13e963(0xf4)](_0x9c7af7=>!_0x129b98[_0x13e963(0x10b)](_0x9c7af7));if(_0x498a65['length']>0x0||_0x3a42e4['length']>0x0){const _0x6d1d52=[..._0x498a65[_0x13e963(0xfc)](_0x1453a4=>String(_0x1453a4)),..._0x3a42e4][_0x13e963(0x12b)](',\x20');throw new Error(_0x13e963(0x103)+_0x6d1d52);}const _0x96443f=new Set(_0x56a08a[_0x13e963(0x114)]),_0x40dd69=new Set(_0x56a08a['paths']);return _0x4a5e72[_0x13e963(0xf4)](_0x5b8b90=>_0x96443f[_0x13e963(0x10b)](_0x5b8b90['id'])||_0x40dd69[_0x13e963(0x10b)](_0x5b8b90['path']));}function normalizeMode(_0x23906d){const _0x55fd3c=a172_0x32f2;if(!_0x23906d)return _0x55fd3c(0xee);if(_0x23906d===_0x55fd3c(0x130)||_0x23906d===_0x55fd3c(0xee))return _0x23906d;throw new Error(_0x55fd3c(0x11c)+_0x23906d+_0x55fd3c(0x10f));}function buildMenuUpdateDiff(_0x2ddeae,_0x3cd493,_0x3c3a8b,_0x1cb1d6,_0xb7bc76){const _0x22e46d=a172_0x32f2,_0x2bc59a=[..._0x2ddeae[_0x22e46d(0x12f)]];_0x3c3a8b===_0x22e46d(0xee)&&assertUnambiguousPatchResources(_0x2ddeae,_0x2bc59a,_0x3cd493);const _0x71ba01=_0x3c3a8b==='patch'?patchResources(_0x2bc59a,_0x3cd493):replaceResources(_0x3cd493),_0x4065a4=[],_0x140a40=_0x2bc59a[_0x22e46d(0x116)](isJsResource),_0x4402ce=_0x71ba01[_0x22e46d(0x116)](isJsResource);if(_0x140a40&&!_0x4402ce){const _0x50387d=_0x22e46d(0x126)+_0x2ddeae['label']+'\x22\x20('+_0x2ddeae['path']+').\x20'+_0x22e46d(0x12e);if(!_0x1cb1d6)throw new Error(_0x50387d);_0x4065a4[_0x22e46d(0xf1)](_0x50387d);}const _0x4f1f40=_0x2bc59a[_0x22e46d(0x116)](isCssResource),_0x3efc45=_0x71ba01[_0x22e46d(0x116)](isCssResource);_0x4f1f40&&!_0x3efc45&&_0x4065a4[_0x22e46d(0xf1)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2ddeae['label']+_0x22e46d(0x12a)+_0x2ddeae[_0x22e46d(0x132)]+').');const _0xf8df86=typeof _0x2ddeae[_0x22e46d(0x11f)]?.['loadScriptMode']===_0x22e46d(0x108)?_0x2ddeae[_0x22e46d(0x11f)][_0x22e46d(0xfe)]:null,_0x1573d9=_0xb7bc76?{'loadScriptMode':_0xf8df86}:{},_0x2c2011=_0xb7bc76?{'loadScriptMode':_0xb7bc76}:{};return{'id':_0x2ddeae['id'],'label':_0x2ddeae[_0x22e46d(0xf8)],'path':_0x2ddeae['path'],'mode':_0x3c3a8b,'before':{'resources':_0x2bc59a,..._0x1573d9},'after':{'resources':_0x71ba01,..._0x2c2011},'warnings':_0x4065a4};}function replaceResources(_0x1e0c42){const _0x58e283=a172_0x32f2;return[_0x1e0c42[_0x58e283(0x10d)],_0x1e0c42['cssUrl']][_0x58e283(0xf4)](_0xc2240c=>!!_0xc2240c);}function assertUnambiguousPatchResources(_0x1473d6,_0x530a9c,_0x3c9aba){const _0x854a69=a172_0x32f2,_0x3b4b80=_0x530a9c[_0x854a69(0xf4)](isJsResource)['length'];if(_0x3c9aba[_0x854a69(0x10d)]&&_0x3b4b80>0x1)throw new Error(_0x854a69(0x112)+_0x3b4b80+_0x854a69(0x119)+_0x1473d6[_0x854a69(0xf8)]+_0x854a69(0x12a)+_0x1473d6[_0x854a69(0x132)]+')\x20'+_0x854a69(0x110));const _0x1fcee1=_0x530a9c['filter'](isCssResource)[_0x854a69(0x105)];if(_0x3c9aba[_0x854a69(0x125)]&&_0x1fcee1>0x1)throw new Error(_0x854a69(0x112)+_0x1fcee1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x1473d6[_0x854a69(0xf8)]+_0x854a69(0x12a)+_0x1473d6[_0x854a69(0x132)]+')\x20'+_0x854a69(0x101));}function patchResources(_0xdee22f,_0x17a66d){const _0x59cc06=a172_0x32f2;let _0x93cdc1=![],_0x235c38=![];const _0x4fd5c5=[];for(const _0x3b079a of _0xdee22f){if(isJsResource(_0x3b079a)){if(_0x17a66d[_0x59cc06(0x10d)]&&!_0x93cdc1)_0x4fd5c5[_0x59cc06(0xf1)](_0x17a66d[_0x59cc06(0x10d)]),_0x93cdc1=!![];else!_0x17a66d[_0x59cc06(0x10d)]&&_0x4fd5c5['push'](_0x3b079a);continue;}if(isCssResource(_0x3b079a)){if(_0x17a66d[_0x59cc06(0x125)]&&!_0x235c38)_0x4fd5c5['push'](_0x17a66d[_0x59cc06(0x125)]),_0x235c38=!![];else!_0x17a66d[_0x59cc06(0x125)]&&_0x4fd5c5[_0x59cc06(0xf1)](_0x3b079a);continue;}_0x4fd5c5[_0x59cc06(0xf1)](_0x3b079a);}return _0x17a66d[_0x59cc06(0x10d)]&&!_0x93cdc1&&_0x4fd5c5[_0x59cc06(0xfb)](_0x17a66d[_0x59cc06(0x10d)]),_0x17a66d['cssUrl']&&!_0x235c38&&_0x4fd5c5[_0x59cc06(0xf1)](_0x17a66d[_0x59cc06(0x125)]),_0x4fd5c5;}function isJsResource(_0x3571b0){const _0x4ea8f5=a172_0x32f2;return stripQuery(_0x3571b0)[_0x4ea8f5(0xf2)]()[_0x4ea8f5(0x129)](_0x4ea8f5(0xf0));}function a172_0x13e6(){const _0x235b22=['push','toLowerCase','4472048HWvbmk','filter','paths','message','1341bXKInq','label','3988700pnnMsh','setLogPath','unshift','map','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','loadScriptMode','value','22864435dTvqiF','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','10zbIQRw','length','trim','parse','string','selection','split','has','object','jsUrl','55504XJhXoC','.\x20Allowed\x20values:\x20replace,\x20patch','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','3289638CrgJun','menu\x20asset-update\x20cannot\x20patch\x20','7971Eeewys','menuIds','CSS\x20URL\x20is\x20unreachable:\x20','some','27717cuegDm','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20existing\x20JS\x20resources\x20for\x20\x22','cwd','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','Invalid\x20--mode:\x20','info','all','extend','JS\x20URL\x20is\x20unreachable:\x20','dryRun','isArray','field','Start\x20non-interactive\x20menu\x20asset\x20update','cssUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','allSettled','64xnLUJD','endsWith','\x22\x20(','join','status','after','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','resources','replace','Invalid\x20--params:\x20','path','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','1764yZxAdZ','patch','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','.js'];a172_0x13e6=function(){return _0x235b22;};return a172_0x13e6();}function isCssResource(_0x587c28){const _0x8d7f1d=a172_0x32f2;return stripQuery(_0x587c28)['toLowerCase']()[_0x8d7f1d(0x129)]('.css');}function stripQuery(_0x190798){const _0x15f41c=a172_0x32f2;return _0x190798[_0x15f41c(0x10a)]('?')[0x0]??_0x190798;}function parseUpdateParamsFlag(_0x8e9d94){const _0x4f4d1a=a172_0x32f2;if(!_0x8e9d94||typeof _0x8e9d94!==_0x4f4d1a(0x108))return{};try{const _0x55edc7=JSON[_0x4f4d1a(0x107)](_0x8e9d94);if(typeof _0x55edc7!==_0x4f4d1a(0x10c)||_0x55edc7===null||Array[_0x4f4d1a(0x122)](_0x55edc7))return{};return{'jsUrl':typeof _0x55edc7['jsUrl']===_0x4f4d1a(0x108)?_0x55edc7[_0x4f4d1a(0x10d)][_0x4f4d1a(0x106)]():undefined,'cssUrl':typeof _0x55edc7['cssUrl']===_0x4f4d1a(0x108)?_0x55edc7[_0x4f4d1a(0x125)]['trim']():undefined};}catch{return{};}}
1
+ function a172_0x32ee(_0x52ea9d,_0x17e44c){_0x52ea9d=_0x52ea9d-0xd6;const _0x518f7e=a172_0x518f();let _0x32ee4b=_0x518f7e[_0x52ea9d];return _0x32ee4b;}(function(_0x10d8ff,_0x59794f){const _0x3ca626=a172_0x32ee,_0x3b94f8=_0x10d8ff();while(!![]){try{const _0x57db6d=-parseInt(_0x3ca626(0x10d))/0x1+-parseInt(_0x3ca626(0xd6))/0x2*(-parseInt(_0x3ca626(0xf7))/0x3)+parseInt(_0x3ca626(0x111))/0x4+parseInt(_0x3ca626(0xe0))/0x5+-parseInt(_0x3ca626(0x113))/0x6*(parseInt(_0x3ca626(0x110))/0x7)+parseInt(_0x3ca626(0x108))/0x8+-parseInt(_0x3ca626(0xe3))/0x9*(-parseInt(_0x3ca626(0x10c))/0xa);if(_0x57db6d===_0x59794f)break;else _0x3b94f8['push'](_0x3b94f8['shift']());}catch(_0x4fd666){_0x3b94f8['push'](_0x3b94f8['shift']());}}}(a172_0x518f,0xb72cf));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x46cb31){const _0x5943db=a172_0x32ee,_0x1ba13d=[];return _0x46cb31[_0x5943db(0xec)]&&!isValidJsHttpsUrl(_0x46cb31['jsUrl'])&&_0x1ba13d[_0x5943db(0x112)]({'field':_0x5943db(0xec),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x46cb31[_0x5943db(0x103)]&&!isValidCssHttpsUrl(_0x46cb31[_0x5943db(0x103)])&&_0x1ba13d[_0x5943db(0x112)]({'field':_0x5943db(0x103),'message':_0x5943db(0xd8)}),_0x1ba13d;}export async function runMenuUpdateCore(_0x396715,_0x19cac7,_0x189713,_0x4da4c0={}){const _0x43e61d=a172_0x32ee,_0x26a2e1=parseUpdateParamsFlag(_0x189713),_0x3dfd13=normalizeMode(_0x4da4c0[_0x43e61d(0xfb)]);validateSelection(_0x4da4c0[_0x43e61d(0x107)]);const _0x2188f4=[];if(_0x26a2e1[_0x43e61d(0xec)])_0x2188f4[_0x43e61d(0x112)](_0x26a2e1['jsUrl']);if(_0x26a2e1['cssUrl'])_0x2188f4[_0x43e61d(0x112)](_0x26a2e1[_0x43e61d(0x103)]);const _0x51226d=validateParams(_0x26a2e1);if(_0x51226d[_0x43e61d(0xde)]>0x0){const _0x1c4b0f=_0x51226d[_0x43e61d(0xd9)](_0x36a924=>'--params.'+_0x36a924[_0x43e61d(0xf4)]+':\x20'+_0x36a924['message'])[_0x43e61d(0xff)](';\x20');throw new Error(_0x43e61d(0x101)+_0x1c4b0f);}if(_0x2188f4['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x43e61d(0x104));logger[_0x43e61d(0xdf)](process[_0x43e61d(0xe6)]()),logger[_0x43e61d(0xf0)]('menu-asset-update','Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x396715,'jsUrl':_0x26a2e1[_0x43e61d(0xec)],'cssUrl':_0x26a2e1[_0x43e61d(0x103)],'mode':_0x3dfd13,'dryRun':_0x4da4c0['dryRun']===!![]});if(_0x26a2e1['jsUrl']){const _0x565ee5=await isUrlReachable(_0x26a2e1[_0x43e61d(0xec)]);if(!_0x565ee5)throw new Error(_0x43e61d(0xe4)+_0x26a2e1[_0x43e61d(0xec)]);}if(_0x26a2e1[_0x43e61d(0x103)]){const _0x1e91f2=await isUrlReachable(_0x26a2e1[_0x43e61d(0x103)]);if(!_0x1e91f2)throw new Error(_0x43e61d(0xe1)+_0x26a2e1['cssUrl']);}const _0x309bb0=await getOnlineMenuList(_0x396715,_0x19cac7),_0x1e97a8=_0x309bb0[_0x43e61d(0xf1)](_0x2f64c2=>_0x2f64c2[_0x43e61d(0xf5)][_0x43e61d(0xde)]>0x0),_0x12d941=selectMenusForUpdate(_0x1e97a8,_0x4da4c0[_0x43e61d(0x107)]);if(_0x12d941[_0x43e61d(0xde)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4da4c0[_0x43e61d(0x10e)]===!![]};const _0x3f172a=_0x12d941[_0x43e61d(0xd9)](_0x2865bf=>buildMenuUpdateDiff(_0x2865bf,_0x26a2e1,_0x3dfd13,_0x4da4c0['force']===!![],_0x4da4c0['loadScriptMode']));if(_0x4da4c0[_0x43e61d(0x10e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x3f172a};const _0x183e79=await Promise[_0x43e61d(0x118)](_0x12d941[_0x43e61d(0xd9)]((_0xa79b2b,_0x1bd07e)=>updateMenuCdnUrl(_0x396715,_0x19cac7,{'id':_0xa79b2b['id'],'label':_0xa79b2b[_0x43e61d(0x100)],'path':_0xa79b2b['path'],'resources':_0x3f172a[_0x1bd07e][_0x43e61d(0xf6)]['resources'],'extend':_0xa79b2b[_0x43e61d(0xdd)]??null,'loadScriptMode':_0x4da4c0['loadScriptMode']}))),_0x375c65=_0x183e79[_0x43e61d(0xf1)](_0x1db102=>_0x1db102[_0x43e61d(0xf8)]===_0x43e61d(0x114))[_0x43e61d(0xd9)](_0x4c2df7=>_0x4c2df7[_0x43e61d(0xe5)]),_0x391795=_0x183e79[_0x43e61d(0xf1)](_0x421d52=>_0x421d52[_0x43e61d(0xf8)]==='rejected')[_0x43e61d(0xde)];return logger['info'](_0x43e61d(0xfd),'Menu\x20asset\x20update\x20completed',{'count':_0x12d941[_0x43e61d(0xde)],'resources':_0x2188f4}),{'updated':_0x375c65[_0x43e61d(0xde)],'failed':_0x391795,'skipped':![],'menus':_0x375c65};}function a172_0x518f(){const _0x5c306f=['Invalid\x20--params:\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','cssUrl','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','path','replace','selection','6083936EXeUEW','\x22\x20(','paths','Invalid\x20--mode:\x20','470740BdFFyU','737812jwlVlG','dryRun','.js','146503aVYLaz','1390560bvzTQZ','push','366AAzYYP','fulfilled','endsWith','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','allSettled','\x20existing\x20CSS\x20resources\x20for\x20\x22','45748bqPKjD','parse','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','map','has','menu\x20asset-update\x20cannot\x20patch\x20','string','extend','length','setLogPath','4818930JdbkEo','CSS\x20URL\x20is\x20unreachable:\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','45tSbCPs','JS\x20URL\x20is\x20unreachable:\x20','value','cwd','\x20existing\x20JS\x20resources\x20for\x20\x22','menuIds','isArray','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.css','jsUrl','split','loadScriptMode','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','info','filter','some','unshift','field','resources','after','60jZmixt','status','all','trim','mode','object','menu-asset-update','patch','join','label'];a172_0x518f=function(){return _0x5c306f;};return a172_0x518f();}function validateSelection(_0x154f3b){const _0x476835=a172_0x32ee;if(!_0x154f3b)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x154f3b[_0x476835(0xf9)]&&(_0x154f3b['menuIds'][_0x476835(0xde)]>0x0||_0x154f3b[_0x476835(0x10a)][_0x476835(0xde)]>0x0))throw new Error(_0x476835(0x102));if(!_0x154f3b[_0x476835(0xf9)]&&_0x154f3b[_0x476835(0xe8)][_0x476835(0xde)]===0x0&&_0x154f3b[_0x476835(0x10a)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x45b2fc,_0x20e586){const _0x60e5d8=a172_0x32ee;validateSelection(_0x20e586);if(_0x20e586[_0x60e5d8(0xf9)])return _0x45b2fc;const _0x54b26f=new Set(_0x45b2fc[_0x60e5d8(0xd9)](_0x100f3e=>_0x100f3e['id'])),_0x584b1c=new Set(_0x45b2fc['map'](_0x40b2b7=>_0x40b2b7[_0x60e5d8(0x105)])),_0x3d7e8e=_0x20e586[_0x60e5d8(0xe8)][_0x60e5d8(0xf1)](_0x569fbb=>!_0x54b26f[_0x60e5d8(0xda)](_0x569fbb)),_0x5b69b2=_0x20e586[_0x60e5d8(0x10a)][_0x60e5d8(0xf1)](_0x4700cf=>!_0x584b1c['has'](_0x4700cf));if(_0x3d7e8e[_0x60e5d8(0xde)]>0x0||_0x5b69b2['length']>0x0){const _0x42d810=[..._0x3d7e8e[_0x60e5d8(0xd9)](_0x380b77=>String(_0x380b77)),..._0x5b69b2][_0x60e5d8(0xff)](',\x20');throw new Error(_0x60e5d8(0x116)+_0x42d810);}const _0x3c9a15=new Set(_0x20e586[_0x60e5d8(0xe8)]),_0x4de24a=new Set(_0x20e586[_0x60e5d8(0x10a)]);return _0x45b2fc[_0x60e5d8(0xf1)](_0x17433a=>_0x3c9a15[_0x60e5d8(0xda)](_0x17433a['id'])||_0x4de24a['has'](_0x17433a[_0x60e5d8(0x105)]));}function normalizeMode(_0x12ef6c){const _0x45a571=a172_0x32ee;if(!_0x12ef6c)return'patch';if(_0x12ef6c===_0x45a571(0x106)||_0x12ef6c===_0x45a571(0xfe))return _0x12ef6c;throw new Error(_0x45a571(0x10b)+_0x12ef6c+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x5169c5,_0xa71bbd,_0x59031d,_0xd71313,_0x5ef196){const _0xedc8cb=a172_0x32ee,_0x2ef064=[..._0x5169c5[_0xedc8cb(0xf5)]];_0x59031d===_0xedc8cb(0xfe)&&assertUnambiguousPatchResources(_0x5169c5,_0x2ef064,_0xa71bbd);const _0x47091b=_0x59031d==='patch'?patchResources(_0x2ef064,_0xa71bbd):replaceResources(_0xa71bbd),_0x1287c0=[],_0x16d0aa=_0x2ef064[_0xedc8cb(0xf2)](isJsResource),_0x4f441d=_0x47091b[_0xedc8cb(0xf2)](isJsResource);if(_0x16d0aa&&!_0x4f441d){const _0x42bd37='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x5169c5[_0xedc8cb(0x100)]+_0xedc8cb(0x109)+_0x5169c5['path']+').\x20'+_0xedc8cb(0x117);if(!_0xd71313)throw new Error(_0x42bd37);_0x1287c0[_0xedc8cb(0x112)](_0x42bd37);}const _0x4d65de=_0x2ef064['some'](isCssResource),_0x32712f=_0x47091b[_0xedc8cb(0xf2)](isCssResource);_0x4d65de&&!_0x32712f&&_0x1287c0['push'](_0xedc8cb(0xef)+_0x5169c5[_0xedc8cb(0x100)]+'\x22\x20('+_0x5169c5[_0xedc8cb(0x105)]+').');const _0x3a72c9=typeof _0x5169c5[_0xedc8cb(0xdd)]?.['loadScriptMode']===_0xedc8cb(0xdc)?_0x5169c5[_0xedc8cb(0xdd)][_0xedc8cb(0xee)]:null,_0x54e47f=_0x5ef196?{'loadScriptMode':_0x3a72c9}:{},_0x227a1e=_0x5ef196?{'loadScriptMode':_0x5ef196}:{};return{'id':_0x5169c5['id'],'label':_0x5169c5['label'],'path':_0x5169c5['path'],'mode':_0x59031d,'before':{'resources':_0x2ef064,..._0x54e47f},'after':{'resources':_0x47091b,..._0x227a1e},'warnings':_0x1287c0};}function replaceResources(_0x3b7fad){const _0x204d20=a172_0x32ee;return[_0x3b7fad[_0x204d20(0xec)],_0x3b7fad['cssUrl']][_0x204d20(0xf1)](_0x320fb5=>!!_0x320fb5);}function assertUnambiguousPatchResources(_0x289f04,_0x1e2ef8,_0x50e278){const _0x2a4b4c=a172_0x32ee,_0x1a0a44=_0x1e2ef8[_0x2a4b4c(0xf1)](isJsResource)[_0x2a4b4c(0xde)];if(_0x50e278[_0x2a4b4c(0xec)]&&_0x1a0a44>0x1)throw new Error(_0x2a4b4c(0xdb)+_0x1a0a44+_0x2a4b4c(0xe7)+_0x289f04[_0x2a4b4c(0x100)]+'\x22\x20('+_0x289f04[_0x2a4b4c(0x105)]+')\x20'+_0x2a4b4c(0xea));const _0x43929f=_0x1e2ef8[_0x2a4b4c(0xf1)](isCssResource)['length'];if(_0x50e278[_0x2a4b4c(0x103)]&&_0x43929f>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x43929f+_0x2a4b4c(0x119)+_0x289f04[_0x2a4b4c(0x100)]+_0x2a4b4c(0x109)+_0x289f04[_0x2a4b4c(0x105)]+')\x20'+_0x2a4b4c(0xe2));}function patchResources(_0x41ed33,_0x18adb5){const _0x150f1f=a172_0x32ee;let _0xc06ad2=![],_0x376f07=![];const _0x6200e4=[];for(const _0x4b16d3 of _0x41ed33){if(isJsResource(_0x4b16d3)){if(_0x18adb5[_0x150f1f(0xec)]&&!_0xc06ad2)_0x6200e4[_0x150f1f(0x112)](_0x18adb5[_0x150f1f(0xec)]),_0xc06ad2=!![];else!_0x18adb5[_0x150f1f(0xec)]&&_0x6200e4[_0x150f1f(0x112)](_0x4b16d3);continue;}if(isCssResource(_0x4b16d3)){if(_0x18adb5[_0x150f1f(0x103)]&&!_0x376f07)_0x6200e4[_0x150f1f(0x112)](_0x18adb5[_0x150f1f(0x103)]),_0x376f07=!![];else!_0x18adb5[_0x150f1f(0x103)]&&_0x6200e4[_0x150f1f(0x112)](_0x4b16d3);continue;}_0x6200e4[_0x150f1f(0x112)](_0x4b16d3);}return _0x18adb5['jsUrl']&&!_0xc06ad2&&_0x6200e4[_0x150f1f(0xf3)](_0x18adb5['jsUrl']),_0x18adb5['cssUrl']&&!_0x376f07&&_0x6200e4['push'](_0x18adb5[_0x150f1f(0x103)]),_0x6200e4;}function isJsResource(_0xd3eb8){const _0x5a4c49=a172_0x32ee;return stripQuery(_0xd3eb8)['toLowerCase']()[_0x5a4c49(0x115)](_0x5a4c49(0x10f));}function isCssResource(_0x1c6660){const _0x29d0c9=a172_0x32ee;return stripQuery(_0x1c6660)['toLowerCase']()['endsWith'](_0x29d0c9(0xeb));}function stripQuery(_0x3af2a4){const _0x11b967=a172_0x32ee;return _0x3af2a4[_0x11b967(0xed)]('?')[0x0]??_0x3af2a4;}function parseUpdateParamsFlag(_0x981364){const _0x551690=a172_0x32ee;if(!_0x981364||typeof _0x981364!==_0x551690(0xdc))return{};try{const _0x267475=JSON[_0x551690(0xd7)](_0x981364);if(typeof _0x267475!==_0x551690(0xfc)||_0x267475===null||Array[_0x551690(0xe9)](_0x267475))return{};return{'jsUrl':typeof _0x267475['jsUrl']===_0x551690(0xdc)?_0x267475['jsUrl'][_0x551690(0xfa)]():undefined,'cssUrl':typeof _0x267475[_0x551690(0x103)]===_0x551690(0xdc)?_0x267475[_0x551690(0x103)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x4073a1,_0x4ca0d3){const _0x496759=a173_0x108b,_0x1f485d=_0x4073a1();while(!![]){try{const _0x45858e=-parseInt(_0x496759(0x12e))/0x1*(parseInt(_0x496759(0x12c))/0x2)+-parseInt(_0x496759(0x126))/0x3+-parseInt(_0x496759(0x12f))/0x4*(parseInt(_0x496759(0x129))/0x5)+parseInt(_0x496759(0x125))/0x6*(parseInt(_0x496759(0x124))/0x7)+parseInt(_0x496759(0x133))/0x8+-parseInt(_0x496759(0x134))/0x9*(-parseInt(_0x496759(0x128))/0xa)+parseInt(_0x496759(0x12a))/0xb;if(_0x45858e===_0x4ca0d3)break;else _0x1f485d['push'](_0x1f485d['shift']());}catch(_0x3851aa){_0x1f485d['push'](_0x1f485d['shift']());}}}(a173_0x4a3d,0xe0fb1));export function isValidJsHttpsUrl(_0x16ab21){const _0x4dcba2=a173_0x108b;return/^https:\/\/.+\.js(\?.*)?$/[_0x4dcba2(0x131)](_0x16ab21[_0x4dcba2(0x12b)]());}export function isValidCssHttpsUrl(_0x3172b6){const _0x39fdcb=a173_0x108b;return/^https:\/\/.+\.css(\?.*)?$/[_0x39fdcb(0x131)](_0x3172b6['trim']());}function a173_0x108b(_0x3658fa,_0x4b90c2){_0x3658fa=_0x3658fa-0x124;const _0x4a3d1c=a173_0x4a3d();let _0x108b8c=_0x4a3d1c[_0x3658fa];return _0x108b8c;}export async function isUrlReachable(_0x4d1a23){const _0xad2cdc=a173_0x108b;try{const _0x14c051=await fetch(_0x4d1a23,{'method':_0xad2cdc(0x132)});if(_0x14c051['ok'])return!![];}catch{}try{const _0x5a0d8a=await fetch(_0x4d1a23,{'method':_0xad2cdc(0x127),'headers':{'Range':_0xad2cdc(0x130)}}),_0x52a029=_0x5a0d8a['ok'];try{await _0x5a0d8a[_0xad2cdc(0x12d)]?.['cancel']();}catch{}return _0x52a029;}catch{return![];}}function a173_0x4a3d(){const _0x1c5559=['4702728ulTxmM','GET','10lBmRRe','12875GBnfoC','24390916OUFxSb','trim','882214RWZTLE','body','2CYmMTM','1224zOdiTm','bytes=0-0','test','HEAD','4217496SAsuaY','106542paGgyY','3584FdcgtJ','16440ErjGzR'];a173_0x4a3d=function(){return _0x1c5559;};return a173_0x4a3d();}
1
+ (function(_0x2e5f76,_0x235357){const _0x98f1be=a173_0x2212,_0x1b1b27=_0x2e5f76();while(!![]){try{const _0x2c412c=-parseInt(_0x98f1be(0x144))/0x1*(parseInt(_0x98f1be(0x14b))/0x2)+-parseInt(_0x98f1be(0x142))/0x3+-parseInt(_0x98f1be(0x143))/0x4+-parseInt(_0x98f1be(0x13e))/0x5+parseInt(_0x98f1be(0x14d))/0x6*(-parseInt(_0x98f1be(0x146))/0x7)+-parseInt(_0x98f1be(0x14c))/0x8*(-parseInt(_0x98f1be(0x147))/0x9)+parseInt(_0x98f1be(0x148))/0xa;if(_0x2c412c===_0x235357)break;else _0x1b1b27['push'](_0x1b1b27['shift']());}catch(_0x5d9b69){_0x1b1b27['push'](_0x1b1b27['shift']());}}}(a173_0x58bb,0xdc66e));function a173_0x58bb(){const _0x927cd2=['7126IdOFea','27uiNrLR','42229070AjAeaM','body','trim','40634QCekNk','1635472nUVZcq','78UkEbPa','9022675xEvzAU','bytes=0-0','cancel','test','3920844suoNLz','1447008ruiPNK','22gebjTD','HEAD'];a173_0x58bb=function(){return _0x927cd2;};return a173_0x58bb();}function a173_0x2212(_0xdd42f1,_0x3242d8){_0xdd42f1=_0xdd42f1-0x13e;const _0x58bbfd=a173_0x58bb();let _0x22125a=_0x58bbfd[_0xdd42f1];return _0x22125a;}export function isValidJsHttpsUrl(_0x12298b){const _0x548ba9=a173_0x2212;return/^https:\/\/.+\.js(\?.*)?$/[_0x548ba9(0x141)](_0x12298b[_0x548ba9(0x14a)]());}export function isValidCssHttpsUrl(_0x17a419){const _0x2a3a58=a173_0x2212;return/^https:\/\/.+\.css(\?.*)?$/[_0x2a3a58(0x141)](_0x17a419[_0x2a3a58(0x14a)]());}export async function isUrlReachable(_0x1fc386){const _0x255cd0=a173_0x2212;try{const _0x5e1f11=await fetch(_0x1fc386,{'method':_0x255cd0(0x145)});if(_0x5e1f11['ok'])return!![];}catch{}try{const _0x302011=await fetch(_0x1fc386,{'method':'GET','headers':{'Range':_0x255cd0(0x13f)}}),_0x2782=_0x302011['ok'];try{await _0x302011[_0x255cd0(0x149)]?.[_0x255cd0(0x140)]();}catch{}return _0x2782;}catch{return![];}}
@@ -1 +1 @@
1
- const a174_0x19f7a5=a174_0x2f1d;(function(_0x6f1634,_0x25d362){const _0x4c4f0e=a174_0x2f1d,_0x37c592=_0x6f1634();while(!![]){try{const _0x1d8207=parseInt(_0x4c4f0e(0xa7))/0x1*(-parseInt(_0x4c4f0e(0xc5))/0x2)+parseInt(_0x4c4f0e(0xb6))/0x3+-parseInt(_0x4c4f0e(0xa9))/0x4+-parseInt(_0x4c4f0e(0xda))/0x5+parseInt(_0x4c4f0e(0xa8))/0x6*(parseInt(_0x4c4f0e(0xa4))/0x7)+-parseInt(_0x4c4f0e(0xd6))/0x8+-parseInt(_0x4c4f0e(0xb3))/0x9*(-parseInt(_0x4c4f0e(0xb8))/0xa);if(_0x1d8207===_0x25d362)break;else _0x37c592['push'](_0x37c592['shift']());}catch(_0x3658d9){_0x37c592['push'](_0x37c592['shift']());}}}(a174_0x454d,0x46eb7));import a174_0x3b4ce8 from'chalk';function a174_0x454d(){const _0x52b670=['localPages','717353QTyFTs','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20menu(s)\x20created','3ViMUuZ','18OmTYdk','329344VuAJcn','targetPages','\x20\x20Create\x20','created','gray','str','Menu\x20creation\x20failed','jsUrl','write','Sync\x20local\x20pages\x20as\x20platform\x20menus','9239067ageuQM','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','313824OVNHxt','\x20\x20Continue\x20with\x20creation?','10kYYXRe','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','sync','onlinePaths','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','yes','Pre-fill\x20JS/CSS\x20URLs.\x20','POST','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','string','skipped','params','Would\x20create\x20','69178BDWCMn','cyan','/smartapi/menu/create','rawFlags','Fetching\x20online\x20menu\x20list...','paths','\x20failed.','\x20\x20Cancelled.','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20completed:\x20','\x20menu(s)','✓\x20Menu\x20sync\x20completed:\x20','menu','appCode','appcode','selectedAppName','\x20created,\x20','3835760tsyOPv','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','split','cookie','2412740STkZIo','trim','map','\x20and\x20CSS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','length','failed','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','message','validation','cssUrl','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag'];a174_0x454d=function(){return _0x52b670;};return a174_0x454d();}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a174_0x2f1d(_0x2e56fe,_0x1e7a27){_0x2e56fe=_0x2e56fe-0x9b;const _0x454d52=a174_0x454d();let _0x2f1da9=_0x454d52[_0x2e56fe];return _0x2f1da9;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a174_0x19f7a5(0xd1),'command':a174_0x19f7a5(0xba),'description':a174_0x19f7a5(0xb2),'risk':a174_0x19f7a5(0xb1),'flags':[{'name':a174_0x19f7a5(0xc3),'type':a174_0x19f7a5(0xc1),'description':a174_0x19f7a5(0xbe)+a174_0x19f7a5(0xb5)},{'name':a174_0x19f7a5(0xca),'type':a174_0x19f7a5(0xc1),'description':a174_0x19f7a5(0xde)},{'name':a174_0x19f7a5(0xbd),'type':'boolean','description':a174_0x19f7a5(0xa5)}],async 'dryRun'(_0x2c6164){const _0x199007=a174_0x19f7a5;ensureRunnableContext(_0x2c6164[_0x199007(0xc8)],_0x2c6164[_0x199007(0xd4)]);const _0x363e25=await runMenuSyncCore(_0x2c6164[_0x199007(0xd2)],_0x2c6164[_0x199007(0xd9)],parsePaths(_0x2c6164[_0x199007(0xae)]('paths')),_0x2c6164[_0x199007(0xae)](_0x199007(0xc3)),{'dryRun':!![]});return{'method':_0x199007(0xbf),'url':_0x199007(0xc7),'body':_0x363e25,'description':_0x363e25[_0x199007(0xc2)]?_0x199007(0xd7):_0x199007(0xc4)+_0x363e25[_0x199007(0xaa)]['length']+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x4d56af){const _0x5d7239=a174_0x19f7a5;ensureRunnableContext(_0x4d56af[_0x5d7239(0xc8)],_0x4d56af['selectedAppName']);const _0x5a2e41=_0x4d56af[_0x5d7239(0xa2)](_0x5d7239(0xbd)),_0x404f63=_0x4d56af[_0x5d7239(0xae)](_0x5d7239(0xc3)),_0x3c0994=parsePaths(_0x4d56af[_0x5d7239(0xae)]('paths')),_0x24cd78=parseMenuSyncParams(_0x404f63);if(_0x5a2e41){const _0x54aba4=await runMenuSyncCore(_0x4d56af[_0x5d7239(0xd2)],_0x4d56af['cookie'],_0x3c0994,_0x404f63);if(_0x54aba4[_0x5d7239(0xc2)]){const _0x13f311=getLocalPages();_0x13f311[_0x5d7239(0x9b)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x5d7239(0xd0)+_0x54aba4[_0x5d7239(0xac)]+_0x5d7239(0xa6));return{'ok':!![],'data':_0x54aba4,'message':_0x54aba4[_0x5d7239(0xc2)]?'Menu\x20sync\x20skipped':_0x5d7239(0xce)+_0x54aba4[_0x5d7239(0xac)]+'\x20created.'};}if(_0x3c0994['length']>0x0)throw CliErrors[_0x5d7239(0x9f)](_0x5d7239(0x9d),_0x5d7239(0xc0));if(!isInteractive()&&_0x404f63)throw CliErrors[_0x5d7239(0x9f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x5d7239(0xc0));requireInteractive();const _0x165c4f=startSpinner(_0x5d7239(0xc9));let _0x178b02,_0x15da8a,_0x1509dd;try{const _0x2ba9d4=await fetchMenuData(_0x4d56af[_0x5d7239(0xd2)],_0x4d56af['cookie']);_0x178b02=_0x2ba9d4[_0x5d7239(0xa3)],_0x15da8a=_0x2ba9d4[_0x5d7239(0xbb)],_0x1509dd=_0x2ba9d4['onlineMenuList'],stopSpinner(_0x165c4f,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x59e5fc){stopSpinner(_0x165c4f,_0x5d7239(0xa1),![]);throw CliErrors['validation'](_0x59e5fc instanceof Error?_0x59e5fc[_0x5d7239(0x9e)]:_0x5d7239(0xa1));}if(_0x178b02['length']===0x0)return writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xb4)](_0x5d7239(0xbc))),{'ok':!![]};const _0x104c5c=buildCompareRows(_0x178b02,_0x15da8a);writeCliSideChannelLine(renderCompareTable(_0x104c5c)),writeCliSideChannelLine('');const _0x10da11=await selectPages(_0x178b02,_0x15da8a);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xc6)](_0x5d7239(0xcd)+_0x10da11[_0x5d7239(0x9b)]+'\x20page(s)'));const _0xb899d4=_0x24cd78[_0x5d7239(0xb0)]&&_0x24cd78[_0x5d7239(0xa0)];if(!_0xb899d4){writeCliSideChannelLine(renderSyncSummary(_0x10da11,_0x15da8a['size']>0x0));const _0x4b4b98=await askConfirm(_0x5d7239(0xb7));if(!_0x4b4b98)return writeCliSideChannelLine(a174_0x3b4ce8['gray'](_0x5d7239(0xcc))),{'ok':!![]};}let _0x2ca414=_0x24cd78['jsUrl'],_0x1d9699=_0x24cd78[_0x5d7239(0xa0)];!_0x2ca414&&(_0x2ca414=await askJsUrl());!_0x1d9699&&(_0x1d9699=await askCssUrl());const _0x3b43d2=await askConfirm(_0x5d7239(0xab)+_0x10da11[_0x5d7239(0x9b)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2ca414+_0x5d7239(0xdd)+_0x1d9699+'?');if(!_0x3b43d2)return writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xad)](_0x5d7239(0xcc))),{'ok':!![]};const _0x5ad321=[_0x2ca414,_0x1d9699],_0x576de2=startSpinner('Creating\x20'+_0x10da11[_0x5d7239(0x9b)]+'\x20menu(s)...');try{const _0x264b2c=await doCreateMenus(_0x4d56af['appCode'],_0x4d56af[_0x5d7239(0xd9)],_0x10da11,_0x5ad321);return stopSpinner(_0x576de2,'Created\x20'+_0x264b2c[_0x5d7239(0xac)]+_0x5d7239(0xcf),!![]),{'ok':!![],'data':_0x264b2c,'message':_0x5d7239(0xce)+_0x264b2c[_0x5d7239(0xac)]+_0x5d7239(0xd5)+_0x264b2c[_0x5d7239(0x9c)]+_0x5d7239(0xcb)};}catch(_0x593e94){stopSpinner(_0x576de2,_0x5d7239(0xaf),![]);throw CliErrors[_0x5d7239(0x9f)](_0x593e94 instanceof Error?_0x593e94['message']:_0x5d7239(0xaf));}}};function ensureRunnableContext(_0x440f0e,_0x5d5a98){const _0xa30355=a174_0x19f7a5,_0x4ed3a7=_0x440f0e[_0xa30355(0xd3)]?String(_0x440f0e[_0xa30355(0xd3)])[_0xa30355(0xdb)]():'';if(!isInProject()&&!_0x5d5a98&&!_0x4ed3a7)throw CliErrors[_0xa30355(0x9f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0xa30355(0xb9));}function parsePaths(_0x2995d7){const _0x57a3b7=a174_0x19f7a5;return[...new Set(_0x2995d7[_0x57a3b7(0xd8)](',')[_0x57a3b7(0xdc)](_0xa3f370=>_0xa3f370['trim']())['filter'](Boolean))];}
1
+ const a174_0x14ccd1=a174_0x189f;(function(_0x57bfb1,_0x4efc7b){const _0x131e87=a174_0x189f,_0x239ba9=_0x57bfb1();while(!![]){try{const _0x256c92=parseInt(_0x131e87(0x17a))/0x1+-parseInt(_0x131e87(0x180))/0x2+parseInt(_0x131e87(0x1ad))/0x3+-parseInt(_0x131e87(0x194))/0x4*(parseInt(_0x131e87(0x18f))/0x5)+parseInt(_0x131e87(0x1ab))/0x6*(parseInt(_0x131e87(0x1c3))/0x7)+parseInt(_0x131e87(0x193))/0x8*(-parseInt(_0x131e87(0x1af))/0x9)+-parseInt(_0x131e87(0x198))/0xa*(parseInt(_0x131e87(0x186))/0xb);if(_0x256c92===_0x4efc7b)break;else _0x239ba9['push'](_0x239ba9['shift']());}catch(_0x456888){_0x239ba9['push'](_0x239ba9['shift']());}}}(a174_0x368f,0x398a2));import a174_0x4570fd from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a174_0x189f(_0x2111d4,_0x2f4258){_0x2111d4=_0x2111d4-0x179;const _0x368ff3=a174_0x368f();let _0x189fd1=_0x368ff3[_0x2111d4];return _0x189fd1;}import{isInProject}from'../../context.js';function a174_0x368f(){const _0x45155a=['Created\x20','\x20and\x20CSS:\x20','skipped','124230HOLZdM','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20menu(s)','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20created','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','549813NVADrL','jsUrl','failed','params','\x20created,\x20','length','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cssUrl','POST','1868355qftcYv','size','cookie','paths','45008ilgBCU','4pEqobF','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','menu','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','10fWAyeb','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Pre-fill\x20JS/CSS\x20URLs.\x20','write','sync','targetPages','yes','✓\x20Menu\x20sync\x20completed:\x20','\x20created.','Menu\x20sync\x20completed:\x20','\x20failed.','\x20menu(s)...','split','Fetching\x20online\x20menu\x20list...','Would\x20create\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','filter','rawFlags','\x20\x20Continue\x20with\x20creation?','84SieFBf','\x20\x20Cancelled.','1109154EqgLTF','Menu\x20creation\x20failed','432mSYXEJ','gray','flag','boolean','Failed\x20to\x20fetch\x20online\x20menu\x20list','trim','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','created','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','onlineMenuList','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Creating\x20','/smartapi/menu/create','cyan','appcode','selectedAppName','string','yellow','validation','88459OGWfVX','\x20page(s)','\x20menu(s)\x20with\x20JS:\x20','\x20\x20Create\x20','str','444863zPbmgC','message','\x20local\x20microfrontend\x20menu(s).'];a174_0x368f=function(){return _0x45155a;};return a174_0x368f();}export const menuSync={'service':a174_0x14ccd1(0x196),'command':a174_0x14ccd1(0x19c),'description':a174_0x14ccd1(0x181),'risk':a174_0x14ccd1(0x19b),'flags':[{'name':a174_0x14ccd1(0x189),'type':a174_0x14ccd1(0x1c0),'description':a174_0x14ccd1(0x19a)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a174_0x14ccd1(0x192),'type':a174_0x14ccd1(0x1c0),'description':a174_0x14ccd1(0x1b5)},{'name':a174_0x14ccd1(0x19e),'type':a174_0x14ccd1(0x1b2),'description':a174_0x14ccd1(0x18c)}],async 'dryRun'(_0x39d306){const _0x58edb8=a174_0x14ccd1;ensureRunnableContext(_0x39d306['rawFlags'],_0x39d306['selectedAppName']);const _0x277d38=await runMenuSyncCore(_0x39d306['appCode'],_0x39d306[_0x58edb8(0x191)],parsePaths(_0x39d306[_0x58edb8(0x179)](_0x58edb8(0x192))),_0x39d306['str'](_0x58edb8(0x189)),{'dryRun':!![]});return{'method':_0x58edb8(0x18e),'url':_0x58edb8(0x1bc),'body':_0x277d38,'description':_0x277d38['skipped']?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x58edb8(0x1a6)+_0x277d38[_0x58edb8(0x19d)]['length']+_0x58edb8(0x17c)};},async 'execute'(_0x26327a){const _0x51a647=a174_0x14ccd1;ensureRunnableContext(_0x26327a[_0x51a647(0x1a9)],_0x26327a[_0x51a647(0x1bf)]);const _0x356ce3=_0x26327a[_0x51a647(0x1b1)](_0x51a647(0x19e)),_0x2f364a=_0x26327a[_0x51a647(0x179)](_0x51a647(0x189)),_0x38ac3b=parsePaths(_0x26327a['str'](_0x51a647(0x192))),_0x2ddbd5=parseMenuSyncParams(_0x2f364a);if(_0x356ce3){const _0x3e0f2d=await runMenuSyncCore(_0x26327a[_0x51a647(0x1b6)],_0x26327a[_0x51a647(0x191)],_0x38ac3b,_0x2f364a);if(_0x3e0f2d[_0x51a647(0x17f)]){const _0x4ce088=getLocalPages();_0x4ce088[_0x51a647(0x18b)]===0x0?writeCliSideChannelLine(_0x51a647(0x185)):writeCliSideChannelLine(_0x51a647(0x195));}else writeCliSideChannelLine(_0x51a647(0x19f)+_0x3e0f2d[_0x51a647(0x1b7)]+_0x51a647(0x184));return{'ok':!![],'data':_0x3e0f2d,'message':_0x3e0f2d[_0x51a647(0x17f)]?'Menu\x20sync\x20skipped':_0x51a647(0x1a1)+_0x3e0f2d[_0x51a647(0x1b7)]+_0x51a647(0x1a0)};}if(_0x38ac3b[_0x51a647(0x18b)]>0x0)throw CliErrors[_0x51a647(0x1c2)](_0x51a647(0x199),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x2f364a)throw CliErrors[_0x51a647(0x1c2)](_0x51a647(0x197),_0x51a647(0x1ba));requireInteractive();const _0x41c7ee=startSpinner(_0x51a647(0x1a5));let _0x121845,_0x10d1f8,_0x3ac917;try{const _0x13f67c=await fetchMenuData(_0x26327a['appCode'],_0x26327a[_0x51a647(0x191)]);_0x121845=_0x13f67c['localPages'],_0x10d1f8=_0x13f67c['onlinePaths'],_0x3ac917=_0x13f67c[_0x51a647(0x1b9)],stopSpinner(_0x41c7ee,_0x51a647(0x183),!![]);}catch(_0x99182a){stopSpinner(_0x41c7ee,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x99182a instanceof Error?_0x99182a[_0x51a647(0x17b)]:_0x51a647(0x1b3));}if(_0x121845[_0x51a647(0x18b)]===0x0)return writeCliSideChannelLine(a174_0x4570fd[_0x51a647(0x1c1)](_0x51a647(0x1a7))),{'ok':!![]};const _0x5a809e=buildCompareRows(_0x121845,_0x10d1f8);writeCliSideChannelLine(renderCompareTable(_0x5a809e)),writeCliSideChannelLine('');const _0x823f7b=await selectPages(_0x121845,_0x10d1f8);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x4570fd[_0x51a647(0x1bd)]('\x20\x20✓\x20Selected:\x20'+_0x823f7b[_0x51a647(0x18b)]+_0x51a647(0x1c4)));const _0x27e25b=_0x2ddbd5[_0x51a647(0x187)]&&_0x2ddbd5[_0x51a647(0x18d)];if(!_0x27e25b){writeCliSideChannelLine(renderSyncSummary(_0x823f7b,_0x10d1f8[_0x51a647(0x190)]>0x0));const _0xbab0ca=await askConfirm(_0x51a647(0x1aa));if(!_0xbab0ca)return writeCliSideChannelLine(a174_0x4570fd[_0x51a647(0x1b0)](_0x51a647(0x1ac))),{'ok':!![]};}let _0xad1410=_0x2ddbd5['jsUrl'],_0x50846f=_0x2ddbd5[_0x51a647(0x18d)];!_0xad1410&&(_0xad1410=await askJsUrl());!_0x50846f&&(_0x50846f=await askCssUrl());const _0x3fe61d=await askConfirm(_0x51a647(0x1c6)+_0x823f7b[_0x51a647(0x18b)]+_0x51a647(0x1c5)+_0xad1410+_0x51a647(0x17e)+_0x50846f+'?');if(!_0x3fe61d)return writeCliSideChannelLine(a174_0x4570fd['gray'](_0x51a647(0x1ac))),{'ok':!![]};const _0x4a9a8a=[_0xad1410,_0x50846f],_0x55acd3=startSpinner(_0x51a647(0x1bb)+_0x823f7b['length']+_0x51a647(0x1a3));try{const _0x429495=await doCreateMenus(_0x26327a['appCode'],_0x26327a['cookie'],_0x823f7b,_0x4a9a8a);return stopSpinner(_0x55acd3,_0x51a647(0x17d)+_0x429495[_0x51a647(0x1b7)]+_0x51a647(0x182),!![]),{'ok':!![],'data':_0x429495,'message':_0x51a647(0x1a1)+_0x429495['created']+_0x51a647(0x18a)+_0x429495[_0x51a647(0x188)]+_0x51a647(0x1a2)};}catch(_0xae9577){stopSpinner(_0x55acd3,_0x51a647(0x1ae),![]);throw CliErrors[_0x51a647(0x1c2)](_0xae9577 instanceof Error?_0xae9577[_0x51a647(0x17b)]:_0x51a647(0x1ae));}}};function ensureRunnableContext(_0x5924d8,_0x4df4dd){const _0x1ab6e5=a174_0x14ccd1,_0x244f72=_0x5924d8[_0x1ab6e5(0x1be)]?String(_0x5924d8['appcode'])[_0x1ab6e5(0x1b4)]():'';if(!isInProject()&&!_0x4df4dd&&!_0x244f72)throw CliErrors[_0x1ab6e5(0x1c2)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x1ab6e5(0x1b8));}function parsePaths(_0x4e05f8){const _0x2c5336=a174_0x14ccd1;return[...new Set(_0x4e05f8[_0x2c5336(0x1a4)](',')['map'](_0x22e3e8=>_0x22e3e8[_0x2c5336(0x1b4)]())[_0x2c5336(0x1a8)](Boolean))];}
@@ -1 +1 @@
1
- const a175_0x157ea1=a175_0x4d5d;(function(_0x4a1416,_0x1b0676){const _0x40d62f=a175_0x4d5d,_0x88b115=_0x4a1416();while(!![]){try{const _0xc4b954=-parseInt(_0x40d62f(0x72))/0x1+parseInt(_0x40d62f(0x92))/0x2+-parseInt(_0x40d62f(0x90))/0x3*(-parseInt(_0x40d62f(0xb3))/0x4)+parseInt(_0x40d62f(0x6f))/0x5*(-parseInt(_0x40d62f(0x87))/0x6)+-parseInt(_0x40d62f(0xc6))/0x7+-parseInt(_0x40d62f(0x69))/0x8+parseInt(_0x40d62f(0x91))/0x9;if(_0xc4b954===_0x1b0676)break;else _0x88b115['push'](_0x88b115['shift']());}catch(_0x8c2655){_0x88b115['push'](_0x88b115['shift']());}}}(a175_0x35f0,0x6788b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x4d5d(_0xee480c,_0x26fd3f){_0xee480c=_0xee480c-0x64;const _0x35f053=a175_0x35f0();let _0x4d5d23=_0x35f053[_0xee480c];return _0x4d5d23;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a175_0x35f0(){const _0x44d032=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expect-visible','failed','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','number','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','childrenIds','5834320hWtnCJ','update-menu-visibility','childrenCount','Final\x20menu\x20visibility\x20readback\x20failed.','map','menu_permission_denied','55DnAYCM','\x20updated,\x20','values','810891lUeZPC','appCode','\x20menu(s);\x20skipped\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','stringify','hash','flagMissing','paths','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','recovered','Updated\x20visibility\x20for\x20','Menu\x20path\x20selector\x20not\x20found:\x20','plan','menu','length','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','sort','url','join','visibility-update','POST','27636FJVUrp','high-risk-write','resources','expectedCount','code','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','15FEoenZ','15123177cwFXOt','1375514rZBJPd','num','validation','boolean','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menus','menu\x20list','menuIds','split','rawFlags','menu_selector_ambiguous','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','isSafeInteger','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','before','str','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','visible','update-recovery','Selected\x20','menu_verification_failed','path','get','\x20skipped,\x20','true','some','set','string','/smartapi/menu/update','Menu\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','depth','371460MjWjtC','modelType','datasetCode','Response\x20was\x20lost\x20for\x20menu\x20','type','byId','warnings','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','message','\x20unchanged\x20menu(s).','has','push','update\x20menu\x20visibility','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20changed\x20unexpectedly.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Would\x20update\x20visibility\x20for\x20','verification','5722591VwFDCx','\x20failed.','requestedVisible','\x20must\x20be\x20true\x20or\x20false.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20menu(s),\x20expected\x20','datasetId','pageType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','filter','label','false','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','plannedActions','beforeById','pageId','resourcesValid','parentId','isArray','expected-count','menu-ids','Requested\x20menu\x20visibility'];a175_0x35f0=function(){return _0x44d032;};return a175_0x35f0();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a175_0x157ea1(0x86),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a175_0x157ea1(0x7f),'command':a175_0x157ea1(0x85),'description':a175_0x157ea1(0x64),'risk':a175_0x157ea1(0x88),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a175_0x157ea1(0xae),'description':a175_0x157ea1(0x7a)},{'name':a175_0x157ea1(0x79),'type':a175_0x157ea1(0xae),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x157ea1(0xa4),'type':a175_0x157ea1(0x95),'required':!![],'description':a175_0x157ea1(0xdb)},{'name':'expect-visible','type':'boolean','description':a175_0x157ea1(0xba)},{'name':'expected-count','type':a175_0x157ea1(0x66),'description':a175_0x157ea1(0x75)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x10156a){parseInput(_0x10156a),requireExplicitYes(_0x10156a);},async 'dryRun'(_0x22b250){const _0x8cea8f=a175_0x157ea1,_0x14a10a=await buildPlan(_0x22b250,!![]),_0x50a99d=_0x14a10a['plan'][_0x8cea8f(0xd3)]?.[_0x8cea8f(0x80)]??0x0,_0x238083=_0x14a10a[_0x8cea8f(0x7e)]['targets'][_0x8cea8f(0x80)]-_0x50a99d;return menuDryRunResult(_0x14a10a[_0x8cea8f(0x7e)],{'method':_0x8cea8f(0x86),'url':_0x8cea8f(0xaf),'body':{'updates':_0x14a10a[_0x8cea8f(0x7e)][_0x8cea8f(0xd3)]?.[_0x8cea8f(0x6d)](_0x2f30a8=>_0x2f30a8['body'])??[]},'description':_0x8cea8f(0xc4)+_0x50a99d+'\x20menu(s);\x20skip\x20'+_0x238083+_0x8cea8f(0xbd)});},async 'execute'(_0x9569e8){const _0x42551f=a175_0x157ea1;requireExplicitYes(_0x9569e8);const _0x415b60=await buildPlan(_0x9569e8,![]);await recheckMutationSnapshot(_0x9569e8,_0x415b60['plan'],_0x42551f(0xc0));const _0x423651=[],_0x29a3d0=[],_0x1ef372=[];for(const _0x453989 of _0x415b60['plan']['targets']){if(_0x453989[_0x42551f(0xa0)][_0x42551f(0xa4)]===_0x415b60[_0x42551f(0x7e)]['requestedVisible']){_0x423651[_0x42551f(0xbf)]({'id':_0x453989['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x9569e8[_0x42551f(0x73)],_0x9569e8['cookie'],{'id':_0x453989['id'],'visible':_0x415b60['plan']['requestedVisible']}),_0x423651[_0x42551f(0xbf)]({'id':_0x453989['id'],'updated':!![],'skipped':![]});}catch(_0x2abcbe){const _0x5b5b20=mapMenuApiError(_0x2abcbe,'update\x20visibility\x20for',_0x453989['id']);if(isMenuResponseLoss(_0x2abcbe)&&_0x5b5b20[_0x42551f(0x8b)]!==_0x42551f(0x6e)){_0x1ef372[_0x42551f(0xbf)](_0x453989['id']);continue;}_0x29a3d0[_0x42551f(0xbf)]({'id':_0x453989['id'],'stage':'update','code':_0x5b5b20['code'],'message':_0x5b5b20[_0x42551f(0xbc)]});}}let _0x40cf39;try{_0x40cf39=await fetchMenuSnapshot(_0x9569e8[_0x42551f(0x73)],_0x9569e8['cookie']);}catch(_0x33f97b){const _0x5b7aeb=describeMenuErrorCause(_0x33f97b,'verify\x20menu\x20visibility\x20update'),_0xc91008=_0x1ef372[_0x42551f(0x6d)](_0x20d17c=>({'id':_0x20d17c,'stage':_0x42551f(0xa5),'code':_0x42551f(0xa7),'message':_0x42551f(0xb6)+_0x20d17c+_0x42551f(0xce),'requestedStateConfirmed':![],'recovered':![]})),_0x17013f={'stage':_0x42551f(0xc5),'code':_0x42551f(0xa7),'message':_0x42551f(0x6c),'targetIds':_0x415b60[_0x42551f(0x7e)]['targets'][_0x42551f(0x6d)](_0x6c9eb5=>_0x6c9eb5['id']),'requestedStateConfirmed':![],..._0x5b7aeb};throw menuFailure(asVerificationError(_0x33f97b,_0x42551f(0x96)),_0x415b60[_0x42551f(0x7e)],{'stage':_0x42551f(0xc5),'succeeded':_0x423651,'failedRecords':[..._0x29a3d0,..._0xc91008,_0x17013f],'warnings':[_0x42551f(0x67)],'verification':{'status':_0x42551f(0xde),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1cf2f2=[];for(const _0xc14584 of _0x423651){const _0x2ce194=Number(_0xc14584['id']),_0xae8eeb=_0x415b60[_0x42551f(0xd4)]['get'](_0x2ce194),_0x516746=_0x40cf39['byId'][_0x42551f(0xa9)](_0x2ce194);try{verifyVisibilityUpdate(_0xae8eeb,_0x516746,_0x415b60[_0x42551f(0x7e)][_0x42551f(0xc8)]);}catch(_0x1e17a6){const _0x41946f=asVerificationError(_0x1e17a6,'Menu\x20'+_0x2ce194+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x1cf2f2['push']({'id':_0x2ce194,'stage':_0x42551f(0xc5),'code':_0x41946f[_0x42551f(0x8b)],'message':_0x41946f['message'],'requestedStateConfirmed':![]});}}for(const _0x181db5 of _0x1ef372){const _0x565baa=_0x415b60['beforeById'][_0x42551f(0xa9)](_0x181db5),_0x5025b4=_0x40cf39[_0x42551f(0xb8)]['get'](_0x181db5);try{verifyVisibilityUpdate(_0x565baa,_0x5025b4,_0x415b60[_0x42551f(0x7e)][_0x42551f(0xc8)]),_0x423651['push']({'id':_0x181db5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1cc576){const _0x53bcdf=asVerificationError(_0x1cc576,_0x42551f(0x8c)+_0x181db5+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x1cf2f2[_0x42551f(0xbf)]({'id':_0x181db5,'stage':_0x42551f(0xa5),'code':_0x53bcdf[_0x42551f(0x8b)],'message':_0x53bcdf['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1cf2f2[_0x42551f(0x80)]>0x0){const _0x250396=_0x1cf2f2[_0x42551f(0x6d)](_0x555d35=>Number(_0x555d35['id'])),_0x6159ad=_0x423651[_0x42551f(0xcf)](_0x11f56=>_0x11f56[_0x42551f(0x7b)]===!![])[_0x42551f(0x80)],_0x44f12c=menuError(_0x42551f(0xa7),_0x42551f(0x9f)+_0x250396[_0x42551f(0x84)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x44f12c,_0x415b60[_0x42551f(0x7e)],{'stage':'verification','succeeded':_0x423651,'failedRecords':[..._0x29a3d0,..._0x1cf2f2],'warnings':[_0x42551f(0xc1)],'verification':{'status':_0x42551f(0xde),..._0x250396['length']===0x1?{'targetId':_0x250396[0x0]}:{'targetIds':_0x250396},'recoveredCount':_0x6159ad,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x197d79=_0x423651[_0x42551f(0xcf)](_0x4bd4b7=>_0x4bd4b7[_0x42551f(0x8e)]===!![])[_0x42551f(0x80)],_0xb71b03=_0x423651['length']-_0x197d79,_0xd970ca={..._0x415b60[_0x42551f(0x7e)],'succeeded':_0x423651,'failed':_0x29a3d0,'warnings':_0x29a3d0[_0x42551f(0x80)]>0x0?[..._0x415b60['plan'][_0x42551f(0xb9)],_0x42551f(0xbb)]:_0x415b60[_0x42551f(0x7e)]['warnings'],'verification':{'checkedBy':_0x42551f(0x98),'snapshotHash':_0x40cf39[_0x42551f(0x77)],'matchesRequestedState':_0x29a3d0[_0x42551f(0x80)]===0x0,'recoveredCount':_0x1ef372[_0x42551f(0x80)]}};return{'ok':_0x29a3d0[_0x42551f(0x80)]===0x0,'data':_0xd970ca,'message':_0x29a3d0[_0x42551f(0x80)]===0x0?_0x42551f(0x7c)+_0x197d79+_0x42551f(0x74)+_0xb71b03+_0x42551f(0xbd):'Menu\x20visibility\x20update\x20completed:\x20'+_0x197d79+_0x42551f(0x70)+_0xb71b03+_0x42551f(0xaa)+_0x29a3d0[_0x42551f(0x80)]+_0x42551f(0xc7)};}};function parseInput(_0x4984bc){const _0x51477a=a175_0x157ea1,_0x434982=parseMenuIds(_0x4984bc[_0x51477a(0xa1)](_0x51477a(0xda))),_0xfc7547=parseCsv(_0x4984bc[_0x51477a(0xa1)](_0x51477a(0x79)));if(_0x434982[_0x51477a(0x80)]===0x0&&_0xfc7547[_0x51477a(0x80)]===0x0)throw CliErrors['validation'](_0x51477a(0x65));const _0x521a74=parseBooleanFlag(_0x4984bc,'visible',!![]),_0xa0981f=parseBooleanFlag(_0x4984bc,_0x51477a(0xdd),![]);let _0x741750;if(hasFlag(_0x4984bc,_0x51477a(0xd9))){_0x741750=_0x4984bc[_0x51477a(0x93)](_0x51477a(0xd9));if(!Number[_0x51477a(0x9e)](_0x741750)||_0x741750<0x0)throw CliErrors[_0x51477a(0x94)](_0x51477a(0xa3));}return{'menuIds':_0x434982,'paths':_0xfc7547,'visible':_0x521a74,'expectVisible':_0xa0981f,'expectedCount':_0x741750};}async function buildPlan(_0x49f2c9,_0x17945f){const _0x23b4a9=a175_0x157ea1,_0x49d2c3=parseInput(_0x49f2c9),_0x515137=await fetchMutationSnapshot(_0x49f2c9,_0x23b4a9(0xc0)),_0x488809=selectTargets(_0x515137[_0x23b4a9(0x97)],_0x49d2c3[_0x23b4a9(0x99)],_0x49d2c3[_0x23b4a9(0x79)]);if(_0x49d2c3[_0x23b4a9(0x8a)]!==undefined&&_0x488809['length']!==_0x49d2c3[_0x23b4a9(0x8a)])throw menuError('menu_expected_count_mismatch',_0x23b4a9(0xa6)+_0x488809[_0x23b4a9(0x80)]+_0x23b4a9(0xcb)+_0x49d2c3['expectedCount']+'.',_0x23b4a9(0x8f));if(_0x49d2c3['expectVisible']!==undefined){const _0xada910=_0x488809[_0x23b4a9(0xcf)](_0x197518=>_0x197518[_0x23b4a9(0xa4)]!==_0x49d2c3['expectVisible']);if(_0xada910[_0x23b4a9(0x80)]>0x0)throw menuError('menu_state_drift',_0x23b4a9(0xd2)+_0xada910[_0x23b4a9(0x6d)](_0x2eb2bf=>_0x2eb2bf['id'])['join'](',\x20')+'.',_0x23b4a9(0x81));}const _0x1722d4=_0x488809[_0x23b4a9(0x6d)](_0x189906=>({'id':_0x189906['id'],'label':_0x189906['label'],'path':_0x189906['path'],'before':{'visible':_0x189906[_0x23b4a9(0xa4)]},'after':{'visible':_0x49d2c3['visible']}})),_0x559997=_0x1722d4[_0x23b4a9(0xcf)](_0x3635b7=>_0x3635b7[_0x23b4a9(0xa0)][_0x23b4a9(0xa4)]!==_0x49d2c3[_0x23b4a9(0xa4)])[_0x23b4a9(0x6d)](_0x4d7c5f=>({'stage':_0x23b4a9(0x6a),'method':'POST','path':_0x23b4a9(0xaf),'body':{'appCode':_0x49f2c9['appCode'],'id':_0x4d7c5f['id'],'visible':_0x49d2c3[_0x23b4a9(0xa4)]}})),_0x2f6c51=mutationResult({'operation':_0x23b4a9(0x85),'selector':{'menuIds':_0x49d2c3[_0x23b4a9(0x99)],'paths':_0x49d2c3[_0x23b4a9(0x79)]},'before':{'menus':_0x488809[_0x23b4a9(0x6d)](_0x193787=>({'id':_0x193787['id'],'path':_0x193787['path'],'visible':_0x193787[_0x23b4a9(0xa4)]}))},'after':{'menus':_0x488809['map'](_0xdeddea=>({'id':_0xdeddea['id'],'path':_0xdeddea[_0x23b4a9(0xa8)],'visible':_0x49d2c3[_0x23b4a9(0xa4)]}))},'dryRun':_0x17945f,'backend':[...BACKEND],'plannedActions':_0x559997,'snapshotHash':_0x515137[_0x23b4a9(0x77)],'warnings':_0x559997['length']===0x0?[_0x23b4a9(0xc3)]:[]});return{'plan':{..._0x2f6c51,'requestedVisible':_0x49d2c3[_0x23b4a9(0xa4)],'targets':_0x1722d4},'beforeById':new Map(_0x488809['map'](_0x1e4ad9=>[_0x1e4ad9['id'],_0x1e4ad9]))};}function selectTargets(_0x4403b2,_0xa3c37a,_0x38d961){const _0x4c1125=a175_0x157ea1,_0x42c8f1=new Map(_0x4403b2[_0x4c1125(0x6d)](_0x14c2d7=>[_0x14c2d7['id'],_0x14c2d7])),_0x201627=new Map(),_0x6f0071=_0xa3c37a[_0x4c1125(0xcf)](_0x37b25e=>!_0x42c8f1[_0x4c1125(0xbe)](_0x37b25e));if(_0x6f0071['length']>0x0)throw menuError('menu_selector_not_found',_0x4c1125(0x8d)+_0x6f0071[_0x4c1125(0x84)](',\x20')+'.',_0x4c1125(0x9d));for(const _0xac001f of _0xa3c37a){_0x201627[_0x4c1125(0xad)](_0xac001f,_0x42c8f1[_0x4c1125(0xa9)](_0xac001f));}for(const _0x1f327c of _0x38d961){const _0x3f7752=_0x4403b2[_0x4c1125(0xcf)](_0x13dc85=>_0x13dc85['path']===_0x1f327c);if(_0x3f7752[_0x4c1125(0x80)]===0x0)throw menuError('menu_selector_not_found',_0x4c1125(0x7d)+JSON[_0x4c1125(0x76)](_0x1f327c)+'.',_0x4c1125(0xdc));if(_0x3f7752[_0x4c1125(0x80)]>0x1)throw menuError(_0x4c1125(0x9c),_0x4c1125(0xb1)+JSON[_0x4c1125(0x76)](_0x1f327c)+'.',_0x4c1125(0xca)+_0x3f7752['map'](_0x1cf48d=>_0x1cf48d['id'])[_0x4c1125(0x84)](',\x20')+'.');const _0x5c3c88=_0x3f7752[0x0];_0x201627[_0x4c1125(0xad)](_0x5c3c88['id'],_0x5c3c88);}return[..._0x201627[_0x4c1125(0x71)]()];}function parseMenuIds(_0x3904bc){const _0xe537f9=a175_0x157ea1,_0x26ffb9=parseCsv(_0x3904bc),_0x3665dc=_0x26ffb9[_0xe537f9(0x6d)](Number);if(_0x3665dc[_0xe537f9(0xac)](_0x1d6f98=>!Number[_0xe537f9(0x9e)](_0x1d6f98)||_0x1d6f98<=0x0))throw CliErrors['validation']('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x3665dc)];}function parseCsv(_0x4e3113){const _0x31c5b5=a175_0x157ea1;return[...new Set(_0x4e3113[_0x31c5b5(0x9a)](',')['map'](_0x49890f=>_0x49890f[_0x31c5b5(0xa2)]())[_0x31c5b5(0xcf)](Boolean))];}function parseBooleanFlag(_0x530496,_0x45b01c,_0xf6c496){const _0x4f90b1=a175_0x157ea1;if(!hasFlag(_0x530496,_0x45b01c)){if(_0xf6c496)throw CliErrors[_0x4f90b1(0x78)](_0x45b01c);return undefined;}const _0x442407=_0x530496[_0x4f90b1(0x9b)][_0x45b01c];if(_0x442407===!![]||_0x442407===![])return _0x442407;if(_0x442407===_0x4f90b1(0xab))return!![];if(_0x442407===_0x4f90b1(0xd1))return![];throw CliErrors[_0x4f90b1(0x94)]('--'+_0x45b01c+_0x4f90b1(0xc9));}function verifyVisibilityUpdate(_0x3b35ba,_0x2508cd,_0x409582){const _0x152729=a175_0x157ea1;assertVerified(!!_0x2508cd,_0x152729(0xb0)+_0x3b35ba['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x2508cd[_0x152729(0xa4)]===_0x409582,_0x152729(0xb0)+_0x3b35ba['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x343268=[['id',_0x2508cd['id'],_0x3b35ba['id']],['parentId',_0x2508cd[_0x152729(0xd7)],_0x3b35ba[_0x152729(0xd7)]],['depth',_0x2508cd['depth'],_0x3b35ba[_0x152729(0xb2)]],['label',_0x2508cd['label'],_0x3b35ba[_0x152729(0xd0)]],[_0x152729(0xa8),_0x2508cd[_0x152729(0xa8)],_0x3b35ba['path']],[_0x152729(0x83),_0x2508cd['url'],_0x3b35ba[_0x152729(0x83)]],[_0x152729(0xb7),_0x2508cd[_0x152729(0xb7)],_0x3b35ba[_0x152729(0xb7)]],[_0x152729(0x82),_0x2508cd[_0x152729(0x82)],_0x3b35ba[_0x152729(0x82)]],['resources',_0x2508cd[_0x152729(0x89)],_0x3b35ba[_0x152729(0x89)]],[_0x152729(0xd6),_0x2508cd[_0x152729(0xd6)],_0x3b35ba[_0x152729(0xd6)]],['childrenIds',_0x2508cd[_0x152729(0x68)],_0x3b35ba['childrenIds']],['childrenCount',_0x2508cd[_0x152729(0x6b)],_0x3b35ba['childrenCount']],[_0x152729(0xd5),_0x2508cd[_0x152729(0xd5)],_0x3b35ba[_0x152729(0xd5)]],[_0x152729(0xcd),_0x2508cd[_0x152729(0xcd)],_0x3b35ba[_0x152729(0xcd)]],[_0x152729(0xb4),_0x2508cd[_0x152729(0xb4)],_0x3b35ba['modelType']],[_0x152729(0xcc),_0x2508cd[_0x152729(0xcc)],_0x3b35ba[_0x152729(0xcc)]],[_0x152729(0xb5),_0x2508cd[_0x152729(0xb5)],_0x3b35ba[_0x152729(0xb5)]]];for(const [_0x437a26,_0x532a33,_0x43d477]of _0x343268){assertVerified(sameValue(_0x532a33,_0x43d477),'Menu\x20'+_0x3b35ba['id']+'\x20'+_0x437a26+_0x152729(0xc2));}}function sameValue(_0x5be81b,_0x2e6d00){const _0x22660f=a175_0x157ea1;if(Array[_0x22660f(0xd8)](_0x5be81b)||Array['isArray'](_0x2e6d00))return JSON[_0x22660f(0x76)](_0x5be81b)===JSON[_0x22660f(0x76)](_0x2e6d00);return _0x5be81b===_0x2e6d00;}
1
+ const a175_0x2d7fee=a175_0x1e6c;(function(_0x328cbc,_0x2a416a){const _0x322030=a175_0x1e6c,_0x1b90a5=_0x328cbc();while(!![]){try{const _0x2006db=parseInt(_0x322030(0x169))/0x1*(-parseInt(_0x322030(0x14d))/0x2)+parseInt(_0x322030(0x177))/0x3+parseInt(_0x322030(0x161))/0x4+-parseInt(_0x322030(0x14a))/0x5*(parseInt(_0x322030(0x165))/0x6)+parseInt(_0x322030(0x17a))/0x7*(-parseInt(_0x322030(0x15e))/0x8)+parseInt(_0x322030(0x17d))/0x9+-parseInt(_0x322030(0x1a5))/0xa*(-parseInt(_0x322030(0x187))/0xb);if(_0x2006db===_0x2a416a)break;else _0x1b90a5['push'](_0x1b90a5['shift']());}catch(_0x1adfd9){_0x1b90a5['push'](_0x1b90a5['shift']());}}}(a175_0x2d05,0x2af81));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x1e6c(_0x23507a,_0x9de75b){_0x23507a=_0x23507a-0x142;const _0x2d05f6=a175_0x2d05();let _0x1e6cb1=_0x2d05f6[_0x23507a];return _0x1e6cb1;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a175_0x2d05(){const _0x2647e8=['boolean','before','high-risk-write','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menu_expected_count_mismatch','\x20unchanged\x20menu(s).','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','7400RkqCRN','resourcesValid','menu_selector_ambiguous','295682tROEFf','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','split','expectVisible','menu_permission_denied','menuIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','update-menu-visibility','visibility-update','path','length','modelType','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','POST','url','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Selected\x20','1125800hTLmNf','Response\x20was\x20lost\x20and\x20menu\x20','values','11460hqNQlM','childrenCount','targets','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','684hhMcnt','\x20must\x20be\x20true\x20or\x20false.','update\x20menu\x20visibility','join','1SWTRHk','label','\x20changed\x20unexpectedly.','has','expectedCount','parentId','trim','\x20updated,\x20','map','true','flagMissing','num','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','534012fFAslR','type','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','14UZrwvE','datasetId','menu-ids','2149398qhQuvj','verification','pageType','Updated\x20visibility\x20for\x20','\x20failed.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','hash','recovered','visible','\x20skipped,\x20','33khemqi','get','isArray','isSafeInteger','expect-visible','Would\x20update\x20visibility\x20for\x20','false','\x20menu(s);\x20skipped\x20','expected-count','\x20visibility\x20update\x20could\x20not\x20be\x20verified','byId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','failed','menus','Response\x20was\x20lost\x20for\x20menu\x20','plan','menu','Menu\x20path\x20selector\x20not\x20found:\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','code','/smartapi/menu/update','plannedActions','depth','update\x20visibility\x20for','requestedVisible','string','datasetCode','appCode','push','str','1181070AWHVLx','paths','Menu\x20','filter','\x20menu(s);\x20skip\x20','rabetbase\x20menu\x20list\x20--format\x20compress','message','cookie','update','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Menu\x20visibility\x20update\x20completed:\x20','validation','pageId','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','stringify','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','sort','beforeById','warnings','menu_selector_not_found','menu_verification_failed','resources','childrenIds'];a175_0x2d05=function(){return _0x2647e8;};return a175_0x2d05();}const BACKEND=[{'method':'POST','path':a175_0x2d7fee(0x19b)}];export const menuVisibilityUpdate={'service':a175_0x2d7fee(0x197),'command':'visibility-update','description':a175_0x2d7fee(0x146),'risk':a175_0x2d7fee(0x145),'structuredErrors':!![],'flags':[{'name':a175_0x2d7fee(0x17c),'type':a175_0x2d7fee(0x1a0),'description':a175_0x2d7fee(0x199)},{'name':a175_0x2d7fee(0x1a6),'type':a175_0x2d7fee(0x1a0),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x2d7fee(0x185),'type':a175_0x2d7fee(0x143),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a175_0x2d7fee(0x143),'description':a175_0x2d7fee(0x1b2)},{'name':a175_0x2d7fee(0x18f),'type':'number','description':a175_0x2d7fee(0x179)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb12231){parseInput(_0xb12231),requireExplicitYes(_0xb12231);},async 'dryRun'(_0x245635){const _0x23413e=a175_0x2d7fee,_0x13992d=await buildPlan(_0x245635,!![]),_0x338dbf=_0x13992d[_0x23413e(0x196)]['plannedActions']?.['length']??0x0,_0x2f89d0=_0x13992d[_0x23413e(0x196)]['targets'][_0x23413e(0x157)]-_0x338dbf;return menuDryRunResult(_0x13992d['plan'],{'method':'POST','url':_0x23413e(0x19b),'body':{'updates':_0x13992d[_0x23413e(0x196)][_0x23413e(0x19c)]?.[_0x23413e(0x171)](_0x2e37b7=>_0x2e37b7['body'])??[]},'description':_0x23413e(0x18c)+_0x338dbf+_0x23413e(0x1a9)+_0x2f89d0+_0x23413e(0x148)});},async 'execute'(_0x7c4d31){const _0x1311f4=a175_0x2d7fee;requireExplicitYes(_0x7c4d31);const _0x582e50=await buildPlan(_0x7c4d31,![]);await recheckMutationSnapshot(_0x7c4d31,_0x582e50[_0x1311f4(0x196)],'update\x20menu\x20visibility');const _0x3c6024=[],_0x52adcf=[],_0x4604d9=[];for(const _0x53f6cb of _0x582e50[_0x1311f4(0x196)]['targets']){if(_0x53f6cb[_0x1311f4(0x144)][_0x1311f4(0x185)]===_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]){_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x7c4d31[_0x1311f4(0x1a2)],_0x7c4d31[_0x1311f4(0x1ac)],{'id':_0x53f6cb['id'],'visible':_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]}),_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'updated':!![],'skipped':![]});}catch(_0x50d1af){const _0x237b54=mapMenuApiError(_0x50d1af,_0x1311f4(0x19e),_0x53f6cb['id']);if(isMenuResponseLoss(_0x50d1af)&&_0x237b54[_0x1311f4(0x19a)]!==_0x1311f4(0x151)){_0x4604d9[_0x1311f4(0x1a3)](_0x53f6cb['id']);continue;}_0x52adcf[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'stage':_0x1311f4(0x1ad),'code':_0x237b54[_0x1311f4(0x19a)],'message':_0x237b54[_0x1311f4(0x1ab)]});}}let _0x55c994;try{_0x55c994=await fetchMenuSnapshot(_0x7c4d31[_0x1311f4(0x1a2)],_0x7c4d31['cookie']);}catch(_0x3d5ed0){const _0x2cab49=describeMenuErrorCause(_0x3d5ed0,'verify\x20menu\x20visibility\x20update'),_0x51785c=_0x4604d9[_0x1311f4(0x171)](_0x10407=>({'id':_0x10407,'stage':'update-recovery','code':_0x1311f4(0x1b9),'message':_0x1311f4(0x195)+_0x10407+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x5b51f3={'stage':'verification','code':_0x1311f4(0x1b9),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x163)][_0x1311f4(0x171)](_0x22ab01=>_0x22ab01['id']),'requestedStateConfirmed':![],..._0x2cab49};throw menuFailure(asVerificationError(_0x3d5ed0,_0x1311f4(0x176)),_0x582e50[_0x1311f4(0x196)],{'stage':_0x1311f4(0x17e),'succeeded':_0x3c6024,'failedRecords':[..._0x52adcf,..._0x51785c,_0x5b51f3],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1311f4(0x193),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3c310a=[];for(const _0x5748c0 of _0x3c6024){const _0x4017f6=Number(_0x5748c0['id']),_0x5e99e0=_0x582e50[_0x1311f4(0x1b6)][_0x1311f4(0x188)](_0x4017f6),_0xdf6271=_0x55c994[_0x1311f4(0x191)]['get'](_0x4017f6);try{verifyVisibilityUpdate(_0x5e99e0,_0xdf6271,_0x582e50[_0x1311f4(0x196)]['requestedVisible']);}catch(_0x17cb69){const _0xd6d80=asVerificationError(_0x17cb69,'Menu\x20'+_0x4017f6+_0x1311f4(0x190));_0x3c310a['push']({'id':_0x4017f6,'stage':_0x1311f4(0x17e),'code':_0xd6d80[_0x1311f4(0x19a)],'message':_0xd6d80['message'],'requestedStateConfirmed':![]});}}for(const _0x202d89 of _0x4604d9){const _0x19d0c8=_0x582e50[_0x1311f4(0x1b6)][_0x1311f4(0x188)](_0x202d89),_0x1e8aa7=_0x55c994[_0x1311f4(0x191)][_0x1311f4(0x188)](_0x202d89);try{verifyVisibilityUpdate(_0x19d0c8,_0x1e8aa7,_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]),_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x202d89,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x26382d){const _0x4509d6=asVerificationError(_0x26382d,_0x1311f4(0x15f)+_0x202d89+_0x1311f4(0x15c));_0x3c310a[_0x1311f4(0x1a3)]({'id':_0x202d89,'stage':'update-recovery','code':_0x4509d6[_0x1311f4(0x19a)],'message':_0x4509d6[_0x1311f4(0x1ab)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3c310a[_0x1311f4(0x157)]>0x0){const _0x4f87cf=_0x3c310a[_0x1311f4(0x171)](_0x2b082d=>Number(_0x2b082d['id'])),_0x350b84=_0x3c6024[_0x1311f4(0x1a8)](_0x58cae0=>_0x58cae0[_0x1311f4(0x184)]===!![])[_0x1311f4(0x157)],_0x44e94d=menuError(_0x1311f4(0x1b9),_0x1311f4(0x164)+_0x4f87cf[_0x1311f4(0x168)](',\x20')+'.',_0x1311f4(0x175));throw menuFailure(_0x44e94d,_0x582e50[_0x1311f4(0x196)],{'stage':_0x1311f4(0x17e),'succeeded':_0x3c6024,'failedRecords':[..._0x52adcf,..._0x3c310a],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1311f4(0x193),..._0x4f87cf[_0x1311f4(0x157)]===0x1?{'targetId':_0x4f87cf[0x0]}:{'targetIds':_0x4f87cf},'recoveredCount':_0x350b84,'lookupCommand':_0x1311f4(0x1aa)}});}const _0x52c427=_0x3c6024['filter'](_0x151113=>_0x151113['updated']===!![])['length'],_0x1aa930=_0x3c6024['length']-_0x52c427,_0xb2b752={..._0x582e50[_0x1311f4(0x196)],'succeeded':_0x3c6024,'failed':_0x52adcf,'warnings':_0x52adcf[_0x1311f4(0x157)]>0x0?[..._0x582e50['plan'][_0x1311f4(0x1b7)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x582e50[_0x1311f4(0x196)]['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x55c994[_0x1311f4(0x183)],'matchesRequestedState':_0x52adcf[_0x1311f4(0x157)]===0x0,'recoveredCount':_0x4604d9[_0x1311f4(0x157)]}};return{'ok':_0x52adcf[_0x1311f4(0x157)]===0x0,'data':_0xb2b752,'message':_0x52adcf[_0x1311f4(0x157)]===0x0?_0x1311f4(0x180)+_0x52c427+_0x1311f4(0x18e)+_0x1aa930+_0x1311f4(0x148):_0x1311f4(0x1af)+_0x52c427+_0x1311f4(0x170)+_0x1aa930+_0x1311f4(0x186)+_0x52adcf[_0x1311f4(0x157)]+_0x1311f4(0x181)};}};function parseInput(_0x2ab2d0){const _0x32b353=a175_0x2d7fee,_0x9751fe=parseMenuIds(_0x2ab2d0[_0x32b353(0x1a4)]('menu-ids')),_0x4b0630=parseCsv(_0x2ab2d0['str'](_0x32b353(0x1a6)));if(_0x9751fe[_0x32b353(0x157)]===0x0&&_0x4b0630['length']===0x0)throw CliErrors[_0x32b353(0x1b0)](_0x32b353(0x153));const _0x16368b=parseBooleanFlag(_0x2ab2d0,_0x32b353(0x185),!![]),_0x1003a3=parseBooleanFlag(_0x2ab2d0,_0x32b353(0x18b),![]);let _0x3a36ea;if(hasFlag(_0x2ab2d0,_0x32b353(0x18f))){_0x3a36ea=_0x2ab2d0[_0x32b353(0x174)]('expected-count');if(!Number[_0x32b353(0x18a)](_0x3a36ea)||_0x3a36ea<0x0)throw CliErrors[_0x32b353(0x1b0)](_0x32b353(0x1b4));}return{'menuIds':_0x9751fe,'paths':_0x4b0630,'visible':_0x16368b,'expectVisible':_0x1003a3,'expectedCount':_0x3a36ea};}async function buildPlan(_0xc3df33,_0x3d71f9){const _0x47d151=a175_0x2d7fee,_0x5304ed=parseInput(_0xc3df33),_0x2dceab=await fetchMutationSnapshot(_0xc3df33,_0x47d151(0x167)),_0x17de98=selectTargets(_0x2dceab[_0x47d151(0x194)],_0x5304ed[_0x47d151(0x152)],_0x5304ed[_0x47d151(0x1a6)]);if(_0x5304ed[_0x47d151(0x16d)]!==undefined&&_0x17de98[_0x47d151(0x157)]!==_0x5304ed[_0x47d151(0x16d)])throw menuError(_0x47d151(0x147),_0x47d151(0x15d)+_0x17de98[_0x47d151(0x157)]+'\x20menu(s),\x20expected\x20'+_0x5304ed[_0x47d151(0x16d)]+'.',_0x47d151(0x159));if(_0x5304ed['expectVisible']!==undefined){const _0x6f31bc=_0x17de98[_0x47d151(0x1a8)](_0x1d0f6d=>_0x1d0f6d[_0x47d151(0x185)]!==_0x5304ed[_0x47d151(0x150)]);if(_0x6f31bc[_0x47d151(0x157)]>0x0)throw menuError('menu_state_drift',_0x47d151(0x149)+_0x6f31bc[_0x47d151(0x171)](_0x47e4e6=>_0x47e4e6['id'])[_0x47d151(0x168)](',\x20')+'.',_0x47d151(0x192));}const _0x44a94b=_0x17de98[_0x47d151(0x171)](_0x4ece97=>({'id':_0x4ece97['id'],'label':_0x4ece97['label'],'path':_0x4ece97[_0x47d151(0x156)],'before':{'visible':_0x4ece97[_0x47d151(0x185)]},'after':{'visible':_0x5304ed['visible']}})),_0x39d3b7=_0x44a94b[_0x47d151(0x1a8)](_0x577dc2=>_0x577dc2[_0x47d151(0x144)][_0x47d151(0x185)]!==_0x5304ed[_0x47d151(0x185)])[_0x47d151(0x171)](_0x2b5a69=>({'stage':_0x47d151(0x154),'method':_0x47d151(0x15a),'path':_0x47d151(0x19b),'body':{'appCode':_0xc3df33[_0x47d151(0x1a2)],'id':_0x2b5a69['id'],'visible':_0x5304ed['visible']}})),_0x4f2efe=mutationResult({'operation':_0x47d151(0x155),'selector':{'menuIds':_0x5304ed['menuIds'],'paths':_0x5304ed[_0x47d151(0x1a6)]},'before':{'menus':_0x17de98[_0x47d151(0x171)](_0x39bc56=>({'id':_0x39bc56['id'],'path':_0x39bc56['path'],'visible':_0x39bc56[_0x47d151(0x185)]}))},'after':{'menus':_0x17de98[_0x47d151(0x171)](_0x123cee=>({'id':_0x123cee['id'],'path':_0x123cee[_0x47d151(0x156)],'visible':_0x5304ed[_0x47d151(0x185)]}))},'dryRun':_0x3d71f9,'backend':[...BACKEND],'plannedActions':_0x39d3b7,'snapshotHash':_0x2dceab[_0x47d151(0x183)],'warnings':_0x39d3b7[_0x47d151(0x157)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x4f2efe,'requestedVisible':_0x5304ed['visible'],'targets':_0x44a94b},'beforeById':new Map(_0x17de98[_0x47d151(0x171)](_0x5e3dd0=>[_0x5e3dd0['id'],_0x5e3dd0]))};}function selectTargets(_0x3107b7,_0x599de8,_0x59144f){const _0x254ad2=a175_0x2d7fee,_0x192fe2=new Map(_0x3107b7['map'](_0x13d2dd=>[_0x13d2dd['id'],_0x13d2dd])),_0x123f39=new Map(),_0x24eb97=_0x599de8['filter'](_0x4c6cb0=>!_0x192fe2[_0x254ad2(0x16c)](_0x4c6cb0));if(_0x24eb97[_0x254ad2(0x157)]>0x0)throw menuError(_0x254ad2(0x1b8),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x24eb97[_0x254ad2(0x168)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x334e96 of _0x599de8){_0x123f39['set'](_0x334e96,_0x192fe2[_0x254ad2(0x188)](_0x334e96));}for(const _0x4b9b8e of _0x59144f){const _0x51a8c0=_0x3107b7[_0x254ad2(0x1a8)](_0x41cf3e=>_0x41cf3e[_0x254ad2(0x156)]===_0x4b9b8e);if(_0x51a8c0[_0x254ad2(0x157)]===0x0)throw menuError(_0x254ad2(0x1b8),_0x254ad2(0x198)+JSON['stringify'](_0x4b9b8e)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x51a8c0[_0x254ad2(0x157)]>0x1)throw menuError(_0x254ad2(0x14c),_0x254ad2(0x1ae)+JSON[_0x254ad2(0x1b3)](_0x4b9b8e)+'.',_0x254ad2(0x182)+_0x51a8c0['map'](_0xcb12dd=>_0xcb12dd['id'])['join'](',\x20')+'.');const _0x37b0a3=_0x51a8c0[0x0];_0x123f39['set'](_0x37b0a3['id'],_0x37b0a3);}return[..._0x123f39[_0x254ad2(0x160)]()];}function parseMenuIds(_0x42e605){const _0x13e271=a175_0x2d7fee,_0x1ae0e1=parseCsv(_0x42e605),_0xce3b35=_0x1ae0e1['map'](Number);if(_0xce3b35['some'](_0x4ed314=>!Number[_0x13e271(0x18a)](_0x4ed314)||_0x4ed314<=0x0))throw CliErrors[_0x13e271(0x1b0)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0xce3b35)];}function parseCsv(_0x529152){const _0xe2e7d=a175_0x2d7fee;return[...new Set(_0x529152[_0xe2e7d(0x14f)](',')[_0xe2e7d(0x171)](_0x15d98c=>_0x15d98c[_0xe2e7d(0x16f)]())[_0xe2e7d(0x1a8)](Boolean))];}function parseBooleanFlag(_0x4c6221,_0x427dec,_0x5c6293){const _0x3771d0=a175_0x2d7fee;if(!hasFlag(_0x4c6221,_0x427dec)){if(_0x5c6293)throw CliErrors[_0x3771d0(0x173)](_0x427dec);return undefined;}const _0x5816a6=_0x4c6221['rawFlags'][_0x427dec];if(_0x5816a6===!![]||_0x5816a6===![])return _0x5816a6;if(_0x5816a6===_0x3771d0(0x172))return!![];if(_0x5816a6===_0x3771d0(0x18d))return![];throw CliErrors[_0x3771d0(0x1b0)]('--'+_0x427dec+_0x3771d0(0x166));}function verifyVisibilityUpdate(_0x11c052,_0x329350,_0x576ea2){const _0x4c9c2f=a175_0x2d7fee;assertVerified(!!_0x329350,'Menu\x20'+_0x11c052['id']+_0x4c9c2f(0x14e)),assertVerified(_0x329350[_0x4c9c2f(0x185)]===_0x576ea2,'Menu\x20'+_0x11c052['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x276bad=[['id',_0x329350['id'],_0x11c052['id']],[_0x4c9c2f(0x16e),_0x329350['parentId'],_0x11c052[_0x4c9c2f(0x16e)]],[_0x4c9c2f(0x19d),_0x329350['depth'],_0x11c052[_0x4c9c2f(0x19d)]],[_0x4c9c2f(0x16a),_0x329350['label'],_0x11c052[_0x4c9c2f(0x16a)]],[_0x4c9c2f(0x156),_0x329350[_0x4c9c2f(0x156)],_0x11c052[_0x4c9c2f(0x156)]],[_0x4c9c2f(0x15b),_0x329350[_0x4c9c2f(0x15b)],_0x11c052[_0x4c9c2f(0x15b)]],[_0x4c9c2f(0x178),_0x329350[_0x4c9c2f(0x178)],_0x11c052['type']],[_0x4c9c2f(0x1b5),_0x329350[_0x4c9c2f(0x1b5)],_0x11c052[_0x4c9c2f(0x1b5)]],[_0x4c9c2f(0x1ba),_0x329350[_0x4c9c2f(0x1ba)],_0x11c052[_0x4c9c2f(0x1ba)]],['resourcesValid',_0x329350[_0x4c9c2f(0x14b)],_0x11c052[_0x4c9c2f(0x14b)]],[_0x4c9c2f(0x142),_0x329350[_0x4c9c2f(0x142)],_0x11c052['childrenIds']],['childrenCount',_0x329350[_0x4c9c2f(0x162)],_0x11c052['childrenCount']],[_0x4c9c2f(0x1b1),_0x329350[_0x4c9c2f(0x1b1)],_0x11c052[_0x4c9c2f(0x1b1)]],[_0x4c9c2f(0x17f),_0x329350[_0x4c9c2f(0x17f)],_0x11c052[_0x4c9c2f(0x17f)]],[_0x4c9c2f(0x158),_0x329350[_0x4c9c2f(0x158)],_0x11c052['modelType']],[_0x4c9c2f(0x17b),_0x329350[_0x4c9c2f(0x17b)],_0x11c052[_0x4c9c2f(0x17b)]],[_0x4c9c2f(0x1a1),_0x329350['datasetCode'],_0x11c052[_0x4c9c2f(0x1a1)]]];for(const [_0x59e9d3,_0x4a9410,_0x1d1ba9]of _0x276bad){assertVerified(sameValue(_0x4a9410,_0x1d1ba9),_0x4c9c2f(0x1a7)+_0x11c052['id']+'\x20'+_0x59e9d3+_0x4c9c2f(0x16b));}}function sameValue(_0x4d86b1,_0x4d1e9f){const _0x5e3ae9=a175_0x2d7fee;if(Array[_0x5e3ae9(0x189)](_0x4d86b1)||Array[_0x5e3ae9(0x189)](_0x4d1e9f))return JSON[_0x5e3ae9(0x1b3)](_0x4d86b1)===JSON['stringify'](_0x4d1e9f);return _0x4d86b1===_0x4d1e9f;}
@@ -1 +1 @@
1
- const a176_0x338fc2=a176_0x3346;function a176_0x3346(_0x13495a,_0x2392ed){_0x13495a=_0x13495a-0x165;const _0x4a2f87=a176_0x4a2f();let _0x334612=_0x4a2f87[_0x13495a];return _0x334612;}(function(_0x5afafe,_0x10836a){const _0xe1a53=a176_0x3346,_0x1d1645=_0x5afafe();while(!![]){try{const _0x104765=parseInt(_0xe1a53(0x168))/0x1+parseInt(_0xe1a53(0x177))/0x2+parseInt(_0xe1a53(0x16e))/0x3*(parseInt(_0xe1a53(0x183))/0x4)+-parseInt(_0xe1a53(0x184))/0x5*(parseInt(_0xe1a53(0x178))/0x6)+-parseInt(_0xe1a53(0x175))/0x7+-parseInt(_0xe1a53(0x176))/0x8*(-parseInt(_0xe1a53(0x189))/0x9)+-parseInt(_0xe1a53(0x182))/0xa;if(_0x104765===_0x10836a)break;else _0x1d1645['push'](_0x1d1645['shift']());}catch(_0x2cbe76){_0x1d1645['push'](_0x1d1645['shift']());}}}(a176_0x4a2f,0x4f2dd));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=a176_0x338fc2(0x17c);function a176_0x4a2f(){const _0xeb13c=[';\x20do\x20not\x20resubmit\x20automatically.','515835PtthNt','verified','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20do\x20not\x20resubmit.','readTimeout','12encxZN','description','verification','appCode','config-create','Created\x20notification\x20config\x20','channelType','1238447mFdpIU','18312riyZEl','1078934GJBKRZ','156cJtSDn','write','channelConfig','configCode','/notification/channel-config/create','planned','isSafeInteger','create','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','8006630dwZUHe','389828vFYEuJ','98415qnvURl','connectTimeout','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configName','document','1449IcBTWW','input',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20'];a176_0x4a2f=function(){return _0xeb13c;};return a176_0x4a2f();}async function prepareCreate(_0x118003){const _0x105089=a176_0x338fc2,_0x2814fd=await readNotificationDocument(_0x118003,'create'),_0x462fb1=createMutationInput(_0x118003[_0x105089(0x171)],_0x2814fd);return{'document':_0x2814fd,'input':_0x462fb1,'planned':projectNotificationConfig({'appCode':_0x118003[_0x105089(0x171)],'configName':_0x2814fd['configName'],'channelType':_0x2814fd[_0x105089(0x174)],'endpointUrl':_0x2814fd['endpointUrl'],'channelConfig':_0x2814fd[_0x105089(0x17a)],'description':_0x2814fd[_0x105089(0x16f)],'connectTimeout':_0x2814fd[_0x105089(0x185)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x2814fd[_0x105089(0x16d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a176_0x338fc2(0x172),'description':a176_0x338fc2(0x16b),'risk':a176_0x338fc2(0x179),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4bd290){assertSingleNotificationSource(_0x4bd290);},async 'dryRun'(_0x5403f6){const _0x2e8047=a176_0x338fc2,_0x2aa83f=await prepareCreate(_0x5403f6),_0x2aac2e=notificationLookupCommand(_0x5403f6[_0x2e8047(0x171)],_0x2aa83f['document']['channelType']);return asDryRunResult({'operation':_0x2e8047(0x17f),'selector':{'appCode':_0x5403f6['appCode'],'configName':_0x2aa83f[_0x2e8047(0x188)][_0x2e8047(0x187)],'channelType':_0x2aa83f[_0x2e8047(0x188)]['channelType']},'before':null,'after':_0x2aa83f[_0x2e8047(0x17d)],'dryRun':!![],'backend':{'method':_0x2e8047(0x16a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2e8047(0x17d),'lookupCommand':_0x2aac2e}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5946b0){const _0x15390e=a176_0x338fc2,_0x3e9c8d=await prepareCreate(_0x5946b0),_0x1585d6=notificationLookupCommand(_0x5946b0[_0x15390e(0x171)],_0x3e9c8d[_0x15390e(0x188)][_0x15390e(0x174)]);let _0x47d19f;try{_0x47d19f=await createNotificationChannelConfig(_0x3e9c8d[_0x15390e(0x18a)]);}catch(_0x370b89){if(isPlatformTransportFailure(_0x370b89))throw notificationError('notification_config_create_outcome_unknown',_0x15390e(0x181),'Inspect\x20with\x20'+_0x1585d6+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x15390e(0x17f),'mutation',_0x15390e(0x166)+_0x1585d6+_0x15390e(0x165));}if(!Number[_0x15390e(0x17e)](_0x47d19f)||_0x47d19f<=0x0)throw notificationError(_0x15390e(0x180),_0x15390e(0x186),'Inspect\x20with\x20'+_0x1585d6+_0x15390e(0x16c));let _0x190554;try{const _0x44ed28=await getNotificationChannelConfig(_0x47d19f,_0x5946b0[_0x15390e(0x171)]);_0x190554=normalizeExactNotificationConfig(_0x44ed28,_0x47d19f,_0x5946b0[_0x15390e(0x171)]);}catch{throw safeApiFailure(_0x15390e(0x17f),_0x15390e(0x170),_0x15390e(0x166)+_0x1585d6+_0x15390e(0x167));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x190554[_0x15390e(0x171)],'id':_0x190554['id'],'configCode':_0x190554[_0x15390e(0x17b)],'configName':_0x190554[_0x15390e(0x187)],'channelType':_0x190554[_0x15390e(0x174)]},'before':null,'after':projectNotificationConfig(_0x190554),'dryRun':![],'backend':{'method':_0x15390e(0x16a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x15390e(0x169),'lookupCommand':_0x1585d6}},'message':_0x15390e(0x173)+_0x190554['id']};}};
1
+ const a176_0x203dce=a176_0x40df;(function(_0x569aef,_0x464fb0){const _0x1274e6=a176_0x40df,_0x306407=_0x569aef();while(!![]){try{const _0x363bf4=-parseInt(_0x1274e6(0x10c))/0x1+parseInt(_0x1274e6(0x11f))/0x2*(-parseInt(_0x1274e6(0x104))/0x3)+parseInt(_0x1274e6(0x105))/0x4*(parseInt(_0x1274e6(0x117))/0x5)+-parseInt(_0x1274e6(0x11b))/0x6*(-parseInt(_0x1274e6(0x101))/0x7)+parseInt(_0x1274e6(0x124))/0x8+parseInt(_0x1274e6(0x102))/0x9*(-parseInt(_0x1274e6(0x112))/0xa)+parseInt(_0x1274e6(0x121))/0xb;if(_0x363bf4===_0x464fb0)break;else _0x306407['push'](_0x306407['shift']());}catch(_0x12ecc7){_0x306407['push'](_0x306407['shift']());}}}(a176_0x3710,0xc549a));function a176_0x3710(){const _0x30537b=['18524idKlGy','input','configName','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Created\x20notification\x20config\x20','create','Inspect\x20with\x20','515010PIxPel','config-create',';\x20do\x20not\x20resubmit.','configCode','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','44990gRAGLg','description','planned','connectTimeout','verified','315tgLYRy','notification','readTimeout','channelType','11148ZsVVme',';\x20do\x20not\x20resubmit\x20automatically.','channelConfig','write','4sniJDu','appCode','7114338hoZwoq','document','POST','8381120mwzqNd','497MPGGpQ','639CDIHaP',';\x20no\x20automatic\x20retry\x20was\x20attempted.','713310WqwAxZ'];a176_0x3710=function(){return _0x30537b;};return a176_0x3710();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a176_0x40df(_0x2495f1,_0x313b46){_0x2495f1=_0x2495f1-0x101;const _0x37101e=a176_0x3710();let _0x40dffe=_0x37101e[_0x2495f1];return _0x40dffe;}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x2ccd23){const _0x1026a3=a176_0x40df,_0x47e5ef=await readNotificationDocument(_0x2ccd23,_0x1026a3(0x10a)),_0x2f6703=createMutationInput(_0x2ccd23[_0x1026a3(0x120)],_0x47e5ef);return{'document':_0x47e5ef,'input':_0x2f6703,'planned':projectNotificationConfig({'appCode':_0x2ccd23[_0x1026a3(0x120)],'configName':_0x47e5ef[_0x1026a3(0x107)],'channelType':_0x47e5ef['channelType'],'endpointUrl':_0x47e5ef['endpointUrl'],'channelConfig':_0x47e5ef[_0x1026a3(0x11d)],'description':_0x47e5ef[_0x1026a3(0x113)],'connectTimeout':_0x47e5ef[_0x1026a3(0x115)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x47e5ef[_0x1026a3(0x119)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a176_0x203dce(0x118),'command':a176_0x203dce(0x10d),'description':a176_0x203dce(0x111),'risk':a176_0x203dce(0x11e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x57193f){assertSingleNotificationSource(_0x57193f);},async 'dryRun'(_0x2a7a82){const _0x5e1c38=a176_0x203dce,_0x81dbd9=await prepareCreate(_0x2a7a82),_0x2a5d37=notificationLookupCommand(_0x2a7a82[_0x5e1c38(0x120)],_0x81dbd9[_0x5e1c38(0x122)][_0x5e1c38(0x11a)]);return asDryRunResult({'operation':_0x5e1c38(0x10a),'selector':{'appCode':_0x2a7a82[_0x5e1c38(0x120)],'configName':_0x81dbd9['document'][_0x5e1c38(0x107)],'channelType':_0x81dbd9[_0x5e1c38(0x122)][_0x5e1c38(0x11a)]},'before':null,'after':_0x81dbd9[_0x5e1c38(0x114)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5e1c38(0x114),'lookupCommand':_0x2a5d37}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x25d439){const _0x4a9d86=a176_0x203dce,_0xd5e8f2=await prepareCreate(_0x25d439),_0x105232=notificationLookupCommand(_0x25d439['appCode'],_0xd5e8f2[_0x4a9d86(0x122)][_0x4a9d86(0x11a)]);let _0x43cc87;try{_0x43cc87=await createNotificationChannelConfig(_0xd5e8f2[_0x4a9d86(0x106)]);}catch(_0x21f0f7){if(isPlatformTransportFailure(_0x21f0f7))throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x4a9d86(0x10b)+_0x105232+_0x4a9d86(0x10e));throw safeApiFailure(_0x4a9d86(0x10a),_0x4a9d86(0x110),_0x4a9d86(0x10b)+_0x105232+_0x4a9d86(0x103));}if(!Number['isSafeInteger'](_0x43cc87)||_0x43cc87<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x4a9d86(0x108),_0x4a9d86(0x10b)+_0x105232+_0x4a9d86(0x10e));let _0x24a840;try{const _0x436396=await getNotificationChannelConfig(_0x43cc87,_0x25d439[_0x4a9d86(0x120)]);_0x24a840=normalizeExactNotificationConfig(_0x436396,_0x43cc87,_0x25d439[_0x4a9d86(0x120)]);}catch{throw safeApiFailure(_0x4a9d86(0x10a),'verification',_0x4a9d86(0x10b)+_0x105232+_0x4a9d86(0x11c));}return{'ok':!![],'data':{'operation':_0x4a9d86(0x10a),'selector':{'appCode':_0x24a840['appCode'],'id':_0x24a840['id'],'configCode':_0x24a840[_0x4a9d86(0x10f)],'configName':_0x24a840['configName'],'channelType':_0x24a840[_0x4a9d86(0x11a)]},'before':null,'after':projectNotificationConfig(_0x24a840),'dryRun':![],'backend':{'method':_0x4a9d86(0x123),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4a9d86(0x116),'lookupCommand':_0x105232}},'message':_0x4a9d86(0x109)+_0x24a840['id']};}};
@@ -1 +1 @@
1
- function a177_0x4e49(){const _0x32add4=['/notification/channel-config/delete','616176GKtgDJ','high-risk-write','7271847rvuwyd','appCode','delete','unshift','config-delete','before','notification_config_delete_verification_failed','214552QBHbiw','1696806VDylGF','9384sdihND','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','channelType','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','1255205tdwTFp','339bWBTRS','POST','1VLfdzA','notification_config_delete_outcome_unknown','1283030STQRRK','Notification\x20config\x20','mutation',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a177_0x4e49=function(){return _0x32add4;};return a177_0x4e49();}const a177_0x41c30a=a177_0x1061;(function(_0x206449,_0x26222e){const _0x1567b6=a177_0x1061,_0x372b8a=_0x206449();while(!![]){try{const _0x5810b1=-parseInt(_0x1567b6(0x1a3))/0x1*(-parseInt(_0x1567b6(0x199))/0x2)+parseInt(_0x1567b6(0x1a1))/0x3*(parseInt(_0x1567b6(0x19b))/0x4)+parseInt(_0x1567b6(0x1a5))/0x5+parseInt(_0x1567b6(0x19a))/0x6+parseInt(_0x1567b6(0x1a0))/0x7+-parseInt(_0x1567b6(0x190))/0x8+-parseInt(_0x1567b6(0x192))/0x9;if(_0x5810b1===_0x26222e)break;else _0x372b8a['push'](_0x372b8a['shift']());}catch(_0x248337){_0x372b8a['push'](_0x372b8a['shift']());}}}(a177_0x4e49,0x3250b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a177_0x1061(_0x178a69,_0xc5239d){_0x178a69=_0x178a69-0x18d;const _0x4e49a4=a177_0x4e49();let _0x1061a3=_0x4e49a4[_0x178a69];return _0x1061a3;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a177_0x41c30a(0x18f),REFERENCE_WARNING=a177_0x41c30a(0x18d);async function prepareDelete(_0x3e2f36){const _0x30c98a=a177_0x41c30a,_0x2d6540=readNotificationId(_0x3e2f36),_0x2f30ec=await requireExactNotificationConfig(_0x3e2f36['appCode'],_0x2d6540,_0x30c98a(0x194));return{'id':_0x2d6540,'before':_0x2f30ec};}export const notificationConfigDelete={'service':'notification','command':a177_0x41c30a(0x196),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a177_0x41c30a(0x191),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xe14819){readNotificationId(_0xe14819),requireNotificationExplicitYes(_0xe14819);},async 'dryRun'(_0x13fe03){const _0x4ffee4=a177_0x41c30a,_0x29c245=await prepareDelete(_0x13fe03),_0x33e5f9=notificationLookupCommand(_0x13fe03['appCode'],_0x29c245[_0x4ffee4(0x197)][_0x4ffee4(0x19e)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x29c245['before']),'before':projectNotificationConfig(_0x29c245[_0x4ffee4(0x197)]),'after':null,'dryRun':!![],'backend':{'method':_0x4ffee4(0x1a2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x33e5f9}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2898f7){const _0x36c1fa=a177_0x41c30a;requireNotificationExplicitYes(_0x2898f7);const _0x318187=await prepareDelete(_0x2898f7),_0x1320af=notificationLookupCommand(_0x2898f7[_0x36c1fa(0x193)],_0x318187[_0x36c1fa(0x197)][_0x36c1fa(0x19e)]);let _0x5d4f80=![];try{await deleteNotificationChannelConfig(_0x318187['id'],_0x2898f7[_0x36c1fa(0x193)]);}catch(_0x5f29e8){if(!isPlatformTransportFailure(_0x5f29e8))throw safeApiFailure(_0x36c1fa(0x194),_0x36c1fa(0x1a7),_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x18e));_0x5d4f80=!![];}let _0x42b167;try{_0x42b167=await listNotificationChannelConfigs(_0x2898f7[_0x36c1fa(0x193)],_0x318187[_0x36c1fa(0x197)][_0x36c1fa(0x19e)]),validateNotificationDeleteReadback(_0x42b167,_0x2898f7['appCode'],_0x318187['before'][_0x36c1fa(0x19e)]);}catch{throw notificationError(_0x5d4f80?_0x36c1fa(0x1a4):'notification_config_delete_verification_unavailable',_0x36c1fa(0x1a6)+_0x318187['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x1a8));}if(_0x42b167['some'](_0x1b17de=>_0x1b17de['id']===_0x318187['id']))throw notificationError(_0x5d4f80?_0x36c1fa(0x1a4):_0x36c1fa(0x198),_0x36c1fa(0x1a6)+_0x318187['id']+_0x36c1fa(0x19c),_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x1a8));const _0x4ee2ed=[REFERENCE_WARNING];return _0x5d4f80&&_0x4ee2ed[_0x36c1fa(0x195)](_0x36c1fa(0x19f)),{'ok':!![],'data':{'operation':_0x36c1fa(0x194),'selector':notificationSelector(_0x318187['before']),'before':projectNotificationConfig(_0x318187[_0x36c1fa(0x197)]),'after':null,'dryRun':![],'backend':{'method':_0x36c1fa(0x1a2),'path':DELETE_PATH},'warnings':_0x4ee2ed,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x5d4f80,'lookupCommand':_0x1320af}},'message':_0x36c1fa(0x1a9)+_0x318187['id']};}};
1
+ const a177_0x3ffd7d=a177_0x449b;(function(_0x184005,_0x46ef9c){const _0x584303=a177_0x449b,_0x3cea98=_0x184005();while(!![]){try{const _0x53504b=-parseInt(_0x584303(0x1c6))/0x1+-parseInt(_0x584303(0x1c8))/0x2*(parseInt(_0x584303(0x1bd))/0x3)+parseInt(_0x584303(0x1cb))/0x4+-parseInt(_0x584303(0x1cf))/0x5+parseInt(_0x584303(0x1d3))/0x6+parseInt(_0x584303(0x1ce))/0x7*(parseInt(_0x584303(0x1d1))/0x8)+-parseInt(_0x584303(0x1da))/0x9;if(_0x53504b===_0x46ef9c)break;else _0x3cea98['push'](_0x3cea98['shift']());}catch(_0x29fcd2){_0x3cea98['push'](_0x3cea98['shift']());}}}(a177_0x1ede,0xe17a7));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a177_0x3ffd7d(0x1d5),REFERENCE_WARNING=a177_0x3ffd7d(0x1d9);async function prepareDelete(_0x396cfe){const _0x4bf271=a177_0x3ffd7d,_0x3c50e9=readNotificationId(_0x396cfe),_0x80c3b8=await requireExactNotificationConfig(_0x396cfe[_0x4bf271(0x1c4)],_0x3c50e9,_0x4bf271(0x1c0));return{'id':_0x3c50e9,'before':_0x80c3b8};}function a177_0x449b(_0x4d5592,_0x422ce7){_0x4d5592=_0x4d5592-0x1bd;const _0x1ede9e=a177_0x1ede();let _0x449bb3=_0x1ede9e[_0x4d5592];return _0x449bb3;}export const notificationConfigDelete={'service':a177_0x3ffd7d(0x1c9),'command':a177_0x3ffd7d(0x1cc),'description':a177_0x3ffd7d(0x1c3),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x18869d){readNotificationId(_0x18869d),requireNotificationExplicitYes(_0x18869d);},async 'dryRun'(_0x15559d){const _0x3f2478=a177_0x3ffd7d,_0x5581e=await prepareDelete(_0x15559d),_0x582a41=notificationLookupCommand(_0x15559d[_0x3f2478(0x1c4)],_0x5581e['before'][_0x3f2478(0x1c7)]);return asDryRunResult({'operation':_0x3f2478(0x1c0),'selector':notificationSelector(_0x5581e['before']),'before':projectNotificationConfig(_0x5581e[_0x3f2478(0x1be)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x3f2478(0x1ca),'lookupCommand':_0x582a41}},{'method':_0x3f2478(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x5a58e2){const _0x4ba35a=a177_0x3ffd7d;requireNotificationExplicitYes(_0x5a58e2);const _0x4c627e=await prepareDelete(_0x5a58e2),_0x22d4e6=notificationLookupCommand(_0x5a58e2[_0x4ba35a(0x1c4)],_0x4c627e['before'][_0x4ba35a(0x1c7)]);let _0x4a12f4=![];try{await deleteNotificationChannelConfig(_0x4c627e['id'],_0x5a58e2[_0x4ba35a(0x1c4)]);}catch(_0x4f9421){if(!isPlatformTransportFailure(_0x4f9421))throw safeApiFailure(_0x4ba35a(0x1c0),'mutation',_0x4ba35a(0x1d0)+_0x22d4e6+_0x4ba35a(0x1d6));_0x4a12f4=!![];}let _0x1e55f6;try{_0x1e55f6=await listNotificationChannelConfigs(_0x5a58e2[_0x4ba35a(0x1c4)],_0x4c627e[_0x4ba35a(0x1be)][_0x4ba35a(0x1c7)]),validateNotificationDeleteReadback(_0x1e55f6,_0x5a58e2[_0x4ba35a(0x1c4)],_0x4c627e[_0x4ba35a(0x1be)][_0x4ba35a(0x1c7)]);}catch{throw notificationError(_0x4a12f4?'notification_config_delete_outcome_unknown':_0x4ba35a(0x1c1),_0x4ba35a(0x1d2)+_0x4c627e['id']+_0x4ba35a(0x1c5),'Inspect\x20with\x20'+_0x22d4e6+_0x4ba35a(0x1d8));}if(_0x1e55f6['some'](_0x409f2a=>_0x409f2a['id']===_0x4c627e['id']))throw notificationError(_0x4a12f4?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_failed',_0x4ba35a(0x1d2)+_0x4c627e['id']+_0x4ba35a(0x1cd),_0x4ba35a(0x1d0)+_0x22d4e6+_0x4ba35a(0x1d8));const _0x53e1eb=[REFERENCE_WARNING];return _0x4a12f4&&_0x53e1eb[_0x4ba35a(0x1bf)](_0x4ba35a(0x1d7)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x4c627e[_0x4ba35a(0x1be)]),'before':projectNotificationConfig(_0x4c627e[_0x4ba35a(0x1be)]),'after':null,'dryRun':![],'backend':{'method':_0x4ba35a(0x1c2),'path':DELETE_PATH},'warnings':_0x53e1eb,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4a12f4,'lookupCommand':_0x22d4e6}},'message':_0x4ba35a(0x1d4)+_0x4c627e['id']};}};function a177_0x1ede(){const _0x2241b7=['18319239HCfeVf','17229MOMAoO','before','unshift','delete','notification_config_delete_verification_unavailable','POST','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','appCode','\x20delete\x20could\x20not\x20be\x20verified.','367003GBadXc','channelType','298gNoaOZ','notification','planned','7034508Kdxzin','config-delete','\x20remains\x20present\x20after\x20delete.','72534hZFZgy','1515860JypawL','Inspect\x20with\x20','1352FPumso','Notification\x20config\x20','5850642RUhqfu','Deleted\x20notification\x20config\x20','/notification/channel-config/delete',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20do\x20not\x20resubmit\x20automatically.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.'];a177_0x1ede=function(){return _0x2241b7;};return a177_0x1ede();}
@@ -1 +1 @@
1
- const a178_0x248c43=a178_0x17da;(function(_0x103f29,_0x10cd04){const _0x38fdfd=a178_0x17da,_0x5cfcd4=_0x103f29();while(!![]){try{const _0x235c4e=-parseInt(_0x38fdfd(0xa7))/0x1+-parseInt(_0x38fdfd(0xa6))/0x2*(-parseInt(_0x38fdfd(0xab))/0x3)+parseInt(_0x38fdfd(0xae))/0x4*(-parseInt(_0x38fdfd(0xad))/0x5)+-parseInt(_0x38fdfd(0xbd))/0x6*(parseInt(_0x38fdfd(0xb9))/0x7)+parseInt(_0x38fdfd(0xb7))/0x8*(parseInt(_0x38fdfd(0xa4))/0x9)+-parseInt(_0x38fdfd(0xb2))/0xa+-parseInt(_0x38fdfd(0xbc))/0xb*(-parseInt(_0x38fdfd(0xa5))/0xc);if(_0x235c4e===_0x10cd04)break;else _0x5cfcd4['push'](_0x5cfcd4['shift']());}catch(_0x3b84a3){_0x5cfcd4['push'](_0x5cfcd4['shift']());}}}(a178_0x178f,0x56271));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a178_0x178f(){const _0x4e0c9b=['2247678GgmBOU','config-list','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','length','map','9ckAvxn','12lStPZT','26qMqbiQ','281753RKnTFU','all','string','flat','56367ZFiLGf','appCode','22915EDWEXZ','116iPOTXa','read','notification','validation','3593520pNIrAf','type','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','bool','Found\x20','3244216YmAdZi','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','7UfvtlE','Notification\x20channel\x20type','trim','9368942ImLWug'];a178_0x178f=function(){return _0x4e0c9b;};return a178_0x178f();}function a178_0x17da(_0x5242d7,_0x489627){_0x5242d7=_0x5242d7-0xa3;const _0x178f17=a178_0x178f();let _0x17da86=_0x178f17[_0x5242d7];return _0x17da86;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a178_0x248c43(0xb0),'command':a178_0x248c43(0xbe),'description':a178_0x248c43(0xb8),'risk':a178_0x248c43(0xaf),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x248c43(0xb3),'type':a178_0x248c43(0xa9),'description':a178_0x248c43(0xba),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x248c43(0xa8),'type':'boolean','default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x5f3633){const _0x3a3b0b=a178_0x248c43;if(_0x5f3633[_0x3a3b0b(0xb5)](_0x3a3b0b(0xa8))&&_0x5f3633['str'](_0x3a3b0b(0xb3))[_0x3a3b0b(0xbb)]())throw CliErrors[_0x3a3b0b(0xb1)](_0x3a3b0b(0xbf),_0x3a3b0b(0xb4));if(_0x5f3633[_0x3a3b0b(0xb5)](_0x3a3b0b(0xa8)))return;readNotificationChannelType(_0x5f3633);},async 'execute'(_0x5bda9f){const _0x4e3bff=a178_0x248c43;if(_0x5bda9f[_0x4e3bff(0xb5)](_0x4e3bff(0xa8))){const _0x335a4f=await Promise[_0x4e3bff(0xa8)](NOTIFICATION_CHANNEL_TYPES[_0x4e3bff(0xa3)](_0x53903f=>listNotificationChannelConfigs(_0x5bda9f[_0x4e3bff(0xac)],_0x53903f))),_0x45351d=_0x335a4f[_0x4e3bff(0xaa)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5bda9f[_0x4e3bff(0xac)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x45351d[_0x4e3bff(0xc0)],'configs':_0x45351d},'message':_0x4e3bff(0xb6)+_0x45351d[_0x4e3bff(0xc0)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x569c8a=readNotificationChannelType(_0x5bda9f),_0x44c265=await listNotificationChannelConfigs(_0x5bda9f[_0x4e3bff(0xac)],_0x569c8a),_0x3c7d09=_0x44c265[_0x4e3bff(0xa3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5bda9f[_0x4e3bff(0xac)],'channelType':_0x569c8a,'count':_0x3c7d09[_0x4e3bff(0xc0)],'configs':_0x3c7d09},'message':_0x4e3bff(0xb6)+_0x3c7d09['length']+'\x20'+_0x569c8a+'\x20notification\x20config(s)'};}};
1
+ const a178_0x1f20ed=a178_0x5d80;function a178_0x428b(){const _0x4e8be1=['boolean','flat','read','type','\x20notification\x20config(s)','18VBnzBv','1283672TSSfDH','string','20cDCpPy','map','385513qrySCw','18090pJLlur','1420734PyLzFB','validation','172fZCnJv','config-list','bool','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Found\x20','all','notification','129800KfAqPU','length','9176240PBaHCk','796476tgigNU','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode'];a178_0x428b=function(){return _0x4e8be1;};return a178_0x428b();}(function(_0x50042f,_0x1e6406){const _0x50a088=a178_0x5d80,_0x150c5a=_0x50042f();while(!![]){try{const _0x2c21df=-parseInt(_0x50a088(0x149))/0x1+parseInt(_0x50a088(0x14d))/0x2*(parseInt(_0x50a088(0x14a))/0x3)+-parseInt(_0x50a088(0x154))/0x4+-parseInt(_0x50a088(0x147))/0x5*(parseInt(_0x50a088(0x157))/0x6)+parseInt(_0x50a088(0x14b))/0x7+parseInt(_0x50a088(0x145))/0x8*(-parseInt(_0x50a088(0x144))/0x9)+parseInt(_0x50a088(0x156))/0xa;if(_0x2c21df===_0x1e6406)break;else _0x150c5a['push'](_0x150c5a['shift']());}catch(_0x3d208a){_0x150c5a['push'](_0x150c5a['shift']());}}}(a178_0x428b,0x5a295));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a178_0x5d80(_0x3f1452,_0x55c5da){_0x3f1452=_0x3f1452-0x142;const _0x428b7b=a178_0x428b();let _0x5d80d2=_0x428b7b[_0x3f1452];return _0x5d80d2;}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':a178_0x1f20ed(0x153),'command':a178_0x1f20ed(0x14e),'description':a178_0x1f20ed(0x150),'risk':a178_0x1f20ed(0x15d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x1f20ed(0x142),'type':a178_0x1f20ed(0x146),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x1f20ed(0x152),'type':a178_0x1f20ed(0x15b),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x560feb){const _0x5cc9b2=a178_0x1f20ed;if(_0x560feb[_0x5cc9b2(0x14f)](_0x5cc9b2(0x152))&&_0x560feb['str'](_0x5cc9b2(0x142))['trim']())throw CliErrors[_0x5cc9b2(0x14c)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x5cc9b2(0x159));if(_0x560feb['bool'](_0x5cc9b2(0x152)))return;readNotificationChannelType(_0x560feb);},async 'execute'(_0x4fa508){const _0xdf1b33=a178_0x1f20ed;if(_0x4fa508[_0xdf1b33(0x14f)](_0xdf1b33(0x152))){const _0x11e35d=await Promise[_0xdf1b33(0x152)](NOTIFICATION_CHANNEL_TYPES[_0xdf1b33(0x148)](_0x1addf3=>listNotificationChannelConfigs(_0x4fa508['appCode'],_0x1addf3))),_0x4e6f02=_0x11e35d[_0xdf1b33(0x15c)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4fa508[_0xdf1b33(0x15a)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x4e6f02[_0xdf1b33(0x155)],'configs':_0x4e6f02},'message':_0xdf1b33(0x151)+_0x4e6f02[_0xdf1b33(0x155)]+_0xdf1b33(0x158)};}const _0x365629=readNotificationChannelType(_0x4fa508),_0x595333=await listNotificationChannelConfigs(_0x4fa508['appCode'],_0x365629),_0x2a4e9c=_0x595333['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4fa508[_0xdf1b33(0x15a)],'channelType':_0x365629,'count':_0x2a4e9c[_0xdf1b33(0x155)],'configs':_0x2a4e9c},'message':_0xdf1b33(0x151)+_0x2a4e9c[_0xdf1b33(0x155)]+'\x20'+_0x365629+_0xdf1b33(0x143)};}};
@@ -1 +1 @@
1
- const a179_0x2df960=a179_0x2700;(function(_0x2bed98,_0x160c21){const _0x502058=a179_0x2700,_0x3eeb4f=_0x2bed98();while(!![]){try{const _0x12dee4=-parseInt(_0x502058(0x18a))/0x1+-parseInt(_0x502058(0x188))/0x2*(-parseInt(_0x502058(0x16a))/0x3)+-parseInt(_0x502058(0x173))/0x4+parseInt(_0x502058(0x16c))/0x5*(parseInt(_0x502058(0x189))/0x6)+parseInt(_0x502058(0x180))/0x7+parseInt(_0x502058(0x17a))/0x8+parseInt(_0x502058(0x17c))/0x9*(-parseInt(_0x502058(0x171))/0xa);if(_0x12dee4===_0x160c21)break;else _0x3eeb4f['push'](_0x3eeb4f['shift']());}catch(_0x2f7c5f){_0x3eeb4f['push'](_0x3eeb4f['shift']());}}}(a179_0x4b5f,0x649ff));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a179_0x2700(_0x2653d5,_0x27ebda){_0x2653d5=_0x2653d5-0x164;const _0x4b5f28=a179_0x4b5f();let _0x2700b9=_0x4b5f28[_0x2653d5];return _0x2700b9;}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 a179_0x4b5f(){const _0x420620=['planned','channelType','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20with\x20','notification_config_update_verification_unavailable','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','1058811TlUgmI','Updated\x20notification\x20config\x20','3449995yWEqSP','/notification/channel-config/update','notification_config_update_verification_failed','appCode','provesChange','2950zibuVj',';\x20do\x20not\x20resubmit\x20automatically.','829884OMjbuQ','\x20via\x20','Inspect\x20ID\x20','Notification\x20config\x20','config-update','allMatch','update','2072440ERZRfw','notification','12492WSWdRr','notification_config_update_outcome_unknown','verifiedFields','mutation','1229718pZkcFi','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','before','high-risk-write','patch','verified','payload','4fSAUDm','6fYRyWN','801512wUAGZk','Inspect\x20with\x20--id\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.'];a179_0x4b5f=function(){return _0x420620;};return a179_0x4b5f();}const UPDATE_PATH=a179_0x2df960(0x16d);async function prepareUpdate(_0x1a9d8e){const _0x927663=readNotificationId(_0x1a9d8e),_0xcc185d=await readNotificationDocument(_0x1a9d8e,'update'),_0x46b02c=await requireExactNotificationConfig(_0x1a9d8e['appCode'],_0x927663,'update');return{'id':_0x927663,'patch':_0xcc185d,'before':_0x46b02c,'payload':mergeUpdateInput(_0x46b02c,_0xcc185d),'planned':plannedUpdateProjection(_0x46b02c,_0xcc185d)};}export const notificationConfigUpdate={'service':a179_0x2df960(0x17b),'command':a179_0x2df960(0x177),'description':a179_0x2df960(0x169),'risk':a179_0x2df960(0x184),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x46e3c9){readNotificationId(_0x46e3c9),assertSingleNotificationSource(_0x46e3c9),requireNotificationExplicitYes(_0x46e3c9);},async 'dryRun'(_0x16041f){const _0x94850=a179_0x2df960,_0x54c565=await prepareUpdate(_0x16041f),_0x1764ff=notificationLookupCommand(_0x16041f[_0x94850(0x16f)],_0x54c565[_0x94850(0x183)][_0x94850(0x165)]);return asDryRunResult({'operation':_0x94850(0x179),'selector':notificationSelector(_0x54c565['before']),'before':projectNotificationConfig(_0x54c565['before']),'after':_0x54c565[_0x94850(0x164)],'dryRun':!![],'backend':{'method':_0x94850(0x181),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x94850(0x164),'lookupCommand':_0x1764ff}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x44495d){const _0x193405=a179_0x2df960;requireNotificationExplicitYes(_0x44495d);const _0x569385=await prepareUpdate(_0x44495d),_0x3f7e94=notificationLookupCommand(_0x44495d[_0x193405(0x16f)],_0x569385[_0x193405(0x183)][_0x193405(0x165)]);let _0x4bbf0a=![];try{await updateNotificationChannelConfig(_0x569385[_0x193405(0x187)]);}catch(_0x6ee0d7){if(!isPlatformTransportFailure(_0x6ee0d7))throw safeApiFailure(_0x193405(0x179),_0x193405(0x17f),_0x193405(0x175)+_0x569385['id']+_0x193405(0x167)+_0x3f7e94+_0x193405(0x182));_0x4bbf0a=!![];}let _0x3ccde5;try{const _0x59b220=await getNotificationChannelConfig(_0x569385['id'],_0x44495d['appCode']);_0x3ccde5=normalizeExactNotificationConfig(_0x59b220,_0x569385['id'],_0x44495d['appCode']);}catch{throw notificationError(_0x4bbf0a?_0x193405(0x17d):_0x193405(0x168),_0x193405(0x176)+_0x569385['id']+_0x193405(0x166),_0x193405(0x18b)+_0x569385['id']+_0x193405(0x174)+_0x3f7e94+_0x193405(0x172));}const _0x3ea83b=requestedSafeFieldsMatch(_0x569385[_0x193405(0x183)],_0x3ccde5,_0x569385[_0x193405(0x185)]);if(!_0x3ea83b[_0x193405(0x178)]||_0x4bbf0a&&!_0x3ea83b[_0x193405(0x170)])throw notificationError(_0x4bbf0a?_0x193405(0x17d):_0x193405(0x16e),_0x193405(0x176)+_0x569385['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x193405(0x18b)+_0x569385['id']+_0x193405(0x174)+_0x3f7e94+';\x20do\x20not\x20resubmit\x20automatically.');const _0x5c640b=_0x4bbf0a?[_0x193405(0x18c)]:[];return{'ok':!![],'data':{'operation':_0x193405(0x179),'selector':notificationSelector(_0x3ccde5),'before':projectNotificationConfig(_0x569385[_0x193405(0x183)]),'after':projectNotificationConfig(_0x3ccde5),'dryRun':![],'backend':{'method':_0x193405(0x181),'path':UPDATE_PATH},'warnings':_0x5c640b,'verification':{'status':_0x193405(0x186),'recoveredAfterUnknownResponse':_0x4bbf0a,'verifiedFields':_0x3ea83b[_0x193405(0x17e)],'lookupCommand':_0x3f7e94}},'message':_0x193405(0x16b)+_0x3ccde5['id']};}};
1
+ const a179_0x449dc0=a179_0x313a;(function(_0x46bc9f,_0x3640b2){const _0x2601a1=a179_0x313a,_0x5a7eab=_0x46bc9f();while(!![]){try{const _0x233490=-parseInt(_0x2601a1(0x94))/0x1*(parseInt(_0x2601a1(0x85))/0x2)+parseInt(_0x2601a1(0x90))/0x3+-parseInt(_0x2601a1(0x8f))/0x4*(-parseInt(_0x2601a1(0x7f))/0x5)+parseInt(_0x2601a1(0x95))/0x6+parseInt(_0x2601a1(0x81))/0x7+parseInt(_0x2601a1(0x8a))/0x8*(parseInt(_0x2601a1(0x96))/0x9)+-parseInt(_0x2601a1(0x89))/0xa;if(_0x233490===_0x3640b2)break;else _0x5a7eab['push'](_0x5a7eab['shift']());}catch(_0x4b07c4){_0x5a7eab['push'](_0x5a7eab['shift']());}}}(a179_0x32e5,0x233f9));function a179_0x32e5(){const _0x22b7f=['Notification\x20config\x20','246904CkEXJq','appCode','before','\x20via\x20','6AQHrtA','update','notification','/notification/channel-config/update','3193990OpCWOX','8ezWFwB','channelType','planned','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','POST','48FsKNIL','350916ZLNKUI','patch','config-update','Inspect\x20ID\x20','37397kObJyf','855924IJhMPO','2315349yOhXnL','high-risk-write','Inspect\x20with\x20--id\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20do\x20not\x20resubmit\x20automatically.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','payload','\x20with\x20','mutation','allMatch','notification_config_update_verification_unavailable','verifiedFields','notification_config_update_outcome_unknown','Updated\x20notification\x20config\x20','9920NujYPZ'];a179_0x32e5=function(){return _0x22b7f;};return a179_0x32e5();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x313a(_0x1f7b90,_0x188046){_0x1f7b90=_0x1f7b90-0x76;const _0x32e56d=a179_0x32e5();let _0x313acb=_0x32e56d[_0x1f7b90];return _0x313acb;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a179_0x449dc0(0x88);async function prepareUpdate(_0x397404){const _0x4b5b85=a179_0x449dc0,_0x1cf137=readNotificationId(_0x397404),_0x415c09=await readNotificationDocument(_0x397404,_0x4b5b85(0x86)),_0x5f354b=await requireExactNotificationConfig(_0x397404[_0x4b5b85(0x82)],_0x1cf137,_0x4b5b85(0x86));return{'id':_0x1cf137,'patch':_0x415c09,'before':_0x5f354b,'payload':mergeUpdateInput(_0x5f354b,_0x415c09),'planned':plannedUpdateProjection(_0x5f354b,_0x415c09)};}export const notificationConfigUpdate={'service':a179_0x449dc0(0x87),'command':a179_0x449dc0(0x92),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a179_0x449dc0(0x97),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x354ab1){readNotificationId(_0x354ab1),assertSingleNotificationSource(_0x354ab1),requireNotificationExplicitYes(_0x354ab1);},async 'dryRun'(_0x17401c){const _0x158b12=a179_0x449dc0,_0xe317a4=await prepareUpdate(_0x17401c),_0x3d363f=notificationLookupCommand(_0x17401c['appCode'],_0xe317a4['before']['channelType']);return asDryRunResult({'operation':_0x158b12(0x86),'selector':notificationSelector(_0xe317a4['before']),'before':projectNotificationConfig(_0xe317a4[_0x158b12(0x83)]),'after':_0xe317a4[_0x158b12(0x8c)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x3d363f}},{'method':_0x158b12(0x8e),'url':UPDATE_PATH});},async 'execute'(_0x16f224){const _0x34c10f=a179_0x449dc0;requireNotificationExplicitYes(_0x16f224);const _0x13197d=await prepareUpdate(_0x16f224),_0x3b7ca9=notificationLookupCommand(_0x16f224[_0x34c10f(0x82)],_0x13197d['before'][_0x34c10f(0x8b)]);let _0x606cb8=![];try{await updateNotificationChannelConfig(_0x13197d[_0x34c10f(0x77)]);}catch(_0x2e8ebe){if(!isPlatformTransportFailure(_0x2e8ebe))throw safeApiFailure(_0x34c10f(0x86),_0x34c10f(0x79),_0x34c10f(0x93)+_0x13197d['id']+_0x34c10f(0x78)+_0x3b7ca9+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x606cb8=!![];}let _0x4460dd;try{const _0x47e2fc=await getNotificationChannelConfig(_0x13197d['id'],_0x16f224[_0x34c10f(0x82)]);_0x4460dd=normalizeExactNotificationConfig(_0x47e2fc,_0x13197d['id'],_0x16f224[_0x34c10f(0x82)]);}catch{throw notificationError(_0x606cb8?_0x34c10f(0x7d):_0x34c10f(0x7b),_0x34c10f(0x80)+_0x13197d['id']+_0x34c10f(0x76),_0x34c10f(0x98)+_0x13197d['id']+_0x34c10f(0x84)+_0x3b7ca9+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x2fa239=requestedSafeFieldsMatch(_0x13197d[_0x34c10f(0x83)],_0x4460dd,_0x13197d[_0x34c10f(0x91)]);if(!_0x2fa239[_0x34c10f(0x7a)]||_0x606cb8&&!_0x2fa239['provesChange'])throw notificationError(_0x606cb8?_0x34c10f(0x7d):'notification_config_update_verification_failed',_0x34c10f(0x80)+_0x13197d['id']+_0x34c10f(0x99),_0x34c10f(0x98)+_0x13197d['id']+'\x20via\x20'+_0x3b7ca9+_0x34c10f(0x9a));const _0x2e15f2=_0x606cb8?[_0x34c10f(0x8d)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4460dd),'before':projectNotificationConfig(_0x13197d[_0x34c10f(0x83)]),'after':projectNotificationConfig(_0x4460dd),'dryRun':![],'backend':{'method':_0x34c10f(0x8e),'path':UPDATE_PATH},'warnings':_0x2e15f2,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x606cb8,'verifiedFields':_0x2fa239[_0x34c10f(0x7c)],'lookupCommand':_0x3b7ca9}},'message':_0x34c10f(0x7e)+_0x4460dd['id']};}};
@@ -1 +1 @@
1
- (function(_0x9d753f,_0x1ae9d4){const _0x238872=a180_0x3ba3,_0x27b921=_0x9d753f();while(!![]){try{const _0x568f86=-parseInt(_0x238872(0x19b))/0x1+parseInt(_0x238872(0x19e))/0x2+parseInt(_0x238872(0x1a0))/0x3*(parseInt(_0x238872(0x19a))/0x4)+-parseInt(_0x238872(0x1a1))/0x5+parseInt(_0x238872(0x19d))/0x6+-parseInt(_0x238872(0x19c))/0x7+parseInt(_0x238872(0x19f))/0x8;if(_0x568f86===_0x1ae9d4)break;else _0x27b921['push'](_0x27b921['shift']());}catch(_0x183ab5){_0x27b921['push'](_0x27b921['shift']());}}}(a180_0x39dd,0x71bd0));function a180_0x3ba3(_0x36b4da,_0x28b5de){_0x36b4da=_0x36b4da-0x19a;const _0x39ddcb=a180_0x39dd();let _0x3ba3f2=_0x39ddcb[_0x36b4da];return _0x3ba3f2;}function a180_0x39dd(){const _0x29c893=['846952hlRQkD','1591156eKMmpC','3490110exkDoi','1187848rPgAcO','1020728cASWWo','225YLMoGy','1307590YzeXxD','26584AVNbAs'];a180_0x39dd=function(){return _0x29c893;};return a180_0x39dd();}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';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ function a180_0x400a(){const _0x27c239=['5847779RXjmkx','110pXeuLG','7306803FQpknr','2oWIjkP','8jtdGwW','5Decemx','2207049BcYTCy','2502104XazCid','858846CGFrZN','691026JuNtHI','1548888kYsqOM'];a180_0x400a=function(){return _0x27c239;};return a180_0x400a();}function a180_0x5355(_0x159bd4,_0x6af310){_0x159bd4=_0x159bd4-0xaa;const _0x400a12=a180_0x400a();let _0x5355e8=_0x400a12[_0x159bd4];return _0x5355e8;}(function(_0x3a66af,_0x16395f){const _0x508300=a180_0x5355,_0x9afeee=_0x3a66af();while(!![]){try{const _0x221de9=parseInt(_0x508300(0xad))/0x1+parseInt(_0x508300(0xb3))/0x2*(-parseInt(_0x508300(0xab))/0x3)+parseInt(_0x508300(0xac))/0x4+parseInt(_0x508300(0xaa))/0x5*(-parseInt(_0x508300(0xae))/0x6)+-parseInt(_0x508300(0xb0))/0x7*(-parseInt(_0x508300(0xb4))/0x8)+parseInt(_0x508300(0xb2))/0x9+-parseInt(_0x508300(0xb1))/0xa*(parseInt(_0x508300(0xaf))/0xb);if(_0x221de9===_0x16395f)break;else _0x9afeee['push'](_0x9afeee['shift']());}catch(_0x5bc440){_0x9afeee['push'](_0x9afeee['shift']());}}}(a180_0x400a,0xb2af6));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';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];