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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/auth/auth-server-ui.js +1 -1
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.js +1 -1
  57. package/lib/commands/config/list.js +1 -1
  58. package/lib/commands/config/set.js +1 -1
  59. package/lib/commands/config/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-restore.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.js +1 -1
  95. package/lib/commands/db/table-diff-shared.js +1 -1
  96. package/lib/commands/db/tables.js +1 -1
  97. package/lib/commands/db/test.js +1 -1
  98. package/lib/commands/db/update.js +1 -1
  99. package/lib/commands/deployment/auto-sync.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync-all.js +1 -1
  102. package/lib/commands/deployment/sync-jobs.js +1 -1
  103. package/lib/commands/deployment/sync-status.js +1 -1
  104. package/lib/commands/deployment/sync.js +1 -1
  105. package/lib/commands/doctor.js +1 -1
  106. package/lib/commands/file/index.js +1 -1
  107. package/lib/commands/instant-api-policy/current.js +1 -1
  108. package/lib/commands/instant-api-policy/index.js +1 -1
  109. package/lib/commands/instant-api-policy/init.js +1 -1
  110. package/lib/commands/instant-api-policy/publish.js +1 -1
  111. package/lib/commands/instant-api-policy/pull.js +1 -1
  112. package/lib/commands/instant-api-policy/revision.js +1 -1
  113. package/lib/commands/instant-api-policy/revisions.js +1 -1
  114. package/lib/commands/instant-api-policy/rollback.js +1 -1
  115. package/lib/commands/instant-api-policy/shared.js +1 -1
  116. package/lib/commands/instant-api-policy/validate.js +1 -1
  117. package/lib/commands/issue/index.js +1 -1
  118. package/lib/commands/issue/nudge.js +1 -1
  119. package/lib/commands/issue/report.js +1 -1
  120. package/lib/commands/issue/shared.js +1 -1
  121. package/lib/commands/kb/create.js +1 -1
  122. package/lib/commands/kb/delete.js +1 -1
  123. package/lib/commands/kb/detail.js +1 -1
  124. package/lib/commands/kb/index.js +1 -1
  125. package/lib/commands/kb/list.js +1 -1
  126. package/lib/commands/kb/search.js +1 -1
  127. package/lib/commands/kb/shared.js +1 -1
  128. package/lib/commands/kb/update.js +1 -1
  129. package/lib/commands/logs/index.js +1 -1
  130. package/lib/commands/menu/asset-update.js +1 -1
  131. package/lib/commands/menu/delete.js +1 -1
  132. package/lib/commands/menu/external-link-create.js +1 -1
  133. package/lib/commands/menu/external-link-update.js +1 -1
  134. package/lib/commands/menu/group-create.js +1 -1
  135. package/lib/commands/menu/group-update.js +1 -1
  136. package/lib/commands/menu/index.js +1 -1
  137. package/lib/commands/menu/list.js +1 -1
  138. package/lib/commands/menu/move.js +1 -1
  139. package/lib/commands/menu/regroup-start.js +1 -1
  140. package/lib/commands/menu/rename.js +1 -1
  141. package/lib/commands/menu/shared/compare-table.js +1 -1
  142. package/lib/commands/menu/shared/delete-plan.js +1 -1
  143. package/lib/commands/menu/shared/facts.js +1 -1
  144. package/lib/commands/menu/shared/index.js +1 -1
  145. package/lib/commands/menu/shared/inquirer.js +1 -1
  146. package/lib/commands/menu/shared/local-pages.js +1 -1
  147. package/lib/commands/menu/shared/logic.js +1 -1
  148. package/lib/commands/menu/shared/mutations.js +1 -1
  149. package/lib/commands/menu/shared/service.js +1 -1
  150. package/lib/commands/menu/shared/sync-core.js +1 -1
  151. package/lib/commands/menu/shared/update-core.js +1 -1
  152. package/lib/commands/menu/shared/valid-url.js +1 -1
  153. package/lib/commands/menu/sync.js +1 -1
  154. package/lib/commands/menu/visibility-update.js +1 -1
  155. package/lib/commands/notification/config-create.js +1 -1
  156. package/lib/commands/notification/config-delete.js +1 -1
  157. package/lib/commands/notification/config-list.js +1 -1
  158. package/lib/commands/notification/config-update.js +1 -1
  159. package/lib/commands/notification/index.js +1 -1
  160. package/lib/commands/notification/shared.js +1 -1
  161. package/lib/commands/ocr/index.js +1 -1
  162. package/lib/commands/page/create.js +1 -1
  163. package/lib/commands/page/custom/detail.js +1 -1
  164. package/lib/commands/page/custom/list.js +1 -1
  165. package/lib/commands/page/custom/publish.js +1 -1
  166. package/lib/commands/page/custom/shared.d.ts +0 -8
  167. package/lib/commands/page/custom/shared.js +1 -1
  168. package/lib/commands/page/custom/syntax.js +1 -1
  169. package/lib/commands/page/custom/update.js +1 -1
  170. package/lib/commands/page/data-list-status.js +1 -1
  171. package/lib/commands/page/generate-start.js +1 -1
  172. package/lib/commands/page/generate-status.js +1 -1
  173. package/lib/commands/page/index.js +1 -1
  174. package/lib/commands/page/pull.js +1 -1
  175. package/lib/commands/page/push.js +1 -1
  176. package/lib/commands/page/relation-audit.js +1 -1
  177. package/lib/commands/page/restore.js +1 -1
  178. package/lib/commands/page/shared.js +1 -1
  179. package/lib/commands/page/sync.js +1 -1
  180. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  181. package/lib/commands/project/create/format-elapsed.js +1 -1
  182. package/lib/commands/project/create/main.js +1 -1
  183. package/lib/commands/project/create/materialize-project-template.js +1 -1
  184. package/lib/commands/project/create/project-name.js +1 -1
  185. package/lib/commands/project/create/project-template-archive.js +1 -1
  186. package/lib/commands/project/create/project-template-path.js +1 -1
  187. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  188. package/lib/commands/project/create/use-format-code.js +1 -1
  189. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  190. package/lib/commands/project/domain-routing-sync.js +1 -1
  191. package/lib/commands/project/index.js +1 -1
  192. package/lib/commands/project/upgrade.js +1 -1
  193. package/lib/commands/registry.js +1 -1
  194. package/lib/commands/role/delete.js +1 -1
  195. package/lib/commands/role/detail.js +1 -1
  196. package/lib/commands/role/index.js +1 -1
  197. package/lib/commands/role/list.js +1 -1
  198. package/lib/commands/role/shared.js +1 -1
  199. package/lib/commands/role/update.js +1 -1
  200. package/lib/commands/role/user-add.js +1 -1
  201. package/lib/commands/role/user-remove.js +1 -1
  202. package/lib/commands/role/user-resolve.js +1 -1
  203. package/lib/commands/rule/get.js +1 -1
  204. package/lib/commands/rule/index.js +1 -1
  205. package/lib/commands/rule/list.js +1 -1
  206. package/lib/commands/rule/set.js +1 -1
  207. package/lib/commands/rule/shared.js +1 -1
  208. package/lib/commands/run/index.d.ts +4 -0
  209. package/lib/commands/run/index.js +1 -1
  210. package/lib/commands/schema.js +1 -1
  211. package/lib/commands/sql/create.js +1 -1
  212. package/lib/commands/sql/delete.js +1 -1
  213. package/lib/commands/sql/detail.js +1 -1
  214. package/lib/commands/sql/exec.js +1 -1
  215. package/lib/commands/sql/index.js +1 -1
  216. package/lib/commands/sql/list.js +1 -1
  217. package/lib/commands/sql/pull.js +1 -1
  218. package/lib/commands/sql/push.js +1 -1
  219. package/lib/commands/sql/shared.js +1 -1
  220. package/lib/commands/sql/status.js +1 -1
  221. package/lib/commands/sql/validate.js +1 -1
  222. package/lib/commands/task/index.js +1 -1
  223. package/lib/commands/task/status.js +1 -1
  224. package/lib/commands/tenant/index.js +1 -1
  225. package/lib/commands/tenant/members-list.js +1 -1
  226. package/lib/commands/tenant/shared.js +1 -1
  227. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  228. package/lib/commands/user-account/index.js +1 -1
  229. package/lib/commands/workspace/add.js +1 -1
  230. package/lib/commands/workspace/index.js +1 -1
  231. package/lib/commands/workspace/remove.js +1 -1
  232. package/lib/config/domain-config.js +1 -1
  233. package/lib/config/project-domain-routing.d.ts +5 -1
  234. package/lib/config/project-domain-routing.js +1 -1
  235. package/lib/config/schema.js +1 -1
  236. package/lib/constant/cdn.js +1 -1
  237. package/lib/constant/cli.js +1 -1
  238. package/lib/constant/defaults.js +1 -1
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.js +1 -1
  244. package/lib/constant/risk.js +1 -1
  245. package/lib/constant/routing-profile.js +1 -1
  246. package/lib/context/app-resolver.js +1 -1
  247. package/lib/context/auth-resolver.js +1 -1
  248. package/lib/context/config-loader.js +1 -1
  249. package/lib/context.js +1 -1
  250. package/lib/core/alias-resolver.js +1 -1
  251. package/lib/core/api-client.d.ts +0 -26
  252. package/lib/core/api-client.js +1 -1
  253. package/lib/core/bff/config.js +1 -1
  254. package/lib/core/bff/file-system.js +1 -1
  255. package/lib/core/bff/hash.js +1 -1
  256. package/lib/core/bff/lock.js +1 -1
  257. package/lib/core/bff/utils.js +1 -1
  258. package/lib/core/db-resolver.js +1 -1
  259. package/lib/core/instant-api-policy/config.js +1 -1
  260. package/lib/core/kb-search-client.js +1 -1
  261. package/lib/core/page/file-system.d.ts +43 -0
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/sql-index-auditor.js +1 -1
  266. package/lib/core/sql-sync/config.js +1 -1
  267. package/lib/core/sql-sync/file-system.js +1 -1
  268. package/lib/core/sql-sync/hash.js +1 -1
  269. package/lib/core/sql-sync/lock.js +1 -1
  270. package/lib/core/sql-sync/utils.js +1 -1
  271. package/lib/core/sql-validator.js +1 -1
  272. package/lib/errors.js +1 -1
  273. package/lib/framework/build-all-flags.js +1 -1
  274. package/lib/framework/error-output.js +1 -1
  275. package/lib/framework/explicit-yes.js +1 -1
  276. package/lib/framework/flags.js +1 -1
  277. package/lib/framework/help.js +1 -1
  278. package/lib/framework/index.js +1 -1
  279. package/lib/framework/output.js +1 -1
  280. package/lib/framework/response.js +1 -1
  281. package/lib/framework/runner-alias.js +1 -1
  282. package/lib/framework/runner.js +1 -1
  283. package/lib/framework/schema-export.js +1 -1
  284. package/lib/framework/supported-flags.js +1 -1
  285. package/lib/framework/types.js +1 -1
  286. package/lib/generated/build-info.d.ts +4 -4
  287. package/lib/generated/build-info.js +1 -1
  288. package/lib/generated/official-routing.js +1 -1
  289. package/lib/generated/routing-contract.js +1 -1
  290. package/lib/help.js +1 -1
  291. package/lib/postinstall.js +1 -1
  292. package/lib/runtime/confirmation.js +1 -1
  293. package/lib/runtime/event.js +1 -1
  294. package/lib/runtime/index.js +1 -1
  295. package/lib/runtime/queue.js +1 -1
  296. package/lib/runtime/resolve.js +1 -1
  297. package/lib/skills/builtin-skill.js +1 -1
  298. package/lib/skills/main.js +1 -1
  299. package/lib/skills/npx-skills-add.js +1 -1
  300. package/lib/skills/skill-presence.js +1 -1
  301. package/lib/telemetry/cli-command-trace.js +1 -1
  302. package/lib/telemetry/cli-help-trace.js +1 -1
  303. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  304. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  305. package/lib/telemetry/send-cli-trace-log.js +1 -1
  306. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  307. package/lib/utils/ai_config.js +1 -1
  308. package/lib/utils/apply-jq-filter.js +1 -1
  309. package/lib/utils/cdn-config.js +1 -1
  310. package/lib/utils/check-sdk-version.js +1 -1
  311. package/lib/utils/cli-version-check.js +1 -1
  312. package/lib/utils/cli-version-policy.js +1 -1
  313. package/lib/utils/config.js +1 -1
  314. package/lib/utils/entity-with-id.js +1 -1
  315. package/lib/utils/file-utils.js +1 -1
  316. package/lib/utils/guides-cdn.js +1 -1
  317. package/lib/utils/http-client.js +1 -1
  318. package/lib/utils/is-non-interactive.js +1 -1
  319. package/lib/utils/logger.js +1 -1
  320. package/lib/utils/params.js +1 -1
  321. package/lib/utils/platform.d.ts +6 -5
  322. package/lib/utils/platform.js +1 -1
  323. package/lib/utils/sleep.js +1 -1
  324. package/lib/utils/template-replacer.js +1 -1
  325. package/lib/utils/update-notice.js +1 -1
  326. package/lib/utils/version.js +1 -1
  327. package/lib/utils/with-active-cookie.js +1 -1
  328. package/lib/utils/write-cli-side-channel.js +1 -1
  329. package/package.json +2 -1
  330. package/skills/rabetbase/SKILL.md +5 -5
  331. package/skills/rabetbase/guides/custom-page-workflow.md +35 -17
  332. package/skills/rabetbase/guides/page-development-workflow.md +1 -1
  333. package/skills/rabetbase/knowledge/components.md +292 -0
  334. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +74 -4
  335. package/skills/rabetbase/knowledge/custom-page/page-templates.md +68 -0
  336. package/skills/rabetbase/references/rabetbase-page-create.md +21 -9
  337. package/skills/rabetbase/references/rabetbase-page-custom-detail.md +1 -1
  338. package/skills/rabetbase/references/rabetbase-page-custom-update.md +13 -9
  339. package/skills/rabetbase/references/rabetbase-project-create.md +5 -2
  340. package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +2 -2
  341. package/skills/rabetbase/references/rabetbase-run.md +1 -0
  342. package/skills/rabetbase.manifest.json +5 -4
  343. package/templates/README.md +10 -4
  344. package/templates/custom-pages/blank.json +5 -0
  345. package/templates/custom-pages/dashboard.json +5 -0
  346. package/templates/custom-pages/onepage.json +5 -0
  347. package/templates/generate-api/api.ts.tpl +1 -1
  348. package/lib/commands/page/custom/template.d.ts +0 -8
  349. package/lib/commands/page/custom/template.js +0 -1
  350. package/skills/rabetbase/knowledge/custom-page/components.md +0 -225
@@ -1 +1 @@
1
- (function(_0x54c0f0,_0xe60f47){const _0xdabae3=a147_0x3e34,_0x1cc2c2=_0x54c0f0();while(!![]){try{const _0x432ca6=parseInt(_0xdabae3(0x140))/0x1+parseInt(_0xdabae3(0x131))/0x2*(-parseInt(_0xdabae3(0x130))/0x3)+parseInt(_0xdabae3(0x14c))/0x4+-parseInt(_0xdabae3(0x147))/0x5+-parseInt(_0xdabae3(0x153))/0x6+-parseInt(_0xdabae3(0x150))/0x7*(-parseInt(_0xdabae3(0x136))/0x8)+-parseInt(_0xdabae3(0x144))/0x9*(-parseInt(_0xdabae3(0x13b))/0xa);if(_0x432ca6===_0xe60f47)break;else _0x1cc2c2['push'](_0x1cc2c2['shift']());}catch(_0x290a31){_0x1cc2c2['push'](_0x1cc2c2['shift']());}}}(a147_0x2c22,0xc3d47));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 a147_0x380cad,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1c8ad5,_0x5efceb){const _0x16fa33=a147_0x3e34,_0x41df16=getEnv();logger[_0x16fa33(0x138)]('get-online-menu-list',isProduction(_0x41df16)?_0x16fa33(0x14a)+_0x1c8ad5+')':_0x16fa33(0x152)+_0x1c8ad5+')');const _0x4f9f16=await fetchMenuSnapshot(_0x1c8ad5,_0x5efceb,{'verbose':!![]});return logger[_0x16fa33(0x138)](_0x16fa33(0x14e),_0x16fa33(0x13a)+_0x4f9f16[_0x16fa33(0x137)]+_0x16fa33(0x149)),_0x4f9f16[_0x16fa33(0x139)][_0x16fa33(0x142)](toProcessedMenuItem);}export async function createMenu(_0x2a603d,_0x3dc314,_0x41e8ca){const _0x9129f6=a147_0x3e34;logger[_0x9129f6(0x138)](_0x9129f6(0x132),_0x9129f6(0x133)+_0x41e8ca[_0x9129f6(0x145)]+'\x20('+_0x41e8ca[_0x9129f6(0x135)]+')');const _0x4a9b15={'appCode':_0x2a603d,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x41e8ca[_0x9129f6(0x151)]?JSON[_0x9129f6(0x148)](_0x41e8ca[_0x9129f6(0x151)]):undefined},..._0x41e8ca},_0x1a016a=await createMenuRecord(_0x4a9b15,_0x3dc314,_0x9129f6(0x12f)+_0x41e8ca['label']+'\x22');return logger[_0x9129f6(0x138)]('create-menu',_0x9129f6(0x14f)+_0x41e8ca[_0x9129f6(0x145)]),_0x1a016a;}async function createSingleMenu(_0x410515,_0x29a142,_0x3133a9,_0xd2c99c){const _0x491168=a147_0x3e34,_0x4d5525={'appCode':_0x410515,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0xd2c99c?JSON[_0x491168(0x148)](_0xd2c99c):undefined},'label':_0x3133a9[_0x491168(0x145)],'path':_0x3133a9[_0x491168(0x135)]},_0x174c0e=await createMenuRecord(_0x4d5525,_0x29a142,_0x491168(0x12f)+_0x3133a9[_0x491168(0x145)]+'\x22');return logger[_0x491168(0x138)]('create-menu',_0x491168(0x14f)+_0x3133a9[_0x491168(0x145)]),_0x174c0e;}function a147_0x2c22(){const _0x281574=['\x20menu','Start\x20batch\x20menu\x20creation,\x20total\x20','length','Update\x20menu\x20assets\x20\x22','256585iuFXUs','extend','map','update-menu-cdn-url','2284209bINFmH','label','Updating\x20menu\x20asset\x20links:\x20','4876235iVrjwI','stringify','\x20online\x20menus\x20successfully','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','loadScriptMode','2191932YhpDpD','\x20menu\x20group(s)','get-online-menu-list','Menu\x20created\x20successfully:\x20','581098CuYojq','resources','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','5058300BxjLVu','Delete\x20','Regroup\x20','all','Update\x20menu\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','Create\x20menu\x20\x22','12fpHiIo','190294ayXsxl','create-menu','Creating\x20menu:\x20','create-menus','path','16FCAocB','total','info','menus','Fetched\x20','80EvAPuE'];a147_0x2c22=function(){return _0x281574;};return a147_0x2c22();}export async function createMenus(_0x35b322,_0x467015,_0x2faa32,_0x208d1a){const _0x1fbf41=a147_0x3e34;logger['info']('create-menus',_0x1fbf41(0x13d)+_0x2faa32[_0x1fbf41(0x13e)]);const _0x4a1987=await Promise[_0x1fbf41(0x12c)](_0x2faa32[_0x1fbf41(0x142)](_0x385bd9=>createSingleMenu(_0x35b322,_0x467015,_0x385bd9,_0x208d1a)));return logger[_0x1fbf41(0x138)](_0x1fbf41(0x134),_0x1fbf41(0x12e)+_0x2faa32[_0x1fbf41(0x13e)]),_0x4a1987;}export async function updateMenuCdnUrl(_0x3dbcdb,_0x3261ed,_0x300a30){const _0x586e1d=a147_0x3e34;logger[_0x586e1d(0x138)](_0x586e1d(0x143),_0x586e1d(0x146)+_0x300a30[_0x586e1d(0x145)]+'\x20('+_0x300a30['path']+')');const _0x1a0cbc={'id':_0x300a30['id'],'appCode':_0x3dbcdb,'extend':{..._0x300a30[_0x586e1d(0x141)]??{},..._0x300a30[_0x586e1d(0x14b)]?{'loadScriptMode':_0x300a30[_0x586e1d(0x14b)]}:{},'resources':_0x300a30['resources']?JSON[_0x586e1d(0x148)](_0x300a30[_0x586e1d(0x151)]):undefined}},_0x4573f8=await updateMenuRecord(_0x1a0cbc,_0x3261ed,_0x586e1d(0x13f)+_0x300a30['label']+'\x22');return logger[_0x586e1d(0x138)](_0x586e1d(0x143),'Menu\x20assets\x20synced:\x20'+_0x300a30[_0x586e1d(0x145)],undefined),_0x4573f8;}export async function createMenuEntity(_0x524151,_0x567d35,_0x5b12c6){const _0x1882bc=a147_0x3e34;return createMenuRecord({'appCode':_0x524151,..._0x5b12c6},_0x567d35,'Create\x20menu\x20\x22'+_0x5b12c6[_0x1882bc(0x145)]+'\x22');}export async function updateMenuEntity(_0x431cf2,_0xed8d1c,_0x3ec151){const _0xa02641=a147_0x3e34;return updateMenuRecord({'appCode':_0x431cf2,..._0x3ec151},_0xed8d1c,_0xa02641(0x12d)+_0x3ec151['id']);}function a147_0x3e34(_0x4fee17,_0x1345c2){_0x4fee17=_0x4fee17-0x12b;const _0x2c2271=a147_0x2c22();let _0x3e348c=_0x2c2271[_0x4fee17];return _0x3e348c;}export async function batchDeleteMenuEntities(_0xa1c7c1,_0x27ec27){const _0x16ca62=a147_0x3e34;return batchDeleteMenuRecords(_0x27ec27,_0xa1c7c1,_0x16ca62(0x154)+_0x27ec27['length']+_0x16ca62(0x13c)+(_0x27ec27[_0x16ca62(0x13e)]===0x1?'':'s'));}export async function startMenuRegroup(_0x1c9620,_0x276afe){const _0x274feb=a147_0x3e34;return a147_0x380cad(_0x276afe,_0x1c9620,_0x274feb(0x12b)+_0x276afe['menuGroups'][_0x274feb(0x13e)]+_0x274feb(0x14d));}
1
+ (function(_0x57d30e,_0x4dbe2c){const _0x564946=a147_0x3c15,_0x2b953f=_0x57d30e();while(!![]){try{const _0x3f20d2=-parseInt(_0x564946(0x18d))/0x1*(parseInt(_0x564946(0x192))/0x2)+-parseInt(_0x564946(0x196))/0x3+parseInt(_0x564946(0x187))/0x4*(-parseInt(_0x564946(0x185))/0x5)+parseInt(_0x564946(0x175))/0x6+parseInt(_0x564946(0x184))/0x7+parseInt(_0x564946(0x178))/0x8*(parseInt(_0x564946(0x18c))/0x9)+parseInt(_0x564946(0x19b))/0xa*(parseInt(_0x564946(0x195))/0xb);if(_0x3f20d2===_0x4dbe2c)break;else _0x2b953f['push'](_0x2b953f['shift']());}catch(_0x415413){_0x2b953f['push'](_0x2b953f['shift']());}}}(a147_0x2542,0xbbdd7));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 a147_0x2ce8cc,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0xf8c547,_0x74d2f9){const _0x5b2e5f=a147_0x3c15,_0x29676a=getEnv();logger[_0x5b2e5f(0x179)]('get-online-menu-list',isProduction(_0x29676a)?_0x5b2e5f(0x183)+_0xf8c547+')':_0x5b2e5f(0x180)+_0xf8c547+')');const _0x334f23=await fetchMenuSnapshot(_0xf8c547,_0x74d2f9,{'verbose':!![]});return logger[_0x5b2e5f(0x179)](_0x5b2e5f(0x191),_0x5b2e5f(0x193)+_0x334f23[_0x5b2e5f(0x19c)]+'\x20online\x20menus\x20successfully'),_0x334f23[_0x5b2e5f(0x17f)][_0x5b2e5f(0x17e)](toProcessedMenuItem);}export async function createMenu(_0x29b2bd,_0x5b79b3,_0x29844e){const _0x425084=a147_0x3c15;logger[_0x425084(0x179)](_0x425084(0x189),'Creating\x20menu:\x20'+_0x29844e[_0x425084(0x194)]+'\x20('+_0x29844e['path']+')');const _0x22907a={'appCode':_0x29b2bd,'type':_0x425084(0x18b),'sort':0x0,'extend':{'loadScriptMode':_0x425084(0x186),'resources':_0x29844e['resources']?JSON[_0x425084(0x188)](_0x29844e[_0x425084(0x17d)]):undefined},..._0x29844e},_0x452b70=await createMenuRecord(_0x22907a,_0x5b79b3,'Create\x20menu\x20\x22'+_0x29844e[_0x425084(0x194)]+'\x22');return logger[_0x425084(0x179)](_0x425084(0x189),_0x425084(0x190)+_0x29844e[_0x425084(0x194)]),_0x452b70;}async function createSingleMenu(_0x3c6fff,_0x2ae5fe,_0x58d47c,_0x33578c){const _0x25900f=a147_0x3c15,_0x27e14d={'appCode':_0x3c6fff,'type':_0x25900f(0x18b),'sort':0x0,'extend':{'loadScriptMode':_0x25900f(0x186),'resources':_0x33578c?JSON[_0x25900f(0x188)](_0x33578c):undefined},'label':_0x58d47c['label'],'path':_0x58d47c[_0x25900f(0x199)]},_0x57b0b4=await createMenuRecord(_0x27e14d,_0x2ae5fe,_0x25900f(0x176)+_0x58d47c[_0x25900f(0x194)]+'\x22');return logger[_0x25900f(0x179)]('create-menu',_0x25900f(0x190)+_0x58d47c[_0x25900f(0x194)]),_0x57b0b4;}export async function createMenus(_0x4d8aca,_0x518190,_0x29bc2f,_0xf9309c){const _0x4482dc=a147_0x3c15;logger[_0x4482dc(0x179)](_0x4482dc(0x18f),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x29bc2f[_0x4482dc(0x197)]);const _0x47f898=await Promise[_0x4482dc(0x182)](_0x29bc2f[_0x4482dc(0x17e)](_0x341193=>createSingleMenu(_0x4d8aca,_0x518190,_0x341193,_0xf9309c)));return logger['info'](_0x4482dc(0x18f),_0x4482dc(0x18a)+_0x29bc2f[_0x4482dc(0x197)]),_0x47f898;}export async function updateMenuCdnUrl(_0x383753,_0x456aa8,_0x7d5d11){const _0x1b8b47=a147_0x3c15;logger[_0x1b8b47(0x179)]('update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20'+_0x7d5d11['label']+'\x20('+_0x7d5d11[_0x1b8b47(0x199)]+')');const _0x325d25={'id':_0x7d5d11['id'],'appCode':_0x383753,'extend':{..._0x7d5d11[_0x1b8b47(0x17b)]??{},..._0x7d5d11[_0x1b8b47(0x174)]?{'loadScriptMode':_0x7d5d11[_0x1b8b47(0x174)]}:{},'resources':_0x7d5d11[_0x1b8b47(0x17d)]?JSON[_0x1b8b47(0x188)](_0x7d5d11['resources']):undefined}},_0x16f8f8=await updateMenuRecord(_0x325d25,_0x456aa8,_0x1b8b47(0x18e)+_0x7d5d11['label']+'\x22');return logger[_0x1b8b47(0x179)](_0x1b8b47(0x181),_0x1b8b47(0x198)+_0x7d5d11[_0x1b8b47(0x194)],undefined),_0x16f8f8;}function a147_0x2542(){const _0x454d8e=['Regroup\x20','resources','map','menus','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','update-menu-cdn-url','all','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','1932035iuNnxR','535aYvuGQ','import','744vzwfGi','stringify','create-menu','Batch\x20menu\x20creation\x20completed,\x20total\x20','procode','27ZNLDel','175810VlgMzH','Update\x20menu\x20assets\x20\x22','create-menus','Menu\x20created\x20successfully:\x20','get-online-menu-list','10gkliDq','Fetched\x20','label','1640133efbQwr','3982362pKwDRU','length','Menu\x20assets\x20synced:\x20','path','menuGroups','140pVBVVz','total','loadScriptMode','2235006zGMWJY','Create\x20menu\x20\x22','\x20menu\x20group(s)','693208cbwsAT','info','\x20menu','extend'];a147_0x2542=function(){return _0x454d8e;};return a147_0x2542();}function a147_0x3c15(_0x42f111,_0x41337d){_0x42f111=_0x42f111-0x174;const _0x2542f2=a147_0x2542();let _0x3c155b=_0x2542f2[_0x42f111];return _0x3c155b;}export async function createMenuEntity(_0x8495ee,_0x17d3eb,_0x559526){const _0x267a7d=a147_0x3c15;return createMenuRecord({'appCode':_0x8495ee,..._0x559526},_0x17d3eb,_0x267a7d(0x176)+_0x559526['label']+'\x22');}export async function updateMenuEntity(_0x5d39a9,_0x2fd64d,_0x4263e0){return updateMenuRecord({'appCode':_0x5d39a9,..._0x4263e0},_0x2fd64d,'Update\x20menu\x20'+_0x4263e0['id']);}export async function batchDeleteMenuEntities(_0x22557e,_0x1077a3){const _0x38a9c9=a147_0x3c15;return batchDeleteMenuRecords(_0x1077a3,_0x22557e,'Delete\x20'+_0x1077a3['length']+_0x38a9c9(0x17a)+(_0x1077a3[_0x38a9c9(0x197)]===0x1?'':'s'));}export async function startMenuRegroup(_0x116279,_0x4844d6){const _0xd66aaa=a147_0x3c15;return a147_0x2ce8cc(_0x4844d6,_0x116279,_0xd66aaa(0x17c)+_0x4844d6[_0xd66aaa(0x19a)][_0xd66aaa(0x197)]+_0xd66aaa(0x177));}
@@ -1 +1 @@
1
- const a148_0x23bed3=a148_0x5df4;(function(_0x2b7024,_0x1ba882){const _0x473f1c=a148_0x5df4,_0x360252=_0x2b7024();while(!![]){try{const _0x317938=parseInt(_0x473f1c(0xba))/0x1*(-parseInt(_0x473f1c(0xb5))/0x2)+-parseInt(_0x473f1c(0xc9))/0x3*(parseInt(_0x473f1c(0xc7))/0x4)+-parseInt(_0x473f1c(0xbc))/0x5+-parseInt(_0x473f1c(0xc6))/0x6+parseInt(_0x473f1c(0xcc))/0x7+parseInt(_0x473f1c(0xca))/0x8+-parseInt(_0x473f1c(0xb0))/0x9*(-parseInt(_0x473f1c(0xa0))/0xa);if(_0x317938===_0x1ba882)break;else _0x360252['push'](_0x360252['shift']());}catch(_0x487d45){_0x360252['push'](_0x360252['shift']());}}}(a148_0x4a52,0xc1179));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';function a148_0x4a52(){const _0x497d0f=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','9jQLmNS','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params\x20JSON.','label','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','6IMVWTb','string','map','isArray','Invalid\x20--params\x20fields:\x20','243824GCvCIn','Start\x20non-interactive\x20menu\x20sync','6702455XvLpij','No\x20local\x20pages\x20matched\x20paths:\x20','object','path','field','trim','--params.','message','dryRun','info','6419178CowgNW','784156GoNdVn','has','24cOWQLD','4890008OlIMGU','length','636237mBFNxS','Menu\x20sync\x20completed','filter','47989010oAtYXg','cssUrl','cwd','push','join','pages','import','menu-sync','procode','parse','Invalid\x20--params:\x20','setLogPath','\x0a\x20\x20Available\x20local\x20paths:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','jsUrl'];a148_0x4a52=function(){return _0x497d0f;};return a148_0x4a52();}import{logger}from'../../../utils/logger.js';function a148_0x5df4(_0x14b755,_0x346e1f){_0x14b755=_0x14b755-0x9f;const _0x4a52cc=a148_0x4a52();let _0x5df406=_0x4a52cc[_0x14b755];return _0x5df406;}const MENU_SYNC_PARAM_KEYS=new Set([a148_0x23bed3(0xae),a148_0x23bed3(0xa1)]);function validateParams(_0x303ffc){const _0x1ed852=a148_0x23bed3,_0x1e8f41=[];return _0x303ffc[_0x1ed852(0xae)]&&!isValidJsHttpsUrl(_0x303ffc[_0x1ed852(0xae)])&&_0x1e8f41['push']({'field':_0x1ed852(0xae),'message':_0x1ed852(0xaf)}),_0x303ffc[_0x1ed852(0xa1)]&&!isValidCssHttpsUrl(_0x303ffc[_0x1ed852(0xa1)])&&_0x1e8f41[_0x1ed852(0xa3)]({'field':_0x1ed852(0xa1),'message':_0x1ed852(0xad)}),_0x1e8f41;}export async function runMenuSyncCore(_0x35553e,_0x5585d9,_0x57e27f=[],_0x11647b,_0x2e8d54={}){const _0x48e50f=a148_0x23bed3,_0x200d16=parseMenuSyncParams(_0x11647b),_0x3c9dd8=[...new Set(_0x57e27f['map'](_0x33a67e=>_0x33a67e[_0x48e50f(0xc1)]())[_0x48e50f(0x9f)](Boolean))],_0xc6a019=_0x200d16[_0x48e50f(0xae)],_0x5d134a=_0x200d16[_0x48e50f(0xa1)],_0x119a81=[];if(_0xc6a019)_0x119a81[_0x48e50f(0xa3)](_0xc6a019);if(_0x5d134a)_0x119a81[_0x48e50f(0xa3)](_0x5d134a);const _0xf92687=validateParams(_0x200d16);if(_0xf92687[_0x48e50f(0xcb)]>0x0){const _0x2c8075=_0xf92687['map'](_0x72fcae=>_0x48e50f(0xc2)+_0x72fcae[_0x48e50f(0xc0)]+':\x20'+_0x72fcae[_0x48e50f(0xc3)])['join'](';\x20');throw new Error(_0x48e50f(0xaa)+_0x2c8075);}logger[_0x48e50f(0xab)](process[_0x48e50f(0xa2)]()),logger['info']('menu-sync',_0x48e50f(0xbb),{'appCode':_0x35553e,'selectedCount':_0x3c9dd8['length'],'jsUrl':_0xc6a019,'cssUrl':_0x5d134a});if(_0xc6a019){const _0x1681eb=await isUrlReachable(_0xc6a019);if(!_0x1681eb)throw new Error(_0x48e50f(0xb1)+_0xc6a019);}if(_0x5d134a){const _0x1b5609=await isUrlReachable(_0x5d134a);if(!_0x1b5609)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x5d134a);}const _0x2523a0=getLocalPages();if(_0x2523a0['length']===0x0){if(_0x3c9dd8['length']>0x0)throw new Error(_0x48e50f(0xbd)+_0x3c9dd8['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x2e8d54[_0x48e50f(0xc4)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x4d70da=await getOnlineMenuList(_0x35553e,_0x5585d9),_0x56e147=new Set(_0x4d70da['map'](_0x425418=>_0x425418[_0x48e50f(0xbf)]));let _0x1a6482;if(_0x3c9dd8[_0x48e50f(0xcb)]>0x0){const _0x2baae2=new Map(_0x2523a0[_0x48e50f(0xb7)](_0x310c90=>[_0x310c90[_0x48e50f(0xbf)],_0x310c90])),_0x651b0e=_0x3c9dd8[_0x48e50f(0x9f)](_0x2e4109=>!_0x2baae2[_0x48e50f(0xc8)](_0x2e4109));if(_0x651b0e[_0x48e50f(0xcb)]>0x0){const _0x1bec0c=_0x2523a0[_0x48e50f(0xb7)](_0x555f7f=>_0x555f7f[_0x48e50f(0xbf)])['join'](',\x20');throw new Error(_0x48e50f(0xbd)+_0x651b0e[_0x48e50f(0xa4)](',\x20')+_0x48e50f(0xac)+_0x1bec0c);}const _0xc48b3c=_0x3c9dd8[_0x48e50f(0x9f)](_0x3882e3=>_0x56e147['has'](_0x3882e3));if(_0xc48b3c[_0x48e50f(0xcb)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0xc48b3c['join'](',\x20'));_0x1a6482=_0x3c9dd8[_0x48e50f(0xb7)](_0x51ed06=>_0x2baae2['get'](_0x51ed06));}else _0x1a6482=_0x2523a0[_0x48e50f(0x9f)](_0x4a34c4=>!_0x56e147[_0x48e50f(0xc8)](_0x4a34c4[_0x48e50f(0xbf)]));if(_0x1a6482['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x2e8d54['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x100d0d=_0x1a6482[_0x48e50f(0xb7)](_0xfbc2b9=>({'type':_0x48e50f(0xa8),'path':_0xfbc2b9[_0x48e50f(0xbf)],'label':_0xfbc2b9[_0x48e50f(0xb3)],'loadScriptMode':_0x48e50f(0xa6),'resources':[..._0x119a81]}));if(_0x2e8d54[_0x48e50f(0xc4)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1a6482,'plannedMenus':_0x100d0d};const _0x4f1337=await createMenus(_0x35553e,_0x5585d9,_0x1a6482,_0x119a81[_0x48e50f(0xcb)]>0x0?_0x119a81:undefined);return logger[_0x48e50f(0xc5)](_0x48e50f(0xa7),_0x48e50f(0xcd),{'count':_0x1a6482[_0x48e50f(0xcb)],'resources':_0x119a81}),{'created':_0x4f1337['length'],'skipped':![],'dryRun':![],'targetPages':_0x1a6482,'plannedMenus':_0x100d0d,'menus':_0x4f1337};}export function parseMenuSyncParams(_0x16a15e){const _0x25d392=a148_0x23bed3;if(!_0x16a15e||typeof _0x16a15e!==_0x25d392(0xb6))return{};let _0x5cf855;try{_0x5cf855=JSON[_0x25d392(0xa9)](_0x16a15e);}catch{throw new Error(_0x25d392(0xb2));}if(typeof _0x5cf855!==_0x25d392(0xbe)||_0x5cf855===null||Array[_0x25d392(0xb8)](_0x5cf855))throw new Error(_0x25d392(0xb4));const _0x418c81=_0x5cf855;if(Object['hasOwn'](_0x418c81,_0x25d392(0xa5)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x2838a4=Object['keys'](_0x418c81)[_0x25d392(0x9f)](_0x36c828=>!MENU_SYNC_PARAM_KEYS[_0x25d392(0xc8)](_0x36c828));if(_0x2838a4[_0x25d392(0xcb)]>0x0)throw new Error(_0x25d392(0xb9)+_0x2838a4[_0x25d392(0xa4)](',\x20')+'.');for(const _0x92d681 of MENU_SYNC_PARAM_KEYS){const _0x57ee97=_0x418c81[_0x92d681];if(_0x57ee97!==undefined&&(typeof _0x57ee97!=='string'||_0x57ee97['trim']()===''))throw new Error('Invalid\x20--params.'+_0x92d681+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x418c81[_0x25d392(0xae)]===_0x25d392(0xb6)?_0x418c81['jsUrl'][_0x25d392(0xc1)]():undefined,'cssUrl':typeof _0x418c81[_0x25d392(0xa1)]===_0x25d392(0xb6)?_0x418c81['cssUrl'][_0x25d392(0xc1)]():undefined};}
1
+ const a148_0x4cfd1f=a148_0x2eff;(function(_0x4e569f,_0x570d43){const _0x11a5e0=a148_0x2eff,_0x193018=_0x4e569f();while(!![]){try{const _0x316e47=parseInt(_0x11a5e0(0x180))/0x1+parseInt(_0x11a5e0(0x168))/0x2*(parseInt(_0x11a5e0(0x165))/0x3)+-parseInt(_0x11a5e0(0x16b))/0x4*(parseInt(_0x11a5e0(0x15d))/0x5)+-parseInt(_0x11a5e0(0x176))/0x6*(-parseInt(_0x11a5e0(0x154))/0x7)+-parseInt(_0x11a5e0(0x155))/0x8+parseInt(_0x11a5e0(0x16d))/0x9+parseInt(_0x11a5e0(0x153))/0xa*(-parseInt(_0x11a5e0(0x178))/0xb);if(_0x316e47===_0x570d43)break;else _0x193018['push'](_0x193018['shift']());}catch(_0x428215){_0x193018['push'](_0x193018['shift']());}}}(a148_0xc040,0xbe953));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';function a148_0x2eff(_0x53398a,_0x4268eb){_0x53398a=_0x53398a-0x150;const _0xc040b5=a148_0xc040();let _0x2effb4=_0xc040b5[_0x53398a];return _0x2effb4;}import{logger}from'../../../utils/logger.js';function a148_0xc040(){const _0x2548ba=['56DEpqXh','Start\x20non-interactive\x20menu\x20sync','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','517656RpxAZv','JS\x20URL\x20is\x20unreachable:\x20','4443912QsuIOy','push','setLogPath','cwd','Invalid\x20--params\x20JSON.','Invalid\x20--params\x20fields:\x20','--params.','keys','string','6PrVtrr','map','100991ImODKr','path','label','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params.','import','dryRun','Invalid\x20--params:\x20','1091856wSvYCd','get','jsUrl','join','object','procode','130FpbgpV','540295occAxi','4348744YLXrlR','No\x20local\x20pages\x20matched\x20paths:\x20','field','info','filter','hasOwn','trim','isArray','10KshRWJ','has','length','cssUrl','\x0a\x20\x20Available\x20local\x20paths:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','message','Menu\x20sync\x20completed','4242xMBuCo','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.'];a148_0xc040=function(){return _0x2548ba;};return a148_0xc040();}const MENU_SYNC_PARAM_KEYS=new Set([a148_0x4cfd1f(0x182),a148_0x4cfd1f(0x160)]);function validateParams(_0x24599d){const _0x43167c=a148_0x4cfd1f,_0x255637=[];return _0x24599d['jsUrl']&&!isValidJsHttpsUrl(_0x24599d['jsUrl'])&&_0x255637[_0x43167c(0x16e)]({'field':_0x43167c(0x182),'message':_0x43167c(0x166)}),_0x24599d['cssUrl']&&!isValidCssHttpsUrl(_0x24599d[_0x43167c(0x160)])&&_0x255637[_0x43167c(0x16e)]({'field':'cssUrl','message':_0x43167c(0x162)}),_0x255637;}export async function runMenuSyncCore(_0x4783aa,_0x4f0837,_0x4faeab=[],_0x19f620,_0x937bc2={}){const _0x495a99=a148_0x4cfd1f,_0x37d595=parseMenuSyncParams(_0x19f620),_0x5197b5=[...new Set(_0x4faeab[_0x495a99(0x177)](_0x15f0c2=>_0x15f0c2[_0x495a99(0x15b)]())[_0x495a99(0x159)](Boolean))],_0x503098=_0x37d595['jsUrl'],_0x5d7846=_0x37d595[_0x495a99(0x160)],_0x349bbf=[];if(_0x503098)_0x349bbf['push'](_0x503098);if(_0x5d7846)_0x349bbf[_0x495a99(0x16e)](_0x5d7846);const _0x1f7801=validateParams(_0x37d595);if(_0x1f7801[_0x495a99(0x15f)]>0x0){const _0x2d5ecb=_0x1f7801['map'](_0x57b151=>_0x495a99(0x173)+_0x57b151[_0x495a99(0x157)]+':\x20'+_0x57b151[_0x495a99(0x163)])[_0x495a99(0x150)](';\x20');throw new Error(_0x495a99(0x17f)+_0x2d5ecb);}logger[_0x495a99(0x16f)](process[_0x495a99(0x170)]()),logger['info']('menu-sync',_0x495a99(0x169),{'appCode':_0x4783aa,'selectedCount':_0x5197b5['length'],'jsUrl':_0x503098,'cssUrl':_0x5d7846});if(_0x503098){const _0x131421=await isUrlReachable(_0x503098);if(!_0x131421)throw new Error(_0x495a99(0x16c)+_0x503098);}if(_0x5d7846){const _0x412695=await isUrlReachable(_0x5d7846);if(!_0x412695)throw new Error(_0x495a99(0x17b)+_0x5d7846);}const _0xe669a3=getLocalPages();if(_0xe669a3['length']===0x0){if(_0x5197b5[_0x495a99(0x15f)]>0x0)throw new Error(_0x495a99(0x156)+_0x5197b5[_0x495a99(0x150)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x937bc2[_0x495a99(0x17e)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x584ae=await getOnlineMenuList(_0x4783aa,_0x4f0837),_0x27998a=new Set(_0x584ae['map'](_0x5030eb=>_0x5030eb[_0x495a99(0x179)]));let _0x4b18b6;if(_0x5197b5[_0x495a99(0x15f)]>0x0){const _0xb6094b=new Map(_0xe669a3['map'](_0x16b22d=>[_0x16b22d[_0x495a99(0x179)],_0x16b22d])),_0x5d99f4=_0x5197b5[_0x495a99(0x159)](_0x11de01=>!_0xb6094b[_0x495a99(0x15e)](_0x11de01));if(_0x5d99f4['length']>0x0){const _0x1a9643=_0xe669a3[_0x495a99(0x177)](_0x43767c=>_0x43767c['path'])[_0x495a99(0x150)](',\x20');throw new Error(_0x495a99(0x156)+_0x5d99f4[_0x495a99(0x150)](',\x20')+_0x495a99(0x161)+_0x1a9643);}const _0x3903f0=_0x5197b5[_0x495a99(0x159)](_0x4bca9f=>_0x27998a[_0x495a99(0x15e)](_0x4bca9f));if(_0x3903f0[_0x495a99(0x15f)]>0x0)throw new Error(_0x495a99(0x16a)+_0x3903f0[_0x495a99(0x150)](',\x20'));_0x4b18b6=_0x5197b5['map'](_0x102e50=>_0xb6094b[_0x495a99(0x181)](_0x102e50));}else _0x4b18b6=_0xe669a3[_0x495a99(0x159)](_0x244a51=>!_0x27998a[_0x495a99(0x15e)](_0x244a51[_0x495a99(0x179)]));if(_0x4b18b6['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x937bc2[_0x495a99(0x17e)]===!![],'targetPages':[],'plannedMenus':[]};const _0x242629=_0x4b18b6[_0x495a99(0x177)](_0x4e9705=>({'type':_0x495a99(0x152),'path':_0x4e9705['path'],'label':_0x4e9705[_0x495a99(0x17a)],'loadScriptMode':_0x495a99(0x17d),'resources':[..._0x349bbf]}));if(_0x937bc2[_0x495a99(0x17e)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4b18b6,'plannedMenus':_0x242629};const _0x436d37=await createMenus(_0x4783aa,_0x4f0837,_0x4b18b6,_0x349bbf[_0x495a99(0x15f)]>0x0?_0x349bbf:undefined);return logger[_0x495a99(0x158)]('menu-sync',_0x495a99(0x164),{'count':_0x4b18b6['length'],'resources':_0x349bbf}),{'created':_0x436d37[_0x495a99(0x15f)],'skipped':![],'dryRun':![],'targetPages':_0x4b18b6,'plannedMenus':_0x242629,'menus':_0x436d37};}export function parseMenuSyncParams(_0x3f7c7e){const _0x3a0f23=a148_0x4cfd1f;if(!_0x3f7c7e||typeof _0x3f7c7e!==_0x3a0f23(0x175))return{};let _0x423b8b;try{_0x423b8b=JSON['parse'](_0x3f7c7e);}catch{throw new Error(_0x3a0f23(0x171));}if(typeof _0x423b8b!==_0x3a0f23(0x151)||_0x423b8b===null||Array[_0x3a0f23(0x15c)](_0x423b8b))throw new Error(_0x3a0f23(0x167));const _0x4ad80d=_0x423b8b;if(Object[_0x3a0f23(0x15a)](_0x4ad80d,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x5bd8a7=Object[_0x3a0f23(0x174)](_0x4ad80d)[_0x3a0f23(0x159)](_0x54c495=>!MENU_SYNC_PARAM_KEYS[_0x3a0f23(0x15e)](_0x54c495));if(_0x5bd8a7['length']>0x0)throw new Error(_0x3a0f23(0x172)+_0x5bd8a7[_0x3a0f23(0x150)](',\x20')+'.');for(const _0x344448 of MENU_SYNC_PARAM_KEYS){const _0x140e38=_0x4ad80d[_0x344448];if(_0x140e38!==undefined&&(typeof _0x140e38!==_0x3a0f23(0x175)||_0x140e38[_0x3a0f23(0x15b)]()===''))throw new Error(_0x3a0f23(0x17c)+_0x344448+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x4ad80d[_0x3a0f23(0x182)]===_0x3a0f23(0x175)?_0x4ad80d[_0x3a0f23(0x182)][_0x3a0f23(0x15b)]():undefined,'cssUrl':typeof _0x4ad80d[_0x3a0f23(0x160)]===_0x3a0f23(0x175)?_0x4ad80d['cssUrl'][_0x3a0f23(0x15b)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x3d0522,_0x568f98){const _0x1e92d8=a150_0x5ca0,_0x5a5e5b=_0x3d0522();while(!![]){try{const _0x1a4849=-parseInt(_0x1e92d8(0x96))/0x1+-parseInt(_0x1e92d8(0xb6))/0x2*(-parseInt(_0x1e92d8(0x9a))/0x3)+-parseInt(_0x1e92d8(0x84))/0x4*(-parseInt(_0x1e92d8(0x7d))/0x5)+parseInt(_0x1e92d8(0x93))/0x6*(-parseInt(_0x1e92d8(0xb3))/0x7)+parseInt(_0x1e92d8(0x8c))/0x8+parseInt(_0x1e92d8(0x7e))/0x9+-parseInt(_0x1e92d8(0x9c))/0xa;if(_0x1a4849===_0x568f98)break;else _0x5a5e5b['push'](_0x5a5e5b['shift']());}catch(_0x5af225){_0x5a5e5b['push'](_0x5a5e5b['shift']());}}}(a150_0x3193,0x2b3bc));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a150_0x5ca0(_0x565057,_0x299f0d){_0x565057=_0x565057-0x7c;const _0x319328=a150_0x3193();let _0x5ca003=_0x319328[_0x565057];return _0x5ca003;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x573ba7){const _0x5db820=a150_0x5ca0,_0x49b7d6=[];return _0x573ba7['jsUrl']&&!isValidJsHttpsUrl(_0x573ba7[_0x5db820(0x8d)])&&_0x49b7d6[_0x5db820(0xa4)]({'field':_0x5db820(0x8d),'message':_0x5db820(0x95)}),_0x573ba7[_0x5db820(0xbd)]&&!isValidCssHttpsUrl(_0x573ba7[_0x5db820(0xbd)])&&_0x49b7d6['push']({'field':_0x5db820(0xbd),'message':_0x5db820(0xab)}),_0x49b7d6;}export async function runMenuUpdateCore(_0x30a4dc,_0x4b9b54,_0x464579,_0x4fb2fb={}){const _0x3ec712=a150_0x5ca0,_0x803608=parseUpdateParamsFlag(_0x464579),_0x1cdc13=normalizeMode(_0x4fb2fb[_0x3ec712(0xbb)]);validateSelection(_0x4fb2fb[_0x3ec712(0x85)]);const _0x38a266=[];if(_0x803608['jsUrl'])_0x38a266['push'](_0x803608['jsUrl']);if(_0x803608[_0x3ec712(0xbd)])_0x38a266[_0x3ec712(0xa4)](_0x803608['cssUrl']);const _0x32f693=validateParams(_0x803608);if(_0x32f693[_0x3ec712(0xbe)]>0x0){const _0x18c847=_0x32f693[_0x3ec712(0x87)](_0x33928d=>_0x3ec712(0x90)+_0x33928d[_0x3ec712(0xba)]+':\x20'+_0x33928d[_0x3ec712(0x81)])[_0x3ec712(0xb1)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x18c847);}if(_0x38a266[_0x3ec712(0xbe)]===0x0)throw new Error(_0x3ec712(0xa3)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x3ec712(0x8e)](process[_0x3ec712(0x80)]()),logger[_0x3ec712(0x99)]('menu-asset-update','Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x30a4dc,'jsUrl':_0x803608['jsUrl'],'cssUrl':_0x803608[_0x3ec712(0xbd)],'mode':_0x1cdc13,'dryRun':_0x4fb2fb[_0x3ec712(0xaa)]===!![]});if(_0x803608[_0x3ec712(0x8d)]){const _0x3b8a79=await isUrlReachable(_0x803608['jsUrl']);if(!_0x3b8a79)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x803608[_0x3ec712(0x8d)]);}if(_0x803608[_0x3ec712(0xbd)]){const _0x2d5ec5=await isUrlReachable(_0x803608['cssUrl']);if(!_0x2d5ec5)throw new Error(_0x3ec712(0xae)+_0x803608['cssUrl']);}const _0x9a8028=await getOnlineMenuList(_0x30a4dc,_0x4b9b54),_0x2721bc=_0x9a8028['filter'](_0x5ccbef=>_0x5ccbef[_0x3ec712(0xb4)][_0x3ec712(0xbe)]>0x0),_0x4691d0=selectMenusForUpdate(_0x2721bc,_0x4fb2fb['selection']);if(_0x4691d0['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4fb2fb[_0x3ec712(0xaa)]===!![]};const _0x549f44=_0x4691d0[_0x3ec712(0x87)](_0x39f75c=>buildMenuUpdateDiff(_0x39f75c,_0x803608,_0x1cdc13,_0x4fb2fb['force']===!![],_0x4fb2fb[_0x3ec712(0xad)]));if(_0x4fb2fb['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x549f44};const _0x597974=await Promise['allSettled'](_0x4691d0[_0x3ec712(0x87)]((_0x24f27c,_0x1246ee)=>updateMenuCdnUrl(_0x30a4dc,_0x4b9b54,{'id':_0x24f27c['id'],'label':_0x24f27c[_0x3ec712(0x7c)],'path':_0x24f27c[_0x3ec712(0xbf)],'resources':_0x549f44[_0x1246ee][_0x3ec712(0xa9)][_0x3ec712(0xb4)],'extend':_0x24f27c[_0x3ec712(0xa2)]??null,'loadScriptMode':_0x4fb2fb[_0x3ec712(0xad)]}))),_0x13e503=_0x597974[_0x3ec712(0x92)](_0x2c1ffa=>_0x2c1ffa[_0x3ec712(0xac)]===_0x3ec712(0xa0))[_0x3ec712(0x87)](_0x54b404=>_0x54b404[_0x3ec712(0xa1)]),_0x2091ed=_0x597974[_0x3ec712(0x92)](_0x4c306f=>_0x4c306f[_0x3ec712(0xac)]==='rejected')[_0x3ec712(0xbe)];return logger[_0x3ec712(0x99)](_0x3ec712(0x9b),'Menu\x20asset\x20update\x20completed',{'count':_0x4691d0[_0x3ec712(0xbe)],'resources':_0x38a266}),{'updated':_0x13e503[_0x3ec712(0xbe)],'failed':_0x2091ed,'skipped':![],'menus':_0x13e503};}function validateSelection(_0x18e6db){const _0x4ab94c=a150_0x5ca0;if(!_0x18e6db)throw new Error(_0x4ab94c(0x98));if(_0x18e6db[_0x4ab94c(0x7f)]&&(_0x18e6db[_0x4ab94c(0xbc)][_0x4ab94c(0xbe)]>0x0||_0x18e6db[_0x4ab94c(0x88)][_0x4ab94c(0xbe)]>0x0))throw new Error(_0x4ab94c(0x97));if(!_0x18e6db[_0x4ab94c(0x7f)]&&_0x18e6db[_0x4ab94c(0xbc)][_0x4ab94c(0xbe)]===0x0&&_0x18e6db[_0x4ab94c(0x88)][_0x4ab94c(0xbe)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x3ded97,_0x3640a0){const _0x12eb46=a150_0x5ca0;validateSelection(_0x3640a0);if(_0x3640a0[_0x12eb46(0x7f)])return _0x3ded97;const _0x51906a=new Set(_0x3ded97[_0x12eb46(0x87)](_0x3b0a11=>_0x3b0a11['id'])),_0x5a8219=new Set(_0x3ded97[_0x12eb46(0x87)](_0x4d9adc=>_0x4d9adc[_0x12eb46(0xbf)])),_0x5500bf=_0x3640a0[_0x12eb46(0xbc)][_0x12eb46(0x92)](_0x5dfb9e=>!_0x51906a[_0x12eb46(0x8f)](_0x5dfb9e)),_0x10397e=_0x3640a0[_0x12eb46(0x88)][_0x12eb46(0x92)](_0x2aed5c=>!_0x5a8219[_0x12eb46(0x8f)](_0x2aed5c));if(_0x5500bf[_0x12eb46(0xbe)]>0x0||_0x10397e[_0x12eb46(0xbe)]>0x0){const _0x1d0055=[..._0x5500bf[_0x12eb46(0x87)](_0x24c040=>String(_0x24c040)),..._0x10397e]['join'](',\x20');throw new Error(_0x12eb46(0xb2)+_0x1d0055);}const _0x579cc8=new Set(_0x3640a0[_0x12eb46(0xbc)]),_0x36d2f7=new Set(_0x3640a0[_0x12eb46(0x88)]);return _0x3ded97[_0x12eb46(0x92)](_0xc8d6c2=>_0x579cc8['has'](_0xc8d6c2['id'])||_0x36d2f7[_0x12eb46(0x8f)](_0xc8d6c2['path']));}function normalizeMode(_0x48380f){const _0x4d5516=a150_0x5ca0;if(!_0x48380f)return _0x4d5516(0x82);if(_0x48380f===_0x4d5516(0xb0)||_0x48380f===_0x4d5516(0x82))return _0x48380f;throw new Error(_0x4d5516(0x86)+_0x48380f+_0x4d5516(0xb7));}function a150_0x3193(){const _0x5e4f9f=['1238485JjckQB','2723508nLPLXG','all','cwd','message','patch','\x20existing\x20JS\x20resources\x20for\x20\x22','4dtmXTv','selection','Invalid\x20--mode:\x20','map','paths','parse','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1706768iXAWwk','jsUrl','setLogPath','has','--params.','toLowerCase','filter','3648ErPIjZ',').\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','50295wpiaxb','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','info','142179QKgztN','menu-asset-update','5629660iofzRu','\x22\x20(','unshift','string','fulfilled','value','extend','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','push','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','trim','isArray','.css','after','dryRun','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','status','loadScriptMode','CSS\x20URL\x20is\x20unreachable:\x20','object','replace','join','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','784AyeEem','resources','menu\x20asset-update\x20cannot\x20patch\x20','4gpCFmZ','.\x20Allowed\x20values:\x20replace,\x20patch','some','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','mode','menuIds','cssUrl','length','path','label'];a150_0x3193=function(){return _0x5e4f9f;};return a150_0x3193();}function buildMenuUpdateDiff(_0x3b713d,_0x4f564b,_0x88d348,_0x23e0b7,_0x5c890a){const _0x228979=a150_0x5ca0,_0x2db23a=[..._0x3b713d[_0x228979(0xb4)]];_0x88d348==='patch'&&assertUnambiguousPatchResources(_0x3b713d,_0x2db23a,_0x4f564b);const _0x144f1f=_0x88d348===_0x228979(0x82)?patchResources(_0x2db23a,_0x4f564b):replaceResources(_0x4f564b),_0x5a0428=[],_0x76a9e0=_0x2db23a[_0x228979(0xb8)](isJsResource),_0x1da47a=_0x144f1f[_0x228979(0xb8)](isJsResource);if(_0x76a9e0&&!_0x1da47a){const _0x265b85=_0x228979(0xa5)+_0x3b713d[_0x228979(0x7c)]+_0x228979(0x9d)+_0x3b713d[_0x228979(0xbf)]+_0x228979(0x94)+_0x228979(0xb9);if(!_0x23e0b7)throw new Error(_0x265b85);_0x5a0428[_0x228979(0xa4)](_0x265b85);}const _0x4a4a6f=_0x2db23a[_0x228979(0xb8)](isCssResource),_0x497439=_0x144f1f['some'](isCssResource);_0x4a4a6f&&!_0x497439&&_0x5a0428[_0x228979(0xa4)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x3b713d[_0x228979(0x7c)]+_0x228979(0x9d)+_0x3b713d[_0x228979(0xbf)]+').');const _0x6db238=typeof _0x3b713d[_0x228979(0xa2)]?.[_0x228979(0xad)]==='string'?_0x3b713d[_0x228979(0xa2)][_0x228979(0xad)]:null,_0x5cede5=_0x5c890a?{'loadScriptMode':_0x6db238}:{},_0xcceea0=_0x5c890a?{'loadScriptMode':_0x5c890a}:{};return{'id':_0x3b713d['id'],'label':_0x3b713d['label'],'path':_0x3b713d['path'],'mode':_0x88d348,'before':{'resources':_0x2db23a,..._0x5cede5},'after':{'resources':_0x144f1f,..._0xcceea0},'warnings':_0x5a0428};}function replaceResources(_0x15b3e4){const _0x663cd=a150_0x5ca0;return[_0x15b3e4[_0x663cd(0x8d)],_0x15b3e4[_0x663cd(0xbd)]][_0x663cd(0x92)](_0x16d82c=>!!_0x16d82c);}function assertUnambiguousPatchResources(_0x23f5b7,_0xf98236,_0x3fa7d2){const _0x356198=a150_0x5ca0,_0x5baae3=_0xf98236[_0x356198(0x92)](isJsResource)[_0x356198(0xbe)];if(_0x3fa7d2[_0x356198(0x8d)]&&_0x5baae3>0x1)throw new Error(_0x356198(0xb5)+_0x5baae3+_0x356198(0x83)+_0x23f5b7[_0x356198(0x7c)]+_0x356198(0x9d)+_0x23f5b7[_0x356198(0xbf)]+')\x20'+_0x356198(0x8b));const _0x2f7ac1=_0xf98236[_0x356198(0x92)](isCssResource)[_0x356198(0xbe)];if(_0x3fa7d2[_0x356198(0xbd)]&&_0x2f7ac1>0x1)throw new Error(_0x356198(0xb5)+_0x2f7ac1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x23f5b7[_0x356198(0x7c)]+_0x356198(0x9d)+_0x23f5b7[_0x356198(0xbf)]+')\x20'+_0x356198(0x8a));}function patchResources(_0x1271d6,_0x529348){const _0x17826f=a150_0x5ca0;let _0x2e61d5=![],_0x5b83ab=![];const _0x4336cb=[];for(const _0x4e9a8f of _0x1271d6){if(isJsResource(_0x4e9a8f)){if(_0x529348['jsUrl']&&!_0x2e61d5)_0x4336cb[_0x17826f(0xa4)](_0x529348[_0x17826f(0x8d)]),_0x2e61d5=!![];else!_0x529348[_0x17826f(0x8d)]&&_0x4336cb['push'](_0x4e9a8f);continue;}if(isCssResource(_0x4e9a8f)){if(_0x529348[_0x17826f(0xbd)]&&!_0x5b83ab)_0x4336cb['push'](_0x529348[_0x17826f(0xbd)]),_0x5b83ab=!![];else!_0x529348[_0x17826f(0xbd)]&&_0x4336cb[_0x17826f(0xa4)](_0x4e9a8f);continue;}_0x4336cb[_0x17826f(0xa4)](_0x4e9a8f);}return _0x529348[_0x17826f(0x8d)]&&!_0x2e61d5&&_0x4336cb[_0x17826f(0x9e)](_0x529348[_0x17826f(0x8d)]),_0x529348['cssUrl']&&!_0x5b83ab&&_0x4336cb[_0x17826f(0xa4)](_0x529348[_0x17826f(0xbd)]),_0x4336cb;}function isJsResource(_0x5135b8){const _0x529434=a150_0x5ca0;return stripQuery(_0x5135b8)[_0x529434(0x91)]()['endsWith']('.js');}function isCssResource(_0x1a2a10){const _0x4a4327=a150_0x5ca0;return stripQuery(_0x1a2a10)[_0x4a4327(0x91)]()['endsWith'](_0x4a4327(0xa8));}function stripQuery(_0x177767){return _0x177767['split']('?')[0x0]??_0x177767;}function parseUpdateParamsFlag(_0x28946b){const _0x311ffe=a150_0x5ca0;if(!_0x28946b||typeof _0x28946b!==_0x311ffe(0x9f))return{};try{const _0x148255=JSON[_0x311ffe(0x89)](_0x28946b);if(typeof _0x148255!==_0x311ffe(0xaf)||_0x148255===null||Array[_0x311ffe(0xa7)](_0x148255))return{};return{'jsUrl':typeof _0x148255[_0x311ffe(0x8d)]===_0x311ffe(0x9f)?_0x148255[_0x311ffe(0x8d)][_0x311ffe(0xa6)]():undefined,'cssUrl':typeof _0x148255[_0x311ffe(0xbd)]===_0x311ffe(0x9f)?_0x148255[_0x311ffe(0xbd)][_0x311ffe(0xa6)]():undefined};}catch{return{};}}
1
+ (function(_0x3a03be,_0x2dae6e){const _0x29c15e=a150_0x39ea,_0x4601fd=_0x3a03be();while(!![]){try{const _0x21216c=-parseInt(_0x29c15e(0x186))/0x1+parseInt(_0x29c15e(0x18a))/0x2*(parseInt(_0x29c15e(0x173))/0x3)+-parseInt(_0x29c15e(0x16c))/0x4+-parseInt(_0x29c15e(0x17e))/0x5*(parseInt(_0x29c15e(0x157))/0x6)+parseInt(_0x29c15e(0x15c))/0x7*(parseInt(_0x29c15e(0x153))/0x8)+parseInt(_0x29c15e(0x180))/0x9+-parseInt(_0x29c15e(0x160))/0xa;if(_0x21216c===_0x2dae6e)break;else _0x4601fd['push'](_0x4601fd['shift']());}catch(_0x999186){_0x4601fd['push'](_0x4601fd['shift']());}}}(a150_0x5c48,0x3ddb2));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 a150_0x39ea(_0x321196,_0xf236d2){_0x321196=_0x321196-0x151;const _0x5c4857=a150_0x5c48();let _0x39ea66=_0x5c4857[_0x321196];return _0x39ea66;}function validateParams(_0x50c70d){const _0x81c216=a150_0x39ea,_0xa372f7=[];return _0x50c70d['jsUrl']&&!isValidJsHttpsUrl(_0x50c70d['jsUrl'])&&_0xa372f7['push']({'field':_0x81c216(0x16a),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x50c70d[_0x81c216(0x191)]&&!isValidCssHttpsUrl(_0x50c70d[_0x81c216(0x191)])&&_0xa372f7[_0x81c216(0x17c)]({'field':_0x81c216(0x191),'message':_0x81c216(0x16e)}),_0xa372f7;}export async function runMenuUpdateCore(_0x47b1e5,_0x47b00e,_0x2fd4b3,_0x20954c={}){const _0xf98b28=a150_0x39ea,_0x5ba2f0=parseUpdateParamsFlag(_0x2fd4b3),_0x5109e8=normalizeMode(_0x20954c[_0xf98b28(0x15d)]);validateSelection(_0x20954c[_0xf98b28(0x18d)]);const _0xe6380e=[];if(_0x5ba2f0[_0xf98b28(0x16a)])_0xe6380e[_0xf98b28(0x17c)](_0x5ba2f0['jsUrl']);if(_0x5ba2f0[_0xf98b28(0x191)])_0xe6380e[_0xf98b28(0x17c)](_0x5ba2f0['cssUrl']);const _0x4a6608=validateParams(_0x5ba2f0);if(_0x4a6608[_0xf98b28(0x162)]>0x0){const _0x21e7fb=_0x4a6608[_0xf98b28(0x170)](_0x31cff9=>_0xf98b28(0x171)+_0x31cff9[_0xf98b28(0x18e)]+':\x20'+_0x31cff9[_0xf98b28(0x16d)])[_0xf98b28(0x179)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x21e7fb);}if(_0xe6380e[_0xf98b28(0x162)]===0x0)throw new Error(_0xf98b28(0x190)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0xf98b28(0x17b)](process['cwd']()),logger[_0xf98b28(0x165)](_0xf98b28(0x182),_0xf98b28(0x163),{'appCode':_0x47b1e5,'jsUrl':_0x5ba2f0['jsUrl'],'cssUrl':_0x5ba2f0[_0xf98b28(0x191)],'mode':_0x5109e8,'dryRun':_0x20954c[_0xf98b28(0x151)]===!![]});if(_0x5ba2f0['jsUrl']){const _0x5ca915=await isUrlReachable(_0x5ba2f0[_0xf98b28(0x16a)]);if(!_0x5ca915)throw new Error(_0xf98b28(0x187)+_0x5ba2f0[_0xf98b28(0x16a)]);}if(_0x5ba2f0['cssUrl']){const _0x9df0cc=await isUrlReachable(_0x5ba2f0['cssUrl']);if(!_0x9df0cc)throw new Error(_0xf98b28(0x181)+_0x5ba2f0['cssUrl']);}const _0x3d3a53=await getOnlineMenuList(_0x47b1e5,_0x47b00e),_0x335797=_0x3d3a53[_0xf98b28(0x16b)](_0x353657=>_0x353657[_0xf98b28(0x184)][_0xf98b28(0x162)]>0x0),_0x455a63=selectMenusForUpdate(_0x335797,_0x20954c[_0xf98b28(0x18d)]);if(_0x455a63[_0xf98b28(0x162)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x20954c['dryRun']===!![]};const _0x1a36b4=_0x455a63[_0xf98b28(0x170)](_0x55b040=>buildMenuUpdateDiff(_0x55b040,_0x5ba2f0,_0x5109e8,_0x20954c[_0xf98b28(0x152)]===!![],_0x20954c[_0xf98b28(0x183)]));if(_0x20954c[_0xf98b28(0x151)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1a36b4};const _0xd03a78=await Promise[_0xf98b28(0x17f)](_0x455a63[_0xf98b28(0x170)]((_0x30a60e,_0x25931c)=>updateMenuCdnUrl(_0x47b1e5,_0x47b00e,{'id':_0x30a60e['id'],'label':_0x30a60e[_0xf98b28(0x156)],'path':_0x30a60e[_0xf98b28(0x16f)],'resources':_0x1a36b4[_0x25931c][_0xf98b28(0x178)][_0xf98b28(0x184)],'extend':_0x30a60e[_0xf98b28(0x15e)]??null,'loadScriptMode':_0x20954c[_0xf98b28(0x183)]}))),_0x53ddc2=_0xd03a78[_0xf98b28(0x16b)](_0x3818a2=>_0x3818a2[_0xf98b28(0x197)]==='fulfilled')[_0xf98b28(0x170)](_0x2772ce=>_0x2772ce[_0xf98b28(0x192)]),_0x1c8279=_0xd03a78['filter'](_0xc4eb49=>_0xc4eb49[_0xf98b28(0x197)]===_0xf98b28(0x194))[_0xf98b28(0x162)];return logger['info'](_0xf98b28(0x182),_0xf98b28(0x18c),{'count':_0x455a63[_0xf98b28(0x162)],'resources':_0xe6380e}),{'updated':_0x53ddc2[_0xf98b28(0x162)],'failed':_0x1c8279,'skipped':![],'menus':_0x53ddc2};}function validateSelection(_0x2d44fb){const _0x5e37cb=a150_0x39ea;if(!_0x2d44fb)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x2d44fb[_0x5e37cb(0x18b)]&&(_0x2d44fb[_0x5e37cb(0x167)][_0x5e37cb(0x162)]>0x0||_0x2d44fb['paths'][_0x5e37cb(0x162)]>0x0))throw new Error(_0x5e37cb(0x154));if(!_0x2d44fb[_0x5e37cb(0x18b)]&&_0x2d44fb[_0x5e37cb(0x167)][_0x5e37cb(0x162)]===0x0&&_0x2d44fb[_0x5e37cb(0x195)][_0x5e37cb(0x162)]===0x0)throw new Error(_0x5e37cb(0x177));}export function selectMenusForUpdate(_0xee32d3,_0x563d84){const _0x45bc38=a150_0x39ea;validateSelection(_0x563d84);if(_0x563d84['all'])return _0xee32d3;const _0x55206=new Set(_0xee32d3[_0x45bc38(0x170)](_0x24616b=>_0x24616b['id'])),_0xe7c58b=new Set(_0xee32d3[_0x45bc38(0x170)](_0x3d248c=>_0x3d248c[_0x45bc38(0x16f)])),_0x415f9a=_0x563d84[_0x45bc38(0x167)][_0x45bc38(0x16b)](_0xe8fd7d=>!_0x55206['has'](_0xe8fd7d)),_0x9e997e=_0x563d84[_0x45bc38(0x195)][_0x45bc38(0x16b)](_0x25e551=>!_0xe7c58b[_0x45bc38(0x155)](_0x25e551));if(_0x415f9a['length']>0x0||_0x9e997e[_0x45bc38(0x162)]>0x0){const _0x454519=[..._0x415f9a[_0x45bc38(0x170)](_0x9fd53=>String(_0x9fd53)),..._0x9e997e][_0x45bc38(0x179)](',\x20');throw new Error(_0x45bc38(0x158)+_0x454519);}const _0x400e09=new Set(_0x563d84[_0x45bc38(0x167)]),_0x13d574=new Set(_0x563d84[_0x45bc38(0x195)]);return _0xee32d3[_0x45bc38(0x16b)](_0x549ea3=>_0x400e09[_0x45bc38(0x155)](_0x549ea3['id'])||_0x13d574[_0x45bc38(0x155)](_0x549ea3[_0x45bc38(0x16f)]));}function normalizeMode(_0x3ed93c){const _0x5ac0c2=a150_0x39ea;if(!_0x3ed93c)return _0x5ac0c2(0x164);if(_0x3ed93c===_0x5ac0c2(0x193)||_0x3ed93c===_0x5ac0c2(0x164))return _0x3ed93c;throw new Error(_0x5ac0c2(0x172)+_0x3ed93c+_0x5ac0c2(0x15b));}function buildMenuUpdateDiff(_0x40fc8c,_0x19bf57,_0x235943,_0x3223e6,_0x2c590d){const _0x5f5289=a150_0x39ea,_0x3d9c88=[..._0x40fc8c[_0x5f5289(0x184)]];_0x235943===_0x5f5289(0x164)&&assertUnambiguousPatchResources(_0x40fc8c,_0x3d9c88,_0x19bf57);const _0x274b1f=_0x235943===_0x5f5289(0x164)?patchResources(_0x3d9c88,_0x19bf57):replaceResources(_0x19bf57),_0x2b1367=[],_0x26708c=_0x3d9c88['some'](isJsResource),_0xc64a6d=_0x274b1f[_0x5f5289(0x15a)](isJsResource);if(_0x26708c&&!_0xc64a6d){const _0x4fcc4a=_0x5f5289(0x161)+_0x40fc8c[_0x5f5289(0x156)]+_0x5f5289(0x176)+_0x40fc8c[_0x5f5289(0x16f)]+_0x5f5289(0x18f)+_0x5f5289(0x189);if(!_0x3223e6)throw new Error(_0x4fcc4a);_0x2b1367[_0x5f5289(0x17c)](_0x4fcc4a);}const _0x23795d=_0x3d9c88[_0x5f5289(0x15a)](isCssResource),_0x3a6e9b=_0x274b1f[_0x5f5289(0x15a)](isCssResource);_0x23795d&&!_0x3a6e9b&&_0x2b1367['push']('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x40fc8c[_0x5f5289(0x156)]+_0x5f5289(0x176)+_0x40fc8c['path']+').');const _0x5d0a7b=typeof _0x40fc8c[_0x5f5289(0x15e)]?.[_0x5f5289(0x183)]===_0x5f5289(0x17a)?_0x40fc8c[_0x5f5289(0x15e)][_0x5f5289(0x183)]:null,_0x1e74b6=_0x2c590d?{'loadScriptMode':_0x5d0a7b}:{},_0x5bbf75=_0x2c590d?{'loadScriptMode':_0x2c590d}:{};return{'id':_0x40fc8c['id'],'label':_0x40fc8c['label'],'path':_0x40fc8c['path'],'mode':_0x235943,'before':{'resources':_0x3d9c88,..._0x1e74b6},'after':{'resources':_0x274b1f,..._0x5bbf75},'warnings':_0x2b1367};}function replaceResources(_0x5ee288){const _0x124205=a150_0x39ea;return[_0x5ee288['jsUrl'],_0x5ee288[_0x124205(0x191)]][_0x124205(0x16b)](_0x1a2255=>!!_0x1a2255);}function assertUnambiguousPatchResources(_0x5d0f2f,_0x1a17aa,_0x36320f){const _0x181391=a150_0x39ea,_0x4f5daa=_0x1a17aa[_0x181391(0x16b)](isJsResource)[_0x181391(0x162)];if(_0x36320f[_0x181391(0x16a)]&&_0x4f5daa>0x1)throw new Error(_0x181391(0x166)+_0x4f5daa+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x5d0f2f[_0x181391(0x156)]+'\x22\x20('+_0x5d0f2f['path']+')\x20'+_0x181391(0x168));const _0x403527=_0x1a17aa[_0x181391(0x16b)](isCssResource)[_0x181391(0x162)];if(_0x36320f[_0x181391(0x191)]&&_0x403527>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x403527+_0x181391(0x175)+_0x5d0f2f[_0x181391(0x156)]+_0x181391(0x176)+_0x5d0f2f[_0x181391(0x16f)]+')\x20'+_0x181391(0x188));}function patchResources(_0x582abd,_0x329957){const _0x36c482=a150_0x39ea;let _0x3ead37=![],_0x42ea9a=![];const _0x2cd117=[];for(const _0x50436d of _0x582abd){if(isJsResource(_0x50436d)){if(_0x329957[_0x36c482(0x16a)]&&!_0x3ead37)_0x2cd117[_0x36c482(0x17c)](_0x329957['jsUrl']),_0x3ead37=!![];else!_0x329957[_0x36c482(0x16a)]&&_0x2cd117['push'](_0x50436d);continue;}if(isCssResource(_0x50436d)){if(_0x329957[_0x36c482(0x191)]&&!_0x42ea9a)_0x2cd117['push'](_0x329957[_0x36c482(0x191)]),_0x42ea9a=!![];else!_0x329957['cssUrl']&&_0x2cd117[_0x36c482(0x17c)](_0x50436d);continue;}_0x2cd117[_0x36c482(0x17c)](_0x50436d);}return _0x329957[_0x36c482(0x16a)]&&!_0x3ead37&&_0x2cd117['unshift'](_0x329957[_0x36c482(0x16a)]),_0x329957['cssUrl']&&!_0x42ea9a&&_0x2cd117[_0x36c482(0x17c)](_0x329957['cssUrl']),_0x2cd117;}function a150_0x5c48(){const _0x2ccca2=['JS\x20URL\x20is\x20unreachable:\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','68756aOgsTC','all','Menu\x20asset\x20update\x20completed','selection','field',').\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','cssUrl','value','replace','rejected','paths','trim','status','dryRun','force','8MfVTUb','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','has','label','53700PShsCF','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','toLowerCase','some','.\x20Allowed\x20values:\x20replace,\x20patch','2334143KnEhea','mode','extend','parse','1090660YlOwwd','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','length','Start\x20non-interactive\x20menu\x20asset\x20update','patch','info','menu\x20asset-update\x20cannot\x20patch\x20','menuIds','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','object','jsUrl','filter','271568UrBtwB','message','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','map','--params.','Invalid\x20--mode:\x20','24BeoAUe','split','\x20existing\x20CSS\x20resources\x20for\x20\x22','\x22\x20(','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','after','join','string','setLogPath','push','endsWith','85cpwGbk','allSettled','2507814TvGiVl','CSS\x20URL\x20is\x20unreachable:\x20','menu-asset-update','loadScriptMode','resources','isArray','304649QYcfAQ'];a150_0x5c48=function(){return _0x2ccca2;};return a150_0x5c48();}function isJsResource(_0x3ca085){const _0x1a362d=a150_0x39ea;return stripQuery(_0x3ca085)[_0x1a362d(0x159)]()[_0x1a362d(0x17d)]('.js');}function isCssResource(_0x576e35){const _0x5f1c2f=a150_0x39ea;return stripQuery(_0x576e35)[_0x5f1c2f(0x159)]()[_0x5f1c2f(0x17d)]('.css');}function stripQuery(_0x77d28d){const _0x32fdc4=a150_0x39ea;return _0x77d28d[_0x32fdc4(0x174)]('?')[0x0]??_0x77d28d;}function parseUpdateParamsFlag(_0x53ca4b){const _0x207574=a150_0x39ea;if(!_0x53ca4b||typeof _0x53ca4b!=='string')return{};try{const _0x5ab512=JSON[_0x207574(0x15f)](_0x53ca4b);if(typeof _0x5ab512!==_0x207574(0x169)||_0x5ab512===null||Array[_0x207574(0x185)](_0x5ab512))return{};return{'jsUrl':typeof _0x5ab512['jsUrl']===_0x207574(0x17a)?_0x5ab512['jsUrl'][_0x207574(0x196)]():undefined,'cssUrl':typeof _0x5ab512['cssUrl']===_0x207574(0x17a)?_0x5ab512['cssUrl'][_0x207574(0x196)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x52a482,_0x120548){const _0x5e583e=a151_0x4647,_0x2516b1=_0x52a482();while(!![]){try{const _0x166cf0=parseInt(_0x5e583e(0xbb))/0x1*(parseInt(_0x5e583e(0xbc))/0x2)+-parseInt(_0x5e583e(0xba))/0x3+parseInt(_0x5e583e(0xb8))/0x4+parseInt(_0x5e583e(0xb6))/0x5+parseInt(_0x5e583e(0xb9))/0x6+-parseInt(_0x5e583e(0xbf))/0x7+-parseInt(_0x5e583e(0xbd))/0x8*(parseInt(_0x5e583e(0xbe))/0x9);if(_0x166cf0===_0x120548)break;else _0x2516b1['push'](_0x2516b1['shift']());}catch(_0x5c2087){_0x2516b1['push'](_0x2516b1['shift']());}}}(a151_0x3da3,0x946c8));export function isValidJsHttpsUrl(_0x29d986){const _0x1b563c=a151_0x4647;return/^https:\/\/.+\.js(\?.*)?$/[_0x1b563c(0xc0)](_0x29d986[_0x1b563c(0xb7)]());}export function isValidCssHttpsUrl(_0x4e3dca){const _0x52e9f3=a151_0x4647;return/^https:\/\/.+\.css(\?.*)?$/[_0x52e9f3(0xc0)](_0x4e3dca[_0x52e9f3(0xb7)]());}function a151_0x3da3(){const _0x3b287e=['trim','4232892JyEksR','892242JahlKj','3605466LApZZj','2YSbdbR','872244jjknXC','433624zNJBgG','90zaQipG','1493506ESMbSB','test','2429900dJZiBh'];a151_0x3da3=function(){return _0x3b287e;};return a151_0x3da3();}function a151_0x4647(_0x4c120c,_0x339894){_0x4c120c=_0x4c120c-0xb6;const _0x3da38a=a151_0x3da3();let _0x464780=_0x3da38a[_0x4c120c];return _0x464780;}export async function isUrlReachable(_0x45416a){try{const _0x4ab60c=await fetch(_0x45416a,{'method':'HEAD'});return _0x4ab60c['ok'];}catch{return![];}}
1
+ function a151_0x48b3(_0x19b289,_0x128e0f){_0x19b289=_0x19b289-0x14b;const _0x5f0ba7=a151_0x5f0b();let _0x48b3b1=_0x5f0ba7[_0x19b289];return _0x48b3b1;}(function(_0x3c4965,_0x1cbe1c){const _0x27d7e1=a151_0x48b3,_0x307cfc=_0x3c4965();while(!![]){try{const _0x235062=parseInt(_0x27d7e1(0x151))/0x1*(-parseInt(_0x27d7e1(0x159))/0x2)+parseInt(_0x27d7e1(0x152))/0x3*(parseInt(_0x27d7e1(0x14d))/0x4)+parseInt(_0x27d7e1(0x14b))/0x5*(-parseInt(_0x27d7e1(0x14e))/0x6)+parseInt(_0x27d7e1(0x155))/0x7+parseInt(_0x27d7e1(0x157))/0x8*(-parseInt(_0x27d7e1(0x150))/0x9)+-parseInt(_0x27d7e1(0x156))/0xa+parseInt(_0x27d7e1(0x154))/0xb*(parseInt(_0x27d7e1(0x14c))/0xc);if(_0x235062===_0x1cbe1c)break;else _0x307cfc['push'](_0x307cfc['shift']());}catch(_0x37b8e6){_0x307cfc['push'](_0x307cfc['shift']());}}}(a151_0x5f0b,0x6b9f7));export function isValidJsHttpsUrl(_0x34d0fd){const _0x252cc2=a151_0x48b3;return/^https:\/\/.+\.js(\?.*)?$/[_0x252cc2(0x153)](_0x34d0fd[_0x252cc2(0x158)]());}function a151_0x5f0b(){const _0x1c7c93=['15237pyfFJY','73955zTOyqP','18wkkwxd','test','4221349wofLbx','1450225QUCSZa','674660LGviwD','392HJTAUc','trim','14LGSmTW','235OFTsuq','12ffcebF','570712pyDNoL','43158LALMOC','HEAD'];a151_0x5f0b=function(){return _0x1c7c93;};return a151_0x5f0b();}export function isValidCssHttpsUrl(_0x3a2ad9){const _0x48242c=a151_0x48b3;return/^https:\/\/.+\.css(\?.*)?$/[_0x48242c(0x153)](_0x3a2ad9[_0x48242c(0x158)]());}export async function isUrlReachable(_0x36dd03){const _0x51cdcc=a151_0x48b3;try{const _0x267fc9=await fetch(_0x36dd03,{'method':_0x51cdcc(0x14f)});return _0x267fc9['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a152_0x269e35=a152_0x588e;(function(_0x373f94,_0x3055c2){const _0x11ad3f=a152_0x588e,_0x4bbdb7=_0x373f94();while(!![]){try{const _0x2ac142=-parseInt(_0x11ad3f(0xa2))/0x1+-parseInt(_0x11ad3f(0xdd))/0x2+parseInt(_0x11ad3f(0xc6))/0x3*(-parseInt(_0x11ad3f(0xbb))/0x4)+-parseInt(_0x11ad3f(0xcf))/0x5+-parseInt(_0x11ad3f(0xa1))/0x6*(-parseInt(_0x11ad3f(0xb1))/0x7)+parseInt(_0x11ad3f(0xd7))/0x8*(-parseInt(_0x11ad3f(0xcb))/0x9)+-parseInt(_0x11ad3f(0xca))/0xa*(-parseInt(_0x11ad3f(0xc9))/0xb);if(_0x2ac142===_0x3055c2)break;else _0x4bbdb7['push'](_0x4bbdb7['shift']());}catch(_0x2648e0){_0x4bbdb7['push'](_0x4bbdb7['shift']());}}}(a152_0x1dae,0x55bfc));import a152_0x429613 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a152_0x588e(_0x6fc84c,_0x16802a){_0x6fc84c=_0x6fc84c-0x9d;const _0x1daea1=a152_0x1dae();let _0x588e6a=_0x1daea1[_0x6fc84c];return _0x588e6a;}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a152_0x1dae(){const _0x476ae1=['\x20\x20✓\x20Selected:\x20','appcode','onlineMenuList','\x20and\x20CSS:\x20','onlinePaths','488FLNGML','flag','Fetching\x20online\x20menu\x20list...','created','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','paths','708912plDWlg','\x20\x20Cancelled.','validation','cyan','cookie','\x20local\x20microfrontend\x20menu(s).','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Would\x20create\x20','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20created','\x20menu(s)\x20with\x20JS:\x20','1398894DfEZLW','27365IzPmUU','Sync\x20local\x20pages\x20as\x20platform\x20menus','params','gray','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','menu','size','POST','\x20page(s)','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages','\x20\x20Create\x20','Menu\x20creation\x20failed','write','jsUrl','14UcULRt','boolean','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','map','length','rawFlags','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','yes','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','2248JxfpMd','Pre-fill\x20JS/CSS\x20URLs.\x20','trim','Menu\x20sync\x20completed:\x20','Menu\x20sync\x20skipped','\x20created,\x20','string','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','appCode','failed','2658KafNCO','Created\x20','\x20created.','231yIbNPU','752810dmoosq','66870qRUJyC','message','selectedAppName','/smartapi/menu/create','1814940DcnUOi','localPages','str'];a152_0x1dae=function(){return _0x476ae1;};return a152_0x1dae();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a152_0x269e35(0xa7),'command':'sync','description':a152_0x269e35(0xa3),'risk':a152_0x269e35(0xaf),'flags':[{'name':a152_0x269e35(0xa4),'type':a152_0x269e35(0xc1),'description':a152_0x269e35(0xbc)+a152_0x269e35(0xb8)},{'name':a152_0x269e35(0xdc),'type':a152_0x269e35(0xc1),'description':a152_0x269e35(0xc2)},{'name':a152_0x269e35(0xb9),'type':a152_0x269e35(0xb2),'description':a152_0x269e35(0xdb)}],async 'dryRun'(_0x1a186e){const _0x445baf=a152_0x269e35;ensureRunnableContext(_0x1a186e[_0x445baf(0xb6)],_0x1a186e[_0x445baf(0xcd)]);const _0x3e3bcf=await runMenuSyncCore(_0x1a186e['appCode'],_0x1a186e[_0x445baf(0xe1)],parsePaths(_0x1a186e[_0x445baf(0xd1)](_0x445baf(0xdc))),_0x1a186e[_0x445baf(0xd1)]('params'),{'dryRun':!![]});return{'method':_0x445baf(0xa9),'url':_0x445baf(0xce),'body':_0x3e3bcf,'description':_0x3e3bcf['skipped']?_0x445baf(0xa6):_0x445baf(0x9d)+_0x3e3bcf[_0x445baf(0xac)][_0x445baf(0xb5)]+_0x445baf(0xe2)};},async 'execute'(_0x2ac4df){const _0x67e79f=a152_0x269e35;ensureRunnableContext(_0x2ac4df[_0x67e79f(0xb6)],_0x2ac4df[_0x67e79f(0xcd)]);const _0x2eddd7=_0x2ac4df[_0x67e79f(0xd8)](_0x67e79f(0xb9)),_0x11356b=_0x2ac4df[_0x67e79f(0xd1)](_0x67e79f(0xa4)),_0x18ae88=parsePaths(_0x2ac4df['str']('paths')),_0x655188=parseMenuSyncParams(_0x11356b);if(_0x2eddd7){const _0x417f99=await runMenuSyncCore(_0x2ac4df['appCode'],_0x2ac4df['cookie'],_0x18ae88,_0x11356b);if(_0x417f99['skipped']){const _0x18523c=getLocalPages();_0x18523c['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x67e79f(0xb7));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x417f99[_0x67e79f(0xda)]+_0x67e79f(0x9f));return{'ok':!![],'data':_0x417f99,'message':_0x417f99['skipped']?_0x67e79f(0xbf):_0x67e79f(0xbe)+_0x417f99[_0x67e79f(0xda)]+_0x67e79f(0xc8)};}if(_0x18ae88[_0x67e79f(0xb5)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x67e79f(0xba));if(!isInteractive()&&_0x11356b)throw CliErrors[_0x67e79f(0xdf)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x67e79f(0xba));requireInteractive();const _0x5d490e=startSpinner(_0x67e79f(0xd9));let _0x4cbf91,_0x30905c,_0x319592;try{const _0x45fa93=await fetchMenuData(_0x2ac4df['appCode'],_0x2ac4df[_0x67e79f(0xe1)]);_0x4cbf91=_0x45fa93[_0x67e79f(0xd0)],_0x30905c=_0x45fa93[_0x67e79f(0xd6)],_0x319592=_0x45fa93[_0x67e79f(0xd4)],stopSpinner(_0x5d490e,_0x67e79f(0x9e),!![]);}catch(_0x1e48ca){stopSpinner(_0x5d490e,_0x67e79f(0xab),![]);throw CliErrors['validation'](_0x1e48ca instanceof Error?_0x1e48ca['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x4cbf91[_0x67e79f(0xb5)]===0x0)return writeCliSideChannelLine(a152_0x429613['yellow'](_0x67e79f(0xc3))),{'ok':!![]};const _0x1c0ffd=buildCompareRows(_0x4cbf91,_0x30905c);writeCliSideChannelLine(renderCompareTable(_0x1c0ffd)),writeCliSideChannelLine('');const _0x170949=await selectPages(_0x4cbf91,_0x30905c);writeCliSideChannelLine(''),writeCliSideChannelLine(a152_0x429613[_0x67e79f(0xe0)](_0x67e79f(0xd2)+_0x170949[_0x67e79f(0xb5)]+_0x67e79f(0xaa)));const _0x204779=_0x655188[_0x67e79f(0xb0)]&&_0x655188['cssUrl'];if(!_0x204779){writeCliSideChannelLine(renderSyncSummary(_0x170949,_0x30905c[_0x67e79f(0xa8)]>0x0));const _0x2754c8=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x2754c8)return writeCliSideChannelLine(a152_0x429613[_0x67e79f(0xa5)](_0x67e79f(0xde))),{'ok':!![]};}let _0x2336e9=_0x655188['jsUrl'],_0x210de2=_0x655188['cssUrl'];!_0x2336e9&&(_0x2336e9=await askJsUrl());!_0x210de2&&(_0x210de2=await askCssUrl());const _0x27134b=await askConfirm(_0x67e79f(0xad)+_0x170949[_0x67e79f(0xb5)]+_0x67e79f(0xa0)+_0x2336e9+_0x67e79f(0xd5)+_0x210de2+'?');if(!_0x27134b)return writeCliSideChannelLine(a152_0x429613[_0x67e79f(0xa5)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x5b4c61=[_0x2336e9,_0x210de2],_0x57c600=startSpinner('Creating\x20'+_0x170949['length']+'\x20menu(s)...');try{const _0x3fe251=await doCreateMenus(_0x2ac4df[_0x67e79f(0xc4)],_0x2ac4df[_0x67e79f(0xe1)],_0x170949,_0x5b4c61);return stopSpinner(_0x57c600,_0x67e79f(0xc7)+_0x3fe251[_0x67e79f(0xda)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x3fe251,'message':_0x67e79f(0xbe)+_0x3fe251[_0x67e79f(0xda)]+_0x67e79f(0xc0)+_0x3fe251[_0x67e79f(0xc5)]+'\x20failed.'};}catch(_0xd81171){stopSpinner(_0x57c600,_0x67e79f(0xae),![]);throw CliErrors['validation'](_0xd81171 instanceof Error?_0xd81171[_0x67e79f(0xcc)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x42de21,_0x192587){const _0x296871=a152_0x269e35,_0x5c5018=_0x42de21['appcode']?String(_0x42de21[_0x296871(0xd3)])['trim']():'';if(!isInProject()&&!_0x192587&&!_0x5c5018)throw CliErrors[_0x296871(0xdf)](_0x296871(0xb3)+_0x296871(0xe3));}function parsePaths(_0x41eacf){const _0x29317f=a152_0x269e35;return[...new Set(_0x41eacf['split'](',')[_0x29317f(0xb4)](_0x22a0d9=>_0x22a0d9[_0x29317f(0xbd)]())['filter'](Boolean))];}
1
+ function a152_0xadda(){const _0x367001=['trim','Menu\x20sync\x20completed:\x20','size','Menu\x20sync\x20skipped','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20menu(s)\x20with\x20JS:\x20','created','write','\x20failed.','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','16424fKZKtP','\x20page(s)','1099002WXThvK','string','length','794736kJgNbr','validation','✓\x20Menu\x20sync\x20completed:\x20','appCode','boolean','params','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','rawFlags','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','menu','Sync\x20local\x20pages\x20as\x20platform\x20menus','/smartapi/menu/create','paths','\x20menu(s)','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yellow','55286upjfEc','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','gray','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Menu\x20creation\x20failed','7vKSpol','failed','jsUrl','cssUrl','Would\x20create\x20','localPages','\x20menu(s)...','1007175odXfHN','yes','targetPages','Creating\x20','\x20\x20Continue\x20with\x20creation?','Failed\x20to\x20fetch\x20online\x20menu\x20list','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20local\x20microfrontend\x20menu(s).','map','886400ghjvXg','\x20created.','message','selectedAppName','POST','split','\x20\x20Cancelled.','8986923VSBdEs','cookie','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','str','flag','appcode','\x20\x20Create\x20','7mOsynY','\x20and\x20CSS:\x20','filter'];a152_0xadda=function(){return _0x367001;};return a152_0xadda();}const a152_0x58a9c1=a152_0x5134;(function(_0x28386a,_0x29b12d){const _0x59b9c1=a152_0x5134,_0x1b0d2a=_0x28386a();while(!![]){try{const _0x5056c5=parseInt(_0x59b9c1(0x1e9))/0x1*(-parseInt(_0x59b9c1(0x1c6))/0x2)+-parseInt(_0x59b9c1(0x1d2))/0x3+-parseInt(_0x59b9c1(0x1b1))/0x4+-parseInt(_0x59b9c1(0x1db))/0x5+-parseInt(_0x59b9c1(0x1b3))/0x6+parseInt(_0x59b9c1(0x1cb))/0x7*(parseInt(_0x59b9c1(0x1b6))/0x8)+parseInt(_0x59b9c1(0x1e2))/0x9;if(_0x5056c5===_0x29b12d)break;else _0x1b0d2a['push'](_0x1b0d2a['shift']());}catch(_0x45307a){_0x1b0d2a['push'](_0x1b0d2a['shift']());}}}(a152_0xadda,0x31d4e));import a152_0x3ca6f5 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 a152_0x5134(_0x51f2be,_0x148e59){_0x51f2be=_0x51f2be-0x1a8;const _0xadda0c=a152_0xadda();let _0x5134a7=_0xadda0c[_0x51f2be];return _0x5134a7;}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':a152_0x58a9c1(0x1bf),'command':'sync','description':a152_0x58a9c1(0x1c0),'risk':a152_0x58a9c1(0x1ad),'flags':[{'name':'params','type':a152_0x58a9c1(0x1b4),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a152_0x58a9c1(0x1d8)},{'name':a152_0x58a9c1(0x1c2),'type':a152_0x58a9c1(0x1b4),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a152_0x58a9c1(0x1d3),'type':a152_0x58a9c1(0x1ba),'description':a152_0x58a9c1(0x1c7)}],async 'dryRun'(_0x44de32){const _0x58f2f6=a152_0x58a9c1;ensureRunnableContext(_0x44de32['rawFlags'],_0x44de32[_0x58f2f6(0x1de)]);const _0x1cbe45=await runMenuSyncCore(_0x44de32['appCode'],_0x44de32['cookie'],parsePaths(_0x44de32[_0x58f2f6(0x1e5)](_0x58f2f6(0x1c2))),_0x44de32[_0x58f2f6(0x1e5)](_0x58f2f6(0x1bb)),{'dryRun':!![]});return{'method':_0x58f2f6(0x1df),'url':_0x58f2f6(0x1c1),'body':_0x1cbe45,'description':_0x1cbe45[_0x58f2f6(0x1af)]?_0x58f2f6(0x1bc):_0x58f2f6(0x1cf)+_0x1cbe45[_0x58f2f6(0x1d4)][_0x58f2f6(0x1b5)]+_0x58f2f6(0x1d9)};},async 'execute'(_0x37811e){const _0x4912d0=a152_0x58a9c1;ensureRunnableContext(_0x37811e[_0x4912d0(0x1bd)],_0x37811e[_0x4912d0(0x1de)]);const _0x5ae307=_0x37811e[_0x4912d0(0x1e6)](_0x4912d0(0x1d3)),_0x41662f=_0x37811e['str'](_0x4912d0(0x1bb)),_0x41e0eb=parsePaths(_0x37811e['str'](_0x4912d0(0x1c2))),_0x505663=parseMenuSyncParams(_0x41662f);if(_0x5ae307){const _0x13ffb0=await runMenuSyncCore(_0x37811e[_0x4912d0(0x1b9)],_0x37811e[_0x4912d0(0x1e3)],_0x41e0eb,_0x41662f);if(_0x13ffb0[_0x4912d0(0x1af)]){const _0x31f2b9=getLocalPages();_0x31f2b9[_0x4912d0(0x1b5)]===0x0?writeCliSideChannelLine(_0x4912d0(0x1e4)):writeCliSideChannelLine(_0x4912d0(0x1c4));}else writeCliSideChannelLine(_0x4912d0(0x1b8)+_0x13ffb0[_0x4912d0(0x1ac)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x13ffb0,'message':_0x13ffb0[_0x4912d0(0x1af)]?_0x4912d0(0x1a9):_0x4912d0(0x1ed)+_0x13ffb0[_0x4912d0(0x1ac)]+_0x4912d0(0x1dc)};}if(_0x41e0eb[_0x4912d0(0x1b5)]>0x0)throw CliErrors[_0x4912d0(0x1b7)](_0x4912d0(0x1b0),_0x4912d0(0x1c9));if(!isInteractive()&&_0x41662f)throw CliErrors[_0x4912d0(0x1b7)](_0x4912d0(0x1be),_0x4912d0(0x1c9));requireInteractive();const _0xdb38f=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3316be,_0x8c7a62,_0x386e61;try{const _0x1d1f32=await fetchMenuData(_0x37811e[_0x4912d0(0x1b9)],_0x37811e[_0x4912d0(0x1e3)]);_0x3316be=_0x1d1f32[_0x4912d0(0x1d0)],_0x8c7a62=_0x1d1f32['onlinePaths'],_0x386e61=_0x1d1f32['onlineMenuList'],stopSpinner(_0xdb38f,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x5286cd){stopSpinner(_0xdb38f,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x4912d0(0x1b7)](_0x5286cd instanceof Error?_0x5286cd[_0x4912d0(0x1dd)]:_0x4912d0(0x1d7));}if(_0x3316be['length']===0x0)return writeCliSideChannelLine(a152_0x3ca6f5[_0x4912d0(0x1c5)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x5b90e7=buildCompareRows(_0x3316be,_0x8c7a62);writeCliSideChannelLine(renderCompareTable(_0x5b90e7)),writeCliSideChannelLine('');const _0x32253c=await selectPages(_0x3316be,_0x8c7a62);writeCliSideChannelLine(''),writeCliSideChannelLine(a152_0x3ca6f5['cyan']('\x20\x20✓\x20Selected:\x20'+_0x32253c['length']+_0x4912d0(0x1b2)));const _0x4d9b69=_0x505663[_0x4912d0(0x1cd)]&&_0x505663[_0x4912d0(0x1ce)];if(!_0x4d9b69){writeCliSideChannelLine(renderSyncSummary(_0x32253c,_0x8c7a62[_0x4912d0(0x1a8)]>0x0));const _0x4d87f1=await askConfirm(_0x4912d0(0x1d6));if(!_0x4d87f1)return writeCliSideChannelLine(a152_0x3ca6f5[_0x4912d0(0x1c8)](_0x4912d0(0x1e1))),{'ok':!![]};}let _0x229f20=_0x505663['jsUrl'],_0xfcf53=_0x505663[_0x4912d0(0x1ce)];!_0x229f20&&(_0x229f20=await askJsUrl());!_0xfcf53&&(_0xfcf53=await askCssUrl());const _0x4d4c42=await askConfirm(_0x4912d0(0x1e8)+_0x32253c[_0x4912d0(0x1b5)]+_0x4912d0(0x1ab)+_0x229f20+_0x4912d0(0x1ea)+_0xfcf53+'?');if(!_0x4d4c42)return writeCliSideChannelLine(a152_0x3ca6f5[_0x4912d0(0x1c8)](_0x4912d0(0x1e1))),{'ok':!![]};const _0x4e8f55=[_0x229f20,_0xfcf53],_0x9d2230=startSpinner(_0x4912d0(0x1d5)+_0x32253c[_0x4912d0(0x1b5)]+_0x4912d0(0x1d1));try{const _0x2d5710=await doCreateMenus(_0x37811e['appCode'],_0x37811e['cookie'],_0x32253c,_0x4e8f55);return stopSpinner(_0x9d2230,'Created\x20'+_0x2d5710['created']+_0x4912d0(0x1c3),!![]),{'ok':!![],'data':_0x2d5710,'message':'Menu\x20sync\x20completed:\x20'+_0x2d5710['created']+'\x20created,\x20'+_0x2d5710[_0x4912d0(0x1cc)]+_0x4912d0(0x1ae)};}catch(_0x1e17e6){stopSpinner(_0x9d2230,_0x4912d0(0x1ca),![]);throw CliErrors[_0x4912d0(0x1b7)](_0x1e17e6 instanceof Error?_0x1e17e6[_0x4912d0(0x1dd)]:_0x4912d0(0x1ca));}}};function ensureRunnableContext(_0xf43438,_0x3294e8){const _0x10e4a3=a152_0x58a9c1,_0x73ffe5=_0xf43438['appcode']?String(_0xf43438[_0x10e4a3(0x1e7)])[_0x10e4a3(0x1ec)]():'';if(!isInProject()&&!_0x3294e8&&!_0x73ffe5)throw CliErrors[_0x10e4a3(0x1b7)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x10e4a3(0x1aa));}function parsePaths(_0xd5e092){const _0x3b8859=a152_0x58a9c1;return[...new Set(_0xd5e092[_0x3b8859(0x1e0)](',')[_0x3b8859(0x1da)](_0x212afe=>_0x212afe[_0x3b8859(0x1ec)]())[_0x3b8859(0x1eb)](Boolean))];}
@@ -1 +1 @@
1
- const a153_0x4f42a4=a153_0x467a;(function(_0x1c29dd,_0x373aad){const _0xccd606=a153_0x467a,_0x1afbfa=_0x1c29dd();while(!![]){try{const _0xbd4d5b=-parseInt(_0xccd606(0x21d))/0x1*(parseInt(_0xccd606(0x1fd))/0x2)+-parseInt(_0xccd606(0x1f2))/0x3*(-parseInt(_0xccd606(0x205))/0x4)+-parseInt(_0xccd606(0x1c2))/0x5*(parseInt(_0xccd606(0x208))/0x6)+parseInt(_0xccd606(0x22a))/0x7+-parseInt(_0xccd606(0x218))/0x8*(parseInt(_0xccd606(0x1cb))/0x9)+-parseInt(_0xccd606(0x1e8))/0xa*(parseInt(_0xccd606(0x200))/0xb)+parseInt(_0xccd606(0x1e2))/0xc;if(_0xbd4d5b===_0x373aad)break;else _0x1afbfa['push'](_0x1afbfa['shift']());}catch(_0x492359){_0x1afbfa['push'](_0x1afbfa['shift']());}}}(a153_0x464e,0xf12ec));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':a153_0x4f42a4(0x23d),'path':a153_0x4f42a4(0x203)}];function a153_0x464e(){const _0x1aaa2f=['before','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','expectedCount','menu_permission_denied','recovered','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','datasetId','body','string','split','POST','verify\x20menu\x20visibility\x20update','true','get','\x20menu(s),\x20expected\x20','childrenCount','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','2870DSHhJj','update','values','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','appCode','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','number','\x20failed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','143307vZuwqR','cookie','\x20unchanged\x20menu(s).','childrenIds','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','plan','menu\x20list','rabetbase\x20menu\x20list\x20--format\x20compress','Menu\x20','visibility-update','label','hash','menu','boolean','\x20menu(s);\x20skip\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','sort','menu_expected_count_mismatch','\x20updated,\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','type','push','29613228hxTbEg','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','updated','verification','visible','\x20must\x20be\x20true\x20or\x20false.','50PLjCrZ','update\x20menu\x20visibility','filter','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menus','set','validation','\x20menu(s);\x20skipped\x20','Would\x20update\x20visibility\x20for\x20','1392rFdoCf','modelType','length','expect-visible','isSafeInteger','paths','menu_selector_not_found','menu_verification_failed','update-recovery','stringify','pageId','10QbxsrU','Response\x20was\x20lost\x20for\x20menu\x20','menu_selector_ambiguous','2870087rCGBfu','expectVisible','resources','/smartapi/menu/update','targets','12308MXlCTk','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','join','14676ayYQSm','update\x20visibility\x20for','path','Menu\x20path\x20selector\x20not\x20found:\x20','resourcesValid','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','str','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','datasetCode','Selected\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','url','failed','warnings','plannedActions','rawFlags','528vOAlEt','message','flagMissing','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','beforeById','204871vAckSY','code','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','num','requestedVisible','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','update-menu-visibility','expected-count','menu_state_drift','menuIds','trim','13133743Xmhfpq','pageType','depth','byId','Requested\x20menu\x20visibility','parentId','isArray','menu-ids','map'];a153_0x464e=function(){return _0x1aaa2f;};return a153_0x464e();}export const menuVisibilityUpdate={'service':a153_0x4f42a4(0x1d7),'command':a153_0x4f42a4(0x1d4),'description':a153_0x4f42a4(0x206),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a153_0x4f42a4(0x231),'type':a153_0x4f42a4(0x23b),'description':a153_0x4f42a4(0x1c5)},{'name':a153_0x4f42a4(0x1f7),'type':a153_0x4f42a4(0x23b),'description':a153_0x4f42a4(0x21f)},{'name':'visible','type':'boolean','required':!![],'description':a153_0x4f42a4(0x22e)},{'name':'expect-visible','type':a153_0x4f42a4(0x1d8),'description':a153_0x4f42a4(0x223)},{'name':a153_0x4f42a4(0x226),'type':a153_0x4f42a4(0x1c8),'description':a153_0x4f42a4(0x222)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3cc4cd){parseInput(_0x3cc4cd),requireExplicitYes(_0x3cc4cd);},async 'dryRun'(_0x2a3910){const _0x448173=a153_0x4f42a4,_0x114dc9=await buildPlan(_0x2a3910,!![]),_0x320782=_0x114dc9[_0x448173(0x1d0)][_0x448173(0x216)]?.[_0x448173(0x1f4)]??0x0,_0x9c075a=_0x114dc9[_0x448173(0x1d0)][_0x448173(0x204)][_0x448173(0x1f4)]-_0x320782;return menuDryRunResult(_0x114dc9[_0x448173(0x1d0)],{'method':_0x448173(0x23d),'url':_0x448173(0x203),'body':{'updates':_0x114dc9[_0x448173(0x1d0)]['plannedActions']?.[_0x448173(0x232)](_0x32b744=>_0x32b744[_0x448173(0x23a)])??[]},'description':_0x448173(0x1f1)+_0x320782+_0x448173(0x1d9)+_0x9c075a+_0x448173(0x1cd)});},async 'execute'(_0x57ecdd){const _0x350cad=a153_0x4f42a4;requireExplicitYes(_0x57ecdd);const _0x3be9fa=await buildPlan(_0x57ecdd,![]);await recheckMutationSnapshot(_0x57ecdd,_0x3be9fa[_0x350cad(0x1d0)],_0x350cad(0x1e9));const _0x6e311a=[],_0x8a0a40=[],_0x1ab6c8=[];for(const _0x359e3b of _0x3be9fa[_0x350cad(0x1d0)]['targets']){if(_0x359e3b[_0x350cad(0x233)][_0x350cad(0x1e6)]===_0x3be9fa['plan'][_0x350cad(0x221)]){_0x6e311a[_0x350cad(0x1e1)]({'id':_0x359e3b['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x57ecdd[_0x350cad(0x1c6)],_0x57ecdd[_0x350cad(0x1cc)],{'id':_0x359e3b['id'],'visible':_0x3be9fa[_0x350cad(0x1d0)][_0x350cad(0x221)]}),_0x6e311a[_0x350cad(0x1e1)]({'id':_0x359e3b['id'],'updated':!![],'skipped':![]});}catch(_0x44757d){const _0x46b9c8=mapMenuApiError(_0x44757d,_0x350cad(0x209),_0x359e3b['id']);if(isMenuResponseLoss(_0x44757d)&&_0x46b9c8[_0x350cad(0x21e)]!==_0x350cad(0x236)){_0x1ab6c8[_0x350cad(0x1e1)](_0x359e3b['id']);continue;}_0x8a0a40[_0x350cad(0x1e1)]({'id':_0x359e3b['id'],'stage':_0x350cad(0x1c3),'code':_0x46b9c8[_0x350cad(0x21e)],'message':_0x46b9c8[_0x350cad(0x219)]});}}let _0x5b722e;try{_0x5b722e=await fetchMenuSnapshot(_0x57ecdd['appCode'],_0x57ecdd[_0x350cad(0x1cc)]);}catch(_0x473e4d){const _0x38ae0a=describeMenuErrorCause(_0x473e4d,_0x350cad(0x23e)),_0x5dc8b8=_0x1ab6c8[_0x350cad(0x232)](_0x14e4a2=>({'id':_0x14e4a2,'stage':_0x350cad(0x1fa),'code':_0x350cad(0x1f9),'message':_0x350cad(0x1fe)+_0x14e4a2+_0x350cad(0x1df),'requestedStateConfirmed':![],'recovered':![]})),_0x35dddb={'stage':_0x350cad(0x1e5),'code':'menu_verification_failed','message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x3be9fa[_0x350cad(0x1d0)][_0x350cad(0x204)]['map'](_0xb8f1b5=>_0xb8f1b5['id']),'requestedStateConfirmed':![],..._0x38ae0a};throw menuFailure(asVerificationError(_0x473e4d,_0x350cad(0x212)),_0x3be9fa['plan'],{'stage':_0x350cad(0x1e5),'succeeded':_0x6e311a,'failedRecords':[..._0x8a0a40,..._0x5dc8b8,_0x35dddb],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x350cad(0x214),'recoveredCount':0x0,'lookupCommand':_0x350cad(0x1d2)}});}const _0x4b837e=[];for(const _0x3f50f3 of _0x6e311a){const _0x47f5ee=Number(_0x3f50f3['id']),_0x11ef59=_0x3be9fa[_0x350cad(0x21c)][_0x350cad(0x240)](_0x47f5ee),_0x400867=_0x5b722e[_0x350cad(0x22d)][_0x350cad(0x240)](_0x47f5ee);try{verifyVisibilityUpdate(_0x11ef59,_0x400867,_0x3be9fa[_0x350cad(0x1d0)][_0x350cad(0x221)]);}catch(_0x1013af){const _0x39129e=asVerificationError(_0x1013af,'Menu\x20'+_0x47f5ee+_0x350cad(0x1eb));_0x4b837e[_0x350cad(0x1e1)]({'id':_0x47f5ee,'stage':_0x350cad(0x1e5),'code':_0x39129e['code'],'message':_0x39129e[_0x350cad(0x219)],'requestedStateConfirmed':![]});}}for(const _0x2d59a8 of _0x1ab6c8){const _0x4a65e6=_0x3be9fa[_0x350cad(0x21c)]['get'](_0x2d59a8),_0x2d3bcc=_0x5b722e['byId'][_0x350cad(0x240)](_0x2d59a8);try{verifyVisibilityUpdate(_0x4a65e6,_0x2d3bcc,_0x3be9fa['plan'][_0x350cad(0x221)]),_0x6e311a[_0x350cad(0x1e1)]({'id':_0x2d59a8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3f0868){const _0xc4fbeb=asVerificationError(_0x3f0868,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2d59a8+_0x350cad(0x238));_0x4b837e['push']({'id':_0x2d59a8,'stage':'update-recovery','code':_0xc4fbeb[_0x350cad(0x21e)],'message':_0xc4fbeb['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4b837e[_0x350cad(0x1f4)]>0x0){const _0x1f5f94=_0x4b837e[_0x350cad(0x232)](_0x224843=>Number(_0x224843['id'])),_0x56648d=_0x6e311a[_0x350cad(0x1ea)](_0x388b71=>_0x388b71[_0x350cad(0x237)]===!![])[_0x350cad(0x1f4)],_0x777638=menuError(_0x350cad(0x1f9),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1f5f94[_0x350cad(0x207)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x777638,_0x3be9fa[_0x350cad(0x1d0)],{'stage':_0x350cad(0x1e5),'succeeded':_0x6e311a,'failedRecords':[..._0x8a0a40,..._0x4b837e],'warnings':[_0x350cad(0x234)],'verification':{'status':_0x350cad(0x214),..._0x1f5f94[_0x350cad(0x1f4)]===0x1?{'targetId':_0x1f5f94[0x0]}:{'targetIds':_0x1f5f94},'recoveredCount':_0x56648d,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x350fab=_0x6e311a[_0x350cad(0x1ea)](_0x3033a6=>_0x3033a6[_0x350cad(0x1e4)]===!![])[_0x350cad(0x1f4)],_0x1e19b4=_0x6e311a['length']-_0x350fab,_0x1b45d8={..._0x3be9fa['plan'],'succeeded':_0x6e311a,'failed':_0x8a0a40,'warnings':_0x8a0a40[_0x350cad(0x1f4)]>0x0?[..._0x3be9fa['plan'][_0x350cad(0x215)],_0x350cad(0x1db)]:_0x3be9fa['plan'][_0x350cad(0x215)],'verification':{'checkedBy':_0x350cad(0x1d1),'snapshotHash':_0x5b722e[_0x350cad(0x1d6)],'matchesRequestedState':_0x8a0a40['length']===0x0,'recoveredCount':_0x1ab6c8['length']}};return{'ok':_0x8a0a40[_0x350cad(0x1f4)]===0x0,'data':_0x1b45d8,'message':_0x8a0a40[_0x350cad(0x1f4)]===0x0?'Updated\x20visibility\x20for\x20'+_0x350fab+_0x350cad(0x1f0)+_0x1e19b4+'\x20unchanged\x20menu(s).':'Menu\x20visibility\x20update\x20completed:\x20'+_0x350fab+_0x350cad(0x1de)+_0x1e19b4+'\x20skipped,\x20'+_0x8a0a40['length']+_0x350cad(0x1c9)};}};function parseInput(_0x156964){const _0x5b28a9=a153_0x4f42a4,_0x49c622=parseMenuIds(_0x156964[_0x5b28a9(0x20e)](_0x5b28a9(0x231))),_0x49ed3d=parseCsv(_0x156964['str'](_0x5b28a9(0x1f7)));if(_0x49c622['length']===0x0&&_0x49ed3d['length']===0x0)throw CliErrors[_0x5b28a9(0x1ef)](_0x5b28a9(0x20f));const _0x5d1479=parseBooleanFlag(_0x156964,_0x5b28a9(0x1e6),!![]),_0x20d646=parseBooleanFlag(_0x156964,_0x5b28a9(0x1f5),![]);let _0x2e0b6e;if(hasFlag(_0x156964,_0x5b28a9(0x226))){_0x2e0b6e=_0x156964[_0x5b28a9(0x220)]('expected-count');if(!Number[_0x5b28a9(0x1f6)](_0x2e0b6e)||_0x2e0b6e<0x0)throw CliErrors['validation'](_0x5b28a9(0x1c7));}return{'menuIds':_0x49c622,'paths':_0x49ed3d,'visible':_0x5d1479,'expectVisible':_0x20d646,'expectedCount':_0x2e0b6e};}function a153_0x467a(_0x438e9f,_0x4d8621){_0x438e9f=_0x438e9f-0x1c2;const _0x464e7f=a153_0x464e();let _0x467acb=_0x464e7f[_0x438e9f];return _0x467acb;}async function buildPlan(_0x54b7df,_0x5f4d2e){const _0x532569=a153_0x4f42a4,_0xfa9b0a=parseInput(_0x54b7df),_0x2dbc03=await fetchMutationSnapshot(_0x54b7df,_0x532569(0x1e9)),_0xf32b5b=selectTargets(_0x2dbc03[_0x532569(0x1ed)],_0xfa9b0a[_0x532569(0x228)],_0xfa9b0a[_0x532569(0x1f7)]);if(_0xfa9b0a[_0x532569(0x235)]!==undefined&&_0xf32b5b[_0x532569(0x1f4)]!==_0xfa9b0a[_0x532569(0x235)])throw menuError(_0x532569(0x1dd),_0x532569(0x211)+_0xf32b5b[_0x532569(0x1f4)]+_0x532569(0x241)+_0xfa9b0a[_0x532569(0x235)]+'.',_0x532569(0x243));if(_0xfa9b0a[_0x532569(0x201)]!==undefined){const _0x2d2b59=_0xf32b5b['filter'](_0xd3ddb8=>_0xd3ddb8[_0x532569(0x1e6)]!==_0xfa9b0a[_0x532569(0x201)]);if(_0x2d2b59[_0x532569(0x1f4)]>0x0)throw menuError(_0x532569(0x227),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2d2b59['map'](_0x599820=>_0x599820['id'])[_0x532569(0x207)](',\x20')+'.',_0x532569(0x1ec));}const _0x46d666=_0xf32b5b[_0x532569(0x232)](_0x3ee676=>({'id':_0x3ee676['id'],'label':_0x3ee676[_0x532569(0x1d5)],'path':_0x3ee676[_0x532569(0x20a)],'before':{'visible':_0x3ee676[_0x532569(0x1e6)]},'after':{'visible':_0xfa9b0a[_0x532569(0x1e6)]}})),_0xcfc035=_0x46d666[_0x532569(0x1ea)](_0x1567e0=>_0x1567e0[_0x532569(0x233)][_0x532569(0x1e6)]!==_0xfa9b0a[_0x532569(0x1e6)])['map'](_0x4f4aed=>({'stage':_0x532569(0x225),'method':'POST','path':_0x532569(0x203),'body':{'appCode':_0x54b7df[_0x532569(0x1c6)],'id':_0x4f4aed['id'],'visible':_0xfa9b0a[_0x532569(0x1e6)]}})),_0x2039d1=mutationResult({'operation':_0x532569(0x1d4),'selector':{'menuIds':_0xfa9b0a[_0x532569(0x228)],'paths':_0xfa9b0a[_0x532569(0x1f7)]},'before':{'menus':_0xf32b5b['map'](_0x5c7d3b=>({'id':_0x5c7d3b['id'],'path':_0x5c7d3b[_0x532569(0x20a)],'visible':_0x5c7d3b['visible']}))},'after':{'menus':_0xf32b5b[_0x532569(0x232)](_0x44b488=>({'id':_0x44b488['id'],'path':_0x44b488[_0x532569(0x20a)],'visible':_0xfa9b0a[_0x532569(0x1e6)]}))},'dryRun':_0x5f4d2e,'backend':[...BACKEND],'plannedActions':_0xcfc035,'snapshotHash':_0x2dbc03['hash'],'warnings':_0xcfc035[_0x532569(0x1f4)]===0x0?[_0x532569(0x20d)]:[]});return{'plan':{..._0x2039d1,'requestedVisible':_0xfa9b0a[_0x532569(0x1e6)],'targets':_0x46d666},'beforeById':new Map(_0xf32b5b[_0x532569(0x232)](_0x2fed74=>[_0x2fed74['id'],_0x2fed74]))};}function selectTargets(_0x153f7f,_0x596d86,_0xddc7f3){const _0x364b3b=a153_0x4f42a4,_0x3c05e9=new Map(_0x153f7f[_0x364b3b(0x232)](_0x5d40c9=>[_0x5d40c9['id'],_0x5d40c9])),_0x2e6084=new Map(),_0x4bc7fb=_0x596d86[_0x364b3b(0x1ea)](_0x9b7016=>!_0x3c05e9['has'](_0x9b7016));if(_0x4bc7fb[_0x364b3b(0x1f4)]>0x0)throw menuError('menu_selector_not_found','Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x4bc7fb[_0x364b3b(0x207)](',\x20')+'.',_0x364b3b(0x1e3));for(const _0x3c37a5 of _0x596d86){_0x2e6084[_0x364b3b(0x1ee)](_0x3c37a5,_0x3c05e9[_0x364b3b(0x240)](_0x3c37a5));}for(const _0x572554 of _0xddc7f3){const _0x4f4e8c=_0x153f7f[_0x364b3b(0x1ea)](_0x49de6e=>_0x49de6e[_0x364b3b(0x20a)]===_0x572554);if(_0x4f4e8c[_0x364b3b(0x1f4)]===0x0)throw menuError(_0x364b3b(0x1f8),_0x364b3b(0x20b)+JSON[_0x364b3b(0x1fb)](_0x572554)+'.',_0x364b3b(0x1ca));if(_0x4f4e8c[_0x364b3b(0x1f4)]>0x1)throw menuError(_0x364b3b(0x1ff),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x364b3b(0x1fb)](_0x572554)+'.',_0x364b3b(0x1da)+_0x4f4e8c['map'](_0x5c509f=>_0x5c509f['id'])[_0x364b3b(0x207)](',\x20')+'.');const _0x4f097d=_0x4f4e8c[0x0];_0x2e6084[_0x364b3b(0x1ee)](_0x4f097d['id'],_0x4f097d);}return[..._0x2e6084[_0x364b3b(0x1c4)]()];}function parseMenuIds(_0x44d151){const _0x19e471=a153_0x4f42a4,_0x261d10=parseCsv(_0x44d151),_0x28eeb0=_0x261d10[_0x19e471(0x232)](Number);if(_0x28eeb0['some'](_0x54e615=>!Number[_0x19e471(0x1f6)](_0x54e615)||_0x54e615<=0x0))throw CliErrors[_0x19e471(0x1ef)](_0x19e471(0x21b));return[...new Set(_0x28eeb0)];}function parseCsv(_0x448359){const _0x5f5301=a153_0x4f42a4;return[...new Set(_0x448359[_0x5f5301(0x23c)](',')[_0x5f5301(0x232)](_0x443a81=>_0x443a81[_0x5f5301(0x229)]())[_0x5f5301(0x1ea)](Boolean))];}function parseBooleanFlag(_0x521ff8,_0x54fddc,_0x53af4f){const _0x1bf7cd=a153_0x4f42a4;if(!hasFlag(_0x521ff8,_0x54fddc)){if(_0x53af4f)throw CliErrors[_0x1bf7cd(0x21a)](_0x54fddc);return undefined;}const _0xfdbdaa=_0x521ff8[_0x1bf7cd(0x217)][_0x54fddc];if(_0xfdbdaa===!![]||_0xfdbdaa===![])return _0xfdbdaa;if(_0xfdbdaa===_0x1bf7cd(0x23f))return!![];if(_0xfdbdaa==='false')return![];throw CliErrors['validation']('--'+_0x54fddc+_0x1bf7cd(0x1e7));}function verifyVisibilityUpdate(_0x5eaa4e,_0x3e4690,_0x2909e4){const _0x130480=a153_0x4f42a4;assertVerified(!!_0x3e4690,'Menu\x20'+_0x5eaa4e['id']+_0x130480(0x1cf)),assertVerified(_0x3e4690[_0x130480(0x1e6)]===_0x2909e4,_0x130480(0x1d3)+_0x5eaa4e['id']+_0x130480(0x224));const _0x76dc22=[['id',_0x3e4690['id'],_0x5eaa4e['id']],['parentId',_0x3e4690[_0x130480(0x22f)],_0x5eaa4e[_0x130480(0x22f)]],[_0x130480(0x22c),_0x3e4690[_0x130480(0x22c)],_0x5eaa4e['depth']],[_0x130480(0x1d5),_0x3e4690[_0x130480(0x1d5)],_0x5eaa4e[_0x130480(0x1d5)]],[_0x130480(0x20a),_0x3e4690[_0x130480(0x20a)],_0x5eaa4e[_0x130480(0x20a)]],[_0x130480(0x213),_0x3e4690[_0x130480(0x213)],_0x5eaa4e[_0x130480(0x213)]],[_0x130480(0x1e0),_0x3e4690[_0x130480(0x1e0)],_0x5eaa4e[_0x130480(0x1e0)]],[_0x130480(0x1dc),_0x3e4690[_0x130480(0x1dc)],_0x5eaa4e[_0x130480(0x1dc)]],[_0x130480(0x202),_0x3e4690[_0x130480(0x202)],_0x5eaa4e[_0x130480(0x202)]],[_0x130480(0x20c),_0x3e4690[_0x130480(0x20c)],_0x5eaa4e['resourcesValid']],[_0x130480(0x1ce),_0x3e4690[_0x130480(0x1ce)],_0x5eaa4e[_0x130480(0x1ce)]],[_0x130480(0x242),_0x3e4690[_0x130480(0x242)],_0x5eaa4e[_0x130480(0x242)]],[_0x130480(0x1fc),_0x3e4690[_0x130480(0x1fc)],_0x5eaa4e['pageId']],[_0x130480(0x22b),_0x3e4690[_0x130480(0x22b)],_0x5eaa4e[_0x130480(0x22b)]],[_0x130480(0x1f3),_0x3e4690['modelType'],_0x5eaa4e[_0x130480(0x1f3)]],['datasetId',_0x3e4690[_0x130480(0x239)],_0x5eaa4e[_0x130480(0x239)]],[_0x130480(0x210),_0x3e4690[_0x130480(0x210)],_0x5eaa4e['datasetCode']]];for(const [_0x294f2c,_0x27ab73,_0x6df2f3]of _0x76dc22){assertVerified(sameValue(_0x27ab73,_0x6df2f3),_0x130480(0x1d3)+_0x5eaa4e['id']+'\x20'+_0x294f2c+'\x20changed\x20unexpectedly.');}}function sameValue(_0x34affc,_0x1d0dfd){const _0x287612=a153_0x4f42a4;if(Array[_0x287612(0x230)](_0x34affc)||Array[_0x287612(0x230)](_0x1d0dfd))return JSON[_0x287612(0x1fb)](_0x34affc)===JSON['stringify'](_0x1d0dfd);return _0x34affc===_0x1d0dfd;}
1
+ const a153_0x4ba748=a153_0x2d83;(function(_0x854c26,_0x209419){const _0x9c02c=a153_0x2d83,_0x385d73=_0x854c26();while(!![]){try{const _0xc652b4=parseInt(_0x9c02c(0xdb))/0x1*(-parseInt(_0x9c02c(0xc5))/0x2)+-parseInt(_0x9c02c(0xaf))/0x3*(-parseInt(_0x9c02c(0x8a))/0x4)+parseInt(_0x9c02c(0x80))/0x5*(-parseInt(_0x9c02c(0xde))/0x6)+parseInt(_0x9c02c(0x79))/0x7*(-parseInt(_0x9c02c(0x95))/0x8)+-parseInt(_0x9c02c(0xa3))/0x9*(parseInt(_0x9c02c(0x66))/0xa)+-parseInt(_0x9c02c(0xe2))/0xb*(-parseInt(_0x9c02c(0xcd))/0xc)+parseInt(_0x9c02c(0xc7))/0xd;if(_0xc652b4===_0x209419)break;else _0x385d73['push'](_0x385d73['shift']());}catch(_0x58481c){_0x385d73['push'](_0x385d73['shift']());}}}(a153_0x3289,0x25b5c));function a153_0x3289(){const _0x482edc=['set','\x20menu(s);\x20skip\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','126862rdfCvw','menu_selector_ambiguous','6759818IWIjmE','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Final\x20menu\x20visibility\x20readback\x20failed.','Updated\x20visibility\x20for\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Response\x20was\x20lost\x20and\x20menu\x20','134388tmNTQE','modelType','flagMissing','label','resources','requestedVisible','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','validation','false','menu_state_drift','expectVisible','true','rabetbase\x20menu\x20list\x20--format\x20compress','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','2RsoPzu','body','\x20menu(s);\x20skipped\x20','726grovYv','cookie','warnings','Menu\x20visibility\x20update\x20completed:\x20','231hjUDWg','\x20skipped,\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','30maoAKG','datasetCode','expected-count','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','parentId','pageType','type','verification','message','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','expect-visible','Requested\x20menu\x20visibility','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','update-menu-visibility','menus','\x20updated,\x20','Would\x20update\x20visibility\x20for\x20','\x20unchanged\x20menu(s).','36694iYiZTD','appCode','filter','some','resourcesValid','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','verify\x20menu\x20visibility\x20update','12405KBLneh','\x20must\x20be\x20true\x20or\x20false.','Menu\x20','boolean','plan','string','has','str','trim','push','88136aCUSJK','split','childrenCount','isSafeInteger','\x20failed.','stringify','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','hash','\x20changed\x20unexpectedly.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','408gPWcyr','before','update-recovery','menu','high-risk-write','POST','update\x20visibility\x20for','path','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','plannedActions','/smartapi/menu/update','Menu\x20id\x20selector(s)\x20not\x20found:\x20','code','failed','644328utKRgt','menuIds','values','updated','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Response\x20was\x20lost\x20for\x20menu\x20','visible','menu-ids','byId','childrenIds','menu_verification_failed','join','42WTmlEb','sort','datasetId','map','Selected\x20','isArray','num','pageId','targets','depth','update\x20menu\x20visibility','expectedCount','length','get','url','menu_permission_denied','visibility-update','beforeById','paths'];a153_0x3289=function(){return _0x482edc;};return a153_0x3289();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a153_0x2d83(_0x5ac558,_0x2ec4c5){_0x5ac558=_0x5ac558-0x66;const _0x32894f=a153_0x3289();let _0x2d83d=_0x32894f[_0x5ac558];return _0x2d83d;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a153_0x4ba748(0x9a),'path':a153_0x4ba748(0x9f)}];export const menuVisibilityUpdate={'service':a153_0x4ba748(0x98),'command':a153_0x4ba748(0xbf),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a153_0x4ba748(0x99),'structuredErrors':!![],'flags':[{'name':a153_0x4ba748(0xaa),'type':a153_0x4ba748(0x85),'description':a153_0x4ba748(0xda)},{'name':'paths','type':a153_0x4ba748(0x85),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a153_0x4ba748(0xa9),'type':a153_0x4ba748(0x83),'required':!![],'description':a153_0x4ba748(0x71)},{'name':'expect-visible','type':'boolean','description':a153_0x4ba748(0x69)},{'name':a153_0x4ba748(0x68),'type':'number','description':a153_0x4ba748(0x9d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x329767){parseInput(_0x329767),requireExplicitYes(_0x329767);},async 'dryRun'(_0x50634f){const _0x339733=a153_0x4ba748,_0x440910=await buildPlan(_0x50634f,!![]),_0x5cf33e=_0x440910[_0x339733(0x84)]['plannedActions']?.['length']??0x0,_0x39bf98=_0x440910[_0x339733(0x84)][_0x339733(0xb7)]['length']-_0x5cf33e;return menuDryRunResult(_0x440910[_0x339733(0x84)],{'method':'POST','url':_0x339733(0x9f),'body':{'updates':_0x440910[_0x339733(0x84)][_0x339733(0x9e)]?.[_0x339733(0xb2)](_0x4e6214=>_0x4e6214[_0x339733(0xdc)])??[]},'description':_0x339733(0x77)+_0x5cf33e+_0x339733(0xc3)+_0x39bf98+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2db162){const _0x578207=a153_0x4ba748;requireExplicitYes(_0x2db162);const _0x5ee2f0=await buildPlan(_0x2db162,![]);await recheckMutationSnapshot(_0x2db162,_0x5ee2f0[_0x578207(0x84)],_0x578207(0xb9));const _0x9f9de6=[],_0x1dbbe9=[],_0x25cbb8=[];for(const _0x5833aa of _0x5ee2f0['plan'][_0x578207(0xb7)]){if(_0x5833aa[_0x578207(0x96)][_0x578207(0xa9)]===_0x5ee2f0['plan'][_0x578207(0xd2)]){_0x9f9de6[_0x578207(0x89)]({'id':_0x5833aa['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2db162[_0x578207(0x7a)],_0x2db162[_0x578207(0xdf)],{'id':_0x5833aa['id'],'visible':_0x5ee2f0['plan'][_0x578207(0xd2)]}),_0x9f9de6[_0x578207(0x89)]({'id':_0x5833aa['id'],'updated':!![],'skipped':![]});}catch(_0x198d34){const _0xc23080=mapMenuApiError(_0x198d34,_0x578207(0x9b),_0x5833aa['id']);if(isMenuResponseLoss(_0x198d34)&&_0xc23080['code']!==_0x578207(0xbe)){_0x25cbb8[_0x578207(0x89)](_0x5833aa['id']);continue;}_0x1dbbe9[_0x578207(0x89)]({'id':_0x5833aa['id'],'stage':'update','code':_0xc23080[_0x578207(0xa1)],'message':_0xc23080['message']});}}let _0x530241;try{_0x530241=await fetchMenuSnapshot(_0x2db162[_0x578207(0x7a)],_0x2db162['cookie']);}catch(_0x353966){const _0x1462b9=describeMenuErrorCause(_0x353966,_0x578207(0x7f)),_0x943be2=_0x25cbb8['map'](_0x3d1f62=>({'id':_0x3d1f62,'stage':'update-recovery','code':_0x578207(0xad),'message':_0x578207(0xa8)+_0x3d1f62+_0x578207(0xe4),'requestedStateConfirmed':![],'recovered':![]})),_0x4c6a87={'stage':_0x578207(0x6d),'code':_0x578207(0xad),'message':_0x578207(0xc9),'targetIds':_0x5ee2f0[_0x578207(0x84)]['targets'][_0x578207(0xb2)](_0x539a7e=>_0x539a7e['id']),'requestedStateConfirmed':![],..._0x1462b9};throw menuFailure(asVerificationError(_0x353966,_0x578207(0x6f)),_0x5ee2f0[_0x578207(0x84)],{'stage':_0x578207(0x6d),'succeeded':_0x9f9de6,'failedRecords':[..._0x1dbbe9,..._0x943be2,_0x4c6a87],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x578207(0xa2),'recoveredCount':0x0,'lookupCommand':_0x578207(0xd9)}});}const _0x55ce0c=[];for(const _0x1e59f0 of _0x9f9de6){const _0x5ab57e=Number(_0x1e59f0['id']),_0x2c72e0=_0x5ee2f0[_0x578207(0xc0)][_0x578207(0xbc)](_0x5ab57e),_0x47a779=_0x530241[_0x578207(0xab)]['get'](_0x5ab57e);try{verifyVisibilityUpdate(_0x2c72e0,_0x47a779,_0x5ee2f0[_0x578207(0x84)][_0x578207(0xd2)]);}catch(_0x571bb6){const _0x2820b6=asVerificationError(_0x571bb6,_0x578207(0x82)+_0x5ab57e+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x55ce0c[_0x578207(0x89)]({'id':_0x5ab57e,'stage':_0x578207(0x6d),'code':_0x2820b6[_0x578207(0xa1)],'message':_0x2820b6[_0x578207(0x6e)],'requestedStateConfirmed':![]});}}for(const _0x24322a of _0x25cbb8){const _0x3ac432=_0x5ee2f0['beforeById'][_0x578207(0xbc)](_0x24322a),_0x179302=_0x530241[_0x578207(0xab)][_0x578207(0xbc)](_0x24322a);try{verifyVisibilityUpdate(_0x3ac432,_0x179302,_0x5ee2f0['plan'][_0x578207(0xd2)]),_0x9f9de6[_0x578207(0x89)]({'id':_0x24322a,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x348997){const _0x1833af=asVerificationError(_0x348997,_0x578207(0xcc)+_0x24322a+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x55ce0c['push']({'id':_0x24322a,'stage':_0x578207(0x97),'code':_0x1833af[_0x578207(0xa1)],'message':_0x1833af[_0x578207(0x6e)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x55ce0c[_0x578207(0xbb)]>0x0){const _0x5b7401=_0x55ce0c[_0x578207(0xb2)](_0x3de00e=>Number(_0x3de00e['id'])),_0x535858=_0x9f9de6[_0x578207(0x7b)](_0x470c3d=>_0x470c3d['recovered']===!![])[_0x578207(0xbb)],_0x5ec76f=menuError(_0x578207(0xad),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x5b7401[_0x578207(0xae)](',\x20')+'.',_0x578207(0x7e));throw menuFailure(_0x5ec76f,_0x5ee2f0['plan'],{'stage':'verification','succeeded':_0x9f9de6,'failedRecords':[..._0x1dbbe9,..._0x55ce0c],'warnings':[_0x578207(0xc8)],'verification':{'status':_0x578207(0xa2),..._0x5b7401[_0x578207(0xbb)]===0x1?{'targetId':_0x5b7401[0x0]}:{'targetIds':_0x5b7401},'recoveredCount':_0x535858,'lookupCommand':_0x578207(0xd9)}});}const _0x22054a=_0x9f9de6[_0x578207(0x7b)](_0x411f2d=>_0x411f2d[_0x578207(0xa6)]===!![])['length'],_0x55d196=_0x9f9de6[_0x578207(0xbb)]-_0x22054a,_0x49a34c={..._0x5ee2f0[_0x578207(0x84)],'succeeded':_0x9f9de6,'failed':_0x1dbbe9,'warnings':_0x1dbbe9[_0x578207(0xbb)]>0x0?[..._0x5ee2f0[_0x578207(0x84)][_0x578207(0xe0)],_0x578207(0xcb)]:_0x5ee2f0[_0x578207(0x84)][_0x578207(0xe0)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x530241[_0x578207(0x92)],'matchesRequestedState':_0x1dbbe9['length']===0x0,'recoveredCount':_0x25cbb8['length']}};return{'ok':_0x1dbbe9[_0x578207(0xbb)]===0x0,'data':_0x49a34c,'message':_0x1dbbe9[_0x578207(0xbb)]===0x0?_0x578207(0xca)+_0x22054a+_0x578207(0xdd)+_0x55d196+_0x578207(0x78):_0x578207(0xe1)+_0x22054a+_0x578207(0x76)+_0x55d196+_0x578207(0xe3)+_0x1dbbe9['length']+_0x578207(0x8e)};}};function parseInput(_0x5691f5){const _0x35bc29=a153_0x4ba748,_0x231670=parseMenuIds(_0x5691f5[_0x35bc29(0x87)](_0x35bc29(0xaa))),_0x41f15b=parseCsv(_0x5691f5[_0x35bc29(0x87)](_0x35bc29(0xc1)));if(_0x231670['length']===0x0&&_0x41f15b[_0x35bc29(0xbb)]===0x0)throw CliErrors[_0x35bc29(0xd4)](_0x35bc29(0x72));const _0x4eb56d=parseBooleanFlag(_0x5691f5,_0x35bc29(0xa9),!![]),_0xba3068=parseBooleanFlag(_0x5691f5,_0x35bc29(0x70),![]);let _0x17412a;if(hasFlag(_0x5691f5,'expected-count')){_0x17412a=_0x5691f5[_0x35bc29(0xb5)](_0x35bc29(0x68));if(!Number[_0x35bc29(0x8d)](_0x17412a)||_0x17412a<0x0)throw CliErrors[_0x35bc29(0xd4)](_0x35bc29(0x91));}return{'menuIds':_0x231670,'paths':_0x41f15b,'visible':_0x4eb56d,'expectVisible':_0xba3068,'expectedCount':_0x17412a};}async function buildPlan(_0x4a21ae,_0x4f225f){const _0x5d67d4=a153_0x4ba748,_0x3166cc=parseInput(_0x4a21ae),_0x46ca8b=await fetchMutationSnapshot(_0x4a21ae,_0x5d67d4(0xb9)),_0x3d67e7=selectTargets(_0x46ca8b[_0x5d67d4(0x75)],_0x3166cc['menuIds'],_0x3166cc[_0x5d67d4(0xc1)]);if(_0x3166cc[_0x5d67d4(0xba)]!==undefined&&_0x3d67e7[_0x5d67d4(0xbb)]!==_0x3166cc[_0x5d67d4(0xba)])throw menuError('menu_expected_count_mismatch',_0x5d67d4(0xb3)+_0x3d67e7[_0x5d67d4(0xbb)]+'\x20menu(s),\x20expected\x20'+_0x3166cc['expectedCount']+'.',_0x5d67d4(0xc4));if(_0x3166cc[_0x5d67d4(0xd7)]!==undefined){const _0x116217=_0x3d67e7['filter'](_0x439256=>_0x439256[_0x5d67d4(0xa9)]!==_0x3166cc[_0x5d67d4(0xd7)]);if(_0x116217['length']>0x0)throw menuError(_0x5d67d4(0xd6),_0x5d67d4(0xa7)+_0x116217[_0x5d67d4(0xb2)](_0x45a624=>_0x45a624['id'])[_0x5d67d4(0xae)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x5a4090=_0x3d67e7[_0x5d67d4(0xb2)](_0x3df1cb=>({'id':_0x3df1cb['id'],'label':_0x3df1cb[_0x5d67d4(0xd0)],'path':_0x3df1cb['path'],'before':{'visible':_0x3df1cb[_0x5d67d4(0xa9)]},'after':{'visible':_0x3166cc[_0x5d67d4(0xa9)]}})),_0x3fb5a0=_0x5a4090[_0x5d67d4(0x7b)](_0x32cd2c=>_0x32cd2c[_0x5d67d4(0x96)][_0x5d67d4(0xa9)]!==_0x3166cc['visible'])['map'](_0x5f0cf0=>({'stage':_0x5d67d4(0x74),'method':_0x5d67d4(0x9a),'path':'/smartapi/menu/update','body':{'appCode':_0x4a21ae[_0x5d67d4(0x7a)],'id':_0x5f0cf0['id'],'visible':_0x3166cc[_0x5d67d4(0xa9)]}})),_0x533afc=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3166cc[_0x5d67d4(0xa4)],'paths':_0x3166cc['paths']},'before':{'menus':_0x3d67e7['map'](_0x43a8f2=>({'id':_0x43a8f2['id'],'path':_0x43a8f2[_0x5d67d4(0x9c)],'visible':_0x43a8f2[_0x5d67d4(0xa9)]}))},'after':{'menus':_0x3d67e7[_0x5d67d4(0xb2)](_0x48b1a8=>({'id':_0x48b1a8['id'],'path':_0x48b1a8[_0x5d67d4(0x9c)],'visible':_0x3166cc['visible']}))},'dryRun':_0x4f225f,'backend':[...BACKEND],'plannedActions':_0x3fb5a0,'snapshotHash':_0x46ca8b[_0x5d67d4(0x92)],'warnings':_0x3fb5a0[_0x5d67d4(0xbb)]===0x0?[_0x5d67d4(0x94)]:[]});return{'plan':{..._0x533afc,'requestedVisible':_0x3166cc[_0x5d67d4(0xa9)],'targets':_0x5a4090},'beforeById':new Map(_0x3d67e7[_0x5d67d4(0xb2)](_0x96cfbd=>[_0x96cfbd['id'],_0x96cfbd]))};}function selectTargets(_0x1a60a5,_0x4e96eb,_0x741260){const _0x1b7b1=a153_0x4ba748,_0x2c076a=new Map(_0x1a60a5['map'](_0x30f14a=>[_0x30f14a['id'],_0x30f14a])),_0x2152ae=new Map(),_0x9d8604=_0x4e96eb['filter'](_0x4eac45=>!_0x2c076a[_0x1b7b1(0x86)](_0x4eac45));if(_0x9d8604['length']>0x0)throw menuError('menu_selector_not_found',_0x1b7b1(0xa0)+_0x9d8604[_0x1b7b1(0xae)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x4c9240 of _0x4e96eb){_0x2152ae[_0x1b7b1(0xc2)](_0x4c9240,_0x2c076a[_0x1b7b1(0xbc)](_0x4c9240));}for(const _0x2bd2d1 of _0x741260){const _0x4f7b82=_0x1a60a5[_0x1b7b1(0x7b)](_0x2e54be=>_0x2e54be[_0x1b7b1(0x9c)]===_0x2bd2d1);if(_0x4f7b82[_0x1b7b1(0xbb)]===0x0)throw menuError('menu_selector_not_found','Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x1b7b1(0x8f)](_0x2bd2d1)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x4f7b82['length']>0x1)throw menuError(_0x1b7b1(0xc6),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x2bd2d1)+'.',_0x1b7b1(0x90)+_0x4f7b82[_0x1b7b1(0xb2)](_0x402213=>_0x402213['id'])[_0x1b7b1(0xae)](',\x20')+'.');const _0x261ba8=_0x4f7b82[0x0];_0x2152ae[_0x1b7b1(0xc2)](_0x261ba8['id'],_0x261ba8);}return[..._0x2152ae[_0x1b7b1(0xa5)]()];}function parseMenuIds(_0x446d04){const _0x4974d6=a153_0x4ba748,_0x30a6e5=parseCsv(_0x446d04),_0x34bf1e=_0x30a6e5[_0x4974d6(0xb2)](Number);if(_0x34bf1e[_0x4974d6(0x7c)](_0x59ea54=>!Number[_0x4974d6(0x8d)](_0x59ea54)||_0x59ea54<=0x0))throw CliErrors[_0x4974d6(0xd4)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x34bf1e)];}function parseCsv(_0x201809){const _0x562f5a=a153_0x4ba748;return[...new Set(_0x201809[_0x562f5a(0x8b)](',')[_0x562f5a(0xb2)](_0x53a605=>_0x53a605[_0x562f5a(0x88)]())[_0x562f5a(0x7b)](Boolean))];}function parseBooleanFlag(_0xe4e960,_0x43a79a,_0x1bcc3c){const _0x318047=a153_0x4ba748;if(!hasFlag(_0xe4e960,_0x43a79a)){if(_0x1bcc3c)throw CliErrors[_0x318047(0xcf)](_0x43a79a);return undefined;}const _0x126c36=_0xe4e960['rawFlags'][_0x43a79a];if(_0x126c36===!![]||_0x126c36===![])return _0x126c36;if(_0x126c36===_0x318047(0xd8))return!![];if(_0x126c36===_0x318047(0xd5))return![];throw CliErrors[_0x318047(0xd4)]('--'+_0x43a79a+_0x318047(0x81));}function verifyVisibilityUpdate(_0x2a1b9c,_0x5ecfc8,_0x51a8f1){const _0x1b417a=a153_0x4ba748;assertVerified(!!_0x5ecfc8,'Menu\x20'+_0x2a1b9c['id']+_0x1b417a(0xd3)),assertVerified(_0x5ecfc8['visible']===_0x51a8f1,_0x1b417a(0x82)+_0x2a1b9c['id']+_0x1b417a(0x73));const _0xad745c=[['id',_0x5ecfc8['id'],_0x2a1b9c['id']],['parentId',_0x5ecfc8[_0x1b417a(0x6a)],_0x2a1b9c[_0x1b417a(0x6a)]],[_0x1b417a(0xb8),_0x5ecfc8[_0x1b417a(0xb8)],_0x2a1b9c[_0x1b417a(0xb8)]],['label',_0x5ecfc8[_0x1b417a(0xd0)],_0x2a1b9c[_0x1b417a(0xd0)]],['path',_0x5ecfc8[_0x1b417a(0x9c)],_0x2a1b9c[_0x1b417a(0x9c)]],[_0x1b417a(0xbd),_0x5ecfc8[_0x1b417a(0xbd)],_0x2a1b9c[_0x1b417a(0xbd)]],['type',_0x5ecfc8[_0x1b417a(0x6c)],_0x2a1b9c['type']],[_0x1b417a(0xb0),_0x5ecfc8[_0x1b417a(0xb0)],_0x2a1b9c[_0x1b417a(0xb0)]],[_0x1b417a(0xd1),_0x5ecfc8[_0x1b417a(0xd1)],_0x2a1b9c[_0x1b417a(0xd1)]],[_0x1b417a(0x7d),_0x5ecfc8['resourcesValid'],_0x2a1b9c[_0x1b417a(0x7d)]],[_0x1b417a(0xac),_0x5ecfc8[_0x1b417a(0xac)],_0x2a1b9c[_0x1b417a(0xac)]],[_0x1b417a(0x8c),_0x5ecfc8[_0x1b417a(0x8c)],_0x2a1b9c['childrenCount']],['pageId',_0x5ecfc8[_0x1b417a(0xb6)],_0x2a1b9c['pageId']],[_0x1b417a(0x6b),_0x5ecfc8['pageType'],_0x2a1b9c[_0x1b417a(0x6b)]],[_0x1b417a(0xce),_0x5ecfc8[_0x1b417a(0xce)],_0x2a1b9c[_0x1b417a(0xce)]],['datasetId',_0x5ecfc8[_0x1b417a(0xb1)],_0x2a1b9c[_0x1b417a(0xb1)]],[_0x1b417a(0x67),_0x5ecfc8[_0x1b417a(0x67)],_0x2a1b9c[_0x1b417a(0x67)]]];for(const [_0x27413a,_0x2f68d8,_0x15b19e]of _0xad745c){assertVerified(sameValue(_0x2f68d8,_0x15b19e),_0x1b417a(0x82)+_0x2a1b9c['id']+'\x20'+_0x27413a+_0x1b417a(0x93));}}function sameValue(_0x5eff62,_0x1927f0){const _0x3b0cbe=a153_0x4ba748;if(Array['isArray'](_0x5eff62)||Array[_0x3b0cbe(0xb4)](_0x1927f0))return JSON[_0x3b0cbe(0x8f)](_0x5eff62)===JSON['stringify'](_0x1927f0);return _0x5eff62===_0x1927f0;}
@@ -1 +1 @@
1
- const a154_0x50aa82=a154_0x1df6;function a154_0x3239(){const _0x304c8a=['document','config-create','3508225GTcVsU','24283SGijUQ','channelType','5799610ooHNAe','appCode','connectTimeout','7vkSbwI','9kWjUih','configCode','Inspect\x20with\x20','endpointUrl','description','POST',';\x20do\x20not\x20resubmit\x20automatically.','Created\x20notification\x20config\x20','2629208EvLDxY','notification','write','create','/notification/channel-config/create','4vWkhiv','verification','readTimeout','2157192eJJVIQ','2892593azcJiY','1104672Jhwnvf','50gMrgBN','configName',';\x20do\x20not\x20resubmit.','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','planned','notification_config_create_outcome_unknown'];a154_0x3239=function(){return _0x304c8a;};return a154_0x3239();}(function(_0x5a010c,_0x56e4d7){const _0x3481c3=a154_0x1df6,_0x868076=_0x5a010c();while(!![]){try{const _0x58ec59=parseInt(_0x3481c3(0x1be))/0x1*(parseInt(_0x3481c3(0x1b4))/0x2)+parseInt(_0x3481c3(0x1b3))/0x3+-parseInt(_0x3481c3(0x1d1))/0x4*(parseInt(_0x3481c3(0x1bd))/0x5)+-parseInt(_0x3481c3(0x1b1))/0x6+parseInt(_0x3481c3(0x1c3))/0x7*(parseInt(_0x3481c3(0x1cc))/0x8)+-parseInt(_0x3481c3(0x1c4))/0x9*(-parseInt(_0x3481c3(0x1c0))/0xa)+-parseInt(_0x3481c3(0x1b2))/0xb;if(_0x58ec59===_0x56e4d7)break;else _0x868076['push'](_0x868076['shift']());}catch(_0x37b933){_0x868076['push'](_0x868076['shift']());}}}(a154_0x3239,0x88a9b));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=a154_0x50aa82(0x1d0);function a154_0x1df6(_0x12735c,_0x5bcd11){_0x12735c=_0x12735c-0x1af;const _0x3239d6=a154_0x3239();let _0x1df65d=_0x3239d6[_0x12735c];return _0x1df65d;}async function prepareCreate(_0x590d93){const _0x4bbde9=a154_0x50aa82,_0xaea7a4=await readNotificationDocument(_0x590d93,_0x4bbde9(0x1cf)),_0x1ca8a3=createMutationInput(_0x590d93[_0x4bbde9(0x1c1)],_0xaea7a4);return{'document':_0xaea7a4,'input':_0x1ca8a3,'planned':projectNotificationConfig({'appCode':_0x590d93['appCode'],'configName':_0xaea7a4[_0x4bbde9(0x1b5)],'channelType':_0xaea7a4[_0x4bbde9(0x1bf)],'endpointUrl':_0xaea7a4[_0x4bbde9(0x1c7)],'channelConfig':_0xaea7a4['channelConfig'],'description':_0xaea7a4[_0x4bbde9(0x1c8)],'connectTimeout':_0xaea7a4[_0x4bbde9(0x1c2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xaea7a4[_0x4bbde9(0x1b0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a154_0x50aa82(0x1cd),'command':a154_0x50aa82(0x1bc),'description':a154_0x50aa82(0x1b8),'risk':a154_0x50aa82(0x1ce),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x39e506){assertSingleNotificationSource(_0x39e506);},async 'dryRun'(_0x42c8f4){const _0x50b560=a154_0x50aa82,_0x3b5a5b=await prepareCreate(_0x42c8f4),_0x175a10=notificationLookupCommand(_0x42c8f4[_0x50b560(0x1c1)],_0x3b5a5b[_0x50b560(0x1bb)]['channelType']);return asDryRunResult({'operation':'create','selector':{'appCode':_0x42c8f4['appCode'],'configName':_0x3b5a5b[_0x50b560(0x1bb)][_0x50b560(0x1b5)],'channelType':_0x3b5a5b[_0x50b560(0x1bb)][_0x50b560(0x1bf)]},'before':null,'after':_0x3b5a5b[_0x50b560(0x1b9)],'dryRun':!![],'backend':{'method':_0x50b560(0x1c9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x50b560(0x1b9),'lookupCommand':_0x175a10}},{'method':_0x50b560(0x1c9),'url':CREATE_PATH});},async 'execute'(_0x5107de){const _0x351387=a154_0x50aa82,_0x5b645b=await prepareCreate(_0x5107de),_0x250aeb=notificationLookupCommand(_0x5107de[_0x351387(0x1c1)],_0x5b645b[_0x351387(0x1bb)][_0x351387(0x1bf)]);let _0x1fc991;try{_0x1fc991=await createNotificationChannelConfig(_0x5b645b['input']);}catch(_0x1f7c3a){if(isPlatformTransportFailure(_0x1f7c3a))throw notificationError(_0x351387(0x1ba),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x250aeb+_0x351387(0x1b6));throw safeApiFailure(_0x351387(0x1cf),_0x351387(0x1b7),_0x351387(0x1c6)+_0x250aeb+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number['isSafeInteger'](_0x1fc991)||_0x1fc991<=0x0)throw notificationError(_0x351387(0x1ba),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x250aeb+_0x351387(0x1b6));let _0x58dc95;try{const _0x58f916=await getNotificationChannelConfig(_0x1fc991,_0x5107de[_0x351387(0x1c1)]);_0x58dc95=normalizeExactNotificationConfig(_0x58f916,_0x1fc991,_0x5107de[_0x351387(0x1c1)]);}catch{throw safeApiFailure(_0x351387(0x1cf),_0x351387(0x1af),_0x351387(0x1c6)+_0x250aeb+_0x351387(0x1ca));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x58dc95[_0x351387(0x1c1)],'id':_0x58dc95['id'],'configCode':_0x58dc95[_0x351387(0x1c5)],'configName':_0x58dc95[_0x351387(0x1b5)],'channelType':_0x58dc95['channelType']},'before':null,'after':projectNotificationConfig(_0x58dc95),'dryRun':![],'backend':{'method':_0x351387(0x1c9),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x250aeb}},'message':_0x351387(0x1cb)+_0x58dc95['id']};}};
1
+ function a154_0xbe29(){const _0x36cb66=['document','appCode','1095480sWZZrZ','49XaJCsn','1502ZpxFZN','verification','28069019BcraeT','description','Created\x20notification\x20config\x20','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification','configName','readTimeout','mutation','planned',';\x20do\x20not\x20resubmit\x20automatically.','3879nranpY','56382jBhcdz','configCode','verified','create','write','channelType',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','POST','Inspect\x20with\x20','connectTimeout','notification_config_create_outcome_unknown','590BSyFkJ','channelConfig','460aSmFMh','688126rAvget','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','input','4262072MlVKfZ','12sjEYbu','168282ggjoAh'];a154_0xbe29=function(){return _0x36cb66;};return a154_0xbe29();}const a154_0x1ffb87=a154_0x3c33;(function(_0x3021be,_0x447eaa){const _0x403b59=a154_0x3c33,_0x2210f5=_0x3021be();while(!![]){try{const _0x4f3515=-parseInt(_0x403b59(0x1ff))/0x1+parseInt(_0x403b59(0x209))/0x2*(parseInt(_0x403b59(0x1ef))/0x3)+-parseInt(_0x403b59(0x202))/0x4+-parseInt(_0x403b59(0x1fc))/0x5*(parseInt(_0x403b59(0x1f0))/0x6)+-parseInt(_0x403b59(0x208))/0x7*(parseInt(_0x403b59(0x207))/0x8)+-parseInt(_0x403b59(0x204))/0x9*(-parseInt(_0x403b59(0x1fe))/0xa)+-parseInt(_0x403b59(0x20b))/0xb*(-parseInt(_0x403b59(0x203))/0xc);if(_0x4f3515===_0x447eaa)break;else _0x2210f5['push'](_0x2210f5['shift']());}catch(_0x170bc9){_0x2210f5['push'](_0x2210f5['shift']());}}}(a154_0xbe29,0x892b5));function a154_0x3c33(_0x327bad,_0x4fd646){_0x327bad=_0x327bad-0x1ee;const _0xbe293e=a154_0xbe29();let _0x3c336d=_0xbe293e[_0x327bad];return _0x3c336d;}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(_0x140d1d){const _0x53efb9=a154_0x3c33,_0x2b6d2b=await readNotificationDocument(_0x140d1d,_0x53efb9(0x1f3)),_0x56d670=createMutationInput(_0x140d1d[_0x53efb9(0x206)],_0x2b6d2b);return{'document':_0x2b6d2b,'input':_0x56d670,'planned':projectNotificationConfig({'appCode':_0x140d1d['appCode'],'configName':_0x2b6d2b[_0x53efb9(0x210)],'channelType':_0x2b6d2b[_0x53efb9(0x1f5)],'endpointUrl':_0x2b6d2b['endpointUrl'],'channelConfig':_0x2b6d2b[_0x53efb9(0x1fd)],'description':_0x2b6d2b[_0x53efb9(0x20c)],'connectTimeout':_0x2b6d2b[_0x53efb9(0x1fa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x2b6d2b[_0x53efb9(0x211)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a154_0x1ffb87(0x20f),'command':'config-create','description':a154_0x1ffb87(0x200),'risk':a154_0x1ffb87(0x1f4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xbb6ceb){assertSingleNotificationSource(_0xbb6ceb);},async 'dryRun'(_0x5e22d0){const _0x36c672=a154_0x1ffb87,_0x3df751=await prepareCreate(_0x5e22d0),_0xcf8e4=notificationLookupCommand(_0x5e22d0[_0x36c672(0x206)],_0x3df751[_0x36c672(0x205)][_0x36c672(0x1f5)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x5e22d0[_0x36c672(0x206)],'configName':_0x3df751[_0x36c672(0x205)][_0x36c672(0x210)],'channelType':_0x3df751['document'][_0x36c672(0x1f5)]},'before':null,'after':_0x3df751[_0x36c672(0x213)],'dryRun':!![],'backend':{'method':_0x36c672(0x1f8),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x36c672(0x213),'lookupCommand':_0xcf8e4}},{'method':_0x36c672(0x1f8),'url':CREATE_PATH});},async 'execute'(_0x207321){const _0x235b1c=a154_0x1ffb87,_0x1f78d4=await prepareCreate(_0x207321),_0x5190e1=notificationLookupCommand(_0x207321[_0x235b1c(0x206)],_0x1f78d4[_0x235b1c(0x205)][_0x235b1c(0x1f5)]);let _0x159c33;try{_0x159c33=await createNotificationChannelConfig(_0x1f78d4[_0x235b1c(0x201)]);}catch(_0x57872d){if(isPlatformTransportFailure(_0x57872d))throw notificationError(_0x235b1c(0x1fb),_0x235b1c(0x1f7),_0x235b1c(0x1f9)+_0x5190e1+_0x235b1c(0x1f6));throw safeApiFailure(_0x235b1c(0x1f3),_0x235b1c(0x212),_0x235b1c(0x1f9)+_0x5190e1+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number['isSafeInteger'](_0x159c33)||_0x159c33<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x235b1c(0x20e),'Inspect\x20with\x20'+_0x5190e1+_0x235b1c(0x1f6));let _0x181d56;try{const _0x4202e7=await getNotificationChannelConfig(_0x159c33,_0x207321[_0x235b1c(0x206)]);_0x181d56=normalizeExactNotificationConfig(_0x4202e7,_0x159c33,_0x207321[_0x235b1c(0x206)]);}catch{throw safeApiFailure('create',_0x235b1c(0x20a),_0x235b1c(0x1f9)+_0x5190e1+_0x235b1c(0x1ee));}return{'ok':!![],'data':{'operation':_0x235b1c(0x1f3),'selector':{'appCode':_0x181d56[_0x235b1c(0x206)],'id':_0x181d56['id'],'configCode':_0x181d56[_0x235b1c(0x1f1)],'configName':_0x181d56[_0x235b1c(0x210)],'channelType':_0x181d56['channelType']},'before':null,'after':projectNotificationConfig(_0x181d56),'dryRun':![],'backend':{'method':_0x235b1c(0x1f8),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x235b1c(0x1f2),'lookupCommand':_0x5190e1}},'message':_0x235b1c(0x20d)+_0x181d56['id']};}};
@@ -1 +1 @@
1
- const a155_0x26bcfd=a155_0x2bea;(function(_0x2566f0,_0x270fed){const _0x1e5316=a155_0x2bea,_0x22fb9c=_0x2566f0();while(!![]){try{const _0x4e63fd=parseInt(_0x1e5316(0x187))/0x1+-parseInt(_0x1e5316(0x18a))/0x2+-parseInt(_0x1e5316(0x183))/0x3+parseInt(_0x1e5316(0x188))/0x4*(-parseInt(_0x1e5316(0x194))/0x5)+parseInt(_0x1e5316(0x180))/0x6*(parseInt(_0x1e5316(0x186))/0x7)+-parseInt(_0x1e5316(0x179))/0x8*(parseInt(_0x1e5316(0x189))/0x9)+parseInt(_0x1e5316(0x17e))/0xa;if(_0x4e63fd===_0x270fed)break;else _0x22fb9c['push'](_0x22fb9c['shift']());}catch(_0x4d95c3){_0x22fb9c['push'](_0x22fb9c['shift']());}}}(a155_0x1693,0x1e602));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=a155_0x26bcfd(0x181),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';function a155_0x2bea(_0x3f06f8,_0x120657){_0x3f06f8=_0x3f06f8-0x179;const _0x169338=a155_0x1693();let _0x2bead2=_0x169338[_0x3f06f8];return _0x2bead2;}async function prepareDelete(_0x50ca11){const _0x8be0d5=a155_0x26bcfd,_0x1263c2=readNotificationId(_0x50ca11),_0x121581=await requireExactNotificationConfig(_0x50ca11[_0x8be0d5(0x193)],_0x1263c2,'delete');return{'id':_0x1263c2,'before':_0x121581};}function a155_0x1693(){const _0x1a2cb2=['notification_config_delete_verification_unavailable','Inspect\x20with\x20',';\x20no\x20automatic\x20retry\x20was\x20attempted.','POST','verified','notification_config_delete_verification_failed','appCode','10ySxWDR','unshift','some','before','delete','72dzsZgj','\x20delete\x20could\x20not\x20be\x20verified.','channelType','Deleted\x20notification\x20config\x20','planned','3627490HREvpT',';\x20do\x20not\x20resubmit\x20automatically.','513054ASBRNy','/notification/channel-config/delete','notification_config_delete_outcome_unknown','523719CLkfcC','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','mutation','14itSYNS','67036pCnRhI','23932DspeHL','238131NcbIBy','103430GshrpD','config-delete','high-risk-write'];a155_0x1693=function(){return _0x1a2cb2;};return a155_0x1693();}export const notificationConfigDelete={'service':'notification','command':a155_0x26bcfd(0x18b),'description':a155_0x26bcfd(0x184),'risk':a155_0x26bcfd(0x18c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x402cd6){readNotificationId(_0x402cd6),requireNotificationExplicitYes(_0x402cd6);},async 'dryRun'(_0x43cd6b){const _0xe2efb6=a155_0x26bcfd,_0x55952e=await prepareDelete(_0x43cd6b),_0x3a37af=notificationLookupCommand(_0x43cd6b[_0xe2efb6(0x193)],_0x55952e[_0xe2efb6(0x197)][_0xe2efb6(0x17b)]);return asDryRunResult({'operation':_0xe2efb6(0x198),'selector':notificationSelector(_0x55952e[_0xe2efb6(0x197)]),'before':projectNotificationConfig(_0x55952e['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xe2efb6(0x17d),'lookupCommand':_0x3a37af}},{'method':_0xe2efb6(0x190),'url':DELETE_PATH});},async 'execute'(_0x29cb43){const _0x45dab7=a155_0x26bcfd;requireNotificationExplicitYes(_0x29cb43);const _0x186680=await prepareDelete(_0x29cb43),_0x2d1790=notificationLookupCommand(_0x29cb43[_0x45dab7(0x193)],_0x186680[_0x45dab7(0x197)][_0x45dab7(0x17b)]);let _0x543255=![];try{await deleteNotificationChannelConfig(_0x186680['id'],_0x29cb43['appCode']);}catch(_0x1dd9fb){if(!isPlatformTransportFailure(_0x1dd9fb))throw safeApiFailure('delete',_0x45dab7(0x185),'Inspect\x20with\x20'+_0x2d1790+_0x45dab7(0x18f));_0x543255=!![];}let _0x3db068;try{_0x3db068=await listNotificationChannelConfigs(_0x29cb43[_0x45dab7(0x193)],_0x186680[_0x45dab7(0x197)]['channelType']),validateNotificationDeleteReadback(_0x3db068,_0x29cb43['appCode'],_0x186680['before'][_0x45dab7(0x17b)]);}catch{throw notificationError(_0x543255?_0x45dab7(0x182):_0x45dab7(0x18d),'Notification\x20config\x20'+_0x186680['id']+_0x45dab7(0x17a),'Inspect\x20with\x20'+_0x2d1790+_0x45dab7(0x17f));}if(_0x3db068[_0x45dab7(0x196)](_0x3f72aa=>_0x3f72aa['id']===_0x186680['id']))throw notificationError(_0x543255?_0x45dab7(0x182):_0x45dab7(0x192),'Notification\x20config\x20'+_0x186680['id']+'\x20remains\x20present\x20after\x20delete.',_0x45dab7(0x18e)+_0x2d1790+';\x20do\x20not\x20resubmit\x20automatically.');const _0x26ea0b=[REFERENCE_WARNING];return _0x543255&&_0x26ea0b[_0x45dab7(0x195)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x45dab7(0x198),'selector':notificationSelector(_0x186680['before']),'before':projectNotificationConfig(_0x186680[_0x45dab7(0x197)]),'after':null,'dryRun':![],'backend':{'method':_0x45dab7(0x190),'path':DELETE_PATH},'warnings':_0x26ea0b,'verification':{'status':_0x45dab7(0x191),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x543255,'lookupCommand':_0x2d1790}},'message':_0x45dab7(0x17c)+_0x186680['id']};}};
1
+ const a155_0x1d2fad=a155_0x1bd7;(function(_0x2b2d91,_0x177769){const _0x357a62=a155_0x1bd7,_0x27b060=_0x2b2d91();while(!![]){try{const _0x334d3f=-parseInt(_0x357a62(0x1dc))/0x1+parseInt(_0x357a62(0x1ed))/0x2*(parseInt(_0x357a62(0x1f5))/0x3)+parseInt(_0x357a62(0x1ef))/0x4+parseInt(_0x357a62(0x1e2))/0x5*(-parseInt(_0x357a62(0x1d9))/0x6)+-parseInt(_0x357a62(0x1f0))/0x7+-parseInt(_0x357a62(0x1f1))/0x8*(-parseInt(_0x357a62(0x1e8))/0x9)+parseInt(_0x357a62(0x1f2))/0xa*(parseInt(_0x357a62(0x1dd))/0xb);if(_0x334d3f===_0x177769)break;else _0x27b060['push'](_0x27b060['shift']());}catch(_0x288bea){_0x27b060['push'](_0x27b060['shift']());}}}(a155_0x5d84,0xa1631));function a155_0x5d84(){const _0x2fc8a2=['7585326ZZmSyS','4777272HNaeFM','4104850WpEnRI',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','15sIWZtb','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','90PTZKTJ','POST','Deleted\x20notification\x20config\x20','418011XEySEw','22gHgWkN','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','appCode','122660eOVrps','notification_config_delete_verification_failed','delete','\x20delete\x20could\x20not\x20be\x20verified.','verified',';\x20do\x20not\x20resubmit\x20automatically.','9MkayCp','planned','notification_config_delete_outcome_unknown','mutation','/notification/channel-config/delete','206114VFCcko','before','2388944auQtWM'];a155_0x5d84=function(){return _0x2fc8a2;};return a155_0x5d84();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a155_0x1bd7(_0x366094,_0x5af1e5){_0x366094=_0x366094-0x1d9;const _0x5d84ad=a155_0x5d84();let _0x1bd72f=_0x5d84ad[_0x366094];return _0x1bd72f;}const DELETE_PATH=a155_0x1d2fad(0x1ec),REFERENCE_WARNING=a155_0x1d2fad(0x1e0);async function prepareDelete(_0x357706){const _0xe4aaa5=a155_0x1d2fad,_0x538d18=readNotificationId(_0x357706),_0x4551e4=await requireExactNotificationConfig(_0x357706['appCode'],_0x538d18,_0xe4aaa5(0x1e4));return{'id':_0x538d18,'before':_0x4551e4};}export const notificationConfigDelete={'service':'notification','command':'config-delete','description':a155_0x1d2fad(0x1df),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xd980ca){readNotificationId(_0xd980ca),requireNotificationExplicitYes(_0xd980ca);},async 'dryRun'(_0x2a2610){const _0x386708=a155_0x1d2fad,_0x3c6b1a=await prepareDelete(_0x2a2610),_0x43ceaa=notificationLookupCommand(_0x2a2610[_0x386708(0x1e1)],_0x3c6b1a[_0x386708(0x1ee)][_0x386708(0x1f4)]);return asDryRunResult({'operation':_0x386708(0x1e4),'selector':notificationSelector(_0x3c6b1a[_0x386708(0x1ee)]),'before':projectNotificationConfig(_0x3c6b1a[_0x386708(0x1ee)]),'after':null,'dryRun':!![],'backend':{'method':_0x386708(0x1da),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x386708(0x1e9),'lookupCommand':_0x43ceaa}},{'method':_0x386708(0x1da),'url':DELETE_PATH});},async 'execute'(_0x45e309){const _0x7e483b=a155_0x1d2fad;requireNotificationExplicitYes(_0x45e309);const _0x551470=await prepareDelete(_0x45e309),_0x26f86f=notificationLookupCommand(_0x45e309[_0x7e483b(0x1e1)],_0x551470[_0x7e483b(0x1ee)]['channelType']);let _0x2d565b=![];try{await deleteNotificationChannelConfig(_0x551470['id'],_0x45e309[_0x7e483b(0x1e1)]);}catch(_0x23aebc){if(!isPlatformTransportFailure(_0x23aebc))throw safeApiFailure('delete',_0x7e483b(0x1eb),_0x7e483b(0x1f7)+_0x26f86f+_0x7e483b(0x1f3));_0x2d565b=!![];}let _0x1dbeb4;try{_0x1dbeb4=await listNotificationChannelConfigs(_0x45e309['appCode'],_0x551470[_0x7e483b(0x1ee)][_0x7e483b(0x1f4)]),validateNotificationDeleteReadback(_0x1dbeb4,_0x45e309[_0x7e483b(0x1e1)],_0x551470[_0x7e483b(0x1ee)][_0x7e483b(0x1f4)]);}catch{throw notificationError(_0x2d565b?_0x7e483b(0x1ea):'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x551470['id']+_0x7e483b(0x1e5),'Inspect\x20with\x20'+_0x26f86f+_0x7e483b(0x1e7));}if(_0x1dbeb4['some'](_0x3603f3=>_0x3603f3['id']===_0x551470['id']))throw notificationError(_0x2d565b?_0x7e483b(0x1ea):_0x7e483b(0x1e3),'Notification\x20config\x20'+_0x551470['id']+_0x7e483b(0x1f6),'Inspect\x20with\x20'+_0x26f86f+_0x7e483b(0x1e7));const _0x163d1a=[REFERENCE_WARNING];return _0x2d565b&&_0x163d1a['unshift'](_0x7e483b(0x1de)),{'ok':!![],'data':{'operation':_0x7e483b(0x1e4),'selector':notificationSelector(_0x551470[_0x7e483b(0x1ee)]),'before':projectNotificationConfig(_0x551470[_0x7e483b(0x1ee)]),'after':null,'dryRun':![],'backend':{'method':_0x7e483b(0x1da),'path':DELETE_PATH},'warnings':_0x163d1a,'verification':{'status':_0x7e483b(0x1e6),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2d565b,'lookupCommand':_0x26f86f}},'message':_0x7e483b(0x1db)+_0x551470['id']};}};
@@ -1 +1 @@
1
- const a156_0x50d0d1=a156_0x250b;function a156_0x33d7(){const _0x22a1d9=['4770RWeawr','204ZqcupK','\x20notification\x20config(s)','4608705yDUCIT','6vLGAHH','Found\x20','config-list','22136leFVGR','21757630lWmsjJ','string','type','2455296FoDlte','length','15741bSVXiu','11TxrcbW','271012chgbtt','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','map','4821609qVROkW','appCode'];a156_0x33d7=function(){return _0x22a1d9;};return a156_0x33d7();}(function(_0x542d49,_0x192851){const _0x3aed8e=a156_0x250b,_0xf98da3=_0x542d49();while(!![]){try{const _0x2decdc=parseInt(_0x3aed8e(0x186))/0x1*(parseInt(_0x3aed8e(0x18e))/0x2)+parseInt(_0x3aed8e(0x18b))/0x3+-parseInt(_0x3aed8e(0x198))/0x4+-parseInt(_0x3aed8e(0x190))/0x5+parseInt(_0x3aed8e(0x191))/0x6*(-parseInt(_0x3aed8e(0x188))/0x7)+parseInt(_0x3aed8e(0x194))/0x8*(parseInt(_0x3aed8e(0x18d))/0x9)+-parseInt(_0x3aed8e(0x195))/0xa*(parseInt(_0x3aed8e(0x187))/0xb);if(_0x2decdc===_0x192851)break;else _0xf98da3['push'](_0xf98da3['shift']());}catch(_0x2ffd03){_0xf98da3['push'](_0xf98da3['shift']());}}}(a156_0x33d7,0xe2de3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a156_0x250b(_0x11154d,_0x436949){_0x11154d=_0x11154d-0x186;const _0x33d745=a156_0x33d7();let _0x250be7=_0x33d745[_0x11154d];return _0x250be7;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a156_0x50d0d1(0x193),'description':a156_0x50d0d1(0x189),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a156_0x50d0d1(0x197),'type':a156_0x50d0d1(0x196),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x3427eb){readNotificationChannelType(_0x3427eb);},async 'execute'(_0x22eb76){const _0x42921c=a156_0x50d0d1,_0x400bba=readNotificationChannelType(_0x22eb76),_0x86ac74=await listNotificationChannelConfigs(_0x22eb76['appCode'],_0x400bba),_0x533f34=_0x86ac74[_0x42921c(0x18a)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x22eb76[_0x42921c(0x18c)],'channelType':_0x400bba,'count':_0x533f34[_0x42921c(0x199)],'configs':_0x533f34},'message':_0x42921c(0x192)+_0x533f34[_0x42921c(0x199)]+'\x20'+_0x400bba+_0x42921c(0x18f)};}};
1
+ function a156_0x3adc(_0x231321,_0x357610){_0x231321=_0x231321-0x1ee;const _0x490d81=a156_0x490d();let _0x3adc22=_0x490d81[_0x231321];return _0x3adc22;}const a156_0x32b037=a156_0x3adc;function a156_0x490d(){const _0x487873=['config-list','1314942DHKfTQ','\x20notification\x20config(s)','5454672NqYmtX','Notification\x20channel\x20type','1369461VkeJjR','2554904rJfozy','map','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','80020bpyxkl','type','4042311FQNzZz','22167162nPtIWc','1CAHrXp','Found\x20','string','144Ccypje','appCode','length','notification'];a156_0x490d=function(){return _0x487873;};return a156_0x490d();}(function(_0x2de0a5,_0x4140d4){const _0x579c66=a156_0x3adc,_0x141b97=_0x2de0a5();while(!![]){try{const _0x5a2078=-parseInt(_0x579c66(0x201))/0x1*(parseInt(_0x579c66(0x1f5))/0x2)+-parseInt(_0x579c66(0x1f9))/0x3+parseInt(_0x579c66(0x1fa))/0x4+parseInt(_0x579c66(0x1fd))/0x5*(-parseInt(_0x579c66(0x1f0))/0x6)+-parseInt(_0x579c66(0x1ff))/0x7+-parseInt(_0x579c66(0x1f7))/0x8+parseInt(_0x579c66(0x200))/0x9;if(_0x5a2078===_0x4140d4)break;else _0x141b97['push'](_0x141b97['shift']());}catch(_0x3f203c){_0x141b97['push'](_0x141b97['shift']());}}}(a156_0x490d,0x5413f));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':a156_0x32b037(0x1f3),'command':a156_0x32b037(0x1f4),'description':a156_0x32b037(0x1fc),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a156_0x32b037(0x1fe),'type':a156_0x32b037(0x1ef),'description':a156_0x32b037(0x1f8),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x53f775){readNotificationChannelType(_0x53f775);},async 'execute'(_0x49f54d){const _0x9cb5d1=a156_0x32b037,_0x10a114=readNotificationChannelType(_0x49f54d),_0x5a3385=await listNotificationChannelConfigs(_0x49f54d['appCode'],_0x10a114),_0x5bece6=_0x5a3385[_0x9cb5d1(0x1fb)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x49f54d[_0x9cb5d1(0x1f1)],'channelType':_0x10a114,'count':_0x5bece6[_0x9cb5d1(0x1f2)],'configs':_0x5bece6},'message':_0x9cb5d1(0x1ee)+_0x5bece6[_0x9cb5d1(0x1f2)]+'\x20'+_0x10a114+_0x9cb5d1(0x1f6)};}};
@@ -1 +1 @@
1
- function a157_0x550c(_0x1b2305,_0x3a1d2a){_0x1b2305=_0x1b2305-0x1d9;const _0x1137e5=a157_0x1137();let _0x550c50=_0x1137e5[_0x1b2305];return _0x550c50;}const a157_0x4839b4=a157_0x550c;(function(_0x129637,_0x24d721){const _0x2a29b0=a157_0x550c,_0x2bd97e=_0x129637();while(!![]){try{const _0x32d054=parseInt(_0x2a29b0(0x1ea))/0x1+parseInt(_0x2a29b0(0x1e9))/0x2*(-parseInt(_0x2a29b0(0x1da))/0x3)+-parseInt(_0x2a29b0(0x1fa))/0x4*(parseInt(_0x2a29b0(0x1f5))/0x5)+parseInt(_0x2a29b0(0x1e8))/0x6+parseInt(_0x2a29b0(0x1ec))/0x7*(-parseInt(_0x2a29b0(0x1ff))/0x8)+parseInt(_0x2a29b0(0x1db))/0x9+-parseInt(_0x2a29b0(0x1f7))/0xa*(parseInt(_0x2a29b0(0x1fb))/0xb);if(_0x32d054===_0x24d721)break;else _0x2bd97e['push'](_0x2bd97e['shift']());}catch(_0x927615){_0x2bd97e['push'](_0x2bd97e['shift']());}}}(a157_0x1137,0xceedd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a157_0x1137(){const _0x1e161a=['9093861iOcuLe','verified','Inspect\x20with\x20--id\x20','provesChange','high-risk-write','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification','channelType','config-update','\x20via\x20','appCode','verifiedFields','\x20with\x20','9628872mROnfg','460nDfvSV','1038508egQJpW','allMatch','335769zmNUAH','POST','before','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Notification\x20config\x20','notification_config_update_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/update','update','1442545KluTtQ','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','343010itWhno','payload','planned','4anEczy','55ltmSwO','notification_config_update_outcome_unknown','Inspect\x20ID\x20','notification_config_update_verification_unavailable','256ksbczo','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','10581jFtAaS'];a157_0x1137=function(){return _0x1e161a;};return a157_0x1137();}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=a157_0x4839b4(0x1f3);async function prepareUpdate(_0x4cadf4){const _0x2e86f4=a157_0x4839b4,_0x25335c=readNotificationId(_0x4cadf4),_0x3ee1e6=await readNotificationDocument(_0x4cadf4,_0x2e86f4(0x1f4)),_0x44421c=await requireExactNotificationConfig(_0x4cadf4['appCode'],_0x25335c,_0x2e86f4(0x1f4));return{'id':_0x25335c,'patch':_0x3ee1e6,'before':_0x44421c,'payload':mergeUpdateInput(_0x44421c,_0x3ee1e6),'planned':plannedUpdateProjection(_0x44421c,_0x3ee1e6)};}export const notificationConfigUpdate={'service':a157_0x4839b4(0x1e1),'command':a157_0x4839b4(0x1e3),'description':a157_0x4839b4(0x1e0),'risk':a157_0x4839b4(0x1df),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x445f36){readNotificationId(_0x445f36),assertSingleNotificationSource(_0x445f36),requireNotificationExplicitYes(_0x445f36);},async 'dryRun'(_0xc93112){const _0x2e4562=a157_0x4839b4,_0x4b9b63=await prepareUpdate(_0xc93112),_0x5c8dab=notificationLookupCommand(_0xc93112[_0x2e4562(0x1e5)],_0x4b9b63[_0x2e4562(0x1ee)]['channelType']);return asDryRunResult({'operation':_0x2e4562(0x1f4),'selector':notificationSelector(_0x4b9b63[_0x2e4562(0x1ee)]),'before':projectNotificationConfig(_0x4b9b63[_0x2e4562(0x1ee)]),'after':_0x4b9b63[_0x2e4562(0x1f9)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2e4562(0x1f9),'lookupCommand':_0x5c8dab}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x5ecc7f){const _0x27683a=a157_0x4839b4;requireNotificationExplicitYes(_0x5ecc7f);const _0x32fab8=await prepareUpdate(_0x5ecc7f),_0x49478c=notificationLookupCommand(_0x5ecc7f[_0x27683a(0x1e5)],_0x32fab8[_0x27683a(0x1ee)][_0x27683a(0x1e2)]);let _0xa90c89=![];try{await updateNotificationChannelConfig(_0x32fab8[_0x27683a(0x1f8)]);}catch(_0x29b577){if(!isPlatformTransportFailure(_0x29b577))throw safeApiFailure('update','mutation',_0x27683a(0x1fd)+_0x32fab8['id']+_0x27683a(0x1e7)+_0x49478c+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0xa90c89=!![];}let _0x4b06ad;try{const _0x3c40f3=await getNotificationChannelConfig(_0x32fab8['id'],_0x5ecc7f[_0x27683a(0x1e5)]);_0x4b06ad=normalizeExactNotificationConfig(_0x3c40f3,_0x32fab8['id'],_0x5ecc7f['appCode']);}catch{throw notificationError(_0xa90c89?_0x27683a(0x1fc):_0x27683a(0x1fe),'Notification\x20config\x20'+_0x32fab8['id']+_0x27683a(0x1d9),_0x27683a(0x1dd)+_0x32fab8['id']+_0x27683a(0x1e4)+_0x49478c+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x4fc19b=requestedSafeFieldsMatch(_0x32fab8[_0x27683a(0x1ee)],_0x4b06ad,_0x32fab8['patch']);if(!_0x4fc19b[_0x27683a(0x1eb)]||_0xa90c89&&!_0x4fc19b[_0x27683a(0x1de)])throw notificationError(_0xa90c89?_0x27683a(0x1fc):_0x27683a(0x1f1),_0x27683a(0x1f0)+_0x32fab8['id']+_0x27683a(0x1ef),_0x27683a(0x1dd)+_0x32fab8['id']+_0x27683a(0x1e4)+_0x49478c+_0x27683a(0x1f2));const _0x57188b=_0xa90c89?[_0x27683a(0x1f6)]:[];return{'ok':!![],'data':{'operation':_0x27683a(0x1f4),'selector':notificationSelector(_0x4b06ad),'before':projectNotificationConfig(_0x32fab8['before']),'after':projectNotificationConfig(_0x4b06ad),'dryRun':![],'backend':{'method':_0x27683a(0x1ed),'path':UPDATE_PATH},'warnings':_0x57188b,'verification':{'status':_0x27683a(0x1dc),'recoveredAfterUnknownResponse':_0xa90c89,'verifiedFields':_0x4fc19b[_0x27683a(0x1e6)],'lookupCommand':_0x49478c}},'message':'Updated\x20notification\x20config\x20'+_0x4b06ad['id']};}};
1
+ const a157_0x5e1f72=a157_0xc996;(function(_0xea560e,_0x526ff0){const _0x22435e=a157_0xc996,_0x43b654=_0xea560e();while(!![]){try{const _0x5cf8af=-parseInt(_0x22435e(0xe0))/0x1+-parseInt(_0x22435e(0xda))/0x2+-parseInt(_0x22435e(0xd4))/0x3+parseInt(_0x22435e(0xe5))/0x4+parseInt(_0x22435e(0xd6))/0x5+parseInt(_0x22435e(0xe9))/0x6+parseInt(_0x22435e(0xd5))/0x7*(parseInt(_0x22435e(0xde))/0x8);if(_0x5cf8af===_0x526ff0)break;else _0x43b654['push'](_0x43b654['shift']());}catch(_0x59c6e2){_0x43b654['push'](_0x43b654['shift']());}}}(a157_0x2f2e,0x8f8ed));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a157_0x2f2e(){const _0x159da7=['670029tEnWey','124901xHnykB','1906985gmKDpq','notification_config_update_outcome_unknown','appCode','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1795270zLDVay','Updated\x20notification\x20config\x20','verifiedFields','allMatch','368PgLtkO','payload','654997LBnyrD','notification_config_update_verification_unavailable','channelType','high-risk-write','POST','1466348yZDBjn','Notification\x20config\x20','Inspect\x20ID\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','4771356czBQFo','update','Inspect\x20with\x20--id\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','mutation',';\x20do\x20not\x20resubmit\x20automatically.','before','planned','\x20via\x20','provesChange','\x20with\x20','config-update','notification'];a157_0x2f2e=function(){return _0x159da7;};return a157_0x2f2e();}function a157_0xc996(_0x2b7c8f,_0x39f295){_0x2b7c8f=_0x2b7c8f-0xd0;const _0x2f2eda=a157_0x2f2e();let _0xc996ec=_0x2f2eda[_0x2b7c8f];return _0xc996ec;}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='/notification/channel-config/update';async function prepareUpdate(_0x952364){const _0xe2c05c=a157_0xc996,_0x25b55e=readNotificationId(_0x952364),_0x23d63c=await readNotificationDocument(_0x952364,_0xe2c05c(0xea)),_0x2038fc=await requireExactNotificationConfig(_0x952364['appCode'],_0x25b55e,_0xe2c05c(0xea));return{'id':_0x25b55e,'patch':_0x23d63c,'before':_0x2038fc,'payload':mergeUpdateInput(_0x2038fc,_0x23d63c),'planned':plannedUpdateProjection(_0x2038fc,_0x23d63c)};}export const notificationConfigUpdate={'service':a157_0x5e1f72(0xd3),'command':a157_0x5e1f72(0xd2),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a157_0x5e1f72(0xe3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4b7c72){readNotificationId(_0x4b7c72),assertSingleNotificationSource(_0x4b7c72),requireNotificationExplicitYes(_0x4b7c72);},async 'dryRun'(_0x2dadf9){const _0x5eefbc=a157_0x5e1f72,_0x4f85be=await prepareUpdate(_0x2dadf9),_0x195859=notificationLookupCommand(_0x2dadf9['appCode'],_0x4f85be[_0x5eefbc(0xef)][_0x5eefbc(0xe2)]);return asDryRunResult({'operation':_0x5eefbc(0xea),'selector':notificationSelector(_0x4f85be[_0x5eefbc(0xef)]),'before':projectNotificationConfig(_0x4f85be[_0x5eefbc(0xef)]),'after':_0x4f85be[_0x5eefbc(0xf0)],'dryRun':!![],'backend':{'method':_0x5eefbc(0xe4),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5eefbc(0xf0),'lookupCommand':_0x195859}},{'method':_0x5eefbc(0xe4),'url':UPDATE_PATH});},async 'execute'(_0x4d8bf6){const _0x4189be=a157_0x5e1f72;requireNotificationExplicitYes(_0x4d8bf6);const _0x279225=await prepareUpdate(_0x4d8bf6),_0x4ba583=notificationLookupCommand(_0x4d8bf6[_0x4189be(0xd8)],_0x279225[_0x4189be(0xef)]['channelType']);let _0x154aba=![];try{await updateNotificationChannelConfig(_0x279225[_0x4189be(0xdf)]);}catch(_0x4689c9){if(!isPlatformTransportFailure(_0x4689c9))throw safeApiFailure(_0x4189be(0xea),_0x4189be(0xed),_0x4189be(0xe7)+_0x279225['id']+_0x4189be(0xd1)+_0x4ba583+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x154aba=!![];}let _0x5673dd;try{const _0x1b7d0f=await getNotificationChannelConfig(_0x279225['id'],_0x4d8bf6[_0x4189be(0xd8)]);_0x5673dd=normalizeExactNotificationConfig(_0x1b7d0f,_0x279225['id'],_0x4d8bf6[_0x4189be(0xd8)]);}catch{throw notificationError(_0x154aba?_0x4189be(0xd7):_0x4189be(0xe1),_0x4189be(0xe6)+_0x279225['id']+_0x4189be(0xe8),_0x4189be(0xeb)+_0x279225['id']+_0x4189be(0xf1)+_0x4ba583+_0x4189be(0xee));}const _0x6dabf7=requestedSafeFieldsMatch(_0x279225[_0x4189be(0xef)],_0x5673dd,_0x279225['patch']);if(!_0x6dabf7[_0x4189be(0xdd)]||_0x154aba&&!_0x6dabf7[_0x4189be(0xd0)])throw notificationError(_0x154aba?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed',_0x4189be(0xe6)+_0x279225['id']+_0x4189be(0xd9),_0x4189be(0xeb)+_0x279225['id']+_0x4189be(0xf1)+_0x4ba583+';\x20do\x20not\x20resubmit\x20automatically.');const _0x4c083f=_0x154aba?[_0x4189be(0xec)]:[];return{'ok':!![],'data':{'operation':_0x4189be(0xea),'selector':notificationSelector(_0x5673dd),'before':projectNotificationConfig(_0x279225[_0x4189be(0xef)]),'after':projectNotificationConfig(_0x5673dd),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x4c083f,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x154aba,'verifiedFields':_0x6dabf7[_0x4189be(0xdc)],'lookupCommand':_0x4ba583}},'message':_0x4189be(0xdb)+_0x5673dd['id']};}};
@@ -1 +1 @@
1
- (function(_0xd046b1,_0x2e7d5e){const _0x2a7c33=a158_0x4646,_0x2e145f=_0xd046b1();while(!![]){try{const _0x5244cc=-parseInt(_0x2a7c33(0x70))/0x1+-parseInt(_0x2a7c33(0x74))/0x2+-parseInt(_0x2a7c33(0x71))/0x3+parseInt(_0x2a7c33(0x78))/0x4*(-parseInt(_0x2a7c33(0x75))/0x5)+parseInt(_0x2a7c33(0x6f))/0x6*(-parseInt(_0x2a7c33(0x72))/0x7)+parseInt(_0x2a7c33(0x73))/0x8+-parseInt(_0x2a7c33(0x76))/0x9*(-parseInt(_0x2a7c33(0x77))/0xa);if(_0x5244cc===_0x2e7d5e)break;else _0x2e145f['push'](_0x2e145f['shift']());}catch(_0x56de77){_0x2e145f['push'](_0x2e145f['shift']());}}}(a158_0x8454,0x8a95f));function a158_0x8454(){const _0x5202bf=['7yAxzHh','3607096zOzXPk','1564588ougHur','5669390kWzRqe','31696245IuAggY','10iHbWLx','4bEAEKN','5414190dBEIxk','76438sgRidZ','1530210LwFLge'];a158_0x8454=function(){return _0x5202bf;};return a158_0x8454();}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a158_0x4646(_0x53269e,_0x176697){_0x53269e=_0x53269e-0x6f;const _0x845425=a158_0x8454();let _0x46463c=_0x845425[_0x53269e];return _0x46463c;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x50f208,_0xc73723){const _0x5bd8b8=a158_0x42de,_0x3e0590=_0x50f208();while(!![]){try{const _0x1e1c28=parseInt(_0x5bd8b8(0xc9))/0x1*(-parseInt(_0x5bd8b8(0xca))/0x2)+-parseInt(_0x5bd8b8(0xc2))/0x3+-parseInt(_0x5bd8b8(0xc5))/0x4+parseInt(_0x5bd8b8(0xc7))/0x5*(parseInt(_0x5bd8b8(0xc8))/0x6)+parseInt(_0x5bd8b8(0xc4))/0x7+-parseInt(_0x5bd8b8(0xc6))/0x8+-parseInt(_0x5bd8b8(0xcb))/0x9*(-parseInt(_0x5bd8b8(0xc3))/0xa);if(_0x1e1c28===_0xc73723)break;else _0x3e0590['push'](_0x3e0590['shift']());}catch(_0x15d9aa){_0x3e0590['push'](_0x3e0590['shift']());}}}(a158_0x49f9,0xd7100));import{notificationConfigList}from'../../commands/notification/config-list.js';function a158_0x49f9(){const _0x4d327b=['4880250erQqgs','2500230sIOKRq','5753797NXXkSx','5167108NzdRzT','8362568IsewOW','165HCeXdC','274674YHjJvX','7shADbo','353794zFnkVF','135SHesVX'];a158_0x49f9=function(){return _0x4d327b;};return a158_0x49f9();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a158_0x42de(_0x25f9c8,_0x277003){_0x25f9c8=_0x25f9c8-0xc2;const _0x49f92a=a158_0x49f9();let _0x42de2e=_0x49f92a[_0x25f9c8];return _0x42de2e;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];