@lovrabet/rabetbase-cli 2.5.2-beta.7 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/index.js +1 -1
  99. package/lib/commands/deployment/sync-all.js +1 -1
  100. package/lib/commands/deployment/sync-jobs.js +1 -1
  101. package/lib/commands/deployment/sync-status.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/instant-api-policy/current.js +1 -1
  105. package/lib/commands/instant-api-policy/index.js +1 -1
  106. package/lib/commands/instant-api-policy/init.js +1 -1
  107. package/lib/commands/instant-api-policy/publish.js +1 -1
  108. package/lib/commands/instant-api-policy/pull.js +1 -1
  109. package/lib/commands/instant-api-policy/revision.js +1 -1
  110. package/lib/commands/instant-api-policy/revisions.js +1 -1
  111. package/lib/commands/instant-api-policy/rollback.js +1 -1
  112. package/lib/commands/instant-api-policy/shared.js +1 -1
  113. package/lib/commands/instant-api-policy/validate.js +1 -1
  114. package/lib/commands/issue/index.js +1 -1
  115. package/lib/commands/issue/nudge.js +1 -1
  116. package/lib/commands/issue/report.js +1 -1
  117. package/lib/commands/issue/shared.js +1 -1
  118. package/lib/commands/kb/create.js +1 -1
  119. package/lib/commands/kb/delete.js +1 -1
  120. package/lib/commands/kb/detail.js +1 -1
  121. package/lib/commands/kb/index.js +1 -1
  122. package/lib/commands/kb/list.js +1 -1
  123. package/lib/commands/kb/search.js +1 -1
  124. package/lib/commands/kb/shared.js +1 -1
  125. package/lib/commands/kb/update.js +1 -1
  126. package/lib/commands/logs/index.js +1 -1
  127. package/lib/commands/menu/asset-update.js +1 -1
  128. package/lib/commands/menu/delete.js +1 -1
  129. package/lib/commands/menu/external-link-create.js +1 -1
  130. package/lib/commands/menu/external-link-update.js +1 -1
  131. package/lib/commands/menu/group-create.js +1 -1
  132. package/lib/commands/menu/group-update.js +1 -1
  133. package/lib/commands/menu/index.js +1 -1
  134. package/lib/commands/menu/list.js +1 -1
  135. package/lib/commands/menu/move.js +1 -1
  136. package/lib/commands/menu/regroup-start.js +1 -1
  137. package/lib/commands/menu/rename.js +1 -1
  138. package/lib/commands/menu/shared/compare-table.js +1 -1
  139. package/lib/commands/menu/shared/delete-plan.js +1 -1
  140. package/lib/commands/menu/shared/facts.js +1 -1
  141. package/lib/commands/menu/shared/index.js +1 -1
  142. package/lib/commands/menu/shared/inquirer.js +1 -1
  143. package/lib/commands/menu/shared/local-pages.js +1 -1
  144. package/lib/commands/menu/shared/logic.js +1 -1
  145. package/lib/commands/menu/shared/mutations.js +1 -1
  146. package/lib/commands/menu/shared/service.js +1 -1
  147. package/lib/commands/menu/shared/sync-core.js +1 -1
  148. package/lib/commands/menu/shared/update-core.js +1 -1
  149. package/lib/commands/menu/shared/valid-url.js +1 -1
  150. package/lib/commands/menu/sync.js +1 -1
  151. package/lib/commands/menu/visibility-update.js +1 -1
  152. package/lib/commands/notification/config-create.js +1 -1
  153. package/lib/commands/notification/config-delete.js +1 -1
  154. package/lib/commands/notification/config-list.js +1 -1
  155. package/lib/commands/notification/config-update.js +1 -1
  156. package/lib/commands/notification/index.js +1 -1
  157. package/lib/commands/notification/shared.js +1 -1
  158. package/lib/commands/ocr/index.js +1 -1
  159. package/lib/commands/page/create.js +1 -1
  160. package/lib/commands/page/custom/detail.js +1 -1
  161. package/lib/commands/page/custom/list.js +1 -1
  162. package/lib/commands/page/custom/publish.js +1 -1
  163. package/lib/commands/page/custom/shared.js +1 -1
  164. package/lib/commands/page/custom/syntax.js +1 -1
  165. package/lib/commands/page/custom/update.js +1 -1
  166. package/lib/commands/page/data-list-status.js +1 -1
  167. package/lib/commands/page/generate-start.js +1 -1
  168. package/lib/commands/page/generate-status.js +1 -1
  169. package/lib/commands/page/index.js +1 -1
  170. package/lib/commands/page/pull.js +1 -1
  171. package/lib/commands/page/push.js +1 -1
  172. package/lib/commands/page/relation-audit.js +1 -1
  173. package/lib/commands/page/restore.js +1 -1
  174. package/lib/commands/page/shared.js +1 -1
  175. package/lib/commands/page/sync.js +1 -1
  176. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  177. package/lib/commands/project/create/format-elapsed.js +1 -1
  178. package/lib/commands/project/create/main.js +1 -1
  179. package/lib/commands/project/create/materialize-project-template.js +1 -1
  180. package/lib/commands/project/create/project-name.js +1 -1
  181. package/lib/commands/project/create/project-template-archive.js +1 -1
  182. package/lib/commands/project/create/project-template-path.js +1 -1
  183. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  184. package/lib/commands/project/create/use-format-code.js +1 -1
  185. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  186. package/lib/commands/project/domain-routing-sync.js +1 -1
  187. package/lib/commands/project/index.js +1 -1
  188. package/lib/commands/project/upgrade.js +1 -1
  189. package/lib/commands/registry.js +1 -1
  190. package/lib/commands/role/delete.js +1 -1
  191. package/lib/commands/role/detail.js +1 -1
  192. package/lib/commands/role/index.js +1 -1
  193. package/lib/commands/role/list.js +1 -1
  194. package/lib/commands/role/shared.js +1 -1
  195. package/lib/commands/role/update.js +1 -1
  196. package/lib/commands/role/user-add.js +1 -1
  197. package/lib/commands/role/user-remove.js +1 -1
  198. package/lib/commands/role/user-resolve.js +1 -1
  199. package/lib/commands/rule/get.js +1 -1
  200. package/lib/commands/rule/index.js +1 -1
  201. package/lib/commands/rule/list.js +1 -1
  202. package/lib/commands/rule/set.js +1 -1
  203. package/lib/commands/rule/shared.js +1 -1
  204. package/lib/commands/run/index.js +1 -1
  205. package/lib/commands/schema.js +1 -1
  206. package/lib/commands/sql/create.js +1 -1
  207. package/lib/commands/sql/delete.js +1 -1
  208. package/lib/commands/sql/detail.js +1 -1
  209. package/lib/commands/sql/exec.js +1 -1
  210. package/lib/commands/sql/index.js +1 -1
  211. package/lib/commands/sql/list.js +1 -1
  212. package/lib/commands/sql/pull.js +1 -1
  213. package/lib/commands/sql/push.js +1 -1
  214. package/lib/commands/sql/shared.js +1 -1
  215. package/lib/commands/sql/status.js +1 -1
  216. package/lib/commands/sql/validate.js +1 -1
  217. package/lib/commands/task/index.js +1 -1
  218. package/lib/commands/task/status.js +1 -1
  219. package/lib/commands/tenant/index.js +1 -1
  220. package/lib/commands/tenant/members-list.js +1 -1
  221. package/lib/commands/tenant/shared.js +1 -1
  222. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  223. package/lib/commands/user-account/index.js +1 -1
  224. package/lib/commands/workspace/add.js +1 -1
  225. package/lib/commands/workspace/index.js +1 -1
  226. package/lib/commands/workspace/remove.js +1 -1
  227. package/lib/config/domain-config.js +1 -1
  228. package/lib/config/project-domain-routing.js +1 -1
  229. package/lib/config/schema.js +1 -1
  230. package/lib/constant/cdn.js +1 -1
  231. package/lib/constant/cli.js +1 -1
  232. package/lib/constant/defaults.js +1 -1
  233. package/lib/constant/domain.js +1 -1
  234. package/lib/constant/env.js +1 -1
  235. package/lib/constant/output.js +1 -1
  236. package/lib/constant/paths.js +1 -1
  237. package/lib/constant/region.js +1 -1
  238. package/lib/constant/risk.js +1 -1
  239. package/lib/constant/routing-profile.js +1 -1
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.js +1 -1
  246. package/lib/core/bff/config.js +1 -1
  247. package/lib/core/bff/file-system.js +1 -1
  248. package/lib/core/bff/hash.js +1 -1
  249. package/lib/core/bff/lock.js +1 -1
  250. package/lib/core/bff/utils.js +1 -1
  251. package/lib/core/db-resolver.js +1 -1
  252. package/lib/core/instant-api-policy/config.js +1 -1
  253. package/lib/core/kb-search-client.js +1 -1
  254. package/lib/core/page/file-system.js +1 -1
  255. package/lib/core/page/hash.js +1 -1
  256. package/lib/core/page/lock.js +1 -1
  257. package/lib/core/sql-index-auditor.js +1 -1
  258. package/lib/core/sql-sync/config.js +1 -1
  259. package/lib/core/sql-sync/file-system.js +1 -1
  260. package/lib/core/sql-sync/hash.js +1 -1
  261. package/lib/core/sql-sync/lock.js +1 -1
  262. package/lib/core/sql-sync/utils.js +1 -1
  263. package/lib/core/sql-validator.js +1 -1
  264. package/lib/errors.js +1 -1
  265. package/lib/framework/build-all-flags.js +1 -1
  266. package/lib/framework/error-output.js +1 -1
  267. package/lib/framework/explicit-yes.js +1 -1
  268. package/lib/framework/flags.js +1 -1
  269. package/lib/framework/help.js +1 -1
  270. package/lib/framework/index.js +1 -1
  271. package/lib/framework/output.js +1 -1
  272. package/lib/framework/response.js +1 -1
  273. package/lib/framework/runner-alias.js +1 -1
  274. package/lib/framework/runner.js +1 -1
  275. package/lib/framework/schema-export.js +1 -1
  276. package/lib/framework/supported-flags.js +1 -1
  277. package/lib/framework/types.js +1 -1
  278. package/lib/generated/build-info.d.ts +4 -4
  279. package/lib/generated/build-info.js +1 -1
  280. package/lib/generated/official-routing.js +1 -1
  281. package/lib/generated/routing-contract.js +1 -1
  282. package/lib/help.js +1 -1
  283. package/lib/postinstall.js +1 -1
  284. package/lib/runtime/confirmation.js +1 -1
  285. package/lib/runtime/event.js +1 -1
  286. package/lib/runtime/index.js +1 -1
  287. package/lib/runtime/queue.js +1 -1
  288. package/lib/runtime/resolve.js +1 -1
  289. package/lib/skills/builtin-skill.js +1 -1
  290. package/lib/skills/main.js +1 -1
  291. package/lib/skills/npx-skills-add.js +1 -1
  292. package/lib/skills/skill-presence.js +1 -1
  293. package/lib/telemetry/cli-command-trace.js +1 -1
  294. package/lib/telemetry/cli-help-trace.js +1 -1
  295. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  296. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  297. package/lib/telemetry/send-cli-trace-log.js +1 -1
  298. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  299. package/lib/utils/ai_config.js +1 -1
  300. package/lib/utils/apply-jq-filter.js +1 -1
  301. package/lib/utils/cdn-config.js +1 -1
  302. package/lib/utils/check-sdk-version.js +1 -1
  303. package/lib/utils/cli-version-check.js +1 -1
  304. package/lib/utils/cli-version-policy.js +1 -1
  305. package/lib/utils/config.js +1 -1
  306. package/lib/utils/entity-with-id.js +1 -1
  307. package/lib/utils/file-utils.js +1 -1
  308. package/lib/utils/guides-cdn.js +1 -1
  309. package/lib/utils/http-client.js +1 -1
  310. package/lib/utils/is-non-interactive.js +1 -1
  311. package/lib/utils/logger.js +1 -1
  312. package/lib/utils/params.js +1 -1
  313. package/lib/utils/platform.js +1 -1
  314. package/lib/utils/sleep.js +1 -1
  315. package/lib/utils/template-replacer.js +1 -1
  316. package/lib/utils/update-notice.js +1 -1
  317. package/lib/utils/version.js +1 -1
  318. package/lib/utils/with-active-cookie.js +1 -1
  319. package/lib/utils/write-cli-side-channel.js +1 -1
  320. package/package.json +1 -1
  321. package/skills/rabetbase/SKILL.md +1 -1
  322. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x4ec29e,_0x31e2e0){const _0x509dcd=a145_0xa424,_0x4d9505=_0x4ec29e();while(!![]){try{const _0x58f1be=-parseInt(_0x509dcd(0x87))/0x1*(-parseInt(_0x509dcd(0x86))/0x2)+parseInt(_0x509dcd(0x7e))/0x3+parseInt(_0x509dcd(0x79))/0x4+parseInt(_0x509dcd(0x8b))/0x5*(-parseInt(_0x509dcd(0x9f))/0x6)+parseInt(_0x509dcd(0x9a))/0x7+-parseInt(_0x509dcd(0x9b))/0x8*(parseInt(_0x509dcd(0x8f))/0x9)+parseInt(_0x509dcd(0x99))/0xa*(-parseInt(_0x509dcd(0x89))/0xb);if(_0x58f1be===_0x31e2e0)break;else _0x4d9505['push'](_0x4d9505['shift']());}catch(_0x23ae45){_0x4d9505['push'](_0x4d9505['shift']());}}}(a145_0x3df4,0x808a5));function a145_0xa424(_0x218bfb,_0x3f79e5){_0x218bfb=_0x218bfb-0x78;const _0x3df4d9=a145_0x3df4();let _0xa424f8=_0x3df4d9[_0x218bfb];return _0xa424f8;}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';function a145_0x3df4(){const _0x282216=['map','Update\x20menu\x20','24qGEhGb','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Updating\x20menu\x20asset\x20links:\x20','2980328AXStrm','loadScriptMode','Creating\x20menu:\x20','menuGroups','Menu\x20created\x20successfully:\x20','2079294ZWPxZD','Batch\x20menu\x20creation\x20completed,\x20total\x20','stringify','all','path','total','import','\x20online\x20menus\x20successfully','14BFKfuW','70039msUHRX','procode','1393733cEUDpm','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','944950iNzPuB','create-menu','Create\x20menu\x20\x22','Menu\x20assets\x20synced:\x20','751419nSkbni','resources','get-online-menu-list','info','label','Fetched\x20','Update\x20menu\x20assets\x20\x22','length','extend','update-menu-cdn-url','30YpKYgS','2229878eOBedK','56BQfaWS','Regroup\x20'];a145_0x3df4=function(){return _0x282216;};return a145_0x3df4();}import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a145_0x37cee4,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x258f00,_0x21bd47){const _0x46a79c=a145_0xa424,_0xfedf42=getEnv();logger[_0x46a79c(0x92)](_0x46a79c(0x91),isProduction(_0xfedf42)?_0x46a79c(0x8a)+_0x258f00+')':_0x46a79c(0xa0)+_0x258f00+')');const _0x5d108b=await fetchMenuSnapshot(_0x258f00,_0x21bd47,{'verbose':!![]});return logger[_0x46a79c(0x92)](_0x46a79c(0x91),_0x46a79c(0x94)+_0x5d108b[_0x46a79c(0x83)]+_0x46a79c(0x85)),_0x5d108b['menus']['map'](toProcessedMenuItem);}export async function createMenu(_0x23f1bc,_0x1eb110,_0x4ee303){const _0x97299e=a145_0xa424;logger[_0x97299e(0x92)]('create-menu',_0x97299e(0x7b)+_0x4ee303[_0x97299e(0x93)]+'\x20('+_0x4ee303[_0x97299e(0x82)]+')');const _0x3bcd64={'appCode':_0x23f1bc,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x97299e(0x84),'resources':_0x4ee303['resources']?JSON[_0x97299e(0x80)](_0x4ee303[_0x97299e(0x90)]):undefined},..._0x4ee303},_0x34944a=await createMenuRecord(_0x3bcd64,_0x1eb110,_0x97299e(0x8d)+_0x4ee303[_0x97299e(0x93)]+'\x22');return logger['info'](_0x97299e(0x8c),_0x97299e(0x7d)+_0x4ee303[_0x97299e(0x93)]),_0x34944a;}async function createSingleMenu(_0x428942,_0x1c1f81,_0xb1d888,_0x19da86){const _0x2fdb2b=a145_0xa424,_0x50a5ef={'appCode':_0x428942,'type':_0x2fdb2b(0x88),'sort':0x0,'extend':{'loadScriptMode':_0x2fdb2b(0x84),'resources':_0x19da86?JSON[_0x2fdb2b(0x80)](_0x19da86):undefined},'label':_0xb1d888[_0x2fdb2b(0x93)],'path':_0xb1d888['path']},_0x3f9b24=await createMenuRecord(_0x50a5ef,_0x1c1f81,_0x2fdb2b(0x8d)+_0xb1d888[_0x2fdb2b(0x93)]+'\x22');return logger[_0x2fdb2b(0x92)](_0x2fdb2b(0x8c),_0x2fdb2b(0x7d)+_0xb1d888[_0x2fdb2b(0x93)]),_0x3f9b24;}export async function createMenus(_0x2d7fa7,_0x892be2,_0x40891a,_0x5a0d81){const _0x423d3a=a145_0xa424;logger[_0x423d3a(0x92)]('create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x40891a['length']);const _0x352f8a=await Promise[_0x423d3a(0x81)](_0x40891a[_0x423d3a(0x9d)](_0x310f93=>createSingleMenu(_0x2d7fa7,_0x892be2,_0x310f93,_0x5a0d81)));return logger[_0x423d3a(0x92)]('create-menus',_0x423d3a(0x7f)+_0x40891a[_0x423d3a(0x96)]),_0x352f8a;}export async function updateMenuCdnUrl(_0x43b342,_0x250ef8,_0x529b73){const _0x2e8b93=a145_0xa424;logger['info'](_0x2e8b93(0x98),_0x2e8b93(0x78)+_0x529b73[_0x2e8b93(0x93)]+'\x20('+_0x529b73[_0x2e8b93(0x82)]+')');const _0x5b526f={'id':_0x529b73['id'],'appCode':_0x43b342,'extend':{..._0x529b73[_0x2e8b93(0x97)]??{},..._0x529b73[_0x2e8b93(0x7a)]?{'loadScriptMode':_0x529b73['loadScriptMode']}:{},'resources':_0x529b73[_0x2e8b93(0x90)]?JSON['stringify'](_0x529b73[_0x2e8b93(0x90)]):undefined}},_0x1fb718=await updateMenuRecord(_0x5b526f,_0x250ef8,_0x2e8b93(0x95)+_0x529b73['label']+'\x22');return logger[_0x2e8b93(0x92)](_0x2e8b93(0x98),_0x2e8b93(0x8e)+_0x529b73[_0x2e8b93(0x93)],undefined),_0x1fb718;}export async function createMenuEntity(_0x561fd9,_0x5e6ecc,_0x287092){const _0x314280=a145_0xa424;return createMenuRecord({'appCode':_0x561fd9,..._0x287092},_0x5e6ecc,_0x314280(0x8d)+_0x287092[_0x314280(0x93)]+'\x22');}export async function updateMenuEntity(_0x1c134c,_0x255981,_0x3c79b2){const _0x1efe18=a145_0xa424;return updateMenuRecord({'appCode':_0x1c134c,..._0x3c79b2},_0x255981,_0x1efe18(0x9e)+_0x3c79b2['id']);}export async function batchDeleteMenuEntities(_0xfaa046,_0xa56bb5){const _0x516850=a145_0xa424;return batchDeleteMenuRecords(_0xa56bb5,_0xfaa046,'Delete\x20'+_0xa56bb5[_0x516850(0x96)]+'\x20menu'+(_0xa56bb5['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x5f3818,_0x938667){const _0x3f0c7f=a145_0xa424;return a145_0x37cee4(_0x938667,_0x5f3818,_0x3f0c7f(0x9c)+_0x938667[_0x3f0c7f(0x7c)][_0x3f0c7f(0x96)]+'\x20menu\x20group(s)');}
1
+ (function(_0xbf1f4f,_0x4c5b4c){const _0x52c743=a145_0x43db,_0x6db1de=_0xbf1f4f();while(!![]){try{const _0x26ae3a=-parseInt(_0x52c743(0x101))/0x1*(-parseInt(_0x52c743(0xff))/0x2)+parseInt(_0x52c743(0x100))/0x3+-parseInt(_0x52c743(0xf1))/0x4+parseInt(_0x52c743(0xf6))/0x5*(-parseInt(_0x52c743(0x112))/0x6)+parseInt(_0x52c743(0x10f))/0x7+-parseInt(_0x52c743(0x10d))/0x8+-parseInt(_0x52c743(0xf2))/0x9;if(_0x26ae3a===_0x4c5b4c)break;else _0x6db1de['push'](_0x6db1de['shift']());}catch(_0x33d41c){_0x6db1de['push'](_0x6db1de['shift']());}}}(a145_0x3f91,0xcdb90));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 a145_0x544804,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x203136,_0x89d458){const _0x4fcecc=a145_0x43db,_0xa2b658=getEnv();logger['info'](_0x4fcecc(0x107),isProduction(_0xa2b658)?_0x4fcecc(0xfa)+_0x203136+')':_0x4fcecc(0x10b)+_0x203136+')');const _0x54ad77=await fetchMenuSnapshot(_0x203136,_0x89d458,{'verbose':!![]});return logger['info'](_0x4fcecc(0x107),_0x4fcecc(0x113)+_0x54ad77[_0x4fcecc(0xf3)]+_0x4fcecc(0x10c)),_0x54ad77[_0x4fcecc(0x106)][_0x4fcecc(0x115)](toProcessedMenuItem);}export async function createMenu(_0x44b8a6,_0xbca3a3,_0x11fa27){const _0x2e7e45=a145_0x43db;logger[_0x2e7e45(0xf4)](_0x2e7e45(0x111),_0x2e7e45(0x109)+_0x11fa27['label']+'\x20('+_0x11fa27[_0x2e7e45(0xfb)]+')');const _0x54a6d2={'appCode':_0x44b8a6,'type':_0x2e7e45(0x104),'sort':0x0,'extend':{'loadScriptMode':_0x2e7e45(0xf8),'resources':_0x11fa27[_0x2e7e45(0x103)]?JSON[_0x2e7e45(0x114)](_0x11fa27[_0x2e7e45(0x103)]):undefined},..._0x11fa27},_0x1b2078=await createMenuRecord(_0x54a6d2,_0xbca3a3,_0x2e7e45(0xef)+_0x11fa27[_0x2e7e45(0x105)]+'\x22');return logger[_0x2e7e45(0xf4)](_0x2e7e45(0x111),_0x2e7e45(0x108)+_0x11fa27[_0x2e7e45(0x105)]),_0x1b2078;}async function createSingleMenu(_0x2f5f54,_0x3fb37a,_0x6ea4f3,_0x313946){const _0x59f5d9=a145_0x43db,_0x28f93b={'appCode':_0x2f5f54,'type':_0x59f5d9(0x104),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x313946?JSON[_0x59f5d9(0x114)](_0x313946):undefined},'label':_0x6ea4f3[_0x59f5d9(0x105)],'path':_0x6ea4f3[_0x59f5d9(0xfb)]},_0x291ac8=await createMenuRecord(_0x28f93b,_0x3fb37a,_0x59f5d9(0xef)+_0x6ea4f3['label']+'\x22');return logger['info'](_0x59f5d9(0x111),_0x59f5d9(0x108)+_0x6ea4f3['label']),_0x291ac8;}export async function createMenus(_0x359147,_0x491e70,_0x488d91,_0x241ee3){const _0x46c6e3=a145_0x43db;logger[_0x46c6e3(0xf4)](_0x46c6e3(0xf5),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x488d91[_0x46c6e3(0xfe)]);const _0x3bf108=await Promise['all'](_0x488d91['map'](_0x5d95b7=>createSingleMenu(_0x359147,_0x491e70,_0x5d95b7,_0x241ee3)));return logger[_0x46c6e3(0xf4)](_0x46c6e3(0xf5),_0x46c6e3(0x102)+_0x488d91[_0x46c6e3(0xfe)]),_0x3bf108;}export async function updateMenuCdnUrl(_0x58a05c,_0x6a7930,_0x4d0082){const _0x7aa96f=a145_0x43db;logger[_0x7aa96f(0xf4)]('update-menu-cdn-url',_0x7aa96f(0xf7)+_0x4d0082[_0x7aa96f(0x105)]+'\x20('+_0x4d0082[_0x7aa96f(0xfb)]+')');const _0x2cfae6={'id':_0x4d0082['id'],'appCode':_0x58a05c,'extend':{..._0x4d0082[_0x7aa96f(0xee)]??{},..._0x4d0082[_0x7aa96f(0xf9)]?{'loadScriptMode':_0x4d0082['loadScriptMode']}:{},'resources':_0x4d0082[_0x7aa96f(0x103)]?JSON[_0x7aa96f(0x114)](_0x4d0082[_0x7aa96f(0x103)]):undefined}},_0x478e36=await updateMenuRecord(_0x2cfae6,_0x6a7930,_0x7aa96f(0xfd)+_0x4d0082['label']+'\x22');return logger[_0x7aa96f(0xf4)](_0x7aa96f(0x10a),_0x7aa96f(0xf0)+_0x4d0082[_0x7aa96f(0x105)],undefined),_0x478e36;}export async function createMenuEntity(_0x58a41c,_0x5c79fb,_0x4c5edd){const _0x65615c=a145_0x43db;return createMenuRecord({'appCode':_0x58a41c,..._0x4c5edd},_0x5c79fb,_0x65615c(0xef)+_0x4c5edd['label']+'\x22');}function a145_0x3f91(){const _0xf830c5=['create-menu','762UCcCvC','Fetched\x20','stringify','map','extend','Create\x20menu\x20\x22','Menu\x20assets\x20synced:\x20','4144016lRVApP','8588160nnAbZi','total','info','create-menus','1235PSprSx','Updating\x20menu\x20asset\x20links:\x20','import','loadScriptMode','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','path','Regroup\x20','Update\x20menu\x20assets\x20\x22','length','296966LdbWXD','3034815vdPdFo','7LbvppE','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','procode','label','menus','get-online-menu-list','Menu\x20created\x20successfully:\x20','Creating\x20menu:\x20','update-menu-cdn-url','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','\x20online\x20menus\x20successfully','3145576eUEAJp','Delete\x20','8445248cOwrGw','\x20menu'];a145_0x3f91=function(){return _0xf830c5;};return a145_0x3f91();}export async function updateMenuEntity(_0x8b8956,_0x533235,_0x567946){return updateMenuRecord({'appCode':_0x8b8956,..._0x567946},_0x533235,'Update\x20menu\x20'+_0x567946['id']);}function a145_0x43db(_0x1bb06,_0x1b108a){_0x1bb06=_0x1bb06-0xee;const _0x3f912e=a145_0x3f91();let _0x43db4a=_0x3f912e[_0x1bb06];return _0x43db4a;}export async function batchDeleteMenuEntities(_0x1ceb0b,_0x5853e8){const _0xd8fce9=a145_0x43db;return batchDeleteMenuRecords(_0x5853e8,_0x1ceb0b,_0xd8fce9(0x10e)+_0x5853e8['length']+_0xd8fce9(0x110)+(_0x5853e8['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x31776d,_0x39f61b){const _0x1f73c4=a145_0x43db;return a145_0x544804(_0x39f61b,_0x31776d,_0x1f73c4(0xfc)+_0x39f61b['menuGroups'][_0x1f73c4(0xfe)]+'\x20menu\x20group(s)');}
@@ -1 +1 @@
1
- const a146_0x677ef2=a146_0x1376;function a146_0x1376(_0x153a53,_0x39748d){_0x153a53=_0x153a53-0x94;const _0x260058=a146_0x2600();let _0x13768c=_0x260058[_0x153a53];return _0x13768c;}(function(_0x1ec6eb,_0x4a7203){const _0x2ebe4c=a146_0x1376,_0x973d8b=_0x1ec6eb();while(!![]){try{const _0x1d13f7=parseInt(_0x2ebe4c(0x97))/0x1+-parseInt(_0x2ebe4c(0xa9))/0x2*(parseInt(_0x2ebe4c(0x9e))/0x3)+-parseInt(_0x2ebe4c(0xb1))/0x4+-parseInt(_0x2ebe4c(0xa1))/0x5+parseInt(_0x2ebe4c(0xba))/0x6+parseInt(_0x2ebe4c(0xc1))/0x7+parseInt(_0x2ebe4c(0xaf))/0x8;if(_0x1d13f7===_0x4a7203)break;else _0x973d8b['push'](_0x973d8b['shift']());}catch(_0x52faf2){_0x973d8b['push'](_0x973d8b['shift']());}}}(a146_0x2600,0x44e9e));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(['jsUrl',a146_0x677ef2(0xb0)]);function validateParams(_0x43516d){const _0x17c132=a146_0x677ef2,_0x40050e=[];return _0x43516d[_0x17c132(0xb9)]&&!isValidJsHttpsUrl(_0x43516d['jsUrl'])&&_0x40050e['push']({'field':_0x17c132(0xb9),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x43516d[_0x17c132(0xb0)]&&!isValidCssHttpsUrl(_0x43516d[_0x17c132(0xb0)])&&_0x40050e['push']({'field':_0x17c132(0xb0),'message':_0x17c132(0xa8)}),_0x40050e;}export async function runMenuSyncCore(_0x3e8210,_0x616b6b,_0x2c993f=[],_0x4aa926,_0x3ffc86={}){const _0x3c6d7b=a146_0x677ef2,_0x3ce872=parseMenuSyncParams(_0x4aa926),_0x5ecb29=[...new Set(_0x2c993f[_0x3c6d7b(0xa3)](_0xe80b04=>_0xe80b04['trim']())['filter'](Boolean))],_0x27b3d5=_0x3ce872[_0x3c6d7b(0xb9)],_0x5e3be7=_0x3ce872['cssUrl'],_0x541fbd=[];if(_0x27b3d5)_0x541fbd[_0x3c6d7b(0x9f)](_0x27b3d5);if(_0x5e3be7)_0x541fbd[_0x3c6d7b(0x9f)](_0x5e3be7);const _0x5cf504=validateParams(_0x3ce872);if(_0x5cf504[_0x3c6d7b(0xa6)]>0x0){const _0x41df90=_0x5cf504[_0x3c6d7b(0xa3)](_0x3a59f3=>_0x3c6d7b(0xbb)+_0x3a59f3[_0x3c6d7b(0xbc)]+':\x20'+_0x3a59f3[_0x3c6d7b(0xc0)])[_0x3c6d7b(0xbd)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x41df90);}logger['setLogPath'](process[_0x3c6d7b(0xb3)]()),logger[_0x3c6d7b(0xa4)](_0x3c6d7b(0x96),_0x3c6d7b(0xc2),{'appCode':_0x3e8210,'selectedCount':_0x5ecb29[_0x3c6d7b(0xa6)],'jsUrl':_0x27b3d5,'cssUrl':_0x5e3be7});if(_0x27b3d5){const _0x2396e4=await isUrlReachable(_0x27b3d5);if(!_0x2396e4)throw new Error(_0x3c6d7b(0x9c)+_0x27b3d5);}if(_0x5e3be7){const _0x52acfb=await isUrlReachable(_0x5e3be7);if(!_0x52acfb)throw new Error(_0x3c6d7b(0xa5)+_0x5e3be7);}const _0x57ac20=getLocalPages();if(_0x57ac20[_0x3c6d7b(0xa6)]===0x0){if(_0x5ecb29[_0x3c6d7b(0xa6)]>0x0)throw new Error(_0x3c6d7b(0xa0)+_0x5ecb29[_0x3c6d7b(0xbd)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x3ffc86[_0x3c6d7b(0xae)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x323fcf=await getOnlineMenuList(_0x3e8210,_0x616b6b),_0x1a32e8=new Set(_0x323fcf[_0x3c6d7b(0xa3)](_0xa4e7bc=>_0xa4e7bc[_0x3c6d7b(0xb7)]));let _0x112f39;if(_0x5ecb29['length']>0x0){const _0x25da45=new Map(_0x57ac20[_0x3c6d7b(0xa3)](_0x2663e4=>[_0x2663e4['path'],_0x2663e4])),_0x5c55f6=_0x5ecb29[_0x3c6d7b(0xa2)](_0x5dc6dc=>!_0x25da45[_0x3c6d7b(0xb4)](_0x5dc6dc));if(_0x5c55f6['length']>0x0){const _0x2b73fc=_0x57ac20[_0x3c6d7b(0xa3)](_0x1dda15=>_0x1dda15[_0x3c6d7b(0xb7)])[_0x3c6d7b(0xbd)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x5c55f6[_0x3c6d7b(0xbd)](',\x20')+_0x3c6d7b(0xac)+_0x2b73fc);}const _0x5215ae=_0x5ecb29['filter'](_0x5eb2f3=>_0x1a32e8[_0x3c6d7b(0xb4)](_0x5eb2f3));if(_0x5215ae['length']>0x0)throw new Error(_0x3c6d7b(0xb6)+_0x5215ae[_0x3c6d7b(0xbd)](',\x20'));_0x112f39=_0x5ecb29[_0x3c6d7b(0xa3)](_0x24ab6c=>_0x25da45[_0x3c6d7b(0xa7)](_0x24ab6c));}else _0x112f39=_0x57ac20[_0x3c6d7b(0xa2)](_0x3dc3f1=>!_0x1a32e8[_0x3c6d7b(0xb4)](_0x3dc3f1[_0x3c6d7b(0xb7)]));if(_0x112f39[_0x3c6d7b(0xa6)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x3ffc86['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0xd95ef3=_0x112f39['map'](_0x42e386=>({'type':_0x3c6d7b(0x94),'path':_0x42e386[_0x3c6d7b(0xb7)],'label':_0x42e386[_0x3c6d7b(0xb8)],'loadScriptMode':_0x3c6d7b(0xb5),'resources':[..._0x541fbd]}));if(_0x3ffc86[_0x3c6d7b(0xae)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x112f39,'plannedMenus':_0xd95ef3};const _0x313ab9=await createMenus(_0x3e8210,_0x616b6b,_0x112f39,_0x541fbd[_0x3c6d7b(0xa6)]>0x0?_0x541fbd:undefined);return logger[_0x3c6d7b(0xa4)](_0x3c6d7b(0x96),_0x3c6d7b(0xab),{'count':_0x112f39['length'],'resources':_0x541fbd}),{'created':_0x313ab9[_0x3c6d7b(0xa6)],'skipped':![],'dryRun':![],'targetPages':_0x112f39,'plannedMenus':_0xd95ef3,'menus':_0x313ab9};}function a146_0x2600(){const _0x375a5f=['Invalid\x20--params\x20fields:\x20','1372197RFTUSo','push','No\x20local\x20pages\x20matched\x20paths:\x20','1986570oaBbBq','filter','map','info','CSS\x20URL\x20is\x20unreachable:\x20','length','get','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2eFkqrd','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','Menu\x20sync\x20completed','\x0a\x20\x20Available\x20local\x20paths:\x20','trim','dryRun','2474904bmifVf','cssUrl','1882176ldguvi','pages','cwd','has','import','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','path','label','jsUrl','3179472Lufavz','--params.','field','join','parse','string','message','1505252omBgCu','Start\x20non-interactive\x20menu\x20sync','procode','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','menu-sync','553216RATebF','Invalid\x20--params\x20JSON.','hasOwn',':\x20expected\x20a\x20non-empty\x20string.','object','JS\x20URL\x20is\x20unreachable:\x20'];a146_0x2600=function(){return _0x375a5f;};return a146_0x2600();}export function parseMenuSyncParams(_0x4db7e0){const _0x366141=a146_0x677ef2;if(!_0x4db7e0||typeof _0x4db7e0!=='string')return{};let _0x2cc686;try{_0x2cc686=JSON[_0x366141(0xbe)](_0x4db7e0);}catch{throw new Error(_0x366141(0x98));}if(typeof _0x2cc686!==_0x366141(0x9b)||_0x2cc686===null||Array['isArray'](_0x2cc686))throw new Error(_0x366141(0x95));const _0x12986f=_0x2cc686;if(Object[_0x366141(0x99)](_0x12986f,_0x366141(0xb2)))throw new Error(_0x366141(0xaa));const _0x28fd12=Object['keys'](_0x12986f)['filter'](_0x3b39cf=>!MENU_SYNC_PARAM_KEYS[_0x366141(0xb4)](_0x3b39cf));if(_0x28fd12[_0x366141(0xa6)]>0x0)throw new Error(_0x366141(0x9d)+_0x28fd12[_0x366141(0xbd)](',\x20')+'.');for(const _0x2a84bd of MENU_SYNC_PARAM_KEYS){const _0x194ccc=_0x12986f[_0x2a84bd];if(_0x194ccc!==undefined&&(typeof _0x194ccc!==_0x366141(0xbf)||_0x194ccc['trim']()===''))throw new Error('Invalid\x20--params.'+_0x2a84bd+_0x366141(0x9a));}return{'jsUrl':typeof _0x12986f[_0x366141(0xb9)]===_0x366141(0xbf)?_0x12986f[_0x366141(0xb9)][_0x366141(0xad)]():undefined,'cssUrl':typeof _0x12986f['cssUrl']===_0x366141(0xbf)?_0x12986f[_0x366141(0xb0)][_0x366141(0xad)]():undefined};}
1
+ function a146_0x3bb7(){const _0x4278c3=['116uNznLD','No\x20local\x20pages\x20matched\x20paths:\x20','2250117RrnsWR','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','CSS\x20URL\x20is\x20unreachable:\x20','filter','import','516344ArxGFO','length','2585808nRWZjn','dryRun','Start\x20non-interactive\x20menu\x20sync','JS\x20URL\x20is\x20unreachable:\x20','has','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','path','parse',':\x20expected\x20a\x20non-empty\x20string.','759390YrEIwd','join','Invalid\x20--params.','cssUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','hasOwn','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','procode','--params.','pages','2217GzeTxH','isArray','info','push','Invalid\x20--params\x20fields:\x20','message','trim','object','10TrNjlf','cwd','87661XNdDsz','Invalid\x20--params:\x20','jsUrl','597562IqnmwB','string'];a146_0x3bb7=function(){return _0x4278c3;};return a146_0x3bb7();}const a146_0x3052b0=a146_0x4c03;(function(_0x2fb214,_0x1aedce){const _0x38f59f=a146_0x4c03,_0x4b54ee=_0x2fb214();while(!![]){try{const _0x547fb7=parseInt(_0x38f59f(0xc5))/0x1*(-parseInt(_0x38f59f(0xc3))/0x2)+parseInt(_0x38f59f(0xbb))/0x3*(-parseInt(_0x38f59f(0xca))/0x4)+parseInt(_0x38f59f(0xb1))/0x5+parseInt(_0x38f59f(0xd4))/0x6+-parseInt(_0x38f59f(0xc8))/0x7+-parseInt(_0x38f59f(0xd2))/0x8+parseInt(_0x38f59f(0xcc))/0x9;if(_0x547fb7===_0x1aedce)break;else _0x4b54ee['push'](_0x4b54ee['shift']());}catch(_0x56405e){_0x4b54ee['push'](_0x4b54ee['shift']());}}}(a146_0x3bb7,0x367ee));function a146_0x4c03(_0x317389,_0x385eee){_0x317389=_0x317389-0xaa;const _0x3bb78f=a146_0x3bb7();let _0x4c032e=_0x3bb78f[_0x317389];return _0x4c032e;}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([a146_0x3052b0(0xc7),a146_0x3052b0(0xb4)]);function validateParams(_0x1fe99b){const _0x5799a3=a146_0x3052b0,_0xd9cb68=[];return _0x1fe99b['jsUrl']&&!isValidJsHttpsUrl(_0x1fe99b[_0x5799a3(0xc7)])&&_0xd9cb68['push']({'field':_0x5799a3(0xc7),'message':_0x5799a3(0xb5)}),_0x1fe99b[_0x5799a3(0xb4)]&&!isValidCssHttpsUrl(_0x1fe99b[_0x5799a3(0xb4)])&&_0xd9cb68['push']({'field':_0x5799a3(0xb4),'message':_0x5799a3(0xce)}),_0xd9cb68;}export async function runMenuSyncCore(_0x37e5f8,_0x29378d,_0x4ad5e8=[],_0x52f449,_0x3bbcd8={}){const _0x54475f=a146_0x3052b0,_0x2a509c=parseMenuSyncParams(_0x52f449),_0x3e53a5=[...new Set(_0x4ad5e8['map'](_0x127bb0=>_0x127bb0[_0x54475f(0xc1)]())[_0x54475f(0xd0)](Boolean))],_0x396c8d=_0x2a509c['jsUrl'],_0x57d508=_0x2a509c['cssUrl'],_0x3d96af=[];if(_0x396c8d)_0x3d96af['push'](_0x396c8d);if(_0x57d508)_0x3d96af[_0x54475f(0xbe)](_0x57d508);const _0x21079e=validateParams(_0x2a509c);if(_0x21079e[_0x54475f(0xd3)]>0x0){const _0x3baa5d=_0x21079e[_0x54475f(0xcd)](_0x12d332=>_0x54475f(0xb9)+_0x12d332['field']+':\x20'+_0x12d332[_0x54475f(0xc0)])[_0x54475f(0xb2)](';\x20');throw new Error(_0x54475f(0xc6)+_0x3baa5d);}logger['setLogPath'](process[_0x54475f(0xc4)]()),logger[_0x54475f(0xbd)]('menu-sync',_0x54475f(0xaa),{'appCode':_0x37e5f8,'selectedCount':_0x3e53a5[_0x54475f(0xd3)],'jsUrl':_0x396c8d,'cssUrl':_0x57d508});if(_0x396c8d){const _0x131d3c=await isUrlReachable(_0x396c8d);if(!_0x131d3c)throw new Error(_0x54475f(0xab)+_0x396c8d);}if(_0x57d508){const _0x5df0bb=await isUrlReachable(_0x57d508);if(!_0x5df0bb)throw new Error(_0x54475f(0xcf)+_0x57d508);}const _0x46aa24=getLocalPages();if(_0x46aa24[_0x54475f(0xd3)]===0x0){if(_0x3e53a5[_0x54475f(0xd3)]>0x0)throw new Error(_0x54475f(0xcb)+_0x3e53a5[_0x54475f(0xb2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x3bbcd8['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x33f5a2=await getOnlineMenuList(_0x37e5f8,_0x29378d),_0x2277bb=new Set(_0x33f5a2[_0x54475f(0xcd)](_0x46bab5=>_0x46bab5[_0x54475f(0xae)]));let _0x264a44;if(_0x3e53a5[_0x54475f(0xd3)]>0x0){const _0x39a596=new Map(_0x46aa24['map'](_0x40ca7f=>[_0x40ca7f['path'],_0x40ca7f])),_0x25ea58=_0x3e53a5['filter'](_0x23ad4f=>!_0x39a596[_0x54475f(0xac)](_0x23ad4f));if(_0x25ea58[_0x54475f(0xd3)]>0x0){const _0x155977=_0x46aa24[_0x54475f(0xcd)](_0x1b88c3=>_0x1b88c3[_0x54475f(0xae)])['join'](',\x20');throw new Error(_0x54475f(0xcb)+_0x25ea58[_0x54475f(0xb2)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x155977);}const _0x1f0ab2=_0x3e53a5[_0x54475f(0xd0)](_0x7e217=>_0x2277bb['has'](_0x7e217));if(_0x1f0ab2[_0x54475f(0xd3)]>0x0)throw new Error(_0x54475f(0xb7)+_0x1f0ab2[_0x54475f(0xb2)](',\x20'));_0x264a44=_0x3e53a5[_0x54475f(0xcd)](_0x2f0808=>_0x39a596['get'](_0x2f0808));}else _0x264a44=_0x46aa24[_0x54475f(0xd0)](_0x4314a8=>!_0x2277bb['has'](_0x4314a8[_0x54475f(0xae)]));if(_0x264a44[_0x54475f(0xd3)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x3bbcd8[_0x54475f(0xd5)]===!![],'targetPages':[],'plannedMenus':[]};const _0x2db3f1=_0x264a44[_0x54475f(0xcd)](_0x349a70=>({'type':_0x54475f(0xb8),'path':_0x349a70[_0x54475f(0xae)],'label':_0x349a70['label'],'loadScriptMode':_0x54475f(0xd1),'resources':[..._0x3d96af]}));if(_0x3bbcd8[_0x54475f(0xd5)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x264a44,'plannedMenus':_0x2db3f1};const _0x4f9848=await createMenus(_0x37e5f8,_0x29378d,_0x264a44,_0x3d96af[_0x54475f(0xd3)]>0x0?_0x3d96af:undefined);return logger[_0x54475f(0xbd)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x264a44['length'],'resources':_0x3d96af}),{'created':_0x4f9848[_0x54475f(0xd3)],'skipped':![],'dryRun':![],'targetPages':_0x264a44,'plannedMenus':_0x2db3f1,'menus':_0x4f9848};}export function parseMenuSyncParams(_0x88cd52){const _0x529645=a146_0x3052b0;if(!_0x88cd52||typeof _0x88cd52!==_0x529645(0xc9))return{};let _0xab9e32;try{_0xab9e32=JSON[_0x529645(0xaf)](_0x88cd52);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0xab9e32!==_0x529645(0xc2)||_0xab9e32===null||Array[_0x529645(0xbc)](_0xab9e32))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x1602c8=_0xab9e32;if(Object[_0x529645(0xb6)](_0x1602c8,_0x529645(0xba)))throw new Error(_0x529645(0xad));const _0x491c1f=Object['keys'](_0x1602c8)[_0x529645(0xd0)](_0x5a0c65=>!MENU_SYNC_PARAM_KEYS[_0x529645(0xac)](_0x5a0c65));if(_0x491c1f[_0x529645(0xd3)]>0x0)throw new Error(_0x529645(0xbf)+_0x491c1f['join'](',\x20')+'.');for(const _0x526be6 of MENU_SYNC_PARAM_KEYS){const _0x31f02f=_0x1602c8[_0x526be6];if(_0x31f02f!==undefined&&(typeof _0x31f02f!=='string'||_0x31f02f[_0x529645(0xc1)]()===''))throw new Error(_0x529645(0xb3)+_0x526be6+_0x529645(0xb0));}return{'jsUrl':typeof _0x1602c8[_0x529645(0xc7)]===_0x529645(0xc9)?_0x1602c8[_0x529645(0xc7)][_0x529645(0xc1)]():undefined,'cssUrl':typeof _0x1602c8[_0x529645(0xb4)]==='string'?_0x1602c8[_0x529645(0xb4)][_0x529645(0xc1)]():undefined};}
@@ -1 +1 @@
1
- (function(_0xaedfb3,_0x418b29){const _0x20ef4f=a148_0x456d,_0x1ab9a0=_0xaedfb3();while(!![]){try{const _0x8e6034=-parseInt(_0x20ef4f(0x1ae))/0x1+-parseInt(_0x20ef4f(0x19b))/0x2+-parseInt(_0x20ef4f(0x186))/0x3+-parseInt(_0x20ef4f(0x199))/0x4+-parseInt(_0x20ef4f(0x18f))/0x5+parseInt(_0x20ef4f(0x16e))/0x6*(parseInt(_0x20ef4f(0x196))/0x7)+parseInt(_0x20ef4f(0x195))/0x8;if(_0x8e6034===_0x418b29)break;else _0x1ab9a0['push'](_0x1ab9a0['shift']());}catch(_0x5bff5e){_0x1ab9a0['push'](_0x1ab9a0['shift']());}}}(a148_0x45e4,0xeaf0d));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a148_0x456d(_0x3dbe40,_0x454d8b){_0x3dbe40=_0x3dbe40-0x16a;const _0x45e465=a148_0x45e4();let _0x456d77=_0x45e465[_0x3dbe40];return _0x456d77;}import{logger}from'../../../utils/logger.js';function validateParams(_0x42e74d){const _0x269478=a148_0x456d,_0x4ec751=[];return _0x42e74d[_0x269478(0x1ad)]&&!isValidJsHttpsUrl(_0x42e74d[_0x269478(0x1ad)])&&_0x4ec751[_0x269478(0x191)]({'field':_0x269478(0x1ad),'message':_0x269478(0x179)}),_0x42e74d['cssUrl']&&!isValidCssHttpsUrl(_0x42e74d[_0x269478(0x177)])&&_0x4ec751['push']({'field':_0x269478(0x177),'message':_0x269478(0x17f)}),_0x4ec751;}export async function runMenuUpdateCore(_0x1139b1,_0x5a020c,_0x5d273c,_0x286fac={}){const _0x544457=a148_0x456d,_0x471731=parseUpdateParamsFlag(_0x5d273c),_0x1afd1f=normalizeMode(_0x286fac[_0x544457(0x18c)]);validateSelection(_0x286fac[_0x544457(0x188)]);const _0x188c5f=[];if(_0x471731[_0x544457(0x1ad)])_0x188c5f[_0x544457(0x191)](_0x471731[_0x544457(0x1ad)]);if(_0x471731[_0x544457(0x177)])_0x188c5f[_0x544457(0x191)](_0x471731['cssUrl']);const _0x204cae=validateParams(_0x471731);if(_0x204cae[_0x544457(0x17c)]>0x0){const _0x464641=_0x204cae[_0x544457(0x17d)](_0x2c382c=>_0x544457(0x193)+_0x2c382c['field']+':\x20'+_0x2c382c['message'])[_0x544457(0x19a)](';\x20');throw new Error(_0x544457(0x172)+_0x464641);}if(_0x188c5f[_0x544457(0x17c)]===0x0)throw new Error(_0x544457(0x183)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x544457(0x170)](process[_0x544457(0x1a9)]()),logger[_0x544457(0x16f)](_0x544457(0x197),_0x544457(0x16d),{'appCode':_0x1139b1,'jsUrl':_0x471731['jsUrl'],'cssUrl':_0x471731[_0x544457(0x177)],'mode':_0x1afd1f,'dryRun':_0x286fac[_0x544457(0x171)]===!![]});if(_0x471731[_0x544457(0x1ad)]){const _0x57e189=await isUrlReachable(_0x471731[_0x544457(0x1ad)]);if(!_0x57e189)throw new Error(_0x544457(0x1a3)+_0x471731[_0x544457(0x1ad)]);}if(_0x471731[_0x544457(0x177)]){const _0x16bb8f=await isUrlReachable(_0x471731[_0x544457(0x177)]);if(!_0x16bb8f)throw new Error(_0x544457(0x178)+_0x471731[_0x544457(0x177)]);}const _0x5fddf=await getOnlineMenuList(_0x1139b1,_0x5a020c),_0x474385=_0x5fddf[_0x544457(0x18b)](_0x38b9a9=>_0x38b9a9['resources'][_0x544457(0x17c)]>0x0),_0x51fb95=selectMenusForUpdate(_0x474385,_0x286fac[_0x544457(0x188)]);if(_0x51fb95[_0x544457(0x17c)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x286fac['dryRun']===!![]};const _0x497b22=_0x51fb95['map'](_0x16b673=>buildMenuUpdateDiff(_0x16b673,_0x471731,_0x1afd1f,_0x286fac[_0x544457(0x17e)]===!![],_0x286fac['loadScriptMode']));if(_0x286fac[_0x544457(0x171)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x497b22};const _0x337d8f=await Promise[_0x544457(0x16a)](_0x51fb95[_0x544457(0x17d)]((_0x1d13ff,_0x1d0b26)=>updateMenuCdnUrl(_0x1139b1,_0x5a020c,{'id':_0x1d13ff['id'],'label':_0x1d13ff[_0x544457(0x1aa)],'path':_0x1d13ff[_0x544457(0x180)],'resources':_0x497b22[_0x1d0b26][_0x544457(0x16c)][_0x544457(0x182)],'extend':_0x1d13ff[_0x544457(0x16b)]??null,'loadScriptMode':_0x286fac['loadScriptMode']}))),_0x935d08=_0x337d8f[_0x544457(0x18b)](_0x5419a5=>_0x5419a5[_0x544457(0x1a2)]===_0x544457(0x173))[_0x544457(0x17d)](_0x4e90e7=>_0x4e90e7[_0x544457(0x1a5)]),_0x2dc3c1=_0x337d8f[_0x544457(0x18b)](_0xe110aa=>_0xe110aa[_0x544457(0x1a2)]===_0x544457(0x19d))[_0x544457(0x17c)];return logger[_0x544457(0x16f)]('menu-asset-update',_0x544457(0x198),{'count':_0x51fb95[_0x544457(0x17c)],'resources':_0x188c5f}),{'updated':_0x935d08['length'],'failed':_0x2dc3c1,'skipped':![],'menus':_0x935d08};}function validateSelection(_0x48af6c){const _0x1ca1e1=a148_0x456d;if(!_0x48af6c)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x48af6c['all']&&(_0x48af6c[_0x1ca1e1(0x17b)][_0x1ca1e1(0x17c)]>0x0||_0x48af6c[_0x1ca1e1(0x1ac)]['length']>0x0))throw new Error(_0x1ca1e1(0x189));if(!_0x48af6c[_0x1ca1e1(0x1ab)]&&_0x48af6c[_0x1ca1e1(0x17b)][_0x1ca1e1(0x17c)]===0x0&&_0x48af6c['paths'][_0x1ca1e1(0x17c)]===0x0)throw new Error(_0x1ca1e1(0x19c));}export function selectMenusForUpdate(_0x55d86a,_0x4b3fec){const _0x8b6ef8=a148_0x456d;validateSelection(_0x4b3fec);if(_0x4b3fec['all'])return _0x55d86a;const _0x1bcb55=new Set(_0x55d86a[_0x8b6ef8(0x17d)](_0x3745a7=>_0x3745a7['id'])),_0x496daf=new Set(_0x55d86a[_0x8b6ef8(0x17d)](_0x5eff6e=>_0x5eff6e[_0x8b6ef8(0x180)])),_0x16f71f=_0x4b3fec[_0x8b6ef8(0x17b)][_0x8b6ef8(0x18b)](_0x4eaea3=>!_0x1bcb55['has'](_0x4eaea3)),_0x2c39d5=_0x4b3fec[_0x8b6ef8(0x1ac)]['filter'](_0x46426e=>!_0x496daf[_0x8b6ef8(0x18d)](_0x46426e));if(_0x16f71f['length']>0x0||_0x2c39d5['length']>0x0){const _0x378f6e=[..._0x16f71f[_0x8b6ef8(0x17d)](_0x2dcb5b=>String(_0x2dcb5b)),..._0x2c39d5]['join'](',\x20');throw new Error(_0x8b6ef8(0x18a)+_0x378f6e);}const _0x3a0b70=new Set(_0x4b3fec[_0x8b6ef8(0x17b)]),_0x1fb550=new Set(_0x4b3fec[_0x8b6ef8(0x1ac)]);return _0x55d86a[_0x8b6ef8(0x18b)](_0x3607fe=>_0x3a0b70['has'](_0x3607fe['id'])||_0x1fb550[_0x8b6ef8(0x18d)](_0x3607fe[_0x8b6ef8(0x180)]));}function normalizeMode(_0x2e5aae){const _0x57e57f=a148_0x456d;if(!_0x2e5aae)return _0x57e57f(0x18e);if(_0x2e5aae===_0x57e57f(0x1a4)||_0x2e5aae==='patch')return _0x2e5aae;throw new Error(_0x57e57f(0x19f)+_0x2e5aae+_0x57e57f(0x176));}function buildMenuUpdateDiff(_0x1e5c61,_0x30642b,_0x5c14eb,_0x410e2f,_0x400819){const _0x5f1ff8=a148_0x456d,_0x8e68e1=[..._0x1e5c61[_0x5f1ff8(0x182)]];_0x5c14eb===_0x5f1ff8(0x18e)&&assertUnambiguousPatchResources(_0x1e5c61,_0x8e68e1,_0x30642b);const _0x1081f6=_0x5c14eb==='patch'?patchResources(_0x8e68e1,_0x30642b):replaceResources(_0x30642b),_0x53c7fd=[],_0x376abe=_0x8e68e1[_0x5f1ff8(0x184)](isJsResource),_0x28987d=_0x1081f6[_0x5f1ff8(0x184)](isJsResource);if(_0x376abe&&!_0x28987d){const _0x1c5809=_0x5f1ff8(0x1a7)+_0x1e5c61[_0x5f1ff8(0x1aa)]+_0x5f1ff8(0x194)+_0x1e5c61[_0x5f1ff8(0x180)]+').\x20'+_0x5f1ff8(0x181);if(!_0x410e2f)throw new Error(_0x1c5809);_0x53c7fd['push'](_0x1c5809);}const _0x2a552b=_0x8e68e1[_0x5f1ff8(0x184)](isCssResource),_0x3768d9=_0x1081f6['some'](isCssResource);_0x2a552b&&!_0x3768d9&&_0x53c7fd[_0x5f1ff8(0x191)](_0x5f1ff8(0x17a)+_0x1e5c61['label']+_0x5f1ff8(0x194)+_0x1e5c61[_0x5f1ff8(0x180)]+').');const _0x55fe9a=typeof _0x1e5c61[_0x5f1ff8(0x16b)]?.['loadScriptMode']===_0x5f1ff8(0x1a1)?_0x1e5c61['extend'][_0x5f1ff8(0x174)]:null,_0x438200=_0x400819?{'loadScriptMode':_0x55fe9a}:{},_0x1a4f3e=_0x400819?{'loadScriptMode':_0x400819}:{};return{'id':_0x1e5c61['id'],'label':_0x1e5c61[_0x5f1ff8(0x1aa)],'path':_0x1e5c61[_0x5f1ff8(0x180)],'mode':_0x5c14eb,'before':{'resources':_0x8e68e1,..._0x438200},'after':{'resources':_0x1081f6,..._0x1a4f3e},'warnings':_0x53c7fd};}function replaceResources(_0x153aec){const _0x15652d=a148_0x456d;return[_0x153aec[_0x15652d(0x1ad)],_0x153aec['cssUrl']][_0x15652d(0x18b)](_0x5bd7c7=>!!_0x5bd7c7);}function assertUnambiguousPatchResources(_0x40148b,_0x37cb7e,_0xae8c48){const _0x32d28e=a148_0x456d,_0x2f53dc=_0x37cb7e[_0x32d28e(0x18b)](isJsResource)[_0x32d28e(0x17c)];if(_0xae8c48['jsUrl']&&_0x2f53dc>0x1)throw new Error(_0x32d28e(0x187)+_0x2f53dc+_0x32d28e(0x19e)+_0x40148b['label']+_0x32d28e(0x194)+_0x40148b[_0x32d28e(0x180)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x3a5e71=_0x37cb7e[_0x32d28e(0x18b)](isCssResource)[_0x32d28e(0x17c)];if(_0xae8c48[_0x32d28e(0x177)]&&_0x3a5e71>0x1)throw new Error(_0x32d28e(0x187)+_0x3a5e71+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x40148b[_0x32d28e(0x1aa)]+_0x32d28e(0x194)+_0x40148b['path']+')\x20'+_0x32d28e(0x1af));}function patchResources(_0x52b4a8,_0x927e2){const _0x182e6d=a148_0x456d;let _0x460b0c=![],_0x1d1e5c=![];const _0x47d122=[];for(const _0x2c4c45 of _0x52b4a8){if(isJsResource(_0x2c4c45)){if(_0x927e2[_0x182e6d(0x1ad)]&&!_0x460b0c)_0x47d122[_0x182e6d(0x191)](_0x927e2[_0x182e6d(0x1ad)]),_0x460b0c=!![];else!_0x927e2[_0x182e6d(0x1ad)]&&_0x47d122[_0x182e6d(0x191)](_0x2c4c45);continue;}if(isCssResource(_0x2c4c45)){if(_0x927e2['cssUrl']&&!_0x1d1e5c)_0x47d122[_0x182e6d(0x191)](_0x927e2[_0x182e6d(0x177)]),_0x1d1e5c=!![];else!_0x927e2[_0x182e6d(0x177)]&&_0x47d122['push'](_0x2c4c45);continue;}_0x47d122[_0x182e6d(0x191)](_0x2c4c45);}return _0x927e2[_0x182e6d(0x1ad)]&&!_0x460b0c&&_0x47d122[_0x182e6d(0x190)](_0x927e2[_0x182e6d(0x1ad)]),_0x927e2['cssUrl']&&!_0x1d1e5c&&_0x47d122[_0x182e6d(0x191)](_0x927e2[_0x182e6d(0x177)]),_0x47d122;}function a148_0x45e4(){const _0x1a5b5f=['6945312gEFpza','join','2854054XwMNbC','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','rejected','\x20existing\x20JS\x20resources\x20for\x20\x22','Invalid\x20--mode:\x20','.js','string','status','JS\x20URL\x20is\x20unreachable:\x20','replace','value','endsWith','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','toLowerCase','cwd','label','all','paths','jsUrl','462240FLpNZP','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','allSettled','extend','after','Start\x20non-interactive\x20menu\x20asset\x20update','1805388EStTSo','info','setLogPath','dryRun','Invalid\x20--params:\x20','fulfilled','loadScriptMode','object','.\x20Allowed\x20values:\x20replace,\x20patch','cssUrl','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menuIds','length','map','force','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','resources','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','some','isArray','3869124jLtWPZ','menu\x20asset-update\x20cannot\x20patch\x20','selection','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','filter','mode','has','patch','2860465FIvGeH','unshift','push','trim','--params.','\x22\x20(','49190520uodEHs','7AUNkDE','menu-asset-update','Menu\x20asset\x20update\x20completed'];a148_0x45e4=function(){return _0x1a5b5f;};return a148_0x45e4();}function isJsResource(_0x2aea66){const _0x7b4ae2=a148_0x456d;return stripQuery(_0x2aea66)[_0x7b4ae2(0x1a8)]()[_0x7b4ae2(0x1a6)](_0x7b4ae2(0x1a0));}function isCssResource(_0x560c69){const _0x31458f=a148_0x456d;return stripQuery(_0x560c69)[_0x31458f(0x1a8)]()['endsWith']('.css');}function stripQuery(_0xd56c2a){return _0xd56c2a['split']('?')[0x0]??_0xd56c2a;}function parseUpdateParamsFlag(_0x512735){const _0x20d3e9=a148_0x456d;if(!_0x512735||typeof _0x512735!==_0x20d3e9(0x1a1))return{};try{const _0x38321f=JSON['parse'](_0x512735);if(typeof _0x38321f!==_0x20d3e9(0x175)||_0x38321f===null||Array[_0x20d3e9(0x185)](_0x38321f))return{};return{'jsUrl':typeof _0x38321f[_0x20d3e9(0x1ad)]==='string'?_0x38321f['jsUrl']['trim']():undefined,'cssUrl':typeof _0x38321f[_0x20d3e9(0x177)]===_0x20d3e9(0x1a1)?_0x38321f[_0x20d3e9(0x177)][_0x20d3e9(0x192)]():undefined};}catch{return{};}}
1
+ (function(_0xe8d328,_0x58dd3b){const _0x510c65=a148_0x324b,_0x563f4a=_0xe8d328();while(!![]){try{const _0x31d20d=-parseInt(_0x510c65(0xc7))/0x1+-parseInt(_0x510c65(0xaf))/0x2+-parseInt(_0x510c65(0x97))/0x3*(-parseInt(_0x510c65(0x93))/0x4)+parseInt(_0x510c65(0xce))/0x5*(parseInt(_0x510c65(0x9e))/0x6)+-parseInt(_0x510c65(0xbb))/0x7*(parseInt(_0x510c65(0xa5))/0x8)+parseInt(_0x510c65(0xb0))/0x9+parseInt(_0x510c65(0xc0))/0xa;if(_0x31d20d===_0x58dd3b)break;else _0x563f4a['push'](_0x563f4a['shift']());}catch(_0x44e681){_0x563f4a['push'](_0x563f4a['shift']());}}}(a148_0x95ea,0xaea67));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(_0x36a0e4){const _0x5bbd74=a148_0x324b,_0x1f55b7=[];return _0x36a0e4[_0x5bbd74(0x9c)]&&!isValidJsHttpsUrl(_0x36a0e4[_0x5bbd74(0x9c)])&&_0x1f55b7[_0x5bbd74(0xbf)]({'field':_0x5bbd74(0x9c),'message':_0x5bbd74(0xb4)}),_0x36a0e4['cssUrl']&&!isValidCssHttpsUrl(_0x36a0e4[_0x5bbd74(0x9b)])&&_0x1f55b7['push']({'field':'cssUrl','message':_0x5bbd74(0xc9)}),_0x1f55b7;}export async function runMenuUpdateCore(_0x27af06,_0x3976bd,_0x1e99f4,_0xa6e424={}){const _0x57a962=a148_0x324b,_0x3bc2c7=parseUpdateParamsFlag(_0x1e99f4),_0x4b8cad=normalizeMode(_0xa6e424['mode']);validateSelection(_0xa6e424[_0x57a962(0x94)]);const _0x5c9f5d=[];if(_0x3bc2c7[_0x57a962(0x9c)])_0x5c9f5d[_0x57a962(0xbf)](_0x3bc2c7[_0x57a962(0x9c)]);if(_0x3bc2c7[_0x57a962(0x9b)])_0x5c9f5d['push'](_0x3bc2c7['cssUrl']);const _0x573f87=validateParams(_0x3bc2c7);if(_0x573f87[_0x57a962(0xcb)]>0x0){const _0x1f63ef=_0x573f87[_0x57a962(0xca)](_0x3804a0=>_0x57a962(0xbd)+_0x3804a0[_0x57a962(0xd0)]+':\x20'+_0x3804a0[_0x57a962(0xb5)])[_0x57a962(0x9a)](';\x20');throw new Error(_0x57a962(0xa6)+_0x1f63ef);}if(_0x5c9f5d[_0x57a962(0xcb)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x57a962(0xab)](process['cwd']()),logger['info'](_0x57a962(0xcf),_0x57a962(0xc4),{'appCode':_0x27af06,'jsUrl':_0x3bc2c7['jsUrl'],'cssUrl':_0x3bc2c7['cssUrl'],'mode':_0x4b8cad,'dryRun':_0xa6e424[_0x57a962(0xc2)]===!![]});if(_0x3bc2c7['jsUrl']){const _0x55d88d=await isUrlReachable(_0x3bc2c7[_0x57a962(0x9c)]);if(!_0x55d88d)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x3bc2c7['jsUrl']);}if(_0x3bc2c7[_0x57a962(0x9b)]){const _0x2e6103=await isUrlReachable(_0x3bc2c7[_0x57a962(0x9b)]);if(!_0x2e6103)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x3bc2c7[_0x57a962(0x9b)]);}const _0x4114d2=await getOnlineMenuList(_0x27af06,_0x3976bd),_0x326b3f=_0x4114d2[_0x57a962(0xba)](_0x596ffa=>_0x596ffa[_0x57a962(0xd1)]['length']>0x0),_0x98a17b=selectMenusForUpdate(_0x326b3f,_0xa6e424['selection']);if(_0x98a17b[_0x57a962(0xcb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0xa6e424['dryRun']===!![]};const _0x4c8dfd=_0x98a17b[_0x57a962(0xca)](_0x31bc2d=>buildMenuUpdateDiff(_0x31bc2d,_0x3bc2c7,_0x4b8cad,_0xa6e424[_0x57a962(0x9f)]===!![],_0xa6e424[_0x57a962(0xa1)]));if(_0xa6e424[_0x57a962(0xc2)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4c8dfd};const _0x3d0978=await Promise[_0x57a962(0xb2)](_0x98a17b[_0x57a962(0xca)]((_0x14b7ff,_0x1a6b0b)=>updateMenuCdnUrl(_0x27af06,_0x3976bd,{'id':_0x14b7ff['id'],'label':_0x14b7ff[_0x57a962(0x98)],'path':_0x14b7ff[_0x57a962(0xb6)],'resources':_0x4c8dfd[_0x1a6b0b][_0x57a962(0x95)][_0x57a962(0xd1)],'extend':_0x14b7ff['extend']??null,'loadScriptMode':_0xa6e424[_0x57a962(0xa1)]}))),_0x2f1808=_0x3d0978[_0x57a962(0xba)](_0x5279e1=>_0x5279e1[_0x57a962(0x92)]==='fulfilled')[_0x57a962(0xca)](_0x1d72ce=>_0x1d72ce['value']),_0x20eb3e=_0x3d0978['filter'](_0x2fd2e6=>_0x2fd2e6[_0x57a962(0x92)]===_0x57a962(0xc3))[_0x57a962(0xcb)];return logger[_0x57a962(0xc8)](_0x57a962(0xcf),'Menu\x20asset\x20update\x20completed',{'count':_0x98a17b['length'],'resources':_0x5c9f5d}),{'updated':_0x2f1808[_0x57a962(0xcb)],'failed':_0x20eb3e,'skipped':![],'menus':_0x2f1808};}function validateSelection(_0xf8e631){const _0x29b126=a148_0x324b;if(!_0xf8e631)throw new Error(_0x29b126(0xcd));if(_0xf8e631[_0x29b126(0xac)]&&(_0xf8e631[_0x29b126(0xb8)]['length']>0x0||_0xf8e631[_0x29b126(0xcc)][_0x29b126(0xcb)]>0x0))throw new Error(_0x29b126(0xc5));if(!_0xf8e631[_0x29b126(0xac)]&&_0xf8e631[_0x29b126(0xb8)][_0x29b126(0xcb)]===0x0&&_0xf8e631['paths']['length']===0x0)throw new Error(_0x29b126(0xcd));}export function selectMenusForUpdate(_0x4d35e7,_0x49e0e2){const _0x18e5ca=a148_0x324b;validateSelection(_0x49e0e2);if(_0x49e0e2[_0x18e5ca(0xac)])return _0x4d35e7;const _0x11902b=new Set(_0x4d35e7[_0x18e5ca(0xca)](_0x214ed2=>_0x214ed2['id'])),_0x1bcdfb=new Set(_0x4d35e7['map'](_0x5e3503=>_0x5e3503[_0x18e5ca(0xb6)])),_0x37d8d2=_0x49e0e2['menuIds'][_0x18e5ca(0xba)](_0x2aac79=>!_0x11902b[_0x18e5ca(0x96)](_0x2aac79)),_0xf8941c=_0x49e0e2[_0x18e5ca(0xcc)][_0x18e5ca(0xba)](_0x51baec=>!_0x1bcdfb[_0x18e5ca(0x96)](_0x51baec));if(_0x37d8d2[_0x18e5ca(0xcb)]>0x0||_0xf8941c[_0x18e5ca(0xcb)]>0x0){const _0x1b4f35=[..._0x37d8d2[_0x18e5ca(0xca)](_0x5e0ded=>String(_0x5e0ded)),..._0xf8941c]['join'](',\x20');throw new Error(_0x18e5ca(0xc6)+_0x1b4f35);}const _0x499f0b=new Set(_0x49e0e2[_0x18e5ca(0xb8)]),_0x23c6c8=new Set(_0x49e0e2[_0x18e5ca(0xcc)]);return _0x4d35e7[_0x18e5ca(0xba)](_0x2fb53e=>_0x499f0b['has'](_0x2fb53e['id'])||_0x23c6c8[_0x18e5ca(0x96)](_0x2fb53e[_0x18e5ca(0xb6)]));}function normalizeMode(_0x134016){const _0x21c8c0=a148_0x324b;if(!_0x134016)return _0x21c8c0(0xb9);if(_0x134016===_0x21c8c0(0xb7)||_0x134016===_0x21c8c0(0xb9))return _0x134016;throw new Error('Invalid\x20--mode:\x20'+_0x134016+_0x21c8c0(0xc1));}function a148_0x95ea(){const _0x58bf07=['55eIOvAh','menu-asset-update','field','resources','menu\x20asset-update\x20cannot\x20patch\x20','status','433572eyEUgJ','selection','after','has','18EfnmkT','label','.css','join','cssUrl','jsUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','161052SwRvQI','force','string','loadScriptMode','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','endsWith','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','8kECCeo','Invalid\x20--params:\x20','isArray','trim','\x22\x20(','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','setLogPath','all','extend','toLowerCase','1354718sKmZsr','4282191cnyPnf','some','allSettled','split','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','message','path','replace','menuIds','patch','filter','2590322UpJqlE',').\x20','--params.','\x20existing\x20CSS\x20resources\x20for\x20\x22','push','15472040eSRGqP','.\x20Allowed\x20values:\x20replace,\x20patch','dryRun','rejected','Start\x20non-interactive\x20menu\x20asset\x20update','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','1205851xsMBri','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','map','length','paths','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.'];a148_0x95ea=function(){return _0x58bf07;};return a148_0x95ea();}function buildMenuUpdateDiff(_0x2d0f8f,_0x12185c,_0x132939,_0x29b73a,_0x4d82db){const _0xa993b5=a148_0x324b,_0x1f61fa=[..._0x2d0f8f[_0xa993b5(0xd1)]];_0x132939==='patch'&&assertUnambiguousPatchResources(_0x2d0f8f,_0x1f61fa,_0x12185c);const _0x511da=_0x132939===_0xa993b5(0xb9)?patchResources(_0x1f61fa,_0x12185c):replaceResources(_0x12185c),_0x3c872b=[],_0x4fbe08=_0x1f61fa[_0xa993b5(0xb1)](isJsResource),_0xc866d7=_0x511da[_0xa993b5(0xb1)](isJsResource);if(_0x4fbe08&&!_0xc866d7){const _0x2f01a2='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x2d0f8f[_0xa993b5(0x98)]+'\x22\x20('+_0x2d0f8f['path']+_0xa993b5(0xbc)+_0xa993b5(0xa2);if(!_0x29b73a)throw new Error(_0x2f01a2);_0x3c872b['push'](_0x2f01a2);}const _0x4da7ef=_0x1f61fa[_0xa993b5(0xb1)](isCssResource),_0x4a5a10=_0x511da[_0xa993b5(0xb1)](isCssResource);_0x4da7ef&&!_0x4a5a10&&_0x3c872b[_0xa993b5(0xbf)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2d0f8f[_0xa993b5(0x98)]+_0xa993b5(0xa9)+_0x2d0f8f[_0xa993b5(0xb6)]+').');const _0x486b8e=typeof _0x2d0f8f['extend']?.[_0xa993b5(0xa1)]==='string'?_0x2d0f8f[_0xa993b5(0xad)]['loadScriptMode']:null,_0x15a305=_0x4d82db?{'loadScriptMode':_0x486b8e}:{},_0x5dfdbb=_0x4d82db?{'loadScriptMode':_0x4d82db}:{};return{'id':_0x2d0f8f['id'],'label':_0x2d0f8f[_0xa993b5(0x98)],'path':_0x2d0f8f[_0xa993b5(0xb6)],'mode':_0x132939,'before':{'resources':_0x1f61fa,..._0x15a305},'after':{'resources':_0x511da,..._0x5dfdbb},'warnings':_0x3c872b};}function replaceResources(_0x276bfb){const _0x58c725=a148_0x324b;return[_0x276bfb[_0x58c725(0x9c)],_0x276bfb['cssUrl']][_0x58c725(0xba)](_0xcbb716=>!!_0xcbb716);}function assertUnambiguousPatchResources(_0x1ee664,_0xc14448,_0x35f74e){const _0x946f90=a148_0x324b,_0x289611=_0xc14448[_0x946f90(0xba)](isJsResource)[_0x946f90(0xcb)];if(_0x35f74e[_0x946f90(0x9c)]&&_0x289611>0x1)throw new Error(_0x946f90(0xd2)+_0x289611+_0x946f90(0x9d)+_0x1ee664[_0x946f90(0x98)]+_0x946f90(0xa9)+_0x1ee664[_0x946f90(0xb6)]+')\x20'+_0x946f90(0xaa));const _0x406174=_0xc14448[_0x946f90(0xba)](isCssResource)[_0x946f90(0xcb)];if(_0x35f74e[_0x946f90(0x9b)]&&_0x406174>0x1)throw new Error(_0x946f90(0xd2)+_0x406174+_0x946f90(0xbe)+_0x1ee664[_0x946f90(0x98)]+_0x946f90(0xa9)+_0x1ee664[_0x946f90(0xb6)]+')\x20'+_0x946f90(0xa4));}function patchResources(_0x5c9a33,_0x2a93a9){const _0x1f81d8=a148_0x324b;let _0x33800=![],_0x3690b5=![];const _0x816e67=[];for(const _0x346b1e of _0x5c9a33){if(isJsResource(_0x346b1e)){if(_0x2a93a9[_0x1f81d8(0x9c)]&&!_0x33800)_0x816e67['push'](_0x2a93a9[_0x1f81d8(0x9c)]),_0x33800=!![];else!_0x2a93a9[_0x1f81d8(0x9c)]&&_0x816e67[_0x1f81d8(0xbf)](_0x346b1e);continue;}if(isCssResource(_0x346b1e)){if(_0x2a93a9[_0x1f81d8(0x9b)]&&!_0x3690b5)_0x816e67['push'](_0x2a93a9[_0x1f81d8(0x9b)]),_0x3690b5=!![];else!_0x2a93a9['cssUrl']&&_0x816e67[_0x1f81d8(0xbf)](_0x346b1e);continue;}_0x816e67['push'](_0x346b1e);}return _0x2a93a9[_0x1f81d8(0x9c)]&&!_0x33800&&_0x816e67['unshift'](_0x2a93a9[_0x1f81d8(0x9c)]),_0x2a93a9[_0x1f81d8(0x9b)]&&!_0x3690b5&&_0x816e67[_0x1f81d8(0xbf)](_0x2a93a9['cssUrl']),_0x816e67;}function isJsResource(_0x30d5a8){const _0x4dd95c=a148_0x324b;return stripQuery(_0x30d5a8)[_0x4dd95c(0xae)]()[_0x4dd95c(0xa3)]('.js');}function isCssResource(_0x272b94){const _0x1414c9=a148_0x324b;return stripQuery(_0x272b94)['toLowerCase']()[_0x1414c9(0xa3)](_0x1414c9(0x99));}function stripQuery(_0x35f997){const _0x2a0be6=a148_0x324b;return _0x35f997[_0x2a0be6(0xb3)]('?')[0x0]??_0x35f997;}function a148_0x324b(_0x1dc2e5,_0x585df3){_0x1dc2e5=_0x1dc2e5-0x92;const _0x95eabc=a148_0x95ea();let _0x324bc6=_0x95eabc[_0x1dc2e5];return _0x324bc6;}function parseUpdateParamsFlag(_0x4e27b0){const _0x2d8376=a148_0x324b;if(!_0x4e27b0||typeof _0x4e27b0!==_0x2d8376(0xa0))return{};try{const _0x151a4e=JSON['parse'](_0x4e27b0);if(typeof _0x151a4e!=='object'||_0x151a4e===null||Array[_0x2d8376(0xa7)](_0x151a4e))return{};return{'jsUrl':typeof _0x151a4e[_0x2d8376(0x9c)]==='string'?_0x151a4e['jsUrl']['trim']():undefined,'cssUrl':typeof _0x151a4e[_0x2d8376(0x9b)]===_0x2d8376(0xa0)?_0x151a4e[_0x2d8376(0x9b)][_0x2d8376(0xa8)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x4c6969,_0x1230ef){const _0x169da1=a149_0x55fa,_0x435843=_0x4c6969();while(!![]){try{const _0x3c2215=parseInt(_0x169da1(0x1d8))/0x1*(-parseInt(_0x169da1(0x1d6))/0x2)+parseInt(_0x169da1(0x1ce))/0x3+parseInt(_0x169da1(0x1cd))/0x4+parseInt(_0x169da1(0x1d2))/0x5*(-parseInt(_0x169da1(0x1cf))/0x6)+-parseInt(_0x169da1(0x1cc))/0x7*(-parseInt(_0x169da1(0x1d0))/0x8)+-parseInt(_0x169da1(0x1cb))/0x9*(parseInt(_0x169da1(0x1d5))/0xa)+parseInt(_0x169da1(0x1d4))/0xb*(parseInt(_0x169da1(0x1d1))/0xc);if(_0x3c2215===_0x1230ef)break;else _0x435843['push'](_0x435843['shift']());}catch(_0x24ba7a){_0x435843['push'](_0x435843['shift']());}}}(a149_0x4e5a,0x54062));export function isValidJsHttpsUrl(_0x39af00){const _0x5c927c=a149_0x55fa;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x39af00[_0x5c927c(0x1d3)]());}function a149_0x55fa(_0x537378,_0x4bef1d){_0x537378=_0x537378-0x1cb;const _0x4e5ab2=a149_0x4e5a();let _0x55fab6=_0x4e5ab2[_0x537378];return _0x55fab6;}export function isValidCssHttpsUrl(_0x44112d){const _0x5637cd=a149_0x55fa;return/^https:\/\/.+\.css(\?.*)?$/[_0x5637cd(0x1d7)](_0x44112d['trim']());}export async function isUrlReachable(_0x3907e3){try{const _0x574a5d=await fetch(_0x3907e3,{'method':'HEAD'});return _0x574a5d['ok'];}catch{return![];}}function a149_0x4e5a(){const _0x3a420c=['2274180noIUev','895ulZaoF','trim','33EjiUwV','11150OVEbqW','1204qeVwqN','test','469NNnfmz','3231GFQTWy','91CuFAWs','625808lwXKKu','1700184YDatCO','11466AtDitK','47464lWYpYe'];a149_0x4e5a=function(){return _0x3a420c;};return a149_0x4e5a();}
1
+ function a149_0x3577(){const _0x5600d1=['31256UTqvmE','HEAD','10PBOgGA','801693ksrHiw','4788745NGSObA','5322132uVcAIa','3NSJjbX','9157862GxZOei','104qoKzQG','test','7987529jmuueT','282IUcuuF','6oXRYtM','15242nakZVP'];a149_0x3577=function(){return _0x5600d1;};return a149_0x3577();}(function(_0x361165,_0x42780a){const _0x26898b=a149_0x1097,_0x35b963=_0x361165();while(!![]){try{const _0x1e9a10=parseInt(_0x26898b(0xa8))/0x1*(parseInt(_0x26898b(0xaf))/0x2)+-parseInt(_0x26898b(0xad))/0x3*(parseInt(_0x26898b(0xb0))/0x4)+parseInt(_0x26898b(0xa6))/0x5+parseInt(_0x26898b(0xae))/0x6*(parseInt(_0x26898b(0xa9))/0x7)+parseInt(_0x26898b(0xaa))/0x8*(-parseInt(_0x26898b(0xb3))/0x9)+parseInt(_0x26898b(0xb2))/0xa*(parseInt(_0x26898b(0xac))/0xb)+-parseInt(_0x26898b(0xa7))/0xc;if(_0x1e9a10===_0x42780a)break;else _0x35b963['push'](_0x35b963['shift']());}catch(_0x1fc85f){_0x35b963['push'](_0x35b963['shift']());}}}(a149_0x3577,0xa5c4d));export function isValidJsHttpsUrl(_0x5e80dc){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5e80dc['trim']());}export function isValidCssHttpsUrl(_0x16a0ee){const _0x2b76a9=a149_0x1097;return/^https:\/\/.+\.css(\?.*)?$/[_0x2b76a9(0xab)](_0x16a0ee['trim']());}function a149_0x1097(_0x4a4e9c,_0x3d1776){_0x4a4e9c=_0x4a4e9c-0xa6;const _0x357752=a149_0x3577();let _0x10978a=_0x357752[_0x4a4e9c];return _0x10978a;}export async function isUrlReachable(_0x2a301c){const _0x54b53a=a149_0x1097;try{const _0x28b9c2=await fetch(_0x2a301c,{'method':_0x54b53a(0xb1)});return _0x28b9c2['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a150_0x52c518=a150_0x1cbd;function a150_0x1da3(){const _0x140d4a=['string','onlineMenuList','jsUrl','appCode','18403QegTKb','2728336eCWQnN','yes','\x20menu(s)\x20with\x20JS:\x20','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','boolean','\x20\x20Continue\x20with\x20creation?','localPages','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','cookie','flag','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Fetching\x20online\x20menu\x20list...','gray','\x20menu(s)\x20created','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','806343dTdvWn','message','624588HnZACT','cssUrl','yellow','\x20created.','params','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20page(s)','/smartapi/menu/create','map','created','Pre-fill\x20JS/CSS\x20URLs.\x20','2LngYAX','size','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','length','str','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','menu','paths','\x20\x20Cancelled.','Menu\x20sync\x20skipped','validation','18024669ACxXZY','✓\x20Menu\x20sync\x20completed:\x20','sync','\x20local\x20microfrontend\x20menu(s).','Menu\x20creation\x20failed','Online\x20menu\x20list\x20fetched','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','1734ltNLfP','Created\x20','128350tuMEFl','Creating\x20','appcode','rawFlags','Menu\x20sync\x20completed:\x20','369938tBEXpB','\x20\x20Create\x20','\x20\x20✓\x20Selected:\x20','trim','\x20failed.','Would\x20create\x20','onlinePaths','targetPages','Failed\x20to\x20fetch\x20online\x20menu\x20list','selectedAppName'];a150_0x1da3=function(){return _0x140d4a;};return a150_0x1da3();}(function(_0xbeab7,_0xabfd79){const _0x5f2f23=a150_0x1cbd,_0x4a65a2=_0xbeab7();while(!![]){try{const _0x57d4aa=-parseInt(_0x5f2f23(0xd6))/0x1+-parseInt(_0x5f2f23(0x102))/0x2*(parseInt(_0x5f2f23(0xf5))/0x3)+parseInt(_0x5f2f23(0xf7))/0x4+-parseInt(_0x5f2f23(0xd1))/0x5+parseInt(_0x5f2f23(0xcf))/0x6*(-parseInt(_0x5f2f23(0xe4))/0x7)+-parseInt(_0x5f2f23(0xe5))/0x8+parseInt(_0x5f2f23(0xc8))/0x9;if(_0x57d4aa===_0xabfd79)break;else _0x4a65a2['push'](_0x4a65a2['shift']());}catch(_0x2d7e93){_0x4a65a2['push'](_0x4a65a2['shift']());}}}(a150_0x1da3,0x601cc));import a150_0x5c292d from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a150_0x1cbd(_0x40c8ae,_0x16a109){_0x40c8ae=_0x40c8ae-0xc1;const _0x1da3a4=a150_0x1da3();let _0x1cbdee=_0x1da3a4[_0x40c8ae];return _0x1cbdee;}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':a150_0x52c518(0xc3),'command':a150_0x52c518(0xca),'description':a150_0x52c518(0xfc),'risk':'write','flags':[{'name':a150_0x52c518(0xfb),'type':a150_0x52c518(0xe0),'description':a150_0x52c518(0x101)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a150_0x52c518(0xc4),'type':a150_0x52c518(0xe0),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a150_0x52c518(0xe6),'type':a150_0x52c518(0xea),'description':a150_0x52c518(0xf4)}],async 'dryRun'(_0x1e2e5a){const _0x297eed=a150_0x52c518;ensureRunnableContext(_0x1e2e5a[_0x297eed(0xd4)],_0x1e2e5a['selectedAppName']);const _0x431f81=await runMenuSyncCore(_0x1e2e5a[_0x297eed(0xe3)],_0x1e2e5a['cookie'],parsePaths(_0x1e2e5a[_0x297eed(0xc1)]('paths')),_0x1e2e5a[_0x297eed(0xc1)](_0x297eed(0xfb)),{'dryRun':!![]});return{'method':'POST','url':_0x297eed(0xfe),'body':_0x431f81,'description':_0x431f81[_0x297eed(0xe8)]?_0x297eed(0xc2):_0x297eed(0xdb)+_0x431f81[_0x297eed(0xdd)][_0x297eed(0x105)]+_0x297eed(0xcb)};},async 'execute'(_0x3c5c64){const _0x20bcb4=a150_0x52c518;ensureRunnableContext(_0x3c5c64[_0x20bcb4(0xd4)],_0x3c5c64[_0x20bcb4(0xdf)]);const _0x52ddac=_0x3c5c64[_0x20bcb4(0xef)](_0x20bcb4(0xe6)),_0x331efd=_0x3c5c64[_0x20bcb4(0xc1)](_0x20bcb4(0xfb)),_0x207129=parsePaths(_0x3c5c64[_0x20bcb4(0xc1)](_0x20bcb4(0xc4))),_0x424262=parseMenuSyncParams(_0x331efd);if(_0x52ddac){const _0x2dfae9=await runMenuSyncCore(_0x3c5c64['appCode'],_0x3c5c64[_0x20bcb4(0xee)],_0x207129,_0x331efd);if(_0x2dfae9[_0x20bcb4(0xe8)]){const _0x42bb03=getLocalPages();_0x42bb03[_0x20bcb4(0x105)]===0x0?writeCliSideChannelLine(_0x20bcb4(0xf0)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x20bcb4(0xc9)+_0x2dfae9[_0x20bcb4(0x100)]+_0x20bcb4(0xf3));return{'ok':!![],'data':_0x2dfae9,'message':_0x2dfae9[_0x20bcb4(0xe8)]?_0x20bcb4(0xc6):_0x20bcb4(0xd5)+_0x2dfae9[_0x20bcb4(0x100)]+_0x20bcb4(0xfa)};}if(_0x207129[_0x20bcb4(0x105)]>0x0)throw CliErrors[_0x20bcb4(0xc7)](_0x20bcb4(0xe9),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x331efd)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x20bcb4(0xed));requireInteractive();const _0x1d0170=startSpinner(_0x20bcb4(0xf1));let _0x53569a,_0xa4ab04,_0x3959ed;try{const _0x3ce03d=await fetchMenuData(_0x3c5c64[_0x20bcb4(0xe3)],_0x3c5c64[_0x20bcb4(0xee)]);_0x53569a=_0x3ce03d[_0x20bcb4(0xec)],_0xa4ab04=_0x3ce03d[_0x20bcb4(0xdc)],_0x3959ed=_0x3ce03d[_0x20bcb4(0xe1)],stopSpinner(_0x1d0170,_0x20bcb4(0xcd),!![]);}catch(_0x5e2262){stopSpinner(_0x1d0170,_0x20bcb4(0xde),![]);throw CliErrors[_0x20bcb4(0xc7)](_0x5e2262 instanceof Error?_0x5e2262[_0x20bcb4(0xf6)]:_0x20bcb4(0xde));}if(_0x53569a[_0x20bcb4(0x105)]===0x0)return writeCliSideChannelLine(a150_0x5c292d[_0x20bcb4(0xf9)](_0x20bcb4(0xce))),{'ok':!![]};const _0xfc4f0a=buildCompareRows(_0x53569a,_0xa4ab04);writeCliSideChannelLine(renderCompareTable(_0xfc4f0a)),writeCliSideChannelLine('');const _0x57a823=await selectPages(_0x53569a,_0xa4ab04);writeCliSideChannelLine(''),writeCliSideChannelLine(a150_0x5c292d['cyan'](_0x20bcb4(0xd8)+_0x57a823[_0x20bcb4(0x105)]+_0x20bcb4(0xfd)));const _0x63b4a7=_0x424262['jsUrl']&&_0x424262[_0x20bcb4(0xf8)];if(!_0x63b4a7){writeCliSideChannelLine(renderSyncSummary(_0x57a823,_0xa4ab04[_0x20bcb4(0x103)]>0x0));const _0x195bf2=await askConfirm(_0x20bcb4(0xeb));if(!_0x195bf2)return writeCliSideChannelLine(a150_0x5c292d[_0x20bcb4(0xf2)](_0x20bcb4(0xc5))),{'ok':!![]};}let _0x28dea4=_0x424262[_0x20bcb4(0xe2)],_0x373501=_0x424262['cssUrl'];!_0x28dea4&&(_0x28dea4=await askJsUrl());!_0x373501&&(_0x373501=await askCssUrl());const _0x55e90a=await askConfirm(_0x20bcb4(0xd7)+_0x57a823[_0x20bcb4(0x105)]+_0x20bcb4(0xe7)+_0x28dea4+'\x20and\x20CSS:\x20'+_0x373501+'?');if(!_0x55e90a)return writeCliSideChannelLine(a150_0x5c292d[_0x20bcb4(0xf2)](_0x20bcb4(0xc5))),{'ok':!![]};const _0x7d872c=[_0x28dea4,_0x373501],_0x2d7203=startSpinner(_0x20bcb4(0xd2)+_0x57a823[_0x20bcb4(0x105)]+'\x20menu(s)...');try{const _0x35d953=await doCreateMenus(_0x3c5c64[_0x20bcb4(0xe3)],_0x3c5c64['cookie'],_0x57a823,_0x7d872c);return stopSpinner(_0x2d7203,_0x20bcb4(0xd0)+_0x35d953[_0x20bcb4(0x100)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x35d953,'message':_0x20bcb4(0xd5)+_0x35d953[_0x20bcb4(0x100)]+'\x20created,\x20'+_0x35d953['failed']+_0x20bcb4(0xda)};}catch(_0x36db21){stopSpinner(_0x2d7203,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x20bcb4(0xc7)](_0x36db21 instanceof Error?_0x36db21[_0x20bcb4(0xf6)]:_0x20bcb4(0xcc));}}};function ensureRunnableContext(_0x30d9db,_0x1a737d){const _0x5001c6=a150_0x52c518,_0x47fd61=_0x30d9db['appcode']?String(_0x30d9db[_0x5001c6(0xd3)])['trim']():'';if(!isInProject()&&!_0x1a737d&&!_0x47fd61)throw CliErrors[_0x5001c6(0xc7)](_0x5001c6(0x104)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x5e0a36){const _0xc85e79=a150_0x52c518;return[...new Set(_0x5e0a36['split'](',')[_0xc85e79(0xff)](_0x54018c=>_0x54018c[_0xc85e79(0xd9)]())['filter'](Boolean))];}
1
+ function a150_0x3b6b(_0x28c3b3,_0x4890ec){_0x28c3b3=_0x28c3b3-0xc7;const _0x11be77=a150_0x11be();let _0x3b6b2d=_0x11be77[_0x28c3b3];return _0x3b6b2d;}const a150_0x571824=a150_0x3b6b;(function(_0x57a8d1,_0x5730e4){const _0x3c1085=a150_0x3b6b,_0x3907dd=_0x57a8d1();while(!![]){try{const _0x573785=-parseInt(_0x3c1085(0xcd))/0x1*(parseInt(_0x3c1085(0xfa))/0x2)+parseInt(_0x3c1085(0x102))/0x3*(parseInt(_0x3c1085(0xe3))/0x4)+parseInt(_0x3c1085(0x10c))/0x5*(parseInt(_0x3c1085(0xde))/0x6)+parseInt(_0x3c1085(0x109))/0x7+parseInt(_0x3c1085(0xdf))/0x8*(-parseInt(_0x3c1085(0xec))/0x9)+-parseInt(_0x3c1085(0xca))/0xa+-parseInt(_0x3c1085(0x104))/0xb*(-parseInt(_0x3c1085(0x103))/0xc);if(_0x573785===_0x5730e4)break;else _0x3907dd['push'](_0x3907dd['shift']());}catch(_0x5be0d3){_0x3907dd['push'](_0x3907dd['shift']());}}}(a150_0x11be,0x83374));import a150_0x2198d7 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';function a150_0x11be(){const _0x340290=['paths','43374PQpBdX','252RIJVbg','1034198BAnOiX','gray','yellow','Would\x20create\x20','yes','3159373lUjjWp','rawFlags','appCode','145880QuyiFh','\x20menu(s)\x20with\x20JS:\x20','Creating\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','skipped','validation','sync','Online\x20menu\x20list\x20fetched','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','5543510hLjeaj','\x20\x20Continue\x20with\x20creation?','str','366959dzVHVy','\x20\x20Cancelled.','cookie','split','message','boolean','created','\x20menu(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','size','failed','map','Menu\x20creation\x20failed','\x20menu(s)...','\x20and\x20CSS:\x20','Fetching\x20online\x20menu\x20list...','params','12lshaGa','8549384qfbuhZ','menu','\x20created.','trim','12MdBiMw','\x20menu(s)\x20created','\x20page(s)','onlinePaths','\x20local\x20microfrontend\x20menu(s).','localPages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','jsUrl','9AjoLmp','length','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20created,\x20','selectedAppName','\x20\x20✓\x20Selected:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','targetPages','Pre-fill\x20JS/CSS\x20URLs.\x20','Menu\x20sync\x20skipped','Sync\x20local\x20pages\x20as\x20platform\x20menus','appcode','Menu\x20sync\x20completed:\x20','2psSpVQ','cssUrl','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','cyan','\x20failed.','string','write'];a150_0x11be=function(){return _0x340290;};return a150_0x11be();}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a150_0x571824(0xe0),'command':a150_0x571824(0xc7),'description':a150_0x571824(0xf7),'risk':a150_0x571824(0x100),'flags':[{'name':'params','type':a150_0x571824(0xff),'description':a150_0x571824(0xf5)+a150_0x571824(0xd5)},{'name':a150_0x571824(0x101),'type':a150_0x571824(0xff),'description':a150_0x571824(0xee)},{'name':a150_0x571824(0x108),'type':a150_0x571824(0xd2),'description':a150_0x571824(0xe9)}],async 'dryRun'(_0x31b7c3){const _0x28811c=a150_0x571824;ensureRunnableContext(_0x31b7c3['rawFlags'],_0x31b7c3[_0x28811c(0xf0)]);const _0x4d062b=await runMenuSyncCore(_0x31b7c3[_0x28811c(0x10b)],_0x31b7c3['cookie'],parsePaths(_0x31b7c3[_0x28811c(0xcc)]('paths')),_0x31b7c3[_0x28811c(0xcc)](_0x28811c(0xdd)),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x4d062b,'description':_0x4d062b[_0x28811c(0x110)]?_0x28811c(0xf3):_0x28811c(0x107)+_0x4d062b[_0x28811c(0xf4)][_0x28811c(0xed)]+_0x28811c(0xe7)};},async 'execute'(_0xad9f0b){const _0x2c634c=a150_0x571824;ensureRunnableContext(_0xad9f0b[_0x2c634c(0x10a)],_0xad9f0b['selectedAppName']);const _0xc6f594=_0xad9f0b['flag'](_0x2c634c(0x108)),_0x44e152=_0xad9f0b[_0x2c634c(0xcc)]('params'),_0x416421=parsePaths(_0xad9f0b['str'](_0x2c634c(0x101))),_0x7929e8=parseMenuSyncParams(_0x44e152);if(_0xc6f594){const _0x2d9323=await runMenuSyncCore(_0xad9f0b['appCode'],_0xad9f0b[_0x2c634c(0xcf)],_0x416421,_0x44e152);if(_0x2d9323[_0x2c634c(0x110)]){const _0x4a8bc5=getLocalPages();_0x4a8bc5[_0x2c634c(0xed)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x2c634c(0xea));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x2d9323[_0x2c634c(0xd3)]+_0x2c634c(0xe4));return{'ok':!![],'data':_0x2d9323,'message':_0x2d9323[_0x2c634c(0x110)]?_0x2c634c(0xf6):'Menu\x20sync\x20completed:\x20'+_0x2d9323['created']+_0x2c634c(0xe1)};}if(_0x416421[_0x2c634c(0xed)]>0x0)throw CliErrors[_0x2c634c(0x111)](_0x2c634c(0xfc),_0x2c634c(0xc9));if(!isInteractive()&&_0x44e152)throw CliErrors[_0x2c634c(0x111)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x459d25=startSpinner(_0x2c634c(0xdc));let _0xf8c044,_0x3657ac,_0x168ad8;try{const _0x58ca22=await fetchMenuData(_0xad9f0b[_0x2c634c(0x10b)],_0xad9f0b[_0x2c634c(0xcf)]);_0xf8c044=_0x58ca22[_0x2c634c(0xe8)],_0x3657ac=_0x58ca22[_0x2c634c(0xe6)],_0x168ad8=_0x58ca22['onlineMenuList'],stopSpinner(_0x459d25,_0x2c634c(0xc8),!![]);}catch(_0x2ce7f7){stopSpinner(_0x459d25,_0x2c634c(0xf2),![]);throw CliErrors[_0x2c634c(0x111)](_0x2ce7f7 instanceof Error?_0x2ce7f7['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0xf8c044[_0x2c634c(0xed)]===0x0)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x106)](_0x2c634c(0x10f))),{'ok':!![]};const _0x4c2a0c=buildCompareRows(_0xf8c044,_0x3657ac);writeCliSideChannelLine(renderCompareTable(_0x4c2a0c)),writeCliSideChannelLine('');const _0x21bf97=await selectPages(_0xf8c044,_0x3657ac);writeCliSideChannelLine(''),writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0xfd)](_0x2c634c(0xf1)+_0x21bf97['length']+_0x2c634c(0xe5)));const _0x2edb41=_0x7929e8['jsUrl']&&_0x7929e8[_0x2c634c(0xfb)];if(!_0x2edb41){writeCliSideChannelLine(renderSyncSummary(_0x21bf97,_0x3657ac[_0x2c634c(0xd6)]>0x0));const _0x5968ce=await askConfirm(_0x2c634c(0xcb));if(!_0x5968ce)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x105)](_0x2c634c(0xce))),{'ok':!![]};}let _0x5ce829=_0x7929e8[_0x2c634c(0xeb)],_0x75108f=_0x7929e8[_0x2c634c(0xfb)];!_0x5ce829&&(_0x5ce829=await askJsUrl());!_0x75108f&&(_0x75108f=await askCssUrl());const _0x2fbc89=await askConfirm('\x20\x20Create\x20'+_0x21bf97[_0x2c634c(0xed)]+_0x2c634c(0x10d)+_0x5ce829+_0x2c634c(0xdb)+_0x75108f+'?');if(!_0x2fbc89)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x105)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x5d03d0=[_0x5ce829,_0x75108f],_0x12d1d5=startSpinner(_0x2c634c(0x10e)+_0x21bf97[_0x2c634c(0xed)]+_0x2c634c(0xda));try{const _0x1976ab=await doCreateMenus(_0xad9f0b[_0x2c634c(0x10b)],_0xad9f0b['cookie'],_0x21bf97,_0x5d03d0);return stopSpinner(_0x12d1d5,'Created\x20'+_0x1976ab['created']+_0x2c634c(0xd4),!![]),{'ok':!![],'data':_0x1976ab,'message':_0x2c634c(0xf9)+_0x1976ab[_0x2c634c(0xd3)]+_0x2c634c(0xef)+_0x1976ab[_0x2c634c(0xd7)]+_0x2c634c(0xfe)};}catch(_0x33afa2){stopSpinner(_0x12d1d5,_0x2c634c(0xd9),![]);throw CliErrors[_0x2c634c(0x111)](_0x33afa2 instanceof Error?_0x33afa2[_0x2c634c(0xd1)]:_0x2c634c(0xd9));}}};function ensureRunnableContext(_0x5c51a3,_0x76f5d2){const _0x2db984=a150_0x571824,_0x213a3e=_0x5c51a3[_0x2db984(0xf8)]?String(_0x5c51a3[_0x2db984(0xf8)])[_0x2db984(0xe2)]():'';if(!isInProject()&&!_0x76f5d2&&!_0x213a3e)throw CliErrors[_0x2db984(0x111)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x550a76){const _0xb20d8b=a150_0x571824;return[...new Set(_0x550a76[_0xb20d8b(0xd0)](',')[_0xb20d8b(0xd8)](_0x3c9747=>_0x3c9747[_0xb20d8b(0xe2)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- const a151_0x29aa84=a151_0x3ead;(function(_0x5eb295,_0x473481){const _0x4768da=a151_0x3ead,_0x409947=_0x5eb295();while(!![]){try{const _0x25d43c=parseInt(_0x4768da(0x1e6))/0x1+parseInt(_0x4768da(0x20b))/0x2+parseInt(_0x4768da(0x1cc))/0x3+-parseInt(_0x4768da(0x1ba))/0x4+-parseInt(_0x4768da(0x1b8))/0x5+parseInt(_0x4768da(0x1c6))/0x6+parseInt(_0x4768da(0x1e1))/0x7*(-parseInt(_0x4768da(0x1da))/0x8);if(_0x25d43c===_0x473481)break;else _0x409947['push'](_0x409947['shift']());}catch(_0x3b6df9){_0x409947['push'](_0x409947['shift']());}}}(a151_0x3f20,0xd5d43));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a151_0x3f20(){const _0x20ad89=['path','Response\x20was\x20lost\x20for\x20menu\x20','Updated\x20visibility\x20for\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','values','\x20menu(s);\x20skipped\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','menuIds','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','url','paths','false','resources','expectedCount','failed','1652152XPVimu','isArray','datasetId','expected-count','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','targets','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','childrenCount','message','Menu\x20path\x20selector\x20not\x20found:\x20','\x20failed.','str','verification','sort','menu\x20list','cookie','visibility-update','label','length','num','stringify','push','before','resourcesValid','update\x20visibility\x20for','pageId','\x20changed\x20unexpectedly.','\x20menu(s),\x20expected\x20','flagMissing','set','expect-visible','recovered','menus','menu','depth','rawFlags','map','705515wyVcrs','warnings','3537068sKdvVw','parentId','modelType','high-risk-write','has','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','plannedActions','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','plan','Menu\x20','10004850ktdMko','requestedVisible','\x20skipped,\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','appCode','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','3841581xjNMsk','get','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','validation','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','beforeById','childrenIds','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','expectVisible','/smartapi/menu/update','menu_expected_count_mismatch','Selected\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','2007336TdMnAD','byId','pageType','filter','hash','\x20updated,\x20','\x20unchanged\x20menu(s).','91oaQSSE','menu_verification_failed','join','update','\x20visibility\x20update\x20could\x20not\x20be\x20verified','1389056aqTNOU','verify\x20menu\x20visibility\x20update','update\x20menu\x20visibility','update-recovery','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','string','Would\x20update\x20visibility\x20for\x20','menu_state_drift','true','Requested\x20menu\x20visibility','code','rabetbase\x20menu\x20list\x20--format\x20compress','Menu\x20id\x20selector(s)\x20not\x20found:\x20','boolean','visible','trim','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','datasetCode','isSafeInteger','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','some'];a151_0x3f20=function(){return _0x20ad89;};return a151_0x3f20();}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':'POST','path':a151_0x29aa84(0x1d6)}];export const menuVisibilityUpdate={'service':a151_0x29aa84(0x1b4),'command':a151_0x29aa84(0x21c),'description':a151_0x29aa84(0x1d9),'risk':a151_0x29aa84(0x1bd),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a151_0x29aa84(0x1eb),'description':a151_0x29aa84(0x20f)},{'name':a151_0x29aa84(0x206),'type':'string','description':a151_0x29aa84(0x1c1)},{'name':'visible','type':a151_0x29aa84(0x1f3),'required':!![],'description':a151_0x29aa84(0x1ef)},{'name':a151_0x29aa84(0x1b1),'type':a151_0x29aa84(0x1f3),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a151_0x29aa84(0x20e),'type':'number','description':a151_0x29aa84(0x1c9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54f833){parseInput(_0x54f833),requireExplicitYes(_0x54f833);},async 'dryRun'(_0x5a175b){const _0x4a462c=a151_0x29aa84,_0x4a1d28=await buildPlan(_0x5a175b,!![]),_0x3520af=_0x4a1d28[_0x4a462c(0x1c4)][_0x4a462c(0x1c0)]?.[_0x4a462c(0x21e)]??0x0,_0xe7ae8e=_0x4a1d28['plan'][_0x4a462c(0x211)][_0x4a462c(0x21e)]-_0x3520af;return menuDryRunResult(_0x4a1d28[_0x4a462c(0x1c4)],{'method':'POST','url':_0x4a462c(0x1d6),'body':{'updates':_0x4a1d28[_0x4a462c(0x1c4)][_0x4a462c(0x1c0)]?.['map'](_0x5f1f4f=>_0x5f1f4f['body'])??[]},'description':_0x4a462c(0x1ec)+_0x3520af+'\x20menu(s);\x20skip\x20'+_0xe7ae8e+_0x4a462c(0x1e0)});},async 'execute'(_0x535b85){const _0x1fbcfa=a151_0x29aa84;requireExplicitYes(_0x535b85);const _0x4c2e0e=await buildPlan(_0x535b85,![]);await recheckMutationSnapshot(_0x535b85,_0x4c2e0e['plan'],_0x1fbcfa(0x1e8));const _0x1bd56b=[],_0xb40818=[],_0x56b59f=[];for(const _0xe547bf of _0x4c2e0e['plan'][_0x1fbcfa(0x211)]){if(_0xe547bf[_0x1fbcfa(0x222)][_0x1fbcfa(0x1f4)]===_0x4c2e0e[_0x1fbcfa(0x1c4)][_0x1fbcfa(0x1c7)]){_0x1bd56b[_0x1fbcfa(0x221)]({'id':_0xe547bf['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x535b85['appCode'],_0x535b85[_0x1fbcfa(0x21b)],{'id':_0xe547bf['id'],'visible':_0x4c2e0e[_0x1fbcfa(0x1c4)][_0x1fbcfa(0x1c7)]}),_0x1bd56b[_0x1fbcfa(0x221)]({'id':_0xe547bf['id'],'updated':!![],'skipped':![]});}catch(_0x5ba58c){const _0x3de4a1=mapMenuApiError(_0x5ba58c,_0x1fbcfa(0x1ab),_0xe547bf['id']);if(isMenuResponseLoss(_0x5ba58c)&&_0x3de4a1[_0x1fbcfa(0x1f0)]!=='menu_permission_denied'){_0x56b59f[_0x1fbcfa(0x221)](_0xe547bf['id']);continue;}_0xb40818[_0x1fbcfa(0x221)]({'id':_0xe547bf['id'],'stage':_0x1fbcfa(0x1e4),'code':_0x3de4a1['code'],'message':_0x3de4a1['message']});}}let _0xb1217c;try{_0xb1217c=await fetchMenuSnapshot(_0x535b85[_0x1fbcfa(0x1ca)],_0x535b85[_0x1fbcfa(0x21b)]);}catch(_0xf939d9){const _0x23048d=describeMenuErrorCause(_0xf939d9,_0x1fbcfa(0x1e7)),_0x59c389=_0x56b59f[_0x1fbcfa(0x1b7)](_0x8fad7b=>({'id':_0x8fad7b,'stage':'update-recovery','code':_0x1fbcfa(0x1e2),'message':_0x1fbcfa(0x1fd)+_0x8fad7b+_0x1fbcfa(0x204),'requestedStateConfirmed':![],'recovered':![]})),_0x2e67c0={'stage':_0x1fbcfa(0x218),'code':_0x1fbcfa(0x1e2),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x4c2e0e[_0x1fbcfa(0x1c4)][_0x1fbcfa(0x211)]['map'](_0x37622c=>_0x37622c['id']),'requestedStateConfirmed':![],..._0x23048d};throw menuFailure(asVerificationError(_0xf939d9,_0x1fbcfa(0x1cb)),_0x4c2e0e['plan'],{'stage':_0x1fbcfa(0x218),'succeeded':_0x1bd56b,'failedRecords':[..._0xb40818,..._0x59c389,_0x2e67c0],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1fbcfa(0x20a),'recoveredCount':0x0,'lookupCommand':_0x1fbcfa(0x1f1)}});}const _0x283cbf=[];for(const _0x1e0e7a of _0x1bd56b){const _0x48c8ae=Number(_0x1e0e7a['id']),_0x313704=_0x4c2e0e[_0x1fbcfa(0x1d2)][_0x1fbcfa(0x1cd)](_0x48c8ae),_0x27c847=_0xb1217c[_0x1fbcfa(0x1db)][_0x1fbcfa(0x1cd)](_0x48c8ae);try{verifyVisibilityUpdate(_0x313704,_0x27c847,_0x4c2e0e[_0x1fbcfa(0x1c4)][_0x1fbcfa(0x1c7)]);}catch(_0x593e39){const _0xd607b=asVerificationError(_0x593e39,_0x1fbcfa(0x1c5)+_0x48c8ae+_0x1fbcfa(0x1e5));_0x283cbf[_0x1fbcfa(0x221)]({'id':_0x48c8ae,'stage':_0x1fbcfa(0x218),'code':_0xd607b[_0x1fbcfa(0x1f0)],'message':_0xd607b[_0x1fbcfa(0x214)],'requestedStateConfirmed':![]});}}for(const _0x2ec1c4 of _0x56b59f){const _0x21e6b8=_0x4c2e0e[_0x1fbcfa(0x1d2)][_0x1fbcfa(0x1cd)](_0x2ec1c4),_0x2c2593=_0xb1217c[_0x1fbcfa(0x1db)][_0x1fbcfa(0x1cd)](_0x2ec1c4);try{verifyVisibilityUpdate(_0x21e6b8,_0x2c2593,_0x4c2e0e['plan'][_0x1fbcfa(0x1c7)]),_0x1bd56b[_0x1fbcfa(0x221)]({'id':_0x2ec1c4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1021d4){const _0x197696=asVerificationError(_0x1021d4,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2ec1c4+_0x1fbcfa(0x1ce));_0x283cbf[_0x1fbcfa(0x221)]({'id':_0x2ec1c4,'stage':_0x1fbcfa(0x1e9),'code':_0x197696[_0x1fbcfa(0x1f0)],'message':_0x197696[_0x1fbcfa(0x214)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x283cbf[_0x1fbcfa(0x21e)]>0x0){const _0x2c56dc=_0x283cbf[_0x1fbcfa(0x1b7)](_0x470606=>Number(_0x470606['id'])),_0x5bca1b=_0x1bd56b[_0x1fbcfa(0x1dd)](_0x2c8d25=>_0x2c8d25[_0x1fbcfa(0x1b2)]===!![])['length'],_0x17e27d=menuError(_0x1fbcfa(0x1e2),_0x1fbcfa(0x1ea)+_0x2c56dc['join'](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x17e27d,_0x4c2e0e[_0x1fbcfa(0x1c4)],{'stage':_0x1fbcfa(0x218),'succeeded':_0x1bd56b,'failedRecords':[..._0xb40818,..._0x283cbf],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1fbcfa(0x20a),..._0x2c56dc[_0x1fbcfa(0x21e)]===0x1?{'targetId':_0x2c56dc[0x0]}:{'targetIds':_0x2c56dc},'recoveredCount':_0x5bca1b,'lookupCommand':_0x1fbcfa(0x1f1)}});}const _0x5c3aa9=_0x1bd56b[_0x1fbcfa(0x1dd)](_0xfe1321=>_0xfe1321['updated']===!![])[_0x1fbcfa(0x21e)],_0x1a00ab=_0x1bd56b[_0x1fbcfa(0x21e)]-_0x5c3aa9,_0x316fce={..._0x4c2e0e[_0x1fbcfa(0x1c4)],'succeeded':_0x1bd56b,'failed':_0xb40818,'warnings':_0xb40818[_0x1fbcfa(0x21e)]>0x0?[..._0x4c2e0e['plan']['warnings'],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x4c2e0e[_0x1fbcfa(0x1c4)][_0x1fbcfa(0x1b9)],'verification':{'checkedBy':_0x1fbcfa(0x21a),'snapshotHash':_0xb1217c['hash'],'matchesRequestedState':_0xb40818[_0x1fbcfa(0x21e)]===0x0,'recoveredCount':_0x56b59f[_0x1fbcfa(0x21e)]}};return{'ok':_0xb40818[_0x1fbcfa(0x21e)]===0x0,'data':_0x316fce,'message':_0xb40818[_0x1fbcfa(0x21e)]===0x0?_0x1fbcfa(0x1fe)+_0x5c3aa9+_0x1fbcfa(0x201)+_0x1a00ab+'\x20unchanged\x20menu(s).':'Menu\x20visibility\x20update\x20completed:\x20'+_0x5c3aa9+_0x1fbcfa(0x1df)+_0x1a00ab+_0x1fbcfa(0x1c8)+_0xb40818['length']+_0x1fbcfa(0x216)};}};function parseInput(_0x47be77){const _0x3832ce=a151_0x29aa84,_0x294803=parseMenuIds(_0x47be77['str']('menu-ids')),_0x3337d2=parseCsv(_0x47be77[_0x3832ce(0x217)]('paths'));if(_0x294803[_0x3832ce(0x21e)]===0x0&&_0x3337d2[_0x3832ce(0x21e)]===0x0)throw CliErrors[_0x3832ce(0x1d0)](_0x3832ce(0x1f9));const _0x4feaff=parseBooleanFlag(_0x47be77,_0x3832ce(0x1f4),!![]),_0x4ec312=parseBooleanFlag(_0x47be77,_0x3832ce(0x1b1),![]);let _0x31c2b8;if(hasFlag(_0x47be77,_0x3832ce(0x20e))){_0x31c2b8=_0x47be77[_0x3832ce(0x21f)](_0x3832ce(0x20e));if(!Number[_0x3832ce(0x1f8)](_0x31c2b8)||_0x31c2b8<0x0)throw CliErrors[_0x3832ce(0x1d0)](_0x3832ce(0x210));}return{'menuIds':_0x294803,'paths':_0x3337d2,'visible':_0x4feaff,'expectVisible':_0x4ec312,'expectedCount':_0x31c2b8};}function a151_0x3ead(_0x40deb4,_0xa0b0b2){_0x40deb4=_0x40deb4-0x1ab;const _0x3f2032=a151_0x3f20();let _0x3ead64=_0x3f2032[_0x40deb4];return _0x3ead64;}async function buildPlan(_0x4707e9,_0x2d1fa5){const _0x5ba2ae=a151_0x29aa84,_0x1a0e01=parseInput(_0x4707e9),_0x53bf91=await fetchMutationSnapshot(_0x4707e9,_0x5ba2ae(0x1e8)),_0x31e723=selectTargets(_0x53bf91[_0x5ba2ae(0x1b3)],_0x1a0e01['menuIds'],_0x1a0e01[_0x5ba2ae(0x206)]);if(_0x1a0e01[_0x5ba2ae(0x209)]!==undefined&&_0x31e723['length']!==_0x1a0e01[_0x5ba2ae(0x209)])throw menuError(_0x5ba2ae(0x1d7),_0x5ba2ae(0x1d8)+_0x31e723[_0x5ba2ae(0x21e)]+_0x5ba2ae(0x1ae)+_0x1a0e01[_0x5ba2ae(0x209)]+'.',_0x5ba2ae(0x1bf));if(_0x1a0e01[_0x5ba2ae(0x1d5)]!==undefined){const _0x555bd7=_0x31e723[_0x5ba2ae(0x1dd)](_0x5568bf=>_0x5568bf[_0x5ba2ae(0x1f4)]!==_0x1a0e01[_0x5ba2ae(0x1d5)]);if(_0x555bd7[_0x5ba2ae(0x21e)]>0x0)throw menuError(_0x5ba2ae(0x1ed),_0x5ba2ae(0x1ff)+_0x555bd7[_0x5ba2ae(0x1b7)](_0x3bd133=>_0x3bd133['id'])[_0x5ba2ae(0x1e3)](',\x20')+'.',_0x5ba2ae(0x1c3));}const _0x372a47=_0x31e723[_0x5ba2ae(0x1b7)](_0x4867d4=>({'id':_0x4867d4['id'],'label':_0x4867d4['label'],'path':_0x4867d4[_0x5ba2ae(0x1fc)],'before':{'visible':_0x4867d4[_0x5ba2ae(0x1f4)]},'after':{'visible':_0x1a0e01['visible']}})),_0x24d98=_0x372a47[_0x5ba2ae(0x1dd)](_0x3ab1d7=>_0x3ab1d7['before'][_0x5ba2ae(0x1f4)]!==_0x1a0e01[_0x5ba2ae(0x1f4)])[_0x5ba2ae(0x1b7)](_0x4bb6fb=>({'stage':'update-menu-visibility','method':'POST','path':_0x5ba2ae(0x1d6),'body':{'appCode':_0x4707e9[_0x5ba2ae(0x1ca)],'id':_0x4bb6fb['id'],'visible':_0x1a0e01['visible']}})),_0x25ecef=mutationResult({'operation':_0x5ba2ae(0x21c),'selector':{'menuIds':_0x1a0e01[_0x5ba2ae(0x203)],'paths':_0x1a0e01[_0x5ba2ae(0x206)]},'before':{'menus':_0x31e723[_0x5ba2ae(0x1b7)](_0x4223da=>({'id':_0x4223da['id'],'path':_0x4223da[_0x5ba2ae(0x1fc)],'visible':_0x4223da[_0x5ba2ae(0x1f4)]}))},'after':{'menus':_0x31e723['map'](_0x1fab14=>({'id':_0x1fab14['id'],'path':_0x1fab14[_0x5ba2ae(0x1fc)],'visible':_0x1a0e01[_0x5ba2ae(0x1f4)]}))},'dryRun':_0x2d1fa5,'backend':[...BACKEND],'plannedActions':_0x24d98,'snapshotHash':_0x53bf91[_0x5ba2ae(0x1de)],'warnings':_0x24d98[_0x5ba2ae(0x21e)]===0x0?[_0x5ba2ae(0x1f6)]:[]});return{'plan':{..._0x25ecef,'requestedVisible':_0x1a0e01[_0x5ba2ae(0x1f4)],'targets':_0x372a47},'beforeById':new Map(_0x31e723[_0x5ba2ae(0x1b7)](_0x32a9b4=>[_0x32a9b4['id'],_0x32a9b4]))};}function selectTargets(_0x1e2ef0,_0x5424e5,_0x4295f0){const _0x333b06=a151_0x29aa84,_0x2a6aba=new Map(_0x1e2ef0[_0x333b06(0x1b7)](_0x36435d=>[_0x36435d['id'],_0x36435d])),_0x365793=new Map(),_0x5a465d=_0x5424e5['filter'](_0x59ba7f=>!_0x2a6aba[_0x333b06(0x1be)](_0x59ba7f));if(_0x5a465d[_0x333b06(0x21e)]>0x0)throw menuError('menu_selector_not_found',_0x333b06(0x1f2)+_0x5a465d[_0x333b06(0x1e3)](',\x20')+'.',_0x333b06(0x1cf));for(const _0x434e4c of _0x5424e5){_0x365793['set'](_0x434e4c,_0x2a6aba['get'](_0x434e4c));}for(const _0x59f2a1 of _0x4295f0){const _0x7e9e16=_0x1e2ef0[_0x333b06(0x1dd)](_0x523892=>_0x523892[_0x333b06(0x1fc)]===_0x59f2a1);if(_0x7e9e16['length']===0x0)throw menuError('menu_selector_not_found',_0x333b06(0x215)+JSON[_0x333b06(0x220)](_0x59f2a1)+'.',_0x333b06(0x1fa));if(_0x7e9e16[_0x333b06(0x21e)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x333b06(0x220)](_0x59f2a1)+'.',_0x333b06(0x202)+_0x7e9e16[_0x333b06(0x1b7)](_0x24e5ab=>_0x24e5ab['id'])[_0x333b06(0x1e3)](',\x20')+'.');const _0x158879=_0x7e9e16[0x0];_0x365793[_0x333b06(0x1b0)](_0x158879['id'],_0x158879);}return[..._0x365793[_0x333b06(0x200)]()];}function parseMenuIds(_0x2c319c){const _0x33db51=a151_0x29aa84,_0x2d0a16=parseCsv(_0x2c319c),_0x44a1e2=_0x2d0a16[_0x33db51(0x1b7)](Number);if(_0x44a1e2[_0x33db51(0x1fb)](_0x4891fa=>!Number[_0x33db51(0x1f8)](_0x4891fa)||_0x4891fa<=0x0))throw CliErrors['validation'](_0x33db51(0x212));return[...new Set(_0x44a1e2)];}function parseCsv(_0x1c17e5){const _0x455d60=a151_0x29aa84;return[...new Set(_0x1c17e5['split'](',')[_0x455d60(0x1b7)](_0x61efec=>_0x61efec[_0x455d60(0x1f5)]())['filter'](Boolean))];}function parseBooleanFlag(_0x44e35a,_0x31168c,_0x146562){const _0x4b0c36=a151_0x29aa84;if(!hasFlag(_0x44e35a,_0x31168c)){if(_0x146562)throw CliErrors[_0x4b0c36(0x1af)](_0x31168c);return undefined;}const _0x5cf7ab=_0x44e35a[_0x4b0c36(0x1b6)][_0x31168c];if(_0x5cf7ab===!![]||_0x5cf7ab===![])return _0x5cf7ab;if(_0x5cf7ab===_0x4b0c36(0x1ee))return!![];if(_0x5cf7ab===_0x4b0c36(0x207))return![];throw CliErrors[_0x4b0c36(0x1d0)]('--'+_0x31168c+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x900bb3,_0x105c1c,_0x228f1e){const _0x28096c=a151_0x29aa84;assertVerified(!!_0x105c1c,_0x28096c(0x1c5)+_0x900bb3['id']+_0x28096c(0x1d1)),assertVerified(_0x105c1c[_0x28096c(0x1f4)]===_0x228f1e,_0x28096c(0x1c5)+_0x900bb3['id']+_0x28096c(0x1d4));const _0x440aed=[['id',_0x105c1c['id'],_0x900bb3['id']],[_0x28096c(0x1bb),_0x105c1c[_0x28096c(0x1bb)],_0x900bb3[_0x28096c(0x1bb)]],[_0x28096c(0x1b5),_0x105c1c['depth'],_0x900bb3[_0x28096c(0x1b5)]],[_0x28096c(0x21d),_0x105c1c['label'],_0x900bb3[_0x28096c(0x21d)]],[_0x28096c(0x1fc),_0x105c1c[_0x28096c(0x1fc)],_0x900bb3[_0x28096c(0x1fc)]],['url',_0x105c1c[_0x28096c(0x205)],_0x900bb3['url']],[_0x28096c(0x1c2),_0x105c1c[_0x28096c(0x1c2)],_0x900bb3[_0x28096c(0x1c2)]],['sort',_0x105c1c[_0x28096c(0x219)],_0x900bb3[_0x28096c(0x219)]],[_0x28096c(0x208),_0x105c1c['resources'],_0x900bb3[_0x28096c(0x208)]],[_0x28096c(0x223),_0x105c1c[_0x28096c(0x223)],_0x900bb3[_0x28096c(0x223)]],[_0x28096c(0x1d3),_0x105c1c[_0x28096c(0x1d3)],_0x900bb3[_0x28096c(0x1d3)]],[_0x28096c(0x213),_0x105c1c[_0x28096c(0x213)],_0x900bb3[_0x28096c(0x213)]],[_0x28096c(0x1ac),_0x105c1c[_0x28096c(0x1ac)],_0x900bb3[_0x28096c(0x1ac)]],[_0x28096c(0x1dc),_0x105c1c[_0x28096c(0x1dc)],_0x900bb3[_0x28096c(0x1dc)]],[_0x28096c(0x1bc),_0x105c1c[_0x28096c(0x1bc)],_0x900bb3[_0x28096c(0x1bc)]],['datasetId',_0x105c1c[_0x28096c(0x20d)],_0x900bb3['datasetId']],[_0x28096c(0x1f7),_0x105c1c[_0x28096c(0x1f7)],_0x900bb3[_0x28096c(0x1f7)]]];for(const [_0x12337c,_0x114603,_0x1c8d99]of _0x440aed){assertVerified(sameValue(_0x114603,_0x1c8d99),_0x28096c(0x1c5)+_0x900bb3['id']+'\x20'+_0x12337c+_0x28096c(0x1ad));}}function sameValue(_0x43c633,_0x1b74ab){const _0x1d83ae=a151_0x29aa84;if(Array[_0x1d83ae(0x20c)](_0x43c633)||Array[_0x1d83ae(0x20c)](_0x1b74ab))return JSON[_0x1d83ae(0x220)](_0x43c633)===JSON[_0x1d83ae(0x220)](_0x1b74ab);return _0x43c633===_0x1b74ab;}
1
+ const a151_0x1434c8=a151_0x355f;(function(_0x4ba6b9,_0x5ca7d7){const _0x343ee3=a151_0x355f,_0x191e3f=_0x4ba6b9();while(!![]){try{const _0x162cd1=-parseInt(_0x343ee3(0x113))/0x1+parseInt(_0x343ee3(0x149))/0x2+parseInt(_0x343ee3(0x155))/0x3+parseInt(_0x343ee3(0x14f))/0x4+parseInt(_0x343ee3(0x15f))/0x5*(-parseInt(_0x343ee3(0x176))/0x6)+parseInt(_0x343ee3(0x172))/0x7*(parseInt(_0x343ee3(0x10f))/0x8)+parseInt(_0x343ee3(0x108))/0x9*(-parseInt(_0x343ee3(0x17a))/0xa);if(_0x162cd1===_0x5ca7d7)break;else _0x191e3f['push'](_0x191e3f['shift']());}catch(_0x2b3aef){_0x191e3f['push'](_0x191e3f['shift']());}}}(a151_0x2188,0xd41d9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a151_0x1434c8(0x132)}];export const menuVisibilityUpdate={'service':a151_0x1434c8(0x17d),'command':a151_0x1434c8(0x11d),'description':a151_0x1434c8(0x119),'risk':a151_0x1434c8(0x12b),'structuredErrors':!![],'flags':[{'name':a151_0x1434c8(0x163),'type':a151_0x1434c8(0x12a),'description':a151_0x1434c8(0x16a)},{'name':'paths','type':'string','description':a151_0x1434c8(0x17e)},{'name':a151_0x1434c8(0x150),'type':a151_0x1434c8(0x16c),'required':!![],'description':a151_0x1434c8(0x153)},{'name':a151_0x1434c8(0x130),'type':a151_0x1434c8(0x16c),'description':a151_0x1434c8(0x14c)},{'name':'expected-count','type':a151_0x1434c8(0x16e),'description':a151_0x1434c8(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x319ceb){parseInput(_0x319ceb),requireExplicitYes(_0x319ceb);},async 'dryRun'(_0x110529){const _0x3d838b=a151_0x1434c8,_0x84a1e=await buildPlan(_0x110529,!![]),_0x5266c4=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x178)]?.[_0x3d838b(0x15d)]??0x0,_0x67d16e=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x13f)][_0x3d838b(0x15d)]-_0x5266c4;return menuDryRunResult(_0x84a1e[_0x3d838b(0x114)],{'method':'POST','url':_0x3d838b(0x132),'body':{'updates':_0x84a1e['plan'][_0x3d838b(0x178)]?.[_0x3d838b(0x117)](_0x149785=>_0x149785[_0x3d838b(0x14e)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x5266c4+_0x3d838b(0x11a)+_0x67d16e+_0x3d838b(0x164)});},async 'execute'(_0xebb376){const _0xfe707f=a151_0x1434c8;requireExplicitYes(_0xebb376);const _0x435fa2=await buildPlan(_0xebb376,![]);await recheckMutationSnapshot(_0xebb376,_0x435fa2['plan'],_0xfe707f(0x122));const _0x452750=[],_0x57f931=[],_0x4abcf5=[];for(const _0x5ce168 of _0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x13f)]){if(_0x5ce168[_0xfe707f(0x10e)]['visible']===_0x435fa2['plan']['requestedVisible']){_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)],{'id':_0x5ce168['id'],'visible':_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]}),_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':!![],'skipped':![]});}catch(_0x37aea2){const _0x1e7d21=mapMenuApiError(_0x37aea2,'update\x20visibility\x20for',_0x5ce168['id']);if(isMenuResponseLoss(_0x37aea2)&&_0x1e7d21['code']!=='menu_permission_denied'){_0x4abcf5[_0xfe707f(0x156)](_0x5ce168['id']);continue;}_0x57f931['push']({'id':_0x5ce168['id'],'stage':_0xfe707f(0x112),'code':_0x1e7d21['code'],'message':_0x1e7d21['message']});}}let _0x529aa0;try{_0x529aa0=await fetchMenuSnapshot(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)]);}catch(_0x538f9d){const _0x4dd1dc=describeMenuErrorCause(_0x538f9d,'verify\x20menu\x20visibility\x20update'),_0x2b72d2=_0x4abcf5[_0xfe707f(0x117)](_0x153f8f=>({'id':_0x153f8f,'stage':_0xfe707f(0x175),'code':_0xfe707f(0x135),'message':_0xfe707f(0x13d)+_0x153f8f+_0xfe707f(0x134),'requestedStateConfirmed':![],'recovered':![]})),_0x3709b3={'stage':'verification','code':_0xfe707f(0x135),'message':_0xfe707f(0x17b),'targetIds':_0x435fa2[_0xfe707f(0x114)]['targets']['map'](_0x5b9fb2=>_0x5b9fb2['id']),'requestedStateConfirmed':![],..._0x4dd1dc};throw menuFailure(asVerificationError(_0x538f9d,_0xfe707f(0x13a)),_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x2b72d2,_0x3709b3],'warnings':[_0xfe707f(0x157)],'verification':{'status':_0xfe707f(0x15c),'recoveredCount':0x0,'lookupCommand':_0xfe707f(0x127)}});}const _0x4e7dbc=[];for(const _0x2d7757 of _0x452750){const _0x5b4d8a=Number(_0x2d7757['id']),_0x554253=_0x435fa2[_0xfe707f(0x161)][_0xfe707f(0x123)](_0x5b4d8a),_0x1e32d5=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5b4d8a);try{verifyVisibilityUpdate(_0x554253,_0x1e32d5,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]);}catch(_0x1e7e54){const _0xfc31b7=asVerificationError(_0x1e7e54,_0xfe707f(0x11b)+_0x5b4d8a+_0xfe707f(0x115));_0x4e7dbc['push']({'id':_0x5b4d8a,'stage':_0xfe707f(0x14b),'code':_0xfc31b7[_0xfe707f(0x148)],'message':_0xfc31b7[_0xfe707f(0x160)],'requestedStateConfirmed':![]});}}for(const _0x5c4a90 of _0x4abcf5){const _0x212cc0=_0x435fa2[_0xfe707f(0x161)]['get'](_0x5c4a90),_0x1f43ff=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5c4a90);try{verifyVisibilityUpdate(_0x212cc0,_0x1f43ff,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]),_0x452750[_0xfe707f(0x156)]({'id':_0x5c4a90,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3205d6){const _0x3cd0b1=asVerificationError(_0x3205d6,_0xfe707f(0x14d)+_0x5c4a90+_0xfe707f(0x17f));_0x4e7dbc[_0xfe707f(0x156)]({'id':_0x5c4a90,'stage':_0xfe707f(0x175),'code':_0x3cd0b1[_0xfe707f(0x148)],'message':_0x3cd0b1[_0xfe707f(0x160)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4e7dbc[_0xfe707f(0x15d)]>0x0){const _0x1c0284=_0x4e7dbc[_0xfe707f(0x117)](_0x445425=>Number(_0x445425['id'])),_0x53b08a=_0x452750[_0xfe707f(0x15a)](_0x32ec10=>_0x32ec10['recovered']===!![])[_0xfe707f(0x15d)],_0x1521d2=menuError(_0xfe707f(0x135),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1c0284[_0xfe707f(0x12c)](',\x20')+'.',_0xfe707f(0x179));throw menuFailure(_0x1521d2,_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x4e7dbc],'warnings':[_0xfe707f(0x131)],'verification':{'status':_0xfe707f(0x15c),..._0x1c0284['length']===0x1?{'targetId':_0x1c0284[0x0]}:{'targetIds':_0x1c0284},'recoveredCount':_0x53b08a,'lookupCommand':_0xfe707f(0x127)}});}const _0x2085fb=_0x452750[_0xfe707f(0x15a)](_0x4df252=>_0x4df252['updated']===!![])['length'],_0x1ab325=_0x452750[_0xfe707f(0x15d)]-_0x2085fb,_0x3cf9f2={..._0x435fa2[_0xfe707f(0x114)],'succeeded':_0x452750,'failed':_0x57f931,'warnings':_0x57f931[_0xfe707f(0x15d)]>0x0?[..._0x435fa2['plan'][_0xfe707f(0x133)],_0xfe707f(0x10a)]:_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x133)],'verification':{'checkedBy':_0xfe707f(0x181),'snapshotHash':_0x529aa0['hash'],'matchesRequestedState':_0x57f931[_0xfe707f(0x15d)]===0x0,'recoveredCount':_0x4abcf5[_0xfe707f(0x15d)]}};return{'ok':_0x57f931[_0xfe707f(0x15d)]===0x0,'data':_0x3cf9f2,'message':_0x57f931[_0xfe707f(0x15d)]===0x0?_0xfe707f(0x12e)+_0x2085fb+_0xfe707f(0x15e)+_0x1ab325+_0xfe707f(0x164):'Menu\x20visibility\x20update\x20completed:\x20'+_0x2085fb+'\x20updated,\x20'+_0x1ab325+_0xfe707f(0x11e)+_0x57f931[_0xfe707f(0x15d)]+_0xfe707f(0x173)};}};function a151_0x355f(_0x1b78ad,_0x35c544){_0x1b78ad=_0x1b78ad-0x107;const _0x218845=a151_0x2188();let _0x355fff=_0x218845[_0x1b78ad];return _0x355fff;}function parseInput(_0x3d6962){const _0x511761=a151_0x1434c8,_0x2789c0=parseMenuIds(_0x3d6962['str'](_0x511761(0x163))),_0x4e8ead=parseCsv(_0x3d6962[_0x511761(0x12d)]('paths'));if(_0x2789c0[_0x511761(0x15d)]===0x0&&_0x4e8ead[_0x511761(0x15d)]===0x0)throw CliErrors[_0x511761(0x10b)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x3cf9ea=parseBooleanFlag(_0x3d6962,_0x511761(0x150),!![]),_0xab8bea=parseBooleanFlag(_0x3d6962,_0x511761(0x130),![]);let _0xa39c74;if(hasFlag(_0x3d6962,_0x511761(0x15b))){_0xa39c74=_0x3d6962[_0x511761(0x167)](_0x511761(0x15b));if(!Number[_0x511761(0x10c)](_0xa39c74)||_0xa39c74<0x0)throw CliErrors['validation'](_0x511761(0x11f));}return{'menuIds':_0x2789c0,'paths':_0x4e8ead,'visible':_0x3cf9ea,'expectVisible':_0xab8bea,'expectedCount':_0xa39c74};}async function buildPlan(_0x371710,_0x1c8fbf){const _0x5a0067=a151_0x1434c8,_0x2b7e91=parseInput(_0x371710),_0x180275=await fetchMutationSnapshot(_0x371710,_0x5a0067(0x122)),_0x2c930d=selectTargets(_0x180275[_0x5a0067(0x107)],_0x2b7e91[_0x5a0067(0x125)],_0x2b7e91[_0x5a0067(0x144)]);if(_0x2b7e91['expectedCount']!==undefined&&_0x2c930d['length']!==_0x2b7e91[_0x5a0067(0x169)])throw menuError('menu_expected_count_mismatch','Selected\x20'+_0x2c930d['length']+_0x5a0067(0x128)+_0x2b7e91['expectedCount']+'.',_0x5a0067(0x109));if(_0x2b7e91[_0x5a0067(0x120)]!==undefined){const _0x2a836d=_0x2c930d[_0x5a0067(0x15a)](_0x6753c9=>_0x6753c9[_0x5a0067(0x150)]!==_0x2b7e91[_0x5a0067(0x120)]);if(_0x2a836d[_0x5a0067(0x15d)]>0x0)throw menuError(_0x5a0067(0x126),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2a836d[_0x5a0067(0x117)](_0x5e6dee=>_0x5e6dee['id'])[_0x5a0067(0x12c)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x237198=_0x2c930d[_0x5a0067(0x117)](_0x3096fb=>({'id':_0x3096fb['id'],'label':_0x3096fb[_0x5a0067(0x111)],'path':_0x3096fb[_0x5a0067(0x12f)],'before':{'visible':_0x3096fb[_0x5a0067(0x150)]},'after':{'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x4e24bf=_0x237198[_0x5a0067(0x15a)](_0x27d004=>_0x27d004[_0x5a0067(0x10e)]['visible']!==_0x2b7e91[_0x5a0067(0x150)])[_0x5a0067(0x117)](_0xe48776=>({'stage':_0x5a0067(0x14a),'method':_0x5a0067(0x13b),'path':_0x5a0067(0x132),'body':{'appCode':_0x371710['appCode'],'id':_0xe48776['id'],'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x52fff6=mutationResult({'operation':_0x5a0067(0x11d),'selector':{'menuIds':_0x2b7e91['menuIds'],'paths':_0x2b7e91[_0x5a0067(0x144)]},'before':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x1c64ff=>({'id':_0x1c64ff['id'],'path':_0x1c64ff[_0x5a0067(0x12f)],'visible':_0x1c64ff[_0x5a0067(0x150)]}))},'after':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x3ef778=>({'id':_0x3ef778['id'],'path':_0x3ef778['path'],'visible':_0x2b7e91[_0x5a0067(0x150)]}))},'dryRun':_0x1c8fbf,'backend':[...BACKEND],'plannedActions':_0x4e24bf,'snapshotHash':_0x180275[_0x5a0067(0x138)],'warnings':_0x4e24bf['length']===0x0?[_0x5a0067(0x118)]:[]});return{'plan':{..._0x52fff6,'requestedVisible':_0x2b7e91[_0x5a0067(0x150)],'targets':_0x237198},'beforeById':new Map(_0x2c930d['map'](_0x1e82e0=>[_0x1e82e0['id'],_0x1e82e0]))};}function selectTargets(_0x1b9fea,_0x3a840e,_0x1b1934){const _0x2a85cb=a151_0x1434c8,_0x18e524=new Map(_0x1b9fea[_0x2a85cb(0x117)](_0xde8168=>[_0xde8168['id'],_0xde8168])),_0x31d170=new Map(),_0x55f879=_0x3a840e[_0x2a85cb(0x15a)](_0xa7d43d=>!_0x18e524[_0x2a85cb(0x139)](_0xa7d43d));if(_0x55f879[_0x2a85cb(0x15d)]>0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x158)+_0x55f879[_0x2a85cb(0x12c)](',\x20')+'.',_0x2a85cb(0x143));for(const _0x388315 of _0x3a840e){_0x31d170[_0x2a85cb(0x141)](_0x388315,_0x18e524['get'](_0x388315));}for(const _0x35325b of _0x1b1934){const _0x28965d=_0x1b9fea['filter'](_0x3ec924=>_0x3ec924['path']===_0x35325b);if(_0x28965d[_0x2a85cb(0x15d)]===0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x154)+JSON[_0x2a85cb(0x16b)](_0x35325b)+'.',_0x2a85cb(0x110));if(_0x28965d[_0x2a85cb(0x15d)]>0x1)throw menuError(_0x2a85cb(0x17c),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x35325b)+'.',_0x2a85cb(0x151)+_0x28965d[_0x2a85cb(0x117)](_0x9624e7=>_0x9624e7['id'])['join'](',\x20')+'.');const _0x4d51f4=_0x28965d[0x0];_0x31d170[_0x2a85cb(0x141)](_0x4d51f4['id'],_0x4d51f4);}return[..._0x31d170[_0x2a85cb(0x136)]()];}function parseMenuIds(_0x57cd61){const _0x2baff2=a151_0x1434c8,_0x10eec2=parseCsv(_0x57cd61),_0x32a2f2=_0x10eec2['map'](Number);if(_0x32a2f2[_0x2baff2(0x11c)](_0x18284a=>!Number['isSafeInteger'](_0x18284a)||_0x18284a<=0x0))throw CliErrors[_0x2baff2(0x10b)](_0x2baff2(0x171));return[...new Set(_0x32a2f2)];}function parseCsv(_0x1f41ff){const _0x217ef5=a151_0x1434c8;return[...new Set(_0x1f41ff['split'](',')[_0x217ef5(0x117)](_0x29f064=>_0x29f064[_0x217ef5(0x140)]())[_0x217ef5(0x15a)](Boolean))];}function a151_0x2188(){const _0x3e9faf=['path','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','/smartapi/menu/update','warnings','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_verification_failed','values','cookie','hash','has','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','POST','resources','Response\x20was\x20lost\x20for\x20menu\x20','rawFlags','targets','trim','set','pageId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','paths','menu_selector_not_found','\x20must\x20be\x20true\x20or\x20false.','false','code','3450676FBlbdj','update-menu-visibility','verification','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Response\x20was\x20lost\x20and\x20menu\x20','body','5054448arRYbQ','visible','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','sort','Requested\x20menu\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','3623871qeTDPo','push','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','byId','filter','expected-count','failed','length','\x20menu(s);\x20skipped\x20','5CwohXU','message','beforeById','resourcesValid','menu-ids','\x20unchanged\x20menu(s).','childrenIds','depth','num','isArray','expectedCount','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','stringify','boolean','url','number','datasetCode','flagMissing','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','98ywDtcP','\x20failed.','type','update-recovery','5742834VJxgmJ','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','plannedActions','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','5270eWinCk','Final\x20menu\x20visibility\x20readback\x20failed.','menu_selector_ambiguous','menu','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','menu\x20list','menus','15633nWVFbI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','validation','isSafeInteger','childrenCount','before','40808tULFIv','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','label','update','1526958WxJQeN','plan','\x20visibility\x20update\x20could\x20not\x20be\x20verified','datasetId','map','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20menu(s);\x20skip\x20','Menu\x20','some','visibility-update','\x20skipped,\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','expectVisible','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','update\x20menu\x20visibility','get','modelType','menuIds','menu_state_drift','rabetbase\x20menu\x20list\x20--format\x20compress','\x20menu(s),\x20expected\x20','pageType','string','high-risk-write','join','str','Updated\x20visibility\x20for\x20'];a151_0x2188=function(){return _0x3e9faf;};return a151_0x2188();}function parseBooleanFlag(_0x3558cc,_0x2976af,_0x584331){const _0x1b5c9d=a151_0x1434c8;if(!hasFlag(_0x3558cc,_0x2976af)){if(_0x584331)throw CliErrors[_0x1b5c9d(0x170)](_0x2976af);return undefined;}const _0x2c257a=_0x3558cc[_0x1b5c9d(0x13e)][_0x2976af];if(_0x2c257a===!![]||_0x2c257a===![])return _0x2c257a;if(_0x2c257a==='true')return!![];if(_0x2c257a===_0x1b5c9d(0x147))return![];throw CliErrors[_0x1b5c9d(0x10b)]('--'+_0x2976af+_0x1b5c9d(0x146));}function verifyVisibilityUpdate(_0x345c87,_0x4e763e,_0x1c90f4){const _0x1a8d73=a151_0x1434c8;assertVerified(!!_0x4e763e,_0x1a8d73(0x11b)+_0x345c87['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x4e763e[_0x1a8d73(0x150)]===_0x1c90f4,_0x1a8d73(0x11b)+_0x345c87['id']+_0x1a8d73(0x121));const _0x4d51da=[['id',_0x4e763e['id'],_0x345c87['id']],['parentId',_0x4e763e['parentId'],_0x345c87['parentId']],[_0x1a8d73(0x166),_0x4e763e['depth'],_0x345c87['depth']],['label',_0x4e763e['label'],_0x345c87['label']],[_0x1a8d73(0x12f),_0x4e763e[_0x1a8d73(0x12f)],_0x345c87[_0x1a8d73(0x12f)]],[_0x1a8d73(0x16d),_0x4e763e['url'],_0x345c87[_0x1a8d73(0x16d)]],[_0x1a8d73(0x174),_0x4e763e[_0x1a8d73(0x174)],_0x345c87[_0x1a8d73(0x174)]],['sort',_0x4e763e['sort'],_0x345c87[_0x1a8d73(0x152)]],['resources',_0x4e763e[_0x1a8d73(0x13c)],_0x345c87[_0x1a8d73(0x13c)]],[_0x1a8d73(0x162),_0x4e763e[_0x1a8d73(0x162)],_0x345c87[_0x1a8d73(0x162)]],['childrenIds',_0x4e763e[_0x1a8d73(0x165)],_0x345c87[_0x1a8d73(0x165)]],[_0x1a8d73(0x10d),_0x4e763e['childrenCount'],_0x345c87[_0x1a8d73(0x10d)]],[_0x1a8d73(0x142),_0x4e763e[_0x1a8d73(0x142)],_0x345c87['pageId']],[_0x1a8d73(0x129),_0x4e763e[_0x1a8d73(0x129)],_0x345c87[_0x1a8d73(0x129)]],[_0x1a8d73(0x124),_0x4e763e[_0x1a8d73(0x124)],_0x345c87[_0x1a8d73(0x124)]],[_0x1a8d73(0x116),_0x4e763e[_0x1a8d73(0x116)],_0x345c87['datasetId']],[_0x1a8d73(0x16f),_0x4e763e[_0x1a8d73(0x16f)],_0x345c87[_0x1a8d73(0x16f)]]];for(const [_0x427080,_0x5e328b,_0x1520e3]of _0x4d51da){assertVerified(sameValue(_0x5e328b,_0x1520e3),_0x1a8d73(0x11b)+_0x345c87['id']+'\x20'+_0x427080+'\x20changed\x20unexpectedly.');}}function sameValue(_0x324994,_0x379a67){const _0x1319c7=a151_0x1434c8;if(Array[_0x1319c7(0x168)](_0x324994)||Array[_0x1319c7(0x168)](_0x379a67))return JSON[_0x1319c7(0x16b)](_0x324994)===JSON[_0x1319c7(0x16b)](_0x379a67);return _0x324994===_0x379a67;}
@@ -1 +1 @@
1
- function a152_0x1f4c(){const _0x3aacbe=['configName','verification','channelConfig','create','configCode','/notification/channel-config/create','POST','mutation',';\x20do\x20not\x20resubmit.','endpointUrl','22319LNQaXW','channelType','1812517fYsZAY','194PdpwPi','462rRdsGe','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','Inspect\x20with\x20','55089wCLrRV','document','6445ZsNmTO','connectTimeout','8Ycwcmq','248EdYwYb','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','2692992iGiGCP','input','isSafeInteger','750kwtCVR','appCode','write','planned','description','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','160692qyxHri','13911hKbCvA','readTimeout'];a152_0x1f4c=function(){return _0x3aacbe;};return a152_0x1f4c();}const a152_0x2fee13=a152_0x533a;function a152_0x533a(_0x32ac66,_0x4dd295){_0x32ac66=_0x32ac66-0x1c4;const _0x1f4cf5=a152_0x1f4c();let _0x533ae4=_0x1f4cf5[_0x32ac66];return _0x533ae4;}(function(_0x3101d5,_0x2af343){const _0x441f17=a152_0x533a,_0x5185db=_0x3101d5();while(!![]){try{const _0x1ff397=parseInt(_0x441f17(0x1d4))/0x1+parseInt(_0x441f17(0x1d7))/0x2*(parseInt(_0x441f17(0x1c8))/0x3)+parseInt(_0x441f17(0x1e0))/0x4*(parseInt(_0x441f17(0x1dd))/0x5)+parseInt(_0x441f17(0x1e3))/0x6+parseInt(_0x441f17(0x1d6))/0x7*(parseInt(_0x441f17(0x1df))/0x8)+parseInt(_0x441f17(0x1db))/0x9*(-parseInt(_0x441f17(0x1e6))/0xa)+-parseInt(_0x441f17(0x1d8))/0xb*(parseInt(_0x441f17(0x1c7))/0xc);if(_0x1ff397===_0x2af343)break;else _0x5185db['push'](_0x5185db['shift']());}catch(_0x5347d3){_0x5185db['push'](_0x5185db['shift']());}}}(a152_0x1f4c,0x3a2d4));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=a152_0x2fee13(0x1cf);async function prepareCreate(_0x2e805c){const _0x3641ca=a152_0x2fee13,_0x407477=await readNotificationDocument(_0x2e805c,_0x3641ca(0x1cd)),_0x47e00e=createMutationInput(_0x2e805c[_0x3641ca(0x1e7)],_0x407477);return{'document':_0x407477,'input':_0x47e00e,'planned':projectNotificationConfig({'appCode':_0x2e805c[_0x3641ca(0x1e7)],'configName':_0x407477[_0x3641ca(0x1ca)],'channelType':_0x407477[_0x3641ca(0x1d5)],'endpointUrl':_0x407477[_0x3641ca(0x1d3)],'channelConfig':_0x407477[_0x3641ca(0x1cc)],'description':_0x407477[_0x3641ca(0x1c5)],'connectTimeout':_0x407477[_0x3641ca(0x1de)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x407477[_0x3641ca(0x1c9)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':a152_0x2fee13(0x1d9),'risk':a152_0x2fee13(0x1e8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3a7ea2){assertSingleNotificationSource(_0x3a7ea2);},async 'dryRun'(_0x3e1c4c){const _0x5a148b=a152_0x2fee13,_0xab944=await prepareCreate(_0x3e1c4c),_0x226df0=notificationLookupCommand(_0x3e1c4c['appCode'],_0xab944['document'][_0x5a148b(0x1d5)]);return asDryRunResult({'operation':_0x5a148b(0x1cd),'selector':{'appCode':_0x3e1c4c['appCode'],'configName':_0xab944[_0x5a148b(0x1dc)][_0x5a148b(0x1ca)],'channelType':_0xab944[_0x5a148b(0x1dc)][_0x5a148b(0x1d5)]},'before':null,'after':_0xab944[_0x5a148b(0x1c4)],'dryRun':!![],'backend':{'method':_0x5a148b(0x1d0),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5a148b(0x1c4),'lookupCommand':_0x226df0}},{'method':_0x5a148b(0x1d0),'url':CREATE_PATH});},async 'execute'(_0xf7a8e0){const _0x528d47=a152_0x2fee13,_0x835ca5=await prepareCreate(_0xf7a8e0),_0x51d891=notificationLookupCommand(_0xf7a8e0['appCode'],_0x835ca5[_0x528d47(0x1dc)]['channelType']);let _0x347f1c;try{_0x347f1c=await createNotificationChannelConfig(_0x835ca5[_0x528d47(0x1e4)]);}catch(_0x1bcd87){if(isPlatformTransportFailure(_0x1bcd87))throw notificationError(_0x528d47(0x1e1),_0x528d47(0x1c6),_0x528d47(0x1da)+_0x51d891+_0x528d47(0x1d2));throw safeApiFailure('create',_0x528d47(0x1d1),'Inspect\x20with\x20'+_0x51d891+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x528d47(0x1e5)](_0x347f1c)||_0x347f1c<=0x0)throw notificationError(_0x528d47(0x1e1),_0x528d47(0x1e2),_0x528d47(0x1da)+_0x51d891+_0x528d47(0x1d2));let _0x4802db;try{const _0x471eec=await getNotificationChannelConfig(_0x347f1c,_0xf7a8e0[_0x528d47(0x1e7)]);_0x4802db=normalizeExactNotificationConfig(_0x471eec,_0x347f1c,_0xf7a8e0[_0x528d47(0x1e7)]);}catch{throw safeApiFailure('create',_0x528d47(0x1cb),_0x528d47(0x1da)+_0x51d891+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x528d47(0x1cd),'selector':{'appCode':_0x4802db[_0x528d47(0x1e7)],'id':_0x4802db['id'],'configCode':_0x4802db[_0x528d47(0x1ce)],'configName':_0x4802db[_0x528d47(0x1ca)],'channelType':_0x4802db[_0x528d47(0x1d5)]},'before':null,'after':projectNotificationConfig(_0x4802db),'dryRun':![],'backend':{'method':_0x528d47(0x1d0),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x51d891}},'message':'Created\x20notification\x20config\x20'+_0x4802db['id']};}};
1
+ function a152_0x2605(_0x65c252,_0x3527c8){_0x65c252=_0x65c252-0xee;const _0x2367ef=a152_0x2367();let _0x2605c9=_0x2367ef[_0x65c252];return _0x2605c9;}const a152_0x51e70a=a152_0x2605;(function(_0x4e5696,_0x34fe8a){const _0x58b797=a152_0x2605,_0x52881f=_0x4e5696();while(!![]){try{const _0x2cbc18=parseInt(_0x58b797(0xf9))/0x1+parseInt(_0x58b797(0xfe))/0x2*(parseInt(_0x58b797(0x100))/0x3)+-parseInt(_0x58b797(0x102))/0x4*(parseInt(_0x58b797(0xfd))/0x5)+-parseInt(_0x58b797(0xfa))/0x6*(-parseInt(_0x58b797(0x10c))/0x7)+-parseInt(_0x58b797(0x10e))/0x8*(-parseInt(_0x58b797(0x101))/0x9)+-parseInt(_0x58b797(0xf5))/0xa*(parseInt(_0x58b797(0x10b))/0xb)+parseInt(_0x58b797(0xf7))/0xc;if(_0x2cbc18===_0x34fe8a)break;else _0x52881f['push'](_0x52881f['shift']());}catch(_0x3c7a90){_0x52881f['push'](_0x52881f['shift']());}}}(a152_0x2367,0x995d3));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x51bd64){const _0x485059=a152_0x2605,_0x58debc=await readNotificationDocument(_0x51bd64,_0x485059(0xfc)),_0x50101f=createMutationInput(_0x51bd64[_0x485059(0x110)],_0x58debc);return{'document':_0x58debc,'input':_0x50101f,'planned':projectNotificationConfig({'appCode':_0x51bd64[_0x485059(0x110)],'configName':_0x58debc[_0x485059(0x109)],'channelType':_0x58debc[_0x485059(0xef)],'endpointUrl':_0x58debc['endpointUrl'],'channelConfig':_0x58debc[_0x485059(0xfb)],'description':_0x58debc['description'],'connectTimeout':_0x58debc[_0x485059(0x10f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x58debc['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a152_0x2367(){const _0x36fc8=['document','8wTFiso','connectTimeout','appCode','Inspect\x20with\x20',';\x20do\x20not\x20resubmit.','channelType','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','write',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit\x20automatically.','6704790YZVctz','config-create','3056400DYegUU','planned','233551KyBLbF','42816iDqKFW','channelConfig','create','5trwJYu','190766swEvkN','Created\x20notification\x20config\x20','3HWpjls','9125847LohmCi','3108284dHoQtR','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','input','verified','notification','notification_config_create_outcome_unknown','configName','configCode','11RmNhQm','469LJAJyL'];a152_0x2367=function(){return _0x36fc8;};return a152_0x2367();}export const notificationConfigCreate={'service':a152_0x51e70a(0x107),'command':a152_0x51e70a(0xf6),'description':a152_0x51e70a(0xf1),'risk':a152_0x51e70a(0xf2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x50eb84){assertSingleNotificationSource(_0x50eb84);},async 'dryRun'(_0x55339c){const _0x245732=a152_0x51e70a,_0x5c6e36=await prepareCreate(_0x55339c),_0xd494fa=notificationLookupCommand(_0x55339c[_0x245732(0x110)],_0x5c6e36[_0x245732(0x10d)][_0x245732(0xef)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x55339c[_0x245732(0x110)],'configName':_0x5c6e36[_0x245732(0x10d)]['configName'],'channelType':_0x5c6e36['document']['channelType']},'before':null,'after':_0x5c6e36[_0x245732(0xf8)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0xd494fa}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x3e3e27){const _0x510459=a152_0x51e70a,_0x369e65=await prepareCreate(_0x3e3e27),_0x2d209d=notificationLookupCommand(_0x3e3e27[_0x510459(0x110)],_0x369e65[_0x510459(0x10d)][_0x510459(0xef)]);let _0x3b686b;try{_0x3b686b=await createNotificationChannelConfig(_0x369e65[_0x510459(0x105)]);}catch(_0x2a8074){if(isPlatformTransportFailure(_0x2a8074))throw notificationError(_0x510459(0x108),_0x510459(0x104),_0x510459(0x111)+_0x2d209d+_0x510459(0xee));throw safeApiFailure('create','mutation',_0x510459(0x111)+_0x2d209d+_0x510459(0xf3));}if(!Number['isSafeInteger'](_0x3b686b)||_0x3b686b<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x510459(0x103),_0x510459(0x111)+_0x2d209d+_0x510459(0xee));let _0x4fc952;try{const _0x5d953c=await getNotificationChannelConfig(_0x3b686b,_0x3e3e27[_0x510459(0x110)]);_0x4fc952=normalizeExactNotificationConfig(_0x5d953c,_0x3b686b,_0x3e3e27[_0x510459(0x110)]);}catch{throw safeApiFailure(_0x510459(0xfc),'verification','Inspect\x20with\x20'+_0x2d209d+_0x510459(0xf4));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x4fc952['appCode'],'id':_0x4fc952['id'],'configCode':_0x4fc952[_0x510459(0x10a)],'configName':_0x4fc952[_0x510459(0x109)],'channelType':_0x4fc952[_0x510459(0xef)]},'before':null,'after':projectNotificationConfig(_0x4fc952),'dryRun':![],'backend':{'method':_0x510459(0xf0),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x510459(0x106),'lookupCommand':_0x2d209d}},'message':_0x510459(0xff)+_0x4fc952['id']};}};
@@ -1 +1 @@
1
- const a153_0x2a75b7=a153_0x4dbd;(function(_0x155d1d,_0x25eec9){const _0x3d9a28=a153_0x4dbd,_0x5ac805=_0x155d1d();while(!![]){try{const _0x22a644=parseInt(_0x3d9a28(0x10e))/0x1+parseInt(_0x3d9a28(0x115))/0x2+parseInt(_0x3d9a28(0x11a))/0x3*(-parseInt(_0x3d9a28(0x11e))/0x4)+-parseInt(_0x3d9a28(0x109))/0x5+-parseInt(_0x3d9a28(0x10d))/0x6*(parseInt(_0x3d9a28(0x10a))/0x7)+parseInt(_0x3d9a28(0x10f))/0x8+-parseInt(_0x3d9a28(0x118))/0x9*(-parseInt(_0x3d9a28(0x120))/0xa);if(_0x22a644===_0x25eec9)break;else _0x5ac805['push'](_0x5ac805['shift']());}catch(_0x34444f){_0x5ac805['push'](_0x5ac805['shift']());}}}(a153_0x5ed2,0xe2301));import{asDryRunResult}from'../../commands/common/dry-run.js';function a153_0x4dbd(_0x4d1bb5,_0x282aaa){_0x4d1bb5=_0x4d1bb5-0x103;const _0x5ed20f=a153_0x5ed2();let _0x4dbd6f=_0x5ed20f[_0x4d1bb5];return _0x4dbd6f;}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='/notification/channel-config/delete',REFERENCE_WARNING=a153_0x2a75b7(0x11b);function a153_0x5ed2(){const _0x3f584b=['368390NMTAsL','Inspect\x20with\x20','high-risk-write','notification_config_delete_verification_failed','config-delete','notification','POST','2350995hlCADr','14gOODeS','channelType','before','2743722etTOuI','412945SNeXRb','2012320TzaBkv','appCode','Notification\x20config\x20','mutation','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','908182AHDlzW',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_delete_outcome_unknown','333GhZpGn',';\x20do\x20not\x20resubmit\x20automatically.','3CaEPDI','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','notification_config_delete_verification_unavailable','delete','681524WHEflm','\x20remains\x20present\x20after\x20delete.'];a153_0x5ed2=function(){return _0x3f584b;};return a153_0x5ed2();}async function prepareDelete(_0x503b33){const _0x1d03b7=a153_0x2a75b7,_0x3f341f=readNotificationId(_0x503b33),_0x2442aa=await requireExactNotificationConfig(_0x503b33[_0x1d03b7(0x110)],_0x3f341f,_0x1d03b7(0x11d));return{'id':_0x3f341f,'before':_0x2442aa};}export const notificationConfigDelete={'service':a153_0x2a75b7(0x107),'command':a153_0x2a75b7(0x106),'description':a153_0x2a75b7(0x113),'risk':a153_0x2a75b7(0x104),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x131932){readNotificationId(_0x131932),requireNotificationExplicitYes(_0x131932);},async 'dryRun'(_0x1368da){const _0x27f640=a153_0x2a75b7,_0x41fbed=await prepareDelete(_0x1368da),_0x5320f9=notificationLookupCommand(_0x1368da[_0x27f640(0x110)],_0x41fbed[_0x27f640(0x10c)][_0x27f640(0x10b)]);return asDryRunResult({'operation':_0x27f640(0x11d),'selector':notificationSelector(_0x41fbed['before']),'before':projectNotificationConfig(_0x41fbed[_0x27f640(0x10c)]),'after':null,'dryRun':!![],'backend':{'method':_0x27f640(0x108),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x5320f9}},{'method':_0x27f640(0x108),'url':DELETE_PATH});},async 'execute'(_0x467aa1){const _0x35067a=a153_0x2a75b7;requireNotificationExplicitYes(_0x467aa1);const _0x9f9c20=await prepareDelete(_0x467aa1),_0x4bd7ef=notificationLookupCommand(_0x467aa1['appCode'],_0x9f9c20[_0x35067a(0x10c)][_0x35067a(0x10b)]);let _0x2676a5=![];try{await deleteNotificationChannelConfig(_0x9f9c20['id'],_0x467aa1[_0x35067a(0x110)]);}catch(_0x45a7c2){if(!isPlatformTransportFailure(_0x45a7c2))throw safeApiFailure('delete',_0x35067a(0x112),_0x35067a(0x103)+_0x4bd7ef+_0x35067a(0x116));_0x2676a5=!![];}let _0x32067b;try{_0x32067b=await listNotificationChannelConfigs(_0x467aa1[_0x35067a(0x110)],_0x9f9c20[_0x35067a(0x10c)][_0x35067a(0x10b)]),validateNotificationDeleteReadback(_0x32067b,_0x467aa1[_0x35067a(0x110)],_0x9f9c20[_0x35067a(0x10c)][_0x35067a(0x10b)]);}catch{throw notificationError(_0x2676a5?_0x35067a(0x117):_0x35067a(0x11c),_0x35067a(0x111)+_0x9f9c20['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x35067a(0x103)+_0x4bd7ef+_0x35067a(0x119));}if(_0x32067b['some'](_0xd0f14c=>_0xd0f14c['id']===_0x9f9c20['id']))throw notificationError(_0x2676a5?_0x35067a(0x117):_0x35067a(0x105),_0x35067a(0x111)+_0x9f9c20['id']+_0x35067a(0x11f),_0x35067a(0x103)+_0x4bd7ef+_0x35067a(0x119));const _0xdc06fd=[REFERENCE_WARNING];return _0x2676a5&&_0xdc06fd['unshift'](_0x35067a(0x114)),{'ok':!![],'data':{'operation':_0x35067a(0x11d),'selector':notificationSelector(_0x9f9c20[_0x35067a(0x10c)]),'before':projectNotificationConfig(_0x9f9c20[_0x35067a(0x10c)]),'after':null,'dryRun':![],'backend':{'method':_0x35067a(0x108),'path':DELETE_PATH},'warnings':_0xdc06fd,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2676a5,'lookupCommand':_0x4bd7ef}},'message':'Deleted\x20notification\x20config\x20'+_0x9f9c20['id']};}};
1
+ const a153_0x1ffc5f=a153_0x31af;function a153_0xbe07(){const _0x59da23=['notification','2115056pbQnsK','POST','notification_config_delete_verification_failed','config-delete','before','\x20remains\x20present\x20after\x20delete.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','140571cJBZdx','Notification\x20config\x20','762192teUdfJ','14nsOKFN','planned','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','\x20delete\x20could\x20not\x20be\x20verified.','19088ggmXFc','1810kMbvKb','762942QsCfue','channelType','/notification/channel-config/delete','notification_config_delete_verification_unavailable','814362JKiZTq','notification_config_delete_outcome_unknown','Inspect\x20with\x20','appCode','mutation','3330516iaHxZX','1290ITnsWG','delete',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a153_0xbe07=function(){return _0x59da23;};return a153_0xbe07();}(function(_0x230c3f,_0x1a6d69){const _0x47a4f6=a153_0x31af,_0x7c755c=_0x230c3f();while(!![]){try{const _0x28c659=parseInt(_0x47a4f6(0x1b0))/0x1+parseInt(_0x47a4f6(0x1a8))/0x2+-parseInt(_0x47a4f6(0x19a))/0x3+parseInt(_0x47a4f6(0x1ae))/0x4*(-parseInt(_0x47a4f6(0x1af))/0x5)+parseInt(_0x47a4f6(0x1b4))/0x6+-parseInt(_0x47a4f6(0x1a9))/0x7*(-parseInt(_0x47a4f6(0x19f))/0x8)+-parseInt(_0x47a4f6(0x1a6))/0x9*(-parseInt(_0x47a4f6(0x19b))/0xa);if(_0x28c659===_0x1a6d69)break;else _0x7c755c['push'](_0x7c755c['shift']());}catch(_0x59498d){_0x7c755c['push'](_0x7c755c['shift']());}}}(a153_0xbe07,0xf0a90));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=a153_0x1ffc5f(0x1b2),REFERENCE_WARNING=a153_0x1ffc5f(0x1a5);async function prepareDelete(_0x414d96){const _0x5d602e=readNotificationId(_0x414d96),_0x4cab7a=await requireExactNotificationConfig(_0x414d96['appCode'],_0x5d602e,'delete');return{'id':_0x5d602e,'before':_0x4cab7a};}function a153_0x31af(_0x3e9404,_0x347fab){_0x3e9404=_0x3e9404-0x19a;const _0xbe077c=a153_0xbe07();let _0x31af7a=_0xbe077c[_0x3e9404];return _0x31af7a;}export const notificationConfigDelete={'service':a153_0x1ffc5f(0x19e),'command':a153_0x1ffc5f(0x1a2),'description':a153_0x1ffc5f(0x1ab),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xf0e32){readNotificationId(_0xf0e32),requireNotificationExplicitYes(_0xf0e32);},async 'dryRun'(_0x250e13){const _0x1af787=a153_0x1ffc5f,_0x2563bd=await prepareDelete(_0x250e13),_0x55a939=notificationLookupCommand(_0x250e13[_0x1af787(0x1b7)],_0x2563bd[_0x1af787(0x1a3)][_0x1af787(0x1b1)]);return asDryRunResult({'operation':_0x1af787(0x19c),'selector':notificationSelector(_0x2563bd[_0x1af787(0x1a3)]),'before':projectNotificationConfig(_0x2563bd[_0x1af787(0x1a3)]),'after':null,'dryRun':!![],'backend':{'method':_0x1af787(0x1a0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x1af787(0x1aa),'lookupCommand':_0x55a939}},{'method':_0x1af787(0x1a0),'url':DELETE_PATH});},async 'execute'(_0x3a1392){const _0x1268d2=a153_0x1ffc5f;requireNotificationExplicitYes(_0x3a1392);const _0x1b7cfc=await prepareDelete(_0x3a1392),_0x74975e=notificationLookupCommand(_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc[_0x1268d2(0x1a3)][_0x1268d2(0x1b1)]);let _0x2c09f5=![];try{await deleteNotificationChannelConfig(_0x1b7cfc['id'],_0x3a1392[_0x1268d2(0x1b7)]);}catch(_0x29af88){if(!isPlatformTransportFailure(_0x29af88))throw safeApiFailure('delete',_0x1268d2(0x1b8),_0x1268d2(0x1b6)+_0x74975e+_0x1268d2(0x19d));_0x2c09f5=!![];}let _0xf8c325;try{_0xf8c325=await listNotificationChannelConfigs(_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc['before'][_0x1268d2(0x1b1)]),validateNotificationDeleteReadback(_0xf8c325,_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc[_0x1268d2(0x1a3)][_0x1268d2(0x1b1)]);}catch{throw notificationError(_0x2c09f5?_0x1268d2(0x1b5):_0x1268d2(0x1b3),_0x1268d2(0x1a7)+_0x1b7cfc['id']+_0x1268d2(0x1ad),'Inspect\x20with\x20'+_0x74975e+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0xf8c325['some'](_0x166630=>_0x166630['id']===_0x1b7cfc['id']))throw notificationError(_0x2c09f5?'notification_config_delete_outcome_unknown':_0x1268d2(0x1a1),_0x1268d2(0x1a7)+_0x1b7cfc['id']+_0x1268d2(0x1a4),'Inspect\x20with\x20'+_0x74975e+_0x1268d2(0x1ac));const _0x3f9ea6=[REFERENCE_WARNING];return _0x2c09f5&&_0x3f9ea6['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x1268d2(0x19c),'selector':notificationSelector(_0x1b7cfc['before']),'before':projectNotificationConfig(_0x1b7cfc[_0x1268d2(0x1a3)]),'after':null,'dryRun':![],'backend':{'method':_0x1268d2(0x1a0),'path':DELETE_PATH},'warnings':_0x3f9ea6,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2c09f5,'lookupCommand':_0x74975e}},'message':'Deleted\x20notification\x20config\x20'+_0x1b7cfc['id']};}};
@@ -1 +1 @@
1
- const a154_0x5b5810=a154_0x1127;(function(_0x456287,_0x23373b){const _0x1cc27b=a154_0x1127,_0x312124=_0x456287();while(!![]){try{const _0x4f377=-parseInt(_0x1cc27b(0x1fa))/0x1+parseInt(_0x1cc27b(0x1ed))/0x2*(-parseInt(_0x1cc27b(0x1f4))/0x3)+-parseInt(_0x1cc27b(0x1fd))/0x4*(parseInt(_0x1cc27b(0x1ef))/0x5)+parseInt(_0x1cc27b(0x1fe))/0x6*(-parseInt(_0x1cc27b(0x1f8))/0x7)+parseInt(_0x1cc27b(0x1f1))/0x8+-parseInt(_0x1cc27b(0x1f5))/0x9+parseInt(_0x1cc27b(0x1fc))/0xa;if(_0x4f377===_0x23373b)break;else _0x312124['push'](_0x312124['shift']());}catch(_0x3dc0e0){_0x312124['push'](_0x312124['shift']());}}}(a154_0x260d,0xa1e76));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a154_0x260d(){const _0x4b1081=['34682220NKjOuP','4107224bxoXkO','5724afcPbs','map','\x20notification\x20config(s)','2374622OkIHZg','notification','5jHbHgo','length','7124616rzuYLG','appCode','type','3RbODcg','5669244hsJtsR','string','EMAIL','287neqooY','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','812494pxdHMo','Found\x20'];a154_0x260d=function(){return _0x4b1081;};return a154_0x260d();}function a154_0x1127(_0x305112,_0x5d21d8){_0x305112=_0x305112-0x1ec;const _0x260df0=a154_0x260d();let _0x1127f5=_0x260df0[_0x305112];return _0x1127f5;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a154_0x5b5810(0x1ee),'command':'config-list','description':a154_0x5b5810(0x1f9),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a154_0x5b5810(0x1f3),'type':a154_0x5b5810(0x1f6),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a154_0x5b5810(0x1f7)}],async 'validate'(_0x38c752){readNotificationChannelType(_0x38c752);},async 'execute'(_0x280dfb){const _0x52dd00=a154_0x5b5810,_0x52650d=readNotificationChannelType(_0x280dfb),_0x38611f=await listNotificationChannelConfigs(_0x280dfb[_0x52dd00(0x1f2)],_0x52650d),_0x4b7167=_0x38611f[_0x52dd00(0x1ff)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x280dfb[_0x52dd00(0x1f2)],'channelType':_0x52650d,'count':_0x4b7167[_0x52dd00(0x1f0)],'configs':_0x4b7167},'message':_0x52dd00(0x1fb)+_0x4b7167[_0x52dd00(0x1f0)]+'\x20'+_0x52650d+_0x52dd00(0x1ec)};}};
1
+ const a154_0x256fc6=a154_0x30aa;(function(_0x29e142,_0x5f48bb){const _0x3be5b5=a154_0x30aa,_0x43084f=_0x29e142();while(!![]){try{const _0x46360d=parseInt(_0x3be5b5(0x141))/0x1*(-parseInt(_0x3be5b5(0x140))/0x2)+-parseInt(_0x3be5b5(0x134))/0x3+-parseInt(_0x3be5b5(0x132))/0x4*(parseInt(_0x3be5b5(0x136))/0x5)+parseInt(_0x3be5b5(0x12e))/0x6*(-parseInt(_0x3be5b5(0x133))/0x7)+parseInt(_0x3be5b5(0x143))/0x8*(-parseInt(_0x3be5b5(0x13c))/0x9)+-parseInt(_0x3be5b5(0x144))/0xa*(parseInt(_0x3be5b5(0x139))/0xb)+parseInt(_0x3be5b5(0x13b))/0xc;if(_0x46360d===_0x5f48bb)break;else _0x43084f['push'](_0x43084f['shift']());}catch(_0x5d699b){_0x43084f['push'](_0x43084f['shift']());}}}(a154_0x4a7a,0xe615a));function a154_0x4a7a(){const _0x5aeba5=['string','1170568FIHcDY','10qmBWFA','6xlQWyn','EMAIL','Found\x20','length','144916tbKfki','10755402svjzvD','2427714MVQhaN','map','245exBpcg','type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','16461907ViedZi','read','92485068UBQbbb','9uAzgLE','notification','Notification\x20channel\x20type','appCode','19064IoivYD','105XPotEP'];a154_0x4a7a=function(){return _0x5aeba5;};return a154_0x4a7a();}function a154_0x30aa(_0x2197eb,_0x10d277){_0x2197eb=_0x2197eb-0x12e;const _0x4a7a9f=a154_0x4a7a();let _0x30aa36=_0x4a7a9f[_0x2197eb];return _0x30aa36;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a154_0x256fc6(0x13d),'command':'config-list','description':a154_0x256fc6(0x138),'risk':a154_0x256fc6(0x13a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a154_0x256fc6(0x137),'type':a154_0x256fc6(0x142),'description':a154_0x256fc6(0x13e),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a154_0x256fc6(0x12f)}],async 'validate'(_0x54d7f3){readNotificationChannelType(_0x54d7f3);},async 'execute'(_0x24023e){const _0x16c7aa=a154_0x256fc6,_0x263bd8=readNotificationChannelType(_0x24023e),_0x38fa3a=await listNotificationChannelConfigs(_0x24023e[_0x16c7aa(0x13f)],_0x263bd8),_0x55f84d=_0x38fa3a[_0x16c7aa(0x135)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x24023e[_0x16c7aa(0x13f)],'channelType':_0x263bd8,'count':_0x55f84d[_0x16c7aa(0x131)],'configs':_0x55f84d},'message':_0x16c7aa(0x130)+_0x55f84d[_0x16c7aa(0x131)]+'\x20'+_0x263bd8+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- function a155_0x49bf(){const _0x3d19f7=['\x20via\x20','payload','92348hZFpow','allMatch','Inspect\x20with\x20--id\x20','24eGmKFv','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','95brpjPV','3345848qFbxCo','verifiedFields','planned','/notification/channel-config/update','channelType','notification_config_update_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','1441vePikn','5020SFFyKN','1506FObMCQ','update','\x20with\x20','4626CJlati','patch','Notification\x20config\x20','mutation',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2466333EOvEbm','Inspect\x20ID\x20','1792VMvrOs','notification_config_update_outcome_unknown','provesChange','notification','POST','verified','Updated\x20notification\x20config\x20','267697PpzrnJ','before','appCode','high-risk-write'];a155_0x49bf=function(){return _0x3d19f7;};return a155_0x49bf();}function a155_0x3528(_0x26b313,_0x2e1397){_0x26b313=_0x26b313-0x116;const _0x49bf19=a155_0x49bf();let _0x352838=_0x49bf19[_0x26b313];return _0x352838;}const a155_0x1c2247=a155_0x3528;(function(_0x21a7a4,_0x26b5b2){const _0x1b93a7=a155_0x3528,_0x3656c0=_0x21a7a4();while(!![]){try{const _0x5f5292=-parseInt(_0x1b93a7(0x12e))/0x1+-parseInt(_0x1b93a7(0x11d))/0x2*(parseInt(_0x1b93a7(0x137))/0x3)+-parseInt(_0x1b93a7(0x134))/0x4*(parseInt(_0x1b93a7(0x13a))/0x5)+-parseInt(_0x1b93a7(0x120))/0x6*(-parseInt(_0x1b93a7(0x127))/0x7)+parseInt(_0x1b93a7(0x13b))/0x8+parseInt(_0x1b93a7(0x125))/0x9+parseInt(_0x1b93a7(0x11c))/0xa*(parseInt(_0x1b93a7(0x11b))/0xb);if(_0x5f5292===_0x26b5b2)break;else _0x3656c0['push'](_0x3656c0['shift']());}catch(_0x326f57){_0x3656c0['push'](_0x3656c0['shift']());}}}(a155_0x49bf,0x3b558));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a155_0x1c2247(0x117);async function prepareUpdate(_0x568517){const _0x424b1e=a155_0x1c2247,_0x341800=readNotificationId(_0x568517),_0x44f105=await readNotificationDocument(_0x568517,_0x424b1e(0x11e)),_0x2792ff=await requireExactNotificationConfig(_0x568517[_0x424b1e(0x130)],_0x341800,'update');return{'id':_0x341800,'patch':_0x44f105,'before':_0x2792ff,'payload':mergeUpdateInput(_0x2792ff,_0x44f105),'planned':plannedUpdateProjection(_0x2792ff,_0x44f105)};}export const notificationConfigUpdate={'service':a155_0x1c2247(0x12a),'command':'config-update','description':a155_0x1c2247(0x138),'risk':a155_0x1c2247(0x131),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x51abac){readNotificationId(_0x51abac),assertSingleNotificationSource(_0x51abac),requireNotificationExplicitYes(_0x51abac);},async 'dryRun'(_0x4a95e4){const _0x16950b=a155_0x1c2247,_0x29896f=await prepareUpdate(_0x4a95e4),_0x2fdb5d=notificationLookupCommand(_0x4a95e4[_0x16950b(0x130)],_0x29896f[_0x16950b(0x12f)][_0x16950b(0x118)]);return asDryRunResult({'operation':_0x16950b(0x11e),'selector':notificationSelector(_0x29896f[_0x16950b(0x12f)]),'before':projectNotificationConfig(_0x29896f[_0x16950b(0x12f)]),'after':_0x29896f['planned'],'dryRun':!![],'backend':{'method':_0x16950b(0x12b),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x16950b(0x116),'lookupCommand':_0x2fdb5d}},{'method':_0x16950b(0x12b),'url':UPDATE_PATH});},async 'execute'(_0x73f773){const _0x1463e6=a155_0x1c2247;requireNotificationExplicitYes(_0x73f773);const _0x489580=await prepareUpdate(_0x73f773),_0x4b3769=notificationLookupCommand(_0x73f773['appCode'],_0x489580['before'][_0x1463e6(0x118)]);let _0x4c1aa9=![];try{await updateNotificationChannelConfig(_0x489580[_0x1463e6(0x133)]);}catch(_0x28c0e0){if(!isPlatformTransportFailure(_0x28c0e0))throw safeApiFailure('update',_0x1463e6(0x123),_0x1463e6(0x126)+_0x489580['id']+_0x1463e6(0x11f)+_0x4b3769+_0x1463e6(0x124));_0x4c1aa9=!![];}let _0xb13c0c;try{const _0x789f96=await getNotificationChannelConfig(_0x489580['id'],_0x73f773['appCode']);_0xb13c0c=normalizeExactNotificationConfig(_0x789f96,_0x489580['id'],_0x73f773[_0x1463e6(0x130)]);}catch{throw notificationError(_0x4c1aa9?_0x1463e6(0x128):'notification_config_update_verification_unavailable',_0x1463e6(0x122)+_0x489580['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x1463e6(0x136)+_0x489580['id']+_0x1463e6(0x132)+_0x4b3769+_0x1463e6(0x11a));}const _0x4d2128=requestedSafeFieldsMatch(_0x489580[_0x1463e6(0x12f)],_0xb13c0c,_0x489580[_0x1463e6(0x121)]);if(!_0x4d2128[_0x1463e6(0x135)]||_0x4c1aa9&&!_0x4d2128[_0x1463e6(0x129)])throw notificationError(_0x4c1aa9?'notification_config_update_outcome_unknown':_0x1463e6(0x119),_0x1463e6(0x122)+_0x489580['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x1463e6(0x136)+_0x489580['id']+'\x20via\x20'+_0x4b3769+_0x1463e6(0x11a));const _0x101bd4=_0x4c1aa9?[_0x1463e6(0x139)]:[];return{'ok':!![],'data':{'operation':_0x1463e6(0x11e),'selector':notificationSelector(_0xb13c0c),'before':projectNotificationConfig(_0x489580[_0x1463e6(0x12f)]),'after':projectNotificationConfig(_0xb13c0c),'dryRun':![],'backend':{'method':_0x1463e6(0x12b),'path':UPDATE_PATH},'warnings':_0x101bd4,'verification':{'status':_0x1463e6(0x12c),'recoveredAfterUnknownResponse':_0x4c1aa9,'verifiedFields':_0x4d2128[_0x1463e6(0x13c)],'lookupCommand':_0x4b3769}},'message':_0x1463e6(0x12d)+_0xb13c0c['id']};}};
1
+ const a155_0x4a02ab=a155_0x4e70;(function(_0x2fa9c5,_0x5d8056){const _0x5c4e21=a155_0x4e70,_0x47cfbd=_0x2fa9c5();while(!![]){try{const _0x589651=-parseInt(_0x5c4e21(0x1fa))/0x1+-parseInt(_0x5c4e21(0x210))/0x2*(parseInt(_0x5c4e21(0x1f3))/0x3)+-parseInt(_0x5c4e21(0x20a))/0x4+parseInt(_0x5c4e21(0x212))/0x5*(parseInt(_0x5c4e21(0x201))/0x6)+-parseInt(_0x5c4e21(0x211))/0x7*(parseInt(_0x5c4e21(0x209))/0x8)+parseInt(_0x5c4e21(0x205))/0x9*(-parseInt(_0x5c4e21(0x1f9))/0xa)+parseInt(_0x5c4e21(0x1fb))/0xb;if(_0x589651===_0x5d8056)break;else _0x47cfbd['push'](_0x47cfbd['shift']());}catch(_0x51a47e){_0x47cfbd['push'](_0x47cfbd['shift']());}}}(a155_0x9b67,0xa6ff0));import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x4e70(_0x27dbee,_0x5b4c17){_0x27dbee=_0x27dbee-0x1f3;const _0x9b6736=a155_0x9b67();let _0x4e707c=_0x9b6736[_0x27dbee];return _0x4e707c;}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=a155_0x4a02ab(0x1f7);async function prepareUpdate(_0x455ce2){const _0x56b6e6=a155_0x4a02ab,_0x370ae2=readNotificationId(_0x455ce2),_0x19e0ed=await readNotificationDocument(_0x455ce2,_0x56b6e6(0x208)),_0x4a4018=await requireExactNotificationConfig(_0x455ce2[_0x56b6e6(0x206)],_0x370ae2,_0x56b6e6(0x208));return{'id':_0x370ae2,'patch':_0x19e0ed,'before':_0x4a4018,'payload':mergeUpdateInput(_0x4a4018,_0x19e0ed),'planned':plannedUpdateProjection(_0x4a4018,_0x19e0ed)};}function a155_0x9b67(){const _0x5862a3=['/notification/channel-config/update','high-risk-write','877390NHLDcz','1021727vObLkB','43904751khxpue','Updated\x20notification\x20config\x20','payload',';\x20do\x20not\x20resubmit\x20automatically.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20via\x20','34512LFxhNh','mutation','channelType','planned','72IuvvuM','appCode','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','update','8NZIDQD','3606784BMzLmD','Inspect\x20ID\x20','verified','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','before','verifiedFields','2LDbaQp','5273947mmmUtw','240gJuApu',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','Inspect\x20with\x20--id\x20','notification_config_update_verification_unavailable','613995urrMcp','POST','config-update','notification_config_update_outcome_unknown'];a155_0x9b67=function(){return _0x5862a3;};return a155_0x9b67();}export const notificationConfigUpdate={'service':'notification','command':a155_0x4a02ab(0x1f5),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a155_0x4a02ab(0x1f8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3927bf){readNotificationId(_0x3927bf),assertSingleNotificationSource(_0x3927bf),requireNotificationExplicitYes(_0x3927bf);},async 'dryRun'(_0x3f5b26){const _0x3a951b=a155_0x4a02ab,_0x366073=await prepareUpdate(_0x3f5b26),_0xb3ccda=notificationLookupCommand(_0x3f5b26['appCode'],_0x366073[_0x3a951b(0x20e)][_0x3a951b(0x203)]);return asDryRunResult({'operation':_0x3a951b(0x208),'selector':notificationSelector(_0x366073['before']),'before':projectNotificationConfig(_0x366073[_0x3a951b(0x20e)]),'after':_0x366073['planned'],'dryRun':!![],'backend':{'method':_0x3a951b(0x1f4),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x3a951b(0x204),'lookupCommand':_0xb3ccda}},{'method':_0x3a951b(0x1f4),'url':UPDATE_PATH});},async 'execute'(_0xc911c4){const _0x469921=a155_0x4a02ab;requireNotificationExplicitYes(_0xc911c4);const _0xb6c14=await prepareUpdate(_0xc911c4),_0x2f183c=notificationLookupCommand(_0xc911c4[_0x469921(0x206)],_0xb6c14[_0x469921(0x20e)]['channelType']);let _0x281486=![];try{await updateNotificationChannelConfig(_0xb6c14[_0x469921(0x1fd)]);}catch(_0x1e2d17){if(!isPlatformTransportFailure(_0x1e2d17))throw safeApiFailure(_0x469921(0x208),_0x469921(0x202),_0x469921(0x20b)+_0xb6c14['id']+'\x20with\x20'+_0x2f183c+_0x469921(0x213));_0x281486=!![];}let _0x17addb;try{const _0x1c7a83=await getNotificationChannelConfig(_0xb6c14['id'],_0xc911c4[_0x469921(0x206)]);_0x17addb=normalizeExactNotificationConfig(_0x1c7a83,_0xb6c14['id'],_0xc911c4[_0x469921(0x206)]);}catch{throw notificationError(_0x281486?_0x469921(0x1f6):_0x469921(0x216),_0x469921(0x214)+_0xb6c14['id']+_0x469921(0x1ff),_0x469921(0x215)+_0xb6c14['id']+_0x469921(0x200)+_0x2f183c+_0x469921(0x1fe));}const _0x5701af=requestedSafeFieldsMatch(_0xb6c14['before'],_0x17addb,_0xb6c14['patch']);if(!_0x5701af['allMatch']||_0x281486&&!_0x5701af['provesChange'])throw notificationError(_0x281486?_0x469921(0x1f6):'notification_config_update_verification_failed',_0x469921(0x214)+_0xb6c14['id']+_0x469921(0x207),_0x469921(0x215)+_0xb6c14['id']+_0x469921(0x200)+_0x2f183c+_0x469921(0x1fe));const _0x5de06f=_0x281486?[_0x469921(0x20d)]:[];return{'ok':!![],'data':{'operation':_0x469921(0x208),'selector':notificationSelector(_0x17addb),'before':projectNotificationConfig(_0xb6c14['before']),'after':projectNotificationConfig(_0x17addb),'dryRun':![],'backend':{'method':_0x469921(0x1f4),'path':UPDATE_PATH},'warnings':_0x5de06f,'verification':{'status':_0x469921(0x20c),'recoveredAfterUnknownResponse':_0x281486,'verifiedFields':_0x5701af[_0x469921(0x20f)],'lookupCommand':_0x2f183c}},'message':_0x469921(0x1fc)+_0x17addb['id']};}};
@@ -1 +1 @@
1
- (function(_0x3c1e87,_0x265547){const _0x10ceb4=a156_0x15ac,_0x2e3dea=_0x3c1e87();while(!![]){try{const _0x47a6a3=parseInt(_0x10ceb4(0x1e0))/0x1*(parseInt(_0x10ceb4(0x1de))/0x2)+parseInt(_0x10ceb4(0x1da))/0x3*(-parseInt(_0x10ceb4(0x1e1))/0x4)+parseInt(_0x10ceb4(0x1e3))/0x5+-parseInt(_0x10ceb4(0x1db))/0x6*(parseInt(_0x10ceb4(0x1df))/0x7)+parseInt(_0x10ceb4(0x1dc))/0x8*(parseInt(_0x10ceb4(0x1dd))/0x9)+parseInt(_0x10ceb4(0x1d9))/0xa*(-parseInt(_0x10ceb4(0x1d8))/0xb)+-parseInt(_0x10ceb4(0x1e2))/0xc;if(_0x47a6a3===_0x265547)break;else _0x2e3dea['push'](_0x2e3dea['shift']());}catch(_0x150537){_0x2e3dea['push'](_0x2e3dea['shift']());}}}(a156_0x388a,0xa9b3b));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a156_0x15ac(_0x37d0f6,_0xdab77a){_0x37d0f6=_0x37d0f6-0x1d8;const _0x388a2a=a156_0x388a();let _0x15ac6f=_0x388a2a[_0x37d0f6];return _0x15ac6f;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a156_0x388a(){const _0x5f5df9=['9GnbDNj','32hdOAtk','399ZKJDdV','65369FZuJoi','4CBNYLy','5835216ZyKeEI','3176255IvghCD','40337ZNccQr','480JNsKdJ','727833Qjijzi','68490IFRzRH','4555952itVWTF'];a156_0x388a=function(){return _0x5f5df9;};return a156_0x388a();}
1
+ function a156_0x2485(_0x3a259e,_0xa11e36){_0x3a259e=_0x3a259e-0x1c8;const _0x46f371=a156_0x46f3();let _0x2485c5=_0x46f371[_0x3a259e];return _0x2485c5;}function a156_0x46f3(){const _0x5b60a2=['1971065ZHcgmm','68298YoqeNp','913408QYPjYc','6436ZMBVzm','1285220xsYYpV','2538GvLCKd','99NEYOoM','9596951GAcJrs','6mUBMoF','6373728BNhUMv'];a156_0x46f3=function(){return _0x5b60a2;};return a156_0x46f3();}(function(_0x221110,_0x5a5c5a){const _0x1fb973=a156_0x2485,_0x527386=_0x221110();while(!![]){try{const _0x323b72=parseInt(_0x1fb973(0x1cd))/0x1+-parseInt(_0x1fb973(0x1cc))/0x2+parseInt(_0x1fb973(0x1d0))/0x3*(-parseInt(_0x1fb973(0x1ce))/0x4)+parseInt(_0x1fb973(0x1cb))/0x5+-parseInt(_0x1fb973(0x1c9))/0x6*(parseInt(_0x1fb973(0x1c8))/0x7)+parseInt(_0x1fb973(0x1ca))/0x8+parseInt(_0x1fb973(0x1d1))/0x9*(parseInt(_0x1fb973(0x1cf))/0xa);if(_0x323b72===_0x5a5c5a)break;else _0x527386['push'](_0x527386['shift']());}catch(_0x515249){_0x527386['push'](_0x527386['shift']());}}}(a156_0x46f3,0xb786b));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];